(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67],{76064:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=void 0;let s=i(r(46962)),a=r(95364),o=r(1780),u=r(36037),c=r(96437),l=r(8723),d=r(23328),h=r(95157),f=r(79249),p=r(40783);class m extends s.default{constructor(e){var t,r,{metadata:i}=e,s=e.preference,{keysUrl:o}=s,f=n(s,["keysUrl"]);super(),this.accounts=[],this.handlers={handshake:async e=>{try{if(this.connected)return this.emit("connect",{chainId:(0,c.hexStringFromIntNumber)((0,u.IntNumber)(this.chain.id))}),this.accounts;let e=await this.requestSignerSelection(),t=this.initSigner(e),r=await t.handshake();return this.signer=t,(0,l.storeSignerType)(e),this.emit("connect",{chainId:(0,c.hexStringFromIntNumber)((0,u.IntNumber)(this.chain.id))}),r}catch(e){throw this.handleUnauthorizedError(e),e}},sign:async e=>{if(!this.connected||!this.signer)throw a.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods");try{return await this.signer.request(e)}catch(e){throw this.handleUnauthorizedError(e),e}},fetch:e=>(0,d.fetchRPCRequest)(e,this.chain),state:e=>{let t=()=>{if(this.connected)return this.accounts;throw a.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(e.method){case"eth_chainId":return(0,c.hexStringFromIntNumber)((0,u.IntNumber)(this.chain.id));case"net_version":return this.chain.id;case"eth_accounts":return t();case"eth_coinbase":return t()[0];default:return this.handlers.unsupported(e)}},deprecated:({method:e})=>{throw a.standardErrors.rpc.methodNotSupported(`Method ${e} is deprecated.`)},unsupported:({method:e})=>{throw a.standardErrors.rpc.methodNotSupported(`Method ${e} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:({accounts:e,source:t})=>{(0,c.areAddressArraysEqual)(this.accounts,e)||(this.accounts=e,"storage"!==t&&this.emit("accountsChanged",this.accounts))},onChainUpdate:({chain:e,source:t})=>{(e.id!==this.chain.id||e.rpcUrl!==this.chain.rpcUrl)&&(this.chain=e,"storage"!==t&&this.emit("chainChanged",(0,c.hexStringFromIntNumber)((0,u.IntNumber)(e.id))))}},this.metadata=i,this.preference=f,this.communicator=new h.Communicator(o),this.chain={id:null!==(r=null===(t=i.appChainIds)||void 0===t?void 0:t[0])&&void 0!==r?r:1};let p=(0,l.loadSignerType)();this.signer=p?this.initSigner(p):null}get connected(){return this.accounts.length>0}async request(e){var t;try{let r=(0,d.checkErrorForInvalidRequestArgs)(e);if(r)throw r;let n=null!==(t=(0,f.determineMethodCategory)(e.method))&&void 0!==t?t:"fetch";return this.handlers[n](e)}catch(t){return Promise.reject((0,o.serializeError)(t,e.method))}}handleUnauthorizedError(e){e.code===a.standardErrorCodes.provider.unauthorized&&this.disconnect()}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){this.accounts=[],this.chain={id:1},p.ScopedLocalStorage.clearAll(),this.emit("disconnect",a.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,l.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){return(0,l.createSigner)({signerType:e,metadata:this.metadata,communicator:this.communicator,updateListener:this.updateListener})}}t.CoinbaseWalletProvider=m},5455:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;let n=r(26783),i=r(76064),s=r(40783),a=r(56092),o=r(96437),u=r(23328);class c{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,o.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(e={options:"all"}){var t;let r={metadata:this.metadata,preference:e};return null!==(t=(0,u.getCoinbaseInjectedProvider)(r))&&void 0!==t?t:new i.CoinbaseWalletProvider(r)}getCoinbaseWalletLogo(e,t=240){return(0,n.walletLogo)(e,t)}storeLatestVersion(){new s.ScopedLocalStorage("CBWSDK").setItem("VERSION",a.LIB_VERSION)}}t.CoinbaseWalletSDK=c},26783:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0,t.walletLogo=(e,t)=>{let r;switch(e){case"standard":default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`}}},95157:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Communicator=void 0;let n=r(56092),i=r(24783),s=r(14219),a=r(95364);class o{constructor(e=s.CB_KEYS_URL){this.popup=null,this.listeners=new Map,this.postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)},this.postRequestAndWaitForResponse=async e=>{let t=this.onMessage(({requestId:t})=>t===e.id);return this.postMessage(e),await t},this.onMessage=async e=>new Promise((t,r)=>{let n=r=>{if(r.origin!==this.url.origin)return;let i=r.data;e(i)&&(t(i),window.removeEventListener("message",n),this.listeners.delete(n))};window.addEventListener("message",n),this.listeners.set(n,{reject:r})}),this.disconnect=()=>{(0,i.closePopup)(this.popup),this.popup=null,this.listeners.forEach(({reject:e},t)=>{e(a.standardErrors.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",t)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?this.popup:(this.popup=(0,i.openPopup)(this.url),this.onMessage(({event:e})=>"PopupUnload"===e).then(this.disconnect).catch(()=>{}),this.onMessage(({event:e})=>"PopupLoaded"===e).then(e=>{this.postMessage({requestId:e.id,data:{version:n.LIB_VERSION}})}).then(()=>{if(!this.popup)throw a.standardErrors.rpc.internal();return this.popup})),this.url=new URL(e)}}t.Communicator=o},24783:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closePopup=t.openPopup=void 0;let n=r(95364);t.openPopup=function(e){let t=(window.innerWidth-420)/2+window.screenX,r=(window.innerHeight-540)/2+window.screenY,i=window.open(e,"Smart Wallet",`width=420, height=540, left=${t}, top=${r}`);if(null==i||i.focus(),!i)throw n.standardErrors.rpc.internal("Pop up window failed to open");return i},t.closePopup=function(e){e&&!e.closed&&e.close()}},14219:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CBW_MOBILE_DEEPLINK_URL=t.WALLETLINK_URL=t.CB_KEYS_URL=void 0,t.CB_KEYS_URL="https://keys.coinbase.com/connect",t.WALLETLINK_URL="https://www.walletlink.org",t.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink"},33144:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.standardErrorCodes=void 0,t.standardErrorCodes={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,unsupportedChain:4902}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}},44207:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardErrors=void 0;let n=r(33144),i=r(51613);function s(e,t){let[r,n]=o(t);return new u(e,r||(0,i.getMessageFromCode)(e),n)}function a(e,t){let[r,n]=o(t);return new c(e,r||(0,i.getMessageFromCode)(e),n)}function o(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:r}=e;if(t&&"string"!=typeof t)throw Error("Must specify string message.");return[t||void 0,r]}}return[]}t.standardErrors={rpc:{parse:e=>s(n.standardErrorCodes.rpc.parse,e),invalidRequest:e=>s(n.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>s(n.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>s(n.standardErrorCodes.rpc.methodNotFound,e),internal:e=>s(n.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(n.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(n.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(n.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(n.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(n.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(n.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(n.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(n.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(n.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>a(n.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>a(n.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>a(n.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw Error('"message" must be a nonempty string');return new c(t,r,n)}}};class u extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}}class c extends u{constructor(e,t,r){if(!(Number.isInteger(e)&&e>=1e3&&e<=4999))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},95364:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardErrors=t.standardErrorCodes=void 0;var n=r(33144);Object.defineProperty(t,"standardErrorCodes",{enumerable:!0,get:function(){return n.standardErrorCodes}});var i=r(44207);Object.defineProperty(t,"standardErrors",{enumerable:!0,get:function(){return i.standardErrors}})},1780:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=void 0;let n=r(28663),i=r(56092),s=r(33144),a=r(51613);t.serializeError=function(e,t){let r=(0,a.serialize)("string"==typeof e?{message:e,code:s.standardErrorCodes.rpc.internal}:(0,n.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e,{shouldIncludeStack:!0}),o=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");o.searchParams.set("version",i.LIB_VERSION),o.searchParams.set("code",r.code.toString());let u=function(e,t){let r=null==e?void 0:e.method;if(r)return r;if(void 0===t);else if("string"==typeof t)return t;else if(!Array.isArray(t))return t.method;else if(t.length>0)return t[0].method}(r.data,t);return u&&o.searchParams.set("method",u),o.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:o.href})}},51613:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.getErrorCode=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;let n=r(33144),i="Unspecified error message.";function s(e,r=i){if(e&&Number.isInteger(e)){let r=e.toString();if(u(n.errorValues,r))return n.errorValues[r].message;if(e>=-32099&&e<=-32e3)return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function a(e){if(!Number.isInteger(e))return!1;let t=e.toString();return!!(n.errorValues[t]||e>=-32099&&e<=-32e3)}function o(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return"object"==typeof e&&null!==e&&t in e&&"string"==typeof e[t]}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=s,t.isValidCode=a,t.getErrorCode=function(e){var t;return"number"==typeof e?e:"object"==typeof e&&null!==e&&("number"==typeof e.code||"number"==typeof e.errorCode)?null!==(t=e.code)&&void 0!==t?t:e.errorCode:void 0},t.serialize=function(e,{shouldIncludeStack:t=!1}={}){let r={};return e&&"object"==typeof e&&!Array.isArray(e)&&u(e,"code")&&a(e.code)?(r.code=e.code,e.message&&"string"==typeof e.message?(r.message=e.message,u(e,"data")&&(r.data=e.data)):(r.message=s(r.code),r.data={originalError:o(e)})):(r.code=n.standardErrorCodes.rpc.internal,r.message=c(e,"message")?e.message:i,r.data={originalError:o(e)}),t&&(r.stack=c(e,"stack")?e.stack:void 0),r}},79249:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.determineMethodCategory=void 0;let r={handshake:["eth_requestAccounts"],sign:["eth_ecRecover","personal_sign","personal_ecRecover","eth_signTransaction","eth_sendTransaction","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTypedData","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus"],state:["eth_chainId","eth_accounts","eth_coinbase","net_version"],deprecated:["eth_sign","eth_signTypedData_v2"],unsupported:["eth_subscribe","eth_unsubscribe"],fetch:[]};t.determineMethodCategory=function(e){for(let t in r)if(r[t].includes(e))return t}},36037:function(e,t){"use strict";function r(){return e=>e}Object.defineProperty(t,"__esModule",{value:!0}),t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=r,t.HexString=r(),t.AddressString=r(),t.BigIntString=r(),t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=r()},96437:function(e,t,r){"use strict";var n=r(1890).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.areAddressArraysEqual=t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBigInt=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBigInt=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;let i=r(95364),s=r(36037),a=/^[0-9]*$/,o=/^[a-f0-9]*$/;function u(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}function c(e){return e.startsWith("0x")||e.startsWith("0X")}function l(e){return c(e)?e.slice(2):e}function d(e){return c(e)?`0x${e.slice(2)}`:`0x${e}`}function h(e){if("string"!=typeof e)return!1;let t=l(e).toLowerCase();return o.test(t)}function f(e,t=!1){if("string"==typeof e){let r=l(e).toLowerCase();if(o.test(r))return(0,s.HexString)(t?`0x${r}`:r)}throw i.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}function p(e,t=!1){let r=f(e,!1);return r.length%2==1&&(r=(0,s.HexString)(`0${r}`)),t?(0,s.HexString)(`0x${r}`):r}function m(e){if("number"==typeof e&&Number.isInteger(e))return(0,s.IntNumber)(e);if("string"==typeof e){if(a.test(e))return(0,s.IntNumber)(Number(e));if(h(e))return(0,s.IntNumber)(Number(BigInt(p(e,!0))))}throw i.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}function g(e){if(null==e||"function"!=typeof e.constructor)return!1;let{constructor:t}=e;return"function"==typeof t.config&&"number"==typeof t.EUCLID}t.randomBytesHex=function(e){return u(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=u,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map(e=>parseInt(e,16)))},t.hexStringFromBuffer=function(e,t=!1){let r=e.toString("hex");return(0,s.HexString)(t?`0x${r}`:r)},t.bigIntStringFromBigInt=function(e){return(0,s.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,s.IntNumber)(Number(BigInt(p(e,!0))))},t.hexStringFromIntNumber=function(e){return(0,s.HexString)(`0x${BigInt(e).toString(16)}`)},t.has0xPrefix=c,t.strip0x=l,t.prepend0x=d,t.isHexString=h,t.ensureHexString=f,t.ensureEvenLengthHexString=p,t.ensureAddressString=function(e){if("string"==typeof e){let t=l(e).toLowerCase();if(h(t)&&40===t.length)return(0,s.AddressString)(d(t))}throw i.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)},t.ensureBuffer=function(e){if(n.isBuffer(e))return e;if("string"==typeof e){if(h(e)){let t=p(e,!1);return n.from(t,"hex")}return n.from(e,"utf8")}throw i.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)},t.ensureIntNumber=m,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,s.RegExpString)(e.toString());throw i.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)},t.ensureBigInt=function(e){if(null!==e&&("bigint"==typeof e||g(e)))return BigInt(e.toString(10));if("number"==typeof e)return BigInt(m(e));if("string"==typeof e){if(a.test(e))return BigInt(e);if(h(e))return BigInt(p(e,!0))}throw i.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)},t.ensureParsedJSONObject=function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw i.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)},t.isBigNumber=g,t.range=function(e,t){return Array.from({length:t-e},(t,r)=>e+r)},t.getFavicon=function(){let e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`},t.areAddressArraysEqual=function(e,t){return e.length===t.length&&e.every((e,r)=>e===t[r])}},10528:function(e,t,r){"use strict";t.jp=void 0,r(5455).CoinbaseWalletSDK;var n=r(5455);Object.defineProperty(t,"jp",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}})},33805:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWKeyManager=void 0;let n=r(83707),i=r(40783),s={storageKey:"ownPrivateKey",keyType:"private"},a={storageKey:"ownPublicKey",keyType:"public"},o={storageKey:"peerPublicKey",keyType:"public"};class u{constructor(){this.storage=new i.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(o,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(a.storageKey),this.storage.removeItem(s.storageKey),this.storage.removeItem(o.storageKey)}async generateKeyPair(){let e=await (0,n.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(s,e.privateKey),await this.storeKey(a,e.publicKey)}async loadKeysIfNeeded(){null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(s)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(a)),(null===this.ownPrivateKey||null===this.ownPublicKey)&&await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(o)),null===this.sharedSecret&&null!==this.ownPrivateKey&&null!==this.peerPublicKey&&(this.sharedSecret=await (0,n.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey))}async loadKey(e){let t=this.storage.getItem(e.storageKey);return t?(0,n.importKeyFromHexString)(e.keyType,t):null}async storeKey(e,t){let r=await (0,n.exportKeyToHexString)(e.keyType,t);this.storage.setItem(e.storageKey,r)}}t.SCWKeyManager=u},20053:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWSigner=void 0;let n=r(33805),i=r(88003),s=r(95364),a=r(96437),o=r(83707);class u{constructor(e){this.metadata=e.metadata,this.communicator=e.communicator,this.keyManager=new n.SCWKeyManager,this.stateManager=new i.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:e.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){let e=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),t=await this.communicator.postRequestAndWaitForResponse(e);if("failure"in t.content)throw t.content.failure;let r=await (0,o.importKeyFromHexString)("public",t.sender);await this.keyManager.setPeerPublicKey(r);let n=await this.decryptResponseMessage(t);this.updateInternalState({method:"eth_requestAccounts"},n);let i=n.result;if("error"in i)throw i.error;return this.stateManager.accounts}async request(e){let t=this.tryLocalHandling(e);if(void 0!==t){if(t instanceof Error)throw t;return t}await this.communicator.waitForPopupLoaded();let r=await this.sendEncryptedRequest(e),n=await this.decryptResponseMessage(r);this.updateInternalState(e,n);let i=n.result;if("error"in i)throw i.error;return i.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(e){var t;switch(e.method){case"wallet_switchEthereumChain":{let r=e.params;if(!r||!(null===(t=r[0])||void 0===t?void 0:t.chainId))throw s.standardErrors.rpc.invalidParams();let n=(0,a.ensureIntNumber)(r[0].chainId);return this.stateManager.switchChain(n)?null:void 0}case"wallet_getCapabilities":{let e=this.stateManager.walletCapabilities;if(!e)throw s.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return e}default:return}}async sendEncryptedRequest(e){let t=await this.keyManager.getSharedSecret();if(!t)throw s.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");let r=await (0,o.encryptContent)({action:e,chainId:this.stateManager.activeChain.id},t),n=await this.createRequestMessage({encrypted:r});return this.communicator.postRequestAndWaitForResponse(n)}async createRequestMessage(e){let t=await (0,o.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){let t=e.content;if("failure"in t)throw t.failure;let r=await this.keyManager.getSharedSecret();if(!r)throw s.standardErrors.provider.unauthorized("Invalid session");return(0,o.decryptContent)(t.encrypted,r)}updateInternalState(e,t){var r,n;let i=null===(r=t.data)||void 0===r?void 0:r.chains;i&&this.stateManager.updateAvailableChains(i);let s=null===(n=t.data)||void 0===n?void 0:n.capabilities;s&&this.stateManager.updateWalletCapabilities(s);let o=t.result;if(!("error"in o))switch(e.method){case"eth_requestAccounts":{let e=o.value;this.stateManager.updateAccounts(e);break}case"wallet_switchEthereumChain":{if(null!==o.value)return;let t=e.params,r=(0,a.ensureIntNumber)(t[0].chainId);this.stateManager.switchChain(r)}}}}t.SCWSigner=u},88003:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWStateManager=void 0;let n=r(40783),i="accounts",s="activeChain",a="availableChains",o="walletCapabilities";class u{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var t,r;this.storage=new n.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(a),this._walletCapabilities=this.loadItemFromStorage(o);let u=this.loadItemFromStorage(i),c=this.loadItemFromStorage(s);u&&this.updateListener.onAccountsUpdate({accounts:u,source:"storage"}),c&&this.updateListener.onChainUpdate({chain:c,source:"storage"}),this._accounts=u||[],this._activeChain=c||{id:null!==(r=null===(t=e.appChainIds)||void 0===t?void 0:t[0])&&void 0!==r?r:1}}updateAccounts(e){this._accounts=e,this.storeItemToStorage(i,e),this.updateListener.onAccountsUpdate({accounts:e,source:"wallet"})}switchChain(e){var t;let r=null===(t=this.availableChains)||void 0===t?void 0:t.find(t=>t.id===e);return!!r&&(r===this._activeChain||(this._activeChain=r,this.storeItemToStorage(s,r),this.updateListener.onChainUpdate({chain:r,source:"wallet"}),!0))}updateAvailableChains(e){if(!e||0===Object.keys(e).length)return;let t=Object.entries(e).map(([e,t])=>({id:Number(e),rpcUrl:t}));this.availableChains=t,this.storeItemToStorage(a,t),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(o,e)}storeItemToStorage(e,t){this.storage.setItem(e,JSON.stringify(t))}loadItemFromStorage(e){let t=this.storage.getItem(e);return t?JSON.parse(t):void 0}clear(){this.storage.clear()}}t.SCWStateManager=u},8723:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSigner=t.fetchSignerType=t.storeSignerType=t.loadSignerType=void 0;let n=r(20053),i=r(5325),s=r(95364),a=r(23328),o=r(40783),u="SignerType",c=new o.ScopedLocalStorage("CBWSDK","SignerConfigurator");async function l(e){let{communicator:t,metadata:r}=e;d(t,r).catch(()=>{});let n={id:crypto.randomUUID(),event:"selectSignerType",data:e.preference},{data:i}=await t.postRequestAndWaitForResponse(n);return i}async function d(e,t){await e.onMessage(({event:e})=>"WalletLinkSessionRequest"===e);let r=new i.WalletLinkSigner({metadata:t});e.postMessage({event:"WalletLinkUpdate",data:{session:r.getSession()}}),await r.handshake(),e.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}t.loadSignerType=function(){return c.getItem(u)},t.storeSignerType=function(e){c.setItem(u,e)},t.fetchSignerType=l,t.createSigner=function(e){let{signerType:t,metadata:r,communicator:o,updateListener:u}=e;switch(t){case"scw":return new n.SCWSigner({metadata:r,updateListener:u,communicator:o});case"walletlink":return new i.WalletLinkSigner({metadata:r,updateListener:u});case"extension":{let e=(0,a.getCoinbaseInjectedSigner)();if(!e)throw s.standardErrors.rpc.internal("injected signer not found");return e}}}},5325:function(e,t,r){"use strict";var n=r(1890).lW,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSigner=void 0;let s=i(r(82277)),a=r(30675),o=r(39104),u=r(28663),c=r(74197),l=r(14219),d=r(95364),h=r(96437),f=r(40783),p="DefaultChainId",m="DefaultJsonRpcUrl";class g{constructor(e){var t,r;this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1;let{appName:n,appLogoUrl:i}=e.metadata;this._appName=n,this._appLogoUrl=i,this._storage=new f.ScopedLocalStorage("walletlink",l.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new o.RelayEventManager,this._jsonRpcUrlFromOpts="";let s=this._storage.getItem(a.LOCAL_STORAGE_ADDRESSES_KEY);if(s){let e=s.split(" ");""!==e[0]&&(this._addresses=e.map(e=>(0,h.ensureAddressString)(e)),null===(t=this.updateListener)||void 0===t||t.onAccountsUpdate({accounts:this._addresses,source:"storage"}))}this._storage.getItem(p)&&(null===(r=this.updateListener)||void 0===r||r.onChainUpdate({chain:{id:this.getChainId(),rpcUrl:this.jsonRpcUrl},source:"storage"}),this.hasMadeFirstChainChangedEmission=!0),this.initializeRelay()}getSession(){let{id:e,secret:t}=this.initializeRelay().getWalletLinkSession();return{id:e,secret:t}}async handshake(){return await this.request({method:"eth_requestAccounts"})}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(m))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(m,e)}updateProviderInfo(e,t){var r;this.jsonRpcUrl=e;let n=this.getChainId();this._storage.setItem(p,t.toString(10)),(0,h.ensureIntNumber)(t)===n&&this.hasMadeFirstChainChangedEmission||(null===(r=this.updateListener)||void 0===r||r.onChainUpdate({chain:{id:t,rpcUrl:e},source:"wallet"}),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,r,n,i,s){let a=this.initializeRelay(),o=await a.watchAsset(e,t,r,n,i,null==s?void 0:s.toString());return!(0,u.isErrorResponse)(o)&&!!o.result}async addEthereumChain(e,t,r,n,i,s){var a,o;if((0,h.ensureIntNumber)(e)===this.getChainId())return!1;let c=this.initializeRelay();this._isAuthorized()||await c.requestEthereumAccounts();let l=await c.addEthereumChain(e.toString(),t,i,r,n,s);return!(0,u.isErrorResponse)(l)&&((null===(a=l.result)||void 0===a?void 0:a.isApproved)===!0&&this.updateProviderInfo(t[0],e),(null===(o=l.result)||void 0===o?void 0:o.isApproved)===!0)}async switchEthereumChain(e){let t=this.initializeRelay(),r=await t.switchEthereumChain(e.toString(10),this.selectedAddress||void 0);if((0,u.isErrorResponse)(r)){if(!r.errorCode)return;if(r.errorCode===d.standardErrorCodes.provider.unsupportedChain)throw d.standardErrors.provider.unsupportedChain();throw d.standardErrors.provider.custom({message:r.errorMessage,code:r.errorCode})}let n=r.result;n.isApproved&&n.rpcUrl.length>0&&this.updateProviderInfo(n.rpcUrl,e)}async disconnect(){this._relay&&this._relay.resetAndReload(),this._storage.clear()}async request(e){try{return this._request(e).catch(e=>{throw e})}catch(e){return Promise.reject(e)}}async _request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw d.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw d.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw d.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});let n=void 0===r?[]:r,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:n,jsonrpc:"2.0",id:i})).result}_setAddresses(e,t){var r;if(!Array.isArray(e))throw Error("addresses is not an array");let n=e.map(e=>(0,h.ensureAddressString)(e));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,null===(r=this.updateListener)||void 0===r||r.onAccountsUpdate({accounts:n,source:"wallet"}),this._storage.setItem(a.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((t,r)=>{try{let r=this._handleSynchronousMethods(e);if(void 0!==r)return t({jsonrpc:"2.0",id:e.id,result:r})}catch(e){return r(e)}this._handleAsynchronousMethods(e).then(r=>r&&t(Object.assign(Object.assign({},r),{id:e.id}))).catch(e=>r(e))})}_handleSynchronousMethods(e){let{method:t}=e;switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){let{method:t}=e,r=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(r);case"eth_ecRecover":return this._eth_ecRecover(r);case"personal_sign":return this._personal_sign(r);case"personal_ecRecover":return this._personal_ecRecover(r);case"eth_signTransaction":return this._eth_signTransaction(r);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(r);case"eth_sendTransaction":return this._eth_sendTransaction(r);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(r);case"eth_signTypedData_v2":default:return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(r);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(r);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(r);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(r);case"wallet_watchAsset":return this._wallet_watchAsset(r)}}_isKnownAddress(e){try{let t=(0,h.ensureAddressString)(e);return this._addresses.map(e=>(0,h.ensureAddressString)(e)).includes(t)}catch(e){}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw Error("Unknown Ethereum address")}_prepareTransactionParams(e){let t=e.from?(0,h.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw Error("Ethereum address is unavailable");this._ensureKnownAddress(t);let r=e.to?(0,h.ensureAddressString)(e.to):null,i=null!=e.value?(0,h.ensureBigInt)(e.value):BigInt(0),s=e.data?(0,h.ensureBuffer)(e.data):n.alloc(0),a=null!=e.nonce?(0,h.ensureIntNumber)(e.nonce):null,o=null!=e.gasPrice?(0,h.ensureBigInt)(e.gasPrice):null,u=null!=e.maxFeePerGas?(0,h.ensureBigInt)(e.maxFeePerGas):null;return{fromAddress:t,toAddress:r,weiValue:i,data:s,nonce:a,gasPriceInWei:o,maxFeePerGas:u,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,h.ensureBigInt)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,h.ensureBigInt)(e.gas):null,chainId:e.chainId?(0,h.ensureIntNumber)(e.chainId):this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw d.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw d.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,r,n){this._ensureKnownAddress(t);try{let i=this.initializeRelay(),s=await i.signEthereumMessage(e,t,r,n);if((0,u.isErrorResponse)(s))throw Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw d.standardErrors.provider.userRejectedRequest("User denied message signature");throw e}}async _ethereumAddressFromSignedMessage(e,t,r){let n=this.initializeRelay(),i=await n.ethereumAddressFromSignedMessage(e,t,r);if((0,u.isErrorResponse)(i))throw Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,h.hexStringFromIntNumber)(this.getChainId())}getChainId(){let e=this._storage.getItem(p);if(!e)return(0,h.ensureIntNumber)(1);let t=parseInt(e,10);return(0,h.ensureIntNumber)(t)}async _eth_requestAccounts(){let e;if(this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});try{let t=this.initializeRelay();if(e=await t.requestEthereumAccounts(),(0,u.isErrorResponse)(e))throw Error(e.errorMessage)}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw d.standardErrors.provider.userRejectedRequest("User denied account authorization");throw e}if(!e.result)throw Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();let t=(0,h.ensureAddressString)(e[0]),r=(0,h.ensureBuffer)(e[1]);return this._signEthereumMessage(r,t,!1)}_eth_ecRecover(e){let t=(0,h.ensureBuffer)(e[0]),r=(0,h.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!1)}_personal_sign(e){this._requireAuthorization();let t=(0,h.ensureBuffer)(e[0]),r=(0,h.ensureAddressString)(e[1]);return this._signEthereumMessage(t,r,!0)}_personal_ecRecover(e){let t=(0,h.ensureBuffer)(e[0]),r=(0,h.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!0)}async _eth_signTransaction(e){this._requireAuthorization();let t=this._prepareTransactionParams(e[0]||{});try{let e=this.initializeRelay(),r=await e.signEthereumTransaction(t);if((0,u.isErrorResponse)(r))throw Error(r.errorMessage);return{jsonrpc:"2.0",id:0,result:r.result}}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw d.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw e}}async _eth_sendRawTransaction(e){let t=(0,h.ensureBuffer)(e[0]),r=this.initializeRelay(),n=await r.submitEthereumTransaction(t,this.getChainId());if((0,u.isErrorResponse)(n))throw Error(n.errorMessage);return{jsonrpc:"2.0",id:0,result:n.result}}async _eth_sendTransaction(e){this._requireAuthorization();let t=this._prepareTransactionParams(e[0]||{});try{let e=this.initializeRelay(),r=await e.signAndSubmitEthereumTransaction(t);if((0,u.isErrorResponse)(r))throw Error(r.errorMessage);return{jsonrpc:"2.0",id:0,result:r.result}}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw d.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw e}}async _eth_signTypedData_v1(e){this._requireAuthorization();let t=(0,h.ensureParsedJSONObject)(e[0]),r=(0,h.ensureAddressString)(e[1]);this._ensureKnownAddress(r);let n=s.default.hashForSignTypedDataLegacy({data:t}),i=JSON.stringify(t,null,2);return this._signEthereumMessage(n,r,!1,i)}async _eth_signTypedData_v3(e){this._requireAuthorization();let t=(0,h.ensureAddressString)(e[0]),r=(0,h.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);let n=s.default.hashForSignTypedData_v3({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(n,t,!1,i)}async _eth_signTypedData_v4(e){this._requireAuthorization();let t=(0,h.ensureAddressString)(e[0]),r=(0,h.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);let n=s.default.hashForSignTypedData_v4({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(n,t,!1,i)}async _wallet_addEthereumChain(e){var t,r,n,i;let s=e[0];if((null===(t=s.rpcUrls)||void 0===t?void 0:t.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!s.chainName||""===s.chainName.trim())throw d.standardErrors.rpc.invalidParams("chainName is a required field");if(!s.nativeCurrency)throw d.standardErrors.rpc.invalidParams("nativeCurrency is a required field");let a=parseInt(s.chainId,16);return await this.addEthereumChain(a,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(e){let t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){let t=Array.isArray(e)?e[0]:e;if(!t.type)throw d.standardErrors.rpc.invalidParams("Type is required");if((null==t?void 0:t.type)!=="ERC20")throw d.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(null==t?void 0:t.options))throw d.standardErrors.rpc.invalidParams("Options are required");if(!(null==t?void 0:t.options.address))throw d.standardErrors.rpc.invalidParams("Address is required");let r=this.getChainId(),{address:n,symbol:i,image:s,decimals:a}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,n,i,a,s,r)}}initializeRelay(){if(!this._relay){let e=new c.WalletLinkRelay({linkAPIUrl:l.WALLETLINK_URL,storage:this._storage});e.setAppInfo(this._appName,this._appLogoUrl),e.attachUI(),e.setAccountsCallback((e,t)=>this._setAddresses(e,t)),e.setChainCallback((e,t)=>{this.updateProviderInfo(t,parseInt(e,10))}),this._relay=e}return this._relay}}t.WalletLinkSigner=g},39104:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayEventManager=void 0;let n=r(96437);class i{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;let e=this._nextRequestId,t=(0,n.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}t.RelayEventManager=i},74197:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelay=void 0;let n=r(50972),i=r(30675),s=r(39104),a=r(67534),o=r(28663),u=r(2414),c=r(55013),l=r(92776),d=r(95364),h=r(96437),f=r(40783);class p{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,u.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=e=>{this.isLinked=e;let t=this.storage.getItem(i.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(this._session.linked=e),this.isUnlinkedErrorState=!1,t){let r=t.split(" "),n="true"===this.storage.getItem("IsStandaloneSigning");""===r[0]||e||!this._session.linked||n||(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(e,t)=>{this.storage.setItem(e,t)},this.chainUpdated=(e,t)=>{(this.chainCallbackParams.chainId!==e||this.chainCallbackParams.jsonRpcUrl!==t)&&(this.chainCallbackParams={chainId:e,jsonRpcUrl:t},this.chainCallback&&this.chainCallback(e,t))},this.accountUpdated=e=>{this.accountsCallback&&this.accountsCallback([e]),p.accountRequestCallbackIds.size>0&&(Array.from(p.accountRequestCallbackIds.values()).forEach(t=>{this.invokeCallback(Object.assign(Object.assign({},{type:"WEB3_RESPONSE",id:t,response:{method:"requestEthereumAccounts",result:[e]}}),{id:t}))}),p.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage;let{session:t,ui:r,connection:n}=this.subscribe();this._session=t,this.connection=n,this.relayEventManager=new s.RelayEventManager,this.ui=r}subscribe(){let e=a.WalletLinkSession.load(this.storage)||new a.WalletLinkSession(this.storage).save(),{linkAPIUrl:t}=this,r=new n.WalletLinkConnection({session:e,linkAPIUrl:t,listener:this}),i=this.isMobileWeb?new l.WLMobileRelayUI:new c.WalletLinkRelayUI;return r.connect(),{session:e,ui:i,connection:r}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{this.connection.destroy();let e=a.WalletLinkSession.load(this.storage);(null==e?void 0:e.id)===this._session.id&&f.ScopedLocalStorage.clearAll(),document.location.reload()}).catch(e=>{})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,r,n){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,h.hexStringFromBuffer)(e,!0),address:t,addPrefix:r,typedDataJson:n||null}})}ethereumAddressFromSignedMessage(e,t,r){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,h.hexStringFromBuffer)(e,!0),signature:(0,h.hexStringFromBuffer)(t,!0),addPrefix:r}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,h.bigIntStringFromBigInt)(e.weiValue),data:(0,h.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,h.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,h.bigIntStringFromBigInt)(e.weiValue),data:(0,h.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,h.bigIntStringFromBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,h.bigIntStringFromBigInt)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,h.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,h.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getWalletLinkSession(){return this._session}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null,r=(0,h.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,n),null==t||t()};return new Promise((i,s)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:n,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(r,e=>{if(null==t||t(),(0,o.isErrorResponse)(e))return s(Error(e.errorMessage));i(e)}),this.publishWeb3RequestEvent(r,e)})}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e}publishWeb3RequestEvent(e,t){let r={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",r,!0).then(e=>{}).catch(e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:r.id,response:{method:t.method,errorMessage:e.message}})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof l.WLMobileRelayUI)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink()}}publishWeb3RequestCanceledEvent(e){this.publishEvent("Web3RequestCanceled",{type:"WEB3_REQUEST_CANCELED",id:e},!1).then()}publishEvent(e,t,r){return this.connection.publishEvent(e,t,r)}handleWeb3ResponseMessage(e){let{response:t}=e;if("requestEthereumAccounts"===t.method){p.accountRequestCallbackIds.forEach(t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t}))),p.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,t,r){var n;let i=null!==(n=null==r?void 0:r.message)&&void 0!==n?n:"Unspecified error message.";this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:i}})}invokeCallback(e){let t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){let e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,h.randomBytesHex)(8);return new Promise((r,n)=>{this.relayEventManager.callbacks.set(t,e=>{if((0,o.isErrorResponse)(e))return n(Error(e.errorMessage));r(e)}),p.accountRequestCallbackIds.add(t),this.publishWeb3RequestEvent(t,e)})}watchAsset(e,t,r,n,i,s){let a={method:"watchAsset",params:{type:e,options:{address:t,symbol:r,decimals:n,image:i},chainId:s}},u=null,c=(0,h.randomBytesHex)(8);return u=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,a.method,e),null==u||u()},onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(c,r=>{if(null==u||u(),(0,o.isErrorResponse)(r))return t(Error(r.errorMessage));e(r)}),this.publishWeb3RequestEvent(c,a)})}addEthereumChain(e,t,r,n,i,s){let a={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:n,chainName:i,iconUrls:r,nativeCurrency:s}},u=null,c=(0,h.randomBytesHex)(8);return u=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,a.method,e),null==u||u()},onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(c,r=>{if(null==u||u(),(0,o.isErrorResponse)(r))return t(Error(r.errorMessage));e(r)}),this.publishWeb3RequestEvent(c,a)})}switchEthereumChain(e,t){let r={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},n=(0,h.randomBytesHex)(8);return new Promise((e,t)=>{this.relayEventManager.callbacks.set(n,r=>(0,o.isErrorResponse)(r)&&r.errorCode?t(d.standardErrors.provider.custom({code:r.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):(0,o.isErrorResponse)(r)?t(Error(r.errorMessage)):void e(r)),this.publishWeb3RequestEvent(n,r)})}}t.WalletLinkRelay=p,p.accountRequestCallbackIds=new Set},35073:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkCipher=void 0;let n=r(96437);class i{constructor(e){this.secret=e}async encrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");let r=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,n.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},i,s.encode(e)),o=a.slice(a.byteLength-16),u=a.slice(0,a.byteLength-16),c=new Uint8Array(o),l=new Uint8Array(u),d=new Uint8Array([...r,...c,...l]);return(0,n.uint8ArrayToHex)(d)}async decrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");return new Promise((r,i)=>{!async function(){let s=await crypto.subtle.importKey("raw",(0,n.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=(0,n.hexStringToUint8Array)(e),o=a.slice(0,12),u=a.slice(12,28),c=new Uint8Array([...a.slice(28),...u]),l={name:"AES-GCM",iv:new Uint8Array(o)};try{let e=await window.crypto.subtle.decrypt(l,s,c),t=new TextDecoder;r(t.decode(e))}catch(e){i(e)}}()})}}t.WalletLinkCipher=i},50972:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnection=void 0;let n=r(30675),i=r(35073),s=r(76394),a=r(43163),o=r(36037);class u{constructor({session:e,linkAPIUrl:t,listener:r,WebSocketClass:u=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,o.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=e=>{e&&new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",t=>e.JsonRpcUrl&&this.handleChainUpdated(t,e.JsonRpcUrl)]]).forEach((t,r)=>{let n=e[r];void 0!==n&&t(n)})},this.handleDestroyed=e=>{var t;"1"===e&&(null===(t=this.listener)||void 0===t||t.resetAndReload())},this.handleAccountUpdated=async e=>{var t;{let r=await this.cipher.decrypt(e);null===(t=this.listener)||void 0===t||t.accountUpdated(r)}},this.handleMetadataUpdated=async(e,t)=>{var r;{let n=await this.cipher.decrypt(t);null===(r=this.listener)||void 0===r||r.metadataUpdated(e,n)}},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated(n.WALLET_USER_NAME_KEY,e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated(n.APP_VERSION_KEY,e)},this.handleChainUpdated=async(e,t)=>{var r;{let n=await this.cipher.decrypt(e),i=await this.cipher.decrypt(t);null===(r=this.listener)||void 0===r||r.chainUpdated(n,i)}},this.session=e,this.cipher=new i.WalletLinkCipher(e.secret),this.listener=r;let c=new a.WalletLinkWebSocket(`${t}/rpc`,u);c.setConnectionStateListener(async e=>{let t=!1;switch(e){case a.ConnectionState.DISCONNECTED:if(!this.destroyed){let e=async()=>{await new Promise(e=>setTimeout(e,5e3)),this.destroyed||c.connect().catch(()=>{e()})};e()}break;case a.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),t=!0}catch(e){}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},1e4),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();case a.ConnectionState.CONNECTING:}this.connected!==t&&(this.connected=t)}),c.setIncomingDataListener(e=>{var t;switch(e.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{let t="IsLinkedOK"===e.type?e.linked:void 0;this.linked=t||e.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":this.handleSessionMetadataUpdated(e.metadata);break;case"Event":this.handleIncomingEvent(e)}void 0!==e.id&&(null===(t=this.requestResolutions.get(e.id))||void 0===t||t(e))}),this.ws=c,this.http=new s.WalletLinkHTTP(t,e.id,e.key)}connect(){if(this.destroyed)throw Error("instance is destroyed");this.ws.connect()}destroy(){this.destroyed=!0,this.ws.disconnect(),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t;this._connected=e,e&&(null===(t=this.onceConnected)||void 0===t||t.call(this))}setOnceConnected(e){return new Promise(t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var t,r;this._linked=e,e&&(null===(t=this.onceLinked)||void 0===t||t.call(this)),null===(r=this.listener)||void 0===r||r.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if("Event"===e.type&&"Web3Response"===e.event){let r=JSON.parse(await this.cipher.decrypt(e.data));if("WEB3_RESPONSE"!==r.type)return;null===(t=this.listener)||void 0===t||t.handleWeb3ResponseMessage(r)}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(e=>this.handleIncomingEvent(e))}async setSessionMetadata(e,t){let r={type:"SetSessionConfig",id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected(async()=>{let e=await this.makeRequest(r);if("Fail"===e.type)throw Error(e.error||"failed to set session metadata")})}async publishEvent(e,t,r=!1){let n=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:n,callWebhook:r};return this.setOnceLinked(async()=>{let e=await this.makeRequest(i);if("Fail"===e.type)throw Error(e.error||"failed to publish event");return e.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4){this.ws.disconnect();return}try{this.ws.sendData("h")}catch(e){}}async makeRequest(e,t=6e4){let r;let n=e.id;return this.sendData(e),Promise.race([new Promise((e,i)=>{r=window.setTimeout(()=>{i(Error(`request ${n} timed out`))},t)}),new Promise(e=>{this.requestResolutions.set(n,t=>{clearTimeout(r),e(t),this.requestResolutions.delete(n)})})])}async authenticate(){let e={type:"HostSession",id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if("Fail"===t.type)throw Error(t.error||"failed to authenticate")}sendIsLinked(){let e={type:"IsLinked",id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){let e={type:"GetSessionConfig",id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}t.WalletLinkConnection=u},76394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkHTTP=void 0;class r{constructor(e,t,r){this.linkAPIUrl=e,this.sessionId=t;let n=`${t}:${r}`;this.auth=`Basic ${btoa(n)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(e=>fetch(`${this.linkAPIUrl}/events/${e.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(e=>console.error("Unabled to mark event as failed:",e))}async fetchUnseenEvents(){var e;let t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){let{events:r,error:n}=await t.json();if(n)throw Error(`Check unseen events failed: ${n}`);let i=null!==(e=null==r?void 0:r.filter(e=>"Web3Response"===e.event).map(e=>({type:"Event",sessionId:this.sessionId,eventId:e.id,event:e.event,data:e.data})))&&void 0!==e?e:[];return this.markUnseenEventsAsSeen(i),i}throw Error(`Check unseen events failed: ${t.status}`)}}t.WalletLinkHTTP=r},43163:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkWebSocket=t.ConnectionState=void 0,(n=r||(t.ConnectionState=r={}))[n.DISCONNECTED=0]="DISCONNECTED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED";class i{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw Error("webSocket object is not null");return new Promise((e,t)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(e){t(e);return}null===(n=this.connectionStateListener)||void 0===n||n.call(this,r.CONNECTING),i.onclose=e=>{var n;this.clearWebSocket(),t(Error(`websocket error ${e.code}: ${e.reason}`)),null===(n=this.connectionStateListener)||void 0===n||n.call(this,r.DISCONNECTED)},i.onopen=t=>{var n;e(),null===(n=this.connectionStateListener)||void 0===n||n.call(this,r.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(e=>this.sendData(e)),this.pendingData=[])},i.onmessage=e=>{var t,r;if("h"===e.data)null===(t=this.incomingDataListener)||void 0===t||t.call(this,{type:"Heartbeat"});else try{let t=JSON.parse(e.data);null===(r=this.incomingDataListener)||void 0===r||r.call(this,t)}catch(e){}}})}disconnect(){var e;let{webSocket:t}=this;if(t){this.clearWebSocket(),null===(e=this.connectionStateListener)||void 0===e||e.call(this,r.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch(e){}}}sendData(e){let{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}t.WalletLinkWebSocket=i},30675:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0,t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion"},67534:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSession=void 0;let n=r(99421),i=r(96437),s="session:id",a="session:secret",o="session:linked";class u{constructor(e,t,r,s){this._storage=e,this._id=t||(0,i.randomBytesHex)(16),this._secret=r||(0,i.randomBytesHex)(32),this._key=new n.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!s}static load(e){let t=e.getItem(s),r=e.getItem(o),n=e.getItem(a);return t&&n?new u(e,t,n,"1"===r):null}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(s,this._id),this._storage.setItem(a,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(o,this._linked?"1":"0")}}t.WalletLinkSession=u},28663:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErrorResponse=void 0,t.isErrorResponse=function(e){return void 0!==e.errorMessage}},92776:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WLMobileRelayUI=void 0;let n=r(16539),i=r(2414),s=r(14219);class a{constructor(){this.attached=!1,this.redirectDialog=new n.RedirectDialog}attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){let t=new URL(s.CBW_MOBILE_DEEPLINK_URL);t.searchParams.append("redirect_url",(0,i.getLocation)().href),e&&t.searchParams.append("wl_url",e);let r=document.createElement("a");r.target="cbw-opener",r.href=t.href,r.rel="noreferrer noopener",r.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}t.WLMobileRelayUI=a},55013:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayUI=void 0;let n=r(66386),i=r(60413);class s{constructor(){this.attached=!1,this.snackbar=new i.Snackbar}attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,(0,n.injectCssReset)()}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}t.WalletLinkRelayUI=s},43092:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"},16539:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectDialog=void 0;let i=n(r(39229)),s=r(73120),a=r(66386),o=r(60413),u=r(2414),c=n(r(43092));class l{constructor(){this.root=null,this.darkMode=(0,u.isDarkMode)()}attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,a.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,s.render)(null,this.root),e&&(0,s.render)((0,s.h)(d,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}t.RedirectDialog=l;let d=({title:e,buttonText:t,darkMode:r,onButtonClick:n,onDismiss:a})=>(0,s.h)(o.SnackbarContainer,{darkMode:r},(0,s.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,s.h)("style",null,c.default),(0,s.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:a}),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-redirect-dialog-box",r?"dark":"light")},(0,s.h)("p",null,e),(0,s.h)("button",{onClick:n},t))))},55335:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},60413:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;let i=n(r(39229)),s=r(73120),a=r(67346),o=r(2414),u=n(r(55335));class c{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=(0,o.isDarkMode)()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,s.render)((0,s.h)("div",null,(0,s.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,r])=>(0,s.h)(t.SnackbarInstance,Object.assign({},r,{key:e}))))),this.root)}}t.Snackbar=c,t.SnackbarContainer=e=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,s.h)("style",null,u.default),(0,s.h)("div",{class:"-cbwsdk-snackbar"},e.children)),t.SnackbarInstance=({autoExpand:e,message:t,menuItems:r})=>{let[n,o]=(0,a.useState)(!0),[u,c]=(0,a.useState)(null!=e&&e);return(0,a.useEffect)(()=>{let e=[window.setTimeout(()=>{o(!1)},1),window.setTimeout(()=>{c(!0)},1e4)];return()=>{e.forEach(window.clearTimeout)}}),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",n&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{c(!u)}},(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},t),(0,s.h)("div",{class:"-gear-container"},!u&&(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"}))),r&&r.length>0&&(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map((e,t)=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,s.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info)))))}},1283:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},66386:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;let i=n(r(1283));t.injectCssReset=function(){let e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(e)}},2414:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDarkMode=t.isMobileWeb=t.getLocation=t.createQrUrl=void 0,t.createQrUrl=function(e,t,r,n,i,s){let a=new URLSearchParams({[n?"parent-id":"id"]:e,secret:t,server:r,v:i,chainId:s.toString()}).toString();return`${r}/#/link?${a}`},t.getLocation=function(){try{if(function(){try{return null!==window.frameElement}catch(e){return!1}}()&&window.top)return window.top.location;return window.location}catch(e){return window.location}},t.isMobileWeb=function(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(null===(e=null==window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)},t.isDarkMode=function(){var e,t;return null!==(t=null===(e=null==window?void 0:window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)&&void 0!==t&&t}},40783:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0;class r{constructor(e,t){this.scope=e,this.module=t}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),t=[];for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);"string"==typeof n&&n.startsWith(e)&&t.push(n)}t.forEach(e=>localStorage.removeItem(e))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new r("CBWSDK").clear(),new r("walletlink").clear()}}t.ScopedLocalStorage=r},83707:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptContent=t.encryptContent=t.importKeyFromHexString=t.exportKeyToHexString=t.decrypt=t.encrypt=t.deriveSharedSecret=t.generateKeyPair=void 0;let n=r(96437);async function i(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function s(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function a(e,t){let r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,new TextEncoder().encode(t));return{iv:r,cipherText:n}}async function o(e,{iv:t,cipherText:r}){let n=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,r);return new TextDecoder().decode(n)}function u(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function c(e,t){let r=u(e),i=await crypto.subtle.exportKey(r,t);return(0,n.uint8ArrayToHex)(new Uint8Array(i))}async function l(e,t){let r=u(e),i=(0,n.hexStringToUint8Array)(t).buffer;return await crypto.subtle.importKey(r,i,{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])}async function d(e,t){return a(t,JSON.stringify(e,(e,t)=>t instanceof Error?Object.assign(Object.assign({},t.code?{code:t.code}:{}),{message:t.message}):t))}async function h(e,t){return JSON.parse(await o(t,e))}t.generateKeyPair=i,t.deriveSharedSecret=s,t.encrypt=a,t.decrypt=o,t.exportKeyToHexString=c,t.importKeyFromHexString=l,t.encryptContent=d,t.decryptContent=h},23328:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkErrorForInvalidRequestArgs=t.getCoinbaseInjectedProvider=t.getCoinbaseInjectedSigner=t.fetchRPCRequest=void 0;let n=r(56092),i=r(95364);async function s(e,t){if(!t.rpcUrl)throw i.standardErrors.rpc.internal("No RPC URL set for chain");let r=Object.assign(Object.assign({},e),{jsonrpc:"2.0",id:crypto.randomUUID()}),s=await window.fetch(t.rpcUrl,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":n.LIB_VERSION}});return(await s.json()).result}function a(){return globalThis.coinbaseWalletSigner}t.fetchRPCRequest=s,t.getCoinbaseInjectedSigner=a,t.getCoinbaseInjectedProvider=function({metadata:e,preference:t}){var r,n,i;let s=globalThis;if("smartWalletOnly"!==t.options){if(a())return;let t=s.coinbaseWalletExtension;if(t){let{appName:n,appLogoUrl:i,appChainIds:s}=e;return null===(r=t.setAppInfo)||void 0===r||r.call(t,n,i,s),t}}let o=null!==(n=s.ethereum)&&void 0!==n?n:null===(i=s.top)||void 0===i?void 0:i.ethereum;if(null==o?void 0:o.isCoinbaseBrowser)return o},t.checkErrorForInvalidRequestArgs=function(e){if(!e||"object"!=typeof e||Array.isArray(e))return i.standardErrors.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:r}=e;return"string"!=typeof t||0===t.length?i.standardErrors.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:e}):void 0===r||Array.isArray(r)||"object"==typeof r&&null!==r?void 0:i.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:e})}},48994:function(e,t,r){var n=r(1890).lW;let i=r(87193);function s(e){if(e.startsWith("int["))return"int256"+e.slice(3);if("int"===e)return"int256";if(e.startsWith("uint["))return"uint256"+e.slice(4);if("uint"===e)return"uint256";if(e.startsWith("fixed["))return"fixed128x128"+e.slice(5);if("fixed"===e)return"fixed128x128";if(e.startsWith("ufixed["))return"ufixed128x128"+e.slice(6);else if("ufixed"===e)return"ufixed128x128";return e}function a(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function o(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function u(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t||"number"===t)return BigInt(e);if("bigint"===t)return e;throw Error("Argument is not a number")}function l(e,t){if("address"===e)return l("uint160",c(t));if("bool"===e)return l("uint8",t?1:0);if("string"===e)return l("bytes",new n(t,"utf8"));if((f=e).lastIndexOf("]")===f.length-1){if(void 0===t.length)throw Error("Not an array?");if("dynamic"!==(r=u(e))&&0!==r&&t.length>r)throw Error("Elements exceed array size: "+r);for(h in d=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)d.push(l(e,t[h]));if("dynamic"===r){var r,s,d,h,f,p=l("uint256",t.length);d.unshift(p)}return n.concat(d)}if("bytes"===e)return t=new n(t),d=n.concat([l("uint256",t.length),t]),t.length%32!=0&&(d=n.concat([d,i.zeros(32-t.length%32)])),d;if(e.startsWith("bytes")){if((r=a(e))<1||r>32)throw Error("Invalid bytes<N> width: "+r);return i.setLengthRight(t,32)}else if(e.startsWith("uint")){if((r=a(e))%8||r<8||r>256)throw Error("Invalid uint<N> width: "+r);s=c(t);let n=i.bitLengthFromBigInt(s);if(n>r)throw Error("Supplied uint exceeds width: "+r+" vs "+n);if(s<0)throw Error("Supplied uint is negative");return i.bufferBEFromBigInt(s,32)}else if(e.startsWith("int")){if((r=a(e))%8||r<8||r>256)throw Error("Invalid int<N> width: "+r);s=c(t);let n=i.bitLengthFromBigInt(s);if(n>r)throw Error("Supplied int exceeds width: "+r+" vs "+n);let o=i.twosFromBigInt(s,256);return i.bufferBEFromBigInt(o,32)}else if(e.startsWith("ufixed")){if(r=o(e),(s=c(t))<0)throw Error("Supplied ufixed is negative");return l("uint256",s*BigInt(2)**BigInt(r[1]))}else if(e.startsWith("fixed"))return r=o(e),l("int256",c(t)*BigInt(2)**BigInt(r[1]));throw Error("Unsupported or invalid type: "+e)}function d(e,t){if(e.length!==t.length)throw Error("Number of types are not matching the values");for(var r,o,u=[],l=0;l<e.length;l++){var d=s(e[l]),h=t[l];if("bytes"===d)u.push(h);else if("string"===d)u.push(new n(h,"utf8"));else if("bool"===d)u.push(new n(h?"01":"00","hex"));else if("address"===d)u.push(i.setLength(h,20));else if(d.startsWith("bytes")){if((r=a(d))<1||r>32)throw Error("Invalid bytes<N> width: "+r);u.push(i.setLengthRight(h,r))}else if(d.startsWith("uint")){if((r=a(d))%8||r<8||r>256)throw Error("Invalid uint<N> width: "+r);o=c(h);let e=i.bitLengthFromBigInt(o);if(e>r)throw Error("Supplied uint exceeds width: "+r+" vs "+e);u.push(i.bufferBEFromBigInt(o,r/8))}else if(d.startsWith("int")){if((r=a(d))%8||r<8||r>256)throw Error("Invalid int<N> width: "+r);o=c(h);let e=i.bitLengthFromBigInt(o);if(e>r)throw Error("Supplied int exceeds width: "+r+" vs "+e);let t=i.twosFromBigInt(o,r);u.push(i.bufferBEFromBigInt(t,r/8))}else throw Error("Unsupported or invalid type: "+d)}return n.concat(u)}e.exports={rawEncode:function(e,t){var r=[],i=[],a=32*e.length;for(var o in e){var c=s(e[o]),d=l(c,t[o]);"string"===c||"bytes"===c||"dynamic"===u(c)?(r.push(l("uint256",a)),i.push(d),a+=d.length):r.push(d)}return n.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(e,t){return i.keccak(d(e,t))}}},82277:function(e,t,r){var n=r(1890).lW;let i=r(87193),s=r(48994),a={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},o={encodeData(e,t,r,a=!0){let o=["bytes32"],u=[this.hashType(e,r)];if(a){let c=(e,t,o)=>{if(void 0!==r[t])return["bytes32",null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":i.keccak(this.encodeData(t,o,r,a))];if(void 0===o)throw Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",i.keccak(o)];if("string"===t)return"string"==typeof o&&(o=n.from(o,"utf8")),["bytes32",i.keccak(o)];if(t.lastIndexOf("]")===t.length-1){let r=t.slice(0,t.lastIndexOf("[")),n=o.map(t=>c(e,r,t));return["bytes32",i.keccak(s.rawEncode(n.map(([e])=>e),n.map(([,e])=>e)))]}return[t,o]};for(let n of r[e]){let[e,r]=c(n.name,n.type,t[n.name]);o.push(e),u.push(r)}}else for(let s of r[e]){let e=t[s.name];if(void 0!==e){if("bytes"===s.type)o.push("bytes32"),e=i.keccak(e),u.push(e);else if("string"===s.type)o.push("bytes32"),"string"==typeof e&&(e=n.from(e,"utf8")),e=i.keccak(e),u.push(e);else if(void 0!==r[s.type])o.push("bytes32"),e=i.keccak(this.encodeData(s.type,e,r,a)),u.push(e);else if(s.type.lastIndexOf("]")===s.type.length-1)throw Error("Arrays currently unimplemented in encodeData");else o.push(s.type),u.push(e)}}return s.rawEncode(o,u)},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter(t=>t!==e);for(let i of n=[e].concat(n.sort())){if(!t[i])throw Error("No type definition specified: "+i);r+=i+"("+t[i].map(({name:e,type:t})=>t+" "+e).join(",")+")"}return r},findTypeDependencies(e,t,r=[]){if(e=e.match(/^\w*/)[0],r.includes(e)||void 0===t[e])return r;for(let n of(r.push(e),t[e]))for(let e of this.findTypeDependencies(n.type,t,r))r.includes(e)||r.push(e);return r},hashStruct(e,t,r,n=!0){return i.keccak(this.encodeData(e,t,r,n))},hashType(e,t){return i.keccak(this.encodeType(e,t))},sanitizeData(e){let t={};for(let r in a.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){let r=this.sanitizeData(e),s=[n.from("1901","hex")];return s.push(this.hashStruct("EIP712Domain",r.domain,r.types,t)),"EIP712Domain"!==r.primaryType&&s.push(this.hashStruct(r.primaryType,r.message,r.types,t)),i.keccak(n.concat(s))}};e.exports={TYPED_MESSAGE_SCHEMA:a,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){let t=Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;let r=e.map(function(e){return"bytes"===e.type?i.toBuffer(e.value):e.value}),n=e.map(function(e){return e.type}),a=e.map(function(e){if(!e.name)throw t;return e.type+" "+e.name});return s.soliditySHA3(["bytes32","bytes32"],[s.soliditySHA3(Array(e.length).fill("string"),a),s.soliditySHA3(n,r)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}},87193:function(e,t,r){var n=r(1890).lW;let i=r(66950);function s(e){return n.allocUnsafe(e).fill(0)}function a(e,t){let r=e.toString(16);r.length%2!=0&&(r="0"+r);let i=r.match(/.{1,2}/g).map(e=>parseInt(e,16));for(;i.length<t;)i.unshift(0);return n.from(i)}function o(e,t,r){let n=s(t);return(e=u(e),r)?e.length<t?(e.copy(n),n):e.slice(0,t):e.length<t?(e.copy(n,t-e.length),n):e.slice(-t)}function u(e){if(!n.isBuffer(e)){if(Array.isArray(e))e=n.from(e);else if("string"==typeof e){var t;e=c(e)?n.from((t=l(e)).length%2?"0"+t:t,"hex"):n.from(e)}else if("number"==typeof e)e=intToBuffer(e);else if(null==e)e=n.allocUnsafe(0);else if("bigint"==typeof e)e=a(e);else if(e.toArray)e=n.from(e.toArray());else throw Error("invalid type")}return e}function c(e){return"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function l(e){return"string"==typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:s,setLength:o,setLengthRight:function(e,t){return o(e,t,!0)},isHexString:c,stripHexPrefix:l,toBuffer:u,bufferToHex:function(e){return"0x"+(e=u(e)).toString("hex")},keccak:function(e,t){return e=u(e),t||(t=256),i("keccak"+t).update(e).digest()},bitLengthFromBigInt:function(e){return e.toString(2).length},bufferBEFromBigInt:a,twosFromBigInt:function(e,t){return(e<0n?(~e&(1n<<BigInt(t))-1n)+1n:e)&(1n<<BigInt(t))-1n}}},56092:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="4.0.3"},73290:function(e,t,r){"use strict";r.d(t,{Sg:function(){return a},zt:function(){return o}});var n=r(34042);r(99186);var i=r(21277);let s=new(r(67740)).Yd("abstract-provider/5.7.0");class a extends i.dk{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class o{constructor(){s.checkAbstract(new.target,o),(0,i.zG)(this,"_isProvider",!0)}getFeeData(){var e,t,r,s;return e=this,t=void 0,r=void 0,s=function*(){let{block:e,gasPrice:t}=yield(0,i.mE)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(e=>null)}),r=null,s=null,a=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,a=n.O$.from("1500000000"),s=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:r,maxFeePerGas:s,maxPriorityFeePerGas:a,gasPrice:t}},new(r||(r=Promise))(function(n,i){function a(e){try{u(s.next(e))}catch(e){i(e)}}function o(e){try{u(s.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((s=s.apply(e,t||[])).next())})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}}},67690:function(e,t,r){"use strict";r.d(t,{E:function(){return c},b:function(){return l}});var n=r(21277),i=r(67740),s=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((n=n.apply(e,t||[])).next())})};let a=new i.Yd("abstract-signer/5.7.0"),o=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],u=[i.Yd.errors.INSUFFICIENT_FUNDS,i.Yd.errors.NONCE_EXPIRED,i.Yd.errors.REPLACEMENT_UNDERPRICED];class c{constructor(){a.checkAbstract(new.target,c),(0,n.zG)(this,"_isSigner",!0)}getBalance(e){return s(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return s(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return s(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield(0,n.mE)(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return s(this,void 0,void 0,function*(){this._checkProvider("call");let r=yield(0,n.mE)(this.checkTransaction(e));return yield this.provider.call(r,t)})}sendTransaction(e){return s(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)})}getChainId(){return s(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return s(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return s(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return s(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let t in e)-1===o.indexOf(t)&&a.throwArgumentError("invalid transaction key: "+t,"transaction",e);let t=(0,n.DC)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&a.throwArgumentError("from address mismatch","transaction",e),t[0])),t}populateTransaction(e){return s(this,void 0,void 0,function*(){let t=yield(0,n.mE)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then(e=>s(this,void 0,void 0,function*(){if(null==e)return null;let t=yield this.resolveName(e);return null==t&&a.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})),t.to.catch(e=>{}));let r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null!=t.gasPrice&&(2===t.type||r)?a.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(0===t.type||1===t.type)&&r&&a.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(2===t.type||null==t.type)&&null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)t.type=2;else if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{let e=yield this.getFeeData();if(null==t.type){if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas){if(t.type=2,null!=t.gasPrice){let e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas)}else null!=e.gasPrice?(r&&a.throwError("network does not support EIP-1559",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):a.throwError("failed to get consistent fee data",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"})}else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch(e=>{if(u.indexOf(e.code)>=0)throw e;return a.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})})),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(t=>(0!==t[1]&&t[0]!==t[1]&&a.throwArgumentError("chainId address mismatch","transaction",e),t[0])),yield(0,n.mE)(t)})}_checkProvider(e){this.provider||a.throwError("missing provider",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class l extends c{constructor(e,t){super(),(0,n.zG)(this,"address",e),(0,n.zG)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{a.throwError(e,i.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new l(this.address,e)}}},75006:function(e,t,r){"use strict";r.d(t,{Kn:function(){return d},CR:function(){return h}});var n=r(99186),i=r(34042),s=r(65462),a=r(62734);let o=new(r(67740)).Yd("address/5.7.0");function u(e){(0,n.A7)(e,20)||o.throwArgumentError("invalid address","address",e);let t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);let i=(0,n.lE)((0,s.w)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}let c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);let l=Math.floor(Math.log10?Math.log10(9007199254740991):Math.log(9007199254740991)/Math.LN10);function d(e){let t=null;if("string"!=typeof e&&o.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=u(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&o.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>c[e]).join("");for(;t.length>=l;){let e=t.substring(0,l);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}(e)&&o.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=u("0x"+t)}else o.throwArgumentError("invalid address","address",e);return t}function h(e){let t=null;try{t=d(e.from)}catch(t){o.throwArgumentError("missing from address","transaction",e)}let r=(0,n.G1)((0,n.lE)(i.O$.from(e.nonce).toHexString()));return d((0,n.p3)((0,s.w)((0,a.c)([t,r])),12))}},29841:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n="bignumber/5.7.0"},34042:function(e,t,r){"use strict";r.d(t,{O$:function(){return f},Zm:function(){return d},g$:function(){return b}});var n=r(69197),i=r.n(n),s=r(99186),a=r(67740),o=r(29841),u=i().BN;let c=new a.Yd(o.i),l={};function d(e){return null!=e&&(f.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,s.A7)(e)||"bigint"==typeof e||(0,s._t)(e))}let h=!1;class f{constructor(e,t){e!==l&&c.throwError("cannot call constructor directly; use BigNumber.from",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return m(g(this).fromTwos(e))}toTwos(e){return m(g(this).toTwos(e))}abs(){return"-"===this._hex[0]?f.from(this._hex.substring(1)):this}add(e){return m(g(this).add(g(e)))}sub(e){return m(g(this).sub(g(e)))}div(e){return f.from(e).isZero()&&y("division-by-zero","div"),m(g(this).div(g(e)))}mul(e){return m(g(this).mul(g(e)))}mod(e){let t=g(e);return t.isNeg()&&y("division-by-zero","mod"),m(g(this).umod(t))}pow(e){let t=g(e);return t.isNeg()&&y("negative-power","pow"),m(g(this).pow(t))}and(e){let t=g(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","and"),m(g(this).and(t))}or(e){let t=g(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","or"),m(g(this).or(t))}xor(e){let t=g(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","xor"),m(g(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&y("negative-width","mask"),m(g(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&y("negative-width","shl"),m(g(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&y("negative-width","shr"),m(g(this).shrn(e))}eq(e){return g(this).eq(g(e))}lt(e){return g(this).lt(g(e))}lte(e){return g(this).lte(g(e))}gt(e){return g(this).gt(g(e))}gte(e){return g(this).gte(g(e))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(e){y("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",a.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Yd.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",a.Yd.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof f)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new f(l,p(e)):e.match(/^-?[0-9]+$/)?new f(l,p(new u(e))):c.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&y("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&y("overflow","BigNumber.from",e),f.from(String(e));if("bigint"==typeof e)return f.from(e.toString());if((0,s._t)(e))return f.from((0,s.Dv)(e));if(e){if(e.toHexString){let t=e.toHexString();if("string"==typeof t)return f.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"==typeof t&&((0,s.A7)(t)||"-"===t[0]&&(0,s.A7)(t.substring(1))))return f.from(t)}}return c.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function p(e){if("string"!=typeof e)return p(e.toString(16));if("-"===e[0])return("-"===(e=e.substring(1))[0]&&c.throwArgumentError("invalid hex","value",e),"0x00"===(e=p(e)))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return f.from(p(e))}function g(e){let t=f.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function y(e,t,r){let n={fault:e,operation:t};return null!=r&&(n.value=r),c.throwError(e,a.Yd.errors.NUMERIC_FAULT,n)}function b(e){return new u(e,36).toString(16)}},99186:function(e,t,r){"use strict";r.d(t,{lE:function(){return c},zo:function(){return l},xs:function(){return y},E1:function(){return m},p3:function(){return g},$P:function(){return b},$m:function(){return v},Dv:function(){return p},_t:function(){return u},Zq:function(){return a},A7:function(){return h},N:function(){return w},G1:function(){return d}});let n=new(r(67740)).Yd("bytes/5.7.0");function i(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return h(e)&&!(e.length%2)||u(e)}function o(e){return"number"==typeof e&&e==e&&e%1==0}function u(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!o(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!o(r)||r<0||r>=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");let t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),s(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));let i=[];for(let e=0;e<r.length;e+=2)i.push(parseInt(r.substring(e,e+2),16));return s(new Uint8Array(i))}return u(e)?s(new Uint8Array(e)):n.throwArgumentError("invalid arrayify value","value",e)}function l(e){let t=e.map(e=>c(e)),r=new Uint8Array(t.reduce((e,t)=>e+t.length,0));return t.reduce((e,t)=>(r.set(t,e),e+t.length),0),s(r)}function d(e){let t=c(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function h(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let f="0123456789abcdef";function p(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=f[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(u(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+=f[(240&n)>>4]+f[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function m(e){if("string"!=typeof e)e=p(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,r){return("string"!=typeof e?e=p(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r)?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function y(e){let t="0x";return e.forEach(e=>{t+=p(e).substring(2)}),t}function b(e){let t=function(e){"string"!=typeof e&&(e=p(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}(p(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function v(e,t){for("string"!=typeof e?e=p(e):h(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function w(e){let t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){let r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64))):65===r.length?(t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=p(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){let r=function(e,t){(e=c(e)).length>t&&n.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}(c(t._vs),32);t._vs=p(r);let i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;let a=p(r);null==t.s?t.s=a:t.s!==a&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{let r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=v(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=v(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);let r=c(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);let i=p(r);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},93265:function(e,t,r){"use strict";r.d(t,{Bz:function(){return o},_Y:function(){return s},fh:function(){return a},tL:function(){return i}});var n=r(34042);let i=n.O$.from(-1),s=n.O$.from(0),a=n.O$.from(1),o=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},39155:function(e,t,r){"use strict";r.d(t,{CH:function(){return eI}});var n=r(99186),i=r(34042),s=r(21277),a=r(67740);let o="abi/5.7.0",u=new a.Yd(o);class c{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){u.throwArgumentError(e,this.localName,t)}}class l{constructor(e){(0,s.zG)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.xs)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.zo)(e._data))}writeBytes(e){let t=(0,n.lE)(e),r=t.length%this.wordSize;return r&&(t=(0,n.zo)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.lE)(i.O$.from(e));return t.length>this.wordSize&&u.throwError("value out-of-bounds",a.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.zo)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class d{constructor(e,t,r,i){(0,s.zG)(this,"_data",(0,n.lE)(e)),(0,s.zG)(this,"wordSize",t||32),(0,s.zG)(this,"_coerceFunc",r),(0,s.zG)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.Dv)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&48>=parseInt(r[1])&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):d.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:u.throwError("data out-of-bounds",a.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new d(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}var h=r(75006),f=r(25337),p=r(65462);class m extends c{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,h.Kn)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,h.Kn)((0,n.$m)(e.readValue().toHexString(),20))}}class g extends c{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}let y=new a.Yd(o);function b(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map(t=>{let n=t.localName;return n||y.throwError("cannot encode object for signature with missing names",a.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&y.throwError("cannot encode object for signature with duplicate names",a.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]})}else y.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&y.throwArgumentError("types/value length mismatch","tuple",r);let i=new l(e.wordSize),s=new l(e.wordSize),o=[];return t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=i.writeUpdatableValue();o.push(e=>{n(e+t)})}else e.encode(i,r)}),o.forEach(e=>{e(i.length)}),e.appendWriter(i)+e.appendWriter(s)}function v(e,t){let r=[],n=e.subReader(0);t.forEach(t=>{let i=null;if(t.dynamic){let r=e.readValue(),s=n.subReader(r.toNumber());try{i=t.decode(s)}catch(e){if(e.code===a.Yd.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===a.Yd.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)});let i=t.reduce((e,t)=>{let r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e},{});t.forEach((e,t)=>{let n=e.localName;if(!n||1!==i[n]||("length"===n&&(n="_length"),null!=r[n]))return;let s=r[t];s instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw s}}):r[n]=s});for(let e=0;e<r.length;e++){let t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class w extends c{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),y.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let e=0;e<t.length;e++)n.push(this.coder);return b(e,n,t)}decode(e){let t=this.length;-1===t&&32*(t=e.readValue().toNumber())>e._data.length&&y.throwError("insufficient data length",a.Yd.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});let r=[];for(let e=0;e<t;e++)r.push(new g(this.coder));return e.coerce(this.name,v(e,r))}}class _ extends c{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class E extends c{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){return t=(0,n.lE)(t),e.writeValue(t.length)+e.writeBytes(t)}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class k extends E{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,(0,n.Dv)(super.decode(e)))}}class x extends c{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.lE)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,(0,n.Dv)(e.readBytes(this.size)))}}class S extends c{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}var A=r(93265);class C extends c{constructor(e,t,r){let n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=i.O$.from(t),n=A.Bz.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(A.fh).mul(A.tL)))&&this._throwError("value out-of-bounds",t)}else(r.lt(A._Y)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}var I=r(43205);class R extends E{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,I.Y0)(t))}decode(e){return(0,I.ZN)(super.decode(e))}}class P extends c{constructor(e,t){let r=!1,n=[];e.forEach(e=>{e.dynamic&&(r=!0),n.push(e.type)}),super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){let e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});let t=this.coders.reduce((e,t)=>{let r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e},{});return this.coders.forEach((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))}),Object.freeze(e)}encode(e,t){return b(e,this.coders,t)}decode(e){return e.coerce(this.name,v(e,this.coders))}}let N=new a.Yd(o),M={},T={calldata:!0,memory:!0,storage:!0},O={calldata:!0,memory:!0};function D(e,t){if("bytes"===e||"string"===e){if(T[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&O[t])return!0;return(T[t]||"payable"===t)&&N.throwArgumentError("invalid modifier","name",t),!1}function L(e,t){for(let r in t)(0,s.zG)(e,r,t[r])}let B=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),q=new RegExp(/^(.*)\[([0-9]*)\]$/);class z{constructor(e,t){e!==M&&N.throwError("use fromString",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),L(this,t);let r=this.type.match(q);r?L(this,{arrayLength:parseInt(r[2]||"-1"),arrayChildren:z.fromObject({type:r[1],components:this.components}),baseType:"array"}):L(this,{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=B.sighash),B[e]||N.throwArgumentError("invalid format type","format",e),e===B.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t)}let t="";return"array"===this.baseType?t+=this.arrayChildren.format(e)+"["+(this.arrayLength<0?"":String(this.arrayLength))+"]":"tuple"===this.baseType?(e!==B.sighash&&(t+=this.type),t+="("+this.components.map(t=>t.format(e)).join(e===B.full?", ":",")+")"):t+=this.type,e!==B.sighash&&(!0===this.indexed&&(t+=" indexed"),e===B.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?z.fromString(e,t):z.fromObject(e)}static fromObject(e){return z.isParamType(e)?e:new z(M,{name:e.name||null,type:Y(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(z.fromObject):null})}static fromString(e,t){var r;return r=function(e,t){let r=e;function n(t){N.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let s={type:"",name:"",state:{allowType:!0}},a=s;for(let r=0;r<e.length;r++){let s=e[r];switch(s){case"(":a.state.allowType&&""===a.type?a.type="tuple":a.state.allowParams||n(r),a.state.allowType=!1,a.type=Y(a.type),a.components=[i(a)],a=a.components[0];break;case")":delete a.state,"indexed"===a.name&&(t||n(r),a.indexed=!0,a.name=""),D(a.type,a.name)&&(a.name=""),a.type=Y(a.type);let o=a;(a=a.parent)||n(r),delete o.parent,a.state.allowParams=!1,a.state.allowName=!0,a.state.allowArray=!0;break;case",":delete a.state,"indexed"===a.name&&(t||n(r),a.indexed=!0,a.name=""),D(a.type,a.name)&&(a.name=""),a.type=Y(a.type);let u=i(a.parent);a.parent.components.push(u),delete a.parent,a=u;break;case" ":a.state.allowType&&""!==a.type&&(a.type=Y(a.type),delete a.state.allowType,a.state.allowName=!0,a.state.allowParams=!0),a.state.allowName&&""!==a.name&&("indexed"===a.name?(t||n(r),a.indexed&&n(r),a.indexed=!0,a.name=""):D(a.type,a.name)?a.name="":a.state.allowName=!1);break;case"[":a.state.allowArray||n(r),a.type+=s,a.state.allowArray=!1,a.state.allowName=!1,a.state.readArray=!0;break;case"]":a.state.readArray||n(r),a.type+=s,a.state.readArray=!1,a.state.allowArray=!0,a.state.allowName=!0;break;default:a.state.allowType?(a.type+=s,a.state.allowParams=!0,a.state.allowArray=!0):a.state.allowName?(a.name+=s,delete a.state.allowArray):a.state.readArray?a.type+=s:n(r)}}return a.parent&&N.throwArgumentError("unexpected eof","param",e),delete s.state,"indexed"===a.name?(t||n(r.length-7),a.indexed&&n(r.length-7),a.indexed=!0,a.name=""):D(a.type,a.name)&&(a.name=""),s.type=Y(s.type),s}(e,!!t),z.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}static isParamType(e){return!!(null!=e&&e._isParamType)}}function U(e,t){return(function(e){e=e.trim();let t=[],r="",n=0;for(let i=0;i<e.length;i++){let s=e[i];","===s&&0===n?(t.push(r),r=""):(r+=s,"("===s?n++:")"===s&&-1==--n&&N.throwArgumentError("unbalanced parenthesis","value",e))}return r&&t.push(r),t})(e).map(e=>z.fromString(e,t))}class j{constructor(e,t){e!==M&&N.throwError("use a static from method",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),L(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return j.isFragment(e)?e:"string"==typeof e?j.fromString(e):j.fromObject(e)}static fromObject(e){if(j.isFragment(e))return e;switch(e.type){case"function":return V.fromObject(e);case"event":return F.fromObject(e);case"constructor":return G.fromObject(e);case"error":return Z.fromObject(e);case"fallback":case"receive":return null}return N.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?F.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?V.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?G.fromString(e.trim()):"error"===e.split(" ")[0]?Z.fromString(e.substring(5).trim()):N.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class F extends j{format(e){if(e||(e=B.sighash),B[e]||N.throwArgumentError("invalid format type","format",e),e===B.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t="";return e!==B.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===B.full?", ":",")+") ",e!==B.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?F.fromString(e):F.fromObject(e)}static fromObject(e){return F.isEventFragment(e)?e:("event"!==e.type&&N.throwArgumentError("invalid event object","value",e),new F(M,{name:Q(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(z.fromObject):[],type:"event"}))}static fromString(e){let t=e.match(X);t||N.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach(e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:N.warn("unknown modifier: "+e)}}),F.fromObject({name:t[1].trim(),anonymous:r,inputs:U(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function H(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&N.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||N.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=i.O$.from(r[1]),r[0]):e}function $(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach(e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}})}function W(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&N.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&N.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||N.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&N.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&N.throwArgumentError("unable to determine stateMutability","value",e),t}class G extends j{format(e){if(e||(e=B.sighash),B[e]||N.throwArgumentError("invalid format type","format",e),e===B.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});e===B.sighash&&N.throwError("cannot format a constructor for sighash",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(t=>t.format(e)).join(e===B.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?G.fromString(e):G.fromObject(e)}static fromObject(e){if(G.isConstructorFragment(e))return e;"constructor"!==e.type&&N.throwArgumentError("invalid constructor object","value",e);let t=W(e);return t.constant&&N.throwArgumentError("constructor cannot be constant","value",e),new G(M,{name:null,type:e.type,inputs:e.inputs?e.inputs.map(z.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?i.O$.from(e.gas):null})}static fromString(e){let t={type:"constructor"},r=(e=H(e,t)).match(X);return r&&"constructor"===r[1].trim()||N.throwArgumentError("invalid constructor string","value",e),t.inputs=U(r[2].trim(),!1),$(r[3].trim(),t),G.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class V extends G{format(e){if(e||(e=B.sighash),B[e]||N.throwArgumentError("invalid format type","format",e),e===B.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e))),outputs:this.outputs.map(t=>JSON.parse(t.format(e)))});let t="";return e!==B.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===B.full?", ":",")+") ",e!==B.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(t=>t.format(e)).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?V.fromString(e):V.fromObject(e)}static fromObject(e){if(V.isFunctionFragment(e))return e;"function"!==e.type&&N.throwArgumentError("invalid function object","value",e);let t=W(e);return new V(M,{type:e.type,name:Q(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(z.fromObject):[],outputs:e.outputs?e.outputs.map(z.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?i.O$.from(e.gas):null})}static fromString(e){let t={type:"function"},r=(e=H(e,t)).split(" returns ");r.length>2&&N.throwArgumentError("invalid function string","value",e);let n=r[0].match(X);if(n||N.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&Q(t.name),t.inputs=U(n[2],!1),$(n[3].trim(),t),r.length>1){let n=r[1].match(X);(""!=n[1].trim()||""!=n[3].trim())&&N.throwArgumentError("unexpected tokens","value",e),t.outputs=U(n[2],!1)}else t.outputs=[];return V.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function K(e){let t=e.format();return("Error(string)"===t||"Panic(uint256)"===t)&&N.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class Z extends j{format(e){if(e||(e=B.sighash),B[e]||N.throwArgumentError("invalid format type","format",e),e===B.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t="";return e!==B.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===B.full?", ":",")+") ").trim()}static from(e){return"string"==typeof e?Z.fromString(e):Z.fromObject(e)}static fromObject(e){return Z.isErrorFragment(e)?e:("error"!==e.type&&N.throwArgumentError("invalid error object","value",e),K(new Z(M,{type:e.type,name:Q(e.name),inputs:e.inputs?e.inputs.map(z.fromObject):[]})))}static fromString(e){let t={type:"error"},r=e.match(X);return r||N.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&Q(t.name),t.inputs=U(r[2],!1),K(Z.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Y(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}let J=RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Q(e){return e&&e.match(J)||N.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}let X=RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),ee=new a.Yd(o),et=new RegExp(/^bytes([0-9]*)$/),er=new RegExp(/^(u?int)([0-9]*)$/);class en{constructor(e){(0,s.zG)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new m(e.name);case"bool":return new _(e.name);case"string":return new R(e.name);case"bytes":return new k(e.name);case"array":return new w(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new P((e.components||[]).map(e=>this._getCoder(e)),e.name);case"":return new S(e.name)}let t=e.type.match(er);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&ee.throwArgumentError("invalid "+t[1]+" bit length","param",e),new C(r/8,"int"===t[1],e.name)}if(t=e.type.match(et)){let r=parseInt(t[1]);return(0===r||r>32)&&ee.throwArgumentError("invalid bytes length","param",e),new x(r,e.name)}return ee.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new d(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new l(this._getWordSize())}getDefaultValue(e){return new P(e.map(e=>this._getCoder(z.from(e))),"_").defaultValue()}encode(e,t){e.length!==t.length&&ee.throwError("types/values length mismatch",a.Yd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let r=new P(e.map(e=>this._getCoder(z.from(e))),"_"),n=this._getWriter();return r.encode(n,t),n.data}decode(e,t,r){return new P(e.map(e=>this._getCoder(z.from(e))),"_").decode(this._getReader((0,n.lE)(t),r))}}let ei=new en,es=new a.Yd(o);class ea extends s.dk{}class eo extends s.dk{}class eu extends s.dk{}class ec extends s.dk{static isIndexed(e){return!!(e&&e._isIndexed)}}let el={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ed(e,t){let r=Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class eh{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,s.zG)(this,"fragments",t.map(e=>j.from(e)).filter(e=>null!=e)),(0,s.zG)(this,"_abiCoder",(0,s.tu)(new.target,"getAbiCoder")()),(0,s.zG)(this,"functions",{}),(0,s.zG)(this,"errors",{}),(0,s.zG)(this,"events",{}),(0,s.zG)(this,"structs",{}),this.fragments.forEach(e=>{let t=null;switch(e.type){case"constructor":if(this.deploy){es.warn("duplicate definition - constructor");return}(0,s.zG)(this,"deploy",e);return;case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();if(t[r]){es.warn("duplicate definition - "+r);return}t[r]=e}),this.deploy||(0,s.zG)(this,"deploy",G.from({payable:!1,type:"constructor"})),(0,s.zG)(this,"_isInterface",!0)}format(e){e||(e=B.full),e===B.sighash&&es.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(t=>t.format(e));return e===B.json?JSON.stringify(t.map(e=>JSON.parse(e))):t}static getAbiCoder(){return ei}static getAddress(e){return(0,h.Kn)(e)}static getSighash(e){return(0,n.p3)((0,f.id)(e.format()),0,4)}static getEventTopic(e){return(0,f.id)(e.format())}getFunction(e){if((0,n.A7)(e)){for(let t in this.functions)if(e===this.getSighash(t))return this.functions[t];es.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){let t=e.trim(),r=Object.keys(this.functions).filter(e=>e.split("(")[0]===t);return 0===r.length?es.throwArgumentError("no matching function","name",t):r.length>1&&es.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}let t=this.functions[V.fromString(e).format()];return t||es.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,n.A7)(e)){let t=e.toLowerCase();for(let e in this.events)if(t===this.getEventTopic(e))return this.events[e];es.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){let t=e.trim(),r=Object.keys(this.events).filter(e=>e.split("(")[0]===t);return 0===r.length?es.throwArgumentError("no matching event","name",t):r.length>1&&es.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}let t=this.events[F.fromString(e).format()];return t||es.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,n.A7)(e)){let t=(0,s.tu)(this.constructor,"getSighash");for(let r in this.errors)if(e===t(this.errors[r]))return this.errors[r];es.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){let t=e.trim(),r=Object.keys(this.errors).filter(e=>e.split("(")[0]===t);return 0===r.length?es.throwArgumentError("no matching error","name",t):r.length>1&&es.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}let t=this.errors[V.fromString(e).format()];return t||es.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,s.tu)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,s.tu)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));let r=(0,n.lE)(t);return(0,n.Dv)(r.slice(0,4))!==this.getSighash(e)&&es.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,n.Dv)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,n.Dv)((0,n.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,n.lE)(t);return(0,n.Dv)(r.slice(0,4))!==this.getSighash(e)&&es.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,n.Dv)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,n.Dv)((0,n.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,n.lE)(t),i=null,s="",o=null,u=null,c=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{let e=(0,n.Dv)(r.slice(0,4)),t=el[e];if(t)o=this._abiCoder.decode(t.inputs,r.slice(4)),u=t.name,c=t.signature,t.reason&&(i=o[0]),"Error"===u?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===u&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{let t=this.getError(e);o=this._abiCoder.decode(t.inputs,r.slice(4)),u=t.name,c=t.format()}catch(e){}}}return es.throwError("call revert exception"+s,a.Yd.errors.CALL_EXCEPTION,{method:e.format(),data:(0,n.Dv)(t),errorArgs:o,errorName:u,errorSignature:c,reason:i})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,n.Dv)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&es.throwError("too many arguments for "+e.format(),a.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));let s=(e,t)=>"string"===e.type?(0,f.id)(t):"bytes"===e.type?(0,p.w)((0,n.Dv)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,n.$m)((0,n.Dv)(t),32));for(t.forEach((t,n)=>{let i=e.inputs[n];if(!i.indexed){null!=t&&es.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t);return}null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?es.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map(e=>s(i,e))):r.push(s(i,t))});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));let r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&es.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((e,s)=>{let a=t[s];if(e.indexed){if("string"===e.type)r.push((0,f.id)(a));else if("bytes"===e.type)r.push((0,p.w)(a));else if("tuple"===e.baseType||"array"===e.baseType)throw Error("not implemented");else r.push(this._abiCoder.encode([e.type],[a]))}else n.push(e),i.push(a)}),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,n.A7)(r[0],32)&&r[0].toLowerCase()===t||es.throwError("fragment/topic mismatch",a.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(z.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(i.push(e),o.push(!1)):(s.push(e),o.push(!1))});let u=null!=r?this._abiCoder.decode(i,(0,n.zo)(r)):null,c=this._abiCoder.decode(s,t,!0),l=[],d=0,h=0;e.inputs.forEach((e,t)=>{if(e.indexed){if(null==u)l[t]=new ec({_isIndexed:!0,hash:null});else if(o[t])l[t]=new ec({_isIndexed:!0,hash:u[h++]});else try{l[t]=u[h++]}catch(e){l[t]=e}}else try{l[t]=c[d++]}catch(e){l[t]=e}if(e.name&&null==l[e.name]){let r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw ed(`property ${JSON.stringify(e.name)}`,r)}}):l[e.name]=r}});for(let e=0;e<l.length;e++){let t=l[e];t instanceof Error&&Object.defineProperty(l,e,{enumerable:!0,get:()=>{throw ed(`index ${e}`,t)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new eo({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ea({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=(0,n.Dv)(e),r=this.getError(t.substring(0,10).toLowerCase());return r?new eu({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!!(e&&e._isInterface)}}var ef=r(73290),ep=r(67690),em=r(19311),eg=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((n=n.apply(e,t||[])).next())})};let ey=new a.Yd("contracts/5.7.0");function eb(e,t){return eg(this,void 0,void 0,function*(){let r=yield t;"string"!=typeof r&&ey.throwArgumentError("invalid address or ENS name","name",r);try{return(0,h.Kn)(r)}catch(e){}e||ey.throwError("a provider or signer is needed to resolve ENS names",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield e.resolveName(r);return null==n&&ey.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function ev(e,t,r){return eg(this,void 0,void 0,function*(){let o={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(o=(0,s.DC)(r.pop())),ey.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?o.from?o.from=(0,s.mE)({override:eb(e.signer,o.from),signer:e.signer.getAddress()}).then(e=>eg(this,void 0,void 0,function*(){return(0,h.Kn)(e.signer)!==e.override&&ey.throwError("Contract with a Signer cannot override from",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})):o.from=e.signer.getAddress():o.from&&(o.from=eb(e.provider,o.from));let u=yield(0,s.mE)({args:function e(t,r,n){return eg(this,void 0,void 0,function*(){return Array.isArray(n)?yield Promise.all(n.map((n,i)=>e(t,Array.isArray(r)?r[i]:r[n.name],n))):"address"===n.type?yield eb(t,r):"tuple"===n.type?yield e(t,r,n.components):"array"===n.baseType?Array.isArray(r)?yield Promise.all(r.map(r=>e(t,r,n.arrayChildren))):Promise.reject(ey.makeError("invalid value for array",a.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:r})):r})}(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,s.mE)(o)||{}}),c=e.interface.encodeFunctionData(t,u.args),l={data:c,to:u.address},d=u.overrides;if(null!=d.nonce&&(l.nonce=i.O$.from(d.nonce).toNumber()),null!=d.gasLimit&&(l.gasLimit=i.O$.from(d.gasLimit)),null!=d.gasPrice&&(l.gasPrice=i.O$.from(d.gasPrice)),null!=d.maxFeePerGas&&(l.maxFeePerGas=i.O$.from(d.maxFeePerGas)),null!=d.maxPriorityFeePerGas&&(l.maxPriorityFeePerGas=i.O$.from(d.maxPriorityFeePerGas)),null!=d.from&&(l.from=d.from),null!=d.type&&(l.type=d.type),null!=d.accessList&&(l.accessList=(0,em.z7)(d.accessList)),null==l.gasLimit&&null!=t.gas){let e=21e3,r=(0,n.lE)(c);for(let t=0;t<r.length;t++)e+=4,r[t]&&(e+=64);l.gasLimit=i.O$.from(t.gas).add(e)}if(d.value){let e=i.O$.from(d.value);e.isZero()||t.payable||ey.throwError("non-payable method cannot override value",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:o.value}),l.value=e}d.customData&&(l.customData=(0,s.DC)(d.customData)),d.ccipReadEnabled&&(l.ccipReadEnabled=!!d.ccipReadEnabled),delete o.nonce,delete o.gasLimit,delete o.gasPrice,delete o.from,delete o.value,delete o.type,delete o.accessList,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas,delete o.customData,delete o.ccipReadEnabled;let f=Object.keys(o).filter(e=>null!=o[e]);return f.length&&ey.throwError(`cannot override ${f.map(e=>JSON.stringify(e)).join(",")}`,a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:f}),l})}function ew(e,t,r){let n=e.signer||e.provider;return function(...i){return eg(this,void 0,void 0,function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){let e=(0,s.DC)(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));let u=yield ev(e,t,i),c=yield n.call(u,o);try{let n=e.interface.decodeFunctionResult(t,c);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===a.Yd.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=u),t}})}}function e_(e,t,r){return t.constant?ew(e,t,r):function(...r){return eg(this,void 0,void 0,function*(){e.signer||ey.throwError("sending a transaction requires a signer",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());let n=yield ev(e,t,r),i=yield e.signer.sendTransaction(n);return function(e,t){let r=t.wait.bind(t);t.wait=t=>r(t).then(t=>(t.events=t.logs.map(r=>{let n=(0,s.p$)(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n}),t))}(e,i),i})}}function eE(e){return e.address&&(null==e.topics||0===e.topics.length)?"*":(e.address||"*")+"@"+(e.topics?e.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class ek{constructor(e,t){(0,s.zG)(this,"tag",e),(0,s.zG)(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(r=>!!t||r.listener!==e||(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(t=>{let r=e.slice();return setTimeout(()=>{t.listener.apply(this,r)},0),!t.once}),t}prepareEvent(e){}getEmit(e){return[e]}}class ex extends ek{constructor(){super("error",null)}}class eS extends ek{constructor(e,t,r,n){let i={address:e},a=t.getEventTopic(r);n?(a!==n[0]&&ey.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[a],super(eE(i),i),(0,s.zG)(this,"address",e),(0,s.zG)(this,"interface",t),(0,s.zG)(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=function(e){let t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){let s=e.slice();s.push(i);try{r(s,n[i])}catch(e){t.push({path:s,error:e})}}};return r([],e),t}(e.args);if(t.length)throw t[0].error;let r=(e.args||[]).slice();return r.push(e),r}}class eA extends ek{constructor(e,t){super("*",{address:e}),(0,s.zG)(this,"address",e),(0,s.zG)(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(e){}}}class eC{constructor(e,t,r){(0,s.zG)(this,"interface",(0,s.tu)(new.target,"getInterface")(t)),null==r?((0,s.zG)(this,"provider",null),(0,s.zG)(this,"signer",null)):ep.E.isSigner(r)?((0,s.zG)(this,"provider",r.provider||null),(0,s.zG)(this,"signer",r)):ef.zt.isProvider(r)?((0,s.zG)(this,"provider",r),(0,s.zG)(this,"signer",null)):ey.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,s.zG)(this,"callStatic",{}),(0,s.zG)(this,"estimateGas",{}),(0,s.zG)(this,"functions",{}),(0,s.zG)(this,"populateTransaction",{}),(0,s.zG)(this,"filters",{});{let e={};Object.keys(this.interface.events).forEach(t=>{let r=this.interface.events[t];(0,s.zG)(this.filters,t,(...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)})),e[r.name]||(e[r.name]=[]),e[r.name].push(t)}),Object.keys(e).forEach(t=>{let r=e[t];1===r.length?(0,s.zG)(this.filters,t,this.filters[r[0]]):ey.warn(`Duplicate definition of ${t} (${r.join(", ")})`)})}if((0,s.zG)(this,"_runningEvents",{}),(0,s.zG)(this,"_wrappedEmits",{}),null==e&&ey.throwArgumentError("invalid contract address or ENS name","addressOrName",e),(0,s.zG)(this,"address",e),this.provider)(0,s.zG)(this,"resolvedAddress",eb(this.provider,e));else try{(0,s.zG)(this,"resolvedAddress",Promise.resolve((0,h.Kn)(e)))}catch(e){ey.throwError("provider is required to use ENS name as contract address",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(e=>{});let n={},i={};Object.keys(this.interface.functions).forEach(e=>{let t=this.interface.functions[e];if(i[e]){ey.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);return}i[e]=!0;{let r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}if(null==this[e]&&(0,s.zG)(this,e,e_(this,t,!0)),null==this.functions[e]&&(0,s.zG)(this.functions,e,e_(this,t,!1)),null==this.callStatic[e]&&(0,s.zG)(this.callStatic,e,ew(this,t,!0)),null==this.populateTransaction[e]){var r;(0,s.zG)(this.populateTransaction,e,(r=this,function(...e){return ev(r,t,e)}))}null==this.estimateGas[e]&&(0,s.zG)(this.estimateGas,e,function(e,t){let r=e.signer||e.provider;return function(...n){return eg(this,void 0,void 0,function*(){r||ey.throwError("estimate require a provider or signer",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield ev(e,t,n);return yield r.estimateGas(i)})}}(this,t))}),Object.keys(n).forEach(e=>{let t=n[e];if(t.length>1)return;e=e.substring(1);let r=t[0];try{null==this[e]&&(0,s.zG)(this,e,this[r])}catch(e){}null==this.functions[e]&&(0,s.zG)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&(0,s.zG)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&(0,s.zG)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&(0,s.zG)(this.estimateGas,e,this.estimateGas[r])})}static getContractAddress(e){return(0,h.CR)(e)}static getInterface(e){return eh.isInterface(e)?e:new eh(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(e=>("0x"===e&&ey.throwError("contract not deployed",a.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||ey.throwError("sending a transactions require a signer",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=(0,s.DC)(e||{});return["from","to"].forEach(function(e){null!=t[e]&&ey.throwError("cannot override "+e,a.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){"string"==typeof e&&(e=new ep.b(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,s.zG)(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ec.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new ex);if("event"===e)return this._normalizeRunningEvent(new ek("event",null));if("*"===e)return this._normalizeRunningEvent(new eA(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new eS(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let t=e.topics[0];if("string"!=typeof t)throw Error("invalid topic");let r=this.interface.getEvent(t);return this._normalizeRunningEvent(new eS(this.address,this.interface,r,e.topics))}catch(e){}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new ek(eE(t),t))}return this._normalizeRunningEvent(new eA(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){let n=(0,s.p$)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||ey.throwError("events require a provider or a signer with a provider",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{let t=e.getEmit(n);this.emit(e.filter,...t)}catch(e){n.decodeError=e.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){let i=this._getRunningEvent(e),a=(0,s.DC)(i.filter);return"string"==typeof t&&(0,n.A7)(t,32)?(null!=r&&ey.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),a.blockHash=t):(a.fromBlock=null!=t?t:0,a.toBlock=null!=r?r:"latest"),this.provider.getLogs(a).then(e=>e.map(e=>this._wrapEvent(i,e,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce((e,t)=>e+this._runningEvents[t].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){let e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach(t=>{e.push(t)});return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(let e in this._runningEvents){let t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class eI extends eC{}},25337:function(e,t,r){"use strict";r.d(t,{id:function(){return s}});var n=r(65462),i=r(43205);function s(e){return(0,n.w)((0,i.Y0)(e))}},65462:function(e,t,r){"use strict";r.d(t,{w:function(){return a}});var n=r(85607),i=r.n(n),s=r(99186);function a(e){return"0x"+i().keccak_256((0,s.lE)(e))}},67740:function(e,t,r){"use strict";var n,i,s,a;r.d(t,{jK:function(){return i},Yd:function(){return p}});let o=!1,u=!1,c={debug:1,default:2,info:2,warning:3,error:4,off:5},l=c.default,d=null,h=function(){try{let e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(e){return e.message}return null}();(s=n||(n={})).DEBUG="DEBUG",s.INFO="INFO",s.WARNING="WARNING",s.ERROR="ERROR",s.OFF="OFF",(a=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED";let f="0123456789abcdef";class p{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",e),l>c[r]||console.log.apply(console,t)}debug(...e){this._log(p.levels.DEBUG,e)}info(...e){this._log(p.levels.INFO,e)}warn(...e){this._log(p.levels.WARNING,e)}makeError(e,t,r){if(u)return this.makeError("censored error",t,{});t||(t=p.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=f[t[e]>>4]+f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let s=e,a="";switch(t){case i.NUMERIC_FAULT:{a="NUMERIC_FAULT";let t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":a+="-"+t;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:a=t}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let o=Error(e);return o.reason=s,o.code=t,Object.keys(r).forEach(function(e){o[e]=r[e]}),o}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,p.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),h&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:h})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,p.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return d||(d=new p("logger/5.7.0")),d}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!e)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!e,o=!!t}static setLogLevel(e){let t=c[e.toLowerCase()];if(null==t){p.globalLogger().warn("invalid log level - "+e);return}l=t}static from(e){return new p(e)}}p.errors=i,p.levels=n},21277:function(e,t,r){"use strict";r.d(t,{dk:function(){return d},uj:function(){return o},p$:function(){return l},zG:function(){return i},tu:function(){return s},mE:function(){return a},DC:function(){return u}});let n=new(r(67740)).Yd("properties/5.7.0");function i(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function s(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function a(e){var t,r,n,i;return t=this,r=void 0,n=void 0,i=function*(){let t=Object.keys(e).map(t=>Promise.resolve(e[t]).then(e=>({key:t,value:e})));return(yield Promise.all(t)).reduce((e,t)=>(e[t.key]=t.value,e),{})},new(n||(n=Promise))(function(e,s){function a(e){try{u(i.next(e))}catch(e){s(e)}}function o(e){try{u(i.throw(e))}catch(e){s(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(a,o)}u((i=i.apply(t,r||[])).next())})}function o(e,t){e&&"object"==typeof e||n.throwArgumentError("invalid object","object",e),Object.keys(e).forEach(r=>{t[r]||n.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)})}function u(e){let t={};for(let r in e)t[r]=e[r];return t}let c={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function l(e){return function(e){if(function e(t){if(null==t||c[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;let r=Object.keys(t);for(let n=0;n<r.length;n++){let i=null;try{i=t[r[n]]}catch(e){continue}if(!e(i))return!1}return!0}return n.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}(e))return e;if(Array.isArray(e))return Object.freeze(e.map(e=>l(e)));if("object"==typeof e){let t={};for(let r in e){let n=e[r];void 0!==n&&i(t,r,l(n))}return t}return n.throwArgumentError(`Cannot deepCopy ${typeof e}`,"object",e)}(e)}class d{constructor(e){for(let t in e)this[t]=l(e[t])}}},25419:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n="providers/5.7.2"},26728:function(e,t,r){"use strict";let n,i;r.d(t,{r:function(){return e0}});var s,a=r(67690),o=r(34042),u=r(99186),c=r(75006),l=r(65462),d=r(21277),h=r(67740);let f="hash/5.7.0";var p=r(25337);let m=new h.Yd(f),g=new Uint8Array(32);g.fill(0);let y=o.O$.from(-1),b=o.O$.from(0),v=o.O$.from(1),w=o.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),_=(0,u.$m)(v.toHexString(),32),E=(0,u.$m)(b.toHexString(),32),k={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},x=["name","version","chainId","verifyingContract","salt"];function S(e){return function(t){return"string"!=typeof t&&m.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}let A={name:S("name"),version:S("version"),chainId:function(e){try{return o.O$.from(e).toString()}catch(e){}return m.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,c.Kn)(e).toLowerCase()}catch(e){}return m.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{let t=(0,u.lE)(e);if(32!==t.length)throw Error("bad length");return(0,u.Dv)(t)}catch(e){}return m.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function C(e){{let t=e.match(/^(u?)int(\d*)$/);if(t){let r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&m.throwArgumentError("invalid numeric width","type",e);let i=w.mask(r?n-1:n),s=r?i.add(v).mul(y):b;return function(t){let r=o.O$.from(t);return(r.lt(s)||r.gt(i))&&m.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,u.$m)(r.toTwos(256).toHexString(),32)}}}{let t=e.match(/^bytes(\d+)$/);if(t){let r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&m.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.lE)(t).length!==r&&m.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){let t=(0,u.lE)(e),r=t.length%32;return r?(0,u.xs)([t,g.slice(r)]):(0,u.Dv)(t)}(t)}}}switch(e){case"address":return function(e){return(0,u.$m)((0,c.Kn)(e),32)};case"bool":return function(e){return e?_:E};case"bytes":return function(e){return(0,l.w)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function I(e,t){return`${e}(${t.map(({name:e,type:t})=>t+" "+e).join(",")})`}class R{constructor(e){(0,d.zG)(this,"types",Object.freeze((0,d.p$)(e))),(0,d.zG)(this,"_encoderCache",{}),(0,d.zG)(this,"_types",{});let t={},r={},n={};for(let i in Object.keys(e).forEach(e=>{t[e]={},r[e]=[],n[e]={}}),e){let n={};e[i].forEach(s=>{n[s.name]&&m.throwArgumentError(`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(i)}`,"types",e),n[s.name]=!0;let a=s.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===i&&m.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),C(a)||(r[a]||m.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",e),r[a].push(i),t[i][a]=!0)})}let i=Object.keys(r).filter(e=>0===r[e].length);for(let s in 0===i.length?m.throwArgumentError("missing primary type","types",e):i.length>1&&m.throwArgumentError(`ambiguous primary types or unused types: ${i.map(e=>JSON.stringify(e)).join(", ")}`,"types",e),(0,d.zG)(this,"primaryType",i[0]),!function i(s,a){a[s]&&m.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e),a[s]=!0,Object.keys(t[s]).forEach(e=>{r[e]&&(i(e,a),Object.keys(a).forEach(t=>{n[t][e]=!0}))}),delete a[s]}(this.primaryType,{}),n){let t=Object.keys(n[s]);t.sort(),this._types[s]=I(s,e[s])+t.map(t=>I(t,e[t])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let t=C(e);if(t)return t}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&m.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(l.w)),(0,l.w)((0,u.xs)(i))}}let r=this.types[e];if(r){let t=(0,p.id)(this._types[e]);return e=>{let n=r.map(({name:t,type:r})=>{let n=this.getEncoder(r)(e[t]);return this._types[r]?(0,l.w)(n):n});return n.unshift(t),(0,u.xs)(n)}}return m.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||m.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,l.w)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(C(e))return r(e,t);let n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){let e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&m.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(t=>this._visit(e,t,r))}let i=this.types[e];return i?i.reduce((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e),{}):m.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new R(e)}static getPrimaryType(e){return R.from(e).primaryType}static hashStruct(e,t,r){return R.from(t).hashStruct(e,r)}static hashDomain(e){let t=[];for(let r in e){let n=k[r];n||m.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort((e,t)=>x.indexOf(e.name)-x.indexOf(t.name)),R.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,u.xs)(["0x1901",R.hashDomain(e),R.from(t).hash(r)])}static hash(e,t,r){return(0,l.w)(R.encode(e,t,r))}static resolveNames(e,t,r,n){var i,s,a,o;return i=this,s=void 0,a=void 0,o=function*(){e=(0,d.DC)(e);let i={};e.verifyingContract&&!(0,u.A7)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");let s=R.from(t);for(let e in s.visit(r,(e,t)=>("address"!==e||(0,u.A7)(t,20)||(i[t]="0x"),t)),i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=s.visit(r,(e,t)=>"address"===e&&i[t]?i[t]:t),{domain:e,value:r}},new(a||(a=Promise))(function(e,t){function r(e){try{u(o.next(e))}catch(e){t(e)}}function n(e){try{u(o.throw(e))}catch(e){t(e)}}function u(t){var i;t.done?e(t.value):((i=t.value)instanceof a?i:new a(function(e){e(i)})).then(r,n)}u((o=o.apply(i,s||[])).next())})}static getPayload(e,t,r){R.hashDomain(e);let n={},i=[];x.forEach(t=>{let r=e[t];null!=r&&(n[t]=A[t](r),i.push({name:t,type:k[t]}))});let s=R.from(t),a=(0,d.DC)(t);return a.EIP712Domain?m.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):a.EIP712Domain=i,s.encode(r),{types:a,domain:n,primaryType:s.primaryType,message:s.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return(0,u.Dv)((0,u.lE)(t));if(e.match(/^u?int/))return o.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&m.throwArgumentError("invalid string","value",t),t}return m.throwArgumentError("unsupported type","type",e)})}}}var P=r(43205),N=r(19311);function M(e){e=atob(e);let t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return(0,u.lE)(t)}function T(e){e=(0,u.lE)(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}let O=new h.Yd("web/5.7.1");function D(e){return new Promise(t=>{setTimeout(t,e)})}function L(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,u.Zq)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,P.ZN)(e)}catch(e){}return(0,u.Dv)(e)}return e}function B(e,t,r){let n=null;if(null!=t){n=(0,P.Y0)(t);let r="string"==typeof e?{url:e}:(0,d.DC)(e);r.headers?0!==Object.keys(r.headers).filter(e=>"content-type"===e.toLowerCase()).length||(r.headers=(0,d.DC)(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},e=r}return function(e,t,r){let n;let i="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;O.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);let s="object"==typeof e?e.throttleCallback:null,a="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;O.assertArgument(a>0&&a%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let o="object"==typeof e&&!!e.errorPassThrough,c={},l=null,f={method:"GET"},p=!1,m=12e4;if("string"==typeof e)l=e;else if("object"==typeof e){if((null==e||null==e.url)&&O.throwArgumentError("missing URL","connection.url",e),l=e.url,"number"==typeof e.timeout&&e.timeout>0&&(m=e.timeout),e.headers)for(let t in e.headers)c[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(p=!0);if(f.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==l.substring(0,6)&&!0!==e.allowInsecureAuthentication&&O.throwError("basic authentication requires a secure https url",h.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:e.user,password:"[REDACTED]"});let t=e.user+":"+e.password;c.authorization={key:"Authorization",value:"Basic "+T((0,P.Y0)(t))}}null!=e.skipFetchSetup&&(f.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(f.fetchOptions=(0,d.DC)(e.fetchOptions))}let g=RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),y=l?l.match(g):null;if(y)try{var b;let e={statusCode:200,statusMessage:"OK",headers:{"content-type":y[1]||"text/plain"},body:y[2]?M(y[3]):(b=y[3],(0,P.Y0)(b.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))))},t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){O.throwError("processing response error",h.Yd.errors.SERVER_ERROR,{body:L(y[1],y[2]),error:e,requestBody:null,requestMethod:"GET",url:l})}t&&(f.method="POST",f.body=t,null==c["content-type"]&&(c["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==c["content-length"]&&(c["content-length"]={key:"Content-Length",value:String(t.length)}));let v={};Object.keys(c).forEach(e=>{let t=c[e];v[t.key]=t.value}),f.headers=v;let w=(n=null,{promise:new Promise(function(e,t){m&&(n=setTimeout(()=>{null!=n&&(n=null,t(O.makeError("timeout",h.Yd.errors.TIMEOUT,{requestBody:L(f.body,v["content-type"]),requestMethod:f.method,timeout:m,url:l})))},m))}),cancel:function(){null!=n&&(clearTimeout(n),n=null)}}),_=function(){var e,t,n,c;return e=this,t=void 0,n=void 0,c=function*(){for(let e=0;e<i;e++){let t=null;try{if(t=yield function(e,t){var r,n,i,s;return r=this,n=void 0,i=void 0,s=function*(){null==t&&(t={});let r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){let e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}let n=yield fetch(e,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((e,t)=>{s[t.toLowerCase()]=e}):n.headers.keys().forEach(e=>{s[e.toLowerCase()]=n.headers.get(e)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:(0,u.lE)(new Uint8Array(i))}},new(i||(i=Promise))(function(e,t){function a(e){try{u(s.next(e))}catch(e){t(e)}}function o(e){try{u(s.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(a,o)}u((s=s.apply(r,n||[])).next())})}(l,f),e<i){if(301===t.statusCode||302===t.statusCode){let e=t.headers.location||"";if("GET"===f.method&&e.match(/^https:/)){l=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(s&&(r=yield s(e,l)),r){let r=0,n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):a*parseInt(String(Math.random()*Math.pow(2,e))),yield D(r);continue}}}}catch(e){null==(t=e.response)&&(w.cancel(),O.throwError("missing response",h.Yd.errors.SERVER_ERROR,{requestBody:L(f.body,v["content-type"]),requestMethod:f.method,serverError:e,url:l}))}let n=t.body;if(p&&304===t.statusCode?n=null:!o&&(t.statusCode<200||t.statusCode>=300)&&(w.cancel(),O.throwError("bad response",h.Yd.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:L(n,t.headers?t.headers["content-type"]:null),requestBody:L(f.body,v["content-type"]),requestMethod:f.method,url:l})),r)try{let e=yield r(n,t);return w.cancel(),e}catch(r){if(r.throttleRetry&&e<i){let t=!0;if(s&&(t=yield s(e,l)),t){let t=a*parseInt(String(Math.random()*Math.pow(2,e)));yield D(t);continue}}w.cancel(),O.throwError("processing response error",h.Yd.errors.SERVER_ERROR,{body:L(n,t.headers?t.headers["content-type"]:null),error:r,requestBody:L(f.body,v["content-type"]),requestMethod:f.method,url:l})}return w.cancel(),n}return O.throwError("failed response",h.Yd.errors.SERVER_ERROR,{requestBody:L(f.body,v["content-type"]),requestMethod:f.method,url:l})},new(n||(n=Promise))(function(r,i){function s(e){try{o(c.next(e))}catch(e){i(e)}}function a(e){try{o(c.throw(e))}catch(e){i(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}o((c=c.apply(e,t||[])).next())})}();return Promise.race([w.promise,_])}(e,n,(e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,P.ZN)(e))}catch(t){O.throwError("invalid JSON",h.Yd.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n})}function q(e,t){return t||(t={}),null==(t=(0,d.DC)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise(function(r,n){let i=null,s=!1,a=()=>!s&&(s=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout(()=>{a()&&n(Error("timeout"))},t.timeout));let o=t.retryLimit,u=0;!function i(){return e().then(function(e){if(void 0!==e)a()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!s){if(++u>o){a()&&n(Error("retry limit reached"));return}let e=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null},function(e){a()&&n(e)})}()})}var z=r(25419),U=r(73290);class j{constructor(e){(0,d.zG)(this,"alphabet",e),(0,d.zG)(this,"base",e.length),(0,d.zG)(this,"_alphabetMap",{}),(0,d.zG)(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=(0,u.lE)(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw Error("Non-base"+this.base+" character");let i=n;for(let e=0;e<t.length;++e)i+=t[e]*this.base,t[e]=255&i,i>>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return(0,u.lE)(new Uint8Array(t.reverse()))}}new j("abcdefghijklmnopqrstuvwxyz234567");let F=new j("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function H(e,t){null==t&&(t=1);let r=[],n=r.forEach,i=function(e,t){n.call(e,function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)})};return i(e,t),r}function $(e,t){let r=Array(e);for(let n=0,i=-1;n<e;n++)r[n]=i+=1+t();return r}function W(e,t){let r=$(e(),e),n=e(),i=$(n,e),s=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<s[e];t++)r.push(i[e]+t);return t?r.map(e=>t[e]):r}function G(e,t,r){let n=Array(e).fill(void 0).map(()=>[]);for(let i=0;i<t;i++)(function(e,t){let r=Array(e);for(let i=0,s=0;i<e;i++){var n;r[i]=s+=1&(n=t())?~n>>1:n>>1}return r})(e,r).forEach((e,t)=>n[t].push(e));return n}let V=(s=function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,s=[0,1];for(let e=1;e<n;e++)s.push(i+=r());let a=r(),o=t;t+=a;let u=0,c=0;function l(){return 0==u&&(c=c<<8|e[t++],u=8),c>>--u&1}let d=0;for(let e=0;e<31;e++)d=d<<1|l();let h=[],f=0,p=2147483648;for(;;){let e=Math.floor(((d-f+1)*i-1)/p),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<s[n]?r=n:t=n}if(0==t)break;h.push(t);let a=f+Math.floor(p*s[t]/i),o=f+Math.floor(p*s[t+1]/i)-1;for(;((a^o)&1073741824)==0;)d=d<<1&2147483647|l(),a=a<<1&2147483647,o=o<<1&2147483647|1;for(;a&~o&536870912;)d=1073741824&d|d<<1&1073741823|l(),a=a<<1^1073741824,o=(1073741824^o)<<1|1073741825;f=a,p=1+o-a}let m=n-4;return h.map(t=>{switch(t-m){case 3:return m+65792+(e[o++]<<16|e[o++]<<8|e[o++]);case 2:return m+256+(e[o++]<<8|e[o++]);case 1:return m+e[o++];default:return t-1}})}(M("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),i=0,()=>s[i++]),K=new Set(W(V)),Z=new Set(W(V)),Y=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(function(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return H(G(i.length,1+e,t).map((e,t)=>{let s=e[0],a=e.slice(1);return Array(i[t]).fill(void 0).map((e,t)=>{let i=t*n;return[s+t*r,a.map(e=>e+i)]})}))}(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(G(1+e(),1+r,e).map(e=>[e[0],e.slice(1)]))}return function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];t[n[0]]=n[1]}return t}(H(t))}(V),J=(n=W(V).sort((e,t)=>e-t),function e(){let t=[];for(;;){let r=W(V,n);if(0==r.length)break;t.push({set:new Set(r),node:e()})}t.sort((e,t)=>t.set.size-e.set.size);let r=V();return{branches:t,valid:r%3,fe0f:!!(1&(r=r/3|0)),save:1==(r>>=1),check:2==r}}());function Q(e){return e.filter(e=>65039!=e)}function X(e){for(let t of e.split(".")){let e=(0,P.XL)(t);try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw Error("underscore only allowed at start");if(e.length>=4&&e.every(e=>e<128)&&45===e[2]&&45===e[3])throw Error("invalid label extension")}catch(e){throw Error(`Invalid label "${t}": ${e.message}`)}}return e}let ee=new h.Yd(f),et=new Uint8Array(32);function er(e){if(0===e.length)throw Error("invalid ENS name; empty component");return e}function en(e){let t=(0,P.Y0)(X(function(e,t){let r=(0,P.XL)(e).reverse(),n=[];for(;r.length;){let e=function(e,t){var r;let n,i;let s=J,a=[],o=e.length;for(;o;){let t=e[--o];if(!(s=null===(r=s.branches.find(e=>e.set.has(t)))||void 0===r?void 0:r.node))break;if(s.save)i=t;else if(s.check&&t===i)break;a.push(t),s.fe0f&&(a.push(65039),o>0&&65039==e[o-1]&&o--),s.valid&&(n=a.slice(),2==s.valid&&n.splice(1,1),e.length=o)}return n}(r);if(e){n.push(...t(e));continue}let i=r.pop();if(K.has(i)){n.push(i);continue}if(Z.has(i))continue;let s=Y[i];if(s){n.push(...s);continue}throw Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return X(String.fromCodePoint(...n).normalize("NFC"))}(e,Q))),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(er(t.slice(n,e))),n=e+1);if(n>=t.length)throw Error("invalid ENS name; empty component");return r.push(er(t.slice(n))),r}function ei(e){"string"!=typeof e&&ee.throwArgumentError("invalid ENS name; not a string","name",e);let t=et,r=en(e);for(;r.length;)t=(0,l.w)((0,u.zo)([t,(0,l.w)(r.pop())]));return(0,u.Dv)(t)}et.fill(0);let es=new h.Yd("networks/5.7.1");function ea(e){let t=function(t,r){null==r&&(r={});let n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket)try{let i=new t.PocketProvider(e,r.pocket);i.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(i.network.name)&&n.push(i)}catch(e){}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{let i=new t.AnkrProvider(e,r.ankr);i.network&&-1===["ropsten"].indexOf(i.network.name)&&n.push(i)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return ea(e)},t}function eo(e,t){let r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return eo(e,t)},r}let eu={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ea("homestead")},ec={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ea("ropsten")},el={chainId:63,name:"classicMordor",_defaultProvider:eo("https://www.ethercluster.com/mordor","classicMordor")},ed={unspecified:{chainId:0,name:"unspecified"},homestead:eu,mainnet:eu,morden:{chainId:2,name:"morden"},ropsten:ec,testnet:ec,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ea("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ea("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ea("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ea("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:eo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:el,classicTestnet:el,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:eo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ea("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ea("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};var eh=r(15334),ef=r.n(eh);function ep(e){return"0x"+ef().sha256().update((0,u.lE)(e)).digest("hex")}new h.Yd("sha2/5.7.0");var em=r(12007),eg=r.n(em);let ey=new h.Yd(z.i);class eb{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),s=this.hash.bind(this),a=this.hex.bind(this),o=this.number.bind(this),u=this.type.bind(this);return e.transaction={hash:s,type:u,accessList:eb.allowNull(this.accessList.bind(this),null),blockHash:eb.allowNull(s,null),blockNumber:eb.allowNull(o,null),transactionIndex:eb.allowNull(o,null),confirmations:eb.allowNull(o,null),from:t,gasPrice:eb.allowNull(r),maxPriorityFeePerGas:eb.allowNull(r),maxFeePerGas:eb.allowNull(r),gasLimit:r,to:eb.allowNull(t,null),value:r,nonce:o,data:i,r:eb.allowNull(this.uint256),s:eb.allowNull(this.uint256),v:eb.allowNull(o),creates:eb.allowNull(t,null),raw:eb.allowNull(i)},e.transactionRequest={from:eb.allowNull(t),nonce:eb.allowNull(o),gasLimit:eb.allowNull(r),gasPrice:eb.allowNull(r),maxPriorityFeePerGas:eb.allowNull(r),maxFeePerGas:eb.allowNull(r),to:eb.allowNull(t),value:eb.allowNull(r),data:eb.allowNull(e=>this.data(e,!0)),type:eb.allowNull(o),accessList:eb.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:o,blockNumber:o,transactionHash:s,address:t,topics:eb.arrayOf(s),data:i,logIndex:o,blockHash:s},e.receipt={to:eb.allowNull(this.address,null),from:eb.allowNull(this.address,null),contractAddress:eb.allowNull(t,null),transactionIndex:o,root:eb.allowNull(a),gasUsed:r,logsBloom:eb.allowNull(i),blockHash:s,transactionHash:s,logs:eb.arrayOf(this.receiptLog.bind(this)),blockNumber:o,confirmations:eb.allowNull(o,null),cumulativeGasUsed:r,effectiveGasPrice:eb.allowNull(r),status:eb.allowNull(o),type:u},e.block={hash:eb.allowNull(s),parentHash:s,number:o,timestamp:o,nonce:eb.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:eb.allowNull(t),extraData:i,transactions:eb.allowNull(eb.arrayOf(s)),baseFeePerGas:eb.allowNull(r)},e.blockWithTransactions=(0,d.DC)(e.block),e.blockWithTransactions.transactions=eb.allowNull(eb.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:eb.allowNull(n,void 0),toBlock:eb.allowNull(n,void 0),blockHash:eb.allowNull(s,void 0),address:eb.allowNull(t,void 0),topics:eb.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:eb.allowNull(o),blockHash:eb.allowNull(s),transactionIndex:o,removed:eb.allowNull(this.boolean.bind(this)),address:t,data:eb.allowFalsish(i,"0x"),topics:eb.arrayOf(s),transactionHash:s,logIndex:o},e}accessList(e){return(0,N.z7)(e||[])}number(e){return"0x"===e?0:o.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:o.O$.from(e).toNumber()}bigNumber(e){return o.O$.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,u.A7)(e))?e.toLowerCase():ey.throwArgumentError("invalid hash","value",e)}data(e,t){let r=this.hex(e,t);if(r.length%2!=0)throw Error("invalid data; odd-length - "+e);return r}address(e){return(0,c.Kn)(e)}callAddress(e){if(!(0,u.A7)(e,32))return null;let t=(0,c.Kn)((0,u.p3)(e,12));return"0x0000000000000000000000000000000000000000"===t?null:t}contractAddress(e){return(0,c.CR)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||(0,u.A7)(e))return(0,u.$P)(e);throw Error("invalid blockTag")}hash(e,t){let r=this.hex(e,t);return 32!==(0,u.E1)(r)?ey.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;let t=o.O$.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,u.A7)(e))throw Error("invalid uint256");return(0,u.$m)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);let r=null!=e._difficulty?e._difficulty:e.difficulty,n=eb.check(t,e);return n._difficulty=null==r?null:o.O$.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return eb.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&o.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),(1===e.type||2===e.type)&&null==e.accessList&&(e.accessList=[]);let t=eb.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,u.A7)(r)&&(r=o.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,u.A7)(r)&&(r=o.O$.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&((r=(t.v-35)/2)<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,N.Qc)(e)}receiptLog(e){return eb.check(this.formats.receiptLog,e)}receipt(e){let t=eb.check(this.formats.receipt,e);if(null!=t.root){if(t.root.length<=4){let e=o.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&ey.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):ey.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&ey.throwArgumentError("invalid root hash","value.root",t.root)}return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(e=>this.topics(e)):null!=e?this.hash(e,!0):null}filter(e){return eb.check(this.formats.filter,e)}filterLog(e){return eb.check(this.formats.filterLog,e)}static check(e,t){let r={};for(let n in e)try{let i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw Error("not an array");let r=[];return t.forEach(function(t){r.push(e(t))}),r}}}var ev=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((n=n.apply(e,t||[])).next())})};let ew=new h.Yd(z.i);function e_(e){return null==e?"null":(32!==(0,u.E1)(e)&&ew.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function eE(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map(e=>{if(!Array.isArray(e))return e_(e);{let t={};e.forEach(e=>{t[e_(e)]=!0});let r=Object.keys(t);return r.sort(),r.join("|")}}).join("&")}function ek(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,u.E1)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else if(Array.isArray(e))return"filter:*:"+eE(e);else if(U.Sg.isForkEvent(e))throw ew.warn("not implemented"),Error("not implemented");else if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+eE(e.topics||[]);throw Error("invalid event - "+e)}function ex(){return new Date().getTime()}function eS(e){return new Promise(t=>{setTimeout(t,e)})}let eA=["block","network","pending","poll"];class eC{constructor(e,t,r){(0,d.zG)(this,"tag",e),(0,d.zG)(this,"listener",t),(0,d.zG)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){var e;let t=this.tag.split(":");if("filter"!==t[0])return null;let r=t[1],n=""===(e=t[2])?[]:e.split(/&/g).map(e=>{if(""===e)return[];let t=e.split("|").map(e=>"null"===e?null:e);return 1===t.length?t[0]:t}),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||eA.indexOf(this.tag)>=0}}let eI={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function eR(e){return(0,u.$m)(o.O$.from(e).toHexString(),32)}function eP(e){return F.encode((0,u.zo)([e,(0,u.p3)(ep(ep(e)),0,4)]))}let eN=RegExp("^(ipfs)://(.*)$","i"),eM=[RegExp("^(https)://(.*)$","i"),RegExp("^(data):(.*)$","i"),eN,RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function eT(e,t){try{return(0,P.ZN)(eO(e,t))}catch(e){}return null}function eO(e,t){if("0x"===e)return null;let r=o.O$.from((0,u.p3)(e,t,t+32)).toNumber(),n=o.O$.from((0,u.p3)(e,r,r+32)).toNumber();return(0,u.p3)(e,r+32,r+32+n)}function eD(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):ew.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function eL(e){let t=(0,u.lE)(e);if(t.length>32)throw Error("internal; should not happen");let r=new Uint8Array(32);return r.set(t,32-t.length),r}function eB(e){let t=[],r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){let i=(0,u.lE)(e[n]);t[n]=eL(r),t.push(eL(i.length)),t.push(function(e){if(e.length%32==0)return e;let t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}(i)),r+=32+32*Math.ceil(i.length/32)}return(0,u.xs)(t)}class eq{constructor(e,t,r,n){(0,d.zG)(this,"provider",e),(0,d.zG)(this,"name",r),(0,d.zG)(this,"address",e.formatter.address(t)),(0,d.zG)(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(e=>o.O$.from(e).eq(1)).catch(e=>{if(e.code===h.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ev(this,void 0,void 0,function*(){let r={to:this.address,ccipReadEnabled:!0,data:(0,u.xs)([e,ei(this.name),t||"0x"])},n=!1;if(yield this.supportsWildcard()){var i;n=!0,r.data=(0,u.xs)(["0x9061b923",eB([(i=this.name,(0,u.Dv)((0,u.zo)(en(i).map(e=>{if(e.length>63)throw Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"),r.data])])}try{let e=yield this.provider.call(r);return(0,u.lE)(e).length%32==4&&ew.throwError("resolver threw error",h.Yd.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=eO(e,0)),e}catch(e){if(e.code===h.Yd.errors.CALL_EXCEPTION)return null;throw e}})}_fetchBytes(e,t){return ev(this,void 0,void 0,function*(){let r=yield this._fetch(e,t);return null!=r?eO(r,0):null})}_getAddress(e,t){let r=eI[String(e)];if(null==r&&ew.throwError(`unsupported coin type: ${e}`,h.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);let n=(0,u.lE)(t);if(null!=r.p2pkh){let e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){let t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return eP((0,u.zo)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){let e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){let t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return eP((0,u.zo)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){let e=n[1],t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){let e=eg().toWords(n.slice(2));return e.unshift(t),eg().encode(r.prefix,e)}}return null}getAddress(e){return ev(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{let e=yield this._fetch("0x3b3b57de");if("0x"===e||"0x0000000000000000000000000000000000000000000000000000000000000000"===e)return null;return this.provider.formatter.callAddress(e)}catch(e){if(e.code===h.Yd.errors.CALL_EXCEPTION)return null;throw e}let t=yield this._fetchBytes("0xf1cb7e06",eR(e));if(null==t||"0x"===t)return null;let r=this._getAddress(e,t);return null==r&&ew.throwError("invalid or unsupported coin data",h.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r})}getAvatar(){return ev(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<eM.length;r++){let n=t.match(eM[r]);if(null==n)continue;let i=n[1].toLowerCase();switch(i){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:eD(t)};case"erc721":case"erc1155":{let r="erc721"===i?"0xc87b56dd":"0x0e89341c";e.push({type:i,content:t});let s=this._resolvedAddress||(yield this.getAddress()),a=(n[2]||"").split("/");if(2!==a.length)return null;let c=yield this.provider.formatter.address(a[0]),l=(0,u.$m)(o.O$.from(a[1]).toHexString(),32);if("erc721"===i){let t=this.provider.formatter.callAddress((yield this.provider.call({to:c,data:(0,u.xs)(["0x6352211e",l])})));if(s!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===i){let t=o.O$.from((yield this.provider.call({to:c,data:(0,u.xs)(["0x00fdd58e",(0,u.$m)(s,32),l])})));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}let d={to:this.provider.formatter.address(a[0]),data:(0,u.xs)([r,l])},h=eT((yield this.provider.call(d)),0);if(null==h)return null;e.push({type:"metadata-url-base",content:h}),"erc1155"===i&&(h=h.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:h})),h.match(/^ipfs:/i)&&(h=eD(h)),e.push({type:"metadata-url",content:h});let f=yield B(h);if(!f)return null;e.push({type:"metadata",content:JSON.stringify(f)});let p=f.image;if("string"!=typeof p)return null;if(p.match(/^(https:\/\/|data:)/i));else{let t=p.match(eN);if(null==t)return null;e.push({type:"url-ipfs",content:p}),p=eD(p)}return e.push({type:"url",content:p}),{linkage:e,url:p}}}}}catch(e){}return null})}getContentHash(){return ev(this,void 0,void 0,function*(){let e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;let t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){let e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+F.encode("0x"+t[1])}let r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){let e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+F.encode("0x"+r[1])}let n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];let i=e.match(/^0x90b2c605([0-9a-f]*)$/);if(i&&68===i[1].length){let e={"=":"","+":"-","/":"_"};return"sia://"+T("0x"+i[1]).replace(/[=+\/]/g,t=>e[t])}return ew.throwError("invalid or unsupported content hash data",h.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ev(this,void 0,void 0,function*(){let t=(0,P.Y0)(e);(t=(0,u.zo)([eR(64),eR(t.length),t])).length%32!=0&&(t=(0,u.zo)([t,(0,u.$m)("0x",32-e.length%32)]));let r=yield this._fetchBytes("0x59d1d43c",(0,u.Dv)(t));return null==r||"0x"===r?null:(0,P.ZN)(r)})}}let ez=null,eU=1;class ej extends U.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,d.zG)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(e=>{}),this._ready().catch(e=>{});else{let t=(0,d.tu)(new.target,"getNetwork")(e);t?((0,d.zG)(this,"_network",t),this.emit("network",t,null)):ew.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ev(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||ew.throwError("no network detected",h.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,d.zG)(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return q(()=>this._ready().then(e=>e,e=>{if(e.code!==h.Yd.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==ez&&(ez=new eb),ez}static getNetwork(e){return function(e){if(null==e)return null;if("number"==typeof e){for(let t in ed){let r=ed[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){let t=ed[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}let t=ed[e.name];if(!t)return"number"!=typeof e.chainId&&es.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&es.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;if(null==r&&t._defaultProvider){var n;r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider}return{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}(null==e?"homestead":e)}ccipReadFetch(e,t,r){return ev(this,void 0,void 0,function*(){if(this.disableCcipRead||0===r.length)return null;let n=e.to.toLowerCase(),i=t.toLowerCase(),s=[];for(let e=0;e<r.length;e++){let t=r[e],a=t.replace("{sender}",n).replace("{data}",i),o=t.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:n}),u=yield B({url:a,errorPassThrough:!0},o,(e,t)=>(e.status=t.statusCode,e));if(u.data)return u.data;let c=u.message||"unknown error";if(u.status>=400&&u.status<500)return ew.throwError(`response not found during CCIP fetch: ${c}`,h.Yd.errors.SERVER_ERROR,{url:t,errorMessage:c});s.push(c)}return ew.throwError(`error encountered during CCIP fetch: ${s.map(e=>JSON.stringify(e)).join(", ")}`,h.Yd.errors.SERVER_ERROR,{urls:r,errorMessages:s})})}_getInternalBlockNumber(e){return ev(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let t=this._internalBlockNumber;try{let r=yield t;if(ex()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}let t=ex(),r=(0,d.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(e=>null,e=>e)}).then(({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;let i=ex();return(e=o.O$.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:i}});return this._internalBlockNumber=r,r.catch(e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)}),(yield r).blockNumber})}poll(){return ev(this,void 0,void 0,function*(){let e=eU++,t=[],r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){this.emit("error",e);return}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r===this._lastBlockNumber){this.emit("didPoll",e);return}if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)ew.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",ew.makeError("network block skew detected",h.Yd.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach(e=>{if("block"===e)return;let t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach(e=>{switch(e.type){case"tx":{let r=e.hash,n=this.getTransactionReceipt(r).then(e=>(e&&null!=e.blockNumber&&(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e)),null)).catch(e=>{this.emit("error",e)});t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);let n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;let i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);let s=this.getLogs(n).then(t=>{e._inflight=!1,0!==t.length&&t.forEach(t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)})}).catch(t=>{this.emit("error",t),e._inflight=!1});t.push(s)}}}),this._lastBlockNumber=r,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(e=>{this.emit("error",e)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ev(this,void 0,void 0,function*(){return ew.throwError("provider does not support network detection",h.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ev(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield eS(0),this._network;let r=ew.makeError("underlying network changed",h.Yd.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ex();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){(null==this._fastBlockNumber||!(e<this._fastBlockNumber))&&(this._fastQueryDate=ex(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return ev(this,void 0,void 0,function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)})}_waitForTransaction(e,t,r,n){return ev(this,void 0,void 0,function*(){let i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise((i,s)=>{let a=[],o=!1,u=function(){return!!o||(o=!0,a.forEach(e=>{e()}),!1)},c=e=>{e.confirmations<t||u()||i(e)};if(this.on(e,c),a.push(()=>{this.removeListener(e,c)}),n){let r=n.startBlock,i=null,c=a=>ev(this,void 0,void 0,function*(){o||(yield eS(1e3),this.getTransactionCount(n.from).then(l=>ev(this,void 0,void 0,function*(){if(!o){if(l<=n.nonce)r=a;else{{let t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3)<n.startBlock&&(i=n.startBlock);i<=a;){if(o)return;let r=yield this.getBlockWithTransactions(i);for(let i=0;i<r.transactions.length;i++){let a=r.transactions[i];if(a.hash===e)return;if(a.from===n.from&&a.nonce===n.nonce){if(o)return;let r=yield this.waitForTransaction(a.hash,t);if(u())return;let i="replaced";a.data===n.data&&a.to===n.to&&a.value.eq(n.value)?i="repriced":"0x"===a.data&&a.from===a.to&&a.value.isZero()&&(i="cancelled"),s(ew.makeError("transaction was replaced",h.Yd.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(a),hash:e,receipt:r}));return}}i++}}o||this.once("block",c)}}),e=>{o||this.once("block",c)}))});if(o)return;this.once("block",c),a.push(()=>{this.removeListener("block",c)})}if("number"==typeof r&&r>0){let e=setTimeout(()=>{u()||s(ew.makeError("timeout exceeded",h.Yd.errors.TIMEOUT,{timeout:r}))},r);e.unref&&e.unref(),a.push(()=>{clearTimeout(e)})}})})}getBlockNumber(){return ev(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return o.O$.from(e)}catch(t){return ew.throwError("bad result from backend",h.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,d.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return o.O$.from(n)}catch(e){return ew.throwError("bad result from backend",h.Yd.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}})}getTransactionCount(e,t){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,d.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return o.O$.from(n).toNumber()}catch(e){return ew.throwError("bad result from backend",h.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}})}getCode(e,t){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,d.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,u.Dv)(n)}catch(e){return ew.throwError("bad result from backend",h.Yd.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}})}getStorageAt(e,t,r){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield(0,d.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then(e=>(0,u.$P)(e))}),i=yield this.perform("getStorageAt",n);try{return(0,u.Dv)(i)}catch(e){return ew.throwError("bad result from backend",h.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}})}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,u.E1)(t))throw Error("invalid response - sendTransaction");return null!=t&&e.hash!==t&&ew.throwError("Transaction hash mismatch from Provider.sendTransaction.",h.Yd.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),e.wait=(t,n)=>ev(this,void 0,void 0,function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});let s=yield this._waitForTransaction(e.hash,t,n,i);return null==s&&0===t?null:(this._emitted["t:"+e.hash]=s.blockNumber,0===s.status&&ew.throwError("transaction failed",h.Yd.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:s}),s)}),e}sendTransaction(e){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(e=>(0,u.Dv)(e)),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);let n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}})}_getTransactionRequest(e){return ev(this,void 0,void 0,function*(){let t=yield e,r={};return["from","to"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>e?this._getAddress(e):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>e?o.O$.from(e):null))}),["type"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>null!=e?e:null))}),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>e?(0,u.Dv)(e):null))}),this.formatter.transactionRequest((yield(0,d.mE)(r)))})}_getFilter(e){return ev(this,void 0,void 0,function*(){e=yield e;let t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(r=>{null!=e[r]&&(t[r]=e[r])}),["fromBlock","toBlock"].forEach(r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))}),this.formatter.filter((yield(0,d.mE)(t)))})}_call(e,t,r){return ev(this,void 0,void 0,function*(){r>=10&&ew.throwError("CCIP read exceeded maximum redirections",h.Yd.errors.SERVER_ERROR,{redirects:r,transaction:e});let n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,u.E1)(i)%32==4)try{let s=(0,u.p3)(i,4),a=(0,u.p3)(s,0,32);o.O$.from(a).eq(n)||ew.throwError("CCIP Read sender did not match",h.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});let c=[],l=o.O$.from((0,u.p3)(s,32,64)).toNumber(),d=o.O$.from((0,u.p3)(s,l,l+32)).toNumber(),f=(0,u.p3)(s,l+32);for(let t=0;t<d;t++){let r=eT(f,32*t);null==r&&ew.throwError("CCIP Read contained corrupt URL string",h.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i}),c.push(r)}let p=eO(s,64);o.O$.from((0,u.p3)(s,100,128)).isZero()||ew.throwError("CCIP Read callback selector included junk",h.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});let m=(0,u.p3)(s,96,100),g=eO(s,128),y=yield this.ccipReadFetch(e,p,c);null==y&&ew.throwError("CCIP Read disabled or provided no URLs",h.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});let b={to:n,data:(0,u.xs)([m,eB([y,g])])};return this._call(b,t,r+1)}catch(e){if(e.code===h.Yd.errors.SERVER_ERROR)throw e}try{return(0,u.Dv)(i)}catch(r){return ew.throwError("bad result from backend",h.Yd.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:i,error:r})}})}call(e,t){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,d.mE)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)})}estimateGas(e){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield(0,d.mE)({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return o.O$.from(r)}catch(e){return ew.throwError("bad result from backend",h.Yd.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}})}_getAddress(e){return ev(this,void 0,void 0,function*(){"string"!=typeof(e=yield e)&&ew.throwArgumentError("invalid address or ENS name","name",e);let t=yield this.resolveName(e);return null==t&&ew.throwError("ENS name not configured",h.Yd.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t})}_getBlock(e,t){return ev(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let r=-128,n={includeTransactions:!!t};if((0,u.A7)(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),(0,u.A7)(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){ew.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return q(()=>ev(this,void 0,void 0,function*(){let e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;r<e.transactions.length;r++){let n=e.transactions[r];if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}}let r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map(e=>this._wrapTransaction(e)),r}return this.formatter.block(e)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ev(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return q(()=>ev(this,void 0,void 0,function*(){let r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;let n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}),{oncePoll:this})})}getTransactionReceipt(e){return ev(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return q(()=>ev(this,void 0,void 0,function*(){let r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;let n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}),{oncePoll:this})})}getLogs(e){return ev(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield(0,d.mE)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach(e=>{null==e.removed&&(e.removed=!1)}),eb.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)})}getEtherPrice(){return ev(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ev(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&ew.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return(t+=e)<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ev(this,void 0,void 0,function*(){let t=e;for(;;){if(""===t||"."===t||"eth"!==e&&"eth"===t)return null;let r=yield this._getResolver(t,"getResolver");if(null!=r){let n=new eq(this,r,e);if(t!==e&&!(yield n.supportsWildcard()))return null;return n}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ev(this,void 0,void 0,function*(){null==t&&(t="ENS");let r=yield this.getNetwork();r.ensAddress||ew.throwError("network does not support ENS",h.Yd.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{let t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+ei(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null})}resolveName(e){return ev(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,u.A7)(e))throw t}"string"!=typeof e&&ew.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ev(this,void 0,void 0,function*(){e=yield e;let t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;let n=eT((yield this.call({to:r,data:"0x691f3431"+ei(t).substring(2)})),0);return(yield this.resolveName(n))!=e?null:n})}getAvatar(e){return ev(this,void 0,void 0,function*(){let t=null;if((0,u.A7)(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new eq(this,n,r);try{let e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==h.Yd.errors.CALL_EXCEPTION)throw e}try{let e=eT((yield this.call({to:n,data:"0x691f3431"+ei(r).substring(2)})),0);t=yield this.getResolver(e)}catch(e){if(e.code!==h.Yd.errors.CALL_EXCEPTION)throw e;return null}}else if(!(t=yield this.getResolver(e)))return null;let r=yield t.getAvatar();return null==r?null:r.url})}perform(e,t){return ew.throwError(e+" not implemented",h.Yd.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(e=>e.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(e=>e.pollable()).length>0}_addEventListener(e,t,r){let n=new eC(ek(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],i=ek(e);return this._events=this._events.filter(e=>e.tag!==i||(setTimeout(()=>{e.listener.apply(this,t)},0),r=!0,!e.once||(n.push(e),!1))),n.forEach(e=>{this._stopEvent(e)}),r}listenerCount(e){if(!e)return this._events.length;let t=ek(e);return this._events.filter(e=>e.tag===t).length}listeners(e){if(null==e)return this._events.map(e=>e.listener);let t=ek(e);return this._events.filter(e=>e.tag===t).map(e=>e.listener)}off(e,t){if(null==t)return this.removeAllListeners(e);let r=[],n=!1,i=ek(e);return this._events=this._events.filter(e=>e.tag!==i||e.listener!=t||!!n||(n=!0,r.push(e),!1)),r.forEach(e=>{this._stopEvent(e)}),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{let r=ek(e);this._events=this._events.filter(e=>e.tag!==r||(t.push(e),!1))}return t.forEach(e=>{this._stopEvent(e)}),this}}var eF=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((n=n.apply(e,t||[])).next())})};let eH=new h.Yd(z.i),e$=["call","estimateGas"];function eW(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){let r=(0,u.A7)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(let r in e){let n=eW(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return eW(JSON.parse(e),t)}catch(e){}return null}function eG(e,t,r){let n=r.transaction||r.signedTransaction;if("call"===e){let e=eW(t,!0);if(e)return e.data;eH.throwError("missing revert data in call exception; Transaction reverted without a reason string",h.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=eW(t.body,!1);null==r&&(r=eW(t,!1)),r&&eH.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===h.Yd.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),(i=(i||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&eH.throwError("insufficient funds for intrinsic transaction cost",h.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&eH.throwError("nonce has already been used",h.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&eH.throwError("replacement fee too low",h.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&eH.throwError("legacy pre-eip-155 transactions not supported",h.Yd.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),e$.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&eH.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function eV(e){return new Promise(function(t){setTimeout(t,e)})}function eK(e){if(e.error){let t=Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function eZ(e){return e?e.toLowerCase():e}let eY={};class eJ extends a.E{constructor(e,t,r){if(super(),e!==eY)throw Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,d.zG)(this,"provider",t),null==r&&(r=0),"string"==typeof r?((0,d.zG)(this,"_address",this.provider.formatter.address(r)),(0,d.zG)(this,"_index",null)):"number"==typeof r?((0,d.zG)(this,"_index",r),(0,d.zG)(this,"_address",null)):eH.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return eH.throwError("cannot alter JSON-RPC Signer connection",h.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new eQ(eY,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&eH.throwError("unknown account #"+this._index,h.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=(0,d.DC)(e);let t=this.getAddress().then(e=>(e&&(e=e.toLowerCase()),e));if(null==e.gasLimit){let r=(0,d.DC)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(e=>eF(this,void 0,void 0,function*(){if(null==e)return null;let t=yield this.provider.resolveName(e);return null==t&&eH.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))),(0,d.mE)({tx:(0,d.mE)(e),sender:t}).then(({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&eH.throwArgumentError("from address mismatch","transaction",e):t.from=r;let n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then(e=>e,e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&eH.throwError("user rejected transaction",h.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),eG("sendTransaction",e,n)))})}signTransaction(e){return eH.throwError("signing transactions is unsupported",h.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return eF(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield q(()=>eF(this,void 0,void 0,function*(){let e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}})}signMessage(e){return eF(this,void 0,void 0,function*(){let t="string"==typeof e?(0,P.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,u.Dv)(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&eH.throwError("user rejected signing",h.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}})}_legacySignMessage(e){return eF(this,void 0,void 0,function*(){let t="string"==typeof e?(0,P.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,u.Dv)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&eH.throwError("user rejected signing",h.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}})}_signTypedData(e,t,r){return eF(this,void 0,void 0,function*(){let n=yield R.resolveNames(e,t,r,e=>this.provider.resolveName(e)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(R.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&eH.throwError("user rejected signing",h.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}})}unlock(e){return eF(this,void 0,void 0,function*(){let t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])})}}class eQ extends eJ{sendTransaction(e){return this.sendUncheckedTransaction(e).then(e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)}))}}let eX={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class e0 extends ej{constructor(e,t){let r=t;null==r&&(r=new Promise((e,t)=>{setTimeout(()=>{this.detectNetwork().then(t=>{e(t)},e=>{t(e)})},0)})),super(r),e||(e=(0,d.tu)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,d.zG)(this,"connection",Object.freeze({url:e})):(0,d.zG)(this,"connection",Object.freeze((0,d.DC)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return eF(this,void 0,void 0,function*(){yield eV(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){let t=(0,d.tu)(this.constructor,"getNetwork");try{return t(o.O$.from(e).toNumber())}catch(t){return eH.throwError("could not detect network",h.Yd.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return eH.throwError("could not detect network",h.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new eJ(eY,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(e=>this.formatter.address(e)))}send(e,t){let r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,d.p$)(r),provider:this});let n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];let i=B(this.connection,JSON.stringify(r),eK).then(e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e),e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e});return n&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[eZ(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[eZ(t.address),t.blockTag]];case"getCode":return["eth_getCode",[eZ(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[eZ(t.address),(0,u.$m)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":if(t.blockTag)return["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]];if(t.blockHash)return["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]];break;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,d.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,d.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=eZ(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return eF(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){let e=t.transaction;if(e&&null!=e.type&&o.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){let r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,d.DC)(t)).transaction=(0,d.DC)(e),delete t.transaction.type)}}let r=this.prepareRequest(e,t);null==r&&eH.throwError(e+" not implemented",h.Yd.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return eG(e,r,t)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(r){return function n(){e.send("eth_getFilterChanges",[r]).then(function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach(function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then(function(){return e.getTransaction(t).then(function(t){return e.emit("pending",t),null})})}),n.then(function(){return eV(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[r]);return}return setTimeout(function(){n()},0),null}).catch(e=>{})}(),r}).catch(e=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let r=(0,d.DC)(eX);if(t)for(let e in t)t[e]&&(r[e]=!0);(0,d.uj)(e,r);let n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(t){if(null==e[t])return;let r=(0,u.$P)(o.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r}),["from","to","data"].forEach(function(t){null!=e[t]&&(n[t]=(0,u.Dv)(e[t]))}),e.accessList&&(n.accessList=(0,N.z7)(e.accessList)),n}}},32138:function(e,t,r){"use strict";r.d(t,{Q:function(){return l}});var n=r(21277),i=r(67740),s=r(25419),a=r(26728);let o=new i.Yd(s.i),u=1;function c(e,t){let r="Web3LegacyFetcher";return function(e,i){let s={method:e,params:i,id:u++,jsonrpc:"2.0"};return new Promise((e,i)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,n.p$)(s),provider:this}),t(s,(t,n)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:s,provider:this}),i(t);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:n,provider:this}),n.error){let e=Error(n.error.message);return e.code=n.error.code,e.data=n.error.data,i(e)}e(n.result)})})}}class l extends a.r{constructor(e,t){null==e&&o.throwArgumentError("missing provider","provider",e);let r=null,i=null,s=null;"function"==typeof e?(r="unknown:",i=e):(((r=e.host||e.path||"")||!e.isMetaMask||(r="metamask"),s=e,e.request)?(""===r&&(r="eip-1193:"),i=function(t,r){null==r&&(r=[]);let i={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,n.p$)(i),provider:this}),e.request(i).then(e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:this}),e),e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:this}),e})}):e.sendAsync?i=c(e,e.sendAsync.bind(e)):e.send?i=c(e,e.send.bind(e)):o.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,n.zG)(this,"jsonRpcFetchFunc",i),(0,n.zG)(this,"provider",s)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}},62734:function(e,t,r){"use strict";r.d(t,{J:function(){return d},c:function(){return u}});var n=r(99186),i=r(67740);let s=new i.Yd("rlp/5.7.0");function a(e){let t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function o(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function u(e){return(0,n.Dv)(function e(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(t){r=r.concat(e(t))}),r.length<=55)return r.unshift(192+r.length),r;let n=a(r.length);return n.unshift(247+n.length),n.concat(r)}(0,n.Zq)(t)||s.throwArgumentError("RLP object must be BytesLike","object",t);let r=Array.prototype.slice.call((0,n.lE)(t));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;let i=a(r.length);return i.unshift(183+i.length),i.concat(r)}(e))}function c(e,t,r,n){let a=[];for(;r<t+1+n;){let o=l(e,r);a.push(o.result),(r+=o.consumed)>t+1+n&&s.throwError("child data too short",i.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:a}}function l(e,t){if(0===e.length&&s.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),e[t]>=248){let r=e[t]-247;t+1+r>e.length&&s.throwError("data short segment too short",i.Yd.errors.BUFFER_OVERRUN,{});let n=o(e,t+1,r);return t+1+r+n>e.length&&s.throwError("data long segment too short",i.Yd.errors.BUFFER_OVERRUN,{}),c(e,t,t+1+r,r+n)}if(e[t]>=192){let r=e[t]-192;return t+1+r>e.length&&s.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),c(e,t,t+1,r)}if(e[t]>=184){let r=e[t]-183;t+1+r>e.length&&s.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});let a=o(e,t+1,r);t+1+r+a>e.length&&s.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});let u=(0,n.Dv)(e.slice(t+1+r,t+1+r+a));return{consumed:1+r+a,result:u}}if(e[t]>=128){let r=e[t]-128;t+1+r>e.length&&s.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{});let a=(0,n.Dv)(e.slice(t+1,t+1+r));return{consumed:1+r,result:a}}return{consumed:1,result:(0,n.Dv)(e[t])}}function d(e){let t=(0,n.lE)(e),r=l(t,0);return r.consumed!==t.length&&s.throwArgumentError("invalid rlp data","data",e),r.result}},43205:function(e,t,r){"use strict";r.d(t,{Y0:function(){return h},XL:function(){return p},ZN:function(){return f}});var n,i,s,a,o=r(99186);let u=new(r(67740)).Yd("strings/5.7.0");function c(e,t,r,n,i){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return e===a.OVERRUN?r.length-t-1:0}(n=s||(s={})).current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD",(i=a||(a={})).UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation";let l=Object.freeze({error:function(e,t,r,n,i){return u.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:c,replace:function(e,t,r,n,i){return e===a.OVERLONG?(n.push(i),0):(n.push(65533),c(e,t,r,n,i))}});function d(e,t){null==t&&(t=l.error),e=(0,o.lE)(e);let r=[],n=0;for(;n<e.length;){let i=e[n++];if(i>>7==0){r.push(i);continue}let s=null,o=null;if((224&i)==192)s=1,o=127;else if((240&i)==224)s=2,o=2047;else if((248&i)==240)s=3,o=65535;else{(192&i)==128?n+=t(a.UNEXPECTED_CONTINUE,n-1,e,r):n+=t(a.BAD_PREFIX,n-1,e,r);continue}if(n-1+s>=e.length){n+=t(a.OVERRUN,n-1,e,r);continue}let u=i&(1<<8-s-1)-1;for(let i=0;i<s;i++){let i=e[n];if((192&i)!=128){n+=t(a.MISSING_CONTINUE,n,e,r),u=null;break}u=u<<6|63&i,n++}if(null!==u){if(u>1114111){n+=t(a.OUT_OF_RANGE,n-1-s,e,r,u);continue}if(u>=55296&&u<=57343){n+=t(a.UTF16_SURROGATE,n-1-s,e,r,u);continue}if(u<=o){n+=t(a.OVERLONG,n-1-s,e,r,u);continue}r.push(u)}}return r}function h(e,t=s.current){t!=s.current&&(u.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if((64512&n)==55296){t++;let i=e.charCodeAt(t);if(t>=e.length||(64512&i)!=56320)throw Error("invalid utf-8 string");let s=65536+((1023&n)<<10)+(1023&i);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,o.lE)(r)}function f(e,t){return d(e,t).map(e=>e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10&1023)+55296,(1023&e)+56320)).join("")}function p(e,t=s.current){return d(h(e,t))}},19311:function(e,t,r){"use strict";r.d(t,{z7:function(){return ea},Qc:function(){return eh},qC:function(){return el}});var n,i,s=r(75006),a=r(34042),o=r(99186),u=r(93265),c=r(65462),l=r(21277),d=r(62734),h=r(69197),f=r.n(h),p=r(15334),m=r.n(p);function g(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(e,null==t?r.path:t)}},r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var y=b;function b(e,t){if(!e)throw Error(t||"Assertion failed")}b.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)};var v=g(function(e,t){function r(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),s=i>>8,a=255&i;s?r.push(s,a):r.push(a)}return r},t.zero2=r,t.toHex=n,t.encode=function(e,t){return"hex"===t?n(e):e}}),w=g(function(e,t){t.assert=y,t.toArray=v.toArray,t.zero2=v.zero2,t.toHex=v.toHex,t.encode=v.encode,t.getNAF=function(e,t,r){var n=Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,s=e.clone(),a=0;a<n.length;a++){var o,u=s.andln(i-1);s.isOdd()?(o=u>(i>>1)-1?(i>>1)-u:u,s.isubn(o)):o=0,n[a]=o,s.iushrn(1)}return n},t.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var s,a,o,u=e.andln(3)+n&3,c=t.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),a=(1&u)==0?0:(3==(s=e.andln(7)+n&7)||5===s)&&2===c?-u:u,r[0].push(a),o=(1&c)==0?0:(3==(s=t.andln(7)+i&7)||5===s)&&2===u?-c:c,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},t.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new(f())(e,"hex","le")}}),_=w.getNAF,E=w.getJSF,k=w.assert;function x(e,t){this.type=e,this.p=new(f())(t.p,16),this.red=t.prime?f().red(t.prime):f().mont(this.p),this.zero=new(f())(0).toRed(this.red),this.one=new(f())(1).toRed(this.red),this.two=new(f())(2).toRed(this.red),this.n=t.n&&new(f())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function S(e,t){this.curve=e,this.type=t,this.precomputed=null}x.prototype.point=function(){throw Error("Not implemented")},x.prototype.validate=function(){throw Error("Not implemented")},x.prototype._fixedNafMul=function(e,t){k(e.precomputed);var r,n,i=e._getDoubles(),s=_(t,1,this._bitLength),a=(1<<i.step+1)-(i.step%2==0?2:1);a/=3;var o=[];for(r=0;r<s.length;r+=i.step){n=0;for(var u=r+i.step-1;u>=r;u--)n=(n<<1)+s[u];o.push(n)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=a;d>0;d--){for(r=0;r<o.length;r++)(n=o[r])===d?l=l.mixedAdd(i.points[r]):n===-d&&(l=l.mixedAdd(i.points[r].neg()));c=c.add(l)}return c.toP()},x.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=_(t,r,this._bitLength),a=this.jpoint(null,null,null),o=s.length-1;o>=0;o--){for(var u=0;o>=0&&0===s[o];o--)u++;if(o>=0&&u++,a=a.dblp(u),o<0)break;var c=s[o];k(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},x.prototype._wnafMulAdd=function(e,t,r,n,i){var s,a,o,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,d=0;for(s=0;s<n;s++){var h=(o=t[s])._getNAFPoints(e);u[s]=h.wnd,c[s]=h.points}for(s=n-1;s>=1;s-=2){var f=s-1,p=s;if(1!==u[f]||1!==u[p]){l[f]=_(r[f],u[f],this._bitLength),l[p]=_(r[p],u[p],this._bitLength),d=Math.max(l[f].length,d),d=Math.max(l[p].length,d);continue}var m=[t[f],null,null,t[p]];0===t[f].y.cmp(t[p].y)?(m[1]=t[f].add(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg())):0===t[f].y.cmp(t[p].y.redNeg())?(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].add(t[p].neg())):(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=E(r[f],r[p]);for(a=0,d=Math.max(y[0].length,d),l[f]=Array(d),l[p]=Array(d);a<d;a++){var b=0|y[0][a],v=0|y[1][a];l[f][a]=g[(b+1)*3+(v+1)],l[p][a]=0,c[f]=m}}var w=this.jpoint(null,null,null),k=this._wnafT4;for(s=d;s>=0;s--){for(var x=0;s>=0;){var S=!0;for(a=0;a<n;a++)k[a]=0|l[a][s],0!==k[a]&&(S=!1);if(!S)break;x++,s--}if(s>=0&&x++,w=w.dblp(x),s<0)break;for(a=0;a<n;a++){var A=k[a];0!==A&&(A>0?o=c[a][A-1>>1]:A<0&&(o=c[a][-A-1>>1].neg()),w="affine"===o.type?w.mixedAdd(o):w.add(o))}}for(s=0;s<n;s++)c[s]=null;return i?w:w.toP()},x.BasePoint=S,S.prototype.eq=function(){throw Error("Not implemented")},S.prototype.validate=function(){return this.curve.validate(this)},x.prototype.decodePoint=function(e,t){e=w.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?k(e[e.length-1]%2==0):7===e[0]&&k(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw Error("Unknown point format")},S.prototype.encodeCompressed=function(e){return this.encode(e,!0)},S.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},S.prototype.encode=function(e,t){return w.encode(this._encode(t),e)},S.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},S.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},S.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)n=n.dbl();r.push(n)}return{step:e,points:r}},S.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},S.prototype._getBeta=function(){return null},S.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var A=g(function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}),C=w.assert;function I(e){x.call(this,"short",e),this.a=new(f())(e.a,16).toRed(this.red),this.b=new(f())(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function R(e,t,r,n){x.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new(f())(t,16),this.y=new(f())(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function P(e,t,r,n){x.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(f())(0)):(this.x=new(f())(t,16),this.y=new(f())(r,16),this.z=new(f())(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}A(I,x),I.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(e.beta)t=new(f())(e.beta,16).toRed(this.red);else{var t,r,n,i=this._getEndoRoots(this.p);t=(t=0>i[0].cmp(i[1])?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new(f())(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?r=s[0]:(r=s[1],C(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map(function(e){return{a:new(f())(e.a,16),b:new(f())(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},I.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:f().mont(e),r=new(f())(2).toRed(t).redInvm(),n=r.redNeg(),i=new(f())(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},I.prototype._getEndoBasis=function(e){for(var t,r,n,i,s,a,o,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new(f())(1),m=new(f())(0),g=new(f())(0),y=new(f())(1),b=0;0!==d.cmpn(0);){var v=h.div(d);u=h.sub(v.mul(d)),c=g.sub(v.mul(p));var w=y.sub(v.mul(m));if(!n&&0>u.cmp(l))t=o.neg(),r=p,n=u.neg(),i=c;else if(n&&2==++b)break;o=u,h=d,d=u,g=p,p=c,y=m,m=w}s=u.neg(),a=c;var _=n.sqr().add(i.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:i},{a:s,b:a}]},I.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),o=s.mul(n.a),u=i.mul(r.b),c=s.mul(n.b);return{k1:e.sub(a).sub(o),k2:u.add(c).neg()}},I.prototype.pointFromX=function(e,t){(e=new(f())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},I.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},I.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var a=this._endoSplit(t[s]),o=e[s],u=o._getBeta();a.k1.negative&&(a.k1.ineg(),o=o.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*s]=o,n[2*s+1]=u,i[2*s]=a.k1,i[2*s+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*s,r),l=0;l<2*s;l++)n[l]=null,i[l]=null;return c},A(R,x.BasePoint),I.prototype.point=function(e,t,r){return new R(this,e,t,r)},I.prototype.pointFromJSON=function(e,t){return R.fromJSON(this,e,t)},R.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},R.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},R.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var s=t[2];return n.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[n].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[n].concat(s.naf.points.map(i))}},n},R.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},R.prototype.isInfinity=function(){return this.inf},R.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e)||0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},R.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},R.prototype.getX=function(){return this.x.fromRed()},R.prototype.getY=function(){return this.y.fromRed()},R.prototype.mul=function(e){return(e=new(f())(e,16),this.isInfinity())?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},R.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},R.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},R.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},R.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},R.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},A(P,x.BasePoint),I.prototype.jpoint=function(e,t,r){return new P(this,e,t,r)},P.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},P.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},P.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),o=n.redSub(i),u=s.redSub(a);if(0===o.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),l=c.redMul(o),d=n.redMul(c),h=u.redSqr().redIAdd(l).redISub(d).redISub(d),f=u.redMul(d.redISub(h)).redISub(s.redMul(l)),p=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(h,f,p)},P.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),a=r.redSub(n),o=i.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),d=o.redSqr().redIAdd(c).redISub(l).redISub(l),h=o.redMul(l.redISub(d)).redISub(i.redMul(c)),f=this.z.redMul(a);return this.curve.jpoint(d,h,f)},P.prototype.dblp=function(e){if(0===e||this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t,r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,s=this.x,a=this.y,o=this.z,u=o.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var l=s.redSqr(),d=c.redSqr(),h=d.redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=s.redMul(d),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=f.redMul(g);y=y.redIAdd(y).redISub(h);var b=c.redMul(o);t+1<e&&(u=u.redMul(h)),s=m,o=b,c=y}return this.curve.jpoint(s,c.redMul(i),o)},P.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},P.prototype._zeroDbl=function(){if(this.zOne){var e,t,r,n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n),u=o.redSqr().redISub(a).redISub(a),c=s.redIAdd(s);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=o.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),h=d.redSqr(),f=this.x.redAdd(d).redSqr().redISub(l).redISub(h);f=f.redIAdd(f);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),g=h.redIAdd(h);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},P.prototype._threeDbl=function(){if(this.zOne){var e,t,r,n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=o.redSqr().redISub(a).redISub(a);e=u;var c=s.redIAdd(s);c=(c=c.redIAdd(c)).redIAdd(c),t=o.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),h=this.x.redMul(d),f=this.x.redSub(l).redMul(this.x.redAdd(l));f=f.redAdd(f).redIAdd(f);var p=h.redIAdd(h),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},P.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),s=t.redSqr(),a=r.redSqr(),o=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),l=o.redSqr().redISub(c.redAdd(c)),d=c.redISub(l),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=o.redMul(d).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,f,p)},P.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),o=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(s)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(s).redISub(o).redISub(u),l=t.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.x.redMul(o).redISub(l);d=(d=d.redIAdd(d)).redIAdd(d);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(o)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=this.z.redAdd(a).redSqr().redISub(r).redISub(o);return this.curve.jpoint(d,h,f)},P.prototype.mul=function(e,t){return e=new(f())(e,t),this.curve._wnafMul(this,e)},P.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},P.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},P.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},P.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var N=g(function(e,t){t.base=x,t.short=I,t.mont=null,t.edwards=null}),M=g(function(e,t){var r,n=w.assert;function i(e){"short"===e.type?this.curve=new N.short(e):"edwards"===e.type?this.curve=new N.edwards(e):this.curve=new N.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,r){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var n=new i(r);return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}),n}})}t.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:m().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:m().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:m().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:m().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:m().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:m().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:m().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:m().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})});function T(e){if(!(this instanceof T))return new T(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=v.toArray(e.entropy,e.entropyEnc||"hex"),r=v.toArray(e.nonce,e.nonceEnc||"hex"),n=v.toArray(e.pers,e.persEnc||"hex");y(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}T.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},T.prototype._hmac=function(){return new(m()).hmac(this.hash,this.K)},T.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},T.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=v.toArray(e,t),r=v.toArray(r,n),y(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},T.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=v.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var s=i.slice(0,e);return this._update(r),this._reseed++,v.encode(s,t)};var O=w.assert;function D(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}D.fromPublic=function(e,t,r){return t instanceof D?t:new D(e,{pub:t,pubEnc:r})},D.fromPrivate=function(e,t,r){return t instanceof D?t:new D(e,{priv:t,privEnc:r})},D.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},D.prototype.getPublic=function(e,t){return("string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t)?this.pub.encode(t,e):this.pub},D.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},D.prototype._importPrivate=function(e,t){this.priv=new(f())(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},D.prototype._importPublic=function(e,t){if(e.x||e.y){"mont"===this.ec.curve.type?O(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&O(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},D.prototype.derive=function(e){return e.validate()||O(e.validate(),"public point not validated"),e.mul(this.priv).getX()},D.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},D.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},D.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var L=w.assert;function B(e,t){if(e instanceof B)return e;this._importDER(e,t)||(L(e.r&&e.s,"Signature without r or s"),this.r=new(f())(e.r,16),this.s=new(f())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function q(){this.place=0}function z(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,s=0,a=t.place;s<n;s++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function U(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function j(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}B.prototype._importDER=function(e,t){e=w.toArray(e,t);var r=new q;if(48!==e[r.place++])return!1;var n=z(e,r);if(!1===n||n+r.place!==e.length||2!==e[r.place++])return!1;var i=z(e,r);if(!1===i)return!1;var s=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=z(e,r);if(!1===a||e.length!==a+r.place)return!1;var o=e.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}return this.r=new(f())(s),this.s=new(f())(o),this.recoveryParam=null,!0},B.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=U(t),r=U(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];j(n,t.length),(n=n.concat(t)).push(2),j(n,r.length);var i=n.concat(r),s=[48];return j(s,i.length),s=s.concat(i),w.encode(s,e)};var F=function(){throw Error("unsupported")},H=w.assert;function $(e){if(!(this instanceof $))return new $(e);"string"==typeof e&&(H(Object.prototype.hasOwnProperty.call(M,e),"Unknown curve "+e),e=M[e]),e instanceof M.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}$.prototype.keyPair=function(e){return new D(this,e)},$.prototype.keyFromPrivate=function(e,t){return D.fromPrivate(this,e,t)},$.prototype.keyFromPublic=function(e,t){return D.fromPublic(this,e,t)},$.prototype.genKeyPair=function(e){e||(e={});for(var t=new T({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||F(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(f())(2));;){var i=new(f())(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},$.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return(r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0)?e.sub(this.n):e},$.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(f())(e,16));for(var i=this.n.byteLength(),s=t.getPrivate().toArray("be",i),a=e.toArray("be",i),o=new T({hash:this.hash,entropy:s,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(f())(1)),c=0;;c++){var l=n.k?n.k(c):new(f())(o.generate(this.n.byteLength()));if(!(0>=(l=this._truncateToN(l,!0)).cmpn(1)||l.cmp(u)>=0)){var d=this.g.mul(l);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var m=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new B({r:p,s:m,recoveryParam:g})}}}}}},$.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(f())(e,16)),r=this.keyFromPublic(r,n);var i,s=(t=new B(t,"hex")).r,a=t.s;if(0>s.cmpn(1)||s.cmp(this.n)>=0||0>a.cmpn(1)||a.cmp(this.n)>=0)return!1;var o=a.invm(this.n),u=o.mul(e).umod(this.n),c=o.mul(s).umod(this.n);return this.curve._maxwellTrick?!(i=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&i.eqXToP(s):!(i=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===i.getX().umod(this.n).cmp(s)},$.prototype.recoverPubKey=function(e,t,r,n){H((3&r)===r,"The recovery param is more than two bits"),t=new B(t,n);var i=this.n,s=new(f())(e),a=t.r,o=t.s,u=1&r,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw Error("Unable to find sencond key candinate");a=c?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var l=t.r.invm(i),d=i.sub(s).mul(l).umod(i),h=o.mul(l).umod(i);return this.g.mulAdd(d,a,h)},$.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new B(t,n)).recoveryParam)return t.recoveryParam;for(var i,s=0;s<4;s++){try{i=this.recoverPubKey(e,t,s)}catch(e){continue}if(i.eq(r))return s}throw Error("Unable to find valid recovery factor")};var W=g(function(e,t){t.version="6.5.4",t.utils=w,t.rand=function(){throw Error("unsupported")},t.curve=N,t.curves=M,t.ec=$,t.eddsa=null}).ec,G=r(67740);let V=new G.Yd("signing-key/5.7.0"),K=null;function Z(){return K||(K=new W("secp256k1")),K}class Y{constructor(e){(0,l.zG)(this,"curve","secp256k1"),(0,l.zG)(this,"privateKey",(0,o.Dv)(e)),32!==(0,o.E1)(this.privateKey)&&V.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Z().keyFromPrivate((0,o.lE)(this.privateKey));(0,l.zG)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,l.zG)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,l.zG)(this,"_isSigningKey",!0)}_addPoint(e){let t=Z().keyFromPublic((0,o.lE)(this.publicKey)),r=Z().keyFromPublic((0,o.lE)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){let t=Z().keyFromPrivate((0,o.lE)(this.privateKey)),r=(0,o.lE)(e);32!==r.length&&V.throwArgumentError("bad digest length","digest",e);let n=t.sign(r,{canonical:!0});return(0,o.N)({recoveryParam:n.recoveryParam,r:(0,o.$m)("0x"+n.r.toString(16),32),s:(0,o.$m)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){let t=Z().keyFromPrivate((0,o.lE)(this.privateKey)),r=Z().keyFromPublic((0,o.lE)(J(e)));return(0,o.$m)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function J(e,t){let r=(0,o.lE)(e);if(32===r.length){let e=new Y(r);return t?"0x"+Z().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,o.Dv)(r):"0x"+Z().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Z().keyFromPublic(r).getPublic(!0,"hex"):(0,o.Dv)(r):V.throwArgumentError("invalid public or private key","key","[REDACTED]")}let Q=new G.Yd("transactions/5.7.0");function X(e){return"0x"===e?null:(0,s.Kn)(e)}function ee(e){return"0x"===e?u._Y:a.O$.from(e)}(n=i||(i={}))[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559";let et=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],er={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function en(e,t){return function(e){let t=J(e);return(0,s.Kn)((0,o.p3)((0,c.w)((0,o.p3)(t,1)),12))}(function(e,t){let r=(0,o.N)(t),n={r:(0,o.lE)(r.r),s:(0,o.lE)(r.s)};return"0x"+Z().recoverPubKey((0,o.lE)(e),n,r.recoveryParam).encode("hex",!1)}((0,o.lE)(e),t))}function ei(e,t){let r=(0,o.G1)(a.O$.from(e).toHexString());return r.length>32&&Q.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function es(e,t){return{address:(0,s.Kn)(e),storageKeys:(t||[]).map((t,r)=>(32!==(0,o.E1)(t)&&Q.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase()))}}function ea(e){if(Array.isArray(e))return e.map((e,t)=>Array.isArray(e)?(e.length>2&&Q.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),es(e[0],e[1])):es(e.address,e.storageKeys));let t=Object.keys(e).map(t=>{let r=e[t].reduce((e,t)=>(e[t]=!0,e),{});return es(t,Object.keys(r).sort())});return t.sort((e,t)=>e.address.localeCompare(t.address)),t}function eo(e){return ea(e).map(e=>[e.address,e.storageKeys])}function eu(e,t){if(null!=e.gasPrice){let t=a.O$.from(e.gasPrice),r=a.O$.from(e.maxFeePerGas||0);t.eq(r)||Q.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}let r=[ei(e.chainId||0,"chainId"),ei(e.nonce||0,"nonce"),ei(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ei(e.maxFeePerGas||0,"maxFeePerGas"),ei(e.gasLimit||0,"gasLimit"),null!=e.to?(0,s.Kn)(e.to):"0x",ei(e.value||0,"value"),e.data||"0x",eo(e.accessList||[])];if(t){let e=(0,o.N)(t);r.push(ei(e.recoveryParam,"recoveryParam")),r.push((0,o.G1)(e.r)),r.push((0,o.G1)(e.s))}return(0,o.xs)(["0x02",d.c(r)])}function ec(e,t){let r=[ei(e.chainId||0,"chainId"),ei(e.nonce||0,"nonce"),ei(e.gasPrice||0,"gasPrice"),ei(e.gasLimit||0,"gasLimit"),null!=e.to?(0,s.Kn)(e.to):"0x",ei(e.value||0,"value"),e.data||"0x",eo(e.accessList||[])];if(t){let e=(0,o.N)(t);r.push(ei(e.recoveryParam,"recoveryParam")),r.push((0,o.G1)(e.r)),r.push((0,o.G1)(e.s))}return(0,o.xs)(["0x01",d.c(r)])}function el(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&Q.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,l.uj)(e,er);let r=[];et.forEach(function(t){let n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,o.lE)((0,o.Dv)(n,i)),t.length&&n.length!==t.length&&n.length>0&&Q.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.G1)(n)).length>t.maxLength&&Q.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,o.Dv)(n))});let n=0;if(null!=e.chainId?"number"!=typeof(n=e.chainId)&&Q.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,o.Zq)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.Dv)(n)),r.push("0x"),r.push("0x")),!t)return d.c(r);let i=(0,o.N)(t),s=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),s+=2*n+8,i.v>28&&i.v!==s&&Q.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==s&&Q.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.Dv)(s)),r.push((0,o.G1)((0,o.lE)(i.r))),r.push((0,o.G1)((0,o.lE)(i.s))),d.c(r)}(e,t);switch(e.type){case 1:return ec(e,t);case 2:return eu(e,t)}return Q.throwError(`unsupported transaction type: ${e.type}`,G.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function ed(e,t,r){try{let r=ee(t[0]).toNumber();if(0!==r&&1!==r)throw Error("bad recid");e.v=r}catch(e){Q.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.$m)(t[1],32),e.s=(0,o.$m)(t[2],32);try{let t=(0,c.w)(r(e));e.from=en(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function eh(e){let t=(0,o.lE)(e);if(t[0]>127)return function(e){let t=d.J(e);9!==t.length&&6!==t.length&&Q.throwArgumentError("invalid raw transaction","rawTransaction",e);let r={nonce:ee(t[0]).toNumber(),gasPrice:ee(t[1]),gasLimit:ee(t[2]),to:X(t[3]),value:ee(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=a.O$.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,o.$m)(t[7],32),r.s=(0,o.$m)(t[8],32),a.O$.from(r.r).isZero()&&a.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push((0,o.Dv)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);let s=(0,c.w)(d.c(i));try{r.from=en(s,{r:(0,o.Dv)(r.r),s:(0,o.Dv)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,c.w)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){let t=d.J(e.slice(1));8!==t.length&&11!==t.length&&Q.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.Dv)(e));let r={type:1,chainId:ee(t[0]).toNumber(),nonce:ee(t[1]).toNumber(),gasPrice:ee(t[2]),gasLimit:ee(t[3]),to:X(t[4]),value:ee(t[5]),data:t[6],accessList:ea(t[7])};return 8===t.length||(r.hash=(0,c.w)(e),ed(r,t.slice(8),ec)),r}(t);case 2:return function(e){let t=d.J(e.slice(1));9!==t.length&&12!==t.length&&Q.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.Dv)(e));let r=ee(t[2]),n=ee(t[3]),i={type:2,chainId:ee(t[0]).toNumber(),nonce:ee(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:ee(t[4]),to:X(t[5]),value:ee(t[6]),data:t[7],accessList:ea(t[8])};return 9===t.length||(i.hash=(0,c.w)(e),ed(i,t.slice(9),eu)),i}(t)}return Q.throwError(`unsupported transaction type: ${t[0]}`,G.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},71642:function(e,t,r){"use strict";r.d(t,{dF:function(){return x},bM:function(){return E},vz:function(){return k}});var n=r(99186),i=r(67740),s=r(29841),a=r(34042);let o=new i.Yd(s.i),u={},c=a.O$.from(0),l=a.O$.from(-1);function d(e,t,r,n){let s={fault:t,operation:r};return void 0!==n&&(s.value=n),o.throwError(e,i.Yd.errors.NUMERIC_FAULT,s)}let h="0";for(;h.length<256;)h+=h;function f(e){if("number"!=typeof e)try{e=a.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+h.substring(0,e):o.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);let r=f(t),n=(e=a.O$.from(e)).lt(c);n&&(e=e.mul(l));let i=e.mod(r).toString();for(;i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];let s=e.div(r).toString();return e=1===r.length?s:s+"."+i,n&&(e="-"+e),e}function m(e,t){null==t&&(t=0);let r=f(t);"string"==typeof e&&e.match(/^-?[0-9.]+$/)||o.throwArgumentError("invalid decimal value","value",e);let n="-"===e.substring(0,1);n&&(e=e.substring(1)),"."===e&&o.throwArgumentError("missing value","value",e);let i=e.split(".");i.length>2&&o.throwArgumentError("too many decimal points","value",e);let s=i[0],u=i[1];for(s||(s="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>r.length-1&&d("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.length<r.length-1;)u+="0";let c=a.O$.from(s),h=a.O$.from(u),p=c.mul(r).add(h);return n&&(p=p.mul(l)),p}class g{constructor(e,t,r,n){e!==u&&o.throwError("cannot use FixedFormat constructor; use FixedFormat.from",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=r,this.decimals=n,this.name=(t?"":"u")+"fixed"+String(r)+"x"+String(n),this._multiplier=f(n),Object.freeze(this)}static from(e){if(e instanceof g)return e;"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e){if("fixed"===e);else if("ufixed"===e)t=!1;else{let i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||o.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}}else if(e){let i=(t,r,n)=>null==e[t]?n:(typeof e[t]!==r&&o.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&o.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&o.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new g(u,t,r,n)}}class y{constructor(e,t,r,n){e!==u&&o.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&o.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format),r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(b.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format),r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(b.toFormat(t.format))),t}round(e){null==e&&(e=0);let t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&o.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let r=y.from("1"+h.substring(0,e),this.format),n=v.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&o.throwArgumentError("invalid byte width","width",e);let t=a.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,n.$m)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return y.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,a.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),y.fromString(p(e,t),g.from(r))}static fromString(e,t){null==t&&(t="fixed");let r=g.from(t),i=m(e,r.decimals);!r.signed&&i.lt(c)&&d("unsigned value cannot be negative","overflow","value",e);let s=null;return r.signed?s=i.toTwos(r.width).toHexString():(s=i.toHexString(),s=(0,n.$m)(s,r.width/8)),new y(u,s,p(i,r.decimals),r)}static fromBytes(e,t){null==t&&(t="fixed");let r=g.from(t);if((0,n.lE)(e).length>r.width/8)throw Error("overflow");let i=a.O$.from(e);return r.signed&&(i=i.fromTwos(r.width)),new y(u,i.toTwos((r.signed?0:1)+r.width).toHexString(),p(i,r.decimals),r)}static from(e,t){if("string"==typeof e)return y.fromString(e,t);if((0,n._t)(e))return y.fromBytes(e,t);try{return y.fromValue(e,0,t)}catch(e){if(e.code!==i.Yd.errors.INVALID_ARGUMENT)throw e}return o.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}let b=y.from(1),v=y.from("0.5"),w=new i.Yd("units/5.7.0"),_=["wei","kwei","mwei","gwei","szabo","finney","ether"];function E(e,t){if("string"==typeof t){let e=_.indexOf(t);-1!==e&&(t=3*e)}return p(e,null!=t?t:18)}function k(e,t){if("string"!=typeof e&&w.throwArgumentError("value must be a string","value",e),"string"==typeof t){let e=_.indexOf(t);-1!==e&&(t=3*e)}return m(e,null!=t?t:18)}function x(e){return E(e,18)}},39412:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71350);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function s(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function a(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function o(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function u(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function c(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function l(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),l(e/4294967296>>>0,t,r),l(e>>>0,t,r+4),t}function f(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),d(e>>>0,t,r),d(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=s,t.writeInt16LE=s,t.readInt32BE=a,t.readUint32BE=o,t.readInt32LE=u,t.readUint32LE=c,t.writeUint32BE=l,t.writeInt32BE=l,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=a(e,t),n=a(e,t+4);return 4294967296*r+n-(n>>31)*4294967296},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*o(e,t)+o(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=u(e,t);return 4294967296*u(e,t+4)+r-(r>>31)*4294967296},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r},t.writeUint64BE=h,t.writeInt64BE=h,t.writeUint64LE=f,t.writeInt64LE=f,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=e/8+r-1;s>=r;s--)n+=t[s]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=r;s<r+e/8;s++)n+=t[s]*i,i*=256;return n},t.writeUintBE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw Error("writeUintBE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw Error("writeUintBE value must be an integer");for(var s=1,a=e/8+i-1;a>=i;a--)r[a]=t/s&255,s*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw Error("writeUintLE value must be an integer");for(var s=1,a=i;a<i+e/8;a++)r[a]=t/s&255,s*=256;return r},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e),t},t.writeFloat32LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),t},t.writeFloat64BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e),t},t.writeFloat64LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),t}},98336:function(e,t,r){"use strict";var n=r(12231),i=r(64605),s=r(37490),a=r(39412),o=r(24228);t.Cv=32,t.WH=12,t.pg=16;var u=new Uint8Array(16),c=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw Error("ChaCha20Poly1305: incorrect nonce length");var a,o=new Uint8Array(16);o.set(e,o.length-e.length);var u=new Uint8Array(32);n.stream(this._key,o,u,4);var c=t.length+this.tagLength;if(i){if(i.length!==c)throw Error("ChaCha20Poly1305: incorrect destination length");a=i}else a=new Uint8Array(c);return n.streamXOR(this._key,o,t,a,4),this._authenticate(a.subarray(a.length-this.tagLength,a.length),u,a.subarray(0,a.length-this.tagLength),r),s.wipe(o),a},e.prototype.open=function(e,t,r,i){if(e.length>16)throw Error("ChaCha20Poly1305: incorrect nonce length");if(t.length<this.tagLength)return null;var a,u=new Uint8Array(16);u.set(e,u.length-e.length);var c=new Uint8Array(32);n.stream(this._key,u,c,4);var l=new Uint8Array(this.tagLength);if(this._authenticate(l,c,t.subarray(0,t.length-this.tagLength),r),!o.equal(l,t.subarray(t.length-this.tagLength,t.length)))return null;var d=t.length-this.tagLength;if(i){if(i.length!==d)throw Error("ChaCha20Poly1305: incorrect destination length");a=i}else a=new Uint8Array(d);return n.streamXOR(this._key,u,t.subarray(0,t.length-this.tagLength),a,4),s.wipe(u),a},e.prototype.clean=function(){return s.wipe(this._key),this},e.prototype._authenticate=function(e,t,r,n){var o=new i.Poly1305(t);n&&(o.update(n),n.length%16>0&&o.update(u.subarray(n.length%16))),o.update(r),r.length%16>0&&o.update(u.subarray(r.length%16));var c=new Uint8Array(8);n&&a.writeUint64LE(n.length,c),o.update(c),a.writeUint64LE(r.length,c),o.update(c);for(var l=o.digest(),d=0;d<l.length;d++)e[d]=l[d];o.clean(),s.wipe(l),s.wipe(c)},e}();t.OK=c},12231:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(39412),i=r(37490);function s(e,t,r,s,a){if(void 0===a&&(a=0),32!==e.length)throw Error("ChaCha: key size must be 32 bytes");if(s.length<r.length)throw Error("ChaCha: destination is shorter than source");if(0===a){if(8!==t.length&&12!==t.length)throw Error("ChaCha nonce must be 8 or 12 bytes");u=(o=new Uint8Array(16)).length-t.length,o.set(t,u)}else{if(16!==t.length)throw Error("ChaCha nonce with counter must be 16 bytes");o=t,u=a}for(var o,u,c=new Uint8Array(64),l=0;l<r.length;l+=64){!function(e,t,r){for(var i=r[3]<<24|r[2]<<16|r[1]<<8|r[0],s=r[7]<<24|r[6]<<16|r[5]<<8|r[4],a=r[11]<<24|r[10]<<16|r[9]<<8|r[8],o=r[15]<<24|r[14]<<16|r[13]<<8|r[12],u=r[19]<<24|r[18]<<16|r[17]<<8|r[16],c=r[23]<<24|r[22]<<16|r[21]<<8|r[20],l=r[27]<<24|r[26]<<16|r[25]<<8|r[24],d=r[31]<<24|r[30]<<16|r[29]<<8|r[28],h=t[3]<<24|t[2]<<16|t[1]<<8|t[0],f=t[7]<<24|t[6]<<16|t[5]<<8|t[4],p=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],g=1634760805,y=857760878,b=2036477234,v=1797285236,w=i,_=s,E=a,k=o,x=u,S=c,A=l,C=d,I=h,R=f,P=p,N=m,M=0;M<20;M+=2)I^=g=g+w|0,w^=x=x+(I=I>>>16|I<<16)|0,w=w>>>20|w<<12,R^=y=y+_|0,_^=S=S+(R=R>>>16|R<<16)|0,_=_>>>20|_<<12,P^=b=b+E|0,E^=A=A+(P=P>>>16|P<<16)|0,E=E>>>20|E<<12,N^=v=v+k|0,k^=C=C+(N=N>>>16|N<<16)|0,k=k>>>20|k<<12,P^=b=b+E|0,E^=A=A+(P=P>>>24|P<<8)|0,E=E>>>25|E<<7,N^=v=v+k|0,k^=C=C+(N=N>>>24|N<<8)|0,k=k>>>25|k<<7,R^=y=y+_|0,_^=S=S+(R=R>>>24|R<<8)|0,_=_>>>25|_<<7,I^=g=g+w|0,w^=x=x+(I=I>>>24|I<<8)|0,w=w>>>25|w<<7,N^=g=g+_|0,_^=A=A+(N=N>>>16|N<<16)|0,_=_>>>20|_<<12,I^=y=y+E|0,E^=C=C+(I=I>>>16|I<<16)|0,E=E>>>20|E<<12,R^=b=b+k|0,k^=x=x+(R=R>>>16|R<<16)|0,k=k>>>20|k<<12,P^=v=v+w|0,w^=S=S+(P=P>>>16|P<<16)|0,w=w>>>20|w<<12,R^=b=b+k|0,k^=x=x+(R=R>>>24|R<<8)|0,k=k>>>25|k<<7,P^=v=v+w|0,w^=S=S+(P=P>>>24|P<<8)|0,w=w>>>25|w<<7,I^=y=y+E|0,E^=C=C+(I=I>>>24|I<<8)|0,E=E>>>25|E<<7,N^=g=g+_|0,_^=A=A+(N=N>>>24|N<<8)|0,_=_>>>25|_<<7;n.writeUint32LE(g+1634760805|0,e,0),n.writeUint32LE(y+857760878|0,e,4),n.writeUint32LE(b+2036477234|0,e,8),n.writeUint32LE(v+1797285236|0,e,12),n.writeUint32LE(w+i|0,e,16),n.writeUint32LE(_+s|0,e,20),n.writeUint32LE(E+a|0,e,24),n.writeUint32LE(k+o|0,e,28),n.writeUint32LE(x+u|0,e,32),n.writeUint32LE(S+c|0,e,36),n.writeUint32LE(A+l|0,e,40),n.writeUint32LE(C+d|0,e,44),n.writeUint32LE(I+h|0,e,48),n.writeUint32LE(R+f|0,e,52),n.writeUint32LE(P+p|0,e,56),n.writeUint32LE(N+m|0,e,60)}(c,o,e);for(var d=l;d<l+64&&d<r.length;d++)s[d]=r[d]^c[d-l];!function(e,t,r){for(var n=1;r--;)n=n+(255&e[t])|0,e[t]=255&n,n>>>=8,t++;if(n>0)throw Error("ChaCha: counter overflow")}(o,0,u)}return i.wipe(c),0===a&&i.wipe(o),s}t.streamXOR=s,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),s(e,t,r,r,n)}},24228:function(e,t){"use strict";function r(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 1&r-1>>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=r,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==r(e,t)}},33679:function(e,t,r){"use strict";t.Xx=t._w=t.aP=t.KS=t.jQ=void 0,r(51031);let n=r(3268);function i(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}r(37490),t.jQ=64,t.KS=64,t.aP=32,new Uint8Array(32)[0]=9;let s=i(),a=i([1]),o=(i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222])),u=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),c=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]);function l(e,t){for(let r=0;r<16;r++)e[r]=0|t[r]}function d(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function h(e,t,r){let n=~(r-1);for(let r=0;r<16;r++){let i=n&(e[r]^t[r]);e[r]^=i,t[r]^=i}}function f(e,t){let r=i(),n=i();for(let e=0;e<16;e++)n[e]=t[e];d(n),d(n),d(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let e=r[15]>>16&1;r[14]&=65535,h(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function m(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function g(e,t,r){let n,i,s=0,a=0,o=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,m=0,g=0,y=0,b=0,v=0,w=0,_=0,E=0,k=0,x=0,S=0,A=0,C=0,I=0,R=0,P=0,N=0,M=0,T=0,O=0,D=0,L=r[0],B=r[1],q=r[2],z=r[3],U=r[4],j=r[5],F=r[6],H=r[7],$=r[8],W=r[9],G=r[10],V=r[11],K=r[12],Z=r[13],Y=r[14],J=r[15];s+=(n=t[0])*L,a+=n*B,o+=n*q,u+=n*z,c+=n*U,l+=n*j,d+=n*F,h+=n*H,f+=n*$,p+=n*W,m+=n*G,g+=n*V,y+=n*K,b+=n*Z,v+=n*Y,w+=n*J,a+=(n=t[1])*L,o+=n*B,u+=n*q,c+=n*z,l+=n*U,d+=n*j,h+=n*F,f+=n*H,p+=n*$,m+=n*W,g+=n*G,y+=n*V,b+=n*K,v+=n*Z,w+=n*Y,_+=n*J,o+=(n=t[2])*L,u+=n*B,c+=n*q,l+=n*z,d+=n*U,h+=n*j,f+=n*F,p+=n*H,m+=n*$,g+=n*W,y+=n*G,b+=n*V,v+=n*K,w+=n*Z,_+=n*Y,E+=n*J,u+=(n=t[3])*L,c+=n*B,l+=n*q,d+=n*z,h+=n*U,f+=n*j,p+=n*F,m+=n*H,g+=n*$,y+=n*W,b+=n*G,v+=n*V,w+=n*K,_+=n*Z,E+=n*Y,k+=n*J,c+=(n=t[4])*L,l+=n*B,d+=n*q,h+=n*z,f+=n*U,p+=n*j,m+=n*F,g+=n*H,y+=n*$,b+=n*W,v+=n*G,w+=n*V,_+=n*K,E+=n*Z,k+=n*Y,x+=n*J,l+=(n=t[5])*L,d+=n*B,h+=n*q,f+=n*z,p+=n*U,m+=n*j,g+=n*F,y+=n*H,b+=n*$,v+=n*W,w+=n*G,_+=n*V,E+=n*K,k+=n*Z,x+=n*Y,S+=n*J,d+=(n=t[6])*L,h+=n*B,f+=n*q,p+=n*z,m+=n*U,g+=n*j,y+=n*F,b+=n*H,v+=n*$,w+=n*W,_+=n*G,E+=n*V,k+=n*K,x+=n*Z,S+=n*Y,A+=n*J,h+=(n=t[7])*L,f+=n*B,p+=n*q,m+=n*z,g+=n*U,y+=n*j,b+=n*F,v+=n*H,w+=n*$,_+=n*W,E+=n*G,k+=n*V,x+=n*K,S+=n*Z,A+=n*Y,C+=n*J,f+=(n=t[8])*L,p+=n*B,m+=n*q,g+=n*z,y+=n*U,b+=n*j,v+=n*F,w+=n*H,_+=n*$,E+=n*W,k+=n*G,x+=n*V,S+=n*K,A+=n*Z,C+=n*Y,I+=n*J,p+=(n=t[9])*L,m+=n*B,g+=n*q,y+=n*z,b+=n*U,v+=n*j,w+=n*F,_+=n*H,E+=n*$,k+=n*W,x+=n*G,S+=n*V,A+=n*K,C+=n*Z,I+=n*Y,R+=n*J,m+=(n=t[10])*L,g+=n*B,y+=n*q,b+=n*z,v+=n*U,w+=n*j,_+=n*F,E+=n*H,k+=n*$,x+=n*W,S+=n*G,A+=n*V,C+=n*K,I+=n*Z,R+=n*Y,P+=n*J,g+=(n=t[11])*L,y+=n*B,b+=n*q,v+=n*z,w+=n*U,_+=n*j,E+=n*F,k+=n*H,x+=n*$,S+=n*W,A+=n*G,C+=n*V,I+=n*K,R+=n*Z,P+=n*Y,N+=n*J,y+=(n=t[12])*L,b+=n*B,v+=n*q,w+=n*z,_+=n*U,E+=n*j,k+=n*F,x+=n*H,S+=n*$,A+=n*W,C+=n*G,I+=n*V,R+=n*K,P+=n*Z,N+=n*Y,M+=n*J,b+=(n=t[13])*L,v+=n*B,w+=n*q,_+=n*z,E+=n*U,k+=n*j,x+=n*F,S+=n*H,A+=n*$,C+=n*W,I+=n*G,R+=n*V,P+=n*K,N+=n*Z,M+=n*Y,T+=n*J,v+=(n=t[14])*L,w+=n*B,_+=n*q,E+=n*z,k+=n*U,x+=n*j,S+=n*F,A+=n*H,C+=n*$,I+=n*W,R+=n*G,P+=n*V,N+=n*K,M+=n*Z,T+=n*Y,O+=n*J,w+=(n=t[15])*L,_+=n*B,E+=n*q,k+=n*z,x+=n*U,S+=n*j,A+=n*F,C+=n*H,I+=n*$,R+=n*W,P+=n*G,N+=n*V,M+=n*K,T+=n*Z,O+=n*Y,D+=n*J,s+=38*_,a+=38*E,o+=38*k,u+=38*x,c+=38*S,l+=38*A,d+=38*C,h+=38*I,f+=38*R,p+=38*P,m+=38*N,g+=38*M,y+=38*T,b+=38*O,v+=38*D,i=Math.floor((n=s+(i=1)+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),i=Math.floor((n=s+(i=1)+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),e[0]=s,e[1]=a,e[2]=o,e[3]=u,e[4]=c,e[5]=l,e[6]=d,e[7]=h,e[8]=f,e[9]=p,e[10]=m,e[11]=g,e[12]=y,e[13]=b,e[14]=v,e[15]=w}function y(e,t){let r=i(),n=i(),s=i(),a=i(),u=i(),c=i(),l=i(),d=i(),h=i();m(r,e[1],e[0]),m(h,t[1],t[0]),g(r,r,h),p(n,e[0],e[1]),p(h,t[0],t[1]),g(n,n,h),g(s,e[3],t[3]),g(s,s,o),g(a,e[2],t[2]),p(a,a,a),m(u,n,r),m(c,a,s),p(l,a,s),p(d,n,r),g(e[0],u,c),g(e[1],d,l),g(e[2],l,c),g(e[3],u,d)}function b(e,t,r){for(let n=0;n<4;n++)h(e[n],t[n],r)}function v(e,t){let r=i(),n=i(),s=i();(function(e,t){let r;let n=i();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)g(n,n,n),2!==r&&4!==r&&g(n,n,t);for(r=0;r<16;r++)e[r]=n[r]})(s,t[2]),g(r,t[0],s),g(n,t[1],s),f(e,n),e[31]^=function(e){let t=new Uint8Array(32);return f(t,e),1&t[0]}(r)<<7}function w(e,t){let r=[i(),i(),i(),i()];l(r[0],u),l(r[1],c),l(r[2],a),g(r[3],u,c),function(e,t,r){l(e[0],s),l(e[1],a),l(e[2],a),l(e[3],s);for(let n=255;n>=0;--n){let i=r[n/8|0]>>(7&n)&1;b(e,t,i),y(t,e),y(e,e),b(e,t,i)}}(e,r,t)}t._w=function(e){if(e.length!==t.aP)throw Error(`ed25519: seed must be ${t.aP} bytes`);let r=(0,n.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;let s=new Uint8Array(32),a=[i(),i(),i(),i()];w(a,r),v(s,a);let o=new Uint8Array(64);return o.set(e),o.set(s,32),{publicKey:s,secretKey:o}};let _=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function E(e,t){let r,n,i,s;for(n=63;n>=32;--n){for(r=0,i=n-32,s=n-12;i<s;++i)t[i]+=r-16*t[n]*_[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(i=0,r=0;i<32;i++)t[i]+=r-(t[31]>>4)*_[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*_[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function k(e){let t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let t=0;t<64;t++)e[t]=0;E(e,t)}t.Xx=function(e,t){let r=new Float64Array(64),s=[i(),i(),i(),i()],a=(0,n.hash)(e.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;let o=new Uint8Array(64);o.set(a.subarray(32),32);let u=new n.SHA512;u.update(o.subarray(32)),u.update(t);let c=u.digest();u.clean(),k(c),w(s,c),v(o,s),u.reset(),u.update(o.subarray(0,32)),u.update(e.subarray(32)),u.update(t);let l=u.digest();k(l);for(let e=0;e<32;e++)r[e]=c[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=l[e]*a[t];return E(o.subarray(32),r),o}},64882:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},41159:function(e,t,r){"use strict";var n=r(64483),i=r(37490),s=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var s=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r<t.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[r]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),i.wipe(this._buffer),i.wipe(this._counter),this._bufpos=0},e}();t.t=s},64483:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(64882),i=r(24228),s=r(37490),a=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i<r.length;i++)r[i]^=54;this._inner.update(r);for(var i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),n.isSerializableHash(this._inner)&&n.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),s.wipe(r)}return e.prototype.reset=function(){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){n.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),n.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?this._outer.finish(e):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0),this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!n.isSerializableHash(this._inner))throw Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!n.isSerializableHash(this._inner))throw Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();t.HMAC=a,t.hmac=function(e,t,r){var n=new a(e,t);n.update(r);var i=n.digest();return n.clean(),i},t.equal=i.equal},71350:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},64605:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(24228),i=r(37490);t.DIGEST_LENGTH=16;var s=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=(r>>>13|n<<3)&8191;var i=e[4]|e[5]<<8;this._r[2]=(n>>>10|i<<6)&7939;var s=e[6]|e[7]<<8;this._r[3]=(i>>>7|s<<9)&8191;var a=e[8]|e[9]<<8;this._r[4]=(s>>>4|a<<12)&255,this._r[5]=a>>>1&8190;var o=e[10]|e[11]<<8;this._r[6]=(a>>>14|o<<2)&8191;var u=e[12]|e[13]<<8;this._r[7]=(o>>>11|u<<5)&8065;var c=e[14]|e[15]<<8;this._r[8]=(u>>>8|c<<8)&8191,this._r[9]=c>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],s=this._h[1],a=this._h[2],o=this._h[3],u=this._h[4],c=this._h[5],l=this._h[6],d=this._h[7],h=this._h[8],f=this._h[9],p=this._r[0],m=this._r[1],g=this._r[2],y=this._r[3],b=this._r[4],v=this._r[5],w=this._r[6],_=this._r[7],E=this._r[8],k=this._r[9];r>=16;){var x,S=e[t+0]|e[t+1]<<8;i+=8191&S;var A=e[t+2]|e[t+3]<<8;s+=(S>>>13|A<<3)&8191;var C=e[t+4]|e[t+5]<<8;a+=(A>>>10|C<<6)&8191;var I=e[t+6]|e[t+7]<<8;o+=(C>>>7|I<<9)&8191;var R=e[t+8]|e[t+9]<<8;u+=(I>>>4|R<<12)&8191,c+=R>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=(R>>>14|P<<2)&8191;var N=e[t+12]|e[t+13]<<8;d+=(P>>>11|N<<5)&8191;var M=e[t+14]|e[t+15]<<8;h+=(N>>>8|M<<8)&8191,f+=M>>>5|n;var T=0;T=(x=0+i*p+5*k*s+5*E*a+5*_*o+5*w*u)>>>13,x&=8191,x+=5*v*c+5*b*l+5*y*d+5*g*h+5*m*f,T+=x>>>13,x&=8191;var O=T;O+=i*m+s*p+5*k*a+5*E*o+5*_*u,T=O>>>13,O&=8191,O+=5*w*c+5*v*l+5*b*d+5*y*h+5*g*f,T+=O>>>13,O&=8191;var D=T;D+=i*g+s*m+a*p+5*k*o+5*E*u,T=D>>>13,D&=8191,D+=5*_*c+5*w*l+5*v*d+5*b*h+5*y*f,T+=D>>>13,D&=8191;var L=T;L+=i*y+s*g+a*m+o*p+5*k*u,T=L>>>13,L&=8191,L+=5*E*c+5*_*l+5*w*d+5*v*h+5*b*f,T+=L>>>13,L&=8191;var B=T;B+=i*b+s*y+a*g+o*m+u*p,T=B>>>13,B&=8191,B+=5*k*c+5*E*l+5*_*d+5*w*h+5*v*f,T+=B>>>13,B&=8191;var q=T;q+=i*v+s*b+a*y+o*g+u*m,T=q>>>13,q&=8191,q+=c*p+5*k*l+5*E*d+5*_*h+5*w*f,T+=q>>>13,q&=8191;var z=T;z+=i*w+s*v+a*b+o*y+u*g,T=z>>>13,z&=8191,z+=c*m+l*p+5*k*d+5*E*h+5*_*f,T+=z>>>13,z&=8191;var U=T;U+=i*_+s*w+a*v+o*b+u*y,T=U>>>13,U&=8191,U+=c*g+l*m+d*p+5*k*h+5*E*f,T+=U>>>13,U&=8191;var j=T;j+=i*E+s*_+a*w+o*v+u*b,T=j>>>13,j&=8191,j+=c*y+l*g+d*m+h*p+5*k*f,T+=j>>>13,j&=8191;var F=T;F+=i*k+s*E+a*_+o*w+u*v,T=F>>>13,F&=8191,F+=c*b+l*y+d*g+h*m+f*p,T+=F>>>13,F&=8191,x=8191&(T=(T=(T<<2)+T|0)+x|0),T>>>=13,O+=T,i=x,s=O,a=D,o=L,u=B,c=q,l=z,d=U,h=j,f=F,t+=16,r-=16}this._h[0]=i,this._h[1]=s,this._h[2]=a,this._h[3]=o,this._h[4]=u,this._h[5]=c,this._h[6]=l,this._h[7]=d,this._h[8]=h,this._h[9]=f},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,s,a=new Uint16Array(10);if(this._leftover){for(s=this._leftover,this._buffer[s++]=1;s<16;s++)this._buffer[s]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,s=2;s<10;s++)this._h[s]+=r,r=this._h[s]>>>13,this._h[s]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,a[0]=this._h[0]+5,r=a[0]>>>13,a[0]&=8191,s=1;s<10;s++)a[s]=this._h[s]+r,r=a[s]>>>13,a[s]&=8191;for(a[9]-=8192,n=(1^r)-1,s=0;s<10;s++)a[s]&=n;for(s=0,n=~n;s<10;s++)this._h[s]=this._h[s]&n|a[s];for(s=1,this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,i=this._h[0]+this._pad[0],this._h[0]=65535&i;s<8;s++)i=(this._h[s]+this._pad[s]|0)+(i>>>16)|0,this._h[s]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[r+i];if(n-=t,r+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(var i=0;i<n;i++)this._buffer[this._leftover+i]=e[r+i];this._leftover+=n}return this},e.prototype.digest=function(){if(this._finished)throw Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},e.prototype.clean=function(){return i.wipe(this._buffer),i.wipe(this._r),i.wipe(this._h),i.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},e}();t.Poly1305=s,t.oneTimeAuth=function(e,t){var r=new s(e);r.update(t);var n=r.digest();return r.clean(),n},t.equal=function(e,r){return e.length===t.DIGEST_LENGTH&&r.length===t.DIGEST_LENGTH&&n.equal(e,r)}},51031:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;let n=r(56813),i=r(39412),s=r(37490);function a(e,r=t.defaultRandomSource){return r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=a,t.randomUint32=function(e=t.defaultRandomSource){let r=a(4,e),n=(0,i.readUint32LE)(r);return(0,s.wipe)(r),n};let o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(e,r=o,n=t.defaultRandomSource){if(r.length<2)throw Error("randomString charset is too short");if(r.length>256)throw Error("randomString charset is too long");let i="",u=r.length,c=256-256%u;for(;e>0;){let t=a(Math.ceil(256*e/c),n);for(let n=0;n<t.length&&e>0;n++){let s=t[n];s<c&&(i+=r.charAt(s%u),e--)}(0,s.wipe)(t)}return i}t.randomString=u,t.randomStringForEntropy=function(e,r=o,n=t.defaultRandomSource){return u(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},47936:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;class r{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw Error("Browser random byte generator is not available.");let t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}}t.BrowserRandomSource=r},42098:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;let n=r(37490);class i{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{let e=r(23331);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw Error("NodeRandomSource: got fewer bytes than requested");let r=new Uint8Array(e);for(let e=0;e<r.length;e++)r[e]=t[e];return(0,n.wipe)(t),r}}t.NodeRandomSource=i},56813:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;let n=r(47936),i=r(42098);class s{constructor(){if(this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new i.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw Error("System random byte generator is not available.");return this._source.randomBytes(e)}}t.SystemRandomSource=s},45244:function(e,t,r){"use strict";var n=r(39412),i=r(37490);t.k=32,t.cn=64;var s=function(){function e(){this.digestLength=t.k,this.blockSize=t.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=o(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t%64<56?64:128;this._buffer[r]=128;for(var s=r+1;s<i-8;s++)this._buffer[s]=0;n.writeUint32BE(t/536870912|0,this._buffer,i-8),n.writeUint32BE(t<<3,this._buffer,i-4),o(this._temp,this._state,this._buffer,0,i),this._finished=!0}for(var s=0;s<this.digestLength/4;s++)n.writeUint32BE(this._state[s],e,4*s);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=s;var a=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,t,r,i,s){for(;s>=64;){for(var o=t[0],u=t[1],c=t[2],l=t[3],d=t[4],h=t[5],f=t[6],p=t[7],m=0;m<16;m++){var g=i+4*m;e[m]=n.readUint32BE(r,g)}for(var m=16;m<64;m++){var y=e[m-2],b=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,v=((y=e[m-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;e[m]=(b+e[m-7]|0)+(v+e[m-16]|0)}for(var m=0;m<64;m++){var b=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&f)|0)+(p+(a[m]+e[m]|0)|0)|0,v=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&u^o&c^u&c)|0;p=f,f=h,h=d,d=l+b|0,l=c,c=u,u=o,o=b+v|0}t[0]+=o,t[1]+=u,t[2]+=c,t[3]+=l,t[4]+=d,t[5]+=h,t[6]+=f,t[7]+=p,i+=64,s-=64}return i}t.vp=function(e){var t=new s;t.update(e);var r=t.digest();return t.clean(),r}},3268:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(39412),i=r(37490);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var s=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t%128<112?128:256;this._buffer[r]=128;for(var s=r+1;s<i-8;s++)this._buffer[s]=0;n.writeUint32BE(t/536870912|0,this._buffer,i-8),n.writeUint32BE(t<<3,this._buffer,i-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,i),this._finished=!0}for(var s=0;s<this.digestLength/8;s++)n.writeUint32BE(this._stateHi[s],e,8*s),n.writeUint32BE(this._stateLo[s],e,8*s+4);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=s;var a=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function o(e,t,r,i,s,o,u){for(var c,l,d,h,f,p,m,g,y=r[0],b=r[1],v=r[2],w=r[3],_=r[4],E=r[5],k=r[6],x=r[7],S=i[0],A=i[1],C=i[2],I=i[3],R=i[4],P=i[5],N=i[6],M=i[7];u>=128;){for(var T=0;T<16;T++){var O=8*T+o;e[T]=n.readUint32BE(s,O),t[T]=n.readUint32BE(s,O+4)}for(var T=0;T<80;T++){var D=y,L=b,B=v,q=w,z=_,U=E,j=k,F=x,H=S,$=A,W=C,G=I,V=R,K=P,Z=N,Y=M;if(c=x,f=65535&(l=M),p=l>>>16,m=65535&c,g=c>>>16,c=(_>>>14|R<<18)^(_>>>18|R<<14)^(R>>>9|_<<23),f+=65535&(l=(R>>>14|_<<18)^(R>>>18|_<<14)^(_>>>9|R<<23)),p+=l>>>16,m+=65535&c,g+=c>>>16,c=_&E^~_&k,f+=65535&(l=R&P^~R&N),p+=l>>>16,m+=65535&c,g+=c>>>16,c=a[2*T],f+=65535&(l=a[2*T+1]),p+=l>>>16,m+=65535&c,g+=c>>>16,c=e[T%16],f+=65535&(l=t[T%16]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,d=65535&m|g<<16,h=65535&f|p<<16,c=d,f=65535&(l=h),p=l>>>16,m=65535&c,g=c>>>16,c=(y>>>28|S<<4)^(S>>>2|y<<30)^(S>>>7|y<<25),f+=65535&(l=(S>>>28|y<<4)^(y>>>2|S<<30)^(y>>>7|S<<25)),p+=l>>>16,m+=65535&c,g+=c>>>16,c=y&b^y&v^b&v,f+=65535&(l=S&A^S&C^A&C),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,F=65535&m|g<<16,Y=65535&f|p<<16,c=q,f=65535&(l=G),p=l>>>16,m=65535&c,g=c>>>16,c=d,f+=65535&(l=h),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,q=65535&m|g<<16,G=65535&f|p<<16,b=D,v=L,w=B,_=q,E=z,k=U,x=j,y=F,A=H,C=$,I=W,R=G,P=V,N=K,M=Z,S=Y,T%16==15)for(var O=0;O<16;O++)c=e[O],f=65535&(l=t[O]),p=l>>>16,m=65535&c,g=c>>>16,c=e[(O+9)%16],f+=65535&(l=t[(O+9)%16]),p+=l>>>16,m+=65535&c,g+=c>>>16,c=((d=e[(O+1)%16])>>>1|(h=t[(O+1)%16])<<31)^(d>>>8|h<<24)^d>>>7,f+=65535&(l=(h>>>1|d<<31)^(h>>>8|d<<24)^(h>>>7|d<<25)),p+=l>>>16,m+=65535&c,g+=c>>>16,c=((d=e[(O+14)%16])>>>19|(h=t[(O+14)%16])<<13)^(h>>>29|d<<3)^d>>>6,f+=65535&(l=(h>>>19|d<<13)^(d>>>29|h<<3)^(h>>>6|d<<26)),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,e[O]=65535&m|g<<16,t[O]=65535&f|p<<16}c=y,f=65535&(l=S),p=l>>>16,m=65535&c,g=c>>>16,c=r[0],f+=65535&(l=i[0]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[0]=y=65535&m|g<<16,i[0]=S=65535&f|p<<16,c=b,f=65535&(l=A),p=l>>>16,m=65535&c,g=c>>>16,c=r[1],f+=65535&(l=i[1]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[1]=b=65535&m|g<<16,i[1]=A=65535&f|p<<16,c=v,f=65535&(l=C),p=l>>>16,m=65535&c,g=c>>>16,c=r[2],f+=65535&(l=i[2]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[2]=v=65535&m|g<<16,i[2]=C=65535&f|p<<16,c=w,f=65535&(l=I),p=l>>>16,m=65535&c,g=c>>>16,c=r[3],f+=65535&(l=i[3]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[3]=w=65535&m|g<<16,i[3]=I=65535&f|p<<16,c=_,f=65535&(l=R),p=l>>>16,m=65535&c,g=c>>>16,c=r[4],f+=65535&(l=i[4]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[4]=_=65535&m|g<<16,i[4]=R=65535&f|p<<16,c=E,f=65535&(l=P),p=l>>>16,m=65535&c,g=c>>>16,c=r[5],f+=65535&(l=i[5]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[5]=E=65535&m|g<<16,i[5]=P=65535&f|p<<16,c=k,f=65535&(l=N),p=l>>>16,m=65535&c,g=c>>>16,c=r[6],f+=65535&(l=i[6]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[6]=k=65535&m|g<<16,i[6]=N=65535&f|p<<16,c=x,f=65535&(l=M),p=l>>>16,m=65535&c,g=c>>>16,c=r[7],f+=65535&(l=i[7]),p+=l>>>16,m+=65535&c,g+=c>>>16,p+=f>>>16,m+=p>>>16,g+=m>>>16,r[7]=x=65535&m|g<<16,i[7]=M=65535&f|p<<16,o+=128,u-=128}return o}t.hash=function(e){var t=new s;t.update(e);var r=t.digest();return t.clean(),r}},37490:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},50480:function(e,t,r){"use strict";t.gi=t.Au=t.KS=t.kz=void 0;let n=r(51031),i=r(37490);function s(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}t.kz=32,t.KS=32;let a=new Uint8Array(32);a[0]=9;let o=s([56129,1]);function u(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function c(e,t,r){let n=~(r-1);for(let r=0;r<16;r++){let i=n&(e[r]^t[r]);e[r]^=i,t[r]^=i}}function l(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function d(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function h(e,t,r){let n,i,s=0,a=0,o=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,m=0,g=0,y=0,b=0,v=0,w=0,_=0,E=0,k=0,x=0,S=0,A=0,C=0,I=0,R=0,P=0,N=0,M=0,T=0,O=0,D=0,L=r[0],B=r[1],q=r[2],z=r[3],U=r[4],j=r[5],F=r[6],H=r[7],$=r[8],W=r[9],G=r[10],V=r[11],K=r[12],Z=r[13],Y=r[14],J=r[15];s+=(n=t[0])*L,a+=n*B,o+=n*q,u+=n*z,c+=n*U,l+=n*j,d+=n*F,h+=n*H,f+=n*$,p+=n*W,m+=n*G,g+=n*V,y+=n*K,b+=n*Z,v+=n*Y,w+=n*J,a+=(n=t[1])*L,o+=n*B,u+=n*q,c+=n*z,l+=n*U,d+=n*j,h+=n*F,f+=n*H,p+=n*$,m+=n*W,g+=n*G,y+=n*V,b+=n*K,v+=n*Z,w+=n*Y,_+=n*J,o+=(n=t[2])*L,u+=n*B,c+=n*q,l+=n*z,d+=n*U,h+=n*j,f+=n*F,p+=n*H,m+=n*$,g+=n*W,y+=n*G,b+=n*V,v+=n*K,w+=n*Z,_+=n*Y,E+=n*J,u+=(n=t[3])*L,c+=n*B,l+=n*q,d+=n*z,h+=n*U,f+=n*j,p+=n*F,m+=n*H,g+=n*$,y+=n*W,b+=n*G,v+=n*V,w+=n*K,_+=n*Z,E+=n*Y,k+=n*J,c+=(n=t[4])*L,l+=n*B,d+=n*q,h+=n*z,f+=n*U,p+=n*j,m+=n*F,g+=n*H,y+=n*$,b+=n*W,v+=n*G,w+=n*V,_+=n*K,E+=n*Z,k+=n*Y,x+=n*J,l+=(n=t[5])*L,d+=n*B,h+=n*q,f+=n*z,p+=n*U,m+=n*j,g+=n*F,y+=n*H,b+=n*$,v+=n*W,w+=n*G,_+=n*V,E+=n*K,k+=n*Z,x+=n*Y,S+=n*J,d+=(n=t[6])*L,h+=n*B,f+=n*q,p+=n*z,m+=n*U,g+=n*j,y+=n*F,b+=n*H,v+=n*$,w+=n*W,_+=n*G,E+=n*V,k+=n*K,x+=n*Z,S+=n*Y,A+=n*J,h+=(n=t[7])*L,f+=n*B,p+=n*q,m+=n*z,g+=n*U,y+=n*j,b+=n*F,v+=n*H,w+=n*$,_+=n*W,E+=n*G,k+=n*V,x+=n*K,S+=n*Z,A+=n*Y,C+=n*J,f+=(n=t[8])*L,p+=n*B,m+=n*q,g+=n*z,y+=n*U,b+=n*j,v+=n*F,w+=n*H,_+=n*$,E+=n*W,k+=n*G,x+=n*V,S+=n*K,A+=n*Z,C+=n*Y,I+=n*J,p+=(n=t[9])*L,m+=n*B,g+=n*q,y+=n*z,b+=n*U,v+=n*j,w+=n*F,_+=n*H,E+=n*$,k+=n*W,x+=n*G,S+=n*V,A+=n*K,C+=n*Z,I+=n*Y,R+=n*J,m+=(n=t[10])*L,g+=n*B,y+=n*q,b+=n*z,v+=n*U,w+=n*j,_+=n*F,E+=n*H,k+=n*$,x+=n*W,S+=n*G,A+=n*V,C+=n*K,I+=n*Z,R+=n*Y,P+=n*J,g+=(n=t[11])*L,y+=n*B,b+=n*q,v+=n*z,w+=n*U,_+=n*j,E+=n*F,k+=n*H,x+=n*$,S+=n*W,A+=n*G,C+=n*V,I+=n*K,R+=n*Z,P+=n*Y,N+=n*J,y+=(n=t[12])*L,b+=n*B,v+=n*q,w+=n*z,_+=n*U,E+=n*j,k+=n*F,x+=n*H,S+=n*$,A+=n*W,C+=n*G,I+=n*V,R+=n*K,P+=n*Z,N+=n*Y,M+=n*J,b+=(n=t[13])*L,v+=n*B,w+=n*q,_+=n*z,E+=n*U,k+=n*j,x+=n*F,S+=n*H,A+=n*$,C+=n*W,I+=n*G,R+=n*V,P+=n*K,N+=n*Z,M+=n*Y,T+=n*J,v+=(n=t[14])*L,w+=n*B,_+=n*q,E+=n*z,k+=n*U,x+=n*j,S+=n*F,A+=n*H,C+=n*$,I+=n*W,R+=n*G,P+=n*V,N+=n*K,M+=n*Z,T+=n*Y,O+=n*J,w+=(n=t[15])*L,_+=n*B,E+=n*q,k+=n*z,x+=n*U,S+=n*j,A+=n*F,C+=n*H,I+=n*$,R+=n*W,P+=n*G,N+=n*V,M+=n*K,T+=n*Z,O+=n*Y,D+=n*J,s+=38*_,a+=38*E,o+=38*k,u+=38*x,c+=38*S,l+=38*A,d+=38*C,h+=38*I,f+=38*R,p+=38*P,m+=38*N,g+=38*M,y+=38*T,b+=38*O,v+=38*D,i=Math.floor((n=s+(i=1)+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),i=Math.floor((n=s+(i=1)+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),e[0]=s,e[1]=a,e[2]=o,e[3]=u,e[4]=c,e[5]=l,e[6]=d,e[7]=h,e[8]=f,e[9]=p,e[10]=m,e[11]=g,e[12]=y,e[13]=b,e[14]=v,e[15]=w}function f(e,t){let r=new Uint8Array(32),n=new Float64Array(80),i=s(),a=s(),f=s(),p=s(),m=s(),g=s();for(let t=0;t<31;t++)r[t]=e[t];r[31]=127&e[31]|64,r[0]&=248,function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(n,t);for(let e=0;e<16;e++)a[e]=n[e];i[0]=p[0]=1;for(let e=254;e>=0;--e){let t=r[e>>>3]>>>(7&e)&1;c(i,a,t),c(f,p,t),l(m,i,f),d(i,i,f),l(f,a,p),d(a,a,p),h(p,m,m),h(g,i,i),h(i,f,i),h(f,a,m),l(m,i,f),d(i,i,f),h(a,i,i),d(f,p,g),h(i,f,o),l(i,i,p),h(f,f,i),h(i,p,g),h(p,a,n),h(a,m,m),c(i,a,t),c(f,p,t)}for(let e=0;e<16;e++)n[e+16]=i[e],n[e+32]=f[e],n[e+48]=a[e],n[e+64]=p[e];let y=n.subarray(32),b=n.subarray(16);!function(e,t){let r=s();for(let e=0;e<16;e++)r[e]=t[e];for(let e=253;e>=0;e--)h(r,r,r),2!==e&&4!==e&&h(r,r,t);for(let t=0;t<16;t++)e[t]=r[t]}(y,y),h(b,b,y);let v=new Uint8Array(32);return!function(e,t){let r=s(),n=s();for(let e=0;e<16;e++)n[e]=t[e];u(n),u(n),u(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let e=r[15]>>16&1;r[14]&=65535,c(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}(v,b),v}t.Au=function(e){let r=(0,n.randomBytes)(32,e),s=function(e){if(e.length!==t.KS)throw Error(`x25519: seed must be ${t.KS} bytes`);let r=new Uint8Array(e);return{publicKey:f(r,a),secretKey:r}}(r);return(0,i.wipe)(r),s},t.gi=function(e,r,n=!1){if(e.length!==t.kz)throw Error("X25519: incorrect secret key length");if(r.length!==t.kz)throw Error("X25519: incorrect public key length");let i=f(e,r);if(n){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw Error("X25519: invalid shared key")}return i}},70712:function(e,t,r){"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){let e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},99455:function(e,t,r){"use strict";var n=r(21169);function i(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function s(){return void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=i,t.isNode=s,t.isBrowser=function(){return!i()&&!s()}},540:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(66346);n.__exportStar(r(70712),t),n.__exportStar(r(99455),t)},85062:function(e,t,r){"use strict";let n;r.d(t,{Gn:function(){return iF},gy:function(){return iR},lI:function(){return iC}});var i=r(92254),s=r.n(i),a=r(62568),o=r(11164),u=r(53435).Buffer;function c(e,...t){try{var r;return(r=e(...t))&&"function"==typeof r.then?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}}function l(e){if(function(e){let t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){let t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return l(e.toJSON());throw Error("[unstorage] Cannot stringify value!")}function d(){if(void 0===u)throw TypeError("[unstorage] Buffer is not supported!")}let h="base64:";function f(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function p(e){return(e=f(e))?e+":":""}let m=()=>{let e=new Map;return{name:"memory",getInstance:()=>e,hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>[...e.keys()],clear(){e.clear()},dispose(){e.clear()}}};function g(e,t,r){return e.watch?e.watch((e,n)=>t(e,r+n)):()=>{}}async function y(e){"function"==typeof e.dispose&&await c(e.dispose)}function b(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function v(e,t){let r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);let n=b(r);return(e,r)=>n.then(n=>r(n.transaction(t,e).objectStore(t)))}function w(){return n||(n=v("keyval-store","keyval")),n}function _(e,t=w()){return t("readonly",t=>b(t.get(e)))}var E=r(10437),k=(e={})=>{let t;let r=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>r+e;return e.dbName&&e.storeName&&(t=v(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await _(n(e),t)>"u"),getItem:async e=>await _(n(e),t)??null,setItem:(e,r)=>(function(e,t,r=w()){return r("readwrite",r=>(r.put(t,e),b(r.transaction)))})(n(e),r,t),removeItem:e=>(function(e,t=w()){return t("readwrite",t=>(t.delete(e),b(t.transaction)))})(n(e),t),getKeys:()=>(function(e=w()){return e("readonly",e=>{var t;if(e.getAllKeys)return b(e.getAllKeys());let r=[];return(t=e=>r.push(e.key),e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},b(e.transaction)).then(()=>r)})})(t),clear:()=>(function(e=w()){return e("readwrite",e=>(e.clear(),b(e.transaction)))})(t)}};class x{constructor(){this.indexedDb=function(e={}){let t={mounts:{"":e.driver||m()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=e=>{for(let r of t.mountpoints)if(e.startsWith(r))return{base:r,relativeKey:e.slice(r.length),driver:t.mounts[r]};return{base:"",relativeKey:e,driver:t.mounts[""]}},n=(e,r)=>t.mountpoints.filter(t=>t.startsWith(e)||r&&e.startsWith(t)).map(r=>({relativeBase:e.length>r.length?e.slice(r.length):void 0,mountpoint:r,driver:t.mounts[r]})),i=(e,r)=>{if(t.watching)for(let n of(r=f(r),t.watchListeners))n(e,r)},s=async()=>{if(!t.watching)for(let e in t.watching=!0,t.mounts)t.unwatch[e]=await g(t.mounts[e],i,e)},a=async()=>{if(t.watching){for(let e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},b=(e,t,n)=>{let i=new Map,s=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(let n of e){let e="string"==typeof n,i=f(e?n:n.key),a=e?void 0:n.value,o=e||!n.options?t:{...t,...n.options},u=r(i);s(u).items.push({key:i,value:a,relativeKey:u.relativeKey,options:o})}return Promise.all([...i.values()].map(e=>n(e))).then(e=>e.flat())},v={hasItem(e,t={}){let{relativeKey:n,driver:i}=r(e=f(e));return c(i.hasItem,n,t)},getItem(e,t={}){let{relativeKey:n,driver:i}=r(e=f(e));return c(i.getItem,n,t).then(e=>(0,o.ZP)(e))},getItems:(e,t)=>b(e,t,e=>e.driver.getItems?c(e.driver.getItems,e.items.map(e=>({key:e.relativeKey,options:e.options})),t).then(t=>t.map(t=>({key:function(...e){return f(e.join(":"))}(e.base,t.key),value:(0,o.ZP)(t.value)}))):Promise.all(e.items.map(t=>c(e.driver.getItem,t.relativeKey,t.options).then(e=>({key:t.key,value:(0,o.ZP)(e)}))))),getItemRaw(e,t={}){let{relativeKey:n,driver:i}=r(e=f(e));return i.getItemRaw?c(i.getItemRaw,n,t):c(i.getItem,n,t).then(e=>"string"==typeof e&&e.startsWith(h)?(d(),u.from(e.slice(h.length),"base64")):e)},async setItem(e,t,n={}){if(void 0===t)return v.removeItem(e);let{relativeKey:s,driver:a}=r(e=f(e));a.setItem&&(await c(a.setItem,s,l(t),n),a.watch||i("update",e))},async setItems(e,t){await b(e,t,async e=>{if(e.driver.setItems)return c(e.driver.setItems,e.items.map(e=>({key:e.relativeKey,value:l(e.value),options:e.options})),t);e.driver.setItem&&await Promise.all(e.items.map(t=>c(e.driver.setItem,t.relativeKey,l(t.value),t.options)))})},async setItemRaw(e,t,n={}){if(void 0===t)return v.removeItem(e,n);let{relativeKey:s,driver:a}=r(e=f(e));if(a.setItemRaw)await c(a.setItemRaw,s,t,n);else{if(!a.setItem)return;await c(a.setItem,s,"string"==typeof t?t:(d(),h+u.from(t).toString("base64")),n)}a.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t});let{relativeKey:n,driver:s}=r(e=f(e));s.removeItem&&(await c(s.removeItem,n,t),(t.removeMeta||t.removeMata)&&await c(s.removeItem,n+"$",t),s.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t});let{relativeKey:n,driver:i}=r(e=f(e)),s=Object.create(null);if(i.getMeta&&Object.assign(s,await c(i.getMeta,n,t)),!t.nativeOnly){let e=await c(i.getItem,n+"$",t).then(e=>(0,o.ZP)(e));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(s,e))}return s},setMeta(e,t,r={}){return this.setItem(e+"$",t,r)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){let r=n(e=p(e),!0),i=[],s=[];for(let e of r){for(let r of(await c(e.driver.getKeys,e.relativeBase,t))){let t=e.mountpoint+f(r);i.some(e=>t.startsWith(e))||s.push(t)}i=[e.mountpoint,...i.filter(t=>!t.startsWith(e.mountpoint))]}return e?s.filter(t=>t.startsWith(e)&&"$"!==t[t.length-1]):s.filter(e=>"$"!==e[e.length-1])},async clear(e,t={}){e=p(e),await Promise.all(n(e,!1).map(async e=>e.driver.clear?c(e.driver.clear,e.relativeBase,t):e.driver.removeItem?Promise.all((await e.driver.getKeys(e.relativeBase||"",t)).map(r=>e.driver.removeItem(r,t))):void 0))},async dispose(){await Promise.all(Object.values(t.mounts).map(e=>y(e)))},watch:async e=>(await s(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter(t=>t!==e),0===t.watchListeners.length&&await a()}),async unwatch(){t.watchListeners=[],await a()},mount(e,r){if((e=p(e))&&t.mounts[e])throw Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort((e,t)=>t.length-e.length)),t.mounts[e]=r,t.watching&&Promise.resolve(g(r,i,e)).then(r=>{t.unwatch[e]=r}).catch(console.error),v},async unmount(e,r=!0){(e=p(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),r&&await y(t.mounts[e]),t.mountpoints=t.mountpoints.filter(t=>t!==e),delete t.mounts[e])},getMount(e=""){let t=r(e=f(e)+":");return{driver:t.driver,base:t.base}},getMounts:(e="",t={})=>n(e=f(e),t.parents).map(e=>({driver:e.driver,base:e.mountpoint})),keys:(e,t={})=>v.getKeys(e,t),get:(e,t={})=>v.getItem(e,t),set:(e,t,r={})=>v.setItem(e,t,r),has:(e,t={})=>v.hasItem(e,t),del:(e,t={})=>v.removeItem(e,t),remove:(e,t={})=>v.removeItem(e,t)};return v}({driver:k({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){let t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,(0,E.u)(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var S="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof r.g?r.g:"u">typeof self?self:{},A={exports:{}};function C(e){var t;return[e[0],(0,E.D)(null!=(t=e[1])?t:"")]}!function(){function e(){}e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){let e=this;Object.keys(e).forEach(function(t){e[t]=void 0,delete e[t]})},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),"u">typeof S&&S.localStorage?A.exports=S.localStorage:"u">typeof window&&window.localStorage?A.exports=window.localStorage:A.exports=new e}();class I{constructor(){this.localStorage=A.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(C)}async getItem(e){let t=this.localStorage.getItem(e);if(null!==t)return(0,E.D)(t)}async setItem(e,t){this.localStorage.setItem(e,(0,E.u)(t))}async removeItem(e){this.localStorage.removeItem(e)}}let R=async(e,t,r)=>{let n="wc_storage_version",i=await t.getItem(n);if(i&&i>=1){r(t);return}let s=await e.getKeys();if(!s.length){r(t);return}let a=[];for(;s.length;){let r=s.shift();if(!r)continue;let n=r.toLowerCase();if(n.includes("wc@")||n.includes("walletconnect")||n.includes("wc_")||n.includes("wallet_connect")){let n=await e.getItem(r);await t.setItem(r,n),a.push(r)}}await t.setItem(n,1),r(t),P(e,a)},P=async(e,t)=>{t.length&&t.forEach(async t=>{await e.removeItem(t)})};class N{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};let e=new I;this.storage=e;try{let t=new x;R(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{let t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}}var M=r(37010);class T{}class O extends T{constructor(e){super()}}let D=M.FIVE_SECONDS,L="heartbeat_pulse";class B extends O{constructor(e){super(e),this.events=new i.EventEmitter,this.interval=D,this.interval=e?.interval||D}static async init(e){let t=new B(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),(0,M.toMiliseconds)(this.interval))}pulse(){this.events.emit(L)}}var q=r(44962),z=r.n(q);let U={level:"info"},j="custom_context";class F{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class H{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){let t=new F(e);if(t.size>this.maxSizeInBytes)throw Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?this.tail&&(this.tail.next=t):this.head=t,this.tail=t,this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;let e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){let e=[],t=this.head;for(;null!==t;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};let t=e.value;return e=e.next,{done:!1,value:t}}}}}class ${constructor(e,t=1024e3){this.level=e??"error",this.levelValue=q.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new H(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===q.levels.values.error?console.error(e):t===q.levels.values.warn?console.warn(e):t===q.levels.values.debug?console.debug(e):t===q.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append((0,E.u)({timestamp:new Date().toISOString(),log:e}));let t="string"==typeof e?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new H(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){let t=this.getLogArray();return t.push((0,E.u)({extraMetadata:e})),new Blob(t,{type:"application/json"})}}class W{constructor(e,t=1024e3){this.baseChunkLogger=new $(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){let t=URL.createObjectURL(this.logsToBlob(e)),r=document.createElement("a");r.href=t,r.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}}class G{constructor(e,t=1024e3){this.baseChunkLogger=new $(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var V=Object.defineProperty,K=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t)=>{for(var r in t||(t={}))J.call(t,r)&&X(e,r,t[r]);if(Y)for(var r of Y(t))Q.call(t,r)&&X(e,r,t[r]);return e},et=(e,t)=>K(e,Z(t));function er(e){return et(ee({},e),{level:e?.level||U.level})}function en(e,t=j){return typeof e.bindings>"u"?function(e,t=j){return e[t]||""}(e,t):e.bindings().context||""}function ei(e,t,r=j){let n=function(e,t,r=j){let n=en(e,r);return n.trim()?`${n}/${t}`:t}(e,t,r);return function(e,t,r=j){return e[r]=t,e}(e.child({context:n}),n,r)}class es extends T{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class ea extends T{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class eo{constructor(e,t){this.logger=e,this.core=t}}class eu extends T{constructor(e,t){super(),this.relayer=e,this.logger=t}}class ec extends T{constructor(e){super()}}class el{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class ed extends T{constructor(e,t){super(),this.relayer=e,this.logger=t}}class eh extends T{constructor(e,t){super(),this.core=e,this.logger=t}}class ef{constructor(e,t,r){this.core=e,this.logger=t,this.store=r}}class ep{constructor(e,t){this.projectId=e,this.logger=t}}class em{constructor(e,t,r){this.core=e,this.logger=t,this.telemetryEnabled=r}}class eg{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class ey{constructor(e){this.client=e}}var eb=r(84112),ev=r(21649);let ew="INTERNAL_ERROR",e_="SERVER_ERROR",eE=[-32700,-32600,-32601,-32602,-32603],ek={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[ew]:{code:-32603,message:"Internal error"},[e_]:{code:-32e3,message:"Server error"}};function ex(e){return Object.keys(ek).includes(e)?ek[e]:ek[e_]}function eS(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?Error(`Unavailable ${r} RPC url at ${t}`):e}var eA=r(540);function eC(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function eI(e=6){return BigInt(eC(e))}function eR(e,t,r){return{id:r||eC(),jsonrpc:"2.0",method:e,params:t}}function eP(e,t){return{id:e,jsonrpc:"2.0",result:t}}function eN(e,t,r){var n,i,s;return{id:e,jsonrpc:"2.0",error:void 0===(n=t)?ex(ew):("string"==typeof n&&(n=Object.assign(Object.assign({},ex(e_)),{message:n})),void 0!==r&&(n.data=r),i=n.code,eE.includes(i)&&(s=n.code,n=Object.values(ek).find(e=>e.code===s)||ek[e_]),n)}}class eM{}class eT extends eM{constructor(){super()}}class eO extends eT{constructor(e){super()}}function eD(e,t){let r=function(e){let t=e.match(RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==r&&new RegExp(t).test(r)}function eL(e){return eD(e,"^https?:")}function eB(e){return eD(e,"^wss?:")}function eq(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function ez(e){return eq(e)&&"method"in e}function eU(e){return eq(e)&&(ej(e)||eF(e))}function ej(e){return"result"in e}function eF(e){return"error"in e}class eH extends eO{constructor(e){super(e),this.events=new i.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(eR(e.method,e.params||[],e.id||eI().toString()),t)}async requestStrict(e,t){return new Promise(async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(e){n(e)}this.events.on(`${e.id}`,e=>{eF(e)?n(e.error):r(e.result)});try{await this.connection.send(e,t)}catch(e){n(e)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),eU(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}let e$=()=>"u">typeof WebSocket||"u">typeof r.g&&"u">typeof r.g.WebSocket||"u">typeof window&&"u">typeof window.WebSocket||"u">typeof self&&"u">typeof self.WebSocket,eW=e=>e.split("?")[0],eG="u">typeof WebSocket?WebSocket:"u">typeof r.g&&"u">typeof r.g.WebSocket?r.g.WebSocket:"u">typeof window&&"u">typeof window.WebSocket?window.WebSocket:"u">typeof self&&"u">typeof self.WebSocket?self.WebSocket:r(88697);class eV{constructor(e){if(this.url=e,this.events=new i.EventEmitter,this.registering=!1,!eB(e))throw Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return"u">typeof this.socket}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u"){t(Error("Connection already closed"));return}this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send((0,E.u)(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!eB(e))throw Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(Error("WebSocket connection is missing or invalid"));e(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,r)=>{let n=new URLSearchParams(e).get("origin"),i=(0,eA.isReactNative)()?{headers:{origin:n}}:{rejectUnauthorized:!RegExp("wss?://localhost(:d{2,5})?").test(e)},s=new eG(e,[],i);e$()?s.onerror=e=>{r(this.emitError(e.error))}:s.on("error",e=>{r(this.emitError(e))}),s.onopen=()=>{this.onOpen(s),t(s)}})}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?(0,E.D)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),n=eN(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return eS(e,eW(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){let t=this.parseError(Error(e?.message||`WebSocket connection failed for host: ${eW(this.url)}`));return this.events.emit("register_error",t),t}}var eK=r(54802),eZ=r.n(eK),eY=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var s=e.charAt(i),a=s.charCodeAt(0);if(255!==r[a])throw TypeError(s+" is ambiguous");r[a]=i}var o=e.length,u=e.charAt(0),c=Math.log(o)/Math.log(256),l=Math.log(256)/Math.log(o);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var n=0,i=0;e[t]===u;)n++,t++;for(var s=(e.length-t)*c+1>>>0,a=new Uint8Array(s);e[t];){var l=r[e.charCodeAt(t)];if(255===l)return;for(var d=0,h=s-1;(0!==l||d<i)&&-1!==h;h--,d++)l+=o*a[h]>>>0,a[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var f=s-i;f!==s&&0===a[f];)f++;for(var p=new Uint8Array(n+(s-f)),m=n;f!==s;)p[m++]=a[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,s=t.length;i!==s&&0===t[i];)i++,r++;for(var a=(s-i)*l+1>>>0,c=new Uint8Array(a);i!==s;){for(var d=t[i],h=0,f=a-1;(0!==d||h<n)&&-1!==f;f--,h++)d+=256*c[f]>>>0,c[f]=d%o>>>0,d=d/o>>>0;if(0!==d)throw Error("Non-zero carry");n=h,i++}for(var p=a-n;p!==a&&0===c[p];)p++;for(var m=u.repeat(r);p<a;++p)m+=e.charAt(c[p]);return m},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw Error(`Non-${t} character`)}}};let eJ=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},eQ=e=>new TextEncoder().encode(e),eX=e=>new TextDecoder().decode(e);class e0{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class e1{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return e3(this,e)}}class e2{constructor(e){this.decoders=e}or(e){return e3(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let e3=(e,t)=>new e2({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class e5{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new e0(e,t,r),this.decoder=new e1(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let e6=({name:e,prefix:t,encode:r,decode:n})=>new e5(e,t,r,n),e4=({prefix:e,name:t,alphabet:r})=>{let{encode:n,decode:i}=eY(r,t);return e6({prefix:e,name:t,encode:n,decode:e=>eJ(i(e))})},e8=(e,t,r,n)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let s=e.length;for(;"="===e[s-1];)--s;let a=new Uint8Array(s*r/8|0),o=0,u=0,c=0;for(let t=0;t<s;++t){let s=i[e[t]];if(void 0===s)throw SyntaxError(`Non-${n} character`);u=u<<r|s,(o+=r)>=8&&(o-=8,a[c++]=255&u>>o)}if(o>=r||255&u<<8-o)throw SyntaxError("Unexpected end of data");return a},e9=(e,t,r)=>{let n="="===t[t.length-1],i=(1<<r)-1,s="",a=0,o=0;for(let n=0;n<e.length;++n)for(o=o<<8|e[n],a+=8;a>r;)a-=r,s+=t[i&o>>a];if(a&&(s+=t[i&o<<r-a]),n)for(;s.length*r&7;)s+="=";return s},e7=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>e6({prefix:t,name:e,encode:e=>e9(e,n,r),decode:t=>e8(t,n,r,e)});var te=Object.freeze({__proto__:null,identity:e6({prefix:"\0",name:"identity",encode:e=>eX(e),decode:e=>eQ(e)})}),tt=Object.freeze({__proto__:null,base2:e7({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})}),tr=Object.freeze({__proto__:null,base8:e7({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})}),tn=Object.freeze({__proto__:null,base10:e4({prefix:"9",name:"base10",alphabet:"0123456789"})}),ti=Object.freeze({__proto__:null,base16:e7({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper:e7({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});let ts=e7({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ta=e7({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),to=e7({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),tu=e7({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),tc=e7({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),tl=e7({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5});var td=Object.freeze({__proto__:null,base32:ts,base32upper:ta,base32pad:to,base32padupper:tu,base32hex:tc,base32hexupper:tl,base32hexpad:e7({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),base32hexpadupper:e7({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z:e7({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})}),th=Object.freeze({__proto__:null,base36:e4({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper:e4({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})}),tf=Object.freeze({__proto__:null,base58btc:e4({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr:e4({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});let tp=e7({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});var tm=Object.freeze({__proto__:null,base64:tp,base64pad:e7({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),base64url:e7({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad:e7({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});let tg=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),ty=tg.reduce((e,t,r)=>(e[r]=t,e),[]),tb=tg.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);var tv=Object.freeze({__proto__:null,base256emoji:e6({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=ty[t],"")},decode:function(e){let t=[];for(let r of e){let e=tb[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}})});function tw(e,t){var r,n=0,t=t||0,i=0,s=t,a=e.length;do{if(s>=a)throw tw.bytes=0,RangeError("Could not decode varint");r=e[s++],n+=i<28?(127&r)<<i:(127&r)*Math.pow(2,i),i+=7}while(r>=128);return tw.bytes=s-t,n}var t_=function e(t,r,n){r=r||[],n=n||0;for(var i=n;t>=2147483648;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r};let tE=(e,t,r=0)=>(t_(e,t,r),t),tk=e=>e<128?1:e<16384?2:e<2097152?3:e<268435456?4:e<34359738368?5:e<4398046511104?6:e<562949953421312?7:e<72057594037927940?8:e<0x7fffffffffffffff?9:10,tx=(e,t)=>{let r=t.byteLength,n=tk(e),i=n+tk(r),s=new Uint8Array(i+r);return tE(e,s,0),tE(r,s,n),s.set(t,i),new tS(e,r,t,s)};class tS{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}let tA=({name:e,code:t,encode:r})=>new tC(e,t,r);class tC{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?tx(this.code,t):t.then(e=>tx(this.code,e))}throw Error("Unknown type, must be binary type")}}let tI=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));var tR=Object.freeze({__proto__:null,sha256:tA({name:"sha2-256",code:18,encode:tI("SHA-256")}),sha512:tA({name:"sha2-512",code:19,encode:tI("SHA-512")})}),tP=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:eJ,digest:e=>tx(0,eJ(e))}});new TextEncoder,new TextDecoder;let tN={...te,...tt,...tr,...tn,...ti,...td,...th,...tf,...tm,...tv};function tM(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}({...tR,...tP});let tT=tM("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),tO=tM("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{let t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),tD={utf8:tT,"utf-8":tT,hex:tN.base16,latin1:tO,ascii:tO,binary:tO,...tN},tL="core",tB=`wc@2:${tL}:`,tq={logger:"error"},tz={database:":memory:"},tU="client_ed25519_seed",tj=M.ONE_DAY,tF=M.SIX_HOURS,tH="wss://relay.walletconnect.org",t$={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",publish:"relayer_publish"},tW={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},tG="2.16.2",tV={link_mode:"link_mode",relay:"relay"},tK="WALLETCONNECT_LINK_MODE_APPS",tZ={created:"subscription_created",deleted:"subscription_deleted",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},tY=1e3*M.FIVE_SECONDS,tJ={wc_pairingDelete:{req:{ttl:M.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:M.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:M.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:M.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:M.ONE_DAY,prompt:!1,tag:0},res:{ttl:M.ONE_DAY,prompt:!1,tag:0}}},tQ={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},tX={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},t0={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},t1="https://verify.walletconnect.org",t2=`${t1}/v3`,t3=["https://verify.walletconnect.com",t1],t5={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal"},t6={no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_listener_not_found:"proposal_listener_not_found"},t4={session_approve_started:"session_approve_started",session_namespaces_validation_success:"session_namespaces_validation_success",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},t8={no_internet_connection:"no_internet_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},t9={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},t7={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"};class re{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=tB,this.init=async()=>{if(!this.initialized){let e=await this.getKeyChain();"u">typeof e&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();let t=this.keychain.get(e);if(typeof t>"u"){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=ei(t,this.name)}get context(){return en(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,(0,a.KCv)(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?(0,a.IPd)(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}}class rt{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.randomSessionIdentifier=(0,a.jdp)(),this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>{this.isInitialized();let e=await this.getClientSeed(),t=eb.generateKeyPair(e);return eb.encodeIss(t.publicKey)},this.generateKeyPair=()=>{this.isInitialized();let e=(0,a.Au2)();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();let t=await this.getClientSeed(),r=eb.generateKeyPair(t),n=this.randomSessionIdentifier;return await eb.signJWT(n,e,tj,r)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();let n=this.getPrivateKey(e),i=(0,a.m$A)(n,t);return this.setSymKey(i,r)},this.setSymKey=async(e,t)=>{this.isInitialized();let r=t||(0,a.YmJ)(e);return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();let n=(0,a.ENt)(r),i=(0,E.u)(t);if((0,a.Hs$)(n))return(0,a.Spz)(i,r?.encoding);if((0,a.Q8x)(n)){let t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}let s=this.getSymKey(e),{type:o,senderPublicKey:u}=n;return(0,a.HIp)({type:o,symKey:s,message:i,senderPublicKey:u,encoding:r?.encoding})},this.decode=async(e,t,r)=>{this.isInitialized();let n=(0,a.Llj)(t,r);if((0,a.Hs$)(n)){let e=(0,a.xQU)(t,r?.encoding);return(0,E.D)(e)}if((0,a.Q8x)(n)){let t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}try{let n=this.getSymKey(e),i=(0,a.peR)({symKey:n,encoded:t,encoding:r?.encoding});return(0,E.D)(i)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=(e,t=a.$dT)=>{let r=(0,a.vBi)({encoded:e,encoding:t});return(0,a.WGe)(r.type)},this.getPayloadSenderPublicKey=(e,t=a.$dT)=>{let r=(0,a.vBi)({encoded:e,encoding:t});return r.senderPublicKey?(0,ev.BB)(r.senderPublicKey,a.AWt):void 0},this.core=e,this.logger=ei(t,this.name),this.keychain=r||new re(this.core,this.logger)}get context(){return en(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(tU)}catch{e=(0,a.jdp)(),await this.keychain.set(tU,e)}return function(e,t="utf8"){let r=tD[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}}class rr extends eo{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=tB,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{let e=await this.getRelayerMessages();"u">typeof e&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();let r=(0,a.rjm)(t),n=this.messages.get(e);return typeof n>"u"&&(n={}),"u">typeof n[r]||(n[r]=t,this.messages.set(e,n),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),"u">typeof this.get(e)[(0,a.rjm)(t)]),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=ei(e,this.name),this.core=t}get context(){return en(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,(0,a.KCv)(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?(0,a.IPd)(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}}class rn extends eu{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new i.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,M.toMiliseconds)(M.ONE_MINUTE),this.failedPublishTimeout=(0,M.toMiliseconds)(M.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{var n;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});let i=r?.ttl||tF,s=(0,a._HE)(r),o=r?.prompt||!1,u=r?.tag||0,c=r?.id||eI().toString(),l={topic:e,message:t,opts:{ttl:i,relay:s,prompt:o,tag:u,id:c,attestation:r?.attestation}},d=`Failed to publish payload, please try again. id:${c} tag:${u}`,h=Date.now(),f,p=1;try{for(;void 0===f;){if(Date.now()-h>this.publishTimeout)throw Error(d);this.logger.trace({id:c,attempts:p},`publisher.publish - attempt ${p}`),f=await await (0,a.hFY)(this.rpcPublish(e,t,i,s,o,u,c,r?.attestation).catch(e=>this.logger.warn(e)),this.publishTimeout,d),p++,f||await new Promise(e=>setTimeout(e,this.failedPublishTimeout))}this.relayer.events.emit(t$.publish,l),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:c,topic:e,message:t,opts:r}})}catch(e){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(e),null!=(n=r?.internal)&&n.throwOnFailedPublish)throw e;this.queue.set(c,l)}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=ei(t,this.name),this.registerEventListeners()}get context(){return en(this.logger)}rpcPublish(e,t,r,n,i,s,o,u){var c,l,d,h;let f={method:(0,a.cOS)(n.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:i,tag:s,attestation:u},id:o};return(0,a.o8e)(null==(c=f.params)?void 0:c.prompt)&&(null==(l=f.params)||delete l.prompt),(0,a.o8e)(null==(d=f.params)?void 0:d.tag)&&(null==(h=f.params)||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:f}),this.relayer.request(f)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{let{topic:t,message:r,opts:n}=e;await this.publish(t,r,n)})}registerEventListeners(){this.relayer.core.heartbeat.on(L,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(t$.connection_stalled);return}this.checkQueue()}),this.relayer.on(t$.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class ri{constructor(){this.map=new Map,this.set=(e,t)=>{let r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;let r=this.get(e);if(!this.exists(e,t))return;let n=r.filter(e=>e!==t);if(!n.length){this.map.delete(e);return}this.map.set(e,n)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var rs=Object.defineProperty,ra=Object.defineProperties,ro=Object.getOwnPropertyDescriptors,ru=Object.getOwnPropertySymbols,rc=Object.prototype.hasOwnProperty,rl=Object.prototype.propertyIsEnumerable,rd=(e,t,r)=>t in e?rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rh=(e,t)=>{for(var r in t||(t={}))rc.call(t,r)&&rd(e,r,t[r]);if(ru)for(var r of ru(t))rl.call(t,r)&&rd(e,r,t[r]);return e},rf=(e,t)=>ra(e,ro(t));class rp extends ed{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new ri,this.events=new i.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=tB,this.subscribeTimeout=(0,M.toMiliseconds)(M.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId(),await this.restore()),this.initialized=!0},this.subscribe=async(e,t)=>{this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{let r=(0,a._HE)(t),n={topic:e,relay:r,transportType:t?.transportType};this.pending.set(e,n);let i=await this.rpcSubscribe(e,r,t?.transportType);return"string"==typeof i&&(this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}})),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),"u">typeof t?.id?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;let t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise((r,n)=>{let i=new M.Watch;i.start(t);let s=setInterval(()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(s),i.stop(t),r(!0)),i.elapsed(t)>=tY&&(clearInterval(s),i.stop(t),n(Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=ei(t,this.name),this.clientId=""}get context(){return en(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){let r=this.topicMap.get(e);await Promise.all(r.map(async r=>await this.unsubscribeById(e,r,t)))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{let n=(0,a._HE)(r);await this.rpcUnsubscribe(e,t,n);let i=(0,a.D6H)("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t,r=tV.relay){r===tV.relay&&await this.restartToComplete();let n={method:(0,a.cOS)(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{let t=(0,a.rjm)(e+this.clientId);return r===tV.link_mode?(setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(n).catch(e=>this.logger.warn(e))},(0,M.toMiliseconds)(M.ONE_SECOND)),t):await await (0,a.hFY)(this.relayer.request(n).catch(e=>this.logger.warn(e)),this.subscribeTimeout)?t:null}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(t$.connection_stalled)}return null}async rpcBatchSubscribe(e){if(!e.length)return;let t=e[0].relay,r={method:(0,a.cOS)(t.protocol).batchSubscribe,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await (0,a.hFY)(this.relayer.request(r).catch(e=>this.logger.warn(e)),this.subscribeTimeout)}catch{this.relayer.events.emit(t$.connection_stalled)}}async rpcBatchFetchMessages(e){let t;if(!e.length)return;let r=e[0].relay,n={method:(0,a.cOS)(r.protocol).batchFetchMessages,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{t=await await (0,a.hFY)(this.relayer.request(n).catch(e=>this.logger.warn(e)),this.subscribeTimeout)}catch{this.relayer.events.emit(t$.connection_stalled)}return t}rpcUnsubscribe(e,t,r){let n={method:(0,a.cOS)(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,rf(rh({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(e=>{this.setSubscription(e.id,rh({},e)),this.pending.delete(e.topic)})}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,rh({},t)),this.topicMap.set(t.topic,e),this.events.emit(tZ.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});let t=this.subscriptions.get(e);if(!t){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});let r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(tZ.deleted,rf(rh({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(tZ.sync)}async reset(){if(this.cached.length){let e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){let e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchFetchMessages(e),await this.batchSubscribe(e)}}this.events.emit(tZ.resubscribed)}async restore(){try{let e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){let{message:e}=(0,a.kCb)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;let t=await this.rpcBatchSubscribe(e);(0,a.qt8)(t)&&this.onBatchSubscribe(t.map((t,r)=>rf(rh({},e[r]),{id:t})))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);let t=await this.rpcBatchFetchMessages(e);t&&t.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(t.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;let e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(L,async()=>{await this.checkPending()}),this.events.on(tZ.created,async e=>{let t=tZ.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(tZ.deleted,async e=>{let t=tZ.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}async restartToComplete(){this.relayer.connected||this.relayer.connecting||await this.relayer.transportOpen(),this.restartInProgress&&await new Promise(e=>{let t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var rm=Object.defineProperty,rg=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,rb=Object.prototype.propertyIsEnumerable,rv=(e,t,r)=>t in e?rm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rw=(e,t)=>{for(var r in t||(t={}))ry.call(t,r)&&rv(e,r,t[r]);if(rg)for(var r of rg(t))rb.call(t,r)&&rv(e,r,t[r]);return e};class r_ extends ec{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new i.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=(0,M.toMiliseconds)(M.THIRTY_SECONDS+M.ONE_SECOND),this.request=async e=>{var t,r;this.logger.debug("Publishing Request Payload");let n=e.id||eI().toString();await this.toEstablishConnection();try{let i=this.provider.request(e);this.requestsInFlight.set(n,{promise:i,request:e}),this.logger.trace({id:n,method:e.method,topic:null==(t=e.params)?void 0:t.topic},"relayer.request - attempt to publish...");let s=await new Promise(async(e,t)=>{let r=()=>{t(Error(`relayer.request - publish interrupted, id: ${n}`))};this.provider.on(tW.disconnect,r);let s=await i;this.provider.off(tW.disconnect,r),e(s)});return this.logger.trace({id:n,method:e.method,topic:null==(r=e.params)?void 0:r.topic},"relayer.request - published"),s}catch(e){throw this.logger.debug(`Failed to Publish Request: ${n}`),e}finally{this.requestsInFlight.delete(n)}},this.resetPingTimeout=()=>{if((0,a.UGU)())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var e,t,r;null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)||r.terminate()},this.heartBeatTimeout)}catch(e){this.logger.warn(e)}},this.onPayloadHandler=e=>{this.onProviderPayload(e),this.resetPingTimeout()},this.onConnectHandler=()=>{this.logger.trace("relayer connected"),this.startPingTimeout(),this.events.emit(t$.connect)},this.onDisconnectHandler=()=>{this.logger.trace("relayer disconnected"),this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(t$.error,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(tW.payload,this.onPayloadHandler),this.provider.on(tW.connect,this.onConnectHandler),this.provider.on(tW.disconnect,this.onDisconnectHandler),this.provider.on(tW.error,this.onProviderErrorHandler)},this.core=e.core,this.logger="u">typeof e.logger&&"string"!=typeof e.logger?ei(e.logger,this.name):z()(er({level:e.logger||"error"})),this.messages=new rr(this.logger,e.core),this.subscriber=new rp(this,this.logger),this.publisher=new rn(this,this.logger),this.relayUrl=e?.relayUrl||tH,this.projectId=e.projectId,this.bundleId=(0,a.X_B)(),this.provider={}}async init(){if(this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.subscriber.cached.length>0)try{await this.transportOpen()}catch(e){this.logger.warn(e)}}get context(){return en(this.logger)}get connected(){var e,t,r;return(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)===1}get connecting(){var e,t,r;return(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)===0}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now(),transportType:tV.relay})}async subscribe(e,t){var r;this.isInitialized(),t?.transportType==="relay"&&await this.toEstablishConnection();let n=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"",i,s=t=>{t.topic===e&&(this.subscriber.off(tZ.created,s),i())};return await Promise.all([new Promise(e=>{i=e,this.subscriber.on(tZ.created,s)}),new Promise(async r=>{n=await this.subscriber.subscribe(e,t)||n,r()})]),n}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await (0,a.hFY)(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(e,t)=>{let r=()=>{this.provider.off(tW.disconnect,r),t(Error("Connection interrupted while trying to subscribe"))};this.provider.on(tW.disconnect,r),await (0,a.hFY)(this.provider.connect(),(0,M.toMiliseconds)(M.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(e=>{t(e)}).finally(()=>{clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0}),this.subscriber.start().catch(e=>{this.logger.error(e),this.onDisconnectHandler()}),this.hasExperiencedNetworkDisruption=!1,e()})}catch(e){if(this.logger.error(e),this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(e.message))throw e}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await (0,a.Ggh)())throw Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if(e?.length===0){this.logger.trace("Batch message events is empty. Ignoring...");return}let t=e.sort((e,t)=>e.publishedAt-t.publishedAt);for(let e of(this.logger.trace(`Batch of ${t.length} message events sorted`),t))try{await this.onMessageEvent(e)}catch(e){this.logger.warn(e)}this.logger.trace(`Batch of ${t.length} message events processed`)}async onLinkMessageEvent(e,t){let{topic:r}=e;if(!t.sessionExists){let e=(0,a.gn4)(M.FIVE_MINUTES);await this.core.pairing.pairings.set(r,{topic:r,expiry:e,relay:{protocol:"irn"},active:!1})}this.events.emit(t$.message,e),await this.recordMessageEvent(e)}startPingTimeout(){var e,t,r,n,i;if((0,a.UGU)())try{null!=(t=null==(e=this.provider)?void 0:e.connection)&&t.socket&&(null==(i=null==(n=null==(r=this.provider)?void 0:r.connection)?void 0:n.socket)||i.once("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(e){this.logger.warn(e)}}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new eH(new eV((0,a.$0m)({sdkVersion:tG,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){let{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){let{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;let n=this.messages.has(t,r);return n&&this.logger.debug(`Ignoring duplicate message: ${r}`),n}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),ez(e)){if(!e.method.endsWith("_subscription"))return;let t=e.params,{topic:r,message:n,publishedAt:i,attestation:s}=t.data,a={topic:r,message:n,publishedAt:i,transportType:tV.relay,attestation:s};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(rw({type:"event",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else eU(e)&&this.events.emit(t$.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(t$.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){let t=eP(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(tW.payload,this.onPayloadHandler),this.provider.off(tW.connect,this.onConnectHandler),this.provider.off(tW.disconnect,this.onDisconnectHandler),this.provider.off(tW.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await (0,a.Ggh)();(0,a.uwg)(async t=>{e!==t&&(e=t,t?await this.restartTransport().catch(e=>this.logger.error(e)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit(t$.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&(this.reconnectTimeout||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},(0,M.toMiliseconds)(.1))))}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),this.connected||(this.connectionAttemptInProgress&&await new Promise(e=>{let t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}}var rE=Object.defineProperty,rk=Object.getOwnPropertySymbols,rx=Object.prototype.hasOwnProperty,rS=Object.prototype.propertyIsEnumerable,rA=(e,t,r)=>t in e?rE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rC=(e,t)=>{for(var r in t||(t={}))rx.call(t,r)&&rA(e,r,t[r]);if(rk)for(var r of rk(t))rS.call(t,r)&&rA(e,r,t[r]);return e};class rI extends el{constructor(e,t,r,n=tB,i){super(e,t,r,n),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=tB,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>{this.getKey&&null!==e&&!(0,a.o8e)(e)?this.map.set(this.getKey(e),e):(0,a.xWS)(e)?this.map.set(e.id,e):(0,a.h1R)(e)&&this.map.set(e.topic,e)}),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter(t=>Object.keys(e).every(r=>eZ()(t[r],e[r]))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});let r=rC(rC({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),this.addToRecentlyDeleted(e),await this.persist())},this.logger=ei(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return en(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){let t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(t),Error(t)}let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{let e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){let{message:e}=(0,a.kCb)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}}class rR{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(s()),this.initialized=!1,this.storagePrefix=tB,this.ignoredPayloadTypes=[a.rVF],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async e=>{this.isInitialized();let t=(0,a.jdp)(),r=await this.core.crypto.setSymKey(t),n=(0,a.gn4)(M.FIVE_MINUTES),i={protocol:"irn"},s=(0,a.Bvr)({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:t,relay:i,expiryTimestamp:n,methods:e?.methods});return this.core.expirer.set(r,n),await this.pairings.set(r,{topic:r,expiry:n,relay:i,active:!1}),await this.core.relayer.subscribe(r,{transportType:e?.transportType}),{topic:r,uri:s}},this.pair=async e=>{let t;this.isInitialized();let r=this.core.eventClient.createEvent({properties:{topic:e?.uri,trace:[t5.pairing_started]}});this.isValidPair(e,r);let{topic:n,symKey:i,relay:s,expiryTimestamp:o,methods:u}=(0,a.heJ)(e.uri);if(r.props.properties.topic=n,r.addTrace(t5.pairing_uri_validation_success),r.addTrace(t5.pairing_uri_not_expired),this.pairings.keys.includes(n)){if(t=this.pairings.get(n),r.addTrace(t5.existing_pairing),t.active)throw r.setError(t6.active_pairing_already_exists),Error(`Pairing already exists: ${n}. Please try again with a new connection URI.`);r.addTrace(t5.pairing_not_expired)}let c=o||(0,a.gn4)(M.FIVE_MINUTES),l={topic:n,relay:s,expiry:c,active:!1,methods:u};this.core.expirer.set(n,c),await this.pairings.set(n,l),r.addTrace(t5.store_new_pairing),e.activatePairing&&await this.activate({topic:n}),this.events.emit(tQ.create,l),r.addTrace(t5.emit_inactive_pairing),this.core.crypto.keychain.has(n)||await this.core.crypto.setSymKey(i,n),r.addTrace(t5.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{r.setError(t6.no_internet_connection)}try{await this.core.relayer.subscribe(n,{relay:s})}catch(e){throw r.setError(t6.subscribe_pairing_topic_failure),e}return r.addTrace(t5.subscribe_pairing_topic_success),l},this.activate=async({topic:e})=>{this.isInitialized();let t=(0,a.gn4)(M.THIRTY_DAYS);this.core.expirer.set(e,t),await this.pairings.update(e,{active:!0,expiry:t})},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);let{topic:t}=e;if(this.pairings.keys.includes(t)){let e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=(0,a.H1S)();this.events.once((0,a.E0T)("pairing_ping",e),({error:e})=>{e?i(e):n()}),await r()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);let{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",(0,a.D6H)("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{let n=eR(t,r),i=await this.core.crypto.encode(e,n),s=tJ[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,s),n.id},this.sendResult=async(e,t,r)=>{let n=eP(e,r),i=await this.core.crypto.encode(t,n),s=tJ[(await this.core.history.get(t,e)).request.method].res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.sendError=async(e,t,r)=>{let n=eN(e,r),i=await this.core.crypto.encode(t,n),s=await this.core.history.get(t,e),a=tJ[s.request.method]?tJ[s.request.method].res:tJ.unregistered_method.res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(n)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,(0,a.D6H)("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{let e=this.pairings.getAll().filter(e=>(0,a.BwD)(e.expiry));await Promise.all(e.map(e=>this.deletePairing(e.topic)))},this.onRelayEventRequest=e=>{let{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{let{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)},this.onPairingPingRequest=async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit(tQ.ping,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{let{id:r}=t;setTimeout(()=>{ej(t)?this.events.emit((0,a.E0T)("pairing_ping",r),{}):eF(t)&&this.events.emit((0,a.E0T)("pairing_ping",r),{error:t.error})},500)},this.onPairingDeleteRequest=async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(tQ.delete,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{let{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;let t=(0,a.D6H)("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error((0,a.D6H)("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=(e,t)=>{var r;if(!(0,a.EJd)(e)){let{message:r}=(0,a.kCb)("MISSING_OR_INVALID",`pair() params: ${e}`);throw t.setError(t6.malformed_pairing_uri),Error(r)}if(!(0,a.jvJ)(e.uri)){let{message:r}=(0,a.kCb)("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw t.setError(t6.malformed_pairing_uri),Error(r)}let n=(0,a.heJ)(e?.uri);if(!(null!=(r=n?.relay)&&r.protocol)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID","pair() uri#relay-protocol");throw t.setError(t6.malformed_pairing_uri),Error(e)}if(!(null!=n&&n.symKey)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID","pair() uri#symKey");throw t.setError(t6.malformed_pairing_uri),Error(e)}if(null!=n&&n.expiryTimestamp&&(0,M.toMiliseconds)(n?.expiryTimestamp)<Date.now()){t.setError(t6.pairing_expired);let{message:e}=(0,a.kCb)("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw Error(e)}},this.isValidPing=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!(0,a.M_r)(e,!1)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.pairings.keys.includes(e)){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if((0,a.BwD)(this.pairings.get(e).expiry)){await this.deletePairing(e);let{message:t}=(0,a.kCb)("EXPIRED",`pairing topic: ${e}`);throw Error(t)}},this.core=e,this.logger=ei(t,this.name),this.pairings=new rI(this.core,this.logger,this.name,this.storagePrefix)}get context(){return en(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}registerRelayerEvents(){this.core.relayer.on(t$.message,async e=>{let{topic:t,message:r,transportType:n}=e;if(!this.pairings.keys.includes(t)||n===tV.link_mode||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;let i=await this.core.crypto.decode(t,r);try{ez(i)?(this.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):eU(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.core.history.delete(t,i.id))}catch(e){this.logger.error(e)}})}registerExpirerEvents(){this.core.expirer.on(t0.expired,async e=>{let{topic:t}=(0,a.iPz)(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(tQ.expire,{topic:t}))})}}class rP extends ea{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new i.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=tB,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>this.records.set(e.id,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;let n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:(0,a.gn4)(M.THIRTY_DAYS)};this.records.set(n.id,n),this.persist(),this.events.emit(tX.created,n)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;let t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=eF(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.persist(),this.events.emit(tX.updated,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach(r=>{r.topic!==e||"u">typeof t&&r.id!==t||(this.records.delete(r.id),this.events.emit(tX.deleted,r))}),this.persist()},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=ei(t,this.name)}get context(){return en(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let e=[];return this.values.forEach(t=>{if("u">typeof t.response)return;let r={topic:t.topic,request:eR(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();let t=this.records.get(e);if(!t){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(tX.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){let{message:e}=(0,a.kCb)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(tX.created,e=>{let t=tX.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(tX.updated,e=>{let t=tX.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(tX.deleted,e=>{let t=tX.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(L,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{(0,M.toMiliseconds)(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(tX.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}}class rN extends eh{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new i.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=tB,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>this.expirations.set(e.target,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{let t=this.formatTarget(e);return"u">typeof this.getExpiration(t)}catch{return!1}},this.set=(e,t)=>{this.isInitialized();let r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(t0.created,{target:r,expiration:n})},this.get=e=>{this.isInitialized();let t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){let t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(t0.deleted,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=ei(t,this.name)}get context(){return en(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return(0,a.Z42)(e);if("number"==typeof e)return(0,a.GqV)(e);let{message:t}=(0,a.kCb)("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(t0.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){let{message:e}=(0,a.kCb)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){let t=this.expirations.get(e);if(!t){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(t),Error(t)}return t}checkExpiry(e,t){let{expiry:r}=t;(0,M.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(t0.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(L,()=>this.checkExpirations()),this.events.on(t0.created,e=>{let t=t0.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(t0.expired,e=>{let t=t0.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(t0.deleted,e=>{let t=t0.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}}var rM={};function rT(e){let t;return"u">typeof window&&"u">typeof window[e]&&(t=window[e]),t}function rO(e){let t=rT(e);if(!t)throw Error(`${e} is not defined in Window`);return t}Object.defineProperty(rM,"__esModule",{value:!0}),rM.getLocalStorage=rM.getLocalStorageOrThrow=rM.getCrypto=rM.getCryptoOrThrow=rM.getLocation=rM.getLocationOrThrow=rM.getNavigator=rM.getNavigatorOrThrow=rD=rM.getDocument=rM.getDocumentOrThrow=rM.getFromWindowOrThrow=rM.getFromWindow=void 0,rM.getFromWindow=rT,rM.getFromWindowOrThrow=rO,rM.getDocumentOrThrow=function(){return rO("document")};var rD=rM.getDocument=function(){return rT("document")};rM.getNavigatorOrThrow=function(){return rO("navigator")},rM.getNavigator=function(){return rT("navigator")},rM.getLocationOrThrow=function(){return rO("location")},rM.getLocation=function(){return rT("location")},rM.getCryptoOrThrow=function(){return rO("crypto")},rM.getCrypto=function(){return rT("crypto")},rM.getLocalStorageOrThrow=function(){return rO("localStorage")},rM.getLocalStorage=function(){return rT("localStorage")};class rL extends ef{constructor(e,t,r){super(e,t,r),this.core=e,this.logger=t,this.store=r,this.name="verify-api",this.verifyUrlV3=t2,this.storagePrefix=tB,this.version=2,this.init=async()=>{var e;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&(0,M.toMiliseconds)(null==(e=this.publicKey)?void 0:e.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))},this.register=async e=>{if(!(0,a.jUY)()||this.isDevEnv)return;let t=window.location.origin,{id:r,decryptedId:n}=e,i=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${t}&id=${r}&decryptedId=${n}`;try{let e=rD(),t=this.startAbortTimer(5*M.ONE_SECOND),n=await new Promise((n,s)=>{let a=()=>{window.removeEventListener("message",u),e.body.removeChild(o),s("attestation aborted")};this.abortController.signal.addEventListener("abort",a);let o=e.createElement("iframe");o.src=i,o.style.display="none",o.addEventListener("error",a,{signal:this.abortController.signal});let u=i=>{if(!i.data)return;let s=JSON.parse(i.data);if("verify_attestation"===s.type){if((0,eb.decodeJWT)(s.attestation).payload.id!==r)return;clearInterval(t),e.body.removeChild(o),this.abortController.signal.removeEventListener("abort",a),window.removeEventListener("message",u),n(null===s.attestation?"":s.attestation)}};e.body.appendChild(o),window.addEventListener("message",u,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",n),n}catch(e){this.logger.warn(e)}return""},this.resolve=async e=>{if(this.isDevEnv)return"";let{attestationId:t,hash:r,encryptedId:n}=e;if(""===t){this.logger.debug("resolve: attestationId is empty, skipping");return}if(t){if((0,eb.decodeJWT)(t).payload.id!==n)return;let e=await this.isValidJwtAttestation(t);if(e){if(!e.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return e}}if(!r)return;let i=this.getVerifyUrl(e?.verifyUrl);return this.fetchAttestation(r,i)},this.fetchAttestation=async(e,t)=>{this.logger.debug(`resolving attestation: ${e} from url: ${t}`);let r=this.startAbortTimer(5*M.ONE_SECOND),n=await fetch(`${t}/attestation/${e}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(r),200===n.status?await n.json():void 0},this.getVerifyUrl=e=>{let t=e||t1;return t3.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${t1}`),t=t1),t},this.fetchPublicKey=async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);let e=this.startAbortTimer(M.FIVE_SECONDS),t=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(e),await t.json()}catch(e){this.logger.warn(e)}},this.persistPublicKey=async e=>{this.logger.debug("persisting public key to local storage",e),await this.store.setItem(this.storeKey,e),this.publicKey=e},this.removePublicKey=async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0},this.isValidJwtAttestation=async e=>{let t=await this.getPublicKey();try{if(t)return this.validateAttestation(e,t)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}let r=await this.fetchAndPersistPublicKey();try{if(r)return this.validateAttestation(e,r)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}},this.getPublicKey=async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey(),this.fetchAndPersistPublicKey=async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async e=>{let t=await this.fetchPublicKey();t&&(await this.persistPublicKey(t),e(t))});let e=await this.fetchPromise;return this.fetchPromise=void 0,e},this.validateAttestation=(e,t)=>{let r=(0,a.NbI)(e,t.publicKey),n={hasExpired:(0,M.toMiliseconds)(r.exp)<Date.now(),payload:r};if(n.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),Error("JWT attestation expired");return{origin:n.payload.origin,isScam:n.payload.isScam,isVerified:n.payload.isVerified}},this.logger=ei(t,this.name),this.abortController=new AbortController,this.isDevEnv=(0,a.h9F)(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return en(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,M.toMiliseconds)(e))}}class rB extends ep{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{let{clientId:t,token:r,notificationType:n,enableEncrypted:i=!1}=e,s=`https://echo.walletconnect.com/${this.projectId}/clients`;await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:n,token:r,always_raw:i})})},this.logger=ei(t,this.context)}}var rq=Object.defineProperty,rz=Object.getOwnPropertySymbols,rU=Object.prototype.hasOwnProperty,rj=Object.prototype.propertyIsEnumerable,rF=(e,t,r)=>t in e?rq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rH=(e,t)=>{for(var r in t||(t={}))rU.call(t,r)&&rF(e,r,t[r]);if(rz)for(var r of rz(t))rj.call(t,r)&&rF(e,r,t[r]);return e};class r$ extends em{constructor(e,t,r=!0){super(e,t,r),this.core=e,this.logger=t,this.context="event-client",this.storagePrefix=tB,this.storageVersion=.1,this.events=new Map,this.shouldPersist=!1,this.init=async()=>{if(!(0,a.h9F)())try{let e={eventId:(0,a.k$y)(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:(0,a.oIp)(this.core.relayer.protocol,this.core.relayer.version,tG)}}};await this.sendEvent([e])}catch(e){this.logger.warn(e)}},this.createEvent=e=>{let{event:t="ERROR",type:r="",properties:{topic:n,trace:i}}=e,s=(0,a.k$y)(),o=this.core.projectId||"",u=rH({eventId:s,timestamp:Date.now(),props:{event:t,type:r,properties:{topic:n,trace:i}},bundleId:o,domain:this.getAppDomain()},this.setMethods(s));return this.telemetryEnabled&&(this.events.set(s,u),this.shouldPersist=!0),u},this.getEvent=e=>{let{eventId:t,topic:r}=e;if(t)return this.events.get(t);let n=Array.from(this.events.values()).find(e=>e.props.properties.topic===r);if(n)return rH(rH({},n),this.setMethods(n.eventId))},this.deleteEvent=e=>{let{eventId:t}=e;this.events.delete(t),this.shouldPersist=!0},this.setEventListeners=()=>{this.core.heartbeat.on(L,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(e=>{(0,M.fromMiliseconds)(Date.now())-(0,M.fromMiliseconds)(e.timestamp)>86400&&(this.events.delete(e.eventId),this.shouldPersist=!0)})})},this.setMethods=e=>({addTrace:t=>this.addTrace(e,t),setError:t=>this.setError(e,t)}),this.addTrace=(e,t)=>{let r=this.events.get(e);r&&(r.props.properties.trace.push(t),this.events.set(e,r),this.shouldPersist=!0)},this.setError=(e,t)=>{let r=this.events.get(e);r&&(r.props.type=t,r.timestamp=Date.now(),this.events.set(e,r),this.shouldPersist=!0)},this.persist=async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1},this.restore=async()=>{try{let e=await this.core.storage.getItem(this.storageKey)||[];if(!e.length)return;e.forEach(e=>{this.events.set(e.eventId,rH(rH({},e),this.setMethods(e.eventId)))})}catch(e){this.logger.warn(e)}},this.submit=async()=>{if(!this.telemetryEnabled||0===this.events.size)return;let e=[];for(let[t,r]of this.events)r.props.type&&e.push(r);if(0!==e.length)try{if((await this.sendEvent(e)).ok)for(let t of e)this.events.delete(t.eventId),this.shouldPersist=!0}catch(e){this.logger.warn(e)}},this.sendEvent=async e=>{let t=this.getAppDomain()?"":"&sp=desktop";return await fetch(`https://pulse.walletconnect.com/batch?projectId=${this.core.projectId}&st=events_sdk&sv=js-${tG}${t}`,{method:"POST",body:JSON.stringify(e)})},this.getAppDomain=()=>(0,a.DaH)().url,this.logger=ei(t,this.context),this.telemetryEnabled=r,r?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var rW=Object.defineProperty,rG=Object.getOwnPropertySymbols,rV=Object.prototype.hasOwnProperty,rK=Object.prototype.propertyIsEnumerable,rZ=(e,t,r)=>t in e?rW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rY=(e,t)=>{for(var r in t||(t={}))rV.call(t,r)&&rZ(e,r,t[r]);if(rG)for(var r of rG(t))rK.call(t,r)&&rZ(e,r,t[r]);return e};class rJ extends es{constructor(e){var t,r;super(e),this.protocol="wc",this.version=2,this.name=tL,this.events=new i.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.dispatchEnvelope=({topic:e,message:t,sessionExists:r})=>{if(!e||!t)return;let n={topic:e,message:t,publishedAt:Date.now(),transportType:tV.link_mode};this.relayer.onLinkMessageEvent(n,{sessionExists:r})},this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||tH,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";let{logger:n,chunkLoggerController:s}="u">typeof(r={opts:er({level:"string"==typeof e?.logger&&e.logger?e.logger:tq.logger}),maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger}).loggerOverride&&"string"!=typeof r.loggerOverride?{logger:r.loggerOverride,chunkLoggerController:null}:"u">typeof window?function(e){var t,r;let n=new W(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:z()(et(ee({},e.opts),{level:"trace",browser:et(ee({},null==(r=e.opts)?void 0:r.browser),{write:e=>n.write(e)})})),chunkLoggerController:n}}(r):function(e){var t;let r=new G(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:z()(et(ee({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}(r);this.logChunkController=s,null!=(t=this.logChunkController)&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var e,t;null!=(e=this.logChunkController)&&e.downloadLogsBlobInBrowser&&(null==(t=this.logChunkController)||t.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=ei(n,this.name),this.heartbeat=new B,this.crypto=new rt(this,this.logger,e?.keychain),this.history=new rP(this,this.logger),this.expirer=new rN(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new N(rY(rY({},tz),e?.storageOptions)),this.relayer=new r_({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new rR(this,this.logger),this.verify=new rL(this,this.logger,this.storage),this.echoClient=new rB(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new r$(this,this.logger,e?.telemetryEnabled)}static async init(e){let t=new rJ(e);await t.initialize();let r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return en(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return null==(e=this.logChunkController)?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(tK,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.eventClient.init(),this.linkModeSupportedApps=await this.storage.getItem(tK)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}let rQ="client",rX=`wc@2:${rQ}:`,r0={name:rQ,logger:"error"},r1="WALLETCONNECT_DEEPLINK_CHOICE",r2="Proposal expired",r3=M.SEVEN_DAYS,r5={wc_sessionPropose:{req:{ttl:M.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:M.ONE_DAY,prompt:!1,tag:1104},res:{ttl:M.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:M.ONE_DAY,prompt:!1,tag:1106},res:{ttl:M.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:M.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:M.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:M.ONE_DAY,prompt:!1,tag:1112},res:{ttl:M.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:M.ONE_DAY,prompt:!1,tag:1114},res:{ttl:M.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:M.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:M.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:M.FIVE_MINUTES,prompt:!1,tag:1119}}},r6={min:M.FIVE_MINUTES,max:M.SEVEN_DAYS},r4={idle:"IDLE",active:"ACTIVE"},r8=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],r9="wc@1.5:auth:",r7=`${r9}:PUB_KEY`;var ne=Object.defineProperty,nt=Object.defineProperties,nr=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,ni=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable,na=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,no=(e,t)=>{for(var r in t||(t={}))ni.call(t,r)&&na(e,r,t[r]);if(nn)for(var r of nn(t))ns.call(t,r)&&na(e,r,t[r]);return e},nu=(e,t)=>nt(e,nr(t));class nc extends ey{constructor(e){super(e),this.name="engine",this.events=new(s()),this.initialized=!1,this.requestQueue={state:r4.idle,queue:[]},this.sessionRequestQueue={state:r4.idle,queue:[]},this.requestQueueDelay=M.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.relayMessageCache=[],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(r5)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,M.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();let t=nu(no({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);let{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:s,relays:o}=t,u=r,c,l=!1;try{u&&(l=this.client.core.pairing.pairings.get(u).active)}catch(e){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),e}if(!u||!l){let{topic:e,uri:t}=await this.client.core.pairing.create();u=e,c=t}if(!u){let{message:e}=(0,a.kCb)("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw Error(e)}let d=await this.client.core.crypto.generateKeyPair(),h=r5.wc_sessionPropose.req.ttl||M.FIVE_MINUTES,f=(0,a.gn4)(h),p=no({requiredNamespaces:n,optionalNamespaces:i,relays:o??[{protocol:"irn"}],proposer:{publicKey:d,metadata:this.client.metadata},expiryTimestamp:f,pairingTopic:u},s&&{sessionProperties:s}),{reject:m,resolve:g,done:y}=(0,a.H1S)(h,r2);this.events.once((0,a.E0T)("session_connect"),async({error:e,session:t})=>{if(e)m(e);else if(t){t.self.publicKey=d;let e=nu(no({},t),{pairingTopic:p.pairingTopic,requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces,transportType:tV.relay});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:t.peer.metadata}),this.cleanupDuplicatePairings(e),g(e)}});let b=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(b,no({id:b},p)),{uri:c,approval:y}},this.pair=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(e)}catch(e){throw this.client.logger.error("pair() failed"),e}},this.approve=async e=>{var t,r,n;let i=this.client.core.eventClient.createEvent({properties:{topic:null==(t=e?.id)?void 0:t.toString(),trace:[t4.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(e){throw i.setError(t8.no_internet_connection),e}try{await this.isValidProposalId(e?.id)}catch(t){throw this.client.logger.error(`approve() -> proposal.get(${e?.id}) failed`),i.setError(t8.proposal_not_found),t}try{await this.isValidApprove(e)}catch(e){throw this.client.logger.error("approve() -> isValidApprove() failed"),i.setError(t8.session_approve_namespace_validation_failure),e}let{id:s,relayProtocol:o,namespaces:u,sessionProperties:c,sessionConfig:l}=e,d=this.client.proposal.get(s);this.client.core.eventClient.deleteEvent({eventId:i.eventId});let{pairingTopic:h,proposer:f,requiredNamespaces:p,optionalNamespaces:m}=d,g=null==(r=this.client.core.eventClient)?void 0:r.getEvent({topic:h});g||(g=null==(n=this.client.core.eventClient)?void 0:n.createEvent({type:t4.session_approve_started,properties:{topic:h,trace:[t4.session_approve_started,t4.session_namespaces_validation_success]}}));let y=await this.client.core.crypto.generateKeyPair(),b=f.publicKey,v=await this.client.core.crypto.generateSharedKey(y,b),w=no(no({relay:{protocol:o??"irn"},namespaces:u,controller:{publicKey:y,metadata:this.client.metadata},expiry:(0,a.gn4)(r3)},c&&{sessionProperties:c}),l&&{sessionConfig:l}),_=tV.relay;g.addTrace(t4.subscribing_session_topic);try{await this.client.core.relayer.subscribe(v,{transportType:_})}catch(e){throw g.setError(t8.subscribe_session_topic_failure),e}g.addTrace(t4.subscribe_session_topic_success);let E=nu(no({},w),{topic:v,requiredNamespaces:p,optionalNamespaces:m,pairingTopic:h,acknowledged:!1,self:w.controller,peer:{publicKey:f.publicKey,metadata:f.metadata},controller:y,transportType:tV.relay});await this.client.session.set(v,E),g.addTrace(t4.store_session);try{g.addTrace(t4.publishing_session_settle),await this.sendRequest({topic:v,method:"wc_sessionSettle",params:w,throwOnFailedPublish:!0}).catch(e=>{throw g?.setError(t8.session_settle_publish_failure),e}),g.addTrace(t4.session_settle_publish_success),g.addTrace(t4.publishing_session_approve),await this.sendResult({id:s,topic:h,result:{relay:{protocol:o??"irn"},responderPublicKey:y},throwOnFailedPublish:!0}).catch(e=>{throw g?.setError(t8.session_approve_publish_failure),e}),g.addTrace(t4.session_approve_publish_success)}catch(e){throw this.client.logger.error(e),this.client.session.delete(v,(0,a.D6H)("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(v),e}return this.client.core.eventClient.deleteEvent({eventId:g.eventId}),await this.client.core.pairing.updateMetadata({topic:h,metadata:f.metadata}),await this.client.proposal.delete(s,(0,a.D6H)("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:h}),await this.setExpiry(v,(0,a.gn4)(r3)),{topic:v,acknowledged:()=>Promise.resolve(this.client.session.get(v))}},this.reject=async e=>{let t;this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(e)}catch(e){throw this.client.logger.error("reject() -> isValidReject() failed"),e}let{id:r,reason:n}=e;try{t=this.client.proposal.get(r).pairingTopic}catch(e){throw this.client.logger.error(`reject() -> proposal.get(${r}) failed`),e}t&&(await this.sendError({id:r,topic:t,error:n,rpcOpts:r5.wc_sessionPropose.reject}),await this.client.proposal.delete(r,(0,a.D6H)("USER_DISCONNECTED")))},this.update=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(e)}catch(e){throw this.client.logger.error("update() -> isValidUpdate() failed"),e}let{topic:t,namespaces:r}=e,{done:n,resolve:i,reject:s}=(0,a.H1S)(),o=eC(),u=eI().toString(),c=this.client.session.get(t).namespaces;return this.events.once((0,a.E0T)("session_update",o),({error:e})=>{e?s(e):i()}),await this.client.session.update(t,{namespaces:r}),await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r},throwOnFailedPublish:!0,clientRpcId:o,relayRpcId:u}).catch(e=>{this.client.logger.error(e),this.client.session.update(t,{namespaces:c}),s(e)}),{acknowledged:n}},this.extend=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(e)}catch(e){throw this.client.logger.error("extend() -> isValidExtend() failed"),e}let{topic:t}=e,r=eC(),{done:n,resolve:i,reject:s}=(0,a.H1S)();return this.events.once((0,a.E0T)("session_extend",r),({error:e})=>{e?s(e):i()}),await this.setExpiry(t,(0,a.gn4)(r3)),this.sendRequest({topic:t,method:"wc_sessionExtend",params:{},clientRpcId:r,throwOnFailedPublish:!0}).catch(e=>{s(e)}),{acknowledged:n}},this.request=async e=>{this.isInitialized();try{await this.isValidRequest(e)}catch(e){throw this.client.logger.error("request() -> isValidRequest() failed"),e}let{chainId:t,request:r,topic:n,expiry:i=r5.wc_sessionRequest.req.ttl}=e,s=this.client.session.get(n);s?.transportType===tV.relay&&await this.confirmOnlineStateOrThrow();let o=eC(),u=eI().toString(),{done:c,resolve:l,reject:d}=(0,a.H1S)(i,"Request expired. Please try again.");this.events.once((0,a.E0T)("session_request",o),({error:e,result:t})=>{e?d(e):l(t)});let h=this.getAppLinkIfEnabled(s.peer.metadata,s.transportType);return h?(await this.sendRequest({clientRpcId:o,relayRpcId:u,topic:n,method:"wc_sessionRequest",params:{request:nu(no({},r),{expiryTimestamp:(0,a.gn4)(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0,appLink:h}).catch(e=>d(e)),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:o}),await c()):await Promise.all([new Promise(async e=>{await this.sendRequest({clientRpcId:o,relayRpcId:u,topic:n,method:"wc_sessionRequest",params:{request:nu(no({},r),{expiryTimestamp:(0,a.gn4)(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0}).catch(e=>d(e)),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:o}),e()}),new Promise(async e=>{var t;if(!(null!=(t=s.sessionConfig)&&t.disableDeepLink)){let e=await (0,a.bW6)(this.client.core.storage,r1);(0,a.HhN)({id:o,topic:n,wcDeepLink:e})}e()}),c()]).then(e=>e[2])},this.respond=async e=>{this.isInitialized(),await this.isValidRespond(e);let{topic:t,response:r}=e,{id:n}=r,i=this.client.session.get(t);i.transportType===tV.relay&&await this.confirmOnlineStateOrThrow();let s=this.getAppLinkIfEnabled(i.peer.metadata,i.transportType);ej(r)?await this.sendResult({id:n,topic:t,result:r.result,throwOnFailedPublish:!0,appLink:s}):eF(r)&&await this.sendError({id:n,topic:t,error:r.error,appLink:s}),this.cleanupAfterResponse(e)},this.ping=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(e)}catch(e){throw this.client.logger.error("ping() -> isValidPing() failed"),e}let{topic:t}=e;if(this.client.session.keys.includes(t)){let e=eC(),r=eI().toString(),{done:n,resolve:i,reject:s}=(0,a.H1S)();this.events.once((0,a.E0T)("session_ping",e),({error:e})=>{e?s(e):i()}),await Promise.all([this.sendRequest({topic:t,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:e,relayRpcId:r}),n()])}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(e);let{topic:t,event:r,chainId:n}=e,i=eI().toString();await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:n},throwOnFailedPublish:!0,relayRpcId:i})},this.disconnect=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(e);let{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:(0,a.D6H)("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(t))await this.client.core.pairing.disconnect({topic:t});else{let{message:e}=(0,a.kCb)("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw Error(e)}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter(t=>(0,a.Ih8)(t,e))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async(e,t)=>{var r;let n;this.isInitialized(),this.isValidAuthenticate(e);let i=t&&this.client.core.linkModeSupportedApps.includes(t)&&(null==(r=this.client.metadata.redirect)?void 0:r.linkMode),s=i?tV.link_mode:tV.relay;s===tV.relay&&await this.confirmOnlineStateOrThrow();let{chains:o,statement:u="",uri:c,domain:l,nonce:d,type:h,exp:f,nbf:p,methods:m=[],expiry:g}=e,y=[...e.resources||[]],{topic:b,uri:v}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:s});this.client.logger.info({message:"Generated new pairing",pairing:{topic:b,uri:v}});let w=await this.client.core.crypto.generateKeyPair(),_=(0,a.YmJ)(w);if(await Promise.all([this.client.auth.authKeys.set(r7,{responseTopic:_,publicKey:w}),this.client.auth.pairingTopics.set(_,{topic:_,pairingTopic:b})]),await this.client.core.relayer.subscribe(_,{transportType:s}),this.client.logger.info(`sending request to new pairing topic: ${b}`),m.length>0){let{namespace:e}=(0,a.DQe)(o[0]),t=(0,a.IkP)(e,"request",m);(0,a.hA9)(y)&&(t=(0,a.qJM)(t,y.pop())),y.push(t)}let E=g&&g>r5.wc_sessionAuthenticate.req.ttl?g:r5.wc_sessionAuthenticate.req.ttl,k={authPayload:{type:h??"caip122",chains:o,statement:u,aud:c,domain:l,version:"1",nonce:d,iat:new Date().toISOString(),exp:f,nbf:p,resources:y},requester:{publicKey:w,metadata:this.client.metadata},expiryTimestamp:(0,a.gn4)(E)},x={requiredNamespaces:{},optionalNamespaces:{eip155:{chains:o,methods:[...new Set(["personal_sign",...m])],events:["chainChanged","accountsChanged"]}},relays:[{protocol:"irn"}],pairingTopic:b,proposer:{publicKey:w,metadata:this.client.metadata},expiryTimestamp:(0,a.gn4)(r5.wc_sessionPropose.req.ttl)},{done:S,resolve:A,reject:C}=(0,a.H1S)(E,"Request expired"),I=async({error:e,session:t})=>{if(this.events.off((0,a.E0T)("session_request",P),R),e)C(e);else if(t){t.self.publicKey=w,await this.client.session.set(t.topic,t),await this.setExpiry(t.topic,t.expiry),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:t.peer.metadata});let e=this.client.session.get(t.topic);await this.deleteProposal(N),A({session:e})}},R=async e=>{var r,n,i;let o;if(await this.deletePendingAuthRequest(P,{message:"fulfilled",code:0}),e.error){let t=(0,a.D6H)("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return e.error.code===t.code?void 0:(this.events.off((0,a.E0T)("session_connect"),I),C(e.error.message))}await this.deleteProposal(N),this.events.off((0,a.E0T)("session_connect"),I);let{cacaos:u,responder:c}=e.result,l=[],d=[];for(let e of u){await (0,a.c4l)({cacao:e,projectId:this.client.core.projectId})||(this.client.logger.error(e,"Signature verification failed"),C((0,a.D6H)("SESSION_SETTLEMENT_FAILED","Signature verification failed")));let{p:t}=e,r=(0,a.hA9)(t.resources),n=[(0,a.DJo)(t.iss)],i=(0,a.NmC)(t.iss);if(r){let e=(0,a.Y31)(r),t=(0,a.ouN)(r);l.push(...e),n.push(...t)}for(let e of n)d.push(`${e}:${i}`)}let h=await this.client.core.crypto.generateSharedKey(w,c.publicKey);l.length>0&&(o={topic:h,acknowledged:!0,self:{publicKey:w,metadata:this.client.metadata},peer:c,controller:c.publicKey,expiry:(0,a.gn4)(r3),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:b,namespaces:(0,a.E12)([...new Set(l)],[...new Set(d)]),transportType:s},await this.client.core.relayer.subscribe(h,{transportType:s}),await this.client.session.set(h,o),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:c.metadata}),o=this.client.session.get(h)),null!=(r=this.client.metadata.redirect)&&r.linkMode&&null!=(n=c.metadata.redirect)&&n.linkMode&&null!=(i=c.metadata.redirect)&&i.universal&&t&&(this.client.core.addLinkModeSupportedApp(c.metadata.redirect.universal),this.client.session.update(h,{transportType:tV.link_mode})),A({auths:u,session:o})},P=eC(),N=eC();this.events.once((0,a.E0T)("session_connect"),I),this.events.once((0,a.E0T)("session_request",P),R);try{if(i){let e=eR("wc_sessionAuthenticate",k,P);this.client.core.history.set(b,e);let r=await this.client.core.crypto.encode("",e,{type:a.FpL,encoding:a.zl_});n=(0,a.L9d)(t,b,r)}else await Promise.all([this.sendRequest({topic:b,method:"wc_sessionAuthenticate",params:k,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:P}),this.sendRequest({topic:b,method:"wc_sessionPropose",params:x,expiry:r5.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:N})])}catch(e){throw this.events.off((0,a.E0T)("session_connect"),I),this.events.off((0,a.E0T)("session_request",P),R),e}return await this.setProposal(N,no({id:N},x)),await this.setAuthRequest(P,{request:nu(no({},k),{verifyContext:{}}),pairingTopic:b,transportType:s}),{uri:n??v,response:S}},this.approveSessionAuthenticate=async e=>{let t;let{id:r,auths:n}=e,i=this.client.core.eventClient.createEvent({properties:{topic:r.toString(),trace:[t9.authenticated_session_approve_started]}});try{this.isInitialized()}catch(e){throw i.setError(t7.no_internet_connection),e}let s=this.getPendingAuthRequest(r);if(!s)throw i.setError(t7.authenticated_session_pending_request_not_found),Error(`Could not find pending auth request with id ${r}`);let o=s.transportType||tV.relay;o===tV.relay&&await this.confirmOnlineStateOrThrow();let u=s.requester.publicKey,c=await this.client.core.crypto.generateKeyPair(),l=(0,a.YmJ)(u),d={type:a.rVF,receiverPublicKey:u,senderPublicKey:c},h=[],f=[];for(let e of n){if(!await (0,a.c4l)({cacao:e,projectId:this.client.core.projectId})){i.setError(t7.invalid_cacao);let e=(0,a.D6H)("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:r,topic:l,error:e,encodeOpts:d}),Error(e.message)}i.addTrace(t9.cacaos_verified);let{p:t}=e,n=(0,a.hA9)(t.resources),s=[(0,a.DJo)(t.iss)],o=(0,a.NmC)(t.iss);if(n){let e=(0,a.Y31)(n),t=(0,a.ouN)(n);h.push(...e),s.push(...t)}for(let e of s)f.push(`${e}:${o}`)}let p=await this.client.core.crypto.generateSharedKey(c,u);if(i.addTrace(t9.create_authenticated_session_topic),h?.length>0){t={topic:p,acknowledged:!0,self:{publicKey:c,metadata:this.client.metadata},peer:{publicKey:u,metadata:s.requester.metadata},controller:u,expiry:(0,a.gn4)(r3),authentication:n,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:s.pairingTopic,namespaces:(0,a.E12)([...new Set(h)],[...new Set(f)]),transportType:o},i.addTrace(t9.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(p,{transportType:o})}catch(e){throw i.setError(t7.subscribe_authenticated_session_topic_failure),e}i.addTrace(t9.subscribe_authenticated_session_topic_success),await this.client.session.set(p,t),i.addTrace(t9.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:s.pairingTopic,metadata:s.requester.metadata})}i.addTrace(t9.publishing_authenticated_session_approve);try{await this.sendResult({topic:l,id:r,result:{cacaos:n,responder:{publicKey:c,metadata:this.client.metadata}},encodeOpts:d,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(s.requester.metadata,o)})}catch(e){throw i.setError(t7.authenticated_session_approve_publish_failure),e}return await this.client.auth.requests.delete(r,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:s.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:i.eventId}),{session:t}},this.rejectSessionAuthenticate=async e=>{this.isInitialized();let{id:t,reason:r}=e,n=this.getPendingAuthRequest(t);if(!n)throw Error(`Could not find pending auth request with id ${t}`);n.transportType===tV.relay&&await this.confirmOnlineStateOrThrow();let i=n.requester.publicKey,s=await this.client.core.crypto.generateKeyPair(),o=(0,a.YmJ)(i),u={type:a.rVF,receiverPublicKey:i,senderPublicKey:s};await this.sendError({id:t,topic:o,error:r,encodeOpts:u,rpcOpts:r5.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(n.requester.metadata,n.transportType)}),await this.client.auth.requests.delete(t,{message:"rejected",code:0}),await this.client.proposal.delete(t,(0,a.D6H)("USER_DISCONNECTED"))},this.formatAuthMessage=e=>{this.isInitialized();let{request:t,iss:r}=e;return(0,a.wvx)(t,r)},this.processRelayMessageCache=()=>{setTimeout(async()=>{if(0!==this.relayMessageCache.length)for(;this.relayMessageCache.length>0;)try{let e=this.relayMessageCache.shift();e&&await this.onRelayMessage(e)}catch(e){this.client.logger.error(e)}},50)},this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{let t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter(r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic});if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map(e=>this.client.core.pairing.disconnect({topic:e.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async e=>{var t;let{topic:r,expirerHasDeleted:n=!1,emitEvent:i=!0,id:s=0}=e,{self:o}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await this.client.session.delete(r,(0,a.D6H)("USER_DISCONNECTED")),this.addToRecentlyDeleted(r,"session"),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),n||this.client.core.expirer.del(r),this.client.core.storage.removeItem(r1).catch(e=>this.client.logger.warn(e)),this.getPendingSessionRequests().forEach(e=>{e.topic===r&&this.deletePendingSessionRequest(e.id,(0,a.D6H)("USER_DISCONNECTED"))}),r===(null==(t=this.sessionRequestQueue.queue[0])?void 0:t.topic)&&(this.sessionRequestQueue.state=r4.idle),i&&this.client.events.emit("session_delete",{id:s,topic:r})},this.deleteProposal=async(e,t)=>{if(t)try{let t=this.client.proposal.get(e),r=this.client.core.eventClient.getEvent({topic:t.pairingTopic});r?.setError(t8.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(e,(0,a.D6H)("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")},this.deletePendingSessionRequest=async(e,t,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(t=>t.id!==e),r&&(this.sessionRequestQueue.state=r4.idle,this.client.events.emit("session_request_expire",{id:e}))},this.deletePendingAuthRequest=async(e,t,r=!1)=>{await Promise.all([this.client.auth.requests.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)])},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,t),await this.client.session.update(e,{expiry:t}))},this.setProposal=async(e,t)=>{this.client.core.expirer.set(e,(0,a.gn4)(r5.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,t)},this.setAuthRequest=async(e,t)=>{let{request:r,pairingTopic:n,transportType:i=tV.relay}=t;this.client.core.expirer.set(e,r.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:r.authPayload,requester:r.requester,expiryTimestamp:r.expiryTimestamp,id:e,pairingTopic:n,verifyContext:r.verifyContext,transportType:i})},this.setPendingSessionRequest=async e=>{let{id:t,topic:r,params:n,verifyContext:i}=e,s=n.request.expiryTimestamp||(0,a.gn4)(r5.wc_sessionRequest.req.ttl);this.client.core.expirer.set(t,s),await this.client.pendingRequest.set(t,{id:t,topic:r,params:n,verifyContext:i})},this.sendRequest=async e=>{let t,n;let{topic:i,method:s,params:o,expiry:u,relayRpcId:c,clientRpcId:l,throwOnFailedPublish:d,appLink:h}=e,f=eR(s,o,l),p=!!h;try{let e=p?a.zl_:a.$dT;t=await this.client.core.crypto.encode(i,f,{encoding:e})}catch(e){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${i} failed`),e}if(r8.includes(s)){let e=(0,a.rjm)(JSON.stringify(f)),r=(0,a.rjm)(t);n=await this.client.core.verify.register({id:r,decryptedId:e})}let m=r5[s].req;if(m.attestation=n,u&&(m.ttl=u),c&&(m.id=c),this.client.core.history.set(i,f),p){let e=(0,a.L9d)(h,i,t);await r.g.Linking.openURL(e,this.client.name)}else{let e=r5[s].req;u&&(e.ttl=u),c&&(e.id=c),d?(e.internal=nu(no({},e.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,t,e)):this.client.core.relayer.publish(i,t,e).catch(e=>this.client.logger.error(e))}return f.id},this.sendResult=async e=>{let t,n;let{id:i,topic:s,result:o,throwOnFailedPublish:u,encodeOpts:c,appLink:l}=e,d=eP(i,o),h=l&&"u">typeof(null==r.g?void 0:r.g.Linking);try{let e=h?a.zl_:a.$dT;t=await this.client.core.crypto.encode(s,d,nu(no({},c||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${s} failed`),e}try{n=await this.client.core.history.get(s,i)}catch(e){throw this.client.logger.error(`sendResult() -> history.get(${s}, ${i}) failed`),e}if(h){let e=(0,a.L9d)(l,s,t);await r.g.Linking.openURL(e,this.client.name)}else{let e=r5[n.request.method].res;u?(e.internal=nu(no({},e.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(s,t,e)):this.client.core.relayer.publish(s,t,e).catch(e=>this.client.logger.error(e))}await this.client.core.history.resolve(d)},this.sendError=async e=>{let t,n;let{id:i,topic:s,error:o,encodeOpts:u,rpcOpts:c,appLink:l}=e,d=eN(i,o),h=l&&"u">typeof(null==r.g?void 0:r.g.Linking);try{let e=h?a.zl_:a.$dT;t=await this.client.core.crypto.encode(s,d,nu(no({},u||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${s} failed`),e}try{n=await this.client.core.history.get(s,i)}catch(e){throw this.client.logger.error(`sendError() -> history.get(${s}, ${i}) failed`),e}if(h){let e=(0,a.L9d)(l,s,t);await r.g.Linking.openURL(e,this.client.name)}else{let e=c||r5[n.request.method].res;this.client.core.relayer.publish(s,t,e)}await this.client.core.history.resolve(d)},this.cleanup=async()=>{let e=[],t=[];this.client.session.getAll().forEach(t=>{let r=!1;(0,a.BwD)(t.expiry)&&(r=!0),this.client.core.crypto.keychain.has(t.topic)||(r=!0),r&&e.push(t.topic)}),this.client.proposal.getAll().forEach(e=>{(0,a.BwD)(e.expiryTimestamp)&&t.push(e.id)}),await Promise.all([...e.map(e=>this.deleteSession({topic:e})),...t.map(e=>this.deleteProposal(e))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===r4.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=r4.active;let e=this.requestQueue.queue.shift();if(e)try{await this.processRequest(e)}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=r4.idle},this.processRequest=async e=>{let{topic:t,payload:r,attestation:n,transportType:i,encryptedId:s}=e,a=r.method;if(!this.shouldIgnorePairingRequest({topic:t,requestMethod:a}))switch(a){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:t,payload:r,attestation:n,encryptedId:s});case"wc_sessionSettle":return await this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return await this.onSessionExtendRequest(t,r);case"wc_sessionPing":return await this.onSessionPingRequest(t,r);case"wc_sessionDelete":return await this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return await this.onSessionRequest({topic:t,payload:r,attestation:n,encryptedId:s,transportType:i});case"wc_sessionEvent":return await this.onSessionEventRequest(t,r);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:t,payload:r,attestation:n,encryptedId:s,transportType:i});default:return this.client.logger.info(`Unsupported request method ${a}`)}},this.onRelayEventResponse=async e=>{let{topic:t,payload:r,transportType:n}=e,i=(await this.client.core.history.get(t,r.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onRelayEventUnknownPayload=e=>{let{topic:t}=e,{message:r}=(0,a.kCb)("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw Error(r)},this.shouldIgnorePairingRequest=e=>{let{topic:t,requestMethod:r}=e,n=this.expectedPairingMethodMap.get(t);return!(!n||n.includes(r))&&!!(n.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async e=>{let{topic:t,payload:r,attestation:n,encryptedId:i}=e,{params:s,id:o}=r;try{let e=this.client.core.eventClient.getEvent({topic:t});this.isValidConnect(no({},r.params));let u=s.expiryTimestamp||(0,a.gn4)(r5.wc_sessionPropose.req.ttl),c=no({id:o,pairingTopic:t,expiryTimestamp:u},s);await this.setProposal(o,c);let l=await this.getVerifyContext({attestationId:n,hash:(0,a.rjm)(JSON.stringify(r)),encryptedId:i,metadata:c.proposer.metadata});0===this.client.events.listenerCount("session_proposal")&&(console.warn("No listener for session_proposal event"),e?.setError(t6.proposal_listener_not_found)),e?.addTrace(t5.emit_session_proposal),this.client.events.emit("session_proposal",{id:o,params:c,verifyContext:l})}catch(e){await this.sendError({id:o,topic:t,error:e,rpcOpts:r5.wc_sessionPropose.autoReject}),this.client.logger.error(e)}},this.onSessionProposeResponse=async(e,t,r)=>{let{id:n}=t;if(ej(t)){let{result:i}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});let s=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:s});let a=s.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});let o=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});let u=await this.client.core.crypto.generateSharedKey(a,o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:u});let c=await this.client.core.relayer.subscribe(u,{transportType:r});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else if(eF(t)){await this.client.proposal.delete(n,(0,a.D6H)("USER_DISCONNECTED"));let e=(0,a.E0T)("session_connect");if(0===this.events.listenerCount(e))throw Error(`emitting ${e} without any listeners, 954`);this.events.emit((0,a.E0T)("session_connect"),{error:t.error})}},this.onSessionSettleRequest=async(e,t)=>{let{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);let{relay:r,controller:i,expiry:s,namespaces:o,sessionProperties:u,sessionConfig:c}=t.params,l=nu(no(no({topic:e,relay:r,expiry:s,namespaces:o,acknowledged:!0,pairingTopic:"",requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},u&&{sessionProperties:u}),c&&{sessionConfig:c}),{transportType:tV.relay}),d=(0,a.E0T)("session_connect");if(0===this.events.listenerCount(d))throw Error(`emitting ${d} without any listeners 997`);this.events.emit((0,a.E0T)("session_connect"),{session:l}),await this.sendResult({id:t.id,topic:e,result:!0,throwOnFailedPublish:!0})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{let{id:r}=t;ej(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit((0,a.E0T)("session_approve",r),{})):eF(t)&&(await this.client.session.delete(e,(0,a.D6H)("USER_DISCONNECTED")),this.events.emit((0,a.E0T)("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{let{params:r,id:n}=t;try{let t=`${e}_session_update`,i=a.O6B.get(t);if(i&&this.isRequestOutOfSync(i,n)){this.client.logger.info(`Discarding out of sync request - ${n}`),this.sendError({id:n,topic:e,error:(0,a.D6H)("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(no({topic:e},r));try{a.O6B.set(t,n),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:n,topic:e,result:!0,throwOnFailedPublish:!0})}catch(e){throw a.O6B.delete(t),e}this.client.events.emit("session_update",{id:n,topic:e,params:r})}catch(t){await this.sendError({id:n,topic:e,error:t}),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{let{id:r}=t,n=(0,a.E0T)("session_update",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);ej(t)?this.events.emit((0,a.E0T)("session_update",r),{}):eF(t)&&this.events.emit((0,a.E0T)("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{let{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,(0,a.gn4)(r3)),await this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{let{id:r}=t,n=(0,a.E0T)("session_extend",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);ej(t)?this.events.emit((0,a.E0T)("session_extend",r),{}):eF(t)&&this.events.emit((0,a.E0T)("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{let{id:r}=t,n=(0,a.E0T)("session_ping",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);setTimeout(()=>{ej(t)?this.events.emit((0,a.E0T)("session_ping",r),{}):eF(t)&&this.events.emit((0,a.E0T)("session_ping",r),{error:t.error})},500)},this.onSessionDeleteRequest=async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),Promise.all([new Promise(t=>{this.client.core.relayer.once(t$.publish,async()=>{t(await this.deleteSession({topic:e,id:r}))})}),this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:(0,a.D6H)("USER_DISCONNECTED")})]).catch(e=>this.client.logger.error(e))}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async e=>{var t,r,n;let{topic:i,payload:s,attestation:o,encryptedId:u,transportType:c}=e,{id:l,params:d}=s;try{await this.isValidRequest(no({topic:i},d));let e=this.client.session.get(i),s=await this.getVerifyContext({attestationId:o,hash:(0,a.rjm)(JSON.stringify(eR("wc_sessionRequest",d,l))),encryptedId:u,metadata:e.peer.metadata,transportType:c}),h={id:l,topic:i,params:d,verifyContext:s};await this.setPendingSessionRequest(h),c===tV.link_mode&&null!=(t=e.peer.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(null==(r=e.peer.metadata.redirect)?void 0:r.universal),null!=(n=this.client.signConfig)&&n.disableRequestQueue?this.emitSessionRequest(h):(this.addSessionRequestToSessionRequestQueue(h),this.processSessionRequestQueue())}catch(e){await this.sendError({id:l,topic:i,error:e}),this.client.logger.error(e)}},this.onSessionRequestResponse=(e,t)=>{let{id:r}=t,n=(0,a.E0T)("session_request",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);ej(t)?this.events.emit((0,a.E0T)("session_request",r),{result:t.result}):eF(t)&&this.events.emit((0,a.E0T)("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{let{id:r,params:n}=t;try{let t=`${e}_session_event_${n.event.name}`,i=a.O6B.get(t);if(i&&this.isRequestOutOfSync(i,r)){this.client.logger.info(`Discarding out of sync request - ${r}`);return}this.isValidEmit(no({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n}),a.O6B.set(t,r)}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}},this.onSessionAuthenticateResponse=(e,t)=>{let{id:r}=t;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:t}),ej(t)?this.events.emit((0,a.E0T)("session_request",r),{result:t.result}):eF(t)&&this.events.emit((0,a.E0T)("session_request",r),{error:t.error})},this.onSessionAuthenticateRequest=async e=>{var t;let{topic:r,payload:n,attestation:i,encryptedId:s,transportType:o}=e;try{let{requester:e,authPayload:u,expiryTimestamp:c}=n.params,l=await this.getVerifyContext({attestationId:i,hash:(0,a.rjm)(JSON.stringify(n)),encryptedId:s,metadata:e.metadata,transportType:o}),d={requester:e,pairingTopic:r,id:n.id,authPayload:u,verifyContext:l,expiryTimestamp:c};await this.setAuthRequest(n.id,{request:d,pairingTopic:r,transportType:o}),o===tV.link_mode&&null!=(t=e.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(e.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:r,params:n.params,id:n.id,verifyContext:l})}catch(u){this.client.logger.error(u);let e=n.params.requester.publicKey,t=await this.client.core.crypto.generateKeyPair(),i=this.getAppLinkIfEnabled(n.params.requester.metadata,o),s={type:a.rVF,receiverPublicKey:e,senderPublicKey:t};await this.sendError({id:n.id,topic:r,error:u,encodeOpts:s,rpcOpts:r5.wc_sessionAuthenticate.autoReject,appLink:i})}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=r4.idle,this.processSessionRequestQueue()},(0,M.toMiliseconds)(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{let r=this.client.core.history.pending;r.length>0&&r.filter(t=>t.topic===e&&"wc_sessionRequest"===t.request.method).forEach(e=>{let r=e.request.id,n=(0,a.E0T)("session_request",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);this.events.emit((0,a.E0T)("session_request",e.request.id),{error:t})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===r4.active){this.client.logger.info("session request queue is already active.");return}let e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=r4.active,this.emitSessionRequest(e)}catch(e){this.client.logger.error(e)}},this.emitSessionRequest=e=>{this.client.events.emit("session_request",e)},this.onPairingCreated=e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;let t=this.client.proposal.getAll().find(t=>t.pairingTopic===e.topic);t&&this.onSessionProposeRequest({topic:e.topic,payload:eR("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id)})},this.isValidConnect=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw Error(t)}let{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:s}=e;if((0,a.o8e)(t)||await this.isValidPairingTopic(t),!(0,a.PMr)(s,!0)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`connect() relays: ${s}`);throw Error(e)}(0,a.o8e)(r)||0===(0,a.L5o)(r)||this.validateNamespaces(r,"requiredNamespaces"),(0,a.o8e)(n)||0===(0,a.L5o)(n)||this.validateNamespaces(n,"optionalNamespaces"),(0,a.o8e)(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{let r=(0,a.naP)(e,"connect()",t);if(r)throw Error(r.message)},this.isValidApprove=async e=>{if(!(0,a.EJd)(e))throw Error((0,a.kCb)("MISSING_OR_INVALID",`approve() params: ${e}`).message);let{id:t,namespaces:r,relayProtocol:n,sessionProperties:i}=e;this.checkRecentlyDeleted(t),await this.isValidProposalId(t);let s=this.client.proposal.get(t),o=(0,a.ing)(r,"approve()");if(o)throw Error(o.message);let u=(0,a.rFo)(s.requiredNamespaces,r,"approve()");if(u)throw Error(u.message);if(!(0,a.M_r)(n,!0)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw Error(e)}(0,a.o8e)(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`reject() params: ${e}`);throw Error(t)}let{id:t,reason:r}=e;if(this.checkRecentlyDeleted(t),await this.isValidProposalId(t),!(0,a.H4H)(r)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw Error(e)}},this.isValidSessionSettleRequest=e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw Error(t)}let{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!(0,a.Z26)(t)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw Error(e)}let s=(0,a.DdM)(r,"onSessionSettleRequest()");if(s)throw Error(s.message);let o=(0,a.ing)(n,"onSessionSettleRequest()");if(o)throw Error(o.message);if((0,a.BwD)(i)){let{message:e}=(0,a.kCb)("EXPIRED","onSessionSettleRequest()");throw Error(e)}},this.isValidUpdate=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`update() params: ${e}`);throw Error(t)}let{topic:t,namespaces:r}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);let n=this.client.session.get(t),i=(0,a.ing)(r,"update()");if(i)throw Error(i.message);let s=(0,a.rFo)(n.requiredNamespaces,r,"update()");if(s)throw Error(s.message)},this.isValidExtend=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`extend() params: ${e}`);throw Error(t)}let{topic:t}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`request() params: ${e}`);throw Error(t)}let{topic:t,request:r,chainId:n,expiry:i}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);let{namespaces:s}=this.client.session.get(t);if(!(0,a.p8o)(s,n)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`request() chainId: ${n}`);throw Error(e)}if(!(0,a.hHR)(r)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw Error(e)}if(!(0,a.alS)(s,n,r.method)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`request() method: ${r.method}`);throw Error(e)}if(i&&!(0,a.ONw)(i,r6)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${r6.min} and ${r6.max}`);throw Error(e)}},this.isValidRespond=async e=>{var t;if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`respond() params: ${e}`);throw Error(t)}let{topic:r,response:n}=e;try{await this.isValidSessionTopic(r)}catch(r){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),r}if(!(0,a.JTI)(n)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(n)}`);throw Error(e)}},this.isValidPing=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`emit() params: ${e}`);throw Error(t)}let{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);let{namespaces:i}=this.client.session.get(t);if(!(0,a.p8o)(i,n)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw Error(e)}if(!(0,a.nfW)(r)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw Error(e)}if(!(0,a.B95)(i,n,r.name)){let{message:e}=(0,a.kCb)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw Error(e)}},this.isValidDisconnect=async e=>{if(!(0,a.EJd)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidAuthenticate=e=>{let{chains:t,uri:r,domain:n,nonce:i}=e;if(!Array.isArray(t)||0===t.length)throw Error("chains is required and must be a non-empty array");if(!(0,a.M_r)(r,!1))throw Error("uri is required parameter");if(!(0,a.M_r)(n,!1))throw Error("domain is required parameter");if(!(0,a.M_r)(i,!1))throw Error("nonce is required parameter");if([...new Set(t.map(e=>(0,a.DQe)(e).namespace))].length>1)throw Error("Multi-namespace requests are not supported. Please request single namespace only.");let{namespace:s}=(0,a.DQe)(t[0]);if("eip155"!==s)throw Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async e=>{let{attestationId:t,hash:r,encryptedId:n,metadata:i,transportType:s}=e,a={verified:{verifyUrl:i.verifyUrl||t1,validation:"UNKNOWN",origin:i.url||""}};try{if(s===tV.link_mode){let e=this.getAppLinkIfEnabled(i,s);return a.verified.validation=e&&new URL(e).origin===new URL(i.url).origin?"VALID":"INVALID",a}let e=await this.client.core.verify.resolve({attestationId:t,hash:r,encryptedId:n,verifyUrl:i.verifyUrl});e&&(a.verified.origin=e.origin,a.verified.isScam=e.isScam,a.verified.validation=e.origin===new URL(i.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.warn(e)}return this.client.logger.debug(`Verify context: ${JSON.stringify(a)}`),a},this.validateSessionProps=(e,t)=>{Object.values(e).forEach(e=>{if(!(0,a.M_r)(e,!1)){let{message:r}=(0,a.kCb)("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw Error(r)}})},this.getPendingAuthRequest=e=>{let t=this.client.auth.requests.get(e);return"object"==typeof t?t:void 0},this.addToRecentlyDeleted=(e,t)=>{if(this.recentlyDeletedMap.set(e,t),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let e=0,t=this.recentlyDeletedLimit/2;for(let r of this.recentlyDeletedMap.keys()){if(e++>=t)break;this.recentlyDeletedMap.delete(r)}}},this.checkRecentlyDeleted=e=>{let t=this.recentlyDeletedMap.get(e);if(t){let{message:r}=(0,a.kCb)("MISSING_OR_INVALID",`Record was recently deleted - ${t}: ${e}`);throw Error(r)}},this.isLinkModeEnabled=(e,t)=>{var n,i,s,a,o,u,c,l,d;return!!e&&t===tV.link_mode&&(null==(i=null==(n=this.client.metadata)?void 0:n.redirect)?void 0:i.linkMode)===!0&&(null==(a=null==(s=this.client.metadata)?void 0:s.redirect)?void 0:a.universal)!==void 0&&(null==(u=null==(o=this.client.metadata)?void 0:o.redirect)?void 0:u.universal)!==""&&(null==(c=e?.redirect)?void 0:c.universal)!==void 0&&(null==(l=e?.redirect)?void 0:l.universal)!==""&&(null==(d=e?.redirect)?void 0:d.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(e.redirect.universal)&&"u">typeof(null==r.g?void 0:r.g.Linking)},this.getAppLinkIfEnabled=(e,t)=>{var r;return this.isLinkModeEnabled(e,t)?null==(r=e?.redirect)?void 0:r.universal:void 0},this.handleLinkModeMessage=({url:e})=>{if(!e||!e.includes("wc_ev")||!e.includes("topic"))return;let t=(0,a.waw)(e,"topic")||"",r=decodeURIComponent((0,a.waw)(e,"wc_ev")||""),n=this.client.session.keys.includes(t);n&&this.client.session.update(t,{transportType:tV.link_mode}),this.client.core.dispatchEnvelope({topic:t,message:r,sessionExists:n})},this.registerLinkModeListeners=async()=>{var e;if((0,a.h9F)()||(0,a.b$m)()&&null!=(e=this.client.metadata.redirect)&&e.linkMode){let e=null==r.g?void 0:r.g.Linking;if("u">typeof e){e.addEventListener("url",this.handleLinkModeMessage,this.client.name);let t=await e.getInitialURL();t&&setTimeout(()=>{this.handleLinkModeMessage({url:t})},50)}}}}isInitialized(){if(!this.initialized){let{message:e}=(0,a.kCb)("NOT_INITIALIZED",this.name);throw Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(t$.message,e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):this.onRelayMessage(e)})}async onRelayMessage(e){let{topic:t,message:r,attestation:n,transportType:i}=e,{publicKey:s}=this.client.auth.authKeys.keys.includes(r7)?this.client.auth.authKeys.get(r7):{responseTopic:void 0,publicKey:void 0},o=await this.client.core.crypto.decode(t,r,{receiverPublicKey:s,encoding:i===tV.link_mode?a.zl_:a.$dT});try{ez(o)?(this.client.core.history.set(t,o),this.onRelayEventRequest({topic:t,payload:o,attestation:n,transportType:i,encryptedId:(0,a.rjm)(r)})):eU(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:t,payload:o,transportType:i}),this.client.core.history.delete(t,o.id)):this.onRelayEventUnknownPayload({topic:t,payload:o,transportType:i})}catch(e){this.client.logger.error(e)}}registerExpirerEvents(){this.client.core.expirer.on(t0.expired,async e=>{let{topic:t,id:r}=(0,a.iPz)(e.target);return r&&this.client.pendingRequest.keys.includes(r)?await this.deletePendingSessionRequest(r,(0,a.kCb)("EXPIRED"),!0):r&&this.client.auth.requests.keys.includes(r)?await this.deletePendingAuthRequest(r,(0,a.kCb)("EXPIRED"),!0):void(t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r})))})}registerPairingEvents(){this.client.core.pairing.events.on(tQ.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(tQ.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!(0,a.M_r)(e,!1)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if((0,a.BwD)(this.client.core.pairing.pairings.get(e).expiry)){let{message:t}=(0,a.kCb)("EXPIRED",`pairing topic: ${e}`);throw Error(t)}}async isValidSessionTopic(e){if(!(0,a.M_r)(e,!1)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw Error(t)}if((0,a.BwD)(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:t}=(0,a.kCb)("EXPIRED",`session topic: ${e}`);throw Error(t)}if(!this.client.core.crypto.keychain.has(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if((0,a.M_r)(e,!1)){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw Error(t)}else{let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw Error(t)}}async isValidProposalId(e){if(!(0,a.Q01)(e)){let{message:t}=(0,a.kCb)("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw Error(t)}if(!this.client.proposal.keys.includes(e)){let{message:t}=(0,a.kCb)("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw Error(t)}if((0,a.BwD)(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:t}=(0,a.kCb)("EXPIRED",`proposal id: ${e}`);throw Error(t)}}}class nl extends rI{constructor(e,t){super(e,t,"proposal",rX),this.core=e,this.logger=t}}class nd extends rI{constructor(e,t){super(e,t,"session",rX),this.core=e,this.logger=t}}class nh extends rI{constructor(e,t){super(e,t,"request",rX,e=>e.id),this.core=e,this.logger=t}}class nf extends rI{constructor(e,t){super(e,t,"authKeys",r9,()=>r7),this.core=e,this.logger=t}}class np extends rI{constructor(e,t){super(e,t,"pairingTopics",r9),this.core=e,this.logger=t}}class nm extends rI{constructor(e,t){super(e,t,"requests",r9,e=>e.id),this.core=e,this.logger=t}}class ng{constructor(e,t){this.core=e,this.logger=t,this.authKeys=new nf(this.core,this.logger),this.pairingTopics=new np(this.core,this.logger),this.requests=new nm(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class ny extends eg{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=r0.name,this.events=new i.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.authenticate=async(e,t)=>{try{return await this.engine.authenticate(e,t)}catch(e){throw this.logger.error(e.message),e}},this.formatAuthMessage=e=>{try{return this.engine.formatAuthMessage(e)}catch(e){throw this.logger.error(e.message),e}},this.approveSessionAuthenticate=async e=>{try{return await this.engine.approveSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}},this.rejectSessionAuthenticate=async e=>{try{return await this.engine.rejectSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||r0.name,this.metadata=e?.metadata||(0,a.DaH)(),this.signConfig=e?.signConfig;let t="u">typeof e?.logger&&"string"!=typeof e?.logger?e.logger:z()(er({level:e?.logger||r0.logger}));this.core=e?.core||new rJ(e),this.logger=ei(t,this.name),this.session=new nd(this.core,this.logger),this.proposal=new nl(this.core,this.logger),this.pendingRequest=new nh(this.core,this.logger),this.engine=new nc(this),this.auth=new ng(this.core,this.logger)}static async init(e){let t=new ny(e);return await t.initialize(),t}get context(){return en(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success"),this.engine.processRelayMessageCache()}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var nb=r(80565),nv=r.n(nb),nw=Object.defineProperty,n_=Object.defineProperties,nE=Object.getOwnPropertyDescriptors,nk=Object.getOwnPropertySymbols,nx=Object.prototype.hasOwnProperty,nS=Object.prototype.propertyIsEnumerable,nA=(e,t,r)=>t in e?nw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nC=(e,t)=>{for(var r in t||(t={}))nx.call(t,r)&&nA(e,r,t[r]);if(nk)for(var r of nk(t))nS.call(t,r)&&nA(e,r,t[r]);return e},nI=(e,t)=>n_(e,nE(t));let nR={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class nP{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new i.EventEmitter,this.isAvailable=!1,this.registering=!1,!eL(e))throw Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{let t=(0,E.u)(e),r=await (await nv()(this.url,nI(nC({},nR),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!eL(e))throw Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(Error("HTTP connection is missing or invalid"));e()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let t=(0,E.u)({id:1,jsonrpc:"2.0",method:"test",params:[]});await nv()(e,nI(nC({},nR),{body:t}))}this.onOpen()}catch(t){let e=this.parseError(t);throw this.events.emit("register_error",e),this.onClose(),e}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?(0,E.D)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),n=eN(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return eS(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}let nN="error",nM="wc@2:universal_provider:",nT="https://rpc.walletconnect.com/v1/",nO="generic",nD=`${nT}bundler`,nL="default_chain_changed";var nB="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof r.g?r.g:"u">typeof self?self:{},nq={exports:{}};!function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",a=1/0,o=0/0,u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",d="[object Boolean]",h="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",y="[object Number]",b="[object Object]",v="[object Promise]",w="[object RegExp]",_="[object Set]",E="[object String]",k="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",A="[object DataView]",C="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",P="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",T="[object Uint8ClampedArray]",O="[object Uint16Array]",D="[object Uint32Array]",L=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,j=RegExp(z.source),F=RegExp(U.source),H=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(Z.source),J=/^\s+/,Q=/\s/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ee=/\{\n\/\* \[wrapped with (.+)\] \*/,et=/,? & /,er=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,en=/[()=,{}\[\]\/\s]/,ei=/\\(\\)?/g,es=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ea=/\w*$/,eo=/^[-+]0x[0-9a-f]+$/i,eu=/^0b[01]+$/i,ec=/^\[object .+?Constructor\]$/,el=/^0o[0-7]+$/i,ed=/^(?:0|[1-9]\d*)$/,eh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ef=/($^)/,ep=/['\n\r\u2028\u2029\\]/g,em="\ud800-\udfff",eg="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ey="\\u2700-\\u27bf",eb="a-z\\xdf-\\xf6\\xf8-\\xff",ev="A-Z\\xc0-\\xd6\\xd8-\\xde",ew="\\ufe0e\\ufe0f",e_="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eE="['’]",ek="["+e_+"]",ex="["+eg+"]",eS="["+eb+"]",eA="[^"+em+e_+"\\d+"+ey+eb+ev+"]",eC="\ud83c[\udffb-\udfff]",eI="[^"+em+"]",eR="(?:\ud83c[\udde6-\uddff]){2}",eP="[\ud800-\udbff][\udc00-\udfff]",eN="["+ev+"]",eM="\\u200d",eT="(?:"+eS+"|"+eA+")",eO="(?:"+eE+"(?:d|ll|m|re|s|t|ve))?",eD="(?:"+eE+"(?:D|LL|M|RE|S|T|VE))?",eL="(?:"+ex+"|"+eC+")?",eB="["+ew+"]?",eq="(?:"+eM+"(?:"+[eI,eR,eP].join("|")+")"+eB+eL+")*",ez=eB+eL+eq,eU="(?:"+["["+ey+"]",eR,eP].join("|")+")"+ez,ej="(?:"+[eI+ex+"?",ex,eR,eP,"["+em+"]"].join("|")+")",eF=RegExp(eE,"g"),eH=RegExp(ex,"g"),e$=RegExp(eC+"(?="+eC+")|"+ej+ez,"g"),eW=RegExp([eN+"?"+eS+"+"+eO+"(?="+[ek,eN,"$"].join("|")+")","(?:"+eN+"|"+eA+")+"+eD+"(?="+[ek,eN+eT,"$"].join("|")+")",eN+"?"+eT+"+"+eO,eN+"+"+eD,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",eU].join("|"),"g"),eG=RegExp("["+eM+em+eg+ew+"]"),eV=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eZ=-1,eY={};eY[C]=eY[I]=eY[R]=eY[P]=eY[N]=eY[M]=eY[T]=eY[O]=eY[D]=!0,eY[c]=eY[l]=eY[S]=eY[d]=eY[A]=eY[h]=eY[f]=eY[p]=eY[g]=eY[y]=eY[b]=eY[w]=eY[_]=eY[E]=eY[x]=!1;var eJ={};eJ[c]=eJ[l]=eJ[S]=eJ[A]=eJ[d]=eJ[h]=eJ[C]=eJ[I]=eJ[R]=eJ[P]=eJ[N]=eJ[g]=eJ[y]=eJ[b]=eJ[w]=eJ[_]=eJ[E]=eJ[k]=eJ[M]=eJ[T]=eJ[O]=eJ[D]=!0,eJ[f]=eJ[p]=eJ[x]=!1;var eQ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},eX=parseFloat,e0=parseInt,e1="object"==typeof nB&&nB&&nB.Object===Object&&nB,e2="object"==typeof self&&self&&self.Object===Object&&self,e3=e1||e2||Function("return this")(),e5=t&&!t.nodeType&&t,e6=e5&&e&&!e.nodeType&&e,e4=e6&&e6.exports===e5,e8=e4&&e1.process,e9=function(){try{return e6&&e6.require&&e6.require("util").types||e8&&e8.binding&&e8.binding("util")}catch{}}(),e7=e9&&e9.isArrayBuffer,te=e9&&e9.isDate,tt=e9&&e9.isMap,tr=e9&&e9.isRegExp,tn=e9&&e9.isSet,ti=e9&&e9.isTypedArray;function ts(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function ta(e,t,r,n){for(var i=-1,s=null==e?0:e.length;++i<s;){var a=e[i];t(n,a,r(a),e)}return n}function to(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function tu(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function tc(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function tl(e,t){return!!(null==e?0:e.length)&&tw(e,t,0)>-1}function td(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function th(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function tf(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function tp(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function tm(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function tg(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var ty=tx("length");function tb(e,t,r){var n;return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function tv(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return -1}function tw(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}(e,t,r):tv(e,tE,r)}function t_(e,t,r,n){for(var i=r-1,s=e.length;++i<s;)if(n(e[i],t))return i;return -1}function tE(e){return e!=e}function tk(e,t){var r=null==e?0:e.length;return r?tC(e,t)/r:o}function tx(e){return function(t){return null==t?r:t[e]}}function tS(e){return function(t){return null==e?r:e[t]}}function tA(e,t,r,n,i){return i(e,function(e,i,s){r=n?(n=!1,e):t(r,e,i,s)}),r}function tC(e,t){for(var n,i=-1,s=e.length;++i<s;){var a=t(e[i]);a!==r&&(n=n===r?a:n+a)}return n}function tI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function tR(e){return e&&e.slice(0,tW(e)+1).replace(J,"")}function tP(e){return function(t){return e(t)}}function tN(e,t){return th(t,function(t){return e[t]})}function tM(e,t){return e.has(t)}function tT(e,t){for(var r=-1,n=e.length;++r<n&&tw(t,e[r],0)>-1;);return r}function tO(e,t){for(var r=e.length;r--&&tw(t,e[r],0)>-1;);return r}var tD=tS({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"}),tL=tS({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function tB(e){return"\\"+eQ[e]}function tq(e){return eG.test(e)}function tz(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function tU(e,t){return function(r){return e(t(r))}}function tj(e,t){for(var r=-1,n=e.length,i=0,a=[];++r<n;){var o=e[r];(o===t||o===s)&&(e[r]=s,a[i++]=r)}return a}function tF(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function tH(e){return tq(e)?function(e){for(var t=e$.lastIndex=0;e$.test(e);)++t;return t}(e):ty(e)}function t$(e){return tq(e)?e.match(e$)||[]:e.split("")}function tW(e){for(var t=e.length;t--&&Q.test(e.charAt(t)););return t}var tG=tS({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),tV=function e(t){var Q,em,eg,ey,eb=(t=null==t?e3:tV.defaults(e3.Object(),t,tV.pick(e3,eK))).Array,ev=t.Date,ew=t.Error,e_=t.Function,eE=t.Math,ek=t.Object,ex=t.RegExp,eS=t.String,eA=t.TypeError,eC=eb.prototype,eI=e_.prototype,eR=ek.prototype,eP=t["__core-js_shared__"],eN=eI.toString,eM=eR.hasOwnProperty,eT=0,eO=(Q=/[^.]+$/.exec(eP&&eP.keys&&eP.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"",eD=eR.toString,eL=eN.call(ek),eB=e3._,eq=ex("^"+eN.call(eM).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ez=e4?t.Buffer:r,eU=t.Symbol,ej=t.Uint8Array,e$=ez?ez.allocUnsafe:r,eG=tU(ek.getPrototypeOf,ek),eQ=ek.create,e1=eR.propertyIsEnumerable,e2=eC.splice,e5=eU?eU.isConcatSpreadable:r,e6=eU?eU.iterator:r,e8=eU?eU.toStringTag:r,e9=function(){try{var e=ip(ek,"defineProperty");return e({},"",{}),e}catch{}}(),ty=t.clearTimeout!==e3.clearTimeout&&t.clearTimeout,tS=ev&&ev.now!==e3.Date.now&&ev.now,tK=t.setTimeout!==e3.setTimeout&&t.setTimeout,tZ=eE.ceil,tY=eE.floor,tJ=ek.getOwnPropertySymbols,tQ=ez?ez.isBuffer:r,tX=t.isFinite,t0=eC.join,t1=tU(ek.keys,ek),t2=eE.max,t3=eE.min,t5=ev.now,t6=t.parseInt,t4=eE.random,t8=eC.reverse,t9=ip(t,"DataView"),t7=ip(t,"Map"),re=ip(t,"Promise"),rt=ip(t,"Set"),rr=ip(t,"WeakMap"),rn=ip(ek,"create"),ri=rr&&new rr,rs={},ra=iz(t9),ro=iz(t7),ru=iz(re),rc=iz(rt),rl=iz(rr),rd=eU?eU.prototype:r,rh=rd?rd.valueOf:r,rf=rd?rd.toString:r;function rp(e){if(sG(e)&&!sD(e)&&!(e instanceof rb)){if(e instanceof ry)return e;if(eM.call(e,"__wrapped__"))return iU(e)}return new ry(e)}var rm=function(){function e(){}return function(t){if(!sW(t))return{};if(eQ)return eQ(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function rg(){}function ry(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function rb(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function rv(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function r_(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rE(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new r_;++t<r;)this.add(e[t])}function rk(e){var t=this.__data__=new rw(e);this.size=t.size}function rx(e,t){var r=sD(e),n=!r&&sO(e),i=!r&&!n&&sz(e),s=!r&&!n&&!i&&s0(e),a=r||n||i||s,o=a?tI(e.length,eS):[],u=o.length;for(var c in e)(t||eM.call(e,c))&&!(a&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||i_(c,u)))&&o.push(c);return o}function rS(e){var t=e.length;return t?e[nc(0,t-1)]:r}function rA(e,t,n){(n===r||sN(e[t],n))&&(n!==r||t in e)||rN(e,t,n)}function rC(e,t,n){var i=e[t];eM.call(e,t)&&sN(i,n)&&(n!==r||t in e)||rN(e,t,n)}function rI(e,t){for(var r=e.length;r--;)if(sN(e[r][0],t))return r;return -1}function rR(e,t,r,n){return rq(e,function(e,i,s){t(n,e,r(e),s)}),n}function rP(e,t){return e&&nj(t,ah(t),e)}function rN(e,t,r){"__proto__"==t&&e9?e9(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rM(e,t){for(var n=-1,i=t.length,s=eb(i),a=null==e;++n<i;)s[n]=a?r:ao(e,t[n]);return s}function rT(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function rO(e,t,n,i,s,a){var o,u=1&t,l=2&t,f=4&t;if(n&&(o=s?n(e,i,s,a):n(e)),o!==r)return o;if(!sW(e))return e;var v=sD(e);if(v){if(x=e.length,L=new e.constructor(x),x&&"string"==typeof e[0]&&eM.call(e,"index")&&(L.index=e.index,L.input=e.input),o=L,!u)return nU(e,o)}else{var x,L,B,q,z,U=iy(e),j=U==p||U==m;if(sz(e))return nO(e,u);if(U==b||U==c||j&&!s){if(o=l||j?{}:iv(e),!u)return l?(B=(z=o)&&nj(e,af(e),z),nj(e,ig(e),B)):(q=rP(o,e),nj(e,im(e),q))}else{if(!eJ[U])return s?e:{};o=function(e,t,r){var n,i,s=e.constructor;switch(t){case S:return nD(e);case d:case h:return new s(+e);case A:return n=r?nD(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength);case C:case I:case R:case P:case N:case M:case T:case O:case D:return nL(e,r);case g:return new s;case y:case E:return new s(e);case w:return(i=new e.constructor(e.source,ea.exec(e))).lastIndex=e.lastIndex,i;case _:return new s;case k:return rh?ek(rh.call(e)):{}}}(e,U,u)}}a||(a=new rk);var F=a.get(e);if(F)return F;a.set(e,o),sJ(e)?e.forEach(function(r){o.add(rO(r,t,n,r,e,a))}):sV(e)&&e.forEach(function(r,i){o.set(i,rO(r,t,n,i,e,a))});var H=f?l?ia:is:l?af:ah,$=v?r:H(e);return to($||e,function(r,i){$&&(r=e[i=r]),rC(o,i,rO(r,t,n,i,e,a))}),o}function rD(e,t,n){var i=n.length;if(null==e)return!i;for(e=ek(e);i--;){var s=n[i],a=t[s],o=e[s];if(o===r&&!(s in e)||!a(o))return!1}return!0}function rL(e,t,i){if("function"!=typeof e)throw new eA(n);return iM(function(){e.apply(r,i)},t)}function rB(e,t,r,n){var i=-1,s=tl,a=!0,o=e.length,u=[],c=t.length;if(!o)return u;r&&(t=th(t,tP(r))),n?(s=td,a=!1):t.length>=200&&(s=tM,a=!1,t=new rE(t));e:for(;++i<o;){var l=e[i],d=null==r?l:r(l);if(l=n||0!==l?l:0,a&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;u.push(l)}else s(t,d,n)||u.push(l)}return u}rp.templateSettings={escape:H,evaluate:$,interpolate:W,variable:"",imports:{_:rp}},rp.prototype=rg.prototype,rp.prototype.constructor=rp,ry.prototype=rm(rg.prototype),ry.prototype.constructor=ry,rb.prototype=rm(rg.prototype),rb.prototype.constructor=rb,rv.prototype.clear=function(){this.__data__=rn?rn(null):{},this.size=0},rv.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},rv.prototype.get=function(e){var t=this.__data__;if(rn){var n=t[e];return n===i?r:n}return eM.call(t,e)?t[e]:r},rv.prototype.has=function(e){var t=this.__data__;return rn?t[e]!==r:eM.call(t,e)},rv.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=rn&&t===r?i:t,this},rw.prototype.clear=function(){this.__data__=[],this.size=0},rw.prototype.delete=function(e){var t=this.__data__,r=rI(t,e);return!(r<0)&&(r==t.length-1?t.pop():e2.call(t,r,1),--this.size,!0)},rw.prototype.get=function(e){var t=this.__data__,n=rI(t,e);return n<0?r:t[n][1]},rw.prototype.has=function(e){return rI(this.__data__,e)>-1},rw.prototype.set=function(e,t){var r=this.__data__,n=rI(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},r_.prototype.clear=function(){this.size=0,this.__data__={hash:new rv,map:new(t7||rw),string:new rv}},r_.prototype.delete=function(e){var t=id(this,e).delete(e);return this.size-=t?1:0,t},r_.prototype.get=function(e){return id(this,e).get(e)},r_.prototype.has=function(e){return id(this,e).has(e)},r_.prototype.set=function(e,t){var r=id(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},rE.prototype.add=rE.prototype.push=function(e){return this.__data__.set(e,i),this},rE.prototype.has=function(e){return this.__data__.has(e)},rk.prototype.clear=function(){this.__data__=new rw,this.size=0},rk.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},rk.prototype.get=function(e){return this.__data__.get(e)},rk.prototype.has=function(e){return this.__data__.has(e)},rk.prototype.set=function(e,t){var r=this.__data__;if(r instanceof rw){var n=r.__data__;if(!t7||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new r_(n)}return r.set(e,t),this.size=r.size,this};var rq=n$(rG),rz=n$(rV,!0);function rU(e,t){var r=!0;return rq(e,function(e,n,i){return r=!!t(e,n,i)}),r}function rj(e,t,n){for(var i=-1,s=e.length;++i<s;){var a=e[i],o=t(a);if(null!=o&&(u===r?o==o&&!sX(o):n(o,u)))var u=o,c=a}return c}function rF(e,t){var r=[];return rq(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function rH(e,t,r,n,i){var s=-1,a=e.length;for(r||(r=iw),i||(i=[]);++s<a;){var o=e[s];t>0&&r(o)?t>1?rH(o,t-1,r,n,i):tf(i,o):n||(i[i.length]=o)}return i}var r$=nW(),rW=nW(!0);function rG(e,t){return e&&r$(e,t,ah)}function rV(e,t){return e&&rW(e,t,ah)}function rK(e,t){return tc(t,function(t){return sF(e[t])})}function rZ(e,t){t=nN(t,e);for(var n=0,i=t.length;null!=e&&n<i;)e=e[iq(t[n++])];return n&&n==i?e:r}function rY(e,t,r){var n=t(e);return sD(e)?n:tf(n,r(e))}function rJ(e){return null==e?e===r?"[object Undefined]":"[object Null]":e8&&e8 in ek(e)?function(e){var t=eM.call(e,e8),n=e[e8];try{e[e8]=r;var i=!0}catch{}var s=eD.call(e);return i&&(t?e[e8]=n:delete e[e8]),s}(e):eD.call(e)}function rQ(e,t){return e>t}function rX(e,t){return null!=e&&eM.call(e,t)}function r0(e,t){return null!=e&&t in ek(e)}function r1(e,t,n){for(var i=n?td:tl,s=e[0].length,a=e.length,o=a,u=eb(a),c=1/0,l=[];o--;){var d=e[o];o&&t&&(d=th(d,tP(t))),c=t3(d.length,c),u[o]=!n&&(t||s>=120&&d.length>=120)?new rE(o&&d):r}d=e[0];var h=-1,f=u[0];e:for(;++h<s&&l.length<c;){var p=d[h],m=t?t(p):p;if(p=n||0!==p?p:0,!(f?tM(f,m):i(l,m,n))){for(o=a;--o;){var g=u[o];if(!(g?tM(g,m):i(e[o],m,n)))continue e}f&&f.push(m),l.push(p)}}return l}function r2(e,t,n){t=nN(t,e);var i=null==(e=iR(e,t))?e:e[iq(iJ(t))];return null==i?r:ts(i,e,n)}function r3(e){return sG(e)&&rJ(e)==c}function r5(e,t,n,i,s){return e===t||(null!=e&&null!=t&&(sG(e)||sG(t))?function(e,t,n,i,s,a){var o=sD(e),u=sD(t),p=o?l:iy(e),m=u?l:iy(t);p=p==c?b:p,m=m==c?b:m;var v=p==b,x=m==b,C=p==m;if(C&&sz(e)){if(!sz(t))return!1;o=!0,v=!1}if(C&&!v)return a||(a=new rk),o||s0(e)?ir(e,t,n,i,s,a):function(e,t,r,n,i,s,a){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!s(new ej(e),new ej(t)));case d:case h:case y:return sN(+e,+t);case f:return e.name==t.name&&e.message==t.message;case w:case E:return e==t+"";case g:var o=tz;case _:var u=1&n;if(o||(o=tF),e.size!=t.size&&!u)break;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=ir(o(e),o(t),n,i,s,a);return a.delete(e),l;case k:if(rh)return rh.call(e)==rh.call(t)}return!1}(e,t,p,n,i,s,a);if(!(1&n)){var I=v&&eM.call(e,"__wrapped__"),R=x&&eM.call(t,"__wrapped__");if(I||R){var P=I?e.value():e,N=R?t.value():t;return a||(a=new rk),s(P,N,n,i,a)}}return!!C&&(a||(a=new rk),function(e,t,n,i,s,a){var o=1&n,u=is(e),c=u.length;if(c!=is(t).length&&!o)return!1;for(var l=c;l--;){var d=u[l];if(!(o?d in t:eM.call(t,d)))return!1}var h=a.get(e),f=a.get(t);if(h&&f)return h==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){var g=e[d=u[l]],y=t[d];if(i)var b=o?i(y,g,d,t,e,a):i(g,y,d,e,t,a);if(!(b===r?g===y||s(g,y,n,i,a):b)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var v=e.constructor,w=t.constructor;v!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w)&&(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,i,s,a))}(e,t,n,i,r5,s):e!=e&&t!=t)}function r6(e,t,n,i){var s=n.length,a=s,o=!i;if(null==e)return!a;for(e=ek(e);s--;){var u=n[s];if(o&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<a;){var c=(u=n[s])[0],l=e[c],d=u[1];if(o&&u[2]){if(l===r&&!(c in e))return!1}else{var h=new rk;if(i)var f=i(l,d,c,e,t,h);if(!(f===r?r5(d,l,3,i,h):f))return!1}}return!0}function r4(e){return!(!sW(e)||eO&&eO in e)&&(sF(e)?eq:ec).test(iz(e))}function r8(e){return"function"==typeof e?e:null==e?aq:"object"==typeof e?sD(e)?nr(e[0],e[1]):nt(e):aV(e)}function r9(e){if(!iA(e))return t1(e);var t=[];for(var r in ek(e))eM.call(e,r)&&"constructor"!=r&&t.push(r);return t}function r7(e,t){return e<t}function ne(e,t){var r=-1,n=sB(e)?eb(e.length):[];return rq(e,function(e,i,s){n[++r]=t(e,i,s)}),n}function nt(e){var t=ih(e);return 1==t.length&&t[0][2]?iC(t[0][0],t[0][1]):function(r){return r===e||r6(r,e,t)}}function nr(e,t){var n;return ik(e)&&(n=t)==n&&!sW(n)?iC(iq(e),t):function(n){var i=ao(n,e);return i===r&&i===t?au(n,e):r5(t,i,3)}}function nn(e,t,n,i,s){e!==t&&r$(t,function(a,o){if(s||(s=new rk),sW(a))!function(e,t,n,i,s,a,o){var u=iP(e,n),c=iP(t,n),l=o.get(c);if(l){rA(e,n,l);return}var d=a?a(u,c,n+"",e,t,o):r,h=d===r;if(h){var f=sD(c),p=!f&&sz(c),m=!f&&!p&&s0(c);d=c,f||p||m?sD(u)?d=u:sq(u)?d=nU(u):p?(h=!1,d=nO(c,!0)):m?(h=!1,d=nL(c,!0)):d=[]:sZ(c)||sO(c)?(d=u,sO(u)?d=s9(u):(!sW(u)||sF(u))&&(d=iv(c))):h=!1}h&&(o.set(c,d),s(d,c,i,a,o),o.delete(c)),rA(e,n,d)}(e,t,o,n,nn,i,s);else{var u=i?i(iP(e,o),a,o+"",e,t,s):r;u===r&&(u=a),rA(e,o,u)}},af)}function ni(e,t){var n=e.length;if(n)return i_(t+=t<0?n:0,n)?e[t]:r}function ns(e,t,r){t=t.length?th(t,function(e){return sD(e)?function(t){return rZ(t,1===e.length?e[0]:e)}:e}):[aq];var n=-1;return t=th(t,tP(il())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(ne(e,function(e,r,i){return{criteria:th(t,function(t){return t(e)}),index:++n,value:e}}),function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,s=t.criteria,a=i.length,o=r.length;++n<a;){var u=nB(i[n],s[n]);if(u){if(n>=o)return u;return u*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)})}function na(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var a=t[n],o=rZ(e,a);r(o,a)&&nh(s,nN(a,e),o)}return s}function no(e,t,r,n){var i=n?t_:tw,s=-1,a=t.length,o=e;for(e===t&&(t=nU(t)),r&&(o=th(e,tP(r)));++s<a;)for(var u=0,c=t[s],l=r?r(c):c;(u=i(o,l,u,n))>-1;)o!==e&&e2.call(o,u,1),e2.call(e,u,1);return e}function nu(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==s){var s=i;i_(i)?e2.call(e,i,1):nk(e,i)}}return e}function nc(e,t){return e+tY(t4()*(t-e+1))}function nl(e,t){var r="";if(!e||t<1||t>9007199254740991)return r;do t%2&&(r+=e),(t=tY(t/2))&&(e+=e);while(t);return r}function nd(e,t){return iT(iI(e,t,aq),e+"")}function nh(e,t,n,i){if(!sW(e))return e;t=nN(t,e);for(var s=-1,a=t.length,o=a-1,u=e;null!=u&&++s<a;){var c=iq(t[s]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)break;if(s!=o){var d=u[c];(l=i?i(d,c,u):r)===r&&(l=sW(d)?d:i_(t[s+1])?[]:{})}rC(u,c,l),u=u[c]}return e}var nf=ri?function(e,t){return ri.set(e,t),e}:aq,np=e9?function(e,t){return e9(e,"toString",{configurable:!0,enumerable:!1,value:aD(t),writable:!0})}:aq;function nm(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=eb(i);++n<i;)s[n]=e[n+t];return s}function ng(e,t){var r;return rq(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function ny(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var s=n+i>>>1,a=e[s];null!==a&&!sX(a)&&(r?a<=t:a<t)?n=s+1:i=s}return i}return nb(e,t,aq,r)}function nb(e,t,n,i){var s=0,a=null==e?0:e.length;if(0===a)return 0;t=n(t);for(var o=t!=t,u=null===t,c=sX(t),l=t===r;s<a;){var d=tY((s+a)/2),h=n(e[d]),f=h!==r,p=null===h,m=h==h,g=sX(h);if(o)var y=i||m;else y=l?m&&(i||f):u?m&&f&&(i||!p):c?m&&f&&!p&&(i||!g):!p&&!g&&(i?h<=t:h<t);y?s=d+1:a=d}return t3(a,4294967294)}function nv(e,t){for(var r=-1,n=e.length,i=0,s=[];++r<n;){var a=e[r],o=t?t(a):a;if(!r||!sN(o,u)){var u=o;s[i++]=0===a?0:a}}return s}function nw(e){return"number"==typeof e?e:sX(e)?o:+e}function n_(e){if("string"==typeof e)return e;if(sD(e))return th(e,n_)+"";if(sX(e))return rf?rf.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}function nE(e,t,r){var n=-1,i=tl,s=e.length,a=!0,o=[],u=o;if(r)a=!1,i=td;else if(s>=200){var c=t?null:n4(e);if(c)return tF(c);a=!1,i=tM,u=new rE}else u=t?[]:o;e:for(;++n<s;){var l=e[n],d=t?t(l):l;if(l=r||0!==l?l:0,a&&d==d){for(var h=u.length;h--;)if(u[h]===d)continue e;t&&u.push(d),o.push(l)}else i(u,d,r)||(u!==o&&u.push(d),o.push(l))}return o}function nk(e,t){return t=nN(t,e),null==(e=iR(e,t))||delete e[iq(iJ(t))]}function nx(e,t,r,n){return nh(e,t,r(rZ(e,t)),n)}function nS(e,t,r,n){for(var i=e.length,s=n?i:-1;(n?s--:++s<i)&&t(e[s],s,e););return r?nm(e,n?0:s,n?s+1:i):nm(e,n?s+1:0,n?i:s)}function nA(e,t){var r=e;return r instanceof rb&&(r=r.value()),tp(t,function(e,t){return t.func.apply(t.thisArg,tf([e],t.args))},r)}function nC(e,t,r){var n=e.length;if(n<2)return n?nE(e[0]):[];for(var i=-1,s=eb(n);++i<n;)for(var a=e[i],o=-1;++o<n;)o!=i&&(s[i]=rB(s[i]||a,e[o],t,r));return nE(rH(s,1),t,r)}function nI(e,t,n){for(var i=-1,s=e.length,a=t.length,o={};++i<s;){var u=i<a?t[i]:r;n(o,e[i],u)}return o}function nR(e){return sq(e)?e:[]}function nP(e){return"function"==typeof e?e:aq}function nN(e,t){return sD(e)?e:ik(e,t)?[e]:iB(s7(e))}function nM(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:nm(e,t,n)}var nT=ty||function(e){return e3.clearTimeout(e)};function nO(e,t){if(t)return e.slice();var r=e.length,n=e$?e$(r):new e.constructor(r);return e.copy(n),n}function nD(e){var t=new e.constructor(e.byteLength);return new ej(t).set(new ej(e)),t}function nL(e,t){var r=t?nD(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function nB(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,a=sX(e),o=t!==r,u=null===t,c=t==t,l=sX(t);if(!u&&!l&&!a&&e>t||a&&o&&c&&!u&&!l||i&&o&&c||!n&&c||!s)return 1;if(!i&&!a&&!l&&e<t||l&&n&&s&&!i&&!a||u&&n&&s||!o&&s||!c)return -1}return 0}function nq(e,t,r,n){for(var i=-1,s=e.length,a=r.length,o=-1,u=t.length,c=t2(s-a,0),l=eb(u+c),d=!n;++o<u;)l[o]=t[o];for(;++i<a;)(d||i<s)&&(l[r[i]]=e[i]);for(;c--;)l[o++]=e[i++];return l}function nz(e,t,r,n){for(var i=-1,s=e.length,a=-1,o=r.length,u=-1,c=t.length,l=t2(s-o,0),d=eb(l+c),h=!n;++i<l;)d[i]=e[i];for(var f=i;++u<c;)d[f+u]=t[u];for(;++a<o;)(h||i<s)&&(d[f+r[a]]=e[i++]);return d}function nU(e,t){var r=-1,n=e.length;for(t||(t=eb(n));++r<n;)t[r]=e[r];return t}function nj(e,t,n,i){var s=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var u=t[a],c=i?i(n[u],e[u],u,n,e):r;c===r&&(c=e[u]),s?rN(n,u,c):rC(n,u,c)}return n}function nF(e,t){return function(r,n){var i=sD(r)?ta:rR,s=t?t():{};return i(r,e,il(n,2),s)}}function nH(e){return nd(function(t,n){var i=-1,s=n.length,a=s>1?n[s-1]:r,o=s>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(s--,a):r,o&&iE(n[0],n[1],o)&&(a=s<3?r:a,s=1),t=ek(t);++i<s;){var u=n[i];u&&e(t,u,i,a)}return t})}function n$(e,t){return function(r,n){if(null==r)return r;if(!sB(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=ek(r);(t?s--:++s<i)&&!1!==n(a[s],s,a););return r}}function nW(e){return function(t,r,n){for(var i=-1,s=ek(t),a=n(t),o=a.length;o--;){var u=a[e?o:++i];if(!1===r(s[u],u,s))break}return t}}function nG(e){return function(t){var n=tq(t=s7(t))?t$(t):r,i=n?n[0]:t.charAt(0),s=n?nM(n,1).join(""):t.slice(1);return i[e]()+s}}function nV(e){return function(t){return tp(aM(ax(t).replace(eF,"")),e,"")}}function nK(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=rm(e.prototype),n=e.apply(r,t);return sW(n)?n:r}}function nZ(e){return function(t,n,i){var s=ek(t);if(!sB(t)){var a=il(n,3);t=ah(t),n=function(e){return a(s[e],e,s)}}var o=e(t,n,i);return o>-1?s[a?t[o]:o]:r}}function nY(e){return ii(function(t){var i=t.length,s=i,a=ry.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new eA(n);if(a&&!u&&"wrapper"==iu(o))var u=new ry([],!0)}for(s=u?s:i;++s<i;){var c=iu(o=t[s]),l="wrapper"==c?io(o):r;u=l&&ix(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[iu(l[0])].apply(u,l[3]):1==o.length&&ix(o)?u[c]():u.thru(o)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&sD(r))return u.plant(r).value();for(var n=0,s=i?t[n].apply(this,e):r;++n<i;)s=t[n].call(this,s);return s}})}function nJ(e,t,n,i,s,a,o,u,c,l){var d=128&t,h=1&t,f=2&t,p=24&t,m=512&t,g=f?r:nK(e);return function y(){for(var b=arguments.length,v=eb(b),w=b;w--;)v[w]=arguments[w];if(p)var _=ic(y),E=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(v,_);if(i&&(v=nq(v,i,s,p)),a&&(v=nz(v,a,o,p)),b-=E,p&&b<l){var k=tj(v,_);return n5(e,t,nJ,y.placeholder,n,v,k,u,c,l-b)}var x=h?n:this,S=f?x[e]:e;return b=v.length,u?v=function(e,t){for(var n=e.length,i=t3(t.length,n),s=nU(e);i--;){var a=t[i];e[i]=i_(a,n)?s[a]:r}return e}(v,u):m&&b>1&&v.reverse(),d&&c<b&&(v.length=c),this&&this!==e3&&this instanceof y&&(S=g||nK(S)),S.apply(x,v)}}function nQ(e,t){return function(r,n){var i,s;return i=t(n),s={},rG(r,function(t,r,n){e(s,i(t),r,n)}),s}}function nX(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=n_(n),i=n_(i)):(n=nw(n),i=nw(i)),s=e(n,i)}return s}}function n0(e){return ii(function(t){return t=th(t,tP(il())),nd(function(r){var n=this;return e(t,function(e){return ts(e,n,r)})})})}function n1(e,t){var n=(t=t===r?" ":n_(t)).length;if(n<2)return n?nl(t,e):t;var i=nl(t,tZ(e/tH(t)));return tq(t)?nM(t$(i),0,e).join(""):i.slice(0,e)}function n2(e){return function(t,n,i){return i&&"number"!=typeof i&&iE(t,n,i)&&(n=i=r),t=s5(t),n===r?(n=t,t=0):n=s5(n),i=i===r?t<n?1:-1:s5(i),function(e,t,r,n){for(var i=-1,s=t2(tZ((t-e)/(r||1)),0),a=eb(s);s--;)a[n?s:++i]=e,e+=r;return a}(t,n,i,e)}}function n3(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=s8(t),r=s8(r)),e(t,r)}}function n5(e,t,n,i,s,a,o,u,c,l){var d=8&t,h=d?o:r,f=d?r:o,p=d?a:r,m=d?r:a;t|=d?32:64,4&(t&=~(d?64:32))||(t&=-4);var g=[e,t,s,p,h,m,f,u,c,l],y=n.apply(r,g);return ix(e)&&iN(y,g),y.placeholder=i,iO(y,e,t)}function n6(e){var t=eE[e];return function(e,r){if(e=s8(e),(r=null==r?0:t3(s6(r),292))&&tX(e)){var n=(s7(e)+"e").split("e");return+((n=(s7(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var n4=rt&&1/tF(new rt([,-0]))[1]==a?function(e){return new rt(e)}:aH;function n8(e){return function(t){var r,n,i=iy(t);return i==g?tz(t):i==_?(r=-1,n=Array(t.size),t.forEach(function(e){n[++r]=[e,e]}),n):th(e(t),function(e){return[e,t[e]]})}}function n9(e,t,i,a,o,u,c,l){var d=2&t;if(!d&&"function"!=typeof e)throw new eA(n);var h=a?a.length:0;if(h||(t&=-97,a=o=r),c=c===r?c:t2(s6(c),0),l=l===r?l:s6(l),h-=o?o.length:0,64&t){var f=a,p=o;a=o=r}var m=d?r:io(e),g=[e,t,i,a,o,f,p,u,c,l];if(m&&function(e,t){var r=e[1],n=t[1],i=r|n,a=i<131,o=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(a||o){1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nq(c,u,t[4]):u,e[4]=c?tj(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?nz(c,u,t[6]):u,e[6]=c?tj(e[5],s):t[6]),(u=t[7])&&(e[7]=u),128&n&&(e[8]=null==e[8]?t[8]:t3(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}}(g,m),e=g[0],t=g[1],i=g[2],a=g[3],o=g[4],(l=g[9]=g[9]===r?d?0:e.length:t2(g[9]-h,0))||!(24&t)||(t&=-25),t&&1!=t)8==t||16==t?(y=e,b=t,v=l,w=nK(y),M=function e(){for(var t=arguments.length,n=eb(t),i=t,s=ic(e);i--;)n[i]=arguments[i];var a=t<3&&n[0]!==s&&n[t-1]!==s?[]:tj(n,s);return(t-=a.length)<v?n5(y,b,nJ,e.placeholder,r,n,a,r,r,v-t):ts(this&&this!==e3&&this instanceof e?w:y,this,n)}):32!=t&&33!=t||o.length?M=nJ.apply(r,g):(_=e,E=t,k=i,x=a,S=1&E,A=nK(_),M=function e(){for(var t=-1,r=arguments.length,n=-1,i=x.length,s=eb(i+r),a=this&&this!==e3&&this instanceof e?A:_;++n<i;)s[n]=x[n];for(;r--;)s[n++]=arguments[++t];return ts(a,S?k:this,s)});else var y,b,v,w,_,E,k,x,S,A,C,I,R,P,N,M=(C=e,I=t,R=i,P=1&I,N=nK(C),function e(){return(this&&this!==e3&&this instanceof e?N:C).apply(P?R:this,arguments)});return iO((m?nf:iN)(M,g),e,t)}function n7(e,t,n,i){return e===r||sN(e,eR[n])&&!eM.call(i,n)?t:e}function ie(e,t,n,i,s,a){return sW(e)&&sW(t)&&(a.set(t,e),nn(e,t,r,ie,a),a.delete(t)),e}function it(e){return sZ(e)?r:e}function ir(e,t,n,i,s,a){var o=1&n,u=e.length,c=t.length;if(u!=c&&!(o&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var h=-1,f=!0,p=2&n?new rE:r;for(a.set(e,t),a.set(t,e);++h<u;){var m=e[h],g=t[h];if(i)var y=o?i(g,m,h,t,e,a):i(m,g,h,e,t,a);if(y!==r){if(y)continue;f=!1;break}if(p){if(!tg(t,function(e,t){if(!tM(p,t)&&(m===e||s(m,e,n,i,a)))return p.push(t)})){f=!1;break}}else if(!(m===g||s(m,g,n,i,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function ii(e){return iT(iI(e,r,iG),e+"")}function is(e){return rY(e,ah,im)}function ia(e){return rY(e,af,ig)}var io=ri?function(e){return ri.get(e)}:aH;function iu(e){for(var t=e.name+"",r=rs[t],n=eM.call(rs,t)?r.length:0;n--;){var i=r[n],s=i.func;if(null==s||s==e)return i.name}return t}function ic(e){return(eM.call(rp,"placeholder")?rp:e).placeholder}function il(){var e=rp.iteratee||az;return e=e===az?r8:e,arguments.length?e(arguments[0],arguments[1]):e}function id(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function ih(e){for(var t=ah(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,i==i&&!sW(i)]}return t}function ip(e,t){var n=null==e?r:e[t];return r4(n)?n:r}var im=tJ?function(e){return null==e?[]:tc(tJ(e=ek(e)),function(t){return e1.call(e,t)})}:aY,ig=tJ?function(e){for(var t=[];e;)tf(t,im(e)),e=eG(e);return t}:aY,iy=rJ;function ib(e,t,r){t=nN(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=iq(t[n]);if(!(s=null!=e&&r(e,a)))break;e=e[a]}return s||++n!=i?s:!!(i=null==e?0:e.length)&&s$(i)&&i_(a,i)&&(sD(e)||sO(e))}function iv(e){return"function"!=typeof e.constructor||iA(e)?{}:rm(eG(e))}function iw(e){return sD(e)||sO(e)||!!(e5&&e&&e[e5])}function i_(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&ed.test(e))&&e>-1&&e%1==0&&e<t}function iE(e,t,r){if(!sW(r))return!1;var n=typeof t;return("number"==n?!!(sB(r)&&i_(t,r.length)):"string"==n&&t in r)&&sN(r[t],e)}function ik(e,t){if(sD(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||sX(e))||V.test(e)||!G.test(e)||null!=t&&e in ek(t)}function ix(e){var t=iu(e),r=rp[t];if("function"!=typeof r||!(t in rb.prototype))return!1;if(e===r)return!0;var n=io(r);return!!n&&e===n[0]}(t9&&iy(new t9(new ArrayBuffer(1)))!=A||t7&&iy(new t7)!=g||re&&iy(re.resolve())!=v||rt&&iy(new rt)!=_||rr&&iy(new rr)!=x)&&(iy=function(e){var t=rJ(e),n=t==b?e.constructor:r,i=n?iz(n):"";if(i)switch(i){case ra:return A;case ro:return g;case ru:return v;case rc:return _;case rl:return x}return t});var iS=eP?sF:aJ;function iA(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eR)}function iC(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in ek(n))}}function iI(e,t,n){return t=t2(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=t2(r.length-t,0),a=eb(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=eb(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),ts(e,this,o)}}function iR(e,t){return t.length<2?e:rZ(e,nm(t,0,-1))}function iP(e,t){if(!("constructor"===t&&"function"==typeof e[t])&&"__proto__"!=t)return e[t]}var iN=iD(nf),iM=tK||function(e,t){return e3.setTimeout(e,t)},iT=iD(np);function iO(e,t,r){var n,i,s=t+"";return iT(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(X,`{
/* [wrapped with `+t+`] */
`)}(s,(n=(i=s.match(ee))?i[1].split(et):[],to(u,function(e){var t="_."+e[0];r&e[1]&&!tl(n,t)&&n.push(t)}),n.sort())))}function iD(e){var t=0,n=0;return function(){var i=t5(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function iL(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var a=nc(n,s),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var iB=(eg=(em=sS(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(K,function(e,r,n,i){t.push(n?i.replace(ei,"$1"):r||e)}),t},function(e){return 500===eg.size&&eg.clear(),e})).cache,em);function iq(e){if("string"==typeof e||sX(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function iz(e){if(null!=e){try{return eN.call(e)}catch{}try{return e+""}catch{}}return""}function iU(e){if(e instanceof rb)return e.clone();var t=new ry(e.__wrapped__,e.__chain__);return t.__actions__=nU(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ij=nd(function(e,t){return sq(e)?rB(e,rH(t,1,sq,!0)):[]}),iF=nd(function(e,t){var n=iJ(t);return sq(n)&&(n=r),sq(e)?rB(e,rH(t,1,sq,!0),il(n,2)):[]}),iH=nd(function(e,t){var n=iJ(t);return sq(n)&&(n=r),sq(e)?rB(e,rH(t,1,sq,!0),r,n):[]});function i$(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:s6(r);return i<0&&(i=t2(n+i,0)),tv(e,il(t,3),i)}function iW(e,t,n){var i=null==e?0:e.length;if(!i)return -1;var s=i-1;return n!==r&&(s=s6(n),s=n<0?t2(i+s,0):t3(s,i-1)),tv(e,il(t,3),s,!0)}function iG(e){return(null==e?0:e.length)?rH(e,1):[]}function iV(e){return e&&e.length?e[0]:r}var iK=nd(function(e){var t=th(e,nR);return t.length&&t[0]===e[0]?r1(t):[]}),iZ=nd(function(e){var t=iJ(e),n=th(e,nR);return t===iJ(n)?t=r:n.pop(),n.length&&n[0]===e[0]?r1(n,il(t,2)):[]}),iY=nd(function(e){var t=iJ(e),n=th(e,nR);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?r1(n,r,t):[]});function iJ(e){var t=null==e?0:e.length;return t?e[t-1]:r}var iQ=nd(iX);function iX(e,t){return e&&e.length&&t&&t.length?no(e,t):e}var i0=ii(function(e,t){var r=null==e?0:e.length,n=rM(e,t);return nu(e,th(t,function(e){return i_(e,r)?+e:e}).sort(nB)),n});function i1(e){return null==e?e:t8.call(e)}var i2=nd(function(e){return nE(rH(e,1,sq,!0))}),i3=nd(function(e){var t=iJ(e);return sq(t)&&(t=r),nE(rH(e,1,sq,!0),il(t,2))}),i5=nd(function(e){var t=iJ(e);return t="function"==typeof t?t:r,nE(rH(e,1,sq,!0),r,t)});function i6(e){if(!(e&&e.length))return[];var t=0;return e=tc(e,function(e){if(sq(e))return t=t2(e.length,t),!0}),tI(t,function(t){return th(e,tx(t))})}function i4(e,t){if(!(e&&e.length))return[];var n=i6(e);return null==t?n:th(n,function(e){return ts(t,r,e)})}var i8=nd(function(e,t){return sq(e)?rB(e,t):[]}),i9=nd(function(e){return nC(tc(e,sq))}),i7=nd(function(e){var t=iJ(e);return sq(t)&&(t=r),nC(tc(e,sq),il(t,2))}),se=nd(function(e){var t=iJ(e);return t="function"==typeof t?t:r,nC(tc(e,sq),r,t)}),st=nd(i6),sr=nd(function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,i4(e,n)});function sn(e){var t=rp(e);return t.__chain__=!0,t}function si(e,t){return t(e)}var ss=ii(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return rM(t,e)};return!(t>1)&&!this.__actions__.length&&i instanceof rb&&i_(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:si,args:[s],thisArg:r}),new ry(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(r),e})):this.thru(s)}),sa=nF(function(e,t,r){eM.call(e,r)?++e[r]:rN(e,r,1)}),so=nZ(i$),su=nZ(iW);function sc(e,t){return(sD(e)?to:rq)(e,il(t,3))}function sl(e,t){return(sD(e)?function(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}:rz)(e,il(t,3))}var sd=nF(function(e,t,r){eM.call(e,r)?e[r].push(t):rN(e,r,[t])}),sh=nd(function(e,t,r){var n=-1,i="function"==typeof t,s=sB(e)?eb(e.length):[];return rq(e,function(e){s[++n]=i?ts(t,e,r):r2(e,t,r)}),s}),sf=nF(function(e,t,r){rN(e,r,t)});function sp(e,t){return(sD(e)?th:ne)(e,il(t,3))}var sm=nF(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),sg=nd(function(e,t){if(null==e)return[];var r=t.length;return r>1&&iE(e,t[0],t[1])?t=[]:r>2&&iE(t[0],t[1],t[2])&&(t=[t[0]]),ns(e,rH(t,1),[])}),sy=tS||function(){return e3.Date.now()};function sb(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,n9(e,128,r,r,r,r,t)}function sv(e,t){var i;if("function"!=typeof t)throw new eA(n);return e=s6(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var sw=nd(function(e,t,r){var n=1;if(r.length){var i=tj(r,ic(sw));n|=32}return n9(e,n,t,r,i)}),s_=nd(function(e,t,r){var n=3;if(r.length){var i=tj(r,ic(s_));n|=32}return n9(t,n,e,r,i)});function sE(e,t,i){var s,a,o,u,c,l,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new eA(n);function m(t){var n=s,i=a;return s=a=r,d=t,u=e.apply(i,n)}function g(e){var n=e-l,i=e-d;return l===r||n>=t||n<0||f&&i>=o}function y(){var e,r,n,i=sy();if(g(i))return b(i);c=iM(y,(e=i-l,r=i-d,n=t-e,f?t3(n,o-r):n))}function b(e){return c=r,p&&s?m(e):(s=a=r,u)}function v(){var e,n=sy(),i=g(n);if(s=arguments,a=this,l=n,i){if(c===r)return d=e=l,c=iM(y,t),h?m(e):u;if(f)return nT(c),c=iM(y,t),m(l)}return c===r&&(c=iM(y,t)),u}return t=s8(t)||0,sW(i)&&(h=!!i.leading,o=(f="maxWait"in i)?t2(s8(i.maxWait)||0,t):o,p="trailing"in i?!!i.trailing:p),v.cancel=function(){c!==r&&nT(c),d=0,s=l=a=c=r},v.flush=function(){return c===r?u:b(sy())},v}var sk=nd(function(e,t){return rL(e,1,t)}),sx=nd(function(e,t,r){return rL(e,s8(t)||0,r)});function sS(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new eA(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(sS.Cache||r_),r}function sA(e){if("function"!=typeof e)throw new eA(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}sS.Cache=r_;var sC=nd(function(e,t){var r=(t=1==t.length&&sD(t[0])?th(t[0],tP(il())):th(rH(t,1),tP(il()))).length;return nd(function(n){for(var i=-1,s=t3(n.length,r);++i<s;)n[i]=t[i].call(this,n[i]);return ts(e,this,n)})}),sI=nd(function(e,t){var n=tj(t,ic(sI));return n9(e,32,r,t,n)}),sR=nd(function(e,t){var n=tj(t,ic(sR));return n9(e,64,r,t,n)}),sP=ii(function(e,t){return n9(e,256,r,r,r,t)});function sN(e,t){return e===t||e!=e&&t!=t}var sM=n3(rQ),sT=n3(function(e,t){return e>=t}),sO=r3(function(){return arguments}())?r3:function(e){return sG(e)&&eM.call(e,"callee")&&!e1.call(e,"callee")},sD=eb.isArray,sL=e7?tP(e7):function(e){return sG(e)&&rJ(e)==S};function sB(e){return null!=e&&s$(e.length)&&!sF(e)}function sq(e){return sG(e)&&sB(e)}var sz=tQ||aJ,sU=te?tP(te):function(e){return sG(e)&&rJ(e)==h};function sj(e){if(!sG(e))return!1;var t=rJ(e);return t==f||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sZ(e)}function sF(e){if(!sW(e))return!1;var t=rJ(e);return t==p||t==m||"[object AsyncFunction]"==t||"[object Proxy]"==t}function sH(e){return"number"==typeof e&&e==s6(e)}function s$(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function sW(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function sG(e){return null!=e&&"object"==typeof e}var sV=tt?tP(tt):function(e){return sG(e)&&iy(e)==g};function sK(e){return"number"==typeof e||sG(e)&&rJ(e)==y}function sZ(e){if(!sG(e)||rJ(e)!=b)return!1;var t=eG(e);if(null===t)return!0;var r=eM.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&eN.call(r)==eL}var sY=tr?tP(tr):function(e){return sG(e)&&rJ(e)==w},sJ=tn?tP(tn):function(e){return sG(e)&&iy(e)==_};function sQ(e){return"string"==typeof e||!sD(e)&&sG(e)&&rJ(e)==E}function sX(e){return"symbol"==typeof e||sG(e)&&rJ(e)==k}var s0=ti?tP(ti):function(e){return sG(e)&&s$(e.length)&&!!eY[rJ(e)]},s1=n3(r7),s2=n3(function(e,t){return e<=t});function s3(e){if(!e)return[];if(sB(e))return sQ(e)?t$(e):nU(e);if(e6&&e[e6])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[e6]());var t=iy(e);return(t==g?tz:t==_?tF:a_)(e)}function s5(e){return e?(e=s8(e))===a||e===-a?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function s6(e){var t=s5(e),r=t%1;return t==t?r?t-r:t:0}function s4(e){return e?rT(s6(e),0,4294967295):0}function s8(e){if("number"==typeof e)return e;if(sX(e))return o;if(sW(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=sW(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tR(e);var r=eu.test(e);return r||el.test(e)?e0(e.slice(2),r?2:8):eo.test(e)?o:+e}function s9(e){return nj(e,af(e))}function s7(e){return null==e?"":n_(e)}var ae=nH(function(e,t){if(iA(t)||sB(t)){nj(t,ah(t),e);return}for(var r in t)eM.call(t,r)&&rC(e,r,t[r])}),at=nH(function(e,t){nj(t,af(t),e)}),ar=nH(function(e,t,r,n){nj(t,af(t),e,n)}),an=nH(function(e,t,r,n){nj(t,ah(t),e,n)}),ai=ii(rM),as=nd(function(e,t){e=ek(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&iE(t[0],t[1],s)&&(i=1);++n<i;)for(var a=t[n],o=af(a),u=-1,c=o.length;++u<c;){var l=o[u],d=e[l];(d===r||sN(d,eR[l])&&!eM.call(e,l))&&(e[l]=a[l])}return e}),aa=nd(function(e){return e.push(r,ie),ts(am,r,e)});function ao(e,t,n){var i=null==e?r:rZ(e,t);return i===r?n:i}function au(e,t){return null!=e&&ib(e,t,r0)}var ac=nQ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eD.call(t)),e[t]=r},aD(aq)),al=nQ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eD.call(t)),eM.call(e,t)?e[t].push(r):e[t]=[r]},il),ad=nd(r2);function ah(e){return sB(e)?rx(e):r9(e)}function af(e){return sB(e)?rx(e,!0):function(e){if(!sW(e))return function(e){var t=[];if(null!=e)for(var r in ek(e))t.push(r);return t}(e);var t=iA(e),r=[];for(var n in e)"constructor"==n&&(t||!eM.call(e,n))||r.push(n);return r}(e)}var ap=nH(function(e,t,r){nn(e,t,r)}),am=nH(function(e,t,r,n){nn(e,t,r,n)}),ag=ii(function(e,t){var r={};if(null==e)return r;var n=!1;t=th(t,function(t){return t=nN(t,e),n||(n=t.length>1),t}),nj(e,ia(e),r),n&&(r=rO(r,7,it));for(var i=t.length;i--;)nk(r,t[i]);return r}),ay=ii(function(e,t){return null==e?{}:na(e,t,function(t,r){return au(e,r)})});function ab(e,t){if(null==e)return{};var r=th(ia(e),function(e){return[e]});return t=il(t),na(e,r,function(e,r){return t(e,r[0])})}var av=n8(ah),aw=n8(af);function a_(e){return null==e?[]:tN(e,ah(e))}var aE=nV(function(e,t,r){return t=t.toLowerCase(),e+(r?ak(t):t)});function ak(e){return aN(s7(e).toLowerCase())}function ax(e){return(e=s7(e))&&e.replace(eh,tD).replace(eH,"")}var aS=nV(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),aA=nV(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),aC=nG("toLowerCase"),aI=nV(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),aR=nV(function(e,t,r){return e+(r?" ":"")+aN(t)}),aP=nV(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),aN=nG("toUpperCase");function aM(e,t,n){var i;return e=s7(e),(t=n?r:t)===r?(i=e,eV.test(i))?e.match(eW)||[]:e.match(er)||[]:e.match(t)||[]}var aT=nd(function(e,t){try{return ts(e,r,t)}catch(e){return sj(e)?e:new ew(e)}}),aO=ii(function(e,t){return to(t,function(t){rN(e,t=iq(t),sw(e[t],e))}),e});function aD(e){return function(){return e}}var aL=nY(),aB=nY(!0);function aq(e){return e}function az(e){return r8("function"==typeof e?e:rO(e,1))}var aU=nd(function(e,t){return function(r){return r2(r,e,t)}}),aj=nd(function(e,t){return function(r){return r2(e,r,t)}});function aF(e,t,r){var n=ah(t),i=rK(t,n);null!=r||sW(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=rK(t,ah(t)));var s=!(sW(r)&&"chain"in r)||!!r.chain,a=sF(e);return to(i,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__);return(r.__actions__=nU(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,tf([this.value()],arguments))})}),e}function aH(){}var a$=n0(th),aW=n0(tu),aG=n0(tg);function aV(e){return ik(e)?tx(iq(e)):function(t){return rZ(t,e)}}var aK=n2(),aZ=n2(!0);function aY(){return[]}function aJ(){return!1}var aQ=nX(function(e,t){return e+t},0),aX=n6("ceil"),a0=nX(function(e,t){return e/t},1),a1=n6("floor"),a2=nX(function(e,t){return e*t},1),a3=n6("round"),a5=nX(function(e,t){return e-t},0);return rp.after=function(e,t){if("function"!=typeof t)throw new eA(n);return e=s6(e),function(){if(--e<1)return t.apply(this,arguments)}},rp.ary=sb,rp.assign=ae,rp.assignIn=at,rp.assignInWith=ar,rp.assignWith=an,rp.at=ai,rp.before=sv,rp.bind=sw,rp.bindAll=aO,rp.bindKey=s_,rp.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return sD(e)?e:[e]},rp.chain=sn,rp.chunk=function(e,t,n){t=(n?iE(e,t,n):t===r)?1:t2(s6(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,o=eb(tZ(i/t));s<i;)o[a++]=nm(e,s,s+=t);return o},rp.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var s=e[t];s&&(i[n++]=s)}return i},rp.concat=function(){var e=arguments.length;if(!e)return[];for(var t=eb(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return tf(sD(r)?nU(r):[r],rH(t,1))},rp.cond=function(e){var t=null==e?0:e.length,r=il();return e=t?th(e,function(e){if("function"!=typeof e[1])throw new eA(n);return[r(e[0]),e[1]]}):[],nd(function(r){for(var n=-1;++n<t;){var i=e[n];if(ts(i[0],this,r))return ts(i[1],this,r)}})},rp.conforms=function(e){var t,r;return r=ah(t=rO(e,1)),function(e){return rD(e,t,r)}},rp.constant=aD,rp.countBy=sa,rp.create=function(e,t){var r=rm(e);return null==t?r:rP(r,t)},rp.curry=function e(t,n,i){n=i?r:n;var s=n9(t,8,r,r,r,r,r,n);return s.placeholder=e.placeholder,s},rp.curryRight=function e(t,n,i){n=i?r:n;var s=n9(t,16,r,r,r,r,r,n);return s.placeholder=e.placeholder,s},rp.debounce=sE,rp.defaults=as,rp.defaultsDeep=aa,rp.defer=sk,rp.delay=sx,rp.difference=ij,rp.differenceBy=iF,rp.differenceWith=iH,rp.drop=function(e,t,n){var i=null==e?0:e.length;return i?nm(e,(t=n||t===r?1:s6(t))<0?0:t,i):[]},rp.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?nm(e,0,(t=i-(t=n||t===r?1:s6(t)))<0?0:t):[]},rp.dropRightWhile=function(e,t){return e&&e.length?nS(e,il(t,3),!0,!0):[]},rp.dropWhile=function(e,t){return e&&e.length?nS(e,il(t,3),!0):[]},rp.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&iE(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=s6(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:s6(i))<0&&(i+=s),i=n>i?0:s4(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},rp.filter=function(e,t){return(sD(e)?tc:rF)(e,il(t,3))},rp.flatMap=function(e,t){return rH(sp(e,t),1)},rp.flatMapDeep=function(e,t){return rH(sp(e,t),a)},rp.flatMapDepth=function(e,t,n){return n=n===r?1:s6(n),rH(sp(e,t),n)},rp.flatten=iG,rp.flattenDeep=function(e){return(null==e?0:e.length)?rH(e,a):[]},rp.flattenDepth=function(e,t){return(null==e?0:e.length)?rH(e,t=t===r?1:s6(t)):[]},rp.flip=function(e){return n9(e,512)},rp.flow=aL,rp.flowRight=aB,rp.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},rp.functions=function(e){return null==e?[]:rK(e,ah(e))},rp.functionsIn=function(e){return null==e?[]:rK(e,af(e))},rp.groupBy=sd,rp.initial=function(e){return(null==e?0:e.length)?nm(e,0,-1):[]},rp.intersection=iK,rp.intersectionBy=iZ,rp.intersectionWith=iY,rp.invert=ac,rp.invertBy=al,rp.invokeMap=sh,rp.iteratee=az,rp.keyBy=sf,rp.keys=ah,rp.keysIn=af,rp.map=sp,rp.mapKeys=function(e,t){var r={};return t=il(t,3),rG(e,function(e,n,i){rN(r,t(e,n,i),e)}),r},rp.mapValues=function(e,t){var r={};return t=il(t,3),rG(e,function(e,n,i){rN(r,n,t(e,n,i))}),r},rp.matches=function(e){return nt(rO(e,1))},rp.matchesProperty=function(e,t){return nr(e,rO(t,1))},rp.memoize=sS,rp.merge=ap,rp.mergeWith=am,rp.method=aU,rp.methodOf=aj,rp.mixin=aF,rp.negate=sA,rp.nthArg=function(e){return e=s6(e),nd(function(t){return ni(t,e)})},rp.omit=ag,rp.omitBy=function(e,t){return ab(e,sA(il(t)))},rp.once=function(e){return sv(2,e)},rp.orderBy=function(e,t,n,i){return null==e?[]:(sD(t)||(t=null==t?[]:[t]),sD(n=i?r:n)||(n=null==n?[]:[n]),ns(e,t,n))},rp.over=a$,rp.overArgs=sC,rp.overEvery=aW,rp.overSome=aG,rp.partial=sI,rp.partialRight=sR,rp.partition=sm,rp.pick=ay,rp.pickBy=ab,rp.property=aV,rp.propertyOf=function(e){return function(t){return null==e?r:rZ(e,t)}},rp.pull=iQ,rp.pullAll=iX,rp.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?no(e,t,il(r,2)):e},rp.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?no(e,t,r,n):e},rp.pullAt=i0,rp.range=aK,rp.rangeRight=aZ,rp.rearg=sP,rp.reject=function(e,t){return(sD(e)?tc:rF)(e,sA(il(t,3)))},rp.remove=function(e,t){var r=[];if(!(e&&e.length))return r;var n=-1,i=[],s=e.length;for(t=il(t,3);++n<s;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return nu(e,i),r},rp.rest=function(e,t){if("function"!=typeof e)throw new eA(n);return nd(e,t=t===r?t:s6(t))},rp.reverse=i1,rp.sampleSize=function(e,t,n){return t=(n?iE(e,t,n):t===r)?1:s6(t),(sD(e)?function(e,t){return iL(nU(e),rT(t,0,e.length))}:function(e,t){var r=a_(e);return iL(r,rT(t,0,r.length))})(e,t)},rp.set=function(e,t,r){return null==e?e:nh(e,t,r)},rp.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:nh(e,t,n,i)},rp.shuffle=function(e){return(sD(e)?function(e){return iL(nU(e))}:function(e){return iL(a_(e))})(e)},rp.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&iE(e,t,n)?(t=0,n=i):(t=null==t?0:s6(t),n=n===r?i:s6(n)),nm(e,t,n)):[]},rp.sortBy=sg,rp.sortedUniq=function(e){return e&&e.length?nv(e):[]},rp.sortedUniqBy=function(e,t){return e&&e.length?nv(e,il(t,2)):[]},rp.split=function(e,t,n){return n&&"number"!=typeof n&&iE(e,t,n)&&(t=n=r),(n=n===r?4294967295:n>>>0)?(e=s7(e))&&("string"==typeof t||null!=t&&!sY(t))&&!(t=n_(t))&&tq(e)?nM(t$(e),0,n):e.split(t,n):[]},rp.spread=function(e,t){if("function"!=typeof e)throw new eA(n);return t=null==t?0:t2(s6(t),0),nd(function(r){var n=r[t],i=nM(r,0,t);return n&&tf(i,n),ts(e,this,i)})},rp.tail=function(e){var t=null==e?0:e.length;return t?nm(e,1,t):[]},rp.take=function(e,t,n){return e&&e.length?nm(e,0,(t=n||t===r?1:s6(t))<0?0:t):[]},rp.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?nm(e,(t=i-(t=n||t===r?1:s6(t)))<0?0:t,i):[]},rp.takeRightWhile=function(e,t){return e&&e.length?nS(e,il(t,3),!1,!0):[]},rp.takeWhile=function(e,t){return e&&e.length?nS(e,il(t,3)):[]},rp.tap=function(e,t){return t(e),e},rp.throttle=function(e,t,r){var i=!0,s=!0;if("function"!=typeof e)throw new eA(n);return sW(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),sE(e,t,{leading:i,maxWait:t,trailing:s})},rp.thru=si,rp.toArray=s3,rp.toPairs=av,rp.toPairsIn=aw,rp.toPath=function(e){return sD(e)?th(e,iq):sX(e)?[e]:nU(iB(s7(e)))},rp.toPlainObject=s9,rp.transform=function(e,t,r){var n=sD(e),i=n||sz(e)||s0(e);if(t=il(t,4),null==r){var s=e&&e.constructor;r=i?n?new s:[]:sW(e)&&sF(s)?rm(eG(e)):{}}return(i?to:rG)(e,function(e,n,i){return t(r,e,n,i)}),r},rp.unary=function(e){return sb(e,1)},rp.union=i2,rp.unionBy=i3,rp.unionWith=i5,rp.uniq=function(e){return e&&e.length?nE(e):[]},rp.uniqBy=function(e,t){return e&&e.length?nE(e,il(t,2)):[]},rp.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?nE(e,r,t):[]},rp.unset=function(e,t){return null==e||nk(e,t)},rp.unzip=i6,rp.unzipWith=i4,rp.update=function(e,t,r){return null==e?e:nx(e,t,nP(r))},rp.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:nx(e,t,nP(n),i)},rp.values=a_,rp.valuesIn=function(e){return null==e?[]:tN(e,af(e))},rp.without=i8,rp.words=aM,rp.wrap=function(e,t){return sI(nP(t),e)},rp.xor=i9,rp.xorBy=i7,rp.xorWith=se,rp.zip=st,rp.zipObject=function(e,t){return nI(e||[],t||[],rC)},rp.zipObjectDeep=function(e,t){return nI(e||[],t||[],nh)},rp.zipWith=sr,rp.entries=av,rp.entriesIn=aw,rp.extend=at,rp.extendWith=ar,aF(rp,rp),rp.add=aQ,rp.attempt=aT,rp.camelCase=aE,rp.capitalize=ak,rp.ceil=aX,rp.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=s8(n))==n?n:0),t!==r&&(t=(t=s8(t))==t?t:0),rT(s8(e),t,n)},rp.clone=function(e){return rO(e,4)},rp.cloneDeep=function(e){return rO(e,5)},rp.cloneDeepWith=function(e,t){return rO(e,5,t="function"==typeof t?t:r)},rp.cloneWith=function(e,t){return rO(e,4,t="function"==typeof t?t:r)},rp.conformsTo=function(e,t){return null==t||rD(e,t,ah(t))},rp.deburr=ax,rp.defaultTo=function(e,t){return null==e||e!=e?t:e},rp.divide=a0,rp.endsWith=function(e,t,n){e=s7(e),t=n_(t);var i=e.length,s=n=n===r?i:rT(s6(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},rp.eq=sN,rp.escape=function(e){return(e=s7(e))&&F.test(e)?e.replace(U,tL):e},rp.escapeRegExp=function(e){return(e=s7(e))&&Y.test(e)?e.replace(Z,"\\$&"):e},rp.every=function(e,t,n){var i=sD(e)?tu:rU;return n&&iE(e,t,n)&&(t=r),i(e,il(t,3))},rp.find=so,rp.findIndex=i$,rp.findKey=function(e,t){return tb(e,il(t,3),rG)},rp.findLast=su,rp.findLastIndex=iW,rp.findLastKey=function(e,t){return tb(e,il(t,3),rV)},rp.floor=a1,rp.forEach=sc,rp.forEachRight=sl,rp.forIn=function(e,t){return null==e?e:r$(e,il(t,3),af)},rp.forInRight=function(e,t){return null==e?e:rW(e,il(t,3),af)},rp.forOwn=function(e,t){return e&&rG(e,il(t,3))},rp.forOwnRight=function(e,t){return e&&rV(e,il(t,3))},rp.get=ao,rp.gt=sM,rp.gte=sT,rp.has=function(e,t){return null!=e&&ib(e,t,rX)},rp.hasIn=au,rp.head=iV,rp.identity=aq,rp.includes=function(e,t,r,n){e=sB(e)?e:a_(e),r=r&&!n?s6(r):0;var i=e.length;return r<0&&(r=t2(i+r,0)),sQ(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&tw(e,t,r)>-1},rp.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:s6(r);return i<0&&(i=t2(n+i,0)),tw(e,t,i)},rp.inRange=function(e,t,n){var i,s,a;return t=s5(t),n===r?(n=t,t=0):n=s5(n),(i=e=s8(e))>=t3(s=t,a=n)&&i<t2(s,a)},rp.invoke=ad,rp.isArguments=sO,rp.isArray=sD,rp.isArrayBuffer=sL,rp.isArrayLike=sB,rp.isArrayLikeObject=sq,rp.isBoolean=function(e){return!0===e||!1===e||sG(e)&&rJ(e)==d},rp.isBuffer=sz,rp.isDate=sU,rp.isElement=function(e){return sG(e)&&1===e.nodeType&&!sZ(e)},rp.isEmpty=function(e){if(null==e)return!0;if(sB(e)&&(sD(e)||"string"==typeof e||"function"==typeof e.splice||sz(e)||s0(e)||sO(e)))return!e.length;var t=iy(e);if(t==g||t==_)return!e.size;if(iA(e))return!r9(e).length;for(var r in e)if(eM.call(e,r))return!1;return!0},rp.isEqual=function(e,t){return r5(e,t)},rp.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?r5(e,t,r,n):!!i},rp.isError=sj,rp.isFinite=function(e){return"number"==typeof e&&tX(e)},rp.isFunction=sF,rp.isInteger=sH,rp.isLength=s$,rp.isMap=sV,rp.isMatch=function(e,t){return e===t||r6(e,t,ih(t))},rp.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,r6(e,t,ih(t),n)},rp.isNaN=function(e){return sK(e)&&e!=+e},rp.isNative=function(e){if(iS(e))throw new ew("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return r4(e)},rp.isNil=function(e){return null==e},rp.isNull=function(e){return null===e},rp.isNumber=sK,rp.isObject=sW,rp.isObjectLike=sG,rp.isPlainObject=sZ,rp.isRegExp=sY,rp.isSafeInteger=function(e){return sH(e)&&e>=-9007199254740991&&e<=9007199254740991},rp.isSet=sJ,rp.isString=sQ,rp.isSymbol=sX,rp.isTypedArray=s0,rp.isUndefined=function(e){return e===r},rp.isWeakMap=function(e){return sG(e)&&iy(e)==x},rp.isWeakSet=function(e){return sG(e)&&"[object WeakSet]"==rJ(e)},rp.join=function(e,t){return null==e?"":t0.call(e,t)},rp.kebabCase=aS,rp.last=iJ,rp.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return -1;var s=i;return n!==r&&(s=(s=s6(n))<0?t2(i+s,0):t3(s,i-1)),t==t?function(e,t,r){for(var n=r+1;n--&&e[n]!==t;);return n}(e,t,s):tv(e,tE,s,!0)},rp.lowerCase=aA,rp.lowerFirst=aC,rp.lt=s1,rp.lte=s2,rp.max=function(e){return e&&e.length?rj(e,aq,rQ):r},rp.maxBy=function(e,t){return e&&e.length?rj(e,il(t,2),rQ):r},rp.mean=function(e){return tk(e,aq)},rp.meanBy=function(e,t){return tk(e,il(t,2))},rp.min=function(e){return e&&e.length?rj(e,aq,r7):r},rp.minBy=function(e,t){return e&&e.length?rj(e,il(t,2),r7):r},rp.stubArray=aY,rp.stubFalse=aJ,rp.stubObject=function(){return{}},rp.stubString=function(){return""},rp.stubTrue=function(){return!0},rp.multiply=a2,rp.nth=function(e,t){return e&&e.length?ni(e,s6(t)):r},rp.noConflict=function(){return e3._===this&&(e3._=eB),this},rp.noop=aH,rp.now=sy,rp.pad=function(e,t,r){e=s7(e);var n=(t=s6(t))?tH(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return n1(tY(i),r)+e+n1(tZ(i),r)},rp.padEnd=function(e,t,r){e=s7(e);var n=(t=s6(t))?tH(e):0;return t&&n<t?e+n1(t-n,r):e},rp.padStart=function(e,t,r){e=s7(e);var n=(t=s6(t))?tH(e):0;return t&&n<t?n1(t-n,r)+e:e},rp.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),t6(s7(e).replace(J,""),t||0)},rp.random=function(e,t,n){if(n&&"boolean"!=typeof n&&iE(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=s5(e),t===r?(t=e,e=0):t=s5(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=t4();return t3(e+s*(t-e+eX("1e-"+((s+"").length-1))),t)}return nc(e,t)},rp.reduce=function(e,t,r){var n=sD(e)?tp:tA,i=arguments.length<3;return n(e,il(t,4),r,i,rq)},rp.reduceRight=function(e,t,r){var n=sD(e)?tm:tA,i=arguments.length<3;return n(e,il(t,4),r,i,rz)},rp.repeat=function(e,t,n){return t=(n?iE(e,t,n):t===r)?1:s6(t),nl(s7(e),t)},rp.replace=function(){var e=arguments,t=s7(e[0]);return e.length<3?t:t.replace(e[1],e[2])},rp.result=function(e,t,n){t=nN(t,e);var i=-1,s=t.length;for(s||(s=1,e=r);++i<s;){var a=null==e?r:e[iq(t[i])];a===r&&(i=s,a=n),e=sF(a)?a.call(e):a}return e},rp.round=a3,rp.runInContext=e,rp.sample=function(e){return(sD(e)?rS:function(e){return rS(a_(e))})(e)},rp.size=function(e){if(null==e)return 0;if(sB(e))return sQ(e)?tH(e):e.length;var t=iy(e);return t==g||t==_?e.size:r9(e).length},rp.snakeCase=aI,rp.some=function(e,t,n){var i=sD(e)?tg:ng;return n&&iE(e,t,n)&&(t=r),i(e,il(t,3))},rp.sortedIndex=function(e,t){return ny(e,t)},rp.sortedIndexBy=function(e,t,r){return nb(e,t,il(r,2))},rp.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ny(e,t);if(n<r&&sN(e[n],t))return n}return -1},rp.sortedLastIndex=function(e,t){return ny(e,t,!0)},rp.sortedLastIndexBy=function(e,t,r){return nb(e,t,il(r,2),!0)},rp.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ny(e,t,!0)-1;if(sN(e[r],t))return r}return -1},rp.startCase=aR,rp.startsWith=function(e,t,r){return e=s7(e),r=null==r?0:rT(s6(r),0,e.length),t=n_(t),e.slice(r,r+t.length)==t},rp.subtract=a5,rp.sum=function(e){return e&&e.length?tC(e,aq):0},rp.sumBy=function(e,t){return e&&e.length?tC(e,il(t,2)):0},rp.template=function(e,t,n){var i=rp.templateSettings;n&&iE(e,t,n)&&(t=r),e=s7(e),t=ar({},t,i,n7);var s,a,o=ar({},t.imports,i.imports,n7),u=ah(o),c=tN(o,u),l=0,d=t.interpolate||ef,h="__p += '",f=ex((t.escape||ef).source+"|"+d.source+"|"+(d===W?es:ef).source+"|"+(t.evaluate||ef).source+"|$","g"),p="//# sourceURL="+(eM.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eZ+"]")+`
`;e.replace(f,function(t,r,n,i,o,u){return n||(n=i),h+=e.slice(l,u).replace(ep,tB),r&&(s=!0,h+=`' +
__e(`+r+`) +
'`),o&&(a=!0,h+=`';
`+o+`;
__p += '`),n&&(h+=`' +
((__t = (`+n+`)) == null ? '' : __t) +
'`),l=u+t.length,t}),h+=`';
`;var m=eM.call(t,"variable")&&t.variable;if(m){if(en.test(m))throw new ew("Invalid `variable` option passed into `_.template`")}else h=`with (obj) {
`+h+`
}
`;h=(a?h.replace(L,""):h).replace(B,"$1").replace(q,"$1;"),h="function("+(m||"obj")+`) {
`+(m?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+h+`return __p
}`;var g=aT(function(){return e_(u,p+"return "+h).apply(r,c)});if(g.source=h,sj(g))throw g;return g},rp.times=function(e,t){if((e=s6(e))<1||e>9007199254740991)return[];var r=4294967295,n=t3(e,4294967295);t=il(t),e-=4294967295;for(var i=tI(n,t);++r<e;)t(r);return i},rp.toFinite=s5,rp.toInteger=s6,rp.toLength=s4,rp.toLower=function(e){return s7(e).toLowerCase()},rp.toNumber=s8,rp.toSafeInteger=function(e){return e?rT(s6(e),-9007199254740991,9007199254740991):0===e?e:0},rp.toString=s7,rp.toUpper=function(e){return s7(e).toUpperCase()},rp.trim=function(e,t,n){if((e=s7(e))&&(n||t===r))return tR(e);if(!e||!(t=n_(t)))return e;var i=t$(e),s=t$(t),a=tT(i,s),o=tO(i,s)+1;return nM(i,a,o).join("")},rp.trimEnd=function(e,t,n){if((e=s7(e))&&(n||t===r))return e.slice(0,tW(e)+1);if(!e||!(t=n_(t)))return e;var i=t$(e),s=tO(i,t$(t))+1;return nM(i,0,s).join("")},rp.trimStart=function(e,t,n){if((e=s7(e))&&(n||t===r))return e.replace(J,"");if(!e||!(t=n_(t)))return e;var i=t$(e),s=tT(i,t$(t));return nM(i,s).join("")},rp.truncate=function(e,t){var n=30,i="...";if(sW(t)){var s="separator"in t?t.separator:s;n="length"in t?s6(t.length):n,i="omission"in t?n_(t.omission):i}var a=(e=s7(e)).length;if(tq(e)){var o=t$(e);a=o.length}if(n>=a)return e;var u=n-tH(i);if(u<1)return i;var c=o?nM(o,0,u).join(""):e.slice(0,u);if(s===r)return c+i;if(o&&(u+=c.length-u),sY(s)){if(e.slice(u).search(s)){var l,d=c;for(s.global||(s=ex(s.source,s7(ea.exec(s))+"g")),s.lastIndex=0;l=s.exec(d);)var h=l.index;c=c.slice(0,h===r?u:h)}}else if(e.indexOf(n_(s),u)!=u){var f=c.lastIndexOf(s);f>-1&&(c=c.slice(0,f))}return c+i},rp.unescape=function(e){return(e=s7(e))&&j.test(e)?e.replace(z,tG):e},rp.uniqueId=function(e){var t=++eT;return s7(e)+t},rp.upperCase=aP,rp.upperFirst=aN,rp.each=sc,rp.eachRight=sl,rp.first=iV,aF(rp,(ey={},rG(rp,function(e,t){eM.call(rp.prototype,t)||(ey[t]=e)}),ey),{chain:!1}),rp.VERSION="4.17.21",to(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){rp[e].placeholder=rp}),to(["drop","take"],function(e,t){rb.prototype[e]=function(n){n=n===r?1:t2(s6(n),0);var i=this.__filtered__&&!t?new rb(this):this.clone();return i.__filtered__?i.__takeCount__=t3(n,i.__takeCount__):i.__views__.push({size:t3(n,4294967295),type:e+(i.__dir__<0?"Right":"")}),i},rb.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),to(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;rb.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:il(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),to(["head","last"],function(e,t){var r="take"+(t?"Right":"");rb.prototype[e]=function(){return this[r](1).value()[0]}}),to(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");rb.prototype[e]=function(){return this.__filtered__?new rb(this):this[r](1)}}),rb.prototype.compact=function(){return this.filter(aq)},rb.prototype.find=function(e){return this.filter(e).head()},rb.prototype.findLast=function(e){return this.reverse().find(e)},rb.prototype.invokeMap=nd(function(e,t){return"function"==typeof e?new rb(this):this.map(function(r){return r2(r,e,t)})}),rb.prototype.reject=function(e){return this.filter(sA(il(e)))},rb.prototype.slice=function(e,t){e=s6(e);var n=this;return n.__filtered__&&(e>0||t<0)?new rb(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=s6(t))<0?n.dropRight(-t):n.take(t-e)),n)},rb.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},rb.prototype.toArray=function(){return this.take(4294967295)},rG(rb.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=rp[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);s&&(rp.prototype[t]=function(){var t=this.__wrapped__,o=i?[1]:arguments,u=t instanceof rb,c=o[0],l=u||sD(t),d=function(e){var t=s.apply(rp,tf([e],o));return i&&h?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,m=u&&!f;if(!a&&l){t=m?t:new rb(this);var g=e.apply(t,o);return g.__actions__.push({func:si,args:[d],thisArg:r}),new ry(g,h)}return p&&m?e.apply(this,o):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})}),to(["pop","push","shift","sort","splice","unshift"],function(e){var t=eC[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);rp.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(sD(i)?i:[],e)}return this[r](function(r){return t.apply(sD(r)?r:[],e)})}}),rG(rb.prototype,function(e,t){var r=rp[t];if(r){var n=r.name+"";eM.call(rs,n)||(rs[n]=[]),rs[n].push({name:t,func:r})}}),rs[nJ(r,2).name]=[{name:"wrapper",func:r}],rb.prototype.clone=function(){var e=new rb(this.__wrapped__);return e.__actions__=nU(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nU(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nU(this.__views__),e},rb.prototype.reverse=function(){if(this.__filtered__){var e=new rb(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},rb.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=sD(e),n=t<0,i=r?e.length:0,s=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var s=r[n],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=t3(t,e+a);break;case"takeRight":e=t2(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=s.start,o=s.end,u=o-a,c=n?o:a-1,l=this.__iteratees__,d=l.length,h=0,f=t3(u,this.__takeCount__);if(!r||!n&&i==u&&f==u)return nA(e,this.__actions__);var p=[];e:for(;u--&&h<f;){c+=t;for(var m=-1,g=e[c];++m<d;){var y=l[m],b=y.iteratee,v=y.type,w=b(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}p[h++]=g}return p},rp.prototype.at=ss,rp.prototype.chain=function(){return sn(this)},rp.prototype.commit=function(){return new ry(this.value(),this.__chain__)},rp.prototype.next=function(){this.__values__===r&&(this.__values__=s3(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}},rp.prototype.plant=function(e){for(var t,n=this;n instanceof rg;){var i=iU(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},rp.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof rb){var t=e;return this.__actions__.length&&(t=new rb(this)),(t=t.reverse()).__actions__.push({func:si,args:[i1],thisArg:r}),new ry(t,this.__chain__)}return this.thru(i1)},rp.prototype.toJSON=rp.prototype.valueOf=rp.prototype.value=function(){return nA(this.__wrapped__,this.__actions__)},rp.prototype.first=rp.prototype.head,e6&&(rp.prototype[e6]=function(){return this}),rp}();e6?((e6.exports=tV)._=tV,e5._=tV):e3._=tV}).call(nB)}(nq,nq.exports);var nz=Object.defineProperty,nU=Object.defineProperties,nj=Object.getOwnPropertyDescriptors,nF=Object.getOwnPropertySymbols,nH=Object.prototype.hasOwnProperty,n$=Object.prototype.propertyIsEnumerable,nW=(e,t,r)=>t in e?nz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nG=(e,t)=>{for(var r in t||(t={}))nH.call(t,r)&&nW(e,r,t[r]);if(nF)for(var r of nF(t))n$.call(t,r)&&nW(e,r,t[r]);return e},nV=(e,t)=>nU(e,nj(t));function nK(e,t,r){var n;let i=(0,a.DQe)(e);return(null==(n=t.rpcMap)?void 0:n[i.reference])||`${nT}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function nZ(e){return e.includes(":")?e.split(":")[1]:e}function nY(e){return e.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function nJ(e={},t={}){let r=nQ(e),n=nQ(t);return nq.exports.merge(r,n)}function nQ(e){var t,r,n,i;let s={};if(!(0,a.L5o)(e))return s;for(let[o,u]of Object.entries(e)){let e=(0,a.gpE)(o)?[o]:u.chains,c=u.methods||[],l=u.events||[],d=u.rpcMap||{},h=(0,a.Maj)(o);s[h]=nV(nG(nG({},s[h]),u),{chains:(0,a.eGA)(e,null==(t=s[h])?void 0:t.chains),methods:(0,a.eGA)(c,null==(r=s[h])?void 0:r.methods),events:(0,a.eGA)(l,null==(n=s[h])?void 0:n.events),rpcMap:nG(nG({},d),null==(i=s[h])?void 0:i.rpcMap)})}return s}function nX(e){return e.includes(":")?e.split(":")[2]:e}function n0(e){let t={};for(let[r,n]of Object.entries(e)){let e=n.methods||[],i=n.events||[],s=n.accounts||[],o=(0,a.gpE)(r)?[r]:n.chains?n.chains:nY(n.accounts);t[r]={chains:o,methods:e,events:i,accounts:s}}return t}function n1(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):isNaN(Number(e=e.includes(":")?e.split(":")[1]:e))?e:Number(e)}let n2={},n3=e=>n2[e],n5=(e,t)=>{n2[e]=t};class n6{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(nL,`${this.name}:${e}`)}getAccounts(){let e=this.namespace.accounts;return e&&e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=nZ(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}}var n4=Object.defineProperty,n8=Object.defineProperties,n9=Object.getOwnPropertyDescriptors,n7=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,ir=(e,t,r)=>t in e?n4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ii=(e,t)=>{for(var r in t||(t={}))ie.call(t,r)&&ir(e,r,t[r]);if(n7)for(var r of n7(t))it.call(t,r)&&ir(e,r,t[r]);return e},is=(e,t)=>n8(e,n9(t));class ia{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(nL,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){let r=t||nK(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=parseInt(nZ(t));e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(){let e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,r;let n=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0",i=parseInt(n=n.startsWith("0x")?n:`0x${n}`,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${i}`);else throw Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,r,n;let i=null==(r=null==(t=e.request)?void 0:t.params)?void 0:r[0];if(!i)throw Error("Missing address parameter in `wallet_getCapabilities` request");let s=this.client.session.get(e.topic),a=(null==(n=s?.sessionProperties)?void 0:n.capabilities)||{};if(null!=a&&a[i])return a?.[i];let o=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:is(ii({},s.sessionProperties||{}),{capabilities:is(ii({},a||{}),{[i]:o})})})}catch(e){console.warn("Failed to update session with capabilities",e)}return o}async getCallStatus(e){var t,r;let n=this.client.session.get(e.topic),i=null==(t=n.sessionProperties)?void 0:t.bundler_name;if(i){let t=this.getBundlerUrl(e.chainId,i);try{return await this.getUserOperationReceipt(t,e)}catch(e){console.warn("Failed to fetch call status from bundler",e,t)}}let s=null==(r=n.sessionProperties)?void 0:r.bundler_url;if(s)try{return await this.getUserOperationReceipt(s,e)}catch(e){console.warn("Failed to fetch call status from custom bundler",e,s)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,t){var r;let n=new URL(e),i=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(eR("eth_getUserOperationReceipt",[null==(r=t.request.params)?void 0:r[0]]))});if(!i.ok)throw Error(`Failed to fetch user operation receipt - ${i.status}`);return await i.json()}getBundlerUrl(e,t){return`${nD}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${t}`}}class io{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(nL,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=nZ(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}}class iu{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(nL,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=nZ(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}}class ic{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){let r=t||nK(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(nL,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new eH(new nP(r,n3("disableProviderPing")))}}class il{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(nL,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{let r=this.getCardanoRPCUrl(t),n=nZ(t);e[n]=this.createHttpProvider(n,r)}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){let t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||this.getCardanoRPCUrl(e);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}}class id{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(nL,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=nZ(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}}class ih{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(nL,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=nZ(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}}class ip{constructor(e){this.name="near",this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){let r=t||nK(`${this.name}:${e}`,this.namespace);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(nL,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e&&e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace);return typeof r>"u"?void 0:new eH(new nP(r,n3("disableProviderPing")))}}class im{constructor(e){this.name=nO,this.namespace=e.namespace,this.events=n3("events"),this.client=n3("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(nL,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var e,t;let r={};return null==(t=null==(e=this.namespace)?void 0:e.accounts)||t.forEach(e=>{let t=(0,a.DQe)(e);r[`${t.namespace}:${t.reference}`]=this.createHttpProvider(e)}),r}getHttpProvider(e){let t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||nK(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new eH(new nP(r,n3("disableProviderPing")))}}var ig=Object.defineProperty,iy=Object.defineProperties,ib=Object.getOwnPropertyDescriptors,iv=Object.getOwnPropertySymbols,iw=Object.prototype.hasOwnProperty,i_=Object.prototype.propertyIsEnumerable,iE=(e,t,r)=>t in e?ig(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ik=(e,t)=>{for(var r in t||(t={}))iw.call(t,r)&&iE(e,r,t[r]);if(iv)for(var r of iv(t))i_.call(t,r)&&iE(e,r,t[r]);return e},ix=(e,t)=>iy(e,ib(t));class iS{constructor(e){this.events=new(s()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger="u">typeof e?.logger&&"string"!=typeof e?.logger?e.logger:z()(er({level:e?.logger||nN})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){let t=new iS(e);return await t.initialize(),t}async request(e,t,r){let[n,i]=this.validateChain(t);if(!this.session)throw Error("Please call connect() before request()");return await this.getProvider(n).request({request:ik({},e),chainId:`${n}:${i}`,topic:this.session.topic,expiry:r})}sendAsync(e,t,r,n){let i=new Date().getTime();this.request(e,r,n).then(e=>t(null,eP(i,e))).catch(e=>t(e,void 0))}async enable(){if(!this.client)throw Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:(0,a.D6H)("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,t){if(!this.client)throw Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();let{uri:r,response:n}=await this.client.authenticate(e,t);r&&(this.uri=r,this.events.emit("display_uri",r));let i=await n();if(this.session=i.session,this.session){let e=n0(this.session.namespaces);this.namespaces=nJ(this.namespaces,e),this.persist("namespaces",this.namespaces),this.onConnect()}return i}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw Error("Max auto pairing attempts reached");let{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await n().then(e=>{this.session=e;let t=n0(e.namespaces);this.namespaces=nJ(this.namespaces,t),this.persist("namespaces",this.namespaces)}).catch(e=>{if(e.message!==r2)throw e;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;let[r,n]=this.validateChain(e),i=this.getProvider(r);i.name===nO?i.setDefaultChain(`${r}:${n}`,t):i.setDefaultChain(n,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");let t=this.client.pairing.getAll();if((0,a.qt8)(t)){for(let r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){let e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await ny.init({core:this.providerOpts.core,logger:this.providerOpts.logger||nN,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw Error("Sign Client not initialized");if(!this.session)throw Error("Session not initialized. Please call connect() before enable()");let e=[...new Set(Object.keys(this.session.namespaces).map(e=>(0,a.Maj)(e)))];n5("client",this.client),n5("events",this.events),n5("disableProviderPing",this.disableProviderPing),e.forEach(e=>{if(!this.session)return;let t=function(e,t){let r=Object.keys(t.namespaces).filter(t=>t.includes(e));if(!r.length)return[];let n=[];return r.forEach(e=>{let r=t.namespaces[e].accounts;n.push(...r)}),n}(e,this.session),r=nY(t),n=ix(ik({},nJ(this.namespaces,this.optionalNamespaces)[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new ia({namespace:n});break;case"algorand":this.rpcProviders[e]=new ic({namespace:n});break;case"solana":this.rpcProviders[e]=new io({namespace:n});break;case"cosmos":this.rpcProviders[e]=new iu({namespace:n});break;case"polkadot":this.rpcProviders[e]=new n6({namespace:n});break;case"cip34":this.rpcProviders[e]=new il({namespace:n});break;case"elrond":this.rpcProviders[e]=new id({namespace:n});break;case"multiversx":this.rpcProviders[e]=new ih({namespace:n});break;case"near":this.rpcProviders[e]=new ip({namespace:n});break;default:this.rpcProviders[nO]?this.rpcProviders[nO].updateNamespace(n):this.rpcProviders[nO]=new im({namespace:n})}})}registerEventListeners(){if(typeof this.client>"u")throw Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{let{params:t}=e,{event:r}=t;if("accountsChanged"===r.name){let e=r.data;e&&(0,a.qt8)(e)&&this.events.emit("accountsChanged",e.map(nX))}else if("chainChanged"===r.name){let e=t.chainId,r=t.event.data,n=(0,a.Maj)(e),i=n1(e)!==n1(r)?`${n}:${n1(r)}`:e;this.onChainChanged(i)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var r;let{namespaces:n}=t,i=null==(r=this.client)?void 0:r.session.get(e);this.session=ix(ik({},i),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ix(ik({},(0,a.D6H)("USER_DISCONNECTED")),{data:e.topic}))}),this.on(nL,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[nO]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])})}setNamespaces(e){let{namespaces:t,optionalNamespaces:r,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){let[t,r]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map(e=>(0,a.Maj)(e)).includes(t))throw Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];let n=(0,a.Maj)(Object.keys(this.namespaces)[0]),i=this.rpcProviders[n].getDefaultChain();return[n,i]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;let[r,n]=this.validateChain(e);n&&(t||this.getProvider(r).setDefaultChain(n),this.namespaces[r]?this.namespaces[r].defaultChain=n:this.namespaces[`${r}:${n}`]?this.namespaces[`${r}:${n}`].defaultChain=n:this.namespaces[`${r}:${n}`]={defaultChain:n},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",n))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${nM}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${nM}/${e}`)}}let iA=["eth_sendTransaction","personal_sign"],iC=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],iI=["chainChanged","accountsChanged"],iR=["chainChanged","accountsChanged","message","disconnect","connect"];var iP=Object.defineProperty,iN=Object.defineProperties,iM=Object.getOwnPropertyDescriptors,iT=Object.getOwnPropertySymbols,iO=Object.prototype.hasOwnProperty,iD=Object.prototype.propertyIsEnumerable,iL=(e,t,r)=>t in e?iP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iB=(e,t)=>{for(var r in t||(t={}))iO.call(t,r)&&iL(e,r,t[r]);if(iT)for(var r of iT(t))iD.call(t,r)&&iL(e,r,t[r]);return e},iq=(e,t)=>iN(e,iM(t));function iz(e){return Number(e[0].split(":")[1])}function iU(e){return`0x${e.toString(16)}`}class ij{constructor(){this.events=new i.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){let t=new ij;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,r){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),r)}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);let{required:t,optional:r}=function(e){let{chains:t,optionalChains:r,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:u}=e;if(!(0,a.qt8)(t))throw Error("Invalid chains");let c={chains:t,methods:n||iA,events:s||iI,rpcMap:iB({},t.length?{[iz(t)]:u[iz(t)]}:{})},l=s?.filter(e=>!iI.includes(e)),d=n?.filter(e=>!iA.includes(e));if(!r&&!o&&!i&&!(null!=l&&l.length)&&!(null!=d&&d.length))return{required:t.length?c:void 0};let h={chains:[...new Set(l?.length&&d?.length||!r?c.chains.concat(r||[]):r)],methods:[...new Set(c.methods.concat(null!=i&&i.length?i:iC))],events:[...new Set(c.events.concat(null!=o&&o.length?o:iR))],rpcMap:u};return{required:t.length?c:void 0,optional:r.length?h:void 0}}(this.rpc);try{let n=await new Promise(async(n,i)=>{var s;this.rpc.showQrModal&&(null==(s=this.modal)||s.subscribeModal(e=>{e.open||this.signer.session||(this.signer.abortPairingAttempt(),i(Error("Connection request reset. Please try again.")))})),await this.signer.connect(iq(iB({namespaces:iB({},t&&{[this.namespace]:t})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then(e=>{n(e)}).catch(e=>{i(Error(e.message))})});if(!n)return;let i=(0,a.guN)(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:iU(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}finally{this.modal&&this.modal.closeModal()}}async authenticate(e,t){if(!this.signer.client)throw Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e?.chains});try{let r=await new Promise(async(r,n)=>{var i;this.rpc.showQrModal&&(null==(i=this.modal)||i.subscribeModal(e=>{e.open||this.signer.session||(this.signer.abortPairingAttempt(),n(Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(iq(iB({},e),{chains:this.rpc.chains}),t).then(e=>{r(e)}).catch(e=>{n(Error(e.message))})}),n=r.session;if(n){let e=(0,a.guN)(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:e),this.setAccounts(e),this.events.emit("connect",{chainId:iU(this.chainId)})}return r}catch(e){throw this.signer.logger.error(e),e}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{let{params:t}=e,{event:r}=t;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{let t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",iU(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",iq(iB({},(0,a.D6H)("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,r;this.rpc.showQrModal&&(null==(t=this.modal)||t.closeModal(),null==(r=this.modal)||r.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){let t=e.filter(e=>this.isCompatibleChainId(e)).map(e=>this.parseChainId(e));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",iU(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){let t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){let[t,r,n]=e.split(":");return{chainId:`${t}:${r}`,address:n}}setAccounts(e){this.accounts=e.filter(e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId).map(e=>this.parseAccountId(e).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,r;let n=null!=(t=e?.chains)?t:[],i=null!=(r=e?.optionalChains)?r:[],s=n.concat(i);if(!s.length)throw Error("No chains specified in either `chains` or `optionalChains`");let a=n.length?e?.methods||iA:[],o=n.length?e?.events||iI:[],u=e?.optionalMethods||[],c=e?.optionalEvents||[],l=e?.rpcMap||this.buildRpcMap(s,e.projectId),d=e?.qrModalOptions||void 0;return{chains:n?.map(e=>this.formatChainId(e)),optionalChains:i.map(e=>this.formatChainId(e)),methods:a,events:o,optionalMethods:u,optionalEvents:c,rpcMap:l,showQrModal:!!(null!=e&&e.showQrModal),qrModalOptions:d,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){let r={};return e.forEach(e=>{r[e]=this.getRpcUrl(e,t)}),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?iz(this.rpc.chains):iz(this.rpc.optionalChains),this.signer=await iS.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions,customStoragePrefix:e.customStoragePrefix,telemetryEnabled:e.telemetryEnabled}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;try{let{WalletConnectModal:t}=await r.e(904).then(r.bind(r,5904));e=t}catch{throw Error("To use QR modal, please install @walletconnect/modal package")}if(e)try{this.modal=new e(iB({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;let{chains:t,optionalChains:r,rpcMap:n}=e;t&&(0,a.qt8)(t)&&(this.rpc.chains=t.map(e=>this.formatChainId(e)),t.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})),r&&(0,a.qt8)(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map(e=>this.formatChainId(e)),r.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))}getRpcUrl(e,t){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{let e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t?.accounts),this.setAccounts(t?.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(e=>this.signer.logger.warn(e))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map(e=>this.parseAccount(e))}}let iF=ij},44164:function(e,t,r){"use strict";r.d(t,{iO:function(){return n}});let n={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}}},84112:function(e,t,r){"use strict";r.d(t,{decodeJWT:function(){return y},encodeIss:function(){return g},generateKeyPair:function(){return b},signJWT:function(){return v}});var n=r(33679),i=r(51031),s=r(37010);let a="base64url",o="utf8",u="utf8",c="base58btc";var l=r(65842),d=r(51742),h=r(81427),f=r(10437);function p(e){return(0,f.D)((0,d.B)((0,h.m)(e,a),o))}function m(e){return(0,d.B)((0,h.m)((0,f.u)(e),o),a)}function g(e){let t=(0,h.m)("K36",c);return["did","key","z"+(0,d.B)((0,l.z)([t,e]),c)].join(":")}function y(e){var t;let r=e.split("."),n=p(r[0]);return{header:n,payload:p(r[1]),signature:(t=r[2],(0,h.m)(t,a)),data:(0,h.m)(r.slice(0,2).join("."),u)}}function b(e=(0,i.randomBytes)(32)){return n._w(e)}async function v(e,t,r,i,o=(0,s.fromMiliseconds)(Date.now())){var c,l,f;let p={alg:"EdDSA",typ:"JWT"},y={iss:g(i.publicKey),sub:e,aud:t,iat:o,exp:o+r},b=(c={header:p,payload:y},(0,h.m)([m(c.header),m(c.payload)].join("."),u));return[m((l={header:p,payload:y,signature:n.Xx(i.secretKey,b)}).header),m(l.payload),(f=l.signature,(0,d.B)(f,a))].join(".")}r(71020)},71020:function(){},10437:function(e,t,r){"use strict";r.d(t,{D:function(){return s},u:function(){return a}});let n=e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString()+"n":t),i=e=>JSON.parse(e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3'),(e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t);function s(e){if("string"!=typeof e)throw Error(`Cannot safe json parse value of type ${typeof e}`);try{return i(e)}catch(t){return e}}function a(e){return"string"==typeof e?e:n(e)||""}},56060:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(66346);n.__exportStar(r(40260),t),n.__exportStar(r(22699),t)},40260:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},22699:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},37010:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(66346);n.__exportStar(r(36025),t),n.__exportStar(r(31618),t),n.__exportStar(r(92683),t),n.__exportStar(r(56060),t)},92683:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(66346).__exportStar(r(34772),t)},34772:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;class r{}t.IWatch=r},19995:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;let n=r(56060);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},93155:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}},36025:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(66346);n.__exportStar(r(93155),t),n.__exportStar(r(19995),t)},31618:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let t=this.get(e);if(void 0!==t.elapsed)throw Error(`Watch already stopped for label: ${e}`);let r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){let t=this.timestamps.get(e);if(void 0===t)throw Error(`No timestamp found for label: ${e}`);return t}elapsed(e){let t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},65270:function(e,t){"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function n(e){let t=r(e);if(!t)throw Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},24009:function(e,t,r){"use strict";t.D=void 0;let n=r(65270);t.D=function(){let e,t,r;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function i(...t){let r=e.getElementsByTagName("meta");for(let e=0;e<r.length;e++){let n=r[e],i=["itemprop","property","name"].map(e=>n.getAttribute(e)).filter(e=>!!e&&t.includes(e));if(i.length&&i){let e=n.getAttribute("content");if(e)return e}}return""}let s=((r=i("name","og:site_name","og:title","twitter:title"))||(r=e.title),r),a=i("description","og:description","twitter:description","keywords");return{description:a,url:t.origin,icons:function(){let r=e.getElementsByTagName("link"),n=[];for(let e=0;e<r.length;e++){let i=r[e],s=i.getAttribute("rel");if(s&&s.toLowerCase().indexOf("icon")>-1){let e=i.getAttribute("href");if(e){if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{let n=t.pathname.split("/");n.pop(),r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){let r=t.protocol+e;n.push(r)}else n.push(e)}}}return n}(),name:s}}},40583:function(e,t,r){r(57343);var n=r(44167),i=n.Service,s=n.apiLoader;s.services.cognitoidentity={},n.CognitoIdentity=i.defineService("cognitoidentity",["2014-06-30"]),Object.defineProperty(s.services.cognitoidentity,"2014-06-30",{get:function(){var e=r(35018);return e.paginators=r(74238).o,e},enumerable:!0,configurable:!0}),e.exports=n.CognitoIdentity},68486:function(e,t,r){r(57343);var n=r(44167),i=n.Service,s=n.apiLoader;s.services.s3={},n.S3=i.defineService("s3",["2006-03-01"]),r(17763),Object.defineProperty(s.services.s3,"2006-03-01",{get:function(){var e=r(55438);return e.paginators=r(5214).o,e.waiters=r(78651).V,e},enumerable:!0,configurable:!0}),e.exports=n.S3},20904:function(e,t,r){r(57343);var n=r(44167),i=n.Service,s=n.apiLoader;s.services.sts={},n.STS=i.defineService("sts",["2011-06-15"]),r(68808),Object.defineProperty(s.services.sts,"2011-06-15",{get:function(){var e=r(18650);return e.paginators=r(9299).o,e},enumerable:!0,configurable:!0}),e.exports=n.STS},60760:function(e){function t(e,r){if(!t.services.hasOwnProperty(e))throw Error("InvalidService: Failed to load api for "+e);return t.services[e][r]}t.services={},e.exports=t},76606:function(e,t,r){var n=r(84396),i=r(2269),s=r(30775),a=r(7293);e.exports={createHash:function(e){if("md5"===(e=e.toLowerCase()))return new i;if("sha256"===e)return new a;if("sha1"===e)return new s;throw Error("Hash algorithm "+e+" is not supported in the browser SDK")},createHmac:function(e,t){if("md5"===(e=e.toLowerCase()))return new n(i,t);if("sha256"===e)return new n(a,t);if("sha1"===e)return new n(s,t);throw Error("HMAC algorithm "+e+" is not supported in the browser SDK")},createSign:function(){throw Error("createSign is not implemented in the browser")}}},1582:function(e,t,r){var n=r(53435).Buffer;"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(e){return i.indexOf(Object.prototype.toString.call(e))>-1});var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];e.exports={isEmptyData:function(e){return"string"==typeof e?0===e.length:0===e.byteLength},convertToBuffer:function(e){return("string"==typeof e&&(e=new n(e,"utf8")),ArrayBuffer.isView(e))?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}},84396:function(e,t,r){var n=r(1582);function i(e,t){this.hash=new e,this.outer=new e;var r=function(e,t){var r=n.convertToBuffer(t);if(r.byteLength>e.BLOCK_SIZE){var i=new e;i.update(r),r=i.digest()}var s=new Uint8Array(e.BLOCK_SIZE);return s.set(r),s}(e,t),i=new Uint8Array(e.BLOCK_SIZE);i.set(r);for(var s=0;s<e.BLOCK_SIZE;s++)r[s]^=54,i[s]^=92;this.hash.update(r),this.outer.update(i);for(var s=0;s<r.byteLength;s++)r[s]=0}e.exports=i,i.prototype.update=function(e){if(n.isEmptyData(e)||this.error)return this;try{this.hash.update(n.convertToBuffer(e))}catch(e){this.error=e}return this},i.prototype.digest=function(e){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(e)}},2269:function(e,t,r){var n=r(1582),i=r(53435).Buffer;function s(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(64)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function a(e,t,r,n,i,s){return((t=(t+e&4294967295)+(n+s&4294967295)&4294967295)<<i|t>>>32-i)+r&4294967295}function o(e,t,r,n,i,s,o){return a(t&r|~t&n,e,t,i,s,o)}function u(e,t,r,n,i,s,o){return a(t&n|r&~n,e,t,i,s,o)}function c(e,t,r,n,i,s,o){return a(t^r^n,e,t,i,s,o)}function l(e,t,r,n,i,s,o){return a(r^(t|~n),e,t,i,s,o)}e.exports=s,s.BLOCK_SIZE=64,s.prototype.update=function(e){if(n.isEmptyData(e))return this;if(this.finished)throw Error("Attempted to update an already finished hash.");var t=n.convertToBuffer(e),r=0,i=t.byteLength;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),i--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},s.prototype.digest=function(e){if(!this.finished){var t=this.buffer,r=this.bufferLength,n=8*this.bytesHashed;if(t.setUint8(this.bufferLength++,128),r%64>=56){for(var s=this.bufferLength;s<64;s++)t.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<56;s++)t.setUint8(s,0);t.setUint32(56,n>>>0,!0),t.setUint32(60,Math.floor(n/4294967296),!0),this.hashBuffer(),this.finished=!0}for(var a=new DataView(new ArrayBuffer(16)),s=0;s<4;s++)a.setUint32(4*s,this.state[s],!0);var o=new i(a.buffer,a.byteOffset,a.byteLength);return e?o.toString(e):o},s.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],s=t[3];r=o(r,n,i,s,e.getUint32(0,!0),7,3614090360),s=o(s,r,n,i,e.getUint32(4,!0),12,3905402710),i=o(i,s,r,n,e.getUint32(8,!0),17,606105819),n=o(n,i,s,r,e.getUint32(12,!0),22,3250441966),r=o(r,n,i,s,e.getUint32(16,!0),7,4118548399),s=o(s,r,n,i,e.getUint32(20,!0),12,1200080426),i=o(i,s,r,n,e.getUint32(24,!0),17,2821735955),n=o(n,i,s,r,e.getUint32(28,!0),22,4249261313),r=o(r,n,i,s,e.getUint32(32,!0),7,1770035416),s=o(s,r,n,i,e.getUint32(36,!0),12,2336552879),i=o(i,s,r,n,e.getUint32(40,!0),17,4294925233),n=o(n,i,s,r,e.getUint32(44,!0),22,2304563134),r=o(r,n,i,s,e.getUint32(48,!0),7,1804603682),s=o(s,r,n,i,e.getUint32(52,!0),12,4254626195),i=o(i,s,r,n,e.getUint32(56,!0),17,2792965006),n=o(n,i,s,r,e.getUint32(60,!0),22,1236535329),r=u(r,n,i,s,e.getUint32(4,!0),5,4129170786),s=u(s,r,n,i,e.getUint32(24,!0),9,3225465664),i=u(i,s,r,n,e.getUint32(44,!0),14,643717713),n=u(n,i,s,r,e.getUint32(0,!0),20,3921069994),r=u(r,n,i,s,e.getUint32(20,!0),5,3593408605),s=u(s,r,n,i,e.getUint32(40,!0),9,38016083),i=u(i,s,r,n,e.getUint32(60,!0),14,3634488961),n=u(n,i,s,r,e.getUint32(16,!0),20,3889429448),r=u(r,n,i,s,e.getUint32(36,!0),5,568446438),s=u(s,r,n,i,e.getUint32(56,!0),9,3275163606),i=u(i,s,r,n,e.getUint32(12,!0),14,4107603335),n=u(n,i,s,r,e.getUint32(32,!0),20,1163531501),r=u(r,n,i,s,e.getUint32(52,!0),5,2850285829),s=u(s,r,n,i,e.getUint32(8,!0),9,4243563512),i=u(i,s,r,n,e.getUint32(28,!0),14,1735328473),n=u(n,i,s,r,e.getUint32(48,!0),20,2368359562),r=c(r,n,i,s,e.getUint32(20,!0),4,4294588738),s=c(s,r,n,i,e.getUint32(32,!0),11,2272392833),i=c(i,s,r,n,e.getUint32(44,!0),16,1839030562),n=c(n,i,s,r,e.getUint32(56,!0),23,4259657740),r=c(r,n,i,s,e.getUint32(4,!0),4,2763975236),s=c(s,r,n,i,e.getUint32(16,!0),11,1272893353),i=c(i,s,r,n,e.getUint32(28,!0),16,4139469664),n=c(n,i,s,r,e.getUint32(40,!0),23,3200236656),r=c(r,n,i,s,e.getUint32(52,!0),4,681279174),s=c(s,r,n,i,e.getUint32(0,!0),11,3936430074),i=c(i,s,r,n,e.getUint32(12,!0),16,3572445317),n=c(n,i,s,r,e.getUint32(24,!0),23,76029189),r=c(r,n,i,s,e.getUint32(36,!0),4,3654602809),s=c(s,r,n,i,e.getUint32(48,!0),11,3873151461),i=c(i,s,r,n,e.getUint32(60,!0),16,530742520),n=c(n,i,s,r,e.getUint32(8,!0),23,3299628645),r=l(r,n,i,s,e.getUint32(0,!0),6,4096336452),s=l(s,r,n,i,e.getUint32(28,!0),10,1126891415),i=l(i,s,r,n,e.getUint32(56,!0),15,2878612391),n=l(n,i,s,r,e.getUint32(20,!0),21,4237533241),r=l(r,n,i,s,e.getUint32(48,!0),6,1700485571),s=l(s,r,n,i,e.getUint32(12,!0),10,2399980690),i=l(i,s,r,n,e.getUint32(40,!0),15,4293915773),n=l(n,i,s,r,e.getUint32(4,!0),21,2240044497),r=l(r,n,i,s,e.getUint32(32,!0),6,1873313359),s=l(s,r,n,i,e.getUint32(60,!0),10,4264355552),i=l(i,s,r,n,e.getUint32(24,!0),15,2734768916),n=l(n,i,s,r,e.getUint32(52,!0),21,1309151649),r=l(r,n,i,s,e.getUint32(16,!0),6,4149444226),s=l(s,r,n,i,e.getUint32(44,!0),10,3174756917),i=l(i,s,r,n,e.getUint32(8,!0),15,718787259),n=l(n,i,s,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=s+t[3]&4294967295}},30775:function(e,t,r){var n=r(53435).Buffer,i=r(1582);function s(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),e.exports=s,s.BLOCK_SIZE=64,s.prototype.update=function(e){if(this.finished)throw Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=(e=i.convertToBuffer(e)).length;this.totalLength+=8*t;for(var r=0;r<t;r++)this.write(e[r]);return this},s.prototype.write=function(e){this.block[this.offset]|=(255&e)<<this.shift,this.shift?this.shift-=8:(this.offset++,this.shift=24),16===this.offset&&this.processBlock()},s.prototype.digest=function(e){this.write(128),(this.offset>14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var r=new n(20),i=new DataView(r.buffer);return i.setUint32(0,this.h0,!1),i.setUint32(4,this.h1,!1),i.setUint32(8,this.h2,!1),i.setUint32(12,this.h3,!1),i.setUint32(16,this.h4,!1),e?r.toString(e):r},s.prototype.processBlock=function(){for(var e,t,r=16;r<80;r++){var n=this.block[r-3]^this.block[r-8]^this.block[r-14]^this.block[r-16];this.block[r]=n<<1|n>>>31}var i=this.h0,s=this.h1,a=this.h2,o=this.h3,u=this.h4;for(r=0;r<80;r++){r<20?(e=o^s&(a^o),t=1518500249):r<40?(e=s^a^o,t=1859775393):r<60?(e=s&a|o&(s|a),t=2400959708):(e=s^a^o,t=3395469782);var c=(i<<5|i>>>27)+e+u+t+(0|this.block[r]);u=o,o=a,a=s<<30|s>>>2,s=i,i=c}for(r=0,this.h0=this.h0+i|0,this.h1=this.h1+s|0,this.h2=this.h2+a|0,this.h3=this.h3+o|0,this.h4=this.h4+u|0,this.offset=0;r<16;r++)this.block[r]=0}},7293:function(e,t,r){var n=r(53435).Buffer,i=r(1582),s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}e.exports=a,a.BLOCK_SIZE=64,a.prototype.update=function(e){if(this.finished)throw Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;e=i.convertToBuffer(e);var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>9007199254740991)throw Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},a.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(r.setUint8(this.bufferLength++,128),i%64>=56){for(var s=this.bufferLength;s<64;s++)r.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<56;s++)r.setUint8(s,0);r.setUint32(56,Math.floor(t/4294967296),!0),r.setUint32(60,t),this.hashBuffer(),this.finished=!0}for(var a=new n(32),s=0;s<8;s++)a[4*s]=this.state[s]>>>24&255,a[4*s+1]=this.state[s]>>>16&255,a[4*s+2]=this.state[s]>>>8&255,a[4*s+3]=this.state[s]>>>0&255;return e?a.toString(e):a},a.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],u=t[5],c=t[6],l=t[7],d=0;d<64;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var h=this.temp[d-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,p=((h=this.temp[d-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(f+this.temp[d-7]|0)+(p+this.temp[d-16]|0)}var m=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&u^~o&c)|0)+(l+(s[d]+this.temp[d]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&i^n&i)|0;l=c,c=u,u=o,o=a+m|0,a=i,i=n,n=r,r=m+g|0}t[0]+=r,t[1]+=n,t[2]+=i,t[3]+=a,t[4]+=o,t[5]+=u,t[6]+=c,t[7]+=l}},57343:function(e,t,r){var n=r(35333);n.crypto.lib=r(76606),n.Buffer=r(53435).Buffer,n.url=r(77970),n.querystring=r(71524),n.realClock=r(1809),n.environment="js",n.createEventStream=r(52218).createEventStream,n.isBrowser=function(){return!0},n.isNode=function(){return!1};var i=r(44167);if(e.exports=i,r(51825),r(57192),r(62845),r(31406),r(11485),r(67965),r(92095),i.XML.Parser=r(26162),r(78460),void 0===s)var s={}},22209:function(e,t,r){var n,i=r(44167);r(51825),r(57192),i.Config=i.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),i.util.each.call(this,this.keys,function(t,r){this.set(t,e[t],r)})},getCredentials:function(e){var t,r=this;function n(t){e(t,t?null:r.credentials)}function s(e,t){return new i.util.error(t||Error(),{code:"CredentialsError",message:e,name:"CredentialsError"})}r.credentials?"function"==typeof r.credentials.get?r.credentials.get(function(e){e&&(e=s("Could not load credentials from "+r.credentials.constructor.name,e)),n(e)}):(t=null,r.credentials.accessKeyId&&r.credentials.secretAccessKey||(t=s("Missing credentials")),n(t)):r.credentialProvider?r.credentialProvider.resolve(function(e,t){e&&(e=s("Could not load credentials from any providers",e)),r.credentials=t,n(e)}):n(s("No credentials to load"))},getToken:function(e){var t,r=this;function n(t){e(t,t?null:r.token)}function s(e,t){return new i.util.error(t||Error(),{code:"TokenError",message:e,name:"TokenError"})}r.token?"function"==typeof r.token.get?r.token.get(function(e){e&&(e=s("Could not load token from "+r.token.constructor.name,e)),n(e)}):(t=null,r.token.token||(t=s("Missing token")),n(t)):r.tokenProvider?r.tokenProvider.resolve(function(e,t){e&&(e=s("Could not load token from any providers",e)),r.token=t,n(e)}):n(s("No token to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),i.util.each.call(this,e,function(e,r){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||i.Service.hasService(e))&&this.set(e,r)})},loadFromPath:function(e){this.clear();var t=JSON.parse(i.util.readFileSync(e)),r=new i.FileSystemCredentials(e),n=new i.CredentialProviderChain;return n.providers.unshift(r),n.resolve(function(e,r){if(e)throw e;t.credentials=r}),this.constructor(t),this},clear:function(){i.util.each.call(this,this.keys,function(e){delete this[e]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,r){void 0===t?(void 0===r&&(r=this.keys[e]),"function"==typeof r?this[e]=r.call(this):this[e]=r):"httpOptions"===e&&this[e]?this[e]=i.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,s3UsEast1RegionalEndpoint:"legacy",s3UseArnRegion:void 0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:void 0,endpointCacheSize:1e3,hostPrefixEnabled:!0,stsRegionalEndpoints:"legacy",useFipsEndpoint:!1,useDualstackEndpoint:!1,token:null},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=i.util.copy(e)).credentials=new i.Credentials(e)),e},setPromisesDependency:function(e){n=e,null===e&&"function"==typeof Promise&&(n=Promise);var t=[i.Request,i.Credentials,i.CredentialProviderChain];i.S3&&(t.push(i.S3),i.S3.ManagedUpload&&t.push(i.S3.ManagedUpload)),i.util.addPromises(t,n)},getPromisesDependency:function(){return n}}),i.config=new i.Config},9215:function(e,t,r){var n=r(21169),i=r(44167);function s(e,t){if("string"==typeof e){if(["legacy","regional"].indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw i.util.error(Error(),t)}}e.exports=function(e,t){if((e=e||{})[t.clientConfig]&&(r=s(e[t.clientConfig],{code:"InvalidConfiguration",message:'invalid "'+t.clientConfig+'" configuration. Expect "legacy"  or "regional". Got "'+e[t.clientConfig]+'".'}))||!i.util.isNode())return r;if(Object.prototype.hasOwnProperty.call(n.env,t.env)){var r;if(r=s(n.env[t.env],{code:"InvalidEnvironmentalVariable",message:"invalid "+t.env+' environmental variable. Expect "legacy"  or "regional". Got "'+n.env[t.env]+'".'}))return r}var a={};try{a=i.util.getProfilesFromSharedConfig(i.util.iniLoader)[n.env.AWS_PROFILE||i.util.defaultProfile]}catch(e){}return a&&Object.prototype.hasOwnProperty.call(a,t.sharedConfig)&&(r=s(a[t.sharedConfig],{code:"InvalidConfiguration",message:"invalid "+t.sharedConfig+' profile config. Expect "legacy"  or "regional". Got "'+a[t.sharedConfig]+'".'})),r}},44167:function(e,t,r){var n={util:r(35333)};({}).toString(),e.exports=n,n.util.update(n,{VERSION:"2.1691.0",Signers:{},Protocol:{Json:r(60949),Query:r(55729),Rest:r(69978),RestJson:r(49631),RestXml:r(11948)},XML:{Builder:r(54902),Parser:null},JSON:{Builder:r(69857),Parser:r(78836)},Model:{Api:r(50962),Operation:r(61501),Shape:r(45804),Paginator:r(89960),ResourceWaiter:r(78308)},apiLoader:r(60760),EndpointCache:r(58189).$}),r(75862),r(12412),r(22209),r(66748),r(75884),r(76492),r(53406),r(93167),r(40464),r(67998),r(37052),n.events=new n.SequentialExecutor,n.util.memoizedProperty(n,"endpointCache",function(){return new n.EndpointCache(n.config.endpointCacheSize)},!0)},51825:function(e,t,r){var n=r(44167);n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],1==arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=new Date(n.util.date.getDate().getTime()+1e3*this.expiryWindow);return!!this.expireTime&&e>this.expireTime||this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var t=this;this.needsRefresh()?this.refresh(function(r){r||(t.expired=!1),e&&e(r)}):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var r=this;1===r.refreshCallbacks.push(e)&&r.load(function(e){n.util.arrayEach(r.refreshCallbacks,function(r){t?r(e):n.util.defer(function(){r(e)})}),r.refreshCallbacks.length=0})},load:function(e){e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},31406:function(e,t,r){var n=r(44167),i=r(20904);n.ChainableTemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var t=n.util.copy(e.params)||{};if(t.RoleArn&&(t.RoleSessionName=t.RoleSessionName||"temporary-credentials"),t.SerialNumber){if(e.tokenCodeFn&&"function"==typeof e.tokenCodeFn)this.tokenCodeFn=e.tokenCodeFn;else throw new n.util.error(Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode})}var r=n.util.merge({params:t,credentials:e.masterCredentials||n.config.credentials},e.stsConfig||{});this.service=new i(r)},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this,r=t.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode(function(n,i){var s={};if(n){e(n);return}i&&(s.TokenCode=i),t.service[r](s,function(r,n){r||t.service.credentialsFrom(n,t),e(r)})})},getTokenCode:function(e){var t=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,function(r,i){if(r){var s=r;r instanceof Error&&(s=r.message),e(n.util.error(Error("Error fetching MFA token: "+s),{code:t.errorCode}));return}e(null,i)}):e(null)}})},67965:function(e,t,r){var n=r(44167),i=r(40583),s=r(20904);n.CognitoIdentityCredentials=n.util.inherit(n.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=n.util.copy(t||{}),this.loadCachedId();var r=this;Object.defineProperty(this,"identityId",{get:function(){return r.loadCachedId(),r._identityId||r.params.IdentityId},set:function(e){r._identityId=e}})},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId(function(r){r?(t.clearIdOnNotAuthorized(r),e(r)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)})},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId(function(r,n){!r&&n.IdentityId?(t.params.IdentityId=n.IdentityId,e(null,n.IdentityId)):e(r)})},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity(function(r,n){r?t.clearIdOnNotAuthorized(r):(t.cacheId(n),t.data=n,t.loadCredentials(t.data,t)),e(r)})},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken(function(r,n){r?(t.clearIdOnNotAuthorized(r),e(r)):(t.cacheId(n),t.params.WebIdentityToken=n.Token,t.webIdentityCredentials.refresh(function(r){r||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(r)}))})},loadCachedId:function(){if(n.util.isBrowser()&&!this.params.IdentityId){var e=this.getStorage("id");if(e&&this.params.Logins){var t=Object.keys(this.params.Logins);0!==(this.getStorage("providers")||"").split(",").filter(function(e){return -1!==t.indexOf(e)}).length&&(this.params.IdentityId=e)}else e&&(this.params.IdentityId=e)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new n.WebIdentityCredentials(this.params,e),!this.cognito){var t=n.util.merge({},e);t.params=this.params,this.cognito=new i(t)}this.sts=this.sts||new s(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,n.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=n.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},57192:function(e,t,r){var n=r(44167);n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){e?this.providers=e:this.providers=n.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var t=this;if(0===t.providers.length)return e(Error("No providers")),t;if(1===t.resolveCallbacks.push(e)){var r=0,i=t.providers.slice(0);!function e(s,a){if(!s&&a||r===i.length){n.util.arrayEach(t.resolveCallbacks,function(e){e(s,a)}),t.resolveCallbacks.length=0;return}var o=i[r++];(a="function"==typeof o?o.call():o).get?a.get(function(t){e(t,t?null:a)}):e(null,a)}()}return t}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},92095:function(e,t,r){var n=r(44167),i=r(20904);n.SAMLCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithSAML(function(r,n){r||t.service.credentialsFrom(n,t),e(r)})},createClients:function(){this.service=this.service||new i({params:this.params})}})},62845:function(e,t,r){var n=r(44167),i=r(20904);n.TemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.masterCredentials.get(function(){t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,function(r,n){r||t.service.credentialsFrom(n,t),e(r)})})},loadMasterCredentials:function(e){for(this.masterCredentials=e||n.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new n.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new i({params:this.params})}})},11485:function(e,t,r){var n=r(44167),i=r(20904);n.WebIdentityCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=n.util.copy(t||{})},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithWebIdentity(function(r,n){t.data=null,r||(t.data=n,t.service.credentialsFrom(n,t)),e(r)})},createClients:function(){if(!this.service){var e=n.util.merge({},this._clientConfig);e.params=this.params,this.service=new i(e)}}})},88444:function(e,t,r){var n=r(21169),i=r(44167),s=r(35333),a=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function o(e){var t=e.service,r=t.api||{};r.operations;var n={};return t.config.region&&(n.region=t.config.region),r.serviceId&&(n.serviceId=r.serviceId),t.config.credentials.accessKeyId&&(n.accessKeyId=t.config.credentials.accessKeyId),n}function u(e,t){var r={};return!function e(t,r,n){n&&null!=r&&"structure"===n.type&&n.required&&n.required.length>0&&s.arrayEach(n.required,function(i){var s=n.members[i];!0===s.endpointDiscoveryId?t[s.isLocationName?s.name:i]=String(r[i]):e(t,r[i],s)})}(r,e.params,t),r}function c(e){var t=e.service,r=t.api,n=r.operations?r.operations[e.operation]:void 0,a=u(e,n?n.input:void 0),c=o(e);Object.keys(a).length>0&&(c=s.update(c,a),n&&(c.operation=n.name));var l=i.endpointCache.get(c);if(!l||1!==l.length||""!==l[0].Address){if(l&&l.length>0)e.httpRequest.updateEndpoint(l[0].Address);else{var d=t.makeRequest(r.endpointOperation,{Operation:n.name,Identifiers:a});h(d),d.removeListener("validate",i.EventListeners.Core.VALIDATE_PARAMETERS),d.removeListener("retry",i.EventListeners.Core.RETRY_CHECK),i.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}]),d.send(function(e,t){t&&t.Endpoints?i.endpointCache.put(c,t.Endpoints):e&&i.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}])})}}}var l={};function d(e,t){var r=e.service,n=r.api,a=n.operations?n.operations[e.operation]:void 0,c=u(e,a?a.input:void 0),d=o(e);Object.keys(c).length>0&&(d=s.update(d,c),a&&(d.operation=a.name));var f=i.EndpointCache.getKeyString(d),p=i.endpointCache.get(f);if(p&&1===p.length&&""===p[0].Address){l[f]||(l[f]=[]),l[f].push({request:e,callback:t});return}if(p&&p.length>0)e.httpRequest.updateEndpoint(p[0].Address),t();else{var m=r.makeRequest(n.endpointOperation,{Operation:a.name,Identifiers:c});m.removeListener("validate",i.EventListeners.Core.VALIDATE_PARAMETERS),h(m),i.endpointCache.put(f,[{Address:"",CachePeriodInMinutes:60}]),m.send(function(r,n){if(r){if(e.response.error=s.error(r,{retryable:!1}),i.endpointCache.remove(d),l[f]){var a=l[f];s.arrayEach(a,function(e){e.request.response.error=s.error(r,{retryable:!1}),e.callback()}),delete l[f]}}else if(n&&(i.endpointCache.put(f,n.Endpoints),e.httpRequest.updateEndpoint(n.Endpoints[0].Address),l[f])){var a=l[f];s.arrayEach(a,function(e){e.request.httpRequest.updateEndpoint(n.Endpoints[0].Address),e.callback()}),delete l[f]}t()})}}function h(e){var t=e.service.api.apiVersion;t&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=t)}function f(e){var t=e.error,r=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===r.statusCode)){var n=e.request,a=n.service.api.operations||{},c=a[n.operation]?a[n.operation].input:void 0,l=u(n,c),d=o(n);Object.keys(l).length>0&&(d=s.update(d,l),a[n.operation]&&(d.operation=a[n.operation].name)),i.endpointCache.remove(d)}}function p(e){return["false","0"].indexOf(e)>=0}e.exports={discoverEndpoint:function(e,t){var r=e.service||{};if(function(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw s.error(Error(),{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=i.config[e.serviceIdentifier]||{};return!!(i.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}(r)||e.isPresigned())return t();var o=(r.api.operations||{})[e.operation],u=o?o.endpointDiscoveryRequired:"NULL",l=function(e){var t=e.service||{};if(void 0!==t.config.endpointDiscoveryEnabled)return t.config.endpointDiscoveryEnabled;if(!s.isBrowser()){for(var r=0;r<a.length;r++){var o=a[r];if(Object.prototype.hasOwnProperty.call(n.env,o)){if(""===n.env[o]||void 0===n.env[o])throw s.error(Error(),{code:"ConfigurationException",message:"environmental variable "+o+" cannot be set to nothing"});return!p(n.env[o])}}var u={};try{u=i.util.iniLoader?i.util.iniLoader.loadFrom({isConfig:!0,filename:n.env[i.util.sharedConfigFileEnv]}):{}}catch(e){}var c=u[n.env.AWS_PROFILE||i.util.defaultProfile]||{};if(Object.prototype.hasOwnProperty.call(c,"endpoint_discovery_enabled")){if(void 0===c.endpoint_discovery_enabled)throw s.error(Error(),{code:"ConfigurationException",message:"config file entry 'endpoint_discovery_enabled' cannot be set to nothing"});return!p(c.endpoint_discovery_enabled)}}}(e),h=r.api.hasRequiredEndpointDiscovery;switch((l||h)&&e.httpRequest.appendToUserAgent("endpoint-discovery"),u){case"OPTIONAL":(l||h)&&(c(e),e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",f)),t();break;case"REQUIRED":if(!1===l){e.response.error=s.error(Error(),{code:"ConfigurationException",message:"Endpoint Discovery is disabled but "+r.api.className+"."+e.operation+"() requires it. Please check your configurations."}),t();break}e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",f),d(e,t);break;default:t()}},requiredDiscoverEndpoint:d,optionalDiscoverEndpoint:c,marshallCustomIdentifiers:u,getCacheKey:o,invalidateCachedEndpoint:f}},52218:function(e,t,r){var n=r(91406).eventMessageChunker,i=r(66394).parseEvent;e.exports={createEventStream:function(e,t,r){for(var s=n(e),a=[],o=0;o<s.length;o++)a.push(i(t,s[o],r));return a}}},91406:function(e){e.exports={eventMessageChunker:function(e){for(var t=[],r=0;r<e.length;){var n=e.readInt32BE(r),i=e.slice(r,n+r);r+=n,t.push(i)}return t}}},34547:function(e,t,r){var n=r(44167).util,i=n.buffer.toBuffer;function s(e){if(8!==e.length)throw Error("Int64 buffers must be exactly 8 bytes");n.Buffer.isBuffer(e)||(e=i(e)),this.bytes=e}function a(e){for(var t=0;t<8;t++)e[t]^=255;for(var t=7;t>-1&&(e[t]++,0===e[t]);t--);}s.fromNumber=function(e){if(e>0x7fffffffffffffff||e<-0x8000000000000000)throw Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&a(t),new s(t)},s.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&a(e),parseInt(e.toString("hex"),16)*(t?-1:1)},s.prototype.toString=function(){return String(this.valueOf())},e.exports={Int64:s}},66394:function(e,t,r){var n=r(68449).parseMessage;e.exports={parseEvent:function(e,t,r){var i,s,a,o=n(t),u=o.headers[":message-type"];if(u){if("error"===u.value)throw i=o.headers[":error-code"],(a=Error((s=o.headers[":error-message"]).value||s)).code=a.name=i.value||i,a;if("event"!==u.value)return}var c=o.headers[":event-type"],l=r.members[c.value];if(l){var d={},h=l.eventPayloadMemberName;if(h){var f=l.members[h];"binary"===f.type?d[h]=o.body:d[h]=e.parse(o.body.toString(),f)}for(var p=l.eventHeaderMemberNames,m=0;m<p.length;m++){var g=p[m];o.headers[g]&&(d[g]=l.members[g].toType(o.headers[g].value))}var y={};return y[c.value]=d,y}}}},68449:function(e,t,r){var n=r(34547).Int64,i=r(45338).splitMessage,s="boolean";e.exports={parseMessage:function(e){var t=i(e);return{headers:function(e){for(var t={},r=0;r<e.length;){var i=e.readUInt8(r++),a=e.slice(r,r+i).toString();switch(r+=i,e.readUInt8(r++)){case 0:t[a]={type:s,value:!0};break;case 1:t[a]={type:s,value:!1};break;case 2:t[a]={type:"byte",value:e.readInt8(r++)};break;case 3:t[a]={type:"short",value:e.readInt16BE(r)},r+=2;break;case 4:t[a]={type:"integer",value:e.readInt32BE(r)},r+=4;break;case 5:t[a]={type:"long",value:new n(e.slice(r,r+8))},r+=8;break;case 6:var o=e.readUInt16BE(r);r+=2,t[a]={type:"binary",value:e.slice(r,r+o)},r+=o;break;case 7:var u=e.readUInt16BE(r);r+=2,t[a]={type:"string",value:e.slice(r,r+u).toString()},r+=u;break;case 8:t[a]={type:"timestamp",value:new Date(new n(e.slice(r,r+8)).valueOf())},r+=8;break;case 9:var c=e.slice(r,r+16).toString("hex");r+=16,t[a]={type:"uuid",value:c.substr(0,8)+"-"+c.substr(8,4)+"-"+c.substr(12,4)+"-"+c.substr(16,4)+"-"+c.substr(20)};break;default:throw Error("Unrecognized header type tag")}}return t}(t.headers),body:t.body}}}},45338:function(e,t,r){var n=r(44167).util,i=n.buffer.toBuffer;e.exports={splitMessage:function(e){if(n.Buffer.isBuffer(e)||(e=i(e)),e.length<16)throw Error("Provided message too short to accommodate event stream message overhead");if(e.length!==e.readUInt32BE(0))throw Error("Reported message length does not match received message length");var t=e.readUInt32BE(8);if(t!==n.crypto.crc32(e.slice(0,8)))throw Error("The prelude checksum specified in the message ("+t+") does not match the calculated CRC32 checksum.");var r=e.readUInt32BE(e.length-4);if(r!==n.crypto.crc32(e.slice(0,e.length-4)))throw Error("The message checksum did not match the expected value of "+r);var s=12+e.readUInt32BE(4);return{headers:e.slice(12,s),body:e.slice(s,e.length-4)}}}},75884:function(e,t,r){var n=r(21169),i=r(44167),s=r(75862),a=r(88444).discoverEndpoint;function o(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}function u(e){var t=e.service;return t.config.signatureVersion?t.config.signatureVersion:t.api.signatureVersion?t.api.signatureVersion:o(e)}i.EventListeners={Core:{}},i.EventListeners={Core:new s().addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(e,t){if(!e.service.api.signatureVersion&&!e.service.config.signatureVersion)return t();if("bearer"===u(e)){e.service.config.getToken(function(r){r&&(e.response.error=i.util.error(r,{code:"TokenError"})),t()});return}e.service.config.getCredentials(function(r){r&&(e.response.error=i.util.error(r,{code:"CredentialsError",message:"Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1"})),t()})}),e("VALIDATE_REGION","validate",function(e){if(!e.service.isGlobalEndpoint){var t=new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);e.service.config.region?t.test(e.service.config.region)||(e.response.error=i.util.error(Error(),{code:"ConfigError",message:"Invalid region in config"})):e.response.error=i.util.error(Error(),{code:"ConfigError",message:"Missing region in config"})}}),e("BUILD_IDEMPOTENCY_TOKENS","validate",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation];if(t){var r=t.idempotentMembers;if(r.length){for(var n=i.util.copy(e.params),s=0,a=r.length;s<a;s++)n[r[s]]||(n[r[s]]=i.util.uuid.v4());e.params=n}}}}),e("VALIDATE_PARAMETERS","validate",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation].input,r=e.service.config.paramValidation;new i.ParamValidator(r).validate(t,e.params)}}),e("COMPUTE_CHECKSUM","afterBuild",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation];if(t){var r=e.httpRequest.body,n=r&&(i.util.Buffer.isBuffer(r)||"string"==typeof r),s=e.httpRequest.headers;if(t.httpChecksumRequired&&e.service.config.computeChecksums&&n&&!s["Content-MD5"]){var a=i.util.crypto.md5(r,"base64");s["Content-MD5"]=a}}}}),t("COMPUTE_SHA256","afterBuild",function(e,t){if(e.haltHandlersOnError(),e.service.api.operations){var r=e.service.api.operations[e.operation],n=r?r.authtype:"";if(!e.service.api.signatureVersion&&!n&&!e.service.config.signatureVersion)return t();if(e.service.getSignerClass(e)===i.Signers.V4){var s=e.httpRequest.body||"";if(n.indexOf("unsigned-body")>=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();i.util.computeSha256(s,function(r,n){r?t(r):(e.httpRequest.headers["X-Amz-Content-Sha256"]=n,t())})}else t()}}),e("SET_CONTENT_LENGTH","afterBuild",function(e){var t=o(e),r=i.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var n=i.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=n}catch(n){if(r&&r.isStreaming){if(r.requiresLength);else if(t.indexOf("unsigned-body")>=0){e.httpRequest.headers["Transfer-Encoding"]="chunked";return}}throw n}}),e("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),e("SET_TRACE_ID","afterBuild",function(e){var t="X-Amzn-Trace-Id";if(i.util.isNode()&&!Object.hasOwnProperty.call(e.httpRequest.headers,t)){var r=n.env.AWS_LAMBDA_FUNCTION_NAME,s=n.env._X_AMZN_TRACE_ID;"string"==typeof r&&r.length>0&&"string"==typeof s&&s.length>0&&(e.httpRequest.headers[t]=s)}}),e("RESTART","restart",function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new i.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)}),t("DISCOVER_ENDPOINT","sign",a,!0),t("SIGN","sign",function(e,t){var r=e.service,n=u(e);if(!n||0===n.length)return t();"bearer"===n?r.config.getToken(function(n,i){if(n)return e.response.error=n,t();try{new(r.getSignerClass(e))(e.httpRequest).addAuthorization(i)}catch(t){e.response.error=t}t()}):r.config.getCredentials(function(n,i){if(n)return e.response.error=n,t();try{var s=r.getSkewCorrectedDate(),a=r.getSignerClass(e),o=(e.service.api.operations||{})[e.operation],u=new a(e.httpRequest,r.getSigningName(e),{signatureCache:r.config.signatureCache,operation:o,signatureVersion:r.api.signatureVersion});u.setServiceClientId(r._clientId),delete e.httpRequest.headers.Authorization,delete e.httpRequest.headers.Date,delete e.httpRequest.headers["X-Amz-Date"],u.addAuthorization(i,s),e.signedAt=s}catch(t){e.response.error=t}t()})}),e("VALIDATE_RESPONSE","validateResponse",function(e){this.service.successfulResponse(e,this)?(e.data={},e.error=null):(e.data=null,e.error=i.util.error(Error(),{code:"UnknownError",message:"An unknown error occurred."}))}),e("ERROR","error",function(e,t){if(t.request.service.api.awsQueryCompatible){var r=t.httpResponse.headers,n=r?r["x-amzn-query-error"]:void 0;n&&n.includes(";")&&(t.error.code=n.split(";")[0])}},!0),t("SEND","send",function(e,t){function r(r){e.httpResponse.stream=r;var n=e.request.httpRequest.stream,s=e.request.service,a=s.api,o=e.request.operation,u=a.operations[o]||{};r.on("headers",function(n,a,o){if(e.request.emit("httpHeaders",[n,a,e,o]),!e.httpResponse.streaming){if(2===i.HttpClient.streamsApiVersion){if(u.hasEventOutput&&s.successfulResponse(e)){e.request.emit("httpDone"),t();return}r.on("readable",function(){var t=r.read();null!==t&&e.request.emit("httpData",[t,e])})}else r.on("data",function(t){e.request.emit("httpData",[t,e])})}}),r.on("end",function(){n&&n.didCallback||2===i.HttpClient.streamsApiVersion&&u.hasEventOutput&&s.successfulResponse(e)||(e.request.emit("httpDone"),t())})}function n(r){if("RequestAbortedError"!==r.code){var n="TimeoutError"===r.code?r.code:"NetworkingError";r=i.util.error(r,{code:n,region:e.request.httpRequest.region,hostname:e.request.httpRequest.endpoint.hostname,retryable:!0})}e.error=r,e.request.emit("httpError",[e.error,e],function(){t()})}function s(){var t,s=i.HttpClient.getInstance(),a=e.request.service.config.httpOptions||{};try{(t=s.handleRequest(e.request.httpRequest,a,r,n)).on("sendProgress",function(t){e.request.emit("httpUploadProgress",[t,e])}),t.on("receiveProgress",function(t){e.request.emit("httpDownloadProgress",[t,e])})}catch(e){n(e)}}e.httpResponse._abortCallback=t,e.error=null,e.data=null,(e.request.service.getSkewCorrectedDate()-this.signedAt)/1e3>=600?this.emit("sign",[this],function(e){e?t(e):s()}):s()}),e("HTTP_HEADERS","httpHeaders",function(e,t,r,n){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=n,r.httpResponse.headers=t,r.httpResponse.body=i.util.buffer.toBuffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var s=t.date||t.Date,a=r.request.service;if(s){var o=Date.parse(s);a.config.correctClockSkew&&a.isClockSkewed(o)&&a.applyClockOffset(o)}}),e("HTTP_DATA","httpData",function(e,t){if(e){if(i.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],n={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[n,t])}t.httpResponse.buffers.push(i.util.buffer.toBuffer(e))}}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=i.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers}),e("FINALIZE_ERROR","retry",function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))}),e("INVALIDATE_CREDENTIALS","retry",function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}}),e("EXPIRED_SIGNATURE","retry",function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)}),e("CLOCK_SKEWED","retry",function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)}),e("REDIRECT","retry",function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new i.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,this.httpRequest.path=this.httpRequest.endpoint.path,e.error.redirect=!0,e.error.retryable=!0)}),e("RETRY_CHECK","retry",function(e){e.error&&(e.error.redirect&&e.redirectCount<e.maxRedirects?e.error.retryDelay=0:e.retryCount<e.maxRetries&&(e.error.retryDelay=this.service.retryDelays(e.retryCount,e.error)||0))}),t("RESET_RETRY_STATE","afterRetry",function(e,t){var r,n=!1;e.error&&(r=e.error.retryDelay||0,e.error.retryable&&e.retryCount<e.maxRetries?(e.retryCount++,n=!0):e.error.redirect&&e.redirectCount<e.maxRedirects&&(e.redirectCount++,n=!0)),n&&r>=0?(e.error=null,setTimeout(t,r)):t()})}),CorePost:new s().addNamedListeners(function(e){e("EXTRACT_REQUEST_ID","extractData",i.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",i.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",function(e){if("NetworkingError"===e.code&&("ENOTFOUND"===e.errno||"number"==typeof e.errno&&"function"==typeof i.util.getSystemErrorName&&["EAI_NONAME","EAI_NODATA"].indexOf(i.util.getSystemErrorName(e.errno)>=0))){var t="Inaccessible host: `"+e.hostname+"' at port `"+e.port+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=i.util.error(Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}})}),Logger:new s().addNamedListeners(function(e){e("LOG_REQUEST","complete",function(e){var t=e.request,n=t.service.config.logger;if(n){var s,a,o,u,c,l,d=(s=(e.request.service.getSkewCorrectedDate().getTime()-t.startTime.getTime())/1e3,a=!!n.isTTY,o=e.httpResponse.statusCode,u=t.params,t.service.api.operations&&t.service.api.operations[t.operation]&&t.service.api.operations[t.operation].input&&(u=function e(t,r){if(!r)return r;if(t.isSensitive)return"***SensitiveInformation***";switch(t.type){case"structure":var n={};return i.util.each(r,function(r,i){Object.prototype.hasOwnProperty.call(t.members,r)?n[r]=e(t.members[r],i):n[r]=i}),n;case"list":var s=[];return i.util.arrayEach(r,function(r,n){s.push(e(t.member,r))}),s;case"map":var a={};return i.util.each(r,function(r,n){a[r]=e(t.value,n)}),a;default:return r}}(t.service.api.operations[t.operation].input,t.params)),c=r(60232).inspect(u,!0,null),l="",a&&(l+="\x1b[33m"),l+="[AWS "+t.service.serviceIdentifier+" "+o+(" "+s.toString()+"s ")+e.retryCount+" retries]",a&&(l+="\x1b[0;1m"),l+=" "+i.util.string.lowerFirst(t.operation)+"("+c+")",a&&(l+="\x1b[0m"),l);"function"==typeof n.log?n.log(d):"function"==typeof n.write&&n.write(d+"\n")}})}),Json:new s().addNamedListeners(function(e){var t=r(60949);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Rest:new s().addNamedListeners(function(e){var t=r(69978);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),RestJson:new s().addNamedListeners(function(e){var t=r(49631);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError),e("UNSET_CONTENT_LENGTH","afterBuild",t.unsetContentLength)}),RestXml:new s().addNamedListeners(function(e){var t=r(11948);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Query:new s().addNamedListeners(function(e){var t=r(55729);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})}},66748:function(e,t,r){var n=r(44167),i=n.util.inherit;n.Endpoint=i({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),null==e)throw Error("Invalid endpoint: "+e);if("string"!=typeof e)return n.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:n.config.sslEnabled)?"https":"http")+"://"+e),n.util.update(this,n.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=i({constructor:function(e,t){e=new n.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=n.util.userAgent()},getUserAgentHeaderName:function(){return(n.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"==typeof e&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=n.util.queryStringParse(e),n.util.queryParamsToString(e)):""},updateEndpoint:function(e){var t=new n.Endpoint(e);this.endpoint=t,this.path=t.path||"/",this.headers.Host&&(this.headers.Host=t.host)}}),n.HttpResponse=i({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),n.HttpClient=i({}),n.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},78460:function(e,t,r){var n=r(44167),i=r(3166).EventEmitter;r(66748),n.XHRClient=n.util.inherit({handleRequest:function(e,t,r,s){var a=this,o=e.endpoint,u=new i,c=o.protocol+"//"+o.hostname;80!==o.port&&443!==o.port&&(c+=":"+o.port),c+=e.path;var l=new XMLHttpRequest,d=!1;e.stream=l,l.addEventListener("readystatechange",function(){try{if(0===l.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!d&&(u.statusCode=l.status,u.headers=a.parseHeaders(l.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers,l.statusText),d=!0),this.readyState===this.DONE&&a.finishRequest(l,u)},!1),l.upload.addEventListener("progress",function(e){u.emit("sendProgress",e)}),l.addEventListener("progress",function(e){u.emit("receiveProgress",e)},!1),l.addEventListener("timeout",function(){s(n.util.error(Error("Timeout"),{code:"TimeoutError"}))},!1),l.addEventListener("error",function(){s(n.util.error(Error("Network Failure"),{code:"NetworkingError"}))},!1),l.addEventListener("abort",function(){s(n.util.error(Error("Request aborted"),{code:"RequestAbortedError"}))},!1),r(u),l.open(e.method,c,!1!==t.xhrAsync),n.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)}),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.responseType="arraybuffer"}catch(e){}try{e.body?l.send(e.body):l.send()}catch(t){if(e.body&&"object"==typeof e.body.buffer)l.send(e.body.buffer);else throw t}return u},parseHeaders:function(e){var t={};return n.util.arrayEach(e.split(/\r?\n/),function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)}),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var i=e.response;r=new n.util.Buffer(i.byteLength);for(var s=new Uint8Array(i),a=0;a<r.length;++a)r[a]=s[a]}try{r||"string"!=typeof e.responseText||(r=new n.util.Buffer(e.responseText))}catch(e){}r&&t.emit("data",r),t.emit("end")}}),n.HttpClient.prototype=n.XHRClient.prototype,n.HttpClient.streamsApiVersion=1},69857:function(e,t,r){var n=r(35333);function i(){}i.prototype.build=function(e,t){return JSON.stringify(function e(t,r){var i,s;if(r&&null!=t)switch(r.type){case"structure":return function(t,r){if(r.isDocument)return t;var i={};return n.each(t,function(t,n){var s=r.members[t];if(s){if("body"!==s.location)return;var a=s.isLocationName?s.name:t,o=e(n,s);void 0!==o&&(i[a]=o)}}),i}(t,r);case"map":return i={},n.each(t,function(t,n){var s=e(n,r.value);void 0!==s&&(i[t]=s)}),i;case"list":return s=[],n.arrayEach(t,function(t){var n=e(t,r.member);void 0!==n&&s.push(n)}),s;default:return r.toWireFormat(t)}}(e,t))},e.exports=i},78836:function(e,t,r){var n=r(35333);function i(){}i.prototype.parse=function(e,t){return function e(t,r){if(r&&void 0!==t)switch(r.type){case"structure":return function(t,r){if(null!=t){if(r.isDocument)return t;var i={},s=r.members,a=r.api&&r.api.awsQueryCompatible;return n.each(s,function(r,n){var s=n.isLocationName?n.name:r;if(Object.prototype.hasOwnProperty.call(t,s)){var o=e(t[s],n);void 0!==o&&(i[r]=o)}else a&&n.defaultValue&&"list"===n.type&&(i[r]="function"==typeof n.defaultValue?n.defaultValue():n.defaultValue)}),i}}(t,r);case"map":return function(t,r){if(null!=t){var i={};return n.each(t,function(t,n){var s=e(n,r.value);void 0===s?i[t]=null:i[t]=s}),i}}(t,r);case"list":return function(t,r){if(null!=t){var i=[];return n.arrayEach(t,function(t){var n=e(t,r.member);void 0===n?i.push(null):i.push(n)}),i}}(t,r);default:return r.toType(t)}}(JSON.parse(e),t)},e.exports=i},37052:function(e,t,r){var n=r(21169);e.exports={suppress:!1},setTimeout(function(){e.exports.suppress||void 0!==n&&("object"!=typeof n.env||void 0===n.env.AWS_EXECUTION_ENV||0!==n.env.AWS_EXECUTION_ENV.indexOf("AWS_Lambda_"))&&("object"!=typeof n.env||void 0===n.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE)&&"function"==typeof n.emitWarning&&n.emitWarning("The AWS SDK for JavaScript (v2) is in maintenance mode.\n SDK releases are limited to address critical bug fixes and security issues only.\n\nPlease migrate your code to use AWS SDK for JavaScript (v3).\nFor more information, check the blog post at https://a.co/cUPnyil",{type:"NOTE"})},0)},50962:function(e,t,r){var n=r(51701),i=r(61501),s=r(45804),a=r(89960),o=r(78308),u=r(48150),c=r(35333),l=c.property,d=c.memoizedProperty;e.exports=function(e,t){var r=this;e=e||{},(t=t||{}).api=this,e.metadata=e.metadata||{};var h=t.serviceIdentifier;delete t.serviceIdentifier,l(this,"isApi",!0,!1),l(this,"apiVersion",e.metadata.apiVersion),l(this,"endpointPrefix",e.metadata.endpointPrefix),l(this,"signingName",e.metadata.signingName),l(this,"globalEndpoint",e.metadata.globalEndpoint),l(this,"signatureVersion",e.metadata.signatureVersion),l(this,"jsonVersion",e.metadata.jsonVersion),l(this,"targetPrefix",e.metadata.targetPrefix),l(this,"protocol",e.metadata.protocol),l(this,"timestampFormat",e.metadata.timestampFormat),l(this,"xmlNamespaceUri",e.metadata.xmlNamespace),l(this,"abbreviation",e.metadata.serviceAbbreviation),l(this,"fullName",e.metadata.serviceFullName),l(this,"serviceId",e.metadata.serviceId),h&&u[h]&&l(this,"xmlNoDefaultLists",u[h].xmlNoDefaultLists,!1),d(this,"className",function(){var t=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return t?("ElasticLoadBalancing"===(t=t.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""))&&(t="ELB"),t):null}),l(this,"operations",new n(e.operations,t,function(e,r){return new i(e,r,t)},c.string.lowerFirst,function(e,t){!0===t.endpointoperation&&l(r,"endpointOperation",c.string.lowerFirst(e)),t.endpointdiscovery&&!r.hasRequiredEndpointDiscovery&&l(r,"hasRequiredEndpointDiscovery",!0===t.endpointdiscovery.required)})),l(this,"shapes",new n(e.shapes,t,function(e,r){return s.create(r,t)})),l(this,"paginators",new n(e.paginators,t,function(e,r){return new a(e,r,t)})),l(this,"waiters",new n(e.waiters,t,function(e,r){return new o(e,r,t)},c.string.lowerFirst)),t.documentation&&(l(this,"documentation",e.documentation),l(this,"documentationUrl",e.documentationUrl)),l(this,"awsQueryCompatible",e.metadata.awsQueryCompatible)}},51701:function(e,t,r){var n=r(35333).memoizedProperty;function i(e,t,r,i){n(this,i(e),function(){return r(e,t)})}e.exports=function(e,t,r,n,s){for(var a in n=n||String,e)Object.prototype.hasOwnProperty.call(e,a)&&(i.call(this,a,e[a],r,n),s&&s(a,e[a]))}},61501:function(e,t,r){var n=r(45804),i=r(35333),s=i.property,a=i.memoizedProperty;e.exports=function(e,t,r){var i=this;r=r||{},s(this,"name",t.name||e),s(this,"api",r.api,!1),t.http=t.http||{},s(this,"endpoint",t.endpoint),s(this,"httpMethod",t.http.method||"POST"),s(this,"httpPath",t.http.requestUri||"/"),s(this,"authtype",t.authtype||""),s(this,"endpointDiscoveryRequired",t.endpointdiscovery?t.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),s(this,"httpChecksumRequired",t.httpChecksumRequired||t.httpChecksum&&t.httpChecksum.requestChecksumRequired,!1),a(this,"input",function(){return t.input?n.create(t.input,r):new n.create({type:"structure"},r)}),a(this,"output",function(){return t.output?n.create(t.output,r):new n.create({type:"structure"},r)}),a(this,"errors",function(){var e=[];if(!t.errors)return null;for(var i=0;i<t.errors.length;i++)e.push(n.create(t.errors[i],r));return e}),a(this,"paginator",function(){return r.api.paginators[e]}),r.documentation&&(s(this,"documentation",t.documentation),s(this,"documentationUrl",t.documentationUrl)),a(this,"idempotentMembers",function(){var e=[],t=i.input,r=t.members;if(!t.members)return e;for(var n in r)r.hasOwnProperty(n)&&!0===r[n].isIdempotent&&e.push(n);return e}),a(this,"hasEventOutput",function(){return function(e){var t=e.members,r=e.payload;if(!e.members)return!1;if(r)return t[r].isEventStream;for(var n in t)if(!t.hasOwnProperty(n)&&!0===t[n].isEventStream)return!0;return!1}(i.output)})}},89960:function(e,t,r){var n=r(35333).property;e.exports=function(e,t){n(this,"inputToken",t.input_token),n(this,"limitKey",t.limit_key),n(this,"moreResults",t.more_results),n(this,"outputToken",t.output_token),n(this,"resultKey",t.result_key)}},78308:function(e,t,r){var n=r(35333),i=n.property;e.exports=function(e,t,r){r=r||{},i(this,"name",e),i(this,"api",r.api,!1),t.operation&&i(this,"operation",n.string.lowerFirst(t.operation));var s=this;["type","description","delay","maxAttempts","acceptors"].forEach(function(e){var r=t[e];r&&i(s,e,r)})}},45804:function(e,t,r){var n=r(51701),i=r(35333);function s(e,t,r){null!=r&&i.property.apply(this,arguments)}function a(e,t){e.constructor.prototype[t]||i.memoizedProperty.apply(this,arguments)}function o(e,t,r){t=t||{},s(this,"shape",e.shape),s(this,"api",t.api,!1),s(this,"type",e.type),s(this,"enum",e.enum),s(this,"min",e.min),s(this,"max",e.max),s(this,"pattern",e.pattern),s(this,"location",e.location||this.location||"body"),s(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),s(this,"isStreaming",e.streaming||this.isStreaming||!1),s(this,"requiresLength",e.requiresLength,!1),s(this,"isComposite",e.isComposite||!1),s(this,"isShape",!0,!1),s(this,"isQueryName",!!e.queryName,!1),s(this,"isLocationName",!!e.locationName,!1),s(this,"isIdempotent",!0===e.idempotencyToken),s(this,"isJsonValue",!0===e.jsonvalue),s(this,"isSensitive",!0===e.sensitive||e.prototype&&!0===e.prototype.sensitive),s(this,"isEventStream",!!e.eventstream,!1),s(this,"isEvent",!!e.event,!1),s(this,"isEventPayload",!!e.eventpayload,!1),s(this,"isEventHeader",!!e.eventheader,!1),s(this,"isTimestampFormatSet",!!e.timestampFormat||e.prototype&&!0===e.prototype.isTimestampFormatSet,!1),s(this,"endpointDiscoveryId",!!e.endpointdiscoveryid,!1),s(this,"hostLabel",!!e.hostLabel,!1),t.documentation&&(s(this,"documentation",e.documentation),s(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&s(this,"isXmlAttribute",e.xmlAttribute||!1),s(this,"defaultValue",null),this.toWireFormat=function(e){return null==e?"":e},this.toType=function(e){return e}}function u(e){o.apply(this,arguments),s(this,"isComposite",!0),e.flattened&&s(this,"flattened",e.flattened||!1)}function c(e,t){var r=this,i=null,c=!this.isShape;u.apply(this,arguments),c&&(s(this,"defaultValue",function(){return{}}),s(this,"members",{}),s(this,"memberNames",[]),s(this,"required",[]),s(this,"isRequired",function(){return!1}),s(this,"isDocument",!!e.document)),e.members&&(s(this,"members",new n(e.members,t,function(e,r){return o.create(r,t,e)})),a(this,"memberNames",function(){return e.xmlOrder||Object.keys(e.members)}),e.event&&(a(this,"eventPayloadMemberName",function(){for(var e=r.members,t=r.memberNames,n=0,i=t.length;n<i;n++)if(e[t[n]].isEventPayload)return t[n]}),a(this,"eventHeaderMemberNames",function(){for(var e=r.members,t=r.memberNames,n=[],i=0,s=t.length;i<s;i++)e[t[i]].isEventHeader&&n.push(t[i]);return n}))),e.required&&(s(this,"required",e.required),s(this,"isRequired",function(t){if(!i){i={};for(var r=0;r<e.required.length;r++)i[e.required[r]]=!0}return i[t]},!1,!0)),s(this,"resultWrapper",e.resultWrapper||null),e.payload&&s(this,"payload",e.payload),"string"==typeof e.xmlNamespace?s(this,"xmlNamespaceUri",e.xmlNamespace):"object"==typeof e.xmlNamespace&&(s(this,"xmlNamespacePrefix",e.xmlNamespace.prefix),s(this,"xmlNamespaceUri",e.xmlNamespace.uri))}function l(e,t){var r=this,n=!this.isShape;if(u.apply(this,arguments),n&&s(this,"defaultValue",function(){return[]}),e.member&&a(this,"member",function(){return o.create(e.member,t)}),this.flattened){var i=this.name;a(this,"name",function(){return r.member.name||i})}}function d(e,t){var r=!this.isShape;u.apply(this,arguments),r&&(s(this,"defaultValue",function(){return{}}),s(this,"key",o.create({type:"string"},t)),s(this,"value",o.create({type:"string"},t))),e.key&&a(this,"key",function(){return o.create(e.key,t)}),e.value&&a(this,"value",function(){return o.create(e.value,t)})}function h(){o.apply(this,arguments);var e=["rest-xml","query","ec2"];this.toType=function(t){return(t=this.api&&e.indexOf(this.api.protocol)>-1?t||"":t,this.isJsonValue)?JSON.parse(t):t&&"function"==typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function f(){o.apply(this,arguments),this.toType=function(e){var t=i.base64.decode(e);if(this.isSensitive&&i.isNode()&&"function"==typeof i.Buffer.alloc){var r=i.Buffer.alloc(t.length,t);t.fill(0),t=r}return t},this.toWireFormat=i.base64.encode}function p(){f.apply(this,arguments)}function m(){o.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null==e?null:"true"===e}}o.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},o.types={structure:c,list:l,map:d,boolean:m,timestamp:function(e){var t=this;if(o.apply(this,arguments),e.timestampFormat)s(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)s(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)s(this,"timestampFormat","rfc822");else if("querystring"===this.location)s(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":s(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":s(this,"timestampFormat","iso8601")}this.toType=function(e){return null==e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?i.date.parseTimestamp(e):null},this.toWireFormat=function(e){return i.date.format(e,t.timestampFormat)}},float:function(){o.apply(this,arguments),this.toType=function(e){return null==e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){o.apply(this,arguments),this.toType=function(e){return null==e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:h,base64:p,binary:f},o.resolve=function(e,t){if(!e.shape)return null;var r=t.api.shapes[e.shape];if(!r)throw Error("Cannot find shape reference: "+e.shape);return r},o.create=function(e,t,r){if(e.isShape)return e;var n=o.resolve(e,t);if(n){var i=Object.keys(e);t.documentation||(i=i.filter(function(e){return!e.match(/documentation/)}));var s=function(){n.constructor.call(this,e,t,r)};return s.prototype=n,new s}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var a=e.type;if(o.normalizedTypes[e.type]&&(e.type=o.normalizedTypes[e.type]),o.types[e.type])return new o.types[e.type](e,t,r);throw Error("Unrecognized shape type: "+a)},o.shapes={StructureShape:c,ListShape:l,MapShape:d,StringShape:h,BooleanShape:m,Base64Shape:p},e.exports=o},67998:function(e,t,r){var n=r(44167);n.ParamValidator=n.util.inherit({constructor:function(e){(!0===e||void 0===e)&&(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,n.util.error(Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1!==this.errors.length)return!0;throw this.errors[0]},fail:function(e,t){this.errors.push(n.util.error(Error(t),{code:e}))},validateStructure:function(e,t,r){if(e.isDocument)return!0;this.validateType(t,r,["object"],"structure");for(var n,i=0;e.required&&i<e.required.length;i++)null==t[n=e.required[i]]&&this.fail("MissingRequiredParameter","Missing required key '"+n+"' in "+r);for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n],a=e.members[n];if(void 0!==a){var o=[r,n].join(".");this.validateMember(a,s,o)}else null!=s&&this.fail("UnexpectedParameter","Unexpected key '"+n+"' found in "+r)}return!0},validateMember:function(e,t,r){switch(e.type){case"structure":return this.validateStructure(e,t,r);case"list":return this.validateList(e,t,r);case"map":return this.validateMap(e,t,r);default:return this.validateScalar(e,t,r)}},validateList:function(e,t,r){if(this.validateType(t,r,[Array])){this.validateRange(e,t.length,r,"list member count");for(var n=0;n<t.length;n++)this.validateMember(e.member,t[n],r+"["+n+"]")}},validateMap:function(e,t,r){if(this.validateType(t,r,["object"],"map")){var n=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(this.validateMember(e.key,i,r+"[key='"+i+"']"),this.validateMember(e.value,t[i],r+"['"+i+"']"),n++);this.validateRange(e,n,r,"map member count")}},validateScalar:function(e,t,r){switch(e.type){case null:case void 0:case"string":return this.validateString(e,t,r);case"base64":case"binary":return this.validatePayload(t,r);case"integer":case"float":return this.validateNumber(e,t,r);case"boolean":return this.validateType(t,r,["boolean"]);case"timestamp":return this.validateType(t,r,[Date,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/,"number"],"Date object, ISO-8601 string, or a UNIX timestamp");default:return this.fail("UnkownType","Unhandled type "+e.type+" for "+r)}},validateString:function(e,t,r){var n=["string"];e.isJsonValue&&(n=n.concat(["number","object","boolean"])),null!==t&&this.validateType(t,r,n)&&(this.validateEnum(e,t,r),this.validateRange(e,t.length,r,"string length"),this.validatePattern(e,t,r),this.validateUri(e,t,r))},validateUri:function(e,t,r){"uri"===e.location&&0===t.length&&this.fail("UriParameterError",'Expected uri parameter to have length >= 1, but found "'+t+'" for '+r)},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&!new RegExp(e.pattern).test(t)&&this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r)},validateRange:function(e,t,r,n){this.validation.min&&void 0!==e.min&&t<e.min&&this.fail("MinRangeError","Expected "+n+" >= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(e,t,r,i){if(null==e)return!1;for(var s=!1,a=0;a<r.length;a++){if("string"==typeof r[a]){if(typeof e===r[a])return!0}else if(r[a]instanceof RegExp){if((e||"").toString().match(r[a]))return!0}else{if(e instanceof r[a]||n.util.isType(e,r[a]))return!0;i||s||(r=r.slice()),r[a]=n.util.typeName(r[a])}s=!0}var o=i;o||(o=r.join(", ").replace(/,([^,]+)$/,", or$1"));var u=o.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+t+" to be a"+u+" "+o),!1},validateNumber:function(e,t,r){if(null!=t){if("string"==typeof t){var n=parseFloat(t);n.toString()===t&&(t=n)}this.validateType(t,r,["number"])&&this.validateRange(e,t,r,"numeric value")}},validatePayload:function(e,t){if(null!=e&&"string"!=typeof e&&(!e||"number"!=typeof e.byteLength)){if(n.util.isNode()){var r=n.util.stream.Stream;if(n.util.Buffer.isBuffer(e)||e instanceof r)return}else if(e instanceof Blob)return;var i=["Buffer","Stream","File","Blob","ArrayBuffer","DataView"];if(e){for(var s=0;s<i.length;s++)if(n.util.isType(e,i[s])||n.util.typeName(e.constructor)===i[s])return}this.fail("InvalidParameterType","Expected "+t+" to be a string, Buffer, Stream, Blob, or typed array object")}}})},7538:function(e,t,r){var n=r(35333),i=r(44167);e.exports={populateHostPrefix:function(e){if(!e.service.config.hostPrefixEnabled)return e;var t=e.service.api.operations[e.operation];if(s=(r=e.service.api).operations[e.operation],a=r.endpointOperation&&r.endpointOperation===n.string.lowerFirst(s.name),"NULL"!==s.endpointDiscoveryRequired||!0===a)return e;if(t.endpoint&&t.endpoint.hostPrefix){var r,s,a,o,u,c,l,d,h,f=(o=t.endpoint.hostPrefix,u=e.params,c=t.input,n.each(c.members,function(e,t){if(!0===t.hostLabel){if("string"!=typeof u[e]||""===u[e])throw n.error(Error(),{message:"Parameter "+e+" should be a non-empty string.",code:"InvalidParameter"});var r=RegExp("\\{"+e+"\\}","g");o=o.replace(r,u[e])}}),o);(l=e.httpRequest.endpoint).host&&(l.host=f+l.host),l.hostname&&(l.hostname=f+l.hostname),d=e.httpRequest.endpoint.hostname.split("."),h=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/,n.arrayEach(d,function(e){if(!e.length||e.length<1||e.length>63)throw n.error(Error(),{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!h.test(e))throw i.util.error(Error(),{code:"ValidationError",message:e+" is not hostname compatible."})})}return e}}},60949:function(e,t,r){var n=r(35333),i=r(69857),s=r(78836),a=r(7538).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,s=r.jsonVersion||"1.0",o=r.operations[e.operation].input,u=new i;1===s&&(s="1.0"),r.awsQueryCompatible&&(t.params||(t.params={}),Object.assign(t.params,e.params)),t.body=u.build(e.params||{},o),t.headers["Content-Type"]="application/x-amz-json-"+s,t.headers["X-Amz-Target"]=n,a(e)},extractError:function(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),r.body.length>0)try{var i=JSON.parse(r.body.toString()),s=i.__type||i.code||i.Code;for(var a in s&&(t.code=s.split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=i.message||i.Message||null,i||{})"code"!==a&&"message"!==a&&(t["["+a+"]"]="See error."+a+" for details.",Object.defineProperty(t,a,{value:i[a],enumerable:!1,writable:!0}))}catch(e){t.statusCode=r.statusCode,t.message=r.statusMessage}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=n.error(Error(),t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation].output||{},n=new s;e.data=n.parse(t,r)}}}},55729:function(e,t,r){var n=r(44167),i=r(35333),s=r(89608),a=r(45804),o=r(7538).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name},new s().serialize(e.params,t.input,function(e,t){r.params[e]=t}),r.body=i.queryParamsToString(r.params),o(e)},extractError:function(e){var t,r=e.httpResponse.body.toString();if(r.match("<UnknownOperationException"))t={Code:"UnknownOperation",Message:"Unknown operation "+e.request.operation};else try{t=new n.XML.Parser().parse(r)}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.requestId&&!e.requestId&&(e.requestId=t.requestId),t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=i.error(Error(),{code:t.Code,message:t.Message}):e.error=i.error(Error(),{code:e.httpResponse.statusCode,message:null})},extractData:function(e){var t=e.request,r=t.service.api.operations[t.operation].output||{},s=r;if(s.resultWrapper){var o=a.create({type:"structure"});o.members[s.resultWrapper]=r,o.memberNames=[s.resultWrapper],i.property(r,"name",r.resultWrapper),r=o}var u=new n.XML.Parser;if(r&&r.members&&!r.members._XAMZRequestId){var c=a.create({type:"string"},{api:{protocol:"query"}},"requestId");r.members._XAMZRequestId=c}var l=u.parse(e.httpResponse.body.toString(),r);e.requestId=l._XAMZRequestId||l.requestId,l._XAMZRequestId&&delete l._XAMZRequestId,s.resultWrapper&&l[s.resultWrapper]&&(i.update(l,l[s.resultWrapper]),delete l[s.resultWrapper]),e.data=l}}},69978:function(e,t,r){var n=r(35333),i=r(7538).populateHostPrefix;function s(e,t,r,i){var s=[e,t].join("/");s=s.replace(/\/+/g,"/");var a={},o=!1;if(n.each(r.members,function(e,t){var r=i[e];if(null!=r){if("uri"===t.location){var u=RegExp("\\{"+t.name+"(\\+)?\\}");s=s.replace(u,function(e,t){return(t?n.uriEscapePath:n.uriEscape)(String(r))})}else"querystring"===t.location&&(o=!0,"list"===t.type?a[t.name]=r.map(function(e){return n.uriEscape(t.member.toWireFormat(e).toString())}):"map"===t.type?n.each(r,function(e,t){Array.isArray(t)?a[e]=t.map(function(e){return n.uriEscape(String(e))}):a[e]=n.uriEscape(String(t))}):a[t.name]=n.uriEscape(t.toWireFormat(r).toString()))}}),o){s+=s.indexOf("?")>=0?"&":"?";var u=[];n.arrayEach(Object.keys(a).sort(),function(e){Array.isArray(a[e])||(a[e]=[a[e]]);for(var t=0;t<a[e].length;t++)u.push(n.uriEscape(String(e))+"="+a[e][t])}),s+=u.join("&")}return s}e.exports={buildRequest:function(e){var t,r,a,o;e.httpRequest.method=e.service.api.operations[e.operation].httpMethod,r=(t=e.service.api.operations[e.operation]).input,a=s(e.httpRequest.endpoint.path,t.httpPath,r,e.params),e.httpRequest.path=a,o=e.service.api.operations[e.operation],n.each(o.input.members,function(t,r){var i=e.params[t];null!=i&&("headers"===r.location&&"map"===r.type?n.each(i,function(t,n){e.httpRequest.headers[r.name+t]=n}):"header"===r.location&&(i=r.toWireFormat(i).toString(),r.isJsonValue&&(i=n.base64.encode(i)),e.httpRequest.headers[r.name]=i))}),i(e)},extractError:function(){},extractData:function(e){var t=e.request,r={},i=e.httpResponse,s=t.service.api.operations[t.operation].output,a={};n.each(i.headers,function(e,t){a[e.toLowerCase()]=t}),n.each(s.members,function(e,t){var s=(t.name||e).toLowerCase();if("headers"===t.location&&"map"===t.type){r[e]={};var o=RegExp("^"+(t.isLocationName?t.name:"")+"(.+)","i");n.each(i.headers,function(t,n){var i=t.match(o);null!==i&&(r[e][i[1]]=n)})}else if("header"===t.location){if(void 0!==a[s]){var u=t.isJsonValue?n.base64.decode(a[s]):a[s];r[e]=t.toType(u)}}else"statusCode"===t.location&&(r[e]=parseInt(i.statusCode,10))}),e.data=r},generateURI:s}},49631:function(e,t,r){var n=r(44167),i=r(35333),s=r(69978),a=r(60949),o=r(69857),u=r(78836),c=["GET","HEAD","DELETE"];function l(e,t){e.httpRequest.headers["Content-Type"]||(e.httpRequest.headers["Content-Type"]=t?"binary/octet-stream":"application/json")}e.exports={buildRequest:function(e){s.buildRequest(e),0>c.indexOf(e.httpRequest.method)&&function(e){var t=new o,r=e.service.api.operations[e.operation].input;if(r.payload){var n={},i=r.members[r.payload];n=e.params[r.payload],"structure"===i.type?(e.httpRequest.body=t.build(n||{},i),l(e)):void 0!==n&&(e.httpRequest.body=n,("binary"===i.type||i.isStreaming)&&l(e,!0))}else e.httpRequest.body=t.build(e.params,r),l(e)}(e)},extractError:function(e){a.extractError(e)},extractData:function(e){s.extractData(e);var t,r=e.request,o=r.service.api.operations[r.operation],c=r.service.api.operations[r.operation].output||{};if(o.hasEventOutput,c.payload){var l=c.members[c.payload],d=e.httpResponse.body;if(l.isEventStream)t=new u,e.data[c.payload]=i.createEventStream(2===n.HttpClient.streamsApiVersion?e.httpResponse.stream:d,t,l);else if("structure"===l.type||"list"===l.type){var t=new u;e.data[c.payload]=t.parse(d,l)}else"binary"===l.type||l.isStreaming?e.data[c.payload]=d:e.data[c.payload]=l.toType(d)}else{var h=e.data;a.extractData(e),e.data=i.merge(h,e.data)}},unsetContentLength:function(e){void 0===i.getRequestPayloadShape(e)&&c.indexOf(e.httpRequest.method)>=0&&delete e.httpRequest.headers["Content-Length"]}}},11948:function(e,t,r){var n=r(44167),i=r(35333),s=r(69978);e.exports={buildRequest:function(e){s.buildRequest(e),0>["GET","HEAD"].indexOf(e.httpRequest.method)&&function(e){var t=e.service.api.operations[e.operation].input,r=new n.XML.Builder,s=e.params,a=t.payload;if(a){var o=t.members[a];if(void 0===(s=s[a]))return;if("structure"===o.type){var u=o.name;e.httpRequest.body=r.toXML(s,o,u,!0)}else e.httpRequest.body=s}else e.httpRequest.body=r.toXML(s,t,t.name||t.shape||i.string.upperFirst(e.operation)+"Request")}(e)},extractError:function(e){var t;s.extractError(e);try{t=new n.XML.Parser().parse(e.httpResponse.body.toString())}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=i.error(Error(),{code:t.Code,message:t.Message}):e.error=i.error(Error(),{code:e.httpResponse.statusCode,message:null})},extractData:function(e){s.extractData(e);var t,r=e.request,a=e.httpResponse.body,o=r.service.api.operations[r.operation],u=o.output;o.hasEventOutput;var c=u.payload;if(c){var l=u.members[c];l.isEventStream?(t=new n.XML.Parser,e.data[c]=i.createEventStream(2===n.HttpClient.streamsApiVersion?e.httpResponse.stream:e.httpResponse.body,t,l)):"structure"===l.type?(t=new n.XML.Parser,e.data[c]=t.parse(a.toString(),l)):"binary"===l.type||l.isStreaming?e.data[c]=a:e.data[c]=l.toType(a)}else if(a.length>0){var d=(t=new n.XML.Parser).parse(a.toString(),u);i.update(e.data,d)}}}},89608:function(e,t,r){var n=r(35333);function i(){}function s(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}i.prototype.serialize=function(e,t,r){!function e(t,r,i,a){n.each(i.members,function(i,o){var u=r[i];if(null!=u){var c=s(o);!function t(r,i,a,o){if(null!=i){if("structure"===a.type)e(r,i,a,o);else if("list"===a.type)!function(e,r,i,a){var o=i.member||{};if(0===r.length){"ec2"!==i.api.protocol&&a.call(this,e,null);return}n.arrayEach(r,function(r,n){var u="."+(n+1);if("ec2"===i.api.protocol)u+="";else if(i.flattened){if(o.name){var c=e.split(".");c.pop(),c.push(s(o)),e=c.join(".")}}else u="."+(o.name?o.name:"member")+u;t(e+u,r,o,a)})}(r,i,a,o);else if("map"===a.type){var u;u=1,n.each(i,function(e,n){var i=(a.flattened?".":".entry.")+u+++".",s=i+(a.key.name||"key"),c=i+(a.value.name||"value");t(r+s,e,a.key,o),t(r+c,n,a.value,o)})}else o(r,a.toWireFormat(i).toString())}}(c=t?t+"."+c:c,u,o,a)}})}("",e,t,r)},e.exports=i},1809:function(e){e.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},963:function(e){e.exports={isFipsRegion:function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},isGlobalRegion:function(e){return"string"==typeof e&&["aws-global","aws-us-gov-global"].includes(e)},getRealRegion:function(e){return["fips-aws-global","aws-fips","aws-global"].includes(e)?"us-east-1":["fips-aws-us-gov-global","aws-us-gov-global"].includes(e)?"us-gov-west-1":e.replace(/fips-(dkr-|prod-)?|-fips/,"")}}},88868:function(e,t,r){var n=r(35333),i=r(15947);e.exports={configureEndpoint:function(e){for(var t,r,s,a=(r=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t=e.config.region),[[t,s=e.api.endpointPrefix],[r,s],[t,"*"],[r,"*"],["*",s],[t,"internal-*"],["*","*"]].map(function(e){return e[0]&&e[1]?e.join("/"):null})),o=e.config.useFipsEndpoint,u=e.config.useDualstackEndpoint,c=0;c<a.length;c++){var l=a[c];if(l){var d=o?u?i.dualstackFipsRules:i.fipsRules:u?i.dualstackRules:i.rules;if(Object.prototype.hasOwnProperty.call(d,l)){var h=d[l];"string"==typeof h&&(h=i.patterns[h]),e.isGlobalEndpoint=!!h.globalEndpoint,h.signingRegion&&(e.signingRegion=h.signingRegion),h.signatureVersion||(h.signatureVersion="v4");var f="bearer"===(e.api&&e.api.signatureVersion);!function(e,t){n.each(t,function(t,r){"globalEndpoint"!==t&&(void 0===e.config[t]||null===e.config[t])&&(e.config[t]=r)})}(e,Object.assign({},h,{signatureVersion:f?"bearer":h.signatureVersion}));return}}}},getEndpointSuffix:function(e){for(var t={"^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$":"amazonaws.com","^cn\\-\\w+\\-\\d+$":"amazonaws.com.cn","^us\\-gov\\-\\w+\\-\\d+$":"amazonaws.com","^us\\-iso\\-\\w+\\-\\d+$":"c2s.ic.gov","^us\\-isob\\-\\w+\\-\\d+$":"sc2s.sgov.gov","^eu\\-isoe\\-west\\-1$":"cloud.adc-e.uk","^us\\-isof\\-\\w+\\-\\d+$":"csp.hci.ic.gov"},r=Object.keys(t),n=0;n<r.length;n++){var i=RegExp(r[n]),s=t[r[n]];if(i.test(e))return s}return"amazonaws.com"}}},76492:function(e,t,r){var n=r(21169),i=r(44167),s=r(92497),a=i.util.inherit,o=i.util.domain,u=r(56325),c={success:1,error:1,complete:1},l=new s;l.setupStates=function(){var e=function(e,t){var r=this;r._haltHandlersOnError=!1,r.emit(r._asm.currentState,function(e){if(e){if(Object.prototype.hasOwnProperty.call(c,r._asm.currentState)){if(o&&r.domain instanceof o.Domain)e.domainEmitter=r,e.domain=r.domain,e.domainThrown=!1,r.domain.emit("error",e);else throw e}else r.response.error=e,t(e)}else t(r.response.error)})};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)},l.setupStates(),i.Request=a({constructor:function(e,t,r){var n=e.endpoint,a=e.config.region,u=e.config.customUserAgent;e.signingRegion?a=e.signingRegion:e.isGlobalEndpoint&&(a="us-east-1"),this.domain=o&&o.active,this.service=e,this.operation=t,this.params=r||{},this.httpRequest=new i.HttpRequest(n,a),this.httpRequest.appendToUserAgent(u),this.startTime=e.getSkewCorrectedDate(),this.response=new i.Response(this),this._asm=new s(l.states,"validate"),this._haltHandlersOnError=!1,i.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(e){return e&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",function(t){e.call(t,t.error,t.data)})),this.runTo(),this.response},build:function(e){return this.runTo("send",e)},runTo:function(e,t){return this._asm.runTo(e,t,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(e){e.error=i.util.error(Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(e){e=i.util.fn.makeAsync(e,3),this.on("complete",function t(r){e.call(r,r.error,r.data,function(n){!1!==n&&(r.hasNextPage()?r.nextPage().on("complete",t).send():e.call(r,null,null,i.util.fn.noop))})}).send()},eachItem:function(e){var t=this;this.eachPage(function(r,n){if(r)return e(r,null);if(null===n)return e(null,null);var s=t.service.paginationConfig(t.operation).resultKey;Array.isArray(s)&&(s=s[0]);var a=u.search(n,s),o=!0;return i.util.arrayEach(a,function(t){if(!1===(o=e(null,t)))return i.util.abort}),o})},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var e=i.util.stream,t=this,r=null;return 2===i.HttpClient.streamsApiVersion?(r=new e.PassThrough,n.nextTick(function(){t.send()})):((r=new e.Stream).readable=!0,r.sent=!1,r.on("newListener",function(e){r.sent||"data"!==e||(r.sent=!0,n.nextTick(function(){t.send()}))})),this.on("error",function(e){r.emit("error",e)}),this.on("httpHeaders",function(n,s,a){if(n<300){t.removeListener("httpData",i.EventListeners.Core.HTTP_DATA),t.removeListener("httpError",i.EventListeners.Core.HTTP_ERROR),t.on("httpError",function(e){a.error=e,a.error.retryable=!1});var o,u=!1;if("HEAD"!==t.httpRequest.method&&(o=parseInt(s["content-length"],10)),void 0!==o&&!isNaN(o)&&o>=0){u=!0;var c=0}var l=function(){u&&c!==o?r.emit("error",i.util.error(Error("Stream content length mismatch. Received "+c+" of "+o+" bytes."),{code:"StreamContentLengthMismatch"})):2===i.HttpClient.streamsApiVersion?r.end():r.emit("end")},d=a.httpResponse.createUnbufferedStream();if(2===i.HttpClient.streamsApiVersion){if(u){var h=new e.PassThrough;h._write=function(t){return t&&t.length&&(c+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},h.on("end",l),r.on("error",function(e){u=!1,d.unpipe(h),h.emit("end"),h.end()}),d.pipe(h).pipe(r,{end:!1})}else d.pipe(r)}else u&&d.on("data",function(e){e&&e.length&&(c+=e.length)}),d.on("data",function(e){r.emit("data",e)}),d.on("end",l);d.on("error",function(e){u=!1,r.emit("error",e)})}}),r},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),i.SequentialExecutor.prototype.emit.call(this,e,t,function(e){e&&(this.response.error=e),r.call(this,e)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),new i.Signers.Presign().sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",i.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",i.EventListeners.Core.SIGN),this},toGet:function(){return("query"===this.service.api.protocol||"ec2"===this.service.api.protocol)&&(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),i.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e(function(e,r){t.on("complete",function(t){t.error?r(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))}),t.runTo()})}},i.Request.deletePromisesFromClass=function(){delete this.prototype.promise},i.util.addPromises(i.Request),i.util.mixin(i.Request,i.SequentialExecutor)},93167:function(e,t,r){var n=r(44167),i=n.util.inherit,s=r(56325);function a(e){var t=e.request._waiter,r=t.config.acceptors,n=!1,i="retry";r.forEach(function(r){if(!n){var s=t.matchers[r.matcher];s&&s(e,r.expected,r.argument)&&(n=!0,i=r.state)}}),!n&&e.error&&(i="failure"),"success"===i?t.setSuccess(e):t.setError(e,"retry"===i)}n.ResourceWaiter=i({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){try{var n=s.search(e.data,r)}catch(e){return!1}return s.strictDeepEqual(n,t)},pathAll:function(e,t,r){try{var n=s.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);var i=n.length;if(!i)return!1;for(var a=0;a<i;a++)if(!s.strictDeepEqual(n[a],t))return!1;return!0},pathAny:function(e,t,r){try{var n=s.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);for(var i=n.length,a=0;a<i;a++)if(s.strictDeepEqual(n[a],t))return!0;return!1},status:function(e,t){var r=e.httpResponse.statusCode;return"number"==typeof r&&r===t},error:function(e,t){return"string"==typeof t&&e.error?t===e.error.code:!!e.error===t}},listeners:new n.SequentialExecutor().addNamedListeners(function(e){e("RETRY_CHECK","retry",function(e){var t=e.request._waiter;e.error&&"ResourceNotReady"===e.error.code&&(e.error.retryDelay=1e3*(t.config.delay||0))}),e("CHECK_OUTPUT","extractData",a),e("CHECK_ERROR","extractError",a)}),wait:function(e,t){"function"==typeof e&&(t=e,e=void 0),e&&e.$waiter&&("number"==typeof(e=n.util.copy(e)).$waiter.delay&&(this.config.delay=e.$waiter.delay),"number"==typeof e.$waiter.maxAttempts&&(this.config.maxAttempts=e.$waiter.maxAttempts),delete e.$waiter);var r=this.service.makeRequest(this.config.operation,e);return r._waiter=this,r.response.maxRetries=this.config.maxAttempts,r.addListeners(this.listeners),t&&r.send(t),r},setSuccess:function(e){e.error=null,e.data=e.data||{},e.request.removeAllListeners("extractData")},setError:function(e,t){e.data=null,e.error=n.util.error(e.error||Error(),{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:t})},loadWaiterConfig:function(e){if(!this.service.api.waiters[e])throw new n.util.error(Error(),{code:"StateNotFoundError",message:"State "+e+" not found."});this.config=n.util.copy(this.service.api.waiters[e])}})},53406:function(e,t,r){var n=r(44167),i=n.util.inherit,s=r(56325);n.Response=i({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new n.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,i=this.request.operation;try{t=r.paginationConfig(i,!0)}catch(e){this.error=e}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var s=n.util.copy(this.request.params);if(!this.nextPageTokens)return e?e(null,null):null;var a=t.inputToken;"string"==typeof a&&(a=[a]);for(var o=0;o<a.length;o++)s[a[o]]=this.nextPageTokens[o];return r.makeRequest(this.request.operation,s,e)},hasNextPage:function(){return this.cacheNextPageTokens(),!!this.nextPageTokens||void 0===this.nextPageTokens&&void 0},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var e=this.request.service.paginationConfig(this.request.operation);if(!e||(this.nextPageTokens=null,e.moreResults&&!s.search(this.data,e.moreResults)))return this.nextPageTokens;var t=e.outputToken;return"string"==typeof t&&(t=[t]),n.util.arrayEach.call(this,t,function(e){var t=s.search(this.data,e);t&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(t))}),this.nextPageTokens}})},37754:function(e,t,r){var n=r(44167),i=n.util.string.byteLength,s=n.util.Buffer;n.S3.ManagedUpload=n.util.inherit({constructor:function(e){var t=this;n.SequentialExecutor.call(t),t.body=null,t.sliceFn=null,t.callback=null,t.parts={},t.completeInfo=[],t.fillQueue=function(){t.callback(Error("Unsupported body payload "+typeof t.body))},t.configure(e)},configure:function(e){if(e=e||{},this.partSize=this.minPartSize,e.queueSize&&(this.queueSize=e.queueSize),e.partSize&&(this.partSize=e.partSize),e.leavePartsOnError&&(this.leavePartsOnError=!0),e.tags){if(!Array.isArray(e.tags))throw Error("Tags must be specified as an array; "+typeof e.tags+" provided.");this.tags=e.tags}if(this.partSize<this.minPartSize)throw Error("partSize must be greater than "+this.minPartSize);this.service=e.service,this.bindServiceObject(e.params),this.validateBody(),this.adjustTotalBytes()},leavePartsOnError:!1,queueSize:4,partSize:null,minPartSize:5242880,maxTotalParts:1e4,send:function(e){var t=this;t.failed=!1,t.callback=e||function(e){if(e)throw e};var r=!0;if(t.sliceFn)t.fillQueue=t.fillBuffer;else if(n.util.isNode()){var i=n.util.stream.Stream;t.body instanceof i&&(r=!1,t.fillQueue=t.fillStream,t.partBuffers=[],t.body.on("error",function(e){t.cleanup(e)}).on("readable",function(){t.fillQueue()}).on("end",function(){t.isDoneChunking=!0,t.numParts=t.totalPartNumbers,t.fillQueue.call(t),t.isDoneChunking&&t.totalPartNumbers>=1&&t.doneParts===t.numParts&&t.finishMultiPart()}))}r&&t.fillQueue.call(t)},abort:function(){!0===this.isDoneChunking&&1===this.totalPartNumbers&&this.singlePart?this.singlePart.abort():this.cleanup(n.util.error(Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1}))},validateBody:function(){if(this.body=this.service.config.params.Body,"string"==typeof this.body)this.body=n.util.buffer.toBuffer(this.body);else if(!this.body)throw Error("params.Body is required");this.sliceFn=n.util.arraySliceFn(this.body)},bindServiceObject:function(e){if(e=e||{},this.service){var t=this.service,r=n.util.copy(t.config);r.signatureVersion=t.getSignatureVersion(),this.service=new t.constructor.__super__(r),this.service.config.params=n.util.merge(this.service.config.params||{},e),Object.defineProperty(this.service,"_originalConfig",{get:function(){return t._originalConfig},enumerable:!1,configurable:!0})}else this.service=new n.S3({params:e})},adjustTotalBytes:function(){try{this.totalBytes=i(this.body)}catch(e){}if(this.totalBytes){var e=Math.ceil(this.totalBytes/this.maxTotalParts);e>this.partSize&&(this.partSize=e)}else this.totalBytes=void 0},isDoneChunking:!1,partPos:0,totalChunkedBytes:0,totalUploadedBytes:0,totalBytes:void 0,numParts:0,totalPartNumbers:0,activeParts:0,doneParts:0,parts:null,completeInfo:null,failed:!1,multipartReq:null,partBuffers:null,partBufferLength:0,fillBuffer:function(){var e=i(this.body);if(0===e){this.isDoneChunking=!0,this.numParts=1,this.nextChunk(this.body);return}for(;this.activeParts<this.queueSize&&this.partPos<e;){var t=Math.min(this.partPos+this.partSize,e),r=this.sliceFn.call(this.body,this.partPos,t);this.partPos+=this.partSize,(i(r)<this.partSize||this.partPos===e)&&(this.isDoneChunking=!0,this.numParts=this.totalPartNumbers+1),this.nextChunk(r)}},fillStream:function(){if(!(this.activeParts>=this.queueSize)){var e=this.body.read(this.partSize-this.partBufferLength)||this.body.read();if(e&&(this.partBuffers.push(e),this.partBufferLength+=e.length,this.totalChunkedBytes+=e.length),this.partBufferLength>=this.partSize){var t=1===this.partBuffers.length?this.partBuffers[0]:s.concat(this.partBuffers);if(this.partBuffers=[],this.partBufferLength=0,t.length>this.partSize){var r=t.slice(this.partSize);this.partBuffers.push(r),this.partBufferLength+=r.length,t=t.slice(0,this.partSize)}this.nextChunk(t)}this.isDoneChunking&&!this.isDoneSending&&(t=1===this.partBuffers.length?this.partBuffers[0]:s.concat(this.partBuffers),this.partBuffers=[],this.partBufferLength=0,this.totalBytes=this.totalChunkedBytes,this.isDoneSending=!0,(0===this.numParts||t.length>0)&&(this.numParts++,this.nextChunk(t))),this.body.read(0)}},nextChunk:function(e){var t=this;if(t.failed)return null;var r=++t.totalPartNumbers;if(t.isDoneChunking&&1===r){var i={Body:e};this.tags&&(i.Tagging=this.getTaggingHeader());var s=t.service.putObject(i);return s._managedUpload=t,s.on("httpUploadProgress",t.progress).send(t.finishSinglePart),t.singlePart=s,null}if(t.service.config.params.ContentMD5){var a=n.util.error(Error("The Content-MD5 you specified is invalid for multi-part uploads."),{code:"InvalidDigest",retryable:!1});return t.cleanup(a),null}if(t.completeInfo[r]&&null!==t.completeInfo[r].ETag)return null;t.activeParts++,t.service.config.params.UploadId?t.uploadPart(e,r):t.multipartReq?t.queueChunks(e,r):(t.multipartReq=t.service.createMultipartUpload(),t.multipartReq.on("success",function(e){t.service.config.params.UploadId=e.data.UploadId,t.multipartReq=null}),t.queueChunks(e,r),t.multipartReq.on("error",function(e){t.cleanup(e)}),t.multipartReq.send())},getTaggingHeader:function(){for(var e=[],t=0;t<this.tags.length;t++)e.push(n.util.uriEscape(this.tags[t].Key)+"="+n.util.uriEscape(this.tags[t].Value));return e.join("&")},uploadPart:function(e,t){var r=this,i={Body:e,ContentLength:n.util.string.byteLength(e),PartNumber:t},s={ETag:null,PartNumber:t};r.completeInfo[t]=s;var a=r.service.uploadPart(i);r.parts[t]=a,a._lastUploadedBytes=0,a._managedUpload=r,a.on("httpUploadProgress",r.progress),a.send(function(e,a){if(delete r.parts[i.PartNumber],r.activeParts--,!e&&(!a||!a.ETag)){var o="No access to ETag property on response.";n.util.isBrowser()&&(o+=" Check CORS configuration to expose ETag header."),e=n.util.error(Error(o),{code:"ETagMissing",retryable:!1})}return e?r.cleanup(e):r.completeInfo[t]&&null!==r.completeInfo[t].ETag?null:void(s.ETag=a.ETag,r.doneParts++,r.isDoneChunking&&r.doneParts===r.totalPartNumbers?r.finishMultiPart():r.fillQueue.call(r))})},queueChunks:function(e,t){var r=this;r.multipartReq.on("success",function(){r.uploadPart(e,t)})},cleanup:function(e){this.failed||("function"==typeof this.body.removeAllListeners&&"function"==typeof this.body.resume&&(this.body.removeAllListeners("readable"),this.body.removeAllListeners("end"),this.body.resume()),this.multipartReq&&(this.multipartReq.removeAllListeners("success"),this.multipartReq.removeAllListeners("error"),this.multipartReq.removeAllListeners("complete"),delete this.multipartReq),this.service.config.params.UploadId&&!this.leavePartsOnError?this.service.abortMultipartUpload().send():this.leavePartsOnError&&(this.isDoneChunking=!1),n.util.each(this.parts,function(e,t){t.removeAllListeners("complete"),t.abort()}),this.activeParts=0,this.partPos=0,this.numParts=0,this.totalPartNumbers=0,this.parts={},this.failed=!0,this.callback(e))},finishMultiPart:function(){var e=this,t={MultipartUpload:{Parts:e.completeInfo.slice(1)}};e.service.completeMultipartUpload(t,function(t,r){if(t)return e.cleanup(t);if(r&&"string"==typeof r.Location&&(r.Location=r.Location.replace(/%2F/g,"/")),Array.isArray(e.tags)){for(var n=0;n<e.tags.length;n++)e.tags[n].Value=String(e.tags[n].Value);e.service.putObjectTagging({Tagging:{TagSet:e.tags}},function(t,n){t?e.callback(t):e.callback(t,r)})}else e.callback(t,r)})},finishSinglePart:function(e,t){var r=this.request._managedUpload,n=this.request.httpRequest,i=n.endpoint;if(e)return r.callback(e);t.Location=[i.protocol,"//",i.host,n.path].join(""),t.key=this.request.params.Key,t.Key=this.request.params.Key,t.Bucket=this.request.params.Bucket,r.callback(e,t)},progress:function(e){var t=this._managedUpload;"putObject"===this.operation?(e.part=1,e.key=this.params.Key):(t.totalUploadedBytes+=e.loaded-this._lastUploadedBytes,this._lastUploadedBytes=e.loaded,e={loaded:t.totalUploadedBytes,total:t.totalBytes,part:this.params.PartNumber,key:this.params.Key}),t.emit("httpUploadProgress",[e])}}),n.util.mixin(n.S3.ManagedUpload,n.SequentialExecutor),n.S3.ManagedUpload.addPromisesToClass=function(e){this.prototype.promise=n.util.promisifyMethod("send",e)},n.S3.ManagedUpload.deletePromisesFromClass=function(){delete this.prototype.promise},n.util.addPromises(n.S3.ManagedUpload),e.exports=n.S3.ManagedUpload},75862:function(e,t,r){var n=r(44167);n.SequentialExecutor=n.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t,r){return this._events[e]?r?this._events[e].unshift(t):this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t,r){return t._isAsync=!0,this.on(e,t,r)},removeListener:function(e,t){var r=this._events[e];if(r){for(var n=r.length,i=-1,s=0;s<n;++s)r[s]===t&&(i=s);i>-1&&r.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),i=n.length;return this.callListeners(n,t,r),i>0},callListeners:function(e,t,r,i){var s=this,a=i||null;function o(i){if(i&&(a=n.util.error(a||Error(),i),s._haltHandlersOnError))return r.call(s,a);s.callListeners(e,t,r,a)}for(;e.length>0;){var u=e.shift();if(u._isAsync){u.apply(s,t.concat([o]));return}try{u.apply(s,t)}catch(e){a=n.util.error(a||Error(),e)}if(a&&s._haltHandlersOnError){r.call(s,a);return}}r.call(s,a)},addListeners:function(e){var t=this;return e._events&&(e=e._events),n.util.each(e,function(e,r){"function"==typeof r&&(r=[r]),n.util.arrayEach(r,function(r){t.on(e,r)})}),t},addNamedListener:function(e,t,r,n){return this[e]=r,this.addListener(t,r,n),this},addNamedAsyncListener:function(e,t,r,n){return r._isAsync=!0,this.addNamedListener(e,t,r,n)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,e.exports=n.SequentialExecutor},12412:function(e,t,r){var n=r(21169),i=r(44167),s=r(50962),a=r(88868),o=i.util.inherit,u=0,c=r(963);i.Service=o({constructor:function(e){if(!this.loadServiceClass)throw i.util.error(Error(),"Service must be constructed with `new' operator");if(e){if(e.region){var t=e.region;c.isFipsRegion(t)&&(e.region=c.getRealRegion(t),e.useFipsEndpoint=!0),c.isGlobalRegion(t)&&(e.region=c.getRealRegion(t))}"boolean"==typeof e.useDualstack&&"boolean"!=typeof e.useDualstackEndpoint&&(e.useDualstackEndpoint=e.useDualstack)}var r=this.loadServiceClass(e||{});if(r){var n=i.util.copy(e),s=new r(e);return Object.defineProperty(s,"_originalConfig",{get:function(){return n},enumerable:!1,configurable:!0}),s._clientId=++u,s}this.initialize(e)},initialize:function(e){var t=i.config[this.serviceIdentifier];if(this.config=new i.Config(i.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||a.configureEndpoint(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),i.SequentialExecutor.call(this),i.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||i.Service._clientSideMonitoring)&&this.publisher){var r=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",function(e){n.nextTick(function(){r.eventHandler(e)})}),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",function(e){n.nextTick(function(){r.eventHandler(e)})})}},validateService:function(){},loadServiceClass:function(e){var t=e;if(!i.util.isEmpty(this.api))return null;if(t.apiConfig)return i.Service.defineServiceApi(this.constructor,t.apiConfig);if(!this.constructor.services)return null;(t=new i.Config(i.config)).update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&i.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw Error("No services defined on "+this.constructor.serviceIdentifier);if(e?i.util.isType(e,Date)&&(e=i.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),r=null,n=t.length-1;n>=0;n--)if("*"!==t[n][t[n].length-1]&&(r=t[n]),t[n].substr(0,10)<=e)return r;throw Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"==typeof e)this.customRequestHandler=e;else throw Error("Invalid callback type '"+typeof e+"' provided in customizeRequests")}else this.customRequestHandler=null},makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var n=this.api.operations[e];n&&(t=i.util.copy(t),i.util.each(this.config.params,function(e,r){n.input.members[e]&&(void 0===t[e]||null===t[e])&&(t[e]=r)}))}var s=new i.Request(this,e,t);return this.addAllRequestListeners(s),this.attachMonitoringEmitter(s),r&&s.send(r),s},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new i.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[i.events,i.EventListeners.Core,this.serviceInterface(),i.EventListeners.CorePost],r=0;r<t.length;r++)t[r]&&e.addListeners(t[r]);this.config.paramValidation||e.removeListener("validate",i.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&e.addListeners(i.EventListeners.Logger),this.setupRequestListeners(e),"function"==typeof this.constructor.prototype.customRequestHandler&&this.constructor.prototype.customRequestHandler(e),Object.prototype.hasOwnProperty.call(this,"customRequestHandler")&&"function"==typeof this.customRequestHandler&&this.customRequestHandler(e)},apiCallEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCall",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Region:e.httpRequest.region,MaxRetriesExceeded:0,UserAgent:e.httpRequest.getUserAgent()},n=e.response;if(n.httpResponse.statusCode&&(r.FinalHttpStatusCode=n.httpResponse.statusCode),n.error){var i=n.error;n.httpResponse.statusCode>299?(i.code&&(r.FinalAwsException=i.code),i.message&&(r.FinalAwsExceptionMessage=i.message)):((i.code||i.name)&&(r.FinalSdkException=i.code||i.name),i.message&&(r.FinalSdkExceptionMessage=i.message))}return r},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},n=e.response;return n.httpResponse.statusCode&&(r.HttpStatusCode=n.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(r.AccessKey=e.service.config.credentials.accessKeyId),n.httpResponse.headers&&(e.httpRequest.headers["x-amz-security-token"]&&(r.SessionToken=e.httpRequest.headers["x-amz-security-token"]),n.httpResponse.headers["x-amzn-requestid"]&&(r.XAmznRequestId=n.httpResponse.headers["x-amzn-requestid"]),n.httpResponse.headers["x-amz-request-id"]&&(r.XAmzRequestId=n.httpResponse.headers["x-amz-request-id"]),n.httpResponse.headers["x-amz-id-2"]&&(r.XAmzId2=n.httpResponse.headers["x-amz-id-2"])),r},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),r=e.response,n=r.error;return r.httpResponse.statusCode>299?(n.code&&(t.AwsException=n.code),n.message&&(t.AwsExceptionMessage=n.message)):((n.code||n.name)&&(t.SdkException=n.code||n.name),n.message&&(t.SdkExceptionMessage=n.message)),t},attachMonitoringEmitter:function(e){var t,r,n,s,a,o,u=0,c=this;e.on("validate",function(){s=i.util.realClock.now(),o=Date.now()},!0),e.on("sign",function(){r=i.util.realClock.now(),t=Date.now(),a=e.httpRequest.region,u++},!0),e.on("validateResponse",function(){n=Math.round(i.util.realClock.now()-r)}),e.addNamedListener("API_CALL_ATTEMPT","success",function(){var r=c.apiAttemptEvent(e);r.Timestamp=t,r.AttemptLatency=n>=0?n:0,r.Region=a,c.emit("apiCallAttempt",[r])}),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",function(){var s=c.attemptFailEvent(e);s.Timestamp=t,n=n||Math.round(i.util.realClock.now()-r),s.AttemptLatency=n>=0?n:0,s.Region=a,c.emit("apiCallAttempt",[s])}),e.addNamedListener("API_CALL","complete",function(){var t=c.apiCallEvent(e);if(t.AttemptCount=u,!(t.AttemptCount<=0)){t.Timestamp=o;var r=Math.round(i.util.realClock.now()-s);t.Latency=r>=0?r:0;var n=e.response;n.error&&n.error.retryable&&"number"==typeof n.retryCount&&"number"==typeof n.maxRetries&&n.retryCount>=n.maxRetries&&(t.MaxRetriesExceeded=1),c.emit("apiCall",[t])}})},setupRequestListeners:function(e){},getSigningName:function(){return this.api.signingName||this.api.endpointPrefix},getSignerClass:function(e){var t,r=null,n="";return e&&(n=(r=(e.service.api.operations||{})[e.operation]||null)?r.authtype:""),t=this.config.signatureVersion?this.config.signatureVersion:"v4"===n||"v4-unsigned-body"===n?"v4":"bearer"===n?"bearer":this.api.signatureVersion,i.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return i.EventListeners.Query;case"json":return i.EventListeners.Json;case"rest-json":return i.EventListeners.RestJson;case"rest-xml":return i.EventListeners.RestXml}if(this.api.protocol)throw Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e,t){return i.util.calculateRetryDelay(e,this.config.retryDelayOptions,t)},retryableError:function(e){return!!(this.timeoutError(e)||this.networkingError(e)||this.expiredCredentialsError(e)||this.throttledError(e))||e.statusCode>=500},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e5},throttledError:function(e){if(429===e.statusCode)return!0;switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new i.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var n=Error();throw i.util.error(n,"No pagination configuration for "+e)}return null}return r}}),i.util.update(i.Service,{defineMethods:function(e){i.util.each(e.prototype.api.operations,function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,r){return this.makeUnauthenticatedRequest(t,e,r)}:e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)})})},defineService:function(e,t,r){i.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var n=o(i.Service,r||{});if("string"==typeof e){i.Service.addVersions(n,t);var s=n.serviceIdentifier||e;n.serviceIdentifier=s}else n.prototype.api=e,i.Service.defineMethods(n);if(i.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&i.util.clientSideMonitoring){var a=i.util.clientSideMonitoring.Publisher,u=(0,i.util.clientSideMonitoring.configProvider)();this.prototype.publisher=new a(u),u.enabled&&(i.Service._clientSideMonitoring=!0)}return i.SequentialExecutor.call(n.prototype),i.Service.addDefaultMonitoringListeners(n.prototype),n},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r<t.length;r++)void 0===e.services[t[r]]&&(e.services[t[r]]=null);e.apiVersions=Object.keys(e.services).sort()},defineServiceApi:function(e,t,r){var n=o(e,{serviceIdentifier:e.serviceIdentifier});function a(t){t.isApi?n.prototype.api=t:n.prototype.api=new s(t,{serviceIdentifier:e.serviceIdentifier})}if("string"==typeof t){if(r)a(r);else try{a(i.apiLoader(e.serviceIdentifier,t))}catch(r){throw i.util.error(r,{message:"Could not find API configuration "+e.serviceIdentifier+"-"+t})}Object.prototype.hasOwnProperty.call(e.services,t)||(e.apiVersions=e.apiVersions.concat(t).sort()),e.services[t]=n}else a(t);return i.Service.defineMethods(n),n},hasService:function(e){return Object.prototype.hasOwnProperty.call(i.Service._serviceMap,e)},addDefaultMonitoringListeners:function(e){e.addNamedListener("MONITOR_EVENTS_BUBBLE","apiCallAttempt",function(t){var r=Object.getPrototypeOf(e);r._events&&r.emit("apiCallAttempt",[t])}),e.addNamedListener("CALL_EVENTS_BUBBLE","apiCall",function(t){var r=Object.getPrototypeOf(e);r._events&&r.emit("apiCall",[t])})},_serviceMap:{}}),i.util.mixin(i.Service,i.SequentialExecutor),e.exports=i.Service},17763:function(e,t,r){var n=r(44167),i=r(41136),s=r(9215),a=r(70497),o=r(88868);r(37754);var u={completeMultipartUpload:!0,copyObject:!0,uploadPartCopy:!0},c=["AuthorizationHeaderMalformed","BadRequest","PermanentRedirect",301],l="s3-object-lambda";n.util.update(n.S3.prototype,{getSignatureVersion:function(e){var t=this.api.signatureVersion,r=this._originalConfig?this._originalConfig.signatureVersion:null,n=this.config.signatureVersion,i=!!e&&e.isPresigned();return r?r="v2"===r?"s3":r:(!0!==i?t="v4":n&&(t=n),t)},getSigningName:function(e){if(e&&"writeGetObjectResponse"===e.operation)return l;var t=n.Service.prototype.getSigningName;return e&&e._parsedArn&&e._parsedArn.service?e._parsedArn.service:t.call(this)},getSignerClass:function(e){var t=this.getSignatureVersion(e);return n.Signers.RequestSigner.getVersion(t)},validateService:function(){var e,t=[];if(this.config.region||(this.config.region="us-east-1"),!this.config.endpoint&&this.config.s3BucketEndpoint&&t.push("An endpoint must be provided when configuring `s3BucketEndpoint` to true."),1===t.length?e=t[0]:t.length>1&&(e="Multiple configuration errors:\n"+t.join("\n")),e)throw n.util.error(Error(),{name:"InvalidEndpoint",message:e})},shouldDisableBodySigning:function(e){var t=this.getSignerClass();return!0===this.config.s3DisableBodySigning&&t===n.Signers.V4&&"https:"===e.httpRequest.endpoint.protocol},setupRequestListeners:function(e){if(e.addListener("validateResponse",this.setExpiresString),e.addListener("validate",this.validateScheme),e.addListener("validate",this.validateBucketName,!0),e.addListener("validate",this.optInUsEast1RegionalEndpoint,!0),e.removeListener("validate",n.EventListeners.Core.VALIDATE_REGION),e.addListener("build",this.addContentType),e.addListener("build",this.computeContentMd5),e.addListener("build",this.computeSseCustomerKeyMd5),e.addListener("build",this.populateURI),e.addListener("afterBuild",this.addExpect100Continue),e.addListener("extractError",this.extractError),e.addListener("extractData",n.util.hoistPayloadMember),e.addListener("extractData",this.extractData),e.addListener("extractData",this.extractErrorFrom200Response),e.addListener("beforePresign",this.prepareSignedUrl),this.shouldDisableBodySigning(e)&&(e.removeListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256),e.addListener("afterBuild",this.disableBodySigning)),"createBucket"!==e.operation&&a.isArnInParam(e,"Bucket")){e._parsedArn=n.util.ARN.parse(e.params.Bucket),e.removeListener("validate",this.validateBucketName),e.removeListener("build",this.populateURI),"s3"===e._parsedArn.service?(e.addListener("validate",a.validateS3AccessPointArn),e.addListener("validate",this.validateArnResourceType),e.addListener("validate",this.validateArnRegion)):"s3-outposts"===e._parsedArn.service&&(e.addListener("validate",a.validateOutpostsAccessPointArn),e.addListener("validate",a.validateOutpostsArn),e.addListener("validate",a.validateArnRegion)),e.addListener("validate",a.validateArnAccount),e.addListener("validate",a.validateArnService),e.addListener("build",this.populateUriFromAccessPointArn),e.addListener("build",a.validatePopulateUriFromArn);return}e.addListener("validate",this.validateBucketEndpoint),e.addListener("validate",this.correctBucketRegionFromCache),e.onAsync("extractError",this.requestBucketRegion),n.util.isBrowser()&&e.onAsync("retry",this.reqRegionForNetworkingError)},validateScheme:function(e){var t=e.params,r=e.httpRequest.endpoint.protocol;if((t.SSECustomerKey||t.CopySourceSSECustomerKey)&&"https:"!==r)throw n.util.error(Error(),{code:"ConfigError",message:"Cannot send SSE keys over HTTP. Set 'sslEnabled'to 'true' in your configuration"})},validateBucketEndpoint:function(e){if(!e.params.Bucket&&e.service.config.s3BucketEndpoint)throw n.util.error(Error(),{code:"ConfigError",message:"Cannot send requests to root API with `s3BucketEndpoint` set."})},validateArnRegion:function(e){a.validateArnRegion(e,{allowFipsEndpoint:!0})},validateArnResourceType:function(e){var t=e._parsedArn.resource;if(0!==t.indexOf("accesspoint:")&&0!==t.indexOf("accesspoint/"))throw n.util.error(Error(),{code:"InvalidARN",message:"ARN resource should begin with 'accesspoint/'"})},validateBucketName:function(e){var t=e.service.getSignatureVersion(e),r=e.params&&e.params.Bucket,i=e.params&&e.params.Key,s=r&&r.indexOf("/");if(r&&s>=0){if("string"==typeof i&&s>0){e.params=n.util.copy(e.params);var a=r.substr(s+1)||"";e.params.Key=a+"/"+i,e.params.Bucket=r.substr(0,s)}else if("v4"===t)throw n.util.error(Error(),{code:"InvalidBucket",message:"Bucket names cannot contain forward slashes. Bucket: "+r})}},isValidAccelerateOperation:function(e){return -1===["createBucket","deleteBucket","listBuckets"].indexOf(e)},optInUsEast1RegionalEndpoint:function(e){var t=e.service,r=t.config;if(r.s3UsEast1RegionalEndpoint=s(t._originalConfig,{env:"AWS_S3_US_EAST_1_REGIONAL_ENDPOINT",sharedConfig:"s3_us_east_1_regional_endpoint",clientConfig:"s3UsEast1RegionalEndpoint"}),!(t._originalConfig||{}).endpoint&&"us-east-1"===e.httpRequest.region&&"regional"===r.s3UsEast1RegionalEndpoint&&e.httpRequest.endpoint.hostname.indexOf("s3.amazonaws.com")>=0){var n=r.endpoint.indexOf(".amazonaws.com"),i=r.endpoint.substring(0,n)+".us-east-1"+r.endpoint.substring(n);e.httpRequest.updateEndpoint(i)}},populateURI:function(e){var t=e.httpRequest,r=e.params.Bucket,n=e.service,i=t.endpoint;if(r&&!n.pathStyleBucketName(r)){n.config.useAccelerateEndpoint&&n.isValidAccelerateOperation(e.operation)?n.config.useDualstackEndpoint?i.hostname=r+".s3-accelerate.dualstack.amazonaws.com":i.hostname=r+".s3-accelerate.amazonaws.com":n.config.s3BucketEndpoint||(i.hostname=r+"."+i.hostname);var s=i.port;80!==s&&443!==s?i.host=i.hostname+":"+i.port:i.host=i.hostname,t.virtualHostedBucket=r,n.removeVirtualHostedBucketFromPath(e)}},removeVirtualHostedBucketFromPath:function(e){var t=e.httpRequest,r=t.virtualHostedBucket;if(r&&t.path){if(e.params&&e.params.Key){var i="/"+n.util.uriEscapePath(e.params.Key);if(0===t.path.indexOf(i)&&(t.path.length===i.length||"?"===t.path[i.length]))return}t.path=t.path.replace(RegExp("/"+r),""),"/"!==t.path[0]&&(t.path="/"+t.path)}},populateUriFromAccessPointArn:function(e){var t=e._parsedArn,r="s3-outposts"===t.service,i="s3-object-lambda"===t.service,s=r?"."+t.outpostId:"",a=r?"s3-outposts":"s3-accesspoint",u=!r&&e.service.config.useFipsEndpoint?"-fips":"",c=!r&&e.service.config.useDualstackEndpoint?".dualstack":"",l=e.httpRequest.endpoint,d=o.getEndpointSuffix(t.region),h=e.service.config.s3UseArnRegion;if(l.hostname=[t.accessPoint+"-"+t.accountId+s,a+u+c,h?t.region:e.service.config.region,d].join("."),i){var a="s3-object-lambda",f=t.resource.split("/")[1],u=e.service.config.useFipsEndpoint?"-fips":"";l.hostname=[f+"-"+t.accountId,a+u,h?t.region:e.service.config.region,d].join(".")}l.host=l.hostname;var p=n.util.uriEscape(e.params.Bucket),m=e.httpRequest.path;e.httpRequest.path=m.replace(RegExp("/"+p),""),"/"!==e.httpRequest.path[0]&&(e.httpRequest.path="/"+e.httpRequest.path),e.httpRequest.region=t.region},addExpect100Continue:function(e){var t=e.httpRequest.headers["Content-Length"];n.util.isNode()&&(t>=1048576||e.params.Body instanceof n.util.stream.Stream)&&(e.httpRequest.headers.Expect="100-continue")},addContentType:function(e){var t=e.httpRequest;if("GET"===t.method||"HEAD"===t.method){delete t.headers["Content-Type"];return}t.headers["Content-Type"]||(t.headers["Content-Type"]="application/octet-stream");var r=t.headers["Content-Type"];n.util.isBrowser()&&("string"!=typeof t.body||r.match(/;\s*charset=/)?t.headers["Content-Type"]=r.replace(/(;\s*charset=)(.+)$/,function(e,t,r){return t+r.toUpperCase()}):t.headers["Content-Type"]+="; charset=UTF-8")},willComputeChecksums:function(e){var t=e.service.api.operations[e.operation].input.members,r=e.httpRequest.body,i=e.service.config.computeChecksums&&t.ContentMD5&&!e.params.ContentMD5&&r&&(n.util.Buffer.isBuffer(e.httpRequest.body)||"string"==typeof e.httpRequest.body);return!!(i&&e.service.shouldDisableBodySigning(e)&&!e.isPresigned()||i&&"s3"===this.getSignatureVersion(e)&&e.isPresigned())},computeContentMd5:function(e){if(e.service.willComputeChecksums(e)){var t=n.util.crypto.md5(e.httpRequest.body,"base64");e.httpRequest.headers["Content-MD5"]=t}},computeSseCustomerKeyMd5:function(e){n.util.each({SSECustomerKey:"x-amz-server-side-encryption-customer-key-MD5",CopySourceSSECustomerKey:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},function(t,r){if(e.params[t]){var i=n.util.crypto.md5(e.params[t],"base64");e.httpRequest.headers[r]=i}})},pathStyleBucketName:function(e){return!!this.config.s3ForcePathStyle||!this.config.s3BucketEndpoint&&(!a.dnsCompatibleBucketName(e)||!!(this.config.sslEnabled&&e.match(/\./)))},extractErrorFrom200Response:function(e){var t=this.service?this.service:this;if(t.is200Error(e)||u[e.request.operation]){var r=e.httpResponse,i=r.body&&r.body.toString()||"";if(i&&i.indexOf("</Error>")===i.length-8)throw e.data=null,t.extractError(e),e.error.is200Error=!0,e.error;if(!r.body||!i.match(/<[\w_]/))throw e.data=null,n.util.error(Error(),{code:"InternalError",message:"S3 aborted request"})}},is200Error:function(e){if(200!==(e&&e.httpResponse&&e.httpResponse.statusCode))return!1;try{for(var t=e.request,r=t.service.api.operations[t.operation].output.members,n=Object.keys(r),i=0;i<n.length;++i){var s=r[n[i]];if("binary"===s.type&&s.isStreaming)return!1}var a=e.httpResponse.body;if(a&&void 0!==a.byteLength&&(a.byteLength<15||a.byteLength>3e3)||!a)return!1;var o=a.toString();if(o.indexOf("</Error>")===o.length-8)return!0}catch(e){}return!1},retryableError:function(e,t){return!!e.is200Error||!!u[t.operation]&&200===e.statusCode||(!t._requestRegionForBucket||!t.service.bucketRegionCache[t._requestRegionForBucket])&&(!!e&&"RequestTimeout"===e.code||(e&&-1!=c.indexOf(e.code)&&e.region&&e.region!=t.httpRequest.region?(t.httpRequest.region=e.region,301===e.statusCode&&t.service.updateReqBucketRegion(t),!0):n.Service.prototype.retryableError.call(this,e,t)))},updateReqBucketRegion:function(e,t){var r=e.httpRequest;if("string"==typeof t&&t.length&&(r.region=t),r.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)){var i=e.service,s=i.config,a=s.s3BucketEndpoint;a&&delete s.s3BucketEndpoint;var o=n.util.copy(s);delete o.endpoint,o.region=r.region,r.endpoint=new n.S3(o).endpoint,i.populateURI(e),s.s3BucketEndpoint=a,r.headers.Host=r.endpoint.host,"validate"===e._asm.currentState&&(e.removeListener("build",i.populateURI),e.addListener("build",i.removeVirtualHostedBucketFromPath))}},extractData:function(e){var t=e.request;if("getBucketLocation"===t.operation){var r=e.httpResponse.body.toString().match(/>(.+)<\/Location/);delete e.data._,r?e.data.LocationConstraint=r[1]:e.data.LocationConstraint=""}var n=t.params.Bucket||null;if("deleteBucket"!==t.operation||"string"!=typeof n||e.error){var i=(e.httpResponse.headers||{})["x-amz-bucket-region"]||null;if(!i&&"createBucket"===t.operation&&!e.error){var s=t.params.CreateBucketConfiguration;i=s?"EU"===s.LocationConstraint?"eu-west-1":s.LocationConstraint:"us-east-1"}i&&n&&i!==t.service.bucketRegionCache[n]&&(t.service.bucketRegionCache[n]=i)}else t.service.clearBucketRegionCache(n);t.service.extractRequestIds(e)},extractError:function(e){var t,r={304:"NotModified",403:"Forbidden",400:"BadRequest",404:"NotFound"},i=e.request,s=e.httpResponse.statusCode,a=e.httpResponse.body||"",o=(e.httpResponse.headers||{})["x-amz-bucket-region"]||null,u=i.params.Bucket||null,c=i.service.bucketRegionCache;if(o&&u&&o!==c[u]&&(c[u]=o),r[s]&&0===a.length)u&&!o&&(t=c[u]||null)!==i.httpRequest.region&&(o=t),e.error=n.util.error(Error(),{code:r[s],message:null,region:o});else{var l=new n.XML.Parser().parse(a.toString());l.Region&&!o?(o=l.Region,u&&o!==c[u]&&(c[u]=o)):!u||o||l.Region||(t=c[u]||null)===i.httpRequest.region||(o=t),e.error=n.util.error(Error(),{code:l.Code||s,message:l.Message||null,region:o})}i.service.extractRequestIds(e)},requestBucketRegion:function(e,t){var r=e.error,i=e.request,s=i.params.Bucket||null;if(!r||!s||r.region||"listObjects"===i.operation||n.util.isNode()&&"headBucket"===i.operation||400===r.statusCode&&"headObject"!==i.operation||-1===c.indexOf(r.code))return t();var a=n.util.isNode()?"headBucket":"listObjects",o={Bucket:s};"listObjects"===a&&(o.MaxKeys=0);var u=i.service[a](o);u._requestRegionForBucket=s,u.send(function(){var e=i.service.bucketRegionCache[s]||null;r.region=e,t()})},reqRegionForNetworkingError:function(e,t){if(!n.util.isBrowser())return t();var r=e.error,i=e.request,s=i.params.Bucket;if(!r||"NetworkingError"!==r.code||!s||"us-east-1"===i.httpRequest.region)return t();var o=i.service,u=o.bucketRegionCache,c=u[s]||null;if(c&&c!==i.httpRequest.region)o.updateReqBucketRegion(i,c),t();else if(a.dnsCompatibleBucketName(s)){if(i.httpRequest.virtualHostedBucket){var l=o.listObjects({Bucket:s,MaxKeys:0});o.updateReqBucketRegion(l,"us-east-1"),l._requestRegionForBucket=s,l.send(function(){var e=o.bucketRegionCache[s]||null;e&&e!==i.httpRequest.region&&o.updateReqBucketRegion(i,e),t()})}else t()}else o.updateReqBucketRegion(i,"us-east-1"),"us-east-1"!==u[s]&&(u[s]="us-east-1"),t()},bucketRegionCache:{},clearBucketRegionCache:function(e){var t=this.bucketRegionCache;e?"string"==typeof e&&(e=[e]):e=Object.keys(t);for(var r=0;r<e.length;r++)delete t[e[r]];return t},correctBucketRegionFromCache:function(e){var t=e.params.Bucket||null;if(t){var r=e.service,n=e.httpRequest.region,i=r.bucketRegionCache[t];i&&i!==n&&r.updateReqBucketRegion(e,i)}},extractRequestIds:function(e){var t=e.httpResponse.headers?e.httpResponse.headers["x-amz-id-2"]:null,r=e.httpResponse.headers?e.httpResponse.headers["x-amz-cf-id"]:null;e.extendedRequestId=t,e.cfId=r,e.error&&(e.error.requestId=e.requestId||null,e.error.extendedRequestId=t,e.error.cfId=r)},getSignedUrl:function(e,t,r){var i=(t=n.util.copy(t||{})).Expires||900;if("number"!=typeof i)throw n.util.error(Error(),{code:"InvalidParameterException",message:"The expiration must be a number, received "+typeof i});delete t.Expires;var s=this.makeRequest(e,t);if(!r)return s.presign(i,r);n.util.defer(function(){s.presign(i,r)})},createPresignedPost:function(e,t){"function"==typeof e&&void 0===t&&(t=e,e=null),e=n.util.copy(e||{});var r=this.config.params||{},i=e.Bucket||r.Bucket,s=this,a=this.config,o=n.util.copy(this.endpoint);function u(){return{url:n.util.urlFormat(o),fields:s.preparePostFields(a.credentials,a.region,i,e.Fields,e.Conditions,e.Expires)}}if(a.s3BucketEndpoint||(o.pathname="/"+i),!t)return u();a.getCredentials(function(e){if(e)t(e);else try{t(null,u())}catch(e){t(e)}})},preparePostFields:function(e,t,r,s,a,o){var u=this.getSkewCorrectedDate();if(!e||!t||!r)throw Error("Unable to create a POST object policy without a bucket, region, and credentials");s=n.util.copy(s||{}),a=(a||[]).slice(0),o=o||3600;var c=n.util.date.iso8601(u).replace(/[:\-]|\.\d{3}/g,""),l=c.substr(0,8),d=i.createScope(l,t,"s3"),h=e.accessKeyId+"/"+d;for(var f in s.bucket=r,s["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",s["X-Amz-Credential"]=h,s["X-Amz-Date"]=c,e.sessionToken&&(s["X-Amz-Security-Token"]=e.sessionToken),s)if(s.hasOwnProperty(f)){var p={};p[f]=s[f],a.push(p)}return s.Policy=this.preparePostPolicy(new Date(u.valueOf()+1e3*o),a),s["X-Amz-Signature"]=n.util.crypto.hmac(i.getSigningKey(e,l,t,"s3",!0),s.Policy,"hex"),s},preparePostPolicy:function(e,t){return n.util.base64.encode(JSON.stringify({expiration:n.util.date.iso8601(e),conditions:t}))},prepareSignedUrl:function(e){e.addListener("validate",e.service.noPresignedContentLength),e.removeListener("build",e.service.addContentType),e.params.Body?e.addListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256):e.removeListener("build",e.service.computeContentMd5)},disableBodySigning:function(e){var t=e.httpRequest.headers;Object.prototype.hasOwnProperty.call(t,"presigned-expires")||(t["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD")},noPresignedContentLength:function(e){if(void 0!==e.params.ContentLength)throw n.util.error(Error(),{code:"UnexpectedParameter",message:"ContentLength is not supported in pre-signed URLs."})},createBucket:function(e,t){"function"!=typeof e&&e||(t=t||e,e={});var r=this.endpoint.hostname,i=n.util.copy(e);return"us-east-1"===this.config.region||r===this.api.globalEndpoint||e.CreateBucketConfiguration||(i.CreateBucketConfiguration={LocationConstraint:this.config.region}),this.makeRequest("createBucket",i,t)},writeGetObjectResponse:function(e,t){var r=this.makeRequest("writeGetObjectResponse",n.util.copy(e),t),i=this.endpoint.hostname;return i=-1!==i.indexOf(this.config.region)?i.replace("s3.",l+"."):i.replace("s3.",l+"."+this.config.region+"."),r.httpRequest.endpoint=new n.Endpoint(i,this.config),r},upload:function(e,t,r){"function"==typeof t&&void 0===r&&(r=t,t=null),t=t||{},t=n.util.merge(t||{},{service:this,params:e});var i=new n.S3.ManagedUpload(t);return"function"==typeof r&&i.send(r),i},setExpiresString:function(e){e&&e.httpResponse&&e.httpResponse.headers&&"expires"in e.httpResponse.headers&&(e.httpResponse.headers.expiresstring=e.httpResponse.headers.expires);try{e&&e.httpResponse&&e.httpResponse.headers&&"expires"in e.httpResponse.headers&&n.util.date.parseTimestamp(e.httpResponse.headers.expires)}catch(t){console.log("AWS SDK","(warning)",t),delete e.httpResponse.headers.expires}}}),n.S3.addPromisesToClass=function(e){this.prototype.getSignedUrlPromise=n.util.promisifyMethod("getSignedUrl",e)},n.S3.deletePromisesFromClass=function(){delete this.prototype.getSignedUrlPromise},n.util.addPromises(n.S3)},70497:function(e,t,r){var n=r(21169),i=r(44167),s=r(88868),a={isArnInParam:function(e,t){var r=((e.service.api.operations[e.operation]||{}).input||{}).members||{};return!!e.params[t]&&!!r[t]&&i.util.ARN.validate(e.params[t])},validateArnService:function(e){var t=e._parsedArn;if("s3"!==t.service&&"s3-outposts"!==t.service&&"s3-object-lambda"!==t.service)throw i.util.error(Error(),{code:"InvalidARN",message:"expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component"})},validateArnAccount:function(e){var t=e._parsedArn;if(!/[0-9]{12}/.exec(t.accountId))throw i.util.error(Error(),{code:"InvalidARN",message:'ARN accountID does not match regex "[0-9]{12}"'})},validateS3AccessPointArn:function(e){var t=e._parsedArn,r=t.resource[11];if(2!==t.resource.split(r).length)throw i.util.error(Error(),{code:"InvalidARN",message:"Access Point ARN should have one resource accesspoint/{accesspointName}"});var n=t.resource.split(r)[1],s=n+"-"+t.accountId;if(!a.dnsCompatibleBucketName(s)||s.match(/\./))throw i.util.error(Error(),{code:"InvalidARN",message:"Access point resource in ARN is not DNS compatible. Got "+n});e._parsedArn.accessPoint=n},validateOutpostsArn:function(e){var t=e._parsedArn;if(0!==t.resource.indexOf("outpost:")&&0!==t.resource.indexOf("outpost/"))throw i.util.error(Error(),{code:"InvalidARN",message:"ARN resource should begin with 'outpost/'"});var r=t.resource[7],n=t.resource.split(r)[1];if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw i.util.error(Error(),{code:"InvalidARN",message:"Outpost resource in ARN is not DNS compatible. Got "+n});e._parsedArn.outpostId=n},validateOutpostsAccessPointArn:function(e){var t=e._parsedArn,r=t.resource[7];if(4!==t.resource.split(r).length)throw i.util.error(Error(),{code:"InvalidARN",message:"Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}"});var n=t.resource.split(r)[3],s=n+"-"+t.accountId;if(!a.dnsCompatibleBucketName(s)||s.match(/\./))throw i.util.error(Error(),{code:"InvalidARN",message:"Access point resource in ARN is not DNS compatible. Got "+n});e._parsedArn.accessPoint=n},validateArnRegion:function(e,t){void 0===t&&(t={});var r=a.loadUseArnRegionConfig(e),n=e._parsedArn.region,o=e.service.config.region,u=e.service.config.useFipsEndpoint,c=t.allowFipsEndpoint||!1;if(!n){var l="ARN region is empty";throw"s3"===e._parsedArn.service&&(l+="\nYou may want to use multi-regional ARN. The feature is not supported in current SDK. You should consider switching to V3(https://github.com/aws/aws-sdk-js-v3)."),i.util.error(Error(),{code:"InvalidARN",message:l})}if(u&&!c)throw i.util.error(Error(),{code:"InvalidConfiguration",message:"ARN endpoint is not compatible with FIPS region"});if(n.indexOf("fips")>=0)throw i.util.error(Error(),{code:"InvalidConfiguration",message:"FIPS region not allowed in ARN"});if(r||n===o){if(r&&s.getEndpointSuffix(n)!==s.getEndpointSuffix(o))throw i.util.error(Error(),{code:"InvalidConfiguration",message:"Configured region and access point region not in same partition"})}else throw i.util.error(Error(),{code:"InvalidConfiguration",message:"Configured region conflicts with access point region"});if(e.service.config.useAccelerateEndpoint)throw i.util.error(Error(),{code:"InvalidConfiguration",message:"useAccelerateEndpoint config is not supported with access point ARN"});if("s3-outposts"===e._parsedArn.service&&e.service.config.useDualstackEndpoint)throw i.util.error(Error(),{code:"InvalidConfiguration",message:"Dualstack is not supported with outposts access point ARN"})},loadUseArnRegionConfig:function(e){var t="AWS_S3_USE_ARN_REGION",r="s3_use_arn_region",s=!0,a=e.service._originalConfig||{};if(void 0!==e.service.config.s3UseArnRegion)return e.service.config.s3UseArnRegion;if(void 0!==a.s3UseArnRegion)s=!0===a.s3UseArnRegion;else if(i.util.isNode()){if(n.env[t]){var o=n.env[t].trim().toLowerCase();if(0>["false","true"].indexOf(o))throw i.util.error(Error(),{code:"InvalidConfiguration",message:t+" only accepts true or false. Got "+n.env[t],retryable:!1});s="true"===o}else{var u={};try{u=i.util.getProfilesFromSharedConfig(i.util.iniLoader)[n.env.AWS_PROFILE||i.util.defaultProfile]}catch(e){}if(u[r]){if(0>["false","true"].indexOf(u[r].trim().toLowerCase()))throw i.util.error(Error(),{code:"InvalidConfiguration",message:r+" only accepts true or false. Got "+u[r],retryable:!1});s="true"===u[r].trim().toLowerCase()}}}return e.service.config.s3UseArnRegion=s,s},validatePopulateUriFromArn:function(e){if(e.service._originalConfig&&e.service._originalConfig.endpoint)throw i.util.error(Error(),{code:"InvalidConfiguration",message:"Custom endpoint is not compatible with access point ARN"});if(e.service.config.s3ForcePathStyle)throw i.util.error(Error(),{code:"InvalidConfiguration",message:"Cannot construct path-style endpoint with access point"})},dnsCompatibleBucketName:function(e){var t=new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/),r=new RegExp(/(\d+\.){3}\d+/),n=new RegExp(/\.\./);return!(!e.match(t)||e.match(r)||e.match(n))}};e.exports=a},68808:function(e,t,r){var n=r(44167),i=r(9215);n.util.update(n.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new n.TemporaryCredentials),t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretAccessKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration,t):null},assumeRoleWithWebIdentity:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,t)},assumeRoleWithSAML:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,t)},setupRequestListeners:function(e){e.addListener("validate",this.optInRegionalEndpoint,!0)},optInRegionalEndpoint:function(e){var t=e.service,r=t.config;if(r.stsRegionalEndpoints=i(t._originalConfig,{env:"AWS_STS_REGIONAL_ENDPOINTS",sharedConfig:"sts_regional_endpoints",clientConfig:"stsRegionalEndpoints"}),"regional"===r.stsRegionalEndpoints&&t.isGlobalEndpoint){if(!r.region)throw n.util.error(Error(),{code:"ConfigError",message:"Missing region in config"});var s=r.endpoint.indexOf(".amazonaws.com"),a=r.endpoint.substring(0,s)+"."+r.region+r.endpoint.substring(s);e.httpRequest.updateEndpoint(a),e.httpRequest.region=r.region}}})},66749:function(e,t,r){var n=r(44167);n.Signers.Bearer=n.util.inherit(n.Signers.RequestSigner,{constructor:function(e){n.Signers.RequestSigner.call(this,e)},addAuthorization:function(e){this.request.headers.Authorization="Bearer "+e.token}})},53070:function(e,t,r){var n=r(44167),i=n.util.inherit,s="presigned-expires";function a(e){var t=e.httpRequest.headers[s],r=e.service.getSignerClass(e);if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Amz-User-Agent"],r===n.Signers.V4){if(t>604800)throw n.util.error(Error(),{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1});e.httpRequest.headers[s]=t}else if(r===n.Signers.S3){var i=e.service?e.service.getSkewCorrectedDate():n.util.date.getDate();e.httpRequest.headers[s]=parseInt(n.util.date.unixTimestamp(i)+t,10).toString()}else throw n.util.error(Error(),{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1})}function o(e){var t=e.httpRequest.endpoint,r=n.util.urlParse(e.httpRequest.path),i={};r.search&&(i=n.util.queryStringParse(r.search.substr(1)));var a=e.httpRequest.headers.Authorization.split(" ");if("AWS"===a[0])a=a[1].split(":"),i.Signature=a.pop(),i.AWSAccessKeyId=a.join(":"),n.util.each(e.httpRequest.headers,function(e,t){e===s&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete i[e],e=e.toLowerCase()),i[e]=t}),delete e.httpRequest.headers[s],delete i.Authorization,delete i.Host;else if("AWS4-HMAC-SHA256"===a[0]){a.shift();var o=a.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];i["X-Amz-Signature"]=o,delete i.Expires}t.pathname=r.pathname,t.search=n.util.queryParamsToString(i)}n.Signers.Presign=i({sign:function(e,t,r){if(e.httpRequest.headers[s]=t||3600,e.on("build",a),e.on("sign",o),e.removeListener("afterBuild",n.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),r)e.build(function(){this.response.error?r(this.response.error):r(null,n.util.urlFormat(e.httpRequest.endpoint))});else{if(e.build(),e.response.error)throw e.response.error;return n.util.urlFormat(e.httpRequest.endpoint)}}}),e.exports=n.Signers.Presign},40464:function(e,t,r){var n=r(44167),i=n.util.inherit;n.Signers.RequestSigner=i({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),n.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return n.Signers.V2;case"v3":return n.Signers.V3;case"s3v4":case"v4":return n.Signers.V4;case"s3":return n.Signers.S3;case"v3https":return n.Signers.V3Https;case"bearer":return n.Signers.Bearer}throw Error("Unknown signing version "+e)},r(63665),r(92136),r(53446),r(36332),r(50902),r(53070),r(66749)},50902:function(e,t,r){var n=r(44167),i=n.util.inherit;n.Signers.S3=i(n.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=n.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),i="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=i},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];n.util.each(this.request.headers,function(t){t.match(/^x-amz-/i)&&e.push(t)}),e.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:1});var t=[];return n.util.arrayEach.call(this,e,function(e){t.push(e.toLowerCase()+":"+String(this.request.headers[e]))}),t.join("\n")},canonicalizedResource:function(){var e=this.request,t=e.path.split("?"),r=t[0],i=t[1],s="";if(e.virtualHostedBucket&&(s+="/"+e.virtualHostedBucket),s+=r,i){var a=[];n.util.arrayEach.call(this,i.split("&"),function(e){var t=e.split("=")[0],r=e.split("=")[1];if(this.subResources[t]||this.responseHeaders[t]){var n={name:t};void 0!==r&&(this.subResources[t]?n.value=r:n.value=decodeURIComponent(r)),a.push(n)}}),a.sort(function(e,t){return e.name<t.name?-1:1}),a.length&&(i=[],n.util.arrayEach(a,function(e){void 0===e.value?i.push(e.name):i.push(e.name+"="+e.value)}),s+="?"+i.join("&"))}return s},sign:function(e,t){return n.util.crypto.hmac(e,t,"base64","sha1")}}),e.exports=n.Signers.S3},63665:function(e,t,r){var n=r(44167),i=n.util.inherit;n.Signers.V2=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){t||(t=n.util.date.getDate());var r=this.request;r.params.Timestamp=n.util.date.iso8601(t),r.params.SignatureVersion="2",r.params.SignatureMethod="HmacSHA256",r.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(r.params.SecurityToken=e.sessionToken),delete r.params.Signature,r.params.Signature=this.signature(e),r.body=n.util.queryParamsToString(r.params),r.headers["Content-Length"]=r.body.length},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push(this.request.endpoint.host.toLowerCase()),e.push(this.request.pathname()),e.push(n.util.queryParamsToString(this.request.params)),e.join("\n")}}),e.exports=n.Signers.V2},92136:function(e,t,r){var n=r(44167),i=n.util.inherit;n.Signers.V3=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){var r=n.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,r)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return n.util.arrayEach(this.headersToSign(),function(t){e.push(t.toLowerCase())}),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,t=[];return n.util.arrayEach(this.headersToSign(),function(r){t.push(r.toLowerCase().trim()+":"+String(e[r]).trim())}),t.sort().join("\n")+"\n"},headersToSign:function(){var e=[];return n.util.each(this.request.headers,function(t){("Host"===t||"Content-Encoding"===t||t.match(/^X-Amz/i))&&e.push(t)}),e},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),n.util.crypto.sha256(e.join("\n"))}}),e.exports=n.Signers.V3},53446:function(e,t,r){var n=r(44167),i=n.util.inherit;r(92136),n.Signers.V3Https=i(n.Signers.V3,{authorization:function(e){return"AWS3-HTTPS AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(e)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}}),e.exports=n.Signers.V3Https},36332:function(e,t,r){var n=r(44167),i=r(41136),s=n.util.inherit,a="presigned-expires";n.Signers.V4=s(n.Signers.RequestSigner,{constructor:function(e,t,r){n.Signers.RequestSigner.call(this,e),this.serviceName=t,r=r||{},this.signatureCache="boolean"!=typeof r.signatureCache||r.signatureCache,this.operation=r.operation,this.signatureVersion=r.signatureVersion},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,t){var r=n.util.date.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,r):this.addHeaders(e,r),this.request.headers.Authorization=this.authorization(e,r)},addHeaders:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(e,t){var r=this.credentialString(t),i={"X-Amz-Date":t,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers[a],"X-Amz-SignedHeaders":this.signedHeaders()};e.sessionToken&&(i["X-Amz-Security-Token"]=e.sessionToken),this.request.headers["Content-Type"]&&(i["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(i["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(i["Cache-Control"]=this.request.headers["Cache-Control"]),n.util.each.call(this,this.request.headers,function(e,t){if(e!==a&&this.isSignableHeader(e)){var r=e.toLowerCase();0===r.indexOf("x-amz-meta-")?i[r]=t:0===r.indexOf("x-amz-")&&(i[e]=t)}});var s=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=s+n.util.queryParamsToString(i)},authorization:function(e,t){var r=[],n=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=i.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return n.util.crypto.hmac(r,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(t=n.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];n.util.each.call(this,this.request.headers,function(t,r){e.push([t,r])}),e.sort(function(e,t){return e[0].toLowerCase()<t[0].toLowerCase()?-1:1});var t=[];return n.util.arrayEach.call(this,e,function(e){var r=e[0].toLowerCase();if(this.isSignableHeader(r)){var i=e[1];if(null==i||"function"!=typeof i.toString)throw n.util.error(Error("Header "+r+" contains invalid value"),{code:"InvalidHeader"});t.push(r+":"+this.canonicalHeaderValues(i.toString()))}}),t.join("\n")},canonicalHeaderValues:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var e=[];return n.util.each.call(this,this.request.headers,function(t){t=t.toLowerCase(),this.isSignableHeader(t)&&e.push(t)}),e.sort().join(";")},credentialString:function(e){return i.createScope(e.substr(0,8),this.request.region,this.serviceName)},hexEncodedHash:function(e){return n.util.crypto.sha256(e,"hex")},hexEncodedBodyHash:function(){var e=this.request;return this.isPresigned()&&["s3","s3-object-lambda"].indexOf(this.serviceName)>-1&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent",a,"expect","x-amzn-trace-id"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||0>this.unsignableHeaders.indexOf(e)},isPresigned:function(){return!!this.request.headers[a]}}),e.exports=n.Signers.V4},41136:function(e,t,r){var n=r(44167),i={},s=[],a="aws4_request";e.exports={createScope:function(e,t,r){return[e.substr(0,8),t,r,a].join("/")},getSigningKey:function(e,t,r,o,u){var c=[n.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,r,o].join("_");if((u=!1!==u)&&c in i)return i[c];var l=n.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),d=n.util.crypto.hmac(l,r,"buffer"),h=n.util.crypto.hmac(d,o,"buffer"),f=n.util.crypto.hmac(h,a,"buffer");return u&&(i[c]=f,s.push(c),s.length>50&&delete i[s.shift()]),f},emptyCache:function(){i={},s=[]}}},92497:function(e){function t(e,t){this.currentState=t||null,this.states=e||{}}t.prototype.runTo=function(e,t,r,n){"function"==typeof e&&(n=r,r=t,t=e,e=null);var i=this,s=i.states[i.currentState];s.fn.call(r||i,n,function(n){if(n){if(!s.fail)return t?t.call(r,n):null;i.currentState=s.fail}else{if(!s.accept)return t?t.call(r):null;i.currentState=s.accept}if(i.currentState===e)return t?t.call(r,n):null;i.runTo(e,t,r,n)})},t.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},e.exports=t},35333:function(e,t,r){var n,i=r(21169),s={environment:"nodejs",engine:function(){if(s.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=i.platform+"/"+i.version;return i.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+i.env.AWS_EXECUTION_ENV),e},userAgent:function(){var e=s.environment,t="aws-sdk-"+e+"/"+r(44167).VERSION;return"nodejs"===e&&(t+=" "+s.engine()),t},uriEscape:function(e){var t=encodeURIComponent(e);return(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uriEscapePath:function(e){var t=[];return s.arrayEach(e.split("/"),function(e){t.push(s.uriEscape(e))}),t.join("/")},urlParse:function(e){return s.url.parse(e)},urlFormat:function(e){return s.url.format(e)},queryStringParse:function(e){return s.querystring.parse(e)},queryParamsToString:function(e){var t=[],r=s.uriEscape,n=Object.keys(e).sort();return s.arrayEach(n,function(n){var i=e[n],a=r(n),o=a+"=";if(Array.isArray(i)){var u=[];s.arrayEach(i,function(e){u.push(r(e))}),o=a+"="+u.sort().join("&"+a+"=")}else null!=i&&(o=a+"="+r(i));t.push(o)}),t.join("&")},readFileSync:function(e){return s.isBrowser()?null:r(97967).readFileSync(e,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw s.error(Error("Cannot base64 encode number "+e));return null==e?e:s.buffer.toBuffer(e).toString("base64")},decode:function(e){if("number"==typeof e)throw s.error(Error("Cannot base64 decode number "+e));return null==e?e:s.buffer.toBuffer(e,"base64")}},buffer:{toBuffer:function(e,t){return"function"==typeof s.Buffer.from&&s.Buffer.from!==Uint8Array.from?s.Buffer.from(e,t):new s.Buffer(e,t)},alloc:function(e,t,r){if("number"!=typeof e)throw Error("size passed to alloc must be a number.");if("function"==typeof s.Buffer.alloc)return s.Buffer.alloc(e,t,r);var n=new s.Buffer(e);return void 0!==t&&"function"==typeof n.fill&&n.fill(t,void 0,void 0,r),n},toStream:function(e){s.Buffer.isBuffer(e)||(e=s.buffer.toBuffer(e));var t=new s.stream.Readable,r=0;return t._read=function(n){if(r>=e.length)return t.push(null);var i=r+n;i>e.length&&(i=e.length),t.push(e.slice(r,i)),r=i},t},concat:function(e){var t,r=0,n=0,i=null;for(t=0;t<e.length;t++)r+=e[t].length;for(t=0,i=s.buffer.alloc(r);t<e.length;t++)e[t].copy(i,n),n+=e[t].length;return i}},string:{byteLength:function(e){if(null==e)return 0;if("string"==typeof e&&(e=s.buffer.toBuffer(e)),"number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.length)return e.length;if("number"==typeof e.size)return e.size;if("string"==typeof e.path)return r(97967).lstatSync(e.path).size;throw s.error(Error("Cannot determine length of "+e),{object:e})},upperFirst:function(e){return e[0].toUpperCase()+e.substr(1)},lowerFirst:function(e){return e[0].toLowerCase()+e.substr(1)}},ini:{parse:function(e){var t,r={};return s.arrayEach(e.split(/\r?\n/),function(e){if("["===(e=e.split(/(^|\s)[;#]/)[0].trim())[0]&&"]"===e[e.length-1]){if("__proto__"===(t=e.substring(1,e.length-1))||"__proto__"===t.split(/\s/)[1])throw s.error(Error("Cannot load profile name '"+t+"' from shared ini file."))}else if(t){var n=e.indexOf("="),i=e.length-1;if(-1!==n&&0!==n&&n!==i){var a=e.substring(0,n).trim(),o=e.substring(n+1).trim();r[t]=r[t]||{},r[t][a]=o}}}),r}},fn:{noop:function(){},callback:function(e){if(e)throw e},makeAsync:function(e,t){return t&&t<=e.length?e:function(){var t=Array.prototype.slice.call(arguments,0);t.pop()(e.apply(null,t))}}},date:{getDate:function(){return(n||(n=r(44167)),n.config.systemClockOffset)?new Date(new Date().getTime()+n.config.systemClockOffset):new Date},iso8601:function(e){return void 0===e&&(e=s.date.getDate()),e.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(e){return void 0===e&&(e=s.date.getDate()),e.toUTCString()},unixTimestamp:function(e){return void 0===e&&(e=s.date.getDate()),e.getTime()/1e3},from:function(e){return new Date("number"==typeof e?1e3*e:e)},format:function(e,t){return t||(t="iso8601"),s.date[t](s.date.from(e))},parseTimestamp:function(e){if("number"==typeof e||e.match(/^\d+$/))return new Date(1e3*e);if(e.match(/^\d{4}/)||e.match(/^\w{3},/))return new Date(e);throw s.error(Error("unhandled timestamp format: "+e),{code:"TimestampParserError"})}},crypto:{crc32Table:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],crc32:function(e){var t=s.crypto.crc32Table,r=-1;"string"==typeof e&&(e=s.buffer.toBuffer(e));for(var n=0;n<e.length;n++)r=r>>>8^t[(r^e.readUInt8(n))&255];return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=s.buffer.toBuffer(t)),s.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return s.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return s.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var i=s.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=s.buffer.toBuffer(t));var a=s.arraySliceFn(t),o=s.Buffer.isBuffer(t);if(s.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(o=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!o)t.on("data",function(e){i.update(e)}),t.on("error",function(e){n(e)}),t.on("end",function(){n(null,i.digest(r))});else if(n&&a&&!o&&"undefined"!=typeof FileReader){var u=0,c=new FileReader;c.onerror=function(){n(Error("Failed to read data."))},c.onload=function(){var e=new s.Buffer(new Uint8Array(c.result));i.update(e),u+=e.length,c._continueReading()},c._continueReading=function(){if(u>=t.size){n(null,i.digest(r));return}var e=u+524288;e>t.size&&(e=t.size),c.readAsArrayBuffer(a.call(t,u,e))},c._continueReading()}else{s.isBrowser()&&"object"==typeof t&&!o&&(t=new s.Buffer(new Uint8Array(t)));var l=i.update(t).digest(r);return n&&n(null,l),l}},toHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push(("0"+e.charCodeAt(r).toString(16)).substr(-2,2));return t.join("")},createHash:function(e){return s.crypto.lib.createHash(e)}},abort:{},each:function(e,t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.call(this,r,e[r])===s.abort)break},arrayEach:function(e,t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.call(this,e[r],parseInt(r,10))===s.abort)break},update:function(e,t){return s.each(t,function(t,r){e[t]=r}),e},merge:function(e,t){return s.update(s.copy(e),t)},copy:function(e){if(null==e)return e;var t={};for(var r in e)t[r]=e[r];return t},isEmpty:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},arraySliceFn:function(e){var t=e.slice||e.webkitSlice||e.mozSlice;return"function"==typeof t?t:null},isType:function(e,t){return"function"==typeof t&&(t=s.typeName(t)),Object.prototype.toString.call(e)==="[object "+t+"]"},typeName:function(e){if(Object.prototype.hasOwnProperty.call(e,"name"))return e.name;var t=e.toString(),r=t.match(/^\s*function (.+)\(/);return r?r[1]:t},error:function(e,t){var r=null;for(var n in"string"==typeof e.message&&""!==e.message&&("string"==typeof t||t&&t.message)&&((r=s.copy(e)).message=e.message),e.message=e.message||null,"string"==typeof t?e.message=t:"object"==typeof t&&null!==t&&(s.update(e,t),t.message&&(e.message=t.message),(t.code||t.name)&&(e.code=t.code||t.name),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=String(t&&t.name||e.name||e.code||"Error"),e.time=new Date,r&&(e.originalError=r),t||{})if("["===n[0]&&"]"===n[n.length-1]){if("code"===(n=n.slice(1,-1))||"message"===n)continue;e["["+n+"]"]="See error."+n+" for details.",Object.defineProperty(e,n,{value:e[n]||t&&t[n]||r&&r[n],enumerable:!1,writable:!0})}return e},inherit:function(e,t){var r=null;if(void 0===t)t=e,e=Object,r={};else{var n=function(){};n.prototype=e.prototype,r=new n}return t.constructor===Object&&(t.constructor=function(){if(e!==Object)return e.apply(this,arguments)}),t.constructor.prototype=r,s.update(t.constructor.prototype,t),t.constructor.__super__=e,t.constructor},mixin:function(){for(var e=arguments[0],t=1;t<arguments.length;t++)for(var r in arguments[t].prototype){var n=arguments[t].prototype[r];"constructor"!==r&&(e.prototype[r]=n)}return e},hideProperties:function(e,t){"function"==typeof Object.defineProperty&&s.arrayEach(t,function(t){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0})})},property:function(e,t,r,n,i){var s={configurable:!0,enumerable:void 0===n||n};"function"!=typeof r||i?(s.value=r,s.writable=!0):s.get=r,Object.defineProperty(e,t,s)},memoizedProperty:function(e,t,r,n){var i=null;s.property(e,t,function(){return null===i&&(i=r()),i},n)},hoistPayloadMember:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r],i=n.output;if(i.payload&&!n.hasEventOutput){var a=i.members[i.payload],o=e.data[i.payload];"structure"===a.type&&s.each(o,function(t,r){s.property(e.data,t,r,!1)})}},computeSha256:function(e,t){if(s.isNode()){var n=s.stream.Stream,i=r(97967);if("function"==typeof n&&e instanceof n){if("string"!=typeof e.path)return t(Error("Non-file stream objects are not supported with SigV4"));var a={};"number"==typeof e.start&&(a.start=e.start),"number"==typeof e.end&&(a.end=e.end),e=i.createReadStream(e.path,a)}}s.crypto.sha256(e,"hex",function(e,r){e?t(e):t(null,r)})},isClockSkewed:function(e){if(e)return s.property(n.config,"isClockSkewed",Math.abs(new Date().getTime()-e)>=3e5,!1),n.config.isClockSkewed},applyClockOffset:function(e){e&&(n.config.systemClockOffset=e-new Date().getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&n&&n.config&&(t=n.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var s=e[i];r?s.deletePromisesFromClass&&s.deletePromisesFromClass():s.addPromisesToClass&&s.addPromisesToClass(t)}},promisifyMethod:function(e,t){return function(){var r=this,n=Array.prototype.slice.call(arguments);return new t(function(t,i){n.push(function(e,r){e?i(e):t(r)}),r[e].apply(r,n)})}},isDualstackAvailable:function(e){if(!e)return!1;var t=r(48150);return"string"!=typeof e&&(e=e.serviceIdentifier),!!("string"==typeof e&&t.hasOwnProperty(e))&&!!t[e].dualstackAvailable},calculateRetryDelay:function(e,t,r){t||(t={});var n=t.customBackoff||null;return"function"==typeof n?n(e,r):Math.pow(2,e)*("number"==typeof t.base?t.base:100)*Math.random()},handleRequestWithRetries:function(e,t,r){t||(t={});var i=n.HttpClient.getInstance(),a=t.httpOptions||{},o=0,u=function(e){var n=t.maxRetries||0;if(e&&"TimeoutError"===e.code&&(e.retryable=!0),e&&e.retryable&&o<n){var i=s.calculateRetryDelay(o,t.retryDelayOptions,e);if(i>=0){o++,setTimeout(c,i+(e.retryAfter||0));return}}r(e)},c=function(){var t="";i.handleRequest(e,a,function(e){e.on("data",function(e){t+=e.toString()}),e.on("end",function(){var n=e.statusCode;if(n<300)r(null,t);else{var i=1e3*parseInt(e.headers["retry-after"],10)||0,a=s.error(Error(),{statusCode:n,retryable:n>=500||429===n});i&&a.retryable&&(a.retryAfter=i),u(a)}})},u)};n.util.defer(c)},uuid:{v4:function(){return r(84740).v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof i&&"function"==typeof i.nextTick?i.nextTick(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var r=(t||{})[e.operation];if(r&&r.input&&r.input.payload)return r.input.members[r.input.payload]}},getProfilesFromSharedConfig:function(e,t){var r={},n={};if(i.env[s.configOptInEnv])var n=e.loadFrom({isConfig:!0,filename:i.env[s.sharedConfigFileEnv]});var a={};try{var a=e.loadFrom({filename:t||i.env[s.configOptInEnv]&&i.env[s.sharedCredentialsFileEnv]})}catch(e){if(!i.env[s.configOptInEnv])throw e}for(var o=0,u=Object.keys(n);o<u.length;o++)r[u[o]]=c(r[u[o]]||{},n[u[o]]);for(var o=0,u=Object.keys(a);o<u.length;o++)r[u[o]]=c(r[u[o]]||{},a[u[o]]);return r;function c(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++)e[n[r]]=t[n[r]];return e}},ARN:{validate:function(e){return e&&0===e.indexOf("arn:")&&e.split(":").length>=6},parse:function(e){var t=e.split(":");return{partition:t[1],service:t[2],region:t[3],accountId:t[4],resource:t.slice(5).join(":")}},build:function(e){if(void 0===e.service||void 0===e.region||void 0===e.accountId||void 0===e.resource)throw s.error(Error("Input ARN object is invalid"));return"arn:"+(e.partition||"aws")+":"+e.service+":"+e.region+":"+e.accountId+":"+e.resource}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};e.exports=s},26162:function(e,t,r){var n=r(35333),i=r(45804);function s(){}function a(e,t){for(var r=e.getElementsByTagName(t),n=0,i=r.length;n<i;n++)if(r[n].parentNode===e)return r[n]}function o(e,t){switch(t||(t={}),t.type){case"structure":return u(e,t);case"map":return function(e,t){for(var r={},n=t.key.name||"key",i=t.value.name||"value",s=t.flattened?t.name:"entry",u=e.firstElementChild;u;){if(u.nodeName===s){var c=a(u,n).textContent,l=a(u,i);r[c]=o(l,t.value)}u=u.nextElementSibling}return r}(e,t);case"list":return function(e,t){for(var r=[],n=t.flattened?t.name:t.member.name||"member",i=e.firstElementChild;i;)i.nodeName===n&&r.push(o(i,t.member)),i=i.nextElementSibling;return r}(e,t);case void 0:case null:return function(e){if(null==e)return"";if(!e.firstElementChild)return null===e.parentNode.parentNode?{}:0===e.childNodes.length?"":e.textContent;for(var t={type:"structure",members:{}},r=e.firstElementChild;r;){var n=r.nodeName;Object.prototype.hasOwnProperty.call(t.members,n)?t.members[n].type="list":t.members[n]={name:n},r=r.nextElementSibling}return u(e,t)}(e);default:return function(e,t){if(e.getAttribute){var r=e.getAttribute("encoding");"base64"===r&&(t=new i.create({type:r}))}var n=e.textContent;return(""===n&&(n=null),"function"==typeof t.toType)?t.toType(n):n}(e,t)}}function u(e,t){var r={};return null===e||n.each(t.members,function(n,i){if(i.isXmlAttribute){if(Object.prototype.hasOwnProperty.call(e.attributes,i.name)){var s=e.attributes[i.name].value;r[n]=o({textContent:s},i)}}else{var u=i.flattened?e:a(e,i.name);u?r[n]=o(u,i):i.flattened||"list"!==i.type||t.api.xmlNoDefaultLists||(r[n]=i.defaultValue)}}),r}s.prototype.parse=function(e,t){if(""===e.replace(/^\s+/,""))return{};try{if(window.DOMParser){try{var r,i;r=new DOMParser().parseFromString(e,"text/xml")}catch(e){throw n.error(Error("Parse error in document"),{originalError:e,code:"XMLParserError",retryable:!0})}if(null===r.documentElement)throw n.error(Error("Cannot parse empty document."),{code:"XMLParserError",retryable:!0});var s=r.getElementsByTagName("parsererror")[0];if(s&&(s.parentNode===r||"body"===s.parentNode.nodeName||s.parentNode.parentNode===r||"body"===s.parentNode.parentNode.nodeName)){var u=s.getElementsByTagName("div")[0]||s;throw n.error(Error(u.textContent||"Parser error in document"),{code:"XMLParserError",retryable:!0})}}else if(window.ActiveXObject){if((r=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,!r.loadXML(e))throw n.error(Error("Parse error in document"),{code:"XMLParserError",retryable:!0})}else throw Error("Cannot load XML parser")}catch(e){i=e}if(r&&r.documentElement&&!i){var c=o(r.documentElement,t),l=a(r.documentElement,"ResponseMetadata");return l&&(c.ResponseMetadata=o(l,{})),c}if(!i)return{};throw n.error(i||Error(),{code:"XMLParserError",retryable:!0})},e.exports=s},54902:function(e,t,r){var n=r(35333),i=r(68132).XmlNode,s=r(5498).XmlText;function a(){}function o(e,t,r){var n,i="xmlns";t.xmlNamespaceUri?(n=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(i+=":"+t.xmlNamespacePrefix)):r&&t.api.xmlNamespaceUri&&(n=t.api.xmlNamespaceUri),n&&e.addAttribute(i,n)}a.prototype.toXML=function(e,t,r,a){var u=new i(r);return o(u,t,!0),function e(t,r,a){var u,c;switch(a.type){case"structure":return void n.arrayEach(a.memberNames,function(n){var s=a.members[n];if("body"===s.location){var u=r[n],c=s.name;if(null!=u){if(s.isXmlAttribute)t.addAttribute(c,u);else if(s.flattened)e(t,u,s);else{var l=new i(c);t.addChildNode(l),o(l,s),e(l,u,s)}}}});case"map":return u=a.key.name||"key",c=a.value.name||"value",void n.each(r,function(r,n){var s=new i(a.flattened?a.name:"entry");t.addChildNode(s);var o=new i(u),l=new i(c);s.addChildNode(o),s.addChildNode(l),e(o,r,a.key),e(l,n,a.value)});case"list":return void(a.flattened?n.arrayEach(r,function(r){var n=new i(a.member.name||a.name);t.addChildNode(n),e(n,r,a.member)}):n.arrayEach(r,function(r){var n=new i(a.member.name||"member");t.addChildNode(n),e(n,r,a.member)}));default:return function(e,t,r){e.addChildNode(new s(r.toWireFormat(t)))}(t,r,a)}}(u,e,t),u.children.length>0||a?u.toString():""},e.exports=a},8731:function(e){e.exports={escapeAttribute:function(e){return e.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},74893:function(e){e.exports={escapeElement:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}}},68132:function(e,t,r){var n=r(8731).escapeAttribute;function i(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}i.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},i.prototype.addChildNode=function(e){return this.children.push(e),this},i.prototype.removeAttribute=function(e){return delete this.attributes[e],this},i.prototype.toString=function(){for(var e=!!this.children.length,t="<"+this.name,r=this.attributes,i=0,s=Object.keys(r);i<s.length;i++){var a=s[i],o=r[a];null!=o&&(t+=" "+a+'="'+n(""+o)+'"')}return t+(e?">"+this.children.map(function(e){return e.toString()}).join("")+"</"+this.name+">":"/>")},e.exports={XmlNode:i}},5498:function(e,t,r){var n=r(74893).escapeElement;function i(e){this.value=e}i.prototype.toString=function(){return n(""+this.value)},e.exports={XmlText:i}},58189:function(e,t,r){"use strict";var n=r(40278),i=function(){function e(e){void 0===e&&(e=1e3),this.maxSize=e,this.cache=new n.LRUCache(e)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),e.prototype.put=function(t,r){var n="string"!=typeof t?e.getKeyString(t):t,i=this.populateValue(r);this.cache.put(n,i)},e.prototype.get=function(t){var r="string"!=typeof t?e.getKeyString(t):t,n=Date.now(),i=this.cache.get(r);if(i){for(var s=i.length-1;s>=0;s--)i[s].Expire<n&&i.splice(s,1);if(0===i.length){this.cache.remove(r);return}}return i},e.getKeyString=function(e){for(var t=[],r=Object.keys(e).sort(),n=0;n<r.length;n++){var i=r[n];void 0!==e[i]&&t.push(e[i])}return t.join(" ")},e.prototype.populateValue=function(e){var t=Date.now();return e.map(function(e){return{Address:e.Address||"",Expire:t+6e4*(e.CachePeriodInMinutes||1)}})},e.prototype.empty=function(){this.cache.empty()},e.prototype.remove=function(t){var r="string"!=typeof t?e.getKeyString(t):t;this.cache.remove(r)},e}();t.$=i},40278:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.key=e,this.value=t},n=function(){function e(e){if(this.nodeMap={},this.size=0,"number"!=typeof e||e<1)throw Error("Cache size can only be positive number");this.sizeLimit=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.prependToList=function(e){this.headerNode?(this.headerNode.prev=e,e.next=this.headerNode):this.tailNode=e,this.headerNode=e,this.size++},e.prototype.removeFromTail=function(){if(this.tailNode){var e=this.tailNode,t=e.prev;return t&&(t.next=void 0),e.prev=void 0,this.tailNode=t,this.size--,e}},e.prototype.detachFromList=function(e){this.headerNode===e&&(this.headerNode=e.next),this.tailNode===e&&(this.tailNode=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.next=void 0,e.prev=void 0,this.size--},e.prototype.get=function(e){if(this.nodeMap[e]){var t=this.nodeMap[e];return this.detachFromList(t),this.prependToList(t),t.value}},e.prototype.remove=function(e){if(this.nodeMap[e]){var t=this.nodeMap[e];this.detachFromList(t),delete this.nodeMap[e]}},e.prototype.put=function(e,t){if(this.nodeMap[e])this.remove(e);else if(this.size===this.sizeLimit){var n=this.removeFromTail().key;delete this.nodeMap[n]}var i=new r(e,t);this.nodeMap[e]=i,this.prependToList(i)},e.prototype.empty=function(){for(var e=Object.keys(this.nodeMap),t=0;t<e.length;t++){var r=e[t],n=this.nodeMap[r];this.detachFromList(n),delete this.nodeMap[r]}},e}();t.LRUCache=n},73200:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,s=u(e),a=s[0],o=s[1],c=new i((a+o)*3/4-o),l=0,d=o>0?a-4:a;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],a=0,o=n-i;a<o;a+=16383)s.push(function(e,t,n){for(var i,s=[],a=t;a<n;a+=3)s.push(r[(i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}(e,a,a+16383>o?o:a+16383));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=s.length;a<o;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},12007:function(e){"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<t.length;n++){var i=t.charAt(n);if(void 0!==r[i])throw TypeError(i+" is ambiguous");r[i]=n}function s(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=s(t)^n>>5}for(r=0,t=s(t);r<e.length;++r){var i=e.charCodeAt(r);t=s(t)^31&i}return t}function o(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var o=(e=n).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var u=e.slice(0,o),c=e.slice(o+1);if(c.length<6)return"Data too short";var l=a(u);if("string"==typeof l)return l;for(var d=[],h=0;h<c.length;++h){var f=c.charAt(h),p=r[f];if(void 0===p)return"Unknown character "+f;l=s(l)^p,h+6>=c.length||d.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:u,words:d}}function u(e,t,r,n){for(var i=0,s=0,a=(1<<r)-1,o=[],u=0;u<e.length;++u)for(i=i<<t|e[u],s+=t;s>=r;)o.push(i>>(s-=r)&a);if(n)s>0&&o.push(i<<r-s&a);else{if(s>=t)return"Excess padding";if(i<<r-s&a)return"Non-zero padding"}return o}e.exports={decodeUnsafe:function(){var e=o.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=o.apply(null,arguments);if("object"==typeof t)return t;throw Error(t)},encode:function(e,r,n){if(n=n||90,e.length+7+r.length>n)throw TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"==typeof i)throw Error(i);for(var o=e+"1",u=0;u<r.length;++u){var c=r[u];if(c>>5!=0)throw Error("Non 5-bit word");i=s(i)^c,o+=t.charAt(c)}for(u=0;u<6;++u)i=s(i);for(i^=1,u=0;u<6;++u){var l=i>>(5-u)*5&31;o+=t.charAt(l)}return o},toWordsUnsafe:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t;throw Error(t)},fromWordsUnsafe:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t;throw Error(t)}}},55180:function(e,t){"use strict";t.k3=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.sH=function(e){return e-=e>>>1&1431655765,((e=(858993459&e)+(e>>>2&858993459))+(e>>>4)&252645135)*16843009>>>24},t.vI=function(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t},function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<<i&255}}(Array(256))},49912:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function s(e,t,r){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{c="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(56095).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function o(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(e,t,r,n){for(var i=0,s=Math.min(e.length,r),a=t;a<s;a++){var o=e.charCodeAt(a)-48;i*=n,o>=49?i+=o-49+10:o>=17?i+=o-17+10:i+=o}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return 0>e.cmp(t)?e:t},s.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},s.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},s.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,s,a=0;a<this.length;a++)this.words[a]=0;var o=0;if("be"===r)for(a=e.length-1,i=0;a>=0;a-=3)s=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=s<<o&67108863,this.words[i+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a<e.length;a+=3)s=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[i]|=s<<o&67108863,this.words[i+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},s.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var s=0,a=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=o(e,t,i)<<s,this.words[a]|=67108863&n,s>=18?(s-=18,a+=1,this.words[a]|=n>>>26):s+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=o(e,t,i)<<s,this.words[a]|=67108863&n,s>=18?(s-=18,a+=1,this.words[a]|=n>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,a=s%n,o=Math.min(s,s-a)+r,c=0,l=r;l<o;l+=n)c=u(e,l,l+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var d=1;for(c=u(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this.strip()},s.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)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},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c,l=["","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"],d=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,u=a/67108864|0;r.words[0]=o;for(var c=1;c<n;c++){for(var l=u>>>26,d=67108863&u,h=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=h;f++){var p=c-f|0;l+=(a=(i=0|e.words[p])*(s=0|t.words[f])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}s.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],u=((o<<i|s)&16777215).toString(16);r=0!=(s=o>>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:l[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return n(void 0!==c),this.toArrayLike(c,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,r){var i,s,a=this.byteLength(),o=r||Math.max(1,a);n(a<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var u=new e(o),c=this.clone();if("le"===t){for(s=0;!c.isZero();s++)i=c.andln(255),c.iushrn(8),u[s]=i;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-a;s++)u[s]=0;for(s=0;!c.isZero();s++)i=c.andln(255),c.iushrn(8),u[o-s-1]=i}return u},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).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(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return n((this.negative|e.negative)==0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return n((this.negative|e.negative)==0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return n((this.negative|e.negative)==0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;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(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this.strip()},s.prototype.iadd=function(e){if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,s=0;s<n.length;s++)t=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<r.length;s++)t=(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>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(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var s=0,a=0;a<r.length;a++)s=(n=(0|t.words[a])-(0|r.words[a])+s)>>26,this.words[a]=67108863&n;for(;0!==s&&a<t.length;a++)s=(n=(0|t.words[a])+s)>>26,this.words[a]=67108863&n;if(0===s&&a<t.length&&t!==this)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=Math.max(this.length,a),t!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,s,a=e.words,o=t.words,u=r.words,c=0,l=0|a[0],d=8191&l,h=l>>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],w=8191&v,_=v>>>13,E=0|a[4],k=8191&E,x=E>>>13,S=0|a[5],A=8191&S,C=S>>>13,I=0|a[6],R=8191&I,P=I>>>13,N=0|a[7],M=8191&N,T=N>>>13,O=0|a[8],D=8191&O,L=O>>>13,B=0|a[9],q=8191&B,z=B>>>13,U=0|o[0],j=8191&U,F=U>>>13,H=0|o[1],$=8191&H,W=H>>>13,G=0|o[2],V=8191&G,K=G>>>13,Z=0|o[3],Y=8191&Z,J=Z>>>13,Q=0|o[4],X=8191&Q,ee=Q>>>13,et=0|o[5],er=8191&et,en=et>>>13,ei=0|o[6],es=8191&ei,ea=ei>>>13,eo=0|o[7],eu=8191&eo,ec=eo>>>13,el=0|o[8],ed=8191&el,eh=el>>>13,ef=0|o[9],ep=8191&ef,em=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var eg=(c+(n=Math.imul(d,j))|0)+((8191&(i=(i=Math.imul(d,F))+Math.imul(h,j)|0))<<13)|0;c=((s=Math.imul(h,F))+(i>>>13)|0)+(eg>>>26)|0,eg&=67108863,n=Math.imul(p,j),i=(i=Math.imul(p,F))+Math.imul(m,j)|0,s=Math.imul(m,F);var ey=(c+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(h,$)|0))<<13)|0;c=((s=s+Math.imul(h,W)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,j),i=(i=Math.imul(y,F))+Math.imul(b,j)|0,s=Math.imul(b,F),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,W)|0;var eb=(c+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(h,V)|0))<<13)|0;c=((s=s+Math.imul(h,K)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(w,j),i=(i=Math.imul(w,F))+Math.imul(_,j)|0,s=Math.imul(_,F),n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,W)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,V)|0,s=s+Math.imul(m,K)|0;var ev=(c+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(h,Y)|0))<<13)|0;c=((s=s+Math.imul(h,J)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(k,j),i=(i=Math.imul(k,F))+Math.imul(x,j)|0,s=Math.imul(x,F),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,$)|0,s=s+Math.imul(_,W)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,V)|0,s=s+Math.imul(b,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,s=s+Math.imul(m,J)|0;var ew=(c+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(A,j),i=(i=Math.imul(A,F))+Math.imul(C,j)|0,s=Math.imul(C,F),n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,$)|0,s=s+Math.imul(x,W)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,V)|0,s=s+Math.imul(_,K)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,Y)|0,s=s+Math.imul(b,J)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,ee)|0;var e_=(c+(n=n+Math.imul(d,er)|0)|0)+((8191&(i=(i=i+Math.imul(d,en)|0)+Math.imul(h,er)|0))<<13)|0;c=((s=s+Math.imul(h,en)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(R,j),i=(i=Math.imul(R,F))+Math.imul(P,j)|0,s=Math.imul(P,F),n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(C,$)|0,s=s+Math.imul(C,W)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(x,V)|0,s=s+Math.imul(x,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Y)|0,s=s+Math.imul(_,J)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,X)|0,s=s+Math.imul(b,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(m,er)|0,s=s+Math.imul(m,en)|0;var eE=(c+(n=n+Math.imul(d,es)|0)|0)+((8191&(i=(i=i+Math.imul(d,ea)|0)+Math.imul(h,es)|0))<<13)|0;c=((s=s+Math.imul(h,ea)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,F))+Math.imul(T,j)|0,s=Math.imul(T,F),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(P,$)|0,s=s+Math.imul(P,W)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(C,V)|0,s=s+Math.imul(C,K)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,Y)|0,s=s+Math.imul(x,J)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(b,er)|0,s=s+Math.imul(b,en)|0,n=n+Math.imul(p,es)|0,i=(i=i+Math.imul(p,ea)|0)+Math.imul(m,es)|0,s=s+Math.imul(m,ea)|0;var ek=(c+(n=n+Math.imul(d,eu)|0)|0)+((8191&(i=(i=i+Math.imul(d,ec)|0)+Math.imul(h,eu)|0))<<13)|0;c=((s=s+Math.imul(h,ec)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,F))+Math.imul(L,j)|0,s=Math.imul(L,F),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(T,$)|0,s=s+Math.imul(T,W)|0,n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(P,V)|0,s=s+Math.imul(P,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(C,Y)|0,s=s+Math.imul(C,J)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,ee)|0,n=n+Math.imul(w,er)|0,i=(i=i+Math.imul(w,en)|0)+Math.imul(_,er)|0,s=s+Math.imul(_,en)|0,n=n+Math.imul(y,es)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(b,es)|0,s=s+Math.imul(b,ea)|0,n=n+Math.imul(p,eu)|0,i=(i=i+Math.imul(p,ec)|0)+Math.imul(m,eu)|0,s=s+Math.imul(m,ec)|0;var ex=(c+(n=n+Math.imul(d,ed)|0)|0)+((8191&(i=(i=i+Math.imul(d,eh)|0)+Math.imul(h,ed)|0))<<13)|0;c=((s=s+Math.imul(h,eh)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(q,j),i=(i=Math.imul(q,F))+Math.imul(z,j)|0,s=Math.imul(z,F),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(L,$)|0,s=s+Math.imul(L,W)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,V)|0,s=s+Math.imul(T,K)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(P,Y)|0,s=s+Math.imul(P,J)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(C,X)|0,s=s+Math.imul(C,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(x,er)|0,s=s+Math.imul(x,en)|0,n=n+Math.imul(w,es)|0,i=(i=i+Math.imul(w,ea)|0)+Math.imul(_,es)|0,s=s+Math.imul(_,ea)|0,n=n+Math.imul(y,eu)|0,i=(i=i+Math.imul(y,ec)|0)+Math.imul(b,eu)|0,s=s+Math.imul(b,ec)|0,n=n+Math.imul(p,ed)|0,i=(i=i+Math.imul(p,eh)|0)+Math.imul(m,ed)|0,s=s+Math.imul(m,eh)|0;var eS=(c+(n=n+Math.imul(d,ep)|0)|0)+((8191&(i=(i=i+Math.imul(d,em)|0)+Math.imul(h,ep)|0))<<13)|0;c=((s=s+Math.imul(h,em)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,W))+Math.imul(z,$)|0,s=Math.imul(z,W),n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(L,V)|0,s=s+Math.imul(L,K)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(T,Y)|0,s=s+Math.imul(T,J)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(C,er)|0,s=s+Math.imul(C,en)|0,n=n+Math.imul(k,es)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(x,es)|0,s=s+Math.imul(x,ea)|0,n=n+Math.imul(w,eu)|0,i=(i=i+Math.imul(w,ec)|0)+Math.imul(_,eu)|0,s=s+Math.imul(_,ec)|0,n=n+Math.imul(y,ed)|0,i=(i=i+Math.imul(y,eh)|0)+Math.imul(b,ed)|0,s=s+Math.imul(b,eh)|0;var eA=(c+(n=n+Math.imul(p,ep)|0)|0)+((8191&(i=(i=i+Math.imul(p,em)|0)+Math.imul(m,ep)|0))<<13)|0;c=((s=s+Math.imul(m,em)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,K))+Math.imul(z,V)|0,s=Math.imul(z,K),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(L,Y)|0,s=s+Math.imul(L,J)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(R,er)|0,i=(i=i+Math.imul(R,en)|0)+Math.imul(P,er)|0,s=s+Math.imul(P,en)|0,n=n+Math.imul(A,es)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(C,es)|0,s=s+Math.imul(C,ea)|0,n=n+Math.imul(k,eu)|0,i=(i=i+Math.imul(k,ec)|0)+Math.imul(x,eu)|0,s=s+Math.imul(x,ec)|0,n=n+Math.imul(w,ed)|0,i=(i=i+Math.imul(w,eh)|0)+Math.imul(_,ed)|0,s=s+Math.imul(_,eh)|0;var eC=(c+(n=n+Math.imul(y,ep)|0)|0)+((8191&(i=(i=i+Math.imul(y,em)|0)+Math.imul(b,ep)|0))<<13)|0;c=((s=s+Math.imul(b,em)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,J))+Math.imul(z,Y)|0,s=Math.imul(z,J),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(L,X)|0,s=s+Math.imul(L,ee)|0,n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(T,er)|0,s=s+Math.imul(T,en)|0,n=n+Math.imul(R,es)|0,i=(i=i+Math.imul(R,ea)|0)+Math.imul(P,es)|0,s=s+Math.imul(P,ea)|0,n=n+Math.imul(A,eu)|0,i=(i=i+Math.imul(A,ec)|0)+Math.imul(C,eu)|0,s=s+Math.imul(C,ec)|0,n=n+Math.imul(k,ed)|0,i=(i=i+Math.imul(k,eh)|0)+Math.imul(x,ed)|0,s=s+Math.imul(x,eh)|0;var eI=(c+(n=n+Math.imul(w,ep)|0)|0)+((8191&(i=(i=i+Math.imul(w,em)|0)+Math.imul(_,ep)|0))<<13)|0;c=((s=s+Math.imul(_,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(q,X),i=(i=Math.imul(q,ee))+Math.imul(z,X)|0,s=Math.imul(z,ee),n=n+Math.imul(D,er)|0,i=(i=i+Math.imul(D,en)|0)+Math.imul(L,er)|0,s=s+Math.imul(L,en)|0,n=n+Math.imul(M,es)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(T,es)|0,s=s+Math.imul(T,ea)|0,n=n+Math.imul(R,eu)|0,i=(i=i+Math.imul(R,ec)|0)+Math.imul(P,eu)|0,s=s+Math.imul(P,ec)|0,n=n+Math.imul(A,ed)|0,i=(i=i+Math.imul(A,eh)|0)+Math.imul(C,ed)|0,s=s+Math.imul(C,eh)|0;var eR=(c+(n=n+Math.imul(k,ep)|0)|0)+((8191&(i=(i=i+Math.imul(k,em)|0)+Math.imul(x,ep)|0))<<13)|0;c=((s=s+Math.imul(x,em)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(q,er),i=(i=Math.imul(q,en))+Math.imul(z,er)|0,s=Math.imul(z,en),n=n+Math.imul(D,es)|0,i=(i=i+Math.imul(D,ea)|0)+Math.imul(L,es)|0,s=s+Math.imul(L,ea)|0,n=n+Math.imul(M,eu)|0,i=(i=i+Math.imul(M,ec)|0)+Math.imul(T,eu)|0,s=s+Math.imul(T,ec)|0,n=n+Math.imul(R,ed)|0,i=(i=i+Math.imul(R,eh)|0)+Math.imul(P,ed)|0,s=s+Math.imul(P,eh)|0;var eP=(c+(n=n+Math.imul(A,ep)|0)|0)+((8191&(i=(i=i+Math.imul(A,em)|0)+Math.imul(C,ep)|0))<<13)|0;c=((s=s+Math.imul(C,em)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(q,es),i=(i=Math.imul(q,ea))+Math.imul(z,es)|0,s=Math.imul(z,ea),n=n+Math.imul(D,eu)|0,i=(i=i+Math.imul(D,ec)|0)+Math.imul(L,eu)|0,s=s+Math.imul(L,ec)|0,n=n+Math.imul(M,ed)|0,i=(i=i+Math.imul(M,eh)|0)+Math.imul(T,ed)|0,s=s+Math.imul(T,eh)|0;var eN=(c+(n=n+Math.imul(R,ep)|0)|0)+((8191&(i=(i=i+Math.imul(R,em)|0)+Math.imul(P,ep)|0))<<13)|0;c=((s=s+Math.imul(P,em)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(q,eu),i=(i=Math.imul(q,ec))+Math.imul(z,eu)|0,s=Math.imul(z,ec),n=n+Math.imul(D,ed)|0,i=(i=i+Math.imul(D,eh)|0)+Math.imul(L,ed)|0,s=s+Math.imul(L,eh)|0;var eM=(c+(n=n+Math.imul(M,ep)|0)|0)+((8191&(i=(i=i+Math.imul(M,em)|0)+Math.imul(T,ep)|0))<<13)|0;c=((s=s+Math.imul(T,em)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,n=Math.imul(q,ed),i=(i=Math.imul(q,eh))+Math.imul(z,ed)|0,s=Math.imul(z,eh);var eT=(c+(n=n+Math.imul(D,ep)|0)|0)+((8191&(i=(i=i+Math.imul(D,em)|0)+Math.imul(L,ep)|0))<<13)|0;c=((s=s+Math.imul(L,em)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863;var eO=(c+(n=Math.imul(q,ep))|0)+((8191&(i=(i=Math.imul(q,em))+Math.imul(z,ep)|0))<<13)|0;return c=((s=Math.imul(z,em))+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,u[0]=eg,u[1]=ey,u[2]=eb,u[3]=ev,u[4]=ew,u[5]=e_,u[6]=eE,u[7]=ek,u[8]=ex,u[9]=eS,u[10]=eA,u[11]=eC,u[12]=eI,u[13]=eR,u[14]=eP,u[15]=eN,u[16]=eM,u[17]=eT,u[18]=eO,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){return new g().mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),s.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var a=i;i=0;for(var o=67108863&n,u=Math.min(s,t.length-1),c=Math.max(0,s-e.length+1);c<=u;c++){var l=s-c,d=(0|e.words[l])*(0|t.words[c]),h=67108863&d;a=a+(d/67108864|0)|0,o=67108863&(h=h+o|0),i+=(a=a+(h>>>26)|0)>>>26,a&=67108863}r.words[s]=o,n=a,a=i}return 0!==n?r.words[s]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=Array(e),r=s.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},g.prototype.permute=function(e,t,r,n,i,s){for(var a=0;a<s;a++)n[a]=t[e[a]],i[a]=r[e[a]]},g.prototype.transform=function(e,t,r,n,i,s){this.permute(s,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var o=a<<1,u=Math.cos(2*Math.PI/o),c=Math.sin(2*Math.PI/o),l=0;l<i;l+=o)for(var d=u,h=c,f=0;f<a;f++){var p=r[l+f],m=n[l+f],g=r[l+f+a],y=n[l+f+a],b=d*g-h*y;y=d*y+h*g,g=b,r[l+f]=p+g,n[l+f]=m+y,r[l+f+a]=p-g,n[l+f+a]=m-y,f!==o&&(b=u*d-c*h,h=u*h+c*d,d=b)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},g.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,r,i){for(var s=0,a=0;a<t;a++)s+=0|e[a],r[2*a]=8191&s,s>>>=13,r[2*a+1]=8191&s,s>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===s),n((-8192&s)==0)},g.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),s=this.stub(n),a=Array(n),o=Array(n),u=Array(n),c=Array(n),l=Array(n),d=Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,s,o,u,n,i),this.transform(c,s,l,d,n,i);for(var f=0;f<n;f++){var p=o[f]*l[f]-u[f]*d[f];u[f]=o[f]*d[f]+u[f]*l[f],o[f]=p}return this.conjugate(o,u,n),this.transform(o,u,h,s,n,i),this.conjugate(h,s,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=(i/67108864|0)+(s>>>26),this.words[r]=67108863&s}return 0!==t&&(this.words[r]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},s.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,u=(0|this.words[t])-o<<r;this.words[t]=u|a,a=o>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,r){n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var i,s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s;if(i-=a,i=Math.max(0,i),r){for(var u=0;u<a;u++)r.words[u]=this.words[u];r.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var l=0|this.words[u];this.words[u]=c<<26-s|l>>>s,c=l&o}return r&&0!==c&&(r.words[r.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<<t)},s.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this.strip())},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return(n("number"==typeof e),n(e<67108864),e<0)?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,r){var i,s,a=e.length+r;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+o;var u=(0|e.words[i])*t;s-=67108863&u,o=(s>>26)-(u/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)o=(s=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&s;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,o=0|a.words[a.length-1];0!=(n=26-this._countBits(o))&&(a=a.ushln(n),i.iushln(n),o=0|a.words[a.length-1]);var u=i.length-a.length;if("mod"!==t){(r=new s(null)).length=u+1,r.words=Array(r.length);for(var c=0;c<r.length;c++)r.words[c]=0}var l=i.clone()._ishlnsubmul(a,1,u);0===l.negative&&(i=l,r&&(r.words[u]=1));for(var d=u-1;d>=0;d--){var h=(0|i.words[a.length+d])*67108864+(0|i.words[a.length+d-1]);for(h=Math.min(h/o|0,67108863),i._ishlnsubmul(a,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(a,1,d),i.isZero()||(i.negative^=1);r&&(r.words[d]=h)}return r&&r.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},s.prototype.divmod=function(e,t,r){var i,a,o;return(n(!e.isZero()),this.isZero())?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):(this.negative&e.negative)!=0?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},s.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),a=new s(0),o=new s(0),u=new s(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;(t.words[0]&f)==0&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(l),u.isub(d)),o.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o),a.isub(u)):(r.isub(t),o.isub(i),u.isub(a))}return{a:o,b:u,gcd:r.iushln(c)}},s.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new s(1),o=new s(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,l=1;(r.words[0]&l)==0&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,h=1;(i.words[0]&h)==0&&d<26;++d,h<<=1);if(d>0)for(i.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(o)):(i.isub(r),o.isub(a))}return 0>(t=0===r.cmpn(1)?a:o).cmpn(0)&&t.iadd(e),t},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(1&this.words[0])==0},s.prototype.isOdd=function(){return(1&this.words[0])==1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,a=r;0!==s&&a<this.length;a++){var o=0|this.words[a];o+=s,s=o>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return -1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return -1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return -1===this.cmpn(e)},s.prototype.lt=function(e){return -1===this.cmp(e)},s.prototype.lten=function(e){return 0>=this.cmpn(e)},s.prototype.lte=function(e){return 0>=this.cmp(e)},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new k(e)},s.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},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(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){k.call(this,e),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)}b.prototype._tmp=function(){var e=new s(null);return e.words=Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t<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},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(v,b),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var i=e.words[9];for(n=10,t.words[t.length++]=4194303&i;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,b),i(_,b),i(E,b),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=(0|e.words[r])*19+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){var t;if(y[e])return y[e];if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else if("p25519"===e)t=new E;else throw Error("Unknown prime "+e);return y[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new s(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var o=new s(1).toRed(this),u=o.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 d=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=a;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<p);var y=this.pow(d,new s(1).iushln(p-g-1));h=h.redMul(y),d=y.redSqr(),f=f.redMul(d),p=g}return h},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=Array(16);r[0]=new s(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var d=c>>l&1;if(i!==r[0]&&(i=this.sqr(i)),0===d&&0===a){o=0;continue}a<<=1,a|=d,(4==++o||0===n&&0===l)&&(i=this.mul(i,r[a]),o=0,a=0)}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new x(e)},i(x,k),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},69197:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function s(e,t,r){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{d="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(71426).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function o(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(e,t,r,i){for(var s=0,a=0,o=Math.min(e.length,r),u=t;u<o;u++){var c=e.charCodeAt(u)-48;s*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),s+=a}return s}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return 0>e.cmp(t)?e:t},s.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},s.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},s.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,s,a=0;a<this.length;a++)this.words[a]=0;var o=0;if("be"===r)for(a=e.length-1,i=0;a>=0;a-=3)s=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=s<<o&67108863,this.words[i+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a<e.length;a+=3)s=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[i]|=s<<o&67108863,this.words[i+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this._strip()},s.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var s=0,a=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=o(e,t,i)<<s,this.words[a]|=67108863&n,s>=18?(s-=18,a+=1,this.words[a]|=n>>>26):s+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=o(e,t,i)<<s,this.words[a]|=67108863&n,s>=18?(s-=18,a+=1,this.words[a]|=n>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,a=s%n,o=Math.min(s,s-a)+r,c=0,l=r;l<o;l+=n)c=u(e,l,l+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var d=1;for(c=u(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},s.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype._move=function(e){c(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)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")]=l}catch(e){s.prototype.inspect=l}else s.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d,h=["","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];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,u=a/67108864|0;r.words[0]=o;for(var c=1;c<n;c++){for(var l=u>>>26,d=67108863&u,h=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=h;f++){var p=c-f|0;l+=(a=(i=0|e.words[p])*(s=0|t.words[f])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}s.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],u=((o<<i|s)&16777215).toString(16);s=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==s||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],l=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(l).toString(e);r=(d=d.idivn(l)).isZero()?m+r:h[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},d&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,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 a=e.allocUnsafe?e.allocUnsafe(s):new e(s);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},s.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===s?(r<e.length&&(e[r++]=a>>24&255),n=0,s=0):(n=a>>>24,s+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===s?(r>=0&&(e[r--]=a>>24&255),n=0,s=0):(n=a>>>24,s+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).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(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},s.prototype.ior=function(e){return n((this.negative|e.negative)==0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},s.prototype.iand=function(e){return n((this.negative|e.negative)==0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},s.prototype.ixor=function(e){return n((this.negative|e.negative)==0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;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(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},s.prototype.iadd=function(e){if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,s=0;s<n.length;s++)t=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<r.length;s++)t=(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>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(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var s=0,a=0;a<r.length;a++)s=(n=(0|t.words[a])-(0|r.words[a])+s)>>26,this.words[a]=67108863&n;for(;0!==s&&a<t.length;a++)s=(n=(0|t.words[a])+s)>>26,this.words[a]=67108863&n;if(0===s&&a<t.length&&t!==this)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=Math.max(this.length,a),t!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,s,a=e.words,o=t.words,u=r.words,c=0,l=0|a[0],d=8191&l,h=l>>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],w=8191&v,_=v>>>13,E=0|a[4],k=8191&E,x=E>>>13,S=0|a[5],A=8191&S,C=S>>>13,I=0|a[6],R=8191&I,P=I>>>13,N=0|a[7],M=8191&N,T=N>>>13,O=0|a[8],D=8191&O,L=O>>>13,B=0|a[9],q=8191&B,z=B>>>13,U=0|o[0],j=8191&U,F=U>>>13,H=0|o[1],$=8191&H,W=H>>>13,G=0|o[2],V=8191&G,K=G>>>13,Z=0|o[3],Y=8191&Z,J=Z>>>13,Q=0|o[4],X=8191&Q,ee=Q>>>13,et=0|o[5],er=8191&et,en=et>>>13,ei=0|o[6],es=8191&ei,ea=ei>>>13,eo=0|o[7],eu=8191&eo,ec=eo>>>13,el=0|o[8],ed=8191&el,eh=el>>>13,ef=0|o[9],ep=8191&ef,em=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var eg=(c+(n=Math.imul(d,j))|0)+((8191&(i=(i=Math.imul(d,F))+Math.imul(h,j)|0))<<13)|0;c=((s=Math.imul(h,F))+(i>>>13)|0)+(eg>>>26)|0,eg&=67108863,n=Math.imul(p,j),i=(i=Math.imul(p,F))+Math.imul(m,j)|0,s=Math.imul(m,F);var ey=(c+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(h,$)|0))<<13)|0;c=((s=s+Math.imul(h,W)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,j),i=(i=Math.imul(y,F))+Math.imul(b,j)|0,s=Math.imul(b,F),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,W)|0;var eb=(c+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(h,V)|0))<<13)|0;c=((s=s+Math.imul(h,K)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(w,j),i=(i=Math.imul(w,F))+Math.imul(_,j)|0,s=Math.imul(_,F),n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,W)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,V)|0,s=s+Math.imul(m,K)|0;var ev=(c+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(h,Y)|0))<<13)|0;c=((s=s+Math.imul(h,J)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(k,j),i=(i=Math.imul(k,F))+Math.imul(x,j)|0,s=Math.imul(x,F),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,$)|0,s=s+Math.imul(_,W)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,V)|0,s=s+Math.imul(b,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,s=s+Math.imul(m,J)|0;var ew=(c+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(A,j),i=(i=Math.imul(A,F))+Math.imul(C,j)|0,s=Math.imul(C,F),n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,$)|0,s=s+Math.imul(x,W)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,V)|0,s=s+Math.imul(_,K)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,Y)|0,s=s+Math.imul(b,J)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,ee)|0;var e_=(c+(n=n+Math.imul(d,er)|0)|0)+((8191&(i=(i=i+Math.imul(d,en)|0)+Math.imul(h,er)|0))<<13)|0;c=((s=s+Math.imul(h,en)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(R,j),i=(i=Math.imul(R,F))+Math.imul(P,j)|0,s=Math.imul(P,F),n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(C,$)|0,s=s+Math.imul(C,W)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(x,V)|0,s=s+Math.imul(x,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Y)|0,s=s+Math.imul(_,J)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,X)|0,s=s+Math.imul(b,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(m,er)|0,s=s+Math.imul(m,en)|0;var eE=(c+(n=n+Math.imul(d,es)|0)|0)+((8191&(i=(i=i+Math.imul(d,ea)|0)+Math.imul(h,es)|0))<<13)|0;c=((s=s+Math.imul(h,ea)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,F))+Math.imul(T,j)|0,s=Math.imul(T,F),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(P,$)|0,s=s+Math.imul(P,W)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(C,V)|0,s=s+Math.imul(C,K)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,Y)|0,s=s+Math.imul(x,J)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(b,er)|0,s=s+Math.imul(b,en)|0,n=n+Math.imul(p,es)|0,i=(i=i+Math.imul(p,ea)|0)+Math.imul(m,es)|0,s=s+Math.imul(m,ea)|0;var ek=(c+(n=n+Math.imul(d,eu)|0)|0)+((8191&(i=(i=i+Math.imul(d,ec)|0)+Math.imul(h,eu)|0))<<13)|0;c=((s=s+Math.imul(h,ec)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,F))+Math.imul(L,j)|0,s=Math.imul(L,F),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(T,$)|0,s=s+Math.imul(T,W)|0,n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(P,V)|0,s=s+Math.imul(P,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(C,Y)|0,s=s+Math.imul(C,J)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,ee)|0,n=n+Math.imul(w,er)|0,i=(i=i+Math.imul(w,en)|0)+Math.imul(_,er)|0,s=s+Math.imul(_,en)|0,n=n+Math.imul(y,es)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(b,es)|0,s=s+Math.imul(b,ea)|0,n=n+Math.imul(p,eu)|0,i=(i=i+Math.imul(p,ec)|0)+Math.imul(m,eu)|0,s=s+Math.imul(m,ec)|0;var ex=(c+(n=n+Math.imul(d,ed)|0)|0)+((8191&(i=(i=i+Math.imul(d,eh)|0)+Math.imul(h,ed)|0))<<13)|0;c=((s=s+Math.imul(h,eh)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(q,j),i=(i=Math.imul(q,F))+Math.imul(z,j)|0,s=Math.imul(z,F),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(L,$)|0,s=s+Math.imul(L,W)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,V)|0,s=s+Math.imul(T,K)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(P,Y)|0,s=s+Math.imul(P,J)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(C,X)|0,s=s+Math.imul(C,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(x,er)|0,s=s+Math.imul(x,en)|0,n=n+Math.imul(w,es)|0,i=(i=i+Math.imul(w,ea)|0)+Math.imul(_,es)|0,s=s+Math.imul(_,ea)|0,n=n+Math.imul(y,eu)|0,i=(i=i+Math.imul(y,ec)|0)+Math.imul(b,eu)|0,s=s+Math.imul(b,ec)|0,n=n+Math.imul(p,ed)|0,i=(i=i+Math.imul(p,eh)|0)+Math.imul(m,ed)|0,s=s+Math.imul(m,eh)|0;var eS=(c+(n=n+Math.imul(d,ep)|0)|0)+((8191&(i=(i=i+Math.imul(d,em)|0)+Math.imul(h,ep)|0))<<13)|0;c=((s=s+Math.imul(h,em)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,W))+Math.imul(z,$)|0,s=Math.imul(z,W),n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(L,V)|0,s=s+Math.imul(L,K)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(T,Y)|0,s=s+Math.imul(T,J)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(C,er)|0,s=s+Math.imul(C,en)|0,n=n+Math.imul(k,es)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(x,es)|0,s=s+Math.imul(x,ea)|0,n=n+Math.imul(w,eu)|0,i=(i=i+Math.imul(w,ec)|0)+Math.imul(_,eu)|0,s=s+Math.imul(_,ec)|0,n=n+Math.imul(y,ed)|0,i=(i=i+Math.imul(y,eh)|0)+Math.imul(b,ed)|0,s=s+Math.imul(b,eh)|0;var eA=(c+(n=n+Math.imul(p,ep)|0)|0)+((8191&(i=(i=i+Math.imul(p,em)|0)+Math.imul(m,ep)|0))<<13)|0;c=((s=s+Math.imul(m,em)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,K))+Math.imul(z,V)|0,s=Math.imul(z,K),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(L,Y)|0,s=s+Math.imul(L,J)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(R,er)|0,i=(i=i+Math.imul(R,en)|0)+Math.imul(P,er)|0,s=s+Math.imul(P,en)|0,n=n+Math.imul(A,es)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(C,es)|0,s=s+Math.imul(C,ea)|0,n=n+Math.imul(k,eu)|0,i=(i=i+Math.imul(k,ec)|0)+Math.imul(x,eu)|0,s=s+Math.imul(x,ec)|0,n=n+Math.imul(w,ed)|0,i=(i=i+Math.imul(w,eh)|0)+Math.imul(_,ed)|0,s=s+Math.imul(_,eh)|0;var eC=(c+(n=n+Math.imul(y,ep)|0)|0)+((8191&(i=(i=i+Math.imul(y,em)|0)+Math.imul(b,ep)|0))<<13)|0;c=((s=s+Math.imul(b,em)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,J))+Math.imul(z,Y)|0,s=Math.imul(z,J),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(L,X)|0,s=s+Math.imul(L,ee)|0,n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(T,er)|0,s=s+Math.imul(T,en)|0,n=n+Math.imul(R,es)|0,i=(i=i+Math.imul(R,ea)|0)+Math.imul(P,es)|0,s=s+Math.imul(P,ea)|0,n=n+Math.imul(A,eu)|0,i=(i=i+Math.imul(A,ec)|0)+Math.imul(C,eu)|0,s=s+Math.imul(C,ec)|0,n=n+Math.imul(k,ed)|0,i=(i=i+Math.imul(k,eh)|0)+Math.imul(x,ed)|0,s=s+Math.imul(x,eh)|0;var eI=(c+(n=n+Math.imul(w,ep)|0)|0)+((8191&(i=(i=i+Math.imul(w,em)|0)+Math.imul(_,ep)|0))<<13)|0;c=((s=s+Math.imul(_,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(q,X),i=(i=Math.imul(q,ee))+Math.imul(z,X)|0,s=Math.imul(z,ee),n=n+Math.imul(D,er)|0,i=(i=i+Math.imul(D,en)|0)+Math.imul(L,er)|0,s=s+Math.imul(L,en)|0,n=n+Math.imul(M,es)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(T,es)|0,s=s+Math.imul(T,ea)|0,n=n+Math.imul(R,eu)|0,i=(i=i+Math.imul(R,ec)|0)+Math.imul(P,eu)|0,s=s+Math.imul(P,ec)|0,n=n+Math.imul(A,ed)|0,i=(i=i+Math.imul(A,eh)|0)+Math.imul(C,ed)|0,s=s+Math.imul(C,eh)|0;var eR=(c+(n=n+Math.imul(k,ep)|0)|0)+((8191&(i=(i=i+Math.imul(k,em)|0)+Math.imul(x,ep)|0))<<13)|0;c=((s=s+Math.imul(x,em)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(q,er),i=(i=Math.imul(q,en))+Math.imul(z,er)|0,s=Math.imul(z,en),n=n+Math.imul(D,es)|0,i=(i=i+Math.imul(D,ea)|0)+Math.imul(L,es)|0,s=s+Math.imul(L,ea)|0,n=n+Math.imul(M,eu)|0,i=(i=i+Math.imul(M,ec)|0)+Math.imul(T,eu)|0,s=s+Math.imul(T,ec)|0,n=n+Math.imul(R,ed)|0,i=(i=i+Math.imul(R,eh)|0)+Math.imul(P,ed)|0,s=s+Math.imul(P,eh)|0;var eP=(c+(n=n+Math.imul(A,ep)|0)|0)+((8191&(i=(i=i+Math.imul(A,em)|0)+Math.imul(C,ep)|0))<<13)|0;c=((s=s+Math.imul(C,em)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(q,es),i=(i=Math.imul(q,ea))+Math.imul(z,es)|0,s=Math.imul(z,ea),n=n+Math.imul(D,eu)|0,i=(i=i+Math.imul(D,ec)|0)+Math.imul(L,eu)|0,s=s+Math.imul(L,ec)|0,n=n+Math.imul(M,ed)|0,i=(i=i+Math.imul(M,eh)|0)+Math.imul(T,ed)|0,s=s+Math.imul(T,eh)|0;var eN=(c+(n=n+Math.imul(R,ep)|0)|0)+((8191&(i=(i=i+Math.imul(R,em)|0)+Math.imul(P,ep)|0))<<13)|0;c=((s=s+Math.imul(P,em)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(q,eu),i=(i=Math.imul(q,ec))+Math.imul(z,eu)|0,s=Math.imul(z,ec),n=n+Math.imul(D,ed)|0,i=(i=i+Math.imul(D,eh)|0)+Math.imul(L,ed)|0,s=s+Math.imul(L,eh)|0;var eM=(c+(n=n+Math.imul(M,ep)|0)|0)+((8191&(i=(i=i+Math.imul(M,em)|0)+Math.imul(T,ep)|0))<<13)|0;c=((s=s+Math.imul(T,em)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,n=Math.imul(q,ed),i=(i=Math.imul(q,eh))+Math.imul(z,ed)|0,s=Math.imul(z,eh);var eT=(c+(n=n+Math.imul(D,ep)|0)|0)+((8191&(i=(i=i+Math.imul(D,em)|0)+Math.imul(L,ep)|0))<<13)|0;c=((s=s+Math.imul(L,em)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863;var eO=(c+(n=Math.imul(q,ep))|0)+((8191&(i=(i=Math.imul(q,em))+Math.imul(z,ep)|0))<<13)|0;return c=((s=Math.imul(z,em))+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,u[0]=eg,u[1]=ey,u[2]=eb,u[3]=ev,u[4]=ew,u[5]=e_,u[6]=eE,u[7]=ek,u[8]=ex,u[9]=eS,u[10]=eA,u[11]=eC,u[12]=eI,u[13]=eR,u[14]=eP,u[15]=eN,u[16]=eM,u[17]=eT,u[18]=eO,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var a=i;i=0;for(var o=67108863&n,u=Math.min(s,t.length-1),c=Math.max(0,s-e.length+1);c<=u;c++){var l=s-c,d=(0|e.words[l])*(0|t.words[c]),h=67108863&d;a=a+(d/67108864|0)|0,o=67108863&(h=h+o|0),i+=(a=a+(h>>>26)|0)>>>26,a&=67108863}r.words[s]=o,n=a,a=i}return 0!==n?r.words[s]=n:r.length--,r._strip()}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),s.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=Array(e),r=s.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,s){for(var a=0;a<s;a++)n[a]=t[e[a]],i[a]=r[e[a]]},b.prototype.transform=function(e,t,r,n,i,s){this.permute(s,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var o=a<<1,u=Math.cos(2*Math.PI/o),c=Math.sin(2*Math.PI/o),l=0;l<i;l+=o)for(var d=u,h=c,f=0;f<a;f++){var p=r[l+f],m=n[l+f],g=r[l+f+a],y=n[l+f+a],b=d*g-h*y;y=d*y+h*g,g=b,r[l+f]=p+g,n[l+f]=m+y,r[l+f+a]=p-g,n[l+f+a]=m-y,f!==o&&(b=u*d-c*h,h=u*h+c*d,d=b)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var s=0,a=0;a<t;a++)s+=0|e[a],r[2*a]=8191&s,s>>>=13,r[2*a+1]=8191&s,s>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===s),n((-8192&s)==0)},b.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),s=this.stub(n),a=Array(n),o=Array(n),u=Array(n),c=Array(n),l=Array(n),d=Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,s,o,u,n,i),this.transform(c,s,l,d,n,i);for(var f=0;f<n;f++){var p=o[f]*l[f]-u[f]*d[f];u[f]=o[f]*d[f]+u[f]*l[f],o[f]=p}return this.conjugate(o,u,n),this.transform(o,u,h,s,n,i),this.conjugate(h,s,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=Array(this.length+e.length),y(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,a=(67108863&s)+(67108863&r);r>>=26,r+=(s/67108864|0)+(a>>>26),this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new s(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},s.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,u=(0|this.words[t])-o<<r;this.words[t]=u|a,a=o>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,r){n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var i,s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s;if(i-=a,i=Math.max(0,i),r){for(var u=0;u<a;u++)r.words[u]=this.words[u];r.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var l=0|this.words[u];this.words[u]=c<<26-s|l>>>s,c=l&o}return r&&0!==c&&(r.words[r.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<<t)},s.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this._strip())},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return(n("number"==typeof e),n(e<67108864),e<0)?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,r){var i,s,a=e.length+r;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+o;var u=(0|e.words[i])*t;s-=67108863&u,o=(s>>26)-(u/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)o=(s=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&s;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,o=0|a.words[a.length-1];0!=(n=26-this._countBits(o))&&(a=a.ushln(n),i.iushln(n),o=0|a.words[a.length-1]);var u=i.length-a.length;if("mod"!==t){(r=new s(null)).length=u+1,r.words=Array(r.length);for(var c=0;c<r.length;c++)r.words[c]=0}var l=i.clone()._ishlnsubmul(a,1,u);0===l.negative&&(i=l,r&&(r.words[u]=1));for(var d=u-1;d>=0;d--){var h=(0|i.words[a.length+d])*67108864+(0|i.words[a.length+d-1]);for(h=Math.min(h/o|0,67108863),i._ishlnsubmul(a,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(a,1,d),i.isZero()||(i.negative^=1);r&&(r.words[d]=h)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},s.prototype.divmod=function(e,t,r){var i,a,o;return(n(!e.isZero()),this.isZero())?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):(this.negative&e.negative)!=0?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,s=this.length-1;s>=0;s--)i=(r*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*r;this.words[i]=s/e|0,r=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),a=new s(0),o=new s(0),u=new s(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;(t.words[0]&f)==0&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(l),u.isub(d)),o.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o),a.isub(u)):(r.isub(t),o.isub(i),u.isub(a))}return{a:o,b:u,gcd:r.iushln(c)}},s.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new s(1),o=new s(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,l=1;(r.words[0]&l)==0&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,h=1;(i.words[0]&h)==0&&d<26;++d,h<<=1);if(d>0)for(i.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(o)):(i.isub(r),o.isub(a))}return 0>(t=0===r.cmpn(1)?a:o).cmpn(0)&&t.iadd(e),t},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(1&this.words[0])==0},s.prototype.isOdd=function(){return(1&this.words[0])==1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,a=r;0!==s&&a<this.length;a++){var o=0|this.words[a];o+=s,s=o>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return -1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return -1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return -1===this.cmpn(e)},s.prototype.lt=function(e){return -1===this.cmp(e)},s.prototype.lten=function(e){return 0>=this.cmpn(e)},s.prototype.lte=function(e){return 0>=this.cmp(e)},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new S(e)},s.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},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(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){S.call(this,e),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 e=new s(null);return e.words=Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t<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(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var i=e.words[9];for(n=10,t.words[t.length++]=4194303&i;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,w),i(k,w),i(x,w),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=(0|e.words[r])*19+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){var t;if(v[e])return v[e];if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else if("p25519"===e)t=new x;else throw Error("Unknown prime "+e);return v[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new s(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var o=new s(1).toRed(this),u=o.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 d=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=a;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<p);var y=this.pow(d,new s(1).iushln(p-g-1));h=h.redMul(y),d=y.redSqr(),f=f.redMul(d),p=g}return h},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=Array(16);r[0]=new s(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var d=c>>l&1;if(i!==r[0]&&(i=this.sqr(i)),0===d&&0===a){o=0;continue}a<<=1,a|=d,(4==++o||0===n&&0===l)&&(i=this.mul(i,r[a]),o=0,a=0)}u=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new A(e)},i(A,S),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},97620:function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw Error("Not implemented yet")});else try{var s=r(69627);if("function"!=typeof s.randomBytes)throw Error("Not supported");i.prototype._rand=function(e){return s.randomBytes(e)}}catch(e){}},53435:function(e,t,r){"use strict";var n=r(73200),i=r(31432),s=r(89424);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(a()<t)throw RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if(("string"!=typeof r||""===r)&&(r="utf8"),!u.isEncoding(r))throw TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=o(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r,n=0|f(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?o(e,0):h(e,t);if("Buffer"===t.type&&s(t.data))return h(e,t.data)}throw TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw TypeError('"size" argument must be a number');if(e<0)throw RangeError('"size" argument must not be negative')}function d(e,t){if(l(t),e=o(e,t<0?0:0|f(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|f(t.length);e=o(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function f(e){if(e>=a())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(e).length;default:if(n)return I(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var i,s,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n,i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var s="",a=t;a<r;++a)s+=(n=e[a])<16?"0"+n.toString(16):n.toString(16);return s}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=t,s=r,0===i&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),isNaN(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return(t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var s,a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,o/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(s=r;s<o;s++)if(c(e,s)===c(t,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===u)return l*a}else -1!==l&&(s-=s-l),l=-1}else for(r+u>o&&(r=o-u),s=r;s>=0;s--){for(var d=!0,h=0;h<u;h++)if(c(e,s+h)!==c(t,h)){d=!1;break}if(d)return s}return -1}function v(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,a,o,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:(192&(s=e[i+1]))==128&&(u=(31&c)<<6|63&s)>127&&(l=u);break;case 3:s=e[i+1],a=e[i+2],(192&s)==128&&(192&a)==128&&(u=(15&c)<<12|(63&s)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:s=e[i+1],a=e[i+2],o=e[i+3],(192&s)==128&&(192&a)==128&&(192&o)==128&&(u=(15&c)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,s){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-r,2);i<s;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function k(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-r,4);i<s;++i)e[r+i]=t>>>(n?i:3-i)*8&255}function x(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,s){return s||x(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,s){return s||x(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==r.g.TYPED_ARRAY_SUPPORT?r.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return(l(e),e<=0)?o(null,e):void 0!==t?"string"==typeof r?o(null,e).fill(t,r):o(null,e).fill(t):o(null,e)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!s(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0==arguments.length?v(this,0,e):m.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,a=r-t,o=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),d=0;d<o;++d)if(c[d]!==l[d]){s=c[d],a=l[d];break}return s<a?-1:a<s?1:0},u.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,s,a,o,u,c,l,d,h,f,p,m,g=this.length-t;if((void 0===r||r>g)&&(r=g),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var y=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;if(s%2!=0)throw TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))break;e[r+a]=o}return a}(this,e,t,r);case"utf8":case"utf-8":return u=t,c=r,N(I(e,this.length-u),this,u,c);case"ascii":return l=t,d=r,N(R(e),this,l,d);case"latin1":case"binary":return i=this,s=e,a=t,o=r,N(R(s),i,a,o);case"base64":return h=t,f=r,N(P(e),this,h,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p=t,m=r,N(function(e,t){for(var r,n,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(e,this.length-p),this,p,m);default:if(y)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),y=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var s=0;s<i;++s)r[s]=this[s+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||w(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||w(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||w(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||w(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||w(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||w(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||w(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return(t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||w(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||w(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||w(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||w(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=1,a=0;for(this[t]=255&e;++a<r&&(s*=256);)this[t+a]=e/s&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=r-1,a=1;for(this[t+s]=255&e;--s>=0&&(a*=256);)this[t+s]=e/a&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("sourceStart out of bounds");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;i>=0;--i)e[i+t]=this[i+r];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i,s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=u.isBuffer(e)?e:I(new u(e,n).toString()),o=a.length;for(i=0;i<r-t;++i)this[i+t]=a[i%o]}return this};var C=/[^+\/0-9A-Za-z-_]/g;function I(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function R(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function P(e){return n.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}},1890:function(e,t,r){"use strict";let n=r(73200),i=r(42311),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!o.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|p(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(B(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(B(e,SharedArrayBuffer)||e&&B(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);let i=function(e){var t;if(o.isBuffer(e)){let t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),a(e<0?0:0|f(e))}function d(e){let t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),o.prototype),n}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(i)return n?-1:O(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=q[e[n]];return i}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":var s,a;return s=t,a=r,0===s&&a===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(s,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}(this,t,r);default:if(i)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){var s;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(s=r=+r)!=s&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let s,a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,o/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(s=r;s<o;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===u)return n*a}else -1!==n&&(s-=s-n),n=-1}else for(r+u>o&&(r=o-u),s=r;s>=0;s--){let r=!0;for(let n=0;n<u;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return -1}function v(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let t=e[i],s=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,o,u;switch(a){case 1:t<128&&(s=t);break;case 2:(192&(r=e[i+1]))==128&&(u=(31&t)<<6|63&r)>127&&(s=u);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(u=(15&t)<<12|(63&r)<<6|63&n)>2047&&(u<55296||u>57343)&&(s=u);break;case 4:r=e[i+1],n=e[i+2],o=e[i+3],(192&r)==128&&(192&n)==128&&(192&o)==128&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&o)>65535&&u<1114112&&(s=u)}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,s){if(!o.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n,i){P(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function k(e,t,r,n,i){P(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function x(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,s){return t=+t,r>>>=0,s||x(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,s){return t=+t,r>>>=0,s||x(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=o,t.h2=50,o.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return(c(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},o.allocUnsafe=function(e){return l(e)},o.allocUnsafeSlow=function(e){return l(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(B(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),B(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){let t=e[r];if(B(t,Uint8Array))i+t.length>n.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(o.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},o.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},o.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},o.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){let e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(o.prototype[s]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(B(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let s=i-n,a=r-t,u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<u;++e)if(c[e]!==l[e]){s=c[e],a=l[e];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){var i,s,a,o,u,c,l,d;if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let i;r=Number(r)||0;let s=e.length-r;n?(n=Number(n))>s&&(n=s):n=s;let a=t.length;for(n>a/2&&(n=a/2),i=0;i<n;++i){let n=parseInt(t.substr(2*i,2),16);if(n!=n)break;e[r+i]=n}return i}(this,e,t,r);case"utf8":case"utf-8":return i=t,s=r,L(O(e,this.length-i),this,i,s);case"ascii":case"latin1":case"binary":return a=t,o=r,L(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,o);case"base64":return u=t,c=r,L(D(e),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,d=r,L(function(e,t){let r,n;let i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(e,this.length-l),this,l,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=z(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&M(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),o.prototype.readBigUInt64BE=z(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&M(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=z(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&M(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+16777216*this[++e])}),o.prototype.readBigInt64BE=z(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&M(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(16777216*this[++e]+65536*this[++e]+256*this[++e]+r)}),o.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=z(function(e,t=0){return E(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=z(function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}let i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}let i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=z(function(e,t=0){return E(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=z(function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},o.prototype.fill=function(e,t,r,n){let i;if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{let s=o.isBuffer(e)?e:o.from(e,n),a=s.length;if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};let C={};function I(e,t,r){C[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function R(e){let t="",r=e.length,n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function P(e,t,r,n,i,s){if(e>r||e<t){let n;let i="bigint"==typeof t?"n":"";throw n=s>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(s+1)*8}${i}`:`>= -(2${i} ** ${(s+1)*8-1}${i}) and < 2 ** ${(s+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new C.ERR_OUT_OF_RANGE("value",n,e)}N(i,"offset"),(void 0===n[i]||void 0===n[i+s])&&M(i,n.length-(s+1))}function N(e,t){if("number"!=typeof e)throw new C.ERR_INVALID_ARG_TYPE(t,"number",e)}function M(e,t,r){if(Math.floor(e)!==e)throw N(e,r),new C.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new C.ERR_BUFFER_OUT_OF_BOUNDS;throw new C.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}I("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),I("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),I("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=R(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=R(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let T=/[^+/0-9A-Za-z-_]/g;function O(e,t){let r;t=t||1/0;let n=e.length,i=null,s=[];for(let a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function D(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let q=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function z(e){return"undefined"==typeof BigInt?U:e}function U(){throw Error("BigInt not supported")}},51362:function(e,t,r){"use strict";var n=r(24282),i=r(73474),s=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&s(e,".prototype.")>-1?i(r):r}},73474:function(e,t,r){"use strict";var n=r(49322),i=r(24282),s=r(86937),a=r(58328),o=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(u,o),l=r(93221),d=i("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return s(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(n,o,arguments)};l?l(e.exports,"apply",{value:h}):e.exports.apply=h},80565:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();(function(e){var t={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(t.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(e){return e&&r.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function d(e){var t=new FileReader,r=l(t);return t.readAsArrayBuffer(e),r}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e){if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var r;t.arrayBuffer&&t.blob&&(r=e)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||i(e))?this._bodyArrayBuffer=h(e):this._bodyText=e=Object.prototype.toString.call(e)}}else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,n=c(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=l(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},t.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=s(e),t=a(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},u.prototype.delete=function(e){delete this.map[s(e)]},u.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},u.prototype.set=function(e,t){this.map[s(e)]=a(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),o(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),o(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),o(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e,t){var r,n,i=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new u(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),p.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},f.call(m.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];y.redirect=function(e,t){if(-1===b.indexOf(t))throw RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.DOMException=n.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(r,n){return new Promise(function(i,s){var a=new m(r,n);if(a.signal&&a.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function c(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL"),i(new y("response"in o?o.response:o.responseText,r))},o.onerror=function(){s(TypeError("Network request failed"))},o.ontimeout=function(){s(TypeError("Network request failed"))},o.onabort=function(){s(new e.DOMException("Aborted","AbortError"))},o.open(a.method,a.url,!0),"include"===a.credentials?o.withCredentials=!0:"omit"===a.credentials&&(o.withCredentials=!1),"responseType"in o&&t.blob&&(o.responseType="blob"),a.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),a.signal&&(a.signal.addEventListener("abort",c),o.onreadystatechange=function(){4===o.readyState&&a.signal.removeEventListener("abort",c)}),o.send(void 0===a._bodyInit?null:a._bodyInit)})}v.polyfill=!0,n.fetch||(n.fetch=v,n.Headers=u,n.Request=m,n.Response=y),e.Headers=u,e.Request=m,e.Response=y,e.fetch=v,Object.defineProperty(e,"__esModule",{value:!0})})({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill,(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},680:function(e){"use strict";var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),n=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},i=n.exec(e);i;){try{t[i[0]]=decodeURIComponent(i[0])}catch(e){var s=function(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch(e){}if(1===t.length)return t;r=r||1;var n=t.slice(0,r),i=t.slice(r);return Array.prototype.concat.call([],e(n),e(i))})(t,n).join("")).match(r)||[];return e}}(i[0]);s!==i[0]&&(t[i[0]]=s)}i=n.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var u=a[o];e=e.replace(RegExp(u,"g"),t[u])}return e}(e)}}},61706:function(e,t,r){"use strict";var n=r(93221),i=r(81336),s=r(58328),a=r(996);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)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 o=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],d=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===o&&d?d.enumerable:!o,value:r,writable:null===u&&d?d.writable:!u});else if(!l&&(o||u||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},42872:function(e,t,r){"use strict";r.d(t,{qY:function(){return f}});var n=r(21169),i=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},s=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},a=function(e){this.version=e,this.type="node",this.name="node",this.os=n.platform},o=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"},u=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},c=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},l=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,d=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],h=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function f(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new c:"undefined"!=typeof navigator?p(navigator.userAgent):void 0!==n&&n.version?new a(n.version.slice(1)):null}function p(e){var t=""!==e&&d.reduce(function(t,r){var n=r[0],i=r[1];if(t)return t;var s=i.exec(e);return!!s&&[n,s]},!1);if(!t)return null;var r=t[0],n=t[1];if("searchbot"===r)return new u;var a=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);a?a.length<3&&(a=i(i([],a,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(3-a.length),!0)):a=[];var c=a.join("."),f=function(e){for(var t=0,r=h.length;t<r;t++){var n=h[t],i=n[0];if(n[1].exec(e))return i}return null}(e),p=l.exec(e);return p&&p[1]?new o(r,c,f,p[1]):new s(r,c,f)}},63615:function(e){"use strict";var t={single_source_shortest_paths:function(e,r,n){var i,s,a,o,u,c,l,d={},h={};h[r]=0;var f=t.PriorityQueue.make();for(f.push(r,0);!f.empty();)for(a in s=(i=f.pop()).value,o=i.cost,u=e[s]||{})u.hasOwnProperty(a)&&(c=o+u[a],l=h[a],(void 0===h[a]||l>c)&&(h[a]=c,f.push(a,c),d[a]=s));if(void 0!==n&&void 0===h[n])throw Error(["Could not find a path from ",r," to ",n,"."].join(""));return d},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},27902:function(e,t,r){"use strict";t.version=r(82434).i8,t.utils=r(18777),t.rand=r(97620),t.curve=r(45366),t.curves=r(95373),t.ec=r(68590),t.eddsa=r(40970)},61428:function(e,t,r){"use strict";var n=r(49912),i=r(18777),s=i.getNAF,a=i.getJSF,o=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw Error("Not implemented")},u.prototype.validate=function(){throw Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){o(e.precomputed);var r,n,i=e._getDoubles(),a=s(t,1,this._bitLength),u=(1<<i.step+1)-(i.step%2==0?2:1);u/=3;var c=[];for(r=0;r<a.length;r+=i.step){n=0;for(var l=r+i.step-1;l>=r;l--)n=(n<<1)+a[l];c.push(n)}for(var d=this.jpoint(null,null,null),h=this.jpoint(null,null,null),f=u;f>0;f--){for(r=0;r<c.length;r++)(n=c[r])===f?h=h.mixedAdd(i.points[r]):n===-f&&(h=h.mixedAdd(i.points[r].neg()));d=d.add(h)}return d.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=s(t,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var l=0;c>=0&&0===a[c];c--)l++;if(c>=0&&l++,u=u.dblp(l),c<0)break;var d=a[c];o(0!==d),u="affine"===e.type?d>0?u.mixedAdd(i[d-1>>1]):u.mixedAdd(i[-d-1>>1].neg()):d>0?u.add(i[d-1>>1]):u.add(i[-d-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var o,u,c,l=this._wnafT1,d=this._wnafT2,h=this._wnafT3,f=0;for(o=0;o<n;o++){var p=(c=t[o])._getNAFPoints(e);l[o]=p.wnd,d[o]=p.points}for(o=n-1;o>=1;o-=2){var m=o-1,g=o;if(1!==l[m]||1!==l[g]){h[m]=s(r[m],l[m],this._bitLength),h[g]=s(r[g],l[g],this._bitLength),f=Math.max(h[m].length,f),f=Math.max(h[g].length,f);continue}var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[m],r[g]);for(u=0,f=Math.max(v[0].length,f),h[m]=Array(f),h[g]=Array(f);u<f;u++){var w=0|v[0][u],_=0|v[1][u];h[m][u]=b[(w+1)*3+(_+1)],h[g][u]=0,d[m]=y}}var E=this.jpoint(null,null,null),k=this._wnafT4;for(o=f;o>=0;o--){for(var x=0;o>=0;){var S=!0;for(u=0;u<n;u++)k[u]=0|h[u][o],0!==k[u]&&(S=!1);if(!S)break;x++,o--}if(o>=0&&x++,E=E.dblp(x),o<0)break;for(u=0;u<n;u++){var A=k[u];0!==A&&(A>0?c=d[u][A-1>>1]:A<0&&(c=d[u][-A-1>>1].neg()),E="affine"===c.type?E.mixedAdd(c):E.add(c))}}for(o=0;o<n;o++)d[o]=null;return i?E:E.toP()},u.BasePoint=c,c.prototype.eq=function(){throw Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?o(e[e.length-1]%2==0):7===e[0]&&o(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},81013:function(e,t,r){"use strict";var n=r(18777),i=r(49912),s=r(96154),a=r(61428),o=n.assert;function u(e){this.twisted=(0|e.a)!=1,this.mOneA=this.twisted&&(0|e.a)==-1,this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=(0|e.c)==1}function c(e,t,r,n,s){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=s&&new i(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,!this.curve.extended||this.t||(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}s(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(s.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw Error("invalid point");var u=o.fromRed().isOdd();return(t&&!u||!t&&u)&&(o=o.redNeg()),this.point(e,o)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(s.redInvm());if(0===a.cmp(this.zero)){if(!t)return this.point(this.zero,e);throw Error("invalid point")}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},s(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=n.redAdd(t),a=s.redSub(r),o=n.redSub(t),u=i.redMul(a),c=s.redMul(o),l=i.redMul(o),d=a.redMul(s);return this.curve.point(u,c,d,l)},c.prototype._projDbl=function(){var e,t,r,n,i,s,a=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(o)).redAdd(u);this.zOne?(e=a.redSub(o).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),s=c.redSub(i).redISub(i),e=a.redSub(o).redISub(u).redMul(s),t=c.redMul(n.redSub(u)),r=c.redMul(s))}else n=o.redAdd(u),i=this.curve._mulC(this.z).redSqr(),s=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(s),t=this.curve._mulC(n).redMul(o.redISub(u)),r=n.redMul(s);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=r.redSub(t),a=i.redSub(n),o=i.redAdd(n),u=r.redAdd(t),c=s.redMul(a),l=o.redMul(u),d=s.redMul(u),h=a.redMul(o);return this.curve.point(c,l,h,d)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),s=this.x.redMul(e.x),a=this.y.redMul(e.y),o=this.curve.d.redMul(s).redMul(a),u=i.redSub(o),c=i.redAdd(o),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(a),d=n.redMul(u).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(s))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(s)),r=this.curve._mulC(u).redMul(c)),this.curve.point(d,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},45366:function(e,t,r){"use strict";t.base=r(61428),t.short=r(28021),t.mont=r(29399),t.edwards=r(81013)},29399:function(e,t,r){"use strict";var n=r(49912),i=r(96154),s=r(61428),a=r(18777);function o(e){s.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){s.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(o,s),e.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,s.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},o.prototype.point=function(e,t){return new u(this,e,t)},o.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(r),a=i.redMul(n),o=t.z.redMul(s.redAdd(a).redSqr()),u=t.x.redMul(s.redISub(a).redSqr());return this.curve.point(o,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},28021:function(e,t,r){"use strict";var n=r(18777),i=r(49912),s=r(96154),a=r(61428),o=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var t,r,n,s=this._getEndoRoots(this.p);t=(t=0>s[0].cmp(s[1])?s[0]:s[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?r=a[0]:(r=a[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),s=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(s).fromRed(),n.redSub(s).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,s,a,o,u,c,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,f=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),y=new i(1),b=0;0!==h.cmpn(0);){var v=f.div(h);c=f.sub(v.mul(h)),l=g.sub(v.mul(p));var w=y.sub(v.mul(m));if(!n&&0>c.cmp(d))t=u.neg(),r=p,n=c.neg(),s=l;else if(n&&2==++b)break;u=c,f=h,h=c,g=p,p=l,y=m,m=w}a=c.neg(),o=l;var _=n.sqr().add(s.sqr());return a.sqr().add(o.sqr()).cmp(_)>=0&&(a=t,o=r),n.negative&&(n=n.neg(),s=s.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:n,b:s},{a:a,b:o}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),o=s.mul(n.a),u=i.mul(r.b),c=s.mul(n.b);return{k1:e.sub(a).sub(o),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var s=n.fromRed().isOdd();return(t&&!s||!t&&s)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var a=this._endoSplit(t[s]),o=e[s],u=o._getBeta();a.k1.negative&&(a.k1.ineg(),o=o.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*s]=o,n[2*s+1]=u,i[2*s]=a.k1,i[2*s+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*s,r),l=0;l<2*s;l++)n[l]=null,i[l]=null;return c},s(c,a.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var s=t[2];return n.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[n].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[n].concat(s.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e)||0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return(e=new i(e,16),this.isInfinity())?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(l,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),o=n.redSub(i),u=s.redSub(a);if(0===o.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),l=c.redMul(o),d=n.redMul(c),h=u.redSqr().redIAdd(l).redISub(d).redISub(d),f=u.redMul(d.redISub(h)).redISub(s.redMul(l)),p=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(h,f,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),a=r.redSub(n),o=i.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),d=o.redSqr().redIAdd(c).redISub(l).redISub(l),h=o.redMul(l.redISub(d)).redISub(i.redMul(c)),f=this.z.redMul(a);return this.curve.jpoint(d,h,f)},l.prototype.dblp=function(e){if(0===e||this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t,r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,s=this.x,a=this.y,o=this.z,u=o.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var l=s.redSqr(),d=c.redSqr(),h=d.redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=s.redMul(d),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=f.redMul(g);y=y.redIAdd(y).redISub(h);var b=c.redMul(o);t+1<e&&(u=u.redMul(h)),s=m,o=b,c=y}return this.curve.jpoint(s,c.redMul(i),o)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){if(this.zOne){var e,t,r,n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n),u=o.redSqr().redISub(a).redISub(a),c=s.redIAdd(s);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=o.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),h=d.redSqr(),f=this.x.redAdd(d).redSqr().redISub(l).redISub(h);f=f.redIAdd(f);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),g=h.redIAdd(h);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},l.prototype._threeDbl=function(){if(this.zOne){var e,t,r,n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=o.redSqr().redISub(a).redISub(a);e=u;var c=s.redIAdd(s);c=(c=c.redIAdd(c)).redIAdd(c),t=o.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),h=this.x.redMul(d),f=this.x.redSub(l).redMul(this.x.redAdd(l));f=f.redAdd(f).redIAdd(f);var p=h.redIAdd(h),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},l.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),s=t.redSqr(),a=r.redSqr(),o=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),l=o.redSqr().redISub(c.redAdd(c)),d=c.redISub(l),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=o.redMul(d).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,f,p)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),o=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(s)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(s).redISub(o).redISub(u),l=t.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.x.redMul(o).redISub(l);d=(d=d.redIAdd(d)).redIAdd(d);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(o)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=this.z.redAdd(a).redSqr().redISub(r).redISub(o);return this.curve.jpoint(d,h,f)},l.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},l.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},l.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},95373:function(e,t,r){"use strict";var n,i=r(15334),s=r(45366),a=r(18777).assert;function o(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,r){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var n=new o(r);return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}),n}})}t.PresetCurve=o,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(30915)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},68590:function(e,t,r){"use strict";var n=r(49912),i=r(91103),s=r(18777),a=r(95373),o=r(97620),u=s.assert,c=r(13153),l=r(49774);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),s=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return(r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0)?e.sub(this.n):e},d.prototype.sign=function(e,t,r,s){"object"==typeof r&&(s=r,r=null),s||(s={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),o=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new i({hash:this.hash,entropy:o,nonce:u,pers:s.pers,persEnc:s.persEnc||"utf8"}),d=this.n.sub(new n(1)),h=0;;h++){var f=s.k?s.k(h):new n(c.generate(this.n.byteLength()));if(!(0>=(f=this._truncateToN(f,!0)).cmpn(1)||f.cmp(d)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=f.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new l({r:g,s:y,recoveryParam:b})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var s,a=(t=new l(t,"hex")).r,o=t.s;if(0>a.cmpn(1)||a.cmp(this.n)>=0||0>o.cmpn(1)||o.cmp(this.n)>=0)return!1;var u=o.invm(this.n),c=u.mul(e).umod(this.n),d=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),d)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(c,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},d.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new l(t,i);var s=this.n,a=new n(e),o=t.r,c=t.s,d=1&r,h=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw Error("Unable to find sencond key candinate");o=h?this.curve.pointFromX(o.add(this.curve.n),d):this.curve.pointFromX(o,d);var f=t.r.invm(s),p=s.sub(a).mul(f).umod(s),m=c.mul(f).umod(s);return this.g.mulAdd(p,o,m)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new l(t,n)).recoveryParam)return t.recoveryParam;for(var i,s=0;s<4;s++){try{i=this.recoverPubKey(e,t,s)}catch(e){continue}if(i.eq(r))return s}throw Error("Unable to find valid recovery factor")}},13153:function(e,t,r){"use strict";var n=r(49912),i=r(18777).assert;function s(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=s,s.fromPublic=function(e,t,r){return t instanceof s?t:new s(e,{pub:t,pubEnc:r})},s.fromPrivate=function(e,t,r){return t instanceof s?t:new s(e,{priv:t,privEnc:r})},s.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},s.prototype.getPublic=function(e,t){return("string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t)?this.pub.encode(t,e):this.pub},s.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(e,t){if(e.x||e.y){"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&i(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},s.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},s.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},s.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},s.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},49774:function(e,t,r){"use strict";var n=r(49912),i=r(18777),s=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(s(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4||0===e[t.place])return!1;for(var i=0,s=0,a=t.place;s<n;s++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function l(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new o;if(48!==e[r.place++])return!1;var s=u(e,r);if(!1===s||s+r.place!==e.length||2!==e[r.place++])return!1;var a=u(e,r);if(!1===a||(128&e[r.place])!=0)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var l=u(e,r);if(!1===l||e.length!==l+r.place||(128&e[r.place])!=0)return!1;var d=e.slice(r.place,l+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(c),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var s=n.concat(r),a=[48];return l(a,s.length),a=a.concat(s),i.encode(a,e)}},40970:function(e,t,r){"use strict";var n=r(15334),i=r(95373),s=r(18777),a=s.assert,o=s.parseBytes,u=r(9239),c=r(65779);function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=o(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),s=this.encodePoint(i),a=this.hashInt(s,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:s})},l.prototype.verify=function(e,t,r){if(e=o(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(s)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return s.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},l.prototype.decodePoint=function(e){var t=(e=s.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=(128&e[t])!=0,i=s.intFromLE(r);return this.curve.pointFromY(i,n)},l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(e){return s.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}},9239:function(e,t,r){"use strict";var n=r(18777),i=n.assert,s=n.parseBytes,a=n.cachedProperty;function o(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t})},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t})},o.prototype.secret=function(){return this._secret},a(o,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(o,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(o,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),a(o,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(o,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(o,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),o.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},o.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},o.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=o},65779:function(e,t,r){"use strict";var n=r(49912),i=r(18777),s=i.assert,a=i.cachedProperty,o=i.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=o(t)),Array.isArray(t)&&(s(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(u,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(u,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(u,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(u,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},30915:function(e){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},18777:function(e,t,r){"use strict";var n=r(49912),i=r(71703),s=r(98613);t.assert=i,t.toArray=s.toArray,t.zero2=s.zero2,t.toHex=s.toHex,t.encode=s.encode,t.getNAF=function(e,t,r){var n=Array(Math.max(e.bitLength(),r)+1);for(a=0;a<n.length;a+=1)n[a]=0;var i=1<<t+1,s=e.clone();for(a=0;a<n.length;a++){var a,o,u=s.andln(i-1);s.isOdd()?(o=u>(i>>1)-1?(i>>1)-u:u,s.isubn(o)):o=0,n[a]=o,s.iushrn(1)}return n},t.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var s,a,o,u=e.andln(3)+n&3,c=t.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),a=(1&u)==0?0:(3==(s=e.andln(7)+n&7)||5===s)&&2===c?-u:u,r[0].push(a),o=(1&c)==0?0:(3==(s=t.andln(7)+i&7)||5===s)&&2===u?-c:c,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},t.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new n(e,"hex","le")}},93221:function(e,t,r){"use strict";var n=r(24282)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},71800:function(e){"use strict";e.exports=EvalError},31382:function(e){"use strict";e.exports=Error},58758:function(e){"use strict";e.exports=RangeError},31392:function(e){"use strict";e.exports=ReferenceError},81336:function(e){"use strict";e.exports=SyntaxError},58328:function(e){"use strict";e.exports=TypeError},50321:function(e){"use strict";e.exports=URIError},46962:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,n,s,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new i(n,s||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],o]:e._events[u].push(o):(e._events[u]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),o.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,a=Array(s);i<s;i++)a[i]=n[i].fn;return a},o.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},o.prototype.emit=function(e,t,n,i,s,a){var o=r?r+e:e;if(!this._events[o])return!1;var u,c,l=this._events[o],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,s),!0;case 6:return l.fn.call(l.context,t,n,i,s,a),!0}for(c=1,u=Array(d-1);c<d;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,f=l.length;for(c=0;c<f;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),d){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,n);break;case 4:l[c].fn.call(l[c].context,t,n,i);break;default:if(!u)for(h=1,u=Array(d-1);h<d;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},o.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},o.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},o.prototype.removeListener=function(e,t,n,i){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||a(this,s);else{for(var u=0,c=[],l=o.length;u<l;u++)(o[u].fn!==t||i&&!o[u].once||n&&o[u].context!==n)&&c.push(o[u]);c.length?this._events[s]=1===c.length?c[0]:c:a(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o},3166:function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,i,s,a,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(void 0===(i=this._events[e]))return!1;if(r(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),i.apply(this,a)}else if(n(i))for(o=0,a=Array.prototype.slice.call(arguments,1),s=(u=i.slice()).length;o<s;o++)u[o].apply(this,a);return!0},t.prototype.addListener=function(e,i){var s;if(!r(i))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(i.listener)?i.listener:i),this._events[e]?n(this._events[e])?this._events[e].push(i):this._events[e]=[this._events[e],i]:this._events[e]=i,n(this._events[e])&&!this._events[e].warned&&(s=void 0===this._maxListeners?t.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,s,a,o;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,s=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(o=a;o-- >0;)if(i[o]===t||i[o].listener&&i[o].listener===t){s=o;break}if(s<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0==arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0==arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},92254:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(r,n){var i;function s(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&(i={once:!0},"function"==typeof e.on&&m(e,"error",s,i))})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){if(o(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]),void 0===a)a=s[t]=r,++e._eventsCount;else if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var i,s,a,c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,console&&console.warn&&console.warn(c)}return e}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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(s){n.once&&e.removeEventListener(t,i),r(s)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),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(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,o=Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else for(var c=u.length,l=p(u,c),r=0;r<c;++r)n(l[r],this,t);return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return o(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,s,a;if(o(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,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[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),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(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},27697:function(e){"use strict";var t,r=(t=[{name:"lowercase",re:/[a-z]/,length:26},{name:"uppercase",re:/[A-Z]/,length:26},{name:"numbers",re:/[0-9]/,length:10},{name:"symbols",re:/[^a-zA-Z0-9]/,length:33}],function(e){return t.reduce(function(t,r){return t+(r.re.test(e)?r.length:0)},0)});e.exports=function(e){var t;return e?(t=r(e),Math.round(e.length*Math.log(t)/Math.LN2)):0}},35257:function(e){var t;t=function(){"use strict";function e(e){return Number.isInteger(e)&&e>=0}function t(e){this.name="ArgumentError",this.message=e}return function(r,n){if(n=n||{},"function"!=typeof r)throw new t("fetch must be a function");if("object"!=typeof n)throw new t("defaults must be an object");if(void 0!==n.retries&&!e(n.retries))throw new t("retries must be a positive integer");if(void 0!==n.retryDelay&&!e(n.retryDelay)&&"function"!=typeof n.retryDelay)throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(void 0!==n.retryOn&&!Array.isArray(n.retryOn)&&"function"!=typeof n.retryOn)throw new t("retryOn property expects an array or function");return n=Object.assign({retries:3,retryDelay:1e3,retryOn:[]},n),function(i,s){var a=n.retries,o=n.retryDelay,u=n.retryOn;if(s&&void 0!==s.retries){if(e(s.retries))a=s.retries;else throw new t("retries must be a positive integer")}if(s&&void 0!==s.retryDelay){if(e(s.retryDelay)||"function"==typeof s.retryDelay)o=s.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer")}if(s&&s.retryOn){if(Array.isArray(s.retryOn)||"function"==typeof s.retryOn)u=s.retryOn;else throw new t("retryOn property expects an array or function")}return new Promise(function(e,t){var n=function(n){r("undefined"!=typeof Request&&i instanceof Request?i.clone():i,s).then(function(r){if(Array.isArray(u)&&-1===u.indexOf(r.status))e(r);else if("function"==typeof u)try{return Promise.resolve(u(n,null,r)).then(function(t){t?c(n,null,r):e(r)}).catch(t)}catch(e){t(e)}else n<a?c(n,null,r):e(r)}).catch(function(e){if("function"==typeof u)try{Promise.resolve(u(n,e,null)).then(function(r){r?c(n,e,null):t(e)}).catch(function(e){t(e)})}catch(e){t(e)}else n<a?c(n,e,null):t(e)})};function c(e,t,r){setTimeout(function(){n(++e)},"function"==typeof o?o(e,t,r):o)}n(0)})}}},e.exports=t()},7803:function(e){"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),s=0;s<n.length;s++){var a=n[s],o=e[a];(i?-1!==t.indexOf(a):t(a,o,e))&&(r[a]=o)}return r}},2213:function(e,t,r){"use strict";var n=r(69358),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var n=0,i=e.length;n<i;n++)s.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))},o=function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)},u=function(e,t,r){for(var n in e)s.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))};e.exports=function(e,t,r){var s;if(!n(t))throw TypeError("iterator must be a function");arguments.length>=3&&(s=r),"[object Array]"===i.call(e)?a(e,t,s):"string"==typeof e?o(e,t,s):u(e,t,s)}},73531:function(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},i=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},s=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var a,o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw TypeError("Function.prototype.bind called on incompatible "+o);for(var u=i(arguments,1),c=r(0,o.length-u.length),l=[],d=0;d<c;d++)l[d]="$"+d;if(a=Function("binder","return function ("+s(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=o.apply(this,n(u,arguments));return Object(t)===t?t:this}return o.apply(e,n(u,arguments))}),o.prototype){var h=function(){};h.prototype=o.prototype,a.prototype=new h,h.prototype=null}return a}},49322:function(e,t,r){"use strict";var n=r(73531);e.exports=Function.prototype.bind||n},24282:function(e,t,r){"use strict";var n,i=r(31382),s=r(71800),a=r(58758),o=r(31392),u=r(81336),c=r(58328),l=r(50321),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var p=function(){throw new c},m=f?function(){try{return arguments.callee,p}catch(e){try{return f(arguments,"callee").get}catch(e){return p}}}():p,g=r(35120)(),y=r(97234)(),b=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,_={__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%":d,"%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%":a,"%ReferenceError%":o,"%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%":m,"%TypedArray%":w,"%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(e){var E=b(b(e));_["%Error.prototype%"]=E}var k=function e(t){var r;if("%AsyncFunction%"===t)r=h("async function () {}");else if("%GeneratorFunction%"===t)r=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=h("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return _[t]=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"]},S=r(49322),A=r(65288),C=S.call(Function.call,Array.prototype.concat),I=S.call(Function.apply,Array.prototype.splice),R=S.call(Function.call,String.prototype.replace),P=S.call(Function.call,String.prototype.slice),N=S.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,O=function(e){var t=P(e,0,1),r=P(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return R(e,M,function(e,t,r,i){n[n.length]=r?R(i,T,"$1"):t||e}),n},D=function(e,t){var r,n=e;if(A(x,n)&&(n="%"+(r=x[n])[0]+"%"),A(_,n)){var i=_[n];if(i===v&&(i=k(n)),void 0===i&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=O(e),n=r.length>0?r[0]:"",i=D("%"+n+"%",t),s=i.name,a=i.value,o=!1,l=i.alias;l&&(n=l[0],I(r,C([0,1],l)));for(var d=1,h=!0;d<r.length;d+=1){var p=r[d],m=P(p,0,1),g=P(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&h||(o=!0),n+="."+p,A(_,s="%"+n+"%"))a=_[s];else if(null!=a){if(!(p in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&d+1>=r.length){var y=f(a,p);a=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[p]}else h=A(a,p),a=a[p];h&&!o&&(_[s]=a)}}return a}},996:function(e,t,r){"use strict";var n=r(24282)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},34807:function(e,t,r){"use strict";var n=r(93221),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},97234:function(e){"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(t instanceof r)}},35120:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(33719);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},33719:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},82685:function(e,t,r){"use strict";var n=r(33719);e.exports=function(){return n()&&!!Symbol.toStringTag}},15334:function(e,t,r){t.utils=r(91546),t.common=r(7737),t.sha=r(49799),t.ripemd=r(64376),t.hmac=r(73057),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160},7737:function(e,t,r){"use strict";var n=r(91546),i=r(71703);function s(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=s,s.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},s.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},s.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(s=8,n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;s<this.padLength;s++)n[i++]=0;return n}},73057:function(e,t,r){"use strict";var n=r(91546),i=r(71703);function s(e,t,r){if(!(this instanceof s))return new s(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=s,s.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(t=0,this.inner=new this.Hash().update(e);t<e.length;t++)e[t]^=106;this.outer=new this.Hash().update(e)},s.prototype.update=function(e,t){return this.inner.update(e,t),this},s.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},64376:function(e,t,r){"use strict";var n=r(91546),i=r(7737),s=n.rotl32,a=n.sum32,o=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],g=r,y=n,b=i,v=c,w=l,_=0;_<80;_++){var E,k,x=a(s(u(r,d(_,n,i,c),e[h[_]+t],(E=_)<=15?0:E<=31?1518500249:E<=47?1859775393:E<=63?2400959708:2840853838),p[_]),l);r=l,l=c,c=s(i,10),i=n,n=x,x=a(s(u(g,d(79-_,y,b,v),e[f[_]+t],(k=_)<=15?1352829926:k<=31?1548603684:k<=47?1836072691:k<=63?2053994217:0),m[_]),w),g=w,w=v,v=s(b,10),b=y,y=x}x=o(this.h[1],i,v),this.h[1]=o(this.h[2],c,w),this.h[2]=o(this.h[3],l,g),this.h[3]=o(this.h[4],r,y),this.h[4]=o(this.h[0],n,b),this.h[0]=x},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},49799:function(e,t,r){"use strict";t.sha1=r(88639),t.sha224=r(45466),t.sha256=r(8769),t.sha384=r(7448),t.sha512=r(15012)},88639:function(e,t,r){"use strict";var n=r(91546),i=r(7737),s=r(83113),a=n.rotl32,o=n.sum32,u=n.sum32_5,c=s.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}n.inherits(h,l),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],s=this.h[1],l=this.h[2],h=this.h[3],f=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(a(i,5),c(p,s,l,h),f,r[n],d[p]);f=h,h=l,l=a(s,30),s=i,i=m}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],s),this.h[2]=o(this.h[2],l),this.h[3]=o(this.h[3],h),this.h[4]=o(this.h[4],f)},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},45466:function(e,t,r){"use strict";var n=r(91546),i=r(8769);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(s,i),e.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},8769:function(e,t,r){"use strict";var n=r(91546),i=r(7737),s=r(83113),a=r(71703),o=n.sum32,u=n.sum32_4,c=n.sum32_5,l=s.ch32,d=s.maj32,h=s.s0_256,f=s.s1_256,p=s.g0_256,m=s.g1_256,g=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=Array(64)}n.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],s=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var E=c(_,f(b),l(b,v,w),this.k[n],r[n]),k=o(h(i),d(i,s,g));_=w,w=v,v=b,b=o(y,E),y=g,g=s,s=i,i=o(E,k)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],s),this.h[2]=o(this.h[2],g),this.h[3]=o(this.h[3],y),this.h[4]=o(this.h[4],b),this.h[5]=o(this.h[5],v),this.h[6]=o(this.h[6],w),this.h[7]=o(this.h[7],_)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7448:function(e,t,r){"use strict";var n=r(91546),i=r(15012);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(s,i),e.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},15012:function(e,t,r){"use strict";var n=r(91546),i=r(7737),s=r(71703),a=n.rotr64_hi,o=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,d=n.sum64_hi,h=n.sum64_lo,f=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=Array(160)}n.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=function(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}(r[n-4],r[n-3]),s=function(e,t){var r=o(e,t,19)^o(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}(r[n-4],r[n-3]),l=r[n-14],d=r[n-13],h=function(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}(r[n-30],r[n-29]),m=function(e,t){var r=o(e,t,1)^o(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}(r[n-30],r[n-29]),g=r[n-32],y=r[n-31];r[n]=f(i,s,l,d,h,m,g,y),r[n+1]=p(i,s,l,d,h,m,g,y)}},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],u=this.h[2],c=this.h[3],f=this.h[4],p=this.h[5],y=this.h[6],b=this.h[7],v=this.h[8],w=this.h[9],_=this.h[10],E=this.h[11],k=this.h[12],x=this.h[13],S=this.h[14],A=this.h[15];s(this.k.length===r.length);for(var C=0;C<r.length;C+=2){var I=S,R=A,P=function(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}(v,w),N=function(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}(v,w),M=function(e,t,r,n,i){var s=e&r^~e&i;return s<0&&(s+=4294967296),s}(v,0,_,0,k,x),T=function(e,t,r,n,i,s){var a=t&n^~t&s;return a<0&&(a+=4294967296),a}(0,w,0,E,0,x),O=this.k[C],D=this.k[C+1],L=r[C],B=r[C+1],q=m(I,R,P,N,M,T,O,D,L,B),z=g(I,R,P,N,M,T,O,D,L,B);I=function(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}(n,i);var U=d(I,R=function(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}(n,i),P=function(e,t,r,n,i){var s=e&r^e&i^r&i;return s<0&&(s+=4294967296),s}(n,0,u,0,f,p),N=function(e,t,r,n,i,s){var a=t&n^t&s^n&s;return a<0&&(a+=4294967296),a}(0,i,0,c,0,p)),j=h(I,R,P,N);S=k,A=x,k=_,x=E,_=v,E=w,v=d(y,b,q,z),w=h(b,b,q,z),y=f,b=p,f=u,p=c,u=n,c=i,n=d(q,z,U,j),i=h(q,z,U,j)}l(this.h,0,n,i),l(this.h,2,u,c),l(this.h,4,f,p),l(this.h,6,y,b),l(this.h,8,v,w),l(this.h,10,_,E),l(this.h,12,k,x),l(this.h,14,S,A)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},83113:function(e,t,r){"use strict";var n=r(91546).rotr32;function i(e,t,r){return e&t^e&r^t&r}t.ft_1=function(e,t,r,n){return 0===e?t&r^~t&n:1===e||3===e?t^r^n:2===e?i(t,r,n):void 0},t.ch32=function(e,t,r){return e&t^~e&r},t.maj32=i,t.p32=function(e,t,r){return e^t^r},t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},91546:function(e,t,r){"use strict";var n=r(71703),i=r(96154);function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function o(e){if(7===e.length)return"0"+e;if(6===e.length)return"00"+e;if(5===e.length)return"000"+e;if(4===e.length)return"0000"+e;if(3===e.length)return"00000"+e;if(2===e.length)return"000000"+e;if(1===e.length)return"0000000"+e;else return e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e){if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s,a,o=e.charCodeAt(i);o<128?r[n++]=o:(o<2048?r[n++]=o>>6|192:((s=e,a=i,(64512&s.charCodeAt(a))!=55296||a<0||a+1>=s.length?1:(64512&s.charCodeAt(a+1))!=56320)?r[n++]=o>>12|224:(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128),r[n++]=o>>6&63|128),r[n++]=63&o|128)}}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=o(i.toString(16))}return r},t.zero2=a,t.zero8=o,t.join32=function(e,t,r,i){var s,a=r-t;n(a%4==0);for(var o=Array(a/4),u=0,c=t;u<o.length;u++,c+=4)s="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],o[u]=s>>>0;return o},t.split32=function(e,t){for(var r=Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var s=e[n];"big"===t?(r[i]=s>>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=255&s):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=255&s)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],s=n+e[t+1]>>>0;e[t]=(s<n?1:0)+r+i>>>0,e[t+1]=s},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,s,a,o){var u,c=t;return e+r+i+a+(0+((c=c+n>>>0)<t?1:0)+((c=c+s>>>0)<s?1:0)+((c=c+o>>>0)<o?1:0))>>>0},t.sum64_4_lo=function(e,t,r,n,i,s,a,o){return t+n+s+o>>>0},t.sum64_5_hi=function(e,t,r,n,i,s,a,o,u,c){var l,d=t;return e+r+i+a+u+(0+((d=d+n>>>0)<t?1:0)+((d=d+s>>>0)<s?1:0)+((d=d+o>>>0)<o?1:0)+((d=d+c>>>0)<c?1:0))>>>0},t.sum64_5_lo=function(e,t,r,n,i,s,a,o,u,c){return t+n+s+o+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},65288:function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,s=r(49322);e.exports=s.call(n,i)},91103:function(e,t,r){"use strict";var n=r(15334),i=r(98613),s=r(71703);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),s(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},31432:function(e,t){t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,c=u>>1,l=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,s=f&(1<<-l)-1,f>>=-l,l+=o;l>0;s=256*s+e[t+d],d+=h,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=c}return(f?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,c=8*s-i-1,l=(1<<c)-1,d=l>>1,h=23===i?5960464477539062e-23:0,f=n?0:s-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(o=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+d>=1?t+=h/u:t+=h*Math.pow(2,1-d),t*u>=2&&(a++,u/=2),a+d>=l?(o=0,a=l):a+d>=1?(o=(t*u-1)*Math.pow(2,i),a+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=p,o/=256,i-=8);for(a=a<<i|o,c+=i;c>0;e[r+f]=255&a,f+=p,a/=256,c-=8);e[r+f-p]|=128*m}},42311:function(e,t){t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,c=u>>1,l=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,s=f&(1<<-l)-1,f>>=-l,l+=o;l>0;s=256*s+e[t+d],d+=h,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=c}return(f?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,c=8*s-i-1,l=(1<<c)-1,d=l>>1,h=23===i?5960464477539062e-23:0,f=n?0:s-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(o=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+d>=1?t+=h/u:t+=h*Math.pow(2,1-d),t*u>=2&&(a++,u/=2),a+d>=l?(o=0,a=l):a+d>=1?(o=(t*u-1)*Math.pow(2,i),a+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=p,o/=256,i-=8);for(a=a<<i|o,c+=i;c>0;e[r+f]=255&a,f+=p,a/=256,c-=8);e[r+f-p]|=128*m}},96154:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},45182:function(e,t,r){"use strict";var n=r(82685)(),i=r(51362)("Object.prototype.toString"),s=function(e){return(!n||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===i(e)},a=function(e){return!!s(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},o=function(){return s(arguments)}();s.isLegacyArguments=a,e.exports=o?s:a},69358:function(e){"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,t)}catch(e){e!==r&&(i=null)}else i=null;var s=/^\s*class\b/,a=function(e){try{var t=n.call(e);return s.test(t)}catch(e){return!1}},o=function(e){try{if(a(e))return!1;return n.call(e),!0}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),d=function(){return!1};if("object"==typeof document){var h=document.all;u.call(h)===u.call(document.all)&&(d=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(d(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&o(e)}:function(e){if(d(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(c)return o(e);if(a(e))return!1;var t=u.call(e);return!!("[object Function]"===t||"[object GeneratorFunction]"===t||/^\[object HTML/.test(t))&&o(e)}},91073:function(e,t,r){"use strict";var n,i=Object.prototype.toString,s=Function.prototype.toString,a=/^\s*(?:function)?\*/,o=r(82685)(),u=Object.getPrototypeOf,c=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch(e){}};e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(s.call(e)))return!0;if(!o)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=c();n=!!t&&u(t)}return u(e)===n}},31941:function(e,t,r){"use strict";var n=r(51778);e.exports=function(e){return!!n(e)}},89424:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},56325:function(e,t){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,i){if(e===i)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(i))return!1;if(!0===t(e)){if(e.length!==i.length)return!1;for(var s=0;s<e.length;s++)if(!1===n(e[s],i[s]))return!1;return!0}if(!0===r(e)){var a={};for(var o in e)if(hasOwnProperty.call(e,o)){if(!1===n(e[o],i[o]))return!1;a[o]=!0}for(var u in i)if(hasOwnProperty.call(i,u)&&!0!==a[u])return!1;return!0}return!1}function i(e){if(""===e||!1===e||null===e||t(e)&&0===e.length)return!0;if(!r(e))return!1;for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}s="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var s,a={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},o="UnquotedIdentifier",u="QuotedIdentifier",c="Rbracket",l="Rparen",d="Comma",h="Colon",f="Rbrace",p="Number",m="Current",g="Expref",y="Pipe",b="Flatten",v="Star",w="Filter",_="Lbrace",E="Lbracket",k="Lparen",x="Literal",S={".":"Dot","*":v,",":d,":":h,"{":_,"}":f,"]":c,"(":k,")":l,"@":m},A={"<":!0,">":!0,"=":!0,"!":!0},C={" ":!0,"	":!0,"\n":!0};function I(e){return e>="0"&&e<="9"||"-"===e}function R(){}R.prototype={tokenize:function(e){var t,r,n,i,s=[];for(this._current=0;this._current<e.length;)if((t=e[this._current])>="a"&&t<="z"||t>="A"&&t<="Z"||"_"===t)r=this._current,n=this._consumeUnquotedIdentifier(e),s.push({type:o,value:n,start:r});else if(void 0!==S[e[this._current]])s.push({type:S[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(I(e[this._current]))i=this._consumeNumber(e),s.push(i);else if("["===e[this._current])i=this._consumeLBracket(e),s.push(i);else if('"'===e[this._current])r=this._current,n=this._consumeQuotedIdentifier(e),s.push({type:u,value:n,start:r});else if("'"===e[this._current])r=this._current,n=this._consumeRawStringLiteral(e),s.push({type:x,value:n,start:r});else if("`"===e[this._current]){r=this._current;var a=this._consumeLiteral(e);s.push({type:x,value:a,start:r})}else if(void 0!==A[e[this._current]])s.push(this._consumeOperator(e));else if(void 0!==C[e[this._current]])this._current++;else if("&"===e[this._current])r=this._current,this._current++,"&"===e[this._current]?(this._current++,s.push({type:"And",value:"&&",start:r})):s.push({type:g,value:"&",start:r});else if("|"===e[this._current])r=this._current,this._current++,"|"===e[this._current]?(this._current++,s.push({type:"Or",value:"||",start:r})):s.push({type:y,value:"|",start:r});else{var c=Error("Unknown character:"+e[this._current]);throw c.name="LexerError",c}return s},_consumeUnquotedIdentifier:function(e){var t,r=this._current;for(this._current++;this._current<e.length&&((t=e[this._current])>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(r,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var r=e.length;'"'!==e[this._current]&&this._current<r;){var n=this._current;"\\"===e[n]&&("\\"===e[n+1]||'"'===e[n+1])?n+=2:n++,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var r=e.length;"'"!==e[this._current]&&this._current<r;){var n=this._current;"\\"===e[n]&&("\\"===e[n+1]||"'"===e[n+1])?n+=2:n++,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var r=e.length;I(e[this._current])&&this._current<r;)this._current++;return{type:p,value:parseInt(e.slice(t,this._current)),start:t}},_consumeLBracket:function(e){var t=this._current;return(this._current++,"?"===e[this._current])?(this._current++,{type:w,value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:b,value:"[]",start:t}):{type:E,value:"[",start:t}},_consumeOperator:function(e){var t=this._current,r=e[t];return(this._current++,"!"===r)?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===r?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current<n;){var i=this._current;"\\"===e[i]&&("\\"===e[i+1]||"`"===e[i+1])?i+=2:i++,this._current=i}var a=s(e.slice(r,this._current));return a=a.replace("\\`","`"),t=this._looksLikeJSON(a)?JSON.parse(a):JSON.parse('"'+a+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if('[{"'.indexOf(e[0])>=0||["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var P={};function N(){}function M(e){this.runtime=e}function T(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[0]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[0]}]},contains:{_func:this._functionContains,_signature:[{types:[2,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[2]},{types:[2]}]},floor:{_func:this._functionFloor,_signature:[{types:[0]}]},length:{_func:this._functionLength,_signature:[{types:[2,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[2]},{types:[2]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[2]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[2,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}P.EOF=0,P[o]=0,P[u]=0,P[c]=0,P[l]=0,P[d]=0,P[f]=0,P[p]=0,P[m]=0,P[g]=0,P[y]=1,P.Or=2,P.And=3,P.EQ=5,P.GT=5,P.LT=5,P.GTE=5,P.LTE=5,P.NE=5,P[b]=9,P[v]=20,P[w]=21,P.Dot=40,P.Not=45,P[_]=50,P[E]=55,P[k]=60,N.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=new R().tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e<P[n];)this._advance(),r=this.led(n,r),n=this._lookahead(0);return r},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){switch(e.type){case x:return{type:"Literal",value:e.value};case o:return{type:"Field",name:e.value};case u:var t,r,n={type:"Field",name:e.value};if(this._lookahead(0)===k)throw Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(P.Not)]};case v:return t=null,{type:"ValueProjection",children:[{type:"Identity"},t=this._lookahead(0)===c?{type:"Identity"}:this._parseProjectionRHS(P.Star)]};case w:return this.led(e.type,{type:"Identity"});case _:return this._parseMultiselectHash();case b:return{type:"Projection",children:[{type:b,children:[{type:"Identity"}]},t=this._parseProjectionRHS(P.Flatten)]};case E:if(this._lookahead(0)===p||this._lookahead(0)===h)return t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t);if(this._lookahead(0)===v&&this._lookahead(1)===c)return this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(P.Star)]};return this._parseMultiselectList();case m:return{type:m};case g:return{type:"ExpressionReference",children:[r=this.expression(P.Expref)]};case k:for(var i=[];this._lookahead(0)!==l;)this._lookahead(0)===m?(r={type:m},this._advance()):r=this.expression(0),i.push(r);return this._match(l),i[0];default:this._errorToken(e)}},led:function(e,t){var r;switch(e){case"Dot":var n=P.Dot;if(this._lookahead(0)!==v)return{type:"Subexpression",children:[t,r=this._parseDotRHS(n)]};return this._advance(),{type:"ValueProjection",children:[t,r=this._parseProjectionRHS(n)]};case y:return{type:y,children:[t,r=this.expression(P.Pipe)]};case"Or":return{type:"OrExpression",children:[t,r=this.expression(P.Or)]};case"And":return{type:"AndExpression",children:[t,r=this.expression(P.And)]};case k:for(var i,s=t.name,a=[];this._lookahead(0)!==l;)this._lookahead(0)===m?(i={type:m},this._advance()):i=this.expression(0),this._lookahead(0)===d&&this._match(d),a.push(i);return this._match(l),{type:"Function",name:s,children:a};case w:var o=this.expression(0);return this._match(c),{type:"FilterProjection",children:[t,r=this._lookahead(0)===b?{type:"Identity"}:this._parseProjectionRHS(P.Filter),o]};case b:return{type:"Projection",children:[{type:b,children:[t]},this._parseProjectionRHS(P.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case E:var u=this._lookaheadToken(0);if(u.type===p||u.type===h)return r=this._parseIndexExpression(),this._projectIfSlice(t,r);return this._match(v),this._match(c),{type:"Projection",children:[t,r=this._parseProjectionRHS(P.Star)]};default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)===e)this._advance();else{var t=Error("Expected "+e+", got: "+this._lookaheadToken(0).type);throw t.name="ParserError",t}},_errorToken:function(e){var t=Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if(this._lookahead(0)===h||this._lookahead(1)===h)return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(c),e},_projectIfSlice:function(e,t){var r={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[r,this._parseProjectionRHS(P.Star)]}:r},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,r=this._lookahead(0);r!==c&&t<3;){if(r===h)t++,this._advance();else if(r===p)e[t]=this._lookaheadToken(0).value,this._advance();else{var n=this._lookahead(0),i=Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw i.name="Parsererror",i}r=this._lookahead(0)}return this._match(c),{type:"Slice",children:e}},_parseComparator:function(e,t){var r=this.expression(P[t]);return{type:"Comparator",name:t,children:[e,r]}},_parseDotRHS:function(e){var t=this._lookahead(0);return[o,u,v].indexOf(t)>=0?this.expression(e):t===E?(this._match(E),this._parseMultiselectList()):t===_?(this._match(_),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(P[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===E)t=this.expression(e);else if(this._lookahead(0)===w)t=this.expression(e);else if("Dot"===this._lookahead(0))this._match("Dot"),t=this._parseDotRHS(e);else{var r=this._lookaheadToken(0),n=Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==c;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===d&&(this._match(d),this._lookahead(0)===c))throw Error("Unexpected token Rbracket")}return this._match(c),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n=[],i=[o,u];;){if(e=this._lookaheadToken(0),0>i.indexOf(e.type))throw Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match(h),r={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(r),this._lookahead(0)===d)this._match(d);else if(this._lookahead(0)===f){this._match(f);break}}return{type:"MultiSelectHash",children:n}}},M.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,s){switch(e.type){case"Field":if(null!==s&&r(s)&&void 0!==(d=s[e.name]))return d;return null;case"Subexpression":for(p=1,u=this.visit(e.children[0],s);p<e.children.length;p++)if(null===(u=this.visit(e.children[1],u)))return null;return u;case"IndexExpression":return h=this.visit(e.children[0],s),this.visit(e.children[1],h);case"Index":if(!t(s))return null;var a,o,u,c,l,d,h,f,p,v,w=e.value;return w<0&&(w=s.length+w),void 0===(u=s[w])&&(u=null),u;case"Slice":if(!t(s))return null;var _=e.children.slice(0),E=this.computeSliceParams(s.length,_),k=E[0],x=E[1],S=E[2];if(u=[],S>0)for(p=k;p<x;p+=S)u.push(s[p]);else for(p=k;p>x;p+=S)u.push(s[p]);return u;case"Projection":var A=this.visit(e.children[0],s);if(!t(A))return null;for(p=0,f=[];p<A.length;p++)null!==(o=this.visit(e.children[1],A[p]))&&f.push(o);return f;case"ValueProjection":if(!r(A=this.visit(e.children[0],s)))return null;f=[];var C=function(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}(A);for(p=0;p<C.length;p++)null!==(o=this.visit(e.children[1],C[p]))&&f.push(o);return f;case"FilterProjection":if(!t(A=this.visit(e.children[0],s)))return null;var I=[],R=[];for(p=0;p<A.length;p++)i(a=this.visit(e.children[2],A[p]))||I.push(A[p]);for(var P=0;P<I.length;P++)null!==(o=this.visit(e.children[1],I[P]))&&R.push(o);return R;case"Comparator":switch(c=this.visit(e.children[0],s),l=this.visit(e.children[1],s),e.name){case"EQ":u=n(c,l);break;case"NE":u=!n(c,l);break;case"GT":u=c>l;break;case"GTE":u=c>=l;break;case"LT":u=c<l;break;case"LTE":u=c<=l;break;default:throw Error("Unknown comparator: "+e.name)}return u;case b:var N=this.visit(e.children[0],s);if(!t(N))return null;var M=[];for(p=0;p<N.length;p++)t(o=N[p])?M.push.apply(M,o):M.push(o);return M;case"Identity":return s;case"MultiSelectList":if(null===s)return null;for(p=0,f=[];p<e.children.length;p++)f.push(this.visit(e.children[p],s));return f;case"MultiSelectHash":if(null===s)return null;for(p=0,f={};p<e.children.length;p++)f[(v=e.children[p]).name]=this.visit(v.value,s);return f;case"OrExpression":return i(a=this.visit(e.children[0],s))&&(a=this.visit(e.children[1],s)),a;case"AndExpression":if(!0===i(c=this.visit(e.children[0],s)))return c;return this.visit(e.children[1],s);case"NotExpression":return i(c=this.visit(e.children[0],s));case"Literal":return e.value;case y:return h=this.visit(e.children[0],s),this.visit(e.children[1],h);case m:return s;case"Function":var T=[];for(p=0;p<e.children.length;p++)T.push(this.visit(e.children[p],s));return this.runtime.callFunction(e.name,T);case"ExpressionReference":var O=e.children[0];return O.jmespathType=g,O;default:throw Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var r=t[0],n=t[1],i=t[2],s=[null,null,null];if(null===i)i=1;else if(0===i){var a=Error("Invalid slice, step cannot be 0");throw a.name="RuntimeError",a}var o=i<0;return r=null===r?o?e-1:0:this.capSliceRange(e,r,i),n=null===n?o?-1:e:this.capSliceRange(e,n,i),s[0]=r,s[1]=n,s[2]=i,s},capSliceRange:function(e,t,r){return t<0?(t+=e)<0&&(t=r<0?-1:0):t>=e&&(t=r<0?e-1:e),t}},T.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){if(r[r.length-1].variadic){if(t.length<r.length)throw n=1===r.length?" argument":" arguments",Error("ArgumentError: "+e+"() takes at least"+r.length+n+" but received "+t.length)}else if(t.length!==r.length)throw n=1===r.length?" argument":" arguments",Error("ArgumentError: "+e+"() takes "+r.length+n+" but received "+t.length);for(var n,i,s,o,u=0;u<r.length;u++){o=!1,i=r[u].types,s=this._getTypeName(t[u]);for(var c=0;c<i.length;c++)if(this._typeMatches(s,i[c],t[u])){o=!0;break}if(!o)throw Error("TypeError: "+e+"() expected argument "+(u+1)+" to be type "+i.map(function(e){return a[e]}).join(",")+" but received type "+a[s]+" instead.")}},_typeMatches:function(e,t,r){if(1===t)return!0;if(9!==t&&8!==t&&3!==t)return e===t;if(3===t)return 3===e;if(3===e){var n;8===t?n=0:9===t&&(n=2);for(var i=0;i<r.length;i++)if(!this._typeMatches(this._getTypeName(r[i]),n,r[i]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return 2;case"[object Number]":return 0;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":if(e.jmespathType===g)return 6;return 4}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],r=e[1];return -1!==t.indexOf(r,t.length-r.length)},_functionReverse:function(e){if(2===this._getTypeName(e[0])){for(var t=e[0],r="",n=t.length-1;n>=0;n--)r+=t[n];return r}var i=e[0].slice(0);return i.reverse(),i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t/r.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],i=e[1],s=0;s<i.length;s++)t.push(r.visit(n,i[s]));return t},_functionMerge:function(e){for(var t={},r=0;r<e.length;r++){var n=e[r];for(var i in n)t[i]=n[i]}return t},_functionMax:function(e){if(!(e[0].length>0))return null;if(0===this._getTypeName(e[0][0]))return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)0>r.localeCompare(t[n])&&(r=t[n]);return r},_functionMin:function(e){if(!(e[0].length>0))return null;if(0===this._getTypeName(e[0][0]))return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)0>t[n].localeCompare(r)&&(r=t[n]);return r},_functionSum:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case 0:return"number";case 2:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],r=Object.keys(t),n=[],i=0;i<r.length;i++)n.push(t[r[i]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return 3===this._getTypeName(e[0])?e[0]:[e[0]]},_functionToString:function(e){return 2===this._getTypeName(e[0])?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,r=this._getTypeName(e[0]);return 0===r?e[0]:2!==r||isNaN(t=+e[0])?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var r=this._interpreter,n=e[1],i=this._getTypeName(r.visit(n,t[0]));if(0>[0,2].indexOf(i))throw Error("TypeError");for(var s=this,a=[],o=0;o<t.length;o++)a.push([o,t[o]]);a.sort(function(e,t){var a=r.visit(n,e[1]),o=r.visit(n,t[1]);if(s._getTypeName(a)!==i)throw Error("TypeError: expected "+i+", received "+s._getTypeName(a));if(s._getTypeName(o)!==i)throw Error("TypeError: expected "+i+", received "+s._getTypeName(o));return a>o?1:a<o?-1:e[0]-t[0]});for(var u=0;u<a.length;u++)t[u]=a[u][1];return t},_functionMaxBy:function(e){for(var t,r,n=e[1],i=e[0],s=this.createKeyFunction(n,[0,2]),a=-1/0,o=0;o<i.length;o++)(r=s(i[o]))>a&&(a=r,t=i[o]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],i=e[0],s=this.createKeyFunction(n,[0,2]),a=1/0,o=0;o<i.length;o++)(r=s(i[o]))<a&&(a=r,t=i[o]);return t},createKeyFunction:function(e,t){var r=this,n=this._interpreter;return function(i){var s=n.visit(e,i);if(0>t.indexOf(r._getTypeName(s)))throw Error("TypeError: expected one of "+t+", received "+r._getTypeName(s));return s}}},e.tokenize=function(e){return new R().tokenize(e)},e.compile=function(e){return new N().parse(e)},e.search=function(e,t){var r=new N,n=new T,i=new M(n);n._interpreter=i;var s=r.parse(t);return i.search(s,e)},e.strictDeepEqual=n}(t)},85607:function(e,t,r){var n,i=r(21169);!function(){"use strict";var s="input is invalid type",a="object"==typeof window,o=a?window:{};o.JS_SHA3_NO_WINDOW&&(a=!1);var u=!a&&"object"==typeof self;!o.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?o=r.g:u&&(o=self);var c=!o.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,d=!o.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),f=[4,1024,262144,67108864],p=[0,8,16,24],m=[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],g=[224,256,384,512],y=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),d&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},_=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,s){return C["cshake"+e].update(t,n,i,s)[r]()}},k=function(e,t,r){return function(t,n,i,s){return C["kmac"+e].update(t,n,i,s)[r]()}},x=function(e,t,r,n){for(var i=0;i<b.length;++i){var s=b[i];e[s]=t(r,n,s)}return e},S=function(e,t){var r=w(e,t,"hex");return r.create=function(){return new D(e,t,e)},r.update=function(e){return r.create().update(e)},x(r,w,e,t)},A=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:y,createMethod:function(e,t){var r=_(e,t,"hex");return r.create=function(r){return new D(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},x(r,_,e,t)}},{name:"cshake",padding:f,bits:y,createMethod:function(e,t){var r=v[e],n=E(e,t,"hex");return n.create=function(n,i,s){return i||s?new D(e,t,n).bytepad([i,s],r):C["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},x(n,E,e,t)}},{name:"kmac",padding:f,bits:y,createMethod:function(e,t){var r=v[e],n=k(e,t,"hex");return n.create=function(n,i,s){return new L(e,t,i).bytepad(["KMAC",s],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},x(n,k,e,t)}}],C={},I=[],R=0;R<A.length;++R)for(var P=A[R],N=P.bits,M=0;M<N.length;++M){var T=P.name+"_"+N[M];if(I.push(T),C[T]=P.createMethod(N[M],P.padding),"sha3"!==P.name){var O=P.name+N[M];I.push(O),C[O]=C[T]}}function D(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(s);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw Error(s)}else throw Error(s);t=!0}for(var n,i,a=this.blocks,o=this.byteCount,u=e.length,c=this.blockCount,l=0,h=this.s;l<u;){if(this.reset)for(n=1,this.reset=!1,a[0]=this.block;n<c+1;++n)a[n]=0;if(t)for(n=this.start;l<u&&n<o;++l)a[n>>2]|=e[l]<<p[3&n++];else for(n=this.start;l<u&&n<o;++l)(i=e.charCodeAt(l))<128?a[n>>2]|=i<<p[3&n++]:(i<2048?a[n>>2]|=(192|i>>6)<<p[3&n++]:(i<55296||i>=57344?a[n>>2]|=(224|i>>12)<<p[3&n++]:(i=65536+((1023&i)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|i>>18)<<p[3&n++],a[n>>2]|=(128|i>>12&63)<<p[3&n++]),a[n>>2]|=(128|i>>6&63)<<p[3&n++]),a[n>>2]|=(128|63&i)<<p[3&n++]);if(this.lastByteIndex=n,n>=o){for(this.start=n-o,this.block=a[c],n=0;n<c;++n)h[n]^=a[n];B(h),this.reset=!0}else this.start=n}return this},D.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(e>>=8,r=255&e;r>0;)i.unshift(r),e>>=8,r=255&e,++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(s);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw Error(s)}else throw Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);o<128?n+=1:o<2048?n+=2:o<55296||o>=57344?n+=3:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,s=[];return s.length=i,this.update(s),this},D.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(t=1,e[0]=e[r];t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];B(n)}},D.prototype.toString=D.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,s=0,a=0,o="";a<n;){for(s=0;s<t&&a<n;++s,++a)o+=h[(e=r[s])>>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t==0&&(B(r),s=0)}return i&&(o+=h[(e=r[s])>>4&15]+h[15&e],i>1&&(o+=h[e>>12&15]+h[e>>8&15]),i>2&&(o+=h[e>>20&15]+h[e>>16&15])),o},D.prototype.arrayBuffer=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,s=0,a=0,o=this.outputBits>>3,u=new Uint32Array(e=new ArrayBuffer(i?n+1<<2:o));a<n;){for(s=0;s<t&&a<n;++s,++a)u[a]=r[s];a%t==0&&B(r)}return i&&(u[s]=r[s],e=e.slice(0,o)),e},D.prototype.buffer=D.prototype.arrayBuffer,D.prototype.digest=D.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,s=this.extraBytes,a=0,o=0,u=[];o<i;){for(a=0;a<r&&o<i;++a,++o)e=o<<2,t=n[a],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%r==0&&B(n)}return s&&(e=o<<2,t=n[a],u[e]=255&t,s>1&&(u[e+1]=t>>8&255),s>2&&(u[e+2]=t>>16&255)),u},L.prototype=new D,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var B=function(e){var t,r,n,i,s,a,o,u,c,l,d,h,f,p,g,y,b,v,w,_,E,k,x,S,A,C,I,R,P,N,M,T,O,D,L,B,q,z,U,j,F,H,$,W,G,V,K,Z,Y,J,Q,X,ee,et,er,en,ei,es,ea,eo,eu,ec,el;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],f=e[9]^e[19]^e[29]^e[39]^e[49],t=h^(a<<1|o>>>31),r=f^(o<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=s^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|d>>>31),r=o^(d<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|f>>>31),r=c^(f<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|s>>>31),r=d^(s<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],g=e[1],V=e[11]<<4|e[10]>>>28,K=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,eo=e[31]<<9|e[30]>>>23,eu=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,$=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,L=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,N=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ec=e[42]<<2|e[43]>>>30,el=e[43]<<2|e[42]>>>30,et=e[5]<<30|e[4]>>>2,er=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,q=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,T=e[45]<<29|e[44]>>>3,O=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,en=e[17]<<23|e[16]>>>9,ei=e[16]<<23|e[17]>>>9,z=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,W=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,es=e[29]<<7|e[28]>>>25,ea=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=p^~y&v,e[1]=g^~b&w,e[10]=S^~C&R,e[11]=A^~I&P,e[20]=D^~B&z,e[21]=L^~q&U,e[30]=W^~V&Z,e[31]=G^~K&Y,e[40]=et^~en&es,e[41]=er^~ei&ea,e[2]=y^~v&_,e[3]=b^~w&E,e[12]=C^~R&N,e[13]=I^~P&M,e[22]=B^~z&j,e[23]=q^~U&F,e[32]=V^~Z&J,e[33]=K^~Y&Q,e[42]=en^~es&eo,e[43]=ei^~ea&eu,e[4]=v^~_&k,e[5]=w^~E&x,e[14]=R^~N&T,e[15]=P^~M&O,e[24]=z^~j&H,e[25]=U^~F&$,e[34]=Z^~J&X,e[35]=Y^~Q&ee,e[44]=es^~eo&ec,e[45]=ea^~eu&el,e[6]=_^~k&p,e[7]=E^~x&g,e[16]=N^~T&S,e[17]=M^~O&A,e[26]=j^~H&D,e[27]=F^~$&L,e[36]=J^~X&W,e[37]=Q^~ee&G,e[46]=eo^~ec&et,e[47]=eu^~el&er,e[8]=k^~p&y,e[9]=x^~g&b,e[18]=T^~S&C,e[19]=O^~A&I,e[28]=H^~D&B,e[29]=$^~L&q,e[38]=X^~W&V,e[39]=ee^~G&K,e[48]=ec^~et&en,e[49]=el^~er&ei,e[0]^=m[n],e[1]^=m[n+1]};if(c)e.exports=C;else{for(R=0;R<I.length;++R)o[I[R]]=C[I[R]];l&&void 0!==(n=(function(){return C}).call(t,r,t,e))&&(e.exports=n)}}()},66950:function(e,t,r){e.exports=r(89275)(r(76136))},89275:function(e,t,r){let n=r(87851),i=r(34652);e.exports=function(e){let t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw Error("Invald algorithm: "+e)}}}},87851:function(e,t,r){var n=r(53435).Buffer;let{Transform:i}=r(76591);e.exports=e=>class t extends i{constructor(t,r,n,i,s){super(s),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=s,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},34652:function(e,t,r){var n=r(53435).Buffer;let{Transform:i}=r(76591);e.exports=e=>class t extends i{constructor(t,r,n,i){super(i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},4953:function(e,t){let r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(let t=0;t<24;++t){let n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],o=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],h=e[9]^e[19]^e[29]^e[39]^e[49],f=d^(s<<1|a>>>31),p=h^(a<<1|s>>>31),m=e[0]^f,g=e[1]^p,y=e[10]^f,b=e[11]^p,v=e[20]^f,w=e[21]^p,_=e[30]^f,E=e[31]^p,k=e[40]^f,x=e[41]^p;f=n^(o<<1|u>>>31),p=i^(u<<1|o>>>31);let S=e[2]^f,A=e[3]^p,C=e[12]^f,I=e[13]^p,R=e[22]^f,P=e[23]^p,N=e[32]^f,M=e[33]^p,T=e[42]^f,O=e[43]^p;f=s^(c<<1|l>>>31),p=a^(l<<1|c>>>31);let D=e[4]^f,L=e[5]^p,B=e[14]^f,q=e[15]^p,z=e[24]^f,U=e[25]^p,j=e[34]^f,F=e[35]^p,H=e[44]^f,$=e[45]^p;f=o^(d<<1|h>>>31),p=u^(h<<1|d>>>31);let W=e[6]^f,G=e[7]^p,V=e[16]^f,K=e[17]^p,Z=e[26]^f,Y=e[27]^p,J=e[36]^f,Q=e[37]^p,X=e[46]^f,ee=e[47]^p;f=c^(n<<1|i>>>31),p=l^(i<<1|n>>>31);let et=e[8]^f,er=e[9]^p,en=e[18]^f,ei=e[19]^p,es=e[28]^f,ea=e[29]^p,eo=e[38]^f,eu=e[39]^p,ec=e[48]^f,el=e[49]^p,ed=b<<4|y>>>28,eh=y<<4|b>>>28,ef=v<<3|w>>>29,ep=w<<3|v>>>29,em=E<<9|_>>>23,eg=_<<9|E>>>23,ey=k<<18|x>>>14,eb=x<<18|k>>>14,ev=S<<1|A>>>31,ew=A<<1|S>>>31,e_=I<<12|C>>>20,eE=C<<12|I>>>20,ek=R<<10|P>>>22,ex=P<<10|R>>>22,eS=M<<13|N>>>19,eA=N<<13|M>>>19,eC=T<<2|O>>>30,eI=O<<2|T>>>30,eR=L<<30|D>>>2,eP=D<<30|L>>>2,eN=B<<6|q>>>26,eM=q<<6|B>>>26,eT=U<<11|z>>>21,eO=z<<11|U>>>21,eD=j<<15|F>>>17,eL=F<<15|j>>>17,eB=$<<29|H>>>3,eq=H<<29|$>>>3,ez=W<<28|G>>>4,eU=G<<28|W>>>4,ej=K<<23|V>>>9,eF=V<<23|K>>>9,eH=Z<<25|Y>>>7,e$=Y<<25|Z>>>7,eW=J<<21|Q>>>11,eG=Q<<21|J>>>11,eV=ee<<24|X>>>8,eK=X<<24|ee>>>8,eZ=et<<27|er>>>5,eY=er<<27|et>>>5,eJ=en<<20|ei>>>12,eQ=ei<<20|en>>>12,eX=ea<<7|es>>>25,e0=es<<7|ea>>>25,e1=eo<<8|eu>>>24,e2=eu<<8|eo>>>24,e3=ec<<14|el>>>18,e5=el<<14|ec>>>18;e[0]=m^~e_&eT,e[1]=g^~eE&eO,e[10]=ez^~eJ&ef,e[11]=eU^~eQ&ep,e[20]=ev^~eN&eH,e[21]=ew^~eM&e$,e[30]=eZ^~ed&ek,e[31]=eY^~eh&ex,e[40]=eR^~ej&eX,e[41]=eP^~eF&e0,e[2]=e_^~eT&eW,e[3]=eE^~eO&eG,e[12]=eJ^~ef&eS,e[13]=eQ^~ep&eA,e[22]=eN^~eH&e1,e[23]=eM^~e$&e2,e[32]=ed^~ek&eD,e[33]=eh^~ex&eL,e[42]=ej^~eX&em,e[43]=eF^~e0&eg,e[4]=eT^~eW&e3,e[5]=eO^~eG&e5,e[14]=ef^~eS&eB,e[15]=ep^~eA&eq,e[24]=eH^~e1&ey,e[25]=e$^~e2&eb,e[34]=ek^~eD&eV,e[35]=ex^~eL&eK,e[44]=eX^~em&eC,e[45]=e0^~eg&eI,e[6]=eW^~e3&m,e[7]=eG^~e5&g,e[16]=eS^~eB&ez,e[17]=eA^~eq&eU,e[26]=e1^~ey&ev,e[27]=e2^~eb&ew,e[36]=eD^~eV&eZ,e[37]=eL^~eK&eY,e[46]=em^~eC&eR,e[47]=eg^~eI&eP,e[8]=e3^~m&e_,e[9]=e5^~g&eE,e[18]=eB^~ez&eJ,e[19]=eq^~eU&eQ,e[28]=ey^~ev&eN,e[29]=eb^~ew&eM,e[38]=eV^~eZ&ed,e[39]=eK^~eY&eh,e[48]=eC^~eR&ej,e[49]=eI^~eP&eF,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},76136:function(e,t,r){var n=r(53435).Buffer;let i=r(4953);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(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},s.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},s.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,(128&e)!=0&&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(e){this.squeezing||this.absorbLastFewBits(1);let t=n.alloc(e);for(let r=0;r<e;++r)t[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 t},s.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=s},88061:function(e,t,r){var n=0/0,i=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt,c="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,l="object"==typeof self&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),h=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return d.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==h.call(t))return n;if(g(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=g(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var c=a.test(e);return c||o.test(e)?u(e.slice(2),c?2:8):s.test(e)?n:+e}e.exports=function(e,t,r){var n,i,s,a,o,u,c=0,l=!1,d=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var r=n,s=i;return n=i=void 0,c=t,a=e.apply(s,r)}function v(e){var r=e-u,n=e-c;return void 0===u||r>=t||r<0||d&&n>=s}function w(){var e,r,n,i=m();if(v(i))return _(i);o=setTimeout(w,(e=i-u,r=i-c,n=t-e,d?p(n,s-r):n))}function _(e){return(o=void 0,h&&n)?b(e):(n=i=void 0,a)}function E(){var e,r=m(),s=v(r);if(n=arguments,i=this,u=r,s){if(void 0===o)return c=e=u,o=setTimeout(w,t),l?b(e):a;if(d)return o=setTimeout(w,t),b(u)}return void 0===o&&(o=setTimeout(w,t)),a}return t=y(t)||0,g(r)&&(l=!!r.leading,s=(d="maxWait"in r)?f(y(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),E.cancel=function(){void 0!==o&&clearTimeout(o),c=0,n=u=i=o=void 0},E.flush=function(){return void 0===o?a:_(m())},E}},54802:function(e,t,r){e=r.nmd(e);var n,i,s,a="__lodash_hash_undefined__",o="[object Arguments]",u="[object Array]",c="[object Boolean]",l="[object Date]",d="[object Error]",h="[object Function]",f="[object Map]",p="[object Number]",m="[object Object]",g="[object Promise]",y="[object RegExp]",b="[object Set]",v="[object String]",w="[object WeakMap]",_="[object ArrayBuffer]",E="[object DataView]",k=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[o]=S[u]=S[_]=S[c]=S[E]=S[l]=S[d]=S[h]=S[f]=S[p]=S[m]=S[y]=S[b]=S[v]=S[w]=!1;var A="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,C="object"==typeof self&&self&&self.Object===Object&&self,I=A||C||Function("return this")(),R=t&&!t.nodeType&&t,P=R&&e&&!e.nodeType&&e,N=P&&P.exports===R,M=N&&A.process,T=function(){try{return M&&M.binding&&M.binding("util")}catch(e){}}(),O=T&&T.isTypedArray;function D(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function L(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var B=Array.prototype,q=Function.prototype,z=Object.prototype,U=I["__core-js_shared__"],j=q.toString,F=z.hasOwnProperty,H=(n=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",$=z.toString,W=RegExp("^"+j.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=N?I.Buffer:void 0,V=I.Symbol,K=I.Uint8Array,Z=z.propertyIsEnumerable,Y=B.splice,J=V?V.toStringTag:void 0,Q=Object.getOwnPropertySymbols,X=G?G.isBuffer:void 0,ee=(i=Object.keys,s=Object,function(e){return i(s(e))}),et=eS(I,"DataView"),er=eS(I,"Map"),en=eS(I,"Promise"),ei=eS(I,"Set"),es=eS(I,"WeakMap"),ea=eS(Object,"create"),eo=eI(et),eu=eI(er),ec=eI(en),el=eI(ei),ed=eI(es),eh=V?V.prototype:void 0,ef=eh?eh.valueOf:void 0;function ep(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function em(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eg(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ey(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eg;++t<r;)this.add(e[t])}function eb(e){var t=this.__data__=new em(e);this.size=t.size}function ev(e,t){for(var r=e.length;r--;)if(eR(e[r][0],t))return r;return -1}function ew(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=F.call(e,J),r=e[J];try{e[J]=void 0;var n=!0}catch(e){}var i=$.call(e);return n&&(t?e[J]=r:delete e[J]),i}(e):$.call(e)}function e_(e){return eL(e)&&ew(e)==o}function eE(e,t,r,n,i,s){var a=1&r,o=e.length,u=t.length;if(o!=u&&!(a&&u>o))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var l=-1,d=!0,h=2&r?new ey:void 0;for(s.set(e,t),s.set(t,e);++l<o;){var f=e[l],p=t[l];if(n)var m=a?n(p,f,l,t,e,s):n(f,p,l,e,t,s);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}(t,function(e,t){if(!h.has(t)&&(f===e||i(f,e,r,n,s)))return h.push(t)})){d=!1;break}}else if(!(f===p||i(f,p,r,n,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function ek(e){var t;return t=function(e){return null!=e&&eO(e.length)&&!eT(e)?function(e,t){var r,n=eN(e),i=!n&&eP(e),s=!n&&!i&&eM(e),a=!n&&!i&&!s&&eB(e),o=n||i||s||a,u=o?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=u.length;for(var l in e)F.call(e,l)&&!(o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||(r=null==(r=c)?9007199254740991:r)&&("number"==typeof l||x.test(l))&&l>-1&&l%1==0&&l<r))&&u.push(l);return u}(e):function(e){if(t=e&&e.constructor,e!==("function"==typeof t&&t.prototype||z))return ee(e);var t,r=[];for(var n in Object(e))F.call(e,n)&&"constructor"!=n&&r.push(n);return r}(e)}(e),eN(e)?t:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(t,eA(e))}function ex(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function eS(e,t){var r=null==e?void 0:e[t];return!(!eD(r)||H&&H in r)&&(eT(r)?W:k).test(eI(r))?r:void 0}ep.prototype.clear=function(){this.__data__=ea?ea(null):{},this.size=0},ep.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ep.prototype.get=function(e){var t=this.__data__;if(ea){var r=t[e];return r===a?void 0:r}return F.call(t,e)?t[e]:void 0},ep.prototype.has=function(e){var t=this.__data__;return ea?void 0!==t[e]:F.call(t,e)},ep.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ea&&void 0===t?a:t,this},em.prototype.clear=function(){this.__data__=[],this.size=0},em.prototype.delete=function(e){var t=this.__data__,r=ev(t,e);return!(r<0)&&(r==t.length-1?t.pop():Y.call(t,r,1),--this.size,!0)},em.prototype.get=function(e){var t=this.__data__,r=ev(t,e);return r<0?void 0:t[r][1]},em.prototype.has=function(e){return ev(this.__data__,e)>-1},em.prototype.set=function(e,t){var r=this.__data__,n=ev(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},eg.prototype.clear=function(){this.size=0,this.__data__={hash:new ep,map:new(er||em),string:new ep}},eg.prototype.delete=function(e){var t=ex(this,e).delete(e);return this.size-=t?1:0,t},eg.prototype.get=function(e){return ex(this,e).get(e)},eg.prototype.has=function(e){return ex(this,e).has(e)},eg.prototype.set=function(e,t){var r=ex(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ey.prototype.add=ey.prototype.push=function(e){return this.__data__.set(e,a),this},ey.prototype.has=function(e){return this.__data__.has(e)},eb.prototype.clear=function(){this.__data__=new em,this.size=0},eb.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eb.prototype.get=function(e){return this.__data__.get(e)},eb.prototype.has=function(e){return this.__data__.has(e)},eb.prototype.set=function(e,t){var r=this.__data__;if(r instanceof em){var n=r.__data__;if(!er||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eg(n)}return r.set(e,t),this.size=r.size,this};var eA=Q?function(e){return null==e?[]:function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}(Q(e=Object(e)),function(t){return Z.call(e,t)})}:function(){return[]},eC=ew;function eI(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eR(e,t){return e===t||e!=e&&t!=t}(et&&eC(new et(new ArrayBuffer(1)))!=E||er&&eC(new er)!=f||en&&eC(en.resolve())!=g||ei&&eC(new ei)!=b||es&&eC(new es)!=w)&&(eC=function(e){var t=ew(e),r=t==m?e.constructor:void 0,n=r?eI(r):"";if(n)switch(n){case eo:return E;case eu:return f;case ec:return g;case el:return b;case ed:return w}return t});var eP=e_(function(){return arguments}())?e_:function(e){return eL(e)&&F.call(e,"callee")&&!Z.call(e,"callee")},eN=Array.isArray,eM=X||function(){return!1};function eT(e){if(!eD(e))return!1;var t=ew(e);return t==h||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eO(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function eD(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eL(e){return null!=e&&"object"==typeof e}var eB=O?function(e){return O(e)}:function(e){return eL(e)&&eO(e.length)&&!!S[ew(e)]};e.exports=function(e,t){return function e(t,r,n,i,s){return t===r||(null!=t&&null!=r&&(eL(t)||eL(r))?function(e,t,r,n,i,s){var a=eN(e),h=eN(t),g=a?u:eC(e),w=h?u:eC(t);g=g==o?m:g,w=w==o?m:w;var k=g==m,x=w==m,S=g==w;if(S&&eM(e)){if(!eM(t))return!1;a=!0,k=!1}if(S&&!k)return s||(s=new eb),a||eB(e)?eE(e,t,r,n,i,s):function(e,t,r,n,i,s,a){switch(r){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case _:if(e.byteLength!=t.byteLength||!s(new K(e),new K(t)))break;return!0;case c:case l:case p:return eR(+e,+t);case d:return e.name==t.name&&e.message==t.message;case y:case v:return e==t+"";case f:var o=D;case b:var u=1&n;if(o||(o=L),e.size!=t.size&&!u)break;var h=a.get(e);if(h)return h==t;n|=2,a.set(e,t);var m=eE(o(e),o(t),n,i,s,a);return a.delete(e),m;case"[object Symbol]":if(ef)return ef.call(e)==ef.call(t)}return!1}(e,t,g,r,n,i,s);if(!(1&r)){var A=k&&F.call(e,"__wrapped__"),C=x&&F.call(t,"__wrapped__");if(A||C){var I=A?e.value():e,R=C?t.value():t;return s||(s=new eb),i(I,R,r,n,s)}}return!!S&&(s||(s=new eb),function(e,t,r,n,i,s){var a=1&r,o=ek(e),u=o.length;if(u!=ek(t).length&&!a)return!1;for(var c=u;c--;){var l=o[c];if(!(a?l in t:F.call(t,l)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var h=!0;s.set(e,t),s.set(t,e);for(var f=a;++c<u;){var p=e[l=o[c]],m=t[l];if(n)var g=a?n(m,p,l,t,e,s):n(p,m,l,e,t,s);if(!(void 0===g?p===m||i(p,m,r,n,s):g)){h=!1;break}f||(f="constructor"==l)}if(h&&!f){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,i,s))}(t,r,n,i,e,s):t!=t&&r!=r)}(e,t)}},67219:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(66399),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),a=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{color:o="currentColor",size:u=24,strokeWidth:c=2,absoluteStrokeWidth:l,className:d="",children:h,...f}=r;return(0,n.createElement)("svg",{ref:a,...i,width:u,height:u,stroke:o,strokeWidth:l?24*Number(c)/Number(u):c,className:["lucide","lucide-".concat(s(e)),d].join(" "),...f},[...t.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(h)?h:[h]])});return r.displayName="".concat(e),r}},55929:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(67219).Z)("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]])},92926:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(67219).Z)("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]])},71703:function(e){function t(e,t){if(!e)throw Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)}},98613:function(e,t){"use strict";function r(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),s=i>>8,a=255&i;s?r.push(s,a):r.push(a)}return r},t.zero2=r,t.toHex=n,t.encode=function(e,t){return"hex"===t?n(e):e}},36658:function(e,t,r){"use strict";r.d(t,{default:function(){return i.a}});var n=r(22393),i=r.n(n)},77970:function(e,t,r){!function(){var t={452:function(e){"use strict";e.exports=r(58348)}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}},a=!0;try{t[e](s,s.exports,i),a=!1}finally{a&&delete n[e]}return s.exports}i.ab="//";var s={};!function(){var e,t=(e=i(452))&&"object"==typeof e&&"default"in e?e.default:e,r=/https?|ftp|gopher|file/;function n(e){"string"==typeof e&&(e=y(e));var n,i,s,a,o,u,c,l,d,h=(i=(n=e).auth,s=n.hostname,a=n.protocol||"",o=n.pathname||"",u=n.hash||"",c=n.query||"",l=!1,i=i?encodeURIComponent(i).replace(/%3A/i,":")+"@":"",n.host?l=i+n.host:s&&(l=i+(~s.indexOf(":")?"["+s+"]":s),n.port&&(l+=":"+n.port)),c&&"object"==typeof c&&(c=t.encode(c)),d=n.search||c&&"?"+c||"",a&&":"!==a.substr(-1)&&(a+=":"),n.slashes||(!a||r.test(a))&&!1!==l?(l="//"+(l||""),o&&"/"!==o[0]&&(o="/"+o)):l||(l=""),u&&"#"!==u[0]&&(u="#"+u),d&&"?"!==d[0]&&(d="?"+d),{protocol:a,host:l,pathname:o=o.replace(/[?#]/g,encodeURIComponent),search:d=d.replace("#","%23"),hash:u});return""+h.protocol+h.host+h.pathname+h.search+h.hash}var a="http://",o=a+"w.w",u=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,c=/https?|ftp|gopher|file/;function l(e,t){var r="string"==typeof e?y(e):e;e="object"==typeof e?n(e):e;var i=y(t),s="";r.protocol&&!r.slashes&&(s=r.protocol,e=e.replace(r.protocol,""),s+="/"===t[0]||"/"===e[0]?"/":""),s&&i.protocol&&(s="",i.slashes||(s=i.protocol,t=t.replace(i.protocol,"")));var l=e.match(u);l&&!i.protocol&&(e=e.substr((s=l[1]+(l[2]||"")).length),/^\/\/[^/]/.test(t)&&(s=s.slice(0,-1)));var d=new URL(e,o+"/"),h=new URL(t,d).toString().replace(o,""),f=i.protocol||r.protocol;return f+=r.slashes||i.slashes?"//":"",!s&&f?h=h.replace(a,f):s&&(h=h.replace(a,"")),c.test(h)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==h.slice(-1)||(h=h.slice(0,-1)),s&&(h=s+("/"===h[0]?h.substr(1):h)),h}function d(){}d.prototype.parse=y,d.prototype.format=n,d.prototype.resolve=l,d.prototype.resolveObject=l;var h=/^https?|ftp|gopher|file/,f=/^(.*?)([#?].*)/,p=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,m=/^([a-z0-9.+-]*:)?\/\/\/*/i,g=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function y(e,r,i){if(void 0===r&&(r=!1),void 0===i&&(i=!1),e&&"object"==typeof e&&e instanceof d)return e;var s=(e=e.trim()).match(f);e=s?s[1].replace(/\\/g,"/")+s[2]:e.replace(/\\/g,"/"),g.test(e)&&"/"!==e.slice(-1)&&(e+="/");var a=!/(^javascript)/.test(e)&&e.match(p),u=m.test(e),c="";a&&(h.test(a[1])||(c=a[1].toLowerCase(),e=""+a[2]+a[3]),a[2]||(u=!1,h.test(a[1])?(c=a[1],e=""+a[3]):e="//"+a[3]),3!==a[2].length&&1!==a[2].length||(c=a[1],e="/"+a[3]));var l,y=(s?s[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),b=y&&y[1],v=new d,w="",_="";try{l=new URL(e)}catch(t){w=t,c||i||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(_="/",e=e.substr(1));try{l=new URL(e,o)}catch(e){return v.protocol=c,v.href=c,v}}v.slashes=u&&!_,v.host="w.w"===l.host?"":l.host,v.hostname="w.w"===l.hostname?"":l.hostname.replace(/(\[|\])/g,""),v.protocol=w?c||null:l.protocol,v.search=l.search.replace(/\\/g,"%5C"),v.hash=l.hash.replace(/\\/g,"%5C");var E=e.split("#");!v.search&&~E[0].indexOf("?")&&(v.search="?"),v.hash||""!==E[1]||(v.hash="#"),v.query=r?t.decode(l.search.substr(1)):v.search.substr(1),v.pathname=_+(a?l.pathname.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}}):l.pathname),"about:"===v.protocol&&"blank"===v.pathname&&(v.protocol="",v.pathname=""),w&&"/"!==e[0]&&(v.pathname=v.pathname.substr(1)),c&&!h.test(c)&&"/"!==e.slice(-1)&&"/"===v.pathname&&(v.pathname=""),v.path=v.pathname+v.search,v.auth=[l.username,l.password].map(decodeURIComponent).filter(Boolean).join(":"),v.port=l.port,b&&!v.host.endsWith(b)&&(v.host+=b,v.port=b.slice(1)),v.href=_?""+v.pathname+v.search+v.hash:n(v);var k=/^(file)/.test(v.href)?["host","hostname"]:[];return Object.keys(v).forEach(function(e){~k.indexOf(e)||(v[e]=v[e]||null)}),v}s.parse=y,s.format=n,s.resolve=l,s.resolveObject=function(e,t){return y(l(e,t))},s.Url=d}(),e.exports=s}()},58348:function(e){!function(){"use strict";var t={815:function(e){e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(r);var o=1e3;i&&"number"==typeof i.maxKeys&&(o=i.maxKeys);var u=e.length;o>0&&u>o&&(u=o);for(var c=0;c<u;++c){var l,d,h,f,p=e[c].replace(a,"%20"),m=p.indexOf(n);(m>=0?(l=p.substr(0,m),d=p.substr(m+1)):(l=p,d=""),h=decodeURIComponent(l),f=decodeURIComponent(d),Object.prototype.hasOwnProperty.call(s,h))?t(s[h])?s[h].push(f):s[h]=[s[h],f]:s[h]=f}return s};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,s,a,o){return(s=s||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e)?n(i(e),function(i){var o=encodeURIComponent(t(i))+a;return r(e[i])?n(e[i],function(e){return o+encodeURIComponent(t(e))}).join(s):o+encodeURIComponent(t(e[i]))}).join(s):o?encodeURIComponent(t(o))+a+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}},a=!0;try{t[e](s,s.exports,n),a=!1}finally{a&&delete r[e]}return s.exports}n.ab="//";var i={};i.decode=i.parse=n(815),i.encode=i.stringify=n(577),e.exports=i}()},22393:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return u},getImageProps:function(){return o}});let n=r(65921),i=r(18631),s=r(47674),a=n._(r(80430));function o(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:a.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let u=s.Image},10393:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},73120:function(e,t,r){"use strict";r.r(t),r.d(t,{Component:function(){return S},Fragment:function(){return x},cloneElement:function(){return z},createContext:function(){return U},createElement:function(){return _},createRef:function(){return k},h:function(){return _},hydrate:function(){return q},isValidElement:function(){return a},options:function(){return i},render:function(){return B},toChildArray:function(){return function e(t,r){return r=r||[],null==t||"boolean"==typeof t||(b(t)?t.some(function(t){e(t,r)}):r.push(t)),r}}});var n,i,s,a,o,u,c,l,d,h,f,p,m={},g=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function v(e,t){for(var r in t)e[r]=t[r];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,r){var i,s,a,o={};for(a in t)"key"==a?i=t[a]:"ref"==a?s=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===o[a]&&(o[a]=e.defaultProps[a]);return E(e,o,i,s,null)}function E(e,t,r,n,a){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++s:a,__i:-1,__u:0};return null==a&&null!=i.vnode&&i.vnode(o),o}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?A(e):null}function C(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!I.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||c)(I)}function I(){var e,t,r,n,s,a,u,c;for(o.sort(l);e=o.shift();)e.__d&&(t=o.length,n=void 0,a=(s=(r=e).__v).__e,u=[],c=[],r.__P&&((n=v({},s)).__v=s.__v+1,i.vnode&&i.vnode(n),T(r.__P,n,s,r.__n,r.__P.namespaceURI,32&s.__u?[a]:null,u,null==a?A(s):a,!!(32&s.__u),c),n.__v=s.__v,n.__.__k[n.__i]=n,O(u,n,c),n.__e!=a&&function e(t){var r,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,r=0;r<t.__k.length;r++)if(null!=(n=t.__k[r])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return e(t)}}(n)),o.length>t&&o.sort(l));I.__r=0}function R(e,t,r,n,s,a,o,u,c,l,d){var h,f,p,y,v,_=n&&n.__k||g,k=t.length;for(r.__d=c,function(e,t,r){var n,s,a,o,u,c=t.length,l=r.length,d=l,h=0;for(e.__k=[],n=0;n<c;n++)null!=(s=t[n])&&"boolean"!=typeof s&&"function"!=typeof s?(o=n+h,(s=e.__k[n]="string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?E(null,s,null,null,null):b(s)?E(x,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?E(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,-1!==(u=s.__i=function(e,t,r,n){var i=e.key,s=e.type,a=r-1,o=r+1,u=t[r];if(null===u||u&&i==u.key&&s===u.type&&0==(131072&u.__u))return r;if(n>(null!=u&&0==(131072&u.__u)?1:0))for(;a>=0||o<t.length;){if(a>=0){if((u=t[a])&&0==(131072&u.__u)&&i==u.key&&s===u.type)return a;a--}if(o<t.length){if((u=t[o])&&0==(131072&u.__u)&&i==u.key&&s===u.type)return o;o++}}return -1}(s,r,o,d))&&(d--,(a=r[u])&&(a.__u|=131072)),null==a||null===a.__v?(-1==u&&h--,"function"!=typeof s.type&&(s.__u|=65536)):u!==o&&(u==o-1?h--:u==o+1?h++:(u>o?h--:h++,s.__u|=65536))):s=e.__k[n]=null;if(d)for(n=0;n<l;n++)null!=(a=r[n])&&0==(131072&a.__u)&&(a.__e==e.__d&&(e.__d=A(a)),function e(t,r,n){var s,a;if(i.unmount&&i.unmount(t),(s=t.ref)&&(s.current&&s.current!==t.__e||D(s,null,r)),null!=(s=t.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){i.__e(e,r)}s.base=s.__P=null}if(s=t.__k)for(a=0;a<s.length;a++)s[a]&&e(s[a],r,n||"function"!=typeof t.type);n||w(t.__e),t.__c=t.__=t.__e=t.__d=void 0}(a,a))}(r,t,_),c=r.__d,h=0;h<k;h++)null!=(p=r.__k[h])&&(f=-1===p.__i?m:_[p.__i]||m,p.__i=h,T(e,p,f,s,a,o,u,c,l,d),y=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&D(f.ref,null,p),d.push(p.ref,p.__c||y,p)),null==v&&null!=y&&(v=y),65536&p.__u||f.__k===p.__k?c=function e(t,r,n){var i,s;if("function"==typeof t.type){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,r=e(i[s],r,n));return r}t.__e!=r&&(r&&t.type&&!n.contains(r)&&(r=A(t)),n.insertBefore(t.__e,r||null),r=t.__e);do r=r&&r.nextSibling;while(null!=r&&8===r.nodeType);return r}(p,c,e):"function"==typeof p.type&&void 0!==p.__d?c=p.__d:y&&(c=y.nextSibling),p.__d=void 0,p.__u&=-196609);r.__d=c,r.__e=v}function P(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||y.test(t)?r:r+"px"}function N(e,t,r,n,i){var s;t:if("style"===t){if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||P(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||P(e.style,t,r[t])}}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase() in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=r,r?n?r.u=n.u:(r.u=d,e.addEventListener(t,s?f:h,s)):e.removeEventListener(t,s?f:h,s);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break t}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function M(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=d++;else if(t.t<r.u)return;return r(i.event?i.event(t):t)}}}function T(e,t,r,s,a,o,u,c,l,d){var h,f,p,g,y,_,E,k,C,I,P,M,T,O,D,B,q=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=t.__e=r.__e]),(h=i.__b)&&h(t);t:if("function"==typeof q)try{if(k=t.props,C="prototype"in q&&q.prototype.render,I=(h=q.contextType)&&s[h.__c],P=h?I?I.props.value:h.__:s,r.__c?E=(f=t.__c=r.__c).__=f.__E:(C?t.__c=f=new q(k,P):(t.__c=f=new S(k,P),f.constructor=q,f.render=L),I&&I.sub(f),f.props=k,f.state||(f.state={}),f.context=P,f.__n=s,p=f.__d=!0,f.__h=[],f._sb=[]),C&&null==f.__s&&(f.__s=f.state),C&&null!=q.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=v({},f.__s)),v(f.__s,q.getDerivedStateFromProps(k,f.__s))),g=f.props,y=f.state,f.__v=t,p)C&&null==q.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),C&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(C&&null==q.getDerivedStateFromProps&&k!==g&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(k,P),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(k,f.__s,P)||t.__v===r.__v)){for(t.__v!==r.__v&&(f.props=k,f.state=f.__s,f.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),M=0;M<f._sb.length;M++)f.__h.push(f._sb[M]);f._sb=[],f.__h.length&&u.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(k,f.__s,P),C&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(g,y,_)})}if(f.context=P,f.props=k,f.__P=e,f.__e=!1,T=i.__r,O=0,C){for(f.state=f.__s,f.__d=!1,T&&T(t),h=f.render(f.props,f.state,f.context),D=0;D<f._sb.length;D++)f.__h.push(f._sb[D]);f._sb=[]}else do f.__d=!1,T&&T(t),h=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++O<25);f.state=f.__s,null!=f.getChildContext&&(s=v(v({},s),f.getChildContext())),C&&!p&&null!=f.getSnapshotBeforeUpdate&&(_=f.getSnapshotBeforeUpdate(g,y)),R(e,b(B=null!=h&&h.type===x&&null==h.key?h.props.children:h)?B:[B],t,r,s,a,o,u,c,l,d),f.base=t.__e,t.__u&=-161,f.__h.length&&u.push(f),E&&(f.__E=f.__=null)}catch(e){if(t.__v=null,l||null!=o){for(t.__u|=l?160:128;c&&8===c.nodeType&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,t.__e=c}else t.__e=r.__e,t.__k=r.__k;i.__e(e,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,s,a,o,u,c,l){var d,h,f,p,g,y,v,_=r.props,E=t.props,k=t.type;if("svg"===k?a="http://www.w3.org/2000/svg":"math"===k?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=o){for(d=0;d<o.length;d++)if((g=o[d])&&"setAttribute"in g==!!k&&(k?g.localName===k:3===g.nodeType)){e=g,o[d]=null;break}}if(null==e){if(null===k)return document.createTextNode(E);e=document.createElementNS(a,k,E.is&&E),c&&(i.__m&&i.__m(t,o),c=!1),o=null}if(null===k)_===E||c&&e.data===E||(e.data=E);else{if(o=o&&n.call(e.childNodes),_=r.props||m,!c&&null!=o)for(_={},d=0;d<e.attributes.length;d++)_[(g=e.attributes[d]).name]=g.value;for(d in _)if(g=_[d],"children"==d);else if("dangerouslySetInnerHTML"==d)f=g;else if(!(d in E)){if("value"==d&&"defaultValue"in E||"checked"==d&&"defaultChecked"in E)continue;N(e,d,null,g,a)}for(d in E)g=E[d],"children"==d?p=g:"dangerouslySetInnerHTML"==d?h=g:"value"==d?y=g:"checked"==d?v=g:c&&"function"!=typeof g||_[d]===g||N(e,d,g,_[d],a);if(h)c||f&&(h.__html===f.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(f&&(e.innerHTML=""),R(e,b(p)?p:[p],t,r,s,"foreignObject"===k?"http://www.w3.org/1999/xhtml":a,o,u,o?o[0]:r.__k&&A(r,0),c,l),null!=o)for(d=o.length;d--;)w(o[d]);c||(d="value","progress"===k&&null==y?e.removeAttribute("value"):void 0===y||y===e[d]&&("progress"!==k||y)&&("option"!==k||y===_[d])||N(e,d,y,_[d],a),d="checked",void 0!==v&&v!==e[d]&&N(e,d,v,_[d],a))}return e}(r.__e,t,r,s,a,o,u,l,d);(h=i.diffed)&&h(t)}function O(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)D(r[n],r[++n],r[++n]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function D(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,r)}}function L(e,t,r){return this.constructor(e,r)}function B(e,t,r){var s,a,o,u;i.__&&i.__(e,t),a=(s="function"==typeof r)?null:r&&r.__k||t.__k,o=[],u=[],T(t,e=(!s&&r||t).__k=_(x,null,[e]),a||m,m,t.namespaceURI,!s&&r?[r]:a?null:t.firstChild?n.call(t.childNodes):null,o,!s&&r?r:a?a.__e:t.firstChild,s,u),O(o,e,u)}function q(e,t){B(e,t,q)}function z(e,t,r){var i,s,a,o,u=v({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)"key"==a?i=t[a]:"ref"==a?s=t[a]:u[a]=void 0===t[a]&&void 0!==o?o[a]:t[a];return arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),E(e.type,u,i||e.key,s||e.ref,null)}function U(e,t){var r={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=new Set,(n={})[t]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.forEach(function(e){e.__e=!0,C(e)})},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}n=g.slice,i={__e:function(e,t,r,n){for(var i,s,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},s=0,a=function(e){return null!=e&&null==e.constructor},S.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},r),this.props)),e&&v(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),C(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},S.prototype.render=x,o=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},I.__r=0,d=0,h=M(!1),f=M(!0),p=0},67346:function(e,t,r){"use strict";r.r(t),r.d(t,{useCallback:function(){return S},useContext:function(){return A},useDebugValue:function(){return C},useEffect:function(){return w},useErrorBoundary:function(){return I},useId:function(){return R},useImperativeHandle:function(){return k},useLayoutEffect:function(){return _},useMemo:function(){return x},useReducer:function(){return v},useRef:function(){return E},useState:function(){return b}});var n,i,s,a,o=r(73120),u=0,c=[],l=o.options,d=l.__b,h=l.__r,f=l.diffed,p=l.__c,m=l.unmount,g=l.__;function y(e,t){l.__h&&l.__h(i,e,u||t),u=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function b(e){return u=1,v(D,e)}function v(e,t,r){var s=y(n++,2);if(s.t=e,!s.__c&&(s.__=[r?r(t):D(void 0,t),function(e){var t=s.__N?s.__N[0]:s.__[0],r=s.t(t,e);t!==r&&(s.__N=[r,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.u)){var a=function(e,t,r){if(!s.__c.__H)return!0;var n=s.__c.__H.__.filter(function(e){return!!e.__c});if(n.every(function(e){return!e.__N}))return!o||o.call(this,e,t,r);var i=!1;return n.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),!(!i&&s.__c.props===e)&&(!o||o.call(this,e,t,r))};i.u=!0;var o=i.shouldComponentUpdate,u=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,a(e,t,r),o=n}u&&u.call(this,e,t,r)},i.shouldComponentUpdate=a}return s.__N||s.__}function w(e,t){var r=y(n++,3);!l.__s&&O(r.__H,t)&&(r.__=e,r.i=t,i.__H.__h.push(r))}function _(e,t){var r=y(n++,4);!l.__s&&O(r.__H,t)&&(r.__=e,r.i=t,i.__h.push(r))}function E(e){return u=5,x(function(){return{current:e}},[])}function k(e,t,r){u=6,_(function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},null==r?r:r.concat(e))}function x(e,t){var r=y(n++,7);return O(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function S(e,t){return u=8,x(function(){return e},t)}function A(e){var t=i.context[e.__c],r=y(n++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(i)),t.props.value):e.__}function C(e,t){l.useDebugValue&&l.useDebugValue(t?t(e):e)}function I(e){var t=y(n++,10),r=b();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]}function R(){var e=y(n++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function P(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(M),e.__H.__h.forEach(T),e.__H.__h=[]}catch(t){e.__H.__h=[],l.__e(t,e.__v)}}l.__b=function(e){i=null,d&&d(e)},l.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),g&&g(e,t)},l.__r=function(e){h&&h(e),n=0;var t=(i=e.__c).__H;t&&(s===i?(t.__h=[],i.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0})):(t.__h.forEach(M),t.__h.forEach(T),t.__h=[],n=0)),s=i},l.diffed=function(e){f&&f(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&a===l.requestAnimationFrame||((a=l.requestAnimationFrame)||function(e){var t,r=function(){clearTimeout(n),N&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);N&&(t=requestAnimationFrame(r))})(P)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.i=void 0})),s=i=null},l.__c=function(e,t){t.some(function(e){try{e.__h.forEach(M),e.__h=e.__h.filter(function(e){return!e.__||T(e)})}catch(r){t.some(function(e){e.__h&&(e.__h=[])}),t=[],l.__e(r,e.__v)}}),p&&p(e,t)},l.unmount=function(e){m&&m(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(e){try{M(e)}catch(e){t=e}}),r.__H=void 0,t&&l.__e(t,r.__v))};var N="function"==typeof requestAnimationFrame;function M(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function T(e){var t=i;e.__c=e.__(),i=t}function O(e,t){return!e||e.length!==t.length||t.some(function(t,r){return t!==e[r]})}function D(e,t){return"function"==typeof t?t(e):t}},27453:function(e,t,r){let n=r(39311),i=r(21893),s=r(5142),a=r(70856);function o(e,t,r,s,a){let o=[].slice.call(arguments,1),u=o.length,c="function"==typeof o[u-1];if(!c&&!n())throw Error("Callback required as last argument");if(c){if(u<2)throw Error("Too few arguments provided");2===u?(a=r,r=t,t=s=void 0):3===u&&(t.getContext&&void 0===a?(a=s,s=void 0):(a=s,s=r,r=t,t=void 0))}else{if(u<1)throw Error("Too few arguments provided");return 1===u?(r=t,t=s=void 0):2!==u||t.getContext||(s=r,r=t,t=void 0),new Promise(function(n,a){try{let a=i.create(r,s);n(e(a,t,s))}catch(e){a(e)}})}try{let n=i.create(r,s);a(null,e(n,t,s))}catch(e){a(e)}}t.create=i.create,t.toCanvas=o.bind(null,s.render),t.toDataURL=o.bind(null,s.renderToDataURL),t.toString=o.bind(null,function(e,t,r){return a.render(e,r)})},39311:function(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},7806:function(e,t,r){let n=r(89435).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),s=[r-7];for(let e=1;e<t-1;e++)s[e]=s[e-1]-i;return s.push(6),s.reverse()},t.getPositions=function(e){let r=[],n=t.getRowColCoords(e),i=n.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)(0!==e||0!==t)&&(0!==e||t!==i-1)&&(e!==i-1||0!==t)&&r.push([n[e],n[t]]);return r}},38141:function(e,t,r){let n=r(70402),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(e){this.mode=n.ALPHANUMERIC,this.data=e}s.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=s},50988:function(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},88590:function(e){function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){let i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},90066:function(e,t,r){let n=r(70402);function i(e){this.mode=n.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=i},19755:function(e,t,r){let n=r(75593),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[(e-1)*4+0];case n.M:return i[(e-1)*4+1];case n.Q:return i[(e-1)*4+2];case n.H:return i[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return s[(e-1)*4+0];case n.M:return s[(e-1)*4+1];case n.Q:return s[(e-1)*4+2];case n.H:return s[(e-1)*4+3];default:return}}},75593:function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},68609:function(e,t,r){let n=r(89435).getSymbolSize;t.getPositions=function(e){let t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},72578:function(e,t,r){let n=r(89435),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){let r=e.bit<<3|t,s=r<<10;for(;n.getBCHDigit(s)-i>=0;)s^=1335<<n.getBCHDigit(s)-i;return(r<<10|s)^21522}},79137:function(e,t){let r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},8013:function(e,t,r){let n=r(70402),i=r(89435);function s(e){this.mode=n.KANJI,this.data=e}s.getBitsLength=function(e){return 13*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=i.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r=(r>>>8&255)*192+(255&r),e.put(r,13)}},e.exports=s},67627:function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let r={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,n=0,i=0,s=0,a=null,o=null;for(let u=0;u<t;u++){i=s=0,a=o=null;for(let c=0;c<t;c++){let t=e.get(u,c);t===a?i++:(i>=5&&(n+=r.N1+(i-5)),a=t,i=1),(t=e.get(c,u))===o?s++:(s>=5&&(n+=r.N1+(s-5)),o=t,s=1)}i>=5&&(n+=r.N1+(i-5)),s>=5&&(n+=r.N1+(s-5))}return n},t.getPenaltyN2=function(e){let t=e.size,n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){let t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);(4===t||0===t)&&n++}return n*r.N2},t.getPenaltyN3=function(e){let t=e.size,n=0,i=0,s=0;for(let r=0;r<t;r++){i=s=0;for(let a=0;a<t;a++)i=i<<1&2047|e.get(r,a),a>=10&&(1488===i||93===i)&&n++,s=s<<1&2047|e.get(a,r),a>=10&&(1488===s||93===s)&&n++}return n*r.N3},t.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*r.N4},t.applyMask=function(e,r){let n=r.size;for(let i=0;i<n;i++)for(let s=0;s<n;s++)r.isReserved(s,i)||r.xor(s,i,function(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,s,i))},t.getBestMask=function(e,r){let n=Object.keys(t.Patterns).length,i=0,s=1/0;for(let a=0;a<n;a++){r(a),t.applyMask(a,e);let n=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),n<s&&(s=n,i=a)}return i}},70402:function(e,t,r){let n=r(21389),i=r(9789);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!n.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},65318:function(e,t,r){let n=r(70402);function i(e){this.mode=n.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,r;for(t=0;t+3<=this.data.length;t+=3)r=parseInt(this.data.substr(t,3),10),e.put(r,10);let n=this.data.length-t;n>0&&(r=parseInt(this.data.substr(t),10),e.put(r,3*n+1))},e.exports=i},86488:function(e,t,r){let n=r(79137);t.mul=function(e,t){let r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let s=0;s<t.length;s++)r[i+s]^=n.mul(e[i],t[s]);return r},t.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){let e=r[0];for(let i=0;i<t.length;i++)r[i]^=n.mul(t[i],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},t.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let i=0;i<e;i++)r=t.mul(r,new Uint8Array([1,n.exp(i)]));return r}},21893:function(e,t,r){let n=r(89435),i=r(75593),s=r(50988),a=r(88590),o=r(7806),u=r(68609),c=r(67627),l=r(19755),d=r(45100),h=r(3498),f=r(72578),p=r(70402),m=r(49107);function g(e,t,r){let n,i;let s=e.size,a=f.getEncodedBits(t,r);for(n=0;n<15;n++)i=(a>>n&1)==1,n<6?e.set(n,8,i,!0):n<8?e.set(n+1,8,i,!0):e.set(s-15+n,8,i,!0),n<8?e.set(8,s-n-1,i,!0):n<9?e.set(8,15-n-1+1,i,!0):e.set(8,15-n-1,i,!0);e.set(s-8,8,1,!0)}t.create=function(e,t){let r,f;if(void 0===e||""===e)throw Error("No input text");let y=i.M;return void 0!==t&&(y=i.from(t.errorCorrectionLevel,i.M),r=h.from(t.version),f=c.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),function(e,t,r,i){let f;if(Array.isArray(e))f=m.fromArray(e);else if("string"==typeof e){let n=t;if(!n){let t=m.rawSplit(e);n=h.getBestVersionForData(t,r)}f=m.fromString(e,n||40)}else throw Error("Invalid data");let y=h.getBestVersionForData(f,r);if(!y)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<y)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+y+".\n")}else t=y;let b=function(e,t,r){let i=new s;r.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)});let a=(n.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t))*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);let o=(a-i.getLengthInBits())/8;for(let e=0;e<o;e++)i.put(e%2?17:236,8);return function(e,t,r){let i,s;let a=n.getSymbolTotalCodewords(t),o=a-l.getTotalCodewordsCount(t,r),u=l.getBlocksCount(t,r),c=a%u,h=u-c,f=Math.floor(a/u),p=Math.floor(o/u),m=p+1,g=f-p,y=new d(g),b=0,v=Array(u),w=Array(u),_=0,E=new Uint8Array(e.buffer);for(let e=0;e<u;e++){let t=e<h?p:m;v[e]=E.slice(b,b+t),w[e]=y.encode(v[e]),b+=t,_=Math.max(_,t)}let k=new Uint8Array(a),x=0;for(i=0;i<_;i++)for(s=0;s<u;s++)i<v[s].length&&(k[x++]=v[s][i]);for(i=0;i<g;i++)for(s=0;s<u;s++)k[x++]=w[s][i];return k}(i,e,t)}(t,r,f),v=new a(n.getSymbolSize(t));return function(e,t){let r=e.size,n=u.getPositions(t);for(let t=0;t<n.length;t++){let i=n[t][0],s=n[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1)&&!(r<=i+t))for(let n=-1;n<=7;n++)s+n<=-1||r<=s+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,s+n,!0,!0):e.set(i+t,s+n,!1,!0))}}(v,t),function(e){let t=e.size;for(let r=8;r<t-8;r++){let t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(v),function(e,t){let r=o.getPositions(t);for(let t=0;t<r.length;t++){let n=r[t][0],i=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(n+t,i+r,!0,!0):e.set(n+t,i+r,!1,!0)}}(v,t),g(v,r,0),t>=7&&function(e,t){let r,n,i;let s=e.size,a=h.getEncodedBits(t);for(let t=0;t<18;t++)r=Math.floor(t/3),n=t%3+s-8-3,i=(a>>t&1)==1,e.set(r,n,i,!0),e.set(n,r,i,!0)}(v,t),function(e,t){let r=e.size,n=-1,i=r-1,s=7,a=0;for(let o=r-1;o>0;o-=2)for(6===o&&o--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,o-r)){let n=!1;a<t.length&&(n=(t[a]>>>s&1)==1),e.set(i,o-r,n),-1==--s&&(a++,s=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(v,b),isNaN(i)&&(i=c.getBestMask(v,g.bind(null,v,r))),c.applyMask(i,v),g(v,r,i),{modules:v,version:t,errorCorrectionLevel:r,maskPattern:i,segments:f}}(e,r,y,f)}},45100:function(e,t,r){let n=r(86488);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},9789:function(e,t){let r="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(n,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(i,"g"),t.NUMERIC=RegExp(r,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let s=RegExp("^"+n+"$"),a=RegExp("^"+r+"$"),o=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return s.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return o.test(e)}},49107:function(e,t,r){let n=r(70402),i=r(65318),s=r(38141),a=r(90066),o=r(8013),u=r(9789),c=r(89435),l=r(63615);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,r){let n;let i=[];for(;null!==(n=e.exec(r));)i.push({data:n[0],index:n.index,mode:t,length:n[0].length});return i}function f(e){let t,r;let i=h(u.NUMERIC,n.NUMERIC,e),s=h(u.ALPHANUMERIC,n.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(u.BYTE,n.BYTE,e),r=h(u.KANJI,n.KANJI,e)):(t=h(u.BYTE_KANJI,n.BYTE,e),r=[]),i.concat(s,t,r).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function p(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return s.getBitsLength(e);case n.KANJI:return o.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function m(e,t){let r;let u=n.getBestModeForData(e);if((r=n.from(t,u))!==n.BYTE&&r.bit<u.bit)throw Error('"'+e+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(u));switch(r!==n.KANJI||c.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new i(e);case n.ALPHANUMERIC:return new s(e);case n.KANJI:return new o(e);case n.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,r){let i=function(e,t){let r={},i={start:{}},s=["start"];for(let a=0;a<e.length;a++){let o=e[a],u=[];for(let e=0;e<o.length;e++){let c=o[e],l=""+a+e;u.push(l),r[l]={node:c,lastCount:0},i[l]={};for(let e=0;e<s.length;e++){let a=s[e];r[a]&&r[a].node.mode===c.mode?(i[a][l]=p(r[a].lastCount+c.length,c.mode)-p(r[a].lastCount,c.mode),r[a].lastCount+=c.length):(r[a]&&(r[a].lastCount=c.length),i[a][l]=p(c.length,c.mode)+4+n.getCharCountIndicator(c.mode,t))}}s=u}for(let e=0;e<s.length;e++)i[s[e]].end=0;return{map:i,table:r}}(function(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:d(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:d(i.data)}])}}return t}(f(e,c.isKanjiModeEnabled())),r),s=l.find_path(i.map,"start","end"),a=[];for(let e=1;e<s.length-1;e++)a.push(i.table[s[e]].node);return t.fromArray(a.reduce(function(e,t){let r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(f(e,c.isKanjiModeEnabled()))}},89435:function(e,t){let r;let n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},21389:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3498:function(e,t,r){let n=r(89435),i=r(19755),s=r(75593),a=r(70402),o=r(21389),u=n.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}t.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!o.isValid(e))throw Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);let s=(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t))*8;if(r===a.MIXED)return s;let u=s-c(r,e);switch(r){case a.NUMERIC:return Math.floor(u/10*3);case a.ALPHANUMERIC:return Math.floor(u/11*2);case a.KANJI:return Math.floor(u/13);case a.BYTE:default:return Math.floor(u/8)}},t.getBestVersionForData=function(e,r){let n;let i=s.from(r,s.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(function(e,t){let r=0;return e.forEach(function(e){let n=c(e.mode,t);r+=n+e.getBitsLength()}),r}(e,n)<=t.getCapacity(n,r,a.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-u>=0;)t^=7973<<n.getBCHDigit(t)-u;return e<<12|t}},5142:function(e,t,r){let n=r(5448);t.render=function(e,t,r){var i;let s=r,a=t;void 0!==s||t&&t.getContext||(s=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),s=n.getOptions(s);let o=n.getImageWidth(e.modules.size,s),u=a.getContext("2d"),c=u.createImageData(o,o);return n.qrToImageData(c.data,e,s),i=a,u.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=o,i.width=o,i.style.height=o+"px",i.style.width=o+"px",u.putImageData(c,0,0),a},t.renderToDataURL=function(e,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});let s=t.render(e,r,i),a=i.type||"image/png",o=i.rendererOpts||{};return s.toDataURL(a,o.quality)}},70856:function(e,t,r){let n=r(5448);function i(e,t){let r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function s(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function(e,t,r){let a=n.getOptions(t),o=e.modules.size,u=e.modules.data,c=o+2*a.margin,l=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+i(a.color.dark,"stroke")+' d="'+function(e,t,r){let n="",i=0,a=!1,o=0;for(let u=0;u<e.length;u++){let c=Math.floor(u%t),l=Math.floor(u/t);c||a||(a=!0),e[u]?(o++,u>0&&c>0&&e[u-1]||(n+=a?s("M",c+r,.5+l+r):s("m",i,0),i=0,a=!1),c+1<t&&e[u+1]||(n+=s("h",o),o=0)):i++}return n}(u,o,a.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+('viewBox="0 0 '+c)+" "+c+'" shape-rendering="crispEdges">'+l+d+"</svg>\n";return"function"==typeof r&&r(null,h),h}},5448:function(e,t){function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){let n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){let i=r.modules.size,s=r.modules.data,a=t.getScale(i,n),o=Math.floor((i+2*n.margin)*a),u=n.margin*a,c=[n.color.light,n.color.dark];for(let t=0;t<o;t++)for(let r=0;r<o;r++){let l=(t*o+r)*4,d=n.color.light;t>=u&&r>=u&&t<o-u&&r<o-u&&(d=c[s[Math.floor((t-u)/a)*i+Math.floor((r-u)/a)]?1:0]),e[l++]=d.r,e[l++]=d.g,e[l++]=d.b,e[l]=d.a}}},53702:function(e,t,r){"use strict";let n=r(93904),i=r(680),s=r(90716),a=r(7803),o=e=>null==e,u=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function d(e,t){return t.decode?i(e):e}function h(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function f(e){let t=(e=h(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){n[e]=r;return}void 0===n[e]&&(n[e]={}),n[e][t[1]]=r};case"bracket":return(e,r,n)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"colon-list-separator":return(e,r,n)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!i&&d(r,e).includes(e.arrayFormatSeparator);r=s?d(r,e):r;let a=i||s?r.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===r?r:d(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i){n[t]=r?d(r,e):r;return}let s=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===n[t]){n[t]=s;return}n[t]=[].concat(n[t],s)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),n=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return n;for(let i of e.split("&")){if(""===i)continue;let[e,a]=s(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:d(a,t),r(d(e,t),a,n)}for(let e of Object.keys(n)){let r=n[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{let r=n[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=f,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",i,"]"].join("")]:[...r,[l(t,e),"[",l(i,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length)?[[l(r,e),t,l(i,e)].join("")]:[[n,l(i,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map(r=>{let i=e[r];return void 0===i?"":null===i?l(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":i.reduce(n(r),[]).join("&"):l(r,t)+"="+l(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,n]=s(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(f(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:d(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[u]:!0},r);let n=h(e.url).split("?")[0]||"",i=t.extract(e.url),s=Object.assign(t.parse(i,{sort:!1}),e.query),a=t.stringify(s,r);a&&(a=`?${a}`);let o=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(o=`#${r[u]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${a}${o}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[u]:!1},n);let{url:i,query:s,fragmentIdentifier:o}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:a(s,r),fragmentIdentifier:o},n)},t.exclude=(e,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},16929:function(e){"use strict";e.exports=function(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(t);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var o=e.length;a>0&&o>a&&(o=a);for(var u=0;u<o;++u){var c,l,d,h,f=e[u].replace(s,"%20"),p=f.indexOf(r);(p>=0?(c=f.substr(0,p),l=f.substr(p+1)):(c=f,l=""),d=decodeURIComponent(c),h=decodeURIComponent(l),Object.prototype.hasOwnProperty.call(i,d))?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i}},21420:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){return(r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e)?Object.keys(e).map(function(i){var s=encodeURIComponent(t(i))+n;return Array.isArray(e[i])?e[i].map(function(e){return s+encodeURIComponent(t(e))}).join(r):s+encodeURIComponent(t(e[i]))}).join(r):i?encodeURIComponent(t(i))+n+encodeURIComponent(t(e)):""}},71524:function(e,t,r){"use strict";t.decode=t.parse=r(16929),t.encode=t.stringify=r(21420)},49554:function(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var a=Array(s);a[0]=i(e);for(var o=1;o<s;o++)a[o]=i(r[o]);return a.join(" ")}if("string"!=typeof e)return e;var u=r.length;if(0===u)return e;for(var c="",l=0,d=-1,h=e&&e.length||0,f=0;f<h;){if(37===e.charCodeAt(f)&&f+1<h){switch(d=d>-1?d:0,e.charCodeAt(f+1)){case 100:case 102:if(l>=u||null==r[l])break;d<f&&(c+=e.slice(d,f)),c+=Number(r[l]),d=f+2,f++;break;case 105:if(l>=u||null==r[l])break;d<f&&(c+=e.slice(d,f)),c+=Math.floor(Number(r[l])),d=f+2,f++;break;case 79:case 111:case 106:if(l>=u||void 0===r[l])break;d<f&&(c+=e.slice(d,f));var p=typeof r[l];if("string"===p){c+="'"+r[l]+"'",d=f+2,f++;break}if("function"===p){c+=r[l].name||"<anonymous>",d=f+2,f++;break}c+=i(r[l]),d=f+2,f++;break;case 115:if(l>=u)break;d<f&&(c+=e.slice(d,f)),c+=String(r[l]),d=f+2,f++;break;case 37:d<f&&(c+=e.slice(d,f)),c+="%",d=f+2,f++,l--}++l}++f}return -1===d?e:(d<h&&(c+=e.slice(d)),c)}},55807:function(e,t,r){"use strict";var n,i,s,a,o,u,c=r(66399);c&&"object"==typeof c&&"default"in c&&c.default;var l=r(92750),d=new l,h=d.getBrowser(),f=d.getCPU(),p=d.getDevice(),m=d.getEngine(),g=d.getOS(),y=d.getUA(),b={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},v={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},_=function(){return!!("undefined"!=typeof window&&(window.navigator||navigator))&&(window.navigator||navigator)},E=function(e){var t=_();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},k=function(e){return e.type===b.Browser},x=function(e){return e.name===v.Edge},S=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},A=function(){return E("iPad")};p.type,b.SmartTv,p.type,b.Console,p.type,b.Wearable,p.type,b.Embedded,h.name===v.MobileSafari||A(),h.name,v.Chromium;var C=(n=p.type)===b.Mobile||n===b.Tablet||A(),I=(p.type,b.Mobile,p.type===b.Tablet||A(),k(p),k(p),"Android"===g.name),R=(g.name,"iOS"===g.name||A()),P=(h.name,v.Chrome,h.name===v.Firefox),N=(i=h.name)===v.Safari||i===v.MobileSafari;h.name,v.Opera,(s=h.name)===v.InternetExplorer||v.Ie,w(g.version),w(g.name),w(h.version),w(h.major),w(h.name),w(p.vendor),w(p.model),w(m.name),w(m.version),w(y),x(h)||S(y),h.name,v.Yandex,w(p.type,"browser"),(a=_())&&(/iPad|iPhone|iPod/.test(a.platform)||"MacIntel"===a.platform&&a.maxTouchPoints>1)&&window.MSStream,A(),E("iPhone"),E("iPod"),"string"==typeof(u=(o=_())&&o.userAgent&&o.userAgent.toLowerCase())&&/electron/.test(u),S(y),x(h)&&S(y),g.name,g.name,h.name,v.MIUI,h.name,v.SamsungBrowser,t.Dt=I,t.vU=P,t.gn=R,t.tq=C,t.G6=N},627:function(e){"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){function t(t,n,i){return e.call(this,"string"==typeof r?r:r(t,n,i))||this}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(u="must not be",t=t.replace(/^not /,"")):u="must be",s=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-s.length,a)===s)c="The ".concat(e," ").concat(u," ").concat(n(t,"type"));else{var i,s,a,o,u,c,l=("number"!=typeof o&&(o=0),o+1>e.length||-1===e.indexOf(".",o))?"argument":"property";c='The "'.concat(e,'" ').concat(l," ").concat(u," ").concat(n(t,"type"))}return c+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},16382:function(e,t,r){"use strict";var n=r(21169),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var s=r(72732),a=r(23947);r(96154)(l,s);for(var o=i(a.prototype),u=0;u<o.length;u++){var c=o[u];l.prototype[c]||(l.prototype[c]=a.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);s.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||n.nextTick(h,this)}function h(e){e.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(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},21947:function(e,t,r){"use strict";e.exports=i;var n=r(67957);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(96154)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},72732:function(e,t,r){"use strict";var n,i,s,a,o,u=r(21169);e.exports=S,S.ReadableState=x,r(92254).EventEmitter;var c=function(e,t){return e.listeners(t).length},l=r(1907),d=r(53435).Buffer,h=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(82839);i=f&&f.debuglog?f.debuglog("stream"):function(){};var p=r(38357),m=r(52564),g=r(51563).getHighWaterMark,y=r(627).q,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(96154)(S,l);var E=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function x(e,t,i){n=n||r(16382),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=r(39434).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function S(e){if(n=n||r(16382),!(this instanceof S))return new S(e);var t=this instanceof n;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function A(e,t,r,n,s){i("readableAddChunk",t);var a,o,u,c,l,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?R(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}}(e,f);else{if(s||(a=f,o=t,d.isBuffer(o)||o instanceof h||"string"==typeof o||void 0===o||a.objectMode||(u=new b("chunk",["string","Buffer","Uint8Array"],o)),l=u),l)E(e,l);else if(f.objectMode||t&&t.length>0){if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===d.prototype||(c=t,t=d.from(c)),n)f.endEmitted?E(e,new _):C(e,f,t,!0);else if(f.ended)E(e,new v);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?C(e,f,t,!1):N(e,f)):C(e,f,t,!1)}}else n||(f.reading=!1,N(e,f))}return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&R(e)),N(e,t)}function I(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)return t.flowing&&t.length?t.buffer.head.data.length:t.length;if(e>t.highWaterMark){var r;t.highWaterMark=((r=e)>=1073741824?r=1073741824:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)}return e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)}function R(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,u.nextTick(P,e))}function P(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function N(e,t){t.readingMore||(t.readingMore=!0,u.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function T(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function O(e){i("readable nexttick read 0"),e.read(0)}function D(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function q(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,u.nextTick(z,t,e))}function z(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=d.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},S.prototype.unshift=function(e){return A(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){s||(s=r(39434).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},S.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?q(this):R(this),null;if(0===(e=I(e,r))&&r.ended)return 0===r.length&&q(this),null;var s=r.needReadable;return i("need readable",s),(0===r.length||r.length-e<r.highWaterMark)&&i("length less than watermark",s=!0),r.ended||r.reading?i("reading or ended",s=!1):s&&(i("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=I(n,r))),null===(t=e>0?B(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&q(this)),null!==t&&this.emit("data",t),t},S.prototype._read=function(e){E(this,new w("_read()"))},S.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===u.stdout||e===u.stderr?m:a;function a(){i("onend"),e.end()}n.endEmitted?u.nextTick(s):r.once("end",s),e.on("unpipe",function t(s,u){i("onunpipe"),s===r&&u&&!1===u.hasUnpiped&&(u.hasUnpiped=!0,i("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",o),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",d),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&o())});var o=function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&c(r,"data")&&(e.flowing=!0,L(r))};e.on("drain",o);var l=!1;function d(t){i("ondata");var s=e.write(t);i("dest.write",s),!1===s&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!l&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){i("onerror",t),m(),e.removeListener("error",h),0===c(e,"error")&&E(e,t)}function f(){e.removeListener("finish",p),m()}function p(){i("onfinish"),e.removeListener("close",f),m()}function m(){i("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",f),e.once("finish",p),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},S.prototype.on=function(e,t){var r=l.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?R(this):n.reading||u.nextTick(O,this)),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var r=l.prototype.removeListener.call(this,e,t);return"readable"===e&&u.nextTick(T,this),r},S.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&u.nextTick(T,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,e.resumeScheduled||(e.resumeScheduled=!0,u.nextTick(D,this,e))),e.paused=!1,this},S.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(s){i("wrapped data"),r.decoder&&(s=r.decoder.write(s)),(!r.objectMode||null!=s)&&(r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause()))}),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var a=0;a<k.length;a++)e.on(k[a],this.emit.bind(this,k[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===a&&(a=r(97710)),a(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=B,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===o&&(o=r(92839)),o(S,e,t)})},67957:function(e,t,r){"use strict";e.exports=l;var n=r(627).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(16382);function c(e,t){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!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,r){h(e,t,r)})}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new a;return e.push(null)}r(96154)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},23947:function(e,t,r){"use strict";var n,i,s=r(21169);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(void 0),n=n.next}t.corkedRequestsFree.next=e})(t,e)}}e.exports=S,S.WritableState=x;var o={deprecate:r(68033)},u=r(1907),c=r(53435).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},d=r(52564),h=r(51563).getHighWaterMark,f=r(627).q,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,E=d.errorOrDestroy;function k(){}function x(e,t,i){n=n||r(16382),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,n?(s.nextTick(i,t),s.nextTick(N,e,r),e._writableState.errorEmitted=!0,E(e,t)):(i(t),e._writableState.errorEmitted=!0,E(e,t),N(e,r));else{var a=R(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||I(e,r),n?s.nextTick(C,e,r,a,i):C(e,r,a,i)}})(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function S(e){var t=this instanceof(n=n||r(16382));if(!t&&!i.call(S,this))return new S(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function A(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function C(e,t,r,n){r||0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain")),t.pendingcb--,n(),N(e,t)}function I(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var s=0,o=!0;r;)n[s]=r,r.isBuf||(o=!1),r=r.next,s+=1;n.allBuffers=o,A(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,d=t.objectMode?1:u.length;if(A(e,t,!1,d,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function P(e,t){e._final(function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function N(e,t){var r=R(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,s.nextTick(P,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(96154)(S,u),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===S&&e&&e._writableState instanceof x}})):i=function(e){return e instanceof this},S.prototype.pipe=function(){E(this,new y)},S.prototype.write=function(e,t,r){var n,i,a,o,u,d,h,f=this._writableState,m=!1,g=!f.objectMode&&(n=e,c.isBuffer(n)||n instanceof l);return g&&!c.isBuffer(e)&&(i=e,e=c.from(i)),("function"==typeof t&&(r=t,t=null),g?t="buffer":t||(t=f.defaultEncoding),"function"!=typeof r&&(r=k),f.ending)?(a=r,E(this,o=new w),s.nextTick(a,o)):(g||(u=e,d=r,null===u?h=new v:"string"==typeof u||f.objectMode||(h=new p("chunk",["string","Buffer"],u)),!h||(E(this,h),s.nextTick(d,h),0)))&&(f.pendingcb++,m=function(e,t,r,n,i,s){if(!r){var a,o,u=(a=n,o=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=c.from(a,o)),a);n!==u&&(r=!0,i="buffer",n=u)}var l=t.objectMode?1:n.length;t.length+=l;var d=t.length<t.highWaterMark;if(d||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,l,n,i,s);return d}(this,f,g,e,t,r)),m},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;!e.corked||(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||I(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,r){var n,i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||(n=r,i.ending=!0,N(this,i),n&&(i.finished?s.nextTick(n):this.once("finish",n)),i.ended=!0,this.writable=!1),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(e,t){t(e)}},97710:function(e,t,r){"use strict";var n,i=r(21169);function s(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(41120),o=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[o];if(null!==t){var r=e[f].read();null!==r&&(e[d]=null,e[o]=null,e[u]=null,t(p(r,!1)))}}function g(e){i.nextTick(m,e)}var y=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((s(n={get stream(){return this[f]},next:function(){var e,t,r=this,n=this[c];if(null!==n)return Promise.reject(n);if(this[l])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise(function(e,t){i.nextTick(function(){r[c]?t(r[c]):e(p(void 0,!0))})});var s=this[d];if(s)t=new Promise((e=this,function(t,r){s.then(function(){if(e[l]){t(p(void 0,!0));return}e[h](t,r)},r)}));else{var a=this[f].read();if(null!==a)return Promise.resolve(p(a,!1));t=new Promise(this[h])}return this[d]=t,t}},Symbol.asyncIterator,function(){return this}),s(n,"return",function(){var e=this;return new Promise(function(t,r){e[f].destroy(null,function(e){if(e){r(e);return}t(p(void 0,!0))})})}),n),y);e.exports=function(e){var t,r=Object.create(b,(s(t={},f,{value:e,writable:!0}),s(t,o,{value:null,writable:!0}),s(t,u,{value:null,writable:!0}),s(t,c,{value:null,writable:!0}),s(t,l,{value:e._readableState.endEmitted,writable:!0}),s(t,h,{value:function(e,t){var n=r[f].read();n?(r[d]=null,r[o]=null,r[u]=null,e(p(n,!1))):(r[o]=e,r[u]=t)},writable:!0}),t));return r[d]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];null!==t&&(r[d]=null,r[o]=null,r[u]=null,t(e)),r[c]=e;return}var n=r[o];null!==n&&(r[d]=null,r[o]=null,r[u]=null,n(p(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}},38357:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=s(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var a=r(53435).Buffer,o=r(88818).inspect,u=o&&o.custom||"inspect";e.exports=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n=a.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=i.data,r=s,a.prototype.copy.call(t,n,r),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=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,t}},{key:u,value:function(e,t){return o(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}()},52564:function(e,t,r){"use strict";var n=r(21169);function i(e,t){a(e,t),s(e)}function s(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(s,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(s,r),t(e)):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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},41120:function(e,t,r){"use strict";var n=r(627).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),a=s||i,o=!1,s=function(){if(!o){o=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t)}};var a,o,u=r.readable||!1!==r.readable&&t.readable,c=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||h()},d=t._writableState&&t._writableState.finished,h=function(){c=!1,d=!0,u||s.call(t)},f=t._readableState&&t._readableState.endEmitted,p=function(){u=!1,f=!0,c||s.call(t)},m=function(e){s.call(t,e)},g=function(){var e;return u&&!f?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):c&&!d?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},y=function(){t.req.on("finish",h)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",h),t.on("abort",g),t.req?y():t.on("request",y)):c&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",p),t.on("finish",h),!1!==r.error&&t.on("error",m),t.on("close",g),function(){t.removeListener("complete",h),t.removeListener("abort",g),t.removeListener("request",y),t.req&&t.req.removeListener("finish",h),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",h),t.removeListener("end",p),t.removeListener("error",m),t.removeListener("close",g)}}},92839:function(e){e.exports=function(){throw Error("Readable.from is not available in the browser")}},95057:function(e,t,r){"use strict";var n,i=r(627).q,s=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e,t,i=arguments.length,l=Array(i),d=0;d<i;d++)l[d]=arguments[d];var h=(e=l).length&&"function"==typeof e[e.length-1]?e.pop():o;if(Array.isArray(l[0])&&(l=l[0]),l.length<2)throw new s("streams");var f=l.map(function(e,i){var s,o,c,d,p,m,g=i<l.length-1;return s=i>0,c=o=function(e){t||(t=e),e&&f.forEach(u),g||(f.forEach(u),h(t))},d=!1,o=function(){d||(d=!0,c.apply(void 0,arguments))},p=!1,e.on("close",function(){p=!0}),void 0===n&&(n=r(41120)),n(e,{readable:g,writable:s},function(e){if(e)return o(e);p=!0,o()}),m=!1,function(t){if(!p&&!m){if(m=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();o(t||new a("pipe"))}}});return l.reduce(c)}},51563:function(e,t,r){"use strict";var n=r(627).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var s=null!=t.highWaterMark?t.highWaterMark:i?t[r]:null;if(null!=s){if(!(isFinite(s)&&Math.floor(s)===s)||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},1907:function(e,t,r){e.exports=r(92254).EventEmitter},76591:function(e,t,r){(t=e.exports=r(72732)).Stream=t,t.Readable=t,t.Writable=r(23947),t.Duplex=r(16382),t.Transform=r(67957),t.PassThrough=r(21947),t.finished=r(41120),t.pipeline=r(95057)},71593:function(e,t,r){var n=r(53435),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},86937:function(e,t,r){"use strict";var n=r(24282),i=r(61706),s=r(34807)(),a=r(996),o=r(58328),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(s?i(e,"length",t,!0,!0):i(e,"length",t)),e}},56151:function(e,t,r){var n=r(71593).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,s=e.length,a=this._len,o=0;o<s;){for(var u=a%i,c=Math.min(s-o,i-u),l=0;l<c;l++)r[u+l]=e[o+l];a+=c,o+=c,a%i==0&&this._update(r)}return this._len+=s,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=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;this._block.writeUInt32BE((r-n)/4294967296,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},i.prototype._update=function(){throw Error("_update must be implemented by subclass")},e.exports=i},99421:function(e,t,r){var n=e.exports=function(e){var t=n[e=e.toLowerCase()];if(!t)throw Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(55581),n.sha1=r(62300),n.sha224=r(97133),n.sha256=r(36393),n.sha384=r(72547),n.sha512=r(75913)},55581:function(e,t,r){var n=r(96154),i=r(56151),s=r(71593).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}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(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,o=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=t[u-3]^t[u-8]^t[u-14]^t[u-16];for(var c=0;c<80;++c){var l,d,h,f,p,m=~~(c/20),g=((l=r)<<5|l>>>27)+(d=n,h=i,f=s,0===m?d&h|~d&f:2===m?d&h|d&f|h&f:d^h^f)+o+t[c]+a[m]|0;o=s,s=i,i=(p=n)<<30|p>>>2,n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0},u.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},62300:function(e,t,r){var n=r(96154),i=r(56151),s=r(71593).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}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(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,o=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=(l=t[u-3]^t[u-8]^t[u-14]^t[u-16])<<1|l>>>31;for(var c=0;c<80;++c){var l,d,h,f,p,m,g=~~(c/20),y=((d=r)<<5|d>>>27)+(h=n,f=i,p=s,0===g?h&f|~h&p:2===g?h&f|h&p|f&p:h^f^p)+o+t[c]+a[g]|0;o=s,s=i,i=(m=n)<<30|m>>>2,n=r,r=y}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0},u.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},97133:function(e,t,r){var n=r(96154),i=r(36393),s=r(56151),a=r(71593).Buffer,o=Array(64);function u(){this.init(),this._w=o,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 e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},36393:function(e,t,r){var n=r(96154),i=r(56151),s=r(71593).Buffer,a=[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],o=Array(64);function u(){this.init(),this._w=o,i.call(this,64,56)}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(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,o=0|this._e,u=0|this._f,c=0|this._g,l=0|this._h,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<64;++d)t[d]=(((f=t[d-2])>>>17|f<<15)^(f>>>19|f<<13)^f>>>10)+t[d-7]+(((p=t[d-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3)+t[d-16]|0;for(var h=0;h<64;++h){var f,p,m,g,y,b,v,w,_,E=l+(((m=o)>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(g=o,y=u,(b=c)^g&(y^b))+a[h]+t[h]|0,k=(((v=r)>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+((w=r)&(_=n)|i&(w|_))|0;l=c,c=u,u=o,o=s+E|0,s=i,i=n,n=r,r=E+k|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=u+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0},u.prototype._hash=function(){var e=s.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},72547:function(e,t,r){var n=r(96154),i=r(75913),s=r(56151),a=r(71593).Buffer,o=Array(160);function u(){this.init(),this._w=o,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 e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},75913:function(e,t,r){var n=r(96154),i=r(56151),s=r(71593).Buffer,a=[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],o=Array(160);function u(){this.init(),this._w=o,i.call(this,128,112)}function c(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return e>>>0<t>>>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(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,s=0|this._dh,o=0|this._eh,u=0|this._fh,h=0|this._gh,f=0|this._hh,p=0|this._al,m=0|this._bl,g=0|this._cl,y=0|this._dl,b=0|this._el,v=0|this._fl,w=0|this._gl,_=0|this._hl,E=0;E<32;E+=2)t[E]=e.readInt32BE(4*E),t[E+1]=e.readInt32BE(4*E+4);for(;E<160;E+=2){var k,x,S,A,C,I,R,P,N=t[E-30],M=t[E-30+1],T=((k=N)>>>1|(x=M)<<31)^(k>>>8|x<<24)^k>>>7,O=((S=M)>>>1|(A=N)<<31)^(S>>>8|A<<24)^(S>>>7|A<<25);N=t[E-4],M=t[E-4+1];var D=((C=N)>>>19|(I=M)<<13)^(I>>>29|C<<3)^C>>>6,L=((R=M)>>>19|(P=N)<<13)^(P>>>29|R<<3)^(R>>>6|P<<26),B=t[E-14],q=t[E-14+1],z=t[E-32],U=t[E-32+1],j=O+q|0,F=T+B+d(j,O)|0;F=(F=F+D+d(j=j+L|0,L)|0)+z+d(j=j+U|0,U)|0,t[E]=F,t[E+1]=j}for(var H=0;H<160;H+=2){F=t[H],j=t[H+1];var $,W,G,V,K,Z,Y,J,Q,X,ee=($=r)&(W=n)|i&($|W),et=(G=p)&(V=m)|g&(G|V),er=c(r,p),en=c(p,r),ei=l(o,b),es=l(b,o),ea=a[H],eo=a[H+1],eu=(K=o,Z=u,(Y=h)^K&(Z^Y)),ec=(J=b,Q=v,(X=w)^J&(Q^X)),el=_+es|0,ed=f+ei+d(el,_)|0;ed=(ed=(ed=ed+eu+d(el=el+ec|0,ec)|0)+ea+d(el=el+eo|0,eo)|0)+F+d(el=el+j|0,j)|0;var eh=en+et|0,ef=er+ee+d(eh,en)|0;f=h,_=w,h=u,w=v,u=o,v=b,o=s+ed+d(b=y+el|0,y)|0,s=i,y=g,i=n,g=m,n=r,m=p,r=ed+ef+d(p=el+eh|0,el)|0}this._al=this._al+p|0,this._bl=this._bl+m|0,this._cl=this._cl+g|0,this._dl=this._dl+y|0,this._el=this._el+b|0,this._fl=this._fl+v|0,this._gl=this._gl+w|0,this._hl=this._hl+_|0,this._ah=this._ah+r+d(this._al,p)|0,this._bh=this._bh+n+d(this._bl,m)|0,this._ch=this._ch+i+d(this._cl,g)|0,this._dh=this._dh+s+d(this._dl,y)|0,this._eh=this._eh+o+d(this._el,b)|0,this._fh=this._fh+u+d(this._fl,v)|0,this._gh=this._gh+h+d(this._gl,w)|0,this._hh=this._hh+f+d(this._hl,_)|0},u.prototype._hash=function(){var e=s.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},15654:function(e){e.exports=function(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(t),u=0;u<s.length;u++){var c=s[u];if(!o(c))return!1;var l=e[c],d=t[c];if(!1===(i=r?r.call(n,l,d,c):void 0)||void 0===i&&l!==d)return!1}return!0}},90716:function(e){"use strict";e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return -1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},93904:function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},39434:function(e,t,r){"use strict";var n=r(71593).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:this.write=h,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e,0);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},69024:function(e,t,r){"use strict";r.d(t,{vJ:function(){return tg},iv:function(){return th},F4:function(){return ty},zo:function(){return tp}});var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var s=r(66399),a=r(15654),o=r.n(a),u="-ms-",c="-moz-",l="-webkit-",d="comm",h="rule",f="decl",p="@keyframes",m=Math.abs,g=String.fromCharCode,y=Object.assign;function b(e,t){return(e=t.exec(e))?e[0]:e}function v(e,t,r){return e.replace(t,r)}function w(e,t,r){return e.indexOf(t,r)}function _(e,t){return 0|e.charCodeAt(t)}function E(e,t,r){return e.slice(t,r)}function k(e){return e.length}function x(e,t){return t.push(e),e}function S(e,t){return e.filter(function(e){return!b(e,t)})}var A=1,C=1,I=0,R=0,P=0,N="";function M(e,t,r,n,i,s,a,o){return{value:e,root:t,parent:r,type:n,props:i,children:s,line:A,column:C,length:a,return:"",siblings:o}}function T(e,t){return y(M("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function O(e){for(;e.root;)e=T(e.root,{children:[e]});x(e,e.siblings)}function D(){return P=R<I?_(N,R++):0,C++,10===P&&(C=1,A++),P}function L(){return _(N,R)}function B(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function q(e){var t,r;return(t=R-1,r=function e(t){for(;D();)switch(P){case t:return R;case 34:case 39:34!==t&&39!==t&&e(P);break;case 40:41===t&&e(t);break;case 92:D()}return R}(91===e?e+2:40===e?e+1:e),E(N,t,r)).trim()}function z(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function U(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case f:return e.return=e.return||e.value;case d:return"";case p:return e.return=e.value+"{"+z(e.children,n)+"}";case h:if(!k(e.value=e.props.join(",")))return""}return k(r=z(e.children,n))?e.return=e.value+"{"+r+"}":""}function j(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case f:e.return=function e(t,r,n){var i;switch(i=r,45^_(t,0)?(((i<<2^_(t,0))<<2^_(t,1))<<2^_(t,2))<<2^_(t,3):0){case 5103:return l+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return l+t+t;case 4789:return c+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return l+t+c+t+u+t+t;case 5936:switch(_(t,r+11)){case 114:return l+t+u+v(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return l+t+u+v(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return l+t+u+v(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return l+t+u+t+t;case 6165:return l+t+u+"flex-"+t+t;case 5187:return l+t+v(t,/(\w+).+(:[^]+)/,l+"box-$1$2"+u+"flex-$1$2")+t;case 5443:return l+t+u+"flex-item-"+v(t,/flex-|-self/g,"")+(b(t,/flex-|baseline/)?"":u+"grid-row-"+v(t,/flex-|-self/g,""))+t;case 4675:return l+t+u+"flex-line-pack"+v(t,/align-content|flex-|-self/g,"")+t;case 5548:return l+t+u+v(t,"shrink","negative")+t;case 5292:return l+t+u+v(t,"basis","preferred-size")+t;case 6060:return l+"box-"+v(t,"-grow","")+l+t+u+v(t,"grow","positive")+t;case 4554:return l+v(t,/([^-])(transform)/g,"$1"+l+"$2")+t;case 6187:return v(v(v(t,/(zoom-|grab)/,l+"$1"),/(image-set)/,l+"$1"),t,"")+t;case 5495:case 3959:return v(t,/(image-set\([^]*)/,l+"$1$`$1");case 4968:return v(v(t,/(.+:)(flex-)?(.*)/,l+"box-pack:$3"+u+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+l+t+t;case 4200:if(!b(t,/flex-|baseline/))return u+"grid-column-align"+E(t,r)+t;break;case 2592:case 3360:return u+v(t,"template-","")+t;case 4384:case 3616:if(n&&n.some(function(e,t){return r=t,b(e.props,/grid-\w+-end/)}))return~w(t+(n=n[r].value),"span",0)?t:u+v(t,"-start","")+t+u+"grid-row-span:"+(~w(n,"span",0)?b(n,/\d+/):+b(n,/\d+/)-+b(t,/\d+/))+";";return u+v(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(e){return b(e.props,/grid-\w+-start/)})?t:u+v(v(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return v(t,/(.+)-inline(.+)/,l+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(k(t)-1-r>6)switch(_(t,r+1)){case 109:if(45!==_(t,r+4))break;case 102:return v(t,/(.+:)(.+)-([^]+)/,"$1"+l+"$2-$3$1"+c+(108==_(t,r+3)?"$3":"$2-$3"))+t;case 115:return~w(t,"stretch",0)?e(v(t,"stretch","fill-available"),r,n)+t:t}break;case 5152:case 5920:return v(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,r,n,i,s,a,o){return u+r+":"+n+o+(i?u+r+"-span:"+(s?a:+a-+n)+o:"")+t});case 4949:if(121===_(t,r+6))return v(t,":",":"+l)+t;break;case 6444:switch(_(t,45===_(t,14)?18:11)){case 120:return v(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+l+(45===_(t,14)?"inline-":"")+"box$3$1"+l+"$2$3$1"+u+"$2box$3")+t;case 100:return v(t,":",":"+u)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return v(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,r);return;case p:return z([T(e,{value:v(e.value,"@","@"+l)})],n);case h:if(e.length){var i,s;return i=r=e.props,s=function(t){switch(b(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":O(T(e,{props:[v(t,/:(read-\w+)/,":"+c+"$1")]})),O(T(e,{props:[t]})),y(e,{props:S(r,n)});break;case"::placeholder":O(T(e,{props:[v(t,/:(plac\w+)/,":"+l+"input-$1")]})),O(T(e,{props:[v(t,/:(plac\w+)/,":"+c+"$1")]})),O(T(e,{props:[v(t,/:(plac\w+)/,u+"input-$1")]})),O(T(e,{props:[t]})),y(e,{props:S(r,n)})}return""},i.map(s).join("")}}}function F(e,t,r,n,i,s,a,o,u,c,l,d){for(var f=i-1,p=0===i?s:[""],g=p.length,y=0,b=0,w=0;y<n;++y)for(var _=0,k=E(e,f+1,f=m(b=a[y])),x=e;_<g;++_)(x=(b>0?p[_]+" "+k:v(k,/&\f/g,p[_])).trim())&&(u[w++]=x);return M(e,t,r,0===i?h:o,u,c,l,d)}function H(e,t,r,n,i){return M(e,t,r,f,E(e,0,n),E(e,n+1,-1),n,i)}var $={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},W=r(21169),G=void 0!==W&&void 0!==W.env&&(W.env.REACT_APP_SC_ATTR||W.env.SC_ATTR)||"data-styled",V="active",K="data-styled-version",Z="6.1.13",Y="/*!sc*/\n",J="undefined"!=typeof window&&"HTMLElement"in window,Q=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==W&&void 0!==W.env&&void 0!==W.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==W.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==W.env.REACT_APP_SC_DISABLE_SPEEDY&&W.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==W&&void 0!==W.env&&void 0!==W.env.SC_DISABLE_SPEEDY&&""!==W.env.SC_DISABLE_SPEEDY&&"false"!==W.env.SC_DISABLE_SPEEDY&&W.env.SC_DISABLE_SPEEDY),X={},ee=Object.freeze([]),et=Object.freeze({});function er(e,t,r){return void 0===r&&(r=et),e.theme!==r.theme&&e.theme||t||r.theme}var en=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),ei=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,es=/(^-|-$)/g;function ea(e){return e.replace(ei,"-").replace(es,"")}var eo=/(a)(d)/gi,eu=function(e){return String.fromCharCode(e+(e>25?39:97))};function ec(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=eu(t%52)+r;return(eu(t%52)+r).replace(eo,"$1-$2")}var el,ed=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},eh=function(e){return ed(5381,e)};function ef(e){return ec(eh(e)>>>0)}function ep(e){return"string"==typeof e}var em="function"==typeof Symbol&&Symbol.for,eg=em?Symbol.for("react.memo"):60115,ey=em?Symbol.for("react.forward_ref"):60112,eb={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ev={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ew={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},e_=((el={})[ey]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},el[eg]=ew,el);function eE(e){return("type"in e&&e.type.$$typeof)===eg?ew:"$$typeof"in e?e_[e.$$typeof]:eb}var ek=Object.defineProperty,ex=Object.getOwnPropertyNames,eS=Object.getOwnPropertySymbols,eA=Object.getOwnPropertyDescriptor,eC=Object.getPrototypeOf,eI=Object.prototype;function eR(e){return"function"==typeof e}function eP(e){return"object"==typeof e&&"styledComponentId"in e}function eN(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eM(e,t){if(0===e.length)return"";for(var r=e[0],n=1;n<e.length;n++)r+=t?t+e[n]:e[n];return r}function eT(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eO(e,t){Object.defineProperty(e,"toString",{value:t})}function eD(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var eL=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw eD(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var s=n;s<i;s++)this.groupSizes[s]=0}for(var a=this.indexOfGroup(e+1),o=(s=0,t.length);s<o;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var i=r;i<n;i++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,s=n;s<i;s++)t+="".concat(this.tag.getRule(s)).concat(Y);return t},e}(),eB=new Map,eq=new Map,ez=1,eU=function(e){if(eB.has(e))return eB.get(e);for(;eq.has(ez);)ez++;var t=ez++;return eB.set(e,t),eq.set(t,e),t},ej=function(e,t){ez=t+1,eB.set(e,t),eq.set(t,e)},eF="style[".concat(G,"][").concat(K,'="').concat(Z,'"]'),eH=new RegExp("^".concat(G,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),e$=function(e,t,r){for(var n,i=r.split(","),s=0,a=i.length;s<a;s++)(n=i[s])&&e.registerName(t,n)},eW=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(Y),i=[],s=0,a=n.length;s<a;s++){var o=n[s].trim();if(o){var u=o.match(eH);if(u){var c=0|parseInt(u[1],10),l=u[2];0!==c&&(ej(l,c),e$(e,l,u[3]),e.getTag().insertRules(c,i)),i.length=0}else i.push(o)}}},eG=function(e){for(var t=document.querySelectorAll(eF),r=0,n=t.length;r<n;r++){var i=t[r];i&&i.getAttribute(G)!==V&&(eW(e,i),i.parentNode&&i.parentNode.removeChild(i))}},eV=function(e){var t,n=document.head,i=e||n,s=document.createElement("style"),a=(t=Array.from(i.querySelectorAll("style[".concat(G,"]"))))[t.length-1],o=void 0!==a?a.nextSibling:null;s.setAttribute(G,V),s.setAttribute(K,Z);var u=r.nc;return u&&s.setAttribute("nonce",u),i.insertBefore(s,o),s},eK=function(){function e(e){this.element=eV(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var i=t[r];if(i.ownerNode===e)return i}throw eD(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),eZ=function(){function e(e){this.element=eV(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),eY=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eJ=J,eQ={isServer:!J,useCSSOMInjection:!Q},eX=function(){function e(e,t,r){void 0===e&&(e=et),void 0===t&&(t={});var i=this;this.options=n(n({},eQ),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&J&&eJ&&(eJ=!1,eG(this)),eO(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",i=0;i<r;i++)(function(r){var i=eq.get(r);if(void 0!==i){var s=e.names.get(i),a=t.getGroup(r);if(void 0!==s&&s.size&&0!==a.length){var o="".concat(G,".g").concat(r,'[id="').concat(i,'"]'),u="";void 0!==s&&s.forEach(function(e){e.length>0&&(u+="".concat(e,","))}),n+="".concat(a).concat(o,'{content:"').concat(u,'"}').concat(Y)}}})(i);return n}(i)})}return e.registerId=function(e){return eU(e)},e.prototype.rehydrate=function(){!this.server&&J&&eG(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(n(n({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,r;return this.tag||(this.tag=(t=(e=this.options).useCSSOMInjection,r=e.target,new eL(e.isServer?new eY(r):t?new eK(r):new eZ(r))))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(eU(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(eU(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(eU(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),e0=/&/g,e1=/^\s*\/\/.*$/gm;function e2(e){var t,r,n,i=void 0===e?et:e,s=i.options,a=void 0===s?et:s,o=i.plugins,u=void 0===o?ee:o,c=function(e,n,i){return i.startsWith(r)&&i.endsWith(r)&&i.replaceAll(r,"").length>0?".".concat(t):e},l=u.slice();l.push(function(e){e.type===h&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(e0,r).replace(n,c))}),a.prefix&&l.push(j),l.push(U);var f=function(e,i,s,o){void 0===i&&(i=""),void 0===s&&(s=""),void 0===o&&(o="&"),t=o,r=i,n=RegExp("\\".concat(r,"\\b"),"g");var u,c,h,f,p,y,b=e.replace(e1,""),S=(p=function e(t,r,n,i,s,a,o,u,c){for(var l,h=0,f=0,p=o,y=0,b=0,S=0,I=1,T=1,O=1,z=0,U="",j=s,$=a,W=i,G=U;T;)switch(S=z,z=D()){case 40:if(108!=S&&58==_(G,p-1)){-1!=w(G+=v(q(z),"&","&\f"),"&\f",m(h?u[h-1]:0))&&(O=-1);break}case 34:case 39:case 91:G+=q(z);break;case 9:case 10:case 13:case 32:G+=function(e){for(;P=L();)if(P<33)D();else break;return B(e)>2||B(P)>3?"":" "}(S);break;case 92:G+=function(e,t){for(var r;--t&&D()&&!(P<48)&&!(P>102)&&(!(P>57)||!(P<65))&&(!(P>70)||!(P<97)););return r=R+(t<6&&32==L()&&32==D()),E(N,e,r)}(R-1,7);continue;case 47:switch(L()){case 42:case 47:x(M(l=function(e,t){for(;D();)if(e+P===57)break;else if(e+P===84&&47===L())break;return"/*"+E(N,t,R-1)+"*"+g(47===e?e:D())}(D(),R),r,n,d,g(P),E(l,2,-2),0,c),c);break;default:G+="/"}break;case 123*I:u[h++]=k(G)*O;case 125*I:case 59:case 0:switch(z){case 0:case 125:T=0;case 59+f:-1==O&&(G=v(G,/\f/g,"")),b>0&&k(G)-p&&x(b>32?H(G+";",i,n,p-1,c):H(v(G," ","")+";",i,n,p-2,c),c);break;case 59:G+=";";default:if(x(W=F(G,r,n,h,f,s,u,U,j=[],$=[],p,a),a),123===z){if(0===f)e(G,r,W,W,j,a,p,u,$);else switch(99===y&&110===_(G,3)?100:y){case 100:case 108:case 109:case 115:e(t,W,W,i&&x(F(t,W,W,0,0,s,u,U,s,j=[],p,$),$),s,$,p,u,i?j:$);break;default:e(G,W,W,W,[""],$,0,u,$)}}}h=f=b=0,I=O=1,U=G="",p=o;break;case 58:p=1+k(G),b=S;default:if(I<1){if(123==z)--I;else if(125==z&&0==I++&&125==(P=R>0?_(N,--R):0,C--,10===P&&(C=1,A--),P))continue}switch(G+=g(z),z*I){case 38:O=f>0?1:(G+="\f",-1);break;case 44:u[h++]=(k(G)-1)*O,O=1;break;case 64:45===L()&&(G+=q(D())),y=L(),f=p=k(U=G+=function(e){for(;!B(L());)D();return E(N,e,R)}(R)),z++;break;case 45:45===S&&2==k(G)&&(I=0)}}return a}("",null,null,null,[""],(f=h=s||i?"".concat(s," ").concat(i," { ").concat(b," }"):b,A=C=1,I=k(N=f),R=0,h=[]),0,[0],h),N="",p);a.namespace&&(S=function e(t,r){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(r," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(r," ")),t.props=t.props.map(function(e){return"".concat(r," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,r)),t})}(S,a.namespace));var T=[];return z(S,(c=(u=l.concat((y=function(e){return T.push(e)},function(e){!e.root&&(e=e.return)&&y(e)}))).length,function(e,t,r,n){for(var i="",s=0;s<c;s++)i+=u[s](e,t,r,n)||"";return i})),T};return f.hash=u.length?u.reduce(function(e,t){return t.name||eD(15),ed(e,t.name)},5381).toString():"",f}var e3=new eX,e5=e2(),e6=s.createContext({shouldForwardProp:void 0,styleSheet:e3,stylis:e5}),e4=(e6.Consumer,s.createContext(void 0));function e8(){return(0,s.useContext)(e6)}function e9(e){var t=(0,s.useState)(e.stylisPlugins),r=t[0],n=t[1],i=e8().styleSheet,a=(0,s.useMemo)(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,i]),u=(0,s.useMemo)(function(){return e2({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);(0,s.useEffect)(function(){o()(r,e.stylisPlugins)||n(e.stylisPlugins)},[e.stylisPlugins]);var c=(0,s.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:a,stylis:u}},[e.shouldForwardProp,a,u]);return s.createElement(e6.Provider,{value:c},s.createElement(e4.Provider,{value:u},e.children))}var e7=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=e5);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,eO(this,function(){throw eD(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e5),this.name+e.hash},e}();function te(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;n>="A"&&n<="Z"?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var tt=function(e){return null==e||!1===e||""===e},tr=function(e){var t=[];for(var r in e){var n=e[r];e.hasOwnProperty(r)&&!tt(n)&&(Array.isArray(n)&&n.isCss||eR(n)?t.push("".concat(te(r),":"),n,";"):eT(n)?t.push.apply(t,i(i(["".concat(r," {")],tr(n),!1),["}"],!1)):t.push("".concat(te(r),": ").concat(null==n||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||r in $||r.startsWith("--")?String(n).trim():"".concat(n,"px"),";")))}return t};function tn(e,t,r,n){return tt(e)?[]:eP(e)?[".".concat(e.styledComponentId)]:eR(e)?!eR(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:tn(e(t),t,r,n):e instanceof e7?r?(e.inject(r,n),[e.getName(n)]):[e]:eT(e)?tr(e):Array.isArray(e)?Array.prototype.concat.apply(ee,e.map(function(e){return tn(e,t,r,n)})):[e.toString()]}function ti(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(eR(r)&&!eP(r))return!1}return!0}var ts=eh(Z),ta=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&ti(e),this.componentId=t,this.baseHash=ed(ts,t),this.baseStyle=r,eX.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r):"";if(this.isStatic&&!r.hash){if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=eN(n,this.staticRulesId);else{var i=eM(tn(this.rules,e,t,r)),s=ec(ed(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,s)){var a=r(i,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,a)}n=eN(n,s),this.staticRulesId=s}}else{for(var o=ed(this.baseHash,r.hash),u="",c=0;c<this.rules.length;c++){var l=this.rules[c];if("string"==typeof l)u+=l;else if(l){var d=eM(tn(l,e,t,r));o=ed(o,d+c),u+=d}}if(u){var h=ec(o>>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,r(u,".".concat(h),void 0,this.componentId)),n=eN(n,h)}}return n},e}(),to=s.createContext(void 0);to.Consumer;var tu={};function tc(e,t,r){var i,a,o,u,c=eP(e),l=!ep(e),d=t.attrs,h=void 0===d?ee:d,f=t.componentId,p=void 0===f?(i=t.displayName,a=t.parentComponentId,tu[o="string"!=typeof i?"sc":ea(i)]=(tu[o]||0)+1,u="".concat(o,"-").concat(ef(Z+o+tu[o])),a?"".concat(a,"-").concat(u):u):f,m=t.displayName,g=void 0===m?ep(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):m,y=t.displayName&&t.componentId?"".concat(ea(t.displayName),"-").concat(t.componentId):t.componentId||p,b=c&&e.attrs?e.attrs.concat(h).filter(Boolean):h,v=t.shouldForwardProp;if(c&&e.shouldForwardProp){var w=e.shouldForwardProp;if(t.shouldForwardProp){var _=t.shouldForwardProp;v=function(e,t){return w(e,t)&&_(e,t)}}else v=w}var E=new ta(r,y,c?e.componentStyle:void 0);function k(e,t){return function(e,t,r){var i,a=e.attrs,o=e.componentStyle,u=e.defaultProps,c=e.foldedComponentIds,l=e.styledComponentId,d=e.target,h=s.useContext(to),f=e8(),p=e.shouldForwardProp||f.shouldForwardProp,m=er(t,h,u)||et,g=function(e,t,r){for(var i,s=n(n({},t),{className:void 0,theme:r}),a=0;a<e.length;a+=1){var o=eR(i=e[a])?i(s):i;for(var u in o)s[u]="className"===u?eN(s[u],o[u]):"style"===u?n(n({},s[u]),o[u]):o[u]}return t.className&&(s.className=eN(s.className,t.className)),s}(a,t,m),y=g.as||d,b={};for(var v in g)void 0===g[v]||"$"===v[0]||"as"===v||"theme"===v&&g.theme===m||("forwardedAs"===v?b.as=g.forwardedAs:p&&!p(v,y)||(b[v]=g[v]));var w=(i=e8(),o.generateAndInjectStyles(g,i.styleSheet,i.stylis)),_=eN(c,l);return w&&(_+=" "+w),g.className&&(_+=" "+g.className),b[ep(y)&&!en.has(y)?"class":"className"]=_,b.ref=r,(0,s.createElement)(y,b)}(x,e,t)}k.displayName=g;var x=s.forwardRef(k);return x.attrs=b,x.componentStyle=E,x.displayName=g,x.shouldForwardProp=v,x.foldedComponentIds=c?eN(e.foldedComponentIds,e.styledComponentId):"",x.styledComponentId=y,x.target=c?e.target:e,Object.defineProperty(x,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=c?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)(function e(t,r,n){if(void 0===n&&(n=!1),!n&&!eT(t)&&!Array.isArray(t))return r;if(Array.isArray(r))for(var i=0;i<r.length;i++)t[i]=e(t[i],r[i]);else if(eT(r))for(var i in r)t[i]=e(t[i],r[i]);return t})(e,t[n],!0);return e}({},e.defaultProps,t):t}}),eO(x,function(){return".".concat(x.styledComponentId)}),l&&function e(t,r,n){if("string"!=typeof r){if(eI){var i=eC(r);i&&i!==eI&&e(t,i,n)}var s=ex(r);eS&&(s=s.concat(eS(r)));for(var a=eE(t),o=eE(r),u=0;u<s.length;++u){var c=s[u];if(!(c in ev||n&&n[c]||o&&c in o||a&&c in a)){var l=eA(r,c);try{ek(t,c,l)}catch(e){}}}}return t}(x,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}function tl(e,t){for(var r=[e[0]],n=0,i=t.length;n<i;n+=1)r.push(t[n],e[n+1]);return r}var td=function(e){return Object.assign(e,{isCss:!0})};function th(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return eR(e)||eT(e)?td(tn(tl(ee,i([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?tn(e):td(tn(tl(e,t)))}var tf=function(e){return function e(t,r,s){if(void 0===s&&(s=et),!r)throw eD(1,r);var a=function(e){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];return t(r,s,th.apply(void 0,i([e],n,!1)))};return a.attrs=function(i){return e(t,r,n(n({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)}))},a.withConfig=function(i){return e(t,r,n(n({},s),i))},a}(tc,e)},tp=tf;en.forEach(function(e){tp[e]=tf(e)});var tm=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ti(e),eX.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var i=n(eM(tn(this.rules,t,r,n)),""),s=this.componentId+e;r.insertRules(s,s,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&eX.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}();function tg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var a=th.apply(void 0,i([e],t,!1)),o="sc-global-".concat(ef(JSON.stringify(a))),u=new tm(a,o),c=function(e){var t=e8(),r=s.useContext(to),n=s.useRef(t.styleSheet.allocateGSInstance(o)).current;return t.styleSheet.server&&l(n,e,t.styleSheet,r,t.stylis),s.useLayoutEffect(function(){if(!t.styleSheet.server)return l(n,e,t.styleSheet,r,t.stylis),function(){return u.removeStyles(n,t.styleSheet)}},[n,e,t.styleSheet,r,t.stylis]),null};function l(e,t,r,i,s){if(u.isStatic)u.renderStyles(e,X,r,s);else{var a=n(n({},t),{theme:er(t,i,c.defaultProps)});u.renderStyles(e,a,r,s)}}return s.memo(c)}function ty(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=eM(th.apply(void 0,i([e],t,!1)));return new e7(ef(n),n)}!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=r.nc,i=eM([n&&'nonce="'.concat(n,'"'),"".concat(G,'="true"'),"".concat(K,'="').concat(Z,'"')].filter(Boolean)," ");return"<style ".concat(i,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw eD(2);return e._emitSheetCSS()},this.getStyleElement=function(){if(e.sealed)throw eD(2);var t,i=e.instance.toString();if(!i)return[];var a=((t={})[G]="",t[K]=Z,t.dangerouslySetInnerHTML={__html:i},t),o=r.nc;return o&&(a.nonce=o),[s.createElement("style",n({},a,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eX({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw eD(2);return s.createElement(e9,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw eD(3)}}()},66346:function(e,t,r){"use strict";r.r(t),r.d(t,{__assign:function(){return s},__asyncDelegator:function(){return w},__asyncGenerator:function(){return v},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return l},__classPrivateFieldGet:function(){return S},__classPrivateFieldSet:function(){return A},__createBinding:function(){return h},__decorate:function(){return o},__exportStar:function(){return f},__extends:function(){return i},__generator:function(){return d},__importDefault:function(){return x},__importStar:function(){return k},__makeTemplateObject:function(){return E},__metadata:function(){return c},__param:function(){return u},__read:function(){return m},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return y},__values:function(){return p}});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((n=n.apply(e,t||[])).next())})}function d(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}}function h(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function f(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){s.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{var r;(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(u,c):l(s[0][2],r)}catch(e){l(s[0][3],e)}}function u(e){o("next",e)}function c(e){o("throw",e)}function l(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},92750:function(e,t,r){var n;!function(i,s){"use strict";var a="function",o="undefined",u="object",c="string",l="major",d="model",h="name",f="type",p="vendor",m="version",g="architecture",y="console",b="mobile",v="tablet",w="smarttv",_="wearable",E="embedded",k="Amazon",x="Apple",S="ASUS",A="BlackBerry",C="Browser",I="Chrome",R="Firefox",P="Google",N="Huawei",M="Microsoft",T="Motorola",O="Opera",D="Samsung",L="Sharp",B="Sony",q="Xiaomi",z="Zebra",U="Facebook",j="Chromium OS",F="Mac OS",H=" Browser",$=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},W=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},G=function(e,t){return typeof e===c&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},K=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},Z=function(e,t){for(var r,n,i,o,c,l,d=0;d<t.length&&!c;){var h=t[d],f=t[d+1];for(r=n=0;r<h.length&&!c&&h[r];)if(c=h[r++].exec(e))for(i=0;i<f.length;i++)l=c[++n],typeof(o=f[i])===u&&o.length>0?2===o.length?typeof o[1]==a?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:3===o.length?typeof o[1]!==a||o[1].exec&&o[1].test?this[o[0]]=l?l.replace(o[1],o[2]):void 0:this[o[0]]=l?o[1].call(this,l,o[2]):void 0:4===o.length&&(this[o[0]]=l?o[3].call(this,l.replace(o[1],o[2])):void 0):this[o]=l||s;d+=2}},Y=function(e,t){for(var r in t)if(typeof t[r]===u&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(G(t[r][n],e))return"?"===r?s:r}else if(G(t[r],e))return"?"===r?s:r;return t.hasOwnProperty("*")?t["*"]:e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Q={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,m],[/opios[\/ ]+([\w\.]+)/i],[m,[h,O+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[m,[h,O+" GX"]],[/\bopr\/([\w\.]+)/i],[m,[h,O]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[h,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,m],[/quark(?:pc)?\/([-\w\.]+)/i],[m,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[m,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[h,"UC"+C]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[h,"Smart Lenovo "+C]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+C],m],[/\bfocus\/([\w\.]+)/i],[m,[h,R+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[h,O+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[h,O+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[h,"MIUI "+C]],[/fxios\/([-\w\.]+)/i],[m,[h,R]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360"+H]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],m],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+H],m],[/samsungbrowser\/([\w\.]+)/i],[m,[h,D+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],m],[/metasr[\/ ]?([\d\.]+)/i],[m,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[h,m],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,U],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[h,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,I+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[h,"Android "+C]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[m,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[h,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],m],[/(wolvic)\/([\w\.]+)/i],[h,m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[h,R+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,[m,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,V]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[p,D],[f,v]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[p,D],[f,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[p,x],[f,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[p,x],[f,v]],[/(macintosh);/i],[d,[p,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[p,L],[f,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[p,N],[f,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[p,N],[f,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[d,/_/g," "],[p,q],[f,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[p,q],[f,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[p,"OPPO"],[f,b]],[/\b(opd2\d{3}a?) bui/i],[d,[p,"OPPO"],[f,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[p,"Vivo"],[f,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[p,"Realme"],[f,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[p,T],[f,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[p,T],[f,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[p,"LG"],[f,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[p,"LG"],[f,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[p,"Lenovo"],[f,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[p,"Nokia"],[f,b]],[/(pixel c)\b/i],[d,[p,P],[f,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[p,P],[f,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[p,B],[f,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[p,B],[f,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[p,"OnePlus"],[f,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[p,k],[f,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[p,k],[f,b]],[/(playbook);[-\w\),; ]+(rim)/i],[d,p,[f,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[p,A],[f,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[p,S],[f,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[p,S],[f,b]],[/(nexus 9)/i],[d,[p,"HTC"],[f,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[d,/_/g," "],[f,b]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[p,"TCL"],[f,v]],[/(itel) ((\w+))/i],[[p,V],d,[f,Y,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[p,"Acer"],[f,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[p,"Meizu"],[f,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[p,"Ulefone"],[f,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[p,"Nothing"],[f,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,d,[f,b]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,d,[f,v]],[/(surface duo)/i],[d,[p,M],[f,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[p,"Fairphone"],[f,b]],[/(u304aa)/i],[d,[p,"AT&T"],[f,b]],[/\bsie-(\w*)/i],[d,[p,"Siemens"],[f,b]],[/\b(rct\w+) b/i],[d,[p,"RCA"],[f,v]],[/\b(venue[\d ]{2,7}) b/i],[d,[p,"Dell"],[f,v]],[/\b(q(?:mv|ta)\w+) b/i],[d,[p,"Verizon"],[f,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[p,"Barnes & Noble"],[f,v]],[/\b(tm\d{3}\w+) b/i],[d,[p,"NuVision"],[f,v]],[/\b(k88) b/i],[d,[p,"ZTE"],[f,v]],[/\b(nx\d{3}j) b/i],[d,[p,"ZTE"],[f,b]],[/\b(gen\d{3}) b.+49h/i],[d,[p,"Swiss"],[f,b]],[/\b(zur\d{3}) b/i],[d,[p,"Swiss"],[f,v]],[/\b((zeki)?tb.*\b) b/i],[d,[p,"Zeki"],[f,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],d,[f,v]],[/\b(ns-?\w{0,9}) b/i],[d,[p,"Insignia"],[f,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[p,"NextBook"],[f,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],d,[f,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],d,[f,b]],[/\b(ph-1) /i],[d,[p,"Essential"],[f,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[p,"Envizen"],[f,v]],[/\b(trio[-\w\. ]+) b/i],[d,[p,"MachSpeed"],[f,v]],[/\btu_(1491) b/i],[d,[p,"Rotor"],[f,v]],[/(shield[\w ]+) b/i],[d,[p,"Nvidia"],[f,v]],[/(sprint) (\w+)/i],[p,d,[f,b]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[p,M],[f,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[p,z],[f,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[p,z],[f,b]],[/smart-tv.+(samsung)/i],[p,[f,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[p,D],[f,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,"LG"],[f,w]],[/(apple) ?tv/i],[p,[d,x+" TV"],[f,w]],[/crkey/i],[[d,I+"cast"],[p,P],[f,w]],[/droid.+aft(\w+)( bui|\))/i],[d,[p,k],[f,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[p,L],[f,w]],[/(bravia[\w ]+)( bui|\))/i],[d,[p,B],[f,w]],[/(mitv-\w{5}) bui/i],[d,[p,q],[f,w]],[/Hbbtv.*(technisat) (.*);/i],[p,d,[f,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,K],[d,K],[f,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,d,[f,y]],[/droid.+; (shield) bui/i],[d,[p,"Nvidia"],[f,y]],[/(playstation [345portablevi]+)/i],[d,[p,B],[f,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[p,M],[f,y]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[d,[p,D],[f,_]],[/((pebble))app/i],[p,d,[f,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[p,x],[f,_]],[/droid.+; (glass) \d/i],[d,[p,P],[f,_]],[/droid.+; (wt63?0{2,3})\)/i],[d,[p,z],[f,_]],[/(quest( \d| pro)?)/i],[d,[p,U],[f,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[f,E]],[/(aeobc)\b/i],[d,[p,k],[f,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[f,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[f,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,b]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[h,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,m],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[h,[m,Y,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,Y,J],[h,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,F],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,m],[/\(bb(10);/i],[m,[h,A]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[h,R+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[h,I+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,j],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,m],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,m]]},X=function(e,t){if(typeof e===u&&(t=e,e=s),!(this instanceof X))return new X(e,t).getResult();var r=typeof i!==o&&i.navigator?i.navigator:s,n=e||(r&&r.userAgent?r.userAgent:""),y=r&&r.userAgentData?r.userAgentData:s,w=t?$(Q,t):Q,_=r&&r.userAgent==n;return this.getBrowser=function(){var e,t={};return t[h]=s,t[m]=s,Z.call(t,n,w.browser),t[l]=typeof(e=t[m])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:s,_&&r&&r.brave&&typeof r.brave.isBrave==a&&(t[h]="Brave"),t},this.getCPU=function(){var e={};return e[g]=s,Z.call(e,n,w.cpu),e},this.getDevice=function(){var e={};return e[p]=s,e[d]=s,e[f]=s,Z.call(e,n,w.device),_&&!e[f]&&y&&y.mobile&&(e[f]=b),_&&"Macintosh"==e[d]&&r&&typeof r.standalone!==o&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[d]="iPad",e[f]=v),e},this.getEngine=function(){var e={};return e[h]=s,e[m]=s,Z.call(e,n,w.engine),e},this.getOS=function(){var e={};return e[h]=s,e[m]=s,Z.call(e,n,w.os),_&&!e[h]&&y&&y.platform&&"Unknown"!=y.platform&&(e[h]=y.platform.replace(/chrome os/i,j).replace(/macos/i,F)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===c&&e.length>500?K(e,500):e,this},this.setUA(n),this};X.VERSION="1.0.39",X.BROWSER=W([h,m,l]),X.CPU=W([g]),X.DEVICE=W([d,p,f,y,b,w,v,_,E]),X.ENGINE=X.OS=W([h,m]),typeof t!==o?(e.exports&&(t=e.exports=X),t.UAParser=X):r.amdO?s!==(n=(function(){return X}).call(t,r,t,e))&&(e.exports=n):typeof i!==o&&(i.UAParser=X);var ee=typeof i!==o&&(i.jQuery||i.Zepto);if(ee&&!ee.ua){var et=new X;ee.ua=et.getResult(),ee.ua.get=function(){return et.getUA()},ee.ua.set=function(e){et.setUA(e);var t=et.getResult();for(var r in t)ee.ua[r]=t[r]}}}("object"==typeof window?window:this)},68033:function(e,t,r){e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}};function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}},77980:function(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},95625:function(e,t,r){"use strict";var n=r(45182),i=r(91073),s=r(51778),a=r(31941);function o(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=o(Object.prototype.toString),d=o(Number.prototype.valueOf),h=o(String.prototype.valueOf),f=o(Boolean.prototype.valueOf);if(u)var p=o(BigInt.prototype.valueOf);if(c)var m=o(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"[object Map]"===l(e)}function b(e){return"[object Set]"===l(e)}function v(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function _(e){return"[object ArrayBuffer]"===l(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function k(e){return"[object DataView]"===l(e)}function x(e){return"undefined"!=typeof DataView&&(k.working?k(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||x(e)},t.isUint8Array=function(e){return"Uint8Array"===s(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===s(e)},t.isUint16Array=function(e){return"Uint16Array"===s(e)},t.isUint32Array=function(e){return"Uint32Array"===s(e)},t.isInt8Array=function(e){return"Int8Array"===s(e)},t.isInt16Array=function(e){return"Int16Array"===s(e)},t.isInt32Array=function(e){return"Int32Array"===s(e)},t.isFloat32Array=function(e){return"Float32Array"===s(e)},t.isFloat64Array=function(e){return"Float64Array"===s(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===s(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===s(e)},y.working="undefined"!=typeof Map&&y(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(y.working?y(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=E,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=x;var S="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(e){return"[object SharedArrayBuffer]"===l(e)}function C(e){return void 0!==S&&(void 0===A.working&&(A.working=A(new S)),A.working?A(e):e instanceof S)}function I(e){return g(e,d)}function R(e){return g(e,h)}function P(e){return g(e,f)}function N(e){return u&&g(e,p)}function M(e){return c&&g(e,m)}t.isSharedArrayBuffer=C,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=I,t.isStringObject=R,t.isBooleanObject=P,t.isBigIntObject=N,t.isSymbolObject=M,t.isBoxedPrimitive=function(e){return I(e)||R(e)||P(e)||N(e)||M(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||C(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},60232:function(e,t,r){var n=r(21169),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},s=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(s,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<i;o=n[++r])y(o)||!E(o)?a+=" "+o:a+=" "+c(o);return a},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var a={},o=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;o=RegExp("^"+(u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function c(e,r){var n={seen:[],stylize:d};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),h(n,e,n.depth)}function l(e,t){var r=c.styles[t];return r?"\x1b["+c.colors[r][0]+"m"+e+"\x1b["+c.colors[r][1]+"m":e}function d(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,s,a,o,u,c=r.inspect(n,e);return v(c)||(c=h(e,c,n)),c}var l=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,r);if(l)return l;var d=Object.keys(r),E=(o={},d.forEach(function(e,t){o[e]=!0}),o);if(e.showHidden&&(d=Object.getOwnPropertyNames(r)),x(r)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return f(r);if(0===d.length){if(S(r)){var A=r.name?": "+r.name:"";return e.stylize("[Function"+A+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return f(r)}var C="",I=!1,P=["{","}"];return(m(r)&&(I=!0,P=["[","]"]),S(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(C=" "+RegExp.prototype.toString.call(r)),k(r)&&(C=" "+Date.prototype.toUTCString.call(r)),x(r)&&(C=" "+f(r)),0!==d.length||I&&0!=r.length)?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=I?function(e,t,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)R(t,String(a))?s.push(p(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(p(e,t,r,n,i,!0))}),s}(e,r,n,E,d):d.map(function(t){return p(e,r,n,E,t,I)}),e.seen.pop(),i=C,s=P,a=0,u.reduce(function(e,t){return a++,t.indexOf("\n")>=0&&a++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?s[0]+(""===i?"":i+"\n ")+" "+u.join(",\n  ")+" "+s[1]:s[0]+i+" "+u.join(", ")+" "+s[1]):P[0]+C+P[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,s){var a,o,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?o=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(o=e.stylize("[Setter]","special")),R(n,i)||(a="["+i+"]"),!o&&(0>e.seen.indexOf(u.value)?(o=y(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(o=s?o.split("\n").map(function(e){return"  "+e}).join("\n").slice(2):"\n"+o.split("\n").map(function(e){return"   "+e}).join("\n")):o=e.stylize("[Circular]","special")),w(a)){if(s&&i.match(/^\d+$/))return o;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===A(e)}function E(e){return"object"==typeof e&&null!==e}function k(e){return E(e)&&"[object Date]"===A(e)}function x(e){return E(e)&&("[object Error]"===A(e)||e instanceof Error)}function S(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()]){if(o.test(e)){var r=n.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){}}return a[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(95625),t.isArray=m,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=_,t.types.isRegExp=_,t.isObject=E,t.isDate=k,t.types.isDate=k,t.isError=x,t.types.isNativeError=x,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(77980);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(96154),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t=e[P];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=P,t.callbackify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw TypeError("The last argument must be of type Function");var s=this,a=function(){return i.apply(s,arguments)};e.apply(this,t).then(function(e){n.nextTick(a.bind(null,null,e))},function(e){n.nextTick(N.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},51352:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);t.default=function(e,t){var n=t||0;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}},84740:function(e,t,r){"use strict";Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return n.default}}),i(r(53351)),i(r(64102));var n=i(r(5576));function i(e){return e&&e.__esModule?e:{default:e}}i(r(5391))},62818:function(e,t){"use strict";function r(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,n,i,s,a){var o;return r((o=r(r(t,e),r(i,a)))<<s|o>>>32-s,n)}function i(e,t,r,i,s,a,o){return n(t&r|~t&i,e,t,s,a,o)}function s(e,t,r,i,s,a,o){return n(t&i|r&~i,e,t,s,a,o)}function a(e,t,r,i,s,a,o){return n(t^r^i,e,t,s,a,o)}function o(e,t,r,i,s,a,o){return n(r^(t|~i),e,t,s,a,o)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=Array(t.length);for(var n=0;n<t.length;n++)e[n]=t.charCodeAt(n)}return function(e){var t,r,n=[],i=32*e.length,s="0123456789abcdef";for(t=0;t<i;t+=8)n.push(parseInt(s.charAt((r=e[t>>5]>>>t%32&255)>>>4&15)+s.charAt(15&r),16));return n}(function(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;var n,u,c,l,d,h=1732584193,f=-271733879,p=-1732584194,m=271733878;for(n=0;n<e.length;n+=16)u=h,c=f,l=p,d=m,h=i(h,f,p,m,e[n],7,-680876936),m=i(m,h,f,p,e[n+1],12,-389564586),p=i(p,m,h,f,e[n+2],17,606105819),f=i(f,p,m,h,e[n+3],22,-1044525330),h=i(h,f,p,m,e[n+4],7,-176418897),m=i(m,h,f,p,e[n+5],12,1200080426),p=i(p,m,h,f,e[n+6],17,-1473231341),f=i(f,p,m,h,e[n+7],22,-45705983),h=i(h,f,p,m,e[n+8],7,1770035416),m=i(m,h,f,p,e[n+9],12,-1958414417),p=i(p,m,h,f,e[n+10],17,-42063),f=i(f,p,m,h,e[n+11],22,-1990404162),h=i(h,f,p,m,e[n+12],7,1804603682),m=i(m,h,f,p,e[n+13],12,-40341101),p=i(p,m,h,f,e[n+14],17,-1502002290),f=i(f,p,m,h,e[n+15],22,1236535329),h=s(h,f,p,m,e[n+1],5,-165796510),m=s(m,h,f,p,e[n+6],9,-1069501632),p=s(p,m,h,f,e[n+11],14,643717713),f=s(f,p,m,h,e[n],20,-373897302),h=s(h,f,p,m,e[n+5],5,-701558691),m=s(m,h,f,p,e[n+10],9,38016083),p=s(p,m,h,f,e[n+15],14,-660478335),f=s(f,p,m,h,e[n+4],20,-405537848),h=s(h,f,p,m,e[n+9],5,568446438),m=s(m,h,f,p,e[n+14],9,-1019803690),p=s(p,m,h,f,e[n+3],14,-187363961),f=s(f,p,m,h,e[n+8],20,1163531501),h=s(h,f,p,m,e[n+13],5,-1444681467),m=s(m,h,f,p,e[n+2],9,-51403784),p=s(p,m,h,f,e[n+7],14,1735328473),f=s(f,p,m,h,e[n+12],20,-1926607734),h=a(h,f,p,m,e[n+5],4,-378558),m=a(m,h,f,p,e[n+8],11,-2022574463),p=a(p,m,h,f,e[n+11],16,1839030562),f=a(f,p,m,h,e[n+14],23,-35309556),h=a(h,f,p,m,e[n+1],4,-1530992060),m=a(m,h,f,p,e[n+4],11,1272893353),p=a(p,m,h,f,e[n+7],16,-155497632),f=a(f,p,m,h,e[n+10],23,-1094730640),h=a(h,f,p,m,e[n+13],4,681279174),m=a(m,h,f,p,e[n],11,-358537222),p=a(p,m,h,f,e[n+3],16,-722521979),f=a(f,p,m,h,e[n+6],23,76029189),h=a(h,f,p,m,e[n+9],4,-640364487),m=a(m,h,f,p,e[n+12],11,-421815835),p=a(p,m,h,f,e[n+15],16,530742520),f=a(f,p,m,h,e[n+2],23,-995338651),h=o(h,f,p,m,e[n],6,-198630844),m=o(m,h,f,p,e[n+7],10,1126891415),p=o(p,m,h,f,e[n+14],15,-1416354905),f=o(f,p,m,h,e[n+5],21,-57434055),h=o(h,f,p,m,e[n+12],6,1700485571),m=o(m,h,f,p,e[n+3],10,-1894986606),p=o(p,m,h,f,e[n+10],15,-1051523),f=o(f,p,m,h,e[n+1],21,-2054922799),h=o(h,f,p,m,e[n+8],6,1873313359),m=o(m,h,f,p,e[n+15],10,-30611744),p=o(p,m,h,f,e[n+6],15,-1560198380),f=o(f,p,m,h,e[n+13],21,1309151649),h=o(h,f,p,m,e[n+4],6,-145523070),m=o(m,h,f,p,e[n+11],10,-1120210379),p=o(p,m,h,f,e[n+2],15,718787259),f=o(f,p,m,h,e[n+9],21,-343485551),h=r(h,u),f=r(f,c),p=r(p,l),m=r(m,d);return[h,f,p,m]}(function(e){var t,r=[];for(t=0,r[(e.length>>2)-1]=void 0;t<r.length;t+=1)r[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)r[t>>5]|=(255&e[t/8])<<t%32;return r}(e),8*e.length))}},39737:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),n=new Uint8Array(16)},21248:function(e,t){"use strict";function r(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=Array(i.length);for(var s=0;s<i.length;s++)e[s]=i.charCodeAt(s)}e.push(128);for(var a=Math.ceil((e.length/4+2)/16),o=Array(a),s=0;s<a;s++){o[s]=Array(16);for(var u=0;u<16;u++)o[s][u]=e[64*s+4*u]<<24|e[64*s+4*u+1]<<16|e[64*s+4*u+2]<<8|e[64*s+4*u+3]}o[a-1][14]=(e.length-1)*8/4294967296,o[a-1][14]=Math.floor(o[a-1][14]),o[a-1][15]=(e.length-1)*8&4294967295;for(var s=0;s<a;s++){for(var c=Array(80),l=0;l<16;l++)c[l]=o[s][l];for(var l=16;l<80;l++)c[l]=r(c[l-3]^c[l-8]^c[l-14]^c[l-16],1);for(var d=n[0],h=n[1],f=n[2],p=n[3],m=n[4],l=0;l<80;l++){var g=Math.floor(l/20),y=r(d,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(g,h,f,p)+m+t[g]+c[l]>>>0;m=p,p=f,f=r(h,30)>>>0,h=d,d=y}n[0]=n[0]+d>>>0,n[1]=n[1]+h>>>0,n[2]=n[2]+f>>>0,n[3]=n[3]+p>>>0,n[4]=n[4]+m>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}},53351:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,s=o(r(39737)),a=o(r(51352));function o(e){return e&&e.__esModule?e:{default:e}}var u=0,c=0;t.default=function(e,t,r){var o=t&&r||0,l=t||[],d=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==h){var f=e.random||(e.rng||s.default)();null==d&&(d=n=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==h&&(h=i=(f[6]<<8|f[7])&16383)}var p=void 0!==e.msecs?e.msecs:new Date().getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,g=p-u+(m-c)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||p>u)&&void 0===e.nsecs&&(m=0),m>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=m,i=h;var y=((268435455&(p+=122192928e5))*1e4+m)%4294967296;l[o++]=y>>>24&255,l[o++]=y>>>16&255,l[o++]=y>>>8&255,l[o++]=255&y;var b=p/4294967296*1e4&268435455;l[o++]=b>>>8&255,l[o++]=255&b,l[o++]=b>>>24&15|16,l[o++]=b>>>16&255,l[o++]=h>>>8|128,l[o++]=255&h;for(var v=0;v<6;++v)l[o+v]=d[v];return t||(0,a.default)(l)}},64102:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(r(25678)),i=s(r(62818));function s(e){return e&&e.__esModule?e:{default:e}}let a=(0,n.default)("v3",48,i.default);t.default=a},25678:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n=function(e,n,s,a){var o,u=s&&a||0;if("string"==typeof e&&(e=function(e){for(var t=Array((e=unescape(encodeURIComponent(e))).length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(e)),"string"==typeof n&&(o=[],n.replace(/[a-fA-F0-9]{2}/g,function(e){o.push(parseInt(e,16))}),n=o),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(n)||16!==n.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var c=r(n.concat(e));if(c[6]=15&c[6]|t,c[8]=63&c[8]|128,s)for(var l=0;l<16;++l)s[u+l]=c[l];return s||(0,i.default)(c)};try{n.name=e}catch(e){}return n.DNS=s,n.URL=a,n},t.URL=t.DNS=void 0;var n,i=(n=r(51352))&&n.__esModule?n:{default:n};let s="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=s;let a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=a},5576:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(r(39737)),i=s(r(51352));function s(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){var s=t&&r||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;o<16;++o)t[s+o]=a[o];return t||(0,i.default)(a)}},5391:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(r(25678)),i=s(r(21248));function s(e){return e&&e.__esModule?e:{default:e}}let a=(0,n.default)("v5",80,i.default);t.default=a},29645:function(e,t,r){"use strict";let n;r.d(t,{Z:function(){return o}});var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let s=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));var o=function(e,t,r){if(i.randomUUID&&!t&&!e)return i.randomUUID();let o=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(s)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return function(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}(o)}},51778:function(e,t,r){"use strict";var n=r(2213),i=r(15238),s=r(73474),a=r(51362),o=r(996),u=a("Object.prototype.toString"),c=r(82685)(),l="undefined"==typeof globalThis?r.g:globalThis,d=i(),h=a("String.prototype.slice"),f=Object.getPrototypeOf,p=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return -1},m={__proto__:null};c&&o&&f?n(d,function(e){var t=new l[e];if(Symbol.toStringTag in t){var r=f(t),n=o(r,Symbol.toStringTag);n||(n=o(f(r),Symbol.toStringTag)),m["$"+e]=s(n.get)}}):n(d,function(e){var t=new l[e],r=t.slice||t.set;r&&(m["$"+e]=s(r))});var g=function(e){var t=!1;return n(m,function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch(e){}}),t},y=function(e){var t=!1;return n(m,function(r,n){if(!t)try{r(e),t=h(n,1)}catch(e){}}),t};e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=h(u(e),8,-1);return p(d,t)>-1?t:"Object"===t&&y(e)}return o?g(e):null}},88697:function(e){"use strict";e.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},21169:function(e){var t,r,n,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u=[],c=!1,l=-1;function d(){c&&n&&(c=!1,n.length?u=n.concat(u):l=-1,u.length&&h())}function h(){if(!c){var e=o(d);c=!0;for(var t=u.length;t;){for(n=u,u=[];++l<t;)n&&n[l].run();l=-1,t=u.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new f(e,t)),1!==u.length||c||o(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},15238:function(e,t,r){"use strict";var n=r(10393),i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}},44962:function(e,t,r){"use strict";let n=r(49554);e.exports=s;let i=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function s(e){var t,r;(e=e||{}).browser=e.browser||{};let n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");let l=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let d=e.serializers||{},m=Array.isArray(t=e.browser.serialize)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(d),g=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(g=!1),"function"==typeof l&&(l.error=l.fatal=l.warn=l.info=l.debug=l.trace=l),!1===e.enabled&&(e.level="silent");let y=e.level||"info",b=Object.create(l);b.log||(b.log=h),Object.defineProperty(b,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(b,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(v,b,"error","log"),a(v,b,"fatal","error"),a(v,b,"warn","error"),a(v,b,"info","log"),a(v,b,"debug","log"),a(v,b,"trace","log")}});let v={transmit:n,serialize:m,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?f:p};return b.levels=s.levels,b.level=y,b.setMaxListeners=b.getMaxListeners=b.emit=b.addListener=b.on=b.prependListener=b.once=b.prependOnceListener=b.removeListener=b.removeAllListeners=b.listeners=b.listenerCount=b.eventNames=b.write=b.flush=h,b.serializers=d,b._serialize=m,b._stdErrSerialize=g,b.child=function(t,r){if(!t)throw Error("missing bindings for child Pino");r=r||{},m&&t.serializers&&(r.serializers=t.serializers);let i=r.serializers;if(m&&i){var s=Object.assign({},d,i),a=!0===e.browser.serialize?Object.keys(s):m;delete t.serializers,o([t],a,s,this._stdErrSerialize)}function l(e){this._childLevel=(0|e._childLevel)+1,this.error=u(e,t,"error"),this.fatal=u(e,t,"fatal"),this.warn=u(e,t,"warn"),this.info=u(e,t,"info"),this.debug=u(e,t,"debug"),this.trace=u(e,t,"trace"),s&&(this.serializers=s,this._serialize=a),n&&(this._logEvent=c([].concat(e._logEvent.bindings,t)))}return l.prototype=this,new l(this)},n&&(b._logEvent=c()),b}function a(e,t,r,a){let u=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?h:u[r]?u[r]:i[r]||i[a]||h,function(e,t,r){if(e.transmit||t[r]!==h){var a;t[r]=(a=t[r],function(){let u=e.timestamp(),l=Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var h=0;h<l.length;h++)l[h]=arguments[h];if(e.serialize&&!e.asObject&&o(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(d,function(e,t,r,i){e._serialize&&o(r,e._serialize,e.serializers,e._stdErrSerialize);let a=r.slice(),u=a[0],c={};i&&(c.time=i),c.level=s.levels.values[t];let l=(0|e._childLevel)+1;if(l<1&&(l=1),null!==u&&"object"==typeof u){for(;l--&&"object"==typeof a[0];)Object.assign(c,a.shift());u=a.length?n(a.shift(),a):void 0}else"string"==typeof u&&(u=n(a.shift(),a));return void 0!==u&&(c.msg=u),c}(this,r,l,u)):a.apply(d,l),e.transmit){let n=e.transmit.level||t.level,i=s.levels.values[n],a=s.levels.values[r];if(a<i)return;(function(e,t,r){let n=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,u=t.val,l=e._logEvent.bindings;o(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(e){return -1===l.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=a,n(s,e._logEvent,u),e._logEvent=c(l)})(this,{ts:u,methodLevel:r,methodValue:a,transmitLevel:n,transmitValue:s.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},l)}})}}(e,t,r)}function o(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=s.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let n in e[i])t&&t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function u(e,t,r){return function(){let n=Array(1+arguments.length);n[0]=t;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return e[r].apply(this,n)}}function c(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function l(){return{}}function d(e){return e}function h(){}function f(){return!1}function p(){return Date.now()}s.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},s.stdSerializers={mapHttpRequest:l,mapHttpResponse:l,wrapRequestSerializer:d,wrapResponseSerializer:d,wrapErrorSerializer:d,req:l,res:l,err:function(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}},s.stdTimeFunctions=Object.assign({},{nullTime:f,epochTime:p,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},11012:function(e,t,r){"use strict";let n=r(49554);e.exports=l;let i=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function s(e,t){return"silent"===e?1/0:t.levels.values[e]}let a=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),u={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function c(e,t){let r={logger:t,parent:e[o]};t[o]=r}function l(e){var t,r;(e=e||{}).browser=e.browser||{};let n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");let o=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let p=e.serializers||{},m=Array.isArray(t=e.browser.serialize)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(p),g=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(g=!1);let w=Object.keys(e.customLevels||{}),_=["error","fatal","warn","info","debug","trace"].concat(w);"function"==typeof o&&_.forEach(function(e){o[e]=o}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let E=e.level||"info",k=Object.create(o);k.log||(k.log=y),function(e,t,r){let n={};t.forEach(e=>{n[e]=r[e]?r[e]:i[e]||i[u[e]||"log"]||y}),e[a]=n}(k,_,o),c({},k),Object.defineProperty(k,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(k,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,d(this,x,k,"error"),d(this,x,k,"fatal"),d(this,x,k,"warn"),d(this,x,k,"info"),d(this,x,k,"debug"),d(this,x,k,"trace"),w.forEach(e=>{d(this,x,k,e)})}});let x={transmit:n,serialize:m,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:_,timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?b:v};return k.levels=function(e){let t=e.customLevels||{};return{values:Object.assign({},l.levels.values,t),labels:Object.assign({},l.levels.labels,function(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}(t))}}(e),k.level=E,k.setMaxListeners=k.getMaxListeners=k.emit=k.addListener=k.on=k.prependListener=k.once=k.prependOnceListener=k.removeListener=k.removeAllListeners=k.listeners=k.listenerCount=k.eventNames=k.write=k.flush=y,k.serializers=p,k._serialize=m,k._stdErrSerialize=g,k.child=function(t,r){if(!t)throw Error("missing bindings for child Pino");r=r||{},m&&t.serializers&&(r.serializers=t.serializers);let i=r.serializers;if(m&&i){var s=Object.assign({},p,i),a=!0===e.browser.serialize?Object.keys(s):m;delete t.serializers,h([t],a,s,this._stdErrSerialize)}function o(e){this._childLevel=(0|e._childLevel)+1,this.bindings=t,s&&(this.serializers=s,this._serialize=a),n&&(this._logEvent=f([].concat(e._logEvent.bindings,t)))}o.prototype=this;let u=new o(this);return c(this,u),u.level=this.level,u},n&&(k._logEvent=f()),k}function d(e,t,r,u){var c,l;if(Object.defineProperty(e,u,{value:s(e.level,r)>s(u,r)?y:r[a][u],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[u]===y)return;e[u]=(c=e[a][u],function(){let a=t.timestamp(),o=Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var d=0;d<o.length;d++)o[d]=arguments[d];if(t.serialize&&!t.asObject&&h(o,this._serialize,this.serializers,this._stdErrSerialize),t.asObject||t.formatters?c.call(l,function(e,t,r,i,s={}){let{level:a=()=>e.levels.values[t],log:o=e=>e}=s;e._serialize&&h(r,e._serialize,e.serializers,e._stdErrSerialize);let u=r.slice(),c=u[0],l={};i&&(l.time=i),l.level=a(t,e.levels.values[t]);let d=(0|e._childLevel)+1;if(d<1&&(d=1),null!==c&&"object"==typeof c){for(;d--&&"object"==typeof u[0];)Object.assign(l,u.shift());c=u.length?n(u.shift(),u):void 0}else"string"==typeof c&&(c=n(u.shift(),u));return void 0!==c&&(l.msg=c),o(l)}(this,u,o,a,t.formatters)):c.apply(l,o),t.transmit){let n=t.transmit.level||e._level,i=r.levels.values[n],c=r.levels.values[u];if(c<i)return;(function(e,t,r){let n=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,o=t.val,u=e._logEvent.bindings;h(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(e){return -1===u.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=a,n(s,e._logEvent,o),e._logEvent=f(u)})(this,{ts:a,methodLevel:u,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,r)},o)}});let d=function(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[o];for(;r.parent;)(r=r.parent).logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==d.length&&(e[u]=(l=e[u],function(){return l.apply(this,[...d,...arguments])}))}function h(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=l.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let n in e[i])t&&t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function f(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function p(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}function m(){return{}}function g(e){return e}function y(){}function b(){return!1}function v(){return Date.now()}l.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},l.stdSerializers={mapHttpRequest:m,mapHttpResponse:m,wrapRequestSerializer:g,wrapResponseSerializer:g,wrapErrorSerializer:g,req:m,res:m,err:p,errWithCause:p},l.stdTimeFunctions=Object.assign({},{nullTime:b,epochTime:v,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=l,e.exports.pino=l},55199:function(e,t,r){"use strict";let n,i,s,a,o,u,c,l;r.d(t,{V:function(){return eE}});var d,h,f=r(66399),p=r.t(f,2),m=r(3138),g=r(54912),y=r(44318);function b(e,t,r,n){let i=(0,y.E)(r);(0,f.useEffect)(()=>{function r(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)},[e,t,n])}var v=r(78648),w=r(32816);function _(e){let t=(0,g.z)(e),r=(0,f.useRef)(!1);(0,f.useEffect)(()=>(r.current=!1,()=>{r.current=!0,(0,w.Y)(()=>{r.current&&t()})}),[t])}var E=r(9828),k=r(47058),x=r(93820),S=r(22032),A=((n=A||{})[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n);function C(e,t){let r=(0,f.useRef)([]),n=(0,g.z)(e);(0,f.useEffect)(()=>{let e=[...r.current];for(let[i,s]of t.entries())if(r.current[i]!==s){let i=n(t,e);return r.current=t,i}},[n,...t])}var I=r(57772),R=((i=R||{})[i.None=1]="None",i[i.Focusable=2]="Focusable",i[i.Hidden=4]="Hidden",i);let P=(0,I.yV)(function(e,t){var r;let{features:n=1,...i}=e,s={ref:t,"aria-hidden":(2&n)==2||(null!=(r=i["aria-hidden"])?r:void 0),hidden:(4&n)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&n)==4&&(2&n)!=2&&{display:"none"}}};return(0,I.sY)({ourProps:s,theirProps:i,slot:{},defaultTag:"div",name:"Hidden"})}),N=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}(()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&N[0]!==e.target&&(N.unshift(e.target),(N=N.filter(e=>null!=e&&e.isConnected)).splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});var M=r(28853),T=r(5380);function O(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}var D=((s=D||{})[s.None=1]="None",s[s.InitialFocus=2]="InitialFocus",s[s.TabLock=4]="TabLock",s[s.FocusLock=8]="FocusLock",s[s.RestoreFocus=16]="RestoreFocus",s[s.All=30]="All",s);let L=Object.assign((0,I.yV)(function(e,t){let r,n=(0,f.useRef)(null),i=(0,x.T)(n,t),{initialFocus:s,containers:a,features:o=30,...u}=e;(0,k.H)()||(o=1);let c=(0,E.i)(n);!function(e,t){let{ownerDocument:r}=e,n=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,f.useRef)(N.slice());return C((e,r)=>{let[n]=e,[i]=r;!0===i&&!1===n&&(0,w.Y)(()=>{t.current.splice(0)}),!1===i&&!0===n&&(t.current=N.slice())},[e,N,t]),(0,g.z)(()=>{var e;return null!=(e=t.current.find(e=>null!=e&&e.isConnected))?e:null})}(t);C(()=>{t||(null==r?void 0:r.activeElement)===(null==r?void 0:r.body)&&(0,M.C5)(n())},[t]),_(()=>{t&&(0,M.C5)(n())})}({ownerDocument:c},!!(16&o));let l=function(e,t){let{ownerDocument:r,container:n,initialFocus:i}=e,s=(0,f.useRef)(null),a=(0,v.t)();return C(()=>{if(!t)return;let e=n.current;e&&(0,w.Y)(()=>{if(!a.current)return;let t=null==r?void 0:r.activeElement;if(null!=i&&i.current){if((null==i?void 0:i.current)===t){s.current=t;return}}else if(e.contains(t)){s.current=t;return}null!=i&&i.current?(0,M.C5)(i.current):(0,M.jA)(e,M.TO.First)===M.fE.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),s.current=null==r?void 0:r.activeElement})},[t]),s}({ownerDocument:c,container:n,initialFocus:s},!!(2&o));!function(e,t){let{ownerDocument:r,container:n,containers:i,previousActiveElement:s}=e,a=(0,v.t)();b(null==r?void 0:r.defaultView,"focus",e=>{if(!t||!a.current)return;let r=O(i);n.current instanceof HTMLElement&&r.add(n.current);let o=s.current;if(!o)return;let u=e.target;u&&u instanceof HTMLElement?B(r,u)?(s.current=u,(0,M.C5)(u)):(e.preventDefault(),e.stopPropagation(),(0,M.C5)(o)):(0,M.C5)(s.current)},!0)}({ownerDocument:c,container:n,containers:a,previousActiveElement:l},!!(8&o));let d=(r=(0,f.useRef)(0),(0,S.s)("keydown",e=>{"Tab"===e.key&&(r.current=e.shiftKey?1:0)},!0),r),h=(0,g.z)(e=>{let t=n.current;t&&(0,T.E)(d.current,{[A.Forwards]:()=>{(0,M.jA)(t,M.TO.First,{skipElements:[e.relatedTarget]})},[A.Backwards]:()=>{(0,M.jA)(t,M.TO.Last,{skipElements:[e.relatedTarget]})}})}),p=(0,m.G)(),y=(0,f.useRef)(!1);return f.createElement(f.Fragment,null,!!(4&o)&&f.createElement(P,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:R.Focusable}),(0,I.sY)({ourProps:{ref:i,onKeyDown(e){"Tab"==e.key&&(y.current=!0,p.requestAnimationFrame(()=>{y.current=!1}))},onBlur(e){let t=O(a);n.current instanceof HTMLElement&&t.add(n.current);let r=e.relatedTarget;r instanceof HTMLElement&&"true"!==r.dataset.headlessuiFocusGuard&&(B(t,r)||(y.current?(0,M.jA)(n.current,(0,T.E)(d.current,{[A.Forwards]:()=>M.TO.Next,[A.Backwards]:()=>M.TO.Previous})|M.TO.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&(0,M.C5)(e.target)))}},theirProps:u,defaultTag:"div",name:"FocusTrap"}),!!(4&o)&&f.createElement(P,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:R.Focusable}))}),{features:D});function B(e,t){for(let r of e)if(r.contains(t))return!0;return!1}var q=r(60525),z=r(44583);let U=(0,f.createContext)(!1);function j(e){return f.createElement(U.Provider,{value:e.force},e.children)}var F=r(67159);let H=f.Fragment,$=f.Fragment,W=(0,f.createContext)(null),G=(0,f.createContext)(null),V=Object.assign((0,I.yV)(function(e,t){let r=(0,f.useRef)(null),n=(0,x.T)((0,x.h)(e=>{r.current=e}),t),i=(0,E.i)(r),s=function(e){let t=(0,f.useContext)(U),r=(0,f.useContext)(W),n=(0,E.i)(e),[i,s]=(0,f.useState)(()=>{if(!t&&null!==r||F.O.isServer)return null;let e=null==n?void 0:n.getElementById("headlessui-portal-root");if(e)return e;if(null===n)return null;let i=n.createElement("div");return i.setAttribute("id","headlessui-portal-root"),n.body.appendChild(i)});return(0,f.useEffect)(()=>{null!==i&&(null!=n&&n.body.contains(i)||null==n||n.body.appendChild(i))},[i,n]),(0,f.useEffect)(()=>{t||null!==r&&s(r.current)},[r,s,t]),i}(r),[a]=(0,f.useState)(()=>{var e;return F.O.isServer?null:null!=(e=null==i?void 0:i.createElement("div"))?e:null}),o=(0,f.useContext)(G),u=(0,k.H)();return(0,z.e)(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),(0,z.e)(()=>{if(a&&o)return o.register(a)},[o,a]),_(()=>{var e;s&&a&&(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))}),u&&s&&a?(0,q.createPortal)((0,I.sY)({ourProps:{ref:n},theirProps:e,defaultTag:H,name:"Portal"}),a):null}),{Group:(0,I.yV)(function(e,t){let{target:r,...n}=e,i={ref:(0,x.T)(t)};return f.createElement(W.Provider,{value:r},(0,I.sY)({ourProps:i,theirProps:n,defaultTag:$,name:"Popover.Group"}))})}),{useState:K,useEffect:Z,useLayoutEffect:Y,useDebugValue:J}=p;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;let Q=p.useSyncExternalStore;var X=r(64678),ee=r(63891);let et=(d=()=>new Map,h={PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:(0,X.k)(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT(e){let t,{doc:r,d:n,meta:i}=e,s={doc:r,d:n,meta:function(e){let t={};for(let r of e)Object.assign(t,r(t));return t}(i)},a=[(0,ee.gn)()?{before(e){let{doc:t,d:r,meta:n}=e;function i(e){return n.containers.flatMap(e=>e()).some(t=>t.contains(e))}r.microTask(()=>{var e;if("auto"!==window.getComputedStyle(t.documentElement).scrollBehavior){let e=(0,X.k)();e.style(t.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>e.dispose()))}let n=null!=(e=window.scrollY)?e:window.pageYOffset,s=null;r.addEventListener(t,"click",e=>{if(e.target instanceof HTMLElement)try{let r=e.target.closest("a");if(!r)return;let{hash:n}=new URL(r.href),a=t.querySelector(n);a&&!i(a)&&(s=a)}catch(e){}},!0),r.addEventListener(t,"touchstart",e=>{if(e.target instanceof HTMLElement){if(i(e.target)){let t=e.target;for(;t.parentElement&&i(t.parentElement);)t=t.parentElement;r.style(t,"overscrollBehavior","contain")}else r.style(e.target,"touchAction","none")}}),r.addEventListener(t,"touchmove",e=>{if(e.target instanceof HTMLElement){if(i(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),r.add(()=>{var e;n!==(null!=(e=window.scrollY)?e:window.pageYOffset)&&window.scrollTo(0,n),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{},{before(e){var r;let{doc:n}=e,i=n.documentElement;t=(null!=(r=n.defaultView)?r:window).innerWidth-i.clientWidth},after(e){let{doc:r,d:n}=e,i=r.documentElement,s=i.clientWidth-i.offsetWidth,a=t-s;n.style(i,"paddingRight","".concat(a,"px"))}},{before(e){let{doc:t,d:r}=e;r.style(t.documentElement,"overflow","hidden")}}];a.forEach(e=>{let{before:t}=e;return null==t?void 0:t(s)}),a.forEach(e=>{let{after:t}=e;return null==t?void 0:t(s)})},SCROLL_ALLOW(e){let{d:t}=e;t.dispose()},TEARDOWN(e){let{doc:t}=e;this.delete(t)}},a=d(),o=new Set,{getSnapshot:()=>a,subscribe:e=>(o.add(e),()=>o.delete(e)),dispatch(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let i=h[e].call(a,...r);i&&(a=i,o.forEach(e=>e()))}});et.subscribe(()=>{let e=et.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&et.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&et.dispatch("TEARDOWN",r)}});var er=r(82669);let en=new Map,ei=new Map;function es(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];(0,z.e)(()=>{var r;if(!t)return;let n="function"==typeof e?e():e.current;if(!n)return;let i=null!=(r=ei.get(n))?r:0;return ei.set(n,i+1),0!==i||(en.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),function(){var e;if(!n)return;let t=null!=(e=ei.get(n))?e:1;if(1===t?ei.delete(n):ei.set(n,t-1),1!==t)return;let r=en.get(n);r&&(null===r["aria-hidden"]?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",r["aria-hidden"]),n.inert=r.inert,en.delete(n))}},[e,t])}var ea=r(19907),eo=r(81904);let eu=(0,f.createContext)(()=>{});eu.displayName="StackContext";var ec=((u=ec||{})[u.Add=0]="Add",u[u.Remove=1]="Remove",u);function el(e){let{children:t,onUpdate:r,type:n,element:i,enabled:s}=e,a=(0,f.useContext)(eu),o=(0,g.z)(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];null==r||r(...t),a(...t)});return(0,z.e)(()=>{let e=void 0===s||!0===s;return e&&o(0,n,i),()=>{e&&o(1,n,i)}},[o,n,i,s]),f.createElement(eu.Provider,{value:o},t)}var ed=r(42332);let eh=(0,f.createContext)(null),ef=Object.assign((0,I.yV)(function(e,t){let r=(0,er.M)(),{id:n="headlessui-description-".concat(r),...i}=e,s=function e(){let t=(0,f.useContext)(eh);if(null===t){let t=Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),a=(0,x.T)(t);(0,z.e)(()=>s.register(n),[n,s.register]);let o={ref:a,...s.props,id:n};return(0,I.sY)({ourProps:o,theirProps:i,slot:s.slot||{},defaultTag:"p",name:s.name||"Description"})}),{});var ep=r(49478),em=((c=em||{})[c.Open=0]="Open",c[c.Closed=1]="Closed",c),eg=((l=eg||{})[l.SetTitleId=0]="SetTitleId",l);let ey={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},eb=(0,f.createContext)(null);function ev(e){let t=(0,f.useContext)(eb);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Dialog /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,ev),t}return t}function ew(e,t){return(0,T.E)(t.type,ey,e,t)}eb.displayName="DialogContext";let e_=I.AN.RenderStrategy|I.AN.Static,eE=Object.assign((0,I.yV)(function(e,t){let r,n,i,s,a,o=(0,er.M)(),{id:u="headlessui-dialog-".concat(o),open:c,onClose:l,initialFocus:d,role:h="dialog",__demoMode:p=!1,...m}=e,[y,v]=(0,f.useState)(0),w=(0,f.useRef)(!1);h="dialog"===h||"alertdialog"===h?h:(w.current||(w.current=!0,console.warn("Invalid role [".concat(h,"] passed to <Dialog />. Only `dialog` and and `alertdialog` are supported. Using `dialog` instead."))),"dialog");let _=(0,eo.oJ)();void 0===c&&null!==_&&(c=(_&eo.ZM.Open)===eo.ZM.Open);let S=(0,f.useRef)(null),A=(0,x.T)(S,t),C=(0,E.i)(S),N=e.hasOwnProperty("open")||null!==_,M=e.hasOwnProperty("onClose");if(!N&&!M)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!N)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!M)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof c)throw Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: ".concat(c));if("function"!=typeof l)throw Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: ".concat(l));let O=c?0:1,[D,B]=(0,f.useReducer)(ew,{titleId:null,descriptionId:null,panelRef:(0,f.createRef)()}),q=(0,g.z)(()=>l(!1)),U=(0,g.z)(e=>B({type:0,id:e})),F=!!(0,k.H)()&&!p&&0===O,H=y>1,$=null!==(0,f.useContext)(eb),[W,K]=(r=(0,f.useContext)(G),n=(0,f.useRef)([]),i=(0,g.z)(e=>(n.current.push(e),r&&r.register(e),()=>s(e))),s=(0,g.z)(e=>{let t=n.current.indexOf(e);-1!==t&&n.current.splice(t,1),r&&r.unregister(e)}),a=(0,f.useMemo)(()=>({register:i,unregister:s,portals:n}),[i,s,n]),[n,(0,f.useMemo)(()=>function(e){let{children:t}=e;return f.createElement(G.Provider,{value:a},t)},[a])]),{resolveContainers:Z,mainTreeNodeRef:Y,MainTreeNode:J}=function(){var e;let{defaultContainers:t=[],portals:r,mainTreeNodeRef:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=(0,f.useRef)(null!=(e=null==n?void 0:n.current)?e:null),s=(0,E.i)(i),a=(0,g.z)(()=>{var e,n,a;let o=[];for(let e of t)null!==e&&(e instanceof HTMLElement?o.push(e):"current"in e&&e.current instanceof HTMLElement&&o.push(e.current));if(null!=r&&r.current)for(let e of r.current)o.push(e);for(let t of null!=(e=null==s?void 0:s.querySelectorAll("html > *, body > *"))?e:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(t.contains(i.current)||t.contains(null==(a=null==(n=i.current)?void 0:n.getRootNode())?void 0:a.host)||o.some(e=>t.contains(e))||o.push(t));return o});return{resolveContainers:a,contains:(0,g.z)(e=>a().some(t=>t.contains(e))),mainTreeNodeRef:i,MainTreeNode:(0,f.useMemo)(()=>function(){return null!=n?null:f.createElement(P,{features:R.Hidden,ref:i})},[i,n])}}({portals:W,defaultContainers:[{get current(){var X;return null!=(X=D.panelRef.current)?X:S.current}}]}),ee=null!==_&&(_&eo.ZM.Closing)===eo.ZM.Closing,en=!$&&!ee&&F;es((0,f.useCallback)(()=>{var e,t;return null!=(t=Array.from(null!=(e=null==C?void 0:C.querySelectorAll("body > *"))?e:[]).find(e=>"headlessui-portal-root"!==e.id&&e.contains(Y.current)&&e instanceof HTMLElement))?t:null},[Y]),en);let ei=!!H||F;es((0,f.useCallback)(()=>{var e,t;return null!=(t=Array.from(null!=(e=null==C?void 0:C.querySelectorAll("[data-headlessui-portal]"))?e:[]).find(e=>e.contains(Y.current)&&e instanceof HTMLElement))?t:null},[Y]),ei);let eu=!(!F||H);(0,ea.O)(Z,e=>{e.preventDefault(),q()},eu);let ed=!(H||0!==O);b(null==C?void 0:C.defaultView,"keydown",e=>{ed&&(e.defaultPrevented||e.key===ep.R.Escape&&(e.preventDefault(),e.stopPropagation(),q()))}),function(e,t){var r;let n,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[document.body];r=e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],s]}},n=Q(et.subscribe,et.getSnapshot,et.getSnapshot),(i=e?n.get(e):void 0)&&i.count,(0,z.e)(()=>{if(!(!e||!t))return et.dispatch("PUSH",e,r),()=>et.dispatch("POP",e,r)},[t,e])}(C,!(ee||0!==O||$),Z),(0,f.useEffect)(()=>{if(0!==O||!S.current)return;let e=new ResizeObserver(e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&q()}});return e.observe(S.current),()=>e.disconnect()},[O,S,q]);let[ef,em]=function(){let[e,t]=(0,f.useState)([]);return[e.length>0?e.join(" "):void 0,(0,f.useMemo)(()=>function(e){let r=(0,g.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let r=t.slice(),n=r.indexOf(e);return -1!==n&&r.splice(n,1),r}))),n=(0,f.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props}),[r,e.slot,e.name,e.props]);return f.createElement(eh.Provider,{value:n},e.children)},[t])]}(),eg=(0,f.useMemo)(()=>[{dialogState:O,close:q,setTitleId:U},D],[O,D,q,U]),ey=(0,f.useMemo)(()=>({open:0===O}),[O]),ev={ref:A,id:u,role:h,"aria-modal":0===O||void 0,"aria-labelledby":D.titleId,"aria-describedby":ef};return f.createElement(el,{type:"Dialog",enabled:0===O,element:S,onUpdate:(0,g.z)((e,t)=>{"Dialog"===t&&(0,T.E)(e,{[ec.Add]:()=>v(e=>e+1),[ec.Remove]:()=>v(e=>e-1)})})},f.createElement(j,{force:!0},f.createElement(V,null,f.createElement(eb.Provider,{value:eg},f.createElement(V.Group,{target:S},f.createElement(j,{force:!1},f.createElement(em,{slot:ey,name:"Dialog.Description"},f.createElement(L,{initialFocus:d,containers:Z,features:F?(0,T.E)(H?"parent":"leaf",{parent:L.features.RestoreFocus,leaf:L.features.All&~L.features.FocusLock}):L.features.None},f.createElement(K,null,(0,I.sY)({ourProps:ev,theirProps:m,slot:ey,defaultTag:"div",features:e_,visible:0===O,name:"Dialog"}))))))))),f.createElement(J,null))}),{Backdrop:(0,I.yV)(function(e,t){let r=(0,er.M)(),{id:n="headlessui-dialog-backdrop-".concat(r),...i}=e,[{dialogState:s},a]=ev("Dialog.Backdrop"),o=(0,x.T)(t);(0,f.useEffect)(()=>{if(null===a.panelRef.current)throw Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let u=(0,f.useMemo)(()=>({open:0===s}),[s]);return f.createElement(j,{force:!0},f.createElement(V,null,(0,I.sY)({ourProps:{ref:o,id:n,"aria-hidden":!0},theirProps:i,slot:u,defaultTag:"div",name:"Dialog.Backdrop"})))}),Panel:(0,I.yV)(function(e,t){let r=(0,er.M)(),{id:n="headlessui-dialog-panel-".concat(r),...i}=e,[{dialogState:s},a]=ev("Dialog.Panel"),o=(0,x.T)(t,a.panelRef),u=(0,f.useMemo)(()=>({open:0===s}),[s]),c=(0,g.z)(e=>{e.stopPropagation()});return(0,I.sY)({ourProps:{ref:o,id:n,onClick:c},theirProps:i,slot:u,defaultTag:"div",name:"Dialog.Panel"})}),Overlay:(0,I.yV)(function(e,t){let r=(0,er.M)(),{id:n="headlessui-dialog-overlay-".concat(r),...i}=e,[{dialogState:s,close:a}]=ev("Dialog.Overlay"),o=(0,x.T)(t),u=(0,g.z)(e=>{if(e.target===e.currentTarget){if((0,ed.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}}),c=(0,f.useMemo)(()=>({open:0===s}),[s]);return(0,I.sY)({ourProps:{ref:o,id:n,"aria-hidden":!0,onClick:u},theirProps:i,slot:c,defaultTag:"div",name:"Dialog.Overlay"})}),Title:(0,I.yV)(function(e,t){let r=(0,er.M)(),{id:n="headlessui-dialog-title-".concat(r),...i}=e,[{dialogState:s,setTitleId:a}]=ev("Dialog.Title"),o=(0,x.T)(t);(0,f.useEffect)(()=>(a(n),()=>a(null)),[n,a]);let u=(0,f.useMemo)(()=>({open:0===s}),[s]);return(0,I.sY)({ourProps:{ref:o,id:n},theirProps:i,slot:u,defaultTag:"h2",name:"Dialog.Title"})}),Description:ef})},49478:function(e,t,r){"use strict";let n;r.d(t,{R:function(){return i}});var i=((n=i||{}).Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n)},63389:function(e,t,r){"use strict";let n,i,s,a;r.d(t,{v:function(){return z}});var o=r(66399),u=r(3138),c=r(54912),l=r(82669),d=r(44583),h=r(19907),f=r(9828);function p(e){var t;if(e.type)return e.type;let r=null!=(t=e.as)?t:"button";if("string"==typeof r&&"button"===r.toLowerCase())return"button"}var m=r(93820);let g=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function y(e){var t,r;let n=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return n;let s=!1;for(let e of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),s=!0;let a=s?null!=(r=i.innerText)?r:"":n;return g.test(a)&&(a=a.replace(g,"")),a}function b(e){return[e.screenX,e.screenY]}var v=r(38514),w=r(81904),_=r(42332),E=((n=E||{})[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n),k=r(64678),x=r(28853),S=r(5380),A=r(57772),C=r(49478),I=((i=I||{})[i.Open=0]="Open",i[i.Closed=1]="Closed",i),R=((s=R||{})[s.Pointer=0]="Pointer",s[s.Other=1]="Other",s),P=((a=P||{})[a.OpenMenu=0]="OpenMenu",a[a.CloseMenu=1]="CloseMenu",a[a.GoToItem=2]="GoToItem",a[a.Search=3]="Search",a[a.ClearSearch=4]="ClearSearch",a[a.RegisterItem=5]="RegisterItem",a[a.UnregisterItem=6]="UnregisterItem",a);function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,r=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,n=(0,x.z2)(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=r?n.indexOf(r):null;return -1===i&&(i=null),{items:n,activeItemIndex:i}}let M={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,__demoMode:!1,menuState:0},2:(e,t)=>{var r;let n=N(e),i=function(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),i=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 1:for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 2:for(let e=i+1;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 3:for(let e=r.length-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 4:for(let n=0;n<r.length;++n)if(t.resolveId(r[n],n,r)===e.id)return n;return n;case 5:return null;default:!function(e){throw Error("Unexpected object: "+e)}(e)}}(t,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(r=t.trigger)?r:1}},3:(e,t)=>{let r=""!==e.searchQuery?0:1,n=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled}),s=i?e.items.indexOf(i):-1;return -1===s||s===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:s,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let r=N(e,e=>[...e,{id:t.id,dataRef:t.dataRef}]);return{...e,...r}},6:(e,t)=>{let r=N(e,e=>{let r=e.findIndex(e=>e.id===t.id);return -1!==r&&e.splice(r,1),e});return{...e,...r,activationTrigger:1}}},T=(0,o.createContext)(null);function O(e){let t=(0,o.useContext)(T);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Menu /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,O),t}return t}function D(e,t){return(0,S.E)(t.type,M,e,t)}T.displayName="MenuContext";let L=o.Fragment,B=A.AN.RenderStrategy|A.AN.Static,q=o.Fragment,z=Object.assign((0,A.yV)(function(e,t){let{__demoMode:r=!1,...n}=e,i=(0,o.useReducer)(D,{__demoMode:r,menuState:r?0:1,buttonRef:(0,o.createRef)(),itemsRef:(0,o.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:s,itemsRef:a,buttonRef:u},l]=i,d=(0,m.T)(t);(0,h.O)([u,a],(e,t)=>{var r;l({type:1}),(0,x.sP)(t,x.tJ.Loose)||(e.preventDefault(),null==(r=u.current)||r.focus())},0===s);let f=(0,c.z)(()=>{l({type:1})}),p=(0,o.useMemo)(()=>({open:0===s,close:f}),[s,f]);return o.createElement(T.Provider,{value:i},o.createElement(w.up,{value:(0,S.E)(s,{0:w.ZM.Open,1:w.ZM.Closed})},(0,A.sY)({ourProps:{ref:d},theirProps:n,slot:p,defaultTag:L,name:"Menu"})))}),{Button:(0,A.yV)(function(e,t){var r;let n=(0,l.M)(),{id:i="headlessui-menu-button-".concat(n),...s}=e,[a,h]=O("Menu.Button"),f=(0,m.T)(a.buttonRef,t),g=(0,u.G)(),y=(0,c.z)(e=>{switch(e.key){case C.R.Space:case C.R.Enter:case C.R.ArrowDown:e.preventDefault(),e.stopPropagation(),h({type:0}),g.nextFrame(()=>h({type:2,focus:E.First}));break;case C.R.ArrowUp:e.preventDefault(),e.stopPropagation(),h({type:0}),g.nextFrame(()=>h({type:2,focus:E.Last}))}}),b=(0,c.z)(e=>{e.key===C.R.Space&&e.preventDefault()}),v=(0,c.z)(t=>{if((0,_.P)(t.currentTarget))return t.preventDefault();e.disabled||(0===a.menuState?(h({type:1}),g.nextFrame(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(t.preventDefault(),h({type:0})))}),w=(0,o.useMemo)(()=>({open:0===a.menuState}),[a]),k={ref:f,id:i,type:function(e,t){let[r,n]=(0,o.useState)(()=>p(e));return(0,d.e)(()=>{n(p(e))},[e.type,e.as]),(0,d.e)(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}(e,a.buttonRef),"aria-haspopup":"menu","aria-controls":null==(r=a.itemsRef.current)?void 0:r.id,"aria-expanded":0===a.menuState,onKeyDown:y,onKeyUp:b,onClick:v};return(0,A.sY)({ourProps:k,theirProps:s,slot:w,defaultTag:"button",name:"Menu.Button"})}),Items:(0,A.yV)(function(e,t){var r,n;let i=(0,l.M)(),{id:s="headlessui-menu-items-".concat(i),...a}=e,[h,p]=O("Menu.Items"),g=(0,m.T)(h.itemsRef,t),y=(0,f.i)(h.itemsRef),b=(0,u.G)(),_=(0,w.oJ)(),S=null!==_?(_&w.ZM.Open)===w.ZM.Open:0===h.menuState;(0,o.useEffect)(()=>{let e=h.itemsRef.current;e&&0===h.menuState&&e!==(null==y?void 0:y.activeElement)&&e.focus({preventScroll:!0})},[h.menuState,h.itemsRef,y]),function(e){let{container:t,accept:r,walk:n,enabled:i=!0}=e,s=(0,o.useRef)(r),a=(0,o.useRef)(n);(0,o.useEffect)(()=>{s.current=r,a.current=n},[r,n]),(0,d.e)(()=>{if(!t||!i)return;let e=(0,v.r)(t);if(!e)return;let r=s.current,n=a.current,o=Object.assign(e=>r(e),{acceptNode:r}),u=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,o,!1);for(;u.nextNode();)n(u.currentNode)},[t,i,s,a])}({container:h.itemsRef.current,enabled:0===h.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let I=(0,c.z)(e=>{var t,r;switch(b.dispose(),e.key){case C.R.Space:if(""!==h.searchQuery)return e.preventDefault(),e.stopPropagation(),p({type:3,value:e.key});case C.R.Enter:if(e.preventDefault(),e.stopPropagation(),p({type:1}),null!==h.activeItemIndex){let{dataRef:e}=h.items[h.activeItemIndex];null==(r=null==(t=e.current)?void 0:t.domRef.current)||r.click()}(0,x.wI)(h.buttonRef.current);break;case C.R.ArrowDown:return e.preventDefault(),e.stopPropagation(),p({type:2,focus:E.Next});case C.R.ArrowUp:return e.preventDefault(),e.stopPropagation(),p({type:2,focus:E.Previous});case C.R.Home:case C.R.PageUp:return e.preventDefault(),e.stopPropagation(),p({type:2,focus:E.First});case C.R.End:case C.R.PageDown:return e.preventDefault(),e.stopPropagation(),p({type:2,focus:E.Last});case C.R.Escape:e.preventDefault(),e.stopPropagation(),p({type:1}),(0,k.k)().nextFrame(()=>{var e;return null==(e=h.buttonRef.current)?void 0:e.focus({preventScroll:!0})});break;case C.R.Tab:e.preventDefault(),e.stopPropagation(),p({type:1}),(0,k.k)().nextFrame(()=>{(0,x.EO)(h.buttonRef.current,e.shiftKey?x.TO.Previous:x.TO.Next)});break;default:1===e.key.length&&(p({type:3,value:e.key}),b.setTimeout(()=>p({type:4}),350))}}),R=(0,c.z)(e=>{e.key===C.R.Space&&e.preventDefault()}),P=(0,o.useMemo)(()=>({open:0===h.menuState}),[h]),N={"aria-activedescendant":null===h.activeItemIndex||null==(r=h.items[h.activeItemIndex])?void 0:r.id,"aria-labelledby":null==(n=h.buttonRef.current)?void 0:n.id,id:s,onKeyDown:I,onKeyUp:R,role:"menu",tabIndex:0,ref:g};return(0,A.sY)({ourProps:N,theirProps:a,slot:P,defaultTag:"div",features:B,visible:S,name:"Menu.Items"})}),Item:(0,A.yV)(function(e,t){let r,n,i,s=(0,l.M)(),{id:a="headlessui-menu-item-".concat(s),disabled:u=!1,...h}=e,[f,p]=O("Menu.Item"),g=null!==f.activeItemIndex&&f.items[f.activeItemIndex].id===a,v=(0,o.useRef)(null),w=(0,m.T)(t,v);(0,d.e)(()=>{if(f.__demoMode||0!==f.menuState||!g||0===f.activationTrigger)return;let e=(0,k.k)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=v.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[f.__demoMode,v,g,f.menuState,f.activationTrigger,f.activeItemIndex]);let _=(r=(0,o.useRef)(""),n=(0,o.useRef)(""),(0,c.z)(()=>{let e=v.current;if(!e)return"";let t=e.innerText;if(r.current===t)return n.current;let i=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let e=r.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():y(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return y(e).trim()})(e).trim().toLowerCase();return r.current=t,n.current=i,i})),S=(0,o.useRef)({disabled:u,domRef:v,get textValue(){return _()}});(0,d.e)(()=>{S.current.disabled=u},[S,u]),(0,d.e)(()=>(p({type:5,id:a,dataRef:S}),()=>p({type:6,id:a})),[S,a]);let C=(0,c.z)(()=>{p({type:1})}),I=(0,c.z)(e=>{if(u)return e.preventDefault();p({type:1}),(0,x.wI)(f.buttonRef.current)}),R=(0,c.z)(()=>{if(u)return p({type:2,focus:E.Nothing});p({type:2,focus:E.Specific,id:a})}),P=(i=(0,o.useRef)([-1,-1]),{wasMoved(e){let t=b(e);return(i.current[0]!==t[0]||i.current[1]!==t[1])&&(i.current=t,!0)},update(e){i.current=b(e)}}),N=(0,c.z)(e=>P.update(e)),M=(0,c.z)(e=>{P.wasMoved(e)&&(u||g||p({type:2,focus:E.Specific,id:a,trigger:0}))}),T=(0,c.z)(e=>{P.wasMoved(e)&&(u||g&&p({type:2,focus:E.Nothing}))}),D=(0,o.useMemo)(()=>({active:g,disabled:u,close:C}),[g,u,C]);return(0,A.sY)({ourProps:{id:a,ref:w,role:"menuitem",tabIndex:!0===u?void 0:-1,"aria-disabled":!0===u||void 0,disabled:void 0,onClick:I,onFocus:R,onPointerEnter:N,onMouseEnter:N,onPointerMove:M,onMouseMove:M,onPointerLeave:T,onMouseLeave:T},theirProps:h,slot:D,defaultTag:q,name:"Menu.Item"})})})},98272:function(e,t,r){"use strict";let n;r.d(t,{u:function(){return M}});var i=r(66399),s=r(3138),a=r(54912),o=r(78648),u=r(44583),c=r(44318),l=r(47058),d=r(93820),h=r(64678),f=r(5380);function p(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];e&&r.length>0&&e.classList.add(...r)}function m(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];e&&r.length>0&&e.classList.remove(...r)}var g=r(81904),y=r(73727),b=r(57772);function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/\s+/).filter(e=>e.length>1)}let w=(0,i.createContext)(null);w.displayName="TransitionContext";var _=((n=_||{}).Visible="visible",n.Hidden="hidden",n);let E=(0,i.createContext)(null);function k(e){return"children"in e?k(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function x(e,t){let r=(0,c.E)(e),n=(0,i.useRef)([]),u=(0,o.t)(),l=(0,s.G)(),d=(0,a.z)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.l4.Hidden,i=n.current.findIndex(t=>{let{el:r}=t;return r===e});-1!==i&&((0,f.E)(t,{[b.l4.Unmount](){n.current.splice(i,1)},[b.l4.Hidden](){n.current[i].state="hidden"}}),l.microTask(()=>{var e;!k(n)&&u.current&&(null==(e=r.current)||e.call(r))}))}),h=(0,a.z)(e=>{let t=n.current.find(t=>{let{el:r}=t;return r===e});return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>d(e,b.l4.Unmount)}),p=(0,i.useRef)([]),m=(0,i.useRef)(Promise.resolve()),g=(0,i.useRef)({enter:[],leave:[],idle:[]}),y=(0,a.z)((e,r,n)=>{p.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(t=>{let[r]=t;return r!==e})),null==t||t.chains.current[r].push([e,new Promise(e=>{p.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(g.current[r].map(e=>{let[t,r]=e;return r})).then(()=>e())})]),"enter"===r?m.current=m.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(r)):n(r)}),v=(0,a.z)((e,t,r)=>{Promise.all(g.current[t].splice(0).map(e=>{let[t,r]=e;return r})).then(()=>{var e;null==(e=p.current.shift())||e()}).then(()=>r(t))});return(0,i.useMemo)(()=>({children:n,register:h,unregister:d,onStart:y,onStop:v,wait:m,chains:g}),[h,d,n,y,v,g,m])}function S(){}E.displayName="NestingContext";let A=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function C(e){var t;let r={};for(let n of A)r[n]=null!=(t=e[n])?t:S;return r}let I=b.AN.RenderStrategy,R=(0,b.yV)(function(e,t){let{show:r,appear:n=!1,unmount:s=!0,...o}=e,c=(0,i.useRef)(null),h=(0,d.T)(c,t);(0,l.H)();let f=(0,g.oJ)();if(void 0===r&&null!==f&&(r=(f&g.ZM.Open)===g.ZM.Open),![!0,!1].includes(r))throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[p,m]=(0,i.useState)(r?"visible":"hidden"),y=x(()=>{m("hidden")}),[v,_]=(0,i.useState)(!0),S=(0,i.useRef)([r]);(0,u.e)(()=>{!1!==v&&S.current[S.current.length-1]!==r&&(S.current.push(r),_(!1))},[S,r]);let A=(0,i.useMemo)(()=>({show:r,appear:n,initial:v}),[r,n,v]);(0,i.useEffect)(()=>{if(r)m("visible");else if(k(y)){let e=c.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&m("hidden")}else m("hidden")},[r,y]);let C={unmount:s},R=(0,a.z)(()=>{var t;v&&_(!1),null==(t=e.beforeEnter)||t.call(e)}),N=(0,a.z)(()=>{var t;v&&_(!1),null==(t=e.beforeLeave)||t.call(e)});return i.createElement(E.Provider,{value:y},i.createElement(w.Provider,{value:A},(0,b.sY)({ourProps:{...C,as:i.Fragment,children:i.createElement(P,{ref:h,...C,...o,beforeEnter:R,beforeLeave:N})},theirProps:{},defaultTag:i.Fragment,features:I,visible:"visible"===p,name:"Transition"})))}),P=(0,b.yV)(function(e,t){var r,n,_;let S;let{beforeEnter:A,afterEnter:R,beforeLeave:P,afterLeave:N,enter:M,enterFrom:T,enterTo:O,entered:D,leave:L,leaveFrom:B,leaveTo:q,...z}=e,U=(0,i.useRef)(null),j=(0,d.T)(U,t),F=null==(r=z.unmount)||r?b.l4.Unmount:b.l4.Hidden,{show:H,appear:$,initial:W}=function(){let e=(0,i.useContext)(w);if(null===e)throw Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[G,V]=(0,i.useState)(H?"visible":"hidden"),K=function(){let e=(0,i.useContext)(E);if(null===e)throw Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:Z,unregister:Y}=K;(0,i.useEffect)(()=>Z(U),[Z,U]),(0,i.useEffect)(()=>{if(F===b.l4.Hidden&&U.current){if(H&&"visible"!==G){V("visible");return}return(0,f.E)(G,{hidden:()=>Y(U),visible:()=>Z(U)})}},[G,U,Z,Y,H,F]);let J=(0,c.E)({base:v(z.className),enter:v(M),enterFrom:v(T),enterTo:v(O),entered:v(D),leave:v(L),leaveFrom:v(B),leaveTo:v(q)}),Q=(_={beforeEnter:A,afterEnter:R,beforeLeave:P,afterLeave:N},S=(0,i.useRef)(C(_)),(0,i.useEffect)(()=>{S.current=C(_)},[_]),S),X=(0,l.H)();(0,i.useEffect)(()=>{if(X&&"visible"===G&&null===U.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[U,G,X]);let ee=$&&H&&W,et=X&&(!W||$)?H?"enter":"leave":"idle",er=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,i.useState)(e),n=(0,o.t)(),s=(0,i.useCallback)(e=>{n.current&&r(t=>t|e)},[t,n]),a=(0,i.useCallback)(e=>!!(t&e),[t]);return{flags:t,addFlag:s,hasFlag:a,removeFlag:(0,i.useCallback)(e=>{n.current&&r(t=>t&~e)},[r,n]),toggleFlag:(0,i.useCallback)(e=>{n.current&&r(t=>t^e)},[r])}}(0),en=(0,a.z)(e=>(0,f.E)(e,{enter:()=>{er.addFlag(g.ZM.Opening),Q.current.beforeEnter()},leave:()=>{er.addFlag(g.ZM.Closing),Q.current.beforeLeave()},idle:()=>{}})),ei=(0,a.z)(e=>(0,f.E)(e,{enter:()=>{er.removeFlag(g.ZM.Opening),Q.current.afterEnter()},leave:()=>{er.removeFlag(g.ZM.Closing),Q.current.afterLeave()},idle:()=>{}})),es=x(()=>{V("hidden"),Y(U)},K),ea=(0,i.useRef)(!1);!function(e){let{immediate:t,container:r,direction:n,classes:i,onStart:a,onStop:l}=e,d=(0,o.t)(),g=(0,s.G)(),y=(0,c.E)(n);(0,u.e)(()=>{t&&(y.current="enter")},[t]),(0,u.e)(()=>{let e=(0,h.k)();g.add(e.dispose);let t=r.current;if(t&&"idle"!==y.current&&d.current){var n,s,o;let r,u,c,d,g,b,v;return e.dispose(),a.current(y.current),e.add((n=i.current,s="enter"===y.current,o=()=>{e.dispose(),l.current(y.current)},u=s?"enter":"leave",c=(0,h.k)(),d=void 0!==o?(r={called:!1},function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!r.called)return r.called=!0,o(...t)}):()=>{},"enter"===u&&(t.removeAttribute("hidden"),t.style.display=""),g=(0,f.E)(u,{enter:()=>n.enter,leave:()=>n.leave}),b=(0,f.E)(u,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),v=(0,f.E)(u,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom}),m(t,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),p(t,...n.base,...g,...v),c.nextFrame(()=>{m(t,...n.base,...g,...v),p(t,...n.base,...g,...b),function(e,t){let r=(0,h.k)();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[s,a]=[n,i].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t}),o=s+a;if(0!==o){r.group(r=>{r.setTimeout(()=>{t(),r.dispose()},o),r.addEventListener(e,"transitionrun",e=>{e.target===e.currentTarget&&r.dispose()})});let n=r.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),n())})}else t();r.add(()=>t()),r.dispose}(t,()=>(m(t,...n.base,...g),p(t,...n.base,...n.entered),d()))}),c.dispose)),e.dispose}},[n])}({immediate:ee,container:U,classes:J,direction:et,onStart:(0,c.E)(e=>{ea.current=!0,es.onStart(U,e,en)}),onStop:(0,c.E)(e=>{ea.current=!1,es.onStop(U,e,ei),"leave"!==e||k(es)||(V("hidden"),Y(U))})});let eo=z;return ee?eo={...eo,className:(0,y.A)(z.className,...J.current.enter,...J.current.enterFrom)}:ea.current&&(eo.className=(0,y.A)(z.className,null==(n=U.current)?void 0:n.className),""===eo.className&&delete eo.className),i.createElement(E.Provider,{value:es},i.createElement(g.up,{value:(0,f.E)(G,{visible:g.ZM.Open,hidden:g.ZM.Closed})|er.flags},(0,b.sY)({ourProps:{ref:j},theirProps:eo,defaultTag:"div",features:I,visible:"visible"===G,name:"Transition.Child"})))}),N=(0,b.yV)(function(e,t){let r=null!==(0,i.useContext)(w),n=null!==(0,g.oJ)();return i.createElement(i.Fragment,null,!r&&n?i.createElement(R,{ref:t,...e}):i.createElement(P,{ref:t,...e}))}),M=Object.assign(R,{Child:N,Root:R})},3138:function(e,t,r){"use strict";r.d(t,{G:function(){return s}});var n=r(66399),i=r(64678);function s(){let[e]=(0,n.useState)(i.k);return(0,n.useEffect)(()=>()=>e.dispose(),[e]),e}},54912:function(e,t,r){"use strict";r.d(t,{z:function(){return s}});var n=r(66399),i=r(44318);let s=function(e){let t=(0,i.E)(e);return n.useCallback(function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.current(...r)},[t])}},82669:function(e,t,r){"use strict";r.d(t,{M:function(){return u}});var n,i=r(66399),s=r(67159),a=r(44583),o=r(47058);let u=null!=(n=i.useId)?n:function(){let e=(0,o.H)(),[t,r]=i.useState(e?()=>s.O.nextId():null);return(0,a.e)(()=>{null===t&&r(s.O.nextId())},[t]),null!=t?""+t:void 0}},78648:function(e,t,r){"use strict";r.d(t,{t:function(){return s}});var n=r(66399),i=r(44583);function s(){let e=(0,n.useRef)(!1);return(0,i.e)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}},44583:function(e,t,r){"use strict";r.d(t,{e:function(){return s}});var n=r(66399),i=r(67159);let s=(e,t)=>{i.O.isServer?(0,n.useEffect)(e,t):(0,n.useLayoutEffect)(e,t)}},44318:function(e,t,r){"use strict";r.d(t,{E:function(){return s}});var n=r(66399),i=r(44583);function s(e){let t=(0,n.useRef)(e);return(0,i.e)(()=>{t.current=e},[e]),t}},19907:function(e,t,r){"use strict";r.d(t,{O:function(){return c}});var n=r(66399),i=r(28853),s=r(63891),a=r(44318);function o(e,t,r){let i=(0,a.E)(t);(0,n.useEffect)(()=>{function t(e){i.current(e)}return document.addEventListener(e,t,r),()=>document.removeEventListener(e,t,r)},[e,r])}var u=r(22032);function c(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=(0,n.useRef)(!1);function c(r,n){if(!a.current||r.defaultPrevented)return;let s=n(r);if(null!==s&&s.getRootNode().contains(s)&&s.isConnected){for(let t of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e)){if(null===t)continue;let e=t instanceof HTMLElement?t:t.current;if(null!=e&&e.contains(s)||r.composed&&r.composedPath().includes(e))return}return(0,i.sP)(s,i.tJ.Loose)||-1===s.tabIndex||r.preventDefault(),t(r,s)}}(0,n.useEffect)(()=>{requestAnimationFrame(()=>{a.current=r})},[r]);let l=(0,n.useRef)(null);o("pointerdown",e=>{var t,r;a.current&&(l.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target)},!0),o("mousedown",e=>{var t,r;a.current&&(l.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target)},!0),o("click",e=>{(0,s.tq)()||l.current&&(c(e,()=>l.current),l.current=null)},!0),o("touchend",e=>c(e,()=>e.target instanceof HTMLElement?e.target:null),!0),(0,u.s)("blur",e=>c(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}},9828:function(e,t,r){"use strict";r.d(t,{i:function(){return s}});var n=r(66399),i=r(38514);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.useMemo)(()=>(0,i.r)(...t),[...t])}},47058:function(e,t,r){"use strict";r.d(t,{H:function(){return a}});var n,i=r(66399),s=r(67159);function a(){let e;let t=(e="undefined"==typeof document,(0,(n||(n=r.t(i,2))).useSyncExternalStore)(()=>()=>{},()=>!1,()=>!e)),[a,o]=i.useState(s.O.isHandoffComplete);return a&&!1===s.O.isHandoffComplete&&o(!1),i.useEffect(()=>{!0!==a&&o(!0)},[a]),i.useEffect(()=>s.O.handoff(),[]),!t&&a}},93820:function(e,t,r){"use strict";r.d(t,{T:function(){return o},h:function(){return a}});var n=r(66399),i=r(54912);let s=Symbol();function a(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return Object.assign(e,{[s]:t})}function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let a=(0,n.useRef)(t);(0,n.useEffect)(()=>{a.current=t},[t]);let o=(0,i.z)(e=>{for(let t of a.current)null!=t&&("function"==typeof t?t(e):t.current=e)});return t.every(e=>null==e||(null==e?void 0:e[s]))?void 0:o}},22032:function(e,t,r){"use strict";r.d(t,{s:function(){return s}});var n=r(66399),i=r(44318);function s(e,t,r){let s=(0,i.E)(t);(0,n.useEffect)(()=>{function t(e){s.current(e)}return window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)},[e,r])}},81904:function(e,t,r){"use strict";let n;r.d(t,{ZM:function(){return a},oJ:function(){return o},up:function(){return u}});var i=r(66399);let s=(0,i.createContext)(null);s.displayName="OpenClosedContext";var a=((n=a||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);function o(){return(0,i.useContext)(s)}function u(e){let{value:t,children:r}=e;return i.createElement(s.Provider,{value:t},r)}},42332:function(e,t,r){"use strict";function n(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(null==t?void 0:t.getAttribute("disabled"))==="";return!(n&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}r.d(t,{P:function(){return n}})},73727:function(e,t,r){"use strict";function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return Array.from(new Set(t.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}r.d(t,{A:function(){return n}})},64678:function(e,t,r){"use strict";r.d(t,{k:function(){return function e(){let t=[],r={addEventListener:(e,t,n,i)=>(e.addEventListener(t,n,i),r.add(()=>e.removeEventListener(t,n,i))),requestAnimationFrame(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let i=requestAnimationFrame(...t);return r.add(()=>cancelAnimationFrame(i))},nextFrame(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.requestAnimationFrame(()=>r.requestAnimationFrame(...t))},setTimeout(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let i=setTimeout(...t);return r.add(()=>clearTimeout(i))},microTask(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];let s={current:!0};return(0,n.Y)(()=>{s.current&&t[0]()}),r.add(()=>{s.current=!1})},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add(()=>{Object.assign(e.style,{[t]:n})})},group(t){let r=e();return t(r),this.add(()=>r.dispose())},add:e=>(t.push(e),()=>{let r=t.indexOf(e);if(r>=0)for(let e of t.splice(r,1))e()}),dispose(){for(let e of t.splice(0))e()}};return r}}});var n=r(32816)},67159:function(e,t,r){"use strict";r.d(t,{O:function(){return o}});var n=Object.defineProperty,i=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t,r)=>(i(e,"symbol"!=typeof t?t+"":t,r),r);class a{set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}constructor(){s(this,"current",this.detect()),s(this,"handoffState","pending"),s(this,"currentId",0)}}let o=new a},28853:function(e,t,r){"use strict";let n,i,s,a,o;r.d(t,{C5:function(){return w},EO:function(){return E},TO:function(){return h},fE:function(){return f},jA:function(){return k},sP:function(){return y},tJ:function(){return g},wI:function(){return b},z2:function(){return _}});var u=r(64678),c=r(5380),l=r(38514);let d=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");var h=((n=h||{})[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n),f=((i=f||{})[i.Error=0]="Error",i[i.Overflow=1]="Overflow",i[i.Success=2]="Success",i[i.Underflow=3]="Underflow",i),p=((s=p||{})[s.Previous=-1]="Previous",s[s.Next=1]="Next",s);function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return null==e?[]:Array.from(e.querySelectorAll(d)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var g=((a=g||{})[a.Strict=0]="Strict",a[a.Loose=1]="Loose",a);function y(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(t=(0,l.r)(e))?void 0:t.body)&&(0,c.E)(r,{0:()=>e.matches(d),1(){let t=e;for(;null!==t;){if(t.matches(d))return!0;t=t.parentElement}return!1}})}function b(e){let t=(0,l.r)(e);(0,u.k)().nextFrame(()=>{t&&!y(t.activeElement,0)&&w(e)})}var v=((o=v||{})[o.Keyboard=0]="Keyboard",o[o.Mouse=1]="Mouse",o);function w(e){null==e||e.focus({preventScroll:!0})}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return e.slice().sort((e,r)=>{let n=t(e),i=t(r);if(null===n||null===i)return 0;let s=n.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function E(e,t){return k(m(),t,{relativeTo:e})}function k(e,t){var r,n,i;let{sorted:s=!0,relativeTo:a=null,skipElements:o=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,c=Array.isArray(e)?s?_(e):e:m(e);o.length>0&&c.length>1&&(c=c.filter(e=>!o.includes(e))),a=null!=a?a:u.activeElement;let l=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,c.indexOf(a))-1;if(4&t)return Math.max(0,c.indexOf(a))+1;if(8&t)return c.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=32&t?{preventScroll:!0}:{},f=0,p=c.length,g;do{if(f>=p||f+p<=0)return 0;let e=d+f;if(16&t)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}null==(g=c[e])||g.focus(h),f+=l}while(g!==u.activeElement);return 6&t&&null!=(i=null==(n=null==(r=g)?void 0:r.matches)?void 0:n.call(r,"textarea,input"))&&i&&g.select(),2}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0))},5380:function(e,t,r){"use strict";function n(e,t){for(var r=arguments.length,i=Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];if(e in t){let r=t[e];return"function"==typeof r?r(...i):r}let a=Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map(e=>'"'.concat(e,'"')).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(a,n),a}r.d(t,{E:function(){return n}})},32816:function(e,t,r){"use strict";function n(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}r.d(t,{Y:function(){return n}})},38514:function(e,t,r){"use strict";r.d(t,{r:function(){return i}});var n=r(67159);function i(e){return n.O.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}},63891:function(e,t,r){"use strict";function n(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return n()||/Android/gi.test(window.navigator.userAgent)}r.d(t,{gn:function(){return n},tq:function(){return i}})},57772:function(e,t,r){"use strict";let n,i;r.d(t,{AN:function(){return u},l4:function(){return c},sY:function(){return l},yV:function(){return p}});var s=r(66399),a=r(73727),o=r(5380),u=((n=u||{})[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n),c=((i=c||{})[i.Unmount=0]="Unmount",i[i.Hidden=1]="Hidden",i);function l(e){let{ourProps:t,theirProps:r,slot:n,defaultTag:i,features:s,visible:a=!0,name:u,mergeRefs:c}=e;c=null!=c?c:h;let l=f(r,t);if(a)return d(l,n,i,u,c);let p=null!=s?s:0;if(2&p){let{static:e=!1,...t}=l;if(e)return d(t,n,i,u,c)}if(1&p){let{unmount:e=!0,...t}=l;return(0,o.E)(e?0:1,{0:()=>null,1:()=>d({...t,hidden:!0,style:{display:"none"}},n,i,u,c)})}return d(l,n,i,u,c)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,{as:o=r,children:u,refName:c="ref",...l}=g(e,["unmount","static"]),d=void 0!==e.ref?{[c]:e.ref}:{},h="function"==typeof u?u(t):u;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t));let p={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(p["data-headlessui-state"]=r.join(" "))}if(o===s.Fragment&&Object.keys(m(l)).length>0){if(!(0,s.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw Error(['Passing props on "Fragment"!',"","The current component <".concat(n,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(l).map(e=>"  - ".concat(e)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>"  - ".concat(e)).join("\n")].join("\n"));let e=h.props,t="function"==typeof(null==e?void 0:e.className)?function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return(0,a.A)(null==e?void 0:e.className(...r),l.className)}:(0,a.A)(null==e?void 0:e.className,l.className);return(0,s.cloneElement)(h,Object.assign({},f(h.props,m(g(l,["ref"]))),p,d,{ref:i(h.ref,d.ref)},t?{className:t}:{}))}return(0,s.createElement)(o,Object.assign({},g(l,["ref"]),o!==s.Fragment&&d,o!==s.Fragment&&p),h)}function h(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.every(e=>null==e)?void 0:e=>{for(let r of t)null!=r&&("function"==typeof r?r(e):r.current=e)}}function f(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0===t.length)return{};if(1===t.length)return t[0];let n={},i={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=i[t]||(i[t]=[]),i[t].push(e[t])):n[t]=e[t];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(i).map(e=>[e,void 0])));for(let e in i)Object.assign(n,{[e](t){for(var r=arguments.length,n=Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];for(let r of i[e]){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;r(t,...n)}}});return n}function p(e){var t;return Object.assign((0,s.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function m(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}},34575:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))});t.Z=i},20533:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))});t.Z=i},26980:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))});t.Z=i},17661:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))});t.Z=i},38631:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15M12 9l3 3m0 0-3 3m3-3H2.25"}))});t.Z=i},849:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))});t.Z=i},55448:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))});t.Z=i},69207:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))});t.Z=i},59943:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))});t.Z=i},40406:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))});t.Z=i},68082:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))});t.Z=i},68859:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"}))});t.Z=i},77127:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"}))});t.Z=i},66505:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))});t.Z=i},60020:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"}))});t.Z=i},74665:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"}))});t.Z=i},49094:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))});t.Z=i},9781:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))});t.Z=i},10487:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))});t.Z=i},17516:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))});t.Z=i},80678:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))});t.Z=i},36698:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.864 4.243A7.5 7.5 0 0 1 19.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 0 0 4.5 10.5a7.464 7.464 0 0 1-1.15 3.993m1.989 3.559A11.209 11.209 0 0 0 8.25 10.5a3.75 3.75 0 1 1 7.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 0 1-3.6 9.75m6.633-4.596a18.666 18.666 0 0 1-2.485 5.33"}))});t.Z=i},53118:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))});t.Z=i},74847:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))});t.Z=i},21285:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"}))});t.Z=i},47424:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))});t.Z=i},37550:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"}))});t.Z=i},49255:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))});t.Z=i},47370:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))});t.Z=i},74566:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"}))});t.Z=i},93226:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 3.75 9.375v-4.5ZM3.75 14.625c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5a1.125 1.125 0 0 1-1.125-1.125v-4.5ZM13.5 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 13.5 9.375v-4.5Z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 6.75h.75v.75h-.75v-.75ZM6.75 16.5h.75v.75h-.75v-.75ZM16.5 6.75h.75v.75h-.75v-.75ZM13.5 13.5h.75v.75h-.75v-.75ZM13.5 19.5h.75v.75h-.75v-.75ZM19.5 13.5h.75v.75h-.75v-.75ZM19.5 19.5h.75v.75h-.75v-.75ZM16.5 16.5h.75v.75h-.75v-.75Z"}))});t.Z=i},58026:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"}))});t.Z=i},59057:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))});t.Z=i},56836:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}))});t.Z=i},50536:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))});t.Z=i},50336:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))});t.Z=i},67205:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a2.25 2.25 0 0 0-2.25-2.25H15a3 3 0 1 1-6 0H5.25A2.25 2.25 0 0 0 3 12m18 0v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6m18 0V9M3 12V9m18 0a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 9m18 0V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v3"}))});t.Z=i},62942:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))});t.Z=i},80434:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M15.97 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H7.5a.75.75 0 0 1 0-1.5h11.69l-3.22-3.22a.75.75 0 0 1 0-1.06Zm-7.94 9a.75.75 0 0 1 0 1.06l-3.22 3.22H16.5a.75.75 0 0 1 0 1.5H4.81l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))});t.Z=i},74717:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))});t.Z=i},47792:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))});t.Z=i},27364:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{d:"M10.5 18.75a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 0-1.5h-3Z"}),n.createElement("path",{fillRule:"evenodd",d:"M8.625.75A3.375 3.375 0 0 0 5.25 4.125v15.75a3.375 3.375 0 0 0 3.375 3.375h6.75a3.375 3.375 0 0 0 3.375-3.375V4.125A3.375 3.375 0 0 0 15.375.75h-6.75ZM7.5 4.125C7.5 3.504 8.004 3 8.625 3H9.75v.375c0 .621.504 1.125 1.125 1.125h2.25c.621 0 1.125-.504 1.125-1.125V3h1.125c.621 0 1.125.504 1.125 1.125v15.75c0 .621-.504 1.125-1.125 1.125h-6.75A1.125 1.125 0 0 1 7.5 19.875V4.125Z",clipRule:"evenodd"}))});t.Z=i},60834:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M9 1.5H5.625c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5Zm6.61 10.936a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 14.47a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}),n.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))});t.Z=i},41301:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z",clipRule:"evenodd"}))});t.Z=i},28452:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))});t.Z=i},56487:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))});t.Z=i},34200:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 0 1-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 0 1-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 0 1-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584ZM12 18a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))});t.Z=i},30028:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M12.516 2.17a.75.75 0 0 0-1.032 0 11.209 11.209 0 0 1-7.877 3.08.75.75 0 0 0-.722.515A12.74 12.74 0 0 0 2.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 0 0 .374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 0 0-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08Zm3.094 8.016a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))});t.Z=i},39771:function(e,t,r){"use strict";var n=r(66399);let i=n.forwardRef(function(e,t){let{title:r,titleId:i,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},s),r?n.createElement("title",{id:i},r):null,n.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))});t.Z=i},75247:function(e,t,r){"use strict";r.d(t,{Nc:function(){return d}});var n=r(64915),i=r(66399);let s=(0,i.forwardRef)((e,t)=>{let{as:r="div",...i}=e;return(0,n.jsx)(r,{...i,ref:t})}),a="cf-turnstile-script",o="onloadTurnstileCallback",u=e=>!!document.getElementById(e),c=e=>{let{render:t="explicit",onLoadCallbackName:r=o,scriptOptions:{nonce:n="",defer:i=!0,async:s=!0,id:c="",appendTo:l,onError:d,crossOrigin:h=""}={}}=e,f=c||a;if(u(f))return;let p=document.createElement("script");p.id=f,p.src="".concat("https://challenges.cloudflare.com/turnstile/v0/api.js","?onload=").concat(r,"&render=").concat(t),document.querySelector('script[src="'.concat(p.src,'"]'))||(p.defer=!!i,p.async=!!s,n&&(p.nonce=n),h&&(p.crossOrigin=h),d&&(p.onerror=d),("body"===l?document.body:document.getElementsByTagName("head")[0]).appendChild(p))},l={normal:{width:300,height:65},compact:{width:130,height:120},invisible:{width:0,height:0,overflow:"hidden"},interactionOnly:{width:"fit-content",height:"auto"}},d=(0,i.forwardRef)((e,t)=>{var r;let{scriptOptions:d,options:h={},siteKey:f,onWidgetLoad:p,onSuccess:m,onExpire:g,onError:y,onBeforeInteractive:b,onAfterInteractive:v,onUnsupported:w,onLoadScript:_,id:E,style:k,as:x="div",injectScript:S=!0,...A}=e,C=null!==(r=h.size)&&void 0!==r?r:"normal",[I,R]=(0,i.useState)("execute"===h.execution?l.invisible:"interaction-only"===h.appearance?l.interactionOnly:l[C]),P=(0,i.useRef)(null),N=(0,i.useRef)(!1),[M,T]=(0,i.useState)(),[O,D]=(0,i.useState)(!1),L=null!=E?E:"cf-turnstile",B=S?(null==d?void 0:d.id)||"".concat(a,"__").concat(L):(null==d?void 0:d.id)||a,q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,[t,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let t=()=>{u(e)&&r(!0)},n=new MutationObserver(t);return n.observe(document,{childList:!0,subtree:!0}),t(),()=>{n.disconnect()}},[e]),t}(B),z=(null==d?void 0:d.onLoadCallbackName)?"".concat(d.onLoadCallbackName,"__").concat(L):"".concat(o,"__").concat(L),U=(0,i.useMemo)(()=>{var e,t,r,n,i,s,a;let o;return{sitekey:f,action:h.action,cData:h.cData,callback:m,"error-callback":y,"expired-callback":g,"before-interactive-callback":b,"after-interactive-callback":v,"unsupported-callback":w,theme:null!==(e=h.theme)&&void 0!==e?e:"auto",language:null!==(t=h.language)&&void 0!==t?t:"auto",tabindex:h.tabIndex,"response-field":h.responseField,"response-field-name":h.responseFieldName,size:("invisible"!==C&&(o=C),o),retry:null!==(r=h.retry)&&void 0!==r?r:"auto","retry-interval":null!==(n=h.retryInterval)&&void 0!==n?n:8e3,"refresh-expired":null!==(i=h.refreshExpired)&&void 0!==i?i:"auto",execution:null!==(s=h.execution)&&void 0!==s?s:"render",appearance:null!==(a=h.appearance)&&void 0!==a?a:"always"}},[f,h,m,y,g,C,b,v,w]),j=(0,i.useMemo)(()=>JSON.stringify(U),[U]);return(0,i.useImperativeHandle)(t,()=>{if("undefined"==typeof window||!q)return;let{turnstile:e}=window;return{getResponse(){if(!(null==e?void 0:e.getResponse)||!M){console.warn("Turnstile has not been loaded");return}return e.getResponse(M)},reset(){if(!(null==e?void 0:e.reset)||!M){console.warn("Turnstile has not been loaded");return}"execute"===h.execution&&R(l.invisible);try{e.reset(M)}catch(e){console.warn("Failed to reset Turnstile widget ".concat(M),e)}},remove(){if(!(null==e?void 0:e.remove)||!M){console.warn("Turnstile has not been loaded");return}T(""),R(l.invisible),e.remove(M)},render(){if(!(null==e?void 0:e.render)||!P.current||M){console.warn("Turnstile has not been loaded or widget already rendered");return}let t=e.render(P.current,U);return T(t),"execute"!==h.execution&&R(l[C]),t},execute(){if("execute"===h.execution){if(!(null==e?void 0:e.execute)||!P.current||!M){console.warn("Turnstile has not been loaded or widget has not been rendered");return}e.execute(P.current,U),R(l[C])}},isExpired(){if(!(null==e?void 0:e.isExpired)||!M){console.warn("Turnstile has not been loaded");return}return e.isExpired(M)}}},[q,M,h.execution,C,U,P]),(0,i.useEffect)(()=>(window[z]=()=>D(!0),()=>{delete window[z]}),[z]),(0,i.useEffect)(()=>{S&&!O&&c({onLoadCallbackName:z,scriptOptions:{...d,id:B}})},[S,O,z,d,B]),(0,i.useEffect)(()=>{q&&!O&&window.turnstile&&D(!0)},[O,q]),(0,i.useEffect)(()=>{if(!f){console.warn("sitekey was not provided");return}q&&P.current&&O&&!N.current&&(T(window.turnstile.render(P.current,U)),N.current=!0)},[q,f,U,N,O]),(0,i.useEffect)(()=>{window.turnstile&&P.current&&M&&(u(M)&&window.turnstile.remove(M),T(window.turnstile.render(P.current,U)),N.current=!0)},[j,f]),(0,i.useEffect)(()=>{if(window.turnstile&&M&&u(M))return null==p||p(M),()=>{window.turnstile.remove(M)}},[M,p]),(0,i.useEffect)(()=>{R("execute"===h.execution?l.invisible:"interaction-only"===U.appearance?l.interactionOnly:l[C])},[h.execution,C,U.appearance]),(0,i.useEffect)(()=>{q&&"function"==typeof _&&_()},[q,_]),(0,n.jsx)(s,{ref:P,as:x,id:L,style:{...I,...k},...A})});d.displayName="Turnstile"},17500:function(e,t,r){"use strict";r.d(t,{FF:function(){return S},S5:function(){return g},Wd:function(){return v},_t:function(){return s},bytesToNumberBE:function(){return f},ci:function(){return u},dQ:function(){return w},eV:function(){return b},gk:function(){return a},hexToBytes:function(){return h},n$:function(){return k},ql:function(){return y},tL:function(){return m},ty:function(){return p}}),BigInt(0);let n=BigInt(1),i=BigInt(2);function s(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function a(e){if(!s(e))throw Error("Uint8Array expected")}let o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(e){a(e);let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t}function c(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}let l={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function d(e){return e>=l._0&&e<=l._9?e-l._0:e>=l._A&&e<=l._F?e-(l._A-10):e>=l._a&&e<=l._f?e-(l._a-10):void 0}function h(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=d(e.charCodeAt(i)),s=d(e.charCodeAt(i+1));if(void 0===r||void 0===s)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+s}return n}function f(e){return c(u(e))}function p(e){return a(e),c(u(Uint8Array.from(e).reverse()))}function m(e,t){return h(e.toString(16).padStart(2*t,"0"))}function g(e,t){return m(e,t).reverse()}function y(e,t,r){let n;if("string"==typeof t)try{n=h(t)}catch(r){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else if(s(t))n=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${e} expected ${r} bytes, got ${i}`);return n}function b(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];a(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}function v(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}let w=e=>(i<<BigInt(e-1))-n,_=e=>new Uint8Array(e),E=e=>Uint8Array.from(e);function k(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=_(e),i=_(e),s=0,a=()=>{n.fill(1),i.fill(0),s=0},o=(...e)=>r(i,n,...e),u=(e=_())=>{i=o(E([0]),e),n=o(),0!==e.length&&(i=o(E([1]),e),n=o())},c=()=>{if(s++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=o()).slice();r.push(t),e+=n.length}return b(...r)};return(e,t)=>{let r;for(a(),u(e);!(r=t(c()));)u();return a(),r}}let x={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||s(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function S(e,t,r={}){let n=(t,r,n)=>{let i=x[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let s=e[t];if((!n||void 0!==s)&&!i(s,e))throw Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}},44484:function(e,t,r){"use strict";r.d(t,{secp256k1:function(){return q}});var n=r(66641),i=r(17500);let s=BigInt(0),a=BigInt(1),o=BigInt(2),u=BigInt(3),c=BigInt(4),l=BigInt(5),d=BigInt(8);function h(e,t){let r=e%t;return r>=s?r:t+r}function f(e,t,r){let n=e;for(;t-- >s;)n*=n,n%=r;return n}function p(e,t){if(e===s||t<=s)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=h(e,t),n=t,i=s,o=a,u=a,c=s;for(;r!==s;){let e=n/r,t=n%r,s=i-u*e,a=o-c*e;n=r,r=t,i=u,o=c,u=s,c=a}if(n!==a)throw Error("invert: does not exist");return h(i,t)}BigInt(9),BigInt(16);let m=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t){let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function y(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function b(e){let t=y(e);return t+Math.ceil(t/2)}var v=r(94097),w=r(85811);class _ extends w.kb{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,v.vp)(e);let r=(0,w.O0)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return(0,v.Gg)(this),this.iHash.update(e),this}digestInto(e){(0,v.Gg)(this),(0,v.aI)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let E=(e,t,r)=>new _(e,t).update(r).digest();E.create=(e,t)=>new _(e,t);let k=BigInt(0),x=BigInt(1);function S(e){return!function(e){let t=m.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});(0,i.FF)(e,t)}(e.Fp),(0,i.FF)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...g(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}let{bytesToNumberBE:A,hexToBytes:C}=i,I={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){let{Err:t}=I;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");let r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:A(n),l:e.subarray(r+2)}},toSig(e){let{Err:t}=I,r="string"==typeof e?C(e):e;i.gk(r);let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");let{d:s,l:a}=I._parseInt(r.subarray(2)),{d:o,l:u}=I._parseInt(a);if(u.length)throw new t("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(e){let t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{let t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),s=n.length/2,a=i.length/2,o=r(s),u=r(a);return`30${r(a+s+4)}02${u}${i}02${o}${n}`}},R=BigInt(0),P=BigInt(1),N=(BigInt(2),BigInt(3));BigInt(4);let M=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),T=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),O=BigInt(1),D=BigInt(2),L=(e,t)=>(e+t/D)/t,B=function(e,t,r=!1,n={}){if(e<=s)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:f,nByteLength:m}=g(e,t);if(m>2048)throw Error("Field lengths over 2048 bytes are not supported");let y=function(e){if(e%c===u){let t=(e+a)/c;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%d===l){let t=(e-l)/d;return function(e,r){let n=e.mul(r,o),i=e.pow(n,t),s=e.mul(r,i),a=e.mul(e.mul(s,o),i),u=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),r))throw Error("Cannot find square root");return u}}return function(e){let t,r,n;let i=(e-a)/o;for(t=e-a,r=0;t%o===s;t/=o,r++);for(n=o;n<e&&function(e,t,r){if(r<=s||t<s)throw Error("Expected power/modulo > 0");if(r===a)return s;let n=a;for(;t>s;)t&a&&(n=n*e%r),e=e*e%r,t>>=a;return n}(n,i,e)!==e-a;n++);if(1===r){let t=(e+a)/c;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let u=(t+a)/o;return function(e,s){if(e.pow(s,i)===e.neg(e.ONE))throw Error("Cannot find square root");let o=r,c=e.pow(e.mul(e.ONE,n),t),l=e.pow(s,u),d=e.pow(s,t);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(d);t<o&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(c,a<<BigInt(o-t-1));c=e.sqr(r),l=e.mul(l,r),d=e.mul(d,c),o=t}return l}}(e)}(e),b=Object.freeze({ORDER:e,BITS:f,BYTES:m,MASK:(0,i.dQ)(f),ZERO:s,ONE:a,create:t=>h(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return s<=t&&t<e},is0:e=>e===s,isOdd:e=>(e&a)===a,neg:t=>h(-t,e),eql:(e,t)=>e===t,sqr:t=>h(t*t,e),add:(t,r)=>h(t+r,e),sub:(t,r)=>h(t-r,e),mul:(t,r)=>h(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<s)throw Error("Expected power > 0");if(r===s)return e.ONE;if(r===a)return t;let n=e.ONE,i=t;for(;r>s;)r&a&&(n=e.mul(n,i)),i=e.sqr(i),r>>=a;return n})(b,e,t),div:(t,r)=>h(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:n.sqrt||(e=>y(b,e)),invertBatch:e=>(function(e,t){let r=Array(t.length),n=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),i=e.inv(n);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),i),r})(b,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,i.S5)(e,m):(0,i.tL)(e,m),fromBytes:e=>{if(e.length!==m)throw Error(`Fp.fromBytes: expected ${m}, got ${e.length}`);return r?(0,i.ty)(e):(0,i.bytesToNumberBE)(e)}});return Object.freeze(b)}(M,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),o=BigInt(88),u=e*e*e%M,c=u*u*e%M,l=f(c,t,M)*c%M,d=f(l,t,M)*c%M,h=f(d,D,M)*u%M,p=f(h,n,M)*h%M,m=f(p,i,M)*p%M,g=f(m,a,M)*m%M,y=f(g,o,M)*g%M,b=f(y,a,M)*m%M,v=f(b,t,M)*c%M,w=f(v,s,M)*p%M,_=f(w,r,M)*u%M,E=f(_,D,M);if(!B.eql(B.sqr(E),e))throw Error("Cannot find square root");return E}}),q=function(e,t){let r=t=>(function(e){let t=function(e){let t=S(e);return i.FF(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:n}=t,s=r.BYTES+1,o=2*r.BYTES+1;function u(e){return h(e,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:d,isWithinCurveOrder:f}=function(e){let t=function(e){let t=S(e);i.FF(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:s}=t;if(r){if(!n.eql(s,n.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{let s=t.toAffine();return i.eV(Uint8Array.from([4]),r.toBytes(s.x),r.toBytes(s.y))}),s=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function a(e){let{a:n,b:i}=t,s=r.sqr(e),a=r.mul(s,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),a(t.Gx)))throw Error("bad generator point: equation left != right");function o(e){return"bigint"==typeof e&&R<e&&e<t.n}function u(e){if(!o(e))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){let r;let{allowedPrivateKeyLengths:n,nByteLength:s,wrapPrivateKey:a,n:o}=t;if(n&&"bigint"!=typeof e){if(i._t(e)&&(e=i.ci(e)),"string"!=typeof e||!n.includes(e.length))throw Error("Invalid key");e=e.padStart(2*s,"0")}try{r="bigint"==typeof e?e:i.bytesToNumberBE((0,i.ql)("private key",e,s))}catch(t){throw Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(r=h(r,o)),u(r),r}let l=new Map;function d(e){if(!(e instanceof f))throw Error("ProjectivePoint expected")}class f{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required")}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof f)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?f.ZERO:new f(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(f.fromAffine)}static fromHex(e){let t=f.fromAffine(s((0,i.ql)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return f.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw Error("bad point: ZERO")}let{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw Error("bad point: x or y not FE");let i=r.sqr(n),s=a(e);if(!r.eql(i,s))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){d(e);let{px:t,py:n,pz:i}=this,{px:s,py:a,pz:o}=e,u=r.eql(r.mul(t,o),r.mul(s,i)),c=r.eql(r.mul(n,o),r.mul(a,i));return u&&c}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,i=r.mul(n,N),{px:s,py:a,pz:o}=this,u=r.ZERO,c=r.ZERO,l=r.ZERO,d=r.mul(s,s),h=r.mul(a,a),p=r.mul(o,o),m=r.mul(s,a);return m=r.add(m,m),l=r.mul(s,o),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(h,c),c=r.add(h,c),c=r.mul(u,c),u=r.mul(m,u),l=r.mul(i,l),p=r.mul(e,p),m=r.sub(d,p),m=r.mul(e,m),m=r.add(m,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,p),d=r.mul(d,m),c=r.add(c,d),p=r.mul(a,o),p=r.add(p,p),d=r.mul(p,m),u=r.sub(u,d),l=r.mul(p,h),l=r.add(l,l),new f(u,c,l=r.add(l,l))}add(e){d(e);let{px:n,py:i,pz:s}=this,{px:a,py:o,pz:u}=e,c=r.ZERO,l=r.ZERO,h=r.ZERO,p=t.a,m=r.mul(t.b,N),g=r.mul(n,a),y=r.mul(i,o),b=r.mul(s,u),v=r.add(n,i),w=r.add(a,o);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,s);let _=r.add(a,u);return w=r.mul(w,_),_=r.add(g,b),w=r.sub(w,_),_=r.add(i,s),c=r.add(o,u),_=r.mul(_,c),c=r.add(y,b),_=r.sub(_,c),h=r.mul(p,w),c=r.mul(m,b),h=r.add(c,h),c=r.sub(y,h),h=r.add(y,h),l=r.mul(c,h),y=r.add(g,g),y=r.add(y,g),b=r.mul(p,b),w=r.mul(m,w),y=r.add(y,b),b=r.sub(g,b),b=r.mul(p,b),w=r.add(w,b),g=r.mul(y,w),l=r.add(l,g),g=r.mul(_,w),c=r.mul(v,c),c=r.sub(c,g),g=r.mul(v,y),h=r.mul(_,h),new f(c,l,h=r.add(h,g))}subtract(e){return this.add(e.negate())}is0(){return this.equals(f.ZERO)}wNAF(e){return m.wNAFCached(this,l,e,e=>{let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(f.fromAffine)})}multiplyUnsafe(e){let n=f.ZERO;if(e===R)return n;if(u(e),e===P)return this;let{endo:i}=t;if(!i)return m.unsafeLadder(this,e);let{k1neg:s,k1:a,k2neg:o,k2:c}=i.splitScalar(e),l=n,d=n,h=this;for(;a>R||c>R;)a&P&&(l=l.add(h)),c&P&&(d=d.add(h)),h=h.double(),a>>=P,c>>=P;return s&&(l=l.negate()),o&&(d=d.negate()),d=new f(r.mul(d.px,i.beta),d.py,d.pz),l.add(d)}multiply(e){let n,i;u(e);let{endo:s}=t;if(s){let{k1neg:t,k1:a,k2neg:o,k2:u}=s.splitScalar(e),{p:c,f:l}=this.wNAF(a),{p:d,f:h}=this.wNAF(u);c=m.constTimeNegate(t,c),d=m.constTimeNegate(o,d),d=new f(r.mul(d.px,s.beta),d.py,d.pz),n=c.add(d),i=l.add(h)}else{let{p:t,f:r}=this.wNAF(e);n=t,i=r}return f.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=f.BASE,i=(e,t)=>t!==R&&t!==P&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=i(this,t).add(i(e,r));return s.is0()?void 0:s}toAffine(e){let{px:t,py:n,pz:i}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(i));let a=r.mul(t,e),o=r.mul(n,e),u=r.mul(i,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw Error("invZ was invalid");return{x:a,y:o}}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===P)return!0;if(r)return r(f,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===P?this:r?r(f,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(f,this,e)}toHex(e=!0){return i.ci(this.toRawBytes(e))}}f.BASE=new f(t.Gx,t.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);let p=t.nBitLength,m=function(e,t){let r=(e,t)=>{let r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>k;)r&x&&(n=n.add(i)),i=i.double(),r>>=x;return n},precomputeWindow(e,t){let{windows:r,windowSize:i}=n(t),s=[],a=e,o=a;for(let e=0;e<r;e++){o=a,s.push(o);for(let e=1;e<i;e++)o=o.add(a),s.push(o);a=o.double()}return s},wNAF(t,i,s){let{windows:a,windowSize:o}=n(t),u=e.ZERO,c=e.BASE,l=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<a;e++){let t=e*o,n=Number(s&l);s>>=h,n>o&&(n-=d,s+=x);let a=t+Math.abs(n)-1,f=e%2!=0,p=n<0;0===n?c=c.add(r(f,i[t])):u=u.add(r(p,i[a]))}return{p:u,f:c}},wNAFCached(e,t,r,n){let i=e._WINDOW_SIZE||1,s=t.get(e);return s||(s=this.precomputeWindow(e,i),1!==i&&t.set(e,n(s))),this.wNAF(i,s,r)}}}(f,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:o}}({...t,toBytes(e,t,n){let s=t.toAffine(),a=r.toBytes(s.x),o=i.eV;return n?o(Uint8Array.from([t.hasEvenY()?2:3]),a):o(Uint8Array.from([4]),a,r.toBytes(s.y))},fromBytes(e){let t=e.length,n=e[0],a=e.subarray(1);if(t===s&&(2===n||3===n)){let e;let t=i.bytesToNumberBE(a);if(!(R<t&&t<r.ORDER))throw Error("Point is not on curve");let s=d(t);try{e=r.sqrt(s)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&n)==1!=((e&P)===P)&&(e=r.neg(e)),{x:t,y:e}}if(t===o&&4===n)return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))};throw Error(`Point of length ${t} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`)}}),m=e=>i.ci(i.tL(e,t.nByteLength)),g=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class v{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let r=t.nByteLength;return new v(g(e=(0,i.ql)("compactSignature",e,2*r),0,r),g(e,r,2*r))}static fromDER(e){let{r:t,s:r}=I.toSig((0,i.ql)("DER",e));return new v(t,r)}assertValidity(){if(!f(this.r))throw Error("r must be 0 < r < CURVE.n");if(!f(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new v(this.r,this.s,e)}recoverPublicKey(e){let{r:s,s:a,recovery:o}=this,l=E((0,i.ql)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw Error("recovery id invalid");let d=2===o||3===o?s+t.n:s;if(d>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let h=(1&o)==0?"02":"03",f=c.fromHex(h+m(d)),g=p(d,n),y=u(-l*g),b=u(a*g),v=c.BASE.multiplyAndAddUnsafe(f,y,b);if(!v)throw Error("point at infinify");return v.assertValidity(),v}hasHighS(){return this.s>n>>P}normalizeS(){return this.hasHighS()?new v(this.r,u(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return I.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return m(this.r)+m(this.s)}}function w(e){let t=i._t(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===s||n===o:r?n===2*s||n===2*o:e instanceof c}let _=t.bits2int||function(e){let r=i.bytesToNumberBE(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},E=t.bits2int_modN||function(e){return u(_(e))},A=i.dQ(t.nBitLength);function C(e){if("bigint"!=typeof e)throw Error("bigint expected");if(!(R<=e&&e<A))throw Error(`bigint expected < 2^${t.nBitLength}`);return i.tL(e,t.nByteLength)}let M={lowS:t.lowS,prehash:!1},T={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(w(e))throw Error("first arg must be private key");if(!w(t))throw Error("second arg must be public key");return c.fromHex(t).multiply(l(e)).toRawBytes(r)},sign:function(e,s,a=M){let{seed:o,k2sig:d}=function(e,s,a=M){if(["recovered","canonical"].some(e=>e in a))throw Error("sign() legacy options not supported");let{hash:o,randomBytes:d}=t,{lowS:h,prehash:m,extraEntropy:g}=a;null==h&&(h=!0),e=(0,i.ql)("msgHash",e),m&&(e=(0,i.ql)("prehashed msgHash",o(e)));let y=E(e),b=l(s),w=[C(b),C(y)];if(null!=g&&!1!==g){let e=!0===g?d(r.BYTES):g;w.push((0,i.ql)("extraEntropy",e))}return{seed:i.eV(...w),k2sig:function(e){let t=_(e);if(!f(t))return;let r=p(t,n),i=c.BASE.multiply(t).toAffine(),s=u(i.x);if(s===R)return;let a=u(r*u(y+s*b));if(a===R)return;let o=(i.x===s?0:2)|Number(i.y&P),l=a;if(h&&a>n>>P)l=a>n>>P?u(-a):a,o^=1;return new v(s,l,o)}}}(e,s,a);return i.n$(t.hash.outputLen,t.nByteLength,t.hmac)(o,d)},verify:function(e,r,s,a=T){let o,l;if(r=(0,i.ql)("msgHash",r),s=(0,i.ql)("publicKey",s),"strict"in a)throw Error("options.strict was renamed to lowS");let{lowS:d,prehash:h}=a;try{if("string"==typeof e||i._t(e))try{l=v.fromDER(e)}catch(t){if(!(t instanceof I.Err))throw t;l=v.fromCompact(e)}else if("object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s){let{r:t,s:r}=e;l=new v(t,r)}else throw Error("PARSE");o=c.fromHex(s)}catch(e){if("PARSE"===e.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(d&&l.hasHighS())return!1;h&&(r=t.hash(r));let{r:f,s:m}=l,g=E(r),y=p(m,n),b=u(g*y),w=u(f*y),_=c.BASE.multiplyAndAddUnsafe(o,b,w)?.toAffine();return!!_&&u(_.x)===f},ProjectivePoint:c,Signature:v,utils:{isValidPrivateKey(e){try{return l(e),!0}catch(e){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let e=b(t.n);return function(e,t,r=!1){let n=e.length,s=y(t),o=b(t);if(n<16||n<o||n>1024)throw Error(`expected ${o}-1024 bytes of input, got ${n}`);let u=h(r?(0,i.bytesToNumberBE)(e):(0,i.ty)(e),t-a)+a;return r?(0,i.S5)(u,s):(0,i.tL)(u,s)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...r)=>E(t,e,(0,w.eV)(...r)),randomBytes:w.O6});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:B,n:T,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-O*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),s=L(t*e,T),a=L(-r*e,T),o=h(e-s*t-a*n,T),u=h(-s*r-a*t,T),c=o>i,l=u>i;if(c&&(o=T-o),l&&(u=T-u),o>i||u>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:o,k2neg:l,k2:u}}}},n.J);BigInt(0),q.ProjectivePoint},94097:function(e,t,r){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){i(e);let r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}r.d(t,{Gg:function(){return a},J8:function(){return o},Rx:function(){return n},aI:function(){return i},vp:function(){return s}})},66641:function(e,t,r){"use strict";r.d(t,{J:function(){return h}});var n=r(94097),i=r(85811);let s=(e,t,r)=>e&t^~e&r,a=(e,t,r)=>e&t^e&r^t&r;class o extends i.kb{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.GL)(this.buffer)}update(e){(0,n.Gg)(this);let{view:t,buffer:r,blockLen:s}=this,a=(e=(0,i.O0)(e)).length;for(let n=0;n<a;){let o=Math.min(s-this.pos,a-n);if(o===s){let t=(0,i.GL)(e);for(;s<=a-n;n+=s)this.process(t,n);continue}r.set(e.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.Gg)(this),(0,n.J8)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:s,isLE:a}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>s-o&&(this.process(r,0),o=0);for(let e=o;e<s;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),s=BigInt(4294967295),a=Number(r>>i&s),o=Number(r&s),u=n?4:0,c=n?0:4;e.setUint32(t+u,a,n),e.setUint32(t+c,o,n)}(r,s-8,BigInt(8*this.length),a),this.process(r,0);let u=(0,i.GL)(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=c/4,d=this.get();if(l>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,d[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=i,e.destroyed=s,n%t&&e.buffer.set(r),e}}let u=new Uint32Array([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]),c=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),l=new Uint32Array(64);class d extends o{constructor(){super(64,32,8,!1),this.A=0|c[0],this.B=0|c[1],this.C=0|c[2],this.D=0|c[3],this.E=0|c[4],this.F=0|c[5],this.G=0|c[6],this.H=0|c[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:s,G:a,H:o}=this;return[e,t,r,n,i,s,a,o]}set(e,t,r,n,i,s,a,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|s,this.G=0|a,this.H=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=l[e-15],r=l[e-2],n=(0,i.np)(t,7)^(0,i.np)(t,18)^t>>>3,s=(0,i.np)(r,17)^(0,i.np)(r,19)^r>>>10;l[e]=s+l[e-7]+n+l[e-16]|0}let{A:r,B:n,C:o,D:c,E:d,F:h,G:f,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.np)(d,6)^(0,i.np)(d,11)^(0,i.np)(d,25))+s(d,h,f)+u[e]+l[e]|0,m=((0,i.np)(r,2)^(0,i.np)(r,13)^(0,i.np)(r,22))+a(r,n,o)|0;p=f,f=h,h=d,d=c+t|0,c=o,o=n,n=r,r=t+m|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,c=c+this.D|0,d=d+this.E|0,h=h+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(r,n,o,c,d,h,f,p)}roundClean(){l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let h=(0,i.hE)(()=>new d)},85811:function(e,t,r){"use strict";r.d(t,{kb:function(){return f},l1:function(){return l},eV:function(){return h},GL:function(){return a},iA:function(){return u},O6:function(){return m},np:function(){return o},O0:function(){return d},Jq:function(){return s},hE:function(){return p}});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;var i=r(94097);let s=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),a=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),o=(e,t)=>e<<32-t|e>>>t,u=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],c=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function l(e){for(let t=0;t<e.length;t++)e[t]=c(e[t])}function d(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,i.aI)(e),e}function h(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];(0,i.aI)(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}class f{clone(){return this._cloneInto()}}function p(e){let t=t=>e().update(d(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function m(e=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}},31206:function(e,t,r){"use strict";r.d(t,{M:function(){return i},a:function(){return p},b:function(){return h},e:function(){return m},u:function(){return f}});var n,i,s=r(64915),a=r(66399),o=r(49684),u=r(1006);function c({src:e,...t}){return(0,s.jsx)("img",{src:e,...t,style:{display:"none"}})}(n=i||(i={})).LANDING="LANDING",n.CONNECT_OR_CREATE="CONNECT_OR_CREATE",n.AWAITING_CONNECTION="AWAITING_CONNECTION",n.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",n.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",n.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",n.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",n.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",n.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",n.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",n.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",n.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",n.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",n.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",n.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",n.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",n.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",n.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",n.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",n.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",n.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",n.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",n.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",n.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",n.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",n.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",n.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",n.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",n.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",n.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",n.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",n.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",n.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",n.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",n.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",n.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",n.INSTALL_PHANTOM_SCREEN="INSTALL_PHANTOM_SCREEN",n.PHANTOM_INTERSTITIAL_SCREEN="PHANTOM_INTERSTITIAL_SCREEN",n.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",n.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",n.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",n.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",n.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",n.MOONPAY_PROMPT_SCREEN="MOONPAY_PROMPT_SCREEN",n.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",n.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",n.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",n.CAPTCHA_SCREEN="CAPTCHA_SCREEN",n.ERROR_SCREEN="ERROR_SCREEN",n.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",n.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",n.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN";let l=(0,a.createContext)({ready:!1,app:o.a2,currentScreen:null,lastScreen:null,navigate:u.n,navigateBack:u.n,resetNavigation:u.n,setModalData:u.n,onUserCloseViaDialogOrKeybindRef:void 0}),d=[i.LANDING,i.CONNECT_ONLY_LANDING_SCREEN,null],h=e=>{let t=(0,o.u)(),r=e.authenticated,[n,i]=(0,a.useState)(e.initialScreen);(0,a.useEffect)(()=>{r||d.includes(e.initialScreen)||e.setInitialScreen(null)},[r]);let u=(0,a.useRef)(null);(0,a.useEffect)(()=>{e.open||(u.current=null)},[e.open]),(0,a.useEffect)(()=>{u.current=null},[e.initialScreen]);let h={ready:!!t.id,app:t,data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:n,navigate:(t,r=!0)=>{e.setInitialScreen(t),r&&i(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(n)},resetNavigation:()=>{e.setInitialScreen(null),i(null)},onUserCloseViaDialogOrKeybindRef:u};return(0,s.jsxs)(l.Provider,{value:h,children:[("string"==typeof t.appearance.logo||"img"===t.appearance.logo?.type)&&(0,s.jsx)(c,{src:"string"==typeof t.appearance.logo?t.appearance.logo:t.appearance.logo.props.src}),e.children]})},f=()=>(0,a.useContext)(l);function p(e){let t=e.filter(e=>!o.a3.has(e.id));return o.a1.concat(t)}function m(e){let t=new RegExp(RegExp("^eip155:(?<chainId>\\d+)$","gm")),r=t.exec(e)?.groups?.chainId;if(r)return parseInt(r);throw Error("Chain ID not compatible with CAIP-2 format.")}},1006:function(e,t,r){"use strict";r.d(t,{I:function(){return v},P:function(){return c},a:function(){return i},b:function(){return d},c:function(){return l},d:function(){return f},e:function(){return u},f:function(){return h},g:function(){return o},h:function(){return y},i:function(){return m},j:function(){return g},k:function(){return p},n:function(){return b},u:function(){return w}});var n,i,s=r(18437),a=r(66399);class o extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,r){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=r}}class u extends o{constructor(e,t,r,n,i,s){super(r,n,i),this.type=e,this.status=t,this.data=s}}class c extends o{constructor(e,t,r){super(e,t,r),this.type="client_error"}}class l extends c{constructor(){super("Request timed out",void 0,"client_request_timeout")}}class d extends o{constructor(e,t,r){super(e,t,r),this.type="connector_error"}}let h=e=>{if(e instanceof o)return e;if(!(e instanceof s.F))return f(e);if(!e.response)return new u("api_error",null,e.message,e);let{type:t,message:r,error:n,code:i}=e.data;return new u(t||"ApiError",e.response.status,r||n,e,i,e.data)},f=e=>e instanceof o?e:e instanceof Error?new c(e.message,e):new c(`Internal error: ${e}`);(n=i||(i={})).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",n.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",n.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",n.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",n.INVALID_DATA="invalid_data",n.INVALID_CAPTCHA="invalid_captcha",n.LINKED_TO_ANOTHER_USER="linked_to_another_user",n.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",n.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",n.ALLOWLIST_REJECTED="allowlist_rejected",n.OAUTH_USER_DENIED="oauth_user_denied",n.OAUTH_UNEXPECTED="oauth_unexpected",n.UNKNOWN_AUTH_ERROR="unknown_auth_error",n.USER_EXITED_AUTH_FLOW="exited_auth_flow",n.USER_EXITED_LINK_FLOW="exited_link_flow",n.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",n.MUST_BE_AUTHENTICATED="must_be_authenticated",n.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",n.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",n.CLIENT_REQUEST_TIMEOUT="client_request_timeout",n.INVALID_CREDENTIALS="invalid_credentials",n.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",n.UNKNOWN_MFA_ERROR="unknown_mfa_error",n.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",n.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",n.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",n.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",n.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",n.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",n.TRANSACTION_FAILURE="transaction_failure",n.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",n.NOT_SUPPORTED="not_supported",n.CAPTCHA_TIMEOUT="captcha_timeout",n.INVALID_MESSAGE="invalid_message",n.UNABLE_TO_SIGN="unable_to_sign",n.CAPTCHA_FAILURE="captcha_failure",n.CAPTCHA_DISABLED="captcha_disabled",n.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",n.TOO_MANY_REQUESTS="too_many_requests",n.USER_LIMIT_REACHED="max_accounts_reached",n.DISALLOWED_LOGIN_METHOD="disallowed_login_method",n.PASSKEY_NOT_ALLOWED="passkey_not_allowed",n.USER_DOES_NOT_EXIST="user_does_not_exist",n.INSUFFICIENT_BALANCE="insufficient_balance",n.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required";class p extends c{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}}class m extends c{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}}class g extends c{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}}class y extends c{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}}let b=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},v=(0,a.createContext)({isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],solanaWallets:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},noPromptOnSignature:{current:!1},nativeTokenSymbolForChainId:b,initializeWalletProxy:b,getAuthMeta:b,getAuthFlow:b,closePrivyModal:b,openPrivyModal:b,connectWallet:b,initLoginWithWallet:b,loginWithWallet:b,initLoginWithFarcaster:b,loginWithFarcaster:b,loginWithCode:b,initLoginWithEmail:b,initLoginWithSms:b,initUpdateEmail:b,initUpdatePhone:b,resendEmailCode:b,resendSmsCode:b,initLoginWithHeadlessOAuth:b,loginWithHeadlessOAuth:b,crossAppAuthFlow:b,initLoginWithOAuth:b,recoveryOAuthFlow:b,loginWithOAuth:b,passkeyAuthState:{status:"initial"},setPasskeyAuthState:b,initLoginWithPasskey:b,loginWithPasskey:b,initLinkWithPasskey:b,linkWithPasskey:b,refreshUser:b,loginWithGuestAccountFlow:b,walletProxy:null,createAnalyticsEvent:b,acceptTerms:b,getUsdTokenPrice:b,getUsdPriceForSol:b,recoverEmbeddedEthereumWallet:b,getMoonpaySignedUrl:b,initCoinbaseOnRamp:b,getCoinbaseOnRampStatus:b,updateWallets:b,fundWallet:b,setReadyToTrue:b,requestFarcasterSignerStatus:b,initLoginWithTelegram:b,loginWithTelegram:b,generateSiweMessage:b,linkWithSiwe:b,linkSmartWallet:b,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:b,recoverEmbeddedSolanaWallet:b,exportSolanaWallet:b,solanaSignMessage:b,connectCoinbaseSmartWallet:b,initiateAccountTransfer:b,emailOtpState:{status:"initial"},setEmailOtpState:b,smsOtpState:{status:"initial"},setSmsOtpState:b,siweState:{status:"initial"},setSiweState:b,oAuthState:{status:"initial"},setOAuthState:b}),w=()=>(0,a.useContext)(v)},22335:function(e,t,r){"use strict";r.d(t,{$:function(){return Y},A:function(){return eh},B:function(){return ee},C:function(){return eg},D:function(){return eN},E:function(){return P},F:function(){return $},G:function(){return j},H:function(){return eR},I:function(){return eI},J:function(){return eL},K:function(){return eA},L:function(){return em},M:function(){return ed},N:function(){return eO},O:function(){return eB},P:function(){return eD},Q:function(){return R},R:function(){return I},S:function(){return eq},T:function(){return ec},U:function(){return eo},V:function(){return et},W:function(){return eP},X:function(){return er},Y:function(){return ea},Z:function(){return Z},_:function(){return K},a:function(){return k},a0:function(){return J},a1:function(){return en},a2:function(){return ev},a3:function(){return ez},a4:function(){return eU},b:function(){return H},c:function(){return B},d:function(){return O},e:function(){return E},f:function(){return z},g:function(){return F},h:function(){return U},i:function(){return b},j:function(){return q},k:function(){return A},l:function(){return X},m:function(){return el},n:function(){return Q},o:function(){return ek},p:function(){return T},q:function(){return C},r:function(){return w},s:function(){return L},t:function(){return v},u:function(){return es},v:function(){return N},w:function(){return M},x:function(){return ex},y:function(){return V},z:function(){return D}});var n=r(75006),i=r(66399),s=r(64915),a=r(69024),o=r(49684),u=r(56836),c=r(34042),l=r(71642),d=r(1006),h=r(21277),f=r(67740),p=r(25419),m=r(26728);let g=new f.Yd(p.i);class y extends m.r{detectNetwork(){var e,t,r,n;let i=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return e=this,t=void 0,r=void 0,n=function*(){let e=this.network;return null==e&&((e=yield i.detectNetwork.call(this))||g.throwError("no network detected",f.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,h.zG)(this,"_network",e),this.emit("network",e,null))),e},new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((n=n.apply(e,t||[])).next())})}}let b=e=>c.O$.from(e);function v(e){if("number"==typeof e||"bigint"==typeof e||"string"==typeof e)return e;if("function"==typeof e.toHexString)return e.toHexString();throw Error(`Expected numeric value but received ${e}`)}function w(e){let t={};return void 0!==e.to&&(t.to=e.to),void 0!==e.data&&(t.data=e.data),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.type&&(t.type=e.type),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.nonce&&(t.nonce=b(e.nonce).toNumber()),void 0!==e.gasLimit&&(t.gasLimit=b(e.gasLimit)),void 0!==e.gasPrice&&(t.gasPrice=b(e.gasPrice)),void 0!==e.value&&(t.value=b(e.value)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=b(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=b(e.maxPriorityFeePerGas)),t}class _{get(e){let t=localStorage.getItem(e);return null===t?void 0:JSON.parse(t)}put(e,t){void 0!==t?localStorage.setItem(e,JSON.stringify(t)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map(([e])=>e)}}function E(){try{let e="privy:__session_storage__test",t=new _;return t.put(e,"blobby"),t.del(e),!0}catch(e){return!1}}var k="undefined"!=typeof window&&window.localStorage?new _:new class{get(e){return this._cache[e]}put(e,t){void 0!==t?this._cache[e]=t:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};let x=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isClover?"Clover":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally||e.isTaho?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0,S=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==x(e))return!1;if(e.providers){for(let t of e.providers)if(!S(t))return!1}return!0},A=()=>{if("phantom"in window){let e=window;if(e?.phantom?.ethereum?.isPhantom)return!0}return!1},C=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers){for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0}return!1},I=(e,t)=>{let r=[],n=[];for(let[i,s]of e.entries())i<t?r.push(s):n.push(s);return[r,n]},R=e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),P=(e,t)=>{let r=e.slice(0),n=[];for(;r.length;)n.push(r.splice(0,t));return n},N=(e,t=3,r=4,n="ethereum")=>{if(!e)return"";let i="ethereum"===n?2:0;return t+r+i+3>=e.length?e:`${e.slice(0,i+t)}...${e.slice(e.length-r,e.length)}`},M=e=>new Promise(t=>setTimeout(t,e));function T(e,{interval:t=100,timeout:r=5e3}={}){return new Promise((n,i)=>{let s,a=0,o=()=>{a>=r?i("Max attempts reached without result"):(s=e(),a+=t,null==s?setTimeout(o,t):n(s))};o()})}let O=(e,t={})=>{let r=t.delayMs||150,n=t.maxAttempts||270;return new Promise(async(i,s)=>{let a=!1,o=0;for(;!a&&o<n;){if(t.abortSignal?.aborted)return;e().then(e=>{a=!0,i(e)},(...e)=>{a=!0,s(...e)}),o+=1,await M(r)}a||s(Error("Exceeded max attempts before resolving function"))})},D=(e,t,r={},n={})=>{let i=new URL(t,e);for(let[e,t]of Object.entries(r))void 0!==t&&i.searchParams.set(e,t);let s=Object.entries(n);if(s.length>0){let e=new URLSearchParams;for(let[t,r]of s)e.append(t,r);i.hash=e.toString()}return i.href},L=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),B=e=>"string"==typeof e?e:"0x"+e.toString(16);async function q(e,t,r,n=3e3){let i=!1,s=window;return new Promise(a=>{function o(){if(i)return;i=!0,window.removeEventListener("ethereum#initialized",o);let n=e.getProviders();console.debug("Detected injected providers:",n.map(e=>e.info));let s=[];for(let e of n)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||s.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let r=[];if(t.providers?.length)for(let e of t.providers)e&&r.push(e);return r.push(e.ethereum),r}()){let t=x(e);if(!n.some(e=>e.info.name===t)){if(S(e,!0)&&!s.find(e=>"metamask"===e.type)){s.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!s.find(e=>"phantom"===e.type)){s.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!s.find(e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==r?.coinbaseWallet?.connectionOptions)){s.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}s.find(e=>"unknown_browser_extension"===e.type)||s.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}a(s)}s.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout(()=>{o()},n))})}function z(e){return`eip155:${String(Number(e))}`}let U=(e,t,r,n)=>{let i=Number(e),s=t.find(e=>e.id===i);if(!s)throw new d.b(`Unsupported chainId ${e}`,4901);return j(s,r,n)},j=(e,t,r)=>{let n,i=e.id,s=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])n=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[s])n=t.rpcUrls[s];else if(e.rpcUrls.privy?.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",r),n=t.toString()}else n=e.rpcUrls.public?.http[0]?e.rpcUrls.public.http[0]:e.rpcUrls.default?.http[0];if(!n)throw new d.b(`No RPC url found for ${i}`);return n},F=(e,t,r,n)=>{let i=Number(e),s=t.find(e=>e.id===i);if(!s)throw new d.b(`Unsupported chainId ${e}`,4901);return new y(s.rpcUrls.privyWalletOverride&&s.rpcUrls.privyWalletOverride.http[0]?s.rpcUrls.privyWalletOverride.http[0]:r.rpcUrls&&r.rpcUrls[i]?r.rpcUrls[i]:s.rpcUrls.privy?.http[0]?{url:s.rpcUrls.privy.http[0],headers:{"privy-app-id":n.appId}}:s.rpcUrls.public?.http[0]?s.rpcUrls.public.http[0]:s.rpcUrls.default?.http[0])},H=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},r=e.types.EIP712Domain??Object.entries(e.domain).map(([e,r])=>{if(null!=r&&"string"==typeof e&&e in t)return{name:e,type:t[e]}}).filter(e=>void 0!==e);return{...e,types:{...e.types,EIP712Domain:r}}};function $(e,{min:t,max:r}){return Math.min(Math.max(e,t),r)}function W(e){return e?new Date(1e3*e):null}function G(e,t){return e.slice().sort((e,t)=>(t.firstVerifiedAt??t.verifiedAt).getTime()-(e.firstVerifiedAt??e.verifiedAt).getTime()).find(e=>e.type===t)}let V=e=>e?.linkedAccounts.find(e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType&&0===e.walletIndex)||null,K=e=>e?.linkedAccounts.filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType),Z=e=>e?.linkedAccounts.find(e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType)||null,Y=e=>e?.linkedAccounts.find(e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType)||null,J=(e,t)=>{let r=(e?.linkedAccounts.filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&"ethereum"===e.chainType)).find(e=>(0,n.Kn)(e.address)===(0,n.Kn)(t));return{signingWallet:r,rootWallet:r?r.imported?r:V(e):void 0}},Q=(e,t)=>!(V(e)||Z(e)||"all-users"!==t&&("users-without-wallets"!==t||e.linkedAccounts.filter(e=>"wallet"===e.type)?.length));function X(e){if(!e)return null;let t=function(e){let t=[];for(let r of e){let e=r.type;switch(r.type){case"wallet":let n={address:r.address,type:r.type,imported:r.imported,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at),chainType:r.chain_type,chainId:r.chain_id,walletClient:"privy"===r.wallet_client_type?"privy":"unknown",walletClientType:r.wallet_client_type,connectorType:r.connector_type,recoveryMethod:r.recovery_method,walletIndex:r.wallet_index};t.push(n);break;case"smart_wallet":let i={address:r.address,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at),smartWalletType:r.smart_wallet_type};t.push(i);break;case"cross_app":let s={type:r.type,subject:r.subject,embeddedWallets:r.embedded_wallets,smartWallets:r.smart_wallets,providerApp:{id:r.provider_app_id},verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(s);break;case"email":let a={address:r.address,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(a);break;case"phone":let o={number:r.phoneNumber,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(o);break;case"google_oauth":let u={subject:r.subject,email:r.email,name:r.name,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(u);break;case"spotify_oauth":let c={subject:r.subject,email:r.email,name:r.name,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(c);break;case"instagram_oauth":let l={subject:r.subject,username:r.username,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(l);break;case"twitter_oauth":let d={subject:r.subject,username:r.username,name:r.name,type:r.type,profilePictureUrl:r.profile_picture_url,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(d);break;case"discord_oauth":let h={subject:r.subject,username:r.username,email:r.email,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(h);break;case"github_oauth":let f={subject:r.subject,username:r.username,name:r.name,email:r.email,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(f);break;case"tiktok_oauth":let p={subject:r.subject,username:r.username,name:r.name,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(p);break;case"linkedin_oauth":let m={subject:r.subject,name:r.name,email:r.email,vanityName:r.vanity_name,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(m);break;case"apple_oauth":let g={subject:r.subject,email:r.email,type:r.type,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(g);break;case"custom_auth":t.push({type:r.type,customUserId:r.custom_user_id,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)});break;case"farcaster":let y={type:r.type,fid:r.fid,ownerAddress:r.owner_address,displayName:r.display_name,username:r.username,bio:r.bio,pfp:r.profile_picture_url,url:r.homepage_url,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at),signerPublicKey:r.signer_public_key};t.push(y);break;case"passkey":let b={type:r.type,enrolledInMfa:r.enrolled_in_mfa,credentialId:r.credential_id,authenticatorName:r.authenticator_name,createdWithDevice:r.created_with_device,createdWithOs:r.created_with_os,createdWithBrowser:r.created_with_browser,verifiedAt:W(r.verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(b);break;case"telegram":let v={type:r.type,telegramUserId:r.telegram_user_id,firstName:r.first_name,lastName:r.last_name,username:r.username,photoUrl:r.photo_url,verifiedAt:W(r.first_verified_at),firstVerifiedAt:W(r.first_verified_at),latestVerifiedAt:W(r.latest_verified_at)};t.push(v);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),r=G(t,"wallet"),n=G(t,"smart_wallet"),i=G(t,"email"),s=G(t,"phone"),a=G(t,"google_oauth"),o=G(t,"twitter_oauth"),u=G(t,"discord_oauth"),c=G(t,"github_oauth"),l=G(t,"spotify_oauth"),d=G(t,"instagram_oauth"),h=G(t,"tiktok_oauth"),f=G(t,"linkedin_oauth"),p=G(t,"apple_oauth"),m=G(t,"farcaster"),g=G(t,"telegram"),y=e.mfa_methods.map(({type:e,verified_at:t})=>({type:e,verifiedAt:W(t)}));return{id:e.id,createdAt:W(e.created_at),linkedAccounts:t,email:i&&{address:i?.address},phone:s&&{number:s?.number},wallet:r&&{address:r.address,chainType:r.chainType,chainId:r.chainId,walletClient:r.walletClient,walletClientType:r.walletClientType,connectorType:r.connectorType,recoveryMethod:r.recoveryMethod,imported:r.imported,walletIndex:r.walletIndex},smartWallet:n&&{address:n.address,smartWalletType:n.smartWalletType},google:a&&{subject:a.subject,email:a.email,name:a.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name,profilePictureUrl:o.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:c&&{subject:c.subject,username:c.username,name:c.name,email:c.email},spotify:l&&{subject:l.subject,email:l.email,name:l.name},instagram:d&&{subject:d.subject,username:d.username},tiktok:h&&{subject:h.subject,username:h.username,name:h.name},linkedin:f&&{subject:f.subject,name:f.name,email:f.email,vanityName:f.vanityName},apple:p&&{subject:p.subject,email:p.email},farcaster:m&&{fid:m.fid,ownerAddress:m.ownerAddress,displayName:m.displayName,username:m.username,bio:m.bio,pfp:m.pfp,url:m.url,signerPublicKey:m.signerPublicKey},telegram:g&&{telegramUserId:g.telegramUserId,firstName:g.firstName,lastName:g.lastName,username:g.username,photoUrl:g.photoUrl},mfaMethods:y.map(e=>e.type),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}let ee=({...e})=>(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z",fill:e.color||"var(--privy-color-foreground-3)"})}),et=e=>{let[t,r]=(0,i.useState)("auto");return(0,i.useEffect)(()=>{let t=new ResizeObserver(e=>{r(e[0]?.contentRect.height??"auto")});return e.current&&t.observe(e.current),()=>{e.current&&t.unobserve(e.current)}},[e.current]),t},er={login:{onComplete:[],onError:[],onOAuthLoginComplete:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},sendSolanaTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},en=(0,i.createContext)(void 0),ei=()=>(0,i.useContext)(en);function es(e,t){if(!t)return;let r=ei().current[e];return(0,i.useEffect)(()=>{for(let[n,i]of Object.entries(t))r.hasOwnProperty(n)||console.warn(`Invalid event type "${n}" for action "${e}"`),r[n]?.push(i);return()=>{for(let[n,i]of Object.entries(t))r.hasOwnProperty(n)||console.warn(`Invalid event type "${n}" for action "${e}"`),r[n]=r[n]?.filter(e=>e!==i)}},[t])}function ea(e,t,r,...n){for(let i of e.current[t][r])i(...n)}function eo(){let e=ei();return(t,r,...n)=>ea(e,t,r,...n)}let eu=a.zo.div`
  margin-top: 16px;
  font-size: 13px;
  text-align: center;
  color: var(--privy-color-foreground-3);

  && > a {
    color: var(--privy-color-accent);
  }
`;function ec(e){let{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:r,requireUsersAcceptTerms:n}}=e.app;if(n&&!e.alwaysShowImplicitConsent||!r&&!t)return(0,s.jsx)(eu,{});let i=!(!t||!r);return(0,s.jsxs)(eu,{children:["By logging in I agree to the"," ",r&&(0,s.jsx)("a",{href:r,target:"_blank",children:i?"Terms":"Terms of Service"}),i&&" & ",t&&(0,s.jsx)("a",{href:t,target:"_blank",children:"Privacy Policy"})]})}let el=()=>(0,s.jsxs)(ed,{children:[(0,s.jsx)(ee,{}),(0,s.jsx)("a",{href:"https://www.privy.io/",target:"_blank",children:"Protected by Privy"})]}),ed=a.zo.div`
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 12px;
  gap: 2px;

  font-size: 13px;

  && svg {
    height: 14px;
    width: 14px;
    margin-bottom: 2px;
    opacity: 0.5;
  }

  && a {
    color: var(--privy-color-foreground-3);
    &:hover {
      text-decoration: underline;
    }
  }

  @media all and (display-mode: standalone) {
    padding-bottom: 30px;
  }
`,eh=({address:e,showCopyIcon:t,url:r,className:n})=>r?(0,s.jsx)("a",{title:e,className:n,href:`${r}/address/${e}`,target:"_blank",children:N(e)}):(0,s.jsxs)("button",{title:e,className:n,onClick:()=>navigator.clipboard.writeText(e).catch(console.error),children:[N(e),t&&(0,s.jsx)(ef,{})]}),ef=(0,a.zo)(u.Z)`
  && {
    display: inline;
  }
  stroke-width: 2;
  height: 0.875rem;
  width: 0.875rem;
  margin-left: 0.125rem;
  color: var(--privy-color-foreground-3);
`,ep=(0,a.F4)`
  from, to {
    background: var(--privy-color-foreground-4);
    color: var(--privy-color-foreground-4);
  }

  50% {
    background: var(--privy-color-foreground-accent);
    color: var(--privy-color-foreground-accent);
  }
`,em=(0,a.iv)`
  ${e=>e.$isLoading?(0,a.iv)`
          width: 35%;
          animation: ${ep} 2s linear infinite;
          border-radius: var(--privy-border-radius-sm);
        `:""}
`,eg=({children:e,color:t,isLoading:r,isPulsing:n,className:i})=>(0,s.jsx)(ey,{$color:t,$isLoading:r,$isPulsing:n,className:i,children:e}),ey=a.zo.span`
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.125rem; /* 150% */
  border-radius: var(--privy-border-radius-sm);

  ${e=>{let t,r;"green"===e.$color&&(t="var(--privy-color-success-dark)",r="var(--privy-color-success-light)"),"red"===e.$color&&(t="var(--privy-color-error)",r="var(--privy-color-error-light)"),"gray"===e.$color&&(t="var(--privy-color-foreground-2)",r="var(--privy-color-background-2)");let n=(0,a.F4)`
      from, to {
        background-color: ${r};
      }

      50% {
        background-color: rgba(${r}, 0.8);
      }
    `;return(0,a.iv)`
      color: ${t};
      background-color: ${r};
      ${e.$isPulsing&&(0,a.iv)`
        animation: ${n} 3s linear infinite;
      `};
    `}}

  ${em}
`,eb=(0,i.createContext)({}),ev=({children:e})=>{let t=(0,o.u)(),[r,n]=(0,i.useState)({});return es("login",{onComplete:(e,r,i,s,a)=>{a&&"passkey"!==a.type&&"cross_app"!==a.type&&("wallet"!==a.type||"privy"!==a.walletClientType)&&(k.put(ew(t.id),a.type),"wallet"===a.type?(k.put(e_(t.id),a.walletClientType),k.put(eE(t.id),a.chainType),n({accountType:a.type,walletClientType:a.walletClientType,chainType:a.chainType})):(k.del(e_(t.id)),k.del(eE(t.id)),n({accountType:a.type})))}}),(0,i.useEffect)(()=>{if(!t.id)return;let e=k.get(ew(t.id)),r=k.get(e_(t.id)),i=k.get(eE(t.id));e&&n("wallet"===e?{accountType:e,walletClientType:r,chainType:i}:{accountType:e})},[t.id]),(0,s.jsx)(eb.Provider,{value:r,children:e})},ew=e=>`privy:${e}:recent-login-method`,e_=e=>`privy:${e}:recent-login-wallet-client`,eE=e=>`privy:${e}:recent-login-chain-type`,ek=()=>(0,i.useContext)(eb);function ex(e){let{logout:t}=(0,i.useContext)(o.P);return es("logout",e),{logout:t}}let eS=a.zo.div`
  display: flex;
  flex-direction: column;
`,eA=a.zo.span`
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.125rem; /* 150% */

  color: var(--privy-color-error);
`,eC=a.zo.span`
  color: var(--privy-color-foreground-3);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.125rem; /* 150% */
`,eI=(0,a.iv)`
  && {
    border-width: 1px;
    padding: 0.5rem 1rem;
  }

  width: 100%;
  text-align: left;
  border: solid 1px var(--privy-color-foreground-4);
  border-radius: var(--privy-border-radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;

  ${e=>"error"===e.$state?"border-color: var(--privy-color-error);":""}
`,eR=a.zo.div`
  ${eI}
`,eP=({errMsg:e,balance:t,address:r,isLoading:n,className:i,title:a,isPulsing:o,showIcon:u,statusColor:c="green"})=>{let l;return l=c||(e?"red":"green"),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(eR,{className:i,$state:e?"error":void 0,children:[(0,s.jsxs)(eS,{children:[(0,s.jsx)(eC,{children:a||"Pay with"}),(0,s.jsx)(eh,{address:r,showCopyIcon:u||!!e})]}),void 0!==t&&(0,s.jsx)(eg,{isLoading:n,isPulsing:o,color:l,children:t})]}),e&&(0,s.jsx)(eA,{style:{marginTop:"0.25rem"},children:e})]})},eN=({color:e,...t})=>(0,s.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...t,children:(0,s.jsx)("g",{children:(0,s.jsx)("path",{fill:e||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})}),eM=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),eT=e=>eM.format(e),eO=(e,t)=>{let r=eT(t*parseFloat(e));return"$0.00"!==r?r:"<$0.01"},eD=(e,t)=>{let r=eT(t*parseFloat((0,l.dF)(e)));return"$0.00"===r?"<$0.01":r},eL=(e,t,r=6,n=!1)=>{let i=parseFloat((0,l.dF)(e)).toFixed(r).replace(/0+$/,"").replace(/\.$/,"");return n?`${i} ${t}`:`${"0"===i?"<0.001":i} ${t}`},eB=e=>e.map(b).reduce((e,t)=>e.add(t),c.O$.from(0)).toHexString(),eq=(e,t)=>{let{chains:r}=(0,d.u)(),n=`https://etherscan.io/address/${t}`,i=`${((e,t)=>{let r=Number(e),n=t.find(e=>e.id===r);if(!n)throw new d.b(`Unsupported chainId ${e}`,4901);return n.blockExplorers?.default.url})(e,r)}/address/${t}`;if(!i)return n;try{new URL(i)}catch{return n}return i};function ez(e){let{login:t}=(0,i.useContext)(o.P);return es("login",e),{login:t}}function eU(e){let{connectWallet:t}=(0,i.useContext)(o.P);return es("connectWallet",e),{connectWallet:t}}},31906:function(e,t,r){"use strict";r.d(t,{C:function(){return y},E:function(){return l},P:function(){return g},U:function(){return f},W:function(){return h},a:function(){return b},b:function(){return m},c:function(){return w},f:function(){return p},i:function(){return v},l:function(){return d}});var n,i,s=r(1006),a=r(67740),o=r(66010);(i=n||(n={})).MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",i.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",i.INVALID_DATA="invalid_data",i.LINKED_TO_ANOTHER_USER="linked_to_another_user",i.ALLOWLIST_REJECTED="allowlist_rejected",i.OAUTH_USER_DENIED="oauth_user_denied",i.UNKNOWN_AUTH_ERROR="unknown_auth_error",i.USER_EXITED_AUTH_FLOW="exited_auth_flow",i.MUST_BE_AUTHENTICATED="must_be_authenticated",i.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",i.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",i.CLIENT_REQUEST_TIMEOUT="client_request_timeout",i.INVALID_CREDENTIALS="invalid_credentials";class u extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,r){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=r}}class c extends u{constructor(e,t,r){super(e),this.type="provider_error",this.code=t,this.data=r}}let l={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1},E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}};class d extends c{constructor(e){super(e.message,e.code,e.data);let t=Object.values(l).find(t=>t.eipCode===e.code);this.details=t||l.UNKNOWN_ERROR,-32002===e.code&&(e.message?.includes("already pending for origin")?e.message?.includes("wallet_requestPermissions")?this.details=l.E32002_CONNECTION_ALREADY_PENDING:this.details=l.E32002_REQUEST_ALREADY_PENDING:e.message?.includes("Already processing")&&e.message.includes("eth_requestAccounts")&&(this.details=l.E32002_WALLET_LOCKED))}}class h extends s.b{constructor(){super("Wallet timeout"),this.type="wallet_error"}}class f extends s.b{constructor(){super("User rejected connection"),this.type="wallet_error"}}let p=e=>{if(e instanceof s.b)return e;if(e?.code&&e?.reason){let t=new g(e);return e.code===a.jK.ACTION_REJECTED&&(t.details=l.E4001_USER_REJECTED_REQUEST),t}return e?.code?new g(e):new s.b("Unknown connector error",e)};class m extends s.g{constructor(e,t,r){super(e),this.type="provider_error",this.code=t,this.data=r}}class g extends m{constructor(e){super(e.message,e.code,e.data);let t=Object.values(l).find(t=>t.eipCode===e.code);this.details=t||l.UNKNOWN_ERROR,-32002===e.code&&(e.message?.includes("already pending for origin")?e.message?.includes("wallet_requestPermissions")?this.details=l.E32002_CONNECTION_ALREADY_PENDING:this.details=l.E32002_REQUEST_ALREADY_PENDING:e.message?.includes("Already processing")&&e.message.includes("eth_requestAccounts")&&(this.details=l.E32002_WALLET_LOCKED))}}let y={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_REJECTED_CONNECTION:{message:"You rejected the request",detail:"Please try connecting again.",retryable:!0},ERROR_USER_LIMIT_REACHED:{message:"Unable to link",detail:"You've reached the maximum number of linked wallets.",retryable:!1},...l};class b extends o.Z{constructor(e){super(),this.walletClientType=e,this.connected=!1,this.initialized=!1}}function v(e){return"solana"===e.chainType}function w(e){return"solana"===e.type}},49684:function(e,t,r){"use strict";r.d(t,{$:function(){return eg},A:function(){return er},B:function(){return es},C:function(){return S},D:function(){return N},E:function(){return ew},F:function(){return w},G:function(){return d},H:function(){return A},I:function(){return y},J:function(){return D},K:function(){return q},L:function(){return B},M:function(){return L},N:function(){return ei},O:function(){return C},P:function(){return ey},Q:function(){return et},R:function(){return m},S:function(){return x},T:function(){return f},U:function(){return en},V:function(){return h},W:function(){return O},X:function(){return Y},Y:function(){return K},Z:function(){return G},_:function(){return ep},a:function(){return I},a0:function(){return ev},a1:function(){return ea},a2:function(){return eh},a3:function(){return eo},b:function(){return T},c:function(){return R},d:function(){return P},e:function(){return k},f:function(){return v},g:function(){return E},h:function(){return z},i:function(){return p},j:function(){return g},k:function(){return b},l:function(){return o},m:function(){return u},n:function(){return _},o:function(){return eb},p:function(){return c},q:function(){return l},r:function(){return M},s:function(){return W},t:function(){return V},u:function(){return em},v:function(){return Z},w:function(){return J},x:function(){return Q},y:function(){return X},z:function(){return ee}});var n=r(64915),i=r(66399),s=r(18362),a=r(1006);let o="https://auth.privy.io",u=2e4,c=1400,l=2500,d=4e3,h="1.87.0",f="privy:token",p="privy-token",m="privy:refresh_token",g="privy-refresh-token",y="privy:id_token",b="privy-id-token",v="privy-session",w="privy:session_transfer_token",_="privy:caid",E=e=>`privy:guest:${e}`,k=e=>`privy:cross-app:${e}`,x="privy:state_code",S="privy:code_verifier",A="privy:headless_oauth",C="privy:oauth_disable_signup",I=e=>`privy:wallet:${e}`,R="privy:connectors",P="privy:connections",N=12e4,M=1,T="0x1",O=3e4,D="https://api.moonpay.com/v1",L="https://api.moonpay.com/v1",B="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",q="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",z="deprecated",U={appearance:{landingHeader:"Log in or sign up",theme:"light",accentColor:"#676FFF",walletList:["detected_wallets","metamask","coinbase_wallet","rainbow","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",rpcConfig:{rpcUrls:{},rpcTimeouts:{}},externalWallets:{coinbaseWallet:{connectionOptions:"all"}},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}},j=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","wallet_connect","detected_wallets","rabby_wallet","safe"]),F=e=>j.has(e),H=(e,t,r)=>r.indexOf(e)===t,$=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(F).filter(H):e?e.filter(F).filter(H):U.appearance.walletList,W={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}},G={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0},V={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}}},K={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},testnet:!0},Z={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-mainnet.rpc.privy.systems"]},blast:{http:["https://base-mainnet.blastapi.io"],webSocket:["wss://base-mainnet.blastapi.io"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://basescan.org"},default:{name:"Basescan",url:"https://basescan.org"}}},Y={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0},J={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1},Q={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1},X={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://mainnet.rpc.privy.systems"]},alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}}},ee={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-mainnet.rpc.privy.systems"]},alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}}},et={id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]},infura:{http:["https://optimism-sepolia.infura.io/v3"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},testnet:!0},er={id:137,name:"Polygon Mainnet",network:"polygon",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-mainnet.rpc.privy.systems"]},alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}}},en={id:80002,name:"Polygon Amoy",network:"polygon-amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-amoy.rpc.privy.systems"]},infura:{http:["https://polygon-amoy.infura.io/v3"],webSocket:["wss://polygon-amoy.infura.io/ws/v3"]},default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"OK LINK",url:"https://www.oklink.com/amoy"}},testnet:!0},ei={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{privy:{http:["https://sepolia.rpc.privy.systems"]},alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},testnet:!0},es={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}}},ea=[W,G,ei,X,ee,et,er,en,J,{id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0},{id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}},{id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}},Z,Y,{id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0},{id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}},Q,{id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0},V,K,es,{id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0},{id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0},{id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}},{id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}},{id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}}],eo=new Set(ea.map(e=>e.id)),eu="#FFFFFF";function ec(e,t){let r=Math.max(0,Math.min(1,e.toHsl().l+t));return(0,s.Z)({...e.toHsl(),l:r})}function el(e,t,r){let n,i,a,o,u,c,l,d,h,f,p,m,g,y,b,v,w=r?console.warn:()=>{};t?.loginMethods?(n=t.loginMethods.includes("email"),i=t.loginMethods.includes("sms"),o=t.loginMethods.includes("wallet"),u=t.loginMethods.includes("google"),c=t.loginMethods.includes("twitter"),l=t.loginMethods.includes("discord"),h=t.loginMethods.includes("spotify"),f=t.loginMethods.includes("instagram"),d=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("github"),p=t.loginMethods.includes("linkedin"),g=t.loginMethods.includes("apple"),y=t.loginMethods.includes("farcaster"),b=t.loginMethods.includes("telegram")):(n=e.emailAuth,i=e.smsAuth,o=e.walletAuth,u=e.googleOAuth,c=e.twitterOAuth,l=e.discordOAuth,m=e.githubOAuth,h=e.spotifyOAuth,f=e.instagramOAuth,d=e.tiktokOAuth,p=e.linkedinOAuth,g=e.appleOAuth,y=e.farcasterAuth,b=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?a=!1:e.passkeyAuth&&(a=!0);let _=[n,i].filter(Boolean),E=[u,c,l,m,h,f,d,p,g,y,b].filter(Boolean),k=[o].filter(Boolean);if(_.length+E.length+k.length===0)throw Error("You must enable at least one login method");let x=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;x&&0===k.length?(w("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),x=!1):x||E.length+_.length!==0||(w("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),x=!0);let S=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&w("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let A=$({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),C=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],r=[];for(let r of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(r)?console.warn(`Duplicated login method: ${r}`):t.push(r);for(let n of e.overflow??[])t.includes(n)||r.includes(n)?console.warn(`Duplicated login method: ${n}`):r.push(n);return{primary:t,overflow:r}})({input:t?.loginMethodsAndOrder}),I=t?.intl?.defaultCountry??"US",{chains:R,defaultChain:P}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:r,hasRpcConfigDefined:n}){let i;if(e&&t&&console.warn("You should only specify one of `additionalChains` or `supportedChains`. Using `supportedChains`."),t){if(0===t.length)throw Error("`supportedChains` must contain at least one chain");t.filter(e=>e.rpcUrls.privyWalletOverride).length>0&&n&&console.warn("You have specified at least one `supportedChain` with `privyWalletOverride` but also have `rpcConfig` defined. The `rpcConfig` will be ignored. `rpcConfig` is deprecated and you should use `privyWalletOverride` in a `supportedChain`."),i=t.map(e=>e.rpcUrls.privyWalletOverride?e:ea.find(t=>t.id===e.id)??e)}else i=ea.concat(e??[]);let s=t?i[0]:X,a=r??s;if(!i.find(e=>e.id===a.id))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:i,defaultChain:a}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),N=!!t?.defaultChain,M=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,T=!(e.enforceWalletUis??1);if(v=e.legacyWalletUiConfig??1?M?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??T:T,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==v)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:O,...D}=t?.embeddedWallets??{};return{id:e.id,name:e.name,allowlistConfig:e.allowlistConfig,legacyWalletUiConfig:e.legacyWalletUiConfig,appearance:{logo:t?.appearance?.logo??e.logoUrl,landingHeader:t?.appearance?.landingHeader??U.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:function({backgroundTheme:e,accentHex:t}){var r;let n;switch(e){case"light":n=eu;break;case"dark":n="#1E1E1D";break;default:n=e}let i=(0,s.Z)(n),a=(0,s.Z)(t),o=(0,s.Z)("#51BA81"),u=(0,s.Z)("#FFB74D"),c=(0,s.Z)("#EC6351"),l=((r=i.getLuminance())<.8&&r>.2&&console.warn("Background color is not light or dark enough, which could lead to accessibility issues."),r>.5?"light":"dark"),d=ec(i,"light"===l?-.04:.11),h=ec(i,"light"===l?-.88:.87),f=ec(i,"light"===l?-.7:.75),p=ec(i,"light"===l?-.43:.45).desaturate("light"===l?60:20),m=ec(i,"light"===l?-.08:.25).desaturate("light"===l?60:20),g=ec(a,.15),y=ec(a,-.06),b=ec(c,.3),v=ec(u,.3),w=(0,s.Z)(a.getLuminance()>.5?"#040217":eu),_=ec(o,-.16),E=ec(o,.4);return{colorScheme:l,background:i.toHslString(),background2:d.toHslString(),foreground:h.toHslString(),foreground2:f.toHslString(),foreground3:p.toHslString(),foreground4:m.toHslString(),accent:a.toHslString(),accentLight:g.toHslString(),accentDark:y.toHslString(),foregroundAccent:w.toHslString(),success:o.toHslString(),successDark:_.toHslString(),successLight:E.toHslString(),error:c.toHslString(),errorLight:b.toHslString(),warn:u.toHslString(),warnLight:v.toHslString()}}({backgroundTheme:t?.appearance?.theme??U.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??U.appearance.accentColor}),loginGroupPriority:x?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:A,walletChainType:t?.appearance?.walletChainType??"ethereum-only"},loginMethods:{wallet:o,email:n,sms:i,passkey:a,google:u,twitter:c,discord:l,github:m,spotify:h,instagram:f,tiktok:d,linkedin:p,apple:g,farcaster:y,telegram:b},loginMethodsAndOrder:C,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??U.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??U.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??U.rpcConfig.rpcTimeouts},chains:R,defaultChain:P,intl:{defaultCountry:I},shouldEnforceDefaultChainOnConnect:N,captchaEnabled:e.captchaEnabled??U.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??U.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:S},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof O?{requireUserOwnedRecoveryOnCreate:O}:{},...M?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...D,noPromptOnSignature:v},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:M?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??U._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??U.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??U.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??U.fundingMethodConfig.moonpay.useSandbox}}}}let ed={showWalletLoginFirst:!0,allowlistConfig:{errorTitle:null,errorDetail:null,errorCtaText:null,errorCtaLink:null},walletAuth:!0,emailAuth:!0,smsAuth:!1,googleOAuth:!1,twitterOAuth:!1,discordOAuth:!1,githubOAuth:!1,linkedinOAuth:!1,appleOAuth:!1,termsAndConditionsUrl:null,privacyPolicyUrl:null,embeddedWalletConfig:{createOnLogin:"off",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]},fiatOnRampEnabled:!1,captchaEnabled:!1,captchaSiteKey:""},eh=el(ed,void 0,!1),ef=(0,i.createContext)({appConfig:eh,isServerConfigLoaded:!1}),ep=({children:e,legacyCreateEmbeddedWalletFlag:t,client:r,clientConfig:s})=>{let[a,o]=(0,i.useState)(null),u=(0,i.useMemo)(()=>el(a??ed,s,!!a),[a,s]);return(0,i.useEffect)(()=>{if(!a)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:r,additionalChains:n,supportedChains:i,defaultChain:s,externalWallets:a,...o}=e;return{...o,...n?{additionalChains:n.map(e=>e.id)}:void 0,...i?{supportedChains:i.map(e=>e.id)}:void 0,...s?{defaultChain:s.id}:void 0,...a?{walletConnect:a.walletConnect,coinbaseWallet:a.coinbaseWallet,solana:{connectors:a.solana?.connectors?.get().map(e=>e.walletClientType)}}:void 0,legacyCreateEmbeddedWalletFlag:t}}(s,t),n=(function(e,t=0){let r=3735928559^t,n=1103547991^t;for(let t,i=0;i<e.length;i++)r=Math.imul(r^(t=e.charCodeAt(i)),2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909)))+(r>>>0)})(JSON.stringify(e)).toString(),i=`privy:sent:${a.id}:${n}`;localStorage.getItem(i)||(r.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(i,"t"))},[s,t,a]),(0,i.useEffect)(()=>{a||(async()=>{try{let e=await r.getServerConfig();e.customApiUrl&&r.updateApiUrl(e.customApiUrl),o(e)}catch(e){console.warn("Error generating app config: ",e)}})()},[]),(0,n.jsx)(ef.Provider,{value:{appConfig:u,isServerConfigLoaded:!!a},children:e})},em=()=>{let{appConfig:e}=(0,i.useContext)(ef);return e},eg=()=>{let{isServerConfigLoaded:e}=(0,i.useContext)(ef);return e},ey=(0,i.createContext)({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:a.n,login:a.n,connectOrCreateWallet:a.n,linkEmail:a.n,linkPhone:a.n,linkFarcaster:a.n,linkWallet:a.n,startCrossAppAuthFlow:a.n,linkGoogle:a.n,linkTwitter:a.n,linkDiscord:a.n,linkGithub:a.n,linkSpotify:a.n,linkInstagram:a.n,linkTelegram:a.n,linkTiktok:a.n,linkLinkedIn:a.n,linkApple:a.n,linkPasskey:a.n,updateEmail:a.n,updatePhone:a.n,logout:a.n,getAccessToken:a.n,getEthereumProvider:a.n,getEthersProvider:a.n,getWeb3jsProvider:a.n,unlinkEmail:a.n,unlinkPhone:a.n,unlinkWallet:a.n,unlinkGoogle:a.n,unlinkTwitter:a.n,unlinkDiscord:a.n,unlinkGithub:a.n,unlinkSpotify:a.n,unlinkInstagram:a.n,unlinkTiktok:a.n,unlinkLinkedIn:a.n,unlinkApple:a.n,unlinkCrossAppAccount:a.n,unlinkFarcaster:a.n,unlinkTelegram:a.n,unlinkPasskey:a.n,setActiveWallet:a.n,forkSession:a.n,createWallet:a.n,importWallet:a.n,signMessage:a.n,signTypedData:a.n,enrollInMfa:a.n,initEnrollmentWithSms:a.n,initEnrollmentWithTotp:a.n,initEnrollmentWithPasskey:a.n,promptMfa:a.n,init:a.n,submitEnrollmentWithSms:a.n,submitEnrollmentWithTotp:a.n,submitEnrollmentWithPasskey:a.n,unenroll:a.n,submit:a.n,cancel:a.n,sendTransaction:a.n,sendSolanaTransaction:a.n,exportWallet:a.n,setWalletPassword:a.n,setWalletRecovery:a.n,requestFarcasterSignerFromWarpcast:a.n,getFarcasterSignerPublicKey:a.n,signFarcasterMessage:a.n,createGuestAccount:a.n,initLoginWithEmail:a.n,initLoginWithSms:a.n,otpState:{status:"initial"},loginWithCode:a.n,fundWallet:a.n,initLoginWithHeadlessOAuth:a.n,loginWithHeadlessOAuth:a.n,generateSiweMessage:a.n,linkWithSiwe:a.n,signMessageWithCrossAppWallet:a.n,signTypedDataWithCrossAppWallet:a.n,sendTransactionWithCrossAppWallet:a.n,isHeadlessOAuthLoading:!1,isModalOpen:!1,mfaMethods:[]}),eb=()=>(0,i.useContext)(ey),ev=(0,i.createContext)(null);function ew(){let e=(0,i.useContext)(ev);if(null===e)throw Error("`useWallets` was called outside the PrivyProvider component");return e}},92358:function(e,t,r){"use strict";function n(e){return"version"in e}r.d(t,{W:function(){return n}})},22999:function(e,t,r){"use strict";r.d(t,{j:function(){return s}});var n=r(37643),i=r(72224),s=new class extends n.l{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!i.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}}},76296:function(e,t,r){"use strict";r.d(t,{Gm:function(){return i},Qy:function(){return o},ZF:function(){return u}});var n=r(72224);function i(e){return{onFetch:(t,r)=>{let i=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},d=0,h=async()=>{let r=!1,h=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},f=(0,n.cG)(t.options,t.fetchOptions),p=async(e,i,s)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let a={queryKey:t.queryKey,pageParam:i,direction:s?"backward":"forward",meta:t.options.meta};h(a);let o=await f(a),{maxPages:u}=t.options,c=s?n.Ht:n.VX;return{pages:c(e.pages,o,u),pageParams:c(e.pageParams,i,u)}};if(o&&u.length){let e="backward"===o,t={pages:u,pageParams:c},r=(e?a:s)(i,t);l=await p(t,r,e)}else{let t=e??u.length;do{let e=0===d?c[0]??i.initialPageParam:s(i,l);if(d>0&&null==e)break;l=await p(l,e),d++}while(d<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h}}}function s(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function a(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function o(e,t){return!!t&&null!=s(e,t)}function u(e,t){return!!t&&!!e.getPreviousPageParam&&null!=a(e,t)}},80633:function(e,t,r){"use strict";r.d(t,{R:function(){return o},m:function(){return a}});var n=r(28501),i=r(60764),s=r(56524),a=class extends i.F{#n;#i;#s;constructor(e){super(),this.mutationId=e.mutationId,this.#i=e.mutationCache,this.#n=[],this.state=e.state||o(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){this.#s=(0,s.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let t="pending"===this.state.status,r=!this.#s.canStart();try{if(!t){this.#a({type:"pending",variables:e,isPaused:r}),await this.#i.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#s.start();return await this.#i.config.onSuccess?.(n,e,this.state.context,this),await this.options.onSuccess?.(n,e,this.state.context),await this.#i.config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,e,this.state.context),this.#a({type:"success",data:n}),n}catch(t){try{throw await this.#i.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#a({type:"error",error:t})}}finally{this.#i.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),n.V.batch(()=>{this.#n.forEach(t=>{t.onMutationUpdate(e)}),this.#i.notify({mutation:this,type:"updated",action:e})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},28501:function(e,t,r){"use strict";r.d(t,{V:function(){return n}});var n=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0),s=n=>{t?e.push(n):i(()=>{r(n)})},a=()=>{let t=e;e=[],t.length&&i(()=>{n(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||a()}return r},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}()},87950:function(e,t,r){"use strict";r.d(t,{N:function(){return s}});var n=r(37643),i=r(72224),s=new class extends n.l{#o=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!i.sk&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#o!==e&&(this.#o=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#o}}},30967:function(e,t,r){"use strict";r.d(t,{A:function(){return o},z:function(){return u}});var n=r(72224),i=r(28501),s=r(56524),a=r(60764),o=class extends a.F{#u;#c;#l;#s;#d;#h;constructor(e){super(),this.#h=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#u=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#u,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(e,t){let r=(0,n.oE)(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(n.ZT).catch(n.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#u)}isActive(){return this.observers.some(e=>!1!==(0,n.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,n.Kp)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#h?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#h=!0,r.signal)})},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=(0,n.cG)(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return(i(r),this.#h=!1,this.options.persister)?this.options.persister(e,r,this):e(r)}};i(a),this.options.behavior?.onFetch(a,this),this.#c=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#a({type:"fetch",meta:a.fetchOptions?.meta});let o=e=>{(0,s.DV)(e)&&e.silent||this.#a({type:"error",error:e}),(0,s.DV)(e)||(this.#l.config.onError?.(e,this),this.#l.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#s=(0,s.Mz)({initialPromise:t?.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e){o(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){o(e);return}this.#l.config.onSuccess?.(e,this),this.#l.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:o,onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),this.#s.start()}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...u(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if((0,s.DV)(r)&&r.revert&&this.#c)return{...this.#c,fetchStatus:"idle"};return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.V.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:e})})}};function u(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},89952:function(e,t,r){"use strict";r.d(t,{z:function(){return u}});var n=r(72224),i=r(28501),s=r(22999),a=r(37643),o=r(30967),u=class extends a.l{constructor(e,t){super(),this.options=t,this.#f=e,this.#p=null,this.bindMethods(),this.setOptions(t)}#f;#m=void 0;#g=void 0;#y=void 0;#b;#v;#p;#w;#_;#E;#k;#x;#S;#A=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#m.addObserver(this),c(this.#m,this.options)?this.#C():this.updateResult(),this.#I())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return l(this.#m,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return l(this.#m,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#P(),this.#m.removeObserver(this)}setOptions(e,t){let r=this.options,i=this.#m;if(this.options=this.#f.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,n.Nc)(this.options.enabled,this.#m))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#m.setOptions(this.options),r._defaulted&&!(0,n.VS)(this.options,r)&&this.#f.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#m,observer:this});let s=this.hasListeners();s&&d(this.#m,i,this.options,r)&&this.#C(),this.updateResult(t),s&&(this.#m!==i||(0,n.Nc)(this.options.enabled,this.#m)!==(0,n.Nc)(r.enabled,this.#m)||(0,n.KC)(this.options.staleTime,this.#m)!==(0,n.KC)(r.staleTime,this.#m))&&this.#M();let a=this.#T();s&&(this.#m!==i||(0,n.Nc)(this.options.enabled,this.#m)!==(0,n.Nc)(r.enabled,this.#m)||a!==this.#S)&&this.#O(a)}getOptimisticResult(e){let t=this.#f.getQueryCache().build(this.#f,e),r=this.createResult(t,e);return(0,n.VS)(this.getCurrentResult(),r)||(this.#y=r,this.#v=this.options,this.#b=this.#m.state),r}getCurrentResult(){return this.#y}trackResult(e,t){let r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),t?.(n),e[n])})}),r}trackProp(e){this.#A.add(e)}getCurrentQuery(){return this.#m}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#f.defaultQueryOptions(e),r=this.#f.getQueryCache().build(this.#f,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#C({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#y))}#C(e){this.#N();let t=this.#m.fetch(this.options,e);return e?.throwOnError||(t=t.catch(n.ZT)),t}#M(){this.#R();let e=(0,n.KC)(this.options.staleTime,this.#m);if(n.sk||this.#y.isStale||!(0,n.PN)(e))return;let t=(0,n.Kp)(this.#y.dataUpdatedAt,e);this.#k=setTimeout(()=>{this.#y.isStale||this.updateResult()},t+1)}#T(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#m):this.options.refetchInterval)??!1}#O(e){this.#P(),this.#S=e,!n.sk&&!1!==(0,n.Nc)(this.options.enabled,this.#m)&&(0,n.PN)(this.#S)&&0!==this.#S&&(this.#x=setInterval(()=>{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#C()},this.#S))}#I(){this.#M(),this.#O(this.#T())}#R(){this.#k&&(clearTimeout(this.#k),this.#k=void 0)}#P(){this.#x&&(clearInterval(this.#x),this.#x=void 0)}createResult(e,t){let r;let i=this.#m,s=this.options,a=this.#y,u=this.#b,l=this.#v,f=e!==i?e.state:this.#g,{state:p}=e,m={...p},g=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&c(e,t),a=r&&d(e,i,t,s);(n||a)&&(m={...m,...(0,o.z)(p.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:v}=m;if(t.select&&void 0!==m.data){if(a&&m.data===u?.data&&t.select===this.#w)r=this.#_;else try{this.#w=t.select,r=t.select(m.data),r=(0,n.oE)(a?.data,r,t),this.#_=r,this.#p=null}catch(e){this.#p=e}}else r=m.data;if(void 0!==t.placeholderData&&void 0===r&&"pending"===v){let e;if(a?.isPlaceholderData&&t.placeholderData===l?.placeholderData)e=a.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#p=null}catch(e){this.#p=e}void 0!==e&&(v="success",r=(0,n.oE)(a?.data,e,t),g=!0)}this.#p&&(y=this.#p,r=this.#_,b=Date.now(),v="error");let w="fetching"===m.fetchStatus,_="pending"===v,E="error"===v,k=_&&w,x=void 0!==r;return{status:v,fetchStatus:m.fetchStatus,isPending:_,isSuccess:"success"===v,isError:E,isInitialLoading:k,isLoading:k,data:r,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:E&&!x,isPaused:"paused"===m.fetchStatus,isPlaceholderData:g,isRefetchError:E&&x,isStale:h(e,t),refetch:this.refetch}}updateResult(e){let t=this.#y,r=this.createResult(this.#m,this.options);if(this.#b=this.#m.state,this.#v=this.options,void 0!==this.#b.data&&(this.#E=this.#m),(0,n.VS)(r,t))return;this.#y=r;let i={};e?.listeners!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#A.size)return!0;let n=new Set(r??this.#A);return this.options.throwOnError&&n.add("error"),Object.keys(this.#y).some(e=>this.#y[e]!==t[e]&&n.has(e))})()&&(i.listeners=!0),this.#D({...i,...e})}#N(){let e=this.#f.getQueryCache().build(this.#f,this.options);if(e===this.#m)return;let t=this.#m;this.#m=e,this.#g=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#I()}#D(e){i.V.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#y)}),this.#f.getQueryCache().notify({query:this.#m,type:"observerResultsUpdated"})})}};function c(e,t){return!1!==(0,n.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&l(e,t,t.refetchOnMount)}function l(e,t,r){if(!1!==(0,n.Nc)(t.enabled,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&h(e,t)}return!1}function d(e,t,r,i){return(e!==t||!1===(0,n.Nc)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&h(e,r)}function h(e,t){return!1!==(0,n.Nc)(t.enabled,e)&&e.isStaleByTime((0,n.KC)(t.staleTime,e))}},60764:function(e,t,r){"use strict";r.d(t,{F:function(){return i}});var n=r(72224),i=class{#L;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.PN)(this.gcTime)&&(this.#L=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n.sk?1/0:3e5))}clearGcTimeout(){this.#L&&(clearTimeout(this.#L),this.#L=void 0)}}},56524:function(e,t,r){"use strict";r.d(t,{DV:function(){return c},Kw:function(){return o},Mz:function(){return l}});var n=r(22999),i=r(87950),s=r(72224);function a(e){return Math.min(1e3*2**e,3e4)}function o(e){return(e??"online")!=="online"||i.N.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){return e instanceof u}function l(e){let t,r,c,l=!1,d=0,h=!1,f=new Promise((e,t)=>{r=e,c=t}),p=()=>n.j.isFocused()&&("always"===e.networkMode||i.N.isOnline())&&e.canRun(),m=()=>o(e.networkMode)&&e.canRun(),g=n=>{h||(h=!0,e.onSuccess?.(n),t?.(),r(n))},y=r=>{h||(h=!0,e.onError?.(r),t?.(),c(r))},b=()=>new Promise(r=>{t=e=>{(h||p())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,h||e.onContinue?.()}),v=()=>{let t;if(h)return;let r=0===d?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(g).catch(t=>{if(h)return;let r=e.retry??(s.sk?0:3),n=e.retryDelay??a,i="function"==typeof n?n(d,t):n,o=!0===r||"number"==typeof r&&d<r||"function"==typeof r&&r(d,t);if(l||!o){y(t);return}d++,e.onFail?.(d,t),(0,s._v)(i).then(()=>p()?void 0:b()).then(()=>{l?y(t):v()})})};return{promise:f,cancel:t=>{h||(y(new u(t)),e.abort?.())},continue:()=>(t?.(),f),cancelRetry:()=>{l=!0},continueRetry:()=>{l=!1},canStart:m,start:()=>(m()?v():b().then(v),f)}}},37643:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});var n=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},72224:function(e,t,r){"use strict";r.d(t,{CN:function(){return x},Ht:function(){return k},KC:function(){return u},Kp:function(){return o},Nc:function(){return c},PN:function(){return a},Q$:function(){return m},Rm:function(){return h},SE:function(){return s},VS:function(){return g},VX:function(){return E},X7:function(){return d},Ym:function(){return f},ZT:function(){return i},_v:function(){return w},_x:function(){return l},cG:function(){return S},oE:function(){return _},sk:function(){return n},to:function(){return p}});var n="undefined"==typeof window||"Deno"in globalThis;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function o(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(n){if(t.queryHash!==h(a,t.options))return!1}else if(!p(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!s||!!s(t))}function d(e,t){let{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(f(t.options.mutationKey)!==f(s))return!1}else if(!p(t.options.mutationKey,s))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function h(e,t){return(t?.queryKeyHashFn||f)(e)}function f(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function p(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!p(e[r],t[r]))}function m(e,t){if(e===t)return e;let r=y(e)&&y(t);if(r||b(e)&&b(t)){let n=r?e:Object.keys(e),i=n.length,s=r?t:Object.keys(t),a=s.length,o=r?[]:{},u=0;for(let i=0;i<a;i++){let a=r?i:s[i];(!r&&n.includes(a)||r)&&void 0===e[a]&&void 0===t[a]?(o[a]=void 0,u++):(o[a]=m(e[a],t[a]),o[a]===e[a]&&void 0!==e[a]&&u++)}return i===a&&u===i?e:o}return t}function g(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!v(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(v(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function v(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e){return new Promise(t=>{setTimeout(t,e)})}function _(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?m(e,t):t}function E(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function k(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var x=Symbol();function S(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==x?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}},94762:function(e,t,r){"use strict";r.d(t,{NL:function(){return a},aH:function(){return o}});var n=r(66399),i=r(64915),s=n.createContext(void 0),a=e=>{let t=n.useContext(s);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},o=e=>{let{client:t,children:r}=e;return n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:r})}},77340:function(e,t,r){"use strict";let n;r.d(t,{_:function(){return a}});var i=r(66399);r(64915);var s=i.createContext((n=!1,{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n})),a=()=>i.useContext(s)},82255:function(e,t,r){"use strict";r.d(t,{JN:function(){return a},KJ:function(){return o},pf:function(){return s}});var n=r(66399),i=r(19986),s=(e,t)=>{(e.suspense||e.throwOnError)&&!t.isReset()&&(e.retryOnMount=!1)},a=e=>{n.useEffect(()=>{e.clearReset()},[e])},o=e=>{let{result:t,errorResetBoundary:r,throwOnError:n,query:s}=e;return t.isError&&!r.isReset()&&!t.isFetching&&s&&(0,i.L)(n,[t.error,s])}},50435:function(e,t,r){"use strict";r.d(t,{S:function(){return s}});var n=r(66399),i=n.createContext(!1),s=()=>n.useContext(i);i.Provider},15798:function(e,t,r){"use strict";r.d(t,{A8:function(){return i},Ct:function(){return n},SB:function(){return a},Z$:function(){return s},j8:function(){return o}});var n=(e,t)=>void 0===t.state.data,i=e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},s=(e,t)=>e.isLoading&&e.isFetching&&!t,a=(e,t)=>e?.suspense&&t.isPending,o=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()})},58266:function(e,t,r){"use strict";r.d(t,{r:function(){return l}});var n=r(66399),i=r(28501),s=r(77340),a=r(94762),o=r(50435),u=r(82255),c=r(15798);function l(e,t,r){var l,d,h,f;let p=(0,a.NL)(r),m=(0,o.S)(),g=(0,s._)(),y=p.defaultQueryOptions(e);null===(d=p.getDefaultOptions().queries)||void 0===d||null===(l=d._experimental_beforeQuery)||void 0===l||l.call(d,y),y._optimisticResults=m?"isRestoring":"optimistic",(0,c.A8)(y),(0,u.pf)(y,g),(0,u.JN)(g);let[b]=n.useState(()=>new t(p,y)),v=b.getOptimisticResult(y);if(n.useSyncExternalStore(n.useCallback(e=>{let t=m?()=>void 0:b.subscribe(i.V.batchCalls(e));return b.updateResult(),t},[b,m]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),n.useEffect(()=>{b.setOptions(y,{listeners:!1})},[y,b]),(0,c.SB)(y,v))throw(0,c.j8)(y,b,g);if((0,u.KJ)({result:v,errorResetBoundary:g,throwOnError:y.throwOnError,query:p.getQueryCache().get(y.queryHash)}))throw v.error;return null===(f=p.getDefaultOptions().queries)||void 0===f||null===(h=f._experimental_afterQuery)||void 0===h||h.call(f,y,v),y.notifyOnChangeProps?v:b.trackResult(v)}},70245:function(e,t,r){"use strict";r.d(t,{D:function(){return d}});var n=r(66399),i=r(80633),s=r(28501),a=r(37643),o=r(72224),u=class extends a.l{#f;#y=void 0;#B;#q;constructor(e,t){super(),this.#f=e,this.setOptions(t),this.bindMethods(),this.#z()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#f.defaultMutationOptions(e),(0,o.VS)(this.options,t)||this.#f.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#B,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(t.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#B?.state.status==="pending"&&this.#B.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#B?.removeObserver(this)}onMutationUpdate(e){this.#z(),this.#D(e)}getCurrentResult(){return this.#y}reset(){this.#B?.removeObserver(this),this.#B=void 0,this.#z(),this.#D()}mutate(e,t){return this.#q=t,this.#B?.removeObserver(this),this.#B=this.#f.getMutationCache().build(this.#f,this.options),this.#B.addObserver(this),this.#B.execute(e)}#z(){let e=this.#B?.state??(0,i.R)();this.#y={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#D(e){s.V.batch(()=>{if(this.#q&&this.hasListeners()){let t=this.#y.variables,r=this.#y.context;e?.type==="success"?(this.#q.onSuccess?.(e.data,t,r),this.#q.onSettled?.(e.data,null,t,r)):e?.type==="error"&&(this.#q.onError?.(e.error,t,r),this.#q.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(e=>{e(this.#y)})})}},c=r(94762),l=r(19986);function d(e,t){let r=(0,c.NL)(t),[i]=n.useState(()=>new u(r,e));n.useEffect(()=>{i.setOptions(e)},[i,e]);let a=n.useSyncExternalStore(n.useCallback(e=>i.subscribe(s.V.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=n.useCallback((e,t)=>{i.mutate(e,t).catch(l.Z)},[i]);if(a.error&&(0,l.L)(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}},68382:function(e,t,r){"use strict";r.d(t,{a:function(){return s}});var n=r(89952),i=r(58266);function s(e,t){return(0,i.r)(e,n.z,t)}},16522:function(e,t,r){"use strict";r.d(t,{k:function(){return a}});var n=r(89952),i=r(58266),s=r(15798);function a(e,t){return(0,i.r)({...e,enabled:!0,suspense:!0,throwOnError:s.Ct,placeholderData:void 0},n.z,t)}},19986:function(e,t,r){"use strict";function n(e,t){return"function"==typeof e?e(...t):!!e}function i(){}r.d(t,{L:function(){return n},Z:function(){return i}})},10146:function(e,t,r){"use strict";function n(e){let t={subscribe(t){let r=null,n=!1,i=!1,s=!1;function a(){if(null===r){s=!0;return}!i&&(i=!0,"function"==typeof r?r():r&&r.unsubscribe())}return r=e({next(e){n||t.next?.(e)},error(e){n||(n=!0,t.error?.(e),a())},complete(){n||(n=!0,t.complete?.(),a())}}),s&&a(),{unsubscribe:a}},pipe:(...e)=>e.reduce(i,t)};return t}function i(e,t){return t(e)}r.d(t,{NT:function(){return u},Bm:function(){return h},fE:function(){return c},ny:function(){return f},gb:function(){return O},Pq:function(){return P}});class s extends Error{constructor(e){super(e),this.name="ObservableAbortError",Object.setPrototypeOf(this,s.prototype)}}var a=r(65082);class o extends Error{static from(e,t={}){return e instanceof o||e instanceof Error&&"TRPCClientError"===e.name?(t.meta&&(e.meta={...e.meta,...t.meta}),e):(0,a.Kn)(e)&&(0,a.Kn)(e.error)&&"number"==typeof e.error.code&&"string"==typeof e.error.message?new o(e.error.message,{...t,result:e}):e instanceof Error?new o(e.message,{...t,cause:(0,a.sZ)(e)}):new o("Unknown error",{...t,cause:e})}constructor(e,t){let r=t?.cause;super(e,{cause:r}),this.meta=t?.meta,this.cause=r,this.shape=t?.result?.error,this.data=t?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,o.prototype)}}class u{$request({type:e,input:t,path:r,context:i={}}){var s;return(s={links:this.links,op:{id:++this.requestId,type:e,path:r,input:t,context:i}},n(e=>(function e(t=0,r=s.op){let n=s.links[t];if(!n)throw Error("No more links to execute - did you forget to add an ending link?");return n({op:r,next:r=>e(t+1,r)})})().subscribe(e))).pipe(e=>{let t=0,r=null,i=[];return n(n=>(t++,i.push(n),r||(r=e.subscribe({next(e){for(let t of i)t.next?.(e)},error(e){for(let t of i)t.error?.(e)},complete(){for(let e of i)e.complete?.()}})),{unsubscribe(){t--,function(){if(0===t&&r){let e=r;r=null,e.unsubscribe()}}();let e=i.findIndex(e=>e===n);e>-1&&i.splice(e,1)}}))})}requestAsPromise(e){var t;let r;let{promise:n,abort:i}=(t=this.$request(e),{promise:new Promise((e,n)=>{let i=!1;function a(){i||(i=!0,n(new s("This operation was aborted.")),o.unsubscribe())}let o=t.subscribe({next(t){i=!0,e(t),a()},error(e){i=!0,n(e),a()},complete(){i=!0,a()}});r=a}),abort:r});return new Promise((t,r)=>{e.signal?.addEventListener("abort",i),n.then(e=>{t(e.result.data)}).catch(e=>{r(o.from(e))})})}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:r?.context,signal:r?.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:r?.context,signal:r?.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r?.context}).subscribe({next(e){"started"===e.result.type?r.onStarted?.():"stopped"===e.result.type?r.onStopped?.():r.onData?.(e.result.data)},error(e){r.onError?.(e)},complete(){r.onComplete?.()}})}constructor(e){this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}}function c(e){return new u(e)}let l={query:"query",mutate:"mutation",subscribe:"subscription"},d=e=>l[e];function h(e){return(0,a.yh)(t=>e.hasOwnProperty(t)?e[t]:"__untypedClient"===t?e:(0,a.IX)(({path:r,args:n})=>{let i=[t,...r],s=d(i.pop()),a=i.join(".");return e[s](a,...n)}))}function f(e){return e.__untypedClient}let p=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function m(e){let t=null,r=null,n=()=>{clearTimeout(r),r=null,t=null};function i(){let r=function(t){let r=[[]],n=0;for(;;){let i=t[n];if(!i)break;let s=r[r.length-1];if(i.aborted){i.reject?.(Error("Aborted")),n++;continue}if(e.validate(s.concat(i).map(e=>e.key))){s.push(i),n++;continue}if(0===s.length){i.reject?.(Error("Input is too big for a single dispatch")),n++;continue}r.push([])}return r}(t);for(let t of(n(),r)){if(!t.length)continue;let r={items:t,cancel:p};for(let e of t)e.batch=r;let n=(e,t)=>{let n=r.items[e];n.resolve?.(t),n.batch=null,n.reject=null,n.resolve=null},{promise:i,cancel:s}=e.fetch(r.items.map(e=>e.key),n);r.cancel=s,i.then(e=>{for(let t=0;t<e.length;t++){let r=e[t];n(t,r)}for(let e of r.items)e.reject?.(Error("Missing result")),e.batch=null}).catch(e=>{for(let t of r.items)t.reject?.(e),t.batch=null})}}return{load:function(e){let n={aborted:!1,key:e,batch:null,resolve:p,reject:p},s=new Promise((e,r)=>{n.reject=r,n.resolve=e,t||(t=[]),t.push(n)});return r||(r=setTimeout(i)),{promise:s,cancel:()=>{n.aborted=!0,n.batch?.items.every(e=>e.aborted)&&(n.batch.cancel(),n.batch=null)}}}}}let g=e=>"function"==typeof e;function y(e){var t,r;return{url:e.url.toString().replace(/\/$/,""),fetch:e.fetch,AbortController:(t=e.AbortController)?t:"undefined"!=typeof window&&window.AbortController?window.AbortController:"undefined"!=typeof globalThis&&globalThis.AbortController?globalThis.AbortController:null,transformer:(r=e.transformer)?"input"in r?r:{input:r,output:r}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}},methodOverride:e.methodOverride}}let b={query:"GET",mutation:"POST"};function v(e){return"input"in e?e.transformer.input.serialize(e.input):function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];t[r]=n}return t}(e.inputs.map(t=>e.transformer.input.serialize(t)))}let w=e=>{let t=e.url+"/"+e.path,r=[];if("inputs"in e&&r.push("batch=1"),"query"===e.type){let t=v(e);void 0!==t&&"POST"!==e.methodOverride&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(t+="?"+r.join("&")),t},_=e=>{if("query"===e.type&&"POST"!==e.methodOverride)return;let t=v(e);return void 0!==t?JSON.stringify(t):void 0},E=e=>x({...e,contentTypeHeader:"application/json",getUrl:w,getBody:_});async function k(e,t){let r=e.getUrl(e),n=e.getBody(e),{type:i}=e,s=await (async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})();if("subscription"===i)throw Error("Subscriptions should use wsLink");let a={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.batchModeHeader?{"trpc-batch-mode":e.batchModeHeader}:{},...s};return(function(e){if(e)return e;if("undefined"!=typeof window&&g(window.fetch))return window.fetch;if("undefined"!=typeof globalThis&&g(globalThis.fetch))return globalThis.fetch;throw Error("No fetch implementation found")})(e.fetch)(r,{method:e.methodOverride??b[i],signal:t?.signal,body:n,headers:a})}function x(e){let t=e.AbortController?new e.AbortController:null,r={},n=!1;return{promise:new Promise((i,s)=>{k(e,t).then(e=>(r.response=e,n=!0,e.json())).then(e=>{r.responseJSON=e,i({json:e,meta:r})}).catch(e=>{n=!0,s(o.from(e,{meta:r}))})}),cancel:()=>{n||t?.abort()}}}function S(e){return function(t){let r=y(t),i=t.maxURLLength??1/0;return s=>{let u=n=>({validate:e=>{if(i===1/0)return!0;let t=e.map(e=>e.path).join(","),s=e.map(e=>e.input);return w({...r,type:n,path:t,inputs:s}).length<=i},fetch:e({...r,runtime:s,type:n,opts:t})}),c=m(u("query")),l=m(u("mutation")),d={query:c,subscription:m(u("subscription")),mutation:l};return({op:e})=>n(t=>{let n;let{promise:i,cancel:s}=d[e.type].load(e);return i.then(e=>{n=e;let i=(0,a.F7)(e.json,r.transformer.output);if(!i.ok){t.error(o.from(i.error,{meta:e.meta}));return}t.next({context:e.meta,result:i.result}),t.complete()}).catch(e=>{t.error(o.from(e,{meta:n?.meta}))}),()=>{s()}})}}}async function A(e){let t=e.parse??JSON.parse;await C(e.readableStream,r=>{if(e.signal?.aborted||!r||"}"===r)return;let n=r.indexOf(":"),i=r.substring(2,n-1),s=r.substring(n+1);e.onSingle(Number(i),t(s))},e.textDecoder)}async function C(e,t,r){let n="",i=e=>{let i=r.decode(e).split("\n");if(1===i.length)n+=i[0];else if(i.length>1){t(n+i[0]);for(let e=1;e<i.length-1;e++)t(i[e]);n=i[i.length-1]}};"getReader"in e?await I(e,i):await new Promise(t=>{e.on("data",i),e.on("end",t)}),t(n)}async function I(e,t){let r=e.getReader(),n=await r.read();for(;!n.done;)t(n.value),n=await r.read()}S(e=>t=>{let r=t.map(e=>e.path).join(","),n=t.map(e=>e.input),{promise:i,cancel:s}=E({...e,path:r,inputs:n,headers:()=>e.opts.headers?"function"==typeof e.opts.headers?e.opts.headers({opList:t}):e.opts.headers:{}});return{promise:i.then(e=>(Array.isArray(e.json)?e.json:t.map(()=>e.json)).map(t=>({meta:e.meta,json:t}))),cancel:s}});let R=(e,t)=>{let r=e.AbortController?new e.AbortController:null;return{cancel:()=>r?.abort(),promise:k({...e,contentTypeHeader:"application/json",batchModeHeader:"stream",getUrl:w,getBody:_},r).then(async n=>{if(!n.body)throw Error("Received response without body");let i={response:n};return A({readableStream:n.body,onSingle:t,parse:e=>({json:JSON.parse(e),meta:i}),signal:r?.signal,textDecoder:e.textDecoder})})}},P=S(e=>{let t=function(e){if(e)return e;if("undefined"!=typeof window&&window.TextDecoder)return new window.TextDecoder;if("undefined"!=typeof globalThis&&globalThis.TextDecoder)return new globalThis.TextDecoder;throw Error("No TextDecoder implementation found")}(e.opts.textDecoder);return(r,n)=>{let i=r.map(e=>e.path).join(","),s=r.map(e=>e.input),{cancel:a,promise:o}=R({...e,textDecoder:t,path:i,inputs:s,headers:()=>e.opts.headers?"function"==typeof e.opts.headers?e.opts.headers({opList:r}):e.opts.headers:{}},(e,t)=>{n(e,t)});return{promise:o.then(()=>[]),cancel:a}}});function N(e){return t=>{let r=y(t);return()=>({op:i})=>n(n=>{let s;let{path:u,input:c,type:l}=i,{promise:d,cancel:h}=e.requester({...r,type:l,path:u,input:c,headers:()=>t.headers?"function"==typeof t.headers?t.headers({op:i}):t.headers:{}});return d.then(e=>{s=e.meta;let t=(0,a.F7)(e.json,r.transformer.output);if(!t.ok){n.error(o.from(t.error,{meta:s}));return}n.next({context:e.meta,result:t.result}),n.complete()}).catch(e=>{n.error(o.from(e,{meta:s}))}),()=>{h()}})}}N({requester:E});let M={css:{query:["72e3ff","3fb0d8"],mutation:["c5a3fc","904dfc"],subscription:["ff49e1","d83fbe"]},ansi:{regular:{query:["\x1b[30;46m","\x1b[97;46m"],mutation:["\x1b[30;45m","\x1b[97;45m"],subscription:["\x1b[30;42m","\x1b[97;42m"]},bold:{query:["\x1b[1;30;46m","\x1b[1;97;46m"],mutation:["\x1b[1;30;45m","\x1b[1;97;45m"],subscription:["\x1b[1;30;42m","\x1b[1;97;42m"]}}},T=({c:e=console,colorMode:t="css"})=>r=>{let n=r.input,i="undefined"!=typeof FormData&&n instanceof FormData?Object.fromEntries(n):n,{parts:s,args:a}=function(e){let{direction:t,type:r,path:n,id:i,input:s}=e,a=[],o=[];if("ansi"===e.colorMode){let[s,u]=M.ansi.regular[r],[c,l]=M.ansi.bold[r];return a.push("up"===t?s:u,"up"===t?">>":"<<",r,"up"===t?c:l,`#${i}`,n,"\x1b[0m"),"up"===t?o.push({input:e.input}):o.push({input:e.input,result:"result"in e.result?e.result.result:e.result,elapsedMs:e.elapsedMs}),{parts:a,args:o}}let[u,c]=M.css[r],l=`
    background-color: #${"up"===t?u:c};
    color: ${"up"===t?"black":"white"};
    padding: 2px;
  `;return a.push("%c","up"===t?">>":"<<",r,`#${i}`,`%c${n}%c`,"%O"),o.push(l,`${l}; font-weight: bold;`,`${l}; font-weight: normal;`),"up"===t?o.push({input:s,context:e.context}):o.push({input:s,result:e.result,elapsedMs:e.elapsedMs,context:e.context}),{parts:a,args:o}}({...r,colorMode:t,input:i});e["down"===r.direction&&r.result&&(r.result instanceof Error||"error"in r.result.result)?"error":"log"].apply(null,[s.join(" ")].concat(a))};function O(e={}){let{enabled:t=()=>!0}=e,r=e.colorMode??("undefined"==typeof window?"ansi":"css"),{logger:i=T({c:e.console,colorMode:r})}=e;return()=>({op:e,next:r})=>n(s=>{var a;t({...e,direction:"up"})&&i({...e,direction:"up"});let o=Date.now();function u(r){let n=Date.now()-o;t({...e,direction:"down",result:r})&&i({...e,direction:"down",elapsedMs:n,result:r})}return r(e).pipe((a={next(e){u(e)},error(e){u(e)}},e=>n(t=>e.subscribe({next(e){a.next?.(e),t.next(e)},error(e){a.error?.(e),t.error(e)},complete(){a.complete?.(),t.complete()}})))).subscribe(s)})}N({requester:e=>{if("mutation"!==e.type)throw Error("We only handle mutations with formdata");return x({...e,getUrl:()=>`${e.url}/${e.path}`,getBody(e){if("input"in e){if(!(e.input instanceof FormData))throw Error("Input is not FormData");return e.input}}})}})},22782:function(e,t,r){"use strict";r.d(t,{ec:function(){return N}});var n=r(10146),i=r(72224),s=r(65082);function a(e,t,r){let n=e.flatMap(e=>e.split("."));if(!t&&(!r||"any"===r))return n.length?[n]:[];if("infinite"===r&&(0,s.Kn)(t)&&("direction"in t||"cursor"in t)){let{cursor:e,direction:r,...i}=t;return[n,{input:i,type:"infinite"}]}return[n,{...void 0!==t&&t!==i.CN&&{input:t},...r&&"any"!==r&&{type:r}}]}var o=r(66399);let u=["client","ssrContext","ssrState","abortOnUnmount"],c=o.createContext?.(null),l=e=>{switch(e){case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":return"query";case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};var d=r(68382),h=r(16522),f=r(94762),p=r(70245),m=r(89952),g=r(76296),y=class extends m.z{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,g.Gm)()},t)}getOptimisticResult(e){return e.behavior=(0,g.Gm)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:s,isError:a,isRefetchError:o}=n,u=r.fetchMeta?.fetchMore?.direction,c=a&&"forward"===u,l=i&&"forward"===u,d=a&&"backward"===u,h=i&&"backward"===u;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,g.Qy)(t,r.data),hasPreviousPage:(0,g.ZF)(t,r.data),isFetchNextPageError:c,isFetchingNextPage:l,isFetchPreviousPageError:d,isFetchingPreviousPage:h,isRefetchError:o&&!c&&!d,isRefetching:s&&!l&&!h}}},b=r(58266),v=r(15798),w=r(28501),_=r(37643);function E(e,t){return e.filter(e=>!t.includes(e))}var k=class extends _.l{#f;#U;#j;#n;#F;#H;#$;constructor(e,t,r){super(),this.#f=e,this.#j=[],this.#n=[],this.#U=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#n.forEach(e=>{e.subscribe(t=>{this.#W(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#n.forEach(e=>{e.destroy()})}setQueries(e,t,r){this.#j=e,w.V.batch(()=>{let e=this.#n,t=this.#G(this.#j);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions,r));let n=t.map(e=>e.observer),i=n.map(e=>e.getCurrentResult()),s=n.some((t,r)=>t!==e[r]);(e.length!==n.length||s)&&(this.#n=n,this.#U=i,this.hasListeners()&&(E(e,n).forEach(e=>{e.destroy()}),E(n,e).forEach(e=>{e.subscribe(t=>{this.#W(e,t)})}),this.#D()))})}getCurrentResult(){return this.#U}getQueries(){return this.#n.map(e=>e.getCurrentQuery())}getObservers(){return this.#n}getOptimisticResult(e,t){let r=this.#G(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[n,e=>this.#V(e??n,t),()=>r.map((e,t)=>{let i=n[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,e=>{r.forEach(t=>{t.observer.trackProp(e)})})})]}#V(e,t){return t?(this.#F&&this.#U===this.#$&&t===this.#H||(this.#H=t,this.#$=this.#U,this.#F=(0,i.Q$)(this.#F,t(e))),this.#F):e}#G(e){let t=new Map(this.#n.map(e=>[e.options.queryHash,e])),r=e.map(e=>this.#f.defaultQueryOptions(e)),n=r.flatMap(e=>{let r=t.get(e.queryHash);return null!=r?[{defaultedQueryOptions:e,observer:r}]:[]}),i=new Set(n.map(e=>e.defaultedQueryOptions.queryHash)),s=r.filter(e=>!i.has(e.queryHash)),a=e=>{let t=this.#f.defaultQueryOptions(e);return this.#n.find(e=>e.options.queryHash===t.queryHash)??new m.z(this.#f,t)},o=s.map(e=>({defaultedQueryOptions:e,observer:a(e)}));return n.concat(o).sort((e,t)=>r.indexOf(e.defaultedQueryOptions)-r.indexOf(t.defaultedQueryOptions))}#W(e,t){let r=this.#n.indexOf(e);-1!==r&&(this.#U=function(e,t,r){let n=e.slice(0);return n[t]=r,n}(this.#U,r,t),this.#D())}#D(){w.V.batch(()=>{this.listeners.forEach(e=>{e(this.#U)})})}},x=r(50435),S=r(77340),A=r(82255);function C(e,t){let{queries:r,...n}=e,i=(0,f.NL)(t),s=(0,x.S)(),a=(0,S._)(),u=o.useMemo(()=>r.map(e=>{let t=i.defaultQueryOptions(e);return t._optimisticResults=s?"isRestoring":"optimistic",t}),[r,i,s]);u.forEach(e=>{(0,v.A8)(e),(0,A.pf)(e,a)}),(0,A.JN)(a);let[c]=o.useState(()=>new k(i,u,n)),[l,d,h]=c.getOptimisticResult(u,n.combine);o.useSyncExternalStore(o.useCallback(e=>s?()=>void 0:c.subscribe(w.V.batchCalls(e)),[c,s]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),o.useEffect(()=>{c.setQueries(u,n,{listeners:!1})},[u,n,c]);let p=l.some((e,t)=>(0,v.SB)(u[t],e))?l.flatMap((e,t)=>{let r=u[t];if(r){let t=new m.z(i,r);if((0,v.SB)(r,e))return(0,v.j8)(r,t,a);(0,v.Z$)(e,s)&&(0,v.j8)(r,t,a)}return[]}):[];if(p.length>0)throw Promise.all(p);let g=l.find((e,t)=>{let r=u[t];return r&&(0,A.KJ)({result:e,errorResetBoundary:a,throwOnError:r.throwOnError,query:i.getQueryCache().get(r.queryHash)})});if(null==g?void 0:g.error)throw g.error;return d(h())}function I(e,t,r){let n=e[0],i=e[1]?.input;return r&&(i={...i??{},...r.pageParam?{cursor:r.pageParam}:{},direction:r.direction}),[n.join("."),i,t?.trpc]}function R(e){let t=e.path.join(".");return o.useMemo(()=>({path:t}),[t])}function P(e){return(0,s.IX)(t=>{let r=t.path,n=r.join("."),[i,s]=t.args;return{queryKey:a(r,i,"query"),queryFn:()=>e.query(n,i,s?.trpc),...s}})}function N(e){var t;return t=function(e){let t=e?.overrides?.useMutation?.onSuccess??(e=>e.originalFn()),r=e?.context??c;function s(){let e=o.useContext(r);if(!e)throw Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return e}function u(e,t){let{queryClient:r,ssrState:n}=s();return n&&"mounted"!==n&&r.getQueryCache().find({queryKey:e})?.state.status==="error"?{retryOnMount:!1,...t}:t}return{Provider:e=>{let{abortOnUnmount:t=!1,client:i,queryClient:s,ssrContext:a}=e,[u,c]=o.useState(e.ssrState??!1),l=o.useMemo(()=>(function(e){let{client:t,queryClient:r}=e,i=t instanceof n.NT?t:(0,n.ny)(t);return{fetchQuery:(e,t)=>r.fetchQuery({...t,queryKey:e,queryFn:()=>i.query(...I(e,t))}),fetchInfiniteQuery:(e,t)=>r.fetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:n})=>i.query(...I(e,t,{pageParam:r,direction:n})),initialPageParam:t?.initialCursor??null}),prefetchQuery:(e,t)=>r.prefetchQuery({...t,queryKey:e,queryFn:()=>i.query(...I(e,t))}),prefetchInfiniteQuery:(e,t)=>r.prefetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:n})=>i.query(...I(e,t,{pageParam:r,direction:n})),initialPageParam:t?.initialCursor??null}),ensureQueryData:(e,t)=>r.ensureQueryData({...t,queryKey:e,queryFn:()=>i.query(...I(e,t))}),invalidateQueries:(e,t,n)=>r.invalidateQueries({...t,queryKey:e},n),resetQueries:(e,t,n)=>r.resetQueries({...t,queryKey:e},n),refetchQueries:(e,t,n)=>r.refetchQueries({...t,queryKey:e},n),cancelQuery:(e,t)=>r.cancelQueries({queryKey:e},t),setQueryData:(e,t,n)=>r.setQueryData(e,t,n),getQueryData:e=>r.getQueryData(e),setInfiniteQueryData:(e,t,n)=>r.setQueryData(e,t,n),getInfiniteQueryData:e=>r.getQueryData(e)}})({client:i,queryClient:s}),[i,s]),d=o.useMemo(()=>({abortOnUnmount:t,queryClient:s,client:i,ssrContext:a??null,ssrState:u,...l}),[t,i,l,s,a,u]);return o.useEffect(()=>{c(e=>!!e&&"mounted")},[]),o.createElement(r.Provider,{value:d},e.children)},createClient:e=>(0,n.fE)(e),useContext:s,useUtils:s,useQuery:function(t,r,n){let{abortOnUnmount:o,client:c,ssrState:l,queryClient:h,prefetchQuery:f}=s(),p=a(t,r,"query"),m=h.getQueryDefaults(p),g=r===i.CN;"undefined"!=typeof window||"prepass"!==l||n?.trpc?.ssr===!1||(n?.enabled??m?.enabled)===!1||g||h.getQueryCache().find({queryKey:p})||f(p,n);let y=u(p,{...m,...n}),b=n?.trpc?.abortOnUnmount??e?.abortOnUnmount??o,v=(0,d.a)({...y,queryKey:p,queryFn:g?r:e=>{let t={...y,trpc:{...y?.trpc,...b?{signal:e.signal}:{}}};return c.query(...I(p,t))}},h);return v.trpc=R({path:t}),v},useSuspenseQuery:function(t,r,n){let i=s(),o=a(t,r,"query"),u=n?.trpc?.abortOnUnmount??e?.abortOnUnmount??i.abortOnUnmount,c=(0,h.k)({...n,queryKey:o,queryFn:e=>{let t={trpc:{...u?{signal:e.signal}:{}}};return i.client.query(...I(o,t))}},i.queryClient);return c.trpc=R({path:t}),[c.data,c]},useQueries:e=>{let{ssrState:t,queryClient:r,prefetchQuery:n,client:i}=s(),a=e(P(i));if("undefined"==typeof window&&"prepass"===t)for(let e of a)e.trpc?.ssr===!1||r.getQueryCache().find({queryKey:e.queryKey})||n(e.queryKey,e);return C({queries:a.map(e=>({...e,queryKey:e.queryKey}))},r)},useSuspenseQueries:e=>{var t;let{queryClient:r,client:n}=s(),i=C({...t={queries:e(P(n)).map(e=>({...e,queryKey:e.queryKey}))},queries:t.queries.map(e=>({...e,suspense:!0,throwOnError:v.Ct,enabled:!0,placeholderData:void 0}))},r);return[i.map(e=>e.data),i]},useMutation:function(e,r){let{client:n}=s(),i=(0,f.NL)(),a=[e],o=i.getMutationDefaults(a),u=(0,p.D)({...r,mutationKey:a,mutationFn:t=>n.mutation(...I([e,{input:t}],r)),onSuccess:(...e)=>t({originalFn:()=>r?.onSuccess?.(...e)??o?.onSuccess?.(...e),queryClient:i,meta:r?.meta??o?.meta??{}})},i);return u.trpc=R({path:e}),u},useSubscription:function(e,t,r){let n=r?.enabled??!0,u=(0,i.Ym)(a(e,t,"any")),{client:c}=s(),l=o.useRef(r);l.current=r,o.useEffect(()=>{if(!n)return;let i=!1,s=c.subscription(e.join("."),t??void 0,{onStarted:()=>{i||l.current.onStarted?.()},onData:e=>{i||r.onData(e)},onError:e=>{i||l.current.onError?.(e)}});return()=>{i=!0,s.unsubscribe()}},[u,n])},useInfiniteQuery:function(e,t,r){var n;let{client:o,ssrState:c,prefetchInfiniteQuery:l,queryClient:d,abortOnUnmount:h}=s(),f=a(e,t,"infinite"),p=d.getQueryDefaults(f),m=t===i.CN;"undefined"!=typeof window||"prepass"!==c||r?.trpc?.ssr===!1||(r?.enabled??p?.enabled)===!1||m||d.getQueryCache().find({queryKey:f})||l(f,{...p,...r});let g=u(f,{...p,...r}),v=r?.trpc?.abortOnUnmount??h,w=(n={...g,initialPageParam:r.initialCursor??null,persister:r.persister,queryKey:f,queryFn:m?t:e=>{let t={...g,trpc:{...g?.trpc,...v?{signal:e.signal}:{}}};return o.query(...I(f,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},(0,b.r)(n,y,d));return w.trpc=R({path:e}),w},useSuspenseInfiniteQuery:function(e,t,r){var n,i;let o=s(),c=a(e,t,"infinite"),l=o.queryClient.getQueryDefaults(c),d=u(c,{...l,...r}),h=r?.trpc?.abortOnUnmount??o.abortOnUnmount,f=(n={...r,initialPageParam:r.initialCursor??null,queryKey:c,queryFn:e=>{let t={...d,trpc:{...d?.trpc,...h?{signal:e.signal}:{}}};return o.client.query(...I(c,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},i=o.queryClient,(0,b.r)({...n,enabled:!0,suspense:!0,throwOnError:v.Ct},y,i));return f.trpc=R({path:e}),[f.data,f]}}}(e),(0,s.yh)(e=>"useContext"===e||"useUtils"===e?()=>{let e=t.useUtils();return o.useMemo(()=>(0,s.yh)(t=>"client"===t?(0,n.Bm)(e.client):u.includes(t)?e[t]:(0,s.IX)(r=>{let n=[t,...r.path],i=n.pop(),s=[...r.args],o=a(n,s.shift(),l(i));return({fetch:()=>e.fetchQuery(o,...s),fetchInfinite:()=>e.fetchInfiniteQuery(o,s[0]),prefetch:()=>e.prefetchQuery(o,...s),prefetchInfinite:()=>e.prefetchInfiniteQuery(o,s[0]),ensureData:()=>e.ensureQueryData(o,...s),invalidate:()=>e.invalidateQueries(o,...s),reset:()=>e.resetQueries(o,...s),refetch:()=>e.refetchQueries(o,...s),cancel:()=>e.cancelQuery(o,...s),setData:()=>{e.setQueryData(o,s[0],s[1])},setInfiniteData:()=>{e.setInfiniteQueryData(o,s[0],s[1])},getData:()=>e.getQueryData(o),getInfiniteData:()=>e.getInfiniteQueryData(o)})[i]()})),[e])}:t.hasOwnProperty(e)?t[e]:(0,s.IX)(({path:r,args:n})=>{let i=[e,...r],s=i.pop();if("useMutation"===s)return t[s](i,...n);if("_def"===s)return{path:i};let[a,...o]=n,u=o[0]||{};return t[s](i,a,u)}))}},65082:function(e,t,r){"use strict";r.d(t,{yh:function(){return s},IX:function(){return i},sZ:function(){return l},Kn:function(){return o},F7:function(){return m}});let n=()=>{},i=e=>(function e(t,r){return new Proxy(n,{get(n,i){if("string"==typeof i&&"then"!==i)return e(t,[...r,i])},apply(e,n,i){let s="apply"===r[r.length-1];return t({args:s?i.length>=2?i[1]:[]:i,path:s?r.slice(0,-1):r})}})})(e,[]),s=e=>new Proxy(n,{get(t,r){if("string"==typeof r&&"then"!==r)return e(r)}});function a(e,...t){let r=Object.assign(Object.create(null),e);for(let e of t)for(let t in e){if(t in r&&r[t]!==e[t])throw Error(`Duplicate key ${t}`);r[t]=e[t]}return r}function o(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}function u(e){return Object.assign(Object.create(null),e)}class c extends Error{}function l(e){if(e instanceof Error)return e;let t=typeof e;if("undefined"!==t&&"function"!==t&&null!==e){if("object"!==t)return Error(String(e));if(o(e)){let t=new c;for(let r in e)t[r]=e[r];return t}}}class d extends Error{constructor(e){let t=l(e.cause);super(e.message??t?.message??e.code,{cause:t}),this.code=e.code,this.name="TRPCError",this.cause||(this.cause=t)}}let h=({shape:e})=>e,f={input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}};class p extends Error{constructor(){super("Unable to transform response from server")}}function m(e,t){let r;try{r=function(e,t){if("error"in e){let r=t.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}return{ok:!0,result:{...e.result,...(!e.result.type||"data"===e.result.type)&&{type:"data",data:t.deserialize(e.result.data)}}}}(e,t)}catch(e){throw new p}if(!r.ok&&(!o(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!o(r.result))throw new p;return r}let g={_ctx:null,_errorShape:null,_meta:null,queries:{},mutations:{},subscriptions:{},errorFormatter:h,transformer:f},y=["then"];function b(e){return function(t){let r=new Set(Object.keys(t).filter(e=>y.includes(e)));if(r.size>0)throw Error("Reserved words used in `router({})` call: "+Array.from(r).join(", "));let n=u({}),s=function e(t,r=[]){let i=u({});for(let[s,a]of Object.entries(t??{})){if(a._def&&"router"in a._def){i[s]=e(a._def.record,[...r,s]);continue}if("function"!=typeof a){i[s]=e(a,[...r,s]);continue}let t=[...r,s].join(".");if(n[t])throw Error(`Duplicate key: ${t}`);n[t]=a,i[s]=a}return i}(t),a={_config:e,router:!0,procedures:n,...g,record:s};return{...s,_def:a,createCaller:e=>i(({path:t,args:r})=>{let n=t.join("."),i=a.procedures[n];return i({path:n,getRawInput:async()=>r[0],ctx:e,type:i._def.type})})}}}function v(...e){let t=a({},...e.map(e=>e._def.record));return b({errorFormatter:e.reduce((e,t)=>{if(t._def._config.errorFormatter&&t._def._config.errorFormatter!==h){if(e!==h&&e!==t._def._config.errorFormatter)throw Error("You seem to have several error formatters");return t._def._config.errorFormatter}return e},h),transformer:e.reduce((e,t)=>{if(t._def._config.transformer&&t._def._config.transformer!==f){if(e!==f&&e!==t._def._config.transformer)throw Error("You seem to have several transformers");return t._def._config.transformer}return e},f),isDev:e.every(e=>e._def._config.isDev),allowOutsideOfServer:e.every(e=>e._def._config.allowOutsideOfServer),isServer:e.every(e=>e._def._config.isServer),$types:e[0]?._def._config.$types})(t)}let w="middlewareMarker";function _(e){if("function"==typeof e)return e;if("function"==typeof e.parseAsync)return e.parseAsync.bind(e);if("function"==typeof e.parse)return e.parse.bind(e);if("function"==typeof e.validateSync)return e.validateSync.bind(e);if("function"==typeof e.create)return e.create.bind(e);if("function"==typeof e.assert)return t=>(e.assert(t),t);throw Error("Could not find a validator fn")}function E(e,t){let{middlewares:r=[],inputs:n,meta:i,...s}=t;return k({...a(e,s),inputs:[...e.inputs,...n??[]],middlewares:[...e.middlewares,...r],meta:e.meta&&i?{...e.meta,...i}:i??e.meta})}function k(e={}){let t={procedure:!0,inputs:[],middlewares:[],...e};return{_def:t,input(e){let r=_(e);return E(t,{inputs:[e],middlewares:[function(e){let t=async function(t){let r;let n=await t.getRawInput();try{r=await e(n)}catch(e){throw new d({code:"BAD_REQUEST",cause:e})}let i=o(t.input)&&o(r)?{...t.input,...r}:r;return t.next({input:i})};return t._type="input",t}(r)]})},output(e){let r=_(e);return E(t,{output:e,middlewares:[function(e){let t=async function({next:t}){let r=await t();if(!r.ok)return r;try{let t=await e(r.data);return{...r,data:t}}catch(e){throw new d({message:"Output validation failed",code:"INTERNAL_SERVER_ERROR",cause:e})}};return t._type="output",t}(r)]})},meta:e=>E(t,{meta:e}),use:e=>E(t,{middlewares:"_middlewares"in e?e._middlewares:[e]}),unstable_concat:e=>E(t,e._def),query:e=>x({...t,type:"query"},e),mutation:e=>x({...t,type:"mutation"},e),subscription:e=>x({...t,type:"subscription"},e)}}function x(e,t){return function(e){async function t(t){if(!t||!("getRawInput"in t))throw Error(S);async function r(n={index:0,ctx:t.ctx}){try{let i=e.middlewares[n.index];return await i({ctx:n.ctx,type:t.type,path:t.path,getRawInput:n.getRawInput??t.getRawInput,meta:e.meta,input:n.input,next:e=>r({index:n.index+1,ctx:e&&"ctx"in e?{...n.ctx,...e.ctx}:n.ctx,input:e&&"input"in e?e.input:n.input,getRawInput:e&&"getRawInput"in e?e.getRawInput:n.getRawInput})})}catch(e){return{ok:!1,error:function(e){if(e instanceof d||e instanceof Error&&"TRPCError"===e.name)return e;let t=new d({code:"INTERNAL_SERVER_ERROR",cause:e});return e instanceof Error&&e.stack&&(t.stack=e.stack),t}(e),marker:w}}}let n=await r();if(!n)throw new d({code:"INTERNAL_SERVER_ERROR",message:"No result from middlewares - did you forget to `return next()`?"});if(!n.ok)throw n.error;return n.data}return t._def=e,t}(E(e,{resolver:t,middlewares:[async function(e){return{marker:w,ok:!0,data:await t(e),ctx:e.ctx}}]})._def)}Symbol("unsetMarker");let S=`
This is a client-only function.
If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls
`.trim(),A="undefined"==typeof window||"Deno"in window||globalThis.process?.env?.NODE_ENV==="test"||!!globalThis.process?.env?.JEST_WORKER_ID||!!globalThis.process?.env?.VITEST_WORKER_ID;class C{context(){return new C}meta(){return new C}create(e){var t;let r={transformer:"input"in(t=e?.transformer??f)?t:{input:t,output:t},isDev:e?.isDev??globalThis.process?.env.NODE_ENV!=="production",allowOutsideOfServer:e?.allowOutsideOfServer??!1,errorFormatter:e?.errorFormatter??h,isServer:e?.isServer??A,$types:s(e=>{throw Error(`Tried to access "$types.${e}" which is not available at runtime`)})};if(!(e?.isServer??A)&&e?.allowOutsideOfServer!==!0)throw Error("You're trying to use @trpc/server in a non-server environment. This is not supported by default.");return{_config:r,procedure:k({meta:e?.defaultMeta}),middleware:function(e){return function e(t){return{_middlewares:t,unstable_pipe:r=>e([...t,..."_middlewares"in r?r._middlewares:[r]])}}([e])},router:b(r),mergeRouters:v,createCallerFactory:function(e){let t=e._def;return function(e){return i(({path:r,args:n})=>{let i=r.join("."),s=t.procedures[i],a=e=>s({path:i,getRawInput:async()=>n[0],ctx:e,type:s._def.type});if("function"==typeof e){let t=e();return t instanceof Promise?t.then(a):a(t)}return a(e)})}}}}}new C,Symbol("TypeError")},43396:function(e,t,r){"use strict";r.d(t,{wj:function(){return j},KC:function(){return N}});var n=r(45415),i=r(38236),s=r(90789),a=r(56749),o=r(47743),u=r(46692),c=r(26124),l=r(63473),d=r(30579),h=r(42434),f=r(4481),p=r(27925),m=r(31086),g=r(76318),y=r(45852),b=r(45330),v=r(27163);function w({abi:e,address:t,client:r}){let[n,i]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],s=null!=n,a=null!=i,o={},u=!1,c=!1,l=!1;for(let t of e)if("function"===t.type?"view"===t.stateMutability||"pure"===t.stateMutability?u=!0:c=!0:"event"===t.type&&(l=!0),u&&c&&l)break;return s&&(u&&(o.read=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=_(r);return(0,h.s)(n,g.L,"readContract")({abi:e,address:t,functionName:i,args:s,...a})}})),c&&(o.simulate=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=_(r);return(0,h.s)(n,y.a,"simulateContract")({abi:e,address:t,functionName:i,args:s,...a})}})),l&&(o.createEventFilter=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=E(r,e.find(e=>"event"===e.type&&e.name===i));return(0,h.s)(n,f.A,"createContractEventFilter")({abi:e,address:t,eventName:i,args:s,...a})}}),o.getEvents=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=E(r,e.find(e=>"event"===e.type&&e.name===i));return(0,h.s)(n,m.m,"getContractEvents")({abi:e,address:t,eventName:i,args:s,...a})}}),o.watchEvent=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=E(r,e.find(e=>"event"===e.type&&e.name===i));return(0,h.s)(n,b.Y,"watchContractEvent")({abi:e,address:t,eventName:i,args:s,...a})}}))),a&&c&&(o.write=new Proxy({},{get:(r,n)=>(...r)=>{let{args:s,options:a}=_(r);return(0,h.s)(i,v.n,"writeContract")({abi:e,address:t,functionName:n,args:s,...a})}})),(s||a)&&c&&(o.estimateGas=new Proxy({},{get:(r,s)=>(...r)=>{let{args:a,options:o}=_(r),u=n??i;return(0,h.s)(u,p.D,"estimateContractGas")({abi:e,address:t,functionName:s,args:a,...o,account:o.account??i.account})}})),o.address=t,o.abi=e,o}function _(e){let t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function E(e,t){let r=!1;return Array.isArray(e[0])?r=!0:1===e.length?r=t.inputs.some(e=>e.indexed):2===e.length&&(r=!0),{args:r?e[0]:void 0,options:(r?e[1]:e[0])??{}}}var k=r(25921),x=r(12990),S=r(96492),A=r(43551),C=r(51804),I=[{type:"constructor",inputs:[{name:"owner",type:"address",internalType:"address"}],stateMutability:"nonpayable"},{type:"fallback",stateMutability:"nonpayable"},{type:"function",name:"UPDATER_ROLE",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"cancelOwnershipHandover",inputs:[],outputs:[],stateMutability:"payable"},{type:"function",name:"completeOwnershipHandover",inputs:[{name:"pendingOwner",type:"address",internalType:"address"}],outputs:[],stateMutability:"payable"},{type:"function",name:"currentRoot",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getCurrentTreeState",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getLastUpdateBlock",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getLastUpdateTime",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"grantRoles",inputs:[{name:"user",type:"address",internalType:"address"},{name:"roles",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"payable"},{type:"function",name:"hasAllRoles",inputs:[{name:"user",type:"address",internalType:"address"},{name:"roles",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"hasAnyRole",inputs:[{name:"user",type:"address",internalType:"address"},{name:"roles",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"result",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ownershipHandoverExpiresAt",inputs:[{name:"pendingOwner",type:"address",internalType:"address"}],outputs:[{name:"result",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"renounceOwnership",inputs:[],outputs:[],stateMutability:"payable"},{type:"function",name:"renounceRoles",inputs:[{name:"roles",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"payable"},{type:"function",name:"requestOwnershipHandover",inputs:[],outputs:[],stateMutability:"payable"},{type:"function",name:"revokeRoles",inputs:[{name:"user",type:"address",internalType:"address"},{name:"roles",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"payable"},{type:"function",name:"rolesOf",inputs:[{name:"user",type:"address",internalType:"address"}],outputs:[{name:"roles",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"rootCache",inputs:[{name:"root",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"rootInfo",inputs:[{name:"root",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"tuple",internalType:"struct RootInfo",components:[{name:"treeSize",type:"uint176",internalType:"uint176"},{name:"timestamp",type:"uint40",internalType:"uint40"},{name:"height",type:"uint40",internalType:"uint40"}]}],stateMutability:"view"},{type:"function",name:"safeVerifyProof",inputs:[{name:"proof",type:"tuple",internalType:"struct Proof",components:[{name:"index",type:"uint256",internalType:"uint256"},{name:"leaf",type:"bytes32",internalType:"bytes32"},{name:"leftRange",type:"bytes32[]",internalType:"bytes32[]"},{name:"rightRange",type:"bytes32[]",internalType:"bytes32[]"},{name:"targetRoot",type:"bytes32",internalType:"bytes32"}]}],outputs:[{name:"isValid",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"transferOwnership",inputs:[{name:"newOwner",type:"address",internalType:"address"}],outputs:[],stateMutability:"payable"},{type:"function",name:"updateTreeRoot",inputs:[{name:"newSize",type:"uint256",internalType:"uint256"},{name:"oldRange",type:"bytes32[]",internalType:"bytes32[]"},{name:"newRange",type:"bytes32[]",internalType:"bytes32[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"verifyProof",inputs:[{name:"proof",type:"tuple",internalType:"struct Proof",components:[{name:"index",type:"uint256",internalType:"uint256"},{name:"leaf",type:"bytes32",internalType:"bytes32"},{name:"leftRange",type:"bytes32[]",internalType:"bytes32[]"},{name:"rightRange",type:"bytes32[]",internalType:"bytes32[]"},{name:"targetRoot",type:"bytes32",internalType:"bytes32"}]}],outputs:[],stateMutability:"view"},{type:"event",name:"OwnershipHandoverCanceled",inputs:[{name:"pendingOwner",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"OwnershipHandoverRequested",inputs:[{name:"pendingOwner",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"oldOwner",type:"address",indexed:!0,internalType:"address"},{name:"newOwner",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"RolesUpdated",inputs:[{name:"user",type:"address",indexed:!0,internalType:"address"},{name:"roles",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"RootUpdated",inputs:[{name:"newRoot",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"newSize",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"error",name:"AlreadyInitialized",inputs:[]},{type:"error",name:"InvalidProofBadLeftRange",inputs:[]},{type:"error",name:"InvalidProofBadRightRange",inputs:[]},{type:"error",name:"InvalidProofLeafIdxOutOfBounds",inputs:[]},{type:"error",name:"InvalidProofUnrecognizedRoot",inputs:[]},{type:"error",name:"InvalidUpdateNewRangeMismatchWrongLength",inputs:[]},{type:"error",name:"InvalidUpdateOldRangeMismatchShouldBeEmpty",inputs:[]},{type:"error",name:"InvalidUpdateOldRangeMismatchWrongCurrentRoot",inputs:[]},{type:"error",name:"InvalidUpdateOldRangeMismatchWrongLength",inputs:[]},{type:"error",name:"InvalidUpdateTreeSizeMustGrow",inputs:[]},{type:"error",name:"NewOwnerIsZeroAddress",inputs:[]},{type:"error",name:"NoHandoverRequest",inputs:[]},{type:"error",name:"Unauthorized",inputs:[]}],R={[n.u.id]:{address:"0x0000000e143f453f45B2E1cCaDc0f3CE21c2F06a",startBlock:10576562},[i.R.id]:{address:"0x0000000e143f453f45B2E1cCaDc0f3CE21c2F06a",startBlock:19228593},[s.v.id]:{address:"0x0000000e143f453f45B2E1cCaDc0f3CE21c2F06a",startBlock:116171910},[a.y.id]:{address:"0x0000000e143f453f45B2E1cCaDc0f3CE21c2F06a",startBlock:240455867},[o.L.id]:{address:"0x0000000159C8253802551eEaf8b475db1A50d712",startBlock:6048293},[u.F.id]:{address:"0x00000008bcf12Eeb9E4162687D6D251f0F4e7FC2",startBlock:5282847},[c.O.id]:{address:"0x0000000a3fa5CFe56b202F376cCa7334c93aEB8b",startBlock:8043289},[l.Z.id]:{address:"0x00000006399970c8bdad606abD03b1712974E4eA",startBlock:31706016},[d.q.id]:{address:"0x000000031C0d9df77F390CED953219E561B67089",startBlock:9299836}},P=[n.u,i.R,s.v,a.y,o.L,u.F,c.O,l.Z,d.q],N=P.map(e=>e.id),M=e=>{let t=P.find(t=>t.id===e);if(!t)throw Error("Unsupported chain: ".concat(e));return t};async function T(e){let{contract:t,publicClient:r,ethRpc:n}=e;if(t)return t;if(r)return w({client:r,address:R[r.chain.id].address,abi:I});let i=(0,k.d)(n,{batch:!0}),s=M(await (0,x.v)({transport:i}).getChainId());return w({client:(0,x.v)({chain:s,transport:i}),address:R[s.id].address,abi:I})}var O={authToken:"",chainId:n.u.id,endpoint:"https://api.witness.co"},D=(0,k.d)("https://base-mainnet.g.alchemy.com/v2/0EArwrcjeLdLrQ9b-3Nac-dktS4LNMDM",{batch:!0}),L=w({client:(0,x.v)({chain:n.u,transport:D}),address:R[n.u.id].address,abi:I});function B(e){if(!(0,C.l)(e))throw Error("".concat(e," is not a valid hash"));return e}var q=async(e,t)=>{let r=[];for(;;)try{let r=await fetch(e,t);if(!r.ok)throw Error("HTTP Error ".concat(r.status,": ").concat(r.statusText));return await r.json()}catch(t){if(r.push(t),r.length>=4)break;let e=2**r.length*250;await z(e)}throw Error("Aggregate HTTP Error after 4 retries:\n".concat(r.join(",\n")))},z=e=>new Promise(t=>setTimeout(t,e)),U=(e,t)=>{let r=t?{Authorization:"Bearer ".concat(t)}:void 0;return async function(t){let{method:n,url:i,signal:s,headers:a}=t,o,u=new URL(i,e);if("get"===n&&t.params)for(let[e,r]of Object.entries(t.params))void 0!==r&&u.searchParams.append(e,r.toString());else"get"!==n&&t.data&&(o=JSON.stringify(t.data));return await q(u.toString(),{method:n,headers:{"Content-Type":"application/json","User-Agent":"WitnessCo/Client",...r,...a},signal:s,body:o})}},j=class{async getCurrentTreeState(){let{leafCount:e,merklizedRoot:t,merklizedLeafCount:r,unmerklizedLeafCount:n,checkpointedRoot:i,checkpointedLeafCount:s}=await this.client({method:"get",url:"/getTreeState",params:{}});return{leafCount:BigInt(e),merklizedRoot:B(t),merklizedLeafCount:BigInt(r),unmerklizedLeafCount:BigInt(n),checkpointedRoot:B(i),checkpointedLeafCount:BigInt(s)}}async waitForCheckpointedLeafHash(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.chainId,r=Date.now(),n=await this.getLeafIndexForHash(e);for(;;){let{treeSize:e,...i}=await this.getLatestOnchainCheckpoint(t),s=BigInt(e);if(s>n)return{treeSize:s,...i};if(Date.now()-r>9e5)throw Error("Timeout waiting for checkpoint covering leafIndex ".concat(n));await new Promise(e=>setTimeout(e,5e3))}}async postLeaf(e){let{leafIndex:t}=await this.client({method:"post",url:"/postLeafHash",data:{leafHash:e}});return{leafHash:e,leafIndex:BigInt(t)}}async postLeafAndGetProof(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.chainId;await this.postLeaf(e);let{treeSize:r}=await this.waitForCheckpointedLeafHash(e,t);return this.getProofForLeafHash(e,{targetTreeSize:r})}async postLeafAndGetTimestamp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.chainId;return await this.postLeaf(e),await this.waitForCheckpointedLeafHash(e,t),this.getTimestampForLeafHash(e,t)}async getTimestampForLeafHash(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.chainId,{timestamp:r}=await this.client({method:"get",url:"/getTimestampByLeafHash",params:{leafHash:e,chainId:t}});return new Date(1e3*Number(r))}async getLeafIndexForHash(e){return BigInt((await this.client({method:"get",url:"/getLeafIndexByHash",params:{leafHash:e}})).leafIndex)}async getEarliestCheckpointCoveringLeafIndex(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.chainId,{blockNumber:r,blockHash:n,timestamp:i,rootHash:s,treeSize:a,txHash:o,...u}=await this.client({method:"get",url:"/getEarliestCheckpointCoveringLeafIndex",params:{chainId:t,leafIndex:e.toString()}});return{...u,blockNumber:BigInt(r),blockHash:B(n),timestamp:new Date(1e3*Number(i)),rootHash:B(s),treeSize:BigInt(a),txHash:B(o)}}async getLatestOnchainCheckpoint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chainId,{blockNumber:t,blockHash:r,timestamp:n,rootHash:i,treeSize:s,txHash:a,...o}=await this.client({method:"get",url:"/getLatestCheckpoint",params:{chainId:e}});return{...o,blockNumber:BigInt(t),blockHash:B(r),timestamp:new Date(1e3*Number(n)),rootHash:B(i),treeSize:BigInt(s),txHash:B(a)}}async getLatestCheckpointForAllChains(){let e=await this.client({method:"get",url:"/getLatestCheckpointForAllChains",params:{}}),t={};for(let r in e){let{blockNumber:n,blockHash:i,timestamp:s,rootHash:a,treeSize:o,txHash:u,...c}=e[r];t[r]={...c,blockNumber:BigInt(n),blockHash:B(i),timestamp:new Date(1e3*Number(s)),rootHash:B(a),treeSize:BigInt(o),txHash:B(u)}}return t}async getCheckpointByTxHash(e){let{blockNumber:t,blockHash:r,timestamp:n,rootHash:i,treeSize:s,...a}=await this.client({method:"get",url:"/getCheckpointByTransactionHash",params:{txHash:e}});return{...a,blockNumber:BigInt(t),blockHash:B(r),timestamp:new Date(1e3*Number(n)),rootHash:B(i),treeSize:BigInt(s)}}async getProofForLeafHash(e){let{targetTreeSize:t,chainId:r=this.chainId}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{leafIndex:n,leftHashes:i,rightHashes:s,targetRootHash:a}=await this.client({method:"get",url:"/getProofForLeafHash",params:{leafHash:e,chainId:r,targetTreeSize:null==t?void 0:t.toString()}});return{leafIndex:BigInt(n),leafHash:e,leftHashes:i.map(B),rightHashes:s.map(B),targetRootHash:B(a)}}async verifyProofServer(e){let{leafIndex:t,...r}=e;return(await this.client({method:"post",url:"/postProof",data:{leafIndex:t.toString(),...r}})).success}async verifyProofChain(e,t){let r=t?await T(t):this.contract,{leafIndex:n,leafHash:i,leftHashes:s,rightHashes:a,targetRootHash:o}=e;return await r.read.safeVerifyProof([{index:n,leaf:i,leftRange:null!=s?s:[],rightRange:null!=a?a:[],targetRoot:o}])}hash(e){let t=(0,S._)(["string"],[e]);return(0,A.w)(t)}constructor(e=""){this.contract=L;let{chain:t,server:r}="string"==typeof e?{server:{authToken:e}}:e;t&&T(t).then(e=>{this.contract=e});let{authToken:n,chainId:i,endpoint:s}={...O,...r};this.chainId=i,this.client=U(s,n)}}},45252:function(e,t,r){"use strict";function n(e,t){let r=e.exec(t);return r?.groups}r.d(t,{Zw:function(){return n},cN:function(){return a},eL:function(){return i},lh:function(){return s}});let i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,s=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,a=/^\(.+?\).*?$/},19586:function(){"use strict";let e=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"],t=[..."0123456789"],r=[..."CDEHKMPRTUWXY012458"],n=[..."!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],i=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"],s=(e,t)=>e[t]+(e[t+1]<<8),a=async(e,t,r)=>{let n=t.length,i=Math.floor(65536/n)*n-1,a=2*Math.ceil(1.1*e),o="",u=0;for(;u<e;){let c=await r(a),l=0;for(;l<a&&u<e;){let e=s(c,l);l+=2,!(e>i)&&(o+=t[e%n],u++)}}return o},o=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),u=(s,a,u)=>({length:c,type:l,characters:d})=>{if(!(c>=0&&Number.isFinite(c)))throw TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==l&&void 0!==d)throw TypeError("Expected either `type` or `characters`");if(void 0!==d&&"string"!=typeof d)throw TypeError("Expected `characters` to be string");if(!o.has(l))throw TypeError(`Unknown type: ${l}`);if(void 0===l&&void 0===d&&(l="hex"),"hex"===l||void 0===l&&void 0===d)return a(Math.ceil(.5*c),"hex",c);if("base64"===l)return a(Math.ceil(.75*c),"base64",c);if("url-safe"===l)return s(c,e,u);if("numeric"===l)return s(c,t,u);if("distinguishable"===l)return s(c,r,u);if("ascii-printable"===l)return s(c,n,u);if("alphanumeric"===l)return s(c,i,u);if(0===d.length)throw TypeError("Expected `characters` string length to be greater than or equal to 1");if(d.length>65536)throw TypeError("Expected `characters` string length to be less or equal to 65536");return s(c,d,u)},c=e=>[...e].map(e=>e.toString(16).padStart(2,"0")).join(""),l=e=>btoa(String.fromCodePoint(...e));function d(e){let t=new Uint8Array(e);for(let r=0;r<e;r+=65536)t.set(crypto.getRandomValues(new Uint8Array(Math.min(65536,e-r))),r);return t}function h(e,t,r){return("hex"===t?c:l)(d(e)).slice(0,r)}u((e,t,r)=>{let n=t.length,i=Math.floor(65536/n)*n-1,a=2*Math.ceil(1.1*e),o="",u=0;for(;u<e;){let c=r(a),l=0;for(;l<a&&u<e;){let e=s(c,l);l+=2,!(e>i)&&(o+=t[e%n],u++)}}return o},h,d),u(a,h,d)},25575:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(8440);function i(e){return(0,n.Q)(1e3*e)}},76249:function(e,t,r){"use strict";r.d(t,{Q:function(){return i}});var n=r(8440);function i(e){return Math.trunc(+(0,n.Q)(e)/1e3)}},8440:function(e,t,r){"use strict";function n(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}r.d(t,{Q:function(){return n}})},11164:function(e,t,r){"use strict";r.d(t,{ZP:function(){return o}});let n=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,i=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,s=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function a(e,t){if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);return}return t}function o(e,t={}){if("string"!=typeof e)return e;let r=e.trim();if('"'===e[0]&&e.endsWith('"')&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){let e=r.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!s.test(e)){if(t.strict)throw SyntaxError("[destr] Invalid JSON");return e}try{if(n.test(e)||i.test(e)){if(t.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(e,a)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}},66010:function(e,t,r){"use strict";r.d(t,{v:function(){return n}});var n=r(46962);t.Z=n},41973:function(e,t,r){"use strict";r.d(t,{g7:function(){return n},xv:function(){return i}});let n=new TextEncoder,i=new TextDecoder},92385:function(e,t,r){"use strict";r.d(t,{J:function(){return o},c:function(){return a}});var n=r(41973);let i=e=>{let t=e;"string"==typeof t&&(t=n.g7.encode(t));let r=[];for(let e=0;e<t.length;e+=32768)r.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(r.join(""))},s=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},a=e=>i(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),o=e=>{let t=e;t instanceof Uint8Array&&(t=n.xv.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return s(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}}},65078:function(e,t,r){"use strict";r.d(t,{t:function(){return o}});var n=r(92385),i=r(41973);class s extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}class a extends s{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}function o(e){let t,r;if("string"!=typeof e)throw new a("JWTs must use Compact JWS serialization, JWT must be a string");let{1:s,length:o}=e.split(".");if(5===o)throw new a("Only JWTs using Compact JWS serialization can be decoded");if(3!==o)throw new a("Invalid JWT");if(!s)throw new a("JWTs must contain a payload");try{t=(0,n.J)(s)}catch(e){throw new a("Failed to base64url decode the payload")}try{r=JSON.parse(i.xv.decode(t))}catch(e){throw new a("Failed to parse the decoded payload as JSON")}if(!function(e){if(!("object"==typeof e&&null!==e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(r))throw new a("Invalid JWT Claims Set");return r}},59126:function(e,t,r){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}r.d(t,{Z:function(){return i}});var i=function e(t,r){function i(e,i,s){if("undefined"!=typeof document){"number"==typeof(s=n({},r,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var o in s)s[o]&&(a+="; "+o,!0!==s[o]&&(a+="="+s[o].split(";")[0]));return document.cookie=e+"="+t.write(i,e)+a}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},i=0;i<r.length;i++){var s=r[i].split("="),a=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(n[o]=t.read(a,o),e===o)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){i(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},92730:function(e,t,r){"use strict";function n(){let e=new Set,t=[],r=()=>(function(e){if("undefined"==typeof window)return;let t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)})(r=>{t.some(({info:e})=>e.uuid===r.info.uuid)||(t=[...t,r],e.forEach(e=>e(t,{added:[r]})))}),n=r();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),n?.()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),n?.(),n=r()},subscribe:(r,{emitImmediately:n}={})=>(e.add(r),n&&r(t,{added:t}),()=>e.delete(r))}}r.d(t,{M:function(){return n}})},37769:function(e,t,r){"use strict";r.d(t,{Wg:function(){return u}});var n=r(18437);let i=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}(),s=i.fetch?(...e)=>i.fetch(...e):()=>Promise.reject(Error("[ofetch] global.fetch is not supported!")),a=i.Headers,o=i.AbortController,u=(0,n.c)({fetch:s,Headers:a,AbortController:o})},18437:function(e,t,r){"use strict";r.d(t,{F:function(){return x},c:function(){return function e(t={}){let{fetch:r=globalThis.fetch,Headers:i=globalThis.Headers,AbortController:s=globalThis.AbortController}=t;async function a(e){let t=e.error&&"AbortError"===e.error.name&&!e.options.timeout||!1;if(!1!==e.options.retry&&!t){let t;t="number"==typeof e.options.retry?e.options.retry:A(e.options.method)?0:1;let r=e.response&&e.response.status||500;if(t>0&&(Array.isArray(e.options.retryStatusCodes)?e.options.retryStatusCodes.includes(r):P.has(r))){let r="function"==typeof e.options.retryDelay?e.options.retryDelay(e):e.options.retryDelay||0;return r>0&&await new Promise(e=>setTimeout(e,r)),o(e.request,{...e.options,retry:t-1})}}let r=function(e){let t=e.error?.message||e.error?.toString()||"",r=e.request?.method||e.options?.method||"GET",n=e.request?.url||String(e.request)||"/",i=`[${r}] ${JSON.stringify(n)}`,s=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",a=new x(`${i}: ${s}${t?` ${t}`:""}`,e.error?{cause:e.error}:void 0);for(let t of["request","options","response"])Object.defineProperty(a,t,{get:()=>e[t]});for(let[t,r]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,t,{get:()=>e.response&&e.response[r]});return a}(e);throw Error.captureStackTrace&&Error.captureStackTrace(r,o),r}let o=async function(e,o={}){let c;let l={request:e,options:function(e,t,r,n){let i;let s=function(e,t,r){if(!t)return new r(e);let n=new r(t);if(e)for(let[t,i]of Symbol.iterator in e||Array.isArray(e)?e:new r(e))n.set(t,i);return n}(t?.headers??e?.headers,r?.headers,n);return(r?.query||r?.params||t?.params||t?.query)&&(i={...r?.params,...r?.query,...t?.params,...t?.query}),{...r,...t,query:i,params:i,headers:s}}(e,o,t.defaults,i),response:void 0,error:void 0};if(l.options.method=l.options.method?.toUpperCase(),l.options.onRequest&&await R(l,l.options.onRequest),"string"==typeof l.request&&(l.options.baseURL&&(l.request=function(e,t){if(!t||"/"===t||_(e))return e;let r=function(e="",t){return(!function(e="",t){return e.endsWith("/")}(e)?e:e.slice(0,-1))||"/"}(t);return e.startsWith(r)?e:function(e,...t){let r=e||"";for(let e of t.filter(e=>e&&"/"!==e))if(r){let t=e.replace(w,"");r=function(e="",t){return e.endsWith("/")?e:e+"/"}(r)+t}else r=e;return r}(r,e)}(l.request,l.options.baseURL)),l.options.query&&(l.request=function(e,t){let r=function e(t="",r){let n=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=""]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:"",host:"",search:"",hash:""}}if(!_(t,{acceptRelative:!0}))return r?e(r+t):k(t);let[,i="",s,a=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o="",u=""]=a.match(/([^#/?]*)(.*)?/)||[];"file:"===i&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:c,search:l,hash:d}=k(u);return{protocol:i.toLowerCase(),auth:s?s.slice(0,Math.max(0,s.length-1)):"",host:o,pathname:c,search:l,hash:d,[E]:!i}}(e),n={...function(e=""){let t={};for(let r of("?"===e[0]&&(e=e.slice(1)),e.split("&"))){let e=r.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let n=m(e[1].replace(u," "));if("__proto__"===n||"constructor"===n)continue;let i=m((e[2]||"").replace(u," "));void 0===t[n]?t[n]=i:Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]}return t}(r.search),...t};return r.search=Object.keys(n).filter(e=>void 0!==n[e]).map(e=>{var t;return(("number"==typeof(t=n[e])||"boolean"==typeof t)&&(t=String(t)),t)?Array.isArray(t)?t.map(t=>`${p(e)}=${f(t)}`).join("&"):`${p(e)}=${f(t)}`:p(e)}).filter(Boolean).join("&"),function(e){let t=e.pathname||"",r=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",n=e.hash||"",i=e.auth?e.auth+"@":"",s=e.host||"";return(e.protocol||e[E]?(e.protocol||"")+"//":"")+i+s+t+r+n}(r)}(l.request,l.options.query))),l.options.body&&A(l.options.method)&&(function(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}(l.options.body)?(l.options.body="string"==typeof l.options.body?l.options.body:JSON.stringify(l.options.body),l.options.headers=new i(l.options.headers||{}),l.options.headers.has("content-type")||l.options.headers.set("content-type","application/json"),l.options.headers.has("accept")||l.options.headers.set("accept","application/json")):("pipeTo"in l.options.body&&"function"==typeof l.options.body.pipeTo||"function"==typeof l.options.body.pipe)&&!("duplex"in l.options)&&(l.options.duplex="half")),!l.options.signal&&l.options.timeout){let e=new s;c=setTimeout(()=>{let t=Error("[TimeoutError]: The operation was aborted due to timeout");t.name="TimeoutError",t.code=23,e.abort(t)},l.options.timeout),l.options.signal=e.signal}try{l.response=await r(l.request,l.options)}catch(e){return l.error=e,l.options.onRequestError&&await R(l,l.options.onRequestError),await a(l)}finally{c&&clearTimeout(c)}if(l.response.body&&!N.has(l.response.status)&&"HEAD"!==l.options.method){let e=(l.options.parseResponse?"json":l.options.responseType)||function(e=""){if(!e)return"json";let t=e.split(";").shift()||"";return I.test(t)?"json":C.has(t)||t.startsWith("text/")?"text":"blob"}(l.response.headers.get("content-type")||"");switch(e){case"json":{let e=await l.response.text(),t=l.options.parseResponse||n.ZP;l.response._data=t(e);break}case"stream":l.response._data=l.response.body;break;default:l.response._data=await l.response[e]()}}return(l.options.onResponse&&await R(l,l.options.onResponse),!l.options.ignoreResponseError&&l.response.status>=400&&l.response.status<600)?(l.options.onResponseError&&await R(l,l.options.onResponseError),await a(l)):l.response},c=async function(e,t){return(await o(e,t))._data};return c.raw=o,c.native=(...e)=>r(...e),c.create=(r={},n={})=>e({...t,...n,defaults:{...t.defaults,...n.defaults,...r}}),c}}});var n=r(11164);let i=/#/g,s=/&/g,a=/\//g,o=/=/g,u=/\+/g,c=/%5e/gi,l=/%60/gi,d=/%7c/gi,h=/%20/gi;function f(e){return encodeURI(""+("string"==typeof e?e:JSON.stringify(e))).replace(d,"|").replace(u,"%2B").replace(h,"+").replace(i,"%23").replace(s,"%26").replace(l,"`").replace(c,"^").replace(a,"%2F")}function p(e){return f(e).replace(o,"%3D")}function m(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}let g=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,y=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,b=/^([/\\]\s*){2,}[^/\\]/,v=/\/$|\/\?|\/#/,w=/^\.?\//;function _(e,t={}){return("boolean"==typeof t&&(t={acceptRelative:t}),t.strict)?g.test(e):y.test(e)||!!t.acceptRelative&&b.test(e)}let E=Symbol.for("ufo:protocolRelative");function k(e=""){let[t="",r="",n=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:n}}class x extends Error{constructor(e,t){super(e,t),this.name="FetchError",t?.cause&&!this.cause&&(this.cause=t.cause)}}let S=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function A(e="GET"){return S.has(e.toUpperCase())}let C=new Set(["image/svg","application/xml","application/xhtml","application/html"]),I=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;async function R(e,t){if(t){if(Array.isArray(t))for(let r of t)await r(e);else await t(e)}}let P=new Set([408,409,425,429,500,502,503,504]),N=new Set([101,204,205,304])},11091:function(e,t,r){"use strict";function n(e){return crypto.getRandomValues(new Uint8Array(e))}function i(){let[e]=n(1);return e}function s(){let[e,t]=n(2);return(e<<8)+t}function a(e,t,r="-"){if("number"!=typeof e||e<1)throw Error("Invalid argument: length argument must be a number greater than or equal to 1");if(!Array.isArray(t)||t.length<2)throw Error("Invalid argument: wordlist argument must be an array with length greater than or equal to 2");if("string"!=typeof r)throw Error("Invalid argument: sep argument must be a string");return(function(e,t,r){if("number"!=typeof e||e<1)throw Error("Invalid argument: length must be a number greater than or equal to 1");if("number"!=typeof r||r>65536)throw Error("Invalid argument: end must be a number less than or equal to 65536");if(r-0<2)throw Error("Invalid range: range must contain at least two values");let n=[];for(let a=0;a<e;a++)n[a]=t+function(e){if("number"!=typeof e||e<2||e>65536)throw Error("Invalid number: number must be at least two and at most 65536");let t=e>256,r=t?s:i,n=e*Math.floor((t?65536:256)/e);for(;;){let t=r();if(t<n)return t%e}}(r-t);return n})(e,0,t.length).reduce((e,n,i)=>{let s=t[n];return e+(0===i?s:r+s)},"")}r.d(t,{OW:function(){return a}})},33387:function(e,t,r){"use strict";r.d(t,{k:function(){return n}});let n=Object.freeze(Object.freeze(["abacus","abdomen","abdominal","abide","abiding","ability","ablaze","able","abnormal","abrasion","abrasive","abreast","abridge","abroad","abruptly","absence","absentee","absently","absinthe","absolute","absolve","abstain","abstract","absurd","accent","acclaim","acclimate","accompany","account","accuracy","accurate","accustom","acetone","achiness","aching","acid","acorn","acquaint","acquire","acre","acrobat","acronym","acting","action","activate","activator","active","activism","activist","activity","actress","acts","acutely","acuteness","aeration","aerobics","aerosol","aerospace","afar","affair","affected","affecting","affection","affidavit","affiliate","affirm","affix","afflicted","affluent","afford","affront","aflame","afloat","aflutter","afoot","afraid","afterglow","afterlife","aftermath","aftermost","afternoon","aged","ageless","agency","agenda","agent","aggregate","aghast","agile","agility","aging","agnostic","agonize","agonizing","agony","agreeable","agreeably","agreed","agreeing","agreement","aground","ahead","ahoy","aide","aids","aim","ajar","alabaster","alarm","albatross","album","alfalfa","algebra","algorithm","alias","alibi","alienable","alienate","aliens","alike","alive","alkaline","alkalize","almanac","almighty","almost","aloe","aloft","aloha","alone","alongside","aloof","alphabet","alright","although","altitude","alto","aluminum","alumni","always","amaretto","amaze","amazingly","amber","ambiance","ambiguity","ambiguous","ambition","ambitious","ambulance","ambush","amendable","amendment","amends","amenity","amiable","amicably","amid","amigo","amino","amiss","ammonia","ammonium","amnesty","amniotic","among","amount","amperage","ample","amplifier","amplify","amply","amuck","amulet","amusable","amused","amusement","amuser","amusing","anaconda","anaerobic","anagram","anatomist","anatomy","anchor","anchovy","ancient","android","anemia","anemic","aneurism","anew","angelfish","angelic","anger","angled","angler","angles","angling","angrily","angriness","anguished","angular","animal","animate","animating","animation","animator","anime","animosity","ankle","annex","annotate","announcer","annoying","annually","annuity","anointer","another","answering","antacid","antarctic","anteater","antelope","antennae","anthem","anthill","anthology","antibody","antics","antidote","antihero","antiquely","antiques","antiquity","antirust","antitoxic","antitrust","antiviral","antivirus","antler","antonym","antsy","anvil","anybody","anyhow","anymore","anyone","anyplace","anything","anytime","anyway","anywhere","aorta","apache","apostle","appealing","appear","appease","appeasing","appendage","appendix","appetite","appetizer","applaud","applause","apple","appliance","applicant","applied","apply","appointee","appraisal","appraiser","apprehend","approach","approval","approve","apricot","april","apron","aptitude","aptly","aqua","aqueduct","arbitrary","arbitrate","ardently","area","arena","arguable","arguably","argue","arise","armadillo","armband","armchair","armed","armful","armhole","arming","armless","armoire","armored","armory","armrest","army","aroma","arose","around","arousal","arrange","array","arrest","arrival","arrive","arrogance","arrogant","arson","art","ascend","ascension","ascent","ascertain","ashamed","ashen","ashes","ashy","aside","askew","asleep","asparagus","aspect","aspirate","aspire","aspirin","astonish","astound","astride","astrology","astronaut","astronomy","astute","atlantic","atlas","atom","atonable","atop","atrium","atrocious","atrophy","attach","attain","attempt","attendant","attendee","attention","attentive","attest","attic","attire","attitude","attractor","attribute","atypical","auction","audacious","audacity","audible","audibly","audience","audio","audition","augmented","august","authentic","author","autism","autistic","autograph","automaker","automated","automatic","autopilot","available","avalanche","avatar","avenge","avenging","avenue","average","aversion","avert","aviation","aviator","avid","avoid","await","awaken","award","aware","awhile","awkward","awning","awoke","awry","axis","babble","babbling","babied","baboon","backache","backboard","backboned","backdrop","backed","backer","backfield","backfire","backhand","backing","backlands","backlash","backless","backlight","backlit","backlog","backpack","backpedal","backrest","backroom","backshift","backside","backslid","backspace","backspin","backstab","backstage","backtalk","backtrack","backup","backward","backwash","backwater","backyard","bacon","bacteria","bacterium","badass","badge","badland","badly","badness","baffle","baffling","bagel","bagful","baggage","bagged","baggie","bagginess","bagging","baggy","bagpipe","baguette","baked","bakery","bakeshop","baking","balance","balancing","balcony","balmy","balsamic","bamboo","banana","banish","banister","banjo","bankable","bankbook","banked","banker","banking","banknote","bankroll","banner","bannister","banshee","banter","barbecue","barbed","barbell","barber","barcode","barge","bargraph","barista","baritone","barley","barmaid","barman","barn","barometer","barrack","barracuda","barrel","barrette","barricade","barrier","barstool","bartender","barterer","bash","basically","basics","basil","basin","basis","basket","batboy","batch","bath","baton","bats","battalion","battered","battering","battery","batting","battle","bauble","bazooka","blabber","bladder","blade","blah","blame","blaming","blanching","blandness","blank","blaspheme","blasphemy","blast","blatancy","blatantly","blazer","blazing","bleach","bleak","bleep","blemish","blend","bless","blighted","blimp","bling","blinked","blinker","blinking","blinks","blip","blissful","blitz","blizzard","bloated","bloating","blob","blog","bloomers","blooming","blooper","blot","blouse","blubber","bluff","bluish","blunderer","blunt","blurb","blurred","blurry","blurt","blush","blustery","boaster","boastful","boasting","boat","bobbed","bobbing","bobble","bobcat","bobsled","bobtail","bodacious","body","bogged","boggle","bogus","boil","bok","bolster","bolt","bonanza","bonded","bonding","bondless","boned","bonehead","boneless","bonelike","boney","bonfire","bonnet","bonsai","bonus","bony","boogeyman","boogieman","book","boondocks","booted","booth","bootie","booting","bootlace","bootleg","boots","boozy","borax","boring","borough","borrower","borrowing","boss","botanical","botanist","botany","botch","both","bottle","bottling","bottom","bounce","bouncing","bouncy","bounding","boundless","bountiful","bovine","boxcar","boxer","boxing","boxlike","boxy","breach","breath","breeches","breeching","breeder","breeding","breeze","breezy","brethren","brewery","brewing","briar","bribe","brick","bride","bridged","brigade","bright","brilliant","brim","bring","brink","brisket","briskly","briskness","bristle","brittle","broadband","broadcast","broaden","broadly","broadness","broadside","broadways","broiler","broiling","broken","broker","bronchial","bronco","bronze","bronzing","brook","broom","brought","browbeat","brownnose","browse","browsing","bruising","brunch","brunette","brunt","brush","brussels","brute","brutishly","bubble","bubbling","bubbly","buccaneer","bucked","bucket","buckle","buckshot","buckskin","bucktooth","buckwheat","buddhism","buddhist","budding","buddy","budget","buffalo","buffed","buffer","buffing","buffoon","buggy","bulb","bulge","bulginess","bulgur","bulk","bulldog","bulldozer","bullfight","bullfrog","bullhorn","bullion","bullish","bullpen","bullring","bullseye","bullwhip","bully","bunch","bundle","bungee","bunion","bunkbed","bunkhouse","bunkmate","bunny","bunt","busboy","bush","busily","busload","bust","busybody","buzz","cabana","cabbage","cabbie","cabdriver","cable","caboose","cache","cackle","cacti","cactus","caddie","caddy","cadet","cadillac","cadmium","cage","cahoots","cake","calamari","calamity","calcium","calculate","calculus","caliber","calibrate","calm","caloric","calorie","calzone","camcorder","cameo","camera","camisole","camper","campfire","camping","campsite","campus","canal","canary","cancel","candied","candle","candy","cane","canine","canister","cannabis","canned","canning","cannon","cannot","canola","canon","canopener","canopy","canteen","canyon","capable","capably","capacity","cape","capillary","capital","capitol","capped","capricorn","capsize","capsule","caption","captivate","captive","captivity","capture","caramel","carat","caravan","carbon","cardboard","carded","cardiac","cardigan","cardinal","cardstock","carefully","caregiver","careless","caress","caretaker","cargo","caring","carless","carload","carmaker","carnage","carnation","carnival","carnivore","carol","carpenter","carpentry","carpool","carport","carried","carrot","carrousel","carry","cartel","cartload","carton","cartoon","cartridge","cartwheel","carve","carving","carwash","cascade","case","cash","casing","casino","casket","cassette","casually","casualty","catacomb","catalog","catalyst","catalyze","catapult","cataract","catatonic","catcall","catchable","catcher","catching","catchy","caterer","catering","catfight","catfish","cathedral","cathouse","catlike","catnap","catnip","catsup","cattail","cattishly","cattle","catty","catwalk","caucasian","caucus","causal","causation","cause","causing","cauterize","caution","cautious","cavalier","cavalry","caviar","cavity","cedar","celery","celestial","celibacy","celibate","celtic","cement","census","ceramics","ceremony","certainly","certainty","certified","certify","cesarean","cesspool","chafe","chaffing","chain","chair","chalice","challenge","chamber","chamomile","champion","chance","change","channel","chant","chaos","chaperone","chaplain","chapped","chaps","chapter","character","charbroil","charcoal","charger","charging","chariot","charity","charm","charred","charter","charting","chase","chasing","chaste","chastise","chastity","chatroom","chatter","chatting","chatty","cheating","cheddar","cheek","cheer","cheese","cheesy","chef","chemicals","chemist","chemo","cherisher","cherub","chess","chest","chevron","chevy","chewable","chewer","chewing","chewy","chief","chihuahua","childcare","childhood","childish","childless","childlike","chili","chill","chimp","chip","chirping","chirpy","chitchat","chivalry","chive","chloride","chlorine","choice","chokehold","choking","chomp","chooser","choosing","choosy","chop","chosen","chowder","chowtime","chrome","chubby","chuck","chug","chummy","chump","chunk","churn","chute","cider","cilantro","cinch","cinema","cinnamon","circle","circling","circular","circulate","circus","citable","citadel","citation","citizen","citric","citrus","city","civic","civil","clad","claim","clambake","clammy","clamor","clamp","clamshell","clang","clanking","clapped","clapper","clapping","clarify","clarinet","clarity","clash","clasp","class","clatter","clause","clavicle","claw","clay","clean","clear","cleat","cleaver","cleft","clench","clergyman","clerical","clerk","clever","clicker","client","climate","climatic","cling","clinic","clinking","clip","clique","cloak","clobber","clock","clone","cloning","closable","closure","clothes","clothing","cloud","clover","clubbed","clubbing","clubhouse","clump","clumsily","clumsy","clunky","clustered","clutch","clutter","coach","coagulant","coastal","coaster","coasting","coastland","coastline","coat","coauthor","cobalt","cobbler","cobweb","cocoa","coconut","cod","coeditor","coerce","coexist","coffee","cofounder","cognition","cognitive","cogwheel","coherence","coherent","cohesive","coil","coke","cola","cold","coleslaw","coliseum","collage","collapse","collar","collected","collector","collide","collie","collision","colonial","colonist","colonize","colony","colossal","colt","coma","come","comfort","comfy","comic","coming","comma","commence","commend","comment","commerce","commode","commodity","commodore","common","commotion","commute","commuting","compacted","compacter","compactly","compactor","companion","company","compare","compel","compile","comply","component","composed","composer","composite","compost","composure","compound","compress","comprised","computer","computing","comrade","concave","conceal","conceded","concept","concerned","concert","conch","concierge","concise","conclude","concrete","concur","condense","condiment","condition","condone","conducive","conductor","conduit","cone","confess","confetti","confidant","confident","confider","confiding","configure","confined","confining","confirm","conflict","conform","confound","confront","confused","confusing","confusion","congenial","congested","congrats","congress","conical","conjoined","conjure","conjuror","connected","connector","consensus","consent","console","consoling","consonant","constable","constant","constrain","constrict","construct","consult","consumer","consuming","contact","container","contempt","contend","contented","contently","contents","contest","context","contort","contour","contrite","control","contusion","convene","convent","copartner","cope","copied","copier","copilot","coping","copious","copper","copy","coral","cork","cornball","cornbread","corncob","cornea","corned","corner","cornfield","cornflake","cornhusk","cornmeal","cornstalk","corny","coronary","coroner","corporal","corporate","corral","correct","corridor","corrode","corroding","corrosive","corsage","corset","cortex","cosigner","cosmetics","cosmic","cosmos","cosponsor","cost","cottage","cotton","couch","cough","could","countable","countdown","counting","countless","country","county","courier","covenant","cover","coveted","coveting","coyness","cozily","coziness","cozy","crabbing","crabgrass","crablike","crabmeat","cradle","cradling","crafter","craftily","craftsman","craftwork","crafty","cramp","cranberry","crane","cranial","cranium","crank","crate","crave","craving","crawfish","crawlers","crawling","crayfish","crayon","crazed","crazily","craziness","crazy","creamed","creamer","creamlike","crease","creasing","creatable","create","creation","creative","creature","credible","credibly","credit","creed","creme","creole","crepe","crept","crescent","crested","cresting","crestless","crevice","crewless","crewman","crewmate","crib","cricket","cried","crier","crimp","crimson","cringe","cringing","crinkle","crinkly","crisped","crisping","crisply","crispness","crispy","criteria","critter","croak","crock","crook","croon","crop","cross","crouch","crouton","crowbar","crowd","crown","crucial","crudely","crudeness","cruelly","cruelness","cruelty","crumb","crummiest","crummy","crumpet","crumpled","cruncher","crunching","crunchy","crusader","crushable","crushed","crusher","crushing","crust","crux","crying","cryptic","crystal","cubbyhole","cube","cubical","cubicle","cucumber","cuddle","cuddly","cufflink","culinary","culminate","culpable","culprit","cultivate","cultural","culture","cupbearer","cupcake","cupid","cupped","cupping","curable","curator","curdle","cure","curfew","curing","curled","curler","curliness","curling","curly","curry","curse","cursive","cursor","curtain","curtly","curtsy","curvature","curve","curvy","cushy","cusp","cussed","custard","custodian","custody","customary","customer","customize","customs","cut","cycle","cyclic","cycling","cyclist","cylinder","cymbal","cytoplasm","cytoplast","dab","dad","daffodil","dagger","daily","daintily","dainty","dairy","daisy","dallying","dance","dancing","dandelion","dander","dandruff","dandy","danger","dangle","dangling","daredevil","dares","daringly","darkened","darkening","darkish","darkness","darkroom","darling","darn","dart","darwinism","dash","dastardly","data","datebook","dating","daughter","daunting","dawdler","dawn","daybed","daybreak","daycare","daydream","daylight","daylong","dayroom","daytime","dazzler","dazzling","deacon","deafening","deafness","dealer","dealing","dealmaker","dealt","dean","debatable","debate","debating","debit","debrief","debtless","debtor","debug","debunk","decade","decaf","decal","decathlon","decay","deceased","deceit","deceiver","deceiving","december","decency","decent","deception","deceptive","decibel","decidable","decimal","decimeter","decipher","deck","declared","decline","decode","decompose","decorated","decorator","decoy","decrease","decree","dedicate","dedicator","deduce","deduct","deed","deem","deepen","deeply","deepness","deface","defacing","defame","default","defeat","defection","defective","defendant","defender","defense","defensive","deferral","deferred","defiance","defiant","defile","defiling","define","definite","deflate","deflation","deflator","deflected","deflector","defog","deforest","defraud","defrost","deftly","defuse","defy","degraded","degrading","degrease","degree","dehydrate","deity","dejected","delay","delegate","delegator","delete","deletion","delicacy","delicate","delicious","delighted","delirious","delirium","deliverer","delivery","delouse","delta","deluge","delusion","deluxe","demanding","demeaning","demeanor","demise","democracy","democrat","demote","demotion","demystify","denatured","deniable","denial","denim","denote","dense","density","dental","dentist","denture","deny","deodorant","deodorize","departed","departure","depict","deplete","depletion","deplored","deploy","deport","depose","depraved","depravity","deprecate","depress","deprive","depth","deputize","deputy","derail","deranged","derby","derived","desecrate","deserve","deserving","designate","designed","designer","designing","deskbound","desktop","deskwork","desolate","despair","despise","despite","destiny","destitute","destruct","detached","detail","detection","detective","detector","detention","detergent","detest","detonate","detonator","detoxify","detract","deuce","devalue","deviancy","deviant","deviate","deviation","deviator","device","devious","devotedly","devotee","devotion","devourer","devouring","devoutly","dexterity","dexterous","diabetes","diabetic","diabolic","diagnoses","diagnosis","diagram","dial","diameter","diaper","diaphragm","diary","dice","dicing","dictate","dictation","dictator","difficult","diffused","diffuser","diffusion","diffusive","dig","dilation","diligence","diligent","dill","dilute","dime","diminish","dimly","dimmed","dimmer","dimness","dimple","diner","dingbat","dinghy","dinginess","dingo","dingy","dining","dinner","diocese","dioxide","diploma","dipped","dipper","dipping","directed","direction","directive","directly","directory","direness","dirtiness","disabled","disagree","disallow","disarm","disarray","disaster","disband","disbelief","disburse","discard","discern","discharge","disclose","discolor","discount","discourse","discover","discuss","disdain","disengage","disfigure","disgrace","dish","disinfect","disjoin","disk","dislike","disliking","dislocate","dislodge","disloyal","dismantle","dismay","dismiss","dismount","disobey","disorder","disown","disparate","disparity","dispatch","dispense","dispersal","dispersed","disperser","displace","display","displease","disposal","dispose","disprove","dispute","disregard","disrupt","dissuade","distance","distant","distaste","distill","distinct","distort","distract","distress","district","distrust","ditch","ditto","ditzy","dividable","divided","dividend","dividers","dividing","divinely","diving","divinity","divisible","divisibly","division","divisive","divorcee","dizziness","dizzy","doable","docile","dock","doctrine","document","dodge","dodgy","doily","doing","dole","dollar","dollhouse","dollop","dolly","dolphin","domain","domelike","domestic","dominion","dominoes","donated","donation","donator","donor","donut","doodle","doorbell","doorframe","doorknob","doorman","doormat","doornail","doorpost","doorstep","doorstop","doorway","doozy","dork","dormitory","dorsal","dosage","dose","dotted","doubling","douche","dove","down","dowry","doze","drab","dragging","dragonfly","dragonish","dragster","drainable","drainage","drained","drainer","drainpipe","dramatic","dramatize","drank","drapery","drastic","draw","dreaded","dreadful","dreadlock","dreamboat","dreamily","dreamland","dreamless","dreamlike","dreamt","dreamy","drearily","dreary","drench","dress","drew","dribble","dried","drier","drift","driller","drilling","drinkable","drinking","dripping","drippy","drivable","driven","driver","driveway","driving","drizzle","drizzly","drone","drool","droop","drop-down","dropbox","dropkick","droplet","dropout","dropper","drove","drown","drowsily","drudge","drum","dry","dubbed","dubiously","duchess","duckbill","ducking","duckling","ducktail","ducky","duct","dude","duffel","dugout","duh","duke","duller","dullness","duly","dumping","dumpling","dumpster","duo","dupe","duplex","duplicate","duplicity","durable","durably","duration","duress","during","dusk","dust","dutiful","duty","duvet","dwarf","dweeb","dwelled","dweller","dwelling","dwindle","dwindling","dynamic","dynamite","dynasty","dyslexia","dyslexic","each","eagle","earache","eardrum","earflap","earful","earlobe","early","earmark","earmuff","earphone","earpiece","earplugs","earring","earshot","earthen","earthlike","earthling","earthly","earthworm","earthy","earwig","easeful","easel","easiest","easily","easiness","easing","eastbound","eastcoast","easter","eastward","eatable","eaten","eatery","eating","eats","ebay","ebony","ebook","ecard","eccentric","echo","eclair","eclipse","ecologist","ecology","economic","economist","economy","ecosphere","ecosystem","edge","edginess","edging","edgy","edition","editor","educated","education","educator","eel","effective","effects","efficient","effort","eggbeater","egging","eggnog","eggplant","eggshell","egomaniac","egotism","egotistic","either","eject","elaborate","elastic","elated","elbow","eldercare","elderly","eldest","electable","election","elective","elephant","elevate","elevating","elevation","elevator","eleven","elf","eligible","eligibly","eliminate","elite","elitism","elixir","elk","ellipse","elliptic","elm","elongated","elope","eloquence","eloquent","elsewhere","elude","elusive","elves","email","embargo","embark","embassy","embattled","embellish","ember","embezzle","emblaze","emblem","embody","embolism","emboss","embroider","emcee","emerald","emergency","emission","emit","emote","emoticon","emotion","empathic","empathy","emperor","emphases","emphasis","emphasize","emphatic","empirical","employed","employee","employer","emporium","empower","emptier","emptiness","empty","emu","enable","enactment","enamel","enchanted","enchilada","encircle","enclose","enclosure","encode","encore","encounter","encourage","encroach","encrust","encrypt","endanger","endeared","endearing","ended","ending","endless","endnote","endocrine","endorphin","endorse","endowment","endpoint","endurable","endurance","enduring","energetic","energize","energy","enforced","enforcer","engaged","engaging","engine","engorge","engraved","engraver","engraving","engross","engulf","enhance","enigmatic","enjoyable","enjoyably","enjoyer","enjoying","enjoyment","enlarged","enlarging","enlighten","enlisted","enquirer","enrage","enrich","enroll","enslave","ensnare","ensure","entail","entangled","entering","entertain","enticing","entire","entitle","entity","entomb","entourage","entrap","entree","entrench","entrust","entryway","entwine","enunciate","envelope","enviable","enviably","envious","envision","envoy","envy","enzyme","epic","epidemic","epidermal","epidermis","epidural","epilepsy","epileptic","epilogue","epiphany","episode","equal","equate","equation","equator","equinox","equipment","equity","equivocal","eradicate","erasable","erased","eraser","erasure","ergonomic","errand","errant","erratic","error","erupt","escalate","escalator","escapable","escapade","escapist","escargot","eskimo","esophagus","espionage","espresso","esquire","essay","essence","essential","establish","estate","esteemed","estimate","estimator","estranged","estrogen","etching","eternal","eternity","ethanol","ether","ethically","ethics","euphemism","evacuate","evacuee","evade","evaluate","evaluator","evaporate","evasion","evasive","even","everglade","evergreen","everybody","everyday","everyone","evict","evidence","evident","evil","evoke","evolution","evolve","exact","exalted","example","excavate","excavator","exceeding","exception","excess","exchange","excitable","exciting","exclaim","exclude","excluding","exclusion","exclusive","excretion","excretory","excursion","excusable","excusably","excuse","exemplary","exemplify","exemption","exerciser","exert","exes","exfoliate","exhale","exhaust","exhume","exile","existing","exit","exodus","exonerate","exorcism","exorcist","expand","expanse","expansion","expansive","expectant","expedited","expediter","expel","expend","expenses","expensive","expert","expire","expiring","explain","expletive","explicit","explode","exploit","explore","exploring","exponent","exporter","exposable","expose","exposure","express","expulsion","exquisite","extended","extending","extent","extenuate","exterior","external","extinct","extortion","extradite","extras","extrovert","extrude","extruding","exuberant","fable","fabric","fabulous","facebook","facecloth","facedown","faceless","facelift","faceplate","faceted","facial","facility","facing","facsimile","faction","factoid","factor","factsheet","factual","faculty","fade","fading","failing","falcon","fall","false","falsify","fame","familiar","family","famine","famished","fanatic","fancied","fanciness","fancy","fanfare","fang","fanning","fantasize","fantastic","fantasy","fascism","fastball","faster","fasting","fastness","faucet","favorable","favorably","favored","favoring","favorite","fax","feast","federal","fedora","feeble","feed","feel","feisty","feline","felt-tip","feminine","feminism","feminist","feminize","femur","fence","fencing","fender","ferment","fernlike","ferocious","ferocity","ferret","ferris","ferry","fervor","fester","festival","festive","festivity","fetal","fetch","fever","fiber","fiction","fiddle","fiddling","fidelity","fidgeting","fidgety","fifteen","fifth","fiftieth","fifty","figment","figure","figurine","filing","filled","filler","filling","film","filter","filth","filtrate","finale","finalist","finalize","finally","finance","financial","finch","fineness","finer","finicky","finished","finisher","finishing","finite","finless","finlike","fiscally","fit","five","flaccid","flagman","flagpole","flagship","flagstick","flagstone","flail","flakily","flaky","flame","flammable","flanked","flanking","flannels","flap","flaring","flashback","flashbulb","flashcard","flashily","flashing","flashy","flask","flatbed","flatfoot","flatly","flatness","flatten","flattered","flatterer","flattery","flattop","flatware","flatworm","flavored","flavorful","flavoring","flaxseed","fled","fleshed","fleshy","flick","flier","flight","flinch","fling","flint","flip","flirt","float","flock","flogging","flop","floral","florist","floss","flounder","flyable","flyaway","flyer","flying","flyover","flypaper","foam","foe","fog","foil","folic","folk","follicle","follow","fondling","fondly","fondness","fondue","font","food","fool","footage","football","footbath","footboard","footer","footgear","foothill","foothold","footing","footless","footman","footnote","footpad","footpath","footprint","footrest","footsie","footsore","footwear","footwork","fossil","foster","founder","founding","fountain","fox","foyer","fraction","fracture","fragile","fragility","fragment","fragrance","fragrant","frail","frame","framing","frantic","fraternal","frayed","fraying","frays","freckled","freckles","freebase","freebee","freebie","freedom","freefall","freehand","freeing","freeload","freely","freemason","freeness","freestyle","freeware","freeway","freewill","freezable","freezing","freight","french","frenzied","frenzy","frequency","frequent","fresh","fretful","fretted","friction","friday","fridge","fried","friend","frighten","frightful","frigidity","frigidly","frill","fringe","frisbee","frisk","fritter","frivolous","frolic","from","front","frostbite","frosted","frostily","frosting","frostlike","frosty","froth","frown","frozen","fructose","frugality","frugally","fruit","frustrate","frying","gab","gaffe","gag","gainfully","gaining","gains","gala","gallantly","galleria","gallery","galley","gallon","gallows","gallstone","galore","galvanize","gambling","game","gaming","gamma","gander","gangly","gangrene","gangway","gap","garage","garbage","garden","gargle","garland","garlic","garment","garnet","garnish","garter","gas","gatherer","gathering","gating","gauging","gauntlet","gauze","gave","gawk","gazing","gear","gecko","geek","geiger","gem","gender","generic","generous","genetics","genre","gentile","gentleman","gently","gents","geography","geologic","geologist","geology","geometric","geometry","geranium","gerbil","geriatric","germicide","germinate","germless","germproof","gestate","gestation","gesture","getaway","getting","getup","giant","gibberish","giblet","giddily","giddiness","giddy","gift","gigabyte","gigahertz","gigantic","giggle","giggling","giggly","gigolo","gilled","gills","gimmick","girdle","giveaway","given","giver","giving","gizmo","gizzard","glacial","glacier","glade","gladiator","gladly","glamorous","glamour","glance","glancing","glandular","glare","glaring","glass","glaucoma","glazing","gleaming","gleeful","glider","gliding","glimmer","glimpse","glisten","glitch","glitter","glitzy","gloater","gloating","gloomily","gloomy","glorified","glorifier","glorify","glorious","glory","gloss","glove","glowing","glowworm","glucose","glue","gluten","glutinous","glutton","gnarly","gnat","goal","goatskin","goes","goggles","going","goldfish","goldmine","goldsmith","golf","goliath","gonad","gondola","gone","gong","good","gooey","goofball","goofiness","goofy","google","goon","gopher","gore","gorged","gorgeous","gory","gosling","gossip","gothic","gotten","gout","gown","grab","graceful","graceless","gracious","gradation","graded","grader","gradient","grading","gradually","graduate","graffiti","grafted","grafting","grain","granddad","grandkid","grandly","grandma","grandpa","grandson","granite","granny","granola","grant","granular","grape","graph","grapple","grappling","grasp","grass","gratified","gratify","grating","gratitude","gratuity","gravel","graveness","graves","graveyard","gravitate","gravity","gravy","gray","grazing","greasily","greedily","greedless","greedy","green","greeter","greeting","grew","greyhound","grid","grief","grievance","grieving","grievous","grill","grimace","grimacing","grime","griminess","grimy","grinch","grinning","grip","gristle","grit","groggily","groggy","groin","groom","groove","grooving","groovy","grope","ground","grouped","grout","grove","grower","growing","growl","grub","grudge","grudging","grueling","gruffly","grumble","grumbling","grumbly","grumpily","grunge","grunt","guacamole","guidable","guidance","guide","guiding","guileless","guise","gulf","gullible","gully","gulp","gumball","gumdrop","gumminess","gumming","gummy","gurgle","gurgling","guru","gush","gusto","gusty","gutless","guts","gutter","guy","guzzler","gyration","habitable","habitant","habitat","habitual","hacked","hacker","hacking","hacksaw","had","haggler","haiku","half","halogen","halt","halved","halves","hamburger","hamlet","hammock","hamper","hamster","hamstring","handbag","handball","handbook","handbrake","handcart","handclap","handclasp","handcraft","handcuff","handed","handful","handgrip","handgun","handheld","handiness","handiwork","handlebar","handled","handler","handling","handmade","handoff","handpick","handprint","handrail","handsaw","handset","handsfree","handshake","handstand","handwash","handwork","handwoven","handwrite","handyman","hangnail","hangout","hangover","hangup","hankering","hankie","hanky","haphazard","happening","happier","happiest","happily","happiness","happy","harbor","hardcopy","hardcore","hardcover","harddisk","hardened","hardener","hardening","hardhat","hardhead","hardiness","hardly","hardness","hardship","hardware","hardwired","hardwood","hardy","harmful","harmless","harmonica","harmonics","harmonize","harmony","harness","harpist","harsh","harvest","hash","hassle","haste","hastily","hastiness","hasty","hatbox","hatchback","hatchery","hatchet","hatching","hatchling","hate","hatless","hatred","haunt","haven","hazard","hazelnut","hazily","haziness","hazing","hazy","headache","headband","headboard","headcount","headdress","headed","header","headfirst","headgear","heading","headlamp","headless","headlock","headphone","headpiece","headrest","headroom","headscarf","headset","headsman","headstand","headstone","headway","headwear","heap","heat","heave","heavily","heaviness","heaving","hedge","hedging","heftiness","hefty","helium","helmet","helper","helpful","helping","helpless","helpline","hemlock","hemstitch","hence","henchman","henna","herald","herbal","herbicide","herbs","heritage","hermit","heroics","heroism","herring","herself","hertz","hesitancy","hesitant","hesitate","hexagon","hexagram","hubcap","huddle","huddling","huff","hug","hula","hulk","hull","human","humble","humbling","humbly","humid","humiliate","humility","humming","hummus","humongous","humorist","humorless","humorous","humpback","humped","humvee","hunchback","hundredth","hunger","hungrily","hungry","hunk","hunter","hunting","huntress","huntsman","hurdle","hurled","hurler","hurling","hurray","hurricane","hurried","hurry","hurt","husband","hush","husked","huskiness","hut","hybrid","hydrant","hydrated","hydration","hydrogen","hydroxide","hyperlink","hypertext","hyphen","hypnoses","hypnosis","hypnotic","hypnotism","hypnotist","hypnotize","hypocrisy","hypocrite","ibuprofen","ice","iciness","icing","icky","icon","icy","idealism","idealist","idealize","ideally","idealness","identical","identify","identity","ideology","idiocy","idiom","idly","igloo","ignition","ignore","iguana","illicitly","illusion","illusive","image","imaginary","imagines","imaging","imbecile","imitate","imitation","immature","immerse","immersion","imminent","immobile","immodest","immorally","immortal","immovable","immovably","immunity","immunize","impaired","impale","impart","impatient","impeach","impeding","impending","imperfect","imperial","impish","implant","implement","implicate","implicit","implode","implosion","implosive","imply","impolite","important","importer","impose","imposing","impotence","impotency","impotent","impound","imprecise","imprint","imprison","impromptu","improper","improve","improving","improvise","imprudent","impulse","impulsive","impure","impurity","iodine","iodize","ion","ipad","iphone","ipod","irate","irk","iron","irregular","irrigate","irritable","irritably","irritant","irritate","islamic","islamist","isolated","isolating","isolation","isotope","issue","issuing","italicize","italics","item","itinerary","itunes","ivory","ivy","jab","jackal","jacket","jackknife","jackpot","jailbird","jailbreak","jailer","jailhouse","jalapeno","jam","janitor","january","jargon","jarring","jasmine","jaundice","jaunt","java","jawed","jawless","jawline","jaws","jaybird","jaywalker","jazz","jeep","jeeringly","jellied","jelly","jersey","jester","jet","jiffy","jigsaw","jimmy","jingle","jingling","jinx","jitters","jittery","job","jockey","jockstrap","jogger","jogging","john","joining","jokester","jokingly","jolliness","jolly","jolt","jot","jovial","joyfully","joylessly","joyous","joyride","joystick","jubilance","jubilant","judge","judgingly","judicial","judiciary","judo","juggle","juggling","jugular","juice","juiciness","juicy","jujitsu","jukebox","july","jumble","jumbo","jump","junction","juncture","june","junior","juniper","junkie","junkman","junkyard","jurist","juror","jury","justice","justifier","justify","justly","justness","juvenile","kabob","kangaroo","karaoke","karate","karma","kebab","keenly","keenness","keep","keg","kelp","kennel","kept","kerchief","kerosene","kettle","kick","kiln","kilobyte","kilogram","kilometer","kilowatt","kilt","kimono","kindle","kindling","kindly","kindness","kindred","kinetic","kinfolk","king","kinship","kinsman","kinswoman","kissable","kisser","kissing","kitchen","kite","kitten","kitty","kiwi","kleenex","knapsack","knee","knelt","knickers","knoll","koala","kooky","kosher","krypton","kudos","kung","labored","laborer","laboring","laborious","labrador","ladder","ladies","ladle","ladybug","ladylike","lagged","lagging","lagoon","lair","lake","lance","landed","landfall","landfill","landing","landlady","landless","landline","landlord","landmark","landmass","landmine","landowner","landscape","landside","landslide","language","lankiness","lanky","lantern","lapdog","lapel","lapped","lapping","laptop","lard","large","lark","lash","lasso","last","latch","late","lather","latitude","latrine","latter","latticed","launch","launder","laundry","laurel","lavender","lavish","laxative","lazily","laziness","lazy","lecturer","left","legacy","legal","legend","legged","leggings","legible","legibly","legislate","lego","legroom","legume","legwarmer","legwork","lemon","lend","length","lens","lent","leotard","lesser","letdown","lethargic","lethargy","letter","lettuce","level","leverage","levers","levitate","levitator","liability","liable","liberty","librarian","library","licking","licorice","lid","life","lifter","lifting","liftoff","ligament","likely","likeness","likewise","liking","lilac","lilly","lily","limb","limeade","limelight","limes","limit","limping","limpness","line","lingo","linguini","linguist","lining","linked","linoleum","linseed","lint","lion","lip","liquefy","liqueur","liquid","lisp","list","litigate","litigator","litmus","litter","little","livable","lived","lively","liver","livestock","lividly","living","lizard","lubricant","lubricate","lucid","luckily","luckiness","luckless","lucrative","ludicrous","lugged","lukewarm","lullaby","lumber","luminance","luminous","lumpiness","lumping","lumpish","lunacy","lunar","lunchbox","luncheon","lunchroom","lunchtime","lung","lurch","lure","luridness","lurk","lushly","lushness","luster","lustfully","lustily","lustiness","lustrous","lusty","luxurious","luxury","lying","lyrically","lyricism","lyricist","lyrics","macarena","macaroni","macaw","mace","machine","machinist","magazine","magenta","maggot","magical","magician","magma","magnesium","magnetic","magnetism","magnetize","magnifier","magnify","magnitude","magnolia","mahogany","maimed","majestic","majesty","majorette","majority","makeover","maker","makeshift","making","malformed","malt","mama","mammal","mammary","mammogram","manager","managing","manatee","mandarin","mandate","mandatory","mandolin","manger","mangle","mango","mangy","manhandle","manhole","manhood","manhunt","manicotti","manicure","manifesto","manila","mankind","manlike","manliness","manly","manmade","manned","mannish","manor","manpower","mantis","mantra","manual","many","map","marathon","marauding","marbled","marbles","marbling","march","mardi","margarine","margarita","margin","marigold","marina","marine","marital","maritime","marlin","marmalade","maroon","married","marrow","marry","marshland","marshy","marsupial","marvelous","marxism","mascot","masculine","mashed","mashing","massager","masses","massive","mastiff","matador","matchbook","matchbox","matcher","matching","matchless","material","maternal","maternity","math","mating","matriarch","matrimony","matrix","matron","matted","matter","maturely","maturing","maturity","mauve","maverick","maximize","maximum","maybe","mayday","mayflower","moaner","moaning","mobile","mobility","mobilize","mobster","mocha","mocker","mockup","modified","modify","modular","modulator","module","moisten","moistness","moisture","molar","molasses","mold","molecular","molecule","molehill","mollusk","mom","monastery","monday","monetary","monetize","moneybags","moneyless","moneywise","mongoose","mongrel","monitor","monkhood","monogamy","monogram","monologue","monopoly","monorail","monotone","monotype","monoxide","monsieur","monsoon","monstrous","monthly","monument","moocher","moodiness","moody","mooing","moonbeam","mooned","moonlight","moonlike","moonlit","moonrise","moonscape","moonshine","moonstone","moonwalk","mop","morale","morality","morally","morbidity","morbidly","morphine","morphing","morse","mortality","mortally","mortician","mortified","mortify","mortuary","mosaic","mossy","most","mothball","mothproof","motion","motivate","motivator","motive","motocross","motor","motto","mountable","mountain","mounted","mounting","mourner","mournful","mouse","mousiness","moustache","mousy","mouth","movable","move","movie","moving","mower","mowing","much","muck","mud","mug","mulberry","mulch","mule","mulled","mullets","multiple","multiply","multitask","multitude","mumble","mumbling","mumbo","mummified","mummify","mummy","mumps","munchkin","mundane","municipal","muppet","mural","murkiness","murky","murmuring","muscular","museum","mushily","mushiness","mushroom","mushy","music","musket","muskiness","musky","mustang","mustard","muster","mustiness","musty","mutable","mutate","mutation","mute","mutilated","mutilator","mutiny","mutt","mutual","muzzle","myself","myspace","mystified","mystify","myth","nacho","nag","nail","name","naming","nanny","nanometer","nape","napkin","napped","napping","nappy","narrow","nastily","nastiness","national","native","nativity","natural","nature","naturist","nautical","navigate","navigator","navy","nearby","nearest","nearly","nearness","neatly","neatness","nebula","nebulizer","nectar","negate","negation","negative","neglector","negligee","negligent","negotiate","nemeses","nemesis","neon","nephew","nerd","nervous","nervy","nest","net","neurology","neuron","neurosis","neurotic","neuter","neutron","never","next","nibble","nickname","nicotine","niece","nifty","nimble","nimbly","nineteen","ninetieth","ninja","nintendo","ninth","nuclear","nuclei","nucleus","nugget","nullify","number","numbing","numbly","numbness","numeral","numerate","numerator","numeric","numerous","nuptials","nursery","nursing","nurture","nutcase","nutlike","nutmeg","nutrient","nutshell","nuttiness","nutty","nuzzle","nylon","oaf","oak","oasis","oat","obedience","obedient","obituary","object","obligate","obliged","oblivion","oblivious","oblong","obnoxious","oboe","obscure","obscurity","observant","observer","observing","obsessed","obsession","obsessive","obsolete","obstacle","obstinate","obstruct","obtain","obtrusive","obtuse","obvious","occultist","occupancy","occupant","occupier","occupy","ocean","ocelot","octagon","octane","october","octopus","ogle","oil","oink","ointment","okay","old","olive","olympics","omega","omen","ominous","omission","omit","omnivore","onboard","oncoming","ongoing","onion","online","onlooker","only","onscreen","onset","onshore","onslaught","onstage","onto","onward","onyx","oops","ooze","oozy","opacity","opal","open","operable","operate","operating","operation","operative","operator","opium","opossum","opponent","oppose","opposing","opposite","oppressed","oppressor","opt","opulently","osmosis","other","otter","ouch","ought","ounce","outage","outback","outbid","outboard","outbound","outbreak","outburst","outcast","outclass","outcome","outdated","outdoors","outer","outfield","outfit","outflank","outgoing","outgrow","outhouse","outing","outlast","outlet","outline","outlook","outlying","outmatch","outmost","outnumber","outplayed","outpost","outpour","output","outrage","outrank","outreach","outright","outscore","outsell","outshine","outshoot","outsider","outskirts","outsmart","outsource","outspoken","outtakes","outthink","outward","outweigh","outwit","oval","ovary","oven","overact","overall","overarch","overbid","overbill","overbite","overblown","overboard","overbook","overbuilt","overcast","overcoat","overcome","overcook","overcrowd","overdraft","overdrawn","overdress","overdrive","overdue","overeager","overeater","overexert","overfed","overfeed","overfill","overflow","overfull","overgrown","overhand","overhang","overhaul","overhead","overhear","overheat","overhung","overjoyed","overkill","overlabor","overlaid","overlap","overlay","overload","overlook","overlord","overlying","overnight","overpass","overpay","overplant","overplay","overpower","overprice","overrate","overreach","overreact","override","overripe","overrule","overrun","overshoot","overshot","oversight","oversized","oversleep","oversold","overspend","overstate","overstay","overstep","overstock","overstuff","oversweet","overtake","overthrow","overtime","overtly","overtone","overture","overturn","overuse","overvalue","overview","overwrite","owl","oxford","oxidant","oxidation","oxidize","oxidizing","oxygen","oxymoron","oyster","ozone","paced","pacemaker","pacific","pacifier","pacifism","pacifist","pacify","padded","padding","paddle","paddling","padlock","pagan","pager","paging","pajamas","palace","palatable","palm","palpable","palpitate","paltry","pampered","pamperer","pampers","pamphlet","panama","pancake","pancreas","panda","pandemic","pang","panhandle","panic","panning","panorama","panoramic","panther","pantomime","pantry","pants","pantyhose","paparazzi","papaya","paper","paprika","papyrus","parabola","parachute","parade","paradox","paragraph","parakeet","paralegal","paralyses","paralysis","paralyze","paramedic","parameter","paramount","parasail","parasite","parasitic","parcel","parched","parchment","pardon","parish","parka","parking","parkway","parlor","parmesan","parole","parrot","parsley","parsnip","partake","parted","parting","partition","partly","partner","partridge","party","passable","passably","passage","passcode","passenger","passerby","passing","passion","passive","passivism","passover","passport","password","pasta","pasted","pastel","pastime","pastor","pastrami","pasture","pasty","patchwork","patchy","paternal","paternity","path","patience","patient","patio","patriarch","patriot","patrol","patronage","patronize","pauper","pavement","paver","pavestone","pavilion","paving","pawing","payable","payback","paycheck","payday","payee","payer","paying","payment","payphone","payroll","pebble","pebbly","pecan","pectin","peculiar","peddling","pediatric","pedicure","pedigree","pedometer","pegboard","pelican","pellet","pelt","pelvis","penalize","penalty","pencil","pendant","pending","penholder","penknife","pennant","penniless","penny","penpal","pension","pentagon","pentagram","pep","perceive","percent","perch","percolate","perennial","perfected","perfectly","perfume","periscope","perish","perjurer","perjury","perkiness","perky","perm","peroxide","perpetual","perplexed","persecute","persevere","persuaded","persuader","pesky","peso","pessimism","pessimist","pester","pesticide","petal","petite","petition","petri","petroleum","petted","petticoat","pettiness","petty","petunia","phantom","phobia","phoenix","phonebook","phoney","phonics","phoniness","phony","phosphate","photo","phrase","phrasing","placard","placate","placidly","plank","planner","plant","plasma","plaster","plastic","plated","platform","plating","platinum","platonic","platter","platypus","plausible","plausibly","playable","playback","player","playful","playgroup","playhouse","playing","playlist","playmaker","playmate","playoff","playpen","playroom","playset","plaything","playtime","plaza","pleading","pleat","pledge","plentiful","plenty","plethora","plexiglas","pliable","plod","plop","plot","plow","ploy","pluck","plug","plunder","plunging","plural","plus","plutonium","plywood","poach","pod","poem","poet","pogo","pointed","pointer","pointing","pointless","pointy","poise","poison","poker","poking","polar","police","policy","polio","polish","politely","polka","polo","polyester","polygon","polygraph","polymer","poncho","pond","pony","popcorn","pope","poplar","popper","poppy","popsicle","populace","popular","populate","porcupine","pork","porous","porridge","portable","portal","portfolio","porthole","portion","portly","portside","poser","posh","posing","possible","possibly","possum","postage","postal","postbox","postcard","posted","poster","posting","postnasal","posture","postwar","pouch","pounce","pouncing","pound","pouring","pout","powdered","powdering","powdery","power","powwow","pox","praising","prance","prancing","pranker","prankish","prankster","prayer","praying","preacher","preaching","preachy","preamble","precinct","precise","precision","precook","precut","predator","predefine","predict","preface","prefix","preflight","preformed","pregame","pregnancy","pregnant","preheated","prelaunch","prelaw","prelude","premiere","premises","premium","prenatal","preoccupy","preorder","prepaid","prepay","preplan","preppy","preschool","prescribe","preseason","preset","preshow","president","presoak","press","presume","presuming","preteen","pretended","pretender","pretense","pretext","pretty","pretzel","prevail","prevalent","prevent","preview","previous","prewar","prewashed","prideful","pried","primal","primarily","primary","primate","primer","primp","princess","print","prior","prism","prison","prissy","pristine","privacy","private","privatize","prize","proactive","probable","probably","probation","probe","probing","probiotic","problem","procedure","process","proclaim","procreate","procurer","prodigal","prodigy","produce","product","profane","profanity","professed","professor","profile","profound","profusely","progeny","prognosis","program","progress","projector","prologue","prolonged","promenade","prominent","promoter","promotion","prompter","promptly","prone","prong","pronounce","pronto","proofing","proofread","proofs","propeller","properly","property","proponent","proposal","propose","props","prorate","protector","protegee","proton","prototype","protozoan","protract","protrude","proud","provable","proved","proven","provided","provider","providing","province","proving","provoke","provoking","provolone","prowess","prowler","prowling","proximity","proxy","prozac","prude","prudishly","prune","pruning","pry","psychic","public","publisher","pucker","pueblo","pug","pull","pulmonary","pulp","pulsate","pulse","pulverize","puma","pumice","pummel","punch","punctual","punctuate","punctured","pungent","punisher","punk","pupil","puppet","puppy","purchase","pureblood","purebred","purely","pureness","purgatory","purge","purging","purifier","purify","purist","puritan","purity","purple","purplish","purposely","purr","purse","pursuable","pursuant","pursuit","purveyor","pushcart","pushchair","pusher","pushiness","pushing","pushover","pushpin","pushup","pushy","putdown","putt","puzzle","puzzling","pyramid","pyromania","python","quack","quadrant","quail","quaintly","quake","quaking","qualified","qualifier","qualify","quality","qualm","quantum","quarrel","quarry","quartered","quarterly","quarters","quartet","quench","query","quicken","quickly","quickness","quicksand","quickstep","quiet","quill","quilt","quintet","quintuple","quirk","quit","quiver","quizzical","quotable","quotation","quote","rabid","race","racing","racism","rack","racoon","radar","radial","radiance","radiantly","radiated","radiation","radiator","radio","radish","raffle","raft","rage","ragged","raging","ragweed","raider","railcar","railing","railroad","railway","raisin","rake","raking","rally","ramble","rambling","ramp","ramrod","ranch","rancidity","random","ranged","ranger","ranging","ranked","ranking","ransack","ranting","rants","rare","rarity","rascal","rash","rasping","ravage","raven","ravine","raving","ravioli","ravishing","reabsorb","reach","reacquire","reaction","reactive","reactor","reaffirm","ream","reanalyze","reappear","reapply","reappoint","reapprove","rearrange","rearview","reason","reassign","reassure","reattach","reawake","rebalance","rebate","rebel","rebirth","reboot","reborn","rebound","rebuff","rebuild","rebuilt","reburial","rebuttal","recall","recant","recapture","recast","recede","recent","recess","recharger","recipient","recital","recite","reckless","reclaim","recliner","reclining","recluse","reclusive","recognize","recoil","recollect","recolor","reconcile","reconfirm","reconvene","recopy","record","recount","recoup","recovery","recreate","rectal","rectangle","rectified","rectify","recycled","recycler","recycling","reemerge","reenact","reenter","reentry","reexamine","referable","referee","reference","refill","refinance","refined","refinery","refining","refinish","reflected","reflector","reflex","reflux","refocus","refold","reforest","reformat","reformed","reformer","reformist","refract","refrain","refreeze","refresh","refried","refueling","refund","refurbish","refurnish","refusal","refuse","refusing","refutable","refute","regain","regalia","regally","reggae","regime","region","register","registrar","registry","regress","regretful","regroup","regular","regulate","regulator","rehab","reheat","rehire","rehydrate","reimburse","reissue","reiterate","rejoice","rejoicing","rejoin","rekindle","relapse","relapsing","relatable","related","relation","relative","relax","relay","relearn","release","relenting","reliable","reliably","reliance","reliant","relic","relieve","relieving","relight","relish","relive","reload","relocate","relock","reluctant","rely","remake","remark","remarry","rematch","remedial","remedy","remember","reminder","remindful","remission","remix","remnant","remodeler","remold","remorse","remote","removable","removal","removed","remover","removing","rename","renderer","rendering","rendition","renegade","renewable","renewably","renewal","renewed","renounce","renovate","renovator","rentable","rental","rented","renter","reoccupy","reoccur","reopen","reorder","repackage","repacking","repaint","repair","repave","repaying","repayment","repeal","repeated","repeater","repent","rephrase","replace","replay","replica","reply","reporter","repose","repossess","repost","repressed","reprimand","reprint","reprise","reproach","reprocess","reproduce","reprogram","reps","reptile","reptilian","repugnant","repulsion","repulsive","repurpose","reputable","reputably","request","require","requisite","reroute","rerun","resale","resample","rescuer","reseal","research","reselect","reseller","resemble","resend","resent","reset","reshape","reshoot","reshuffle","residence","residency","resident","residual","residue","resigned","resilient","resistant","resisting","resize","resolute","resolved","resonant","resonate","resort","resource","respect","resubmit","result","resume","resupply","resurface","resurrect","retail","retainer","retaining","retake","retaliate","retention","rethink","retinal","retired","retiree","retiring","retold","retool","retorted","retouch","retrace","retract","retrain","retread","retreat","retrial","retrieval","retriever","retry","return","retying","retype","reunion","reunite","reusable","reuse","reveal","reveler","revenge","revenue","reverb","revered","reverence","reverend","reversal","reverse","reversing","reversion","revert","revisable","revise","revision","revisit","revivable","revival","reviver","reviving","revocable","revoke","revolt","revolver","revolving","reward","rewash","rewind","rewire","reword","rework","rewrap","rewrite","rhyme","ribbon","ribcage","rice","riches","richly","richness","rickety","ricotta","riddance","ridden","ride","riding","rifling","rift","rigging","rigid","rigor","rimless","rimmed","rind","rink","rinse","rinsing","riot","ripcord","ripeness","ripening","ripping","ripple","rippling","riptide","rise","rising","risk","risotto","ritalin","ritzy","rival","riverbank","riverbed","riverboat","riverside","riveter","riveting","roamer","roaming","roast","robbing","robe","robin","robotics","robust","rockband","rocker","rocket","rockfish","rockiness","rocking","rocklike","rockslide","rockstar","rocky","rogue","roman","romp","rope","roping","roster","rosy","rotten","rotting","rotunda","roulette","rounding","roundish","roundness","roundup","roundworm","routine","routing","rover","roving","royal","rubbed","rubber","rubbing","rubble","rubdown","ruby","ruckus","rudder","rug","ruined","rule","rumble","rumbling","rummage","rumor","runaround","rundown","runner","running","runny","runt","runway","rupture","rural","ruse","rush","rust","rut","sabbath","sabotage","sacrament","sacred","sacrifice","sadden","saddlebag","saddled","saddling","sadly","sadness","safari","safeguard","safehouse","safely","safeness","saffron","saga","sage","sagging","saggy","said","saint","sake","salad","salami","salaried","salary","saline","salon","saloon","salsa","salt","salutary","salute","salvage","salvaging","salvation","same","sample","sampling","sanction","sanctity","sanctuary","sandal","sandbag","sandbank","sandbar","sandblast","sandbox","sanded","sandfish","sanding","sandlot","sandpaper","sandpit","sandstone","sandstorm","sandworm","sandy","sanitary","sanitizer","sank","santa","sapling","sappiness","sappy","sarcasm","sarcastic","sardine","sash","sasquatch","sassy","satchel","satiable","satin","satirical","satisfied","satisfy","saturate","saturday","sauciness","saucy","sauna","savage","savanna","saved","savings","savior","savor","saxophone","say","scabbed","scabby","scalded","scalding","scale","scaling","scallion","scallop","scalping","scam","scandal","scanner","scanning","scant","scapegoat","scarce","scarcity","scarecrow","scared","scarf","scarily","scariness","scarring","scary","scavenger","scenic","schedule","schematic","scheme","scheming","schilling","schnapps","scholar","science","scientist","scion","scoff","scolding","scone","scoop","scooter","scope","scorch","scorebook","scorecard","scored","scoreless","scorer","scoring","scorn","scorpion","scotch","scoundrel","scoured","scouring","scouting","scouts","scowling","scrabble","scraggly","scrambled","scrambler","scrap","scratch","scrawny","screen","scribble","scribe","scribing","scrimmage","script","scroll","scrooge","scrounger","scrubbed","scrubber","scruffy","scrunch","scrutiny","scuba","scuff","sculptor","sculpture","scurvy","scuttle","secluded","secluding","seclusion","second","secrecy","secret","sectional","sector","secular","securely","security","sedan","sedate","sedation","sedative","sediment","seduce","seducing","segment","seismic","seizing","seldom","selected","selection","selective","selector","self","seltzer","semantic","semester","semicolon","semifinal","seminar","semisoft","semisweet","senate","senator","send","senior","senorita","sensation","sensitive","sensitize","sensually","sensuous","sepia","september","septic","septum","sequel","sequence","sequester","series","sermon","serotonin","serpent","serrated","serve","service","serving","sesame","sessions","setback","setting","settle","settling","setup","sevenfold","seventeen","seventh","seventy","severity","shabby","shack","shaded","shadily","shadiness","shading","shadow","shady","shaft","shakable","shakily","shakiness","shaking","shaky","shale","shallot","shallow","shame","shampoo","shamrock","shank","shanty","shape","shaping","share","sharpener","sharper","sharpie","sharply","sharpness","shawl","sheath","shed","sheep","sheet","shelf","shell","shelter","shelve","shelving","sherry","shield","shifter","shifting","shiftless","shifty","shimmer","shimmy","shindig","shine","shingle","shininess","shining","shiny","ship","shirt","shivering","shock","shone","shoplift","shopper","shopping","shoptalk","shore","shortage","shortcake","shortcut","shorten","shorter","shorthand","shortlist","shortly","shortness","shorts","shortwave","shorty","shout","shove","showbiz","showcase","showdown","shower","showgirl","showing","showman","shown","showoff","showpiece","showplace","showroom","showy","shrank","shrapnel","shredder","shredding","shrewdly","shriek","shrill","shrimp","shrine","shrink","shrivel","shrouded","shrubbery","shrubs","shrug","shrunk","shucking","shudder","shuffle","shuffling","shun","shush","shut","shy","siamese","siberian","sibling","siding","sierra","siesta","sift","sighing","silenced","silencer","silent","silica","silicon","silk","silliness","silly","silo","silt","silver","similarly","simile","simmering","simple","simplify","simply","sincere","sincerity","singer","singing","single","singular","sinister","sinless","sinner","sinuous","sip","siren","sister","sitcom","sitter","sitting","situated","situation","sixfold","sixteen","sixth","sixties","sixtieth","sixtyfold","sizable","sizably","size","sizing","sizzle","sizzling","skater","skating","skedaddle","skeletal","skeleton","skeptic","sketch","skewed","skewer","skid","skied","skier","skies","skiing","skilled","skillet","skillful","skimmed","skimmer","skimming","skimpily","skincare","skinhead","skinless","skinning","skinny","skintight","skipper","skipping","skirmish","skirt","skittle","skydiver","skylight","skyline","skype","skyrocket","skyward","slab","slacked","slacker","slacking","slackness","slacks","slain","slam","slander","slang","slapping","slapstick","slashed","slashing","slate","slather","slaw","sled","sleek","sleep","sleet","sleeve","slept","sliceable","sliced","slicer","slicing","slick","slider","slideshow","sliding","slighted","slighting","slightly","slimness","slimy","slinging","slingshot","slinky","slip","slit","sliver","slobbery","slogan","sloped","sloping","sloppily","sloppy","slot","slouching","slouchy","sludge","slug","slum","slurp","slush","sly","small","smartly","smartness","smasher","smashing","smashup","smell","smelting","smile","smilingly","smirk","smite","smith","smitten","smock","smog","smoked","smokeless","smokiness","smoking","smoky","smolder","smooth","smother","smudge","smudgy","smuggler","smuggling","smugly","smugness","snack","snagged","snaking","snap","snare","snarl","snazzy","sneak","sneer","sneeze","sneezing","snide","sniff","snippet","snipping","snitch","snooper","snooze","snore","snoring","snorkel","snort","snout","snowbird","snowboard","snowbound","snowcap","snowdrift","snowdrop","snowfall","snowfield","snowflake","snowiness","snowless","snowman","snowplow","snowshoe","snowstorm","snowsuit","snowy","snub","snuff","snuggle","snugly","snugness","speak","spearfish","spearhead","spearman","spearmint","species","specimen","specked","speckled","specks","spectacle","spectator","spectrum","speculate","speech","speed","spellbind","speller","spelling","spendable","spender","spending","spent","spew","sphere","spherical","sphinx","spider","spied","spiffy","spill","spilt","spinach","spinal","spindle","spinner","spinning","spinout","spinster","spiny","spiral","spirited","spiritism","spirits","spiritual","splashed","splashing","splashy","splatter","spleen","splendid","splendor","splice","splicing","splinter","splotchy","splurge","spoilage","spoiled","spoiler","spoiling","spoils","spoken","spokesman","sponge","spongy","sponsor","spoof","spookily","spooky","spool","spoon","spore","sporting","sports","sporty","spotless","spotlight","spotted","spotter","spotting","spotty","spousal","spouse","spout","sprain","sprang","sprawl","spray","spree","sprig","spring","sprinkled","sprinkler","sprint","sprite","sprout","spruce","sprung","spry","spud","spur","sputter","spyglass","squabble","squad","squall","squander","squash","squatted","squatter","squatting","squeak","squealer","squealing","squeamish","squeegee","squeeze","squeezing","squid","squiggle","squiggly","squint","squire","squirt","squishier","squishy","stability","stabilize","stable","stack","stadium","staff","stage","staging","stagnant","stagnate","stainable","stained","staining","stainless","stalemate","staleness","stalling","stallion","stamina","stammer","stamp","stand","stank","staple","stapling","starboard","starch","stardom","stardust","starfish","stargazer","staring","stark","starless","starlet","starlight","starlit","starring","starry","starship","starter","starting","startle","startling","startup","starved","starving","stash","state","static","statistic","statue","stature","status","statute","statutory","staunch","stays","steadfast","steadier","steadily","steadying","steam","steed","steep","steerable","steering","steersman","stegosaur","stellar","stem","stench","stencil","step","stereo","sterile","sterility","sterilize","sterling","sternness","sternum","stew","stick","stiffen","stiffly","stiffness","stifle","stifling","stillness","stilt","stimulant","stimulate","stimuli","stimulus","stinger","stingily","stinging","stingray","stingy","stinking","stinky","stipend","stipulate","stir","stitch","stock","stoic","stoke","stole","stomp","stonewall","stoneware","stonework","stoning","stony","stood","stooge","stool","stoop","stoplight","stoppable","stoppage","stopped","stopper","stopping","stopwatch","storable","storage","storeroom","storewide","storm","stout","stove","stowaway","stowing","straddle","straggler","strained","strainer","straining","strangely","stranger","strangle","strategic","strategy","stratus","straw","stray","streak","stream","street","strength","strenuous","strep","stress","stretch","strewn","stricken","strict","stride","strife","strike","striking","strive","striving","strobe","strode","stroller","strongbox","strongly","strongman","struck","structure","strudel","struggle","strum","strung","strut","stubbed","stubble","stubbly","stubborn","stucco","stuck","student","studied","studio","study","stuffed","stuffing","stuffy","stumble","stumbling","stump","stung","stunned","stunner","stunning","stunt","stupor","sturdily","sturdy","styling","stylishly","stylist","stylized","stylus","suave","subarctic","subatomic","subdivide","subdued","subduing","subfloor","subgroup","subheader","subject","sublease","sublet","sublevel","sublime","submarine","submerge","submersed","submitter","subpanel","subpar","subplot","subprime","subscribe","subscript","subsector","subside","subsiding","subsidize","subsidy","subsoil","subsonic","substance","subsystem","subtext","subtitle","subtly","subtotal","subtract","subtype","suburb","subway","subwoofer","subzero","succulent","such","suction","sudden","sudoku","suds","sufferer","suffering","suffice","suffix","suffocate","suffrage","sugar","suggest","suing","suitable","suitably","suitcase","suitor","sulfate","sulfide","sulfite","sulfur","sulk","sullen","sulphate","sulphuric","sultry","superbowl","superglue","superhero","superior","superjet","superman","supermom","supernova","supervise","supper","supplier","supply","support","supremacy","supreme","surcharge","surely","sureness","surface","surfacing","surfboard","surfer","surgery","surgical","surging","surname","surpass","surplus","surprise","surreal","surrender","surrogate","surround","survey","survival","survive","surviving","survivor","sushi","suspect","suspend","suspense","sustained","sustainer","swab","swaddling","swagger","swampland","swan","swapping","swarm","sway","swear","sweat","sweep","swell","swept","swerve","swifter","swiftly","swiftness","swimmable","swimmer","swimming","swimsuit","swimwear","swinger","swinging","swipe","swirl","switch","swivel","swizzle","swooned","swoop","swoosh","swore","sworn","swung","sycamore","sympathy","symphonic","symphony","symptom","synapse","syndrome","synergy","synopses","synopsis","synthesis","synthetic","syrup","system","t-shirt","tabasco","tabby","tableful","tables","tablet","tableware","tabloid","tackiness","tacking","tackle","tackling","tacky","taco","tactful","tactical","tactics","tactile","tactless","tadpole","taekwondo","tag","tainted","take","taking","talcum","talisman","tall","talon","tamale","tameness","tamer","tamper","tank","tanned","tannery","tanning","tantrum","tapeless","tapered","tapering","tapestry","tapioca","tapping","taps","tarantula","target","tarmac","tarnish","tarot","tartar","tartly","tartness","task","tassel","taste","tastiness","tasting","tasty","tattered","tattle","tattling","tattoo","taunt","tavern","thank","that","thaw","theater","theatrics","thee","theft","theme","theology","theorize","thermal","thermos","thesaurus","these","thesis","thespian","thicken","thicket","thickness","thieving","thievish","thigh","thimble","thing","think","thinly","thinner","thinness","thinning","thirstily","thirsting","thirsty","thirteen","thirty","thong","thorn","those","thousand","thrash","thread","threaten","threefold","thrift","thrill","thrive","thriving","throat","throbbing","throng","throttle","throwaway","throwback","thrower","throwing","thud","thumb","thumping","thursday","thus","thwarting","thyself","tiara","tibia","tidal","tidbit","tidiness","tidings","tidy","tiger","tighten","tightly","tightness","tightrope","tightwad","tigress","tile","tiling","till","tilt","timid","timing","timothy","tinderbox","tinfoil","tingle","tingling","tingly","tinker","tinkling","tinsel","tinsmith","tint","tinwork","tiny","tipoff","tipped","tipper","tipping","tiptoeing","tiptop","tiring","tissue","trace","tracing","track","traction","tractor","trade","trading","tradition","traffic","tragedy","trailing","trailside","train","traitor","trance","tranquil","transfer","transform","translate","transpire","transport","transpose","trapdoor","trapeze","trapezoid","trapped","trapper","trapping","traps","trash","travel","traverse","travesty","tray","treachery","treading","treadmill","treason","treat","treble","tree","trekker","tremble","trembling","tremor","trench","trend","trespass","triage","trial","triangle","tribesman","tribunal","tribune","tributary","tribute","triceps","trickery","trickily","tricking","trickle","trickster","tricky","tricolor","tricycle","trident","tried","trifle","trifocals","trillion","trilogy","trimester","trimmer","trimming","trimness","trinity","trio","tripod","tripping","triumph","trivial","trodden","trolling","trombone","trophy","tropical","tropics","trouble","troubling","trough","trousers","trout","trowel","truce","truck","truffle","trump","trunks","trustable","trustee","trustful","trusting","trustless","truth","try","tubby","tubeless","tubular","tucking","tuesday","tug","tuition","tulip","tumble","tumbling","tummy","turban","turbine","turbofan","turbojet","turbulent","turf","turkey","turmoil","turret","turtle","tusk","tutor","tutu","tux","tweak","tweed","tweet","tweezers","twelve","twentieth","twenty","twerp","twice","twiddle","twiddling","twig","twilight","twine","twins","twirl","twistable","twisted","twister","twisting","twisty","twitch","twitter","tycoon","tying","tyke","udder","ultimate","ultimatum","ultra","umbilical","umbrella","umpire","unabashed","unable","unadorned","unadvised","unafraid","unaired","unaligned","unaltered","unarmored","unashamed","unaudited","unawake","unaware","unbaked","unbalance","unbeaten","unbend","unbent","unbiased","unbitten","unblended","unblessed","unblock","unbolted","unbounded","unboxed","unbraided","unbridle","unbroken","unbuckled","unbundle","unburned","unbutton","uncanny","uncapped","uncaring","uncertain","unchain","unchanged","uncharted","uncheck","uncivil","unclad","unclaimed","unclamped","unclasp","uncle","unclip","uncloak","unclog","unclothed","uncoated","uncoiled","uncolored","uncombed","uncommon","uncooked","uncork","uncorrupt","uncounted","uncouple","uncouth","uncover","uncross","uncrown","uncrushed","uncured","uncurious","uncurled","uncut","undamaged","undated","undaunted","undead","undecided","undefined","underage","underarm","undercoat","undercook","undercut","underdog","underdone","underfed","underfeed","underfoot","undergo","undergrad","underhand","underline","underling","undermine","undermost","underpaid","underpass","underpay","underrate","undertake","undertone","undertook","undertow","underuse","underwear","underwent","underwire","undesired","undiluted","undivided","undocked","undoing","undone","undrafted","undress","undrilled","undusted","undying","unearned","unearth","unease","uneasily","uneasy","uneatable","uneaten","unedited","unelected","unending","unengaged","unenvied","unequal","unethical","uneven","unexpired","unexposed","unfailing","unfair","unfasten","unfazed","unfeeling","unfiled","unfilled","unfitted","unfitting","unfixable","unfixed","unflawed","unfocused","unfold","unfounded","unframed","unfreeze","unfrosted","unfrozen","unfunded","unglazed","ungloved","unglue","ungodly","ungraded","ungreased","unguarded","unguided","unhappily","unhappy","unharmed","unhealthy","unheard","unhearing","unheated","unhelpful","unhidden","unhinge","unhitched","unholy","unhook","unicorn","unicycle","unified","unifier","uniformed","uniformly","unify","unimpeded","uninjured","uninstall","uninsured","uninvited","union","uniquely","unisexual","unison","unissued","unit","universal","universe","unjustly","unkempt","unkind","unknotted","unknowing","unknown","unlaced","unlatch","unlawful","unleaded","unlearned","unleash","unless","unleveled","unlighted","unlikable","unlimited","unlined","unlinked","unlisted","unlit","unlivable","unloaded","unloader","unlocked","unlocking","unlovable","unloved","unlovely","unloving","unluckily","unlucky","unmade","unmanaged","unmanned","unmapped","unmarked","unmasked","unmasking","unmatched","unmindful","unmixable","unmixed","unmolded","unmoral","unmovable","unmoved","unmoving","unnamable","unnamed","unnatural","unneeded","unnerve","unnerving","unnoticed","unopened","unopposed","unpack","unpadded","unpaid","unpainted","unpaired","unpaved","unpeeled","unpicked","unpiloted","unpinned","unplanned","unplanted","unpleased","unpledged","unplowed","unplug","unpopular","unproven","unquote","unranked","unrated","unraveled","unreached","unread","unreal","unreeling","unrefined","unrelated","unrented","unrest","unretired","unrevised","unrigged","unripe","unrivaled","unroasted","unrobed","unroll","unruffled","unruly","unrushed","unsaddle","unsafe","unsaid","unsalted","unsaved","unsavory","unscathed","unscented","unscrew","unsealed","unseated","unsecured","unseeing","unseemly","unseen","unselect","unselfish","unsent","unsettled","unshackle","unshaken","unshaved","unshaven","unsheathe","unshipped","unsightly","unsigned","unskilled","unsliced","unsmooth","unsnap","unsocial","unsoiled","unsold","unsolved","unsorted","unspoiled","unspoken","unstable","unstaffed","unstamped","unsteady","unsterile","unstirred","unstitch","unstopped","unstuck","unstuffed","unstylish","unsubtle","unsubtly","unsuited","unsure","unsworn","untagged","untainted","untaken","untamed","untangled","untapped","untaxed","unthawed","unthread","untidy","untie","until","untimed","untimely","untitled","untoasted","untold","untouched","untracked","untrained","untreated","untried","untrimmed","untrue","untruth","unturned","untwist","untying","unusable","unused","unusual","unvalued","unvaried","unvarying","unveiled","unveiling","unvented","unviable","unvisited","unvocal","unwanted","unwarlike","unwary","unwashed","unwatched","unweave","unwed","unwelcome","unwell","unwieldy","unwilling","unwind","unwired","unwitting","unwomanly","unworldly","unworn","unworried","unworthy","unwound","unwoven","unwrapped","unwritten","unzip","upbeat","upchuck","upcoming","upcountry","update","upfront","upgrade","upheaval","upheld","uphill","uphold","uplifted","uplifting","upload","upon","upper","upright","uprising","upriver","uproar","uproot","upscale","upside","upstage","upstairs","upstart","upstate","upstream","upstroke","upswing","uptake","uptight","uptown","upturned","upward","upwind","uranium","urban","urchin","urethane","urgency","urgent","urging","urologist","urology","usable","usage","useable","used","uselessly","user","usher","usual","utensil","utility","utilize","utmost","utopia","utter","vacancy","vacant","vacate","vacation","vagabond","vagrancy","vagrantly","vaguely","vagueness","valiant","valid","valium","valley","valuables","value","vanilla","vanish","vanity","vanquish","vantage","vaporizer","variable","variably","varied","variety","various","varmint","varnish","varsity","varying","vascular","vaseline","vastly","vastness","veal","vegan","veggie","vehicular","velcro","velocity","velvet","vendetta","vending","vendor","veneering","vengeful","venomous","ventricle","venture","venue","venus","verbalize","verbally","verbose","verdict","verify","verse","version","versus","vertebrae","vertical","vertigo","very","vessel","vest","veteran","veto","vexingly","viability","viable","vibes","vice","vicinity","victory","video","viewable","viewer","viewing","viewless","viewpoint","vigorous","village","villain","vindicate","vineyard","vintage","violate","violation","violator","violet","violin","viper","viral","virtual","virtuous","virus","visa","viscosity","viscous","viselike","visible","visibly","vision","visiting","visitor","visor","vista","vitality","vitalize","vitally","vitamins","vivacious","vividly","vividness","vixen","vocalist","vocalize","vocally","vocation","voice","voicing","void","volatile","volley","voltage","volumes","voter","voting","voucher","vowed","vowel","voyage","wackiness","wad","wafer","waffle","waged","wager","wages","waggle","wagon","wake","waking","walk","walmart","walnut","walrus","waltz","wand","wannabe","wanted","wanting","wasabi","washable","washbasin","washboard","washbowl","washcloth","washday","washed","washer","washhouse","washing","washout","washroom","washstand","washtub","wasp","wasting","watch","water","waviness","waving","wavy","whacking","whacky","wham","wharf","wheat","whenever","whiff","whimsical","whinny","whiny","whisking","whoever","whole","whomever","whoopee","whooping","whoops","why","wick","widely","widen","widget","widow","width","wieldable","wielder","wife","wifi","wikipedia","wildcard","wildcat","wilder","wildfire","wildfowl","wildland","wildlife","wildly","wildness","willed","willfully","willing","willow","willpower","wilt","wimp","wince","wincing","wind","wing","winking","winner","winnings","winter","wipe","wired","wireless","wiring","wiry","wisdom","wise","wish","wisplike","wispy","wistful","wizard","wobble","wobbling","wobbly","wok","wolf","wolverine","womanhood","womankind","womanless","womanlike","womanly","womb","woof","wooing","wool","woozy","word","work","worried","worrier","worrisome","worry","worsening","worshiper","worst","wound","woven","wow","wrangle","wrath","wreath","wreckage","wrecker","wrecking","wrench","wriggle","wriggly","wrinkle","wrinkly","wrist","writing","written","wrongdoer","wronged","wrongful","wrongly","wrongness","wrought","xbox","xerox","yahoo","yam","yanking","yapping","yard","yarn","yeah","yearbook","yearling","yearly","yearning","yeast","yelling","yelp","yen","yesterday","yiddish","yield","yin","yippee","yo-yo","yodel","yoga","yogurt","yonder","yoyo","yummy","zap","zealous","zebra","zen","zeppelin","zero","zestfully","zesty","zigzagged","zipfile","zipping","zippy","zips","zit","zodiac","zombie","zone","zoning","zookeeper","zoologist","zoology","zoom"]).filter(e=>!e.includes("-")))},94003:function(e,t,r){"use strict";var n,i;r.d(t,{ZP:function(){return J}});class s{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class a{constructor(e){this.generateIdentifier=e,this.kv=new s}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}}class o extends a{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){"object"==typeof t?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}}function u(e,t){Object.entries(e).forEach(([e,r])=>t(r,e))}function c(e,t){return -1!==e.indexOf(t)}function l(e,t){for(let r=0;r<e.length;r++){let n=e[r];if(t(n))return n}}class d{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return function(e,t){let r=function(e){if("values"in Object)return Object.values(e);let t=[];for(let r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}(e);if("find"in r)return r.find(t);for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}}let h=e=>Object.prototype.toString.call(e).slice(8,-1),f=e=>void 0===e,p=e=>null===e,m=e=>"object"==typeof e&&null!==e&&e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype),g=e=>m(e)&&0===Object.keys(e).length,y=e=>Array.isArray(e),b=e=>"string"==typeof e,v=e=>"number"==typeof e&&!isNaN(e),w=e=>"boolean"==typeof e,_=e=>e instanceof Map,E=e=>e instanceof Set,k=e=>"Symbol"===h(e),x=e=>"number"==typeof e&&isNaN(e),S=e=>w(e)||p(e)||f(e)||v(e)||b(e)||k(e),A=e=>e===1/0||e===-1/0,C=e=>e.replace(/\./g,"\\."),I=e=>e.map(String).map(C).join("."),R=e=>{let t=[],r="";for(let n=0;n<e.length;n++){let i=e.charAt(n);if("\\"===i&&"."===e.charAt(n+1)){r+=".",n++;continue}if("."===i){t.push(r),r="";continue}r+=i}let n=r;return t.push(n),t};function P(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}let N=[P(f,"undefined",()=>null,()=>void 0),P(e=>"bigint"==typeof e,"bigint",e=>e.toString(),e=>"undefined"!=typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),P(e=>e instanceof Date&&!isNaN(e.valueOf()),"Date",e=>e.toISOString(),e=>new Date(e)),P(e=>e instanceof Error,"Error",(e,t)=>{let r={name:e.name,message:e.message};return t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r},(e,t)=>{let r=Error(e.message);return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r}),P(e=>e instanceof RegExp,"regexp",e=>""+e,e=>new RegExp(e.slice(1,e.lastIndexOf("/")),e.slice(e.lastIndexOf("/")+1))),P(E,"set",e=>[...e.values()],e=>new Set(e)),P(_,"map",e=>[...e.entries()],e=>new Map(e)),P(e=>x(e)||A(e),"number",e=>x(e)?"NaN":e>0?"Infinity":"-Infinity",Number),P(e=>0===e&&1/e==-1/0,"number",()=>"-0",Number),P(e=>e instanceof URL,"URL",e=>e.toString(),e=>new URL(e))];function M(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}let T=M((e,t)=>!!k(e)&&!!t.symbolRegistry.getIdentifier(e),(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{let n=r.symbolRegistry.getValue(t[1]);if(!n)throw Error("Trying to deserialize unknown symbol");return n}),O=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),D=M(e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{let r=O[t[1]];if(!r)throw Error("Trying to deserialize unknown typed array");return new r(e)});function L(e,t){return!!e?.constructor&&!!t.classRegistry.getIdentifier(e.constructor)}let B=M(L,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};let n={};return r.forEach(t=>{n[t]=e[t]}),n},(e,t,r)=>{let n=r.classRegistry.getValue(t[1]);if(!n)throw Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(n.prototype),e)}),q=M((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{let n=r.customTransformerRegistry.findByName(t[1]);if(!n)throw Error("Trying to deserialize unknown custom value");return n.deserialize(e)}),z=[B,T,q,D],U=(e,t)=>{let r=l(z,r=>r.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};let n=l(N,r=>r.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation}},j={};N.forEach(e=>{j[e.annotation]=e});let F=(e,t,r)=>{if(y(t))switch(t[0]){case"symbol":return T.untransform(e,t,r);case"class":return B.untransform(e,t,r);case"custom":return q.untransform(e,t,r);case"typed-array":return D.untransform(e,t,r);default:throw Error("Unknown transformation: "+t)}else{let n=j[t];if(!n)throw Error("Unknown transformation: "+t);return n.untransform(e,r)}},H=(e,t)=>{let r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function $(e){if(c(e,"__proto__"))throw Error("__proto__ is not allowed as a property");if(c(e,"prototype"))throw Error("prototype is not allowed as a property");if(c(e,"constructor"))throw Error("constructor is not allowed as a property")}let W=(e,t)=>{$(t);for(let r=0;r<t.length;r++){let n=t[r];if(E(e))e=H(e,+n);else if(_(e)){let i=+n,s=0==+t[++r]?"key":"value",a=H(e,i);switch(s){case"key":e=a;break;case"value":e=e.get(a)}}else e=e[n]}return e},G=(e,t,r)=>{if($(t),0===t.length)return r(e);let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(y(n))n=n[+r];else if(m(n))n=n[r];else if(E(n))n=H(n,+r);else if(_(n)){if(e===t.length-2)break;let i=+r,s=0==+t[++e]?"key":"value",a=H(n,i);switch(s){case"key":n=a;break;case"value":n=n.get(a)}}}let i=t[t.length-1];if(y(n)?n[+i]=r(n[+i]):m(n)&&(n[i]=r(n[i])),E(n)){let e=H(n,+i),t=r(e);e!==t&&(n.delete(e),n.add(t))}if(_(n)){let e=H(n,+t[t.length-2]);switch(0==+i?"key":"value"){case"key":{let t=r(e);n.set(t,n.get(e)),t!==e&&n.delete(e);break}case"value":n.set(e,r(n.get(e)))}}return e},V=(e,t)=>m(e)||y(e)||_(e)||E(e)||L(e,t),K=(e,t,r,n,i=[],s=[],a=new Map)=>{let o=S(e);if(!o){!function(e,t,r){let n=r.get(e);n?n.push(t):r.set(e,[t])}(e,i,t);let r=a.get(e);if(r)return n?{transformedValue:null}:r}if(!V(e,r)){let t=U(e,r),n=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return o||a.set(e,n),n}if(c(s,e))return{transformedValue:null};let l=U(e,r),d=l?.value??e,h=y(d)?[]:{},f={};u(d,(o,c)=>{if("__proto__"===c||"constructor"===c||"prototype"===c)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=K(o,t,r,n,[...i,c],[...s,e],a);h[c]=l.transformedValue,y(l.annotations)?f[c]=l.annotations:m(l.annotations)&&u(l.annotations,(e,t)=>{f[C(c)+"."+t]=e})});let p=g(f)?{transformedValue:h,annotations:l?[l.type]:void 0}:{transformedValue:h,annotations:l?[l.type,f]:f};return o||a.set(e,p),p};function Z(e){return Object.prototype.toString.call(e).slice(8,-1)}function Y(e){return"Array"===Z(e)}n=function(e){return"Null"===Z(e)},i=function(e){return"Undefined"===Z(e)},e=>n(e)||i(e)||!1;class J{constructor({dedupe:e=!1}={}){this.classRegistry=new o,this.symbolRegistry=new a(e=>e.description??""),this.customTransformerRegistry=new d,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,r=K(e,t,this,this.dedupe),n={json:r.transformedValue};r.annotations&&(n.meta={...n.meta,values:r.annotations});let i=function(e,t){let r;let n={};return(e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...s]=e;0===i.length?r=s.map(I):n[I(i)]=s.map(I)}),r)?g(n)?[r]:[r,n]:g(n)?void 0:n}(t,this.dedupe);return i&&(n.meta={...n.meta,referentialEqualities:i}),n}deserialize(e){let{json:t,meta:r}=e,n=function e(t,r={}){return Y(t)?t.map(t=>e(t,r)):!function(e){if("Object"!==Z(e))return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(t)?t:[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)].reduce((n,i)=>{if(Y(r.props)&&!r.props.includes(i))return n;let s=e(t[i],r);return!function(e,t,r,n,i){let s=({}).propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";"enumerable"===s&&(e[t]=r),i&&"nonenumerable"===s&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}(n,i,s,t,r.nonenumerable),n},{})}(t);if(r?.values){var i,s,a;i=n,s=r.values,a=this,function e(t,r,n=[]){if(!t)return;if(!y(t)){u(t,(t,i)=>e(t,r,[...n,...R(i)]));return}let[i,s]=t;s&&u(s,(t,i)=>{e(t,r,[...n,...R(i)])}),r(i,n)}(s,(e,t)=>{i=G(i,t,t=>F(t,e,a))}),n=i}return r?.referentialEqualities&&(n=function(e,t){function r(t,r){let n=W(e,R(r));t.map(R).forEach(t=>{e=G(e,t,()=>n)})}if(y(t)){let[n,i]=t;n.forEach(t=>{e=G(e,R(t),()=>e)}),i&&u(i,r)}else u(t,r);return e}(n,r.referentialEqualities)),n}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}}J.defaultInstance=new J,J.serialize=J.defaultInstance.serialize.bind(J.defaultInstance),J.deserialize=J.defaultInstance.deserialize.bind(J.defaultInstance),J.stringify=J.defaultInstance.stringify.bind(J.defaultInstance),J.parse=J.defaultInstance.parse.bind(J.defaultInstance),J.registerClass=J.defaultInstance.registerClass.bind(J.defaultInstance),J.registerSymbol=J.defaultInstance.registerSymbol.bind(J.defaultInstance),J.registerCustom=J.defaultInstance.registerCustom.bind(J.defaultInstance),J.allowErrorProps=J.defaultInstance.allowErrorProps.bind(J.defaultInstance),J.serialize,J.deserialize,J.stringify,J.parse,J.registerClass,J.registerCustom,J.registerSymbol,J.allowErrorProps},18362:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{Z:function(){return c}});var i,s,a,o=/^\s+/,u=/\s+$/;function c(e,t){if(t=t||{},(e=e||"")instanceof c)return e;if(!(this instanceof c))return new c(e,t);var r,i,s,a,l,d,h,f,p,m,g,y,b,v,w,_,E,k,x,S,C=(i={r:0,g:0,b:0},s=1,a=null,l=null,d=null,h=!1,f=!1,"string"==typeof(r=e)&&(r=function(e){e=e.replace(o,"").replace(u,"").toLowerCase();var t,r=!1;if(A[e])e=A[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=D.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=D.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=D.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=D.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=D.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=D.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=D.hex8.exec(e))?{r:N(t[1]),g:N(t[2]),b:N(t[3]),a:N(t[4])/255,format:r?"name":"hex8"}:(t=D.hex6.exec(e))?{r:N(t[1]),g:N(t[2]),b:N(t[3]),format:r?"name":"hex"}:(t=D.hex4.exec(e))?{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),a:N(t[4]+""+t[4])/255,format:r?"name":"hex8"}:!!(t=D.hex3.exec(e))&&{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),format:r?"name":"hex"}}(r)),"object"==n(r)&&(L(r.r)&&L(r.g)&&L(r.b)?(p=r.r,m=r.g,g=r.b,i={r:255*R(p,255),g:255*R(m,255),b:255*R(g,255)},h=!0,f="%"===String(r.r).substr(-1)?"prgb":"rgb"):L(r.h)&&L(r.s)&&L(r.v)?(a=T(r.s),l=T(r.v),y=r.h,b=a,v=l,y=6*R(y,360),b=R(b,100),v=R(v,100),w=Math.floor(y),_=y-w,E=v*(1-b),k=v*(1-_*b),x=v*(1-(1-_)*b),i={r:255*[v,k,E,E,x,v][S=w%6],g:255*[x,v,v,k,E,E][S],b:255*[E,E,x,v,v,k][S]},h=!0,f="hsv"):L(r.h)&&L(r.s)&&L(r.l)&&(a=T(r.s),d=T(r.l),i=function(e,t,r){var n,i,s;function a(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=R(e,360),t=R(t,100),r=R(r,100),0===t)n=i=s=r;else{var o=r<.5?r*(1+t):r+t-r*t,u=2*r-o;n=a(u,o,e+1/3),i=a(u,o,e),s=a(u,o,e-1/3)}return{r:255*n,g:255*i,b:255*s}}(r.h,a,d),h=!0,f="hsl"),r.hasOwnProperty("a")&&(s=r.a)),s=I(s),{ok:h,format:r.format||f,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:s});this._originalInput=e,this._r=C.r,this._g=C.g,this._b=C.b,this._a=C.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||C.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=C.ok}function l(e,t,r){var n,i,s=Math.max(e=R(e,255),t=R(t,255),r=R(r,255)),a=Math.min(e,t,r),o=(s+a)/2;if(s==a)n=i=0;else{var u=s-a;switch(i=o>.5?u/(2-s-a):u/(s+a),s){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:i,l:o}}function d(e,t,r){var n,i,s=Math.max(e=R(e,255),t=R(t,255),r=R(r,255)),a=Math.min(e,t,r),o=s-a;if(i=0===s?0:o/s,s==a)n=0;else{switch(s){case e:n=(t-r)/o+(t<r?6:0);break;case t:n=(r-e)/o+2;break;case r:n=(e-t)/o+4}n/=6}return{h:n,s:i,v:s}}function h(e,t,r,n){var i=[M(Math.round(e).toString(16)),M(Math.round(t).toString(16)),M(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function f(e,t,r,n){return[M(O(n)),M(Math.round(e).toString(16)),M(Math.round(t).toString(16)),M(Math.round(r).toString(16))].join("")}function p(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s-=t/100,r.s=P(r.s),c(r)}function m(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s+=t/100,r.s=P(r.s),c(r)}function g(e){return c(e).desaturate(100)}function y(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l+=t/100,r.l=P(r.l),c(r)}function b(e,t){t=0===t?0:t||10;var r=c(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-(t/100*255)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-(t/100*255)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-(t/100*255)))),c(r)}function v(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l-=t/100,r.l=P(r.l),c(r)}function w(e,t){var r=c(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,c(r)}function _(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function E(e,t){if(isNaN(t)||t<=0)throw Error("Argument to polyad must be a positive number");for(var r=c(e).toHsl(),n=[c(e)],i=360/t,s=1;s<t;s++)n.push(c({h:(r.h+s*i)%360,s:r.s,l:r.l}));return n}function k(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+72)%360,s:t.s,l:t.l}),c({h:(r+216)%360,s:t.s,l:t.l})]}function x(e,t,r){t=t||6,r=r||30;var n=c(e).toHsl(),i=360/r,s=[c(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(c(n));return s}function S(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,i=r.s,s=r.v,a=[],o=1/t;t--;)a.push(c({h:n,s:i,v:s})),s=(s+o)%1;return a}c.prototype={isDark:function(){return 128>this.getBrightness()},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*((t=n.g/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((r=n.b/255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=I(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=l(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=l(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return h(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t,r,n,i,s;return t=this._r,r=this._g,n=this._b,i=this._a,s=[M(Math.round(t).toString(16)),M(Math.round(r).toString(16)),M(Math.round(n).toString(16)),M(O(i))],e&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*R(this._r,255))+"%",g:Math.round(100*R(this._g,255))+"%",b:Math.round(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*R(this._r,255))+"%, "+Math.round(100*R(this._g,255))+"%, "+Math.round(100*R(this._b,255))+"%)":"rgba("+Math.round(100*R(this._r,255))+"%, "+Math.round(100*R(this._g,255))+"%, "+Math.round(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+f(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=c(e);r="#"+f(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return!t&&n&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(E,[3])},tetrad:function(){return this._applyCombination(E,[4])}},c.fromRatio=function(e,t){if("object"==n(e)){var r={};for(var i in e)e.hasOwnProperty(i)&&("a"===i?r[i]=e[i]:r[i]=T(e[i]));e=r}return c(e,t)},c.equals=function(e,t){return!!e&&!!t&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),i=c(t).toRgb(),s=r/100;return c({r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)*s+n.a})},c.readability=function(e,t){var r=c(e),n=c(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,i,s,a,o,u=c.readability(e,t);switch(o=!1,(i=((n=(n=r)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),s=(n.size||"small").toLowerCase(),"AA"!==i&&"AAA"!==i&&(i="AA"),"small"!==s&&"large"!==s&&(s="small"),a={level:i,size:s}).level+a.size){case"AAsmall":case"AAAlarge":o=u>=4.5;break;case"AAlarge":o=u>=3;break;case"AAAsmall":o=u>=7}return o},c.mostReadable=function(e,t,r){var n,i,s,a,o=null,u=0;i=(r=r||{}).includeFallbackColors,s=r.level,a=r.size;for(var l=0;l<t.length;l++)(n=c.readability(e,t[l]))>u&&(u=n,o=c(t[l]));return c.isReadable(e,o,{level:s,size:a})||!i?o:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var A=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},C=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(A);function I(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function R(e,t){"string"==typeof(r=e)&&-1!=r.indexOf(".")&&1===parseFloat(r)&&(e="100%");var r,n,i="string"==typeof(n=e)&&-1!=n.indexOf("%");return(e=Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}function P(e){return Math.min(1,Math.max(0,e))}function N(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function T(e){return e<=1&&(e=100*e+"%"),e}function O(e){return Math.round(255*parseFloat(e)).toString(16)}var D=(s="[\\s|\\(]+("+(i="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",a="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",{CSS_UNIT:new RegExp(i),rgb:RegExp("rgb"+s),rgba:RegExp("rgba"+a),hsl:RegExp("hsl"+s),hsla:RegExp("hsla"+a),hsv:RegExp("hsv"+s),hsva:RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function L(e){return!!D.CSS_UNIT.exec(e)}},75575:function(e,t,r){"use strict";function n(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}r.d(t,{E:function(){return n}})},65842:function(e,t,r){"use strict";r.d(t,{z:function(){return i}});var n=r(75575);function i(e,t){t||(t=e.reduce((e,t)=>e+t.length,0));let r=(0,n.E)(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return r}},81427:function(e,t,r){"use strict";r.d(t,{m:function(){return i}});var n=r(40936);function i(e,t="utf8"){let r=n.Z[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}},21649:function(e,t,r){"use strict";r.d(t,{BB:function(){return s.B},mL:function(){return i.m},zo:function(){return n.z}});var n=r(65842),i=r(81427),s=r(51742)},51742:function(e,t,r){"use strict";r.d(t,{B:function(){return i}});var n=r(40936);function i(e,t="utf8"){let r=n.Z[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}},40936:function(e,t,r){"use strict";r.d(t,{Z:function(){return eV}});var n={};r.r(n),r.d(n,{identity:function(){return M}});var i={};r.r(i),r.d(i,{base2:function(){return T}});var s={};r.r(s),r.d(s,{base8:function(){return O}});var a={};r.r(a),r.d(a,{base10:function(){return D}});var o={};r.r(o),r.d(o,{base16:function(){return L},base16upper:function(){return B}});var u={};r.r(u),r.d(u,{base32:function(){return q},base32hex:function(){return F},base32hexpad:function(){return $},base32hexpadupper:function(){return W},base32hexupper:function(){return H},base32pad:function(){return U},base32padupper:function(){return j},base32upper:function(){return z},base32z:function(){return G}});var c={};r.r(c),r.d(c,{base36:function(){return V},base36upper:function(){return K}});var l={};r.r(l),r.d(l,{base58btc:function(){return Z},base58flickr:function(){return Y}});var d={};r.r(d),r.d(d,{base64:function(){return J},base64pad:function(){return Q},base64url:function(){return X},base64urlpad:function(){return ee}});var h={};r.r(h),r.d(h,{base256emoji:function(){return ei}});var f={};r.r(f),r.d(f,{sha256:function(){return ey},sha512:function(){return eb}});var p={};r.r(p),r.d(p,{identity:function(){return ev}});var m={};r.r(m),r.d(m,{code:function(){return e_},decode:function(){return ek},encode:function(){return eE},name:function(){return ew}});var g={};r.r(g),r.d(g,{code:function(){return eC},decode:function(){return eR},encode:function(){return eI},name:function(){return eA}});var y=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var s=e.charAt(i),a=s.charCodeAt(0);if(255!==r[a])throw TypeError(s+" is ambiguous");r[a]=i}var o=e.length,u=e.charAt(0),c=Math.log(o)/Math.log(256),l=Math.log(256)/Math.log(o);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var n=0,i=0;e[t]===u;)n++,t++;for(var s=(e.length-t)*c+1>>>0,a=new Uint8Array(s);e[t];){var l=r[e.charCodeAt(t)];if(255===l)return;for(var d=0,h=s-1;(0!==l||d<i)&&-1!==h;h--,d++)l+=o*a[h]>>>0,a[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var f=s-i;f!==s&&0===a[f];)f++;for(var p=new Uint8Array(n+(s-f)),m=n;f!==s;)p[m++]=a[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,s=t.length;i!==s&&0===t[i];)i++,r++;for(var a=(s-i)*l+1>>>0,c=new Uint8Array(a);i!==s;){for(var d=t[i],h=0,f=a-1;(0!==d||h<n)&&-1!==f;f--,h++)d+=256*c[f]>>>0,c[f]=d%o>>>0,d=d/o>>>0;if(0!==d)throw Error("Non-zero carry");n=h,i++}for(var p=a-n;p!==a&&0===c[p];)p++;for(var m=u.repeat(r);p<a;++p)m+=e.charAt(c[p]);return m},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw Error(`Non-${t} character`)}}};new Uint8Array(0);let b=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},v=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},w=e=>new TextEncoder().encode(e),_=e=>new TextDecoder().decode(e);class E{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class k{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return S(this,e)}}class x{constructor(e){this.decoders=e}or(e){return S(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let S=(e,t)=>new x({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class A{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new E(e,t,r),this.decoder=new k(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let C=({name:e,prefix:t,encode:r,decode:n})=>new A(e,t,r,n),I=({prefix:e,name:t,alphabet:r})=>{let{encode:n,decode:i}=y(r,t);return C({prefix:e,name:t,encode:n,decode:e=>v(i(e))})},R=(e,t,r,n)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let s=e.length;for(;"="===e[s-1];)--s;let a=new Uint8Array(s*r/8|0),o=0,u=0,c=0;for(let t=0;t<s;++t){let s=i[e[t]];if(void 0===s)throw SyntaxError(`Non-${n} character`);u=u<<r|s,(o+=r)>=8&&(o-=8,a[c++]=255&u>>o)}if(o>=r||255&u<<8-o)throw SyntaxError("Unexpected end of data");return a},P=(e,t,r)=>{let n="="===t[t.length-1],i=(1<<r)-1,s="",a=0,o=0;for(let n=0;n<e.length;++n)for(o=o<<8|e[n],a+=8;a>r;)a-=r,s+=t[i&o>>a];if(a&&(s+=t[i&o<<r-a]),n)for(;s.length*r&7;)s+="=";return s},N=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>C({prefix:t,name:e,encode:e=>P(e,n,r),decode:t=>R(t,n,r,e)}),M=C({prefix:"\0",name:"identity",encode:e=>_(e),decode:e=>w(e)}),T=N({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),O=N({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),D=I({prefix:"9",name:"base10",alphabet:"0123456789"}),L=N({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),B=N({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),q=N({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),z=N({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),U=N({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),j=N({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),F=N({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),H=N({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),$=N({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),W=N({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),G=N({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),V=I({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),K=I({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Z=I({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Y=I({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),J=N({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Q=N({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),X=N({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ee=N({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),et=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),er=et.reduce((e,t,r)=>(e[r]=t,e),[]),en=et.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]),ei=C({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=er[t],"")},decode:function(e){let t=[];for(let r of e){let e=en[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var es=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=2147483648;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},ea=function e(t,r){var n,i=0,r=r||0,s=0,a=r,o=t.length;do{if(a>=o)throw e.bytes=0,RangeError("Could not decode varint");n=t[a++],i+=s<28?(127&n)<<s:(127&n)*Math.pow(2,s),s+=7}while(n>=128);return e.bytes=a-r,i};let eo=(e,t=0)=>[ea(e,t),ea.bytes],eu=(e,t,r=0)=>(es(e,t,r),t),ec=e=>e<128?1:e<16384?2:e<2097152?3:e<268435456?4:e<34359738368?5:e<4398046511104?6:e<562949953421312?7:e<72057594037927940?8:e<0x7fffffffffffffff?9:10,el=(e,t)=>{let r=t.byteLength,n=ec(e),i=n+ec(r),s=new Uint8Array(i+r);return eu(e,s,0),eu(r,s,n),s.set(t,i),new ef(e,r,t,s)},ed=e=>{let t=v(e),[r,n]=eo(t),[i,s]=eo(t.subarray(n)),a=t.subarray(n+s);if(a.byteLength!==i)throw Error("Incorrect length");return new ef(r,i,a,t)},eh=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&b(e.bytes,t.bytes);class ef{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}let ep=({name:e,code:t,encode:r})=>new em(e,t,r);class em{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?el(this.code,t):t.then(e=>el(this.code,e))}throw Error("Unknown type, must be binary type")}}let eg=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),ey=ep({name:"sha2-256",code:18,encode:eg("SHA-256")}),eb=ep({name:"sha2-512",code:19,encode:eg("SHA-512")}),ev={code:0,name:"identity",encode:v,digest:e=>el(0,v(e))},ew="raw",e_=85,eE=e=>v(e),ek=e=>v(e),ex=new TextEncoder,eS=new TextDecoder,eA="json",eC=512,eI=e=>ex.encode(JSON.stringify(e)),eR=e=>JSON.parse(eS.decode(e));class eP{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:ez,byteLength:ez,code:eq,version:eq,multihash:eq,bytes:eq,_baseCache:ez,asCID:ez})}toV0(){if(0===this.version)return this;{let{code:e,multihash:t}=this;if(e!==eO)throw Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==eD)throw Error("Cannot convert non sha2-256 multihash CID to CIDv0");return eP.createV0(t)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,r=el(e,t);return eP.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&eh(this.multihash,e.multihash)}toString(e){let{bytes:t,version:r,_baseCache:n}=this;return 0===r?eM(t,n,e||Z.encoder):eT(t,n,e||q.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return eU(/^0\.0/,ej),!!(e&&(e[eB]||e.asCID===e))}get toBaseEncodedString(){throw Error("Deprecated, use .toString()")}get codec(){throw Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw Error('"multibaseName" property is deprecated')}get prefix(){throw Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof eP)return e;if(null!=e&&e.asCID===e){let{version:t,code:r,multihash:n,bytes:i}=e;return new eP(t,r,n,i||eL(t,r,n.bytes))}if(null==e||!0!==e[eB])return null;{let{version:t,multihash:r,code:n}=e,i=ed(r);return eP.create(t,n,i)}}static create(e,t,r){if("number"!=typeof t)throw Error("String codecs are no longer supported");switch(e){case 0:if(t===eO)return new eP(e,t,r,r.bytes);throw Error(`Version 0 CID must use dag-pb (code: ${eO}) block encoding`);case 1:{let n=eL(e,t,r.bytes);return new eP(e,t,r,n)}default:throw Error("Invalid version")}}static createV0(e){return eP.create(0,eO,e)}static createV1(e,t){return eP.create(1,e,t)}static decode(e){let[t,r]=eP.decodeFirst(e);if(r.length)throw Error("Incorrect length");return t}static decodeFirst(e){let t=eP.inspectBytes(e),r=t.size-t.multihashSize,n=v(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw Error("Incorrect length");let i=n.subarray(t.multihashSize-t.digestSize),s=new ef(t.multihashCode,t.digestSize,i,n);return[0===t.version?eP.createV0(s):eP.createV1(t.codec,s),e.subarray(t.size)]}static inspectBytes(e){let t=0,r=()=>{let[r,n]=eo(e.subarray(t));return t+=n,r},n=r(),i=eO;if(18===n?(n=0,t=0):1===n&&(i=r()),0!==n&&1!==n)throw RangeError(`Invalid CID version ${n}`);let s=t,a=r(),o=r(),u=t+o;return{version:n,codec:i,multihashCode:a,digestSize:o,multihashSize:u-s,size:u}}static parse(e,t){let[r,n]=eN(e,t),i=eP.decode(n);return i._baseCache.set(r,e),i}}let eN=(e,t)=>{switch(e[0]){case"Q":return[Z.prefix,(t||Z).decode(`${Z.prefix}${e}`)];case Z.prefix:return[Z.prefix,(t||Z).decode(e)];case q.prefix:return[q.prefix,(t||q).decode(e)];default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},eM=(e,t,r)=>{let{prefix:n}=r;if(n!==Z.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=t.get(n);if(null!=i)return i;{let i=r.encode(e).slice(1);return t.set(n,i),i}},eT=(e,t,r)=>{let{prefix:n}=r,i=t.get(n);if(null!=i)return i;{let i=r.encode(e);return t.set(n,i),i}},eO=112,eD=18,eL=(e,t,r)=>{let n=ec(e),i=n+ec(t),s=new Uint8Array(i+r.byteLength);return eu(e,s,0),eu(t,s,n),s.set(r,i),s},eB=Symbol.for("@ipld/js-cid/CID"),eq={writable:!1,configurable:!1,enumerable:!0},ez={writable:!1,enumerable:!1,configurable:!1},eU=(e,t)=>{if(e.test("0.0.0-dev"))console.warn(t);else throw Error(t)},ej=`CID.isCID(v) is deprecated and will be removed in the next major release.
Following code pattern:

if (CID.isCID(value)) {
  doSomethingWithCID(value)
}

Is replaced with:

const cid = CID.asCID(value)
if (cid) {
  // Make sure to use cid instead of value
  doSomethingWithCID(cid)
}
`,eF={...n,...i,...s,...a,...o,...u,...c,...l,...d,...h};({...f,...p});var eH=r(75575);function e$(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}let eW=e$("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),eG=e$("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);let t=(0,eH.E)(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t});var eV={utf8:eW,"utf-8":eW,hex:eF.base16,latin1:eG,ascii:eG,binary:eG,...eF}},15262:function(e,t,r){"use strict";r.d(t,{ac:function(){return a}});var n=r(66399);r(88061);var i="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,s="undefined"==typeof window;function a(e,{defaultValue:t=!1,initializeWithValue:r=!0}={}){let a=e=>s?t:window.matchMedia(e).matches,[o,u]=(0,n.useState)(()=>r?a(e):t);function c(){u(a(e))}return i(()=>{let t=window.matchMedia(e);return c(),t.addListener?t.addListener(c):t.addEventListener("change",c),()=>{t.removeListener?t.removeListener(c):t.removeEventListener("change",c)}},[e]),o}},9512:function(e,t,r){"use strict";function n(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}r.d(t,{T:function(){return n}})},40413:function(e,t,r){"use strict";r.d(t,{r:function(){return x}});var n=r(76318),i=r(6909);class s extends i.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class a extends i.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class o extends i.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class u extends i.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}let c=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,l=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,d=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,h=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function f(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!globalThis.hasOwnProperty("Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function p(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function m({uri:e,gatewayUrls:t}){let r=d.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=p(t?.ipfs,"https://ipfs.io"),i=p(t?.arweave,"https://arweave.net"),s=e.match(c),{protocol:a,subpath:u,target:f,subtarget:m=""}=s?.groups||{},g="ipns:/"===a||"ipns/"===u,y="ipfs:/"===a||"ipfs/"===u||l.test(e);if(e.startsWith("http")&&!g&&!y){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((g||y)&&f)return{uri:`${n}/${g?"ipns":"ipfs"}/${f}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===a&&f)return{uri:`${i}/${f}${m||""}`,isOnChain:!1,isEncoded:!1};let b=e.replace(h,"");if(b.startsWith("<svg")&&(b=`data:image/svg+xml;base64,${btoa(b)}`),b.startsWith("data:")||b.startsWith("{"))return{uri:b,isOnChain:!0,isEncoded:!1};throw new o({uri:e})}function g(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new s({data:e});return e.image||e.image_url||e.image_data}async function y({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(e=>e.json());return await b({gatewayUrls:e,uri:g(r)})}catch{throw new o({uri:t})}}async function b({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=m({uri:t,gatewayUrls:e});if(n||await f(r))return r;throw new o({uri:t})}async function v(e,{nft:t}){if("erc721"===t.namespace)return(0,n.L)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,n.L)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new u({namespace:t.namespace})}async function w(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?_(e,{gatewayUrls:t,record:r}):b({uri:r,gatewayUrls:t})}async function _(e,{gatewayUrls:t,record:r}){let n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=t.split("/"),[s,o]=r.split(":"),[u,c]=n.split(":");if(!s||"eip155"!==s.toLowerCase())throw new a({reason:"Only EIP-155 supported"});if(!o)throw new a({reason:"Chain ID not found"});if(!c)throw new a({reason:"Contract address not found"});if(!i)throw new a({reason:"Token ID not found"});if(!u)throw new a({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o),namespace:u.toLowerCase(),contractAddress:c,tokenID:i}}(r),{uri:i,isOnChain:s,isEncoded:o}=m({uri:await v(e,{nft:n}),gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return b({uri:g(JSON.parse(o?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let u=n.tokenID;return"erc1155"===n.namespace&&(u=u.replace("0x","").padStart(64,"0")),y({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,u)})}var E=r(42434),k=r(28713);async function x(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:s,strict:a,universalResolverAddress:o}){let u=await (0,E.s)(e,k.g,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:o,gatewayUrls:s,strict:a});if(!u)return null;try{return await w(e,{record:u,gatewayUrls:n})}catch{return null}}},61513:function(e,t,r){"use strict";r.d(t,{w:function(){return l}});var n=r(15783),i=r(84556),s=r(41458),a=r(76107),o=r(64938),u=r(42434),c=r(76318);async function l(e,{address:t,blockNumber:r,blockTag:l,gatewayUrls:d,strict:h,universalResolverAddress:f}){let p=f;if(!p){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");p=(0,i.L)({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}let m=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let i={address:p,abi:n.du,functionName:"reverse",args:[(0,s.NC)((0,o.T)(m))],blockNumber:r,blockTag:l},a=(0,u.s)(e,c.L,"readContract"),[h,f]=d?await a({...i,args:[...i.args,d]}):await a(i);if(t.toLowerCase()!==f.toLowerCase())return null;return h}catch(e){if(h)throw e;if((0,a.c)(e,"reverse"))return null;throw e}}},28713:function(e,t,r){"use strict";r.d(t,{g:function(){return f}});var n=r(15783),i=r(99777),s=r(69646),a=r(84556),o=r(41458),u=r(76107),c=r(74969),l=r(64938),d=r(42434),h=r(76318);async function f(e,{blockNumber:t,blockTag:r,name:f,key:p,gatewayUrls:m,strict:g,universalResolverAddress:y}){let b=y;if(!b){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");b=(0,a.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let a={address:b,abi:n.k3,functionName:"resolve",args:[(0,o.NC)((0,l.T)(f)),(0,s.R)({abi:n.nZ,functionName:"text",args:[(0,c.V)(f),p]})],blockNumber:t,blockTag:r},u=(0,d.s)(e,h.L,"readContract"),g=m?await u({...a,args:[...a.args,m]}):await u(a);if("0x"===g[0])return null;let y=(0,i.k)({abi:n.nZ,functionName:"text",data:g[0]});return""===y?null:y}catch(e){if(g)throw e;if((0,u.c)(e,"resolve"))return null;throw e}}},48732:function(e,t,r){"use strict";r.d(t,{R:function(){return ee}});var n=r(45252);let i=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,s=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,a=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/,o=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/,u=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/,c=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/,l=/^receive\(\) external payable$/,d=new Set(["indexed"]),h=new Set(["calldata","memory","storage"]);class f extends Error{constructor(e,t={}){let r=t.cause instanceof f?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof f&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...r?[`Details: ${r}`]:[],"Version: abitype@1.0.5"].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.shortMessage=e}}class p extends f{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class m extends f{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class g extends f{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class y extends f{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class b extends f{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class v extends f{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class w extends f{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class _ extends f{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class E extends f{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class k extends f{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class x extends f{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class S extends f{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let A=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),C=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,I=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,R=/^u?int$/;function P(e,t){var r,i,s;let a;let o=(r=t?.type)?`${r}:${e}`:e;if(A.has(o))return A.get(o);let u=n.cN.test(e),c=(0,n.Zw)(u?I:C,e);if(!c)throw new g({param:e});if(c.name&&("address"===(i=c.name)||"bool"===i||"function"===i||"string"===i||"tuple"===i||n.eL.test(i)||n.lh.test(i)||T.test(i)))throw new y({param:e,name:c.name});let l=c.name?{name:c.name}:{},d="indexed"===c.modifier?{indexed:!0}:{},f=t?.structs??{},p={};if(u){a="tuple";let e=N(c.type),t=[],r=e.length;for(let n=0;n<r;n++)t.push(P(e[n],{structs:f}));p={components:t}}else if(c.type in f)a="tuple",p={components:f[c.type]};else if(R.test(c.type))a=`${c.type}256`;else if(a=c.type,t?.type!=="struct"&&!M(a))throw new m({type:a});if(c.modifier){if(!t?.modifiers?.has?.(c.modifier))throw new b({param:e,type:t?.type,modifier:c.modifier});if(h.has(c.modifier)&&(s=a,!c.array&&"bytes"!==s&&"string"!==s&&"tuple"!==s))throw new v({param:e,type:t?.type,modifier:c.modifier})}let w={type:`${a}${c.array??""}`,...l,...d,...p};return A.set(o,w),w}function N(e,t=[],r="",n=0){let i=e.trim().length;for(let s=0;s<i;s++){let i=e[s],a=e.slice(s+1);switch(i){case",":return 0===n?N(a,[...t,r.trim()]):N(a,t,`${r}${i}`,n);case"(":return N(a,t,`${r}${i}`,n+1);case")":return N(a,t,`${r}${i}`,n-1);default:return N(a,t,`${r}${i}`,n)}}if(""===r)return t;if(0!==n)throw new S({current:r,depth:n});return t.push(r.trim()),t}function M(e){return"address"===e||"bool"===e||"function"===e||"string"===e||n.eL.test(e)||n.lh.test(e)}let T=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/,O=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function D(e){let t=function(e){let t={},r=e.length;for(let i=0;i<r;i++){let r=e[i];if(!o.test(r))continue;let s=(0,n.Zw)(o,r);if(!s)throw new _({signature:r,type:"struct"});let a=s.properties.split(";"),u=[],c=a.length;for(let e=0;e<c;e++){let t=a[e].trim();if(!t)continue;let r=P(t,{type:"struct"});u.push(r)}if(!u.length)throw new k({signature:r});t[s.name]=u}let i={},s=Object.entries(t),a=s.length;for(let e=0;e<a;e++){let[r,a]=s[e];i[r]=function e(t,r,i=new Set){let s=[],a=t.length;for(let o=0;o<a;o++){let a=t[o];if(n.cN.test(a.type))s.push(a);else{let t=(0,n.Zw)(O,a.type);if(!t?.type)throw new w({abiParameter:a});let{array:o,type:u}=t;if(u in r){if(i.has(u))throw new x({type:u});s.push({...a,type:`tuple${o??""}`,components:e(r[u]??[],r,new Set([...i,u]))})}else if(M(u))s.push(a);else throw new p({type:u})}}return s}(a,t)}return i}(e),r=[],f=e.length;for(let p=0;p<f;p++){let f=e[p];o.test(f)||r.push(function(e,t={}){if(a.test(e)){let r=(0,n.Zw)(a,e);if(!r)throw new _({signature:e,type:"function"});let i=N(r.parameters),s=[],o=i.length;for(let e=0;e<o;e++)s.push(P(i[e],{modifiers:h,structs:t,type:"function"}));let u=[];if(r.returns){let e=N(r.returns),n=e.length;for(let r=0;r<n;r++)u.push(P(e[r],{modifiers:h,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:s,outputs:u}}if(s.test(e)){let r=(0,n.Zw)(s,e);if(!r)throw new _({signature:e,type:"event"});let i=N(r.parameters),a=[],o=i.length;for(let e=0;e<o;e++)a.push(P(i[e],{modifiers:d,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:a}}if(i.test(e)){let r=(0,n.Zw)(i,e);if(!r)throw new _({signature:e,type:"error"});let s=N(r.parameters),a=[],o=s.length;for(let e=0;e<o;e++)a.push(P(s[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:a}}if(u.test(e)){let r=(0,n.Zw)(u,e);if(!r)throw new _({signature:e,type:"constructor"});let i=N(r.parameters),s=[],a=i.length;for(let e=0;e<a;e++)s.push(P(i[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:s}}if(c.test(e))return{type:"fallback"};if(l.test(e))return{type:"receive",stateMutability:"payable"};throw new E({signature:e})}(f,t))}return r}var L=r(9512),B=r(15783),q=r(30875),z=r(6909),U=r(87768),j=r(32655),F=r(99777),H=r(18710),$=r(69646),W=r(84556),G=r(41458),V=r(28957),K=r(23553),Z=r(47139),Y=r(47768),J=r(30934),Q=r(40364),X=r(21944);async function ee(e,t){let{account:n=e.account,batch:i=!!e.batch?.multicall,blockNumber:s,blockTag:a="latest",accessList:o,blobs:u,code:c,data:l,factory:d,factoryData:h,gas:f,gasPrice:p,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:b,to:v,value:w,stateOverride:_,...E}=t,k=n?(0,L.T)(n):void 0;if(c&&(d||h))throw new z.G("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(c&&v)throw new z.G("Cannot provide both `code` & `to` as parameters.");let x=c&&l,S=d&&h&&v&&l,A=x||S,C=x?function(e){let{code:t,data:r}=e;return(0,H.w)({abi:D(["constructor(bytes, bytes)"]),bytecode:q.NO,args:[t,r]})}({code:c,data:l}):S?function(e){let{data:t,factory:r,factoryData:n,to:i}=e;return(0,H.w)({abi:D(["constructor(address, bytes, address, bytes)"]),bytecode:q.pG,args:[i,t,r,n]})}({data:l,factory:d,factoryData:h,to:v}):l;try{(0,X.F)(t);let r=(s?(0,G.eC)(s):void 0)||a,n=(0,Q.mF)(_),c=e.chain?.formatters?.transactionRequest?.format,l=(c||Y.tG)({...(0,Z.K)(E,{format:c}),from:k?.address,accessList:o,blobs:u,data:C,gas:f,gasPrice:p,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:b,to:A?void 0:v,value:w});if(i&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!r&&!(Object.values(n).filter(e=>void 0!==e).length>0)}({request:l})&&!n)try{return await et(e,{...l,blockNumber:s,blockTag:a})}catch(e){if(!(e instanceof U.pZ)&&!(e instanceof U.mm))throw e}let d=await e.request({method:"eth_call",params:n?[l,r,n]:[l,r]});if("0x"===d)return{data:void 0};return{data:d}}catch(a){let n=function(e){if(!(e instanceof z.G))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(a),{offchainLookup:i,offchainLookupSignature:s}=await r.e(837).then(r.bind(r,76837));if(!1!==e.ccipRead&&n?.slice(0,10)===s&&v)return{data:await i(e,{data:n,to:v})};if(A&&n?.slice(0,10)==="0x101bb98d")throw new j.Mo({factory:d});throw function(e,{docsPath:t,...r}){let n=(()=>{let t=(0,K.k)(e,r);return t instanceof V.cj?e:t})();return new j.cg(n,{docsPath:t,...r})}(a,{...t,account:k,chain:e.chain})}}async function et(e,t){let{batchSize:r=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:a,multicallAddress:o,to:u}=t,c=o;if(!c){if(!e.chain)throw new U.pZ;c=(0,W.L)({blockNumber:i,chain:e.chain,contract:"multicall3"})}let l=(i?(0,G.eC)(i):void 0)||s,{schedule:d}=(0,J.S)({id:`${e.uid}.${l}`,wait:n,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*r,fn:async t=>{let r=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),n=(0,$.R)({abi:B.F8,args:[r],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:n,to:c},l]});return(0,F.k)({abi:B.F8,args:[r],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:h,success:f}]=await d({data:a,to:u});if(!f)throw new j.VQ({data:h});return"0x"===h?{data:void 0}:{data:h}}},4481:function(e,t,r){"use strict";r.d(t,{A:function(){return a}});var n=r(15300),i=r(41458),s=r(97436);async function a(e,t){let{address:r,abi:a,args:o,eventName:u,fromBlock:c,strict:l,toBlock:d}=t,h=(0,s.g)(e,{method:"eth_newFilter"}),f=u?(0,n.O)({abi:a,args:o,eventName:u}):void 0,p=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof c?(0,i.eC)(c):c,toBlock:"bigint"==typeof d?(0,i.eC)(d):d,topics:f}]});return{abi:a,args:o,eventName:u,id:p,request:h(p),strict:!!l,type:"event"}}},27925:function(e,t,r){"use strict";r.d(t,{D:function(){return u}});var n=r(9512),i=r(69646),s=r(51893),a=r(42434),o=r(50850);async function u(e,t){let{abi:r,address:u,args:c,functionName:l,...d}=t,h=(0,i.R)({abi:r,args:c,functionName:l});try{return await (0,a.s)(e,o.Q,"estimateGas")({data:h,to:u,...d})}catch(t){let e=d.account?(0,n.T)(d.account):void 0;throw(0,s.S)(t,{abi:r,address:u,args:c,docsPath:"/docs/contract/estimateContractGas",functionName:l,sender:e?.address})}}},22869:function(e,t,r){"use strict";r.d(t,{C:function(){return c},X:function(){return u}});var n=r(19125),i=r(42434),s=r(86243),a=r(54506),o=r(20356);async function u(e,t){return c(e,t)}async function c(e,t){let{block:r,chain:u=e.chain,request:c,type:l="eip1559"}=t||{},d=await (async()=>"function"==typeof u?.fees?.baseFeeMultiplier?u.fees.baseFeeMultiplier({block:r,client:e,request:c}):u?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new n.Fz;let h=10**(d.toString().split(".")[1]?.length??0),f=e=>e*BigInt(Math.ceil(d*h))/BigInt(h),p=r||await (0,i.s)(e,a.Q,"getBlock")({});if("function"==typeof u?.fees?.estimateFeesPerGas){let t=await u.fees.estimateFeesPerGas({block:r,client:e,multiply:f,request:c,type:l});if(null!==t)return t}if("eip1559"===l){if("bigint"!=typeof p.baseFeePerGas)throw new n.e5;let t="bigint"==typeof c?.maxPriorityFeePerGas?c.maxPriorityFeePerGas:await (0,s.h)(e,{block:p,chain:u,request:c}),r=f(p.baseFeePerGas);return{maxFeePerGas:c?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:c?.gasPrice??f(await (0,i.s)(e,o.o,"getGasPrice")({}))}}},50850:function(e,t,r){"use strict";r.d(t,{Q:function(){return v}});var n=r(9512),i=r(6909),s=r(88819),a=r(41458),o=r(53536),u=r(58720),c=r(8566);class l extends i.G{constructor(e,{account:t,docsPath:r,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:f,value:p}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,c.xr)({from:t?.address,to:f,value:void 0!==p&&`${(0,o.d)(p)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:void 0!==a&&`${(0,u.o)(a)} gwei`,maxFeePerGas:void 0!==l&&`${(0,u.o)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,u.o)(d)} gwei`,nonce:h})].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}var d=r(28957),h=r(23553),f=r(47139),p=r(47768),m=r(40364),g=r(21944),y=r(18727),b=r(55697);async function v(e,t){let r=t.account??e.account,o=r?(0,n.T)(r):void 0;try{let{accessList:r,authorizationList:n,blobs:c,blobVersionedHashes:l,blockNumber:d,blockTag:h,data:v,gas:w,gasPrice:_,maxFeePerBlobGas:E,maxFeePerGas:k,maxPriorityFeePerGas:x,nonce:S,value:A,stateOverride:C,...I}=await (0,y.Z)(e,{...t,parameters:o?.type==="local"?void 0:["blobVersionedHashes"]}),R=(d?(0,a.eC)(d):void 0)||h,P=(0,m.mF)(C),N=await (async()=>I.to?I.to:n&&n.length>0?await (0,s.z)({authorization:n[0]}).catch(()=>{throw new i.G("`to` is required. Could not infer from `authorizationList`")}):void 0)();(0,g.F)(t);let M=e.chain?.formatters?.transactionRequest?.format,T=(M||p.tG)({...(0,f.K)(I,{format:M}),from:o?.address,accessList:r,authorizationList:n,blobs:c,blobVersionedHashes:l,data:v,gas:w,gasPrice:_,maxFeePerBlobGas:E,maxFeePerGas:k,maxPriorityFeePerGas:x,nonce:S,to:N,value:A});function u(t){let{block:r,request:n,rpcStateOverride:i}=t;return e.request({method:"eth_estimateGas",params:i?[n,r??"latest",i]:r?[n,r]:[n]})}let O=BigInt(await u({block:R,request:T,rpcStateOverride:P}));if(n){let t=await (0,b.s)(e,{address:T.from}),r=await Promise.all(n.map(async e=>{let{contractAddress:r}=e,n=await u({block:R,request:{authorizationList:void 0,data:v,from:o?.address,to:r,value:(0,a.eC)(t)},rpcStateOverride:P}).catch(()=>100000n);return 2n*BigInt(n)}));O+=r.reduce((e,t)=>e+t,0n)}return O}catch(r){throw function(e,{docsPath:t,...r}){return new l((()=>{let t=(0,h.k)(e,r);return t instanceof d.cj?e:t})(),{docsPath:t,...r})}(r,{...t,account:o,chain:e.chain})}}},86243:function(e,t,r){"use strict";r.d(t,{_:function(){return u},h:function(){return c}});var n=r(19125),i=r(30698),s=r(42434),a=r(54506),o=r(20356);async function u(e,t){return c(e,t)}async function c(e,t){let{block:r,chain:u=e.chain,request:c}=t||{};try{let t=u?.fees?.maxPriorityFeePerGas??u?.fees?.defaultPriorityFee;if("function"==typeof t){let n=r||await (0,s.s)(e,a.Q,"getBlock")({}),i=await t({block:n,client:e,request:c});if(null===i)throw Error();return i}if(void 0!==t)return t;let n=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.y_)(n)}catch{let[t,i]=await Promise.all([r?Promise.resolve(r):(0,s.s)(e,a.Q,"getBlock")({}),(0,s.s)(e,o.o,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new n.e5;let u=i-t.baseFeePerGas;if(u<0n)return 0n;return u}}},55697:function(e,t,r){"use strict";r.d(t,{s:function(){return i}});var n=r(41458);async function i(e,{address:t,blockNumber:r,blockTag:i="latest"}){let s=r?(0,n.eC)(r):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,s||i]}))}},54506:function(e,t,r){"use strict";r.d(t,{Q:function(){return a}});var n=r(55742),i=r(41458),s=r(12062);async function a(e,{blockHash:t,blockNumber:r,blockTag:a,includeTransactions:o}={}){let u=o??!1,c=void 0!==r?(0,i.eC)(r):void 0,l=null;if(!(l=t?await e.request({method:"eth_getBlockByHash",params:[t,u]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[c||(a??"latest"),u]},{dedupe:!!c})))throw new n.f({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||s.Z)(l)}},98855:function(e,t,r){"use strict";r.d(t,{z:function(){return o}});let n=new Map,i=new Map;async function s(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let s=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,n),s=t(e,i);return{clear:()=>{r.clear(),s.clear()},promise:r,response:s}}(t),a=s.response.get();if(a&&r>0&&new Date().getTime()-a.created.getTime()<r)return a.data;let o=s.promise.get();o||(o=e(),s.promise.set(o));try{let e=await o;return s.response.set({created:new Date,data:e}),e}finally{s.promise.clear()}}let a=e=>`blockNumber.${e}`;async function o(e,{cacheTime:t=e.cacheTime}={}){return BigInt(await s(()=>e.request({method:"eth_blockNumber"}),{cacheKey:a(e.uid),cacheTime:t}))}},15570:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(30698);async function i(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,n.ly)(t)}},26409:function(e,t,r){"use strict";r.d(t,{C:function(){return i}});var n=r(41458);async function i(e,{address:t,blockNumber:r,blockTag:i="latest"}){let s=void 0!==r?(0,n.eC)(r):void 0,a=await e.request({method:"eth_getCode",params:[t,s||i]},{dedupe:!!s});if("0x"!==a)return a}},31086:function(e,t,r){"use strict";r.d(t,{m:function(){return a}});var n=r(8730),i=r(42434),s=r(52729);async function a(e,t){let{abi:r,address:a,args:o,blockHash:u,eventName:c,fromBlock:l,toBlock:d,strict:h}=t,f=c?(0,n.mE)({abi:r,name:c}):void 0,p=f?void 0:r.filter(e=>"event"===e.type);return(0,i.s)(e,s.y,"getLogs")({address:a,args:o,blockHash:u,event:f,events:p,fromBlock:l,toBlock:d,strict:h})}},83509:function(e,t,r){"use strict";r.d(t,{K:function(){return s}});var n=r(61182),i=r(68799);async function s(e,{filter:t}){let r="strict"in t&&t.strict,s=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof s[0])return s;let a=s.map(e=>(0,i.U)(e));return"abi"in t&&t.abi?(0,n.h)({abi:t.abi,logs:a,strict:r}):a}},20356:function(e,t,r){"use strict";async function n(e){return BigInt(await e.request({method:"eth_gasPrice"}))}r.d(t,{o:function(){return n}})},52729:function(e,t,r){"use strict";r.d(t,{y:function(){return o}});var n=r(15300),i=r(61182),s=r(41458),a=r(68799);async function o(e,{address:t,blockHash:r,fromBlock:o,toBlock:u,event:c,events:l,args:d,strict:h}={}){let f=l??(c?[c]:void 0),p=[];f&&(p=[f.flatMap(e=>(0,n.O)({abi:[e],eventName:e.name,args:l?void 0:d}))],c&&(p=p[0]));let m=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:p,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:p,fromBlock:"bigint"==typeof o?(0,s.eC)(o):o,toBlock:"bigint"==typeof u?(0,s.eC)(u):u}]})).map(e=>(0,a.U)(e));return f?(0,i.h)({abi:f,args:d,logs:m,strict:h??!1}):m}},14351:function(e,t,r){"use strict";r.d(t,{f:function(){return a}});var n=r(8566),i=r(41458),s=r(32940);async function a(e,{blockHash:t,blockNumber:r,blockTag:a,hash:o,index:u}){let c=a||"latest",l=void 0!==r?(0,i.eC)(r):void 0,d=null;if(o?d=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,i.eC)(u)]},{dedupe:!0}):(l||c)&&(d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,(0,i.eC)(u)]},{dedupe:!!l})),!d)throw new n.Bh({blockHash:t,blockNumber:r,blockTag:c,hash:o,index:u});return(e.chain?.formatters?.transaction?.format||s.Tr)(d)}},91644:function(e,t,r){"use strict";r.d(t,{K:function(){return s}});var n=r(30698),i=r(41458);async function s(e,{address:t,blockTag:r="latest",blockNumber:s}){let a=await e.request({method:"eth_getTransactionCount",params:[t,s?(0,i.eC)(s):r]},{dedupe:!!s});return(0,n.ly)(a)}},46677:function(e,t,r){"use strict";r.d(t,{a:function(){return s}});var n=r(8566),i=r(34474);async function s(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new n.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||i.fA)(r)}},76318:function(e,t,r){"use strict";r.d(t,{L:function(){return u}});var n=r(99777),i=r(69646),s=r(51893),a=r(42434),o=r(48732);async function u(e,t){let{abi:r,address:u,args:c,functionName:l,...d}=t,h=(0,i.R)({abi:r,args:c,functionName:l});try{let{data:t}=await (0,a.s)(e,o.R,"call")({...d,data:h,to:u});return(0,n.k)({abi:r,args:c,functionName:l,data:t||"0x"})}catch(e){throw(0,s.S)(e,{abi:r,address:u,args:c,docsPath:"/docs/contract/readContract",functionName:l})}}},45852:function(e,t,r){"use strict";r.d(t,{a:function(){return c}});var n=r(9512),i=r(99777),s=r(69646),a=r(51893),o=r(42434),u=r(48732);async function c(e,t){let{abi:r,address:c,args:l,dataSuffix:d,functionName:h,...f}=t,p=f.account?(0,n.T)(f.account):e.account,m=(0,s.R)({abi:r,args:l,functionName:h});try{let{data:n}=await (0,o.s)(e,u.R,"call")({batch:!1,data:`${m}${d?d.replace("0x",""):""}`,to:c,...f,account:p}),s=(0,i.k)({abi:r,args:l,functionName:h,data:n||"0x"}),a=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:s,request:{abi:a,address:c,args:l,dataSuffix:d,functionName:h,...f,account:p}}}catch(e){throw(0,a.S)(e,{abi:r,address:c,args:l,docsPath:"/docs/contract/simulateContract",functionName:h,sender:p?.address})}}},31889:function(e,t,r){"use strict";async function n(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}r.d(t,{W:function(){return n}})},28812:function(e,t,r){"use strict";r.d(t,{e:function(){return f}});var n=r(55742),i=r(8566),s=r(42434),a=r(71708),o=r(54356),u=r(97928),c=r(54506),l=r(14351),d=r(46677),h=r(91562);async function f(e,{confirmations:t=1,hash:r,onReplaced:f,pollingInterval:p=e.pollingInterval,retryCount:m=6,retryDelay:g=({count:e})=>200*~~(1<<e),timeout:y=18e4}){let b,v,w;let _=(0,u.P)(["waitForTransactionReceipt",e.uid,r]),E=!1;return new Promise((u,k)=>{y&&setTimeout(()=>k(new i.mc({hash:r})),y);let x=(0,a.N7)(_,{onReplaced:f,resolve:u,reject:k},a=>{let u=(0,s.s)(e,h.q,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(h){let f=e=>{u(),e(),x()},p=h;if(!E)try{if(w){if(t>1&&(!w.blockNumber||p-w.blockNumber+1n<t))return;f(()=>a.resolve(w));return}if(b||(E=!0,await (0,o.J)(async()=>{(b=await (0,s.s)(e,l.f,"getTransaction")({hash:r})).blockNumber&&(p=b.blockNumber)},{delay:g,retryCount:m}),E=!1),w=await (0,s.s)(e,d.a,"getTransactionReceipt")({hash:r}),t>1&&(!w.blockNumber||p-w.blockNumber+1n<t))return;f(()=>a.resolve(w))}catch(r){if(r instanceof i.Bh||r instanceof i.Yb){if(!b){E=!1;return}try{v=b,E=!0;let r=await (0,o.J)(()=>(0,s.s)(e,c.Q,"getBlock")({blockNumber:p,includeTransactions:!0}),{delay:g,retryCount:m,shouldRetry:({error:e})=>e instanceof n.f});E=!1;let i=r.transactions.find(({from:e,nonce:t})=>e===v.from&&t===v.nonce);if(!i||(w=await (0,s.s)(e,d.a,"getTransactionReceipt")({hash:i.hash}),t>1&&(!w.blockNumber||p-w.blockNumber+1n<t)))return;let u="replaced";i.to===v.to&&i.value===v.value?u="repriced":i.from===i.to&&0n===i.value&&(u="cancelled"),f(()=>{a.onReplaced?.({reason:u,replacedTransaction:v,transaction:i,transactionReceipt:w}),a.resolve(w)})}catch(e){f(()=>a.reject(e))}}else f(()=>a.reject(r))}}})})})}},91562:function(e,t,r){"use strict";r.d(t,{q:function(){return c}});var n=r(30698),i=r(42434),s=r(71708),a=r(31181),o=r(97928),u=r(98855);function c(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:c,onError:l,poll:d,pollingInterval:h=e.pollingInterval}){let f;return(void 0!==d?d:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type))?(()=>{let n=(0,o.P)(["watchBlockNumber",e.uid,t,r,h]);return(0,s.N7)(n,{onBlockNumber:c,onError:l},n=>(0,a.$)(async()=>{try{let t=await (0,i.s)(e,u.z,"getBlockNumber")({cacheTime:0});if(f){if(t===f)return;if(t-f>1&&r)for(let e=f+1n;e<t;e++)n.onBlockNumber(e,f),f=e}(!f||t>f)&&(n.onBlockNumber(t,f),f=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:h}))})():(()=>{let i=(0,o.P)(["watchBlockNumber",e.uid,t,r]);return(0,s.N7)(i,{onBlockNumber:c,onError:l},t=>{let r=!0,i=()=>r=!1;return(async()=>{try{let s=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:a}=await s.subscribe({params:["newHeads"],onData(e){if(!r)return;let i=(0,n.y_)(e.result?.number);t.onBlockNumber(i,f),f=i},onError(e){t.onError?.(e)}});i=a,r||i()}catch(e){l?.(e)}})(),()=>i()})})()}},45330:function(e,t,r){"use strict";r.d(t,{Y:function(){return y}});var n=r(16330),i=r(36333),s=r(689),a=r(15300),o=r(68799),u=r(42434),c=r(71708),l=r(31181),d=r(97928),h=r(4481),f=r(98855),p=r(31086),m=r(83509),g=r(31889);function y(e,t){let{abi:r,address:y,args:b,batch:v=!0,eventName:w,fromBlock:_,onError:E,onLogs:k,poll:x,pollingInterval:S=e.pollingInterval,strict:A}=t;return(void 0!==x?x:"bigint"==typeof _||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type))?(()=>{let t=A??!1,n=(0,d.P)(["watchContractEvent",y,b,v,e.uid,w,S,t,_]);return(0,c.N7)(n,{onLogs:k,onError:E},n=>{let s,a;void 0!==_&&(s=_-1n);let o=!1,c=(0,l.$)(async()=>{if(!o){try{a=await (0,u.s)(e,h.A,"createContractEventFilter")({abi:r,address:y,args:b,eventName:w,strict:t,fromBlock:_})}catch{}o=!0;return}try{let i;if(a)i=await (0,u.s)(e,m.K,"getFilterChanges")({filter:a});else{let n=await (0,u.s)(e,f.z,"getBlockNumber")({});i=s&&s<n?await (0,u.s)(e,p.m,"getContractEvents")({abi:r,address:y,args:b,eventName:w,fromBlock:s+1n,toBlock:n,strict:t}):[],s=n}if(0===i.length)return;if(v)n.onLogs(i);else for(let e of i)n.onLogs([e])}catch(e){a&&e instanceof i.yR&&(o=!1),n.onError?.(e)}},{emitOnBegin:!0,interval:S});return async()=>{a&&await (0,u.s)(e,g.W,"uninstallFilter")({filter:a}),c()}})})():(()=>{let t=(0,d.P)(["watchContractEvent",y,b,v,e.uid,w,S,A??!1]),i=!0,u=()=>i=!1;return(0,c.N7)(t,{onLogs:k,onError:E},t=>((async()=>{try{let c=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),l=w?(0,a.O)({abi:r,eventName:w,args:b}):[],{unsubscribe:d}=await c.subscribe({params:["logs",{address:y,topics:l}],onData(e){if(!i)return;let a=e.result;try{let{eventName:e,args:n}=(0,s.F)({abi:r,data:a.data,topics:a.topics,strict:A}),i=(0,o.U)(a,{args:n,eventName:e});t.onLogs([i])}catch(s){let e,r;if(s instanceof n.SM||s instanceof n.Gy){if(A)return;e=s.abiItem.name,r=s.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,o.U)(a,{args:r?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});u=d,i||u()}catch(e){E?.(e)}})(),()=>u()))})()}},18727:function(e,t,r){"use strict";r.d(t,{Q:function(){return y},Z:function(){return b}});var n=r(9512),i=r(22869),s=r(50850),a=r(54506),o=r(91644),u=r(19125),c=r(27278),l=r(89014),d=r(12612),h=r(16999),f=r(42434),p=r(21944),m=r(78161),g=r(15570);let y=["blobVersionedHashes","chainId","fees","gas","nonce","type"];async function b(e,t){let r,b;let{account:v=e.account,blobs:w,chain:_,gas:E,kzg:k,nonce:x,nonceManager:S,parameters:A=y,type:C}=t,I=v?(0,n.T)(v):void 0,R={...t,...I?{from:I?.address}:{}};async function P(){return r||(r=await (0,f.s)(e,a.Q,"getBlock")({blockTag:"latest"}))}async function N(){return b||(_?_.id:void 0!==t.chainId?t.chainId:b=await (0,f.s)(e,g.L,"getChainId")({}))}if((A.includes("blobVersionedHashes")||A.includes("sidecars"))&&w&&k){let e=(0,c.P)({blobs:w,kzg:k});if(A.includes("blobVersionedHashes")){let t=(0,d.C)({commitments:e,to:"hex"});R.blobVersionedHashes=t}if(A.includes("sidecars")){let t=(0,l.y)({blobs:w,commitments:e,kzg:k}),r=(0,h.j)({blobs:w,commitments:e,proofs:t,to:"hex"});R.sidecars=r}}if(A.includes("chainId")&&(R.chainId=await N()),A.includes("nonce")&&void 0===x&&I){if(S){let t=await N();R.nonce=await S.consume({address:I.address,chainId:t,client:e})}else R.nonce=await (0,f.s)(e,o.K,"getTransactionCount")({address:I.address,blockTag:"pending"})}if((A.includes("fees")||A.includes("type"))&&void 0===C)try{R.type=(0,m.l)(R)}catch{let e=await P();R.type="bigint"==typeof e?.baseFeePerGas?"eip1559":"legacy"}if(A.includes("fees")){if("legacy"!==R.type&&"eip2930"!==R.type){if(void 0===R.maxFeePerGas||void 0===R.maxPriorityFeePerGas){let r=await P(),{maxFeePerGas:n,maxPriorityFeePerGas:s}=await (0,i.C)(e,{block:r,chain:_,request:R});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<s)throw new u.ld({maxPriorityFeePerGas:s});R.maxPriorityFeePerGas=s,R.maxFeePerGas=n}}else{if(void 0!==t.maxFeePerGas||void 0!==t.maxPriorityFeePerGas)throw new u.e5;let r=await P(),{gasPrice:n}=await (0,i.C)(e,{block:r,chain:_,request:R,type:"legacy"});R.gasPrice=n}}return A.includes("gas")&&void 0===E&&(R.gas=await (0,f.s)(e,s.Q,"estimateGas")({...R,account:I?{address:I.address,type:"json-rpc"}:void 0})),(0,p.F)(R),delete R.parameters,R}},15833:function(e,t,r){"use strict";async function n(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}r.d(t,{p:function(){return n}})},3966:function(e,t,r){"use strict";r.d(t,{T:function(){return b}});var n=r(9512),i=r(272),s=r(6909),a=r(88819),o=r(44238),u=r(28957),c=r(8566),l=r(23553),d=r(47139),h=r(47768),f=r(42434),p=r(21944),m=r(15570),g=r(18727),y=r(15833);async function b(e,t){let{account:r=e.account,chain:b=e.chain,accessList:v,authorizationList:w,blobs:_,data:E,gas:k,gasPrice:x,maxFeePerBlobGas:S,maxFeePerGas:A,maxPriorityFeePerGas:C,nonce:I,value:R,...P}=t;if(!r)throw new i.o({docsPath:"/docs/actions/wallet/sendTransaction"});let N=(0,n.T)(r);try{(0,p.F)(t);let r=await (async()=>t.to?t.to:w&&w.length>0?await (0,a.z)({authorization:w[0]}).catch(()=>{throw new s.G("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if("json-rpc"===N.type){let t;null!==b&&(t=await (0,f.s)(e,m.L,"getChainId")({}),(0,o.q)({currentChainId:t,chain:b}));let n=e.chain?.formatters?.transactionRequest?.format,i=(n||h.tG)({...(0,d.K)(P,{format:n}),accessList:v,authorizationList:w,blobs:_,chainId:t,data:E,from:N.address,gas:k,gasPrice:x,maxFeePerBlobGas:S,maxFeePerGas:A,maxPriorityFeePerGas:C,nonce:I,to:r,value:R});return await e.request({method:"eth_sendTransaction",params:[i]},{retryCount:0})}if("local"===N.type){let t=await (0,f.s)(e,g.Z,"prepareTransactionRequest")({account:N,accessList:v,authorizationList:w,blobs:_,chain:b,data:E,gas:k,gasPrice:x,maxFeePerBlobGas:S,maxFeePerGas:A,maxPriorityFeePerGas:C,nonce:I,nonceManager:N.nonceManager,parameters:[...g.Q,"sidecars"],value:R,...P,to:r}),n=b?.serializers?.transaction,i=await N.signTransaction(t,{serializer:n});return await (0,f.s)(e,y.p,"sendRawTransaction")({serializedTransaction:i})}if("smart"===N.type)throw new i.Y({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new i.Y({docsPath:"/docs/actions/wallet/sendTransaction",type:N.type})}catch(e){if(e instanceof i.Y)throw e;throw function(e,{docsPath:t,...r}){let n=(()=>{let t=(0,l.k)(e,r);return t instanceof u.cj?e:t})();return new c.mk(n,{docsPath:t,...r})}(e,{...t,account:N,chain:t.chain||void 0})}}},99382:function(e,t,r){"use strict";r.d(t,{l:function(){return a}});var n=r(9512),i=r(272),s=r(41458);async function a(e,{account:t=e.account,message:r}){if(!t)throw new i.o({docsPath:"/docs/actions/wallet/signMessage"});let a=(0,n.T)(t);if(a.signMessage)return a.signMessage({message:r});let o="string"==typeof r?(0,s.$G)(r):r.raw instanceof Uint8Array?(0,s.NC)(r.raw):r.raw;return e.request({method:"personal_sign",params:[o,a.address]},{retryCount:0})}},27163:function(e,t,r){"use strict";r.d(t,{n:function(){return c}});var n=r(9512),i=r(272),s=r(69646),a=r(51893),o=r(42434),u=r(3966);async function c(e,t){let{abi:r,account:c=e.account,address:l,args:d,dataSuffix:h,functionName:f,...p}=t;if(!c)throw new i.o({docsPath:"/docs/contract/writeContract"});let m=(0,n.T)(c),g=(0,s.R)({abi:r,args:d,functionName:f});try{return await (0,o.s)(e,u.T,"sendTransaction")({data:`${g}${h?h.replace("0x",""):""}`,to:l,account:m,...p})}catch(e){throw(0,a.S)(e,{abi:r,address:l,args:d,docsPath:"/docs/contract/writeContract",functionName:f,sender:m.address})}}},56749:function(e,t,r){"use strict";r.d(t,{y:function(){return n}});let n=(0,r(7149).a)({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}})},63473:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(7149).a)({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0})},45415:function(e,t,r){"use strict";r.d(t,{u:function(){return i}});var n=r(14077);let i=(0,r(7149).a)({...n.i,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...n.i.contracts,l2OutputOracle:{1:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{1:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{1:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1})},47743:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(14077);let i=(0,r(7149).a)({...n.i,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...n.i.contracts,disputeGameFactory:{11155111:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{11155111:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{11155111:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{11155111:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:11155111})},30579:function(e,t,r){"use strict";r.d(t,{q:function(){return n}});let n=(0,r(7149).a)({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0})},38236:function(e,t,r){"use strict";r.d(t,{R:function(){return n}});let n=(0,r(7149).a)({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}})},90789:function(e,t,r){"use strict";r.d(t,{v:function(){return i}});var n=r(14077);let i=(0,r(7149).a)({...n.i,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...n.i.contracts,disputeGameFactory:{1:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{1:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{1:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{1:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1})},26124:function(e,t,r){"use strict";r.d(t,{O:function(){return i}});var n=r(14077);let i=(0,r(7149).a)({...n.i,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...n.i.contracts,disputeGameFactory:{11155111:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{11155111:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{11155111:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{11155111:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:11155111})},46692:function(e,t,r){"use strict";r.d(t,{F:function(){return n}});let n=(0,r(7149).a)({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc2.sepolia.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0})},43630:function(e,t,r){"use strict";r.d(t,{e:function(){return s}});var n=r(9512),i=r(6898);function s(e){let{batch:t,cacheTime:r=e.pollingInterval??4e3,ccipRead:s,key:a="base",name:o="Base Client",pollingInterval:u=4e3,type:c="base"}=e,l=e.chain,d=e.account?(0,n.T)(e.account):void 0,{config:h,request:f,value:p}=e.transport({chain:l,pollingInterval:u}),m={account:d,batch:t,cacheTime:r,ccipRead:s,chain:l,key:a,name:o,pollingInterval:u,request:f,transport:{...h,...p},type:c,uid:(0,i.h)()};return Object.assign(m,{extend:function e(t){return r=>{let n=r(t);for(let e in m)delete n[e];let i={...t,...n};return Object.assign(i,{extend:e(i)})}}(m)})}},12990:function(e,t,r){"use strict";r.d(t,{v:function(){return s}});var n=r(43630),i=r(71698);function s(e){let{key:t="public",name:r="Public Client"}=e;return(0,n.e)({...e,key:t,name:r,type:"publicClient"}).extend(i.I)}},3943:function(e,t,r){"use strict";r.d(t,{K:function(){return P}});var n=r(43630),i=r(15570),s=r(41458);async function a(e,{chain:t}){let{id:r,name:n,nativeCurrency:i,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,s.eC)(r),chainName:n,nativeCurrency:i,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:e})=>e):void 0}]},{dedupe:!0,retryCount:0})}var o=r(18710),u=r(3966),c=r(80650);async function l(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,c.x)(e))}async function d(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}var h=r(18727);async function f(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,c.K)(e))}async function p(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}var m=r(15833),g=r(99382),y=r(9512),b=r(272),v=r(44238),w=r(47768),_=r(42434),E=r(21944);async function k(e,t){let{account:r=e.account,chain:n=e.chain,...a}=t;if(!r)throw new b.o({docsPath:"/docs/actions/wallet/signTransaction"});let o=(0,y.T)(r);(0,E.F)({account:o,...t});let u=await (0,_.s)(e,i.L,"getChainId")({});null!==n&&(0,v.q)({currentChainId:u,chain:n});let c=n?.formatters||e.chain?.formatters,l=c?.transactionRequest?.format||w.tG;return o.signTransaction?o.signTransaction({...a,chainId:u},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...l(a),chainId:(0,s.eC)(u),from:o.address}]},{retryCount:0})}var x=r(40144);async function S(e,t){let{account:r=e.account,domain:n,message:i,primaryType:s}=t;if(!r)throw new b.o({docsPath:"/docs/actions/wallet/signTypedData"});let a=(0,y.T)(r),o={EIP712Domain:(0,x.cj)({domain:n}),...t.types};if((0,x.iC)({domain:n,message:i,primaryType:s,types:o}),a.signTypedData)return a.signTypedData({domain:n,message:i,primaryType:s,types:o});let u=(0,x.H6)({domain:n,message:i,primaryType:s,types:o});return e.request({method:"eth_signTypedData_v4",params:[a.address,u]},{retryCount:0})}async function A(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.eC)(t)}]},{retryCount:0})}async function C(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}var I=r(27163);function R(e){return{addChain:t=>a(e,t),deployContract:t=>(function(e,t){let{abi:r,args:n,bytecode:i,...s}=t,a=(0,o.w)({abi:r,args:n,bytecode:i});return(0,u.T)(e,{...s,data:a})})(e,t),getAddresses:()=>l(e),getChainId:()=>(0,i.L)(e),getPermissions:()=>d(e),prepareTransactionRequest:t=>(0,h.Z)(e,t),requestAddresses:()=>f(e),requestPermissions:t=>p(e,t),sendRawTransaction:t=>(0,m.p)(e,t),sendTransaction:t=>(0,u.T)(e,t),signMessage:t=>(0,g.l)(e,t),signTransaction:t=>k(e,t),signTypedData:t=>S(e,t),switchChain:t=>A(e,t),watchAsset:t=>C(e,t),writeContract:t=>(0,I.n)(e,t)}}function P(e){let{key:t="wallet",name:r="Wallet Client",transport:i}=e;return(0,n.e)({...e,key:t,name:r,transport:i,type:"walletClient"}).extend(R)}},71698:function(e,t,r){"use strict";r.d(t,{I:function(){return eH}});var n=r(15783),i=r(99777),s=r(69646),a=r(84556),o=r(85053),u=r(41458),c=r(76107),l=r(74969),d=r(64938),h=r(42434),f=r(76318);async function p(e,{blockNumber:t,blockTag:r,coinType:p,name:m,gatewayUrls:g,strict:y,universalResolverAddress:b}){let v=b;if(!v){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");v=(0,a.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let a=(0,s.R)({abi:n.X$,functionName:"addr",...null!=p?{args:[(0,l.V)(m),BigInt(p)]}:{args:[(0,l.V)(m)]}}),c={address:v,abi:n.k3,functionName:"resolve",args:[(0,u.NC)((0,d.T)(m)),a],blockNumber:t,blockTag:r},y=(0,h.s)(e,f.L,"readContract"),b=g?await y({...c,args:[...c.args,g]}):await y(c);if("0x"===b[0])return null;let w=(0,i.k)({abi:n.X$,args:null!=p?[(0,l.V)(m),BigInt(p)]:void 0,functionName:"addr",data:b[0]});if("0x"===w||"0x00"===(0,o.f)(w))return null;return w}catch(e){if(y)throw e;if((0,c.c)(e,"resolve"))return null;throw e}}var m=r(40413),g=r(61513);async function y(e,{blockNumber:t,blockTag:r,name:n,universalResolverAddress:i}){let s=i;if(!s){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");s=(0,a.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}let[o]=await (0,h.s)(e,f.L,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,u.NC)((0,d.T)(n))],blockNumber:t,blockTag:r});return o}var b=r(28713),v=r(48732),w=r(97436);async function _(e){let t=(0,w.g)(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}var E=r(4481),k=r(15300);async function x(e,{address:t,args:r,event:n,events:i,fromBlock:s,strict:a,toBlock:o}={}){let c=i??(n?[n]:void 0),l=(0,w.g)(e,{method:"eth_newFilter"}),d=[];c&&(d=[c.flatMap(e=>(0,k.O)({abi:[e],eventName:e.name,args:r}))],n&&(d=d[0]));let h=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof s?(0,u.eC)(s):s,toBlock:"bigint"==typeof o?(0,u.eC)(o):o,...d.length?{topics:d}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:h,request:l(h),strict:!!a,toBlock:o,type:"event"}}async function S(e){let t=(0,w.g)(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}var A=r(27925),C=r(22869),I=r(50850),R=r(86243),P=r(55697);async function N(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}var M=r(54506),T=r(98855),O=r(30698);async function D(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let i;let s=void 0!==r?(0,u.eC)(r):void 0;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]},{dedupe:!!s}),(0,O.ly)(i)}var L=r(15570),B=r(26409),q=r(31086),z=r(6909);class U extends z.G{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function j(e,t){let{address:r,factory:n,factoryData:i}=t;try{let[t,s,a,o,u,c,l]=await (0,h.s)(e,f.L,"readContract")({abi:F,address:r,functionName:"eip712Domain",factory:n,factoryData:i});return{domain:{name:s,version:a,chainId:Number(o),verifyingContract:u,salt:c},extensions:l,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new U({address:r});throw e}}let F=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function H(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){var s;let a=r?(0,u.eC)(r):void 0;return{baseFeePerGas:(s=await e.request({method:"eth_feeHistory",params:[(0,u.eC)(t),a||n,i]},{dedupe:!!a})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:s.gasUsedRatio,oldestBlock:BigInt(s.oldestBlock),reward:s.reward?.map(e=>e.map(e=>BigInt(e)))}}var $=r(83509),W=r(61182),G=r(68799);async function V(e,{filter:t}){let r=t.strict??!1,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,G.U)(e));return t.abi?(0,W.h)({abi:t.abi,logs:n,strict:r}):n}var K=r(20356),Z=r(52729);async function Y(e,{address:t,blockNumber:r,blockTag:n,storageKeys:i}){var s;let a=void 0!==r?(0,u.eC)(r):void 0;return{...s=await e.request({method:"eth_getProof",params:[t,i,a||(n??"latest")]}),balance:s.balance?BigInt(s.balance):void 0,nonce:s.nonce?(0,O.ly)(s.nonce):void 0,storageProof:s.storageProof?s.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}}async function J(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){let s=void 0!==r?(0,u.eC)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,s||n]})}var Q=r(14351);async function X(e,{hash:t,transactionReceipt:r}){let[n,i]=await Promise.all([(0,h.s)(e,T.z,"getBlockNumber")({}),t?(0,h.s)(e,Q.f,"getTransaction")({hash:t}):void 0]),s=r?.blockNumber||i?.blockNumber;return s?n-s+1n:0n}var ee=r(91644),et=r(46677),er=r(16330),en=r(32655),ei=r(51893);async function es(e,t){let{allowFailure:r=!0,batchSize:o,blockNumber:u,blockTag:c,multicallAddress:l,stateOverride:d}=t,p=t.contracts,m=o??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),g=l;if(!g){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");g=(0,a.L)({blockNumber:u,chain:e.chain,contract:"multicall3"})}let y=[[]],b=0,v=0;for(let e=0;e<p.length;e++){let{abi:t,address:n,args:i,functionName:a}=p[e];try{let e=(0,s.R)({abi:t,args:i,functionName:a});v+=(e.length-2)/2,m>0&&v>m&&y[b].length>0&&(b++,v=(e.length-2)/2,y[b]=[]),y[b]=[...y[b],{allowFailure:!0,callData:e,target:n}]}catch(s){let e=(0,ei.S)(s,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:a});if(!r)throw e;y[b]=[...y[b],{allowFailure:!0,callData:"0x",target:n}]}}let w=await Promise.allSettled(y.map(t=>(0,h.s)(e,f.L,"readContract")({abi:n.F8,address:g,args:[t],blockNumber:u,blockTag:c,functionName:"aggregate3",stateOverride:d}))),_=[];for(let e=0;e<w.length;e++){let t=w[e];if("rejected"===t.status){if(!r)throw t.reason;for(let r=0;r<y[e].length;r++)_.push({status:"failure",error:t.reason,result:void 0});continue}let n=t.value;for(let t=0;t<n.length;t++){let{returnData:s,success:a}=n[t],{callData:o}=y[e][t],{abi:u,address:c,functionName:l,args:d}=p[_.length];try{if("0x"===o)throw new er.wb;if(!a)throw new en.VQ({data:s});let e=(0,i.k)({abi:u,args:d,data:s,functionName:l});_.push(r?{result:e,status:"success"}:e)}catch(t){let e=(0,ei.S)(t,{abi:u,address:c,args:d,docsPath:"/docs/contract/multicall",functionName:l});if(!r)throw e;_.push({error:e,result:void 0,status:"failure"})}}}if(_.length!==p.length)throw new z.G("multicall results mismatch");return _}var ea=r(45852),eo=r(31889),eu=r(43551),ec=r(53068),el=r(11153);function ed(e,t){return(0,eu.w)(function(e){let t="string"==typeof e?(0,u.$G)(e):"string"==typeof e.raw?e.raw:(0,u.ci)(e.raw),r=(0,u.$G)(`\x19Ethereum Signed Message:
${(0,el.d)(t)}`);return(0,ec.zo)([r,t])}(e),t)}var eh=r(30875),ef=r(18710),ep=r(80650),em=r(93409),eg=r(17500),ey=r(45139),eb=r(24054);let ev="0x6492649264926492649264926492649264926492649264926492649264926492";var ew=r(17670),e_=r(29488),eE=r(87723),ek=r(44484);async function ex(e,t){let{address:r,factory:i,factoryData:s,hash:a,signature:o,...c}=t,l=(0,eb.v)(o)?o:"object"==typeof o&&"r"in o&&"s"in o?function({r:e,s:t,to:r="hex",v:n,yParity:i}){let s=(()=>{if(0===i||1===i)return i;if(n&&(27n===n||28n===n||n>=35n))return n%2n===0n?1:0;throw Error("Invalid `v` or `yParity` value")})(),a=`0x${new ek.secp256k1.Signature((0,O.y_)(e),(0,O.y_)(t)).toCompactHex()}${0===s?"1b":"1c"}`;return"hex"===r?a:(0,ey.nr)(a)}(o):(0,u.ci)(o),d=await (async()=>i||s?(0,ew.p5)(l,-32)===ev?l:function(e){let{address:t,data:r,signature:n,to:i="hex"}=e,s=(0,ec.SM)([(0,eE.E)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,n]),ev]);return"hex"===i?s:(0,ey.nr)(s)}({address:i,data:s,signature:l}):l)();try{let{data:t}=await (0,h.s)(e,v.R,"call")({data:(0,ef.w)({abi:n.$o,args:[r,a,d],bytecode:eh.ST}),...c});return function(e,t){let r=(0,eb.v)(e)?(0,ey.O0)(e):e,n=(0,eb.v)("0x1")?(0,ey.O0)("0x1"):"0x1";return(0,eg.Wd)(r,n)}(t??"0x0","0x1")}catch(e){try{if((0,em.E)((0,ep.K)(r),await (0,e_.R)({hash:a,signature:o})))return!0}catch{}if(e instanceof en.cg)return!1;throw e}}async function eS(e,{address:t,message:r,factory:n,factoryData:i,signature:s,...a}){return ex(e,{address:t,factory:n,factoryData:i,hash:ed(r),signature:s,...a})}var eA=r(40144);function eC({data:e,primaryType:t,types:r}){let n=function e({data:t,primaryType:r,types:n}){let i=[{type:"bytes32"}],s=[function({primaryType:e,types:t}){let r=(0,u.NC)(function({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),s=i?.[0];if(n.has(s)||void 0===r[s])return n;for(let t of(n.add(s),r[s]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,eu.w)(r)}({primaryType:r,types:n})];for(let a of n[r]){let[r,o]=function t({types:r,name:n,type:i,value:s}){if(void 0!==r[i])return[{type:"bytes32"},(0,eu.w)(e({data:s,primaryType:i,types:r}))];if("bytes"===i){let e=s.length%2?"0":"";return s=`0x${e+s.slice(2)}`,[{type:"bytes32"},(0,eu.w)(s)]}if("string"===i)return[{type:"bytes32"},(0,eu.w)((0,u.NC)(s))];if(i.lastIndexOf("]")===i.length-1){let e=i.slice(0,i.lastIndexOf("[")),a=s.map(i=>t({name:n,type:e,types:r,value:i}));return[{type:"bytes32"},(0,eu.w)((0,eE.E)(a.map(([e])=>e),a.map(([,e])=>e)))]}return[{type:i},s]}({types:n,name:a.name,type:a.type,value:t[a.name]});i.push(r),s.push(o)}return(0,eE.E)(i,s)}({data:e,primaryType:t,types:r});return(0,eu.w)(n)}async function eI(e,t){let{address:r,factory:n,factoryData:i,signature:s,message:a,primaryType:o,types:u,domain:c,...l}=t;return ex(e,{address:r,factory:n,factoryData:i,hash:function(e){let{domain:t={},message:r,primaryType:n}=e,i={EIP712Domain:(0,eA.cj)({domain:t}),...e.types};(0,eA.iC)({domain:t,message:r,primaryType:n,types:i});let s=["0x1901"];return t&&s.push(function({domain:e,types:t}){return eC({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:i})),"EIP712Domain"!==n&&s.push(eC({data:r,primaryType:n,types:i})),(0,eu.w)((0,ec.zo)(s))}({message:a,primaryType:o,types:u,domain:c}),signature:s,...l})}var eR=r(28812),eP=r(91562),eN=r(12062),eM=r(71708),eT=r(31181),eO=r(97928),eD=r(45330),eL=r(36333),eB=r(689);let eq=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,ez=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;async function eU(e,t){let{address:r,domain:n,message:i,nonce:s,scheme:a,signature:o,time:u=new Date,...c}=t,l=function(e){let{scheme:t,statement:r,...n}=e.match(eq)?.groups??{},{chainId:i,expirationTime:s,issuedAt:a,notBefore:o,requestId:u,...c}=e.match(ez)?.groups??{},l=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...n,...c,...i?{chainId:Number(i)}:{},...s?{expirationTime:new Date(s)}:{},...a?{issuedAt:new Date(a)}:{},...o?{notBefore:new Date(o)}:{},...u?{requestId:u}:{},...l?{resources:l}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}(i);if(!l.address||!function(e){let{address:t,domain:r,message:n,nonce:i,scheme:s,time:a=new Date}=e;if(r&&n.domain!==r||i&&n.nonce!==i||s&&n.scheme!==s||n.expirationTime&&a>=n.expirationTime||n.notBefore&&a<n.notBefore)return!1;try{if(!n.address||t&&!(0,em.E)(n.address,t))return!1}catch{return!1}return!0}({address:r,domain:n,message:l,nonce:s,scheme:a,time:u}))return!1;let d=ed(i);return ex(e,{address:l.address,hash:d,signature:o,...c})}var ej=r(18727),eF=r(15833);function eH(e){return{call:t=>(0,v.R)(e,t),createBlockFilter:()=>_(e),createContractEventFilter:t=>(0,E.A)(e,t),createEventFilter:t=>x(e,t),createPendingTransactionFilter:()=>S(e),estimateContractGas:t=>(0,A.D)(e,t),estimateGas:t=>(0,I.Q)(e,t),getBalance:t=>(0,P.s)(e,t),getBlobBaseFee:()=>N(e),getBlock:t=>(0,M.Q)(e,t),getBlockNumber:t=>(0,T.z)(e,t),getBlockTransactionCount:t=>D(e,t),getBytecode:t=>(0,B.C)(e,t),getChainId:()=>(0,L.L)(e),getCode:t=>(0,B.C)(e,t),getContractEvents:t=>(0,q.m)(e,t),getEip712Domain:t=>j(e,t),getEnsAddress:t=>p(e,t),getEnsAvatar:t=>(0,m.r)(e,t),getEnsName:t=>(0,g.w)(e,t),getEnsResolver:t=>y(e,t),getEnsText:t=>(0,b.g)(e,t),getFeeHistory:t=>H(e,t),estimateFeesPerGas:t=>(0,C.X)(e,t),getFilterChanges:t=>(0,$.K)(e,t),getFilterLogs:t=>V(e,t),getGasPrice:()=>(0,K.o)(e),getLogs:t=>(0,Z.y)(e,t),getProof:t=>Y(e,t),estimateMaxPriorityFeePerGas:t=>(0,R._)(e,t),getStorageAt:t=>J(e,t),getTransaction:t=>(0,Q.f)(e,t),getTransactionConfirmations:t=>X(e,t),getTransactionCount:t=>(0,ee.K)(e,t),getTransactionReceipt:t=>(0,et.a)(e,t),multicall:t=>es(e,t),prepareTransactionRequest:t=>(0,ej.Z)(e,t),readContract:t=>(0,f.L)(e,t),sendRawTransaction:t=>(0,eF.p)(e,t),simulateContract:t=>(0,ea.a)(e,t),verifyMessage:t=>eS(e,t),verifySiweMessage:t=>eU(e,t),verifyTypedData:t=>eI(e,t),uninstallFilter:t=>(0,eo.W)(e,t),waitForTransactionReceipt:t=>(0,eR.e)(e,t),watchBlocks:t=>(function(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:s,includeTransactions:a,poll:o,pollingInterval:u=e.pollingInterval}){let c,l,d,f;let p=void 0!==o?o:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type),m=a??!1;return p?(()=>{let a=(0,eO.P)(["watchBlocks",e.uid,t,r,n,m,u]);return(0,eM.N7)(a,{onBlock:i,onError:s},i=>(0,eT.$)(async()=>{try{let n=await (0,h.s)(e,M.Q,"getBlock")({blockTag:t,includeTransactions:m});if(n.number&&c?.number){if(n.number===c.number)return;if(n.number-c.number>1&&r)for(let t=c?.number+1n;t<n.number;t++){let r=await (0,h.s)(e,M.Q,"getBlock")({blockNumber:t,includeTransactions:m});i.onBlock(r,c),c=r}}(!c?.number||"pending"===t&&!n?.number||n.number&&n.number>c.number)&&(i.onBlock(n,c),c=n)}catch(e){i.onError?.(e)}},{emitOnBegin:n,interval:u}))})():(l=!0,d=!0,f=()=>l=!1,(async()=>{try{n&&(0,h.s)(e,M.Q,"getBlock")({blockTag:t,includeTransactions:m}).then(e=>{l&&d&&(i(e,void 0),d=!1)});let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:a}=await r.subscribe({params:["newHeads"],onData(t){if(!l)return;let r=(e.chain?.formatters?.block?.format||eN.Z)(t.result);i(r,c),d=!1,c=r},onError(e){s?.(e)}});f=a,l||f()}catch(e){s?.(e)}})(),()=>f())})(e,t),watchBlockNumber:t=>(0,eP.q)(e,t),watchContractEvent:t=>(0,eD.Y)(e,t),watchEvent:t=>(function(e,{address:t,args:r,batch:n=!0,event:i,events:s,fromBlock:a,onError:o,onLogs:u,poll:c,pollingInterval:l=e.pollingInterval,strict:d}){let f,p;let m=void 0!==c?c:"bigint"==typeof a||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type),g=d??!1;return m?(()=>{let c=(0,eO.P)(["watchEvent",t,r,n,e.uid,i,l,a]);return(0,eM.N7)(c,{onLogs:u,onError:o},o=>{let u,c;void 0!==a&&(u=a-1n);let d=!1,f=(0,eT.$)(async()=>{if(!d){try{c=await (0,h.s)(e,x,"createEventFilter")({address:t,args:r,event:i,events:s,strict:g,fromBlock:a})}catch{}d=!0;return}try{let a;if(c)a=await (0,h.s)(e,$.K,"getFilterChanges")({filter:c});else{let n=await (0,h.s)(e,T.z,"getBlockNumber")({});a=u&&u!==n?await (0,h.s)(e,Z.y,"getLogs")({address:t,args:r,event:i,events:s,fromBlock:u+1n,toBlock:n}):[],u=n}if(0===a.length)return;if(n)o.onLogs(a);else for(let e of a)o.onLogs([e])}catch(e){c&&e instanceof eL.yR&&(d=!1),o.onError?.(e)}},{emitOnBegin:!0,interval:l});return async()=>{c&&await (0,h.s)(e,eo.W,"uninstallFilter")({filter:c}),f()}})})():(f=!0,p=()=>f=!1,(async()=>{try{let n=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),a=s??(i?[i]:void 0),c=[];a&&(c=[a.flatMap(e=>(0,k.O)({abi:[e],eventName:e.name,args:r}))],i&&(c=c[0]));let{unsubscribe:l}=await n.subscribe({params:["logs",{address:t,topics:c}],onData(e){if(!f)return;let t=e.result;try{let{eventName:e,args:r}=(0,eB.F)({abi:a??[],data:t.data,topics:t.topics,strict:g}),n=(0,G.U)(t,{args:r,eventName:e});u([n])}catch(i){let e,r;if(i instanceof er.SM||i instanceof er.Gy){if(d)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let n=(0,G.U)(t,{args:r?[]:{},eventName:e});u([n])}},onError(e){o?.(e)}});p=l,f||p()}catch(e){o?.(e)}})(),()=>p())})(e,t),watchPendingTransactions:t=>(function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:s=e.pollingInterval}){let a,o;return(void 0!==i?i:"webSocket"!==e.transport.type)?(()=>{let i=(0,eO.P)(["watchPendingTransactions",e.uid,t,s]);return(0,eM.N7)(i,{onTransactions:n,onError:r},r=>{let n;let i=(0,eT.$)(async()=>{try{if(!n)try{n=await (0,h.s)(e,S,"createPendingTransactionFilter")({});return}catch(e){throw i(),e}let s=await (0,h.s)(e,$.K,"getFilterChanges")({filter:n});if(0===s.length)return;if(t)r.onTransactions(s);else for(let e of s)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:s});return async()=>{n&&await (0,h.s)(e,eo.W,"uninstallFilter")({filter:n}),i()}})})():(a=!0,o=()=>a=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!a)return;let t=e.result;n([t])},onError(e){r?.(e)}});o=t,a||o()}catch(e){r?.(e)}})(),()=>o())})(e,t)}}},18583:function(e,t,r){"use strict";r.d(t,{q:function(){return h}});var n=r(6909),i=r(15635),s=r(36333),a=r(41458),o=r(43551);let u=new(r(89697)).k(8192);var c=r(54356),l=r(97928),d=r(6898);function h({key:e,name:t,request:r,retryCount:h=3,retryDelay:f=150,timeout:p,type:m},g){return{config:{key:e,name:t,request:r,retryCount:h,retryDelay:f,timeout:p,type:m},request:function(e,t={}){return async(r,d={})=>{let{dedupe:h=!1,retryDelay:f=150,retryCount:p=3,uid:m}={...t,...d},g=h?(0,o.w)((0,a.$G)(`${m}.${(0,l.P)(r)}`)):void 0;return function(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(u.get(r))return u.get(r);let n=e().finally(()=>u.delete(r));return u.set(r,n),n}(()=>(0,c.J)(async()=>{try{return await e(r)}catch(e){switch(e.code){case s.s7.code:throw new s.s7(e);case s.B.code:throw new s.B(e);case s.LX.code:throw new s.LX(e,{method:r.method});case s.nY.code:throw new s.nY(e);case s.XS.code:throw new s.XS(e);case s.yR.code:throw new s.yR(e);case s.Og.code:throw new s.Og(e);case s.pT.code:throw new s.pT(e);case s.KB.code:throw new s.KB(e);case s.gS.code:throw new s.gS(e,{method:r.method});case s.Pv.code:throw new s.Pv(e);case s.GD.code:throw new s.GD(e);case s.ab.code:throw new s.ab(e);case s.PE.code:throw new s.PE(e);case s.Ts.code:throw new s.Ts(e);case s.u5.code:throw new s.u5(e);case s.I0.code:throw new s.I0(e);case s.x3.code:throw new s.x3(e);case 5e3:throw new s.ab(e);default:if(e instanceof n.G)throw e;throw new s.ir(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof i.Gg){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e)}return~~(1<<e)*f},retryCount:p,shouldRetry:({error:e})=>"code"in e&&"number"==typeof e.code?-1===e.code||e.code===s.Pv.code||e.code===s.XS.code:!(e instanceof i.Gg)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status}),{enabled:h,id:g})}}(r,{retryCount:h,retryDelay:f,uid:(0,d.h)()}),value:g}}},5885:function(e,t,r){"use strict";r.d(t,{P:function(){return i}});var n=r(18583);function i(e,t={}){let{key:r="custom",name:i="Custom Provider",retryDelay:s}=t;return({retryCount:a})=>(0,n.q)({key:r,name:i,request:e.request.bind(e),retryCount:t.retryCount??a,retryDelay:s,type:"custom"})}},25921:function(e,t,r){"use strict";r.d(t,{d:function(){return d}});var n=r(15635),i=r(6909);class s extends i.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var a=r(30934),o=r(65521),u=r(97928);let c={current:0,take(){return this.current++},reset(){this.current=0}};var l=r(18583);function d(e,t={}){let{batch:r,fetchOptions:i,key:d="http",name:h="HTTP JSON-RPC",onFetchRequest:f,onFetchResponse:p,retryDelay:m}=t;return({chain:g,retryCount:y,timeout:b})=>{let{batchSize:v=1e3,wait:w=0}="object"==typeof r?r:{},_=t.retryCount??y,E=b??t.timeout??1e4,k=e||g?.rpcUrls.default.http[0];if(!k)throw new s;let x=function(e,t={}){return{async request(r){let{body:i,onRequest:s=t.onRequest,onResponse:a=t.onResponse,timeout:l=t.timeout??1e4}=r,d={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:h,method:f,signal:p}=d;try{let t;let r=await (0,o.F)(async({signal:t})=>{let r={...d,body:Array.isArray(i)?(0,u.P)(i.map(e=>({jsonrpc:"2.0",id:e.id??c.take(),...e}))):(0,u.P)({jsonrpc:"2.0",id:i.id??c.take(),...i}),headers:{"Content-Type":"application/json",...h},method:f||"POST",signal:p||(l>0?t:null)},n=new Request(e,r);return s&&await s(n),await fetch(e,r)},{errorInstance:new n.W5({body:i,url:e}),timeout:l,signal:!0});if(a&&await a(r),r.headers.get("Content-Type")?.startsWith("application/json"))t=await r.json();else{t=await r.text();try{t=JSON.parse(t||"{}")}catch(e){if(r.ok)throw e;t={error:t}}}if(!r.ok)throw new n.Gg({body:i,details:(0,u.P)(t.error)||r.statusText,headers:r.headers,status:r.status,url:e});return t}catch(t){if(t instanceof n.Gg||t instanceof n.W5)throw t;throw new n.Gg({body:i,cause:t,url:e})}}}}(k,{fetchOptions:i,onRequest:f,onResponse:p,timeout:E});return(0,l.q)({key:d,name:h,async request({method:e,params:t}){let i={method:e,params:t},{schedule:s}=(0,a.S)({id:k,wait:w,shouldSplitBatch:e=>e.length>v,fn:e=>x.request({body:e}),sort:(e,t)=>e.id-t.id}),o=async e=>r?s(e):[await x.request({body:e})],[{error:u,result:c}]=await o(i);if(u)throw new n.bs({body:i,error:u,url:k});return c},retryCount:_,retryDelay:m,timeout:E,type:"http"},{fetchOptions:i,url:k})}}},15783:function(e,t,r){"use strict";r.d(t,{$o:function(){return c},F8:function(){return n},X$:function(){return u},du:function(){return a},k3:function(){return s},nZ:function(){return o}});let n=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],s=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],a=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],o=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],u=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],c=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},30875:function(e,t,r){"use strict";r.d(t,{NO:function(){return n},ST:function(){return s},pG:function(){return i}});let n="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",i="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",s="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"},14183:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});let n=1},32852:function(e,t,r){"use strict";r.d(t,{zL:function(){return n}});let n=2n**256n-1n},36203:function(e,t,r){"use strict";r.d(t,{$:function(){return n},Up:function(){return i},hZ:function(){return s}});let n={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},s={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},36793:function(e,t,r){"use strict";r.d(t,{Zn:function(){return i},ez:function(){return n}});let n={gwei:9,wei:18},i={ether:-9,wei:9}},16330:function(e,t,r){"use strict";r.d(t,{CI:function(){return S},FM:function(){return p},Gy:function(){return k},KY:function(){return _},M4:function(){return d},MX:function(){return b},Mi:function(){return I},S4:function(){return w},SM:function(){return E},cO:function(){return o},dh:function(){return x},eF:function(){return v},fM:function(){return a},fs:function(){return h},gr:function(){return l},hn:function(){return A},lC:function(){return m},mv:function(){return g},wM:function(){return C},wb:function(){return c},xB:function(){return u},xL:function(){return y},yP:function(){return f}});var n=r(67795),i=r(11153),s=r(6909);class a extends s.G{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class o extends s.G{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class u extends s.G{constructor({data:e,params:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,n.h)(t,{includeName:!0})})`,`Data:   ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class c extends s.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class l extends s.G{constructor({expectedLength:e,givenLength:t,type:r}){super(`ABI encoding array length mismatch for type ${r}.
Expected length: ${e}
Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends s.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class h extends s.G{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch.
Expected length (params): ${e}
Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}class f extends s.G{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI.
Make sure you are using the correct ABI and that the error exists on it.
You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class p extends s.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class m extends s.G{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI.
Make sure you are using the correct ABI and that the event exists on it.
You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}class g extends s.G{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI.
Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t,name:"AbiEventNotFoundError"})}}class y extends s.G{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI.
Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}class b extends s.G{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI.
Cannot decode function result without knowing what the parameter types are.
Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class v extends s.G{constructor(e,{docsPath:t}){super(`Encoded function signature "${e}" not found on ABI.
Make sure you are using the correct ABI and that the function exists on it.
You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}class w extends s.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.t)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.t)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class _ extends s.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}class E extends s.G{constructor({abiItem:e,data:t,params:r,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,n.h)(r,{includeName:!0})})`,`Data:   ${t} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=i}}class k extends s.G{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.t)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class x extends s.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type.
Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}class S extends s.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type.
Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}class A extends s.G{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}class C extends s.G{constructor(e){super(`"${e}" is not a valid definition type.
Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}class I extends s.G{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}},272:function(e,t,r){"use strict";r.d(t,{Y:function(){return s},o:function(){return i}});var n=r(6909);class i extends n.G{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class s extends n.G{constructor({docsPath:e,metaMessages:t,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}},26921:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(6909);class i extends n.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},6909:function(e,t,r){"use strict";r.d(t,{G:function(){return s}});let n="2.21.15",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:n};class s extends Error{constructor(e,t={}){let r=t.cause instanceof s?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof s&&t.cause.docsPath||t.docsPath,o=i.getDocsUrl?.({...t,docsPath:a});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t?e(t.cause,r):r?null:t}(this,e)}}},32645:function(e,t,r){"use strict";r.d(t,{RX:function(){return a},cJ:function(){return u},m7:function(){return s},xd:function(){return o}});var n=r(14183),i=r(6909);class s extends i.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class a extends i.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class o extends i.G{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class u extends i.G{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${n.l}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}},55742:function(e,t,r){"use strict";r.d(t,{f:function(){return i}});var n=r(6909);class i extends n.G{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}},87768:function(e,t,r){"use strict";r.d(t,{Bk:function(){return a},Yl:function(){return s},hJ:function(){return u},mm:function(){return i},pZ:function(){return o}});var n=r(6909);class i extends n.G{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class s extends n.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class a extends n.G{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class o extends n.G{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class u extends n.G{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}},32655:function(e,t,r){"use strict";r.d(t,{cg:function(){return y},uq:function(){return b},Lu:function(){return v},Dk:function(){return w},Mo:function(){return _},VQ:function(){return E}});var n=r(9512),i=r(36203),s=r(36408),a=r(67795),o=r(97928);function u({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,o.P)(t[r]):t[r]}`).join(", ")})`}var c=r(8730),l=r(53536),d=r(58720),h=r(16330),f=r(6909),p=r(97285),m=r(8566),g=r(80498);class y extends f.G{constructor(e,{account:t,docsPath:r,chain:i,data:s,gas:a,gasPrice:o,maxFeePerGas:u,maxPriorityFeePerGas:c,nonce:h,to:f,value:g,stateOverride:y}){let b=t?(0,n.T)(t):void 0,v=(0,m.xr)({from:b?.address,to:f,value:void 0!==g&&`${(0,l.d)(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:a,gasPrice:void 0!==o&&`${(0,d.o)(o)} gwei`,maxFeePerGas:void 0!==u&&`${(0,d.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,d.o)(c)} gwei`,nonce:h});y&&(v+=`
${(0,p.Bj)(y)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class b extends f.G{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:s,sender:o}){let l=(0,c.mE)({abi:t,args:r,name:s}),d=l?u({abiItem:l,args:r,includeFunctionName:!1,includeName:!1}):void 0,h=l?(0,a.t)(l,{includeName:!0}):void 0,f=(0,m.xr)({address:n&&(0,g.C)(n),function:h,args:d&&"()"!==d&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:o});super(e.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=s,this.sender=o}}class v extends f.G{constructor({abi:e,data:t,functionName:r,message:n}){let o,c,l,d,f;if(t&&"0x"!==t)try{let{abiItem:r,errorName:n,args:o}=f=(0,s.p)({abi:e,data:t});if("Error"===n)l=o[0];else if("Panic"===n){let[e]=o;l=i.$[e]}else{let e=r?(0,a.t)(r,{includeName:!0}):void 0,t=r&&o?u({abiItem:r,args:o,includeFunctionName:!1,includeName:!1}):void 0;c=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){o=e}else n&&(l=n);o instanceof h.yP&&(d=o.signature,c=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(l&&"execution reverted"!==l||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,l||d].join("\n"):`The contract function "${r}" reverted.`,{cause:o,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=f,this.reason=l,this.signature=d}}class w extends f.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class _ extends f.G{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class E extends f.G{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},47864:function(e,t,r){"use strict";r.d(t,{KD:function(){return a},T_:function(){return i},lQ:function(){return s}});var n=r(6909);class i extends n.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class s extends n.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class a extends n.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},60173:function(e,t,r){"use strict";r.d(t,{$s:function(){return s},W_:function(){return a},mV:function(){return i}});var n=r(6909);class i extends n.G{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class s extends n.G{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class a extends n.G{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}},62116:function(e,t,r){"use strict";r.d(t,{J5:function(){return i},M6:function(){return a},yr:function(){return s}});var n=r(6909);class i extends n.G{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class s extends n.G{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class a extends n.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},19125:function(e,t,r){"use strict";r.d(t,{Fz:function(){return s},e5:function(){return a},ld:function(){return o}});var n=r(58720),i=r(6909);class s extends i.G{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class a extends i.G{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class o extends i.G{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,n.o)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}},28957:function(e,t,r){"use strict";r.d(t,{C_:function(){return d},G$:function(){return o},Hh:function(){return a},M_:function(){return s},WF:function(){return h},ZI:function(){return u},cj:function(){return g},cs:function(){return m},dR:function(){return f},pZ:function(){return p},se:function(){return l},vU:function(){return c}});var n=r(58720),i=r(6909);class s extends i.G{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class h extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class f extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.o)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},15635:function(e,t,r){"use strict";r.d(t,{Gg:function(){return a},W5:function(){return u},bs:function(){return o}});var n=r(97928),i=r(6909),s=r(80498);class a extends i.G{constructor({body:e,cause:t,details:r,headers:i,status:a,url:o}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[a&&`Status: ${a}`,`URL: ${(0,s.G)(o)}`,e&&`Request body: ${(0,n.P)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=a,this.url=o}}class o extends i.G{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,s.G)(r)}`,`Request body: ${(0,n.P)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class u extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,s.G)(t)}`,`Request body: ${(0,n.P)(e)}`],name:"TimeoutError"})}}},36333:function(e,t,r){"use strict";r.d(t,{B:function(){return u},GD:function(){return b},I0:function(){return k},KB:function(){return m},LX:function(){return c},Og:function(){return f},PE:function(){return w},Pv:function(){return y},Ts:function(){return _},XS:function(){return d},ab:function(){return v},gS:function(){return g},ir:function(){return S},nY:function(){return l},pT:function(){return p},s7:function(){return o},u5:function(){return E},x3:function(){return x},yR:function(){return h}});var n=r(6909),i=r(15635);class s extends n.G{constructor(e,{code:t,docsPath:r,metaMessages:n,name:s,shortMessage:a}){super(a,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof i.bs?e.code:t??-1}}class a extends s{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class o extends s{constructor(e){super(e,{code:o.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class u extends s{constructor(e){super(e,{code:u.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c extends s{constructor(e,{method:t}={}){super(e,{code:c.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends s{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends s{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class h extends s{constructor(e){super(e,{code:h.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends s{constructor(e){super(e,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends s{constructor(e){super(e,{code:p.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends s{constructor(e){super(e,{code:m.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends s{constructor(e,{method:t}={}){super(e,{code:g.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not implemented.`})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends s{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends s{constructor(e){super(e,{code:b.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends a{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends a{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class _ extends a{constructor(e,{method:t}={}){super(e,{code:_.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class E extends a{constructor(e){super(e,{code:E.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class k extends a{constructor(e){super(e,{code:k.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class x extends a{constructor(e){super(e,{code:x.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class S extends s{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},97285:function(e,t,r){"use strict";r.d(t,{Bj:function(){return o},Nc:function(){return i},Z8:function(){return s}});var n=r(6909);class i extends n.G{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class s extends n.G{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function a(e){return e.reduce((e,{slot:t,value:r})=>`${e}        ${t}: ${r}
`,"")}function o(e){return e.reduce((e,{address:t,...r})=>{let n=`${e}    ${t}:
`;return r.nonce&&(n+=`      nonce: ${r.nonce}
`),r.balance&&(n+=`      balance: ${r.balance}
`),r.code&&(n+=`      code: ${r.code}
`),r.state&&(n+="      state:\n"+a(r.state)),r.stateDiff&&(n+="      stateDiff:\n"+a(r.stateDiff)),n},"  State Override:\n").slice(0,-1)}},8566:function(e,t,r){"use strict";r.d(t,{Bh:function(){return h},JC:function(){return l},Yb:function(){return f},j3:function(){return c},mc:function(){return p},mk:function(){return d},vl:function(){return u},xY:function(){return o},xr:function(){return a}});var n=r(53536),i=r(58720),s=r(6909);function a(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>`  ${`${e}:`.padEnd(r+1)}  ${t}`).join("\n")}class o extends s.G{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}class u extends s.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends s.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",a(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class l extends s.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class d extends s.G{constructor(e,{account:t,docsPath:r,chain:s,data:o,gas:u,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:f,value:p}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",a({chain:s&&`${s?.name} (id: ${s?.id})`,from:t?.address,to:f,value:void 0!==p&&`${(0,n.d)(p)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:u,gasPrice:void 0!==c&&`${(0,i.o)(c)} gwei`,maxFeePerGas:void 0!==l&&`${(0,i.o)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.o)(d)} gwei`,nonce:h})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class h extends s.G{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let s="Transaction";r&&void 0!==i&&(s=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(s=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(s=`Transaction at block number "${t}" at index "${i}"`),n&&(s=`Transaction with hash "${n}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}}class f extends s.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class p extends s.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}},80498:function(e,t,r){"use strict";r.d(t,{C:function(){return n},G:function(){return i}});let n=e=>e,i=e=>e},88819:function(e,t,r){"use strict";r.d(t,{z:function(){return c}});var n=r(29488),i=r(53068),s=r(45139),a=r(41458),o=r(5869),u=r(43551);async function c(e){let{authorization:t,signature:r}=e;return(0,n.R)({hash:function(e){let{chainId:t,contractAddress:r,nonce:n,to:c}=e,l=(0,u.w)((0,i.SM)(["0x05",(0,o.LV)([(0,a.eC)(t),r,n?(0,a.eC)(n):"0x"])]));return"bytes"===c?(0,s.nr)(l):l}(t),signature:r??t})}},14077:function(e,t,r){"use strict";r.d(t,{i:function(){return N}});var n=r(30698),i=r(12062),s=r(32940),a=r(34474);let o={block:(0,i.G)({format:e=>({transactions:e.transactions?.map(e=>{if("string"==typeof e)return e;let t=s.Tr(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?n.y_(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot})}),transaction:(0,s.y_)({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,n.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:(0,a.dI)({format:e=>({l1GasPrice:e.l1GasPrice?(0,n.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,n.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,n.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var u=r(26921),c=r(94315),l=r(53068),d=r(41458),h=r(5869),f=r(8566),p=r(27278),m=r(89014),g=r(12612),y=r(16999),b=r(85053),v=r(14183),w=r(32852),_=r(6909),E=r(32645),k=r(87768),x=r(28957),S=r(11153),A=r(17670);function C(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:i}=e;if(t<=0)throw new k.hJ({chainId:t});if(i&&!(0,c.U)(i))throw new u.b({address:i});if(n&&n>w.zL)throw new x.Hh({maxFeePerGas:n});if(r&&n&&r>n)throw new x.cs({maxFeePerGas:n,maxPriorityFeePerGas:r})}var I=r(78161);function R(e){if(!e||0===e.length)return[];let t=[];for(let r=0;r<e.length;r++){let{address:n,storageKeys:i}=e[r];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new f.JC({storageKey:i[e]});if(!(0,c.U)(n,{strict:!1}))throw new u.b({address:n});t.push([n,i])}return t}function P(e,t){let r=t??e,{v:n,yParity:i}=r;if(void 0===r.r||void 0===r.s||void 0===n&&void 0===i)return[];let s=(0,b.f)(r.r),a=(0,b.f)(r.s);return["number"==typeof i?i?(0,d.NC)(1):"0x":0n===n?"0x":1n===n?(0,d.NC)(1):27n===n?"0x":(0,d.NC)(1),"0x00"===s?"0x":s,"0x00"===a?"0x":a]}let N={contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:o,serializers:{transaction:function(e,t){return"deposit"===e.type||void 0!==e.sourceHash?function(e){!function(e){let{from:t,to:r}=e;if(t&&!(0,c.U)(t))throw new u.b({address:t});if(r&&!(0,c.U)(r))throw new u.b({address:r})}(e);let{sourceHash:t,data:r,from:n,gas:i,isSystemTx:s,mint:a,to:o,value:f}=e,p=[t,n,o??"0x",a?(0,d.NC)(a):"0x",f?(0,d.NC)(f):"0x",i?(0,d.NC)(i):"0x",s?"0x1":"0x",r??"0x"];return(0,l.SM)(["0x7e",(0,h.LV)(p)])}(e):function(e,t){let r=(0,I.l)(e);return"eip1559"===r?function(e,t){let{chainId:r,gas:n,nonce:i,to:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:u,accessList:c,data:f}=e;C(e);let p=R(c),m=[(0,d.NC)(r),i?(0,d.NC)(i):"0x",u?(0,d.NC)(u):"0x",o?(0,d.NC)(o):"0x",n?(0,d.NC)(n):"0x",s??"0x",a?(0,d.NC)(a):"0x",f??"0x",p,...P(e,t)];return(0,l.SM)(["0x02",(0,h.LV)(m)])}(e,t):"eip2930"===r?function(e,t){let{chainId:r,gas:n,data:i,nonce:s,to:a,value:o,accessList:f,gasPrice:p}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s}=e;if(t<=0)throw new k.hJ({chainId:t});if(s&&!(0,c.U)(s))throw new u.b({address:s});if(r||i)throw new _.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>w.zL)throw new x.Hh({maxFeePerGas:n})}(e);let m=R(f),g=[(0,d.NC)(r),s?(0,d.NC)(s):"0x",p?(0,d.NC)(p):"0x",n?(0,d.NC)(n):"0x",a??"0x",o?(0,d.NC)(o):"0x",i??"0x",m,...P(e,t)];return(0,l.SM)(["0x01",(0,h.LV)(g)])}(e,t):"eip4844"===r?function(e,t){let{chainId:r,gas:i,nonce:s,to:a,value:o,maxFeePerBlobGas:u,maxFeePerGas:c,maxPriorityFeePerGas:f,accessList:b,data:w}=e;!function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new E.RX;for(let e of t){let t=(0,S.d)(e),r=(0,n.ly)((0,A.tP)(e,0,1));if(32!==t)throw new E.xd({hash:e,size:t});if(r!==v.l)throw new E.cJ({hash:e,version:r})}}C(e)}(e);let _=e.blobVersionedHashes,k=e.sidecars;if(e.blobs&&(void 0===_||void 0===k)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,d.ci)(e)),r=e.kzg,n=(0,p.P)({blobs:t,kzg:r});if(void 0===_&&(_=(0,g.C)({commitments:n})),void 0===k){let e=(0,m.y)({blobs:t,commitments:n,kzg:r});k=(0,y.j)({blobs:t,commitments:n,proofs:e})}}let x=R(b),I=[(0,d.NC)(r),s?(0,d.NC)(s):"0x",f?(0,d.NC)(f):"0x",c?(0,d.NC)(c):"0x",i?(0,d.NC)(i):"0x",a??"0x",o?(0,d.NC)(o):"0x",w??"0x",x,u?(0,d.NC)(u):"0x",_??[],...P(e,t)],N=[],M=[],T=[];if(k)for(let e=0;e<k.length;e++){let{blob:t,commitment:r,proof:n}=k[e];N.push(t),M.push(r),T.push(n)}return(0,l.SM)(["0x03",k?(0,h.LV)([I,N,M,T]):(0,h.LV)(I)])}(e,t):"eip7702"===r?function(e,t){let{authorizationList:r,chainId:n,gas:i,nonce:s,to:a,value:o,maxFeePerGas:f,maxPriorityFeePerGas:p,accessList:m,data:g}=e;!function(e){let{authorizationList:t}=e;if(t)for(let e of t){let{contractAddress:t,chainId:r}=e;if(!(0,c.U)(t))throw new u.b({address:t});if(r<=0)throw new k.hJ({chainId:r})}C(e)}(e);let y=R(m),b=function(e){if(!e||0===e.length)return[];let t=[];for(let r of e){let{contractAddress:e,chainId:n,nonce:i,...s}=r;t.push([(0,d.NC)(n),e,i?(0,d.NC)(i):"0x",...P({},s)])}return t}(r);return(0,l.SM)(["0x04",(0,h.LV)([(0,d.NC)(n),s?(0,d.NC)(s):"0x",p?(0,d.NC)(p):"0x",f?(0,d.NC)(f):"0x",i?(0,d.NC)(i):"0x",a??"0x",o?(0,d.NC)(o):"0x",g??"0x",y,b,...P(e,t)])])}(e,t):function(e,t){let{chainId:r=0,gas:n,data:i,nonce:s,to:a,value:o,gasPrice:l}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s}=e;if(s&&!(0,c.U)(s))throw new u.b({address:s});if(void 0!==t&&t<=0)throw new k.hJ({chainId:t});if(r||i)throw new _.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>w.zL)throw new x.Hh({maxFeePerGas:n})}(e);let p=[s?(0,d.NC)(s):"0x",l?(0,d.NC)(l):"0x",n?(0,d.NC)(n):"0x",a??"0x",o?(0,d.NC)(o):"0x",i??"0x"];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new f.vl({v:t.v});return e})(),n=(0,b.f)(t.r),i=(0,b.f)(t.s);p=[...p,(0,d.NC)(e),"0x00"===n?"0x":n,"0x00"===i?"0x":i]}else r>0&&(p=[...p,(0,d.NC)(r),"0x","0x"]);return(0,h.LV)(p)}(e,t)}(e,t)}}}},24166:function(e,t,r){"use strict";r.d(t,{r:function(){return m}});var n=r(16330),i=r(80650),s=r(16293),a=r(11153),o=r(17670),u=r(85053),c=r(62116),l=r(30698),d=r(41458);function h(e,t={}){void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let r=(0,d.ci)(e,t);return(0,l.ly)(r,t)}var f=r(45139),p=r(87723);function m(e,t){let r="string"==typeof t?(0,f.nr)(t):t,m=(0,s.q)(r);if(0===(0,a.d)(r)&&e.length>0)throw new n.wb;if((0,a.d)(t)&&32>(0,a.d)(t))throw new n.xB({data:"string"==typeof t?t:(0,d.ci)(t),params:e,size:(0,a.d)(t)});let y=0,b=[];for(let t=0;t<e.length;++t){let r=e[t];m.setPosition(y);let[s,a]=function e(t,r,{staticPosition:s}){let a=(0,p.S)(r.type);if(a){let[n,i]=a;return function(t,r,{length:n,staticPosition:i}){if(!n){let n=i+h(t.readBytes(32)),s=n+32;t.setPosition(n);let a=h(t.readBytes(32)),o=g(r),u=0,c=[];for(let n=0;n<a;++n){t.setPosition(s+(o?32*n:u));let[i,a]=e(t,r,{staticPosition:s});u+=a,c.push(i)}return t.setPosition(i+32),[c,32]}if(g(r)){let s=i+h(t.readBytes(32)),a=[];for(let i=0;i<n;++i){t.setPosition(s+32*i);let[n]=e(t,r,{staticPosition:s});a.push(n)}return t.setPosition(i+32),[a,32]}let s=0,a=[];for(let o=0;o<n;++o){let[n,o]=e(t,r,{staticPosition:i+s});s+=o,a.push(n)}return[a,s]}(t,{...r,type:i},{length:n,staticPosition:s})}if("tuple"===r.type)return function(t,r,{staticPosition:n}){let i=0===r.components.length||r.components.some(({name:e})=>!e),s=i?[]:{},a=0;if(g(r)){let o=n+h(t.readBytes(32));for(let n=0;n<r.components.length;++n){let u=r.components[n];t.setPosition(o+a);let[c,l]=e(t,u,{staticPosition:o});a+=l,s[i?n:u?.name]=c}return t.setPosition(n+32),[s,32]}for(let o=0;o<r.components.length;++o){let u=r.components[o],[c,l]=e(t,u,{staticPosition:n});s[i?o:u?.name]=c,a+=l}return[s,a]}(t,r,{staticPosition:s});if("address"===r.type)return function(e){let t=e.readBytes(32);return[(0,i.x)((0,d.ci)((0,o.T4)(t,-20))),32]}(t);if("bool"===r.type)return[function(e,t={}){let r=e;if(void 0!==t.size&&((0,l.Yf)(r,{size:t.size}),r=(0,u.f)(r)),r.length>1||r[0]>1)throw new c.yr(r);return!!r[0]}(t.readBytes(32),{size:32}),32];if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=h(e.readBytes(32));e.setPosition(r+t);let n=h(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[(0,d.ci)(i),32]}return[(0,d.ci)(e.readBytes(Number.parseInt(i),32)),32]}(t,r,{staticPosition:s});if(r.type.startsWith("uint")||r.type.startsWith("int"))return function(e,t){let r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[n>48?function(e,t={}){void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let r=(0,d.ci)(e,t);return(0,l.y_)(r,t)}(i,{signed:r}):h(i,{signed:r}),32]}(t,r);if("string"===r.type)return function(e,{staticPosition:t}){let r=h(e.readBytes(32));e.setPosition(t+r);let n=h(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=function(e,t={}){let r=e;return void 0!==t.size&&((0,l.Yf)(r,{size:t.size}),r=(0,u.f)(r,{dir:"right"})),new TextDecoder().decode(r)}((0,u.f)(i));return e.setPosition(t+32),[s,32]}(t,{staticPosition:s});throw new n.CI(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(m,r,{staticPosition:0});y+=a,b.push(s)}return b}function g(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(g);let r=(0,p.S)(e.type);return!!(r&&g({...e,type:r[1]}))}},36408:function(e,t,r){"use strict";r.d(t,{p:function(){return c}});var n=r(36203),i=r(16330),s=r(17670),a=r(51611),o=r(24166),u=r(67795);function c(e){let{abi:t,data:r}=e,c=(0,s.tP)(r,0,4);if("0x"===c)throw new i.wb;let l=[...t||[],n.Up,n.hZ].find(e=>"error"===e.type&&c===(0,a.C)((0,u.t)(e)));if(!l)throw new i.yP(c,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,o.r)(l.inputs,(0,s.tP)(r,4)):void 0,errorName:l.name}}},689:function(e,t,r){"use strict";r.d(t,{F:function(){return l}});var n=r(16330),i=r(11153),s=r(86990),a=r(47864),o=r(24166),u=r(67795);let c="/docs/contract/decodeEventLog";function l(e){let{abi:t,data:r,strict:l,topics:d}=e,h=l??!0,[f,...p]=d;if(!f)throw new n.FM({docsPath:c});let m=1===t.length?t[0]:t.find(e=>"event"===e.type&&f===(0,s.n)((0,u.t)(e)));if(!(m&&"name"in m)||"event"!==m.type)throw new n.lC(f,{docsPath:c});let{name:g,inputs:y}=m,b=y?.some(e=>!("name"in e&&e.name)),v=b?[]:{},w=y.filter(e=>"indexed"in e&&e.indexed);for(let e=0;e<w.length;e++){let t=w[e],r=p[e];if(!r)throw new n.Gy({abiItem:m,param:t});v[b?e:t.name||e]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,o.r)([e],t)||[])[0]}({param:t,value:r})}let _=y.filter(e=>!("indexed"in e&&e.indexed));if(_.length>0){if(r&&"0x"!==r)try{let e=(0,o.r)(_,r);if(e){if(b)v=[...v,...e];else for(let t=0;t<_.length;t++)v[_[t].name]=e[t]}}catch(e){if(h){if(e instanceof n.xB||e instanceof a.lQ)throw new n.SM({abiItem:m,data:r,params:_,size:(0,i.d)(r)});throw e}}else if(h)throw new n.SM({abiItem:m,data:"0x",params:_,size:0})}return{eventName:g,args:Object.values(v).length>0?v:void 0}}},96879:function(e,t,r){"use strict";r.d(t,{p:function(){return u}});var n=r(16330),i=r(17670),s=r(51611),a=r(24166),o=r(67795);function u(e){let{abi:t,data:r}=e,u=(0,i.tP)(r,0,4),c=t.find(e=>"function"===e.type&&u===(0,s.C)((0,o.t)(e)));if(!c)throw new n.eF(u,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,a.r)(c.inputs,(0,i.tP)(r,4)):void 0}}},99777:function(e,t,r){"use strict";r.d(t,{k:function(){return o}});var n=r(16330),i=r(24166),s=r(8730);let a="/docs/contract/decodeFunctionResult";function o(e){let{abi:t,args:r,functionName:o,data:u}=e,c=t[0];if(o){let e=(0,s.mE)({abi:t,args:r,name:o});if(!e)throw new n.xL(o,{docsPath:a});c=e}if("function"!==c.type)throw new n.xL(void 0,{docsPath:a});if(!c.outputs)throw new n.MX(c.name,{docsPath:a});let l=(0,i.r)(c.outputs,u);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},87723:function(e,t,r){"use strict";r.d(t,{E:function(){return h},S:function(){return p}});var n=r(16330),i=r(26921),s=r(6909),a=r(94315),o=r(53068),u=r(18371),c=r(11153),l=r(17670),d=r(41458);function h(e,t){if(e.length!==t.length)throw new n.fs({expectedLength:e.length,givenLength:t.length});let r=f(function({params:e,values:t}){let r=[];for(let h=0;h<e.length;h++)r.push(function e({param:t,value:r}){let h=p(t.type);if(h){let[i,s]=h;return function(t,{length:r,param:i}){let s=null===r;if(!Array.isArray(t))throw new n.hn(t);if(!s&&t.length!==r)throw new n.gr({expectedLength:r,givenLength:t.length,type:`${i.type}[${r}]`});let a=!1,u=[];for(let r=0;r<t.length;r++){let n=e({param:i,value:t[r]});n.dynamic&&(a=!0),u.push(n)}if(s||a){let e=f(u);if(s){let t=(0,d.eC)(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?(0,o.zo)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,o.zo)(u.map(({encoded:e})=>e))}}(r,{length:i,param:{...t,type:s}})}if("tuple"===t.type)return function(t,{param:r}){let n=!1,i=[];for(let s=0;s<r.components.length;s++){let a=r.components[s],o=Array.isArray(t)?s:a.name,u=e({param:a,value:t[o]});i.push(u),u.dynamic&&(n=!0)}return{dynamic:n,encoded:n?f(i):(0,o.zo)(i.map(({encoded:e})=>e))}}(r,{param:t});if("address"===t.type)return function(e){if(!(0,a.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,u.gc)(e.toLowerCase())}}(r);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new s.G(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,u.gc)((0,d.C4)(e))}}(r);if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,{signed:t}){return{dynamic:!1,encoded:(0,d.eC)(e,{size:32,signed:t})}}(r,{signed:t.type.startsWith("int")});if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,r]=t.type.split("bytes"),i=(0,c.d)(e);if(!r){let t=e;return i%32!=0&&(t=(0,u.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,o.zo)([(0,u.gc)((0,d.eC)(i,{size:32})),t])}}if(i!==Number.parseInt(r))throw new n.M4({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:(0,u.gc)(e,{dir:"right"})}}(r,{param:t});if("string"===t.type)return function(e){let t=(0,d.$G)(e),r=Math.ceil((0,c.d)(t)/32),n=[];for(let e=0;e<r;e++)n.push((0,u.gc)((0,l.tP)(t,32*e,(e+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,o.zo)([(0,u.gc)((0,d.eC)((0,c.d)(t),{size:32})),...n])}}(r);throw new n.dh(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:e[h],value:t[h]}));return r}({params:e,values:t}));return 0===r.length?"0x":r}function f(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=(0,c.d)(i)}let r=[],n=[],i=0;for(let s=0;s<e.length;s++){let{dynamic:a,encoded:o}=e[s];a?(r.push((0,d.eC)(t+i,{size:32})),n.push(o),i+=(0,c.d)(o)):r.push(o)}return(0,o.zo)([...r,...n])}function p(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},18710:function(e,t,r){"use strict";r.d(t,{w:function(){return o}});var n=r(16330),i=r(53068),s=r(87723);let a="/docs/contract/encodeDeployData";function o(e){let{abi:t,args:r,bytecode:o}=e;if(!r||0===r.length)return o;let u=t.find(e=>"type"in e&&"constructor"===e.type);if(!u)throw new n.fM({docsPath:a});if(!("inputs"in u)||!u.inputs||0===u.inputs.length)throw new n.cO({docsPath:a});let c=(0,s.E)(u.inputs,r);return(0,i.SM)([o,c])}},15300:function(e,t,r){"use strict";r.d(t,{O:function(){return f}});var n=r(16330),i=r(6909);class s extends i.G{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}var a=r(45139),o=r(43551),u=r(86990),c=r(87723),l=r(67795),d=r(8730);let h="/docs/contract/encodeEventTopics";function f(e){let{abi:t,eventName:r,args:i}=e,s=t[0];if(r){let e=(0,d.mE)({abi:t,name:r});if(!e)throw new n.mv(r,{docsPath:h});s=e}if("event"!==s.type)throw new n.mv(void 0,{docsPath:h});let a=(0,l.t)(s),o=(0,u.n)(a),c=[];if(i&&"inputs"in s){let e=s.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(i)?i:Object.values(i).length>0?e?.map(e=>i[e.name])??[]:[];t.length>0&&(c=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,i)=>p({param:e,value:t[r][i]})):t[r]?p({param:e,value:t[r]}):null)??[])}return[o,...c]}function p({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,o.w)((0,a.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new s(e.type);return(0,c.E)([e],[t])}},69646:function(e,t,r){"use strict";r.d(t,{R:function(){return l}});var n=r(53068),i=r(87723),s=r(16330),a=r(51611),o=r(67795),u=r(8730);let c="/docs/contract/encodeFunctionData";function l(e){let{args:t}=e,{abi:r,functionName:l}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){let{abi:t,args:r,functionName:n}=e,i=t[0];if(n){let e=(0,u.mE)({abi:t,args:r,name:n});if(!e)throw new s.xL(n,{docsPath:c});i=e}if("function"!==i.type)throw new s.xL(void 0,{docsPath:c});return{abi:[i],functionName:(0,a.C)((0,o.t)(i))}}(e),d=r[0],h="inputs"in d&&d.inputs?(0,i.E)(d.inputs,t??[]):void 0;return(0,n.SM)([l,h??"0x"])}},96492:function(e,t,r){"use strict";r.d(t,{_:function(){return l}});var n=r(16330),i=r(26921),s=r(94315),a=r(53068),o=r(18371),u=r(41458),c=r(64349);function l(e,t){if(e.length!==t.length)throw new n.fs({expectedLength:e.length,givenLength:t.length});let r=[];for(let l=0;l<e.length;l++){let d=e[l],h=t[l];r.push(function e(t,r,l=!1){if("address"===t){if(!(0,s.U)(r))throw new i.b({address:r});return(0,o.vk)(r.toLowerCase(),{size:l?32:null})}if("string"===t)return(0,u.$G)(r);if("bytes"===t)return r;if("bool"===t)return(0,o.vk)((0,u.C4)(r),{size:l?32:1});let d=t.match(c.lh);if(d){let[e,t,n="256"]=d,i=Number.parseInt(n)/8;return(0,u.eC)(r,{size:l?32:i,signed:"int"===t})}let h=t.match(c.eL);if(h){let[e,t]=h;if(Number.parseInt(t)!==(r.length-2)/2)throw new n.KY({expectedSize:Number.parseInt(t),givenSize:(r.length-2)/2});return(0,o.vk)(r,{dir:"right",size:l?32:null})}let f=t.match(c.Ow);if(f&&Array.isArray(r)){let[t,n]=f,i=[];for(let t=0;t<r.length;t++)i.push(e(n,r[t],!0));return 0===i.length?"0x":(0,a.SM)(i)}throw new n.Mi(t)}(d,h))}return(0,a.SM)(r)}},67795:function(e,t,r){"use strict";r.d(t,{h:function(){return s},t:function(){return i}});var n=r(16330);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.wM(e.type);return`${e.name}(${s(e.inputs,{includeName:t})})`}function s(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${s(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},8730:function(e,t,r){"use strict";r.d(t,{mE:function(){return u}});var n=r(16330),i=r(24054),s=r(94315),a=r(86990),o=r(51611);function u(e){let t;let{abi:r,args:u=[],name:c}=e,l=(0,i.v)(c,{strict:!1}),d=r.filter(e=>l?"function"===e.type?(0,o.C)(e)===c:"event"===e.type&&(0,a.n)(e)===c:"name"in e&&e.name===c);if(0!==d.length){if(1===d.length)return d[0];for(let e of d)if("inputs"in e){if(!u||0===u.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===u.length&&u.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return(0,s.U)(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(t&&"inputs"in t&&t.inputs){let r=function e(t,r,n){for(let i in t){let a=t[i],o=r[i];if("tuple"===a.type&&"tuple"===o.type&&"components"in a&&"components"in o)return e(a.components,o.components,n[i]);let u=[a.type,o.type];if(u.includes("address")&&u.includes("bytes20")||(u.includes("address")&&u.includes("string")||u.includes("address")&&u.includes("bytes"))&&(0,s.U)(n[i],{strict:!1}))return u}}(e.inputs,t.inputs,u);if(r)throw new n.S4({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}return t||d[0]}}},61182:function(e,t,r){"use strict";r.d(t,{h:function(){return c}});var n=r(16330),i=r(93409),s=r(45139),a=r(43551),o=r(86990),u=r(689);function c(e){let{abi:t,args:r,logs:c,strict:l=!0}=e,d=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return c.map(e=>{try{let n=t.find(t=>"event"===t.type&&e.topics[0]===(0,o.n)(t));if(!n)return null;let c=(0,u.F)({...e,abi:[n],strict:l});if(d&&!d.includes(c.eventName)||!function(e){let{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function o(e,t,r){try{if("address"===e.type)return(0,i.E)(t,r);if("string"===e.type||"bytes"===e.type)return(0,a.w)((0,s.O0)(t))===r;return t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((e,n)=>{if(null===e)return!0;let i=r[n];return!!i&&(Array.isArray(e)?e:[e]).some(e=>o(i,e,t[n]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof n||Array.isArray(n))&&Object.entries(n).every(([e,n])=>{if(null===n)return!0;let i=r.find(t=>t.name===e);return!!i&&(Array.isArray(n)?n:[n]).some(r=>o(i,r,t[e]))})}({args:c.args,inputs:n.inputs,matchArgs:r}))return null;return{...c,...e}}catch(i){let t,r;if(i instanceof n.lC)return null;if(i instanceof n.SM||i instanceof n.Gy){if(l)return null;t=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...e,args:r?[]:{},eventName:t}}}).filter(Boolean)}},80650:function(e,t,r){"use strict";r.d(t,{K:function(){return l},x:function(){return c}});var n=r(26921),i=r(45139),s=r(43551),a=r(89697),o=r(94315);let u=new a.k(8192);function c(e,t){if(u.has(`${e}.${t}`))return u.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,s.w)((0,i.qX)(r),"bytes"),a=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&a[e]&&(a[e]=a[e].toUpperCase()),(15&n[e>>1])>=8&&a[e+1]&&(a[e+1]=a[e+1].toUpperCase());let o=`0x${a.join("")}`;return u.set(`${e}.${t}`,o),o}function l(e,t){if(!(0,o.U)(e,{strict:!1}))throw new n.b({address:e});return c(e,t)}},94315:function(e,t,r){"use strict";r.d(t,{U:function(){return o}});var n=r(89697),i=r(80650);let s=/^0x[a-fA-F0-9]{40}$/,a=new n.k(8192);function o(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(a.has(n))return a.get(n);let o=!!s.test(e)&&(e.toLowerCase()===e||!r||(0,i.x)(e)===e);return a.set(n,o),o}},93409:function(e,t,r){"use strict";r.d(t,{E:function(){return s}});var n=r(26921),i=r(94315);function s(e,t){if(!(0,i.U)(e,{strict:!1}))throw new n.b({address:e});if(!(0,i.U)(t,{strict:!1}))throw new n.b({address:t});return e.toLowerCase()===t.toLowerCase()}},27278:function(e,t,r){"use strict";r.d(t,{P:function(){return s}});var n=r(45139),i=r(41458);function s(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),s="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.nr)(e)):e.blobs,a=[];for(let e of s)a.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?a:a.map(e=>(0,i.ci)(e))}},89014:function(e,t,r){"use strict";r.d(t,{y:function(){return s}});var n=r(45139),i=r(41458);function s(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),s="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.nr)(e)):e.blobs,a="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,n.nr)(e)):e.commitments,o=[];for(let e=0;e<s.length;e++){let r=s[e],n=a[e];o.push(Uint8Array.from(t.computeBlobKzgProof(r,n)))}return"bytes"===r?o:o.map(e=>(0,i.ci)(e))}},12612:function(e,t,r){"use strict";r.d(t,{C:function(){return o}});var n=r(41458),i=r(66641),s=r(24054),a=r(45139);function o(e){let{commitments:t,version:r}=e,o=e.to??("string"==typeof t[0]?"hex":"bytes"),u=[];for(let e of t)u.push(function(e){let{commitment:t,version:r=1}=e,o=e.to??("string"==typeof t?"hex":"bytes"),u=function(e,t){let r=(0,i.J)((0,s.v)(e,{strict:!1})?(0,a.O0)(e):e);return"bytes"===(t||"hex")?r:(0,n.NC)(r)}(t,"bytes");return u.set([r],0),"bytes"===o?u:(0,n.ci)(u)}({commitment:e,to:o,version:r}));return u}},16999:function(e,t,r){"use strict";r.d(t,{j:function(){return l}});var n=r(27278),i=r(89014),s=r(32645),a=r(16293),o=r(11153),u=r(45139),c=r(41458);function l(e){let{data:t,kzg:r,to:l}=e,d=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),r="string"==typeof e.data?(0,u.nr)(e.data):e.data,n=(0,o.d)(r);if(!n)throw new s.RX;if(n>761855)throw new s.m7({maxSize:761855,size:n});let i=[],l=!0,d=0;for(;l;){let e=(0,a.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let n=r.slice(d,d+31);if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),l=!1;break}t++,d+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,c.ci)(e.bytes))}({data:t,to:l}),h=e.commitments??(0,n.P)({blobs:d,kzg:r,to:l}),f=e.proofs??(0,i.y)({blobs:d,commitments:h,kzg:r,to:l}),p=[];for(let e=0;e<d.length;e++)p.push({blob:d[e],commitment:h[e],proof:f[e]});return p}},44238:function(e,t,r){"use strict";r.d(t,{q:function(){return i}});var n=r(87768);function i({chain:e,currentChainId:t}){if(!e)throw new n.Bk;if(t!==e.id)throw new n.Yl({chain:e,currentChainId:t})}},7149:function(e,t,r){"use strict";function n(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}r.d(t,{a:function(){return n}})},84556:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(87768);function i({blockNumber:e,chain:t,contract:r}){let i=t?.contracts?.[r];if(!i)throw new n.mm({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.mm({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}},16293:function(e,t,r){"use strict";r.d(t,{q:function(){return s}});var n=r(47864);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new n.KD({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.lQ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.T_({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new n.T_({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function s(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(i);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}},53068:function(e,t,r){"use strict";function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}(e)}function i(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}r.d(t,{SM:function(){return i},zo:function(){return n}})},24054:function(e,t,r){"use strict";function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}r.d(t,{v:function(){return n}})},18371:function(e,t,r){"use strict";r.d(t,{gc:function(){return s},vk:function(){return i}});var n=r(60173);function i(e,{dir:t,size:r=32}={}){return"string"==typeof e?s(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.$s({size:e.length,targetSize:r,type:"bytes"});let i=new Uint8Array(r);for(let n=0;n<r;n++){let s="right"===t;i[s?n:r-n-1]=e[s?n:e.length-n-1]}return i}(e,{dir:t,size:r})}function s(e,{dir:t,size:r=32}={}){if(null===r)return e;let i=e.replace("0x","");if(i.length>2*r)throw new n.$s({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},11153:function(e,t,r){"use strict";r.d(t,{d:function(){return i}});var n=r(24054);function i(e){return(0,n.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},17670:function(e,t,r){"use strict";r.d(t,{T4:function(){return c},p5:function(){return l},tP:function(){return a}});var n=r(60173),i=r(24054),s=r(11153);function a(e,t,r,{strict:n}={}){return(0,i.v)(e,{strict:!1})?l(e,t,r,{strict:n}):c(e,t,r,{strict:n})}function o(e,t){if("number"==typeof t&&t>0&&t>(0,s.d)(e)-1)throw new n.mV({offset:t,position:"start",size:(0,s.d)(e)})}function u(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,s.d)(e)!==r-t)throw new n.mV({offset:r,position:"end",size:(0,s.d)(e)})}function c(e,t,r,{strict:n}={}){o(e,t);let i=e.slice(t,r);return n&&u(i,t,r),i}function l(e,t,r,{strict:n}={}){o(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&u(i,t,r),i}},85053:function(e,t,r){"use strict";function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)n++;return(r="left"===t?r.slice(n):r.slice(0,r.length-n),"string"==typeof e)?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}r.d(t,{f:function(){return n}})},30698:function(e,t,r){"use strict";r.d(t,{Yf:function(){return o},ly:function(){return c},rR:function(){return l},y_:function(){return u}});var n=r(62116),i=r(11153),s=r(85053),a=r(45139);function o(e,{size:t}){if((0,i.d)(e)>t)throw new n.M6({givenSize:(0,i.d)(e),maxSize:t})}function u(e,t={}){let{signed:r}=t;t.size&&o(e,{size:t.size});let n=BigInt(e);if(!r)return n;let i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(e,t={}){return Number(u(e,t))}function l(e,t={}){let r=(0,a.nr)(e);return t.size&&(o(r,{size:t.size}),r=(0,s.f)(r,{dir:"right"})),new TextDecoder().decode(r)}},45139:function(e,t,r){"use strict";r.d(t,{O0:function(){return c},nr:function(){return h},qX:function(){return f}});var n=r(6909),i=r(24054),s=r(18371),a=r(30698),o=r(41458);let u=new TextEncoder;function c(e,t={}){return"number"==typeof e||"bigint"==typeof e?h((0,o.eC)(e,t)):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,a.Yf)(r,{size:t.size}),(0,s.vk)(r,{size:t.size})):r}(e,t):(0,i.v)(e)?h(e,t):f(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function h(e,t={}){let r=e;t.size&&((0,a.Yf)(r,{size:t.size}),r=(0,s.vk)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let o=i.length/2,u=new Uint8Array(o);for(let e=0,t=0;e<o;e++){let r=d(i.charCodeAt(t++)),s=d(i.charCodeAt(t++));if(void 0===r||void 0===s)throw new n.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);u[e]=16*r+s}return u}function f(e,t={}){let r=u.encode(e);return"number"==typeof t.size?((0,a.Yf)(r,{size:t.size}),(0,s.vk)(r,{dir:"right",size:t.size})):r}},41458:function(e,t,r){"use strict";r.d(t,{$G:function(){return h},C4:function(){return u},NC:function(){return o},ci:function(){return c},eC:function(){return l}});var n=r(62116),i=r(18371),s=r(30698);let a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?h(e,t):"boolean"==typeof e?u(e,t):c(e,t)}function u(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,i.vk)(r,{size:t.size})):r}function c(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=a[e[t]];let n=`0x${r}`;return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{dir:"right",size:t.size})):n}function l(e,t={}){let r;let{signed:s,size:a}=t,o=BigInt(e);a?r=s?(1n<<8n*BigInt(a)-1n)-1n:2n**(8n*BigInt(a))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let u="bigint"==typeof r&&s?-r-1n:0;if(r&&o>r||o<u){let t="bigint"==typeof e?"n":"";throw new n.J5({max:r?`${r}${t}`:void 0,min:`${u}${t}`,signed:s,size:a,value:`${e}${t}`})}let c=`0x${(s&&o<0?(1n<<BigInt(8*a))+BigInt(o):o).toString(16)}`;return a?(0,i.vk)(c,{size:a}):c}let d=new TextEncoder;function h(e,t={}){return c(d.encode(e),t)}},5869:function(e,t,r){"use strict";r.d(t,{LV:function(){return o}});var n=r(6909),i=r(16293),s=r(45139),a=r(41458);function o(e,t="hex"){let r=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),r=u(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:i}of(t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t)),e))i(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,s.nr)(e):e,r=u(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),n=(0,i.q)(new Uint8Array(r.length));return(r.encode(n),"hex"===t)?(0,a.ci)(n.bytes):n.bytes}function u(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new n.G("Length is too large.")}},96217:function(e,t,r){"use strict";r.d(t,{i:function(){return i}});var n=r(24054);function i(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,n.v)(t)?t:null}},76107:function(e,t,r){"use strict";r.d(t,{c:function(){return a}});var n=r(36203),i=r(6909),s=r(32655);function a(e,t){if(!(e instanceof i.G))return!1;let r=e.walk(e=>e instanceof s.Lu);return r instanceof s.Lu&&(!!(r.data?.errorName==="ResolverNotFound"||r.data?.errorName==="ResolverWildcardNotSupported"||r.data?.errorName==="ResolverNotContract"||r.data?.errorName==="ResolverError"||r.data?.errorName==="HttpError"||r.reason?.includes("Wildcard on non-extended resolvers is not supported"))||"reverse"===t&&r.reason===n.$[50])}},74969:function(e,t,r){"use strict";r.d(t,{V:function(){return u}});var n=r(53068),i=r(45139),s=r(41458),a=r(43551),o=r(96217);function u(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,s.ci)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let s=(0,o.i)(r[e]),u=s?(0,i.O0)(s):(0,a.w)((0,i.qX)(r[e]),"bytes");t=(0,a.w)((0,n.zo)([t,u]),"bytes")}return(0,s.ci)(t)}},64938:function(e,t,r){"use strict";r.d(t,{T:function(){return o}});var n=r(45139),i=r(41458),s=r(43551),a=r(96217);function o(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,n.qX)(t).byteLength+2),o=0,u=t.split(".");for(let e=0;e<u.length;e++){let t=(0,n.qX)(u[e]);if(t.byteLength>255){var c;t=(0,n.qX)((c=function(e){let t=new Uint8Array(32).fill(0);return e?(0,a.i)(e)||(0,s.w)((0,n.qX)(e)):(0,i.ci)(t)}(u[e]),`[${c.slice(2)}]`))}r[o]=t.length,r.set(t,o+1),o+=t.length+1}return r.byteLength!==o+1?r.slice(0,o+1):r}},51893:function(e,t,r){"use strict";r.d(t,{S:function(){return o}});var n=r(16330),i=r(6909),s=r(32655),a=r(36333);function o(e,{abi:t,address:r,args:o,docsPath:u,functionName:c,sender:l}){let{code:d,data:h,message:f,shortMessage:p}=e instanceof s.VQ?e:e instanceof i.G?e.walk(e=>"data"in e)||e.walk():{},m=e instanceof n.wb?new s.Dk({functionName:c}):[3,a.XS.code].includes(d)&&(h||f||p)?new s.Lu({abi:t,data:"object"==typeof h?h.data:h,functionName:c,message:p??f}):e;return new s.uq(m,{abi:t,args:o,contractAddress:r,docsPath:u,functionName:c,sender:l})}},23553:function(e,t,r){"use strict";r.d(t,{k:function(){return s}});var n=r(6909),i=r(28957);function s(e,t){let r=(e.details||"").toLowerCase(),s=e instanceof n.G?e.walk(e=>e?.code===i.M_.code):e;return s instanceof n.G?new i.M_({cause:e,message:s.details}):i.M_.nodeMessage.test(r)?new i.M_({cause:e,message:e.details}):i.Hh.nodeMessage.test(r)?new i.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.G$.nodeMessage.test(r)?new i.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.ZI.nodeMessage.test(r)?new i.ZI({cause:e,nonce:t?.nonce}):i.vU.nodeMessage.test(r)?new i.vU({cause:e,nonce:t?.nonce}):i.se.nodeMessage.test(r)?new i.se({cause:e,nonce:t?.nonce}):i.C_.nodeMessage.test(r)?new i.C_({cause:e}):i.WF.nodeMessage.test(r)?new i.WF({cause:e,gas:t?.gas}):i.dR.nodeMessage.test(r)?new i.dR({cause:e,gas:t?.gas}):i.pZ.nodeMessage.test(r)?new i.pZ({cause:e}):i.cs.nodeMessage.test(r)?new i.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.cj({cause:e})}},97436:function(e,t,r){"use strict";function n(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:i,transport:s})=>{"success"===i&&t===e&&(r[n]=s.request)}),t=>r[t]||e.request}r.d(t,{g:function(){return n}})},12062:function(e,t,r){"use strict";r.d(t,{G:function(){return a},Z:function(){return s}});var n=r(99379),i=r(32940);function s(e){let t=e.transactions?.map(e=>"string"==typeof e?e:i.Tr(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}let a=(0,n.$)("block",s)},47139:function(e,t,r){"use strict";function n(e,{format:t}){if(!t)return{};let r={};return!function t(n){for(let i of Object.keys(n))i in e&&(r[i]=e[i]),n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])&&t(n[i])}(t(e||{})),r}r.d(t,{K:function(){return n}})},99379:function(e,t,r){"use strict";function n(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{let i=t(e);if(r)for(let e of r)delete i[e];return{...i,...n(e)}},type:e})}r.d(t,{$:function(){return n}})},68799:function(e,t,r){"use strict";function n(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}r.d(t,{U:function(){return n}})},32940:function(e,t,r){"use strict";r.d(t,{Tr:function(){return a},c8:function(){return s},y_:function(){return o}});var n=r(30698),i=r(99379);let s={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function a(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,n.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,n.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?s[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,r:e.r,s:e.s,chainId:Number(e.chainId),nonce:Number(e.nonce),...void 0!==e.yParity?{yParity:Number(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:Number(e.v)}:{}}))),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}let o=(0,i.$)("transaction",a)},34474:function(e,t,r){"use strict";r.d(t,{dI:function(){return c},fA:function(){return u}});var n=r(30698),i=r(99379),s=r(68799),a=r(32940);let o={"0x0":"reverted","0x1":"success"};function u(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,s.U)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,n.ly)(e.transactionIndex):null,status:e.status?o[e.status]:null,type:e.type?a.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}let c=(0,i.$)("transactionReceipt",u)},47768:function(e,t,r){"use strict";r.d(t,{tG:function(){return s}});var n=r(41458);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function s(e){let t={};return void 0!==e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:(0,n.eC)(e.chainId),nonce:(0,n.eC)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.eC)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.eC)(e.v)}:{}}))),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,n.ci)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,n.eC)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,n.eC)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,n.eC)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,n.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,n.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,n.eC)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=i[e.type]),void 0!==e.value&&(t.value=(0,n.eC)(e.value)),t}},42434:function(e,t,r){"use strict";function n(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let i=e[r];return"function"==typeof i?i:r=>t(e,r)}r.d(t,{s:function(){return n}})},51804:function(e,t,r){"use strict";r.d(t,{l:function(){return s}});var n=r(24054),i=r(11153);function s(e){return(0,n.v)(e)&&32===(0,i.d)(e)}},43551:function(e,t,r){"use strict";r.d(t,{w:function(){return R}});var n=r(94097);let i=BigInt(4294967296-1),s=BigInt(32),a=(e,t,r)=>e<<r|t>>>32-r,o=(e,t,r)=>t<<r|e>>>32-r,u=(e,t,r)=>t<<r-32|e>>>64-r,c=(e,t,r)=>e<<r-32|t>>>64-r;var l=r(85811);let d=[],h=[],f=[],p=BigInt(0),m=BigInt(1),g=BigInt(2),y=BigInt(7),b=BigInt(256),v=BigInt(113);for(let e=0,t=m,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],d.push(2*(5*n+r)),h.push((e+1)*(e+2)/2%64);let i=p;for(let e=0;e<7;e++)(t=(t<<m^(t>>y)*v)%b)&g&&(i^=m<<(m<<BigInt(e))-m);f.push(i)}let[w,_]=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let a=0;a<e.length;a++){let{h:o,l:u}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>s&i)}:{h:0|Number(e>>s&i),l:0|Number(e&i)}}(e[a],t);[r[a],n[a]]=[o,u]}return[r,n]}(f,!0),E=(e,t,r)=>r>32?u(e,t,r):a(e,t,r),k=(e,t,r)=>r>32?c(e,t,r):o(e,t,r);class x extends l.kb{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.Rx)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,l.Jq)(this.state)}keccak(){l.iA||(0,l.l1)(this.state32),function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,s=r[i],a=r[i+1],o=E(s,a,1)^r[n],u=k(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=h[r],s=E(t,i,n),a=k(t,i,n),o=d[r];t=e[o],i=e[o+1],e[o]=s,e[o+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=w[n],e[1]^=_[n]}r.fill(0)}(this.state32,this.rounds),l.iA||(0,l.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.Gg)(this);let{blockLen:t,state:r}=this,i=(e=(0,l.O0)(e)).length;for(let n=0;n<i;){let s=Math.min(t-this.pos,i-n);for(let t=0;t<s;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.Gg)(this,!1),(0,n.aI)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.Rx)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.J8)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||(e=new x(t,r,n,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}let S=(0,l.hE)(()=>new x(136,1,32));var A=r(24054),C=r(45139),I=r(41458);function R(e,t){let r=S((0,A.v)(e,{strict:!1})?(0,C.O0)(e):e);return"bytes"===(t||"hex")?r:(0,I.NC)(r)}},86990:function(e,t,r){"use strict";r.d(t,{n:function(){return n}});let n=r(82075).r},51611:function(e,t,r){"use strict";r.d(t,{C:function(){return s}});var n=r(17670),i=r(82075);let s=e=>(0,n.tP)((0,i.r)(e),0,4)},82075:function(e,t,r){"use strict";r.d(t,{r:function(){return d}});var n=r(45139),i=r(43551);let s=e=>(0,i.w)((0,n.O0)(e));var a=r(45252);let o=/^tuple(?<array>(\[(\d*)\])*)$/;function u(e){let t="",r=e.length;for(let n=0;n<r;n++)t+=function e(t){let r=t.type;if(o.test(t.type)&&"components"in t){r="(";let n=t.components.length;for(let i=0;i<n;i++)r+=e(t.components[i]),i<n-1&&(r+=", ");let i=(0,a.Zw)(o,t.type);return r+=`)${i?.array??""}`,e({...t,type:r})}return("indexed"in t&&t.indexed&&(r=`${r} indexed`),t.name)?`${r} ${t.name}`:r}(e[n]),n!==r-1&&(t+=", ");return t}var c=r(6909);let l=e=>(function(e){let t=!0,r="",n=0,i="",s=!1;for(let a=0;a<e.length;a++){let o=e[a];if(["(",")",","].includes(o)&&(t=!0),"("===o&&n++,")"===o&&n--,t){if(0===n){if(" "===o&&["event","function",""].includes(i))i="";else if(i+=o,")"===o){s=!0;break}continue}if(" "===o){","!==e[a-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}i+=o,r+=o}}if(!s)throw new c.G("Unable to normalize signature.");return i})("string"==typeof e?e:"function"===e.type?`function ${e.name}(${u(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs.length?` returns (${u(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${u(e.inputs)})`:"error"===e.type?`error ${e.name}(${u(e.inputs)})`:"constructor"===e.type?`constructor(${u(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback()":"receive() external payable");function d(e){return s(l(e))}},89697:function(e,t,r){"use strict";r.d(t,{k:function(){return n}});class n extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}},71708:function(e,t,r){"use strict";r.d(t,{N7:function(){return a}});let n=new Map,i=new Map,s=0;function a(e,t,r){let a=++s,o=()=>n.get(e)||[],u=()=>{let t=o();n.set(e,t.filter(e=>e.id!==a))},c=()=>{let t=i.get(e);1===o().length&&t&&t(),u()},l=o();if(n.set(e,[...l,{id:a,fns:t}]),l&&l.length>0)return c;let d={};for(let e in t)d[e]=(...t)=>{let r=o();if(0!==r.length)for(let n of r)n.fns[e]?.(...t)};let h=r(d);return"function"==typeof h&&i.set(e,h),c}},31181:function(e,t,r){"use strict";r.d(t,{$:function(){return i}});var n=r(3532);function i(e,{emitOnBegin:t,initialWaitTime:r,interval:i}){let s=!0,a=()=>s=!1;return(async()=>{let o;t&&(o=await e({unpoll:a}));let u=await r?.(o)??i;await (0,n.D)(u);let c=async()=>{s&&(await e({unpoll:a}),await (0,n.D)(i),c())};c()})(),a}},30934:function(e,t,r){"use strict";r.d(t,{S:function(){return i}});let n=new Map;function i({fn:e,id:t,shouldSplitBatch:r,wait:i=0,sort:s}){let a=async()=>{let t=c();o();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{s&&Array.isArray(e)&&e.sort(s);for(let r=0;r<t.length;r++){let{pendingPromise:n}=t[r];n.resolve?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{pendingPromise:n}=t[r];n.reject?.(e)}})},o=()=>n.delete(t),u=()=>c().map(({args:e})=>e),c=()=>n.get(t)||[],l=e=>n.set(t,[...c(),e]);return{flush:o,async schedule(e){let t={},n=new Promise((e,r)=>{t.resolve=e,t.reject=r});return(r?.([...u(),e])&&a(),c().length>0)?l({args:e,pendingPromise:t}):(l({args:e,pendingPromise:t}),setTimeout(a,i)),n}}}},54356:function(e,t,r){"use strict";r.d(t,{J:function(){return i}});var n=r(3532);function i(e,{delay:t=100,retryCount:r=2,shouldRetry:i=()=>!0}={}){return new Promise((s,a)=>{let o=async({count:u=0}={})=>{let c=async({error:e})=>{let r="function"==typeof t?t({count:u,error:e}):t;r&&await (0,n.D)(r),o({count:u+1})};try{let t=await e();s(t)}catch(e){if(u<r&&await i({count:u,error:e}))return c({error:e});a(e)}};o()})}},65521:function(e,t,r){"use strict";function n(e,{errorInstance:t=Error("timed out"),timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let a;try{let o=new AbortController;r>0&&(a=setTimeout(()=>{n?o.abort():s(t)},r)),i(await e({signal:o?.signal||null}))}catch(e){e?.name==="AbortError"&&s(t),s(e)}finally{clearTimeout(a)}})()})}r.d(t,{F:function(){return n}})},64349:function(e,t,r){"use strict";r.d(t,{Ow:function(){return n},eL:function(){return i},lh:function(){return s}});let n=/^(.*)\[([0-9]*)\]$/,i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,s=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/},29488:function(e,t,r){"use strict";r.d(t,{R:function(){return l}});var n=r(80650),i=r(43551),s=r(24054),a=r(30698),o=r(41458);async function u({hash:e,signature:t}){let n=(0,s.v)(e)?e:(0,o.NC)(e),{secp256k1:i}=await Promise.resolve().then(r.bind(r,44484)),u=(()=>{if("object"==typeof t&&"r"in t&&"s"in t){let{r:e,s:r,v:n,yParity:s}=t,o=c(Number(s??n));return new i.Signature((0,a.y_)(e),(0,a.y_)(r)).addRecoveryBit(o)}let e=(0,s.v)(t)?t:(0,o.NC)(t),r=c((0,a.ly)(`0x${e.slice(130)}`));return i.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(n.substring(2)).toHex(!1);return`0x${u}`}function c(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function l({hash:e,signature:t}){return function(e){let t=(0,i.w)(`0x${e.substring(4)}`).substring(26);return(0,n.x)(`0x${t}`)}(await u({hash:e,signature:t}))}},40364:function(e,t,r){"use strict";r.d(t,{mF:function(){return c}});var n=r(26921),i=r(60173),s=r(97285),a=r(94315),o=r(41458);function u(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:r})=>{if(66!==t.length)throw new i.W_({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new i.W_({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function c(e){if(!e)return;let t={};for(let{address:r,...i}of e){if(!(0,a.U)(r,{strict:!1}))throw new n.b({address:r});if(t[r])throw new s.Nc({address:r});t[r]=function(e){let{balance:t,nonce:r,state:n,stateDiff:i,code:a}=e,c={};if(void 0!==a&&(c.code=a),void 0!==t&&(c.balance=(0,o.eC)(t)),void 0!==r&&(c.nonce=(0,o.eC)(r)),void 0!==n&&(c.state=u(n)),void 0!==i){if(c.state)throw new s.Z8;c.stateDiff=u(i)}return c}(i)}return t}},97928:function(e,t,r){"use strict";r.d(t,{P:function(){return n}});let n=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},21944:function(e,t,r){"use strict";r.d(t,{F:function(){return c}});var n=r(9512),i=r(32852),s=r(26921),a=r(28957),o=r(8566),u=r(94315);function c(e){let{account:t,gasPrice:r,maxFeePerGas:c,maxPriorityFeePerGas:l,to:d}=e,h=t?(0,n.T)(t):void 0;if(h&&!(0,u.U)(h.address))throw new s.b({address:h.address});if(d&&!(0,u.U)(d))throw new s.b({address:d});if(void 0!==r&&(void 0!==c||void 0!==l))throw new o.xY;if(c&&c>i.zL)throw new a.Hh({maxFeePerGas:c});if(l&&c&&l>c)throw new a.cs({maxFeePerGas:c,maxPriorityFeePerGas:l})}},78161:function(e,t,r){"use strict";r.d(t,{l:function(){return i}});var n=r(8566);function i(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new n.j3({transaction:e})}},40144:function(e,t,r){"use strict";r.d(t,{H6:function(){return l},cj:function(){return h},iC:function(){return d}});var n=r(16330),i=r(26921),s=r(94315),a=r(11153),o=r(41458),u=r(64349),c=r(97928);function l(e){let{domain:t,message:r,primaryType:n,types:i}=e,s=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},a=i.EIP712Domain&&t?s(i.EIP712Domain,t):{},o=(()=>{if("EIP712Domain"!==n)return s(i[n],r)})();return(0,c.P)({domain:a,message:o,primaryType:n,types:i})}function d(e){let{domain:t,message:r,primaryType:c,types:l}=e,d=(e,t)=>{for(let r of e){let{name:e,type:c}=r,h=t[e],f=c.match(u.lh);if(f&&("number"==typeof h||"bigint"==typeof h)){let[e,t,r]=f;(0,o.eC)(h,{signed:"int"===t,size:Number.parseInt(r)/8})}if("address"===c&&"string"==typeof h&&!(0,s.U)(h))throw new i.b({address:h});let p=c.match(u.eL);if(p){let[e,t]=p;if(t&&(0,a.d)(h)!==Number.parseInt(t))throw new n.KY({expectedSize:Number.parseInt(t),givenSize:(0,a.d)(h)})}let m=l[c];m&&d(m,h)}};l.EIP712Domain&&t&&d(l.EIP712Domain,t),"EIP712Domain"!==c&&d(l[c],r)}function h({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"==typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},6898:function(e,t,r){"use strict";let n;r.d(t,{h:function(){return s}});let i=256;function s(e=11){if(!n||i+e>512){n="",i=0;for(let e=0;e<256;e++)n+=(256+256*Math.random()|0).toString(16).substring(1)}return n.substring(i,i+++e)}},53536:function(e,t,r){"use strict";r.d(t,{d:function(){return s}});var n=r(36793),i=r(33180);function s(e,t="wei"){return(0,i.b)(e,n.ez[t])}},58720:function(e,t,r){"use strict";r.d(t,{o:function(){return s}});var n=r(36793),i=r(33180);function s(e,t="wei"){return(0,i.b)(e,n.Zn[t])}},33180:function(e,t,r){"use strict";function n(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[i,s]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}r.d(t,{b:function(){return n}})},48780:function(e,t,r){"use strict";r.d(t,{f:function(){return a}});var n=r(36793),i=r(6909);class s extends i.G{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function a(e,t="wei"){return function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new s({value:e});let[r,n="0"]=e.split("."),i=r.startsWith("-");if(i&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${n}`))&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>t){let[e,i,s]=[n.slice(0,t-1),n.slice(t-1,t),n.slice(t)],a=Math.round(Number(`${i}.${s}`));(n=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`).length>t&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,t)}else n=n.padEnd(t,"0");return BigInt(`${i?"-":""}${r}${n}`)}(e,n.ez[t])}},3532:function(e,t,r){"use strict";async function n(e){return new Promise(t=>setTimeout(t,e))}r.d(t,{D:function(){return n}})},57496:function(e,t,r){"use strict";let n;r.d(t,{z:function(){return to}}),(e9=tt||(tt={})).assertEqual=e=>e,e9.assertIs=function(e){},e9.assertNever=function(e){throw Error()},e9.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e9.getValidEnumValues=e=>{let t=e9.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return e9.objectValues(r)},e9.objectValues=e=>e9.objectKeys(e).map(function(t){return e[t]}),e9.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e9.find=(e,t)=>{for(let r of e)if(t(r))return r},e9.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e9.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e9.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(tr||(tr={})).mergeShapes=(e,t)=>({...e,...t});let i=tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s=e=>{switch(typeof e){case"undefined":return i.undefined;case"string":return i.string;case"number":return isNaN(e)?i.nan:i.number;case"boolean":return i.boolean;case"function":return i.function;case"bigint":return i.bigint;case"symbol":return i.symbol;case"object":if(Array.isArray(e))return i.array;if(null===e)return i.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return i.promise;if("undefined"!=typeof Map&&e instanceof Map)return i.map;if("undefined"!=typeof Set&&e instanceof Set)return i.set;if("undefined"!=typeof Date&&e instanceof Date)return i.date;return i.object;default:return i.unknown}},a=tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class o extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof o))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,tt.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}o.create=e=>new o(e);let u=(e,t)=>{let r;switch(e.code){case a.invalid_type:r=e.received===i.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,tt.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:r=`Unrecognized key(s) in object: ${tt.joinValues(e.keys,", ")}`;break;case a.invalid_union:r="Invalid input";break;case a.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${tt.joinValues(e.options)}`;break;case a.invalid_enum_value:r=`Invalid enum value. Expected ${tt.joinValues(e.options)}, received '${e.received}'`;break;case a.invalid_arguments:r="Invalid function arguments";break;case a.invalid_return_type:r="Invalid function return type";break;case a.invalid_date:r="Invalid date";break;case a.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:tt.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case a.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case a.custom:r="Invalid input";break;case a.invalid_intersection_types:r="Intersection results could not be merged";break;case a.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case a.not_finite:r="Number must be finite";break;default:r=t.defaultError,tt.assertNever(e)}return{message:r}},c=u;function l(){return c}let d=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],a={...i,path:s};if(void 0!==i.message)return{...i,path:s,message:i.message};let o="";for(let e of n.filter(e=>!!e).slice().reverse())o=e(a,{data:t,defaultError:o}).message;return{...i,path:s,message:o}};function h(e,t){let r=l(),n=d({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===u?void 0:u].filter(e=>!!e)});e.common.issues.push(n)}class f{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return p;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return f.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return p;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let p=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),g=e=>({status:"valid",value:e}),y=e=>"aborted"===e.status,b=e=>"dirty"===e.status,v=e=>"valid"===e.status,w=e=>"undefined"!=typeof Promise&&e instanceof Promise;function _(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function E(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError,(e7=tn||(tn={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},e7.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class k{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let x=(e,t)=>{if(v(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new o(e.common.issues);return this._error=t,this._error}}};function S(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var s,a;let{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:i.defaultError}:void 0===i.data?{message:null!==(s=null!=o?o:n)&&void 0!==s?s:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(a=null!=o?o:r)&&void 0!==a?a:i.defaultError}},description:i}}class A{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return s(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new f,ctx:{common:e.parent.common,data:e.data,parsedType:s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(w(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:s(e)},i=this._parseSync({data:e,path:n.path,parent:n});return x(n,i)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:s(e)},n=this._parse({data:e,path:r.path,parent:r});return x(r,await (w(n)?n:Promise.resolve(n)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),s=()=>n.addIssue({code:a.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(s(),!1)):!!i||(s(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new eg({schema:this,typeName:ta.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ey.create(this,this._def)}nullable(){return eb.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return X.create(this,this._def)}promise(){return em.create(this,this._def)}or(e){return et.create([this,e],this._def)}and(e){return ei.create(this,e,this._def)}transform(e){return new eg({...S(this._def),schema:this,typeName:ta.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new ev({...S(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:ta.ZodDefault})}brand(){return new ek({typeName:ta.ZodBranded,type:this,...S(this._def)})}catch(e){return new ew({...S(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:ta.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return ex.create(this,e)}readonly(){return eS.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let C=/^c[^\s-]{8,}$/i,I=/^[0-9a-z]+$/,R=/^[0-9A-HJKMNP-TV-Z]{26}$/,P=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,N=/^[a-z0-9_-]{21}$/i,M=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,T=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,O=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,D=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,L=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,B="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",q=RegExp(`^${B}$`);function z(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function U(e){let t=`${B}T${z(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}class j extends A{_parse(e){var t,r;let s;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==i.string){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.string,received:t.parsedType}),p}let o=new f;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(h(s=this._getOrReturnCtx(e,s),{code:a.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if("max"===i.kind)e.data.length>i.value&&(h(s=this._getOrReturnCtx(e,s),{code:a.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if("length"===i.kind){let t=e.data.length>i.value,r=e.data.length<i.value;(t||r)&&(s=this._getOrReturnCtx(e,s),t?h(s,{code:a.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):r&&h(s,{code:a.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if("email"===i.kind)T.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"email",code:a.invalid_string,message:i.message}),o.dirty());else if("emoji"===i.kind)n||(n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),n.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:a.invalid_string,message:i.message}),o.dirty());else if("uuid"===i.kind)P.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:a.invalid_string,message:i.message}),o.dirty());else if("nanoid"===i.kind)N.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"nanoid",code:a.invalid_string,message:i.message}),o.dirty());else if("cuid"===i.kind)C.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:a.invalid_string,message:i.message}),o.dirty());else if("cuid2"===i.kind)I.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:a.invalid_string,message:i.message}),o.dirty());else if("ulid"===i.kind)R.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:a.invalid_string,message:i.message}),o.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(t){h(s=this._getOrReturnCtx(e,s),{validation:"url",code:a.invalid_string,message:i.message}),o.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"regex",code:a.invalid_string,message:i.message}),o.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):"datetime"===i.kind?U(i).test(e.data)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:"datetime",message:i.message}),o.dirty()):"date"===i.kind?q.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:"date",message:i.message}),o.dirty()):"time"===i.kind?RegExp(`^${z(i)}$`).test(e.data)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:"time",message:i.message}),o.dirty()):"duration"===i.kind?M.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"duration",code:a.invalid_string,message:i.message}),o.dirty()):"ip"===i.kind?(t=e.data,("v4"===(r=i.version)||!r)&&O.test(t)||("v6"===r||!r)&&D.test(t)||(h(s=this._getOrReturnCtx(e,s),{validation:"ip",code:a.invalid_string,message:i.message}),o.dirty())):"base64"===i.kind?L.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"base64",code:a.invalid_string,message:i.message}),o.dirty()):tt.assertNever(i);return{status:o.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:a.invalid_string,...tn.errToObj(r)})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...tn.errToObj(e)})}url(e){return this._addCheck({kind:"url",...tn.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...tn.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...tn.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...tn.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...tn.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...tn.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...tn.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...tn.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...tn.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r,...tn.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...tn.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...tn.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...tn.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...tn.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...tn.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...tn.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...tn.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...tn.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...tn.errToObj(t)})}nonempty(e){return this.min(1,tn.errToObj(e))}trim(){return new j({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}j.create=e=>{var t;return new j({checks:[],typeName:ta.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...S(e)})};class F extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==i.number){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.number,received:t.parsedType}),p}let r=new f;for(let n of this._def.checks)"int"===n.kind?tt.isInteger(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:a.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:a.not_finite,message:n.message}),r.dirty()):tt.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tn.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tn.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tn.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tn.toString(t))}setLimit(e,t,r,n){return new F({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:tn.toString(n)}]})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:tn.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:tn.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tn.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:tn.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:tn.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:tn.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&tt.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}F.create=e=>new F({checks:[],typeName:ta.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...S(e)});class H extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==i.bigint){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.bigint,received:t.parsedType}),p}let r=new f;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(h(t=this._getOrReturnCtx(e,t),{code:a.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):tt.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tn.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tn.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tn.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tn.toString(t))}setLimit(e,t,r,n){return new H({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:tn.toString(n)}]})}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:tn.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tn.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}H.create=e=>{var t;return new H({checks:[],typeName:ta.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...S(e)})};class $ extends A{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==i.boolean){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.boolean,received:t.parsedType}),p}return g(e.data)}}$.create=e=>new $({typeName:ta.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...S(e)});class W extends A{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==i.date){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.date,received:t.parsedType}),p}if(isNaN(e.data.getTime()))return h(this._getOrReturnCtx(e),{code:a.invalid_date}),p;let r=new f;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):tt.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:tn.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:tn.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}W.create=e=>new W({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ta.ZodDate,...S(e)});class G extends A{_parse(e){if(this._getType(e)!==i.symbol){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.symbol,received:t.parsedType}),p}return g(e.data)}}G.create=e=>new G({typeName:ta.ZodSymbol,...S(e)});class V extends A{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.undefined,received:t.parsedType}),p}return g(e.data)}}V.create=e=>new V({typeName:ta.ZodUndefined,...S(e)});class K extends A{_parse(e){if(this._getType(e)!==i.null){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.null,received:t.parsedType}),p}return g(e.data)}}K.create=e=>new K({typeName:ta.ZodNull,...S(e)});class Z extends A{constructor(){super(...arguments),this._any=!0}_parse(e){return g(e.data)}}Z.create=e=>new Z({typeName:ta.ZodAny,...S(e)});class Y extends A{constructor(){super(...arguments),this._unknown=!0}_parse(e){return g(e.data)}}Y.create=e=>new Y({typeName:ta.ZodUnknown,...S(e)});class J extends A{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.never,received:t.parsedType}),p}}J.create=e=>new J({typeName:ta.ZodNever,...S(e)});class Q extends A{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.void,received:t.parsedType}),p}return g(e.data)}}Q.create=e=>new Q({typeName:ta.ZodVoid,...S(e)});class X extends A{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==i.array)return h(t,{code:a.invalid_type,expected:i.array,received:t.parsedType}),p;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(h(t,{code:e?a.too_big:a.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(h(t,{code:a.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(h(t,{code:a.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new k(t,e,t.path,r)))).then(e=>f.mergeArray(r,e));let s=[...t.data].map((e,r)=>n.type._parseSync(new k(t,e,t.path,r)));return f.mergeArray(r,s)}get element(){return this._def.type}min(e,t){return new X({...this._def,minLength:{value:e,message:tn.toString(t)}})}max(e,t){return new X({...this._def,maxLength:{value:e,message:tn.toString(t)}})}length(e,t){return new X({...this._def,exactLength:{value:e,message:tn.toString(t)}})}nonempty(e){return this.min(1,e)}}X.create=(e,t)=>new X({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ta.ZodArray,...S(t)});class ee extends A{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=tt.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.object){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.object,received:t.parsedType}),p}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof J&&"strip"===this._def.unknownKeys))for(let e in r.data)s.includes(e)||o.push(e);let u=[];for(let e of s){let t=n[e],i=r.data[e];u.push({key:{status:"valid",value:e},value:t._parse(new k(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof J){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)u.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&(h(r,{code:a.unrecognized_keys,keys:o}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let n=r.data[t];u.push({key:{status:"valid",value:t},value:e._parse(new k(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of u){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>f.mergeObjectSync(t,e)):f.mergeObjectSync(t,u)}get shape(){return this._def.shape()}strict(e){return tn.errToObj,new ee({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,i,s,a;let o=null!==(s=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,t,r).message)&&void 0!==s?s:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=tn.errToObj(e).message)&&void 0!==a?a:o}:{message:o}}}:{}})}strip(){return new ee({...this._def,unknownKeys:"strip"})}passthrough(){return new ee({...this._def,unknownKeys:"passthrough"})}extend(e){return new ee({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ee({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ta.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ee({...this._def,catchall:e})}pick(e){let t={};return tt.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new ee({...this._def,shape:()=>t})}omit(e){let t={};return tt.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new ee({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ee){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=ey.create(e(i))}return new ee({...t._def,shape:()=>r})}return t instanceof X?new X({...t._def,type:e(t.element)}):t instanceof ey?ey.create(e(t.unwrap())):t instanceof eb?eb.create(e(t.unwrap())):t instanceof es?es.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return tt.objectKeys(this.shape).forEach(r=>{let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}),new ee({...this._def,shape:()=>t})}required(e){let t={};return tt.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ey;)e=e._def.innerType;t[r]=e}}),new ee({...this._def,shape:()=>t})}keyof(){return eh(tt.objectKeys(this.shape))}}ee.create=(e,t)=>new ee({shape:()=>e,unknownKeys:"strip",catchall:J.create(),typeName:ta.ZodObject,...S(t)}),ee.strictCreate=(e,t)=>new ee({shape:()=>e,unknownKeys:"strict",catchall:J.create(),typeName:ta.ZodObject,...S(t)}),ee.lazycreate=(e,t)=>new ee({shape:e,unknownKeys:"strip",catchall:J.create(),typeName:ta.ZodObject,...S(t)});class et extends A{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new o(e.ctx.common.issues));return h(t,{code:a.invalid_union,unionErrors:r}),p});{let e;let n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new o(e));return h(t,{code:a.invalid_union,unionErrors:i}),p}}get options(){return this._def.options}}et.create=(e,t)=>new et({options:e,typeName:ta.ZodUnion,...S(t)});let er=e=>{if(e instanceof el)return er(e.schema);if(e instanceof eg)return er(e.innerType());if(e instanceof ed)return[e.value];if(e instanceof ef)return e.options;if(e instanceof ep)return tt.objectValues(e.enum);if(e instanceof ev)return er(e._def.innerType);if(e instanceof V)return[void 0];else if(e instanceof K)return[null];else if(e instanceof ey)return[void 0,...er(e.unwrap())];else if(e instanceof eb)return[null,...er(e.unwrap())];else if(e instanceof ek)return er(e.unwrap());else if(e instanceof eS)return er(e.unwrap());else if(e instanceof ew)return er(e._def.innerType);else return[]};class en extends A{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.object)return h(t,{code:a.invalid_type,expected:i.object,received:t.parsedType}),p;let r=this.discriminator,n=t.data[r],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=er(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new en({typeName:ta.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...S(r)})}}class ei extends A{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(y(e)||y(n))return p;let o=function e(t,r){let n=s(t),a=s(r);if(t===r)return{valid:!0,data:t};if(n===i.object&&a===i.object){let n=tt.objectKeys(r),i=tt.objectKeys(t).filter(e=>-1!==n.indexOf(e)),s={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};s[n]=i.data}return{valid:!0,data:s}}if(n===i.array&&a===i.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let s=e(t[i],r[i]);if(!s.valid)return{valid:!1};n.push(s.data)}return{valid:!0,data:n}}return n===i.date&&a===i.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}(e.value,n.value);return o.valid?((b(e)||b(n))&&t.dirty(),{status:t.value,value:o.data}):(h(r,{code:a.invalid_intersection_types}),p)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ei.create=(e,t,r)=>new ei({left:e,right:t,typeName:ta.ZodIntersection,...S(r)});class es extends A{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.array)return h(r,{code:a.invalid_type,expected:i.array,received:r.parsedType}),p;if(r.data.length<this._def.items.length)return h(r,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&r.data.length>this._def.items.length&&(h(r,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new k(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>f.mergeArray(t,e)):f.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new es({...this._def,rest:e})}}es.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new es({items:e,typeName:ta.ZodTuple,rest:null,...S(t)})};class ea extends A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.object)return h(r,{code:a.invalid_type,expected:i.object,received:r.parsedType}),p;let n=[],s=this._def.keyType,o=this._def.valueType;for(let e in r.data)n.push({key:s._parse(new k(r,e,r.path,e)),value:o._parse(new k(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?f.mergeObjectAsync(t,n):f.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new ea(t instanceof A?{keyType:e,valueType:t,typeName:ta.ZodRecord,...S(r)}:{keyType:j.create(),valueType:e,typeName:ta.ZodRecord,...S(t)})}}class eo extends A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.map)return h(r,{code:a.invalid_type,expected:i.map,received:r.parsedType}),p;let n=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([e,t],i)=>({key:n._parse(new k(r,e,r.path,[i,"key"])),value:s._parse(new k(r,t,r.path,[i,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of o){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return p;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of o){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return p;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}eo.create=(e,t,r)=>new eo({valueType:t,keyType:e,typeName:ta.ZodMap,...S(r)});class eu extends A{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.set)return h(r,{code:a.invalid_type,expected:i.set,received:r.parsedType}),p;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(h(r,{code:a.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(h(r,{code:a.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function o(e){let r=new Set;for(let n of e){if("aborted"===n.status)return p;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let u=[...r.data.values()].map((e,t)=>s._parse(new k(r,e,r.path,t)));return r.common.async?Promise.all(u).then(e=>o(e)):o(u)}min(e,t){return new eu({...this._def,minSize:{value:e,message:tn.toString(t)}})}max(e,t){return new eu({...this._def,maxSize:{value:e,message:tn.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eu.create=(e,t)=>new eu({valueType:e,minSize:null,maxSize:null,typeName:ta.ZodSet,...S(t)});class ec extends A{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.function)return h(t,{code:a.invalid_type,expected:i.function,received:t.parsedType}),p;function r(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),u].filter(e=>!!e),issueData:{code:a.invalid_arguments,argumentsError:r}})}function n(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),u].filter(e=>!!e),issueData:{code:a.invalid_return_type,returnTypeError:r}})}let s={errorMap:t.common.contextualErrorMap},c=t.data;if(this._def.returns instanceof em){let e=this;return g(async function(...t){let i=new o([]),a=await e._def.args.parseAsync(t,s).catch(e=>{throw i.addIssue(r(t,e)),i}),u=await Reflect.apply(c,this,a);return await e._def.returns._def.type.parseAsync(u,s).catch(e=>{throw i.addIssue(n(u,e)),i})})}{let e=this;return g(function(...t){let i=e._def.args.safeParse(t,s);if(!i.success)throw new o([r(t,i.error)]);let a=Reflect.apply(c,this,i.data),u=e._def.returns.safeParse(a,s);if(!u.success)throw new o([n(a,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ec({...this._def,args:es.create(e).rest(Y.create())})}returns(e){return new ec({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ec({args:e||es.create([]).rest(Y.create()),returns:t||Y.create(),typeName:ta.ZodFunction,...S(r)})}}class el extends A{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}el.create=(e,t)=>new el({getter:e,typeName:ta.ZodLazy,...S(t)});class ed extends A{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:a.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eh(e,t){return new ef({values:e,typeName:ta.ZodEnum,...S(t)})}ed.create=(e,t)=>new ed({value:e,typeName:ta.ZodLiteral,...S(t)});class ef extends A{constructor(){super(...arguments),ti.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{expected:tt.joinValues(r),received:t.parsedType,code:a.invalid_type}),p}if(_(this,ti,"f")||E(this,ti,new Set(this._def.values),"f"),!_(this,ti,"f").has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{received:t.data,code:a.invalid_enum_value,options:r}),p}return g(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ef.create(e,{...this._def,...t})}exclude(e,t=this._def){return ef.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ti=new WeakMap,ef.create=eh;class ep extends A{constructor(){super(...arguments),ts.set(this,void 0)}_parse(e){let t=tt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==i.string&&r.parsedType!==i.number){let e=tt.objectValues(t);return h(r,{expected:tt.joinValues(e),received:r.parsedType,code:a.invalid_type}),p}if(_(this,ts,"f")||E(this,ts,new Set(tt.getValidEnumValues(this._def.values)),"f"),!_(this,ts,"f").has(e.data)){let e=tt.objectValues(t);return h(r,{received:r.data,code:a.invalid_enum_value,options:e}),p}return g(e.data)}get enum(){return this._def.values}}ts=new WeakMap,ep.create=(e,t)=>new ep({values:e,typeName:ta.ZodNativeEnum,...S(t)});class em extends A{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==i.promise&&!1===t.common.async?(h(t,{code:a.invalid_type,expected:i.promise,received:t.parsedType}),p):g((t.parsedType===i.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}em.create=(e,t)=>new em({type:e,typeName:ta.ZodPromise,...S(t)});class eg extends A{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ta.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{h(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return p;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?p:"dirty"===n.status||"dirty"===t.value?m(n.value):n});{if("aborted"===t.value)return p;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?p:"dirty"===n.status||"dirty"===t.value?m(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?p:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?p:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type){if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>v(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!v(e))return e;let s=n.transform(e.value,i);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}}tt.assertNever(n)}}eg.create=(e,t,r)=>new eg({schema:e,typeName:ta.ZodEffects,effect:t,...S(r)}),eg.createWithPreprocess=(e,t,r)=>new eg({schema:t,effect:{type:"preprocess",transform:e},typeName:ta.ZodEffects,...S(r)});class ey extends A{_parse(e){return this._getType(e)===i.undefined?g(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ey.create=(e,t)=>new ey({innerType:e,typeName:ta.ZodOptional,...S(t)});class eb extends A{_parse(e){return this._getType(e)===i.null?g(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eb.create=(e,t)=>new eb({innerType:e,typeName:ta.ZodNullable,...S(t)});class ev extends A{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===i.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:ta.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...S(t)});class ew extends A{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return w(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new o(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ew.create=(e,t)=>new ew({innerType:e,typeName:ta.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...S(t)});class e_ extends A{_parse(e){if(this._getType(e)!==i.nan){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.nan,received:t.parsedType}),p}return{status:"valid",value:e.data}}}e_.create=e=>new e_({typeName:ta.ZodNaN,...S(e)});let eE=Symbol("zod_brand");class ek extends A{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ex extends A{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new ex({in:e,out:t,typeName:ta.ZodPipeline})}}class eS extends A{_parse(e){let t=this._def.innerType._parse(e),r=e=>(v(e)&&(e.value=Object.freeze(e.value)),e);return w(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eA(e,t={},r){return e?Z.create().superRefine((n,i)=>{var s,a;if(!e(n)){let e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null===(a=null!==(s=e.fatal)&&void 0!==s?s:r)||void 0===a||a;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:o})}}):Z.create()}eS.create=(e,t)=>new eS({innerType:e,typeName:ta.ZodReadonly,...S(t)});let eC={object:ee.lazycreate};(te=ta||(ta={})).ZodString="ZodString",te.ZodNumber="ZodNumber",te.ZodNaN="ZodNaN",te.ZodBigInt="ZodBigInt",te.ZodBoolean="ZodBoolean",te.ZodDate="ZodDate",te.ZodSymbol="ZodSymbol",te.ZodUndefined="ZodUndefined",te.ZodNull="ZodNull",te.ZodAny="ZodAny",te.ZodUnknown="ZodUnknown",te.ZodNever="ZodNever",te.ZodVoid="ZodVoid",te.ZodArray="ZodArray",te.ZodObject="ZodObject",te.ZodUnion="ZodUnion",te.ZodDiscriminatedUnion="ZodDiscriminatedUnion",te.ZodIntersection="ZodIntersection",te.ZodTuple="ZodTuple",te.ZodRecord="ZodRecord",te.ZodMap="ZodMap",te.ZodSet="ZodSet",te.ZodFunction="ZodFunction",te.ZodLazy="ZodLazy",te.ZodLiteral="ZodLiteral",te.ZodEnum="ZodEnum",te.ZodEffects="ZodEffects",te.ZodNativeEnum="ZodNativeEnum",te.ZodOptional="ZodOptional",te.ZodNullable="ZodNullable",te.ZodDefault="ZodDefault",te.ZodCatch="ZodCatch",te.ZodPromise="ZodPromise",te.ZodBranded="ZodBranded",te.ZodPipeline="ZodPipeline",te.ZodReadonly="ZodReadonly";let eI=j.create,eR=F.create,eP=e_.create,eN=H.create,eM=$.create,eT=W.create,eO=G.create,eD=V.create,eL=K.create,eB=Z.create,eq=Y.create,ez=J.create,eU=Q.create,ej=X.create,eF=ee.create,eH=ee.strictCreate,e$=et.create,eW=en.create,eG=ei.create,eV=es.create,eK=ea.create,eZ=eo.create,eY=eu.create,eJ=ec.create,eQ=el.create,eX=ed.create,e0=ef.create,e1=ep.create,e2=em.create,e3=eg.create,e5=ey.create,e6=eb.create,e4=eg.createWithPreprocess,e8=ex.create;var e9,e7,te,tt,tr,tn,ti,ts,ta,to=Object.freeze({__proto__:null,defaultErrorMap:u,setErrorMap:function(e){c=e},getErrorMap:l,makeIssue:d,EMPTY_PATH:[],addIssueToContext:h,ParseStatus:f,INVALID:p,DIRTY:m,OK:g,isAborted:y,isDirty:b,isValid:v,isAsync:w,get util(){return tt},get objectUtil(){return tr},ZodParsedType:i,getParsedType:s,ZodType:A,datetimeRegex:U,ZodString:j,ZodNumber:F,ZodBigInt:H,ZodBoolean:$,ZodDate:W,ZodSymbol:G,ZodUndefined:V,ZodNull:K,ZodAny:Z,ZodUnknown:Y,ZodNever:J,ZodVoid:Q,ZodArray:X,ZodObject:ee,ZodUnion:et,ZodDiscriminatedUnion:en,ZodIntersection:ei,ZodTuple:es,ZodRecord:ea,ZodMap:eo,ZodSet:eu,ZodFunction:ec,ZodLazy:el,ZodLiteral:ed,ZodEnum:ef,ZodNativeEnum:ep,ZodPromise:em,ZodEffects:eg,ZodTransformer:eg,ZodOptional:ey,ZodNullable:eb,ZodDefault:ev,ZodCatch:ew,ZodNaN:e_,BRAND:eE,ZodBranded:ek,ZodPipeline:ex,ZodReadonly:eS,custom:eA,Schema:A,ZodSchema:A,late:eC,get ZodFirstPartyTypeKind(){return ta},coerce:{string:e=>j.create({...e,coerce:!0}),number:e=>F.create({...e,coerce:!0}),boolean:e=>$.create({...e,coerce:!0}),bigint:e=>H.create({...e,coerce:!0}),date:e=>W.create({...e,coerce:!0})},any:eB,array:ej,bigint:eN,boolean:eM,date:eT,discriminatedUnion:eW,effect:e3,enum:e0,function:eJ,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eA(t=>t instanceof e,t),intersection:eG,lazy:eQ,literal:eX,map:eZ,nan:eP,nativeEnum:e1,never:ez,null:eL,nullable:e6,number:eR,object:eF,oboolean:()=>eM().optional(),onumber:()=>eR().optional(),optional:e5,ostring:()=>eI().optional(),pipeline:e8,preprocess:e4,promise:e2,record:eK,set:eY,strictObject:eH,string:eI,symbol:eO,transformer:e3,tuple:eV,undefined:eD,union:e$,unknown:eq,void:eU,NEVER:p,ZodIssueCode:a,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:o})},35018:function(e){"use strict";e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2014-06-30","endpointPrefix":"cognito-identity","jsonVersion":"1.1","protocol":"json","protocols":["json"],"serviceFullName":"Amazon Cognito Identity","serviceId":"Cognito Identity","signatureVersion":"v4","targetPrefix":"AWSCognitoIdentityService","uid":"cognito-identity-2014-06-30","auth":["aws.auth#sigv4"]},"operations":{"CreateIdentityPool":{"input":{"type":"structure","required":["IdentityPoolName","AllowUnauthenticatedIdentities"],"members":{"IdentityPoolName":{},"AllowUnauthenticatedIdentities":{"type":"boolean"},"AllowClassicFlow":{"type":"boolean"},"SupportedLoginProviders":{"shape":"S5"},"DeveloperProviderName":{},"OpenIdConnectProviderARNs":{"shape":"S9"},"CognitoIdentityProviders":{"shape":"Sb"},"SamlProviderARNs":{"shape":"Sg"},"IdentityPoolTags":{"shape":"Sh"}}},"output":{"shape":"Sk"}},"DeleteIdentities":{"input":{"type":"structure","required":["IdentityIdsToDelete"],"members":{"IdentityIdsToDelete":{"type":"list","member":{}}}},"output":{"type":"structure","members":{"UnprocessedIdentityIds":{"type":"list","member":{"type":"structure","members":{"IdentityId":{},"ErrorCode":{}}}}}}},"DeleteIdentityPool":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}}},"DescribeIdentity":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{}}},"output":{"shape":"Sv"}},"DescribeIdentityPool":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}},"output":{"shape":"Sk"}},"GetCredentialsForIdentity":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{},"Logins":{"shape":"S10"},"CustomRoleArn":{}}},"output":{"type":"structure","members":{"IdentityId":{},"Credentials":{"type":"structure","members":{"AccessKeyId":{},"SecretKey":{},"SessionToken":{},"Expiration":{"type":"timestamp"}}}}},"authtype":"none","auth":["smithy.api#noAuth"]},"GetId":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"AccountId":{},"IdentityPoolId":{},"Logins":{"shape":"S10"}}},"output":{"type":"structure","members":{"IdentityId":{}}},"authtype":"none","auth":["smithy.api#noAuth"]},"GetIdentityPoolRoles":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"Roles":{"shape":"S1c"},"RoleMappings":{"shape":"S1e"}}}},"GetOpenIdToken":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{},"Logins":{"shape":"S10"}}},"output":{"type":"structure","members":{"IdentityId":{},"Token":{}}},"authtype":"none","auth":["smithy.api#noAuth"]},"GetOpenIdTokenForDeveloperIdentity":{"input":{"type":"structure","required":["IdentityPoolId","Logins"],"members":{"IdentityPoolId":{},"IdentityId":{},"Logins":{"shape":"S10"},"PrincipalTags":{"shape":"S1s"},"TokenDuration":{"type":"long"}}},"output":{"type":"structure","members":{"IdentityId":{},"Token":{}}}},"GetPrincipalTagAttributeMap":{"input":{"type":"structure","required":["IdentityPoolId","IdentityProviderName"],"members":{"IdentityPoolId":{},"IdentityProviderName":{}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"IdentityProviderName":{},"UseDefaults":{"type":"boolean"},"PrincipalTags":{"shape":"S1s"}}}},"ListIdentities":{"input":{"type":"structure","required":["IdentityPoolId","MaxResults"],"members":{"IdentityPoolId":{},"MaxResults":{"type":"integer"},"NextToken":{},"HideDisabled":{"type":"boolean"}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"Identities":{"type":"list","member":{"shape":"Sv"}},"NextToken":{}}}},"ListIdentityPools":{"input":{"type":"structure","required":["MaxResults"],"members":{"MaxResults":{"type":"integer"},"NextToken":{}}},"output":{"type":"structure","members":{"IdentityPools":{"type":"list","member":{"type":"structure","members":{"IdentityPoolId":{},"IdentityPoolName":{}}}},"NextToken":{}}}},"ListTagsForResource":{"input":{"type":"structure","required":["ResourceArn"],"members":{"ResourceArn":{}}},"output":{"type":"structure","members":{"Tags":{"shape":"Sh"}}}},"LookupDeveloperIdentity":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{},"IdentityId":{},"DeveloperUserIdentifier":{},"MaxResults":{"type":"integer"},"NextToken":{}}},"output":{"type":"structure","members":{"IdentityId":{},"DeveloperUserIdentifierList":{"type":"list","member":{}},"NextToken":{}}}},"MergeDeveloperIdentities":{"input":{"type":"structure","required":["SourceUserIdentifier","DestinationUserIdentifier","DeveloperProviderName","IdentityPoolId"],"members":{"SourceUserIdentifier":{},"DestinationUserIdentifier":{},"DeveloperProviderName":{},"IdentityPoolId":{}}},"output":{"type":"structure","members":{"IdentityId":{}}}},"SetIdentityPoolRoles":{"input":{"type":"structure","required":["IdentityPoolId","Roles"],"members":{"IdentityPoolId":{},"Roles":{"shape":"S1c"},"RoleMappings":{"shape":"S1e"}}}},"SetPrincipalTagAttributeMap":{"input":{"type":"structure","required":["IdentityPoolId","IdentityProviderName"],"members":{"IdentityPoolId":{},"IdentityProviderName":{},"UseDefaults":{"type":"boolean"},"PrincipalTags":{"shape":"S1s"}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"IdentityProviderName":{},"UseDefaults":{"type":"boolean"},"PrincipalTags":{"shape":"S1s"}}}},"TagResource":{"input":{"type":"structure","required":["ResourceArn","Tags"],"members":{"ResourceArn":{},"Tags":{"shape":"Sh"}}},"output":{"type":"structure","members":{}}},"UnlinkDeveloperIdentity":{"input":{"type":"structure","required":["IdentityId","IdentityPoolId","DeveloperProviderName","DeveloperUserIdentifier"],"members":{"IdentityId":{},"IdentityPoolId":{},"DeveloperProviderName":{},"DeveloperUserIdentifier":{}}}},"UnlinkIdentity":{"input":{"type":"structure","required":["IdentityId","Logins","LoginsToRemove"],"members":{"IdentityId":{},"Logins":{"shape":"S10"},"LoginsToRemove":{"shape":"Sw"}}},"authtype":"none","auth":["smithy.api#noAuth"]},"UntagResource":{"input":{"type":"structure","required":["ResourceArn","TagKeys"],"members":{"ResourceArn":{},"TagKeys":{"type":"list","member":{}}}},"output":{"type":"structure","members":{}}},"UpdateIdentityPool":{"input":{"shape":"Sk"},"output":{"shape":"Sk"}}},"shapes":{"S5":{"type":"map","key":{},"value":{}},"S9":{"type":"list","member":{}},"Sb":{"type":"list","member":{"type":"structure","members":{"ProviderName":{},"ClientId":{},"ServerSideTokenCheck":{"type":"boolean"}}}},"Sg":{"type":"list","member":{}},"Sh":{"type":"map","key":{},"value":{}},"Sk":{"type":"structure","required":["IdentityPoolId","IdentityPoolName","AllowUnauthenticatedIdentities"],"members":{"IdentityPoolId":{},"IdentityPoolName":{},"AllowUnauthenticatedIdentities":{"type":"boolean"},"AllowClassicFlow":{"type":"boolean"},"SupportedLoginProviders":{"shape":"S5"},"DeveloperProviderName":{},"OpenIdConnectProviderARNs":{"shape":"S9"},"CognitoIdentityProviders":{"shape":"Sb"},"SamlProviderARNs":{"shape":"Sg"},"IdentityPoolTags":{"shape":"Sh"}}},"Sv":{"type":"structure","members":{"IdentityId":{},"Logins":{"shape":"Sw"},"CreationDate":{"type":"timestamp"},"LastModifiedDate":{"type":"timestamp"}}},"Sw":{"type":"list","member":{}},"S10":{"type":"map","key":{},"value":{}},"S1c":{"type":"map","key":{},"value":{}},"S1e":{"type":"map","key":{},"value":{"type":"structure","required":["Type"],"members":{"Type":{},"AmbiguousRoleResolution":{},"RulesConfiguration":{"type":"structure","required":["Rules"],"members":{"Rules":{"type":"list","member":{"type":"structure","required":["Claim","MatchType","Value","RoleARN"],"members":{"Claim":{},"MatchType":{},"Value":{},"RoleARN":{}}}}}}}}},"S1s":{"type":"map","key":{},"value":{}}}}')},74238:function(e){"use strict";e.exports=JSON.parse('{"o":{"ListIdentityPools":{"input_token":"NextToken","limit_key":"MaxResults","output_token":"NextToken","result_key":"IdentityPools"}}}')},48150:function(e){"use strict";e.exports=JSON.parse('{"acm":{"name":"ACM","cors":true},"apigateway":{"name":"APIGateway","cors":true},"applicationautoscaling":{"prefix":"application-autoscaling","name":"ApplicationAutoScaling","cors":true},"appstream":{"name":"AppStream"},"autoscaling":{"name":"AutoScaling","cors":true},"batch":{"name":"Batch"},"budgets":{"name":"Budgets"},"clouddirectory":{"name":"CloudDirectory","versions":["2016-05-10*"]},"cloudformation":{"name":"CloudFormation","cors":true},"cloudfront":{"name":"CloudFront","versions":["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*","2016-09-07*","2016-09-29*","2016-11-25*","2017-03-25*","2017-10-30*","2018-06-18*","2018-11-05*","2019-03-26*"],"cors":true},"cloudhsm":{"name":"CloudHSM","cors":true},"cloudsearch":{"name":"CloudSearch"},"cloudsearchdomain":{"name":"CloudSearchDomain"},"cloudtrail":{"name":"CloudTrail","cors":true},"cloudwatch":{"prefix":"monitoring","name":"CloudWatch","cors":true},"cloudwatchevents":{"prefix":"events","name":"CloudWatchEvents","versions":["2014-02-03*"],"cors":true},"cloudwatchlogs":{"prefix":"logs","name":"CloudWatchLogs","cors":true},"codebuild":{"name":"CodeBuild","cors":true},"codecommit":{"name":"CodeCommit","cors":true},"codedeploy":{"name":"CodeDeploy","cors":true},"codepipeline":{"name":"CodePipeline","cors":true},"cognitoidentity":{"prefix":"cognito-identity","name":"CognitoIdentity","cors":true},"cognitoidentityserviceprovider":{"prefix":"cognito-idp","name":"CognitoIdentityServiceProvider","cors":true},"cognitosync":{"prefix":"cognito-sync","name":"CognitoSync","cors":true},"configservice":{"prefix":"config","name":"ConfigService","cors":true},"cur":{"name":"CUR","cors":true},"datapipeline":{"name":"DataPipeline"},"devicefarm":{"name":"DeviceFarm","cors":true},"directconnect":{"name":"DirectConnect","cors":true},"directoryservice":{"prefix":"ds","name":"DirectoryService"},"discovery":{"name":"Discovery"},"dms":{"name":"DMS"},"dynamodb":{"name":"DynamoDB","cors":true},"dynamodbstreams":{"prefix":"streams.dynamodb","name":"DynamoDBStreams","cors":true},"ec2":{"name":"EC2","versions":["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*","2016-04-01*","2016-09-15*"],"cors":true},"ecr":{"name":"ECR","cors":true},"ecs":{"name":"ECS","cors":true},"efs":{"prefix":"elasticfilesystem","name":"EFS","cors":true},"elasticache":{"name":"ElastiCache","versions":["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],"cors":true},"elasticbeanstalk":{"name":"ElasticBeanstalk","cors":true},"elb":{"prefix":"elasticloadbalancing","name":"ELB","cors":true},"elbv2":{"prefix":"elasticloadbalancingv2","name":"ELBv2","cors":true},"emr":{"prefix":"elasticmapreduce","name":"EMR","cors":true},"es":{"name":"ES"},"elastictranscoder":{"name":"ElasticTranscoder","cors":true},"firehose":{"name":"Firehose","cors":true},"gamelift":{"name":"GameLift","cors":true},"glacier":{"name":"Glacier"},"health":{"name":"Health"},"iam":{"name":"IAM","cors":true},"importexport":{"name":"ImportExport"},"inspector":{"name":"Inspector","versions":["2015-08-18*"],"cors":true},"iot":{"name":"Iot","cors":true},"iotdata":{"prefix":"iot-data","name":"IotData","cors":true},"kinesis":{"name":"Kinesis","cors":true},"kinesisanalytics":{"name":"KinesisAnalytics"},"kms":{"name":"KMS","cors":true},"lambda":{"name":"Lambda","cors":true},"lexruntime":{"prefix":"runtime.lex","name":"LexRuntime","cors":true},"lightsail":{"name":"Lightsail"},"machinelearning":{"name":"MachineLearning","cors":true},"marketplacecommerceanalytics":{"name":"MarketplaceCommerceAnalytics","cors":true},"marketplacemetering":{"prefix":"meteringmarketplace","name":"MarketplaceMetering"},"mturk":{"prefix":"mturk-requester","name":"MTurk","cors":true},"mobileanalytics":{"name":"MobileAnalytics","cors":true},"opsworks":{"name":"OpsWorks","cors":true},"opsworkscm":{"name":"OpsWorksCM"},"organizations":{"name":"Organizations"},"pinpoint":{"name":"Pinpoint"},"polly":{"name":"Polly","cors":true},"rds":{"name":"RDS","versions":["2014-09-01*"],"cors":true},"redshift":{"name":"Redshift","cors":true},"rekognition":{"name":"Rekognition","cors":true},"resourcegroupstaggingapi":{"name":"ResourceGroupsTaggingAPI"},"route53":{"name":"Route53","cors":true},"route53domains":{"name":"Route53Domains","cors":true},"s3":{"name":"S3","dualstackAvailable":true,"cors":true},"s3control":{"name":"S3Control","dualstackAvailable":true,"xmlNoDefaultLists":true},"servicecatalog":{"name":"ServiceCatalog","cors":true},"ses":{"prefix":"email","name":"SES","cors":true},"shield":{"name":"Shield"},"simpledb":{"prefix":"sdb","name":"SimpleDB"},"sms":{"name":"SMS"},"snowball":{"name":"Snowball"},"sns":{"name":"SNS","cors":true},"sqs":{"name":"SQS","cors":true},"ssm":{"name":"SSM","cors":true},"storagegateway":{"name":"StorageGateway","cors":true},"stepfunctions":{"prefix":"states","name":"StepFunctions"},"sts":{"name":"STS","cors":true},"support":{"name":"Support"},"swf":{"name":"SWF"},"xray":{"name":"XRay","cors":true},"waf":{"name":"WAF","cors":true},"wafregional":{"prefix":"waf-regional","name":"WAFRegional"},"workdocs":{"name":"WorkDocs","cors":true},"workspaces":{"name":"WorkSpaces"},"lexmodelbuildingservice":{"prefix":"lex-models","name":"LexModelBuildingService","cors":true},"marketplaceentitlementservice":{"prefix":"entitlement.marketplace","name":"MarketplaceEntitlementService"},"athena":{"name":"Athena","cors":true},"greengrass":{"name":"Greengrass"},"dax":{"name":"DAX"},"migrationhub":{"prefix":"AWSMigrationHub","name":"MigrationHub"},"cloudhsmv2":{"name":"CloudHSMV2","cors":true},"glue":{"name":"Glue"},"pricing":{"name":"Pricing","cors":true},"costexplorer":{"prefix":"ce","name":"CostExplorer","cors":true},"mediaconvert":{"name":"MediaConvert"},"medialive":{"name":"MediaLive"},"mediapackage":{"name":"MediaPackage"},"mediastore":{"name":"MediaStore"},"mediastoredata":{"prefix":"mediastore-data","name":"MediaStoreData","cors":true},"appsync":{"name":"AppSync"},"guardduty":{"name":"GuardDuty"},"mq":{"name":"MQ"},"comprehend":{"name":"Comprehend","cors":true},"iotjobsdataplane":{"prefix":"iot-jobs-data","name":"IoTJobsDataPlane"},"kinesisvideoarchivedmedia":{"prefix":"kinesis-video-archived-media","name":"KinesisVideoArchivedMedia","cors":true},"kinesisvideomedia":{"prefix":"kinesis-video-media","name":"KinesisVideoMedia","cors":true},"kinesisvideo":{"name":"KinesisVideo","cors":true},"sagemakerruntime":{"prefix":"runtime.sagemaker","name":"SageMakerRuntime"},"sagemaker":{"name":"SageMaker"},"translate":{"name":"Translate","cors":true},"resourcegroups":{"prefix":"resource-groups","name":"ResourceGroups","cors":true},"cloud9":{"name":"Cloud9"},"serverlessapplicationrepository":{"prefix":"serverlessrepo","name":"ServerlessApplicationRepository"},"servicediscovery":{"name":"ServiceDiscovery"},"workmail":{"name":"WorkMail"},"autoscalingplans":{"prefix":"autoscaling-plans","name":"AutoScalingPlans"},"transcribeservice":{"prefix":"transcribe","name":"TranscribeService"},"connect":{"name":"Connect","cors":true},"acmpca":{"prefix":"acm-pca","name":"ACMPCA"},"fms":{"name":"FMS"},"secretsmanager":{"name":"SecretsManager","cors":true},"iotanalytics":{"name":"IoTAnalytics","cors":true},"iot1clickdevicesservice":{"prefix":"iot1click-devices","name":"IoT1ClickDevicesService"},"iot1clickprojects":{"prefix":"iot1click-projects","name":"IoT1ClickProjects"},"pi":{"name":"PI"},"neptune":{"name":"Neptune"},"mediatailor":{"name":"MediaTailor"},"eks":{"name":"EKS"},"dlm":{"name":"DLM"},"signer":{"name":"Signer"},"chime":{"name":"Chime"},"pinpointemail":{"prefix":"pinpoint-email","name":"PinpointEmail"},"ram":{"name":"RAM"},"route53resolver":{"name":"Route53Resolver"},"pinpointsmsvoice":{"prefix":"sms-voice","name":"PinpointSMSVoice"},"quicksight":{"name":"QuickSight"},"rdsdataservice":{"prefix":"rds-data","name":"RDSDataService"},"amplify":{"name":"Amplify"},"datasync":{"name":"DataSync"},"robomaker":{"name":"RoboMaker"},"transfer":{"name":"Transfer"},"globalaccelerator":{"name":"GlobalAccelerator"},"comprehendmedical":{"name":"ComprehendMedical","cors":true},"kinesisanalyticsv2":{"name":"KinesisAnalyticsV2"},"mediaconnect":{"name":"MediaConnect"},"fsx":{"name":"FSx"},"securityhub":{"name":"SecurityHub"},"appmesh":{"name":"AppMesh","versions":["2018-10-01*"]},"licensemanager":{"prefix":"license-manager","name":"LicenseManager"},"kafka":{"name":"Kafka"},"apigatewaymanagementapi":{"name":"ApiGatewayManagementApi"},"apigatewayv2":{"name":"ApiGatewayV2"},"docdb":{"name":"DocDB"},"backup":{"name":"Backup"},"worklink":{"name":"WorkLink"},"textract":{"name":"Textract"},"managedblockchain":{"name":"ManagedBlockchain"},"mediapackagevod":{"prefix":"mediapackage-vod","name":"MediaPackageVod"},"groundstation":{"name":"GroundStation"},"iotthingsgraph":{"name":"IoTThingsGraph"},"iotevents":{"name":"IoTEvents"},"ioteventsdata":{"prefix":"iotevents-data","name":"IoTEventsData"},"personalize":{"name":"Personalize","cors":true},"personalizeevents":{"prefix":"personalize-events","name":"PersonalizeEvents","cors":true},"personalizeruntime":{"prefix":"personalize-runtime","name":"PersonalizeRuntime","cors":true},"applicationinsights":{"prefix":"application-insights","name":"ApplicationInsights"},"servicequotas":{"prefix":"service-quotas","name":"ServiceQuotas"},"ec2instanceconnect":{"prefix":"ec2-instance-connect","name":"EC2InstanceConnect"},"eventbridge":{"name":"EventBridge"},"lakeformation":{"name":"LakeFormation"},"forecastservice":{"prefix":"forecast","name":"ForecastService","cors":true},"forecastqueryservice":{"prefix":"forecastquery","name":"ForecastQueryService","cors":true},"qldb":{"name":"QLDB"},"qldbsession":{"prefix":"qldb-session","name":"QLDBSession"},"workmailmessageflow":{"name":"WorkMailMessageFlow"},"codestarnotifications":{"prefix":"codestar-notifications","name":"CodeStarNotifications"},"savingsplans":{"name":"SavingsPlans"},"sso":{"name":"SSO"},"ssooidc":{"prefix":"sso-oidc","name":"SSOOIDC"},"marketplacecatalog":{"prefix":"marketplace-catalog","name":"MarketplaceCatalog","cors":true},"dataexchange":{"name":"DataExchange"},"sesv2":{"name":"SESV2"},"migrationhubconfig":{"prefix":"migrationhub-config","name":"MigrationHubConfig"},"connectparticipant":{"name":"ConnectParticipant"},"appconfig":{"name":"AppConfig"},"iotsecuretunneling":{"name":"IoTSecureTunneling"},"wafv2":{"name":"WAFV2"},"elasticinference":{"prefix":"elastic-inference","name":"ElasticInference"},"imagebuilder":{"name":"Imagebuilder"},"schemas":{"name":"Schemas"},"accessanalyzer":{"name":"AccessAnalyzer"},"codegurureviewer":{"prefix":"codeguru-reviewer","name":"CodeGuruReviewer"},"codeguruprofiler":{"name":"CodeGuruProfiler"},"computeoptimizer":{"prefix":"compute-optimizer","name":"ComputeOptimizer"},"frauddetector":{"name":"FraudDetector"},"kendra":{"name":"Kendra"},"networkmanager":{"name":"NetworkManager"},"outposts":{"name":"Outposts"},"augmentedairuntime":{"prefix":"sagemaker-a2i-runtime","name":"AugmentedAIRuntime"},"ebs":{"name":"EBS"},"kinesisvideosignalingchannels":{"prefix":"kinesis-video-signaling","name":"KinesisVideoSignalingChannels","cors":true},"detective":{"name":"Detective"},"codestarconnections":{"prefix":"codestar-connections","name":"CodeStarconnections"},"synthetics":{"name":"Synthetics"},"iotsitewise":{"name":"IoTSiteWise"},"macie2":{"name":"Macie2"},"codeartifact":{"name":"CodeArtifact"},"ivs":{"name":"IVS"},"braket":{"name":"Braket"},"identitystore":{"name":"IdentityStore"},"appflow":{"name":"Appflow"},"redshiftdata":{"prefix":"redshift-data","name":"RedshiftData"},"ssoadmin":{"prefix":"sso-admin","name":"SSOAdmin"},"timestreamquery":{"prefix":"timestream-query","name":"TimestreamQuery"},"timestreamwrite":{"prefix":"timestream-write","name":"TimestreamWrite"},"s3outposts":{"name":"S3Outposts"},"databrew":{"name":"DataBrew"},"servicecatalogappregistry":{"prefix":"servicecatalog-appregistry","name":"ServiceCatalogAppRegistry"},"networkfirewall":{"prefix":"network-firewall","name":"NetworkFirewall"},"mwaa":{"name":"MWAA"},"amplifybackend":{"name":"AmplifyBackend"},"appintegrations":{"name":"AppIntegrations"},"connectcontactlens":{"prefix":"connect-contact-lens","name":"ConnectContactLens"},"devopsguru":{"prefix":"devops-guru","name":"DevOpsGuru"},"ecrpublic":{"prefix":"ecr-public","name":"ECRPUBLIC"},"lookoutvision":{"name":"LookoutVision"},"sagemakerfeaturestoreruntime":{"prefix":"sagemaker-featurestore-runtime","name":"SageMakerFeatureStoreRuntime"},"customerprofiles":{"prefix":"customer-profiles","name":"CustomerProfiles"},"auditmanager":{"name":"AuditManager"},"emrcontainers":{"prefix":"emr-containers","name":"EMRcontainers"},"healthlake":{"name":"HealthLake"},"sagemakeredge":{"prefix":"sagemaker-edge","name":"SagemakerEdge"},"amp":{"name":"Amp","cors":true},"greengrassv2":{"name":"GreengrassV2"},"iotdeviceadvisor":{"name":"IotDeviceAdvisor"},"iotfleethub":{"name":"IoTFleetHub"},"iotwireless":{"name":"IoTWireless"},"location":{"name":"Location","cors":true},"wellarchitected":{"name":"WellArchitected"},"lexmodelsv2":{"prefix":"models.lex.v2","name":"LexModelsV2"},"lexruntimev2":{"prefix":"runtime.lex.v2","name":"LexRuntimeV2","cors":true},"fis":{"name":"Fis"},"lookoutmetrics":{"name":"LookoutMetrics"},"mgn":{"name":"Mgn"},"lookoutequipment":{"name":"LookoutEquipment"},"nimble":{"name":"Nimble"},"finspace":{"name":"Finspace"},"finspacedata":{"prefix":"finspace-data","name":"Finspacedata"},"ssmcontacts":{"prefix":"ssm-contacts","name":"SSMContacts"},"ssmincidents":{"prefix":"ssm-incidents","name":"SSMIncidents"},"applicationcostprofiler":{"name":"ApplicationCostProfiler"},"apprunner":{"name":"AppRunner"},"proton":{"name":"Proton"},"route53recoverycluster":{"prefix":"route53-recovery-cluster","name":"Route53RecoveryCluster"},"route53recoverycontrolconfig":{"prefix":"route53-recovery-control-config","name":"Route53RecoveryControlConfig"},"route53recoveryreadiness":{"prefix":"route53-recovery-readiness","name":"Route53RecoveryReadiness"},"chimesdkidentity":{"prefix":"chime-sdk-identity","name":"ChimeSDKIdentity"},"chimesdkmessaging":{"prefix":"chime-sdk-messaging","name":"ChimeSDKMessaging"},"snowdevicemanagement":{"prefix":"snow-device-management","name":"SnowDeviceManagement"},"memorydb":{"name":"MemoryDB"},"opensearch":{"name":"OpenSearch"},"kafkaconnect":{"name":"KafkaConnect"},"voiceid":{"prefix":"voice-id","name":"VoiceID"},"wisdom":{"name":"Wisdom"},"account":{"name":"Account"},"cloudcontrol":{"name":"CloudControl"},"grafana":{"name":"Grafana"},"panorama":{"name":"Panorama"},"chimesdkmeetings":{"prefix":"chime-sdk-meetings","name":"ChimeSDKMeetings"},"resiliencehub":{"name":"Resiliencehub"},"migrationhubstrategy":{"name":"MigrationHubStrategy"},"appconfigdata":{"name":"AppConfigData"},"drs":{"name":"Drs"},"migrationhubrefactorspaces":{"prefix":"migration-hub-refactor-spaces","name":"MigrationHubRefactorSpaces"},"evidently":{"name":"Evidently"},"inspector2":{"name":"Inspector2"},"rbin":{"name":"Rbin"},"rum":{"name":"RUM"},"backupgateway":{"prefix":"backup-gateway","name":"BackupGateway"},"iottwinmaker":{"name":"IoTTwinMaker"},"workspacesweb":{"prefix":"workspaces-web","name":"WorkSpacesWeb"},"amplifyuibuilder":{"name":"AmplifyUIBuilder"},"keyspaces":{"name":"Keyspaces"},"billingconductor":{"name":"Billingconductor"},"pinpointsmsvoicev2":{"prefix":"pinpoint-sms-voice-v2","name":"PinpointSMSVoiceV2"},"ivschat":{"name":"Ivschat"},"chimesdkmediapipelines":{"prefix":"chime-sdk-media-pipelines","name":"ChimeSDKMediaPipelines"},"emrserverless":{"prefix":"emr-serverless","name":"EMRServerless"},"m2":{"name":"M2"},"connectcampaigns":{"name":"ConnectCampaigns"},"redshiftserverless":{"prefix":"redshift-serverless","name":"RedshiftServerless"},"rolesanywhere":{"name":"RolesAnywhere"},"licensemanagerusersubscriptions":{"prefix":"license-manager-user-subscriptions","name":"LicenseManagerUserSubscriptions"},"privatenetworks":{"name":"PrivateNetworks"},"supportapp":{"prefix":"support-app","name":"SupportApp"},"controltower":{"name":"ControlTower"},"iotfleetwise":{"name":"IoTFleetWise"},"migrationhuborchestrator":{"name":"MigrationHubOrchestrator"},"connectcases":{"name":"ConnectCases"},"resourceexplorer2":{"prefix":"resource-explorer-2","name":"ResourceExplorer2"},"scheduler":{"name":"Scheduler"},"chimesdkvoice":{"prefix":"chime-sdk-voice","name":"ChimeSDKVoice"},"ssmsap":{"prefix":"ssm-sap","name":"SsmSap"},"oam":{"name":"OAM"},"arczonalshift":{"prefix":"arc-zonal-shift","name":"ARCZonalShift"},"omics":{"name":"Omics"},"opensearchserverless":{"name":"OpenSearchServerless"},"securitylake":{"name":"SecurityLake"},"simspaceweaver":{"name":"SimSpaceWeaver"},"docdbelastic":{"prefix":"docdb-elastic","name":"DocDBElastic"},"sagemakergeospatial":{"prefix":"sagemaker-geospatial","name":"SageMakerGeospatial"},"codecatalyst":{"name":"CodeCatalyst"},"pipes":{"name":"Pipes"},"sagemakermetrics":{"prefix":"sagemaker-metrics","name":"SageMakerMetrics"},"kinesisvideowebrtcstorage":{"prefix":"kinesis-video-webrtc-storage","name":"KinesisVideoWebRTCStorage"},"licensemanagerlinuxsubscriptions":{"prefix":"license-manager-linux-subscriptions","name":"LicenseManagerLinuxSubscriptions"},"kendraranking":{"prefix":"kendra-ranking","name":"KendraRanking"},"cleanrooms":{"name":"CleanRooms"},"cloudtraildata":{"prefix":"cloudtrail-data","name":"CloudTrailData"},"tnb":{"name":"Tnb"},"internetmonitor":{"name":"InternetMonitor"},"ivsrealtime":{"prefix":"ivs-realtime","name":"IVSRealTime"},"vpclattice":{"prefix":"vpc-lattice","name":"VPCLattice"},"osis":{"name":"OSIS"},"mediapackagev2":{"name":"MediaPackageV2"},"paymentcryptography":{"prefix":"payment-cryptography","name":"PaymentCryptography"},"paymentcryptographydata":{"prefix":"payment-cryptography-data","name":"PaymentCryptographyData"},"codegurusecurity":{"prefix":"codeguru-security","name":"CodeGuruSecurity"},"verifiedpermissions":{"name":"VerifiedPermissions"},"appfabric":{"name":"AppFabric"},"medicalimaging":{"prefix":"medical-imaging","name":"MedicalImaging"},"entityresolution":{"name":"EntityResolution"},"managedblockchainquery":{"prefix":"managedblockchain-query","name":"ManagedBlockchainQuery"},"neptunedata":{"name":"Neptunedata"},"pcaconnectorad":{"prefix":"pca-connector-ad","name":"PcaConnectorAd"},"bedrock":{"name":"Bedrock"},"bedrockruntime":{"prefix":"bedrock-runtime","name":"BedrockRuntime"},"datazone":{"name":"DataZone"},"launchwizard":{"prefix":"launch-wizard","name":"LaunchWizard"},"trustedadvisor":{"name":"TrustedAdvisor"},"inspectorscan":{"prefix":"inspector-scan","name":"InspectorScan"},"bcmdataexports":{"prefix":"bcm-data-exports","name":"BCMDataExports"},"costoptimizationhub":{"prefix":"cost-optimization-hub","name":"CostOptimizationHub"},"eksauth":{"prefix":"eks-auth","name":"EKSAuth"},"freetier":{"name":"FreeTier"},"repostspace":{"name":"Repostspace"},"workspacesthinclient":{"prefix":"workspaces-thin-client","name":"WorkSpacesThinClient"},"b2bi":{"name":"B2bi"},"bedrockagent":{"prefix":"bedrock-agent","name":"BedrockAgent"},"bedrockagentruntime":{"prefix":"bedrock-agent-runtime","name":"BedrockAgentRuntime"},"qbusiness":{"name":"QBusiness"},"qconnect":{"name":"QConnect"},"cleanroomsml":{"name":"CleanRoomsML"},"marketplaceagreement":{"prefix":"marketplace-agreement","name":"MarketplaceAgreement"},"marketplacedeployment":{"prefix":"marketplace-deployment","name":"MarketplaceDeployment"},"networkmonitor":{"name":"NetworkMonitor"},"supplychain":{"name":"SupplyChain"},"artifact":{"name":"Artifact"},"chatbot":{"name":"Chatbot"},"timestreaminfluxdb":{"prefix":"timestream-influxdb","name":"TimestreamInfluxDB"},"codeconnections":{"name":"CodeConnections"},"deadline":{"name":"Deadline"},"controlcatalog":{"name":"ControlCatalog"},"route53profiles":{"name":"Route53Profiles"},"mailmanager":{"name":"MailManager"},"taxsettings":{"name":"TaxSettings"},"applicationsignals":{"prefix":"application-signals","name":"ApplicationSignals"},"pcaconnectorscep":{"prefix":"pca-connector-scep","name":"PcaConnectorScep"},"apptest":{"name":"AppTest"},"qapps":{"name":"QApps"},"ssmquicksetup":{"prefix":"ssm-quicksetup","name":"SSMQuickSetup"},"pcs":{"name":"PCS"}}')},55438:function(e){"use strict";e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2006-03-01","checksumFormat":"md5","endpointPrefix":"s3","globalEndpoint":"s3.amazonaws.com","protocol":"rest-xml","protocols":["rest-xml"],"serviceAbbreviation":"Amazon S3","serviceFullName":"Amazon Simple Storage Service","serviceId":"S3","signatureVersion":"s3","uid":"s3-2006-03-01","auth":["aws.auth#sigv4"]},"operations":{"AbortMultipartUpload":{"http":{"method":"DELETE","requestUri":"/{Bucket}/{Key+}","responseCode":204},"input":{"type":"structure","required":["Bucket","Key","UploadId"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"UploadId":{"location":"querystring","locationName":"uploadId"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}}},"CompleteMultipartUpload":{"http":{"requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","Key","UploadId"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"MultipartUpload":{"locationName":"CompleteMultipartUpload","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","members":{"Parts":{"locationName":"Part","type":"list","member":{"type":"structure","members":{"ETag":{},"ChecksumCRC32":{},"ChecksumCRC32C":{},"ChecksumSHA1":{},"ChecksumSHA256":{},"PartNumber":{"type":"integer"}}},"flattened":true}}},"UploadId":{"location":"querystring","locationName":"uploadId"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-checksum-sha256"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"IfNoneMatch":{"location":"header","locationName":"If-None-Match"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"}},"payload":"MultipartUpload"},"output":{"type":"structure","members":{"Location":{},"Bucket":{},"Key":{},"Expiration":{"location":"header","locationName":"x-amz-expiration"},"ETag":{},"ChecksumCRC32":{},"ChecksumCRC32C":{},"ChecksumSHA1":{},"ChecksumSHA256":{},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"VersionId":{"location":"header","locationName":"x-amz-version-id"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}}},"CopyObject":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","CopySource","Key"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"CacheControl":{"location":"header","locationName":"Cache-Control"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-checksum-algorithm"},"ContentDisposition":{"location":"header","locationName":"Content-Disposition"},"ContentEncoding":{"location":"header","locationName":"Content-Encoding"},"ContentLanguage":{"location":"header","locationName":"Content-Language"},"ContentType":{"location":"header","locationName":"Content-Type"},"CopySource":{"contextParam":{"name":"CopySource"},"location":"header","locationName":"x-amz-copy-source"},"CopySourceIfMatch":{"location":"header","locationName":"x-amz-copy-source-if-match"},"CopySourceIfModifiedSince":{"location":"header","locationName":"x-amz-copy-source-if-modified-since","type":"timestamp"},"CopySourceIfNoneMatch":{"location":"header","locationName":"x-amz-copy-source-if-none-match"},"CopySourceIfUnmodifiedSince":{"location":"header","locationName":"x-amz-copy-source-if-unmodified-since","type":"timestamp"},"Expires":{"location":"header","locationName":"Expires","type":"timestamp"},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"Metadata":{"shape":"S1c","location":"headers","locationName":"x-amz-meta-"},"MetadataDirective":{"location":"header","locationName":"x-amz-metadata-directive"},"TaggingDirective":{"location":"header","locationName":"x-amz-tagging-directive"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"StorageClass":{"location":"header","locationName":"x-amz-storage-class"},"WebsiteRedirectLocation":{"location":"header","locationName":"x-amz-website-redirect-location"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"SSEKMSEncryptionContext":{"shape":"S1j","location":"header","locationName":"x-amz-server-side-encryption-context"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"CopySourceSSECustomerAlgorithm":{"location":"header","locationName":"x-amz-copy-source-server-side-encryption-customer-algorithm"},"CopySourceSSECustomerKey":{"shape":"S1l","location":"header","locationName":"x-amz-copy-source-server-side-encryption-customer-key"},"CopySourceSSECustomerKeyMD5":{"location":"header","locationName":"x-amz-copy-source-server-side-encryption-customer-key-MD5"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"Tagging":{"location":"header","locationName":"x-amz-tagging"},"ObjectLockMode":{"location":"header","locationName":"x-amz-object-lock-mode"},"ObjectLockRetainUntilDate":{"shape":"S1p","location":"header","locationName":"x-amz-object-lock-retain-until-date"},"ObjectLockLegalHoldStatus":{"location":"header","locationName":"x-amz-object-lock-legal-hold"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ExpectedSourceBucketOwner":{"location":"header","locationName":"x-amz-source-expected-bucket-owner"}}},"output":{"type":"structure","members":{"CopyObjectResult":{"type":"structure","members":{"ETag":{},"LastModified":{"type":"timestamp"},"ChecksumCRC32":{},"ChecksumCRC32C":{},"ChecksumSHA1":{},"ChecksumSHA256":{}}},"Expiration":{"location":"header","locationName":"x-amz-expiration"},"CopySourceVersionId":{"location":"header","locationName":"x-amz-copy-source-version-id"},"VersionId":{"location":"header","locationName":"x-amz-version-id"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"SSEKMSEncryptionContext":{"shape":"S1j","location":"header","locationName":"x-amz-server-side-encryption-context"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}},"payload":"CopyObjectResult"},"alias":"PutObjectCopy","staticContextParams":{"DisableS3ExpressSessionAuth":{"value":true}}},"CreateBucket":{"http":{"method":"PUT","requestUri":"/{Bucket}"},"input":{"type":"structure","required":["Bucket"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"CreateBucketConfiguration":{"locationName":"CreateBucketConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","members":{"LocationConstraint":{},"Location":{"type":"structure","members":{"Type":{},"Name":{}}},"Bucket":{"type":"structure","members":{"DataRedundancy":{},"Type":{}}}}},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWrite":{"location":"header","locationName":"x-amz-grant-write"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"ObjectLockEnabledForBucket":{"location":"header","locationName":"x-amz-bucket-object-lock-enabled","type":"boolean"},"ObjectOwnership":{"location":"header","locationName":"x-amz-object-ownership"}},"payload":"CreateBucketConfiguration"},"output":{"type":"structure","members":{"Location":{"location":"header","locationName":"Location"}}},"alias":"PutBucket","staticContextParams":{"DisableAccessPoints":{"value":true},"UseS3ExpressControlEndpoint":{"value":true}}},"CreateMultipartUpload":{"http":{"requestUri":"/{Bucket}/{Key+}?uploads"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"CacheControl":{"location":"header","locationName":"Cache-Control"},"ContentDisposition":{"location":"header","locationName":"Content-Disposition"},"ContentEncoding":{"location":"header","locationName":"Content-Encoding"},"ContentLanguage":{"location":"header","locationName":"Content-Language"},"ContentType":{"location":"header","locationName":"Content-Type"},"Expires":{"location":"header","locationName":"Expires","type":"timestamp"},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"Metadata":{"shape":"S1c","location":"headers","locationName":"x-amz-meta-"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"StorageClass":{"location":"header","locationName":"x-amz-storage-class"},"WebsiteRedirectLocation":{"location":"header","locationName":"x-amz-website-redirect-location"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"SSEKMSEncryptionContext":{"shape":"S1j","location":"header","locationName":"x-amz-server-side-encryption-context"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"Tagging":{"location":"header","locationName":"x-amz-tagging"},"ObjectLockMode":{"location":"header","locationName":"x-amz-object-lock-mode"},"ObjectLockRetainUntilDate":{"shape":"S1p","location":"header","locationName":"x-amz-object-lock-retain-until-date"},"ObjectLockLegalHoldStatus":{"location":"header","locationName":"x-amz-object-lock-legal-hold"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-checksum-algorithm"}}},"output":{"type":"structure","members":{"AbortDate":{"location":"header","locationName":"x-amz-abort-date","type":"timestamp"},"AbortRuleId":{"location":"header","locationName":"x-amz-abort-rule-id"},"Bucket":{"locationName":"Bucket"},"Key":{},"UploadId":{},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"SSEKMSEncryptionContext":{"shape":"S1j","location":"header","locationName":"x-amz-server-side-encryption-context"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-checksum-algorithm"}}},"alias":"InitiateMultipartUpload"},"CreateSession":{"http":{"method":"GET","requestUri":"/{Bucket}?session"},"input":{"type":"structure","required":["Bucket"],"members":{"SessionMode":{"location":"header","locationName":"x-amz-create-session-mode"},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"}}},"output":{"type":"structure","required":["Credentials"],"members":{"Credentials":{"locationName":"Credentials","type":"structure","required":["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],"members":{"AccessKeyId":{"locationName":"AccessKeyId"},"SecretAccessKey":{"shape":"S2i","locationName":"SecretAccessKey"},"SessionToken":{"shape":"S2i","locationName":"SessionToken"},"Expiration":{"locationName":"Expiration","type":"timestamp"}}}}},"staticContextParams":{"DisableS3ExpressSessionAuth":{"value":true}}},"DeleteBucket":{"http":{"method":"DELETE","requestUri":"/{Bucket}","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketAnalyticsConfiguration":{"http":{"method":"DELETE","requestUri":"/{Bucket}?analytics","responseCode":204},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketCors":{"http":{"method":"DELETE","requestUri":"/{Bucket}?cors","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketEncryption":{"http":{"method":"DELETE","requestUri":"/{Bucket}?encryption","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketIntelligentTieringConfiguration":{"http":{"method":"DELETE","requestUri":"/{Bucket}?intelligent-tiering","responseCode":204},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketInventoryConfiguration":{"http":{"method":"DELETE","requestUri":"/{Bucket}?inventory","responseCode":204},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketLifecycle":{"http":{"method":"DELETE","requestUri":"/{Bucket}?lifecycle","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketMetricsConfiguration":{"http":{"method":"DELETE","requestUri":"/{Bucket}?metrics","responseCode":204},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketOwnershipControls":{"http":{"method":"DELETE","requestUri":"/{Bucket}?ownershipControls","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketPolicy":{"http":{"method":"DELETE","requestUri":"/{Bucket}?policy","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketReplication":{"http":{"method":"DELETE","requestUri":"/{Bucket}?replication","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketTagging":{"http":{"method":"DELETE","requestUri":"/{Bucket}?tagging","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteBucketWebsite":{"http":{"method":"DELETE","requestUri":"/{Bucket}?website","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"DeleteObject":{"http":{"method":"DELETE","requestUri":"/{Bucket}/{Key+}","responseCode":204},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"MFA":{"location":"header","locationName":"x-amz-mfa"},"VersionId":{"location":"querystring","locationName":"versionId"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"BypassGovernanceRetention":{"location":"header","locationName":"x-amz-bypass-governance-retention","type":"boolean"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"DeleteMarker":{"location":"header","locationName":"x-amz-delete-marker","type":"boolean"},"VersionId":{"location":"header","locationName":"x-amz-version-id"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}}},"DeleteObjectTagging":{"http":{"method":"DELETE","requestUri":"/{Bucket}/{Key+}?tagging","responseCode":204},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"VersionId":{"location":"header","locationName":"x-amz-version-id"}}}},"DeleteObjects":{"http":{"requestUri":"/{Bucket}?delete"},"input":{"type":"structure","required":["Bucket","Delete"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Delete":{"locationName":"Delete","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","required":["Objects"],"members":{"Objects":{"locationName":"Object","type":"list","member":{"type":"structure","required":["Key"],"members":{"Key":{},"VersionId":{}}},"flattened":true},"Quiet":{"type":"boolean"}}},"MFA":{"location":"header","locationName":"x-amz-mfa"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"BypassGovernanceRetention":{"location":"header","locationName":"x-amz-bypass-governance-retention","type":"boolean"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"}},"payload":"Delete"},"output":{"type":"structure","members":{"Deleted":{"type":"list","member":{"type":"structure","members":{"Key":{},"VersionId":{},"DeleteMarker":{"type":"boolean"},"DeleteMarkerVersionId":{}}},"flattened":true},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"},"Errors":{"locationName":"Error","type":"list","member":{"type":"structure","members":{"Key":{},"VersionId":{},"Code":{},"Message":{}}},"flattened":true}}},"alias":"DeleteMultipleObjects","httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true}},"DeletePublicAccessBlock":{"http":{"method":"DELETE","requestUri":"/{Bucket}?publicAccessBlock","responseCode":204},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketAccelerateConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?accelerate"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"}}},"output":{"type":"structure","members":{"Status":{},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketAcl":{"http":{"method":"GET","requestUri":"/{Bucket}?acl"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Owner":{"shape":"S3r"},"Grants":{"shape":"S3u","locationName":"AccessControlList"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketAnalyticsConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?analytics"},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"AnalyticsConfiguration":{"shape":"S43"}},"payload":"AnalyticsConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketCors":{"http":{"method":"GET","requestUri":"/{Bucket}?cors"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"CORSRules":{"shape":"S4i","locationName":"CORSRule"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketEncryption":{"http":{"method":"GET","requestUri":"/{Bucket}?encryption"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"ServerSideEncryptionConfiguration":{"shape":"S4v"}},"payload":"ServerSideEncryptionConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketIntelligentTieringConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?intelligent-tiering"},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"}}},"output":{"type":"structure","members":{"IntelligentTieringConfiguration":{"shape":"S51"}},"payload":"IntelligentTieringConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketInventoryConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?inventory"},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"InventoryConfiguration":{"shape":"S5b"}},"payload":"InventoryConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketLifecycle":{"http":{"method":"GET","requestUri":"/{Bucket}?lifecycle"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Rules":{"shape":"S5r","locationName":"Rule"}}},"deprecated":true,"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketLifecycleConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?lifecycle"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Rules":{"shape":"S67","locationName":"Rule"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketLocation":{"http":{"method":"GET","requestUri":"/{Bucket}?location"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"LocationConstraint":{}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketLogging":{"http":{"method":"GET","requestUri":"/{Bucket}?logging"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"LoggingEnabled":{"shape":"S6j"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketMetricsConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?metrics"},"input":{"type":"structure","required":["Bucket","Id"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"MetricsConfiguration":{"shape":"S6v"}},"payload":"MetricsConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketNotification":{"http":{"method":"GET","requestUri":"/{Bucket}?notification"},"input":{"shape":"S6z"},"output":{"shape":"S70"},"deprecated":true,"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketNotificationConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?notification"},"input":{"shape":"S6z"},"output":{"shape":"S7b"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketOwnershipControls":{"http":{"method":"GET","requestUri":"/{Bucket}?ownershipControls"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"OwnershipControls":{"shape":"S7s"}},"payload":"OwnershipControls"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketPolicy":{"http":{"method":"GET","requestUri":"/{Bucket}?policy"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Policy":{}},"payload":"Policy"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketPolicyStatus":{"http":{"method":"GET","requestUri":"/{Bucket}?policyStatus"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"PolicyStatus":{"type":"structure","members":{"IsPublic":{"locationName":"IsPublic","type":"boolean"}}}},"payload":"PolicyStatus"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketReplication":{"http":{"method":"GET","requestUri":"/{Bucket}?replication"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"ReplicationConfiguration":{"shape":"S84"}},"payload":"ReplicationConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketRequestPayment":{"http":{"method":"GET","requestUri":"/{Bucket}?requestPayment"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Payer":{}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketTagging":{"http":{"method":"GET","requestUri":"/{Bucket}?tagging"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S49"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketVersioning":{"http":{"method":"GET","requestUri":"/{Bucket}?versioning"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Status":{},"MFADelete":{"locationName":"MfaDelete"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetBucketWebsite":{"http":{"method":"GET","requestUri":"/{Bucket}?website"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"RedirectAllRequestsTo":{"shape":"S97"},"IndexDocument":{"shape":"S9a"},"ErrorDocument":{"shape":"S9c"},"RoutingRules":{"shape":"S9d"}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"GetObject":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"IfMatch":{"location":"header","locationName":"If-Match"},"IfModifiedSince":{"location":"header","locationName":"If-Modified-Since","type":"timestamp"},"IfNoneMatch":{"location":"header","locationName":"If-None-Match"},"IfUnmodifiedSince":{"location":"header","locationName":"If-Unmodified-Since","type":"timestamp"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"Range":{"location":"header","locationName":"Range"},"ResponseCacheControl":{"location":"querystring","locationName":"response-cache-control"},"ResponseContentDisposition":{"location":"querystring","locationName":"response-content-disposition"},"ResponseContentEncoding":{"location":"querystring","locationName":"response-content-encoding"},"ResponseContentLanguage":{"location":"querystring","locationName":"response-content-language"},"ResponseContentType":{"location":"querystring","locationName":"response-content-type"},"ResponseExpires":{"shape":"S9w","location":"querystring","locationName":"response-expires"},"VersionId":{"location":"querystring","locationName":"versionId"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"PartNumber":{"location":"querystring","locationName":"partNumber","type":"integer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ChecksumMode":{"location":"header","locationName":"x-amz-checksum-mode"}}},"output":{"type":"structure","members":{"Body":{"streaming":true,"type":"blob"},"DeleteMarker":{"location":"header","locationName":"x-amz-delete-marker","type":"boolean"},"AcceptRanges":{"location":"header","locationName":"accept-ranges"},"Expiration":{"location":"header","locationName":"x-amz-expiration"},"Restore":{"location":"header","locationName":"x-amz-restore"},"LastModified":{"location":"header","locationName":"Last-Modified","type":"timestamp"},"ContentLength":{"location":"header","locationName":"Content-Length","type":"long"},"ETag":{"location":"header","locationName":"ETag"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-checksum-sha256"},"MissingMeta":{"location":"header","locationName":"x-amz-missing-meta","type":"integer"},"VersionId":{"location":"header","locationName":"x-amz-version-id"},"CacheControl":{"location":"header","locationName":"Cache-Control"},"ContentDisposition":{"location":"header","locationName":"Content-Disposition"},"ContentEncoding":{"location":"header","locationName":"Content-Encoding"},"ContentLanguage":{"location":"header","locationName":"Content-Language"},"ContentRange":{"location":"header","locationName":"Content-Range"},"ContentType":{"location":"header","locationName":"Content-Type"},"Expires":{"location":"header","locationName":"Expires","deprecated":true,"type":"timestamp"},"ExpiresString":{"location":"header","locationName":"ExpiresString"},"WebsiteRedirectLocation":{"location":"header","locationName":"x-amz-website-redirect-location"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"Metadata":{"shape":"S1c","location":"headers","locationName":"x-amz-meta-"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"StorageClass":{"location":"header","locationName":"x-amz-storage-class"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"},"ReplicationStatus":{"location":"header","locationName":"x-amz-replication-status"},"PartsCount":{"location":"header","locationName":"x-amz-mp-parts-count","type":"integer"},"TagCount":{"location":"header","locationName":"x-amz-tagging-count","type":"integer"},"ObjectLockMode":{"location":"header","locationName":"x-amz-object-lock-mode"},"ObjectLockRetainUntilDate":{"shape":"S1p","location":"header","locationName":"x-amz-object-lock-retain-until-date"},"ObjectLockLegalHoldStatus":{"location":"header","locationName":"x-amz-object-lock-legal-hold"}},"payload":"Body"},"httpChecksum":{"requestValidationModeMember":"ChecksumMode","responseAlgorithms":["CRC32","CRC32C","SHA256","SHA1"]}},"GetObjectAcl":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}?acl"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Owner":{"shape":"S3r"},"Grants":{"shape":"S3u","locationName":"AccessControlList"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}}},"GetObjectAttributes":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}?attributes"},"input":{"type":"structure","required":["Bucket","Key","ObjectAttributes"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"MaxParts":{"location":"header","locationName":"x-amz-max-parts","type":"integer"},"PartNumberMarker":{"location":"header","locationName":"x-amz-part-number-marker","type":"integer"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ObjectAttributes":{"location":"header","locationName":"x-amz-object-attributes","type":"list","member":{}}}},"output":{"type":"structure","members":{"DeleteMarker":{"location":"header","locationName":"x-amz-delete-marker","type":"boolean"},"LastModified":{"location":"header","locationName":"Last-Modified","type":"timestamp"},"VersionId":{"location":"header","locationName":"x-amz-version-id"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"},"ETag":{},"Checksum":{"type":"structure","members":{"ChecksumCRC32":{},"ChecksumCRC32C":{},"ChecksumSHA1":{},"ChecksumSHA256":{}}},"ObjectParts":{"type":"structure","members":{"TotalPartsCount":{"locationName":"PartsCount","type":"integer"},"PartNumberMarker":{"type":"integer"},"NextPartNumberMarker":{"type":"integer"},"MaxParts":{"type":"integer"},"IsTruncated":{"type":"boolean"},"Parts":{"locationName":"Part","type":"list","member":{"type":"structure","members":{"PartNumber":{"type":"integer"},"Size":{"type":"long"},"ChecksumCRC32":{},"ChecksumCRC32C":{},"ChecksumSHA1":{},"ChecksumSHA256":{}}},"flattened":true}}},"StorageClass":{},"ObjectSize":{"type":"long"}}}},"GetObjectLegalHold":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}?legal-hold"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"LegalHold":{"shape":"Sar","locationName":"LegalHold"}},"payload":"LegalHold"}},"GetObjectLockConfiguration":{"http":{"method":"GET","requestUri":"/{Bucket}?object-lock"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"ObjectLockConfiguration":{"shape":"Sau"}},"payload":"ObjectLockConfiguration"}},"GetObjectRetention":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}?retention"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Retention":{"shape":"Sb2","locationName":"Retention"}},"payload":"Retention"}},"GetObjectTagging":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}?tagging"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"}}},"output":{"type":"structure","required":["TagSet"],"members":{"VersionId":{"location":"header","locationName":"x-amz-version-id"},"TagSet":{"shape":"S49"}}}},"GetObjectTorrent":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}?torrent"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Body":{"streaming":true,"type":"blob"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}},"payload":"Body"}},"GetPublicAccessBlock":{"http":{"method":"GET","requestUri":"/{Bucket}?publicAccessBlock"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"PublicAccessBlockConfiguration":{"shape":"Sb9"}},"payload":"PublicAccessBlockConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"HeadBucket":{"http":{"method":"HEAD","requestUri":"/{Bucket}"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"BucketLocationType":{"location":"header","locationName":"x-amz-bucket-location-type"},"BucketLocationName":{"location":"header","locationName":"x-amz-bucket-location-name"},"BucketRegion":{"location":"header","locationName":"x-amz-bucket-region"},"AccessPointAlias":{"location":"header","locationName":"x-amz-access-point-alias","type":"boolean"}}}},"HeadObject":{"http":{"method":"HEAD","requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"IfMatch":{"location":"header","locationName":"If-Match"},"IfModifiedSince":{"location":"header","locationName":"If-Modified-Since","type":"timestamp"},"IfNoneMatch":{"location":"header","locationName":"If-None-Match"},"IfUnmodifiedSince":{"location":"header","locationName":"If-Unmodified-Since","type":"timestamp"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"Range":{"location":"header","locationName":"Range"},"ResponseCacheControl":{"location":"querystring","locationName":"response-cache-control"},"ResponseContentDisposition":{"location":"querystring","locationName":"response-content-disposition"},"ResponseContentEncoding":{"location":"querystring","locationName":"response-content-encoding"},"ResponseContentLanguage":{"location":"querystring","locationName":"response-content-language"},"ResponseContentType":{"location":"querystring","locationName":"response-content-type"},"ResponseExpires":{"shape":"S9w","location":"querystring","locationName":"response-expires"},"VersionId":{"location":"querystring","locationName":"versionId"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"PartNumber":{"location":"querystring","locationName":"partNumber","type":"integer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ChecksumMode":{"location":"header","locationName":"x-amz-checksum-mode"}}},"output":{"type":"structure","members":{"DeleteMarker":{"location":"header","locationName":"x-amz-delete-marker","type":"boolean"},"AcceptRanges":{"location":"header","locationName":"accept-ranges"},"Expiration":{"location":"header","locationName":"x-amz-expiration"},"Restore":{"location":"header","locationName":"x-amz-restore"},"ArchiveStatus":{"location":"header","locationName":"x-amz-archive-status"},"LastModified":{"location":"header","locationName":"Last-Modified","type":"timestamp"},"ContentLength":{"location":"header","locationName":"Content-Length","type":"long"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-checksum-sha256"},"ETag":{"location":"header","locationName":"ETag"},"MissingMeta":{"location":"header","locationName":"x-amz-missing-meta","type":"integer"},"VersionId":{"location":"header","locationName":"x-amz-version-id"},"CacheControl":{"location":"header","locationName":"Cache-Control"},"ContentDisposition":{"location":"header","locationName":"Content-Disposition"},"ContentEncoding":{"location":"header","locationName":"Content-Encoding"},"ContentLanguage":{"location":"header","locationName":"Content-Language"},"ContentType":{"location":"header","locationName":"Content-Type"},"Expires":{"location":"header","locationName":"Expires","deprecated":true,"type":"timestamp"},"ExpiresString":{"location":"header","locationName":"ExpiresString"},"WebsiteRedirectLocation":{"location":"header","locationName":"x-amz-website-redirect-location"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"Metadata":{"shape":"S1c","location":"headers","locationName":"x-amz-meta-"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"StorageClass":{"location":"header","locationName":"x-amz-storage-class"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"},"ReplicationStatus":{"location":"header","locationName":"x-amz-replication-status"},"PartsCount":{"location":"header","locationName":"x-amz-mp-parts-count","type":"integer"},"ObjectLockMode":{"location":"header","locationName":"x-amz-object-lock-mode"},"ObjectLockRetainUntilDate":{"shape":"S1p","location":"header","locationName":"x-amz-object-lock-retain-until-date"},"ObjectLockLegalHoldStatus":{"location":"header","locationName":"x-amz-object-lock-legal-hold"}}}},"ListBucketAnalyticsConfigurations":{"http":{"method":"GET","requestUri":"/{Bucket}?analytics"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContinuationToken":{"location":"querystring","locationName":"continuation-token"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"IsTruncated":{"type":"boolean"},"ContinuationToken":{},"NextContinuationToken":{},"AnalyticsConfigurationList":{"locationName":"AnalyticsConfiguration","type":"list","member":{"shape":"S43"},"flattened":true}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"ListBucketIntelligentTieringConfigurations":{"http":{"method":"GET","requestUri":"/{Bucket}?intelligent-tiering"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContinuationToken":{"location":"querystring","locationName":"continuation-token"}}},"output":{"type":"structure","members":{"IsTruncated":{"type":"boolean"},"ContinuationToken":{},"NextContinuationToken":{},"IntelligentTieringConfigurationList":{"locationName":"IntelligentTieringConfiguration","type":"list","member":{"shape":"S51"},"flattened":true}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"ListBucketInventoryConfigurations":{"http":{"method":"GET","requestUri":"/{Bucket}?inventory"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContinuationToken":{"location":"querystring","locationName":"continuation-token"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"ContinuationToken":{},"InventoryConfigurationList":{"locationName":"InventoryConfiguration","type":"list","member":{"shape":"S5b"},"flattened":true},"IsTruncated":{"type":"boolean"},"NextContinuationToken":{}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"ListBucketMetricsConfigurations":{"http":{"method":"GET","requestUri":"/{Bucket}?metrics"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContinuationToken":{"location":"querystring","locationName":"continuation-token"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"IsTruncated":{"type":"boolean"},"ContinuationToken":{},"NextContinuationToken":{},"MetricsConfigurationList":{"locationName":"MetricsConfiguration","type":"list","member":{"shape":"S6v"},"flattened":true}}}},"ListBuckets":{"http":{"method":"GET"},"input":{"type":"structure","members":{"MaxBuckets":{"location":"querystring","locationName":"max-buckets","type":"integer"},"ContinuationToken":{"location":"querystring","locationName":"continuation-token"}}},"output":{"type":"structure","members":{"Buckets":{"shape":"Sc0"},"Owner":{"shape":"S3r"},"ContinuationToken":{}}},"alias":"GetService"},"ListDirectoryBuckets":{"http":{"method":"GET"},"input":{"type":"structure","members":{"ContinuationToken":{"location":"querystring","locationName":"continuation-token"},"MaxDirectoryBuckets":{"location":"querystring","locationName":"max-directory-buckets","type":"integer"}}},"output":{"type":"structure","members":{"Buckets":{"shape":"Sc0"},"ContinuationToken":{}}},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"ListMultipartUploads":{"http":{"method":"GET","requestUri":"/{Bucket}?uploads"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Delimiter":{"location":"querystring","locationName":"delimiter"},"EncodingType":{"location":"querystring","locationName":"encoding-type"},"KeyMarker":{"location":"querystring","locationName":"key-marker"},"MaxUploads":{"location":"querystring","locationName":"max-uploads","type":"integer"},"Prefix":{"contextParam":{"name":"Prefix"},"location":"querystring","locationName":"prefix"},"UploadIdMarker":{"location":"querystring","locationName":"upload-id-marker"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"}}},"output":{"type":"structure","members":{"Bucket":{},"KeyMarker":{},"UploadIdMarker":{},"NextKeyMarker":{},"Prefix":{},"Delimiter":{},"NextUploadIdMarker":{},"MaxUploads":{"type":"integer"},"IsTruncated":{"type":"boolean"},"Uploads":{"locationName":"Upload","type":"list","member":{"type":"structure","members":{"UploadId":{},"Key":{},"Initiated":{"type":"timestamp"},"StorageClass":{},"Owner":{"shape":"S3r"},"Initiator":{"shape":"Scj"},"ChecksumAlgorithm":{}}},"flattened":true},"CommonPrefixes":{"shape":"Sck"},"EncodingType":{},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}}},"ListObjectVersions":{"http":{"method":"GET","requestUri":"/{Bucket}?versions"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Delimiter":{"location":"querystring","locationName":"delimiter"},"EncodingType":{"location":"querystring","locationName":"encoding-type"},"KeyMarker":{"location":"querystring","locationName":"key-marker"},"MaxKeys":{"location":"querystring","locationName":"max-keys","type":"integer"},"Prefix":{"contextParam":{"name":"Prefix"},"location":"querystring","locationName":"prefix"},"VersionIdMarker":{"location":"querystring","locationName":"version-id-marker"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"OptionalObjectAttributes":{"shape":"Scp","location":"header","locationName":"x-amz-optional-object-attributes"}}},"output":{"type":"structure","members":{"IsTruncated":{"type":"boolean"},"KeyMarker":{},"VersionIdMarker":{},"NextKeyMarker":{},"NextVersionIdMarker":{},"Versions":{"locationName":"Version","type":"list","member":{"type":"structure","members":{"ETag":{},"ChecksumAlgorithm":{"shape":"Scv"},"Size":{"type":"long"},"StorageClass":{},"Key":{},"VersionId":{},"IsLatest":{"type":"boolean"},"LastModified":{"type":"timestamp"},"Owner":{"shape":"S3r"},"RestoreStatus":{"shape":"Scy"}}},"flattened":true},"DeleteMarkers":{"locationName":"DeleteMarker","type":"list","member":{"type":"structure","members":{"Owner":{"shape":"S3r"},"Key":{},"VersionId":{},"IsLatest":{"type":"boolean"},"LastModified":{"type":"timestamp"}}},"flattened":true},"Name":{},"Prefix":{},"Delimiter":{},"MaxKeys":{"type":"integer"},"CommonPrefixes":{"shape":"Sck"},"EncodingType":{},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"alias":"GetBucketObjectVersions"},"ListObjects":{"http":{"method":"GET","requestUri":"/{Bucket}"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Delimiter":{"location":"querystring","locationName":"delimiter"},"EncodingType":{"location":"querystring","locationName":"encoding-type"},"Marker":{"location":"querystring","locationName":"marker"},"MaxKeys":{"location":"querystring","locationName":"max-keys","type":"integer"},"Prefix":{"contextParam":{"name":"Prefix"},"location":"querystring","locationName":"prefix"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"OptionalObjectAttributes":{"shape":"Scp","location":"header","locationName":"x-amz-optional-object-attributes"}}},"output":{"type":"structure","members":{"IsTruncated":{"type":"boolean"},"Marker":{},"NextMarker":{},"Contents":{"shape":"Sd7"},"Name":{},"Prefix":{},"Delimiter":{},"MaxKeys":{"type":"integer"},"CommonPrefixes":{"shape":"Sck"},"EncodingType":{},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"alias":"GetBucket"},"ListObjectsV2":{"http":{"method":"GET","requestUri":"/{Bucket}?list-type=2"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Delimiter":{"location":"querystring","locationName":"delimiter"},"EncodingType":{"location":"querystring","locationName":"encoding-type"},"MaxKeys":{"location":"querystring","locationName":"max-keys","type":"integer"},"Prefix":{"contextParam":{"name":"Prefix"},"location":"querystring","locationName":"prefix"},"ContinuationToken":{"location":"querystring","locationName":"continuation-token"},"FetchOwner":{"location":"querystring","locationName":"fetch-owner","type":"boolean"},"StartAfter":{"location":"querystring","locationName":"start-after"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"OptionalObjectAttributes":{"shape":"Scp","location":"header","locationName":"x-amz-optional-object-attributes"}}},"output":{"type":"structure","members":{"IsTruncated":{"type":"boolean"},"Contents":{"shape":"Sd7"},"Name":{},"Prefix":{},"Delimiter":{},"MaxKeys":{"type":"integer"},"CommonPrefixes":{"shape":"Sck"},"EncodingType":{},"KeyCount":{"type":"integer"},"ContinuationToken":{},"NextContinuationToken":{},"StartAfter":{},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}}},"ListParts":{"http":{"method":"GET","requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","Key","UploadId"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"MaxParts":{"location":"querystring","locationName":"max-parts","type":"integer"},"PartNumberMarker":{"location":"querystring","locationName":"part-number-marker","type":"integer"},"UploadId":{"location":"querystring","locationName":"uploadId"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"}}},"output":{"type":"structure","members":{"AbortDate":{"location":"header","locationName":"x-amz-abort-date","type":"timestamp"},"AbortRuleId":{"location":"header","locationName":"x-amz-abort-rule-id"},"Bucket":{},"Key":{},"UploadId":{},"PartNumberMarker":{"type":"integer"},"NextPartNumberMarker":{"type":"integer"},"MaxParts":{"type":"integer"},"IsTruncated":{"type":"boolean"},"Parts":{"locationName":"Part","type":"list","member":{"type":"structure","members":{"PartNumber":{"type":"integer"},"LastModified":{"type":"timestamp"},"ETag":{},"Size":{"type":"long"},"ChecksumCRC32":{},"ChecksumCRC32C":{},"ChecksumSHA1":{},"ChecksumSHA256":{}}},"flattened":true},"Initiator":{"shape":"Scj"},"Owner":{"shape":"S3r"},"StorageClass":{},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"},"ChecksumAlgorithm":{}}}},"PutBucketAccelerateConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?accelerate"},"input":{"type":"structure","required":["Bucket","AccelerateConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"AccelerateConfiguration":{"locationName":"AccelerateConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","members":{"Status":{}}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"}},"payload":"AccelerateConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":false},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketAcl":{"http":{"method":"PUT","requestUri":"/{Bucket}?acl"},"input":{"type":"structure","required":["Bucket"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"AccessControlPolicy":{"shape":"Sdm","locationName":"AccessControlPolicy","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWrite":{"location":"header","locationName":"x-amz-grant-write"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"AccessControlPolicy"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketAnalyticsConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?analytics"},"input":{"type":"structure","required":["Bucket","Id","AnalyticsConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"AnalyticsConfiguration":{"shape":"S43","locationName":"AnalyticsConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"AnalyticsConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketCors":{"http":{"method":"PUT","requestUri":"/{Bucket}?cors"},"input":{"type":"structure","required":["Bucket","CORSConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"CORSConfiguration":{"locationName":"CORSConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","required":["CORSRules"],"members":{"CORSRules":{"shape":"S4i","locationName":"CORSRule"}}},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"CORSConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketEncryption":{"http":{"method":"PUT","requestUri":"/{Bucket}?encryption"},"input":{"type":"structure","required":["Bucket","ServerSideEncryptionConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ServerSideEncryptionConfiguration":{"shape":"S4v","locationName":"ServerSideEncryptionConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"ServerSideEncryptionConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketIntelligentTieringConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?intelligent-tiering"},"input":{"type":"structure","required":["Bucket","Id","IntelligentTieringConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"IntelligentTieringConfiguration":{"shape":"S51","locationName":"IntelligentTieringConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}}},"payload":"IntelligentTieringConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketInventoryConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?inventory"},"input":{"type":"structure","required":["Bucket","Id","InventoryConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"InventoryConfiguration":{"shape":"S5b","locationName":"InventoryConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"InventoryConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketLifecycle":{"http":{"method":"PUT","requestUri":"/{Bucket}?lifecycle"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"LifecycleConfiguration":{"locationName":"LifecycleConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","required":["Rules"],"members":{"Rules":{"shape":"S5r","locationName":"Rule"}}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"LifecycleConfiguration"},"deprecated":true,"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketLifecycleConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?lifecycle"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"LifecycleConfiguration":{"locationName":"LifecycleConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","required":["Rules"],"members":{"Rules":{"shape":"S67","locationName":"Rule"}}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"LifecycleConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketLogging":{"http":{"method":"PUT","requestUri":"/{Bucket}?logging"},"input":{"type":"structure","required":["Bucket","BucketLoggingStatus"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"BucketLoggingStatus":{"locationName":"BucketLoggingStatus","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","members":{"LoggingEnabled":{"shape":"S6j"}}},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"BucketLoggingStatus"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketMetricsConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?metrics"},"input":{"type":"structure","required":["Bucket","Id","MetricsConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Id":{"location":"querystring","locationName":"id"},"MetricsConfiguration":{"shape":"S6v","locationName":"MetricsConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"MetricsConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketNotification":{"http":{"method":"PUT","requestUri":"/{Bucket}?notification"},"input":{"type":"structure","required":["Bucket","NotificationConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"NotificationConfiguration":{"shape":"S70","locationName":"NotificationConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"NotificationConfiguration"},"deprecated":true,"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketNotificationConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?notification"},"input":{"type":"structure","required":["Bucket","NotificationConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"NotificationConfiguration":{"shape":"S7b","locationName":"NotificationConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"SkipDestinationValidation":{"location":"header","locationName":"x-amz-skip-destination-validation","type":"boolean"}},"payload":"NotificationConfiguration"},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketOwnershipControls":{"http":{"method":"PUT","requestUri":"/{Bucket}?ownershipControls"},"input":{"type":"structure","required":["Bucket","OwnershipControls"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"OwnershipControls":{"shape":"S7s","locationName":"OwnershipControls","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}}},"payload":"OwnershipControls"},"httpChecksum":{"requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketPolicy":{"http":{"method":"PUT","requestUri":"/{Bucket}?policy"},"input":{"type":"structure","required":["Bucket","Policy"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ConfirmRemoveSelfBucketAccess":{"location":"header","locationName":"x-amz-confirm-remove-self-bucket-access","type":"boolean"},"Policy":{},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"Policy"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketReplication":{"http":{"method":"PUT","requestUri":"/{Bucket}?replication"},"input":{"type":"structure","required":["Bucket","ReplicationConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ReplicationConfiguration":{"shape":"S84","locationName":"ReplicationConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"Token":{"location":"header","locationName":"x-amz-bucket-object-lock-token"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"ReplicationConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketRequestPayment":{"http":{"method":"PUT","requestUri":"/{Bucket}?requestPayment"},"input":{"type":"structure","required":["Bucket","RequestPaymentConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"RequestPaymentConfiguration":{"locationName":"RequestPaymentConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","required":["Payer"],"members":{"Payer":{}}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"RequestPaymentConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketTagging":{"http":{"method":"PUT","requestUri":"/{Bucket}?tagging"},"input":{"type":"structure","required":["Bucket","Tagging"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"Tagging":{"shape":"Sec","locationName":"Tagging","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"Tagging"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketVersioning":{"http":{"method":"PUT","requestUri":"/{Bucket}?versioning"},"input":{"type":"structure","required":["Bucket","VersioningConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"MFA":{"location":"header","locationName":"x-amz-mfa"},"VersioningConfiguration":{"locationName":"VersioningConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","members":{"MFADelete":{"locationName":"MfaDelete"},"Status":{}}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"VersioningConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutBucketWebsite":{"http":{"method":"PUT","requestUri":"/{Bucket}?website"},"input":{"type":"structure","required":["Bucket","WebsiteConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"WebsiteConfiguration":{"locationName":"WebsiteConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","members":{"ErrorDocument":{"shape":"S9c"},"IndexDocument":{"shape":"S9a"},"RedirectAllRequestsTo":{"shape":"S97"},"RoutingRules":{"shape":"S9d"}}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"WebsiteConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"PutObject":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Body":{"streaming":true,"type":"blob"},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"CacheControl":{"location":"header","locationName":"Cache-Control"},"ContentDisposition":{"location":"header","locationName":"Content-Disposition"},"ContentEncoding":{"location":"header","locationName":"Content-Encoding"},"ContentLanguage":{"location":"header","locationName":"Content-Language"},"ContentLength":{"location":"header","locationName":"Content-Length","type":"long"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ContentType":{"location":"header","locationName":"Content-Type"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-checksum-sha256"},"Expires":{"location":"header","locationName":"Expires","type":"timestamp"},"IfNoneMatch":{"location":"header","locationName":"If-None-Match"},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"Metadata":{"shape":"S1c","location":"headers","locationName":"x-amz-meta-"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"StorageClass":{"location":"header","locationName":"x-amz-storage-class"},"WebsiteRedirectLocation":{"location":"header","locationName":"x-amz-website-redirect-location"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"SSEKMSEncryptionContext":{"shape":"S1j","location":"header","locationName":"x-amz-server-side-encryption-context"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"Tagging":{"location":"header","locationName":"x-amz-tagging"},"ObjectLockMode":{"location":"header","locationName":"x-amz-object-lock-mode"},"ObjectLockRetainUntilDate":{"shape":"S1p","location":"header","locationName":"x-amz-object-lock-retain-until-date"},"ObjectLockLegalHoldStatus":{"location":"header","locationName":"x-amz-object-lock-legal-hold"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"Body"},"output":{"type":"structure","members":{"Expiration":{"location":"header","locationName":"x-amz-expiration"},"ETag":{"location":"header","locationName":"ETag"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-checksum-sha256"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"VersionId":{"location":"header","locationName":"x-amz-version-id"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"SSEKMSEncryptionContext":{"shape":"S1j","location":"header","locationName":"x-amz-server-side-encryption-context"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":false}},"PutObjectAcl":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}?acl"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"AccessControlPolicy":{"shape":"Sdm","locationName":"AccessControlPolicy","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWrite":{"location":"header","locationName":"x-amz-grant-write"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"VersionId":{"location":"querystring","locationName":"versionId"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"AccessControlPolicy"},"output":{"type":"structure","members":{"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true}},"PutObjectLegalHold":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}?legal-hold"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"LegalHold":{"shape":"Sar","locationName":"LegalHold","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"VersionId":{"location":"querystring","locationName":"versionId"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"LegalHold"},"output":{"type":"structure","members":{"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true}},"PutObjectLockConfiguration":{"http":{"method":"PUT","requestUri":"/{Bucket}?object-lock"},"input":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ObjectLockConfiguration":{"shape":"Sau","locationName":"ObjectLockConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"Token":{"location":"header","locationName":"x-amz-bucket-object-lock-token"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"ObjectLockConfiguration"},"output":{"type":"structure","members":{"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true}},"PutObjectRetention":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}?retention"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"Retention":{"shape":"Sb2","locationName":"Retention","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"VersionId":{"location":"querystring","locationName":"versionId"},"BypassGovernanceRetention":{"location":"header","locationName":"x-amz-bypass-governance-retention","type":"boolean"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"Retention"},"output":{"type":"structure","members":{"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true}},"PutObjectTagging":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}?tagging"},"input":{"type":"structure","required":["Bucket","Key","Tagging"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"Tagging":{"shape":"Sec","locationName":"Tagging","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"}},"payload":"Tagging"},"output":{"type":"structure","members":{"VersionId":{"location":"header","locationName":"x-amz-version-id"}}},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true}},"PutPublicAccessBlock":{"http":{"method":"PUT","requestUri":"/{Bucket}?publicAccessBlock"},"input":{"type":"structure","required":["Bucket","PublicAccessBlockConfiguration"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"PublicAccessBlockConfiguration":{"shape":"Sb9","locationName":"PublicAccessBlockConfiguration","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"PublicAccessBlockConfiguration"},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":true},"staticContextParams":{"UseS3ExpressControlEndpoint":{"value":true}}},"RestoreObject":{"http":{"requestUri":"/{Bucket}/{Key+}?restore"},"input":{"type":"structure","required":["Bucket","Key"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"VersionId":{"location":"querystring","locationName":"versionId"},"RestoreRequest":{"locationName":"RestoreRequest","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","members":{"Days":{"type":"integer"},"GlacierJobParameters":{"type":"structure","required":["Tier"],"members":{"Tier":{}}},"Type":{},"Tier":{},"Description":{},"SelectParameters":{"type":"structure","required":["InputSerialization","ExpressionType","Expression","OutputSerialization"],"members":{"InputSerialization":{"shape":"Sf2"},"ExpressionType":{},"Expression":{},"OutputSerialization":{"shape":"Sfh"}}},"OutputLocation":{"type":"structure","members":{"S3":{"type":"structure","required":["BucketName","Prefix"],"members":{"BucketName":{},"Prefix":{},"Encryption":{"type":"structure","required":["EncryptionType"],"members":{"EncryptionType":{},"KMSKeyId":{"shape":"Ss"},"KMSContext":{}}},"CannedACL":{},"AccessControlList":{"shape":"S3u"},"Tagging":{"shape":"Sec"},"UserMetadata":{"type":"list","member":{"locationName":"MetadataEntry","type":"structure","members":{"Name":{},"Value":{}}}},"StorageClass":{}}}}}}},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"RestoreRequest"},"output":{"type":"structure","members":{"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"},"RestoreOutputPath":{"location":"header","locationName":"x-amz-restore-output-path"}}},"alias":"PostObjectRestore","httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":false}},"SelectObjectContent":{"http":{"requestUri":"/{Bucket}/{Key+}?select&select-type=2"},"input":{"locationName":"SelectObjectContentRequest","xmlNamespace":{"uri":"http://s3.amazonaws.com/doc/2006-03-01/"},"type":"structure","required":["Bucket","Key","Expression","ExpressionType","InputSerialization","OutputSerialization"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"Key":{"location":"uri","locationName":"Key"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"Expression":{},"ExpressionType":{},"RequestProgress":{"type":"structure","members":{"Enabled":{"type":"boolean"}}},"InputSerialization":{"shape":"Sf2"},"OutputSerialization":{"shape":"Sfh"},"ScanRange":{"type":"structure","members":{"Start":{"type":"long"},"End":{"type":"long"}}},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"output":{"type":"structure","members":{"Payload":{"type":"structure","members":{"Records":{"type":"structure","members":{"Payload":{"eventpayload":true,"type":"blob"}},"event":true},"Stats":{"type":"structure","members":{"Details":{"eventpayload":true,"type":"structure","members":{"BytesScanned":{"type":"long"},"BytesProcessed":{"type":"long"},"BytesReturned":{"type":"long"}}}},"event":true},"Progress":{"type":"structure","members":{"Details":{"eventpayload":true,"type":"structure","members":{"BytesScanned":{"type":"long"},"BytesProcessed":{"type":"long"},"BytesReturned":{"type":"long"}}}},"event":true},"Cont":{"type":"structure","members":{},"event":true},"End":{"type":"structure","members":{},"event":true}},"eventstream":true}},"payload":"Payload"}},"UploadPart":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","Key","PartNumber","UploadId"],"members":{"Body":{"streaming":true,"type":"blob"},"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ContentLength":{"location":"header","locationName":"Content-Length","type":"long"},"ContentMD5":{"location":"header","locationName":"Content-MD5"},"ChecksumAlgorithm":{"location":"header","locationName":"x-amz-sdk-checksum-algorithm"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-checksum-sha256"},"Key":{"contextParam":{"name":"Key"},"location":"uri","locationName":"Key"},"PartNumber":{"location":"querystring","locationName":"partNumber","type":"integer"},"UploadId":{"location":"querystring","locationName":"uploadId"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}},"payload":"Body"},"output":{"type":"structure","members":{"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"ETag":{"location":"header","locationName":"ETag"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-checksum-sha256"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}}},"httpChecksum":{"requestAlgorithmMember":"ChecksumAlgorithm","requestChecksumRequired":false}},"UploadPartCopy":{"http":{"method":"PUT","requestUri":"/{Bucket}/{Key+}"},"input":{"type":"structure","required":["Bucket","CopySource","Key","PartNumber","UploadId"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"CopySource":{"location":"header","locationName":"x-amz-copy-source"},"CopySourceIfMatch":{"location":"header","locationName":"x-amz-copy-source-if-match"},"CopySourceIfModifiedSince":{"location":"header","locationName":"x-amz-copy-source-if-modified-since","type":"timestamp"},"CopySourceIfNoneMatch":{"location":"header","locationName":"x-amz-copy-source-if-none-match"},"CopySourceIfUnmodifiedSince":{"location":"header","locationName":"x-amz-copy-source-if-unmodified-since","type":"timestamp"},"CopySourceRange":{"location":"header","locationName":"x-amz-copy-source-range"},"Key":{"location":"uri","locationName":"Key"},"PartNumber":{"location":"querystring","locationName":"partNumber","type":"integer"},"UploadId":{"location":"querystring","locationName":"uploadId"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKey":{"shape":"Sl","location":"header","locationName":"x-amz-server-side-encryption-customer-key"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"CopySourceSSECustomerAlgorithm":{"location":"header","locationName":"x-amz-copy-source-server-side-encryption-customer-algorithm"},"CopySourceSSECustomerKey":{"shape":"S1l","location":"header","locationName":"x-amz-copy-source-server-side-encryption-customer-key"},"CopySourceSSECustomerKeyMD5":{"location":"header","locationName":"x-amz-copy-source-server-side-encryption-customer-key-MD5"},"RequestPayer":{"location":"header","locationName":"x-amz-request-payer"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"},"ExpectedSourceBucketOwner":{"location":"header","locationName":"x-amz-source-expected-bucket-owner"}}},"output":{"type":"structure","members":{"CopySourceVersionId":{"location":"header","locationName":"x-amz-copy-source-version-id"},"CopyPartResult":{"type":"structure","members":{"ETag":{},"LastModified":{"type":"timestamp"},"ChecksumCRC32":{},"ChecksumCRC32C":{},"ChecksumSHA1":{},"ChecksumSHA256":{}}},"ServerSideEncryption":{"location":"header","locationName":"x-amz-server-side-encryption"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-server-side-encryption-customer-algorithm"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-server-side-encryption-customer-key-MD5"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-server-side-encryption-aws-kms-key-id"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"},"RequestCharged":{"location":"header","locationName":"x-amz-request-charged"}},"payload":"CopyPartResult"},"staticContextParams":{"DisableS3ExpressSessionAuth":{"value":true}}},"WriteGetObjectResponse":{"http":{"requestUri":"/WriteGetObjectResponse"},"input":{"type":"structure","required":["RequestRoute","RequestToken"],"members":{"RequestRoute":{"hostLabel":true,"location":"header","locationName":"x-amz-request-route"},"RequestToken":{"location":"header","locationName":"x-amz-request-token"},"Body":{"streaming":true,"type":"blob"},"StatusCode":{"location":"header","locationName":"x-amz-fwd-status","type":"integer"},"ErrorCode":{"location":"header","locationName":"x-amz-fwd-error-code"},"ErrorMessage":{"location":"header","locationName":"x-amz-fwd-error-message"},"AcceptRanges":{"location":"header","locationName":"x-amz-fwd-header-accept-ranges"},"CacheControl":{"location":"header","locationName":"x-amz-fwd-header-Cache-Control"},"ContentDisposition":{"location":"header","locationName":"x-amz-fwd-header-Content-Disposition"},"ContentEncoding":{"location":"header","locationName":"x-amz-fwd-header-Content-Encoding"},"ContentLanguage":{"location":"header","locationName":"x-amz-fwd-header-Content-Language"},"ContentLength":{"location":"header","locationName":"Content-Length","type":"long"},"ContentRange":{"location":"header","locationName":"x-amz-fwd-header-Content-Range"},"ContentType":{"location":"header","locationName":"x-amz-fwd-header-Content-Type"},"ChecksumCRC32":{"location":"header","locationName":"x-amz-fwd-header-x-amz-checksum-crc32"},"ChecksumCRC32C":{"location":"header","locationName":"x-amz-fwd-header-x-amz-checksum-crc32c"},"ChecksumSHA1":{"location":"header","locationName":"x-amz-fwd-header-x-amz-checksum-sha1"},"ChecksumSHA256":{"location":"header","locationName":"x-amz-fwd-header-x-amz-checksum-sha256"},"DeleteMarker":{"location":"header","locationName":"x-amz-fwd-header-x-amz-delete-marker","type":"boolean"},"ETag":{"location":"header","locationName":"x-amz-fwd-header-ETag"},"Expires":{"location":"header","locationName":"x-amz-fwd-header-Expires","type":"timestamp"},"Expiration":{"location":"header","locationName":"x-amz-fwd-header-x-amz-expiration"},"LastModified":{"location":"header","locationName":"x-amz-fwd-header-Last-Modified","type":"timestamp"},"MissingMeta":{"location":"header","locationName":"x-amz-fwd-header-x-amz-missing-meta","type":"integer"},"Metadata":{"shape":"S1c","location":"headers","locationName":"x-amz-meta-"},"ObjectLockMode":{"location":"header","locationName":"x-amz-fwd-header-x-amz-object-lock-mode"},"ObjectLockLegalHoldStatus":{"location":"header","locationName":"x-amz-fwd-header-x-amz-object-lock-legal-hold"},"ObjectLockRetainUntilDate":{"shape":"S1p","location":"header","locationName":"x-amz-fwd-header-x-amz-object-lock-retain-until-date"},"PartsCount":{"location":"header","locationName":"x-amz-fwd-header-x-amz-mp-parts-count","type":"integer"},"ReplicationStatus":{"location":"header","locationName":"x-amz-fwd-header-x-amz-replication-status"},"RequestCharged":{"location":"header","locationName":"x-amz-fwd-header-x-amz-request-charged"},"Restore":{"location":"header","locationName":"x-amz-fwd-header-x-amz-restore"},"ServerSideEncryption":{"location":"header","locationName":"x-amz-fwd-header-x-amz-server-side-encryption"},"SSECustomerAlgorithm":{"location":"header","locationName":"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"},"SSEKMSKeyId":{"shape":"Ss","location":"header","locationName":"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"},"SSECustomerKeyMD5":{"location":"header","locationName":"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"},"StorageClass":{"location":"header","locationName":"x-amz-fwd-header-x-amz-storage-class"},"TagCount":{"location":"header","locationName":"x-amz-fwd-header-x-amz-tagging-count","type":"integer"},"VersionId":{"location":"header","locationName":"x-amz-fwd-header-x-amz-version-id"},"BucketKeyEnabled":{"location":"header","locationName":"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled","type":"boolean"}},"payload":"Body"},"authtype":"v4-unsigned-body","endpoint":{"hostPrefix":"{RequestRoute}."},"staticContextParams":{"UseObjectLambdaEndpoint":{"value":true}},"unsignedPayload":true}},"shapes":{"Sl":{"type":"blob","sensitive":true},"Ss":{"type":"string","sensitive":true},"S1c":{"type":"map","key":{},"value":{}},"S1j":{"type":"string","sensitive":true},"S1l":{"type":"blob","sensitive":true},"S1p":{"type":"timestamp","timestampFormat":"iso8601"},"S2i":{"type":"string","sensitive":true},"S3r":{"type":"structure","members":{"DisplayName":{},"ID":{}}},"S3u":{"type":"list","member":{"locationName":"Grant","type":"structure","members":{"Grantee":{"shape":"S3w"},"Permission":{}}}},"S3w":{"type":"structure","required":["Type"],"members":{"DisplayName":{},"EmailAddress":{},"ID":{},"Type":{"locationName":"xsi:type","xmlAttribute":true},"URI":{}},"xmlNamespace":{"prefix":"xsi","uri":"http://www.w3.org/2001/XMLSchema-instance"}},"S43":{"type":"structure","required":["Id","StorageClassAnalysis"],"members":{"Id":{},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S46"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S49","flattened":true,"locationName":"Tag"}}}}},"StorageClassAnalysis":{"type":"structure","members":{"DataExport":{"type":"structure","required":["OutputSchemaVersion","Destination"],"members":{"OutputSchemaVersion":{},"Destination":{"type":"structure","required":["S3BucketDestination"],"members":{"S3BucketDestination":{"type":"structure","required":["Format","Bucket"],"members":{"Format":{},"BucketAccountId":{},"Bucket":{},"Prefix":{}}}}}}}}}}},"S46":{"type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}},"S49":{"type":"list","member":{"shape":"S46","locationName":"Tag"}},"S4i":{"type":"list","member":{"type":"structure","required":["AllowedMethods","AllowedOrigins"],"members":{"ID":{},"AllowedHeaders":{"locationName":"AllowedHeader","type":"list","member":{},"flattened":true},"AllowedMethods":{"locationName":"AllowedMethod","type":"list","member":{},"flattened":true},"AllowedOrigins":{"locationName":"AllowedOrigin","type":"list","member":{},"flattened":true},"ExposeHeaders":{"locationName":"ExposeHeader","type":"list","member":{},"flattened":true},"MaxAgeSeconds":{"type":"integer"}}},"flattened":true},"S4v":{"type":"structure","required":["Rules"],"members":{"Rules":{"locationName":"Rule","type":"list","member":{"type":"structure","members":{"ApplyServerSideEncryptionByDefault":{"type":"structure","required":["SSEAlgorithm"],"members":{"SSEAlgorithm":{},"KMSMasterKeyID":{"shape":"Ss"}}},"BucketKeyEnabled":{"type":"boolean"}}},"flattened":true}}},"S51":{"type":"structure","required":["Id","Status","Tierings"],"members":{"Id":{},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S46"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S49","flattened":true,"locationName":"Tag"}}}}},"Status":{},"Tierings":{"locationName":"Tiering","type":"list","member":{"type":"structure","required":["Days","AccessTier"],"members":{"Days":{"type":"integer"},"AccessTier":{}}},"flattened":true}}},"S5b":{"type":"structure","required":["Destination","IsEnabled","Id","IncludedObjectVersions","Schedule"],"members":{"Destination":{"type":"structure","required":["S3BucketDestination"],"members":{"S3BucketDestination":{"type":"structure","required":["Bucket","Format"],"members":{"AccountId":{},"Bucket":{},"Format":{},"Prefix":{},"Encryption":{"type":"structure","members":{"SSES3":{"locationName":"SSE-S3","type":"structure","members":{}},"SSEKMS":{"locationName":"SSE-KMS","type":"structure","required":["KeyId"],"members":{"KeyId":{"shape":"Ss"}}}}}}}}},"IsEnabled":{"type":"boolean"},"Filter":{"type":"structure","required":["Prefix"],"members":{"Prefix":{}}},"Id":{},"IncludedObjectVersions":{},"OptionalFields":{"type":"list","member":{"locationName":"Field"}},"Schedule":{"type":"structure","required":["Frequency"],"members":{"Frequency":{}}}}},"S5r":{"type":"list","member":{"type":"structure","required":["Prefix","Status"],"members":{"Expiration":{"shape":"S5t"},"ID":{},"Prefix":{},"Status":{},"Transition":{"shape":"S5y"},"NoncurrentVersionTransition":{"shape":"S60"},"NoncurrentVersionExpiration":{"shape":"S62"},"AbortIncompleteMultipartUpload":{"shape":"S63"}}},"flattened":true},"S5t":{"type":"structure","members":{"Date":{"shape":"S5u"},"Days":{"type":"integer"},"ExpiredObjectDeleteMarker":{"type":"boolean"}}},"S5u":{"type":"timestamp","timestampFormat":"iso8601"},"S5y":{"type":"structure","members":{"Date":{"shape":"S5u"},"Days":{"type":"integer"},"StorageClass":{}}},"S60":{"type":"structure","members":{"NoncurrentDays":{"type":"integer"},"StorageClass":{},"NewerNoncurrentVersions":{"type":"integer"}}},"S62":{"type":"structure","members":{"NoncurrentDays":{"type":"integer"},"NewerNoncurrentVersions":{"type":"integer"}}},"S63":{"type":"structure","members":{"DaysAfterInitiation":{"type":"integer"}}},"S67":{"type":"list","member":{"type":"structure","required":["Status"],"members":{"Expiration":{"shape":"S5t"},"ID":{},"Prefix":{"deprecated":true},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S46"},"ObjectSizeGreaterThan":{"type":"long"},"ObjectSizeLessThan":{"type":"long"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S49","flattened":true,"locationName":"Tag"},"ObjectSizeGreaterThan":{"type":"long"},"ObjectSizeLessThan":{"type":"long"}}}}},"Status":{},"Transitions":{"locationName":"Transition","type":"list","member":{"shape":"S5y"},"flattened":true},"NoncurrentVersionTransitions":{"locationName":"NoncurrentVersionTransition","type":"list","member":{"shape":"S60"},"flattened":true},"NoncurrentVersionExpiration":{"shape":"S62"},"AbortIncompleteMultipartUpload":{"shape":"S63"}}},"flattened":true},"S6j":{"type":"structure","required":["TargetBucket","TargetPrefix"],"members":{"TargetBucket":{},"TargetGrants":{"type":"list","member":{"locationName":"Grant","type":"structure","members":{"Grantee":{"shape":"S3w"},"Permission":{}}}},"TargetPrefix":{},"TargetObjectKeyFormat":{"type":"structure","members":{"SimplePrefix":{"locationName":"SimplePrefix","type":"structure","members":{}},"PartitionedPrefix":{"locationName":"PartitionedPrefix","type":"structure","members":{"PartitionDateSource":{}}}}}}},"S6v":{"type":"structure","required":["Id"],"members":{"Id":{},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S46"},"AccessPointArn":{},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S49","flattened":true,"locationName":"Tag"},"AccessPointArn":{}}}}}}},"S6z":{"type":"structure","required":["Bucket"],"members":{"Bucket":{"contextParam":{"name":"Bucket"},"location":"uri","locationName":"Bucket"},"ExpectedBucketOwner":{"location":"header","locationName":"x-amz-expected-bucket-owner"}}},"S70":{"type":"structure","members":{"TopicConfiguration":{"type":"structure","members":{"Id":{},"Events":{"shape":"S73","locationName":"Event"},"Event":{"deprecated":true},"Topic":{}}},"QueueConfiguration":{"type":"structure","members":{"Id":{},"Event":{"deprecated":true},"Events":{"shape":"S73","locationName":"Event"},"Queue":{}}},"CloudFunctionConfiguration":{"type":"structure","members":{"Id":{},"Event":{"deprecated":true},"Events":{"shape":"S73","locationName":"Event"},"CloudFunction":{},"InvocationRole":{}}}}},"S73":{"type":"list","member":{},"flattened":true},"S7b":{"type":"structure","members":{"TopicConfigurations":{"locationName":"TopicConfiguration","type":"list","member":{"type":"structure","required":["TopicArn","Events"],"members":{"Id":{},"TopicArn":{"locationName":"Topic"},"Events":{"shape":"S73","locationName":"Event"},"Filter":{"shape":"S7e"}}},"flattened":true},"QueueConfigurations":{"locationName":"QueueConfiguration","type":"list","member":{"type":"structure","required":["QueueArn","Events"],"members":{"Id":{},"QueueArn":{"locationName":"Queue"},"Events":{"shape":"S73","locationName":"Event"},"Filter":{"shape":"S7e"}}},"flattened":true},"LambdaFunctionConfigurations":{"locationName":"CloudFunctionConfiguration","type":"list","member":{"type":"structure","required":["LambdaFunctionArn","Events"],"members":{"Id":{},"LambdaFunctionArn":{"locationName":"CloudFunction"},"Events":{"shape":"S73","locationName":"Event"},"Filter":{"shape":"S7e"}}},"flattened":true},"EventBridgeConfiguration":{"type":"structure","members":{}}}},"S7e":{"type":"structure","members":{"Key":{"locationName":"S3Key","type":"structure","members":{"FilterRules":{"locationName":"FilterRule","type":"list","member":{"type":"structure","members":{"Name":{},"Value":{}}},"flattened":true}}}}},"S7s":{"type":"structure","required":["Rules"],"members":{"Rules":{"locationName":"Rule","type":"list","member":{"type":"structure","required":["ObjectOwnership"],"members":{"ObjectOwnership":{}}},"flattened":true}}},"S84":{"type":"structure","required":["Role","Rules"],"members":{"Role":{},"Rules":{"locationName":"Rule","type":"list","member":{"type":"structure","required":["Status","Destination"],"members":{"ID":{},"Priority":{"type":"integer"},"Prefix":{"deprecated":true},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S46"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S49","flattened":true,"locationName":"Tag"}}}}},"Status":{},"SourceSelectionCriteria":{"type":"structure","members":{"SseKmsEncryptedObjects":{"type":"structure","required":["Status"],"members":{"Status":{}}},"ReplicaModifications":{"type":"structure","required":["Status"],"members":{"Status":{}}}}},"ExistingObjectReplication":{"type":"structure","required":["Status"],"members":{"Status":{}}},"Destination":{"type":"structure","required":["Bucket"],"members":{"Bucket":{},"Account":{},"StorageClass":{},"AccessControlTranslation":{"type":"structure","required":["Owner"],"members":{"Owner":{}}},"EncryptionConfiguration":{"type":"structure","members":{"ReplicaKmsKeyID":{}}},"ReplicationTime":{"type":"structure","required":["Status","Time"],"members":{"Status":{},"Time":{"shape":"S8q"}}},"Metrics":{"type":"structure","required":["Status"],"members":{"Status":{},"EventThreshold":{"shape":"S8q"}}}}},"DeleteMarkerReplication":{"type":"structure","members":{"Status":{}}}}},"flattened":true}}},"S8q":{"type":"structure","members":{"Minutes":{"type":"integer"}}},"S97":{"type":"structure","required":["HostName"],"members":{"HostName":{},"Protocol":{}}},"S9a":{"type":"structure","required":["Suffix"],"members":{"Suffix":{}}},"S9c":{"type":"structure","required":["Key"],"members":{"Key":{}}},"S9d":{"type":"list","member":{"locationName":"RoutingRule","type":"structure","required":["Redirect"],"members":{"Condition":{"type":"structure","members":{"HttpErrorCodeReturnedEquals":{},"KeyPrefixEquals":{}}},"Redirect":{"type":"structure","members":{"HostName":{},"HttpRedirectCode":{},"Protocol":{},"ReplaceKeyPrefixWith":{},"ReplaceKeyWith":{}}}}}},"S9w":{"type":"timestamp","timestampFormat":"rfc822"},"Sar":{"type":"structure","members":{"Status":{}}},"Sau":{"type":"structure","members":{"ObjectLockEnabled":{},"Rule":{"type":"structure","members":{"DefaultRetention":{"type":"structure","members":{"Mode":{},"Days":{"type":"integer"},"Years":{"type":"integer"}}}}}}},"Sb2":{"type":"structure","members":{"Mode":{},"RetainUntilDate":{"shape":"S5u"}}},"Sb9":{"type":"structure","members":{"BlockPublicAcls":{"locationName":"BlockPublicAcls","type":"boolean"},"IgnorePublicAcls":{"locationName":"IgnorePublicAcls","type":"boolean"},"BlockPublicPolicy":{"locationName":"BlockPublicPolicy","type":"boolean"},"RestrictPublicBuckets":{"locationName":"RestrictPublicBuckets","type":"boolean"}}},"Sc0":{"type":"list","member":{"locationName":"Bucket","type":"structure","members":{"Name":{},"CreationDate":{"type":"timestamp"}}}},"Scj":{"type":"structure","members":{"ID":{},"DisplayName":{}}},"Sck":{"type":"list","member":{"type":"structure","members":{"Prefix":{}}},"flattened":true},"Scp":{"type":"list","member":{}},"Scv":{"type":"list","member":{},"flattened":true},"Scy":{"type":"structure","members":{"IsRestoreInProgress":{"type":"boolean"},"RestoreExpiryDate":{"type":"timestamp"}}},"Sd7":{"type":"list","member":{"type":"structure","members":{"Key":{},"LastModified":{"type":"timestamp"},"ETag":{},"ChecksumAlgorithm":{"shape":"Scv"},"Size":{"type":"long"},"StorageClass":{},"Owner":{"shape":"S3r"},"RestoreStatus":{"shape":"Scy"}}},"flattened":true},"Sdm":{"type":"structure","members":{"Grants":{"shape":"S3u","locationName":"AccessControlList"},"Owner":{"shape":"S3r"}}},"Sec":{"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S49"}}},"Sf2":{"type":"structure","members":{"CSV":{"type":"structure","members":{"FileHeaderInfo":{},"Comments":{},"QuoteEscapeCharacter":{},"RecordDelimiter":{},"FieldDelimiter":{},"QuoteCharacter":{},"AllowQuotedRecordDelimiter":{"type":"boolean"}}},"CompressionType":{},"JSON":{"type":"structure","members":{"Type":{}}},"Parquet":{"type":"structure","members":{}}}},"Sfh":{"type":"structure","members":{"CSV":{"type":"structure","members":{"QuoteFields":{},"QuoteEscapeCharacter":{},"RecordDelimiter":{},"FieldDelimiter":{},"QuoteCharacter":{}}},"JSON":{"type":"structure","members":{"RecordDelimiter":{}}}}}},"clientContextParams":{"Accelerate":{"documentation":"Enables this client to use S3 Transfer Acceleration endpoints.","type":"boolean"},"DisableMultiRegionAccessPoints":{"documentation":"Disables this client\'s usage of Multi-Region Access Points.","type":"boolean"},"DisableS3ExpressSessionAuth":{"documentation":"Disables this client\'s usage of Session Auth for S3Express\\n      buckets and reverts to using conventional SigV4 for those.","type":"boolean"},"ForcePathStyle":{"documentation":"Forces this client to use path-style addressing for buckets.","type":"boolean"},"UseArnRegion":{"documentation":"Enables this client to use an ARN\'s region when constructing an endpoint instead of the client\'s configured region.","type":"boolean"}}}')},5214:function(e){"use strict";e.exports=JSON.parse('{"o":{"ListBuckets":{"input_token":"ContinuationToken","limit_key":"MaxBuckets","output_token":"ContinuationToken","result_key":"Buckets"},"ListDirectoryBuckets":{"input_token":"ContinuationToken","limit_key":"MaxDirectoryBuckets","output_token":"ContinuationToken","result_key":"Buckets"},"ListMultipartUploads":{"input_token":["KeyMarker","UploadIdMarker"],"limit_key":"MaxUploads","more_results":"IsTruncated","output_token":["NextKeyMarker","NextUploadIdMarker"],"result_key":["Uploads","CommonPrefixes"]},"ListObjectVersions":{"input_token":["KeyMarker","VersionIdMarker"],"limit_key":"MaxKeys","more_results":"IsTruncated","output_token":["NextKeyMarker","NextVersionIdMarker"],"result_key":["Versions","DeleteMarkers","CommonPrefixes"]},"ListObjects":{"input_token":"Marker","limit_key":"MaxKeys","more_results":"IsTruncated","output_token":"NextMarker || Contents[-1].Key","result_key":["Contents","CommonPrefixes"]},"ListObjectsV2":{"input_token":"ContinuationToken","limit_key":"MaxKeys","output_token":"NextContinuationToken","result_key":["Contents","CommonPrefixes"]},"ListParts":{"input_token":"PartNumberMarker","limit_key":"MaxParts","more_results":"IsTruncated","output_token":"NextPartNumberMarker","result_key":"Parts"}}}')},78651:function(e){"use strict";e.exports=JSON.parse('{"V":{"BucketExists":{"delay":5,"operation":"HeadBucket","maxAttempts":20,"acceptors":[{"expected":200,"matcher":"status","state":"success"},{"expected":301,"matcher":"status","state":"success"},{"expected":403,"matcher":"status","state":"success"},{"expected":404,"matcher":"status","state":"retry"}]},"BucketNotExists":{"delay":5,"operation":"HeadBucket","maxAttempts":20,"acceptors":[{"expected":404,"matcher":"status","state":"success"}]},"ObjectExists":{"delay":5,"operation":"HeadObject","maxAttempts":20,"acceptors":[{"expected":200,"matcher":"status","state":"success"},{"expected":404,"matcher":"status","state":"retry"}]},"ObjectNotExists":{"delay":5,"operation":"HeadObject","maxAttempts":20,"acceptors":[{"expected":404,"matcher":"status","state":"success"}]}}}')},18650:function(e){"use strict";e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2011-06-15","endpointPrefix":"sts","globalEndpoint":"sts.amazonaws.com","protocol":"query","serviceAbbreviation":"AWS STS","serviceFullName":"AWS Security Token Service","serviceId":"STS","signatureVersion":"v4","uid":"sts-2011-06-15","xmlNamespace":"https://sts.amazonaws.com/doc/2011-06-15/"},"operations":{"AssumeRole":{"input":{"type":"structure","required":["RoleArn","RoleSessionName"],"members":{"RoleArn":{},"RoleSessionName":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"},"Tags":{"shape":"S8"},"TransitiveTagKeys":{"type":"list","member":{}},"ExternalId":{},"SerialNumber":{},"TokenCode":{},"SourceIdentity":{},"ProvidedContexts":{"type":"list","member":{"type":"structure","members":{"ProviderArn":{},"ContextAssertion":{}}}}}},"output":{"resultWrapper":"AssumeRoleResult","type":"structure","members":{"Credentials":{"shape":"Sl"},"AssumedRoleUser":{"shape":"Sq"},"PackedPolicySize":{"type":"integer"},"SourceIdentity":{}}}},"AssumeRoleWithSAML":{"input":{"type":"structure","required":["RoleArn","PrincipalArn","SAMLAssertion"],"members":{"RoleArn":{},"PrincipalArn":{},"SAMLAssertion":{"type":"string","sensitive":true},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"}}},"output":{"resultWrapper":"AssumeRoleWithSAMLResult","type":"structure","members":{"Credentials":{"shape":"Sl"},"AssumedRoleUser":{"shape":"Sq"},"PackedPolicySize":{"type":"integer"},"Subject":{},"SubjectType":{},"Issuer":{},"Audience":{},"NameQualifier":{},"SourceIdentity":{}}}},"AssumeRoleWithWebIdentity":{"input":{"type":"structure","required":["RoleArn","RoleSessionName","WebIdentityToken"],"members":{"RoleArn":{},"RoleSessionName":{},"WebIdentityToken":{"type":"string","sensitive":true},"ProviderId":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"}}},"output":{"resultWrapper":"AssumeRoleWithWebIdentityResult","type":"structure","members":{"Credentials":{"shape":"Sl"},"SubjectFromWebIdentityToken":{},"AssumedRoleUser":{"shape":"Sq"},"PackedPolicySize":{"type":"integer"},"Provider":{},"Audience":{},"SourceIdentity":{}}}},"DecodeAuthorizationMessage":{"input":{"type":"structure","required":["EncodedMessage"],"members":{"EncodedMessage":{}}},"output":{"resultWrapper":"DecodeAuthorizationMessageResult","type":"structure","members":{"DecodedMessage":{}}}},"GetAccessKeyInfo":{"input":{"type":"structure","required":["AccessKeyId"],"members":{"AccessKeyId":{}}},"output":{"resultWrapper":"GetAccessKeyInfoResult","type":"structure","members":{"Account":{}}}},"GetCallerIdentity":{"input":{"type":"structure","members":{}},"output":{"resultWrapper":"GetCallerIdentityResult","type":"structure","members":{"UserId":{},"Account":{},"Arn":{}}}},"GetFederationToken":{"input":{"type":"structure","required":["Name"],"members":{"Name":{},"Policy":{},"PolicyArns":{"shape":"S4"},"DurationSeconds":{"type":"integer"},"Tags":{"shape":"S8"}}},"output":{"resultWrapper":"GetFederationTokenResult","type":"structure","members":{"Credentials":{"shape":"Sl"},"FederatedUser":{"type":"structure","required":["FederatedUserId","Arn"],"members":{"FederatedUserId":{},"Arn":{}}},"PackedPolicySize":{"type":"integer"}}}},"GetSessionToken":{"input":{"type":"structure","members":{"DurationSeconds":{"type":"integer"},"SerialNumber":{},"TokenCode":{}}},"output":{"resultWrapper":"GetSessionTokenResult","type":"structure","members":{"Credentials":{"shape":"Sl"}}}}},"shapes":{"S4":{"type":"list","member":{"type":"structure","members":{"arn":{}}}},"S8":{"type":"list","member":{"type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}}},"Sl":{"type":"structure","required":["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],"members":{"AccessKeyId":{},"SecretAccessKey":{"type":"string","sensitive":true},"SessionToken":{},"Expiration":{"type":"timestamp"}}},"Sq":{"type":"structure","required":["AssumedRoleId","Arn"],"members":{"AssumedRoleId":{},"Arn":{}}}}}')},9299:function(e){"use strict";e.exports={o:{}}},15947:function(e){"use strict";e.exports=JSON.parse('{"rules":{"*/*":{"endpoint":"{service}.{region}.amazonaws.com"},"cn-*/*":{"endpoint":"{service}.{region}.amazonaws.com.cn"},"eu-isoe-*/*":"euIsoe","us-iso-*/*":"usIso","us-isob-*/*":"usIsob","us-isof-*/*":"usIsof","*/budgets":"globalSSL","*/cloudfront":"globalSSL","*/sts":"globalSSL","*/importexport":{"endpoint":"{service}.amazonaws.com","signatureVersion":"v2","globalEndpoint":true},"*/route53":"globalSSL","cn-*/route53":{"endpoint":"{service}.amazonaws.com.cn","globalEndpoint":true,"signingRegion":"cn-northwest-1"},"us-gov-*/route53":"globalGovCloud","us-iso-*/route53":{"endpoint":"{service}.c2s.ic.gov","globalEndpoint":true,"signingRegion":"us-iso-east-1"},"us-isob-*/route53":{"endpoint":"{service}.sc2s.sgov.gov","globalEndpoint":true,"signingRegion":"us-isob-east-1"},"us-isof-*/route53":"globalUsIsof","eu-isoe-*/route53":"globalEuIsoe","*/waf":"globalSSL","*/iam":"globalSSL","cn-*/iam":{"endpoint":"{service}.cn-north-1.amazonaws.com.cn","globalEndpoint":true,"signingRegion":"cn-north-1"},"us-iso-*/iam":{"endpoint":"{service}.us-iso-east-1.c2s.ic.gov","globalEndpoint":true,"signingRegion":"us-iso-east-1"},"us-gov-*/iam":"globalGovCloud","*/ce":{"endpoint":"{service}.us-east-1.amazonaws.com","globalEndpoint":true,"signingRegion":"us-east-1"},"cn-*/ce":{"endpoint":"{service}.cn-northwest-1.amazonaws.com.cn","globalEndpoint":true,"signingRegion":"cn-northwest-1"},"us-gov-*/sts":{"endpoint":"{service}.{region}.amazonaws.com"},"us-gov-west-1/s3":"s3signature","us-west-1/s3":"s3signature","us-west-2/s3":"s3signature","eu-west-1/s3":"s3signature","ap-southeast-1/s3":"s3signature","ap-southeast-2/s3":"s3signature","ap-northeast-1/s3":"s3signature","sa-east-1/s3":"s3signature","us-east-1/s3":{"endpoint":"{service}.amazonaws.com","signatureVersion":"s3"},"us-east-1/sdb":{"endpoint":"{service}.amazonaws.com","signatureVersion":"v2"},"*/sdb":{"endpoint":"{service}.{region}.amazonaws.com","signatureVersion":"v2"},"*/resource-explorer-2":"dualstackByDefault","*/kendra-ranking":"dualstackByDefault","*/internetmonitor":"dualstackByDefault","*/codecatalyst":"globalDualstackByDefault"},"fipsRules":{"*/*":"fipsStandard","us-gov-*/*":"fipsStandard","us-iso-*/*":{"endpoint":"{service}-fips.{region}.c2s.ic.gov"},"us-iso-*/dms":"usIso","us-isob-*/*":{"endpoint":"{service}-fips.{region}.sc2s.sgov.gov"},"us-isob-*/dms":"usIsob","cn-*/*":{"endpoint":"{service}-fips.{region}.amazonaws.com.cn"},"*/api.ecr":"fips.api.ecr","*/api.sagemaker":"fips.api.sagemaker","*/batch":"fipsDotPrefix","*/eks":"fipsDotPrefix","*/models.lex":"fips.models.lex","*/runtime.lex":"fips.runtime.lex","*/runtime.sagemaker":{"endpoint":"runtime-fips.sagemaker.{region}.amazonaws.com"},"*/iam":"fipsWithoutRegion","*/route53":"fipsWithoutRegion","*/transcribe":"fipsDotPrefix","*/waf":"fipsWithoutRegion","us-gov-*/transcribe":"fipsDotPrefix","us-gov-*/api.ecr":"fips.api.ecr","us-gov-*/models.lex":"fips.models.lex","us-gov-*/runtime.lex":"fips.runtime.lex","us-gov-*/access-analyzer":"fipsWithServiceOnly","us-gov-*/acm":"fipsWithServiceOnly","us-gov-*/acm-pca":"fipsWithServiceOnly","us-gov-*/api.sagemaker":"fipsWithServiceOnly","us-gov-*/appconfig":"fipsWithServiceOnly","us-gov-*/application-autoscaling":"fipsWithServiceOnly","us-gov-*/autoscaling":"fipsWithServiceOnly","us-gov-*/autoscaling-plans":"fipsWithServiceOnly","us-gov-*/batch":"fipsWithServiceOnly","us-gov-*/cassandra":"fipsWithServiceOnly","us-gov-*/clouddirectory":"fipsWithServiceOnly","us-gov-*/cloudformation":"fipsWithServiceOnly","us-gov-*/cloudshell":"fipsWithServiceOnly","us-gov-*/cloudtrail":"fipsWithServiceOnly","us-gov-*/config":"fipsWithServiceOnly","us-gov-*/connect":"fipsWithServiceOnly","us-gov-*/databrew":"fipsWithServiceOnly","us-gov-*/dlm":"fipsWithServiceOnly","us-gov-*/dms":"fipsWithServiceOnly","us-gov-*/dynamodb":"fipsWithServiceOnly","us-gov-*/ec2":"fipsWithServiceOnly","us-gov-*/eks":"fipsWithServiceOnly","us-gov-*/elasticache":"fipsWithServiceOnly","us-gov-*/elasticbeanstalk":"fipsWithServiceOnly","us-gov-*/elasticloadbalancing":"fipsWithServiceOnly","us-gov-*/elasticmapreduce":"fipsWithServiceOnly","us-gov-*/events":"fipsWithServiceOnly","us-gov-*/fis":"fipsWithServiceOnly","us-gov-*/glacier":"fipsWithServiceOnly","us-gov-*/greengrass":"fipsWithServiceOnly","us-gov-*/guardduty":"fipsWithServiceOnly","us-gov-*/identitystore":"fipsWithServiceOnly","us-gov-*/imagebuilder":"fipsWithServiceOnly","us-gov-*/kafka":"fipsWithServiceOnly","us-gov-*/kinesis":"fipsWithServiceOnly","us-gov-*/logs":"fipsWithServiceOnly","us-gov-*/mediaconvert":"fipsWithServiceOnly","us-gov-*/monitoring":"fipsWithServiceOnly","us-gov-*/networkmanager":"fipsWithServiceOnly","us-gov-*/organizations":"fipsWithServiceOnly","us-gov-*/outposts":"fipsWithServiceOnly","us-gov-*/participant.connect":"fipsWithServiceOnly","us-gov-*/ram":"fipsWithServiceOnly","us-gov-*/rds":"fipsWithServiceOnly","us-gov-*/redshift":"fipsWithServiceOnly","us-gov-*/resource-groups":"fipsWithServiceOnly","us-gov-*/runtime.sagemaker":"fipsWithServiceOnly","us-gov-*/serverlessrepo":"fipsWithServiceOnly","us-gov-*/servicecatalog-appregistry":"fipsWithServiceOnly","us-gov-*/servicequotas":"fipsWithServiceOnly","us-gov-*/sns":"fipsWithServiceOnly","us-gov-*/sqs":"fipsWithServiceOnly","us-gov-*/ssm":"fipsWithServiceOnly","us-gov-*/streams.dynamodb":"fipsWithServiceOnly","us-gov-*/sts":"fipsWithServiceOnly","us-gov-*/support":"fipsWithServiceOnly","us-gov-*/swf":"fipsWithServiceOnly","us-gov-west-1/states":"fipsWithServiceOnly","us-iso-east-1/elasticfilesystem":{"endpoint":"elasticfilesystem-fips.{region}.c2s.ic.gov"},"us-gov-west-1/organizations":"fipsWithServiceOnly","us-gov-west-1/route53":{"endpoint":"route53.us-gov.amazonaws.com"},"*/resource-explorer-2":"fipsDualstackByDefault","*/kendra-ranking":"dualstackByDefault","*/internetmonitor":"dualstackByDefault","*/codecatalyst":"fipsGlobalDualstackByDefault"},"dualstackRules":{"*/*":{"endpoint":"{service}.{region}.api.aws"},"cn-*/*":{"endpoint":"{service}.{region}.api.amazonwebservices.com.cn"},"*/s3":"dualstackLegacy","cn-*/s3":"dualstackLegacyCn","*/s3-control":"dualstackLegacy","cn-*/s3-control":"dualstackLegacyCn","ap-south-1/ec2":"dualstackLegacyEc2","eu-west-1/ec2":"dualstackLegacyEc2","sa-east-1/ec2":"dualstackLegacyEc2","us-east-1/ec2":"dualstackLegacyEc2","us-east-2/ec2":"dualstackLegacyEc2","us-west-2/ec2":"dualstackLegacyEc2"},"dualstackFipsRules":{"*/*":{"endpoint":"{service}-fips.{region}.api.aws"},"cn-*/*":{"endpoint":"{service}-fips.{region}.api.amazonwebservices.com.cn"},"*/s3":"dualstackFipsLegacy","cn-*/s3":"dualstackFipsLegacyCn","*/s3-control":"dualstackFipsLegacy","cn-*/s3-control":"dualstackFipsLegacyCn"},"patterns":{"globalSSL":{"endpoint":"https://{service}.amazonaws.com","globalEndpoint":true,"signingRegion":"us-east-1"},"globalGovCloud":{"endpoint":"{service}.us-gov.amazonaws.com","globalEndpoint":true,"signingRegion":"us-gov-west-1"},"globalUsIsof":{"endpoint":"{service}.csp.hci.ic.gov","globalEndpoint":true,"signingRegion":"us-isof-south-1"},"globalEuIsoe":{"endpoint":"{service}.cloud.adc-e.uk","globalEndpoint":true,"signingRegion":"eu-isoe-west-1"},"s3signature":{"endpoint":"{service}.{region}.amazonaws.com","signatureVersion":"s3"},"euIsoe":{"endpoint":"{service}.{region}.cloud.adc-e.uk"},"usIso":{"endpoint":"{service}.{region}.c2s.ic.gov"},"usIsob":{"endpoint":"{service}.{region}.sc2s.sgov.gov"},"usIsof":{"endpoint":"{service}.{region}.csp.hci.ic.gov"},"fipsStandard":{"endpoint":"{service}-fips.{region}.amazonaws.com"},"fipsDotPrefix":{"endpoint":"fips.{service}.{region}.amazonaws.com"},"fipsWithoutRegion":{"endpoint":"{service}-fips.amazonaws.com"},"fips.api.ecr":{"endpoint":"ecr-fips.{region}.amazonaws.com"},"fips.api.sagemaker":{"endpoint":"api-fips.sagemaker.{region}.amazonaws.com"},"fips.models.lex":{"endpoint":"models-fips.lex.{region}.amazonaws.com"},"fips.runtime.lex":{"endpoint":"runtime-fips.lex.{region}.amazonaws.com"},"fipsWithServiceOnly":{"endpoint":"{service}.{region}.amazonaws.com"},"dualstackLegacy":{"endpoint":"{service}.dualstack.{region}.amazonaws.com"},"dualstackLegacyCn":{"endpoint":"{service}.dualstack.{region}.amazonaws.com.cn"},"dualstackFipsLegacy":{"endpoint":"{service}-fips.dualstack.{region}.amazonaws.com"},"dualstackFipsLegacyCn":{"endpoint":"{service}-fips.dualstack.{region}.amazonaws.com.cn"},"dualstackLegacyEc2":{"endpoint":"api.ec2.{region}.aws"},"dualstackByDefault":{"endpoint":"{service}.{region}.api.aws"},"fipsDualstackByDefault":{"endpoint":"{service}-fips.{region}.api.aws"},"globalDualstackByDefault":{"endpoint":"{service}.global.api.aws"},"fipsGlobalDualstackByDefault":{"endpoint":"{service}-fips.global.api.aws"}}}')},82434:function(e){"use strict";e.exports={i8:"6.5.7"}}}]);