diff --git a/404.html b/404.html index d5bd4ba..adf2009 100644 --- a/404.html +++ b/404.html @@ -24,6 +24,6 @@ - + \ No newline at end of file diff --git a/index.html b/index.html index d5bd4ba..adf2009 100644 --- a/index.html +++ b/index.html @@ -24,6 +24,6 @@ - + \ No newline at end of file diff --git a/main.b24183efb25da7e7dd9e.js b/main.24b33fbc38e9a46b90df.js similarity index 77% rename from main.b24183efb25da7e7dd9e.js rename to main.24b33fbc38e9a46b90df.js index fc0a7ca..9ebaf46 100644 --- a/main.b24183efb25da7e7dd9e.js +++ b/main.24b33fbc38e9a46b90df.js @@ -1,4 +1,4 @@ -var mwe=Object.defineProperty,gwe=(bt,be,Y)=>be in bt?mwe(bt,be,{enumerable:!0,configurable:!0,writable:!0,value:Y}):bt[be]=Y,yt=(bt,be,Y)=>(gwe(bt,"symbol"!=typeof be?be+"":be,Y),Y);(self.webpackChunktimeless_frontend=self.webpackChunktimeless_frontend||[]).push([[179],{98255:bt=>{function be(Y){return Promise.resolve().then(()=>{var ie=new Error("Cannot find module '"+Y+"'");throw ie.code="MODULE_NOT_FOUND",ie})}be.keys=()=>[],be.resolve=be,be.id=98255,bt.exports=be},29813:function(bt,be,Y){var ie=Y(31325).default;function O(E){function d(x){if(Object(x)!==x)return Promise.reject(new TypeError(x+" is not an object."));var f=x.done;return Promise.resolve(x.value).then(function(T){return{value:T,done:f}})}return(O=function(x){this.s=x,this.n=x.next}).prototype={s:null,n:null,next:function(){return d(this.n.apply(this.s,arguments))},return:function(x){var f=this.s.return;return void 0===f?Promise.resolve({value:x,done:!0}):d(f.apply(this.s,arguments))},throw:function(x){var f=this.s.return;return void 0===f?Promise.reject(x):d(f.apply(this.s,arguments))}},new O(E)}!function(E,d,x,f,T,g,b,l,h,u,m,_,w,S,I,P){"use strict";var W,G,H,j,K,R=function(qe){return qe&&"object"==typeof qe&&"default"in qe?qe:{default:qe}}(h),o=function(qe){if(qe&&qe.__esModule)return qe;var ge=Object.create(null);return qe&&Object.keys(qe).forEach(function(Ne){if("default"!==Ne){var Ke=Object.getOwnPropertyDescriptor(qe,Ne);Object.defineProperty(ge,Ne,Ke.get?Ke:{enumerable:!0,get:function(){return qe[Ne]}})}}),ge.default=qe,Object.freeze(ge)}(m);E.StablePoolJoinKind=void 0,(W=E.StablePoolJoinKind||(E.StablePoolJoinKind={}))[W.INIT=0]="INIT",W[W.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",W[W.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",E.StablePhantomPoolJoinKind=void 0,(G=E.StablePhantomPoolJoinKind||(E.StablePhantomPoolJoinKind={}))[G.INIT=0]="INIT",G[G.COLLECT_PROTOCOL_FEES=1]="COLLECT_PROTOCOL_FEES",E.StablePoolExitKind=void 0,(H=E.StablePoolExitKind||(E.StablePoolExitKind={}))[H.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",H[H.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",H[H.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT";class y{constructor(){}}y.joinInit=qe=>d.defaultAbiCoder.encode(["uint256","uint256[]"],[E.StablePoolJoinKind.INIT,qe]),y.joinCollectProtocolFees=()=>d.defaultAbiCoder.encode(["uint256"],[E.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),y.joinExactTokensInForBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.StablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,qe,ge]),y.joinTokenInForExactBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.StablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,qe,ge]),y.exitExactBPTInForOneTokenOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.StablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,qe,ge]),y.exitExactBPTInForTokensOut=qe=>d.defaultAbiCoder.encode(["uint256","uint256"],[E.StablePoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,qe]),y.exitBPTInForExactTokensOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.StablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,qe,ge]),E.WeightedPoolJoinKind=void 0,(j=E.WeightedPoolJoinKind||(E.WeightedPoolJoinKind={}))[j.INIT=0]="INIT",j[j.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",j[j.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",j[j.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT=3]="ALL_TOKENS_IN_FOR_EXACT_BPT_OUT",E.WeightedPoolExitKind=void 0,(K=E.WeightedPoolExitKind||(E.WeightedPoolExitKind={}))[K.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",K[K.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",K[K.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT",K[K.MANAGEMENT_FEE_TOKENS_OUT=3]="MANAGEMENT_FEE_TOKENS_OUT";class M{constructor(){}}M.joinInit=qe=>d.defaultAbiCoder.encode(["uint256","uint256[]"],[E.WeightedPoolJoinKind.INIT,qe]),M.joinExactTokensInForBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,qe,ge]),M.joinTokenInForExactBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,qe,ge]),M.joinAllTokensInForExactBPTOut=qe=>d.defaultAbiCoder.encode(["uint256","uint256"],[E.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,qe]),M.exitExactBPTInForOneTokenOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,qe,ge]),M.exitExactBPTInForTokensOut=qe=>d.defaultAbiCoder.encode(["uint256","uint256"],[E.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,qe]),M.exitBPTInForExactTokensOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,qe,ge]);let v=(()=>{class qe{constructor(){}}return qe.exitForManagementFees=()=>d.defaultAbiCoder.encode(["uint256"],[E.WeightedPoolExitKind.MANAGEMENT_FEE_TOKENS_OUT]),qe})();var k,D;E.ComposableStablePoolJoinKind=void 0,(k=E.ComposableStablePoolJoinKind||(E.ComposableStablePoolJoinKind={}))[k.INIT=0]="INIT",k[k.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",k[k.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",E.ComposableStablePoolExitKind=void 0,(D=E.ComposableStablePoolExitKind||(E.ComposableStablePoolExitKind={}))[D.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",D[D.BPT_IN_FOR_EXACT_TOKENS_OUT=1]="BPT_IN_FOR_EXACT_TOKENS_OUT";class N{constructor(){}}N.joinInit=qe=>d.defaultAbiCoder.encode(["uint256","uint256[]"],[E.ComposableStablePoolJoinKind.INIT,qe]),N.joinCollectProtocolFees=()=>d.defaultAbiCoder.encode(["uint256"],[E.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),N.joinExactTokensInForBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.ComposableStablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,qe,ge]),N.joinTokenInForExactBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.ComposableStablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,qe,ge]),N.exitExactBPTInForOneTokenOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,qe,ge]),N.exitBPTInForExactTokensOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,qe,ge]);var a="Invariant failed";function B(qe,ge){if(!qe)throw new Error(a)}const Q=qe=>(B(66===qe.length),qe.slice(0,42)),ee=qe=>{B(66===qe.length);const ge=parseInt(qe[45]);return B(ge<3),ge},ce=qe=>(B(66===qe.length),f.BigNumber.from(`0x${qe.slice(46)}`));var ue;E.Network=void 0,(ue=E.Network||(E.Network={}))[ue.MAINNET=1]="MAINNET",ue[ue.ROPSTEN=3]="ROPSTEN",ue[ue.RINKEBY=4]="RINKEBY",ue[ue.GOERLI=5]="GOERLI",ue[ue.G\u00d6RLI=5]="G\xd6RLI",ue[ue.OPTIMISM=10]="OPTIMISM",ue[ue.KOVAN=42]="KOVAN",ue[ue.GNOSIS=100]="GNOSIS",ue[ue.POLYGON=137]="POLYGON",ue[ue.ARBITRUM=42161]="ARBITRUM";const we={IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0x6b15a01b5d46a5321b627bd7deef1af57bc629070000000000000000000000d4","0xe08590bde837eb9b2d42aa1196469d6e08fe96ec000200000000000000000101","0xb4c23af48e79f73e3a7e36c0e54eb38e1ce1755e0002000000000000000000d3","0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8","0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366"]},Investment:{AllowList:["0x4fd63966879300cafafbb35d157dc5229278ed23000100000000000000000169","0x37a6fc079cad790e556baedda879358e076ef1b3000100000000000000000348","0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x751dfdace1ad995ff13c927f6f761c6604532c79":"stablePool","0x590e544e7ca956bb878f8c873e82e65550d67d2f":"stablePool","0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool","0x6c7f4d97269ece163fd08d5c2584a21e4a33934c":"boostedPool"},Stakable:{AllowList:[]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e":{name:"Balancer Stable USD",hasIcon:!0}}},ae={[E.Network.KOVAN]:{IdsMap:{staBAL:"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e",bbAaveUSD:{v1:"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8",v2:""},veBAL:"0xdc2ecfdf2688f92c85064be0b929693acc6dbca6000200000000000000000701"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:["0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678","0xca1eb8624be8e11418f629559321587197557e0c000200000000000000000682","0xa21da5768186c1bc0f56dd72aa94672d77bdf23e00020000000000000000067a","0x7f9db0d15eea32e205b7df0fa5184f4a8a905abb000200000000000000000683","0x72c5a86831f019df6fac146fc14ef60ebe0d5f2600020000000000000000067f","0x542b9f6fd4500b94d453974d8c70783ef794ff6a00020000000000000000067c","0x47f9309a8c5a68a93ac27a4cccc0e222cd3adfa2000200000000000000000684","0x3f3050a0fe84778aeff96906c9218b318f924d22000200000000000000000680","0x31e61587b5dc148ae42ae323655fb8d7af7bb86600020000000000000000067d","0x28efa7f86341aa0ad534bdfb033edb4f4ac6adf700020000000000000000067e","0x10ee90b9ff4b9a44a773107280c0ce083619286800020000000000000000067b"],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x6b15a01b5d46a5321b627bd7deef1af57bc629070000000000000000000000d4","0xe08590bde837eb9b2d42aa1196469d6e08fe96ec000200000000000000000101","0xb4c23af48e79f73e3a7e36c0e54eb38e1ce1755e0002000000000000000000d3","0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8","0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e"]},Investment:{AllowList:["0x4fd63966879300cafafbb35d157dc5229278ed23000100000000000000000169","0x37a6fc079cad790e556baedda879358e076ef1b3000100000000000000000348"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x1b57f637ce3408f1f834b0b70f9a595b062daea7":"liquidityBootstrappingPool","0x751dfdace1ad995ff13c927f6f761c6604532c79":"stablePool","0x590e544e7ca956bb878f8c873e82e65550d67d2f":"stablePool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"managedPool","0x6c7f4d97269ece163fd08d5c2584a21e4a33934c":"boostedPool","0x1f47ab83420cd1f818df9acbd6ee68341bb91592":"stablePool"},Stakable:{AllowList:["0xf767f0a3fcf1eafec2180b7de79d0c559d7e7e370001000000000000000003e3","0xdc2ecfdf2688f92c85064be0b929693acc6dbca6000200000000000000000701","0x647c1fd457b95b75d0972ff08fe01d7d7bda05df000200000000000000000001","0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8"]},Metadata:{"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8":{name:"Balancer Boosted Aave USD",hasIcon:!1},"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e":{name:"Balancer Stable USD",hasIcon:!1}}},[E.Network.GOERLI]:{IdsMap:{staBAL:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062",bbAaveUSD:{v1:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",v2:"0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7"},veBAL:"0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:["0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678"],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076","0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7","0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d","0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e","0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c"]},Investment:{AllowList:[]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0x44afeb87c871d8fea9398a026dea2bd3a13f5769":"stablePool","0xa55f73e2281c60206ba43a3590db07b8955832be":"stablePool","0xb48cc42c45d262534e46d5965a9ac496f1b7a830":"liquidityBootstrappingPool","0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a":"liquidityBootstrappingPool","0x41e9036ae350baedcc7107760a020dca3c0731ec":"boostedPool","0xb848f50141f3d4255b37ac288c25c109104f2158":"composableStablePool","0x94f68b54191f62f781fe8298a8a5fa3ed772d227":"weightedPool"},Stakable:{AllowList:["0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b","0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059"]},Metadata:{"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f":{name:"Balancer Boosted Aave USD",hasIcon:!1}}},[E.Network.MAINNET]:{IdsMap:{staBAL:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",bbAaveUSD:{v1:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe",v2:"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"},veBAL:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"stablePool","0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f":"composableStablePool","0xcc508a455f5b0073973107db6a878ddbdab957bc":"weightedPool"},Stakable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027","0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084","0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052","0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0","0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c","0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0","0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8","0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e","0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c","0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019","0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160","0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b","0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e","0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a","0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087","0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089","0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018","0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015","0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123","0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021","0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026","0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182","0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181","0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159","0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e","0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a","0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194","0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de","0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef","0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180","0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269","0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270","0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc","0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e","0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338","0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327","0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366","0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367","0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063":{name:"Balancer Stable USD",hasIcon:!0},"0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249":{name:"AuraBAL Stable Pool",hasIcon:!1}}},[E.Network.POLYGON]:{IdsMap:{xMatic:{v1:"0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4",v2:"0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"},stMatic:{v1:"0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366",v2:"0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d"},mai4:{mai4:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012",maiBbaUsd:"0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e"}},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4"]},Investment:{AllowList:[""]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x41b953164995c11c81da73d212ed8af25741b7ac":"liquidityBootstrappingPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool","0xca96c4f198d343e251b1a01f3eba061ef3da73c1":"stablePool","0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4":"composableStablePool","0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3":"weightedPool"},Stakable:{AllowList:["0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002","0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032","0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008","0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e","0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d","0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051","0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009","0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a","0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035","0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"]},Metadata:{}},[E.Network.ARBITRUM]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159"]},Investment:{AllowList:[""]},Factories:{"0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xef44d6786b2b4d544b7850fe67ce6381626bf2d6":"stablePool","0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33":"composableStablePool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"weightedPool"},Stakable:{AllowList:["0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b","0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002","0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006","0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e","0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036","0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010","0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017","0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d","0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001","0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076","0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159","0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158"]},Metadata:{}},[E.Network.GNOSIS]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX","Gyro2","Gyro3","GyroE","HighAmpComposableStable"],Stable:{AllowList:["0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004","0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000"]},Investment:{AllowList:[]},Factories:{},Stakable:{AllowList:[]},Metadata:{}}};var Te=[{inputs:[{internalType:"contract IStaticAToken",name:"_waToken",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"waToken",outputs:[{internalType:"contract IStaticAToken",name:"",type:"address"}],stateMutability:"view",type:"function"}];const le=qe=>qe[0].map((ge,Ne)=>qe.map(Ke=>Ke[Ne]));let X=(()=>{class qe{constructor(Ne){this.ETH=x.AddressZero,this.isETH=Ke=>qe.isEqual(Ke,this.ETH),this.isWETH=Ke=>qe.isEqual(Ke,this.WETH),this.translateToERC20=Ke=>this.isETH(Ke)?this.WETH:Ke,this.WETH=T.getAddress(Ne)}sortTokens(Ne,...Ke){Ke.forEach(un=>B(Ne.length===un.length));const ot=Ne.map(this.translateToERC20),Ct=le([ot,...Ke]).sort(([un],[pn])=>{return Zn=pn,un.toLowerCase()>Zn.toLowerCase()?1:-1;var Zn}),[Vt,...Ht]=le(Ct);return[Ne.includes(this.ETH)?Vt.map(un=>this.isWETH(un)?this.ETH:un):Vt,...Ht]}}return qe.isEqual=(ge,Ne)=>T.getAddress(ge)===T.getAddress(Ne),qe})();const ne={"000":"ADD_OVERFLOW","001":"SUB_OVERFLOW","002":"SUB_UNDERFLOW","003":"MUL_OVERFLOW","004":"ZERO_DIVISION","005":"DIV_INTERNAL","006":"X_OUT_OF_BOUNDS","007":"Y_OUT_OF_BOUNDS","008":"PRODUCT_OUT_OF_BOUNDS","009":"INVALID_EXPONENT",100:"OUT_OF_BOUNDS",101:"UNSORTED_ARRAY",102:"UNSORTED_TOKENS",103:"INPUT_LENGTH_MISMATCH",104:"ZERO_TOKEN",200:"MIN_TOKENS",201:"MAX_TOKENS",202:"MAX_SWAP_FEE_PERCENTAGE",203:"MIN_SWAP_FEE_PERCENTAGE",204:"MINIMUM_BPT",205:"CALLER_NOT_VAULT",206:"UNINITIALIZED",207:"BPT_IN_MAX_AMOUNT",208:"BPT_OUT_MIN_AMOUNT",209:"EXPIRED_PERMIT",210:"NOT_TWO_TOKENS",211:"DISABLED",300:"MIN_AMP",301:"MAX_AMP",302:"MIN_WEIGHT",303:"MAX_STABLE_TOKENS",304:"MAX_IN_RATIO",305:"MAX_OUT_RATIO",306:"MIN_BPT_IN_FOR_TOKEN_OUT",307:"MAX_OUT_BPT_FOR_TOKEN_IN",308:"NORMALIZED_WEIGHT_INVARIANT",309:"INVALID_TOKEN",310:"UNHANDLED_JOIN_KIND",311:"ZERO_INVARIANT",312:"ORACLE_INVALID_SECONDS_QUERY",313:"ORACLE_NOT_INITIALIZED",314:"ORACLE_QUERY_TOO_OLD",315:"ORACLE_INVALID_INDEX",316:"ORACLE_BAD_SECS",317:"AMP_END_TIME_TOO_CLOSE",318:"AMP_ONGOING_UPDATE",319:"AMP_RATE_TOO_HIGH",320:"AMP_NO_ONGOING_UPDATE",321:"STABLE_INVARIANT_DIDNT_CONVERGE",322:"STABLE_GET_BALANCE_DIDNT_CONVERGE",323:"RELAYER_NOT_CONTRACT",324:"BASE_POOL_RELAYER_NOT_CALLED",325:"REBALANCING_RELAYER_REENTERED",326:"GRADUAL_UPDATE_TIME_TRAVEL",327:"SWAPS_DISABLED",328:"CALLER_IS_NOT_LBP_OWNER",329:"PRICE_RATE_OVERFLOW",330:"INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED",331:"WEIGHT_CHANGE_TOO_FAST",332:"LOWER_GREATER_THAN_UPPER_TARGET",333:"UPPER_TARGET_TOO_HIGH",334:"UNHANDLED_BY_LINEAR_POOL",335:"OUT_OF_TARGET_RANGE",336:"UNHANDLED_EXIT_KIND ",337:"UNAUTHORIZED_EXIT",338:"MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE",339:"UNHANDLED_BY_MANAGED_POOL",340:"UNHANDLED_BY_PHANTOM_POOL",341:"TOKEN_DOES_NOT_HAVE_RATE_PROVIDER",342:"INVALID_INITIALIZATION",343:"OUT_OF_NEW_TARGET_RANGE",344:"UNAUTHORIZED_OPERATION",345:"UNINITIALIZED_POOL_CONTROLLER",400:"REENTRANCY",401:"SENDER_NOT_ALLOWED",402:"PAUSED",403:"PAUSE_WINDOW_EXPIRED",404:"MAX_PAUSE_WINDOW_DURATION",405:"MAX_BUFFER_PERIOD_DURATION",406:"INSUFFICIENT_BALANCE",407:"INSUFFICIENT_ALLOWANCE",408:"ERC20_TRANSFER_FROM_ZERO_ADDRESS",409:"ERC20_TRANSFER_TO_ZERO_ADDRESS",410:"ERC20_MINT_TO_ZERO_ADDRESS",411:"ERC20_BURN_FROM_ZERO_ADDRESS",412:"ERC20_APPROVE_FROM_ZERO_ADDRESS",413:"ERC20_APPROVE_TO_ZERO_ADDRESS",414:"ERC20_TRANSFER_EXCEEDS_ALLOWANCE",415:"ERC20_DECREASED_ALLOWANCE_BELOW_ZERO",416:"ERC20_TRANSFER_EXCEEDS_BALANCE",417:"ERC20_BURN_EXCEEDS_ALLOWANCE",418:"SAFE_ERC20_CALL_FAILED",419:"ADDRESS_INSUFFICIENT_BALANCE",420:"ADDRESS_CANNOT_SEND_VALUE",421:"SAFE_CAST_VALUE_CANT_FIT_INT256",422:"GRANT_SENDER_NOT_ADMIN",423:"REVOKE_SENDER_NOT_ADMIN",424:"RENOUNCE_SENDER_NOT_ALLOWED",425:"BUFFER_PERIOD_EXPIRED",426:"CALLER_IS_NOT_OWNER",427:"NEW_OWNER_IS_ZERO",428:"CODE_DEPLOYMENT_FAILED",429:"CALL_TO_NON_CONTRACT",430:"LOW_LEVEL_CALL_FAILED",431:"NOT_PAUSED",432:"ADDRESS_ALREADY_ALLOWLISTED",433:"ADDRESS_NOT_ALLOWLISTED",434:"ERC20_BURN_EXCEEDS_BALANCE",500:"INVALID_POOL_ID",501:"CALLER_NOT_POOL",502:"SENDER_NOT_ASSET_MANAGER",503:"USER_DOESNT_ALLOW_RELAYER",504:"INVALID_SIGNATURE",505:"EXIT_BELOW_MIN",506:"JOIN_ABOVE_MAX",507:"SWAP_LIMIT",508:"SWAP_DEADLINE",509:"CANNOT_SWAP_SAME_TOKEN",510:"UNKNOWN_AMOUNT_IN_FIRST_SWAP",511:"MALCONSTRUCTED_MULTIHOP_SWAP",512:"INTERNAL_BALANCE_OVERFLOW",513:"INSUFFICIENT_INTERNAL_BALANCE",514:"INVALID_ETH_INTERNAL_BALANCE",515:"INVALID_POST_LOAN_BALANCE",516:"INSUFFICIENT_ETH",517:"UNALLOCATED_ETH",518:"ETH_TRANSFER",519:"CANNOT_USE_ETH_SENTINEL",520:"TOKENS_MISMATCH",521:"TOKEN_NOT_REGISTERED",522:"TOKEN_ALREADY_REGISTERED",523:"TOKENS_ALREADY_SET",524:"TOKENS_LENGTH_MUST_BE_2",525:"NONZERO_TOKEN_BALANCE",526:"BALANCE_TOTAL_OVERFLOW",527:"POOL_NO_TOKENS",528:"INSUFFICIENT_FLASH_LOAN_BALANCE",600:"SWAP_FEE_PERCENTAGE_TOO_HIGH",601:"FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH",602:"INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT"};class pe{constructor(){}}function _e(qe){return xe.apply(this,arguments)}function xe(){return(xe=ie(function*(qe){if("string"==typeof qe)return qe;if(l.Signer.isSigner(qe))return qe.getAddress();if(qe.address)return qe.address;throw new Error("Could not read account address")})).apply(this,arguments)}var Ce;pe.isErrorCode=qe=>{if(!qe.includes("BAL#"))return!1;const ge=qe.replace("BAL#","");return Object.keys(ne).includes(ge)},pe.parseErrorCode=qe=>{if(!qe.includes("BAL#"))throw new Error("Error code not found");const ge=qe.replace("BAL#",""),Ne=ne[ge];if(!Ne)throw new Error("Error code not found");return Ne},pe.tryParseErrorCode=qe=>{try{return pe.parseErrorCode(qe)}catch{return qe}},pe.isBalancerError=qe=>Object.values(ne).includes(qe),pe.encodeError=qe=>{const ge=Object.entries(ne).find(([,Ne])=>Ne===qe);if(!ge)throw Error("Error message not found");return`BAL#${ge[0]}`},E.RelayerAction=void 0,(Ce=E.RelayerAction||(E.RelayerAction={})).JoinPool="JoinPool",Ce.ExitPool="ExitPool",Ce.Swap="Swap",Ce.BatchSwap="BatchSwap",Ce.SetRelayerApproval="SetRelayerApproval";class ke{constructor(){}}ke.encodeCalldataAuthorization=(qe,ge,Ne)=>{const Ke=b.hexZeroPad(b.hexValue(ge),32).slice(2),{v:ot,r:Ct,s:Vt}=b.splitSignature(Ne);return`${qe}${Ke}${b.hexZeroPad(b.hexValue(ot),32).slice(2)}${Ct.slice(2)}${Vt.slice(2)}`},ke.signJoinAuthorization=(qe,ge,Ne,Ke,ot,Ct)=>ke.signAuthorizationFor(E.RelayerAction.JoinPool,qe,ge,Ne,Ke,ot,Ct),ke.signExitAuthorization=(qe,ge,Ne,Ke,ot,Ct)=>ke.signAuthorizationFor(E.RelayerAction.ExitPool,qe,ge,Ne,Ke,ot,Ct),ke.signSwapAuthorization=(qe,ge,Ne,Ke,ot,Ct)=>ke.signAuthorizationFor(E.RelayerAction.Swap,qe,ge,Ne,Ke,ot,Ct),ke.signBatchSwapAuthorization=(qe,ge,Ne,Ke,ot,Ct)=>ke.signAuthorizationFor(E.RelayerAction.BatchSwap,qe,ge,Ne,Ke,ot,Ct),ke.signSetRelayerApprovalAuthorization=(qe,ge,Ne,Ke,ot,Ct)=>ke.signAuthorizationFor(E.RelayerAction.SetRelayerApproval,qe,ge,Ne,Ke,ot,Ct),ke.signAuthorizationFor=function(){var qe=ie(function*(ge,Ne,Ke,ot,Ct,Vt=x.MaxUint256,Ht){const{chainId:un}=yield Ne.provider.getNetwork();if(!Ht){const fr=yield Ke.getAddress();Ht=yield Ne.getNextNonce(fr)}const pn={name:"Balancer V2 Vault",version:"1",chainId:un,verifyingContract:Ne.address},yn={[ge]:[{name:"calldata",type:"bytes"},{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},Zn={calldata:Ct,sender:yield _e(ot),nonce:Ht.toString(),deadline:Vt.toString()};return Ke._signTypedData(pn,yn,Zn)});return function(ge,Ne,Ke,ot,Ct){return qe.apply(this,arguments)}}();let me=(()=>{class qe{constructor(){}}return qe.signSetMinterApproval=function(){var ge=ie(function*(Ne,Ke,ot,Ct,Vt=x.MaxUint256,Ht){const{chainId:un}=yield Ne.provider.getNetwork();if(!Ht){const fr=yield Ct.getAddress();Ht=yield Ne.getNextNonce(fr)}const pn={name:"Balancer Minter",version:"1",chainId:un,verifyingContract:Ne.address},yn={minter:yield _e(Ke),approval:ot,nonce:Ht.toString(),deadline:Vt.toString()},Zn=yield Ct._signTypedData(pn,{SetMinterApproval:[{name:"minter",type:"address"},{name:"approval",type:"bool"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},yn);return{...b.splitSignature(Zn),deadline:f.BigNumber.from(Vt)}});return function(Ne,Ke,ot,Ct){return ge.apply(this,arguments)}}(),qe})();const Ee=BigInt(0),ze=BigInt(1),Ve=BigInt("1000000000000000000"),nt=(qe,ge)=>{if(!qe)throw new Error(ge)};function tt(qe){const ge=BigInt(18)-qe;return Ve*BigInt(10)**ge}function mt(qe,ge){return wt.mulDownFixed(qe,ge)}function ht(qe,ge){const Ne=new Array(qe.length);for(let Ke=0;Ke=0&&Ke>=ge||Ne<0&&Ke=Ne?ge:Ne}static min(ge,Ne){return ge=this.MIN_NATURAL_EXPONENT&&ge<=this.MAX_NATURAL_EXPONENT,"Errors.INVALID_EXPONENT"),ge<0)return this.ONE_18*this.ONE_18/this.exp(BigInt(-1)*ge);let Ne;ge>=this.x0?(ge-=this.x0,Ne=this.a0):ge>=this.x1?(ge-=this.x1,Ne=this.a1):Ne=BigInt(1),ge*=BigInt(100);let Ke=this.ONE_20;ge>=this.x2&&(ge-=this.x2,Ke=Ke*this.a2/this.ONE_20),ge>=this.x3&&(ge-=this.x3,Ke=Ke*this.a3/this.ONE_20),ge>=this.x4&&(ge-=this.x4,Ke=Ke*this.a4/this.ONE_20),ge>=this.x5&&(ge-=this.x5,Ke=Ke*this.a5/this.ONE_20),ge>=this.x6&&(ge-=this.x6,Ke=Ke*this.a6/this.ONE_20),ge>=this.x7&&(ge-=this.x7,Ke=Ke*this.a7/this.ONE_20),ge>=this.x8&&(ge-=this.x8,Ke=Ke*this.a8/this.ONE_20),ge>=this.x9&&(ge-=this.x9,Ke=Ke*this.a9/this.ONE_20);let ot,Ct=this.ONE_20;return ot=ge,Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(2),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(3),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(4),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(5),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(6),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(7),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(8),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(9),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(10),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(11),Ct+=ot,ot=ot*ge/this.ONE_20/BigInt(12),Ct+=ot,Ke*Ct/this.ONE_20*Ne/BigInt(100)}static _ln_36(ge){const Ne=((ge*=this.ONE_18)-this.ONE_36)*this.ONE_36/(ge+this.ONE_36),Ke=Ne*Ne/this.ONE_36;let ot=Ne,Ct=ot;return ot=ot*Ke/this.ONE_36,Ct+=ot/BigInt(3),ot=ot*Ke/this.ONE_36,Ct+=ot/BigInt(5),ot=ot*Ke/this.ONE_36,Ct+=ot/BigInt(7),ot=ot*Ke/this.ONE_36,Ct+=ot/BigInt(9),ot=ot*Ke/this.ONE_36,Ct+=ot/BigInt(11),ot=ot*Ke/this.ONE_36,Ct+=ot/BigInt(13),ot=ot*Ke/this.ONE_36,Ct+=ot/BigInt(15),Ct*BigInt(2)}static _ln(ge){if(ge=this.a0*this.ONE_18&&(ge/=this.a0,Ne+=this.x0),ge>=this.a1*this.ONE_18&&(ge/=this.a1,Ne+=this.x1),Ne*=BigInt(100),(ge*=BigInt(100))>=this.a2&&(ge=ge*this.ONE_20/this.a2,Ne+=this.x2),ge>=this.a3&&(ge=ge*this.ONE_20/this.a3,Ne+=this.x3),ge>=this.a4&&(ge=ge*this.ONE_20/this.a4,Ne+=this.x4),ge>=this.a5&&(ge=ge*this.ONE_20/this.a5,Ne+=this.x5),ge>=this.a6&&(ge=ge*this.ONE_20/this.a6,Ne+=this.x6),ge>=this.a7&&(ge=ge*this.ONE_20/this.a7,Ne+=this.x7),ge>=this.a8&&(ge=ge*this.ONE_20/this.a8,Ne+=this.x8),ge>=this.a9&&(ge=ge*this.ONE_20/this.a9,Ne+=this.x9),ge>=this.a10&&(ge=ge*this.ONE_20/this.a10,Ne+=this.x10),ge>=this.a11&&(ge=ge*this.ONE_20/this.a11,Ne+=this.x11);const Ke=(ge-this.ONE_20)*this.ONE_20/(ge+this.ONE_20),ot=Ke*Ke/this.ONE_20;let Ct=Ke,Vt=Ct;return Ct=Ct*ot/this.ONE_20,Vt+=Ct/BigInt(3),Ct=Ct*ot/this.ONE_20,Vt+=Ct/BigInt(5),Ct=Ct*ot/this.ONE_20,Vt+=Ct/BigInt(7),Ct=Ct*ot/this.ONE_20,Vt+=Ct/BigInt(9),Ct=Ct*ot/this.ONE_20,Vt+=Ct/BigInt(11),Vt*=BigInt(2),(Ne+Vt)/BigInt(100)}}Pt.ONE_18=BigInt("1000000000000000000"),Pt.ONE_20=BigInt("100000000000000000000"),Pt.ONE_36=BigInt("1000000000000000000000000000000000000"),Pt.MAX_NATURAL_EXPONENT=BigInt("130000000000000000000"),Pt.MIN_NATURAL_EXPONENT=BigInt("-41000000000000000000"),Pt.LN_36_LOWER_BOUND=BigInt(Pt.ONE_18)-BigInt("100000000000000000"),Pt.LN_36_UPPER_BOUND=BigInt(Pt.ONE_18)+BigInt("100000000000000000"),Pt.MILD_EXPONENT_BOUND=BigInt(2)**BigInt(254)/Pt.ONE_20,Pt.x0=BigInt("128000000000000000000"),Pt.a0=BigInt("38877084059945950922200000000000000000000000000000000000"),Pt.x1=BigInt("64000000000000000000"),Pt.a1=BigInt("6235149080811616882910000000"),Pt.x2=BigInt("3200000000000000000000"),Pt.a2=BigInt("7896296018268069516100000000000000"),Pt.x3=BigInt("1600000000000000000000"),Pt.a3=BigInt("888611052050787263676000000"),Pt.x4=BigInt("800000000000000000000"),Pt.a4=BigInt("298095798704172827474000"),Pt.x5=BigInt("400000000000000000000"),Pt.a5=BigInt("5459815003314423907810"),Pt.x6=BigInt("200000000000000000000"),Pt.a6=BigInt("738905609893065022723"),Pt.x7=BigInt("100000000000000000000"),Pt.a7=BigInt("271828182845904523536"),Pt.x8=BigInt("50000000000000000000"),Pt.a8=BigInt("164872127070012814685"),Pt.x9=BigInt("25000000000000000000"),Pt.a9=BigInt("128402541668774148407"),Pt.x10=BigInt("12500000000000000000"),Pt.a10=BigInt("113314845306682631683"),Pt.x11=BigInt("6250000000000000000"),Pt.a11=BigInt("106449445891785942956");const st=(qe,ge)=>{let Ne=qe.tokens.map(li=>li.address),Ke=qe.tokens.map(li=>li.decimals?li.decimals.toString():void 0),ot=Ke.map(li=>tt(BigInt(li))),Ct=qe.tokens.map(li=>f.parseFixed(li.balance,li.decimals).toString()),Vt=qe.tokens.map(li=>f.parseFixed(li.balance,18).toString()),Ht=qe.tokens.map(li=>li.weight?f.parseFixed(li.weight,18).toString():void 0),un=qe.tokens.map(li=>li.priceRate?f.parseFixed(li.priceRate,18).toString():void 0);if(ge){const li=new X(ge);let bi;[Ne,Ke,bi,Ct,Vt,Ht,un]=li.sortTokens(Ne,Ke,ot,Ct,Vt,Ht,un),ot=bi.map(BigInt)}const pn=qe.amp?f.parseFixed(qe.amp,3).toString():void 0,yn=f.parseFixed(qe.totalShares,18).toString(),Zn=f.parseFixed(qe.swapFee,18).toString(),fr=[],zr=[],ci=[],ai=Ne.indexOf(qe.address);return-1!==ai&&ot.forEach((li,bi)=>{bi!==ai&&(fr.push(ot[bi]),zr.push(Ne[bi]),ci.push(Ct[bi]))}),{parsedTokens:Ne,parsedDecimals:Ke,parsedBalances:Ct,parsedWeights:Ht,parsedPriceRates:un,parsedAmp:pn,parsedTotalShares:yn,parsedSwapFee:Zn,upScaledBalances:Vt,scalingFactors:ot,scalingFactorsWithoutBpt:fr,parsedTokensWithoutBpt:zr,parsedBalancesWithoutBpt:ci,bptIndex:ai}},Ye={Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",WETH:"0x0000000000000000000000000000000000000000",BAL:"0x0000000000000000000000000000000000000000"}},gt={[E.Network.KOVAN]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",WETH:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",BAL:"0xcb355677E36f390Ccc4a5d4bEADFbF1Eb2071c81",bbaUSD:"0x8fd162f338B770F7E879030830cDe9173367f301"},PriceChainMap:{"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x1c8e3bcb3378a443cc591f154c5ce0ebb4da9648":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","0x8f4bebf498cc624a0797fe64114a6ff169eee078":"0xbc396689893d065f41bc2c6ecbee5e0085233447","0xaf9ac3235be96ed496db7969f60d354fe5e426b0":"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2","0xcb355677e36f390ccc4a5d4beadfbf1eb2071c81":"0xba100000625a3754423978a60c9317c58a424e3d","0xc2569dd7d0fd715b054fbf16e75b001e5c0c1115":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x04df6e4121c27713ed22341e7c7df330f56f289b":"0x6b175474e89094c44da98b954eedeac495271d0f","0x4803bb90d18a1cb7a2187344fe4feb0e07878d05":"0xae7ab96520de3a18e5e111b5eaab095312d7fe84","0xff795577d9ac8bd7d90ee22b6c1703490b6512fd":"0x6b175474e89094c44da98b954eedeac495271d0f","0xe22da380ee6b445bb8273c81944adeb6e8450422":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x13512979ade267ab5100878e2e0f485b568328a4":"0xdac17f958d2ee523a2206206994597c13d831ec7","0xa387b91e393cfb9356a460370842bc8dbb2f29af":"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0"}},[E.Network.GOERLI]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","USDT","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",WETH:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",BAL:"0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47",bbaUSD:"0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd"},PriceChainMap:{"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x37f03a12241e9fd3658ad6777d289c3fb8512bc9":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","0xfa8449189744799ad2ace7e0ebac8bb7575eff47":"0xba100000625a3754423978a60c9317c58a424e3d","0xe0c9275e44ea80ef17579d33c55136b7da269aeb":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x8c9e6c40d3402480ace624730524facc5482798c":"0x6b175474e89094c44da98b954eedeac495271d0f","0x1f1f156e0317167c11aa412e3d1435ea29dc3cce":"0xdac17f958d2ee523a2206206994597c13d831ec7","0x4cb1892fddf14f772b2e39e299f44b2e5da90d04":"0x3ed3b47dd13ec9a98b44e6204a523e766b225811","0x811151066392fd641fe74a9b55a712670572d161":"0xbcca60bb61934080951369a648fb03df4f96263c","0x89534a24450081aa267c79b07411e9617d984052":"0x028171bca77440897b824ca71d1c56cac55b68a3","0x829f35cebbcd47d3c120793c12f7a232c903138b":"0x956f47f50a910163d8bf957cf5846d573e7f87ca","0xff386a3d08f80ac38c77930d173fa56c6286dc8b":"0x6810e776880c02933d47db1b9fc05908e5386b96"}},[E.Network.MAINNET]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",WETH:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",bbaUSD:"0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",bbaUSDv2:"0xA13a9247ea42D743238089903570127DdA72fE44"}},[E.Network.POLYGON]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3"}},[E.Network.ARBITRUM]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",WETH:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",BAL:"0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8"}},[E.Network.GNOSIS]:{Popular:{Symbols:["xDAI","WXDAI","WETH","BAL"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",WETH:"0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",BAL:"0x7eF541E2a22058048904fE5744f9c7E4C57AF717"}}};function St(qe){return gt[qe]?gt[qe]:Ye}var Wt,dn,Nt,It,qt,jt,Yt;E.PoolGaugesAttributes=void 0,(Wt=E.PoolGaugesAttributes||(E.PoolGaugesAttributes={})).Id="id",Wt.Address="address",Wt.PoolId="poolId",E.PoolShareAttributes=void 0,(dn=E.PoolShareAttributes||(E.PoolShareAttributes={})).Balance="balance",dn.Id="id",dn.PoolId="poolId",dn.UserAddress="userAddress",E.GaugeShareAttributes=void 0,(Nt=E.GaugeShareAttributes||(E.GaugeShareAttributes={})).Id="id",Nt.UserAddress="user",Nt.GaugeId="gauge",Nt.Balance="balance",E.PoolSpecialization=void 0,(It=E.PoolSpecialization||(E.PoolSpecialization={}))[It.GeneralPool=0]="GeneralPool",It[It.MinimalSwapInfoPool=1]="MinimalSwapInfoPool",It[It.TwoTokenPool=2]="TwoTokenPool",E.UserBalanceOpKind=void 0,(qt=E.UserBalanceOpKind||(E.UserBalanceOpKind={}))[qt.DepositInternal=0]="DepositInternal",qt[qt.WithdrawInternal=1]="WithdrawInternal",qt[qt.TransferInternal=2]="TransferInternal",qt[qt.TransferExternal=3]="TransferExternal",E.PoolBalanceOpKind=void 0,(jt=E.PoolBalanceOpKind||(E.PoolBalanceOpKind={}))[jt.Withdraw=0]="Withdraw",jt[jt.Deposit=1]="Deposit",jt[jt.Update=2]="Update",E.PoolType=void 0,(Yt=E.PoolType||(E.PoolType={})).Weighted="Weighted",Yt.Investment="Investment",Yt.Stable="Stable",Yt.HighAmpComposableStable="HighAmpComposableStable",Yt.ComposableStable="ComposableStable",Yt.MetaStable="MetaStable",Yt.StablePhantom="StablePhantom",Yt.LiquidityBootstrapping="LiquidityBootstrapping",Yt.AaveLinear="AaveLinear",Yt.Linear="Linear",Yt.EulerLinear="EulerLinear",Yt.ERC4626Linear="ERC4626Linear",Yt.Element="Element",Yt.Gyro2="Gyro2",Yt.Gyro3="Gyro3",Yt.Managed="Managed";let Wn=!1,fn=!1;const $n={debug:1,default:2,info:2,warning:3,error:4,off:5};let Yr=$n.default,Ln=null;const Bn=function(){try{const qe=[];if(["NFD","NFC","NFKD","NFKC"].forEach(ge=>{try{if("test"!=="test".normalize(ge))throw new Error("bad normalize")}catch{qe.push(ge)}}),qe.length)throw new Error("missing "+qe.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(qe){return qe.message}return null}();var $r,Gn,qe;(qe=$r||($r={})).DEBUG="DEBUG",qe.INFO="INFO",qe.WARNING="WARNING",qe.ERROR="ERROR",qe.OFF="OFF",function(qe){qe.UNKNOWN_ERROR="UNKNOWN_ERROR",qe.NOT_IMPLEMENTED="NOT_IMPLEMENTED",qe.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",qe.NETWORK_ERROR="NETWORK_ERROR",qe.SERVER_ERROR="SERVER_ERROR",qe.TIMEOUT="TIMEOUT",qe.BUFFER_OVERRUN="BUFFER_OVERRUN",qe.NUMERIC_FAULT="NUMERIC_FAULT",qe.MISSING_NEW="MISSING_NEW",qe.INVALID_ARGUMENT="INVALID_ARGUMENT",qe.MISSING_ARGUMENT="MISSING_ARGUMENT",qe.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",qe.CALL_EXCEPTION="CALL_EXCEPTION",qe.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",qe.NONCE_EXPIRED="NONCE_EXPIRED",qe.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",qe.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",qe.TRANSACTION_REPLACED="TRANSACTION_REPLACED",qe.ACTION_REJECTED="ACTION_REJECTED"}(Gn||(Gn={}));const bn="0123456789abcdef";class Lr{constructor(ge){Object.defineProperty(this,"version",{enumerable:!0,value:ge,writable:!1})}_log(ge,Ne){const Ke=ge.toLowerCase();null==$n[Ke]&&this.throwArgumentError("invalid log level name","logLevel",ge),Yr>$n[Ke]||console.log.apply(console,Ne)}debug(...ge){this._log(Lr.levels.DEBUG,ge)}info(...ge){this._log(Lr.levels.INFO,ge)}warn(...ge){this._log(Lr.levels.WARNING,ge)}makeError(ge,Ne,Ke){if(fn)return this.makeError("censored error",Ne,{});Ne||(Ne=Lr.errors.UNKNOWN_ERROR),Ke||(Ke={});const ot=[];Object.keys(Ke).forEach(un=>{const pn=Ke[un];try{if(pn instanceof Uint8Array){let yn="";for(let Zn=0;Zn>4],yn+=bn[15&pn[Zn]];ot.push(un+"=Uint8Array(0x"+yn+")")}else ot.push(un+"="+JSON.stringify(pn))}catch{ot.push(un+"="+JSON.stringify(Ke[un].toString()))}}),ot.push(`code=${Ne}`),ot.push(`version=${this.version}`);const Ct=ge;let Vt="";switch(Ne){case Gn.NUMERIC_FAULT:{Vt="NUMERIC_FAULT";const un=ge;switch(un){case"overflow":case"underflow":case"division-by-zero":Vt+="-"+un;break;case"negative-power":case"negative-width":Vt+="-unsupported";break;case"unbound-bitwise-result":Vt+="-unbound-result"}break}case Gn.CALL_EXCEPTION:case Gn.INSUFFICIENT_FUNDS:case Gn.MISSING_NEW:case Gn.NONCE_EXPIRED:case Gn.REPLACEMENT_UNDERPRICED:case Gn.TRANSACTION_REPLACED:case Gn.UNPREDICTABLE_GAS_LIMIT:Vt=Ne}Vt&&(ge+=" [ See: https://links.ethers.org/v5-errors-"+Vt+" ]"),ot.length&&(ge+=" ("+ot.join(", ")+")");const Ht=new Error(ge);return Ht.reason=Ct,Ht.code=Ne,Object.keys(Ke).forEach(function(un){Ht[un]=Ke[un]}),Ht}throwError(ge,Ne,Ke){throw this.makeError(ge,Ne,Ke)}throwArgumentError(ge,Ne,Ke){return this.throwError(ge,Lr.errors.INVALID_ARGUMENT,{argument:Ne,value:Ke})}assert(ge,Ne,Ke,ot){ge||this.throwError(Ne,Ke,ot)}assertArgument(ge,Ne,Ke,ot){ge||this.throwArgumentError(Ne,Ke,ot)}checkNormalize(ge){Bn&&this.throwError("platform missing String.prototype.normalize",Lr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Bn})}checkSafeUint53(ge,Ne){"number"==typeof ge&&(null==Ne&&(Ne="value not safe"),(ge<0||ge>=9007199254740991)&&this.throwError(Ne,Lr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:ge}),ge%1&&this.throwError(Ne,Lr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:ge}))}checkArgumentCount(ge,Ne,Ke){Ke=Ke?": "+Ke:"",geNe&&this.throwError("too many arguments"+Ke,Lr.errors.UNEXPECTED_ARGUMENT,{count:ge,expectedCount:Ne})}checkNew(ge,Ne){ge!==Object&&null!=ge||this.throwError("missing new",Lr.errors.MISSING_NEW,{name:Ne.name})}checkAbstract(ge,Ne){ge===Ne?this.throwError("cannot instantiate abstract class "+JSON.stringify(Ne.name)+" directly; use a sub-class",Lr.errors.UNSUPPORTED_OPERATION,{name:ge.name,operation:"new"}):ge!==Object&&null!=ge||this.throwError("missing new",Lr.errors.MISSING_NEW,{name:Ne.name})}static globalLogger(){return Ln||(Ln=new Lr("logger/5.7.0")),Ln}static setCensorship(ge,Ne){if(!ge&&Ne&&this.globalLogger().throwError("cannot permanently disable censorship",Lr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Wn){if(!ge)return;this.globalLogger().throwError("error censorship permanent",Lr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}fn=!!ge,Wn=!!Ne}static setLogLevel(ge){const Ne=$n[ge.toLowerCase()];null!=Ne?Yr=Ne:Lr.globalLogger().warn("invalid log level - "+ge)}static from(ge){return new Lr(ge)}}Lr.errors=Gn,Lr.levels=$r;const Kn=new Lr("units/5.7.0"),sr=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ii(qe,ge){if("string"==typeof ge){const Ne=sr.indexOf(ge);-1!==Ne&&(ge=3*Ne)}return f.formatFixed(qe,ge??18)}function Un(qe,ge){if("string"!=typeof qe&&Kn.throwArgumentError("value must be a string","value",qe),"string"==typeof ge){const Ne=sr.indexOf(ge);-1!==Ne&&(ge=3*Ne)}return f.parseFixed(qe,ge??18)}const ir={[E.Network.MAINNET]:{waUSDT:"0xf8fd466f12e236f4c96f7cce6c79eadb819abf58",waUSDC:"0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de",waDAI:"0x02d60b84491589974263d922d9cc7a3152618ef6"},[E.Network.POLYGON]:{wamDAI:"0xee029120c72b0607344f35b17cdd90025e647b00",wamUSDC:"0x221836a597948dce8f3568e044ff123108acc42a",wamUSDT:"0x19c60a251e525fa88cd6f3768416a8024e98fc19"}},ts={...ir[E.Network.MAINNET],...ir[E.Network.POLYGON]},Tn={[E.Network.MAINNET]:{[ir[E.Network.MAINNET].waUSDT]:{aToken:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",underlying:"0xdac17f958d2ee523a2206206994597c13d831ec7"},[ir[E.Network.MAINNET].waUSDC]:{aToken:"0xbcca60bb61934080951369a648fb03df4f96263c",underlying:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},[ir[E.Network.MAINNET].waDAI]:{aToken:"0x028171bca77440897b824ca71d1c56cac55b68a3",underlying:"0x6b175474e89094c44da98b954eedeac495271d0f"}},[E.Network.POLYGON]:{[ir[E.Network.POLYGON].wamUSDT]:{aToken:"0x60d55f02a771d515e077c9c2403a1ef324885cec",underlying:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"},[ir[E.Network.POLYGON].wamUSDC]:{aToken:"0x1a13f4ca1d028320a707d99520abfefca3998b7f",underlying:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174"},[ir[E.Network.POLYGON].wamDAI]:{aToken:"0x27f8d03b3a2196956ed754badc28d73be8830a6e",underlying:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}},Qn={[E.Network.MAINNET]:Object.values(Tn[E.Network.MAINNET]).map(qe=>qe.aToken),[E.Network.POLYGON]:Object.values(Tn[E.Network.POLYGON]).map(qe=>qe.aToken)},Vi={[E.Network.MAINNET]:Object.values(Tn[E.Network.MAINNET]).map(qe=>qe.underlying),[E.Network.POLYGON]:Object.values(Tn[E.Network.POLYGON]).map(qe=>qe.underlying)},ar={[E.Network.MAINNET]:Object.fromEntries(Object.keys(Tn[E.Network.MAINNET]).map(qe=>[Tn[E.Network.MAINNET][qe].underlying,qe])),[E.Network.POLYGON]:Object.fromEntries(Object.keys(Tn[E.Network.POLYGON]).map(qe=>[Tn[E.Network.POLYGON][qe].underlying,qe]))},br={[E.Network.MAINNET]:"https://api.thegraph.com/subgraphs/name/aave/protocol-v2",[E.Network.POLYGON]:"https://api.thegraph.com/subgraphs/name/aave/aave-v2-matic"},ki=function(){var qe=ie(function*(ge){const Ne=Object.fromEntries(Object.keys(Tn).map(Ke=>[Ke,0]));if(!ge||ge!=E.Network.MAINNET&&ge!=E.Network.POLYGON)return Ne;try{const Ke={operationName:"getReserves",query:"\n query getReserves($aTokens: [String!], $underlyingAssets: [Bytes!]) {\n reserves(\n where: {\n aToken_in: $aTokens\n underlyingAsset_in: $underlyingAssets\n isActive: true\n }\n ) {\n underlyingAsset\n liquidityRate\n }\n }\n",variables:{aTokens:Qn[ge],underlyingAssets:Vi[ge]}},ot=yield R.default.post(br[ge],Ke),{data:{reserves:Ct}}=ot.data,Vt=Ct.map(Ht=>[ar[ge][Ht.underlyingAsset],Math.round(1e4*parseFloat(Ii(f.BigNumber.from(Ht.liquidityRate),27)))]);return Object.fromEntries(Vt)}catch{return Ne}});return function(Ne){return qe.apply(this,arguments)}}();function ur(qe,ge){let Ne=qe.toLowerCase();return Ne=mr(Ne,ge),Ne=Fr(Ne,ge),Ne}const mr=(qe,ge)=>{const Ne=St(ge).PriceChainMap;return Ne&&Ne[qe.toLowerCase()]||qe},Fr=(qe,ge)=>{const Ne=qe.toLocaleLowerCase(),Ke=ge;return null!=Tn[Ke]&&null!=Tn[Ke]&&Object.keys(Tn[Ke]).includes(Ne)?Tn[Ke][Ne].aToken:Ne};class hi{constructor(ge,Ne=200){this.fn=ge,this.wait=Ne,this.requestSet=new Set,this.promisedCalls=[],this.promisedCount=0,this.debounceCancel=()=>{}}fetch(ge){if(ge&&this.requestSet.add(ge),this.promisedCalls[this.promisedCount])return this.promisedCalls[this.promisedCount].promise;this.promisedCalls[this.promisedCount]=(()=>{let Ct=()=>{},Vt=()=>{};return{promise:new Promise((Ht,un)=>{[Ct,Vt]=[Ht,un]}),reject:Vt,resolve:Ct}})();const{promise:Ne,resolve:Ke,reject:ot}=this.promisedCalls[this.promisedCount];return this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.promisedCount++;const Ct=[...this.requestSet];this.requestSet.clear(),this.fn(Ct).then(Vt=>{Ke(Vt),this.debounceCancel=()=>{}}).catch(Vt=>{Vt.response&&Vt.response.data&&Vt.response.data.error&&(Vt=Vt.response.data.error),ot(Vt)})},this.wait),this.debounceCancel=()=>{this.timeout&&clearTimeout(this.timeout),ot("Cancelled"),delete this.promisedCalls[this.promisedCount]},Ne}}function wi(qe,ge){const Ne=new RegExp(`[0-9]+\\.?[0-9]{0,${ge}}`),Ke=qe.match(Ne);let ot=qe;return Ke&&(ot=Ke[0]),f.parseFixed(ot,ge)}function cs(qe,ge){return f.formatFixed(qe,ge).replace(/(.0$)/,"")}function $i(qe){return wi(qe,18).toBigInt()}const rs=(qe,ge)=>T.getAddress(qe)===T.getAddress(ge);function Xi(qe,ge,Ne){return[...qe.slice(0,ge),Ne,...qe.slice(ge)]}class $s{format(ge){return ge}}class is{constructor(){this.operatorMap={gt:"_gt",lt:"_lt",eq:"",in:"_in",not_in:"_not_in",contains:"_contains"}}format(ge){const Ne={};return ge.where&&Object.entries(ge.where).forEach(([Ke,ot])=>{Object.entries(ot).forEach(([Ct,Vt])=>{Ne[`${Ke}${this.operatorMap[Ct]}`]=Vt})}),{...ge,where:Ne}}}class go{constructor(ge){this.args=ge}merge(ge){const Ne=u.mergeWith(this.args,ge.args,(Ke,ot)=>{if(Array.isArray(Ke))return Ke.concat(ot)});return new go(Ne)}format(ge){return ge.format(this.args)}}var ji;function so(qe,ge,Ne,Ke,ot,Ct){const Vt=new Array(ot.length).fill(x.Zero);return ot.forEach((Ht,un)=>{if(qe.some(pn=>rs(Ht,pn))){const pn=f.BigNumber.from(Ct).add(x.WeiPerEther);Vt[un]=Vt[un].add(Ne===E.SwapType.SwapExactOut?f.BigNumber.from(Ke[un]).mul(pn).div(x.WeiPerEther):Ke[un])}if(ge.some(pn=>rs(Ht,pn))){const pn=x.WeiPerEther.sub(f.BigNumber.from(Ct));Vt[un]=Vt[un].add(Ne===E.SwapType.SwapExactIn?f.BigNumber.from(Ke[un]).mul(pn).div(x.WeiPerEther):Ke[un])}}),Vt}E.SwapType=void 0,(ji=E.SwapType||(E.SwapType={}))[ji.SwapExactIn=0]="SwapExactIn",ji[ji.SwapExactOut=1]="SwapExactOut";const oo=f.BigNumber.from("10000"),zo=(qe,ge)=>qe.mul(ge).div(oo),Wi=(qe,ge)=>{const Ne=zo(qe,ge);return qe.sub(Ne)},bo=(qe,ge)=>{const Ne=zo(qe,ge);return qe.add(Ne)},_s="0xBA12222222228d8Ba445958a75a0704d566BF2C8",Ao={[E.Network.MAINNET]:{chainId:E.Network.MAINNET,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",balancerHelpers:"0x5aDDCCa35b7A0D07C74063c48700C8590E87864E",lidoRelayer:"0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965",relayerV3:"0x886A3Ec7bcC508B8795990B60Fa21f85F9dB7948",relayerV4:"0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA",gaugeController:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",feeDistributor:"0xD3cf852898b21fc233251427c2DC93d3d604F3BB",protocolFeePercentagesProvider:"0x97207B095e4D5C9a6e4cfbfcd2C3358E03B90c4A",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",veBalProxy:"0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",weightedPoolFactory:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{wrappedNativeAsset:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",lbpRaisingTokens:["0x6B175474E89094C44Da98b954EedeAC495271d0F","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"],stETH:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",wstETH:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",bal:"0xba100000625a3754423978a60c9317c58a424e3d",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",bbaUsd:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks"},pools:{wETHwstETH:{id:"0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080",address:"0x32296969ef14eb0c6d29669c550d4a0449130230"}},poolsToIgnore:["0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee"],sorConnectingTokens:[{symbol:"wEth",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{symbol:"wstEth",address:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"},{symbol:"DOLA",address:"0x865377367054516e17014CcdED1e7d814EDC9ce4"}]},[E.Network.POLYGON]:{chainId:E.Network.POLYGON,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0xa1B2b503959aedD81512C37e9dce48164ec6a94d",relayerV3:"0xcf6a66E32dCa0e26AcC3426b851FD8aCbF12Dac7",relayerV4:"0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b",balancerHelpers:"0x239e55F427D44C3cc793f49bFB507ebe76638a2b",weightedPoolFactory:"0x0e39C3D9b2ec765eFd9c5c70BB290B1fCD8536E3",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{bal:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",wrappedNativeAsset:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks"},pools:{},poolsToIgnore:["0x600bd01b6526611079e12e1ff93aba7a3e34226f"],sorConnectingTokens:[{symbol:"weth",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"},{symbol:"bbrz2",address:"0xe22483774bd8611be2ad2f4194078dac9159f4ba"}]},[E.Network.ARBITRUM]:{chainId:E.Network.ARBITRUM,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x269ff446d9892c9e19082564df3f5e8741e190a1",relayerV3:"0x42E49B48573c725ee32d2579060Ed06894f97002",relayerV4:"0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5",balancerHelpers:"0x77d46184d22CA6a3726a2F500c776767b6A3d6Ab",weightedPoolFactory:"0x8df6EfEc5547e31B0eb7d1291B511FF8a2bf987c",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{bal:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",wrappedNativeAsset:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks"},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}]},[E.Network.KOVAN]:{chainId:E.Network.KOVAN,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x2cc8688C5f75E365aaEEb4ea8D6a480405A48D2A",veBal:"0x16ba924752EF283C7946db8A122a6742AA35C1DC",veBalProxy:"0x98D0d0a65cBeCCaa647a5a95cf27Cf2f00E1231C",balancerHelpers:"0x94905e703fEAd7f0fD0eEe355D267eE909784e6d",weightedPoolFactory:"0x8df6EfEc5547e31B0eb7d1291B511FF8a2bf987c"},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-kovan-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges"},pools:{}},[E.Network.ROPSTEN]:{chainId:E.Network.ROPSTEN,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x53c43764255c17bd724f74c4ef150724ac50a3ed",balancerHelpers:""},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges"},pools:{}},[E.Network.RINKEBY]:{chainId:E.Network.RINKEBY,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821",balancerHelpers:"0x5aDDCCa35b7A0D07C74063c48700C8590E87864E",weightedPoolFactory:"0x8df6EfEc5547e31B0eb7d1291B511FF8a2bf987c"},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-rinkeby-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges"},pools:{}},[E.Network.GOERLI]:{chainId:E.Network.GOERLI,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e",relayerV3:"0x7b9B6f094DC2Bd1c12024b0D9CC63d6993Be1888",relayerV4:"0x00e695aA8000df01B8DC8401B4C34Fba5D56BBb2",gaugeController:"0xBB1CE49b16d55A1f2c6e88102f32144C7334B116",veBal:"0x33A99Dcc4C85C014cf12626959111D5898bbCAbF",veBalProxy:"0xA1F107D1cD709514AE8A914eCB757E95f9cedB31",balancerHelpers:"0x5aDDCCa35b7A0D07C74063c48700C8590E87864E",weightedPoolFactory:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks"},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}]},[E.Network.OPTIMISM]:{chainId:E.Network.OPTIMISM,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x2dc0e2aa608532da689e89e237df582b783e552c",relayerV3:"0x195CcCBE464EF9073d1f7A1ba1C9Bf0f56dfFFff",relayerV4:"0x1a58897Ab366082028ced3740900ecBD765Af738",balancerHelpers:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",weightedPoolFactory:"0x0e39C3D9b2ec765eFd9c5c70BB290B1fCD8536E3",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{wrappedNativeAsset:"0x4200000000000000000000000000000000000006"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism",gaugesSubgraph:""},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}]},[E.Network.GNOSIS]:{chainId:E.Network.GNOSIS,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0xbb6fab6b627947dae0a75808250d8b2652952cb5",relayerV4:"0xeF606F58A4FD0fCcb066c6203d0994694d3eB2D3",balancerHelpers:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",weightedPoolFactory:"0xf302f9F50958c5593770FDf4d4812309fF77414f",composableStablePoolFactory:"0x76578ecf9a141296ec657847fb45b0585bcda3a6"},tokens:{wrappedNativeAsset:"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2",gaugesSubgraph:""},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"}]}},zi=qe=>Ao[qe].addresses;var Ms;E.BalancerErrorCode=void 0,(Ms=E.BalancerErrorCode||(E.BalancerErrorCode={})).SWAP_ZERO_RETURN_AMOUNT="SWAP_ZERO_RETURN_AMOUNT",Ms.UNWRAP_ZERO_AMOUNT="UNWRAP_ZERO_AMOUNT",Ms.WRAP_ZERO_AMOUNT="WRAP_ZERO_AMOUNT",Ms.QUERY_BATCH_SWAP="QUERY_BATCH_SWAP",Ms.POOL_DOESNT_EXIST="POOL_DOESNT_EXIST",Ms.UNSUPPORTED_POOL_TYPE="UNSUPPORTED_POOL_TYPE",Ms.UNSUPPORTED_PAIR="UNSUPPORTED_PAIR",Ms.NO_POOL_DATA="NO_POOL_DATA",Ms.INPUT_OUT_OF_BOUNDS="INPUT_OUT_OF_BOUNDS",Ms.INPUT_LENGTH_MISMATCH="INPUT_LENGTH_MISMATCH",Ms.INPUT_TOKEN_INVALID="INPUT_TOKEN_INVALID",Ms.INPUT_ZERO_NOT_ALLOWED="INPUT_ZERO_NOT_ALLOWED",Ms.INTERNAL_ERROR_INVALID_ABI="INTERNAL_ERROR_INVALID_ABI",Ms.TOKEN_MISMATCH="TOKEN_MISMATCH",Ms.MISSING_TOKENS="MISSING_TOKENS",Ms.MISSING_AMP="MISSING_AMP",Ms.MISSING_DECIMALS="MISSING_DECIMALS",Ms.MISSING_PRICE_RATE="MISSING_PRICE_RATE",Ms.MISSING_WEIGHT="MISSING_WEIGHT",Ms.RELAY_SWAP_AMOUNTS="RELAY_SWAP_AMOUNTS",Ms.NO_VALUE_PARAMETER="NO_VALUE_PARAMETER",Ms.ILLEGAL_PARAMETER="ILLEGAL_PARAMETER",Ms.TIMESTAMP_IN_THE_FUTURE="TIMESTAMP_IN_THE_FUTURE",Ms.JOIN_DELTA_AMOUNTS="JOIN_DELTA_AMOUNTS",Ms.EXIT_DELTA_AMOUNTS="EXIT_DELTA_AMOUNTS";class Oi extends Error{constructor(ge){super(Oi.getMessage(ge)),this.code=ge,this.name="BalancerError"}static getMessage(ge){switch(ge){case E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT:return"queryBatchSwapWithSor returned 0 amount";case E.BalancerErrorCode.UNWRAP_ZERO_AMOUNT:return"swapUnwrapAaveStaticExactIn unwrapped amount < 0";case E.BalancerErrorCode.WRAP_ZERO_AMOUNT:return"swapUnwrapAaveStaticExactOut wrapped amount < 0";case E.BalancerErrorCode.QUERY_BATCH_SWAP:return"queryBatchSwap on chain call error";case E.BalancerErrorCode.POOL_DOESNT_EXIST:return"balancer pool does not exist";case E.BalancerErrorCode.UNSUPPORTED_POOL_TYPE:return"unsupported pool type";case E.BalancerErrorCode.UNSUPPORTED_PAIR:return"unsupported token pair";case E.BalancerErrorCode.NO_POOL_DATA:return"no pool data";case E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS:return"input out of bounds";case E.BalancerErrorCode.INPUT_LENGTH_MISMATCH:return"input length mismatch";case E.BalancerErrorCode.INPUT_TOKEN_INVALID:return"input token invalid";case E.BalancerErrorCode.TOKEN_MISMATCH:return"token mismatch";case E.BalancerErrorCode.MISSING_DECIMALS:return"missing decimals";case E.BalancerErrorCode.MISSING_TOKENS:return"missing tokens";case E.BalancerErrorCode.MISSING_AMP:return"missing amp";case E.BalancerErrorCode.MISSING_PRICE_RATE:return"missing price rate";case E.BalancerErrorCode.MISSING_WEIGHT:return"missing weight";case E.BalancerErrorCode.INPUT_ZERO_NOT_ALLOWED:return"zero input not allowed";case E.BalancerErrorCode.RELAY_SWAP_AMOUNTS:return"Error when checking swap amounts";case E.BalancerErrorCode.NO_VALUE_PARAMETER:return"Illegal value passed as parameter";case E.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE:return"Timestamp cannot be in the future";case E.BalancerErrorCode.ILLEGAL_PARAMETER:return"An illegal parameter has been passed";case E.BalancerErrorCode.JOIN_DELTA_AMOUNTS:return"Error when checking join call deltas";case E.BalancerErrorCode.EXIT_DELTA_AMOUNTS:return"Error when checking exit call deltas";default:return"Unknown error"}}}class Lu{constructor(){this.buildExitExactBPTIn=({exiter:ge,pool:Ne,bptIn:Ke,slippage:ot,shouldUnwrapNativeAsset:Ct,wrappedNativeAsset:Vt,singleTokenMaxOut:Ht})=>{if(!Ke.length||f.parseFixed(Ke,18).isNegative())throw new Oi(E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(Ht&&Ht!==x.AddressZero&&!Ne.tokens.map(Xs=>Xs.address).some(Xs=>rs(Xs,Ht)))throw new Oi(E.BalancerErrorCode.TOKEN_MISMATCH);if(!Ct&&Ht===x.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenMaxOut should not have conflicting values");if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const{parsedTokens:un,parsedAmp:pn,parsedTotalShares:yn,parsedSwapFee:Zn,upScaledBalances:fr,scalingFactors:zr}=st(Ne),ci=un.map(Xs=>Xs===Vt?x.AddressZero:Xs),ai=new X(Vt),[li,bi,os]=ai.sortTokens(Ct?ci:un,fr,zr);let es,Ds=Array(un.length).fill("0"),ws=Array(un.length).fill("0");if(Ht){const Xs=un.indexOf(Ht),ao=o.StableMathBigInt._calcTokenOutGivenExactBptIn(BigInt(pn),bi.map(ia=>BigInt(ia)),Xs,BigInt(Ke),BigInt(yn),BigInt(Zn)).toString();Ds[Xs]=ao,ws[Xs]=Wi(f.BigNumber.from(ao),f.BigNumber.from(ot)).toString(),es=y.exitExactBPTInForOneTokenOut(Ke,Xs)}else{const Xs=function(ao,ia){const ic=new Array(ao.length);for(let od=0;odBigInt(ao)),BigInt(Ke),BigInt(yn)).map(ao=>ao.toString()).map(ao=>BigInt(ao)),os.map(ao=>BigInt(ao)));Ds=Xs.map(ao=>ao.toString()),ws=Xs.map(ao=>Wi(f.BigNumber.from(ao),f.BigNumber.from(ot)).toString()),es=y.exitExactBPTInForTokensOut(Ke)}const Us="exitPool",io={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:ws,userData:es,toInternalBalance:!1}};return{to:_s,functionName:Us,attributes:io,data:_.Vault__factory.createInterface().encodeFunctionData(Us,[io.poolId,io.sender,io.recipient,io.exitPoolRequest]),expectedAmountsOut:Ds,minAmountsOut:ws}},this.buildExitExactTokensOut=({exiter:ge,pool:Ne,tokensOut:Ke,amountsOut:ot,slippage:Ct,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const{parsedTokens:Ht,parsedAmp:un,parsedTotalShares:pn,parsedSwapFee:yn,upScaledBalances:Zn,scalingFactors:fr}=st(Ne),zr=new X(Vt),[,ci,ai]=zr.sortTokens(Ht,Zn,fr),[li,bi]=zr.sortTokens(Ke,ot),os=ht(bi.map(Xs=>BigInt(Xs)),ai.map(Xs=>BigInt(Xs))),es=o.StableMathBigInt._calcBptInGivenExactTokensOut(BigInt(un),ci.map(Xs=>BigInt(Xs)),os,BigInt(pn),BigInt(yn)).toString(),Ds=bo(f.BigNumber.from(es),f.BigNumber.from(Ct)).toString(),ws=y.exitBPTInForExactTokensOut(bi,Ds),Us="exitPool",io={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:bi,userData:ws,toInternalBalance:!1}};return{to:_s,functionName:Us,attributes:io,data:_.Vault__factory.createInterface().encodeFunctionData(Us,[io.poolId,io.sender,io.recipient,io.exitPoolRequest]),expectedBPTIn:es,maxBPTIn:Ds}}}}class Qa{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Ct,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(ia=>!ia.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const{parsedTokens:Ht,parsedAmp:un,parsedTotalShares:pn,parsedSwapFee:yn,scalingFactors:Zn,upScaledBalances:fr}=st(Ne),zr=new X(Vt),[ci,ai]=zr.sortTokens(Ke,ot),[,li,bi]=zr.sortTokens(Ht,fr,Zn),os=ht(ai.map(ia=>BigInt(ia)),bi.map(ia=>BigInt(ia))),es=o.StableMathBigInt._calcBptOutGivenExactTokensIn(BigInt(un),li.map(ia=>BigInt(ia)),os,BigInt(pn),BigInt(yn)).toString(),Ds=Wi(f.BigNumber.from(es),f.BigNumber.from(Ct)).toString(),ws=y.joinExactTokensInForBPTOut(ai,Ds),Us="joinPool",io={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:ci,maxAmountsIn:ai,userData:ws,fromInternalBalance:!1}},Xs=_.Vault__factory.createInterface().encodeFunctionData(Us,[io.poolId,io.sender,io.recipient,io.joinPoolRequest]),ao=ot.filter((ia,ic)=>Ke[ic]===x.AddressZero);return{to:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",functionName:Us,attributes:io,data:Xs,value:ao[0]?f.BigNumber.from(ao[0]):void 0,minBPTOut:Ds,expectedBPTOut:es}}}}class ja{calcTotal(ge){var Ne,Ke;let ot=f.BigNumber.from(0),Ct=f.BigNumber.from(0);for(let Vt=0;Vtes){if(Ds-es<=1)return Ds}else if(es-Ds<=1)return Ds}throw new Error("Errors.STABLE_INVARIANT_DIDNT_CONVERGE")}(qe,ge);let Vt=Ee,Ht=Ct/BigInt(ot);for(let ci=0;ci{if(!fr)throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);return BigInt(fr)});if(!Ct)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const un=BigInt(Vt),pn=Ht.map(fr=>tt(BigInt(fr))),yn=Ke.map((fr,zr)=>mt(BigInt(fr),pn[zr]));let Zn=Ee;for(let fr=0;frBigInt(Vt)));return Du(BigInt(Ke),Ct,ot).toString()}}class Eu{constructor(ge=new Lu,Ne=new Qa,Ke=new ja,ot=new xa,Ct=new Uu){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Ct}}class jo{calcPoolSpotPrice(ge,Ne,Ke){const ot=m.PhantomStablePool.fromPool(Ke),Ct=ot.parsePoolPairData(ge,Ne);return ot._spotPriceAfterSwapExactTokenInForTokenOut(Ct,m.ZERO).toString()}}class yo{bptZeroPriceImpact(ge,Ne){if(Ne.length!==ge.tokensList.length-1)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const Ke=u.cloneDeep(ge.tokensList),ot=Ke.findIndex(bi=>bi==ge.address),{parsedBalances:Ct,parsedDecimals:Vt,parsedPriceRates:Ht,parsedAmp:un,parsedTotalShares:pn}=st(ge),yn=Vt.map(bi=>{if(!bi)throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);return BigInt(bi)}),Zn=Ht.map(bi=>{if(!bi)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);return BigInt(bi)});if(!un)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const fr=BigInt(pn);Ke.splice(ot,1);const zr=yn.map(bi=>tt(BigInt(bi))),ci=Ct.map((bi,os)=>mt(BigInt(bi),zr[os]));if(Ne.length!==Ke.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);ci.splice(ot,1);const ai=ci.map((bi,os)=>wt.mulDownFixed(bi,Zn[os]));let li=Ee;for(let bi=0;biBigInt(Vt)));return Du(BigInt(Ke),Ct,ot).toString()}}class Vc{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Ct,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length-1)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);const Ht=new X(Vt),[,un]=Ht.sortTokens(Ke,ot),{parsedTokens:pn,parsedAmp:yn,parsedSwapFee:Zn,parsedTotalShares:fr,scalingFactorsWithoutBpt:zr,parsedBalancesWithoutBpt:ci,bptIndex:ai}=st(Ne,Vt);if(!yn)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const li=ht(un.map(BigInt),zr.map(BigInt)),bi=m.StableMathBigInt._calcBptOutGivenExactTokensIn(BigInt(yn),ci.map(BigInt),li,BigInt(fr),BigInt(Zn)).toString(),os=Wi(f.BigNumber.from(bi),f.BigNumber.from(Ct)).toString(),es=N.joinExactTokensInForBPTOut(un,os),Ds="joinPool",ws={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:pn,maxAmountsIn:Xi(un,ai,"0"),userData:es,fromInternalBalance:!1}},Zs=_.Vault__factory.createInterface().encodeFunctionData(Ds,[ws.poolId,ws.sender,ws.recipient,ws.joinPoolRequest]),Us=ot.filter((Xs,ao)=>Ke[ao]===x.AddressZero),io=Us[0]?f.BigNumber.from(Us[0]):void 0;return{to:_s,functionName:Ds,attributes:ws,data:Zs,value:io,minBPTOut:os,expectedBPTOut:bi}}}}class El{constructor(){this.buildExitExactBPTIn=({})=>{throw new Error("To be implemented")},this.buildExitExactTokensOut=({})=>{throw new Error("To be implemented")}}}class ec{constructor(ge=new El,Ne=new ja,Ke=new jo,ot=new yo,Ct=new Vc){this.exit=ge,this.liquidity=Ne,this.spotPriceCalculator=Ke,this.priceImpactCalculator=ot,this.join=Ct}}class kc{constructor(){this.buildExitExactBPTIn=({exiter:ge,pool:Ne,bptIn:Ke,slippage:ot,shouldUnwrapNativeAsset:Ct,wrappedNativeAsset:Vt,singleTokenMaxOut:Ht})=>{if(!Ke.length||f.parseFixed(Ke,18).isNegative())throw new Oi(E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(Ht&&Ht!==x.AddressZero&&!Ne.tokens.map(io=>io.address).some(io=>rs(io,Ht)))throw new Oi(E.BalancerErrorCode.TOKEN_MISMATCH);if(!Ct&&Ht===x.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenMaxOut should not have conflicting values");const{parsedTokens:un,parsedBalances:pn,parsedWeights:yn,parsedTotalShares:Zn,parsedSwapFee:fr}=st(Ne),zr=un.map(io=>io===Vt?x.AddressZero:io),ci=new X(Vt),[ai,li,bi]=ci.sortTokens(Ct?zr:un,pn,yn);let os,es=Array(ai.length).fill("0"),Ds=Array(ai.length).fill("0");if(Ht){const io=ai.indexOf(Ht),Xs=o.WeightedMaths._calcTokenOutGivenExactBptIn(BigInt(li[io]),BigInt(bi[io]),BigInt(Ke),BigInt(Zn),BigInt(fr)).toString();es[io]=Xs,Ds[io]=Wi(f.BigNumber.from(Xs),f.BigNumber.from(ot)).toString(),os=M.exitExactBPTInForOneTokenOut(Ke,io)}else es=o.WeightedMaths._calcTokensOutGivenExactBptIn(li.map(io=>BigInt(io)),BigInt(Ke),BigInt(Zn)).map(io=>io.toString()),Ds=es.map(io=>Wi(f.BigNumber.from(io),f.BigNumber.from(ot)).toString()),os=M.exitExactBPTInForTokensOut(Ke);const Zs="exitPool",Us={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:ai,minAmountsOut:Ds,userData:os,toInternalBalance:!1}};return{to:_s,functionName:Zs,attributes:Us,data:_.Vault__factory.createInterface().encodeFunctionData(Zs,[Us.poolId,Us.sender,Us.recipient,Us.exitPoolRequest]),expectedAmountsOut:es,minAmountsOut:Ds}},this.buildExitExactTokensOut=({exiter:ge,pool:Ne,tokensOut:Ke,amountsOut:ot,slippage:Ct,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const{parsedTokens:Ht,parsedBalances:un,parsedWeights:pn,parsedTotalShares:yn,parsedSwapFee:Zn}=st(Ne),fr=new X(Vt),[,zr,ci]=fr.sortTokens(Ht,un,pn),[ai,li]=fr.sortTokens(Ke,ot),bi=o.WeightedMaths._calcBptInGivenExactTokensOut(zr.map(Us=>BigInt(Us)),ci.map(Us=>BigInt(Us)),li.map(Us=>BigInt(Us)),BigInt(yn),BigInt(Zn)).toString(),os=bo(f.BigNumber.from(bi),f.BigNumber.from(Ct)).toString(),es=M.exitBPTInForExactTokensOut(li,os),ws="exitPool",Zs={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:ai,minAmountsOut:li,userData:es,toInternalBalance:!1}};return{to:_s,functionName:ws,attributes:Zs,data:_.Vault__factory.createInterface().encodeFunctionData(ws,[Zs.poolId,Zs.sender,Zs.recipient,Zs.exitPoolRequest]),expectedBPTIn:bi,maxBPTIn:os}}}}class Cc{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Ct,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(Ne.tokens.some(Xs=>!Xs.weight))throw new Oi(E.BalancerErrorCode.MISSING_WEIGHT);const{parsedTokens:Ht,parsedBalances:un,parsedWeights:pn,parsedTotalShares:yn,parsedSwapFee:Zn}=st(Ne),fr=new X(Vt),[zr,ci]=fr.sortTokens(Ke,ot),[,ai,li]=fr.sortTokens(Ht,un,pn),bi=m.WeightedMaths._calcBptOutGivenExactTokensIn(ai.map(Xs=>BigInt(Xs)),li.map(Xs=>BigInt(Xs)),ci.map(Xs=>BigInt(Xs)),BigInt(yn),BigInt(Zn)).toString(),os=Wi(f.BigNumber.from(bi),f.BigNumber.from(Ct)).toString(),es=M.joinExactTokensInForBPTOut(ci,os),ws="joinPool",Zs={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:zr,maxAmountsIn:ci,userData:es,fromInternalBalance:!1}},Us=_.Vault__factory.createInterface().encodeFunctionData(ws,[Zs.poolId,Zs.sender,Zs.recipient,Zs.joinPoolRequest]),io=ot.filter((Xs,ao)=>Ke[ao]===x.AddressZero);return{to:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",functionName:ws,attributes:Zs,data:Us,value:io[0]?f.BigNumber.from(io[0]):void 0,minBPTOut:os,expectedBPTOut:bi}}}}class eu{calcTotal(ge){var Ne;let Ke=f.BigNumber.from(0),ot=f.BigNumber.from(0);for(let Vt=0;VtVt.add(wi(Ht.weight||"0",18)),f.BigNumber.from(0));return Ke.gt(0)?cs(ot.mul(Ct).div(Ke),36):"0"}}class tu{calcPoolSpotPrice(ge,Ne,Ke){const ot=ge===Ke.address||Ne===Ke.address;ot&&(Ke.tokens.push({address:Ke.address,balance:Ke.totalShares,decimals:18,priceRate:"1",weight:"0"}),Ke.tokensList.push(Ke.address));const Ct=m.WeightedPool.fromPool(Ke),Vt=Ct.parsePoolPairData(ge,Ne),Ht=Ct._spotPriceAfterSwapExactTokenInForTokenOut(Vt,m.ZERO).toString();return ot&&(Ke.tokens.pop(),Ke.tokensList.pop()),Ht}}class aa{bptZeroPriceImpact(ge,Ne){if(Ne.length!==ge.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const{parsedBalances:Ke,parsedDecimals:ot,parsedTotalShares:Ct,parsedWeights:Vt}=st(ge),Ht=BigInt(Ct),un=u.cloneDeep(ge.tokensList);let pn=Ee;for(let yn=0;ynBigInt(Vt)));return Du(BigInt(Ke),Ct,ot).toString()}}class rl{constructor(ge=new kc,Ne=new Cc,Ke=new eu,ot=new tu,Ct=new aa){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Ct}}class Jr{constructor(){this.buildExitExactBPTIn=({exiter:ge,pool:Ne,bptIn:Ke,slippage:ot,shouldUnwrapNativeAsset:Ct,wrappedNativeAsset:Vt,singleTokenMaxOut:Ht})=>{if(!Ke.length||f.parseFixed(Ke,18).isNegative())throw new Oi(E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(Ht&&Ht!==x.AddressZero&&!Ne.tokens.map(ao=>ao.address).some(ao=>rs(ao,Ht)))throw new Oi(E.BalancerErrorCode.TOKEN_MISMATCH);if(!Ct&&Ht===x.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenMaxOut should not have conflicting values");if(Ne.tokens.some(ao=>!ao.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);if(Ne.tokens.some(ao=>!ao.priceRate))throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const{parsedTokens:un,parsedBalances:pn,parsedAmp:yn,parsedPriceRates:Zn,parsedTotalShares:fr,parsedSwapFee:zr}=st(Ne),ci=un.map(ao=>ao===Vt?x.AddressZero:ao),ai=new X(Vt),[li,bi,os]=ai.sortTokens(Ct?ci:un,pn,Zn),es=bi.map((ao,ia)=>f.BigNumber.from(ao).mul(f.BigNumber.from(os[ia])).div(f.parseFixed("1",18)).toString());let Ds,ws=Array(un.length).fill("0"),Zs=Array(un.length).fill("0");if(Ht){const ao=li.indexOf(Ht),ia=o.StableMathBigInt._calcTokenOutGivenExactBptIn(BigInt(yn),es.map(od=>BigInt(od)),ao,BigInt(Ke),BigInt(fr),BigInt(zr)).toString(),ic=f.BigNumber.from(ia).div(f.BigNumber.from(os[ao])).mul(f.parseFixed("1",18)).toString();ws[ao]=ic,Zs[ao]=Wi(f.BigNumber.from(ic),f.BigNumber.from(ot)).toString(),Ds=y.exitExactBPTInForOneTokenOut(Ke,ao)}else ws=o.StableMathBigInt._calcTokensOutGivenExactBptIn(es.map(ao=>BigInt(ao)),BigInt(Ke),BigInt(fr)).map(ao=>ao.toString()).map((ao,ia)=>f.BigNumber.from(ao).mul(f.parseFixed("1",18)).div(f.BigNumber.from(os[ia])).toString()),Zs=ws.map(ao=>Wi(f.BigNumber.from(ao),f.BigNumber.from(ot)).toString()),Ds=y.exitExactBPTInForTokensOut(Ke);const io="exitPool",Xs={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:Zs,userData:Ds,toInternalBalance:!1}};return{to:_s,functionName:io,attributes:Xs,data:_.Vault__factory.createInterface().encodeFunctionData(io,[Xs.poolId,Xs.sender,Xs.recipient,Xs.exitPoolRequest]),expectedAmountsOut:ws,minAmountsOut:Zs}},this.buildExitExactTokensOut=({exiter:ge,pool:Ne,tokensOut:Ke,amountsOut:ot,slippage:Ct,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(ia=>!ia.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);if(Ne.tokens.some(ia=>!ia.priceRate))throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const{parsedTokens:Ht,parsedBalances:un,parsedPriceRates:pn,parsedAmp:yn,parsedTotalShares:Zn,parsedSwapFee:fr}=st(Ne),zr=new X(Vt),[,ci,ai]=zr.sortTokens(Ht,un,pn),[li,bi]=zr.sortTokens(Ke,ot),os=bi.map((ia,ic)=>f.BigNumber.from(ia).mul(f.BigNumber.from(ai[ic])).div(f.parseFixed("1",18)).toString()),es=ci.map((ia,ic)=>f.BigNumber.from(ia).mul(f.BigNumber.from(ai[ic])).div(f.parseFixed("1",18)).toString()),Ds=o.StableMathBigInt._calcBptInGivenExactTokensOut(BigInt(yn),es.map(ia=>BigInt(ia)),os.map(ia=>BigInt(ia)),BigInt(Zn),BigInt(fr)).toString(),ws=bo(f.BigNumber.from(Ds),f.BigNumber.from(Ct)).toString(),Zs=y.exitBPTInForExactTokensOut(bi,ws),Us=bi.map((ia,ic)=>ia===os[ic]?ia:f.BigNumber.from(ia).sub(1).toString()),Xs="exitPool",ao={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:Us,userData:Zs,toInternalBalance:!1}};return{to:_s,functionName:Xs,attributes:ao,data:_.Vault__factory.createInterface().encodeFunctionData(Xs,[ao.poolId,ao.sender,ao.recipient,ao.exitPoolRequest]),expectedBPTIn:Ds,maxBPTIn:ws}}}}class Cr{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Ct,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(ic=>!ic.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);if(Ne.tokens.some(ic=>!ic.priceRate))throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const{parsedTokens:Ht,parsedBalances:un,parsedPriceRates:pn,parsedAmp:yn,parsedTotalShares:Zn,parsedSwapFee:fr}=st(Ne),zr=new X(Vt),[ci,ai]=zr.sortTokens(Ke,ot),[,li,bi]=zr.sortTokens(Ht,un,pn),os=ai.map((ic,od)=>f.BigNumber.from(ic).mul(f.BigNumber.from(bi[od])).div(f.parseFixed("1",18)).toString()),es=li.map((ic,od)=>f.BigNumber.from(ic).mul(f.BigNumber.from(bi[od])).div(f.parseFixed("1",18)).toString()),Ds=o.StableMathBigInt._calcBptOutGivenExactTokensIn(BigInt(yn),es.map(ic=>BigInt(ic)),os.map(ic=>BigInt(ic)),BigInt(Zn),BigInt(fr)).toString(),ws=Wi(f.BigNumber.from(Ds),f.BigNumber.from(Ct)).toString(),Zs=y.joinExactTokensInForBPTOut(ai,ws),io="joinPool",Xs={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:ci,maxAmountsIn:ai,userData:Zs,fromInternalBalance:!1}},ao=_.Vault__factory.createInterface().encodeFunctionData(io,[Xs.poolId,Xs.sender,Xs.recipient,Xs.joinPoolRequest]),ia=ot.filter((ic,od)=>Ke[od]===x.AddressZero);return{to:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",functionName:io,attributes:Xs,data:ao,value:ia[0]?f.BigNumber.from(ia[0]):void 0,minBPTOut:ws,expectedBPTOut:Ds}}}}class Sr{calcTotal(ge){var Ne,Ke;let ot=x.Zero,Ct=x.Zero;for(let Vt=0;Vt{if(!ai)throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);return BigInt(ai)}),yn=Ct.map(ai=>{if(!ai)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);return BigInt(ai)});if(!Vt)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const Zn=pn.map(ai=>tt(BigInt(ai))),fr=Ke.map((ai,li)=>mt(BigInt(ai),Zn[li])),zr=fr.map((ai,li)=>wt.mulDownFixed(ai,yn[li]));let ci=Ee;for(let ai=0;aiBigInt(Vt)));return Du(BigInt(Ke),Ct,ot).toString()}}class _o{constructor(ge=new Jr,Ne=new Cr,Ke=new Sr,ot=new Qi,Ct=new Vs){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Ct}}class ta{constructor(){this.buildExitExactBPTIn=({})=>{throw new Error("To be implemented")},this.buildExitExactTokensOut=({})=>{throw new Error("To be implemented")}}}class Tu{constructor(){this.buildJoin=({})=>{throw new Error("To be implemented")}}}class qo{constructor(ge=new ta,Ne=new Tu,Ke=new ja,ot=new jo,Ct=new yo){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Ct}}class xo{constructor(){this.buildExitExactBPTIn=({})=>{throw new Error("To be implemented")},this.buildExitExactTokensOut=({})=>{throw new Error("To be implemented")}}}class Wa{constructor(){this.buildJoin=({})=>{throw new Error("To be implemented")}}}const ou=wi("1",18);class Vu{calcTotal(ge){var Ne,Ke;let ot=x.Zero,Ct=x.Zero;for(let Vt=0;Vtpn.address!==ge.address),ot=yield Promise.all(Ke.map(function(){var pn=ie(function*(yn){const Zn=yield Ne.pools.findBy("address",yn.address);if(!Zn)return;const fr=wi(yield Ne.getLiquidity(Zn),18),zr=wi(Zn.totalShares,18),ci=wi(yn.balance,18),ai=zr.eq(0)?0:fr.mul(ci).div(zr);return{address:Zn.address,liquidity:ai.toString()}});return function(yn){return pn.apply(this,arguments)}}())),Ct=ot.reduce((pn,yn)=>pn.add(yn?yn.liquidity:f.BigNumber.from(0)),f.BigNumber.from(0)),Vt=Ke.filter(pn=>!ot.find(yn=>(null==yn?void 0:yn.address)===pn.address)),Ht=yield Promise.all(Vt.map(function(){var pn=ie(function*(yn){var Zn;const fr=yield Ne.tokenPrices.find(yn.address);return{address:yn.address,decimals:yn.decimals,priceRate:yn.priceRate,price:(null==fr?void 0:fr.usd)&&fr||{usd:null===(Zn=yn.token)||void 0===Zn?void 0:Zn.latestUSDPrice},balance:yn.balance,weight:yn.weight}});return function(yn){return pn.apply(this,arguments)}}())),un=wi(po.from(ge.poolType).liquidity.calcTotal(Ht),18);return cs(Ct.add(un),18)})()}}function rr(qe,ge,Ne,Ke){return hn.apply(this,arguments)}function hn(){return hn=ie(function*(qe,ge,Ne,Ke){const ot={sender:x.AddressZero,recipient:x.AddressZero,fromInternalBalance:!1,toInternalBalance:!1};try{return(yield qe.callStatic.queryBatchSwap(ge,Ne,Ke,ot)).map(Ct=>Ct.toString())}catch(Ct){throw`queryBatchSwap call error: ${Ct}`}}),hn.apply(this,arguments)}function Ir(){return Ir=ie(function*(qe,ge,Ne){Ne.fetchPools.fetchPools&&(yield qe.fetchPools());const Ke=[],ot=[];for(let pn=0;pn{zr.forEach(ai=>{ai.assetInIndex=Zn.indexOf(pn[ci][ai.assetInIndex]),ai.assetOutIndex=Zn.indexOf(pn[ci][ai.assetOutIndex])})}),{swaps:yn.flat(),assets:Zn}}(ot,Ke),Vt=Ne.swapType===E.SwapType.SwapExactIn?Ne.tokensOut:Ne.tokensIn,Ht=Array(Vt.length).fill("0");let un=Array(Ct.assets.length).fill("0");try{un=yield rr(ge,Ne.swapType,Ct.swaps,Ct.assets),un.length>0&&Vt.forEach((pn,yn)=>{var Zn;return Ht[yn]=null!==(Zn=un[Ct.assets.indexOf(pn.toLowerCase())].toString())&&void 0!==Zn?Zn:x.Zero.toString()})}catch{throw new Oi(E.BalancerErrorCode.QUERY_BATCH_SWAP)}return{returnAmounts:Ht,swaps:Ct.swaps,assets:Ct.assets,deltas:un.map(pn=>pn.toString())}}),Ir.apply(this,arguments)}function Ei(qe,ge,Ne,Ke,ot){return Os.apply(this,arguments)}function Os(){return Os=ie(function*(qe,ge,Ne,Ke,ot){const Ct=Ne===E.SwapType.SwapExactIn?m.SwapTypes.SwapExactIn:m.SwapTypes.SwapExactOut;return yield ot.getSwaps(qe.toLowerCase(),ge.toLowerCase(),Ct,Ke)}),Os.apply(this,arguments)}var Cs=function(){return Cs=Object.assign||function(qe){for(var ge,Ne=1,Ke=arguments.length;Nebe in bt?wwe(bt,be,{enumerable:!0,configurable:!0,writable:!0,value:Y}):bt[be]=Y,yt=(bt,be,Y)=>(xwe(bt,"symbol"!=typeof be?be+"":be,Y),Y);(self.webpackChunktimeless_frontend=self.webpackChunktimeless_frontend||[]).push([[179],{98255:bt=>{function be(Y){return Promise.resolve().then(()=>{var ie=new Error("Cannot find module '"+Y+"'");throw ie.code="MODULE_NOT_FOUND",ie})}be.keys=()=>[],be.resolve=be,be.id=98255,bt.exports=be},29813:function(bt,be,Y){var ie=Y(31325).default;function O(E){function d(x){if(Object(x)!==x)return Promise.reject(new TypeError(x+" is not an object."));var f=x.done;return Promise.resolve(x.value).then(function(T){return{value:T,done:f}})}return(O=function(x){this.s=x,this.n=x.next}).prototype={s:null,n:null,next:function(){return d(this.n.apply(this.s,arguments))},return:function(x){var f=this.s.return;return void 0===f?Promise.resolve({value:x,done:!0}):d(f.apply(this.s,arguments))},throw:function(x){var f=this.s.return;return void 0===f?Promise.reject(x):d(f.apply(this.s,arguments))}},new O(E)}!function(E,d,x,f,T,g,b,l,h,u,m,_,w,S,I,P){"use strict";var W,G,H,j,K,R=function(qe){return qe&&"object"==typeof qe&&"default"in qe?qe:{default:qe}}(h),o=function(qe){if(qe&&qe.__esModule)return qe;var ge=Object.create(null);return qe&&Object.keys(qe).forEach(function(Ne){if("default"!==Ne){var Ke=Object.getOwnPropertyDescriptor(qe,Ne);Object.defineProperty(ge,Ne,Ke.get?Ke:{enumerable:!0,get:function(){return qe[Ne]}})}}),ge.default=qe,Object.freeze(ge)}(m);E.StablePoolJoinKind=void 0,(W=E.StablePoolJoinKind||(E.StablePoolJoinKind={}))[W.INIT=0]="INIT",W[W.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",W[W.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",E.StablePhantomPoolJoinKind=void 0,(G=E.StablePhantomPoolJoinKind||(E.StablePhantomPoolJoinKind={}))[G.INIT=0]="INIT",G[G.COLLECT_PROTOCOL_FEES=1]="COLLECT_PROTOCOL_FEES",E.StablePoolExitKind=void 0,(H=E.StablePoolExitKind||(E.StablePoolExitKind={}))[H.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",H[H.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",H[H.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT";class y{constructor(){}}y.joinInit=qe=>d.defaultAbiCoder.encode(["uint256","uint256[]"],[E.StablePoolJoinKind.INIT,qe]),y.joinCollectProtocolFees=()=>d.defaultAbiCoder.encode(["uint256"],[E.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),y.joinExactTokensInForBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.StablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,qe,ge]),y.joinTokenInForExactBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.StablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,qe,ge]),y.exitExactBPTInForOneTokenOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.StablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,qe,ge]),y.exitExactBPTInForTokensOut=qe=>d.defaultAbiCoder.encode(["uint256","uint256"],[E.StablePoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,qe]),y.exitBPTInForExactTokensOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.StablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,qe,ge]),E.WeightedPoolJoinKind=void 0,(j=E.WeightedPoolJoinKind||(E.WeightedPoolJoinKind={}))[j.INIT=0]="INIT",j[j.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",j[j.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",j[j.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT=3]="ALL_TOKENS_IN_FOR_EXACT_BPT_OUT",E.WeightedPoolExitKind=void 0,(K=E.WeightedPoolExitKind||(E.WeightedPoolExitKind={}))[K.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",K[K.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",K[K.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT",K[K.MANAGEMENT_FEE_TOKENS_OUT=3]="MANAGEMENT_FEE_TOKENS_OUT";class M{constructor(){}}M.joinInit=qe=>d.defaultAbiCoder.encode(["uint256","uint256[]"],[E.WeightedPoolJoinKind.INIT,qe]),M.joinExactTokensInForBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,qe,ge]),M.joinTokenInForExactBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,qe,ge]),M.joinAllTokensInForExactBPTOut=qe=>d.defaultAbiCoder.encode(["uint256","uint256"],[E.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,qe]),M.exitExactBPTInForOneTokenOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,qe,ge]),M.exitExactBPTInForTokensOut=qe=>d.defaultAbiCoder.encode(["uint256","uint256"],[E.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,qe]),M.exitBPTInForExactTokensOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,qe,ge]);let v=(()=>{class qe{constructor(){}}return qe.exitForManagementFees=()=>d.defaultAbiCoder.encode(["uint256"],[E.WeightedPoolExitKind.MANAGEMENT_FEE_TOKENS_OUT]),qe})();var k,D;E.ComposableStablePoolJoinKind=void 0,(k=E.ComposableStablePoolJoinKind||(E.ComposableStablePoolJoinKind={}))[k.INIT=0]="INIT",k[k.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",k[k.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",E.ComposableStablePoolExitKind=void 0,(D=E.ComposableStablePoolExitKind||(E.ComposableStablePoolExitKind={}))[D.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",D[D.BPT_IN_FOR_EXACT_TOKENS_OUT=1]="BPT_IN_FOR_EXACT_TOKENS_OUT";class N{constructor(){}}N.joinInit=qe=>d.defaultAbiCoder.encode(["uint256","uint256[]"],[E.ComposableStablePoolJoinKind.INIT,qe]),N.joinCollectProtocolFees=()=>d.defaultAbiCoder.encode(["uint256"],[E.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),N.joinExactTokensInForBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.ComposableStablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,qe,ge]),N.joinTokenInForExactBPTOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.ComposableStablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,qe,ge]),N.exitExactBPTInForOneTokenOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256","uint256"],[E.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,qe,ge]),N.exitBPTInForExactTokensOut=(qe,ge)=>d.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[E.ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,qe,ge]);var a="Invariant failed";function B(qe,ge){if(!qe)throw new Error(a)}const Q=qe=>(B(66===qe.length),qe.slice(0,42)),ee=qe=>{B(66===qe.length);const ge=parseInt(qe[45]);return B(ge<3),ge},ce=qe=>(B(66===qe.length),f.BigNumber.from(`0x${qe.slice(46)}`));var ue;E.Network=void 0,(ue=E.Network||(E.Network={}))[ue.MAINNET=1]="MAINNET",ue[ue.ROPSTEN=3]="ROPSTEN",ue[ue.RINKEBY=4]="RINKEBY",ue[ue.GOERLI=5]="GOERLI",ue[ue.G\u00d6RLI=5]="G\xd6RLI",ue[ue.OPTIMISM=10]="OPTIMISM",ue[ue.KOVAN=42]="KOVAN",ue[ue.GNOSIS=100]="GNOSIS",ue[ue.POLYGON=137]="POLYGON",ue[ue.ARBITRUM=42161]="ARBITRUM";const we={IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0x6b15a01b5d46a5321b627bd7deef1af57bc629070000000000000000000000d4","0xe08590bde837eb9b2d42aa1196469d6e08fe96ec000200000000000000000101","0xb4c23af48e79f73e3a7e36c0e54eb38e1ce1755e0002000000000000000000d3","0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8","0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366"]},Investment:{AllowList:["0x4fd63966879300cafafbb35d157dc5229278ed23000100000000000000000169","0x37a6fc079cad790e556baedda879358e076ef1b3000100000000000000000348","0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x751dfdace1ad995ff13c927f6f761c6604532c79":"stablePool","0x590e544e7ca956bb878f8c873e82e65550d67d2f":"stablePool","0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool","0x6c7f4d97269ece163fd08d5c2584a21e4a33934c":"boostedPool"},Stakable:{AllowList:[]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e":{name:"Balancer Stable USD",hasIcon:!0}}},ae={[E.Network.KOVAN]:{IdsMap:{staBAL:"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e",bbAaveUSD:{v1:"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8",v2:""},veBAL:"0xdc2ecfdf2688f92c85064be0b929693acc6dbca6000200000000000000000701"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:["0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678","0xca1eb8624be8e11418f629559321587197557e0c000200000000000000000682","0xa21da5768186c1bc0f56dd72aa94672d77bdf23e00020000000000000000067a","0x7f9db0d15eea32e205b7df0fa5184f4a8a905abb000200000000000000000683","0x72c5a86831f019df6fac146fc14ef60ebe0d5f2600020000000000000000067f","0x542b9f6fd4500b94d453974d8c70783ef794ff6a00020000000000000000067c","0x47f9309a8c5a68a93ac27a4cccc0e222cd3adfa2000200000000000000000684","0x3f3050a0fe84778aeff96906c9218b318f924d22000200000000000000000680","0x31e61587b5dc148ae42ae323655fb8d7af7bb86600020000000000000000067d","0x28efa7f86341aa0ad534bdfb033edb4f4ac6adf700020000000000000000067e","0x10ee90b9ff4b9a44a773107280c0ce083619286800020000000000000000067b"],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x6b15a01b5d46a5321b627bd7deef1af57bc629070000000000000000000000d4","0xe08590bde837eb9b2d42aa1196469d6e08fe96ec000200000000000000000101","0xb4c23af48e79f73e3a7e36c0e54eb38e1ce1755e0002000000000000000000d3","0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8","0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e"]},Investment:{AllowList:["0x4fd63966879300cafafbb35d157dc5229278ed23000100000000000000000169","0x37a6fc079cad790e556baedda879358e076ef1b3000100000000000000000348"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x1b57f637ce3408f1f834b0b70f9a595b062daea7":"liquidityBootstrappingPool","0x751dfdace1ad995ff13c927f6f761c6604532c79":"stablePool","0x590e544e7ca956bb878f8c873e82e65550d67d2f":"stablePool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"managedPool","0x6c7f4d97269ece163fd08d5c2584a21e4a33934c":"boostedPool","0x1f47ab83420cd1f818df9acbd6ee68341bb91592":"stablePool"},Stakable:{AllowList:["0xf767f0a3fcf1eafec2180b7de79d0c559d7e7e370001000000000000000003e3","0xdc2ecfdf2688f92c85064be0b929693acc6dbca6000200000000000000000701","0x647c1fd457b95b75d0972ff08fe01d7d7bda05df000200000000000000000001","0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8"]},Metadata:{"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8":{name:"Balancer Boosted Aave USD",hasIcon:!1},"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e":{name:"Balancer Stable USD",hasIcon:!1}}},[E.Network.GOERLI]:{IdsMap:{staBAL:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062",bbAaveUSD:{v1:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",v2:"0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7"},veBAL:"0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:["0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678"],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076","0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7","0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d","0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e","0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c"]},Investment:{AllowList:[]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0x44afeb87c871d8fea9398a026dea2bd3a13f5769":"stablePool","0xa55f73e2281c60206ba43a3590db07b8955832be":"stablePool","0xb48cc42c45d262534e46d5965a9ac496f1b7a830":"liquidityBootstrappingPool","0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a":"liquidityBootstrappingPool","0x41e9036ae350baedcc7107760a020dca3c0731ec":"boostedPool","0xb848f50141f3d4255b37ac288c25c109104f2158":"composableStablePool","0x94f68b54191f62f781fe8298a8a5fa3ed772d227":"weightedPool"},Stakable:{AllowList:["0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b","0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059"]},Metadata:{"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f":{name:"Balancer Boosted Aave USD",hasIcon:!1}}},[E.Network.MAINNET]:{IdsMap:{staBAL:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",bbAaveUSD:{v1:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe",v2:"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"},veBAL:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"stablePool","0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f":"composableStablePool","0xcc508a455f5b0073973107db6a878ddbdab957bc":"weightedPool"},Stakable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027","0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084","0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052","0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0","0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c","0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0","0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8","0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e","0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c","0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019","0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160","0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b","0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e","0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a","0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087","0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089","0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018","0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015","0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123","0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021","0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026","0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182","0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181","0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159","0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e","0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a","0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194","0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de","0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef","0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180","0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269","0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270","0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc","0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e","0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338","0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327","0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366","0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367","0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063":{name:"Balancer Stable USD",hasIcon:!0},"0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249":{name:"AuraBAL Stable Pool",hasIcon:!1}}},[E.Network.POLYGON]:{IdsMap:{xMatic:{v1:"0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4",v2:"0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"},stMatic:{v1:"0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366",v2:"0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d"},mai4:{mai4:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012",maiBbaUsd:"0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e"}},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4"]},Investment:{AllowList:[""]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x41b953164995c11c81da73d212ed8af25741b7ac":"liquidityBootstrappingPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool","0xca96c4f198d343e251b1a01f3eba061ef3da73c1":"stablePool","0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4":"composableStablePool","0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3":"weightedPool"},Stakable:{AllowList:["0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002","0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032","0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008","0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e","0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d","0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051","0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009","0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a","0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035","0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"]},Metadata:{}},[E.Network.ARBITRUM]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear"],Stable:{AllowList:["0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159"]},Investment:{AllowList:[""]},Factories:{"0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xef44d6786b2b4d544b7850fe67ce6381626bf2d6":"stablePool","0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33":"composableStablePool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"weightedPool"},Stakable:{AllowList:["0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b","0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002","0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006","0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e","0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036","0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010","0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017","0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d","0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001","0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076","0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159","0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158"]},Metadata:{}},[E.Network.GNOSIS]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX","Gyro2","Gyro3","GyroE","HighAmpComposableStable"],Stable:{AllowList:["0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004","0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000"]},Investment:{AllowList:[]},Factories:{},Stakable:{AllowList:[]},Metadata:{}}};var Te=[{inputs:[{internalType:"contract IStaticAToken",name:"_waToken",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"waToken",outputs:[{internalType:"contract IStaticAToken",name:"",type:"address"}],stateMutability:"view",type:"function"}];const le=qe=>qe[0].map((ge,Ne)=>qe.map(Ke=>Ke[Ne]));let X=(()=>{class qe{constructor(Ne){this.ETH=x.AddressZero,this.isETH=Ke=>qe.isEqual(Ke,this.ETH),this.isWETH=Ke=>qe.isEqual(Ke,this.WETH),this.translateToERC20=Ke=>this.isETH(Ke)?this.WETH:Ke,this.WETH=T.getAddress(Ne)}sortTokens(Ne,...Ke){Ke.forEach(un=>B(Ne.length===un.length));const ot=Ne.map(this.translateToERC20),Mt=le([ot,...Ke]).sort(([un],[pn])=>{return Zn=pn,un.toLowerCase()>Zn.toLowerCase()?1:-1;var Zn}),[Vt,...Ht]=le(Mt);return[Ne.includes(this.ETH)?Vt.map(un=>this.isWETH(un)?this.ETH:un):Vt,...Ht]}}return qe.isEqual=(ge,Ne)=>T.getAddress(ge)===T.getAddress(Ne),qe})();const ne={"000":"ADD_OVERFLOW","001":"SUB_OVERFLOW","002":"SUB_UNDERFLOW","003":"MUL_OVERFLOW","004":"ZERO_DIVISION","005":"DIV_INTERNAL","006":"X_OUT_OF_BOUNDS","007":"Y_OUT_OF_BOUNDS","008":"PRODUCT_OUT_OF_BOUNDS","009":"INVALID_EXPONENT",100:"OUT_OF_BOUNDS",101:"UNSORTED_ARRAY",102:"UNSORTED_TOKENS",103:"INPUT_LENGTH_MISMATCH",104:"ZERO_TOKEN",200:"MIN_TOKENS",201:"MAX_TOKENS",202:"MAX_SWAP_FEE_PERCENTAGE",203:"MIN_SWAP_FEE_PERCENTAGE",204:"MINIMUM_BPT",205:"CALLER_NOT_VAULT",206:"UNINITIALIZED",207:"BPT_IN_MAX_AMOUNT",208:"BPT_OUT_MIN_AMOUNT",209:"EXPIRED_PERMIT",210:"NOT_TWO_TOKENS",211:"DISABLED",300:"MIN_AMP",301:"MAX_AMP",302:"MIN_WEIGHT",303:"MAX_STABLE_TOKENS",304:"MAX_IN_RATIO",305:"MAX_OUT_RATIO",306:"MIN_BPT_IN_FOR_TOKEN_OUT",307:"MAX_OUT_BPT_FOR_TOKEN_IN",308:"NORMALIZED_WEIGHT_INVARIANT",309:"INVALID_TOKEN",310:"UNHANDLED_JOIN_KIND",311:"ZERO_INVARIANT",312:"ORACLE_INVALID_SECONDS_QUERY",313:"ORACLE_NOT_INITIALIZED",314:"ORACLE_QUERY_TOO_OLD",315:"ORACLE_INVALID_INDEX",316:"ORACLE_BAD_SECS",317:"AMP_END_TIME_TOO_CLOSE",318:"AMP_ONGOING_UPDATE",319:"AMP_RATE_TOO_HIGH",320:"AMP_NO_ONGOING_UPDATE",321:"STABLE_INVARIANT_DIDNT_CONVERGE",322:"STABLE_GET_BALANCE_DIDNT_CONVERGE",323:"RELAYER_NOT_CONTRACT",324:"BASE_POOL_RELAYER_NOT_CALLED",325:"REBALANCING_RELAYER_REENTERED",326:"GRADUAL_UPDATE_TIME_TRAVEL",327:"SWAPS_DISABLED",328:"CALLER_IS_NOT_LBP_OWNER",329:"PRICE_RATE_OVERFLOW",330:"INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED",331:"WEIGHT_CHANGE_TOO_FAST",332:"LOWER_GREATER_THAN_UPPER_TARGET",333:"UPPER_TARGET_TOO_HIGH",334:"UNHANDLED_BY_LINEAR_POOL",335:"OUT_OF_TARGET_RANGE",336:"UNHANDLED_EXIT_KIND ",337:"UNAUTHORIZED_EXIT",338:"MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE",339:"UNHANDLED_BY_MANAGED_POOL",340:"UNHANDLED_BY_PHANTOM_POOL",341:"TOKEN_DOES_NOT_HAVE_RATE_PROVIDER",342:"INVALID_INITIALIZATION",343:"OUT_OF_NEW_TARGET_RANGE",344:"UNAUTHORIZED_OPERATION",345:"UNINITIALIZED_POOL_CONTROLLER",400:"REENTRANCY",401:"SENDER_NOT_ALLOWED",402:"PAUSED",403:"PAUSE_WINDOW_EXPIRED",404:"MAX_PAUSE_WINDOW_DURATION",405:"MAX_BUFFER_PERIOD_DURATION",406:"INSUFFICIENT_BALANCE",407:"INSUFFICIENT_ALLOWANCE",408:"ERC20_TRANSFER_FROM_ZERO_ADDRESS",409:"ERC20_TRANSFER_TO_ZERO_ADDRESS",410:"ERC20_MINT_TO_ZERO_ADDRESS",411:"ERC20_BURN_FROM_ZERO_ADDRESS",412:"ERC20_APPROVE_FROM_ZERO_ADDRESS",413:"ERC20_APPROVE_TO_ZERO_ADDRESS",414:"ERC20_TRANSFER_EXCEEDS_ALLOWANCE",415:"ERC20_DECREASED_ALLOWANCE_BELOW_ZERO",416:"ERC20_TRANSFER_EXCEEDS_BALANCE",417:"ERC20_BURN_EXCEEDS_ALLOWANCE",418:"SAFE_ERC20_CALL_FAILED",419:"ADDRESS_INSUFFICIENT_BALANCE",420:"ADDRESS_CANNOT_SEND_VALUE",421:"SAFE_CAST_VALUE_CANT_FIT_INT256",422:"GRANT_SENDER_NOT_ADMIN",423:"REVOKE_SENDER_NOT_ADMIN",424:"RENOUNCE_SENDER_NOT_ALLOWED",425:"BUFFER_PERIOD_EXPIRED",426:"CALLER_IS_NOT_OWNER",427:"NEW_OWNER_IS_ZERO",428:"CODE_DEPLOYMENT_FAILED",429:"CALL_TO_NON_CONTRACT",430:"LOW_LEVEL_CALL_FAILED",431:"NOT_PAUSED",432:"ADDRESS_ALREADY_ALLOWLISTED",433:"ADDRESS_NOT_ALLOWLISTED",434:"ERC20_BURN_EXCEEDS_BALANCE",500:"INVALID_POOL_ID",501:"CALLER_NOT_POOL",502:"SENDER_NOT_ASSET_MANAGER",503:"USER_DOESNT_ALLOW_RELAYER",504:"INVALID_SIGNATURE",505:"EXIT_BELOW_MIN",506:"JOIN_ABOVE_MAX",507:"SWAP_LIMIT",508:"SWAP_DEADLINE",509:"CANNOT_SWAP_SAME_TOKEN",510:"UNKNOWN_AMOUNT_IN_FIRST_SWAP",511:"MALCONSTRUCTED_MULTIHOP_SWAP",512:"INTERNAL_BALANCE_OVERFLOW",513:"INSUFFICIENT_INTERNAL_BALANCE",514:"INVALID_ETH_INTERNAL_BALANCE",515:"INVALID_POST_LOAN_BALANCE",516:"INSUFFICIENT_ETH",517:"UNALLOCATED_ETH",518:"ETH_TRANSFER",519:"CANNOT_USE_ETH_SENTINEL",520:"TOKENS_MISMATCH",521:"TOKEN_NOT_REGISTERED",522:"TOKEN_ALREADY_REGISTERED",523:"TOKENS_ALREADY_SET",524:"TOKENS_LENGTH_MUST_BE_2",525:"NONZERO_TOKEN_BALANCE",526:"BALANCE_TOTAL_OVERFLOW",527:"POOL_NO_TOKENS",528:"INSUFFICIENT_FLASH_LOAN_BALANCE",600:"SWAP_FEE_PERCENTAGE_TOO_HIGH",601:"FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH",602:"INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT"};class pe{constructor(){}}function _e(qe){return xe.apply(this,arguments)}function xe(){return(xe=ie(function*(qe){if("string"==typeof qe)return qe;if(l.Signer.isSigner(qe))return qe.getAddress();if(qe.address)return qe.address;throw new Error("Could not read account address")})).apply(this,arguments)}var Ce;pe.isErrorCode=qe=>{if(!qe.includes("BAL#"))return!1;const ge=qe.replace("BAL#","");return Object.keys(ne).includes(ge)},pe.parseErrorCode=qe=>{if(!qe.includes("BAL#"))throw new Error("Error code not found");const ge=qe.replace("BAL#",""),Ne=ne[ge];if(!Ne)throw new Error("Error code not found");return Ne},pe.tryParseErrorCode=qe=>{try{return pe.parseErrorCode(qe)}catch{return qe}},pe.isBalancerError=qe=>Object.values(ne).includes(qe),pe.encodeError=qe=>{const ge=Object.entries(ne).find(([,Ne])=>Ne===qe);if(!ge)throw Error("Error message not found");return`BAL#${ge[0]}`},E.RelayerAction=void 0,(Ce=E.RelayerAction||(E.RelayerAction={})).JoinPool="JoinPool",Ce.ExitPool="ExitPool",Ce.Swap="Swap",Ce.BatchSwap="BatchSwap",Ce.SetRelayerApproval="SetRelayerApproval";class ke{constructor(){}}ke.encodeCalldataAuthorization=(qe,ge,Ne)=>{const Ke=b.hexZeroPad(b.hexValue(ge),32).slice(2),{v:ot,r:Mt,s:Vt}=b.splitSignature(Ne);return`${qe}${Ke}${b.hexZeroPad(b.hexValue(ot),32).slice(2)}${Mt.slice(2)}${Vt.slice(2)}`},ke.signJoinAuthorization=(qe,ge,Ne,Ke,ot,Mt)=>ke.signAuthorizationFor(E.RelayerAction.JoinPool,qe,ge,Ne,Ke,ot,Mt),ke.signExitAuthorization=(qe,ge,Ne,Ke,ot,Mt)=>ke.signAuthorizationFor(E.RelayerAction.ExitPool,qe,ge,Ne,Ke,ot,Mt),ke.signSwapAuthorization=(qe,ge,Ne,Ke,ot,Mt)=>ke.signAuthorizationFor(E.RelayerAction.Swap,qe,ge,Ne,Ke,ot,Mt),ke.signBatchSwapAuthorization=(qe,ge,Ne,Ke,ot,Mt)=>ke.signAuthorizationFor(E.RelayerAction.BatchSwap,qe,ge,Ne,Ke,ot,Mt),ke.signSetRelayerApprovalAuthorization=(qe,ge,Ne,Ke,ot,Mt)=>ke.signAuthorizationFor(E.RelayerAction.SetRelayerApproval,qe,ge,Ne,Ke,ot,Mt),ke.signAuthorizationFor=function(){var qe=ie(function*(ge,Ne,Ke,ot,Mt,Vt=x.MaxUint256,Ht){const{chainId:un}=yield Ne.provider.getNetwork();if(!Ht){const fr=yield Ke.getAddress();Ht=yield Ne.getNextNonce(fr)}const pn={name:"Balancer V2 Vault",version:"1",chainId:un,verifyingContract:Ne.address},yn={[ge]:[{name:"calldata",type:"bytes"},{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},Zn={calldata:Mt,sender:yield _e(ot),nonce:Ht.toString(),deadline:Vt.toString()};return Ke._signTypedData(pn,yn,Zn)});return function(ge,Ne,Ke,ot,Mt){return qe.apply(this,arguments)}}();let me=(()=>{class qe{constructor(){}}return qe.signSetMinterApproval=function(){var ge=ie(function*(Ne,Ke,ot,Mt,Vt=x.MaxUint256,Ht){const{chainId:un}=yield Ne.provider.getNetwork();if(!Ht){const fr=yield Mt.getAddress();Ht=yield Ne.getNextNonce(fr)}const pn={name:"Balancer Minter",version:"1",chainId:un,verifyingContract:Ne.address},yn={minter:yield _e(Ke),approval:ot,nonce:Ht.toString(),deadline:Vt.toString()},Zn=yield Mt._signTypedData(pn,{SetMinterApproval:[{name:"minter",type:"address"},{name:"approval",type:"bool"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},yn);return{...b.splitSignature(Zn),deadline:f.BigNumber.from(Vt)}});return function(Ne,Ke,ot,Mt){return ge.apply(this,arguments)}}(),qe})();const Ee=BigInt(0),ze=BigInt(1),Ve=BigInt("1000000000000000000"),nt=(qe,ge)=>{if(!qe)throw new Error(ge)};function tt(qe){const ge=BigInt(18)-qe;return Ve*BigInt(10)**ge}function mt(qe,ge){return wt.mulDownFixed(qe,ge)}function ht(qe,ge){const Ne=new Array(qe.length);for(let Ke=0;Ke=0&&Ke>=ge||Ne<0&&Ke=Ne?ge:Ne}static min(ge,Ne){return ge=this.MIN_NATURAL_EXPONENT&&ge<=this.MAX_NATURAL_EXPONENT,"Errors.INVALID_EXPONENT"),ge<0)return this.ONE_18*this.ONE_18/this.exp(BigInt(-1)*ge);let Ne;ge>=this.x0?(ge-=this.x0,Ne=this.a0):ge>=this.x1?(ge-=this.x1,Ne=this.a1):Ne=BigInt(1),ge*=BigInt(100);let Ke=this.ONE_20;ge>=this.x2&&(ge-=this.x2,Ke=Ke*this.a2/this.ONE_20),ge>=this.x3&&(ge-=this.x3,Ke=Ke*this.a3/this.ONE_20),ge>=this.x4&&(ge-=this.x4,Ke=Ke*this.a4/this.ONE_20),ge>=this.x5&&(ge-=this.x5,Ke=Ke*this.a5/this.ONE_20),ge>=this.x6&&(ge-=this.x6,Ke=Ke*this.a6/this.ONE_20),ge>=this.x7&&(ge-=this.x7,Ke=Ke*this.a7/this.ONE_20),ge>=this.x8&&(ge-=this.x8,Ke=Ke*this.a8/this.ONE_20),ge>=this.x9&&(ge-=this.x9,Ke=Ke*this.a9/this.ONE_20);let ot,Mt=this.ONE_20;return ot=ge,Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(2),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(3),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(4),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(5),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(6),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(7),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(8),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(9),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(10),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(11),Mt+=ot,ot=ot*ge/this.ONE_20/BigInt(12),Mt+=ot,Ke*Mt/this.ONE_20*Ne/BigInt(100)}static _ln_36(ge){const Ne=((ge*=this.ONE_18)-this.ONE_36)*this.ONE_36/(ge+this.ONE_36),Ke=Ne*Ne/this.ONE_36;let ot=Ne,Mt=ot;return ot=ot*Ke/this.ONE_36,Mt+=ot/BigInt(3),ot=ot*Ke/this.ONE_36,Mt+=ot/BigInt(5),ot=ot*Ke/this.ONE_36,Mt+=ot/BigInt(7),ot=ot*Ke/this.ONE_36,Mt+=ot/BigInt(9),ot=ot*Ke/this.ONE_36,Mt+=ot/BigInt(11),ot=ot*Ke/this.ONE_36,Mt+=ot/BigInt(13),ot=ot*Ke/this.ONE_36,Mt+=ot/BigInt(15),Mt*BigInt(2)}static _ln(ge){if(ge=this.a0*this.ONE_18&&(ge/=this.a0,Ne+=this.x0),ge>=this.a1*this.ONE_18&&(ge/=this.a1,Ne+=this.x1),Ne*=BigInt(100),(ge*=BigInt(100))>=this.a2&&(ge=ge*this.ONE_20/this.a2,Ne+=this.x2),ge>=this.a3&&(ge=ge*this.ONE_20/this.a3,Ne+=this.x3),ge>=this.a4&&(ge=ge*this.ONE_20/this.a4,Ne+=this.x4),ge>=this.a5&&(ge=ge*this.ONE_20/this.a5,Ne+=this.x5),ge>=this.a6&&(ge=ge*this.ONE_20/this.a6,Ne+=this.x6),ge>=this.a7&&(ge=ge*this.ONE_20/this.a7,Ne+=this.x7),ge>=this.a8&&(ge=ge*this.ONE_20/this.a8,Ne+=this.x8),ge>=this.a9&&(ge=ge*this.ONE_20/this.a9,Ne+=this.x9),ge>=this.a10&&(ge=ge*this.ONE_20/this.a10,Ne+=this.x10),ge>=this.a11&&(ge=ge*this.ONE_20/this.a11,Ne+=this.x11);const Ke=(ge-this.ONE_20)*this.ONE_20/(ge+this.ONE_20),ot=Ke*Ke/this.ONE_20;let Mt=Ke,Vt=Mt;return Mt=Mt*ot/this.ONE_20,Vt+=Mt/BigInt(3),Mt=Mt*ot/this.ONE_20,Vt+=Mt/BigInt(5),Mt=Mt*ot/this.ONE_20,Vt+=Mt/BigInt(7),Mt=Mt*ot/this.ONE_20,Vt+=Mt/BigInt(9),Mt=Mt*ot/this.ONE_20,Vt+=Mt/BigInt(11),Vt*=BigInt(2),(Ne+Vt)/BigInt(100)}}Pt.ONE_18=BigInt("1000000000000000000"),Pt.ONE_20=BigInt("100000000000000000000"),Pt.ONE_36=BigInt("1000000000000000000000000000000000000"),Pt.MAX_NATURAL_EXPONENT=BigInt("130000000000000000000"),Pt.MIN_NATURAL_EXPONENT=BigInt("-41000000000000000000"),Pt.LN_36_LOWER_BOUND=BigInt(Pt.ONE_18)-BigInt("100000000000000000"),Pt.LN_36_UPPER_BOUND=BigInt(Pt.ONE_18)+BigInt("100000000000000000"),Pt.MILD_EXPONENT_BOUND=BigInt(2)**BigInt(254)/Pt.ONE_20,Pt.x0=BigInt("128000000000000000000"),Pt.a0=BigInt("38877084059945950922200000000000000000000000000000000000"),Pt.x1=BigInt("64000000000000000000"),Pt.a1=BigInt("6235149080811616882910000000"),Pt.x2=BigInt("3200000000000000000000"),Pt.a2=BigInt("7896296018268069516100000000000000"),Pt.x3=BigInt("1600000000000000000000"),Pt.a3=BigInt("888611052050787263676000000"),Pt.x4=BigInt("800000000000000000000"),Pt.a4=BigInt("298095798704172827474000"),Pt.x5=BigInt("400000000000000000000"),Pt.a5=BigInt("5459815003314423907810"),Pt.x6=BigInt("200000000000000000000"),Pt.a6=BigInt("738905609893065022723"),Pt.x7=BigInt("100000000000000000000"),Pt.a7=BigInt("271828182845904523536"),Pt.x8=BigInt("50000000000000000000"),Pt.a8=BigInt("164872127070012814685"),Pt.x9=BigInt("25000000000000000000"),Pt.a9=BigInt("128402541668774148407"),Pt.x10=BigInt("12500000000000000000"),Pt.a10=BigInt("113314845306682631683"),Pt.x11=BigInt("6250000000000000000"),Pt.a11=BigInt("106449445891785942956");const st=(qe,ge)=>{let Ne=qe.tokens.map(li=>li.address),Ke=qe.tokens.map(li=>li.decimals?li.decimals.toString():void 0),ot=Ke.map(li=>tt(BigInt(li))),Mt=qe.tokens.map(li=>f.parseFixed(li.balance,li.decimals).toString()),Vt=qe.tokens.map(li=>f.parseFixed(li.balance,18).toString()),Ht=qe.tokens.map(li=>li.weight?f.parseFixed(li.weight,18).toString():void 0),un=qe.tokens.map(li=>li.priceRate?f.parseFixed(li.priceRate,18).toString():void 0);if(ge){const li=new X(ge);let bi;[Ne,Ke,bi,Mt,Vt,Ht,un]=li.sortTokens(Ne,Ke,ot,Mt,Vt,Ht,un),ot=bi.map(BigInt)}const pn=qe.amp?f.parseFixed(qe.amp,3).toString():void 0,yn=f.parseFixed(qe.totalShares,18).toString(),Zn=f.parseFixed(qe.swapFee,18).toString(),fr=[],zr=[],ci=[],ai=Ne.indexOf(qe.address);return-1!==ai&&ot.forEach((li,bi)=>{bi!==ai&&(fr.push(ot[bi]),zr.push(Ne[bi]),ci.push(Mt[bi]))}),{parsedTokens:Ne,parsedDecimals:Ke,parsedBalances:Mt,parsedWeights:Ht,parsedPriceRates:un,parsedAmp:pn,parsedTotalShares:yn,parsedSwapFee:Zn,upScaledBalances:Vt,scalingFactors:ot,scalingFactorsWithoutBpt:fr,parsedTokensWithoutBpt:zr,parsedBalancesWithoutBpt:ci,bptIndex:ai}},Ye={Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",WETH:"0x0000000000000000000000000000000000000000",BAL:"0x0000000000000000000000000000000000000000"}},gt={[E.Network.KOVAN]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",WETH:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",BAL:"0xcb355677E36f390Ccc4a5d4bEADFbF1Eb2071c81",bbaUSD:"0x8fd162f338B770F7E879030830cDe9173367f301"},PriceChainMap:{"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x1c8e3bcb3378a443cc591f154c5ce0ebb4da9648":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","0x8f4bebf498cc624a0797fe64114a6ff169eee078":"0xbc396689893d065f41bc2c6ecbee5e0085233447","0xaf9ac3235be96ed496db7969f60d354fe5e426b0":"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2","0xcb355677e36f390ccc4a5d4beadfbf1eb2071c81":"0xba100000625a3754423978a60c9317c58a424e3d","0xc2569dd7d0fd715b054fbf16e75b001e5c0c1115":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x04df6e4121c27713ed22341e7c7df330f56f289b":"0x6b175474e89094c44da98b954eedeac495271d0f","0x4803bb90d18a1cb7a2187344fe4feb0e07878d05":"0xae7ab96520de3a18e5e111b5eaab095312d7fe84","0xff795577d9ac8bd7d90ee22b6c1703490b6512fd":"0x6b175474e89094c44da98b954eedeac495271d0f","0xe22da380ee6b445bb8273c81944adeb6e8450422":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x13512979ade267ab5100878e2e0f485b568328a4":"0xdac17f958d2ee523a2206206994597c13d831ec7","0xa387b91e393cfb9356a460370842bc8dbb2f29af":"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0"}},[E.Network.GOERLI]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","USDT","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",WETH:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",BAL:"0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47",bbaUSD:"0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd"},PriceChainMap:{"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x37f03a12241e9fd3658ad6777d289c3fb8512bc9":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","0xfa8449189744799ad2ace7e0ebac8bb7575eff47":"0xba100000625a3754423978a60c9317c58a424e3d","0xe0c9275e44ea80ef17579d33c55136b7da269aeb":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x8c9e6c40d3402480ace624730524facc5482798c":"0x6b175474e89094c44da98b954eedeac495271d0f","0x1f1f156e0317167c11aa412e3d1435ea29dc3cce":"0xdac17f958d2ee523a2206206994597c13d831ec7","0x4cb1892fddf14f772b2e39e299f44b2e5da90d04":"0x3ed3b47dd13ec9a98b44e6204a523e766b225811","0x811151066392fd641fe74a9b55a712670572d161":"0xbcca60bb61934080951369a648fb03df4f96263c","0x89534a24450081aa267c79b07411e9617d984052":"0x028171bca77440897b824ca71d1c56cac55b68a3","0x829f35cebbcd47d3c120793c12f7a232c903138b":"0x956f47f50a910163d8bf957cf5846d573e7f87ca","0xff386a3d08f80ac38c77930d173fa56c6286dc8b":"0x6810e776880c02933d47db1b9fc05908e5386b96"}},[E.Network.MAINNET]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",WETH:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",bbaUSD:"0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",bbaUSDv2:"0xA13a9247ea42D743238089903570127DdA72fE44"}},[E.Network.POLYGON]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3"}},[E.Network.ARBITRUM]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",WETH:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",BAL:"0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8"}},[E.Network.GNOSIS]:{Popular:{Symbols:["xDAI","WXDAI","WETH","BAL"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",WETH:"0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",BAL:"0x7eF541E2a22058048904fE5744f9c7E4C57AF717"}}};function St(qe){return gt[qe]?gt[qe]:Ye}var Wt,dn,Nt,It,qt,jt,Yt;E.PoolGaugesAttributes=void 0,(Wt=E.PoolGaugesAttributes||(E.PoolGaugesAttributes={})).Id="id",Wt.Address="address",Wt.PoolId="poolId",E.PoolShareAttributes=void 0,(dn=E.PoolShareAttributes||(E.PoolShareAttributes={})).Balance="balance",dn.Id="id",dn.PoolId="poolId",dn.UserAddress="userAddress",E.GaugeShareAttributes=void 0,(Nt=E.GaugeShareAttributes||(E.GaugeShareAttributes={})).Id="id",Nt.UserAddress="user",Nt.GaugeId="gauge",Nt.Balance="balance",E.PoolSpecialization=void 0,(It=E.PoolSpecialization||(E.PoolSpecialization={}))[It.GeneralPool=0]="GeneralPool",It[It.MinimalSwapInfoPool=1]="MinimalSwapInfoPool",It[It.TwoTokenPool=2]="TwoTokenPool",E.UserBalanceOpKind=void 0,(qt=E.UserBalanceOpKind||(E.UserBalanceOpKind={}))[qt.DepositInternal=0]="DepositInternal",qt[qt.WithdrawInternal=1]="WithdrawInternal",qt[qt.TransferInternal=2]="TransferInternal",qt[qt.TransferExternal=3]="TransferExternal",E.PoolBalanceOpKind=void 0,(jt=E.PoolBalanceOpKind||(E.PoolBalanceOpKind={}))[jt.Withdraw=0]="Withdraw",jt[jt.Deposit=1]="Deposit",jt[jt.Update=2]="Update",E.PoolType=void 0,(Yt=E.PoolType||(E.PoolType={})).Weighted="Weighted",Yt.Investment="Investment",Yt.Stable="Stable",Yt.HighAmpComposableStable="HighAmpComposableStable",Yt.ComposableStable="ComposableStable",Yt.MetaStable="MetaStable",Yt.StablePhantom="StablePhantom",Yt.LiquidityBootstrapping="LiquidityBootstrapping",Yt.AaveLinear="AaveLinear",Yt.Linear="Linear",Yt.EulerLinear="EulerLinear",Yt.ERC4626Linear="ERC4626Linear",Yt.Element="Element",Yt.Gyro2="Gyro2",Yt.Gyro3="Gyro3",Yt.Managed="Managed";let Wn=!1,fn=!1;const $n={debug:1,default:2,info:2,warning:3,error:4,off:5};let Jr=$n.default,Ln=null;const Bn=function(){try{const qe=[];if(["NFD","NFC","NFKD","NFKC"].forEach(ge=>{try{if("test"!=="test".normalize(ge))throw new Error("bad normalize")}catch{qe.push(ge)}}),qe.length)throw new Error("missing "+qe.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(qe){return qe.message}return null}();var Wr,zn,qe;(qe=Wr||(Wr={})).DEBUG="DEBUG",qe.INFO="INFO",qe.WARNING="WARNING",qe.ERROR="ERROR",qe.OFF="OFF",function(qe){qe.UNKNOWN_ERROR="UNKNOWN_ERROR",qe.NOT_IMPLEMENTED="NOT_IMPLEMENTED",qe.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",qe.NETWORK_ERROR="NETWORK_ERROR",qe.SERVER_ERROR="SERVER_ERROR",qe.TIMEOUT="TIMEOUT",qe.BUFFER_OVERRUN="BUFFER_OVERRUN",qe.NUMERIC_FAULT="NUMERIC_FAULT",qe.MISSING_NEW="MISSING_NEW",qe.INVALID_ARGUMENT="INVALID_ARGUMENT",qe.MISSING_ARGUMENT="MISSING_ARGUMENT",qe.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",qe.CALL_EXCEPTION="CALL_EXCEPTION",qe.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",qe.NONCE_EXPIRED="NONCE_EXPIRED",qe.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",qe.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",qe.TRANSACTION_REPLACED="TRANSACTION_REPLACED",qe.ACTION_REJECTED="ACTION_REJECTED"}(zn||(zn={}));const bn="0123456789abcdef";class Lr{constructor(ge){Object.defineProperty(this,"version",{enumerable:!0,value:ge,writable:!1})}_log(ge,Ne){const Ke=ge.toLowerCase();null==$n[Ke]&&this.throwArgumentError("invalid log level name","logLevel",ge),Jr>$n[Ke]||console.log.apply(console,Ne)}debug(...ge){this._log(Lr.levels.DEBUG,ge)}info(...ge){this._log(Lr.levels.INFO,ge)}warn(...ge){this._log(Lr.levels.WARNING,ge)}makeError(ge,Ne,Ke){if(fn)return this.makeError("censored error",Ne,{});Ne||(Ne=Lr.errors.UNKNOWN_ERROR),Ke||(Ke={});const ot=[];Object.keys(Ke).forEach(un=>{const pn=Ke[un];try{if(pn instanceof Uint8Array){let yn="";for(let Zn=0;Zn>4],yn+=bn[15&pn[Zn]];ot.push(un+"=Uint8Array(0x"+yn+")")}else ot.push(un+"="+JSON.stringify(pn))}catch{ot.push(un+"="+JSON.stringify(Ke[un].toString()))}}),ot.push(`code=${Ne}`),ot.push(`version=${this.version}`);const Mt=ge;let Vt="";switch(Ne){case zn.NUMERIC_FAULT:{Vt="NUMERIC_FAULT";const un=ge;switch(un){case"overflow":case"underflow":case"division-by-zero":Vt+="-"+un;break;case"negative-power":case"negative-width":Vt+="-unsupported";break;case"unbound-bitwise-result":Vt+="-unbound-result"}break}case zn.CALL_EXCEPTION:case zn.INSUFFICIENT_FUNDS:case zn.MISSING_NEW:case zn.NONCE_EXPIRED:case zn.REPLACEMENT_UNDERPRICED:case zn.TRANSACTION_REPLACED:case zn.UNPREDICTABLE_GAS_LIMIT:Vt=Ne}Vt&&(ge+=" [ See: https://links.ethers.org/v5-errors-"+Vt+" ]"),ot.length&&(ge+=" ("+ot.join(", ")+")");const Ht=new Error(ge);return Ht.reason=Mt,Ht.code=Ne,Object.keys(Ke).forEach(function(un){Ht[un]=Ke[un]}),Ht}throwError(ge,Ne,Ke){throw this.makeError(ge,Ne,Ke)}throwArgumentError(ge,Ne,Ke){return this.throwError(ge,Lr.errors.INVALID_ARGUMENT,{argument:Ne,value:Ke})}assert(ge,Ne,Ke,ot){ge||this.throwError(Ne,Ke,ot)}assertArgument(ge,Ne,Ke,ot){ge||this.throwArgumentError(Ne,Ke,ot)}checkNormalize(ge){Bn&&this.throwError("platform missing String.prototype.normalize",Lr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Bn})}checkSafeUint53(ge,Ne){"number"==typeof ge&&(null==Ne&&(Ne="value not safe"),(ge<0||ge>=9007199254740991)&&this.throwError(Ne,Lr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:ge}),ge%1&&this.throwError(Ne,Lr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:ge}))}checkArgumentCount(ge,Ne,Ke){Ke=Ke?": "+Ke:"",geNe&&this.throwError("too many arguments"+Ke,Lr.errors.UNEXPECTED_ARGUMENT,{count:ge,expectedCount:Ne})}checkNew(ge,Ne){ge!==Object&&null!=ge||this.throwError("missing new",Lr.errors.MISSING_NEW,{name:Ne.name})}checkAbstract(ge,Ne){ge===Ne?this.throwError("cannot instantiate abstract class "+JSON.stringify(Ne.name)+" directly; use a sub-class",Lr.errors.UNSUPPORTED_OPERATION,{name:ge.name,operation:"new"}):ge!==Object&&null!=ge||this.throwError("missing new",Lr.errors.MISSING_NEW,{name:Ne.name})}static globalLogger(){return Ln||(Ln=new Lr("logger/5.7.0")),Ln}static setCensorship(ge,Ne){if(!ge&&Ne&&this.globalLogger().throwError("cannot permanently disable censorship",Lr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Wn){if(!ge)return;this.globalLogger().throwError("error censorship permanent",Lr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}fn=!!ge,Wn=!!Ne}static setLogLevel(ge){const Ne=$n[ge.toLowerCase()];null!=Ne?Jr=Ne:Lr.globalLogger().warn("invalid log level - "+ge)}static from(ge){return new Lr(ge)}}Lr.errors=zn,Lr.levels=Wr;const Kn=new Lr("units/5.7.0"),sr=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ii(qe,ge){if("string"==typeof ge){const Ne=sr.indexOf(ge);-1!==Ne&&(ge=3*Ne)}return f.formatFixed(qe,ge??18)}function Un(qe,ge){if("string"!=typeof qe&&Kn.throwArgumentError("value must be a string","value",qe),"string"==typeof ge){const Ne=sr.indexOf(ge);-1!==Ne&&(ge=3*Ne)}return f.parseFixed(qe,ge??18)}const ir={[E.Network.MAINNET]:{waUSDT:"0xf8fd466f12e236f4c96f7cce6c79eadb819abf58",waUSDC:"0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de",waDAI:"0x02d60b84491589974263d922d9cc7a3152618ef6"},[E.Network.POLYGON]:{wamDAI:"0xee029120c72b0607344f35b17cdd90025e647b00",wamUSDC:"0x221836a597948dce8f3568e044ff123108acc42a",wamUSDT:"0x19c60a251e525fa88cd6f3768416a8024e98fc19"}},ts={...ir[E.Network.MAINNET],...ir[E.Network.POLYGON]},Tn={[E.Network.MAINNET]:{[ir[E.Network.MAINNET].waUSDT]:{aToken:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",underlying:"0xdac17f958d2ee523a2206206994597c13d831ec7"},[ir[E.Network.MAINNET].waUSDC]:{aToken:"0xbcca60bb61934080951369a648fb03df4f96263c",underlying:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},[ir[E.Network.MAINNET].waDAI]:{aToken:"0x028171bca77440897b824ca71d1c56cac55b68a3",underlying:"0x6b175474e89094c44da98b954eedeac495271d0f"}},[E.Network.POLYGON]:{[ir[E.Network.POLYGON].wamUSDT]:{aToken:"0x60d55f02a771d515e077c9c2403a1ef324885cec",underlying:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"},[ir[E.Network.POLYGON].wamUSDC]:{aToken:"0x1a13f4ca1d028320a707d99520abfefca3998b7f",underlying:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174"},[ir[E.Network.POLYGON].wamDAI]:{aToken:"0x27f8d03b3a2196956ed754badc28d73be8830a6e",underlying:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}},Qn={[E.Network.MAINNET]:Object.values(Tn[E.Network.MAINNET]).map(qe=>qe.aToken),[E.Network.POLYGON]:Object.values(Tn[E.Network.POLYGON]).map(qe=>qe.aToken)},Vi={[E.Network.MAINNET]:Object.values(Tn[E.Network.MAINNET]).map(qe=>qe.underlying),[E.Network.POLYGON]:Object.values(Tn[E.Network.POLYGON]).map(qe=>qe.underlying)},ar={[E.Network.MAINNET]:Object.fromEntries(Object.keys(Tn[E.Network.MAINNET]).map(qe=>[Tn[E.Network.MAINNET][qe].underlying,qe])),[E.Network.POLYGON]:Object.fromEntries(Object.keys(Tn[E.Network.POLYGON]).map(qe=>[Tn[E.Network.POLYGON][qe].underlying,qe]))},br={[E.Network.MAINNET]:"https://api.thegraph.com/subgraphs/name/aave/protocol-v2",[E.Network.POLYGON]:"https://api.thegraph.com/subgraphs/name/aave/aave-v2-matic"},ki=function(){var qe=ie(function*(ge){const Ne=Object.fromEntries(Object.keys(Tn).map(Ke=>[Ke,0]));if(!ge||ge!=E.Network.MAINNET&&ge!=E.Network.POLYGON)return Ne;try{const Ke={operationName:"getReserves",query:"\n query getReserves($aTokens: [String!], $underlyingAssets: [Bytes!]) {\n reserves(\n where: {\n aToken_in: $aTokens\n underlyingAsset_in: $underlyingAssets\n isActive: true\n }\n ) {\n underlyingAsset\n liquidityRate\n }\n }\n",variables:{aTokens:Qn[ge],underlyingAssets:Vi[ge]}},ot=yield R.default.post(br[ge],Ke),{data:{reserves:Mt}}=ot.data,Vt=Mt.map(Ht=>[ar[ge][Ht.underlyingAsset],Math.round(1e4*parseFloat(Ii(f.BigNumber.from(Ht.liquidityRate),27)))]);return Object.fromEntries(Vt)}catch{return Ne}});return function(Ne){return qe.apply(this,arguments)}}();function ur(qe,ge){let Ne=qe.toLowerCase();return Ne=mr(Ne,ge),Ne=Fr(Ne,ge),Ne}const mr=(qe,ge)=>{const Ne=St(ge).PriceChainMap;return Ne&&Ne[qe.toLowerCase()]||qe},Fr=(qe,ge)=>{const Ne=qe.toLocaleLowerCase(),Ke=ge;return null!=Tn[Ke]&&null!=Tn[Ke]&&Object.keys(Tn[Ke]).includes(Ne)?Tn[Ke][Ne].aToken:Ne};class hi{constructor(ge,Ne=200){this.fn=ge,this.wait=Ne,this.requestSet=new Set,this.promisedCalls=[],this.promisedCount=0,this.debounceCancel=()=>{}}fetch(ge){if(ge&&this.requestSet.add(ge),this.promisedCalls[this.promisedCount])return this.promisedCalls[this.promisedCount].promise;this.promisedCalls[this.promisedCount]=(()=>{let Mt=()=>{},Vt=()=>{};return{promise:new Promise((Ht,un)=>{[Mt,Vt]=[Ht,un]}),reject:Vt,resolve:Mt}})();const{promise:Ne,resolve:Ke,reject:ot}=this.promisedCalls[this.promisedCount];return this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.promisedCount++;const Mt=[...this.requestSet];this.requestSet.clear(),this.fn(Mt).then(Vt=>{Ke(Vt),this.debounceCancel=()=>{}}).catch(Vt=>{Vt.response&&Vt.response.data&&Vt.response.data.error&&(Vt=Vt.response.data.error),ot(Vt)})},this.wait),this.debounceCancel=()=>{this.timeout&&clearTimeout(this.timeout),ot("Cancelled"),delete this.promisedCalls[this.promisedCount]},Ne}}function wi(qe,ge){const Ne=new RegExp(`[0-9]+\\.?[0-9]{0,${ge}}`),Ke=qe.match(Ne);let ot=qe;return Ke&&(ot=Ke[0]),f.parseFixed(ot,ge)}function cs(qe,ge){return f.formatFixed(qe,ge).replace(/(.0$)/,"")}function $i(qe){return wi(qe,18).toBigInt()}const rs=(qe,ge)=>T.getAddress(qe)===T.getAddress(ge);function Xi(qe,ge,Ne){return[...qe.slice(0,ge),Ne,...qe.slice(ge)]}class $s{format(ge){return ge}}class is{constructor(){this.operatorMap={gt:"_gt",lt:"_lt",eq:"",in:"_in",not_in:"_not_in",contains:"_contains"}}format(ge){const Ne={};return ge.where&&Object.entries(ge.where).forEach(([Ke,ot])=>{Object.entries(ot).forEach(([Mt,Vt])=>{Ne[`${Ke}${this.operatorMap[Mt]}`]=Vt})}),{...ge,where:Ne}}}class go{constructor(ge){this.args=ge}merge(ge){const Ne=u.mergeWith(this.args,ge.args,(Ke,ot)=>{if(Array.isArray(Ke))return Ke.concat(ot)});return new go(Ne)}format(ge){return ge.format(this.args)}}var ji;function so(qe,ge,Ne,Ke,ot,Mt){const Vt=new Array(ot.length).fill(x.Zero);return ot.forEach((Ht,un)=>{if(qe.some(pn=>rs(Ht,pn))){const pn=f.BigNumber.from(Mt).add(x.WeiPerEther);Vt[un]=Vt[un].add(Ne===E.SwapType.SwapExactOut?f.BigNumber.from(Ke[un]).mul(pn).div(x.WeiPerEther):Ke[un])}if(ge.some(pn=>rs(Ht,pn))){const pn=x.WeiPerEther.sub(f.BigNumber.from(Mt));Vt[un]=Vt[un].add(Ne===E.SwapType.SwapExactIn?f.BigNumber.from(Ke[un]).mul(pn).div(x.WeiPerEther):Ke[un])}}),Vt}E.SwapType=void 0,(ji=E.SwapType||(E.SwapType={}))[ji.SwapExactIn=0]="SwapExactIn",ji[ji.SwapExactOut=1]="SwapExactOut";const oo=f.BigNumber.from("10000"),zo=(qe,ge)=>qe.mul(ge).div(oo),Wi=(qe,ge)=>{const Ne=zo(qe,ge);return qe.sub(Ne)},bo=(qe,ge)=>{const Ne=zo(qe,ge);return qe.add(Ne)},_s="0xBA12222222228d8Ba445958a75a0704d566BF2C8",Ao={[E.Network.MAINNET]:{chainId:E.Network.MAINNET,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",balancerHelpers:"0x5aDDCCa35b7A0D07C74063c48700C8590E87864E",lidoRelayer:"0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965",relayerV3:"0x886A3Ec7bcC508B8795990B60Fa21f85F9dB7948",relayerV4:"0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA",gaugeController:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",feeDistributor:"0xD3cf852898b21fc233251427c2DC93d3d604F3BB",protocolFeePercentagesProvider:"0x97207B095e4D5C9a6e4cfbfcd2C3358E03B90c4A",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",veBalProxy:"0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",weightedPoolFactory:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{wrappedNativeAsset:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",lbpRaisingTokens:["0x6B175474E89094C44Da98b954EedeAC495271d0F","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"],stETH:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",wstETH:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",bal:"0xba100000625a3754423978a60c9317c58a424e3d",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",bbaUsd:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks"},pools:{wETHwstETH:{id:"0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080",address:"0x32296969ef14eb0c6d29669c550d4a0449130230"}},poolsToIgnore:["0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee"],sorConnectingTokens:[{symbol:"wEth",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{symbol:"wstEth",address:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"},{symbol:"DOLA",address:"0x865377367054516e17014CcdED1e7d814EDC9ce4"}]},[E.Network.POLYGON]:{chainId:E.Network.POLYGON,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0xa1B2b503959aedD81512C37e9dce48164ec6a94d",relayerV3:"0xcf6a66E32dCa0e26AcC3426b851FD8aCbF12Dac7",relayerV4:"0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b",balancerHelpers:"0x239e55F427D44C3cc793f49bFB507ebe76638a2b",weightedPoolFactory:"0x0e39C3D9b2ec765eFd9c5c70BB290B1fCD8536E3",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{bal:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",wrappedNativeAsset:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks"},pools:{},poolsToIgnore:["0x600bd01b6526611079e12e1ff93aba7a3e34226f"],sorConnectingTokens:[{symbol:"weth",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"},{symbol:"bbrz2",address:"0xe22483774bd8611be2ad2f4194078dac9159f4ba"}]},[E.Network.ARBITRUM]:{chainId:E.Network.ARBITRUM,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x269ff446d9892c9e19082564df3f5e8741e190a1",relayerV3:"0x42E49B48573c725ee32d2579060Ed06894f97002",relayerV4:"0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5",balancerHelpers:"0x77d46184d22CA6a3726a2F500c776767b6A3d6Ab",weightedPoolFactory:"0x8df6EfEc5547e31B0eb7d1291B511FF8a2bf987c",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{bal:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",wrappedNativeAsset:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks"},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}]},[E.Network.KOVAN]:{chainId:E.Network.KOVAN,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x2cc8688C5f75E365aaEEb4ea8D6a480405A48D2A",veBal:"0x16ba924752EF283C7946db8A122a6742AA35C1DC",veBalProxy:"0x98D0d0a65cBeCCaa647a5a95cf27Cf2f00E1231C",balancerHelpers:"0x94905e703fEAd7f0fD0eEe355D267eE909784e6d",weightedPoolFactory:"0x8df6EfEc5547e31B0eb7d1291B511FF8a2bf987c"},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-kovan-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges"},pools:{}},[E.Network.ROPSTEN]:{chainId:E.Network.ROPSTEN,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x53c43764255c17bd724f74c4ef150724ac50a3ed",balancerHelpers:""},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges"},pools:{}},[E.Network.RINKEBY]:{chainId:E.Network.RINKEBY,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821",balancerHelpers:"0x5aDDCCa35b7A0D07C74063c48700C8590E87864E",weightedPoolFactory:"0x8df6EfEc5547e31B0eb7d1291B511FF8a2bf987c"},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-rinkeby-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges"},pools:{}},[E.Network.GOERLI]:{chainId:E.Network.GOERLI,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e",relayerV3:"0x7b9B6f094DC2Bd1c12024b0D9CC63d6993Be1888",relayerV4:"0x00e695aA8000df01B8DC8401B4C34Fba5D56BBb2",gaugeController:"0xBB1CE49b16d55A1f2c6e88102f32144C7334B116",veBal:"0x33A99Dcc4C85C014cf12626959111D5898bbCAbF",veBalProxy:"0xA1F107D1cD709514AE8A914eCB757E95f9cedB31",balancerHelpers:"0x5aDDCCa35b7A0D07C74063c48700C8590E87864E",weightedPoolFactory:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{wrappedNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks"},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}]},[E.Network.OPTIMISM]:{chainId:E.Network.OPTIMISM,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0x2dc0e2aa608532da689e89e237df582b783e552c",relayerV3:"0x195CcCBE464EF9073d1f7A1ba1C9Bf0f56dfFFff",relayerV4:"0x1a58897Ab366082028ced3740900ecBD765Af738",balancerHelpers:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",weightedPoolFactory:"0x0e39C3D9b2ec765eFd9c5c70BB290B1fCD8536E3",composableStablePoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062"},tokens:{wrappedNativeAsset:"0x4200000000000000000000000000000000000006"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism",gaugesSubgraph:""},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}]},[E.Network.GNOSIS]:{chainId:E.Network.GNOSIS,addresses:{contracts:{vault:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",multicall:"0xbb6fab6b627947dae0a75808250d8b2652952cb5",relayerV4:"0xeF606F58A4FD0fCcb066c6203d0994694d3eB2D3",balancerHelpers:"0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",weightedPoolFactory:"0xf302f9F50958c5593770FDf4d4812309fF77414f",composableStablePoolFactory:"0x76578ecf9a141296ec657847fb45b0585bcda3a6"},tokens:{wrappedNativeAsset:"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2",gaugesSubgraph:""},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"}]}},zi=qe=>Ao[qe].addresses;var Ms;E.BalancerErrorCode=void 0,(Ms=E.BalancerErrorCode||(E.BalancerErrorCode={})).SWAP_ZERO_RETURN_AMOUNT="SWAP_ZERO_RETURN_AMOUNT",Ms.UNWRAP_ZERO_AMOUNT="UNWRAP_ZERO_AMOUNT",Ms.WRAP_ZERO_AMOUNT="WRAP_ZERO_AMOUNT",Ms.QUERY_BATCH_SWAP="QUERY_BATCH_SWAP",Ms.POOL_DOESNT_EXIST="POOL_DOESNT_EXIST",Ms.UNSUPPORTED_POOL_TYPE="UNSUPPORTED_POOL_TYPE",Ms.UNSUPPORTED_PAIR="UNSUPPORTED_PAIR",Ms.NO_POOL_DATA="NO_POOL_DATA",Ms.INPUT_OUT_OF_BOUNDS="INPUT_OUT_OF_BOUNDS",Ms.INPUT_LENGTH_MISMATCH="INPUT_LENGTH_MISMATCH",Ms.INPUT_TOKEN_INVALID="INPUT_TOKEN_INVALID",Ms.INPUT_ZERO_NOT_ALLOWED="INPUT_ZERO_NOT_ALLOWED",Ms.INTERNAL_ERROR_INVALID_ABI="INTERNAL_ERROR_INVALID_ABI",Ms.TOKEN_MISMATCH="TOKEN_MISMATCH",Ms.MISSING_TOKENS="MISSING_TOKENS",Ms.MISSING_AMP="MISSING_AMP",Ms.MISSING_DECIMALS="MISSING_DECIMALS",Ms.MISSING_PRICE_RATE="MISSING_PRICE_RATE",Ms.MISSING_WEIGHT="MISSING_WEIGHT",Ms.RELAY_SWAP_AMOUNTS="RELAY_SWAP_AMOUNTS",Ms.NO_VALUE_PARAMETER="NO_VALUE_PARAMETER",Ms.ILLEGAL_PARAMETER="ILLEGAL_PARAMETER",Ms.TIMESTAMP_IN_THE_FUTURE="TIMESTAMP_IN_THE_FUTURE",Ms.JOIN_DELTA_AMOUNTS="JOIN_DELTA_AMOUNTS",Ms.EXIT_DELTA_AMOUNTS="EXIT_DELTA_AMOUNTS";class Oi extends Error{constructor(ge){super(Oi.getMessage(ge)),this.code=ge,this.name="BalancerError"}static getMessage(ge){switch(ge){case E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT:return"queryBatchSwapWithSor returned 0 amount";case E.BalancerErrorCode.UNWRAP_ZERO_AMOUNT:return"swapUnwrapAaveStaticExactIn unwrapped amount < 0";case E.BalancerErrorCode.WRAP_ZERO_AMOUNT:return"swapUnwrapAaveStaticExactOut wrapped amount < 0";case E.BalancerErrorCode.QUERY_BATCH_SWAP:return"queryBatchSwap on chain call error";case E.BalancerErrorCode.POOL_DOESNT_EXIST:return"balancer pool does not exist";case E.BalancerErrorCode.UNSUPPORTED_POOL_TYPE:return"unsupported pool type";case E.BalancerErrorCode.UNSUPPORTED_PAIR:return"unsupported token pair";case E.BalancerErrorCode.NO_POOL_DATA:return"no pool data";case E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS:return"input out of bounds";case E.BalancerErrorCode.INPUT_LENGTH_MISMATCH:return"input length mismatch";case E.BalancerErrorCode.INPUT_TOKEN_INVALID:return"input token invalid";case E.BalancerErrorCode.TOKEN_MISMATCH:return"token mismatch";case E.BalancerErrorCode.MISSING_DECIMALS:return"missing decimals";case E.BalancerErrorCode.MISSING_TOKENS:return"missing tokens";case E.BalancerErrorCode.MISSING_AMP:return"missing amp";case E.BalancerErrorCode.MISSING_PRICE_RATE:return"missing price rate";case E.BalancerErrorCode.MISSING_WEIGHT:return"missing weight";case E.BalancerErrorCode.INPUT_ZERO_NOT_ALLOWED:return"zero input not allowed";case E.BalancerErrorCode.RELAY_SWAP_AMOUNTS:return"Error when checking swap amounts";case E.BalancerErrorCode.NO_VALUE_PARAMETER:return"Illegal value passed as parameter";case E.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE:return"Timestamp cannot be in the future";case E.BalancerErrorCode.ILLEGAL_PARAMETER:return"An illegal parameter has been passed";case E.BalancerErrorCode.JOIN_DELTA_AMOUNTS:return"Error when checking join call deltas";case E.BalancerErrorCode.EXIT_DELTA_AMOUNTS:return"Error when checking exit call deltas";default:return"Unknown error"}}}class Lu{constructor(){this.buildExitExactBPTIn=({exiter:ge,pool:Ne,bptIn:Ke,slippage:ot,shouldUnwrapNativeAsset:Mt,wrappedNativeAsset:Vt,singleTokenMaxOut:Ht})=>{if(!Ke.length||f.parseFixed(Ke,18).isNegative())throw new Oi(E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(Ht&&Ht!==x.AddressZero&&!Ne.tokens.map(Xs=>Xs.address).some(Xs=>rs(Xs,Ht)))throw new Oi(E.BalancerErrorCode.TOKEN_MISMATCH);if(!Mt&&Ht===x.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenMaxOut should not have conflicting values");if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const{parsedTokens:un,parsedAmp:pn,parsedTotalShares:yn,parsedSwapFee:Zn,upScaledBalances:fr,scalingFactors:zr}=st(Ne),ci=un.map(Xs=>Xs===Vt?x.AddressZero:Xs),ai=new X(Vt),[li,bi,os]=ai.sortTokens(Mt?ci:un,fr,zr);let es,Ds=Array(un.length).fill("0"),ws=Array(un.length).fill("0");if(Ht){const Xs=un.indexOf(Ht),ao=o.StableMathBigInt._calcTokenOutGivenExactBptIn(BigInt(pn),bi.map(ia=>BigInt(ia)),Xs,BigInt(Ke),BigInt(yn),BigInt(Zn)).toString();Ds[Xs]=ao,ws[Xs]=Wi(f.BigNumber.from(ao),f.BigNumber.from(ot)).toString(),es=y.exitExactBPTInForOneTokenOut(Ke,Xs)}else{const Xs=function(ao,ia){const ic=new Array(ao.length);for(let od=0;odBigInt(ao)),BigInt(Ke),BigInt(yn)).map(ao=>ao.toString()).map(ao=>BigInt(ao)),os.map(ao=>BigInt(ao)));Ds=Xs.map(ao=>ao.toString()),ws=Xs.map(ao=>Wi(f.BigNumber.from(ao),f.BigNumber.from(ot)).toString()),es=y.exitExactBPTInForTokensOut(Ke)}const Us="exitPool",io={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:ws,userData:es,toInternalBalance:!1}};return{to:_s,functionName:Us,attributes:io,data:_.Vault__factory.createInterface().encodeFunctionData(Us,[io.poolId,io.sender,io.recipient,io.exitPoolRequest]),expectedAmountsOut:Ds,minAmountsOut:ws}},this.buildExitExactTokensOut=({exiter:ge,pool:Ne,tokensOut:Ke,amountsOut:ot,slippage:Mt,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const{parsedTokens:Ht,parsedAmp:un,parsedTotalShares:pn,parsedSwapFee:yn,upScaledBalances:Zn,scalingFactors:fr}=st(Ne),zr=new X(Vt),[,ci,ai]=zr.sortTokens(Ht,Zn,fr),[li,bi]=zr.sortTokens(Ke,ot),os=ht(bi.map(Xs=>BigInt(Xs)),ai.map(Xs=>BigInt(Xs))),es=o.StableMathBigInt._calcBptInGivenExactTokensOut(BigInt(un),ci.map(Xs=>BigInt(Xs)),os,BigInt(pn),BigInt(yn)).toString(),Ds=bo(f.BigNumber.from(es),f.BigNumber.from(Mt)).toString(),ws=y.exitBPTInForExactTokensOut(bi,Ds),Us="exitPool",io={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:bi,userData:ws,toInternalBalance:!1}};return{to:_s,functionName:Us,attributes:io,data:_.Vault__factory.createInterface().encodeFunctionData(Us,[io.poolId,io.sender,io.recipient,io.exitPoolRequest]),expectedBPTIn:es,maxBPTIn:Ds}}}}class Qa{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Mt,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(ia=>!ia.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const{parsedTokens:Ht,parsedAmp:un,parsedTotalShares:pn,parsedSwapFee:yn,scalingFactors:Zn,upScaledBalances:fr}=st(Ne),zr=new X(Vt),[ci,ai]=zr.sortTokens(Ke,ot),[,li,bi]=zr.sortTokens(Ht,fr,Zn),os=ht(ai.map(ia=>BigInt(ia)),bi.map(ia=>BigInt(ia))),es=o.StableMathBigInt._calcBptOutGivenExactTokensIn(BigInt(un),li.map(ia=>BigInt(ia)),os,BigInt(pn),BigInt(yn)).toString(),Ds=Wi(f.BigNumber.from(es),f.BigNumber.from(Mt)).toString(),ws=y.joinExactTokensInForBPTOut(ai,Ds),Us="joinPool",io={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:ci,maxAmountsIn:ai,userData:ws,fromInternalBalance:!1}},Xs=_.Vault__factory.createInterface().encodeFunctionData(Us,[io.poolId,io.sender,io.recipient,io.joinPoolRequest]),ao=ot.filter((ia,ic)=>Ke[ic]===x.AddressZero);return{to:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",functionName:Us,attributes:io,data:Xs,value:ao[0]?f.BigNumber.from(ao[0]):void 0,minBPTOut:Ds,expectedBPTOut:es}}}}class ja{calcTotal(ge){var Ne,Ke;let ot=f.BigNumber.from(0),Mt=f.BigNumber.from(0);for(let Vt=0;Vtes){if(Ds-es<=1)return Ds}else if(es-Ds<=1)return Ds}throw new Error("Errors.STABLE_INVARIANT_DIDNT_CONVERGE")}(qe,ge);let Vt=Ee,Ht=Mt/BigInt(ot);for(let ci=0;ci{if(!fr)throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);return BigInt(fr)});if(!Mt)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const un=BigInt(Vt),pn=Ht.map(fr=>tt(BigInt(fr))),yn=Ke.map((fr,zr)=>mt(BigInt(fr),pn[zr]));let Zn=Ee;for(let fr=0;frBigInt(Vt)));return Du(BigInt(Ke),Mt,ot).toString()}}class Eu{constructor(ge=new Lu,Ne=new Qa,Ke=new ja,ot=new xa,Mt=new Uu){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Mt}}class jo{calcPoolSpotPrice(ge,Ne,Ke){const ot=m.PhantomStablePool.fromPool(Ke),Mt=ot.parsePoolPairData(ge,Ne);return ot._spotPriceAfterSwapExactTokenInForTokenOut(Mt,m.ZERO).toString()}}class yo{bptZeroPriceImpact(ge,Ne){if(Ne.length!==ge.tokensList.length-1)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const Ke=u.cloneDeep(ge.tokensList),ot=Ke.findIndex(bi=>bi==ge.address),{parsedBalances:Mt,parsedDecimals:Vt,parsedPriceRates:Ht,parsedAmp:un,parsedTotalShares:pn}=st(ge),yn=Vt.map(bi=>{if(!bi)throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);return BigInt(bi)}),Zn=Ht.map(bi=>{if(!bi)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);return BigInt(bi)});if(!un)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const fr=BigInt(pn);Ke.splice(ot,1);const zr=yn.map(bi=>tt(BigInt(bi))),ci=Mt.map((bi,os)=>mt(BigInt(bi),zr[os]));if(Ne.length!==Ke.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);ci.splice(ot,1);const ai=ci.map((bi,os)=>wt.mulDownFixed(bi,Zn[os]));let li=Ee;for(let bi=0;biBigInt(Vt)));return Du(BigInt(Ke),Mt,ot).toString()}}class Vc{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Mt,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length-1)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);const Ht=new X(Vt),[,un]=Ht.sortTokens(Ke,ot),{parsedTokens:pn,parsedAmp:yn,parsedSwapFee:Zn,parsedTotalShares:fr,scalingFactorsWithoutBpt:zr,parsedBalancesWithoutBpt:ci,bptIndex:ai}=st(Ne,Vt);if(!yn)throw new Oi(E.BalancerErrorCode.MISSING_AMP);const li=ht(un.map(BigInt),zr.map(BigInt)),bi=m.StableMathBigInt._calcBptOutGivenExactTokensIn(BigInt(yn),ci.map(BigInt),li,BigInt(fr),BigInt(Zn)).toString(),os=Wi(f.BigNumber.from(bi),f.BigNumber.from(Mt)).toString(),es=N.joinExactTokensInForBPTOut(un,os),Ds="joinPool",ws={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:pn,maxAmountsIn:Xi(un,ai,"0"),userData:es,fromInternalBalance:!1}},Zs=_.Vault__factory.createInterface().encodeFunctionData(Ds,[ws.poolId,ws.sender,ws.recipient,ws.joinPoolRequest]),Us=ot.filter((Xs,ao)=>Ke[ao]===x.AddressZero),io=Us[0]?f.BigNumber.from(Us[0]):void 0;return{to:_s,functionName:Ds,attributes:ws,data:Zs,value:io,minBPTOut:os,expectedBPTOut:bi}}}}class El{constructor(){this.buildExitExactBPTIn=({})=>{throw new Error("To be implemented")},this.buildExitExactTokensOut=({})=>{throw new Error("To be implemented")}}}class ec{constructor(ge=new El,Ne=new ja,Ke=new jo,ot=new yo,Mt=new Vc){this.exit=ge,this.liquidity=Ne,this.spotPriceCalculator=Ke,this.priceImpactCalculator=ot,this.join=Mt}}class kc{constructor(){this.buildExitExactBPTIn=({exiter:ge,pool:Ne,bptIn:Ke,slippage:ot,shouldUnwrapNativeAsset:Mt,wrappedNativeAsset:Vt,singleTokenMaxOut:Ht})=>{if(!Ke.length||f.parseFixed(Ke,18).isNegative())throw new Oi(E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(Ht&&Ht!==x.AddressZero&&!Ne.tokens.map(io=>io.address).some(io=>rs(io,Ht)))throw new Oi(E.BalancerErrorCode.TOKEN_MISMATCH);if(!Mt&&Ht===x.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenMaxOut should not have conflicting values");const{parsedTokens:un,parsedBalances:pn,parsedWeights:yn,parsedTotalShares:Zn,parsedSwapFee:fr}=st(Ne),zr=un.map(io=>io===Vt?x.AddressZero:io),ci=new X(Vt),[ai,li,bi]=ci.sortTokens(Mt?zr:un,pn,yn);let os,es=Array(ai.length).fill("0"),Ds=Array(ai.length).fill("0");if(Ht){const io=ai.indexOf(Ht),Xs=o.WeightedMaths._calcTokenOutGivenExactBptIn(BigInt(li[io]),BigInt(bi[io]),BigInt(Ke),BigInt(Zn),BigInt(fr)).toString();es[io]=Xs,Ds[io]=Wi(f.BigNumber.from(Xs),f.BigNumber.from(ot)).toString(),os=M.exitExactBPTInForOneTokenOut(Ke,io)}else es=o.WeightedMaths._calcTokensOutGivenExactBptIn(li.map(io=>BigInt(io)),BigInt(Ke),BigInt(Zn)).map(io=>io.toString()),Ds=es.map(io=>Wi(f.BigNumber.from(io),f.BigNumber.from(ot)).toString()),os=M.exitExactBPTInForTokensOut(Ke);const Zs="exitPool",Us={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:ai,minAmountsOut:Ds,userData:os,toInternalBalance:!1}};return{to:_s,functionName:Zs,attributes:Us,data:_.Vault__factory.createInterface().encodeFunctionData(Zs,[Us.poolId,Us.sender,Us.recipient,Us.exitPoolRequest]),expectedAmountsOut:es,minAmountsOut:Ds}},this.buildExitExactTokensOut=({exiter:ge,pool:Ne,tokensOut:Ke,amountsOut:ot,slippage:Mt,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const{parsedTokens:Ht,parsedBalances:un,parsedWeights:pn,parsedTotalShares:yn,parsedSwapFee:Zn}=st(Ne),fr=new X(Vt),[,zr,ci]=fr.sortTokens(Ht,un,pn),[ai,li]=fr.sortTokens(Ke,ot),bi=o.WeightedMaths._calcBptInGivenExactTokensOut(zr.map(Us=>BigInt(Us)),ci.map(Us=>BigInt(Us)),li.map(Us=>BigInt(Us)),BigInt(yn),BigInt(Zn)).toString(),os=bo(f.BigNumber.from(bi),f.BigNumber.from(Mt)).toString(),es=M.exitBPTInForExactTokensOut(li,os),ws="exitPool",Zs={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:ai,minAmountsOut:li,userData:es,toInternalBalance:!1}};return{to:_s,functionName:ws,attributes:Zs,data:_.Vault__factory.createInterface().encodeFunctionData(ws,[Zs.poolId,Zs.sender,Zs.recipient,Zs.exitPoolRequest]),expectedBPTIn:bi,maxBPTIn:os}}}}class Cc{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Mt,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(Xs=>!Xs.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(Ne.tokens.some(Xs=>!Xs.weight))throw new Oi(E.BalancerErrorCode.MISSING_WEIGHT);const{parsedTokens:Ht,parsedBalances:un,parsedWeights:pn,parsedTotalShares:yn,parsedSwapFee:Zn}=st(Ne),fr=new X(Vt),[zr,ci]=fr.sortTokens(Ke,ot),[,ai,li]=fr.sortTokens(Ht,un,pn),bi=m.WeightedMaths._calcBptOutGivenExactTokensIn(ai.map(Xs=>BigInt(Xs)),li.map(Xs=>BigInt(Xs)),ci.map(Xs=>BigInt(Xs)),BigInt(yn),BigInt(Zn)).toString(),os=Wi(f.BigNumber.from(bi),f.BigNumber.from(Mt)).toString(),es=M.joinExactTokensInForBPTOut(ci,os),ws="joinPool",Zs={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:zr,maxAmountsIn:ci,userData:es,fromInternalBalance:!1}},Us=_.Vault__factory.createInterface().encodeFunctionData(ws,[Zs.poolId,Zs.sender,Zs.recipient,Zs.joinPoolRequest]),io=ot.filter((Xs,ao)=>Ke[ao]===x.AddressZero);return{to:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",functionName:ws,attributes:Zs,data:Us,value:io[0]?f.BigNumber.from(io[0]):void 0,minBPTOut:os,expectedBPTOut:bi}}}}class eu{calcTotal(ge){var Ne;let Ke=f.BigNumber.from(0),ot=f.BigNumber.from(0);for(let Vt=0;VtVt.add(wi(Ht.weight||"0",18)),f.BigNumber.from(0));return Ke.gt(0)?cs(ot.mul(Mt).div(Ke),36):"0"}}class tu{calcPoolSpotPrice(ge,Ne,Ke){const ot=ge===Ke.address||Ne===Ke.address;ot&&(Ke.tokens.push({address:Ke.address,balance:Ke.totalShares,decimals:18,priceRate:"1",weight:"0"}),Ke.tokensList.push(Ke.address));const Mt=m.WeightedPool.fromPool(Ke),Vt=Mt.parsePoolPairData(ge,Ne),Ht=Mt._spotPriceAfterSwapExactTokenInForTokenOut(Vt,m.ZERO).toString();return ot&&(Ke.tokens.pop(),Ke.tokensList.pop()),Ht}}class aa{bptZeroPriceImpact(ge,Ne){if(Ne.length!==ge.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const{parsedBalances:Ke,parsedDecimals:ot,parsedTotalShares:Mt,parsedWeights:Vt}=st(ge),Ht=BigInt(Mt),un=u.cloneDeep(ge.tokensList);let pn=Ee;for(let yn=0;ynBigInt(Vt)));return Du(BigInt(Ke),Mt,ot).toString()}}class rl{constructor(ge=new kc,Ne=new Cc,Ke=new eu,ot=new tu,Mt=new aa){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Mt}}class Xr{constructor(){this.buildExitExactBPTIn=({exiter:ge,pool:Ne,bptIn:Ke,slippage:ot,shouldUnwrapNativeAsset:Mt,wrappedNativeAsset:Vt,singleTokenMaxOut:Ht})=>{if(!Ke.length||f.parseFixed(Ke,18).isNegative())throw new Oi(E.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(Ht&&Ht!==x.AddressZero&&!Ne.tokens.map(ao=>ao.address).some(ao=>rs(ao,Ht)))throw new Oi(E.BalancerErrorCode.TOKEN_MISMATCH);if(!Mt&&Ht===x.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenMaxOut should not have conflicting values");if(Ne.tokens.some(ao=>!ao.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);if(Ne.tokens.some(ao=>!ao.priceRate))throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const{parsedTokens:un,parsedBalances:pn,parsedAmp:yn,parsedPriceRates:Zn,parsedTotalShares:fr,parsedSwapFee:zr}=st(Ne),ci=un.map(ao=>ao===Vt?x.AddressZero:ao),ai=new X(Vt),[li,bi,os]=ai.sortTokens(Mt?ci:un,pn,Zn),es=bi.map((ao,ia)=>f.BigNumber.from(ao).mul(f.BigNumber.from(os[ia])).div(f.parseFixed("1",18)).toString());let Ds,ws=Array(un.length).fill("0"),Zs=Array(un.length).fill("0");if(Ht){const ao=li.indexOf(Ht),ia=o.StableMathBigInt._calcTokenOutGivenExactBptIn(BigInt(yn),es.map(od=>BigInt(od)),ao,BigInt(Ke),BigInt(fr),BigInt(zr)).toString(),ic=f.BigNumber.from(ia).div(f.BigNumber.from(os[ao])).mul(f.parseFixed("1",18)).toString();ws[ao]=ic,Zs[ao]=Wi(f.BigNumber.from(ic),f.BigNumber.from(ot)).toString(),Ds=y.exitExactBPTInForOneTokenOut(Ke,ao)}else ws=o.StableMathBigInt._calcTokensOutGivenExactBptIn(es.map(ao=>BigInt(ao)),BigInt(Ke),BigInt(fr)).map(ao=>ao.toString()).map((ao,ia)=>f.BigNumber.from(ao).mul(f.parseFixed("1",18)).div(f.BigNumber.from(os[ia])).toString()),Zs=ws.map(ao=>Wi(f.BigNumber.from(ao),f.BigNumber.from(ot)).toString()),Ds=y.exitExactBPTInForTokensOut(Ke);const io="exitPool",Xs={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:Zs,userData:Ds,toInternalBalance:!1}};return{to:_s,functionName:io,attributes:Xs,data:_.Vault__factory.createInterface().encodeFunctionData(io,[Xs.poolId,Xs.sender,Xs.recipient,Xs.exitPoolRequest]),expectedAmountsOut:ws,minAmountsOut:Zs}},this.buildExitExactTokensOut=({exiter:ge,pool:Ne,tokensOut:Ke,amountsOut:ot,slippage:Mt,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(ia=>!ia.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);if(Ne.tokens.some(ia=>!ia.priceRate))throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const{parsedTokens:Ht,parsedBalances:un,parsedPriceRates:pn,parsedAmp:yn,parsedTotalShares:Zn,parsedSwapFee:fr}=st(Ne),zr=new X(Vt),[,ci,ai]=zr.sortTokens(Ht,un,pn),[li,bi]=zr.sortTokens(Ke,ot),os=bi.map((ia,ic)=>f.BigNumber.from(ia).mul(f.BigNumber.from(ai[ic])).div(f.parseFixed("1",18)).toString()),es=ci.map((ia,ic)=>f.BigNumber.from(ia).mul(f.BigNumber.from(ai[ic])).div(f.parseFixed("1",18)).toString()),Ds=o.StableMathBigInt._calcBptInGivenExactTokensOut(BigInt(yn),es.map(ia=>BigInt(ia)),os.map(ia=>BigInt(ia)),BigInt(Zn),BigInt(fr)).toString(),ws=bo(f.BigNumber.from(Ds),f.BigNumber.from(Mt)).toString(),Zs=y.exitBPTInForExactTokensOut(bi,ws),Us=bi.map((ia,ic)=>ia===os[ic]?ia:f.BigNumber.from(ia).sub(1).toString()),Xs="exitPool",ao={poolId:Ne.id,sender:ge,recipient:ge,exitPoolRequest:{assets:li,minAmountsOut:Us,userData:Zs,toInternalBalance:!1}};return{to:_s,functionName:Xs,attributes:ao,data:_.Vault__factory.createInterface().encodeFunctionData(Xs,[ao.poolId,ao.sender,ao.recipient,ao.exitPoolRequest]),expectedBPTIn:Ds,maxBPTIn:ws}}}}class Cr{constructor(){this.buildJoin=({joiner:ge,pool:Ne,tokensIn:Ke,amountsIn:ot,slippage:Mt,wrappedNativeAsset:Vt})=>{if(Ke.length!=ot.length||Ke.length!=Ne.tokensList.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(Ne.tokens.some(ic=>!ic.decimals))throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);if(!Ne.amp)throw new Oi(E.BalancerErrorCode.MISSING_AMP);if(Ne.tokens.some(ic=>!ic.priceRate))throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const{parsedTokens:Ht,parsedBalances:un,parsedPriceRates:pn,parsedAmp:yn,parsedTotalShares:Zn,parsedSwapFee:fr}=st(Ne),zr=new X(Vt),[ci,ai]=zr.sortTokens(Ke,ot),[,li,bi]=zr.sortTokens(Ht,un,pn),os=ai.map((ic,od)=>f.BigNumber.from(ic).mul(f.BigNumber.from(bi[od])).div(f.parseFixed("1",18)).toString()),es=li.map((ic,od)=>f.BigNumber.from(ic).mul(f.BigNumber.from(bi[od])).div(f.parseFixed("1",18)).toString()),Ds=o.StableMathBigInt._calcBptOutGivenExactTokensIn(BigInt(yn),es.map(ic=>BigInt(ic)),os.map(ic=>BigInt(ic)),BigInt(Zn),BigInt(fr)).toString(),ws=Wi(f.BigNumber.from(Ds),f.BigNumber.from(Mt)).toString(),Zs=y.joinExactTokensInForBPTOut(ai,ws),io="joinPool",Xs={poolId:Ne.id,sender:ge,recipient:ge,joinPoolRequest:{assets:ci,maxAmountsIn:ai,userData:Zs,fromInternalBalance:!1}},ao=_.Vault__factory.createInterface().encodeFunctionData(io,[Xs.poolId,Xs.sender,Xs.recipient,Xs.joinPoolRequest]),ia=ot.filter((ic,od)=>Ke[od]===x.AddressZero);return{to:"0xBA12222222228d8Ba445958a75a0704d566BF2C8",functionName:io,attributes:Xs,data:ao,value:ia[0]?f.BigNumber.from(ia[0]):void 0,minBPTOut:ws,expectedBPTOut:Ds}}}}class Sr{calcTotal(ge){var Ne,Ke;let ot=x.Zero,Mt=x.Zero;for(let Vt=0;Vt{if(!ai)throw new Oi(E.BalancerErrorCode.MISSING_DECIMALS);return BigInt(ai)}),yn=Mt.map(ai=>{if(!ai)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);return BigInt(ai)});if(!Vt)throw new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const Zn=pn.map(ai=>tt(BigInt(ai))),fr=Ke.map((ai,li)=>mt(BigInt(ai),Zn[li])),zr=fr.map((ai,li)=>wt.mulDownFixed(ai,yn[li]));let ci=Ee;for(let ai=0;aiBigInt(Vt)));return Du(BigInt(Ke),Mt,ot).toString()}}class _o{constructor(ge=new Xr,Ne=new Cr,Ke=new Sr,ot=new Qi,Mt=new Vs){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Mt}}class ta{constructor(){this.buildExitExactBPTIn=({})=>{throw new Error("To be implemented")},this.buildExitExactTokensOut=({})=>{throw new Error("To be implemented")}}}class Tu{constructor(){this.buildJoin=({})=>{throw new Error("To be implemented")}}}class qo{constructor(ge=new ta,Ne=new Tu,Ke=new ja,ot=new jo,Mt=new yo){this.exit=ge,this.join=Ne,this.liquidity=Ke,this.spotPriceCalculator=ot,this.priceImpactCalculator=Mt}}class xo{constructor(){this.buildExitExactBPTIn=({})=>{throw new Error("To be implemented")},this.buildExitExactTokensOut=({})=>{throw new Error("To be implemented")}}}class Wa{constructor(){this.buildJoin=({})=>{throw new Error("To be implemented")}}}const ou=wi("1",18);class Vu{calcTotal(ge){var Ne,Ke;let ot=x.Zero,Mt=x.Zero;for(let Vt=0;Vtpn.address!==ge.address),ot=yield Promise.all(Ke.map(function(){var pn=ie(function*(yn){const Zn=yield Ne.pools.findBy("address",yn.address);if(!Zn)return;const fr=wi(yield Ne.getLiquidity(Zn),18),zr=wi(Zn.totalShares,18),ci=wi(yn.balance,18),ai=zr.eq(0)?0:fr.mul(ci).div(zr);return{address:Zn.address,liquidity:ai.toString()}});return function(yn){return pn.apply(this,arguments)}}())),Mt=ot.reduce((pn,yn)=>pn.add(yn?yn.liquidity:f.BigNumber.from(0)),f.BigNumber.from(0)),Vt=Ke.filter(pn=>!ot.find(yn=>(null==yn?void 0:yn.address)===pn.address)),Ht=yield Promise.all(Vt.map(function(){var pn=ie(function*(yn){var Zn;const fr=yield Ne.tokenPrices.find(yn.address);return{address:yn.address,decimals:yn.decimals,priceRate:yn.priceRate,price:(null==fr?void 0:fr.usd)&&fr||{usd:null===(Zn=yn.token)||void 0===Zn?void 0:Zn.latestUSDPrice},balance:yn.balance,weight:yn.weight}});return function(yn){return pn.apply(this,arguments)}}())),un=wi(po.from(ge.poolType).liquidity.calcTotal(Ht),18);return cs(Mt.add(un),18)})()}}function rr(qe,ge,Ne,Ke){return hn.apply(this,arguments)}function hn(){return hn=ie(function*(qe,ge,Ne,Ke){const ot={sender:x.AddressZero,recipient:x.AddressZero,fromInternalBalance:!1,toInternalBalance:!1};try{return(yield qe.callStatic.queryBatchSwap(ge,Ne,Ke,ot)).map(Mt=>Mt.toString())}catch(Mt){throw`queryBatchSwap call error: ${Mt}`}}),hn.apply(this,arguments)}function Ir(){return Ir=ie(function*(qe,ge,Ne){Ne.fetchPools.fetchPools&&(yield qe.fetchPools());const Ke=[],ot=[];for(let pn=0;pn{zr.forEach(ai=>{ai.assetInIndex=Zn.indexOf(pn[ci][ai.assetInIndex]),ai.assetOutIndex=Zn.indexOf(pn[ci][ai.assetOutIndex])})}),{swaps:yn.flat(),assets:Zn}}(ot,Ke),Vt=Ne.swapType===E.SwapType.SwapExactIn?Ne.tokensOut:Ne.tokensIn,Ht=Array(Vt.length).fill("0");let un=Array(Mt.assets.length).fill("0");try{un=yield rr(ge,Ne.swapType,Mt.swaps,Mt.assets),un.length>0&&Vt.forEach((pn,yn)=>{var Zn;return Ht[yn]=null!==(Zn=un[Mt.assets.indexOf(pn.toLowerCase())].toString())&&void 0!==Zn?Zn:x.Zero.toString()})}catch{throw new Oi(E.BalancerErrorCode.QUERY_BATCH_SWAP)}return{returnAmounts:Ht,swaps:Mt.swaps,assets:Mt.assets,deltas:un.map(pn=>pn.toString())}}),Ir.apply(this,arguments)}function Ei(qe,ge,Ne,Ke,ot){return Os.apply(this,arguments)}function Os(){return Os=ie(function*(qe,ge,Ne,Ke,ot){const Mt=Ne===E.SwapType.SwapExactIn?m.SwapTypes.SwapExactIn:m.SwapTypes.SwapExactOut;return yield ot.getSwaps(qe.toLowerCase(),ge.toLowerCase(),Mt,Ke)}),Os.apply(this,arguments)}var Cs=function(){return Cs=Object.assign||function(qe){for(var ge,Ne=1,Ke=arguments.length;Neqe();function Ff(qe,ge=Tl){return{PoolShare:(Ne,Ke)=>ge(ot=>qe.request(Bo,Ne,{...Ke,...ot}),"PoolShare","query"),PoolShares:(Ne,Ke)=>ge(ot=>qe.request(xf,Ne,{...Ke,...ot}),"PoolShares","query"),Pools:(Ne,Ke)=>ge(ot=>qe.request(la,Ne,{...Ke,...ot}),"Pools","query"),AllPools:(Ne,Ke)=>ge(ot=>qe.request(tc,Ne,{...Ke,...ot}),"AllPools","query"),Pool:(Ne,Ke)=>ge(ot=>qe.request(fc,Ne,{...Ke,...ot}),"Pool","query"),PoolHistoricalLiquidities:(Ne,Ke)=>ge(ot=>qe.request(il,Ne,{...Ke,...ot}),"PoolHistoricalLiquidities","query"),PoolSnapshots:(Ne,Ke)=>ge(ot=>qe.request(rd,Ne,{...Ke,...ot}),"PoolSnapshots","query"),JoinExits:(Ne,Ke)=>ge(ot=>qe.request(e0,Ne,{...Ke,...ot}),"JoinExits","query"),Balancers:(Ne,Ke)=>ge(ot=>qe.request(Nc,Ne,{...Ke,...ot}),"Balancers","query"),TokenPrices:(Ne,Ke)=>ge(ot=>qe.request(Kd,Ne,{...Ke,...ot}),"TokenPrices","query"),TokenLatestPrices:(Ne,Ke)=>ge(ot=>qe.request(Fh,Ne,{...Ke,...ot}),"TokenLatestPrices","query"),TokenLatestPrice:(Ne,Ke)=>ge(ot=>qe.request(hl,Ne,{...Ke,...ot}),"TokenLatestPrice","query"),User:(Ne,Ke)=>ge(ot=>qe.request(mh,Ne,{...Ke,...ot}),"User","query"),Users:(Ne,Ke)=>ge(ot=>qe.request(dd,Ne,{...Ke,...ot}),"Users","query")}}var gh,Lh,Uh,Hc,fd,Ca,Or,Ti,ii,to,da,iu,fu,Ia,jh;(function(qe){qe.Arbitrum="Arbitrum",qe.Optimism="Optimism",qe.Polygon="Polygon"})(gh||(gh={})),function(qe){qe.Gauges="gauges",qe.Id="id",qe.NumGauges="numGauges"}(Lh||(Lh={})),function(qe){qe.Balance="balance",qe.Gauge="gauge",qe.Id="id",qe.User="user"}(Uh||(Uh={})),function(qe){qe.Id="id",qe.Name="name"}(Hc||(Hc={})),function(qe){qe.Gauge="gauge",qe.Id="id",qe.Timestamp="timestamp",qe.User="user",qe.Weight="weight"}(fd||(fd={})),function(qe){qe.AddedTimestamp="addedTimestamp",qe.Address="address",qe.Id="id",qe.LiquidityGauge="liquidityGauge",qe.RootGauge="rootGauge",qe.Type="type"}(Ca||(Ca={})),function(qe){qe.Factory="factory",qe.Gauge="gauge",qe.Id="id",qe.IsKilled="isKilled",qe.IsPreferentialGauge="isPreferentialGauge",qe.Pool="pool",qe.PoolAddress="poolAddress",qe.PoolId="poolId",qe.RelativeWeightCap="relativeWeightCap",qe.Shares="shares",qe.Streamer="streamer",qe.Symbol="symbol",qe.Tokens="tokens",qe.TotalSupply="totalSupply"}(Or||(Or={})),function(qe){qe.Asc="asc",qe.Desc="desc"}(Ti||(Ti={})),function(qe){qe.Address="address",qe.Gauges="gauges",qe.GaugesList="gaugesList",qe.Id="id",qe.PoolId="poolId",qe.PreferentialGauge="preferentialGauge"}(ii||(ii={})),function(qe){qe.Decimals="decimals",qe.Gauge="gauge",qe.Id="id",qe.PeriodFinish="periodFinish",qe.Rate="rate",qe.Symbol="symbol",qe.TotalDeposited="totalDeposited"}(to||(to={})),function(qe){qe.Chain="chain",qe.Factory="factory",qe.Gauge="gauge",qe.Id="id",qe.IsKilled="isKilled",qe.Recipient="recipient",qe.RelativeWeightCap="relativeWeightCap"}(da||(da={})),function(qe){qe.GaugeShares="gaugeShares",qe.GaugeVotes="gaugeVotes",qe.Id="id",qe.VotingLocks="votingLocks"}(iu||(iu={})),function(qe){qe.Id="id",qe.LockedBalance="lockedBalance",qe.UnlockTime="unlockTime",qe.UpdatedAt="updatedAt",qe.User="user",qe.VotingEscrowId="votingEscrowID"}(fu||(fu={})),function(qe){qe.Id="id",qe.Locks="locks",qe.StakedSupply="stakedSupply"}(Ia||(Ia={})),function(qe){qe.Allow="allow",qe.Deny="deny"}(jh||(jh={}));const Lt=ra` + ${oa}`,Tl=(qe,ge,Ne)=>qe();function Ff(qe,ge=Tl){return{PoolShare:(Ne,Ke)=>ge(ot=>qe.request(Bo,Ne,{...Ke,...ot}),"PoolShare","query"),PoolShares:(Ne,Ke)=>ge(ot=>qe.request(xf,Ne,{...Ke,...ot}),"PoolShares","query"),Pools:(Ne,Ke)=>ge(ot=>qe.request(la,Ne,{...Ke,...ot}),"Pools","query"),AllPools:(Ne,Ke)=>ge(ot=>qe.request(tc,Ne,{...Ke,...ot}),"AllPools","query"),Pool:(Ne,Ke)=>ge(ot=>qe.request(fc,Ne,{...Ke,...ot}),"Pool","query"),PoolHistoricalLiquidities:(Ne,Ke)=>ge(ot=>qe.request(il,Ne,{...Ke,...ot}),"PoolHistoricalLiquidities","query"),PoolSnapshots:(Ne,Ke)=>ge(ot=>qe.request(rd,Ne,{...Ke,...ot}),"PoolSnapshots","query"),JoinExits:(Ne,Ke)=>ge(ot=>qe.request(e0,Ne,{...Ke,...ot}),"JoinExits","query"),Balancers:(Ne,Ke)=>ge(ot=>qe.request(Nc,Ne,{...Ke,...ot}),"Balancers","query"),TokenPrices:(Ne,Ke)=>ge(ot=>qe.request(Kd,Ne,{...Ke,...ot}),"TokenPrices","query"),TokenLatestPrices:(Ne,Ke)=>ge(ot=>qe.request(Fh,Ne,{...Ke,...ot}),"TokenLatestPrices","query"),TokenLatestPrice:(Ne,Ke)=>ge(ot=>qe.request(hl,Ne,{...Ke,...ot}),"TokenLatestPrice","query"),User:(Ne,Ke)=>ge(ot=>qe.request(mh,Ne,{...Ke,...ot}),"User","query"),Users:(Ne,Ke)=>ge(ot=>qe.request(dd,Ne,{...Ke,...ot}),"Users","query")}}var gh,Lh,Uh,Hc,fd,Ca,Or,Ti,ii,to,da,iu,hu,Ia,jh;(function(qe){qe.Arbitrum="Arbitrum",qe.Optimism="Optimism",qe.Polygon="Polygon"})(gh||(gh={})),function(qe){qe.Gauges="gauges",qe.Id="id",qe.NumGauges="numGauges"}(Lh||(Lh={})),function(qe){qe.Balance="balance",qe.Gauge="gauge",qe.Id="id",qe.User="user"}(Uh||(Uh={})),function(qe){qe.Id="id",qe.Name="name"}(Hc||(Hc={})),function(qe){qe.Gauge="gauge",qe.Id="id",qe.Timestamp="timestamp",qe.User="user",qe.Weight="weight"}(fd||(fd={})),function(qe){qe.AddedTimestamp="addedTimestamp",qe.Address="address",qe.Id="id",qe.LiquidityGauge="liquidityGauge",qe.RootGauge="rootGauge",qe.Type="type"}(Ca||(Ca={})),function(qe){qe.Factory="factory",qe.Gauge="gauge",qe.Id="id",qe.IsKilled="isKilled",qe.IsPreferentialGauge="isPreferentialGauge",qe.Pool="pool",qe.PoolAddress="poolAddress",qe.PoolId="poolId",qe.RelativeWeightCap="relativeWeightCap",qe.Shares="shares",qe.Streamer="streamer",qe.Symbol="symbol",qe.Tokens="tokens",qe.TotalSupply="totalSupply"}(Or||(Or={})),function(qe){qe.Asc="asc",qe.Desc="desc"}(Ti||(Ti={})),function(qe){qe.Address="address",qe.Gauges="gauges",qe.GaugesList="gaugesList",qe.Id="id",qe.PoolId="poolId",qe.PreferentialGauge="preferentialGauge"}(ii||(ii={})),function(qe){qe.Decimals="decimals",qe.Gauge="gauge",qe.Id="id",qe.PeriodFinish="periodFinish",qe.Rate="rate",qe.Symbol="symbol",qe.TotalDeposited="totalDeposited"}(to||(to={})),function(qe){qe.Chain="chain",qe.Factory="factory",qe.Gauge="gauge",qe.Id="id",qe.IsKilled="isKilled",qe.Recipient="recipient",qe.RelativeWeightCap="relativeWeightCap"}(da||(da={})),function(qe){qe.GaugeShares="gaugeShares",qe.GaugeVotes="gaugeVotes",qe.Id="id",qe.VotingLocks="votingLocks"}(iu||(iu={})),function(qe){qe.Id="id",qe.LockedBalance="lockedBalance",qe.UnlockTime="unlockTime",qe.UpdatedAt="updatedAt",qe.User="user",qe.VotingEscrowId="votingEscrowID"}(hu||(hu={})),function(qe){qe.Id="id",qe.Locks="locks",qe.StakedSupply="stakedSupply"}(Ia||(Ia={})),function(qe){qe.Allow="allow",qe.Deny="deny"}(jh||(jh={}));const Lt=ra` fragment SubgraphGaugeShare on GaugeShare { id balance @@ -485,7 +485,7 @@ ${ra` } } } - `,Bs=(qe,ge,Ne)=>qe();function Ns(qe){return Ff(new S.GraphQLClient(qe))}function ha(qe){return function(ge,Ne=Bs){return{GaugeShare:(Ke,ot)=>Ne(Ct=>ge.request(cr,Ke,{...ot,...Ct}),"GaugeShare","query"),GaugeShares:(Ke,ot)=>Ne(Ct=>ge.request(Gr,Ke,{...ot,...Ct}),"GaugeShares","query"),LiquidityGauges:(Ke,ot)=>Ne(Ct=>ge.request(Bi,Ke,{...ot,...Ct}),"LiquidityGauges","query"),Pools:(Ke,ot)=>Ne(Ct=>ge.request(Ai,Ke,{...ot,...Ct}),"Pools","query"),PoolGauges:(Ke,ot)=>Ne(Ct=>ge.request(gi,Ke,{...ot,...Ct}),"PoolGauges","query")}}(new S.GraphQLClient(qe))}const Fo=["function aggregate(tuple[](address target, bytes callData) memory calls) public view returns (uint256 blockNumber, bytes[] memory returnData)"],Sa=(qe,ge)=>new g.Contract(qe,Fo,ge);class Zo{constructor(ge,Ne,Ke,ot={}){this.options={},this.calls=[],this.paths=[],this.multiAddress=ge,this.provider=Ne,this.interface=new d.Interface(Ke),this.options=ot}call(ge,Ne,Ke,ot){return this.calls.push([Ne,Ke,ot]),this.paths.push(ge),this}execute(ge={}){var Ne=this;return ie(function*(){const Ke=ge;return(yield Ne.executeMulticall()).forEach((ot,Ct)=>u.set(Ke,Ne.paths[Ct],ot.length>1?ot:ot[0])),Ne.calls=[],Ne.paths=[],Ke})()}executeMulticall(){var ge=this;return ie(function*(){const Ne=Sa(ge.multiAddress,ge.provider),[,Ke]=yield Ne.aggregate(ge.calls.map(([ot,Ct,Vt])=>[ot,ge.interface.encodeFunctionData(Ct,Vt)]),ge.options);return Ke.map((ot,Ct)=>ge.interface.decodeFunctionResult(ge.calls[Ct][1],ot))})()}}var Ma=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],$u=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],bu=[{inputs:[{internalType:"contract IERC20",name:"_underlying",type:"address"},{internalType:"contract IERC20",name:"_bond",type:"address"},{internalType:"uint256",name:"_expiration",type:"uint256"},{internalType:"uint256",name:"_unitSeconds",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_percentFee",type:"uint256"},{internalType:"uint256",name:"_percentFeeGov",type:"uint256"},{internalType:"address",name:"_governance",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"collectedBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"collectedBond",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBond",type:"uint256"}],name:"FeeCollection",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"FEE_BOUND",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"bond",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"bondDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesBond",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesUnderlying",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"currentBalanceTokenIn",type:"uint256"},{internalType:"uint256",name:"currentBalanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"percentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"percentFeeGov",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"reserveX",type:"uint256"},{internalType:"uint256",name:"reserveY",type:"uint256"},{internalType:"bool",name:"out",type:"bool"}],name:"solveTradeInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"underlying",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"underlyingDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"unitSeconds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],au=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],zl=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ComposableStablePool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"TokenRateCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!0,internalType:"contract IRateProvider",name:"provider",type:"address"},{indexed:!1,internalType:"uint256",name:"cacheDuration",type:"uint256"}],name:"TokenRateProviderSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastJoinExitData",outputs:[{internalType:"uint256",name:"lastJoinExitAmplification",type:"uint256"},{internalType:"uint256",name:"lastPostJoinExitInvariant",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumBpt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRateCache",outputs:[{internalType:"uint256",name:"rate",type:"uint256"},{internalType:"uint256",name:"oldRate",type:"uint256"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"uint256",name:"expires",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isTokenExemptFromYieldProtocolFee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"setTokenRateCacheDuration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"updateTokenRateCache",outputs:[],stateMutability:"nonpayable",type:"function"}];function sl(qe,ge,Ne,Ke){return id.apply(this,arguments)}function id(){return id=ie(function*(qe,ge,Ne,Ke){if(0===qe.length)return qe;const ot=Object.values(Object.fromEntries([..._.Vault__factory.abi,...Te,...Ma,...$u,...bu,...au,...zl].map(yn=>[yn.name,yn]))),Ct=new Zo(ge,Ke,ot),Vt=Object.values(m.PoolFilter),Ht=[];qe.forEach(yn=>{Vt.includes(yn.poolType)?(Ht.push(yn),Ct.call(`${yn.id}.poolTokens`,Ne,"getPoolTokens",[yn.id]),Ct.call(`${yn.id}.totalSupply`,yn.address,"totalSupply"),(yn.poolType.includes("Linear")||"StablePhantom"===yn.poolType)&&Ct.call(`${yn.id}.virtualSupply`,yn.address,"getVirtualSupply"),"ComposableStable"===yn.poolType&&Ct.call(`${yn.id}.actualSupply`,yn.address,"getActualSupply"),"Weighted"===yn.poolType||"LiquidityBootstrapping"===yn.poolType||"Investment"===yn.poolType?(Ct.call(`${yn.id}.weights`,yn.address,"getNormalizedWeights"),Ct.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage")):"Stable"===yn.poolType||"MetaStable"===yn.poolType||"StablePhantom"===yn.poolType||"ComposableStable"===yn.poolType?(Ct.call(`${yn.id}.amp`,yn.address,"getAmplificationParameter"),Ct.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage")):"Element"===yn.poolType?Ct.call(`${yn.id}.swapFee`,yn.address,"percentFee"):yn.poolType.toString().includes("Linear")?(Ct.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage"),Ct.call(`${yn.id}.targets`,yn.address,"getTargets"),Ct.call(`${yn.id}.rate`,yn.address,"getWrappedTokenRate")):yn.poolType.toString().includes("Gyro")&&Ct.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage")):console.error(`Unknown pool type: ${yn.poolType} ${yn.id}`)});let un={};try{un=yield Ct.execute()}catch{throw"Issue with multicall execution."}const pn=[];return Object.entries(un).forEach(([yn,Zn],fr)=>{try{const{poolTokens:zr,swapFee:ci,weights:ai,totalSupply:li,virtualSupply:bi,actualSupply:os}=Zn;if("Stable"===Ht[fr].poolType||"MetaStable"===Ht[fr].poolType||"StablePhantom"===Ht[fr].poolType||"ComposableStable"===Ht[fr].poolType){if(!Zn.amp)return void console.error(`Stable Pool Missing Amp: ${yn}`);Ht[fr].amp=f.formatFixed(Zn.amp[0],3)}if(Ht[fr].poolType.includes("Linear")){if(!Zn.targets)return void console.error(`Linear Pool Missing Targets: ${yn}`);Ht[fr].lowerTarget=f.formatFixed(Zn.targets[0],18),Ht[fr].upperTarget=f.formatFixed(Zn.targets[1],18);const es=Ht[fr].wrappedIndex;if(void 0===es||void 0===Zn.rate)return void console.error(`Linear Pool Missing WrappedIndex or PriceRate: ${yn}`);Ht[fr].tokens[es].priceRate=f.formatFixed(Zn.rate,18)}if(Ht[fr].swapFee=f.formatFixed(ci,18),zr.tokens.forEach((es,Ds)=>{const ws=Ht[fr].tokens.find(Zs=>rs(Zs.address,es));if(!ws)throw`Pool Missing Expected Token: ${yn} ${es}`;ws.balance=f.formatFixed(zr.balances[Ds],ws.decimals),ai&&(ws.weight=f.formatFixed(ai[Ds],18))}),Ht[fr].poolType.includes("Linear")||"StablePhantom"===Ht[fr].poolType){if(void 0===bi)return void console.error(`Pool with pre-minted BPT missing Virtual Supply: ${yn}`);Ht[fr].totalShares=f.formatFixed(bi,18)}else if("ComposableStable"===Ht[fr].poolType){if(void 0===os)return void console.error(`ComposableStable missing Actual Supply: ${yn}`);Ht[fr].totalShares=f.formatFixed(os,18)}else Ht[fr].totalShares=f.formatFixed(li,18);pn.push(Ht[fr])}catch(zr){throw`Issue with pool onchain data: ${zr}`}}),pn}),id.apply(this,arguments)}class Lf{constructor(ge,Ne,Ke,ot){this.client=ge,this.provider=Ne,this.network=Ke,this.sorConfig=ot}getPools(){var ge=this;return ie(function*(){const Ne=(yield ge.getSubgraphPools()).filter(Ke=>!ge.network.poolsToIgnore||-1===ge.network.poolsToIgnore.findIndex(ot=>rs(ot,Ke.address))).map(ot=>({...ot,poolType:ot.poolType||"",tokens:(ot.tokens||[]).map(Ct=>({...Ct,weight:Ct.weight||null})),totalWeight:ot.totalWeight||void 0,amp:ot.amp||void 0,expiryTime:ot.expiryTime?u.parseInt(ot.expiryTime):void 0,unitSeconds:ot.unitSeconds?u.parseInt(ot.unitSeconds):void 0,principalToken:ot.principalToken||void 0,baseToken:ot.baseToken||void 0}));return!1===ge.sorConfig.fetchOnChainBalances?Ne:sl(Ne,ge.network.addresses.contracts.multicall,ge.network.addresses.contracts.vault,ge.provider)})()}getSubgraphPools(){var ge=this;return ie(function*(){const{pool0:Ne,pool1000:Ke,pool2000:ot}=yield ge.client.AllPools({where:{swapEnabled:!0,totalShares_gt:"0.000000000001"},orderBy:lo.TotalLiquidity,orderDirection:xi.Desc});return[...Ne,...Ke,...ot]})()}}class Uf{constructor(ge){this.chainId=ge}getNativeAssetPriceInToken(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.getTokenPriceInNativeAsset(ge);return""+1/parseFloat(Ke)})()}getTokenPriceInNativeAsset(ge){var Ne=this;return ie(function*(){const Ke=`https://api.coingecko.com/api/v3/simple/token_price/${Ne.platformId}?contract_addresses=${ge}&vs_currencies=${Ne.nativeAssetId}`,{data:ot}=yield R.default.get(Ke,{headers:{Accept:"application/json","Content-Type":"application/json"}});if(void 0===ot[ge.toLowerCase()][Ne.nativeAssetId])throw Error("No price returned from Coingecko");return ot[ge.toLowerCase()][Ne.nativeAssetId]})()}get platformId(){switch(this.chainId){case 1:case 42:return"ethereum";case 137:return"polygon-pos";case 42161:return"arbitrum-one";case 100:return"xdai"}return"2"}get nativeAssetId(){switch(this.chainId){case 1:case 42:case 42161:return"eth";case 137:return"";case 100:return"xdai"}return""}}class zc{constructor(ge,Ne){this.client=ge,this.weth=Ne.toLowerCase()}getNativeAssetPriceInToken(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.getLatestPriceInEthFromSubgraph(ge);if(!Ke)throw Error("No price found in the subgraph");return""+1/Ke})()}getLatestPriceInEthFromSubgraph(ge){var Ne=this;return ie(function*(){ge=ge.toLowerCase();const{latestPrices:Ke}=yield Ne.client.TokenLatestPrices({where:{asset_in:[ge,Ne.weth]}}),ot=u.keyBy(Ke,"id");if(ot[`${ge}-${Ne.weth}`])return parseFloat(ot[`${ge}-${Ne.weth}`].price);const Ct=Ke.filter(Vt=>Vt.asset===ge);for(const Vt of Ct){const Ht=ot[`${Vt.pricingAsset}-${Ne.weth}`];if(Ht)return parseFloat(Vt.price)*parseFloat(Ht.price)}return null})()}}function Mc(qe){var ge,Ne;if("number"==typeof qe.network){const Ke=Ao[qe.network];return{...Ke,urls:{...Ke.urls,subgraph:null!==(ge=qe.customSubgraphUrl)&&void 0!==ge?ge:Ke.urls.subgraph},tenderly:qe.tenderly}}return{...qe.network,urls:{...qe.network.urls,subgraph:null!==(Ne=qe.customSubgraphUrl)&&void 0!==Ne?Ne:qe.network.urls.subgraph},tenderly:qe.network.tenderly}}class Yu extends m.SOR{constructor(ge){const Ne=Mc(ge),Ke=Yu.getSorConfig(ge),ot=Yu.getSorNetworkConfig(Ne),Ct=new w.JsonRpcProvider(ge.rpcUrl,ge.network),Vt=Ns(Ne.urls.subgraph);super(Ct,ot,Yu.getPoolDataService(Ne,Ke,Ct,Vt),Yu.getTokenPriceService(Ne,Ke,Vt))}static getSorConfig(ge){return{tokenPriceService:"coingecko",poolDataService:"subgraph",fetchOnChainBalances:!0,...ge.sor}}static getSorNetworkConfig(ge){var Ne;return{...ge,vault:ge.addresses.contracts.vault,weth:ge.addresses.tokens.wrappedNativeAsset,lbpRaisingTokens:null===(Ne=ge.addresses.tokens)||void 0===Ne?void 0:Ne.lbpRaisingTokens,wETHwstETH:ge.pools.wETHwstETH,connectingTokens:ge.sorConnectingTokens}}static getPoolDataService(ge,Ne,Ke,ot){return"object"==typeof Ne.poolDataService?Ne.poolDataService:new Lf(ot,Ke,ge,Ne)}static getTokenPriceService(ge,Ne,Ke){return"object"==typeof Ne.tokenPriceService?Ne.tokenPriceService:("subgraph"===Ne.tokenPriceService&&new zc(Ke,ge.addresses.tokens.wrappedNativeAsset),new Uf(ge.chainId))}}function hu(qe){if(qe.poolIds.length>2)throw new Error("Simple flash swap only supports a maximum of two pools");if(qe.assets.length>2)throw new Error("Simple flash swap only supports a maximum of to two assets (tokens)")}function b1(qe,ge){return[{poolId:qe[0],assetInIndex:0,assetOutIndex:1,amount:ge,userData:"0x"},{poolId:qe[1],assetInIndex:1,assetOutIndex:0,amount:"0",userData:"0x"}]}function yh(qe){return-1*Number(qe)}function hd(qe){return u.sum(qe)}var Ad=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"wstETH",type:"address"},{internalType:"contract IBalancerMinter",name:"minter",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"exitPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge[]",name:"gauges",type:"address[]"}],name:"gaugeClaimRewards",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeDeposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"gaugeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"gaugeSetMinterApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeWithdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getEntrypoint",outputs:[{internalType:"contract IBalancerRelayer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"},{internalType:"uint256",name:"value",type:"uint256"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"ref",type:"uint256"}],name:"peekChainedReferenceValue",outputs:[{internalType:"uint256",name:"value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"},{internalType:"bytes",name:"authorisation",type:"bytes"}],name:"setRelayerApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETHAndWrap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapWstETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20Permit",name:"token",type:"address"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20PermitDAI",name:"token",type:"address"},{internalType:"address",name:"holder",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"bool",name:"allowed",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermitDAI",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapStETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"uAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"}];const Vh={"0xae7ab96520de3a18e5e111b5eaab095312d7fe84":"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0","0xd46ba6d942050d489dbd938a2c909a5d5039a161":"0xedb171c18ce90b633db442f2a6f72874093b49ef","0x1e6bb68acec8fefbd87d192be09bb274170a0548":"0xF03387d8d0FF326ab586A58E0ab4121d106147DF"};function j0(qe){let ge=qe;return Vh.hasOwnProperty(qe)&&(ge=Vh[qe]),ge}var lf;function bh(qe,ge,Ne){const{tokens:Ke,contracts:ot}=zi(Ne);let Ct={id:lf.vault,address:ot.vault};return Ke.stETH&&ot.lidoRelayer&&[qe,ge].includes(Ke.stETH)&&(Ct={id:lf.lido,address:ot.lidoRelayer}),Ct}function Hh(qe){let ge=_.Vault__factory.abi;return qe.id===lf.lido&&(ge=Ad),ge.filter(Ne=>Ne.name&&["swap","batchSwap"].includes(Ne.name))}function nc(qe){return{amount:qe,max:ge=>qe.mul(1e3+ge).div(1e3),min:ge=>qe.mul(1e3-ge).div(1e3)}}function Al(qe,ge){const Ne=ge===E.SwapType.SwapExactIn?qe.swapAmount:qe.returnAmount,Ke=ge===E.SwapType.SwapExactIn?qe.returnAmount:qe.swapAmount,ot=ge===E.SwapType.SwapExactIn?qe.swapAmountForSwaps||qe.swapAmount:qe.returnAmountFromSwaps||qe.returnAmount,Ct=ge===E.SwapType.SwapExactIn?qe.returnAmountFromSwaps||qe.returnAmount:qe.swapAmountForSwaps||qe.swapAmount,Vt=j0(qe.tokenIn),Ht=j0(qe.tokenOut);return{...qe,amountIn:Ne,amountOut:Ke,amountInForLimits:nc(ot),amountOutForLimits:nc(Ct),tokenInForSwaps:Vt,tokenOutFromSwaps:Ht}}!function(qe){qe[qe.vault=1]="vault",qe[qe.lido=2]="lido"}(lf||(lf={}));class V0{constructor(ge,Ne,Ke){this.kind=Ne,this.chainId=Ke,this.functionName="swap",this.swapInfo=Al(ge,Ne),this.relayer=bh(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(ge,Ne){this.funds={sender:ge,recipient:Ne||ge,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(ge){this.deadline=ge.toString()}get amount(){return this.kind===E.SwapType.SwapExactOut?this.swapInfo.amountOutForLimits.amount:this.swapInfo.amountInForLimits.amount}setLimits(ge){this.limit=this.kind===E.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(ge).toString():this.swapInfo.amountInForLimits.max(ge).toString()}get singleSwap(){return{poolId:this.swapInfo.swaps[0].poolId,kind:this.kind,assetIn:this.swapInfo.tokenInForSwaps,assetOut:this.swapInfo.tokenOutFromSwaps,amount:this.amount.toString(),userData:"0x"}}attributes(){var ge;if(!this.funds||!this.limit||!this.deadline)throw new Error("Uninitialized arguments");let Ne={request:this.singleSwap,funds:this.funds,limit:this.limit,deadline:this.deadline};const Ke=this.fragment();return Ke[0].inputs&&(null===(ge=Ke[0].inputs)||void 0===ge?void 0:ge.length)>4&&(Ne={...Ne,value:"0",outputReference:"0"}),Ne}data(){return new d.Interface(this.fragment()).encodeFunctionData("swap",Object.values(this.attributes()))}value(ge){let Ne=f.BigNumber.from(0);return this.swapInfo.tokenIn===x.AddressZero&&(Ne=this.kind===E.SwapType.SwapExactIn?this.swapInfo.amountIn:this.swapInfo.amountInForLimits.max(ge)),Ne}to(){return this.relayer.address}fragment(){return Hh(this.relayer).filter(ge=>ge.name===this.functionName)}}class v1{constructor(ge,Ne,Ke){this.kind=Ne,this.chainId=Ke,this.functionName="batchSwap",this.swapInfo=Al(ge,Ne),this.relayer=bh(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(ge,Ne){this.funds={sender:ge,recipient:Ne||ge,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(ge){this.deadline=ge}minAmountOut(ge){return this.kind===E.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(ge):this.swapInfo.amountOutForLimits.amount}maxAmountIn(ge){return this.kind===E.SwapType.SwapExactOut?this.swapInfo.amountInForLimits.max(ge):this.swapInfo.amountInForLimits.amount}setLimits(ge){this.limits=this.swapInfo.tokenAddresses.map(Ne=>{let Ke=f.BigNumber.from(0);return Ne===this.swapInfo.tokenInForSwaps&&(Ke=this.maxAmountIn(ge)),Ne===this.swapInfo.tokenOutFromSwaps&&(Ke=this.minAmountOut(ge).mul(-1)),Ke}).map(Ne=>Ne.toString().split(".")[0])}attributes(){var ge;if(!this.funds||!this.limits||!this.deadline)throw new Error("Uninitialized arguments");let Ne={kind:this.kind,swaps:this.swapInfo.swaps,assets:this.swapInfo.tokenAddresses,funds:this.funds,limits:this.limits,deadline:this.deadline};const Ke=this.fragment();return Ke[0].inputs&&(null===(ge=Ke[0].inputs)||void 0===ge?void 0:ge.length)>6&&(Ne={...Ne,value:"0",outputReferences:[]}),Ne}data(){return new d.Interface(this.fragment()).encodeFunctionData("batchSwap",Object.values(this.attributes()))}value(ge){let Ne=f.BigNumber.from(0);return this.swapInfo.tokenIn===x.AddressZero&&(Ne=this.maxAmountIn(ge)),Ne}to(){return this.relayer.address}fragment(){return Hh(this.relayer).filter(ge=>ge.name===this.functionName)}}class df{constructor(ge){ge instanceof m.SOR?(this.sor=ge,this.chainId=this.sor.provider._network.chainId):(this.sor=new Yu(ge),this.chainId=ge.network),this.vaultContract=_.Vault__factory.connect(_s,this.sor.provider)}static getLimitsForSlippage(ge,Ne,Ke,ot,Ct,Vt){return so(ge,Ne,Ke,ot,Ct,Vt).map(Ht=>Ht.toString())}findRouteGivenIn({tokenIn:ge,tokenOut:Ne,amount:Ke,gasPrice:ot,maxPools:Ct=4}){var Vt=this;return ie(function*(){return Vt.sor.getSwaps(ge,Ne,m.SwapTypes.SwapExactIn,Ke,{gasPrice:ot,maxPools:Ct})})()}findRouteGivenOut({tokenIn:ge,tokenOut:Ne,amount:Ke,gasPrice:ot,maxPools:Ct}){var Vt=this;return ie(function*(){return Vt.sor.getSwaps(ge,Ne,m.SwapTypes.SwapExactOut,Ke,{gasPrice:ot,maxPools:Ct})})()}buildSwap({userAddress:ge,recipient:Ne,swapInfo:Ke,kind:ot,deadline:Ct,maxSlippage:Vt}){if(!this.chainId)throw"Missing network configuration";const Ht=Ke.swaps.length>1?new v1(Ke,ot,this.chainId):new V0(Ke,ot,this.chainId);Ht.setFunds(ge,Ne),Ht.setDeadline(Ct),Ht.setLimits(Vt);const un=Ht.to(),{functionName:pn}=Ht;return{to:un,functionName:pn,attributes:Ht.attributes(),data:Ht.data(),value:Ht.value(Vt)}}static encodeBatchSwap(ge){return _.Vault__factory.createInterface().encodeFunctionData("batchSwap",[ge.kind,ge.swaps,ge.assets,ge.funds,ge.limits,ge.deadline])}static encodeSimpleFlashSwap(ge){return this.encodeBatchSwap(function({poolIds:Ne,assets:Ke,flashLoanAmount:ot,walletAddress:Ct}){hu({poolIds:Ne,assets:Ke});const Vt=b1(Ne,ot);return{kind:E.SwapType.SwapExactIn,swaps:Vt,assets:Ke,funds:{sender:Ct,fromInternalBalance:!1,recipient:Ct,toInternalBalance:!1},limits:["0","0"],deadline:"999999999999999999"}}(ge))}fetchPools(){var ge=this;return ie(function*(){return ge.sor.fetchPools()})()}getPools(){return this.sor.getPools()}queryBatchSwap(ge){var Ne=this;return ie(function*(){return yield rr(Ne.vaultContract,ge.kind,ge.swaps,ge.assets)})()}queryBatchSwapWithSor(ge){var Ne=this;return ie(function*(){return yield function(qe,ge,Ne){return Ir.apply(this,arguments)}(Ne.sor,Ne.vaultContract,ge)})()}querySimpleFlashSwap(ge){var Ne=this;return ie(function*(){return yield(Ke=ie(function*(ot){hu(ot);const[Ct,Vt]=ot.assets;try{const Ht=yield rr(ot.vaultContract,E.SwapType.SwapExactIn,b1(ot.poolIds,ot.flashLoanAmount),ot.assets),un={[Ct]:yh(Ht[0]).toString(),[Vt]:yh(Ht[1]).toString()};return{profits:un,isProfitable:hd([un[Ct],un[Vt]])>0}}catch(Ht){throw`Failed to querySimpleFlashSwap: ${Ht}`}}),function(ot){return Ke.apply(this,arguments)})({...ge,vaultContract:Ne.vaultContract});var Ke})()}getSorSwap(ge){var Ne=this;return ie(function*(){return yield Ei(ge.tokenIn,ge.tokenOut,ge.swapType,ge.amount,Ne.sor)})()}}const Zd=new d.Interface(Ad);class Qs{constructor(ge){this.swaps=ge instanceof df?ge:new df(ge)}static isChainedReference(ge){const Ne=f.BigNumber.from(ge),Ke=f.BigNumber.from("0xfff0000000000000000000000000000000000000000000000000000000000000"),ot=Ne.toBigInt()&Ke.toBigInt();return"0xba10000000000000000000000000000000000000000000000000000000000000"===f.BigNumber.from(ot)._hex.toString()}static encodeApproveVault(ge,Ne){return Zd.encodeFunctionData("approveVault",[ge,Ne])}static encodeSetRelayerApproval(ge,Ne,Ke){return Zd.encodeFunctionData("setRelayerApproval",[ge,Ne,Ke])}static encodeGaugeWithdraw(ge,Ne,Ke,ot){return Zd.encodeFunctionData("gaugeWithdraw",[ge,Ne,Ke,ot])}static encodeGaugeDeposit(ge,Ne,Ke,ot){return Zd.encodeFunctionData("gaugeDeposit",[ge,Ne,Ke,ot])}static encodeBatchSwap(ge){return Zd.encodeFunctionData("batchSwap",[ge.swapType,ge.swaps,ge.assets,ge.funds,ge.limits,ge.deadline,ge.value,ge.outputReferences])}static encodeExitPool(ge){return Zd.encodeFunctionData("exitPool",[ge.poolId,ge.poolKind,ge.sender,ge.recipient,ge.exitPoolRequest,ge.outputReferences])}static encodeJoinPool(ge){return Zd.encodeFunctionData("joinPool",[ge.poolId,ge.kind,ge.sender,ge.recipient,ge.joinPoolRequest,ge.value,ge.outputReference])}static encodeWrapAaveDynamicToken(ge){return Zd.encodeFunctionData("wrapAaveDynamicToken",[ge.staticToken,ge.sender,ge.recipient,ge.amount,ge.fromUnderlying,ge.outputReference])}static encodeUnwrapAaveStaticToken(ge){return Zd.encodeFunctionData("unwrapAaveStaticToken",[ge.staticToken,ge.sender,ge.recipient,ge.amount,ge.toUnderlying,ge.outputReferences])}static encodePeekChainedReferenceValue(ge){return Zd.encodeFunctionData("peekChainedReferenceValue",[ge])}static toChainedReference(ge,Ne=!0){const Ke=Ne?Qs.CHAINED_REFERENCE_TEMP_PREFIX:Qs.CHAINED_REFERENCE_READONLY_PREFIX,ot=`0x${Ke}${"0".repeat(64-Ke.length)}`;return f.BigNumber.from(ot).add(ge)}static fromChainedReference(ge,Ne=!0){const Ke=Ne?Qs.CHAINED_REFERENCE_TEMP_PREFIX:Qs.CHAINED_REFERENCE_READONLY_PREFIX,ot=`0x${Ke}${"0".repeat(64-Ke.length)}`;return f.BigNumber.from(ge).sub(f.BigNumber.from(ot))}static constructExitCall(ge){const{assets:Ne,minAmountsOut:Ke,userData:ot,toInternalBalance:Ct,poolId:Vt,poolKind:Ht,sender:un,recipient:pn,outputReferences:yn}=ge;return Qs.encodeExitPool({poolId:Vt,poolKind:Ht,sender:un,recipient:pn,outputReferences:yn,exitPoolRequest:{assets:Ne,minAmountsOut:Ke,userData:ot,toInternalBalance:Ct}})}static constructJoinCall(ge){const{assets:Ne,maxAmountsIn:Ke,userData:ot,fromInternalBalance:Ct,poolId:Vt,kind:Ht,sender:un,recipient:pn,value:yn,outputReference:Zn}=ge;return Qs.encodeJoinPool({poolId:Vt,kind:Ht,sender:un,recipient:pn,value:yn,outputReference:Zn,joinPoolRequest:{assets:Ne,maxAmountsIn:Ke,userData:ot,fromInternalBalance:Ct}})}fetchPools(){var ge=this;return ie(function*(){return ge.swaps.fetchPools()})()}getPools(){return this.swaps.getPools()}exitPoolAndBatchSwap(ge){var Ne=this;return ie(function*(){const Ke=x.WeiPerEther.sub(f.BigNumber.from(ge.slippage)),ot=ge.expectedAmountsOut.map(Zn=>f.BigNumber.from(Zn).mul(Ke).div(x.WeiPerEther).toString()),Ct=[];ge.exitTokens.forEach((Zn,fr)=>{const zr=Qs.toChainedReference(fr);Ct.push({index:fr,key:zr})});const Vt=Qs.constructExitCall({assets:ge.exitTokens,minAmountsOut:ot,userData:ge.userData,toInternalBalance:!0,poolId:ge.poolId,poolKind:0,sender:ge.exiter,recipient:ge.exiter,outputReferences:Ct,exitPoolRequest:{}}),Ht=yield Ne.swaps.queryBatchSwapWithSor({tokensIn:ge.exitTokens,tokensOut:ge.finalTokensOut,swapType:E.SwapType.SwapExactIn,amounts:ot,fetchPools:ge.fetchPools});if(Ht.returnAmounts.includes("0"))throw new Oi(E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT);Ht.swaps.forEach(Zn=>{const zr=ge.exitTokens.indexOf(Ht.assets[Zn.assetInIndex]);-1!==zr&&(Zn.amount=Ct[zr].key.toString())});const un=x.WeiPerEther.add(ge.slippage);ge.exitTokens.forEach((Zn,fr)=>{const zr=Ht.assets.map(ci=>ci.toLowerCase()).indexOf(Zn.toLowerCase());-1!==zr&&(Ht.deltas[zr]=f.BigNumber.from(ge.expectedAmountsOut[fr]).mul(un).div(x.WeiPerEther).toString())});const pn=df.getLimitsForSlippage(ge.exitTokens,ge.finalTokensOut,E.SwapType.SwapExactIn,Ht.deltas,Ht.assets,"0");return{function:"multicall",params:[Vt,Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Ht.swaps,assets:Ht.assets,funds:{sender:ge.exiter,recipient:ge.swapRecipient,fromInternalBalance:!0,toInternalBalance:!1},limits:pn.map(Zn=>Zn.toString()),deadline:x.MaxUint256,value:"0",outputReferences:[]})],outputs:{amountsOut:Ht.returnAmounts}}})()}swapUnwrapAaveStaticExactIn(ge,Ne,Ke,ot,Ct,Vt,Ht={fetchPools:!0,fetchOnChain:!1}){var un=this;return ie(function*(){const pn=yield un.swaps.queryBatchSwapWithSor({tokensIn:ge,tokensOut:Ne,swapType:E.SwapType.SwapExactIn,amounts:Ke,fetchPools:Ht});if(pn.returnAmounts.includes("0"))throw new Oi(E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT);const yn=df.getLimitsForSlippage(ge,Ne,E.SwapType.SwapExactIn,pn.deltas,pn.assets,Vt);return{function:"multicall",params:un.encodeSwapUnwrap(Ne,E.SwapType.SwapExactIn,pn.swaps,pn.assets,Ct,yn),outputs:{amountsOut:pn.returnAmounts.map((Zn,fr)=>{const zr=f.BigNumber.from(Zn).abs().mul(ot[fr]).div(x.WeiPerEther);if(!zr.gt(x.Zero))throw new Oi(E.BalancerErrorCode.UNWRAP_ZERO_AMOUNT);return zr.toString()})}}})()}swapUnwrapAaveStaticExactOut(ge,Ne,Ke,ot,Ct,Vt,Ht={fetchPools:!0,fetchOnChain:!1}){var un=this;return ie(function*(){const pn=Ke.map((fr,zr)=>{const ci=f.BigNumber.from(fr).mul(x.WeiPerEther).div(ot[zr]);if(!ci.gt(x.Zero))throw new Oi(E.BalancerErrorCode.WRAP_ZERO_AMOUNT);return ci.toString()}),yn=yield un.swaps.queryBatchSwapWithSor({tokensIn:ge,tokensOut:Ne,swapType:E.SwapType.SwapExactOut,amounts:pn,fetchPools:Ht});if(yn.returnAmounts.includes("0"))throw new Oi(E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT);const Zn=df.getLimitsForSlippage(ge,Ne,E.SwapType.SwapExactOut,yn.deltas,yn.assets,Vt);return{function:"multicall",params:un.encodeSwapUnwrap(Ne,E.SwapType.SwapExactOut,yn.swaps,yn.assets,Ct,Zn),outputs:{amountsIn:yn.returnAmounts.map(fr=>fr.toString())}}})()}encodeSwapUnwrap(ge,Ne,Ke,ot,Ct,Vt){const Ht=[],un=[];return ge.forEach((pn,yn)=>{const Zn=ot.findIndex(ci=>ci.toLowerCase()===pn.toLowerCase());if(-1===Zn)return;const fr=Qs.toChainedReference(yn);Ht.push({index:Zn,key:fr});const zr=Qs.encodeUnwrapAaveStaticToken({staticToken:pn,sender:Ct.recipient,recipient:Ct.sender,amount:fr,toUnderlying:!0,outputReferences:0});un.push(zr)}),[Qs.encodeBatchSwap({swapType:Ne,swaps:Ke,assets:ot,funds:Ct,limits:Vt.map(pn=>pn.toString()),deadline:x.MaxUint256,value:"0",outputReferences:Ht}),...un]}}Qs.CHAINED_REFERENCE_TEMP_PREFIX="ba10",Qs.CHAINED_REFERENCE_READONLY_PREFIX="ba11",Qs.signRelayerApproval=function(){var qe=ie(function*(ge,Ne,Ke,ot){const Ct=ot.interface.encodeFunctionData("setRelayerApproval",[Ne,ge,!0]),Vt=yield ke.signSetRelayerApprovalAuthorization(ot,Ke,ge,Ct);return ke.encodeCalldataAuthorization("0x",x.MaxUint256,Vt)});return function(ge,Ne,Ke,ot){return qe.apply(this,arguments)}}();class t0{constructor(ge){this.url=Mc(ge).urls.subgraph,this.client=this.initClient()}initClient(){return Ff(new S.GraphQLClient(this.url))}}class jf{constructor(ge,Ne){this.swaps=Ne||new df(ge)}fetchPools(){var ge=this;return ie(function*(){return ge.swaps.fetchPools()})()}getPools(){return this.swaps.getPools()}getSpotPrice(ge,Ne,Ke=[]){var ot=this;return ie(function*(){0===Ke.length&&(yield ot.fetchPools(),Ke=ot.getPools());const Ct=m.parseToPoolsDict(Ke,0),Vt=ot.swaps.sor.routeProposer.getCandidatePathsFromDict(ge,Ne,0,Ct,4);if(0===Vt.length)throw new Oi(E.BalancerErrorCode.UNSUPPORTED_PAIR);return m.getSpotPriceAfterSwapForPath(Vt[0],0,m.ZERO).toString()})()}}var hc=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];function n0(qe){return Math.round(Date.now()/1e3)-qe<86400}var H0=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"locktime",type:"uint256",indexed:!0},{name:"type",type:"int128",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Supply",inputs:[{name:"prevSupply",type:"uint256",indexed:!1},{name:"supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"token_addr",type:"address"},{name:"_name",type:"string"},{name:"_symbol",type:"string"},{name:"_authorizer_adaptor",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"admin",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"nonpayable",type:"function",name:"commit_smart_wallet_checker",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"apply_smart_wallet_checker",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"get_last_user_slope",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"user_point_history__ts",inputs:[{name:"_addr",type:"address"},{name:"_idx",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked__end",inputs:[{name:"_addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"checkpoint",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_for",inputs:[{name:"_addr",type:"address"},{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"create_lock",inputs:[{name:"_value",type:"uint256"},{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_amount",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_unlock_time",inputs:[{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"},{name:"_t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOfAt",inputs:[{name:"addr",type:"address"},{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[{name:"t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupplyAt",inputs:[{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"amount",type:"int128"},{name:"end",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"epoch",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"point_history",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_history",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_epoch",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"slope_changes",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"future_smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]}];class ac{constructor(ge,Ne){this.addresses=ge,this.provider=Ne}getLockInfo(ge){var Ne=this;return ie(function*(){if(!Ne.addresses.veBal)throw new Error("veBal address must be defined");const Ke=new Zo(Ne.addresses.multicall,Ne.provider,H0);Ke.call("locked",Ne.addresses.veBal,"locked",[ge]),Ke.call("epoch",Ne.addresses.veBal,"epoch"),Ke.call("totalSupply",Ne.addresses.veBal,"totalSupply()");const ot=yield Ke.execute();return Ne.formatLockInfo(ot)})()}formatLockInfo(ge){const[Ne,Ke]=ge.locked,ot=Ne.gt(0),Ct=1e3*Ke.toNumber(),Vt=ot&&Date.now()>Ct;return{lockedEndDate:Ct,lockedAmount:Ii(Ne),totalSupply:Ii(ge.totalSupply),epoch:Ii(ge.epoch,0),hasExistingLock:ot,isExpired:Vt}}}var Id=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"votingEscrow",type:"address"},{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newImplementation",type:"address"}],name:"DelegationImplementationUpdated",type:"event"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjustedBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjusted_balance_of",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDelegationImplementation",outputs:[{internalType:"contract IVeDelegation",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVotingEscrow",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"killDelegation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],name:"setDelegation",outputs:[],stateMutability:"nonpayable",type:"function"}];class Au{constructor(ge,Ne){if(!ge.veBalProxy)throw new Error("veBalProxy address must be defined");this.instance=new g.Contract(ge.veBalProxy,Id,Ne)}getAdjustedBalance(ge){var Ne=this;return ie(function*(){return Ii(yield Ne.instance.adjustedBalanceOf(ge))})()}}var x0=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Sd=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];const r0=(qe,ge,Ne)=>{switch(Ne){case 3:return new g.Contract(qe,Sd,ge);case 4:return new g.Contract(qe,x0,ge);default:throw new Error("relayer not supported")}};var Yd=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"UpdateLiquidityLimit",inputs:[{name:"user",type:"address",indexed:!0},{name:"original_balance",type:"uint256",indexed:!1},{name:"original_supply",type:"uint256",indexed:!1},{name:"working_balance",type:"uint256",indexed:!1},{name:"working_supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Transfer",inputs:[{name:"_from",type:"address",indexed:!0},{name:"_to",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Approval",inputs:[{name:"_owner",type:"address",indexed:!0},{name:"_spender",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"minter",type:"address"},{name:"veBoostProxy",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"},{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"transferFrom",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"transfer",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"approve",inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"permit",inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"},{name:"_value",type:"uint256"},{name:"_deadline",type:"uint256"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"increaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_added_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"decreaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_subtracted_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"user_checkpoint",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"set_rewards_receiver",inputs:[{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"kick",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_reward_token",inputs:[{name:"_reward_token",type:"address"},{name:"_amount",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"add_reward",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_reward_distributor",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_killed",inputs:[{name:"_is_killed",type:"bool"}],outputs:[]},{stateMutability:"view",type:"function",name:"claimed_reward",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward",inputs:[{name:"_user",type:"address"},{name:"_reward_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward_write",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_tokens",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"future_epoch_time",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"inflation_rate",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"version",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"allowance",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"initialize",inputs:[{name:"_lp_token",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32"}]},{stateMutability:"view",type:"function",name:"nonces",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"factory",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"lp_token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"is_killed",inputs:[],outputs:[{name:"",type:"bool"}]},{stateMutability:"view",type:"function",name:"reward_count",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"reward_data",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"token",type:"address"},{name:"distributor",type:"address"},{name:"period_finish",type:"uint256"},{name:"rate",type:"uint256"},{name:"last_update",type:"uint256"},{name:"integral",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"rewards_receiver",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"reward_integral_for",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_balances",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_fraction",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"period",inputs:[],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"reward_tokens",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"period_timestamp",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]}];class kd{constructor(ge,Ne){this.contractAddresses="number"==typeof ge?Ao[ge].addresses.contracts:ge,this.vault=_.Vault__factory.connect(this.contractAddresses.vault,Ne),this.balancerHelpers=_.BalancerHelpers__factory.connect(this.contractAddresses.balancerHelpers,Ne),this.contractAddresses.lidoRelayer&&(this.lidoRelayer=_.LidoRelayer__factory.connect(this.contractAddresses.lidoRelayer,Ne)),this.multicall=Sa(this.contractAddresses.multicall,Ne),this.contractAddresses.relayerV3&&(this.relayerV3=r0(this.contractAddresses.relayerV3,Ne,3)),this.contractAddresses.relayerV4&&(this.relayerV4=r0(this.contractAddresses.relayerV4,Ne,4)),this.contractAddresses.veBal&&(this.veBal=new ac(this.contractAddresses,Ne)),this.contractAddresses.veBalProxy&&(this.veBalProxy=new Au(this.contractAddresses,Ne))}get contracts(){return{vault:this.vault,balancerHelpers:this.balancerHelpers,lidoRelayer:this.lidoRelayer,multicall:this.multicall,relayerV3:this.relayerV3,relayerV4:this.relayerV4,veBal:this.veBal,veBalProxy:this.veBalProxy,ERC20:this.getErc20,liquidityGauge:this.getLiquidityGauge}}getErc20(ge,Ne){return new g.Contract(ge,hc,Ne)}getLiquidityGauge(ge,Ne){return new g.Contract(ge,Yd,Ne)}}const ql={1:{relayer:"0x886A3Ec7bcC508B8795990B60Fa21f85F9dB7948",staBal3:{id:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",address:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42",gauge:"0x34f33cdaed8ba0e1ceece80e5f4a73bcf234cfac",assetOrder:["DAI","USDC","USDT"]},bbausd1:{id:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe",address:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2",gauge:"0x68d019f64a7aa97e2d4e7363aee42251d08124fb",assetOrder:["bb-a-USDT","bb-a-DAI","bb-a-USDC"]},bbausd2:{id:"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d",address:"0xa13a9247ea42d743238089903570127dda72fe44",gauge:"0xa6325e799d266632d347e41265a69af111b05403"},linearUsdc1:{id:"0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc",address:"0x9210F1204b5a24742Eba12f710636D76240dF3d0"},linearDai1:{id:"0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb",address:"0x804CdB9116a10bB78768D3252355a1b18067bF8f"},linearUsdt1:{id:"0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd",address:"0x2BBf681cC4eb09218BEe85EA2a5d3D13Fa40fC0C"},linearUsdc2:{id:"0x82698AECC9E28E9BB27608BD52CF57F704BD1B83000000000000000000000336",address:"0x82698aeCc9E28e9Bb27608Bd52cF57f704BD1B83"},linearDai2:{id:"0xAE37D54AE477268B9997D4161B96B8200755935C000000000000000000000337",address:"0xae37D54Ae477268B9997d4161B96b8200755935c"},linearUsdt2:{id:"0x2F4EB100552EF93840D5ADC30560E5513DFFFACB000000000000000000000334",address:"0x2F4eb100552ef93840d5aDC30560E5513DFfFACb"},maiusd:{id:"",address:"",gauge:"",assetOrder:["USDT","miMATIC","DAI","USDC"]},maibbausd:{id:"",address:"",gauge:"",assetOrder:["bb-a-USD","miMATIC"]},DAI:"0x6b175474e89094c44da98b954eedeac495271d0f",USDC:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",USDT:"0xdAC17F958D2ee523a2206206994597C13D831ec7",waDAI:"0x02d60b84491589974263d922d9cc7a3152618ef6",waUSDC:"0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de",waUSDT:"0xf8fd466f12e236f4c96f7cce6c79eadb819abf58",miMATIC:""},5:{relayer:"0x7b9B6f094DC2Bd1c12024b0D9CC63d6993Be1888",staBal3:{id:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062",address:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2",gauge:"0xfd364cda96bb7db06b65706182c448a73f0a5f9a",assetOrder:["USDT","DAI","USDC"]},staBal3_2:{id:"0xff9d677474d4344379924e10b68c8fea67e03294000000000000000000000072",address:"0xff9d677474d4344379924e10b68c8fea67e03294",gauge:"0x4e4ebf2aa90e41174d716a5168895357762d68af",assetOrder:["USDT","DAI","USDC"]},staBal3_3:{id:"0x3bfc8a0509f1a68aefd446f6c19bf37b3c75a8fc0000000000000000000000a5",address:"0x3bfc8a0509f1a68aefd446f6c19bf37b3c75a8fc",gauge:"0x7776e1008d7c20ab54aa57a7c44fc7de602de29a",assetOrder:["USDT","DAI","USDC"]},bbausd1:{id:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",address:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd",gauge:"0xa2d0ea81a47d68598922cd54c59249ff58c2a3ff",assetOrder:["bb-a-USDC","bb-a-DAI","bb-a-USDT"]},bbausd2:{id:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",address:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd",gauge:"0xa2d0ea81a47d68598922cd54c59249ff58c2a3ff"},linearUsdc1:{id:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc8668100000000000000000000005c",address:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc86681"},linearDai1:{id:"0x5cea6a84ed13590ed14903925fa1a73c36297d9900000000000000000000005d",address:"0x5cea6a84ed13590ed14903925fa1a73c36297d99"},linearUsdt1:{id:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f00000000000000000000005e",address:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f"},linearUsdc2:{id:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc8668100000000000000000000005c",address:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc86681"},linearDai2:{id:"0x5cea6a84ed13590ed14903925fa1a73c36297d9900000000000000000000005d",address:"0x5cea6a84ed13590ed14903925fa1a73c36297d99"},linearUsdt2:{id:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f00000000000000000000005e",address:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f"},maiusd:{id:"0x6a8f9ab364b85725973d2a33cb9aae2dac43b5e30000000000000000000000a6",address:"0x6a8f9ab364b85725973d2a33cb9aae2dac43b5e3",gauge:"0x58141bdcecb7fbae006964f4131cf6f65c948357",assetOrder:["USDT","miMATIC","DAI","USDC"]},maibbausd:{id:"0xb04b03b78cf79788a1931545bd2744161029648f0000000000000000000000a8",address:"0xb04b03b78cf79788a1931545bd2744161029648f",gauge:"0xdc3f6fc8898830e53c777543fe252b14f22680d4",assetOrder:["bb-a-USD","miMATIC","MAI BSP"]},USDT:"0x1f1f156e0317167c11aa412e3d1435ea29dc3cce",DAI:"0x8c9e6c40d3402480ace624730524facc5482798c",USDC:"0xe0c9275e44ea80ef17579d33c55136b7da269aeb",waDAI:"0x89534a24450081aa267c79b07411e9617d984052",waUSDC:"0x811151066392fd641fe74a9b55a712670572d161",waUSDT:"0x4cb1892fddf14f772b2e39e299f44b2e5da90d04",miMATIC:"0x398106564948feeb1fedea0709ae7d969d62a391"},137:{relayer:"0xcf6a66E32dCa0e26AcC3426b851FD8aCbF12Dac7",staBal3:{id:"",address:"",gauge:"",assetOrder:["USDT","DAI","USDC"]},bbausd1:{id:"",address:"",gauge:"",assetOrder:["bb-a-USDC","bb-a-DAI","bb-a-USDT"]},bbausd2:{id:"0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b",address:"0x48e6b98ef6329f8f0a30ebb8c7c960330d648085",gauge:""},linearUsdc1:{id:"",address:""},linearDai1:{id:"",address:""},linearUsdt1:{id:"",address:""},linearUsdc2:{id:"0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759",address:"0xf93579002dbe8046c43fefe86ec78b1112247bb8"},linearDai2:{id:"0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758",address:"0x178e029173417b1f9c8bc16dcec6f697bc323746"},linearUsdt2:{id:"0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a",address:"0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea6"},maiusd:{id:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012",address:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42",gauge:"0x72843281394e68de5d55bcf7072bb9b2ebc24150",assetOrder:["USDC","DAI","miMATIC","USDT"]},maibbausd:{id:"0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e",address:"0xb54b2125b711cd183edd3dd09433439d53961652",gauge:"0x9a105ef22a59484aa2731c357049f6a13d0891f5",assetOrder:["bb-a-USD","miMATIC"]},USDT:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",DAI:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",USDC:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",waDAI:"0xEE029120c72b0607344f35B17cdD90025e647B00",waUSDC:"0x221836a597948Dce8F3568E044fF123108aCc42A",waUSDT:"0x19C60a251e525fa88Cd6f3768416a8024e98fC19",miMATIC:"0xa3fa99a148fa48d14ed51d610c367c61876997f1"}},Ef=new d.Interface(Sd),mn=Qs.toChainedReference("21"),$0=Qs.toChainedReference("22"),Cd=Qs.toChainedReference("23"),sd=Qs.toChainedReference("24");class vu{constructor(ge){this.addresses=ql[ge]}calldata(ge,Ne,Ke,ot,Ct){if(f.BigNumber.from(Ne).lte(0))throw new Oi(E.BalancerErrorCode.INPUT_ZERO_NOT_ALLOWED);const Vt=this.addresses.relayer;let Ht=[];return Ct&&(Ht=[this.buildSetRelayerApproval(Ct)]),Ht=ot?[...Ht,this.buildWithdraw(ge,Ne),this.buildExit(Vt,Ne),this.buildSwap(Ke,Vt),this.buildDeposit(ge)]:[...Ht,this.buildExit(ge,Ne),this.buildSwap(Ke,ge)],{to:Vt,data:Ef.encodeFunctionData("multicall",[Ht])}}buildExit(ge,Ne){const{assetOrder:Ke}=this.addresses.staBal3,ot=Ke.map(Ht=>this.addresses[Ht]),Ct=y.exitExactBPTInForTokensOut(Ne),Vt=[{index:Ke.indexOf("DAI"),key:mn},{index:Ke.indexOf("USDC"),key:$0},{index:Ke.indexOf("USDT"),key:Cd}];return Qs.constructExitCall({assets:ot,minAmountsOut:["0","0","0"],userData:Ct,toInternalBalance:!0,poolId:this.addresses.staBal3.id,poolKind:0,sender:ge,recipient:this.addresses.relayer,outputReferences:Vt,exitPoolRequest:{}})}buildSwap(ge,Ne){const Ke=[this.addresses.bbausd2.address,this.addresses.DAI,this.addresses.linearDai2.address,this.addresses.USDC,this.addresses.linearUsdc2.address,this.addresses.USDT,this.addresses.linearUsdt2.address],ot=[{index:0,key:sd}],Ct=[{poolId:this.addresses.linearDai2.id,assetInIndex:1,assetOutIndex:2,amount:mn.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:2,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdc2.id,assetInIndex:3,assetOutIndex:4,amount:$0.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:4,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdt2.id,assetInIndex:5,assetOutIndex:6,amount:Cd.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:6,assetOutIndex:0,amount:"0",userData:"0x"}],Vt=[f.BigNumber.from(ge).mul(-1).toString(),x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0"];return Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Ct,assets:Ke,funds:{sender:this.addresses.relayer,recipient:Ne,fromInternalBalance:!0,toInternalBalance:!1},limits:Vt,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:ot})}buildWithdraw(ge,Ne){return Qs.encodeGaugeWithdraw(this.addresses.staBal3.gauge,ge,this.addresses.relayer,Ne)}buildDeposit(ge){return Qs.encodeGaugeDeposit(this.addresses.bbausd2.gauge,this.addresses.relayer,ge,sd.toString())}buildSetRelayerApproval(ge){return Qs.encodeSetRelayerApproval(this.addresses.relayer,!0,ge)}}const pd=new d.Interface(Sd),fo=Qs.toChainedReference("24");class ff{constructor(ge){this.addresses=ql[ge]}calldata(ge,Ne,Ke,ot,Ct,Vt){if(f.BigNumber.from(Ne).lte(0))throw new Oi(E.BalancerErrorCode.INPUT_ZERO_NOT_ALLOWED);const Ht=this.addresses.relayer;let un=[];Vt&&(un=[this.buildSetRelayerApproval(Vt)]),un=ot?[...un,this.buildWithdraw(ge,Ne),this.buildSwap(Ne,Ke,Ht,Ht,Ct),this.buildDeposit(ge)]:[...un,this.buildSwap(Ne,Ke,ge,ge,Ct)];const pn=pd.encodeFunctionData("multicall",[un]);return{to:this.addresses.relayer,data:pn}}buildSwap(ge,Ne,Ke,ot,Ct){const Vt=[this.addresses.bbausd2.address,this.addresses.waDAI,this.addresses.linearDai1.address,this.addresses.linearDai2.address,this.addresses.waUSDC,this.addresses.linearUsdc1.address,this.addresses.linearUsdc2.address,this.addresses.waUSDT,this.addresses.linearUsdt1.address,this.addresses.linearUsdt2.address,this.addresses.bbausd1.address],Ht=[{index:0,key:fo}],un=Ct.reduce((li,bi)=>li.add(f.BigNumber.from(bi)),x.Zero),{assetOrder:pn}=this.addresses.bbausd1,yn=f.BigNumber.from(ge).mul(Ct[pn.indexOf("bb-a-USDC")]).div(un).toString(),Zn=f.BigNumber.from(ge).mul(Ct[pn.indexOf("bb-a-DAI")]).div(un).toString(),fr=f.BigNumber.from(ge).sub(yn).sub(Zn).toString(),zr=[{poolId:this.addresses.bbausd1.id,assetInIndex:10,assetOutIndex:2,amount:Zn,userData:"0x"},{poolId:this.addresses.linearDai1.id,assetInIndex:2,assetOutIndex:1,amount:"0",userData:"0x"},{poolId:this.addresses.linearDai2.id,assetInIndex:1,assetOutIndex:3,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:3,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd1.id,assetInIndex:10,assetOutIndex:5,amount:yn,userData:"0x"},{poolId:this.addresses.linearUsdc1.id,assetInIndex:5,assetOutIndex:4,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdc2.id,assetInIndex:4,assetOutIndex:6,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:6,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd1.id,assetInIndex:10,assetOutIndex:8,amount:fr,userData:"0x"},{poolId:this.addresses.linearUsdt1.id,assetInIndex:8,assetOutIndex:7,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdt2.id,assetInIndex:7,assetOutIndex:9,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:9,assetOutIndex:0,amount:"0",userData:"0x"}],ci=[f.BigNumber.from(Ne).mul(-1).toString(),"0","0","0","0","0","0","0","0","0",ge];return Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:zr,assets:Vt,funds:{sender:Ke,recipient:ot,fromInternalBalance:!1,toInternalBalance:!1},limits:ci,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:Ht})}buildWithdraw(ge,Ne){return Qs.encodeGaugeWithdraw(this.addresses.bbausd1.gauge,ge,this.addresses.relayer,Ne)}buildDeposit(ge){return Qs.encodeGaugeDeposit(this.addresses.bbausd2.gauge,this.addresses.relayer,ge,fo.toString())}buildSetRelayerApproval(ge){return Qs.encodeSetRelayerApproval(this.addresses.relayer,!0,ge)}}const s0=new d.Interface(Sd),_1=Qs.toChainedReference("0"),yp=[];class $h{constructor(ge){this.addresses=ql[ge]}calldata(ge,Ne,Ke,ot,Ct,Vt,Ht,un){if(Vt&&(null==Ne.gauge||null==Ke.gauge))throw new Error("Staked flow migration requires gauge addresses to be provided");const pn=this.addresses.relayer;let yn=[];un&&(yn=[this.buildSetRelayerApproval(un)]),yn=Vt?[...yn,this.buildWithdraw(ge,ot,Ne.gauge),this.buildExit(Ne.id,pn,ot,Ht),this.buildSwap(Ct,pn,Ke.id,Ke.address,Ht),this.buildDeposit(ge,Ke.gauge)]:[...yn,this.buildExit(Ne.id,ge,ot,Ht),this.buildSwap(Ct,ge,Ke.id,Ke.address,Ht)];const Zn=s0.encodeFunctionData("multicall",[yn]);return{to:this.addresses.relayer,data:Zn}}buildExit(ge,Ne,Ke,ot){const Ct=y.exitExactBPTInForTokensOut(Ke),Vt=[];for(let un=0;unthis.addresses[un]),Ct=y.exitExactBPTInForTokensOut(Ne),Vt=[{index:Ke.indexOf("miMATIC"),key:hf},{index:Ke.indexOf("DAI"),key:pf},{index:Ke.indexOf("USDC"),key:Md},{index:Ke.indexOf("USDT"),key:tm}],Ht=Array(ot.length).fill("0");return Qs.constructExitCall({assets:ot,minAmountsOut:Ht,userData:Ct,toInternalBalance:!0,poolId:this.addresses.maiusd.id,poolKind:0,sender:ge,recipient:this.addresses.relayer,outputReferences:Vt,exitPoolRequest:{}})}buildSwap(ge,Ne){const Ke=[this.addresses.bbausd2.address,this.addresses.DAI,this.addresses.linearDai2.address,this.addresses.USDC,this.addresses.linearUsdc2.address,this.addresses.USDT,this.addresses.linearUsdt2.address,this.addresses.miMATIC,this.addresses.maibbausd.address],ot=[{index:8,key:Kp}],Ct=[{poolId:this.addresses.linearDai2.id,assetInIndex:1,assetOutIndex:2,amount:pf.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:2,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:0,assetOutIndex:8,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdc2.id,assetInIndex:3,assetOutIndex:4,amount:Md.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:4,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:0,assetOutIndex:8,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdt2.id,assetInIndex:5,assetOutIndex:6,amount:tm.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:6,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:0,assetOutIndex:8,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:7,assetOutIndex:8,amount:hf.toString(),userData:"0x"}],Vt=["0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),f.BigNumber.from(Ne).mul(-1).toString()];return Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Ct,assets:Ke,funds:{sender:this.addresses.relayer,recipient:ge,fromInternalBalance:!0,toInternalBalance:!1},limits:Vt,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:ot})}buildWithdraw(ge,Ne){return Qs.encodeGaugeWithdraw(this.addresses.maiusd.gauge,ge,this.addresses.relayer,Ne)}buildDeposit(ge){return Qs.encodeGaugeDeposit(this.addresses.maibbausd.gauge,this.addresses.relayer,ge,Kp.toString())}buildSetRelayerApproval(ge){return Qs.encodeSetRelayerApproval(this.addresses.relayer,!0,ge)}}class Zp{constructor(ge){this.network=ge}stabal3(ge,Ne,Ke,ot,Ct){const Vt=new vu(this.network).calldata(ge,Ne,Ke,ot,Ct);return{to:Vt.to,data:Vt.data,decode:(Ht,un)=>{let pn=un?2:1;Ct&&(pn+=1);const yn=d.defaultAbiCoder.decode(["bytes[]"],Ht);return d.defaultAbiCoder.decode(["int256[]"],yn[0][pn])[0][0].abs().toString()}}}bbaUsd(ge,Ne,Ke,ot,Ct,Vt){const Ht=new ff(this.network).calldata(ge,Ne,Ke,ot,Ct,Vt);return{to:Ht.to,data:Ht.data,decode:(un,pn)=>{let yn=pn?1:0;Vt&&(yn+=1);const Zn=d.defaultAbiCoder.decode(["bytes[]"],un);return d.defaultAbiCoder.decode(["int256[]"],Zn[0][yn])[0][0].abs().toString()}}}stables(ge,Ne,Ke,ot,Ct,Vt,Ht,un){const pn=new $h(this.network).calldata(ge,Ne,Ke,ot,Ct,Vt,Ht,un);return{to:pn.to,data:pn.data,decode:(yn,Zn)=>{let fr=Zn?2:1;un&&(fr+=1);const zr=d.defaultAbiCoder.decode(["bytes[]"],yn);return d.defaultAbiCoder.decode(["int256[]"],zr[0][fr])[0][0].abs().toString()}}}maiusd(ge,Ne,Ke,ot,Ct){const Vt=new o0(this.network).calldata(ge,Ne,Ke,ot,Ct);return{to:Vt.to,data:Vt.data,decode:(Ht,un)=>{let pn=un?2:1;Ct&&(pn+=1);const yn=d.defaultAbiCoder.decode(["bytes[]"],Ht);return d.defaultAbiCoder.decode(["int256[]"],yn[0][pn])[0][8].abs().toString()}}}}class Iu{constructor(ge){this.network=ge,this.migrations=new Zp(ge)}}class Tf{constructor(ge,Ne){this.tokenPrices=ge,this.tokenHistoricalPrices=Ne}calcImpLoss(ge,Ne){var Ke=this;return ie(function*(){if(1e3*ge>=Date.now())throw console.error(`[ImpermanentLossService][calcImpLoss]Error: ${Oi.getMessage(E.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE)}`),new Oi(E.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE);const ot=yield Ke.prepareData(ge,Ne),Ct=Ke.getPoolValueDelta(ot),Vt=Ke.getHoldValueDelta(ot);return Ke.calculateImpermanentLoss(Ct,Vt)})()}calculateImpermanentLoss(ge,Ne){return Math.floor(100*Math.abs(ge/Ne-1)*100)/100}getPoolValueDelta(ge){return ge.reduce((Ne,Ke)=>Ne*Math.pow(Math.abs(Ke.priceDelta+1),Ke.weight),1)}getHoldValueDelta(ge){return ge.reduce((Ne,Ke)=>Ne+Math.abs(Ke.priceDelta+1)*Ke.weight,0)}prepareData(ge,Ne){var Ke=this;return ie(function*(){const ot=Ne.tokens.filter(pn=>pn.address!==Ne.address),Ct=Ke.getWeights(ot),Vt=ot.map(pn=>pn.address),Ht=yield Ke.getEntryPrices(ge,Vt),un=yield Ke.getExitPrices(ot);return Ke.getAssets(ot,un,Ht,Ct)})()}getAssets(ge,Ne,Ke,ot){return ge.map((Ct,Vt)=>({priceDelta:this.getDelta(Ke[Ct.address],Ne[Ct.address]),weight:ot[Vt]}))}getDelta(ge,Ne){if(0===ge)throw console.error(`[ImpermanentLossService][getDelta]Error: ${Oi.getMessage(E.BalancerErrorCode.ILLEGAL_PARAMETER)}: entry price is 0`),new Oi(E.BalancerErrorCode.ILLEGAL_PARAMETER);return(Ne-ge)/ge}getWeights(ge){const Ne=ge.every(Ct=>!Ct.weight),Ke=Math.round(1/ge.length*100)/100,ot=ge.map(Ne?()=>Ke:Ct=>{var Vt;return Number(null!==(Vt=Ct.weight)&&void 0!==Vt?Vt:0)});if(ot.some(Ct=>0===Ct))throw console.error(`[ImpermanentLossService][getWeights]Error: ${Oi.getMessage(E.BalancerErrorCode.MISSING_WEIGHT)}`),new Oi(E.BalancerErrorCode.MISSING_WEIGHT);return ot}getExitPrices(ge){var Ne=this;return ie(function*(){var Ke;const ot=yield Promise.all(ge.map(Ht=>Ne.tokenPrices.find(Ht.address))).catch(()=>[]);if(!ot.length||ot.some(Ht=>void 0===(null==Ht?void 0:Ht.usd)))throw console.error(`[ImpermanentLossService][getExitPrices]Error: ${Oi.getMessage(E.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const Ct=ge.map((Ht,un)=>({...Ht,price:ot[un]})),Vt={};for(const Ht of Ct)(null===(Ke=Ht.price)||void 0===Ke?void 0:Ke.usd)&&(Vt[Ht.address]=+Ht.price.usd);return Vt})()}getEntryPrices(ge,Ne){var Ke=this;return ie(function*(){const ot={};for(const Ct of Ne){const Vt=yield Ke.tokenHistoricalPrices.findBy(Ct,ge).catch(Ht=>{console.error(`[ImpermanentLossService][getEntryPrices]Error: ${Ht.message}`)});if(!(null==Vt?void 0:Vt.usd))throw console.error(`[ImpermanentLossService][getEntryPrices]Error: ${Oi.getMessage(E.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);ot[Ct]=+Vt.usd}return ot})()}}const E0=145e3,W0=1648465251,Af=31536e3,Od=2**(1/4),ol=(qe=Math.round((new Date).getTime()/1e3))=>{const ge=Math.floor((qe-W0)/Af);return E0*Od**-ge},vh=qe=>E0*Od**-qe/7*365;var mf=Object.freeze({__proto__:null,INITIAL_RATE:E0,START_EPOCH_TIME:W0,weekly:ol,total:vh,between:(qe,ge)=>{if(qeun.address!==ge.address),Ct=yield Promise.all(ot.map(function(){var un=ie(function*(pn){let yn=0;const Zn=yield Ne.tokenYields.find(pn.address);if(Zn)yn="MetaStable"===ge.poolType?Zn*(1-(yield Ne.protocolSwapFeePercentage(ge))):"ComposableStable"===ge.poolType||"Weighted"===ge.poolType&&2===ge.poolTypeVersion?pn.isExemptFromYieldProtocolFee?Zn:Zn*(1-parseFloat(ge.protocolYieldFeeCache||"0.5")):Zn;else{const fr=yield Ne.pools.findBy("address",pn.address);if(fr){const zr=yield Ne.swapFees(fr);let ci=(yield Ne.tokenAprs(fr)).total;("ComposableStable"===ge.poolType||"Weighted"===ge.poolType&&2===ge.poolTypeVersion)&&(pn.isExemptFromYieldProtocolFee||(ci*=1-parseFloat(ge.protocolYieldFeeCache||"0.5"))),yn=zr+ci}}return yn});return function(pn){return un.apply(this,arguments)}}())),Vt=function(){var un=ie(function*(pn){var yn,Zn,fr,zr,ci;let ai;if(pn.weight)return parseFloat(pn.weight);if(null===(Zn=null===(yn=pn.token)||void 0===yn?void 0:yn.pool)||void 0===Zn?void 0:Zn.poolType){const li=yield Ne.pools.findBy("address",pn.address);li&&(ai=(yield Ne.bptPrice(li)).toString())}else ai=(null===(fr=pn.price)||void 0===fr?void 0:fr.usd)||(null===(zr=yield Ne.tokenPrices.find(pn.address))||void 0===zr?void 0:zr.usd)||(null===(ci=pn.token)||void 0===ci?void 0:ci.latestUSDPrice);if(ai)return parseFloat(pn.balance)*parseFloat(ai)/parseFloat(Ke);throw`No price for ${pn.address}`});return function(yn){return un.apply(this,arguments)}}(),Ht=yield Promise.all(ot.map(function(){var un=ie(function*(pn,yn){if(0===Ct[yn])return 0;const Zn=yield Vt(pn);return Math.round(Ct[yn]*Zn)});return function(pn,yn){return un.apply(this,arguments)}}()));return{total:Ht.reduce((un,pn)=>un+pn,0),breakdown:u.pickBy(u.zipObject(ot.map(un=>un.address),Ht),u.identity)}})()}stakingApr(ge,Ne=1){var Ke=this;return ie(function*(){if(!Ke.liquidityGauges)return 0;const ot=yield Ke.liquidityGauges.findBy("poolId",ge.id);if(!ot||1==ge.chainId&&0==ot.workingSupply||ge.chainId>1&&0==ot.totalSupply)return 0;const Ct=Ao[ge.chainId].addresses.tokens.bal;if(!Ct)return 0;const[Vt,Ht]=yield Promise.all([Ke.tokenPrices.find(Ct),Ke.bptPrice(ge)]);if(!(null==Vt?void 0:Vt.usd))throw"Missing BAL price";const un=parseFloat(Vt.usd);if(ge.chainId>1){if(!ot.rewardTokens)return 0;const fr=Ct&&ot.rewardTokens[Ct];if(fr){const zr=yield Ke.rewardTokenApr(Ct,fr);return Math.round(zr.value/(ot.totalSupply*Ht)*1e4)}return 0}const pn=Math.round((new Date).getTime()/1e3),yn=ol(pn)/7*365*ot.relativeWeight*un;return Math.round(1e4*Ne*yn/((ot.workingSupply+.4)/.4*Ht))})()}rewardAprs(ge){var Ne=this;return ie(function*(){if(!Ne.liquidityGauges)return{total:0,breakdown:{}};const Ke=yield Ne.liquidityGauges.findBy("poolId",ge.id);if(!Ke||!Ke.rewardTokens||Object.keys(Ke.rewardTokens).length<1)return{total:0,breakdown:{}};const ot=Ao[ge.chainId].addresses.tokens.bal,Ct=Object.keys(Ke.rewardTokens).filter(li=>li!=ot).map(function(){var li=ie(function*(bi){return Ne.rewardTokenApr(bi,Ke.rewardTokens[bi])});return function(bi){return li.apply(this,arguments)}}()),Vt=yield Ne.bptPrice(ge),Ht=Ke.totalSupply*Vt;if(0==Ht)return{total:0,breakdown:{}};const un={};let pn=0;var fr,yn=!0,Zn=!1;try{for(var ci,ai,zr=function(E){var d,x,f,T=2;for("undefined"!=typeof Symbol&&(x=Symbol.asyncIterator,f=Symbol.iterator);T--;){if(x&&null!=(d=E[x]))return d.call(E);if(f&&null!=(d=E[f]))return new O(d.call(E));x="@@asyncIterator",f="@@iterator"}throw new TypeError("Object is not async iterable")}(Object.values(Ct));yn=(ci=yield zr.next()).done,ai=yield ci.value,!yn;yn=!0){const li=ai,os=Math.round(li.value/Ht*1e4);pn+=os,un[li.address]=os}}catch(li){Zn=!0,fr=li}finally{try{!yn&&null!=zr.return&&(yield zr.return())}finally{if(Zn)throw fr}}return{total:pn,breakdown:un}})()}protocolApr(ge){var Ne=this;return ie(function*(){if("0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"!=ge.id||!Ne.feeDistributor)return 0;const Ke=new pl(Ne.feeDistributor,Ne.tokenPrices),{lastWeekBalRevenue:ot,lastWeekBBAUsdRevenue:Ct,veBalSupply:Vt}=yield Ke.data(),Ht=yield Ne.bptPrice(ge);if(!Ht)throw"bptPrice for veBal pool missing";return Math.round((ot+Ct)/7*365*1e4/(Ht*Vt))})()}apr(ge){var Ne=this;return ie(function*(){const[Ke,ot,Ct,Vt,Ht,un]=yield Promise.all([Ne.swapFees(ge),Ne.tokenAprs(ge),Ne.stakingApr(ge),Ne.stakingApr(ge,2.5),Ne.rewardAprs(ge),Ne.protocolApr(ge)]);return{swapFees:Ke,tokenAprs:ot,stakingApr:{min:Ct,max:Vt},rewardAprs:Ht,protocolApr:un,min:Ke+ot.total+Ht.total+Ct,max:Ke+ot.total+Ht.total+un+Vt}})()}last24hFees(ge){var Ne=this;return ie(function*(){return new Yp(Ne.yesterdaysPools).last24h(ge)})()}totalLiquidity(ge){var Ne=this;return ie(function*(){try{return yield new Sn(Ne.pools,Ne.tokenPrices).getLiquidity(ge)}catch{return console.error("Liquidity calculcation failed, falling back to subgraph"),ge.totalLiquidity}})()}bptPrice(ge){var Ne=this;return ie(function*(){return parseFloat(yield Ne.totalLiquidity(ge))/parseFloat(ge.totalShares)})()}protocolSwapFeePercentage(ge){var Ne=this;return ie(function*(){let Ke=0;return Ke="ComposableStable"==ge.poolType||"Weighted"==ge.poolType&&2==ge.poolTypeVersion?0:ge.protocolSwapFeeCache?parseFloat(ge.protocolSwapFeeCache):(yield Ne.feeCollector.find(""))||0,Ke})()}rewardTokenApr(ge,Ne){var Ke=this;return ie(function*(){if(Ne.period_finish.toNumber(){class qe{constructor(Ne){this.pools=Ne}buildGraphFromRootPool(Ne,Ke){var ot=this;return ie(function*(){const Ct=yield ot.pools.find(Ne);if(!Ct)throw new Oi(E.BalancerErrorCode.POOL_DOESNT_EXIST);return(yield ot.buildGraphFromPool(Ct.address,0,void 0,x.WeiPerEther,Ke))[0]})()}getTokenTotal(Ne){const Ke=Ne.tokensList.indexOf(Ne.address);let ot=x.Zero;const{parsedBalances:Ct}=st(Ne);return Ct.forEach((Vt,Ht)=>{Ke!==Ht&&(ot=ot.add(Vt))}),ot}buildGraphFromPool(Ne,Ke,ot,Ct,Vt){var Ht=this;return ie(function*(){var un;const pn=yield Ht.pools.findBy("address",Ne);if(!pn){if(ot){const bi=yield Ht.pools.findBy("address",ot.address),os=null!==(un=bi.tokens[bi.tokensList.indexOf(Ne)].decimals)&&void 0!==un?un:18;return qe.createInputTokenNode(Ke,Ne,os,ot,Ct)}throw new Oi(E.BalancerErrorCode.POOL_DOESNT_EXIST)}const yn=md.get(pn.poolType),Zn=If.get(pn.poolType);if(!yn||!Zn)throw new Oi(E.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);const fr=Ht.getTokenTotal(pn),{spotPriceCalculator:zr}=po.from(pn.poolType),ci={};let ai=18;pn.tokens.forEach(bi=>{if(rs(bi.address,pn.address))return void(ai=bi.decimals?bi.decimals:18);const os=zr.calcPoolSpotPrice(bi.address,pn.address,pn);ci[bi.address]=os});let li={address:pn.address,id:pn.id,type:pn.poolType,joinAction:yn,exitAction:Zn,children:[],marked:!1,index:Ke.toString(),parent:ot,proportionOfParent:Ct,isLeaf:!1,spotPrices:ci,decimals:ai};if(Ke++,pn.poolType.toString().includes("Linear"))[li,Ke]=Ht.createLinearNodeChildren(li,Ke,pn,Vt);else{const{parsedBalances:bi}=st(pn);for(let os=0;os0;){const Ct=Ke.shift();Ct&&ot.push(Ct),null==Ct||Ct.children.forEach(Vt=>{Vt.marked||(Vt.marked=!0,Ke.push(Vt))})}return ot}static getLeafAddresses(Ne){return Ne.filter(Ke=>Ke.isLeaf).map(Ke=>Ke.address)}}return qe.getGraphNodes=function(){var ge=ie(function*(Ne,Ke,ot,Ct){if(!(yield ot.find(Ke)))throw new Oi(E.BalancerErrorCode.POOL_DOESNT_EXIST);const Vt=new qe(ot),Ht=yield Vt.buildGraphFromRootPool(Ke,Ct);if(Ht.id!==Ke)throw new Error("Error creating graph nodes");return Ne?qe.orderByBfs(Ht).reverse():qe.orderByBfs(Ht)});return function(Ne,Ke,ot,Ct){return ge.apply(this,arguments)}}(),qe})();class Jp{constructor(ge,Ne){var Ke=this;this.chainId=ge,this.simulateMulticall=function(){var Ct=ie(function*(Vt,Ht,un,pn){const yn={...yield Ke.encodeBalanceAndAllowanceOverrides(un,pn),...yield Ke.encodeRelayerApprovalOverride(un,Vt)};return Ke.simulateTransaction(Vt,Ht,un,yn)});return function(Vt,Ht,un,pn){return Ct.apply(this,arguments)}}(),this.simulateTransaction=function(){var Ct=ie(function*(Vt,Ht,un,pn){const yn=Object.fromEntries(Object.keys(pn).map(zr=>[zr,{storage:pn[zr].value}])),Zn={network_id:Ke.chainId.toString(),block_number:Ke.blockNumber,from:un,to:Vt,input:Ht,save_if_fails:!0,simulation_type:"quick",state_objects:yn},fr=Ke.tenderlyUrl+"simulate";return(yield R.default.post(fr,Zn,Ke.opts)).data.transaction.transaction_info.call_trace.output});return function(Vt,Ht,un,pn){return Ct.apply(this,arguments)}}(),this.encodeRelayerApprovalOverride=function(){var Ct=ie(function*(Vt,Ht){const un={[`${Ke.vaultAddress}`]:{value:{[`_approvedRelayers[${Vt}][${Ht}]`]:(!0).toString()}}};return yield Ke.requestStateOverrides(un)});return function(Vt,Ht){return Ct.apply(this,arguments)}}(),this.encodeBalanceAndAllowanceOverrides=function(){var Ct=ie(function*(Vt,Ht){if(0===Ht.length)return{};let un={};Ht.forEach(yn=>un={...un,[`${yn}`]:{value:{[`_balances[${Vt}]`]:x.MaxInt256.toString(),[`_allowances[${Vt}][${Ke.vaultAddress}]`]:x.MaxInt256.toString(),[`balanceOf[${Vt}]`]:x.MaxInt256.toString(),[`allowance[${Vt}][${Ke.vaultAddress}]`]:x.MaxInt256.toString(),[`balances[${Vt}]`]:x.MaxInt256.toString(),[`allowed[${Vt}][${Ke.vaultAddress}]`]:x.MaxInt256.toString()}}});const pn=yield Ke.requestStateOverrides(un);if(Object.keys(pn).some(yn=>2!==Object.keys(pn[yn].value).length))throw new Error("Couldn't encode state overrides - states should match the ones in the contracts");return pn});return function(Vt,Ht){return Ct.apply(this,arguments)}}(),this.requestStateOverrides=function(){var Ct=ie(function*(Vt){const Ht=Ke.tenderlyUrl+"contracts/encode-states",un={networkID:Ke.chainId.toString(),stateOverrides:Vt},pn=(yield R.default.post(Ht,un,Ke.opts)).data.stateOverrides;if(!pn||Object.keys(pn).length!==Object.keys(Vt).length)throw new Error("Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly");return pn});return function(Vt){return Ct.apply(this,arguments)}}();const{contracts:ot}=zi(this.chainId);this.vaultAddress=ot.vault,this.tenderlyUrl=(null==Ne?void 0:Ne.user)&&(null==Ne?void 0:Ne.project)?`https://api.tenderly.co/api/v1/account/${Ne.user}/project/${Ne.project}/`:"https://api.balancer.fi/tenderly/",(null==Ne?void 0:Ne.accessKey)&&(this.opts={headers:{"X-Access-Key":Ne.accessKey}}),this.blockNumber=null==Ne?void 0:Ne.blockNumber}}var Il;const Wh=new d.Interface(x0);class Nl{constructor(ge,Ne){var Ke=this;this.pools=ge,this.createCalls=function(){var Vt=ie(function*(Ht,un,pn,yn){const{calls:Zn,outputIndexes:fr,deltas:zr}=Ke.createActionCalls(Ht,un,pn);return yn&&Zn.unshift(Ke.createSetRelayerApproval(yn)),{callData:Wh.encodeFunctionData("multicall",[Zn]),outputIndexes:yn?fr.map(ci=>ci+1):fr,deltas:zr}});return function(Ht,un,pn,yn){return Vt.apply(this,arguments)}}(),this.amountsOutByJoinPath=function(){var Vt=ie(function*(Ht,un,pn,yn){const Zn=[],fr=yield Ke.tenderlyHelper.simulateMulticall(Ke.relayer,un,Ht,pn),zr=d.defaultAbiCoder.decode(["bytes[]"],fr)[0];let ci=f.BigNumber.from("0");return yn.forEach(ai=>{const li=d.defaultAbiCoder.decode(["uint256"],zr[ai]);Zn.push(li.toString()),ci=ci.add(li.toString())}),{amountsOut:Zn,totalAmountOut:ci.toString()}});return function(Ht,un,pn,yn){return Vt.apply(this,arguments)}}(),this.minAmountsOutByJoinPath=(Vt,Ht,un)=>({minAmountsOut:Ht.map(pn=>Wi(f.BigNumber.from(pn),f.BigNumber.from(Vt)).toString()),totalMinAmountOut:Wi(f.BigNumber.from(un),f.BigNumber.from(Vt)).toString()}),this.createActionCalls=(Vt,Ht,un)=>{const pn=[],yn=[],Zn=!un,fr={};return Vt.forEach((zr,ci)=>{const ai=zr[0].isLeaf;if(zr.forEach((li,bi)=>{let os;if(os=ai?zr.filter(Us=>{var io;return li.children.map(Xs=>Xs.address).includes(Us.address)&&li.index===(null===(io=Us.parent)||void 0===io?void 0:io.index)}):bi>0?[zr[bi-1]]:[],os.length>0&&0===os.filter(Us=>"0"!==Us.index).length)return void(li.index="0");os.some(Us=>"input"===Us.joinAction||"wrapAaveDynamicToken"===Us.joinAction);const es=Ht,ws=Ht,Zs=bi===zr.length-1&&un?un[ci]:"0";switch(li.joinAction){case"wrapAaveDynamicToken":pn.push(this.createAaveWrap(li,os,ci,es,Ht));break;case"batchSwap":{const[Us,io,Xs]=this.createBatchSwap(li,os,ci,Zs,es,ws);pn.push(Us),this.updateDeltas(fr,io,Xs);break}case"joinPool":{const[Us,io,Xs,ao]=this.createJoinPool(li,os,ci,Zs,es,ws);pn.push(Us),this.updateDeltas(fr,[li.address,...io],[ao,...Xs]);break}}}),Zn){const bi=Qs.encodePeekChainedReferenceValue(Qs.toChainedReference(100*ci,!1));pn.push(bi),yn.push(pn.indexOf(bi))}}),{calls:pn,outputIndexes:yn,deltas:fr}},this.createSetRelayerApproval=Vt=>Qs.encodeSetRelayerApproval(this.relayer,!0,Vt),this.createAaveWrap=(Vt,Ht,un,pn,yn)=>{if(1!==Ht.length)throw new Error("aaveWrap nodes should always have a single child node");return Qs.encodeWrapAaveDynamicToken({staticToken:Vt.address,sender:pn,recipient:yn,amount:Ht[0].index,fromUnderlying:!0,outputReference:this.getOutputRefValue(un,Vt).value})},this.createBatchSwap=(Vt,Ht,un,pn,yn,Zn)=>{if(1!==Ht.length)throw new Error("Unsupported batchswap");const fr=Ht[0].address,zr=this.getOutputRefValue(un,Ht[0]),ci=[Vt.address,fr],ai=[f.BigNumber.from(pn).mul(-1).toString(),zr.isRef?x.MaxInt256.toString():zr.value],li=[{poolId:Vt.id,assetInIndex:1,assetOutIndex:0,amount:zr.value,userData:"0x"}],bi={sender:yn,recipient:Zn,fromInternalBalance:yn===this.relayer,toInternalBalance:Zn===this.relayer},os=[{index:ci.map(ws=>ws.toLowerCase()).indexOf(Vt.address.toLowerCase()),key:f.BigNumber.from(this.getOutputRefValue(un,Vt).value)}];return[Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:li,assets:ci,funds:bi,limits:ai,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:os}),ci,[Zn===this.relayer?"0":ai[0],yn===this.relayer?"0":ai[1]]]},this.createJoinPool=(Vt,Ht,un,pn,yn,Zn)=>{const fr=[],zr=[];Vt.children.forEach(Xs=>{fr.push(Xs.address);const ao=Ht.find(ia=>rs(ia.address,Xs.address));zr.push(ao?this.getOutputRefValue(un,ao).value:"0")}),Vt.type===E.PoolType.ComposableStable&&(fr.push(Vt.address),zr.push("0"));const ci=new X(this.wrappedNativeAsset),[ai,li]=ci.sortTokens(fr,zr);let bi=[];const os=ai.map(Xs=>Xs.toLowerCase()).indexOf(Vt.address.toLowerCase());let es;bi=-1===os?li:[...li.slice(0,os),...li.slice(os+1)],es=Vt.type===E.PoolType.Weighted?M.joinExactTokensInForBPTOut(bi,pn):y.joinExactTokensInForBPTOut(bi,pn);const Ds=ai.indexOf(x.AddressZero),Zs=Qs.constructJoinCall({poolId:Vt.id,kind:0,sender:yn,recipient:Zn,value:-1===Ds?"0":li[Ds],outputReference:this.getOutputRefValue(un,Vt).value,joinPoolRequest:{},assets:ai,maxAmountsIn:li,userData:es,fromInternalBalance:yn===this.relayer}),Us=li.map(Xs=>Qs.isChainedReference(Xs)?"0":Xs),io=Qs.isChainedReference(pn)?"0":pn;return[Zs,yn===this.relayer?[]:ai,yn===this.relayer?[]:Us,Zn===this.relayer?x.Zero.toString():x.Zero.sub(io).toString()]},this.getOutputRefValue=(Vt,Ht)=>"input"===Ht.joinAction?{value:Ht.index,isRef:!1}:"0"===Ht.index&&Ht.parent?{value:"0",isRef:!0}:{value:Qs.toChainedReference(f.BigNumber.from(Ht.index).add(100*Vt)).toString(),isRef:!0};const{tokens:ot,contracts:Ct}=zi(Ne.chainId);this.relayer=Ct.relayerV4,this.wrappedNativeAsset=ot.wrappedNativeAsset,this.tenderlyHelper=new Jp(Ne.chainId,Ne.tenderly)}joinPool(ge,Ne,Ke,ot,Ct,Vt,Ht){var un=this;return ie(function*(){if(Ne.length!=Ke.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const pn=yield bp.getGraphNodes(!0,ge,un.pools,Ct),yn=Nl.getJoinPaths(pn,Ne,Ke),Zn=Nl.totalBptZeroPriceImpact(yn),{callData:fr,outputIndexes:zr}=yield un.createCalls(yn,ot,void 0,Ht),{amountsOut:ci,totalAmountOut:ai}=yield un.amountsOutByJoinPath(ot,fr,Ne,zr),{minAmountsOut:li,totalMinAmountOut:bi}=un.minAmountsOutByJoinPath(Vt,ci,ai),os=Du(BigInt(ai),Zn.toBigInt(),!0).toString(),{callData:es,deltas:Ds}=yield un.createCalls(yn,ot,li,Ht);return un.assertDeltas(ge,Ds,Ne,Ke,bi),{to:un.relayer,callData:es,expectedOut:ai,minOut:bi,priceImpact:os}})()}assertDeltas(ge,Ne,Ke,ot,Ct){var Vt;const Ht=Q(ge);if(Ne[Ht.toLowerCase()].add(Ct).abs().gt(3))throw console.error("join assertDeltas, bptOut: ",Ht,Ct,null===(Vt=Ne[Ht.toLowerCase()])||void 0===Vt?void 0:Vt.toString()),new Oi(E.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete Ne[Ht.toLowerCase()],Ke.forEach((un,pn)=>{var yn,Zn;if(!f.BigNumber.from(ot[pn]).eq(0)&&(null===(yn=Ne[un.toLowerCase()])||void 0===yn?void 0:yn.toString())!==ot[pn])throw console.error("join assertDeltas, tokenIn: ",un,ot[pn],null===(Zn=Ne[un.toLowerCase()])||void 0===Zn?void 0:Zn.toString()),new Oi(E.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete Ne[un.toLowerCase()]});for(const un in Ne)if("0"!==Ne[un].toString())throw console.error("join assertDeltas, non-input token should be 0: ",un,Ne[un].toString()),new Oi(E.BalancerErrorCode.JOIN_DELTA_AMOUNTS)}updateDeltas(ge,Ne,Ke){return Ne.forEach((ot,Ct)=>{const Vt=ot.toLowerCase();ge[Vt]||(ge[Vt]=x.Zero),ge[Vt]=ge[Vt].add(Ke[Ct])}),ge}}Il=Nl,Nl.getJoinPaths=(qe,ge,Ne)=>{const Ke=[],ot=qe.filter(Vt=>ge.filter((Ht,un)=>f.BigNumber.from(Ne[un]).gt(0)).map(Ht=>Ht.toLowerCase()).includes(Vt.address.toLowerCase()));ot.some(Vt=>Vt.isLeaf)&&Ke.push(qe);const Ct=ot.filter(Vt=>!Vt.isLeaf);return Ct.forEach(Vt=>{const Ht=Ne.find((zr,ci)=>rs(ge[ci],Vt.address)),un=Ct.filter(zr=>rs(zr.address,Vt.address)).reduce((zr,ci)=>zr.add(ci.proportionOfParent),f.BigNumber.from(0)),pn=f.BigNumber.from(Ht).mul(Vt.proportionOfParent).div(un).toString(),[yn]=bp.createInputTokenNode(0,Vt.address,Vt.decimals,Vt.parent,x.WeiPerEther);yn.index=pn,yn.isLeaf=!1;const Zn=[yn];let fr=Vt.parent;for(;fr;)Zn.push(u.cloneDeep(fr)),fr=fr.parent;Ke.push(Zn)}),Il.updateInputAmounts(Ke,ge,Ne),Ke},Nl.updateInputAmounts=(qe,ge,Ne)=>{const Ke=(Vt,Ht)=>{if(Vt.length>1){const un=Vt.reduce((yn,Zn)=>yn.add(Zn.index),f.BigNumber.from(0)),pn=f.BigNumber.from(Ht).sub(un);Vt[0].index=pn.add(Vt[0].index).toString()}},ot=qe.find(Vt=>Vt[0].isLeaf);if(ot){const Vt=Il.updateTotalProportions(ot);ot.forEach(Ht=>{"input"===Ht.joinAction&&(Ht=Il.updateNodeAmount(Ht,ge,Ne,Vt))}),ge.forEach((Ht,un)=>{const pn=ot.filter(yn=>yn.isLeaf&&rs(yn.address,Ht));Ke(pn,Ne[un])})}const Ct=qe.filter(Vt=>!Vt[0].isLeaf);Ct.length>1&&ge.forEach((Vt,Ht)=>{const un=Ct.map(pn=>pn[0]).filter(pn=>rs(pn.address,Vt));Ke(un,Ne[Ht])})},Nl.totalBptZeroPriceImpact=qe=>{let ge=f.BigNumber.from("0");return qe.forEach(Ne=>{if(Ne[0].isLeaf)Ne.filter(Ke=>Ke.isLeaf).forEach(Ke=>{const ot=Il.bptOutZeroPiForInputNode(Ke);ge=ge.add(ot)});else{const Ke=Il.bptOutZeroPiForInputNode(Ne[0]);ge=ge.add(Ke)}}),ge},Nl.bptOutZeroPiForInputNode=qe=>{if("0"===qe.index||"input"!==qe.joinAction)return BigInt(0);let ge=1,Ne=qe.parent,Ke=qe.address;for(;void 0!==Ne;){if("batchSwap"===Ne.joinAction||"joinPool"===Ne.joinAction){const Ht=Ne.spotPrices[Ke.toLowerCase()];ge*=parseFloat(Ht),Ke=Ne.address}Ne=Ne.parent}const ot=f.parseFixed(ge.toFixed(18),18),Ct=tt(BigInt(qe.decimals)),Vt=mt(BigInt(qe.index),Ct);return wt.divDownFixed(Vt,ot.toBigInt())},Nl.updateTotalProportions=qe=>{const ge={};return qe.forEach(Ne=>{ge[Ne.address]=ge[Ne.address]?ge[Ne.address].add(Ne.proportionOfParent):Ne.proportionOfParent}),ge},Nl.updateNodeAmount=(qe,ge,Ne,Ke)=>{const ot=ge.map(Ht=>Ht.toLowerCase()).indexOf(qe.address.toLowerCase());if(-1===ot)return qe.index="0",qe;const Ct=Ke[qe.address],Vt=qe.proportionOfParent.mul(1e18.toString()).div(Ct).mul(Ne[ot]).div(1e18.toString());return qe.index=Vt.toString(),qe};const a0=new d.Interface(x0);class rc{constructor(ge,Ne){var Ke=this;this.pools=ge,this.amountsOutByExitPath=function(){var Vt=ie(function*(Ht,un,pn,yn,Zn){const fr=yield Ke.tenderlyHelper.simulateMulticall(Ke.relayer,un,Ht,[pn]),zr=d.defaultAbiCoder.decode(["bytes[]"],fr)[0],ci=yn.map(li=>d.defaultAbiCoder.decode(["uint256"],zr[li]).toString()),ai=ci.map(li=>Wi(f.BigNumber.from(li),f.BigNumber.from(Zn)).toString());return{expectedAmountsOutByExitPath:ci,minAmountsOutByExitPath:ai}});return function(Ht,un,pn,yn,Zn){return Vt.apply(this,arguments)}}(),this.amountsOutByTokenOut=(Vt,Ht,un,pn)=>{const yn={};Ht.forEach((zr,ci)=>{var ai;return yn[zr]=(null!==(ai=yn[zr])&&void 0!==ai?ai:x.Zero).add(un[ci])});const Zn=Vt.map(zr=>yn[zr].toString()),fr=Zn.map(zr=>Wi(f.BigNumber.from(zr),f.BigNumber.from(pn)).toString());return{expectedAmountsOut:Zn,minAmountsOut:fr}},this.getExitPaths=(Vt,Ht)=>{const un=Vt.map(Zn=>{const fr=[Zn];for(;fr[0].parent;)fr.unshift(u.cloneDeep(fr[0].parent));return fr[0].index=fr[fr.length-1].proportionOfParent.mul(Ht).div(x.WeiPerEther).toString(),fr}),pn=un.reduce((Zn,fr)=>f.BigNumber.from(fr[0].index).add(Zn),x.Zero),yn=f.BigNumber.from(Ht).sub(pn);return un[un.length-1][0].index=yn.add(un[un.length-1][0].index).toString(),un},this.getOutputRef=(Vt,Ht)=>100*Vt+parseInt(Ht);const{tokens:ot,contracts:Ct}=zi(Ne.chainId);this.wrappedNativeAsset=ot.wrappedNativeAsset,this.relayer=Ct.relayerV4,this.tenderlyHelper=new Jp(Ne.chainId,Ne.tenderly)}exitPool(ge,Ne,Ke,ot,Ct){var Vt=this;return ie(function*(){const Ht=yield bp.getGraphNodes(!1,ge,Vt.pools,!1),un=Ht.filter(Ds=>"output"===Ds.exitAction),pn=Vt.getExitPaths(un,Ne),yn=un.map(Ds=>Ds.address.toLowerCase()),Zn=[...new Set(yn)].sort(),fr=yield Vt.createCalls(pn,Ke,void 0,Ct),{expectedAmountsOutByExitPath:zr,minAmountsOutByExitPath:ci}=yield Vt.amountsOutByExitPath(Ke,fr.callData,Ht[0].address,fr.outputIndexes,ot),{callData:ai,deltas:li}=yield Vt.createCalls(pn,Ke,ci,Ct),{expectedAmountsOut:bi,minAmountsOut:os}=Vt.amountsOutByTokenOut(Zn,yn,zr,ot);Vt.assertDeltas(ge,li,Ne,Zn,os);const es=yield Vt.calculatePriceImpact(ge,Zn,bi,Ne);return{to:Vt.relayer,callData:ai,tokensOut:Zn,expectedAmountsOut:bi,minAmountsOut:os,priceImpact:es}})()}calculatePriceImpact(ge,Ne,Ke,ot){var Ct=this;return ie(function*(){const Vt=yield bp.getGraphNodes(!0,ge,Ct.pools,!1),Ht=Nl.getJoinPaths(Vt,Ne,Ke),un=Nl.totalBptZeroPriceImpact(Ht);return Du(BigInt(ot),un.toBigInt(),!1).toString()})()}assertDeltas(ge,Ne,Ke,ot,Ct){var Vt;const Ht=Q(ge);if(Ne[Ht.toLowerCase()].sub(Ke).abs().gt(3))throw console.error("exit assertDeltas, bptIn: ",Ht,Ke,null===(Vt=Ne[Ht.toLowerCase()])||void 0===Vt?void 0:Vt.toString()),new Oi(E.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete Ne[Ht.toLowerCase()],ot.forEach((un,pn)=>{var yn;if(Ne[un.toLowerCase()].add(Ct[pn]).abs().gt(1))throw console.error("exit assertDeltas, tokenOut: ",un,Ct[pn],null===(yn=Ne[un.toLowerCase()])||void 0===yn?void 0:yn.toString()),new Oi(E.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete Ne[un.toLowerCase()]});for(const un in Ne)if("0"!==Ne[un].toString())throw console.error("exit assertDeltas, non-input token should be 0: ",un,Ne[un].toString()),new Oi(E.BalancerErrorCode.EXIT_DELTA_AMOUNTS)}createCalls(ge,Ne,Ke,ot){var Ct=this;return ie(function*(){const{calls:Vt,outputIndexes:Ht,deltas:un}=Ct.createActionCalls(u.cloneDeep(ge),Ne,Ke);return ot&&Vt.unshift(Qs.encodeSetRelayerApproval(Ct.relayer,!0,ot)),{callData:a0.encodeFunctionData("multicall",[Vt]),outputIndexes:ot?Ht.map(pn=>pn+1):Ht,deltas:un}})()}updateDeltas(ge,Ne,Ke){return Ne.forEach((ot,Ct)=>{const Vt=ot.toLowerCase();ge[Vt]||(ge[Vt]=x.Zero),ge[Vt]=ge[Vt].add(Ke[Ct])}),ge}createActionCalls(ge,Ne,Ke){const ot=[],Ct=[],Vt=!Ke,Ht={};return ge.forEach((un,pn)=>{un.forEach(yn=>{const Zn=yn.parent?this.relayer:Ne,fr=yn.children.find(li=>un.map(bi=>bi.index).includes(li.index)),zr="output"===(null==fr?void 0:fr.exitAction),ci=zr?Ne:this.relayer,ai=zr&&Ke?Ke[pn]:"0";switch(yn.exitAction){case"batchSwap":{const[li,bi,os]=this.createBatchSwap(yn,fr,pn,ai,Zn,ci);ot.push(li),this.updateDeltas(Ht,bi,os);break}case"exitPool":{const[li,bi,os,es]=this.createExitPool(yn,fr,pn,ai,Zn,ci);ot.push(li),this.updateDeltas(Ht,[yn.address,...os],[bi,...es]);break}case"output":Vt&&(ot.push(Qs.encodePeekChainedReferenceValue(Qs.toChainedReference(this.getOutputRef(pn,yn.index),!1))),Ct.push(ot.length-1));break;default:return}})}),{calls:ot,outputIndexes:Ct,deltas:Ht}}createBatchSwap(ge,Ne,Ke,ot,Ct,Vt){const Ht=ge.parent?Qs.toChainedReference(this.getOutputRef(Ke,ge.index)).toString():ge.index,un=Ne.address,pn=[un,ge.address],yn=[f.BigNumber.from(ot).mul(-1).toString(),Qs.isChainedReference(Ht)?x.MaxInt256.toString():Ht],Zn=[{poolId:ge.id,assetInIndex:1,assetOutIndex:0,amount:Ht,userData:"0x"}],fr={sender:Ct,recipient:Vt,fromInternalBalance:!1,toInternalBalance:!1},zr=[{index:pn.map(os=>os.toLowerCase()).indexOf(un.toLowerCase()),key:Qs.toChainedReference(this.getOutputRef(Ke,Ne.index))}],ci=Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Zn,assets:pn,funds:fr,limits:yn,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:zr});let ai=yn[0];return ai=Vt===this.relayer?"0":ai,[ci,pn,[ai,Ct===this.relayer?"0":yn[1]]]}createExitPool(ge,Ne,Ke,ot,Ct,Vt){const Ht=Ne.address,un=ge.parent?Qs.toChainedReference(this.getOutputRef(Ke,ge.index)).toString():ge.index,pn=[],yn=[];ge.children.forEach(ws=>{pn.push(ws.address),yn.push(ws.address===Ht?ot:"0")}),ge.type===E.PoolType.ComposableStable&&(pn.push(ge.address),yn.push("0"));const Zn=new X(this.wrappedNativeAsset),[fr,zr]=Zn.sortTokens(pn,yn);let ci=[];const ai=fr.map(ws=>ws.toLowerCase()).indexOf(ge.address.toLowerCase());let li;ci=-1===ai?fr:[...fr.slice(0,ai),...fr.slice(ai+1)],li=ge.type===E.PoolType.Weighted?M.exitExactBPTInForOneTokenOut(un,ci.indexOf(Ht)):y.exitExactBPTInForOneTokenOut(un,ci.indexOf(Ht));const bi=[{index:fr.map(ws=>ws.toLowerCase()).indexOf(Ht.toLowerCase()),key:Qs.toChainedReference(this.getOutputRef(Ke,Ne.index))}],os=Qs.constructExitCall({poolId:ge.id,poolKind:0,sender:Ct,recipient:Vt,outputReferences:bi,exitPoolRequest:{},assets:fr,minAmountsOut:zr,userData:li,toInternalBalance:!1}),es=zr.map(ws=>Qs.isChainedReference(ws)?"0":x.Zero.sub(ws).toString()),Ds=Qs.isChainedReference(un)?"0":un;return[os,Ct===this.relayer?x.Zero.toString():Ds,Vt===this.relayer?[]:fr,Vt===this.relayer?[]:es]}}class _h{constructor(ge){this.yesterdaysPools=ge}last24h(ge){var Ne=this;return ie(function*(){let Ke;return Ne.yesterdaysPools&&(Ke=yield Ne.yesterdaysPools.find(ge.id)),ge.totalSwapVolume?(null==Ke?void 0:Ke.totalSwapVolume)?parseFloat(ge.totalSwapVolume)-parseFloat(Ke.totalSwapVolume):ge.createTime&&n0(ge.createTime)?parseFloat(ge.totalSwapVolume):0:0})()}}var rm=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"contract ComposableStablePool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class Dd{constructor(ge){const{tokens:Ne}=zi(ge.chainId);this.wrappedNativeAsset=Ne.wrappedNativeAsset}create({factoryAddress:ge,name:Ne,symbol:Ke,tokenAddresses:ot,amplificationParameter:Ct,rateProviders:Vt,tokenRateCacheDurations:Ht,exemptFromYieldProtocolFeeFlags:un,swapFee:pn,owner:yn}){const Zn=$i(`${pn}`),fr=new X(this.wrappedNativeAsset),[zr,ci,ai,li]=fr.sortTokens(ot,Vt,Ht,un),bi=[Ne,Ke,zr,Ct,ci,ai,li,Zn.toString(),yn],os=new d.Interface(rm),es=rm.find(({name:ws})=>"create"===ws);if(!es)throw new Oi(E.BalancerErrorCode.INTERNAL_ERROR_INVALID_ABI);const Ds=d.FunctionFragment.from(es);return{to:ge,data:os.encodeFunctionData(Ds,bi)}}buildInitJoin({}){throw new Error("To be implemented")}}class Xp{constructor(ge){const{tokens:Ne}=zi(ge.chainId);this.wrappedNativeAsset=Ne.wrappedNativeAsset}create({factoryAddress:ge,name:Ne,symbol:Ke,tokenAddresses:ot,weights:Ct,swapFee:Vt,owner:Ht}){const un=$i(`${Vt}`),pn=new X(this.wrappedNativeAsset),[yn,Zn]=pn.sortTokens(ot,Ct),fr=[Ne,Ke,yn,Zn,un.toString(),Ht],zr=new d.Interface(_.WeightedPoolFactory__factory.abi),ci=_.WeightedPoolFactory__factory.abi.find(({name:li})=>"create"===li);if(!ci)throw new Oi(E.BalancerErrorCode.INTERNAL_ERROR_INVALID_ABI);const ai=d.FunctionFragment.from(ci);return{to:ge,data:zr.encodeFunctionData(ai,fr)}}buildInitJoin({joiner:ge,poolId:Ne,tokensIn:Ke,amountsIn:ot}){const Ct=new X(this.wrappedNativeAsset),[Vt,Ht]=Ct.sortTokens(Ke,ot),un="joinPool",pn={poolId:Ne,sender:ge,recipient:ge,joinPoolRequest:{assets:Vt,maxAmountsIn:Ht,userData:M.joinInit(Ht),fromInternalBalance:!1}},yn=_.Vault__factory.createInterface().encodeFunctionData(un,[pn.poolId,pn.sender,pn.recipient,pn.joinPoolRequest]);return{to:_s,functionName:un,attributes:pn,data:yn}}}class Hf{constructor(ge){this.networkConfig=ge}of(ge){switch(ge){case"Weighted":return new Xp(this.networkConfig);case"Investment":case"LiquidityBootstrapping":case"Stable":case"MetaStable":case"StablePhantom":case"AaveLinear":case"ERC4626Linear":default:throw new Oi(E.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case"ComposableStable":return new Dd(this.networkConfig)}}}class wh{constructor(ge){this.pool=ge;const Ne=(Ke=>{switch(Ke){case E.PoolType.Weighted:return M;case E.PoolType.Stable:case E.PoolType.MetaStable:case E.PoolType.StablePhantom:case E.PoolType.AaveLinear:case E.PoolType.EulerLinear:case E.PoolType.ERC4626Linear:case E.PoolType.Element:case E.PoolType.Gyro2:case E.PoolType.Gyro3:return y;case E.PoolType.ComposableStable:return N}})(ge.poolType);if(!Ne)throw"Pool type not supported";this.encoder=Ne}buildQueryJoinExactIn({sender:ge=x.AddressZero,recipient:Ne=ge,maxAmountsIn:Ke,minimumBPT:ot=x.Zero,fromInternalBalance:Ct=!1}){const Vt=this.pool.tokensList.findIndex(pn=>this.pool.id.includes(pn)),Ht=[...this.pool.tokensList];Vt&&Vt>-1&&Ke.splice(Vt,1);const un=this.encoder.joinExactTokensInForBPTOut(Ke,ot);return[this.pool.id,ge,Ne,{assets:Ht,maxAmountsIn:Ke,userData:un,fromInternalBalance:Ct}]}buildQueryJoinExactOut({sender:ge=x.AddressZero,recipient:Ne=ge,maxAmountsIn:Ke=[],bptOut:ot,tokenIn:Ct,fromInternalBalance:Vt=!1}){const Ht=this.pool.tokensList.indexOf(Ct),un=this.encoder.joinTokenInForExactBPTOut(ot,Ht);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,maxAmountsIn:Ke,userData:un,fromInternalBalance:Vt}]}buildQueryExitToSingleToken({sender:ge=x.AddressZero,recipient:Ne=ge,minAmountsOut:Ke=[],bptIn:ot,tokenOut:Ct,toInternalBalance:Vt=!1}){const Ht=this.pool.tokensList.indexOf(Ct),un=this.encoder.exitExactBPTInForOneTokenOut(ot,Ht);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,minAmountsOut:Ke,userData:un,toInternalBalance:Vt}]}buildQueryExitProportionally({sender:ge=x.AddressZero,recipient:Ne=ge,minAmountsOut:Ke=[],bptIn:ot,toInternalBalance:Ct=!1}){if(!this.encoder.exitExactBPTInForTokensOut)throw"Proportional exit not implemented";const Vt=this.encoder.exitExactBPTInForTokensOut(ot);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,minAmountsOut:Ke,userData:Vt,toInternalBalance:Ct}]}buildQueryExitExactOut({sender:ge=x.AddressZero,recipient:Ne=ge,minAmountsOut:Ke,maxBptIn:ot=x.MaxUint256,toInternalBalance:Ct=!1}){const Vt=this.pool.tokensList.findIndex(un=>this.pool.id.includes(un));Vt&&Vt>-1&&Ke.splice(Vt,1);const Ht=this.encoder.exitBPTInForExactTokensOut(Ke,ot);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,minAmountsOut:Ke,userData:Ht,toInternalBalance:Ct}]}}class Kl{constructor(ge){this.liquidityGaugesRepository=ge}relativeWeight(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.liquidityGaugesRepository.findBy("poolId",ge);return Ke?Ke.relativeWeight:0})()}weekly(ge){var Ne=this;return ie(function*(){return ol()*(yield Ne.relativeWeight(ge))})()}}const Sl=(qe,ge,Ne)=>{const Ke=qe.tokens.filter(un=>!qe.id.toLowerCase().includes(un.address.toLowerCase())),ot=Ke.findIndex(un=>un.address.toLowerCase()===ge.toLowerCase());if(-1==ot)throw new Error("Token not found in pool");const Ct=Ke.map(un=>Un(un.balance,un.decimals)),Vt=f.BigNumber.from(Ne),Ht=Ct.map(un=>un.mul(Vt).div(Ct[ot]));return{tokens:Ke.map(un=>un.address),amounts:Ht.map(un=>un.toString())}},u0=(qe,ge)=>()=>{throw`${ge} for poolType ${qe} not implemented`};class Pd{constructor(ge,Ne){this.networkConfig=ge,this.repositories=Ne,this.aprService=new nm(this.repositories.pools,this.repositories.tokenPrices,this.repositories.tokenMeta,this.repositories.tokenYields,this.repositories.feeCollector,this.repositories.yesterdaysPools,this.repositories.liquidityGauges,this.repositories.feeDistributor),this.liquidityService=new Sn(Ne.pools,Ne.tokenPrices),this.joinService=new Nl(this.repositories.poolsOnChain,ge),this.exitService=new rc(this.repositories.poolsOnChain,ge),this.feesService=new Yp(Ne.yesterdaysPools),this.volumeService=new _h(Ne.yesterdaysPools),this.poolFactory=new Hf(ge),this.impermanentLossService=new Tf(Ne.tokenPrices,Ne.tokenHistoricalPrices),Ne.liquidityGauges&&(this.emissionsService=new Kl(Ne.liquidityGauges)),this.proportionalAmounts=Sl}dataSource(){return this.repositories.pools}apr(ge){var Ne=this;return ie(function*(){return Ne.aprService.apr(ge)})()}impermanentLoss(ge,Ne){var Ke=this;return ie(function*(){return Ke.impermanentLossService.calcImpLoss(ge,Ne)})()}liquidity(ge){var Ne=this;return ie(function*(){return Ne.liquidityService.getLiquidity(ge)})()}generalisedJoin(ge,Ne,Ke,ot,Ct,Vt,Ht){var un=this;return ie(function*(){return un.joinService.joinPool(ge,Ne,Ke,ot,Ct,Vt,Ht)})()}generalisedExit(ge,Ne,Ke,ot,Ct){var Vt=this;return ie(function*(){return Vt.exitService.exitPool(ge,Ne,Ke,ot,Ct)})()}fees(ge){var Ne=this;return ie(function*(){return Ne.feesService.last24h(ge)})()}volume(ge){var Ne=this;return ie(function*(){return Ne.volumeService.last24h(ge)})()}static wrap(ge,Ne){let Ke,ot,Ct;try{Ke=po.from(ge.poolType),Ct={buildJoin:(Ht,un,pn,yn)=>Ke.join.buildJoin({joiner:Ht,pool:ge,tokensIn:un,amountsIn:pn,slippage:yn,wrappedNativeAsset:Vt}),calcPriceImpact:(Ht=ie(function*(un,pn,yn){return Ke.priceImpactCalculator.calcPriceImpact(ge,un,pn,yn)}),function(pn,yn,Zn){return Ht.apply(this,arguments)}),buildExitExactBPTIn:(Ht,un,pn,yn=!1,Zn)=>{if(Ke.exit.buildExitExactBPTIn)return Ke.exit.buildExitExactBPTIn({exiter:Ht,pool:ge,bptIn:un,slippage:pn,shouldUnwrapNativeAsset:yn,wrappedNativeAsset:Vt,singleTokenMaxOut:Zn});throw"ExitExactBPTIn not supported"},buildExitExactTokensOut:(Ht,un,pn,yn)=>Ke.exit.buildExitExactTokensOut({exiter:Ht,pool:ge,tokensOut:un,amountsOut:pn,slippage:yn,wrappedNativeAsset:Vt}),calcSpotPrice:(Ht,un)=>Ke.spotPriceCalculator.calcPoolSpotPrice(Ht,un,ge),calcProportionalAmounts:(Ht,un)=>Sl(ge,Ht,un)}}catch(Ht){"UNSUPPORTED_POOL_TYPE"!=Ht.code&&console.error(Ht),Ct={buildJoin:u0(ge.poolType,"buildJoin"),calcPriceImpact:u0(ge.poolType,"calcPriceImpact"),buildExitExactBPTIn:u0(ge.poolType,"buildExitExactBPTIn"),buildExitExactTokensOut:u0(ge.poolType,"buildExitExactTokensOut"),calcSpotPrice:u0(ge.poolType,"calcSpotPrice")}}var Ht;try{ot=new wh(ge),Ct={...Ct,buildQueryJoinExactIn:ot.buildQueryJoinExactIn.bind(ot),buildQueryJoinExactOut:ot.buildQueryJoinExactOut.bind(ot),buildQueryExitExactOut:ot.buildQueryExitExactOut.bind(ot),buildQueryExitToSingleToken:ot.buildQueryExitToSingleToken.bind(ot),buildQueryExitProportionally:ot.buildQueryExitProportionally.bind(ot)}}catch{Ct={...Ct,buildQueryJoinExactIn:u0(ge.poolType,"buildQueryJoinExactIn"),buildQueryJoinExactOut:u0(ge.poolType,"buildQueryJoinExactOut"),buildQueryExitExactOut:u0(ge.poolType,"buildQueryExitExactOut"),buildQueryExitToSingleToken:u0(ge.poolType,"buildQueryExitToSingleToken"),buildQueryExitProportionally:u0(ge.poolType,"buildQueryExitProportionally")}}const Vt=Ne.addresses.tokens.wrappedNativeAsset.toLowerCase();return{...ge,...Ct}}find(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.dataSource().find(ge);if(Ke)return Pd.wrap(Ke,Ne.networkConfig)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("id"==ge)return Ke.find(Ne);if("address"==ge){const ot=yield Ke.dataSource().findBy("address",Ne);return ot?Pd.wrap(ot,Ke.networkConfig):void 0}throw`search by ${ge} not implemented`})()}all(){var ge=this;return ie(function*(){const Ne=yield ge.dataSource().all();return Ne?Ne.map(Ke=>Pd.wrap(Ke,ge.networkConfig)).filter(Ke=>Ke):[]})()}where(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.dataSource().where(ge);return Ke?Ke.map(ot=>Pd.wrap(ot,Ne.networkConfig)).filter(ot=>ot):[]})()}}const T0=new d.Interface(["function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)"]);class gd{constructor(ge,Ne,Ke){this.gaugeControllerAddress=Ne,this.multicall=Sa(ge,Ke)}getRelativeWeights(ge,Ne){var Ke=this;return ie(function*(){const ot=ge.map(Vt=>[Ke.gaugeControllerAddress,T0.encodeFunctionData("gauge_relative_weight",[T.getAddress(Vt),Ne||Math.floor(Date.now()/1e3)])]),[,Ct]=yield Ke.multicall.aggregate(ot);return ge.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]=parseFloat(Ii(Ct[un],18))),Vt),{})})()}}class $f{get(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.query(ge);return(null==Ke?void 0:Ke.length)>0?Ke[0]:void 0})()}find(ge){var Ne=this;return ie(function*(){return Ne.get({where:{id:ge}})})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.get({where:{[String(ge)]:Ne}})})()}findAllBy(ge,Ne,Ke=1e3,ot=0){var Ct=this;return ie(function*(){const Vt={where:{[String(ge)]:Ne},first:Ke,skip:ot};return Ct.query(Vt)})()}}class vp extends $f{constructor(ge,Ne,Ke){super(),this.chainId=Ne,this.blockHeight=Ke,this.client=Ns(ge)}}class c0 extends $f{constructor(ge,Ne,Ke){super(),this.chainId=Ne,this.blockHeight=Ke,this.client=ha(ge)}}class yr extends c0{query(ge){var Ne=this;return ie(function*(){ge.orderBy||(ge.orderBy=Uh.Balance),ge.orderDirection||(ge.orderDirection=Ti.Desc),!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{gaugeShares:Ke}=yield Ne.client.GaugeShares(ge);return Ke.map(Ne.mapType)})()}mapType(ge){var Ne;return{id:ge.id,balance:ge.balance,userAddress:null===(Ne=ge.user)||void 0===Ne?void 0:Ne.id,gauge:{id:ge.gauge.id,poolId:ge.gauge.poolId||void 0,isKilled:ge.gauge.isKilled,totalSupply:ge.gauge.totalSupply}}}findByUser(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.GaugeShareAttributes.UserAddress,ge,Ne,Ke)})()}findByGauge(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.GaugeShareAttributes.GaugeId,ge,Ne,Ke)})()}}const Oa=new d.Interface(["function totalSupply() view returns (uint)","function working_supply() view returns (uint)","function reward_count() view returns (uint)","function reward_tokens(uint rewardIndex) view returns (address)","function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)"]);class _p{constructor(ge,Ne,Ke){this.chainId=Ne,this.multicall=Sa(ge,Ke)}getTotalSupplies(ge){var Ne=this;return ie(function*(){const Ke=ge.map(Vt=>[Vt,Oa.encodeFunctionData("totalSupply",[])]),[,ot]=yield Ne.multicall.aggregate(Ke),Ct=ot.map(Vt=>"0x"==Vt?"0x0":Vt);return ge.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]=parseFloat(Ii(Ct[un],18))),Vt),{})})()}getWorkingSupplies(ge){var Ne=this;return ie(function*(){const Ke=ge.map(Vt=>[Vt,Oa.encodeFunctionData("working_supply",[])]),[,ot]=yield Ne.multicall.aggregate(Ke),Ct=ot.map(Vt=>"0x"==Vt?"0x0":Vt);return ge.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]=parseFloat(Ii(Ct[un],18))),Vt),{})})()}getRewardCounts(ge){var Ne=this;return ie(function*(){let Ke;if(1==Ne.chainId){const ot=ge.map(Ht=>[Ht,Oa.encodeFunctionData("reward_count",[])]),[,Ct]=yield Ne.multicall.aggregate(ot),Vt=Ct.map(Ht=>"0x"==Ht?"0x0":Ht);Ke=ge.reduce((Ht,un,pn)=>(Ht[un]||(Ht[un]=parseInt(Vt[pn])),Ht),{})}else Ke=ge.reduce((ot,Ct)=>(ot[Ct]||(ot[Ct]=1),ot),{});return Ke})()}getRewardTokens(ge,Ne){var Ke=this;return ie(function*(){const ot=Ne||(yield Ke.getRewardCounts(ge)),Ct=ge.filter(pn=>ot[pn]>0),Vt=[0],Ht=Ct.map((pn,yn)=>{const Zn=[];for(let fr=0;fr{const zr=Vt[Zn+1],ci=[];for(let ai=Vt[Zn];ai{const Zn=[];for(let fr=0;frOa.decodeFunctionResult("reward_data",pn)[0]);return Object.keys(ot).reduce((pn,yn,Zn)=>{const fr=Ct[Zn],zr=ot[yn].reduce((ci,ai,li)=>(ci[ai]||(ci[ai]=un[fr+li]),ci),{});return pn[yn]||(pn[yn]=zr),pn},{})})()}}class pc{constructor(ge){this.gauges=[],this.client=ha(ge)}fetch(){var ge=this;return ie(function*(){const Ne=(yield ge.client.Pools({where:{preferentialGauge_not:null}})).pools.map(Ke=>Ke.preferentialGauge);return ge.gauges=Ne,ge.gauges})()}find(ge){var Ne=this;return ie(function*(){return 0==Ne.gauges.length&&(yield Ne.fetch()),Ne.gauges.find(Ke=>Ke.id==ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if(0==Ke.gauges.length&&(yield Ke.fetch()),"id"==ge)return Ke.find(Ne);if("poolId"==ge)return Ke.gauges.find(ot=>ot.poolId==Ne);if("poolAddress"==ge)return Ke.gauges.find(ot=>ot.poolAddress==Ne);throw`search by ${ge} not implemented`})()}}class Wf{constructor(ge,Ne,Ke,ot,Ct){this.chainId=ot,this.workingSupplies={},this.relativeWeights={},this.rewardData={},Ke&&(this.gaugeController=new gd(Ne,Ke,Ct)),this.multicall=new _p(Ne,ot,Ct),this.subgraph=new pc(ge)}fetch(){var ge=this;return ie(function*(){const Ne=yield ge.subgraph.fetch(),Ke=Ne.map(ot=>ot.id);return 1==ge.chainId&&(ge.workingSupplies=yield ge.multicall.getWorkingSupplies(Ke)),ge.gaugeController&&(ge.relativeWeights=yield ge.gaugeController.getRelativeWeights(Ke)),ge.rewardData=Ne.reduce((ot,Ct)=>{var Vt;return ot[Vt=Ct.id]||(ot[Vt]=Ct.tokens?Object.fromEntries(Ct.tokens.map(Ht=>[Ht.id.split("-")[0],{distributor:"",last_update:f.BigNumber.from(0),integral:f.BigNumber.from(0),token:Ht.id.split("-")[0],decimals:Ht.decimals,rate:Un(Ht.rate||"0",Ht.decimals),period_finish:f.BigNumber.from(Ht.periodFinish||"0")}])):{}),ot},{}),Ne.map(ge.compose.bind(ge))})()}find(ge){var Ne=this;return ie(function*(){return Ne.gauges||(Ne.gauges=Ne.fetch()),(yield Ne.gauges).find(Ke=>Ke.id==ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){let ot;if(Ke.gauges||(Ke.gauges=Ke.fetch()),"id"==ge||"address"==ge)return Ke.find(Ne);if("poolId"==ge)ot=(yield Ke.gauges).find(Ct=>Ct.poolId==Ne);else{if("poolAddress"!=ge)throw`search by ${ge} not implemented`;ot=(yield Ke.gauges).find(Ct=>Ct.poolAddress==Ne)}return ot})()}compose(ge){return{id:ge.id,address:ge.id,name:ge.symbol,poolId:ge.poolId,poolAddress:ge.poolAddress,totalSupply:parseFloat(ge.totalSupply),workingSupply:this.workingSupplies[ge.id],relativeWeight:this.relativeWeights[ge.id],rewardTokens:this.rewardData[ge.id]}}}class w1{constructor(ge,Ne){this.url=ge,this.apiKey=Ne}get(ge){var Ne=this;return ie(function*(){try{const Ke=Ne.toPayload(ge),{data:ot}=yield R.default.post(Ne.url,Ke,{headers:{"x-api-key":Ne.apiKey}});if(ot.errors)throw new Error(ot.errors.map(Ct=>Ct.message).join(","));return ot.data}catch(Ke){throw console.error(Ke),Ke}return[]})()}toPayload(ge){return JSON.stringify({query:P.jsonToGraphQLQuery({query:ge})})}}class Yn{constructor(ge){var Ne,Ke;this.skip=0,this.client=Ns(ge.url),this.blockHeight=ge.blockHeight,this.chainId=ge.chainId;const Ct=Object.assign({},(null===(Ne=ge.query)||void 0===Ne?void 0:Ne.args)||{orderBy:lo.TotalLiquidity,orderDirection:xi.Desc,where:{swapEnabled:{eq:!0},totalShares:{gt:1e-12}}}),Vt=Object.assign({},(null===(Ke=ge.query)||void 0===Ke?void 0:Ke.attrs)||{});this.query={args:Ct,attrs:Vt}}fetchDefault(){var ge=this;return ie(function*(){const{pool0:Ne,pool1000:Ke,pool2000:ot}=yield ge.client.AllPools({where:{swapEnabled:!0,totalShares_gt:"0.000000000001"},orderBy:lo.TotalLiquidity,orderDirection:xi.Desc,block:yield ge.block()});return[...Ne,...Ke,...ot].map(ge.mapType.bind(ge))})()}fetch(ge){var Ne=this;return ie(function*(){(null==ge?void 0:ge.skip)&&(Ne.query.args.skip=ge.skip),Ne.blockHeight&&(Ne.query.args.block={number:yield Ne.blockHeight()}),Ne.query.args.first=(null==ge?void 0:ge.first)||1e3;const Ke=new go(Ne.query.args).format(new is),{pools:ot}=yield Ne.client.Pools(Ke);return Ne.skip=((null==ge?void 0:ge.skip)||0)+ot.length,ot.map(Ne.mapType.bind(Ne))})()}find(ge){var Ne=this;return ie(function*(){return yield Ne.findBy("id",ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.pools||(Ke.pools=Ke.fetchDefault()),(yield Ke.pools).find(ot=>ot[ge]==Ne)})()}all(){var ge=this;return ie(function*(){return ge.pools||(ge.pools=ge.fetchDefault()),ge.pools})()}block(){var ge=this;return ie(function*(){return ge.blockHeight?{number:yield ge.blockHeight()}:void 0})()}where(ge){var Ne=this;return ie(function*(){return Ne.pools||(Ne.pools=Ne.fetchDefault()),(yield Ne.pools).filter(ge)})()}mapType(ge){var Ne,Ke,ot,Ct,Vt,Ht,un,pn,yn;return{id:ge.id,name:ge.name||"",address:ge.address,chainId:this.chainId,poolType:ge.poolType,poolTypeVersion:ge.poolTypeVersion||1,swapFee:ge.swapFee,swapEnabled:ge.swapEnabled,protocolYieldFeeCache:ge.protocolYieldFeeCache||"0",protocolSwapFeeCache:ge.protocolSwapFeeCache||"0",amp:null!==(Ne=ge.amp)&&void 0!==Ne?Ne:void 0,owner:null!==(Ke=ge.owner)&&void 0!==Ke?Ke:void 0,factory:null!==(ot=ge.factory)&&void 0!==ot?ot:void 0,symbol:null!==(Ct=ge.symbol)&&void 0!==Ct?Ct:void 0,tokens:(ge.tokens||[]).map(this.mapToken.bind(this)),tokensList:ge.tokensList,tokenAddresses:(ge.tokens||[]).map(Zn=>Zn.address),totalLiquidity:ge.totalLiquidity,totalShares:ge.totalShares,totalSwapFee:ge.totalSwapFee,totalSwapVolume:ge.totalSwapVolume,priceRateProviders:null!==(Vt=ge.priceRateProviders)&&void 0!==Vt?Vt:void 0,createTime:ge.createTime,mainIndex:null!==(Ht=ge.mainIndex)&&void 0!==Ht?Ht:void 0,wrappedIndex:null!==(un=ge.wrappedIndex)&&void 0!==un?un:void 0,totalWeight:ge.totalWeight||"1",lowerTarget:null!==(pn=ge.lowerTarget)&&void 0!==pn?pn:"0",upperTarget:null!==(yn=ge.upperTarget)&&void 0!==yn?yn:"0"}}mapToken(ge){const Ne=this.mapSubPools(ge.token);return{...ge,isExemptFromYieldProtocolFee:ge.isExemptFromYieldProtocolFee||!1,token:Ne}}mapSubPools(ge){let Ne=null;return ge.pool&&(Ne={id:ge.pool.id,address:ge.pool.address,totalShares:ge.pool.totalShares,poolType:ge.pool.poolType,mainIndex:ge.pool.mainIndex||0},(null==ge?void 0:ge.pool.tokens)&&(Ne.tokens=ge.pool.tokens.map(this.mapSubPoolToken.bind(this)))),{pool:Ne,latestUSDPrice:ge.latestUSDPrice||void 0}}mapSubPoolToken(ge){return{address:ge.address,decimals:ge.decimals,symbol:ge.symbol,balance:ge.balance,priceRate:ge.priceRate,weight:ge.weight,isExemptFromYieldProtocolFee:ge.isExemptFromYieldProtocolFee||void 0,token:ge.token?this.mapSubPools(ge.token):void 0}}}class Jd{constructor(ge){this.skip=0,this.poolsSubgraph=new Yn({url:ge.url,chainId:ge.chainId,blockHeight:ge.blockHeight,query:ge.query}),this.provider=ge.provider,this.multicall=ge.multicall,this.vault=ge.vault}fetchDefault(){var ge=this;return ie(function*(){const Ne=yield ge.poolsSubgraph.fetch();return yield sl(Ne,ge.multicall,ge.vault,ge.provider)})()}fetch(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.poolsSubgraph.fetch(ge);return yield sl(Ke,Ne.multicall,Ne.vault,Ne.provider)})()}find(ge){var Ne=this;return ie(function*(){return yield Ne.findBy("id",ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.pools||(Ke.pools=Ke.fetchDefault()),(yield Ke.pools).find(ot=>ot[ge]==Ne)})()}all(){var ge=this;return ie(function*(){return ge.pools||(ge.pools=ge.fetchDefault()),ge.pools})()}where(ge){var Ne=this;return ie(function*(){return Ne.pools||(Ne.pools=Ne.fetchDefault()),(yield Ne.pools).filter(ge)})()}}class Mo extends c0{query(ge){var Ne=this;return ie(function*(){!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{pools:Ke}=yield Ne.client.PoolGauges(ge);return Ke.map(Ne.mapType)})()}mapType(ge){return ge}}var yd;E.PoolJoinExitAttributes=void 0,(yd=E.PoolJoinExitAttributes||(E.PoolJoinExitAttributes={})).Pool="pool",yd.Sender="sender";class bd extends vp{query(ge){var Ne=this;return ie(function*(){ge.orderBy||(ge.orderBy=gn.Timestamp),ge.orderDirection||(ge.orderDirection=xi.Asc),!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{joinExits:Ke}=yield Ne.client.JoinExits(ge);return Ke.map(Ne.mapType)})()}mapType(ge){return{id:ge.id,userAddress:ge.user.id,poolId:ge.pool.id,timestamp:ge.timestamp,type:ge.type,amounts:ge.amounts,tokens:ge.pool.tokensList}}findByUser(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolJoinExitAttributes.Sender,ge,Ne,Ke)})()}findJoins(ge,Ne){var Ke=this;return ie(function*(){return Ke.query({where:{sender:ge,pool:Ne,type:"Join"}})})()}findExits(ge,Ne){var Ke=this;return ie(function*(){return Ke.query({where:{sender:ge,pool:Ne,type:"Exit"}})})()}findByPool(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolJoinExitAttributes.Pool,ge,Ne,Ke)})()}}class Zl extends vp{query(ge){var Ne=this;return ie(function*(){ge.orderBy||(ge.orderBy=As.Balance),ge.orderDirection||(ge.orderDirection=xi.Desc),!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{poolShares:Ke}=yield Ne.client.PoolShares(ge);return Ke.map(Ne.mapType)})()}mapType(ge){return{id:ge.id,userAddress:ge.userAddress.id,poolId:ge.poolId.id,balance:ge.balance}}findByUser(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolShareAttributes.UserAddress,ge,Ne,Ke)})()}findByPool(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolShareAttributes.PoolId,ge,Ne,Ke)})()}}class A0{constructor(ge){this.tokens=ge}find(ge){var Ne=this;return ie(function*(){return Ne.tokens.find(Ke=>Ke.address.toLowerCase()===ge.toLowerCase())})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.tokens.find(ot=>ot[ge]===Ne)})()}}class No{constructor(ge,Ne=1){this.chainId=Ne,this.prices={},this.baseTokenAddresses=ge.map(ur),this.urlBase=`https://api.coingecko.com/api/v3/simple/token_price/${this.platform(Ne)}?vs_currencies=usd,eth`,this.debouncer=new hi(this.fetch.bind(this),200)}fetch(ge,{signal:Ne}={}){return R.default.get(this.url(ge),{signal:Ne}).then(({data:Ke})=>Ke).finally(()=>{})}fetchNative({signal:ge}={}){let Ne;var ot;(ot=Ne||(Ne={})).ETH="ethereum",ot.MATIC="matic-network",ot.XDAI="xdai";let Ke=Ne.ETH;return 137===this.chainId&&(Ke=Ne.MATIC),100===this.chainId&&(Ke=Ne.XDAI),R.default.get(`https://api.coingecko.com/api/v3/simple/price/?vs_currencies=eth,usd&ids=${Ke}`,{signal:ge}).then(({data:ot})=>ot[Ke]).finally(()=>{})}find(ge){const Ne=ur(ge,this.chainId);if(!this.prices[Ne]){if(0===Object.keys(this.prices).length)for(const Ke of this.baseTokenAddresses)this.prices[Ke]=this.debouncer.fetch(Ke).then(ot=>ot[Ke]);if(Ne===St(this.chainId).Addresses.nativeAsset.toLowerCase())return this.nativePrice||(this.prices[Ne]=this.fetchNative()),this.prices[Ne];this.prices[Ne]=this.debouncer.fetch(Ne).then(Ke=>Ke[Ne])}return this.prices[Ne]}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"==ge)return Ke.find(Ne)})()}platform(ge){switch(ge){case 1:case 5:case 42:case 31337:return"ethereum";case 100:return"xdai";case 137:return"polygon-pos";case 42161:return"arbitrum-one"}return"2"}url(ge){return`${this.urlBase}&contract_addresses=${ge.join(",")}`}}class uc{constructor(ge=1){this.chainId=ge,this.prices={},this.urlBase=`https://api.coingecko.com/api/v3/coins/${this.platform(ge)}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`}fetch(ge,Ne,{signal:Ke}={}){const ot=this.urlRange(ge,Ne);return R.default.get(ot,{signal:Ke}).then(({data:Ct})=>Ct).finally(()=>{})}find(ge){return ie(function*(){throw"Historic price requires point-in-time timestamp, please use findBy(address, timestamp)"})()}findBy(ge,Ne){var Ke=this;return ie(function*(){const ot=ur(ge,Ke.chainId);return{usd:`${(yield Ke.fetch(ot,Ne)).prices[0][1]}`}})()}platform(ge){switch(ge){case 1:case 5:case 42:case 31337:return"ethereum";case 137:return"polygon-pos";case 42161:return"arbitrum-one";case 100:return"xdai"}return"2"}urlRange(ge,Ne){const Ke=Ne-3600,ot=Ne+3600;return`${this.urlBase.replace("%TOKEN_ADDRESS%",ge)}&from=${Ke}&to=${ot}`}}class l0{constructor(ge,Ne=1){this.subgraphUrl=ge,this.chainId=Ne,this.prices={},this.debouncer=new hi(this.fetch.bind(this),200)}fetch(ge,{signal:Ne}={}){var Ke=this;return ie(function*(){return R.default.post(Ke.subgraphUrl,{variables:{addresses:ge},query:"query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }"},{signal:Ne}).then(ot=>ot.data.data).then(({tokens:ot})=>Object.fromEntries(ot.map(Ct=>[Ct.address,{usd:Ct.latestUSDPrice||void 0}]))).finally(()=>{})})()}find(ge){var Ne=this;return ie(function*(){const Ke=ur(ge,Ne.chainId);return Ne.prices[Ke]||(Ne.prices[Ke]=Ne.debouncer.fetch(Ke).then(ot=>ot[Ke])),Ne.prices[Ke]})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"==ge)return Ke.find(Ne)})()}}class Bl{constructor(ge,Ne,Ke){this.coingeckoRepository=ge,this.subgraphRepository=Ne,this.aaveRates=Ke}find(ge){var Ne=this;return ie(function*(){let Ke;try{try{if(Ke=yield Ne.coingeckoRepository.find(ge),!(null==Ke?void 0:Ke.usd))throw new Error("Price not found")}catch(Ct){console.error(`Coingecko API error: ${Ct}`),Ke=yield Ne.subgraphRepository.find(ge)}}catch(Ct){console.error(Ct)}const ot=(yield Ne.aaveRates.getRate(ge))||1;return Ke&&Ke.usd?{...Ke,usd:(parseFloat(Ke.usd)*ot).toString()}:Ke})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"===ge)return Ke.find(Ne);throw`Token price search by ${ge} not implemented`})()}}class wp{constructor(ge,Ne){this.coingeckoRepository=ge,this.aaveRates=Ne}find(ge){var Ne=this;return ie(function*(){return Ne.findBy(ge,Math.floor(Date.now()/1e3))})()}findBy(ge,Ne){var Ke=this;return ie(function*(){const ot=yield Ke.coingeckoRepository.findBy(ge,Ne),Ct=(yield Ke.aaveRates.getRate(ge))||1;return ot&&ot.usd?{...ot,usd:(parseFloat(ot.usd)*Ct).toString()}:ot})()}}const qc=new d.Interface(["function rate() view returns (uint256)"]);class Sf{constructor(ge,Ne,Ke){this.network=Ke,this.multicall=Sa(ge,Ne)}fetch(ge){var Ne=this;return ie(function*(){const Ke=Object.values(ir[ge]),ot=Ke.map(Vt=>[Vt,qc.encodeFunctionData("rate",[])]),[,Ct]=yield Ne.multicall.aggregate(ot);return Ke.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]="0x"==Ct[un]?0:parseFloat(Ii(Ct[un],27))),Vt),{})})()}getRate(ge){var Ne=this;return ie(function*(){return Ne.network!=E.Network.MAINNET&&Ne.network!=E.Network.POLYGON?1:Object.values(ir[Ne.network]).includes(ge)?(Ne.rates||(Ne.rates=Ne.fetch(Ne.network)),(yield Ne.rates)[ge]):1})()}}const Rd=new d.Interface(["function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)"]),x1=new d.Interface(["function totalSupply() view returns (uint)"]),G0=new d.Interface(["function getRate() view returns (uint)"]);class Qp{constructor(ge,Ne,Ke,ot,Ct,Vt){this.feeDistributorAddress=Ne,this.balAddress=Ke,this.veBalAddress=ot,this.bbAUsdAddress=Ct,this.multicall=Sa(ge,Vt)}fetch(ge){var Ne=this;return ie(function*(){const Ke=Ne.getPreviousWeek(ge),ot=[[Ne.feeDistributorAddress,Rd.encodeFunctionData("getTokensDistributedInWeek",[T.getAddress(Ne.balAddress),Ke])],[Ne.feeDistributorAddress,Rd.encodeFunctionData("getTokensDistributedInWeek",[T.getAddress(Ne.bbAUsdAddress),Ke])],[Ne.veBalAddress,x1.encodeFunctionData("totalSupply",[])],[Ne.bbAUsdAddress,G0.encodeFunctionData("getRate",[])]],[,Ct]=yield Ne.multicall.aggregate(ot);return{balAmount:parseFloat(Ii(Ct[0],18)),bbAUsdAmount:parseFloat(Ii(Ct[1],18)),veBalSupply:parseFloat(Ii(Ct[2],18)),bbAUsdPrice:parseFloat(Ii(Ct[3],18)),balAddress:Ne.balAddress}})()}multicallData(ge){var Ne=this;return ie(function*(){return Ne.data||(Ne.data=yield Ne.fetch(ge)),Ne.data})()}getPreviousWeek(ge){const Ne=new Date(ge);Ne.setUTCHours(0),Ne.setUTCMinutes(0),Ne.setUTCSeconds(0),Ne.setUTCMilliseconds(0);let Ke=Ne.getUTCDay()-4;return Ke<0&&(Ke+=7),Ke+=7,Math.floor(Ne.getTime()/1e3)-86400*Ke}}const Nd=new d.Interface(["function getProtocolFeesCollector() view returns (address)"]),Gh=new d.Interface(["function getSwapFeePercentage() view returns (uint)"]);let d0;class I0{constructor(ge,Ne){this.provider=Ne,this.vault=new g.Contract(ge,Nd,this.provider)}fetch(){var ge=this;return ie(function*(){const Ne=yield ge.vault.getProtocolFeesCollector(),Ke=new g.Contract(Ne,Gh,ge.provider),ot=yield Ke.getSwapFeePercentage();return parseFloat(Ii(ot,18))})()}find(){var ge=this;return ie(function*(){return d0||(d0=ge.fetch()),ge.swapFeePercentage=yield d0,ge.swapFeePercentage})()}findBy(){var ge=this;return ie(function*(){return ge.find()})()}}const z0=new d.Interface(["function getSwapFeePercentage() view returns (uint)"]);let zh;class xp{constructor(ge,Ne,Ke){this.protocolFeePercentagesProviderAddress=Ne,this.multicall=Sa(ge,Ke)}fetch(){var ge=this;return ie(function*(){const Ne=[[ge.protocolFeePercentagesProviderAddress,z0.encodeFunctionData("getFeeTypePercentage",[0])],[ge.protocolFeePercentagesProviderAddress,z0.encodeFunctionData("getFeeTypePercentage",[2])]],[,Ke]=yield ge.multicall.aggregate(Ne);return{swapFee:parseFloat(Ii(Ke[0],18)),yieldFee:parseFloat(Ii(Ke[2],18))}})()}getFees(){var ge=this;return ie(function*(){return zh||(zh=ge.fetch()),ge.protocolFees=yield zh,ge.protocolFees})()}}const xh={stETH:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",wstETH:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",arbitrumStEth:"0x5979d7b546e38e414f7e9822514be443a4800529"},f0=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://lido-aprs-proxy.balancer.workers.dev/?network=1"),{data:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke.smaApr))}catch(Ne){console.error("Failed to fetch stETH APR:",Ne)}return{[xh.stETH]:ge,[xh.wstETH]:ge,[xh.arbitrumStEth]:ge}});return function(){return qe.apply(this,arguments)}}(),Gf={rETH:"0xae78736cd615f374d3085123a210448e74fc6393"},E1=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://api.rocketpool.net/api/apr"),{yearlyAPR:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[Gf.rETH]:ge}});return function(){return qe.apply(this,arguments)}}(),kf={stMATIC:"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4"},kl=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://lido-aprs-proxy.balancer.workers.dev/?network=137"),{apr:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch stMATIC APR:",Ne)}return{[kf.stMATIC]:ge}});return function(){return qe.apply(this,arguments)}}(),qh={usdcUSDplus:"0x1aafc31091d93c3ff003cff5d2d8f7ba2e728425",usdcUSDplus2:"0x6933ec1ca55c06a894107860c92acdfd2dd8512f"},Bd=function(){var qe=ie(function*(){let ge=0;try{const{data:Ne}=yield R.default.get("https://app.overnight.fi/api/balancer/week/apr");ge=Math.round(1e4*parseFloat(Ne)/100)}catch(Ne){console.error("Failed to fetch USD+ APR:",Ne)}return Object.fromEntries(Object.values(qh).map(Ne=>[Ne,ge]))});return function(){return qe.apply(this,arguments)}}(),q0={sfrxETH:"0xac3e018457b222d93114458476f3e3416abbe38f"},T1=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://api.frax.finance/v2/frxeth/summary/latest"),{sfrxethApr:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[q0.sfrxETH]:ge}});return function(){return qe.apply(this,arguments)}}(),Eh={maticX:"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6"},Cf=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://generic-apr-proxy.balancer.workers.dev/?provider=stader"),{value:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[Eh.maticX]:ge}});return function(){return qe.apply(this,arguments)}}(),ml={qETH:"0x93ef1ea305d11a9b2a3ebb9bb4fcc34695292e7d"},Ep=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://generic-apr-proxy.balancer.workers.dev/?provider=tranchess"),[{weeklyAveragePnlPercentage:Ke}]=Ne.data;ge=Math.round(parseFloat(Ii(f.BigNumber.from(Ke).mul(365).mul(1e4),18)))}catch(Ne){console.error("Failed to fetch qETH APR:",Ne)}return{[ml.qETH]:ge}});return function(){return qe.apply(this,arguments)}}(),Tp={USDR:"0xaf0d9d65fc54de245cda37af3d18cbec860a4d4b"},K0=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://generic-apr-proxy.balancer.workers.dev/?provider=usdr"),{usdr:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch USDR APR:",Ne)}return{[Tp.USDR]:ge}});return function(){return qe.apply(this,arguments)}}(),Fl={rETH:"0x9559aaa82d9649c7a7b220e7c461d2e74c9a3593"},zf=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://drop-api.stafi.io/reth/v1/poolData/"),{stakeApr:Ke}=Ne.data.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[Fl.rETH]:ge}});return function(){return qe.apply(this,arguments)}}(),Ja=new w.JsonRpcProvider("https://rpc.ankr.com/eth",1),im={getPoolsUI:new g.Contract("0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9",[{inputs:[],name:"getPoolsUI",outputs:[{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"}],stateMutability:"view",type:"function"}],Ja).getPoolsUI},e1={sApe:"0x7966c5bae631294d7cffcea5430b78c2f76db6fa"},Je=function(){var qe=ie(function*(ge=1,Ne=im){let Ke=0;try{const ot=(yield Ne.getPoolsUI())[0],Ct=ot.stakedAmount,Vt=ot.currentTimeRange.rewardsPerHour.mul(8760);Ke=Number(Vt.mul(1e4).div(Ct))}catch(ot){console.error("Failed to fetch Tessera Ape Coin APR:",ot)}return{[e1.sApe]:Ke}});return function(){return qe.apply(this,arguments)}}(),oe={eUSDC:"0xeb91861f8a4e1c12333f42dce8fb0ecdc28da716",eDAI:"0xe025e3ca2be02316033184551d4d3aa22024d9dc",eUSDT:"0x4d19f33948b99800b6113ff3e83bec9b537c85d2",eFRAX:"0x5484451a88a35cd0878a1be177435ca8a0e4054e"},Pe={[E.Network.MAINNET]:"https://api.thegraph.com/subgraphs/name/euler-xyz/euler-mainnet"},He=function(){var qe=ie(function*(){const ge=E.Network.MAINNET,Ne={operationName:"getAssetsAPY",query:"\n query getAssetsAPY($eTokenAddress_in: [String!]) {\n assets(\n where: {\n eTokenAddress_in: $eTokenAddress_in\n }\n ) {\n eTokenAddress\n supplyAPY\n }\n }\n",variables:{eTokenAddress_in:Object.values(oe)}},Ke=yield R.default.post(Pe[ge],Ne),{data:{assets:ot}}=Ke.data,Ct={eUSDT:0,eDAI:0,eUSDC:0,eFRAX:0};return ot.forEach(({eTokenAddress:Vt,supplyAPY:Ht})=>{const un=Object.entries(oe).filter(([,pn])=>pn.toLocaleLowerCase()===Vt.toLocaleLowerCase())[0][0];Ct[un]=Math.round(1e4*parseFloat(Ii(f.BigNumber.from(Ht),27)))}),{[oe.eUSDT]:Ct.eUSDT,[oe.eDAI]:Ct.eDAI,[oe.eUSDC]:Ct.eUSDC,[oe.eFRAX]:Ct.eFRAX}});return function(){return qe.apply(this,arguments)}}(),We=Object.fromEntries([...Object.values(xh).map(qe=>[qe,f0]),...Object.values(kf).map(qe=>[qe,kl]),...Object.values(ts).map(qe=>[qe,ki]),...Object.values(qh).map(qe=>[qe,Bd]),...Object.values(Gf).map(qe=>[qe,E1]),...Object.values(q0).map(qe=>[qe,T1]),...Object.values(Eh).map(qe=>[qe,Cf]),...Object.values(ml).map(qe=>[qe,Ep]),...Object.values(Tp).map(qe=>[qe,K0]),...Object.values(Fl).map(qe=>[qe,zf]),...Object.values(e1).map(qe=>[qe,Je]),...Object.values(oe).map(qe=>[qe,He])]);class Xe{constructor(ge,Ne=We){this.network=ge,this.sources=Ne,this.yields={}}fetch(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.sources[ge](Ne.network);Ne.yields={...Ne.yields,...Ke}})()}find(ge){var Ne=this;return ie(function*(){const Ke=ge.toLocaleLowerCase();return Object.keys(Ne.sources).includes(Ke)&&!Object.keys(Ne.yields).includes(Ke)&&(yield Ne.fetch(Ke)),Ne.yields[Ke]})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"==ge)return Ke.find(Ne)})()}}const at=qe=>`{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${qe} }) {\n number\n }\n}`,_t=function(){var qe=ie(function*(ge,Ne){const Ke={query:at(Ne)},ot=yield R.default.post(ge,Ke),{data:{blocks:Ct}}=ot.data;return parseInt(Ct[0].number)});return function(Ne,Ke){return qe.apply(this,arguments)}}();class xt{constructor(ge){this.endpoint=ge,this.blocks={}}find(ge){var Ne=this;return ie(function*(){if("dayAgo"==ge){const Ke=""+(Math.floor(Date.now()/1e3)-86400);return Ne.blocks[Ke]||(Ne.blocks={...Ne.blocks,[Ke]:_t(Ne.endpoint,Ke)}),Ne.blocks[Ke]}})()}findBy(ge="",Ne=""){return ie(function*(){})()}}var $t,cn,In=[{chainId:1,address:"0x8888801af4d980682e47f1a9036e589479e835c5",symbol:"mph"},{chainId:1,address:"0x27054b13b1b798b345b591a4d22e6562d47ea75a",symbol:"ast"},{chainId:1,address:"0x3301ee63fb29f863f2333bd4466acb46cd8323e6",symbol:"akita"},{chainId:1,address:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",symbol:"aurabal"},{chainId:1,address:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",symbol:"aura"},{chainId:1,address:"0x3472a5a71965499acd81997a54bba8d852c6e53d",symbol:"badger"},{chainId:1,address:"0xba100000625a3754423978a60c9317c58a424e3d",symbol:"bal"},{chainId:1,address:"0x804cdb9116a10bb78768d3252355a1b18067bf8f",symbol:"bb-a-dai"},{chainId:1,address:"0x9210f1204b5a24742eba12f710636d76240df3d0",symbol:"bb-a-usdc"},{chainId:1,address:"0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c",symbol:"bb-a-usdt"},{chainId:1,address:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2",symbol:"bb-a-usd"},{chainId:1,address:"0x2d94aa3e47d9d5024503ca8491fce9a2fb4da198",symbol:"bank"},{chainId:1,address:"0x0d8775f648430679a709e98d2b0cb6250d2887ef",symbol:"bat"},{chainId:1,address:"0xf17e65822b568b3903685a7c9f496cf7656cc6c2",symbol:"bico"},{chainId:1,address:"0x799ebfabe77a6e34311eeee9825190b9ece32824",symbol:"btrst"},{chainId:1,address:"0x514910771af9ca656af840dff83e8264ecf986ca",symbol:"link"},{chainId:1,address:"0x3506424f91fd33084466f402d5d97f05f8e3b4af",symbol:"chz"},{chainId:1,address:"0x41e5560054824ea6b0732e656e3ad64e20e94e45",symbol:"cvc"},{chainId:1,address:"0xc00e94cb662c3520282e6f5717214004a7f26888",symbol:"comp"},{chainId:1,address:"0xdef1ca1fb7fbcdc777520aa7f396b4e015f497ab",symbol:"cow"},{chainId:1,address:"0xd533a949740bb3306d119cc777fa900ba034cd52",symbol:"crv"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",symbol:"dai"},{chainId:1,address:"0xf2051511b9b121394fa75b8f7d4e7424337af687",symbol:"haus"},{chainId:1,address:"0x888888435fde8e7d4c54cab67f206e4199454c60",symbol:"dfx"},{chainId:1,address:"0x798d1be841a82a273720ce31c822c61a67a601c3",symbol:"digg"},{chainId:1,address:"0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c",symbol:"enj"},{chainId:1,address:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",symbol:"ens"},{chainId:1,address:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",symbol:"ftm"},{chainId:1,address:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",symbol:"fei"},{chainId:1,address:"0xed1480d12be41d92f36f5f7bdd88212e381a3677",symbol:"fdt"},{chainId:1,address:"0x586aa273f262909eef8fa02d90ab65f5015e0516",symbol:"fiat"},{chainId:1,address:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",symbol:"gtc"},{chainId:1,address:"0x900db999074d9277c5da2a43f252d74366230da0",symbol:"giv"},{chainId:1,address:"0x6810e776880c02933d47db1b9fc05908e5386b96",symbol:"gno"},{chainId:1,address:"0xba485b556399123261a5f9c95d413b4f93107407",symbol:"graviaura"},{chainId:1,address:"0x3ec8798b81485a254928b70cda1cf0a2bb0b74d7",symbol:"gro"},{chainId:1,address:"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",symbol:"snx"},{chainId:1,address:"0x5a98fcbea516cf06857215779fd812ca3bef1b32",symbol:"ldo"},{chainId:1,address:"0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d",symbol:"lqty"},{chainId:1,address:"0x5f98805a4e8be255a32880fdec7f6728c6568ba0",symbol:"lusd"},{chainId:1,address:"0x965d79f1a1016b574a62986e13ca8ab04dfdd15c",symbol:"m2"},{chainId:1,address:"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",symbol:"mkr"},{chainId:1,address:"0xd084944d3c05cd115c09d072b9f44ba3e0e45921",symbol:"fold"},{chainId:1,address:"0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",symbol:"matic"},{chainId:1,address:"0xa3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2",symbol:"mta"},{chainId:1,address:"0x4b13006980acb09645131b91d259eaa111eaf5ba",symbol:"myc"},{chainId:1,address:"0x333a4823466879eef910a04d473505da62142069",symbol:"nation"},{chainId:1,address:"0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5",symbol:"note"},{chainId:1,address:"0x967da4048cd07ab37855c090aaf366e4ce1b9f48",symbol:"ocean"},{chainId:1,address:"0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5",symbol:"ohm"},{chainId:1,address:"0xab846fb6c81370327e784ae7cbb6d6a6af6ff4bf",symbol:"pal"},{chainId:1,address:"0xcafe001067cdef266afb7eb5a286dcfd277f3de5",symbol:"psp"},{chainId:1,address:"0x68037790a0229e9ce6eaa8a99ea92964106c4703",symbol:"par"},{chainId:1,address:"0x45804880de22913dafe09f4980848ece6ecbaf78",symbol:"paxg"},{chainId:1,address:"0x89ab32156e46f46d02ade3fecbe5fc4243b9aaed",symbol:"pnt"},{chainId:1,address:"0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec",symbol:"poly"},{chainId:1,address:"0x43d4a3cd90ddd2f8f4f693170c9c8098163502ad",symbol:"d2d"},{chainId:1,address:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",symbol:"renbtc"},{chainId:1,address:"0x408e41876cccdc0f92210600ef50372656052a38",symbol:"ren"},{chainId:1,address:"0xfb5453340c03db5ade474b27e68b6a9c6b2823eb",symbol:"robot"},{chainId:1,address:"0xd33526068d116ce69f19a9ee46f0bd304f21a51f",symbol:"rpl"},{chainId:1,address:"0xae78736cd615f374d3085123a210448e74fc6393",symbol:"reth"},{chainId:1,address:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",symbol:"sbtc"},{chainId:1,address:"0x476c5e26a75bd202a9683ffd34359c0cc15be0ff",symbol:"srm"},{chainId:1,address:"0x35e78b3982e87ecfd5b3f3265b601c046cdbe232",symbol:"xai"},{chainId:1,address:"0x3affcca64c2a6f4e3b6bd9c64cd2c969efd1ecbe",symbol:"dsla"},{chainId:1,address:"0xf24d8651578a55b0c119b9910759a351a3458895",symbol:"sdbal"},{chainId:1,address:"0x11c1a6b3ed6bb362954b29d3183cfa97a0c806aa",symbol:"str"},{chainId:1,address:"0x8f693ca8d21b157107184d29d398a8d082b38b76",symbol:"data"},{chainId:1,address:"0x470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7",symbol:"temple"},{chainId:1,address:"0xa36fdbbae3c9d55a1d67ee5821d53b50b63a1ab9",symbol:"temp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",symbol:"usdt"},{chainId:1,address:"0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050",symbol:"tcr"},{chainId:1,address:"0x226f7b842e0f0120b7e194d05432b3fd14773a9d",symbol:"unn"},{chainId:1,address:"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",symbol:"uni"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",symbol:"usdc"},{chainId:1,address:"0x81f8f0bb1cb2a06649e51913a151f0e7ef6fa321",symbol:"vita"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",symbol:"weth"},{chainId:1,address:"0xedb171c18ce90b633db442f2a6f72874093b49ef",symbol:"wampl"},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",symbol:"wbtc"},{chainId:1,address:"0xf203ca1769ca8e9e8fe1da9d147db68b6c919817",symbol:"wncg"},{chainId:1,address:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",symbol:"wsteth"},{chainId:1,address:"0x79c71d3436f39ce382d0f58f1b011d88100b9d91",symbol:"xns"},{chainId:1,address:"0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",symbol:"yfi"},{chainId:1,address:"0xbcca60bb61934080951369a648fb03df4f96263c",symbol:"ausdc"},{chainId:1,address:"0x028171bca77440897b824ca71d1c56cac55b68a3",symbol:"adai"},{chainId:1,address:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",symbol:"ausdt"},{chainId:137,address:"0x9c2c5fd7b07e95ee044ddeba0e97a665f142394f",symbol:"1inch"},{chainId:137,address:"0xd6df932a45c0f255f85145f286ea0b292b21c90b",symbol:"aave"},{chainId:137,address:"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539",symbol:"addy"},{chainId:137,address:"0xf84bd51eab957c2e7b7d646a3427c5a50848281d",symbol:"agar"},{chainId:137,address:"0x033d942a6b495c4071083f4cde1f17e986fe856c",symbol:"aga"},{chainId:137,address:"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58",symbol:"amaticc"},{chainId:137,address:"0x034b2090b579228482520c589dbd397c53fc51cc",symbol:"vision"},{chainId:137,address:"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b",symbol:"avax"},{chainId:137,address:"0x49690541e3f6e933a9aa3cffee6010a7bb5b72d7",symbol:"axiav3"},{chainId:137,address:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",symbol:"bal"},{chainId:137,address:"0xdb7cb471dd0b49b29cab4a1c14d070f27216a0ab",symbol:"bank"},{chainId:137,address:"0xfbdd194376de19a88118e84e279b977f165d01b8",symbol:"bifi"},{chainId:137,address:"0xd6ca869a4ec9ed2c7e618062cdc45306d8dbbc14",symbol:"btc2x-fli-p"},{chainId:137,address:"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",symbol:"link"},{chainId:137,address:"0x172370d5cd63279efa6d502dab29171933a610af",symbol:"crv"},{chainId:137,address:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",symbol:"dai"},{chainId:137,address:"0x1d607faa0a51518a7728580c238d912747e71f7a",symbol:"data"},{chainId:137,address:"0x85955046df4668e1dd369d2de9f3aeb98dd2a369",symbol:"dpi"},{chainId:137,address:"0xe7804d91dfcde7f776c90043e03eaa6df87e6395",symbol:"dfx"},{chainId:137,address:"0xf28164a485b0b2c90639e47b0f377b4a438a16b1",symbol:"dquick"},{chainId:137,address:"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89",symbol:"frax"},{chainId:137,address:"0x50b728d8d964fd00c2d0aad81718b71311fef68a",symbol:"snx"},{chainId:137,address:"0x72928d5436ff65e57f72d5566dcd3baedc649a88",symbol:"hdao"},{chainId:137,address:"0x3ad707da309f3845cd602059901e39c4dcd66473",symbol:"eth2x-fli-p"},{chainId:137,address:"0x4f025829c4b13df652f38abd2ab901185ff1e609",symbol:"ieth-fli-p"},{chainId:137,address:"0x340f412860da7b7823df372a2b59ff78b7ae6abc",symbol:"imatic-fli-p"},{chainId:137,address:"0xf287d97b6345bad3d88856b26fb7c0ab3f2c7976",symbol:"matic2x-fli-p"},{chainId:137,address:"0x130ce4e4f76c2265f94a961d70618562de0bb8d2",symbol:"ibtc-fli-p"},{chainId:137,address:"0x596ebe76e2db4470966ea395b0d063ac6197a8c5",symbol:"jrt"},{chainId:137,address:"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4",symbol:"stmatic"},{chainId:137,address:"0xf501dd45a1198c2e1b5aef5314a68b9006d842e0",symbol:"mta"},{chainId:137,address:"0xeaecc18198a475c921b24b8a6c1c1f0f5f3f7ea0",symbol:"seed"},{chainId:137,address:"0xfe712251173a2cd5f5be2b46bb528328ea3565e1",symbol:"mvi"},{chainId:137,address:"0xa3fa99a148fa48d14ed51d610c367c61876997f1",symbol:"mimatic"},{chainId:137,address:"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb",symbol:"nex"},{chainId:137,address:"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128",symbol:"par"},{chainId:137,address:"0x580a84c73811e1839f75d86d75d88cca0c241ff4",symbol:"qi"},{chainId:137,address:"0x831753dd7087cac61ab5644b308642cc1c33dc13",symbol:"quick"},{chainId:137,address:"0xb5c064f955d8e7f38fe0460c556a72987494ee17",symbol:"quick"},{chainId:137,address:"0x00e5646f60ac6fb446f621d146b6e1886f002905",symbol:"rai"},{chainId:137,address:"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f",symbol:"rbw"},{chainId:137,address:"0xdbf31df14b66535af65aac99c32e9ea844e14501",symbol:"renbtc"},{chainId:137,address:"0x501ace9c35e60f03a2af4d484f49f9b1efde9f40",symbol:"solace"},{chainId:137,address:"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6",symbol:"maticx"},{chainId:137,address:"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a",symbol:"sushi"},{chainId:137,address:"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32",symbol:"tel"},{chainId:137,address:"0xe6469ba6d2fd6130788e0ea9c0a0515900563b59",symbol:"ust"},{chainId:137,address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",symbol:"usdt"},{chainId:137,address:"0x5fe2b58c013d7601147dcdd68c143a77499f5531",symbol:"grt"},{chainId:137,address:"0xbbba073c31bf03b8acf7c28ef0738decf3695683",symbol:"sand"},{chainId:137,address:"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015",symbol:"thx"},{chainId:137,address:"0x2f800db0fdb5223b3c3f354886d907a671414a7f",symbol:"bct"},{chainId:137,address:"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756",symbol:"tusd"},{chainId:137,address:"0x3809dcdd5dde24b37abe64a5a339784c3323c44f",symbol:"swap"},{chainId:137,address:"0x7fbc10850cae055b27039af31bd258430e714c62",symbol:"ubt"},{chainId:137,address:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",symbol:"usdc"},{chainId:137,address:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",symbol:"weth"},{chainId:137,address:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",symbol:"wmatic"},{chainId:137,address:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",symbol:"wbtc"},{chainId:137,address:"0x24834bbec7e39ef42f4a75eaf8e5b6486d3f0e57",symbol:"lunc"},{chainId:137,address:"0xf153eff70dc0bf3b085134928daeea248d9b30d0",symbol:"xmark"},{chainId:42161,address:"0x9f20de1fc9b161b34089cbeae888168b44b03461",symbol:"arbis"},{chainId:42161,address:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",symbol:"bal"},{chainId:42161,address:"0x031d35296154279dc1984dcd93e392b1f946737b",symbol:"cap"},{chainId:42161,address:"0xf97f4df75117a78c1a5a0dbb814af92458539fb4",symbol:"link"},{chainId:42161,address:"0x354a6da3fcde098f8389cad84b0182725c6c91de",symbol:"comp"},{chainId:42161,address:"0xf4d48ce3ee1ac3651998971541badbb9a14d7234",symbol:"cream"},{chainId:42161,address:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",symbol:"crv"},{chainId:42161,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",symbol:"dai"},{chainId:42161,address:"0x8038f3c971414fd1fc220ba727f2d4a0fc98cb65",symbol:"dht"},{chainId:42161,address:"0xf0b5ceefc89684889e5f7e0a7775bd100fcd3709",symbol:"dusd"},{chainId:42161,address:"0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55",symbol:"dpx"},{chainId:42161,address:"0x32eb7902d4134bf98a28b963d26de779af92a212",symbol:"rdpx"},{chainId:42161,address:"0xc3ae0333f0f34aa734d5493276223d95b8f9cb37",symbol:"dxd"},{chainId:42161,address:"0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a",symbol:"gmx"},{chainId:42161,address:"0xa0b862f60edef4452f25b4160f177db44deb6cf1",symbol:"gno"},{chainId:42161,address:"0xb965029343d55189c25a7f3e0c9394dc0f5d41b1",symbol:"ndx"},{chainId:42161,address:"0x539bde0d7dbd336b79148aa742883198bbf60342",symbol:"magic"},{chainId:42161,address:"0x4e352cf164e64adcbad318c3a1e222e9eba4ce42",symbol:"mcb"},{chainId:42161,address:"0x3f56e0c36d275367b8c502090edf38289b3dea0d",symbol:"mimatic"},{chainId:42161,address:"0x965772e0e9c84b6f359c8597c891108dcf1c5b1a",symbol:"pickle"},{chainId:42161,address:"0x6694340fc020c5e6b96567843da2df01b2ce1eb6",symbol:"stg"},{chainId:42161,address:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",symbol:"sushi"},{chainId:42161,address:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",symbol:"usdt"},{chainId:42161,address:"0x23a941036ae778ac51ab04cea08ed6e2fe103614",symbol:"grt"},{chainId:42161,address:"0xa72159fc390f0e3c6d415e658264c7c4051e9b87",symbol:"tcr"},{chainId:42161,address:"0x4d15a3a2286d883af0aa1b3f21367843fac63e07",symbol:"tusd"},{chainId:42161,address:"0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",symbol:"uni"},{chainId:42161,address:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",symbol:"usdc"},{chainId:42161,address:"0xa684cd057951541187f288294a1e1c2646aa2d24",symbol:"vsta"},{chainId:42161,address:"0x64343594ab9b56e99087bfa6f2335db24c2d1f17",symbol:"vst"},{chainId:42161,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",symbol:"weth"},{chainId:42161,address:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",symbol:"wbtc"},{chainId:42161,address:"0x82e3a8f066a6989666b031d916c43672085b1582",symbol:"yfi"}];class Rn{constructor(ge,Ne,Ke){var ot=this;if(this.pools=new Yn({url:ge.urls.subgraph,chainId:ge.chainId}),this.poolsOnChain=new Jd({url:ge.urls.subgraph,chainId:ge.chainId,provider:Ne,multicall:ge.addresses.contracts.multicall,vault:ge.addresses.contracts.vault,query:Ke}),this.poolShares=new Zl(ge.urls.subgraph,ge.chainId),this.poolJoinExits=new bd(ge.urls.subgraph,ge.chainId),ge.urls.gaugesSubgraph&&(this.poolGauges=new Mo(ge.urls.gaugesSubgraph,ge.chainId),this.gaugeShares=new yr(ge.urls.gaugesSubgraph,ge.chainId)),ge.urls.blockNumberSubgraph){this.blockNumbers=new xt(ge.urls.blockNumberSubgraph);const yn=function(){var Zn=ie(function*(){if(ot.blockNumbers)return yield ot.blockNumbers.find("dayAgo")});return function(){return Zn.apply(this,arguments)}}();this.yesterdaysPools=new Yn({url:ge.urls.subgraph,chainId:ge.chainId,blockHeight:yn})}const Ct=In.filter(yn=>yn.chainId==ge.chainId).map(yn=>yn.address),Vt=new No(Ct,ge.chainId),Ht=new l0(ge.urls.subgraph,ge.chainId),un=new Sf(ge.addresses.contracts.multicall,Ne,ge.chainId);this.tokenPrices=new Bl(Vt,Ht,un);const pn=new uc(ge.chainId);this.tokenHistoricalPrices=new wp(pn,un),this.tokenMeta=new A0([]),ge.urls.gaugesSubgraph&&(this.liquidityGauges=new Wf(ge.urls.gaugesSubgraph,ge.addresses.contracts.multicall,ge.addresses.contracts.gaugeController||"",ge.chainId,Ne)),ge.addresses.contracts.feeDistributor&&ge.addresses.tokens.bal&&ge.addresses.tokens.veBal&&ge.addresses.tokens.bbaUsd&&(this.feeDistributor=new Qp(ge.addresses.contracts.multicall,ge.addresses.contracts.feeDistributor,ge.addresses.tokens.bal,ge.addresses.tokens.veBal,ge.addresses.tokens.bbaUsd,Ne)),this.feeCollector=new I0(ge.addresses.contracts.vault,Ne),ge.addresses.contracts.protocolFeePercentagesProvider&&(this.protocolFees=new xp(ge.addresses.contracts.multicall,ge.addresses.contracts.protocolFeePercentagesProvider,Ne)),this.tokenYields=new Xe(ge.chainId)}}(function(qe){qe[qe.Direct=0]="Direct",qe[qe.TokenIn=1]="TokenIn",qe[qe.TokenOut=2]="TokenOut",qe[qe.Middle=3]="Middle"})($t||($t={})),function(qe){qe[qe.Swap=0]="Swap",qe[qe.BatchSwap=1]="BatchSwap",qe[qe.Join=2]="Join",qe[qe.Exit=3]="Exit"}(cn||(cn={}));const hr={type:cn.BatchSwap,swaps:[],opRef:[],minOut:"0",assets:[],hasTokenIn:!1,hasTokenOut:!1,fromInternal:!1,toInternal:!1,limits:[],approveTokens:[],sender:"",receiver:""},jr=new d.Interface(Sd);function ni(qe,ge){return qe.some(Ne=>Ne.address.toLowerCase()===ge.toLowerCase())}function Fi(qe,ge){const Ne=ge[qe.assetOutIndex],Ke=Q(qe.poolId);return Ne.toLowerCase()===Ke.toLowerCase()}function Nr(qe,ge){const Ne=ge[qe.assetInIndex],Ke=Q(qe.poolId);return Ne.toLowerCase()===Ke.toLowerCase()}function Ci(qe,ge,Ne){let Ke={};return qe!==$t.TokenIn&&qe!==$t.Middle||(Ke={index:ge,key:Qs.toChainedReference(Ne)},Ne++),[Ke,Ne]}function Wo(qe,ge){return Wi(f.BigNumber.from(qe),f.BigNumber.from(ge)).toString()}function Go(qe,ge,Ne,Ke){let ot=qe.amount;return(Ne===$t.TokenOut||Ne===$t.Middle&&ge===cn.Join||Ne===$t.Middle&&ge===cn.Exit)&&(ot=Qs.toChainedReference(Ke-1).toString()),ot}function Ha(qe,ge,Ne,Ke){let ot;return ot=Ne===qe&&Ke===ge?$t.Direct:Ne===qe?$t.TokenIn:Ke===ge?$t.TokenOut:$t.Middle,ot}function Vn(qe,ge,Ne,Ke,ot,Ct,Vt,Ht){var un;const pn=Ha(ge,Ne,qe.assetInIndex,qe.assetOutIndex),yn=Go(qe,cn.Join,pn,Ke),Zn=Wo(null!==(un=qe.returnAmount)&&void 0!==un?un:"0",Ct),[fr,zr]=Ci(pn,qe.assetOutIndex,Ke);let ci=Ht,ai=!0,li=!1;pn!==$t.Direct&&pn!==$t.TokenIn||(ci=Vt,ai=!1,li=!0);let bi=Ht,os=!1;return pn!==$t.Direct&&pn!==$t.TokenOut||(bi=Vt,os=!0),[{type:cn.Join,poolId:qe.poolId,tokenIn:ot[qe.assetInIndex],bpt:ot[qe.assetOutIndex],opRef:fr,minOut:Zn,amountIn:yn,assets:ot,actionStep:pn,sender:ci,receiver:bi,fromInternal:ai,hasTokenIn:li,hasTokenOut:os},zr]}function lr(qe,ge,Ne,Ke,ot,Ct,Vt,Ht){var un;const pn=Ha(ge,Ne,qe.assetInIndex,qe.assetOutIndex),yn=Go(qe,cn.Exit,pn,Ke),Zn=Wo(null!==(un=qe.returnAmount)&&void 0!==un?un:"0",Ct),[fr,zr]=Ci(pn,qe.assetOutIndex,Ke);let ci=Ht,ai=!1;pn!==$t.Direct&&pn!==$t.TokenIn||(ci=Vt,ai=!0);let li=!1,bi=!0,os=Ht;return pn!==$t.Direct&&pn!==$t.TokenOut||(os=Vt,bi=!1,li=!0),[{type:cn.Exit,poolId:qe.poolId,tokenOut:ot[qe.assetOutIndex],bpt:ot[qe.assetInIndex],opRef:fr.key?[fr]:[],minOut:Zn,amountIn:yn,assets:ot,actionStep:pn,sender:ci,receiver:os,toInternal:bi,hasTokenIn:ai,hasTokenOut:li},zr]}function Tr(qe,ge,Ne,Ke,ot,Ct,Vt,Ht,un){var pn;const yn=Ha(ge,Ne,qe.assetInIndex,qe.assetOutIndex),Zn=Go(qe,cn.Swap,yn,Ke);qe.amount=Zn;const fr=Wo(null!==(pn=qe.returnAmount)&&void 0!==pn?pn:"0",Ct),[zr,ci]=Ci(yn,qe.assetOutIndex,Ke),ai=yn===$t.Direct||yn===$t.TokenIn,li=yn===$t.Direct||yn===$t.TokenOut,bi=ni(Vt,ot[qe.assetInIndex]);let os=!0;(ai||bi)&&(os=!1);let es,Ds,ws=!0;return(li||ni(Vt,ot[qe.assetOutIndex]))&&(ws=!1),es=ai?Ht:un,Ds=li?Ht:un,[{type:cn.Swap,opRef:zr.key?[zr]:[],minOut:fr,amountIn:Zn,assets:ot,swap:qe,hasTokenIn:ai,hasTokenOut:li,fromInternal:os,toInternal:ws,isBptIn:bi,sender:es,receiver:Ds},ci]}function di(qe,ge,Ne){const Ke=qe.tokensList,ot=new X(Ne),[Ct]=ot.sortTokens(Ke),Vt=ge.tokenOut,Ht=Ct.findIndex(zr=>zr.toLowerCase()===Vt.toLowerCase()),un=Array(Ke.length).fill("0");un[Ht]=ge.minOut;const pn=ge.amountIn,yn={assets:Ct,minAmountsOut:un,userData:M.exitExactBPTInForOneTokenOut(pn,Ht),toInternalBalance:ge.toInternal,poolId:ge.poolId,poolKind:0,sender:ge.sender,recipient:ge.receiver,outputReferences:ge.opRef,exitPoolRequest:{}};return[Qs.constructExitCall(yn),ge.hasTokenIn?pn:"0",ge.hasTokenOut?un[Ht]:"0"]}function Kr(qe,ge,Ne){const Ke=qe.tokensList,ot=new X(Ne),[Ct]=ot.sortTokens(Ke),Vt=ge.tokenIn,Ht=Ct.findIndex(ci=>ci.toLowerCase()===Vt.toLowerCase()),un=Array(Ke.length).fill("0");un[Ht]=ge.amountIn;const pn=ge.minOut,yn=M.joinExactTokensInForBPTOut(un,pn),Zn={poolId:ge.poolId,sender:ge.sender,recipient:ge.receiver,kind:0,joinPoolRequest:{assets:Ct,maxAmountsIn:un,userData:yn,fromInternalBalance:ge.fromInternal},value:"0",outputReference:ge.opRef.key?ge.opRef.key.toString():"0"};return[Qs.encodeJoinPool(Zn),ge.hasTokenIn?un[Ht]:"0",ge.hasTokenOut?pn:"0"]}function ui(qe,ge,Ne){const Ke=[];for(const pn of qe.approveTokens){const yn=Qs.encodeApproveVault(pn,x.MaxUint256.toString());Ke.push(yn)}const Ct={swapType:E.SwapType.SwapExactIn,swaps:qe.swaps,assets:qe.assets,funds:{sender:qe.sender,recipient:qe.receiver,fromInternalBalance:qe.fromInternal,toInternalBalance:qe.toInternal},limits:qe.limits.map(pn=>pn.toString()),deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:qe.opRef},Vt=Qs.encodeBatchSwap(Ct);Ke.push(Vt);const Ht=qe.assets.findIndex(pn=>pn.toLowerCase()===ge.toLowerCase()),un=qe.assets.findIndex(pn=>pn.toLowerCase()===Ne.toLowerCase());return[Ke,qe.hasTokenIn?qe.limits[Ht].toString():"0",qe.hasTokenOut?qe.limits[un].abs().toString():"0"]}Object.defineProperty(E,"PoolFilter",{enumerable:!0,get:function(){return m.PoolFilter}}),Object.defineProperty(E,"RouteProposer",{enumerable:!0,get:function(){return m.RouteProposer}}),Object.defineProperty(E,"SOR",{enumerable:!0,get:function(){return m.SOR}}),Object.defineProperty(E,"SwapTypes",{enumerable:!0,get:function(){return m.SwapTypes}}),Object.defineProperty(E,"formatSequence",{enumerable:!0,get:function(){return m.formatSequence}}),Object.defineProperty(E,"getTokenAddressesForSwap",{enumerable:!0,get:function(){return m.getTokenAddressesForSwap}}),Object.defineProperty(E,"parseToPoolsDict",{enumerable:!0,get:function(){return m.parseToPoolsDict}}),Object.defineProperty(E,"phantomStableBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return m.phantomStableBPTForTokensZeroPriceImpact}}),Object.defineProperty(E,"queryBatchSwapTokensIn",{enumerable:!0,get:function(){return m.queryBatchSwapTokensIn}}),Object.defineProperty(E,"queryBatchSwapTokensOut",{enumerable:!0,get:function(){return m.queryBatchSwapTokensOut}}),Object.defineProperty(E,"stableBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return m.stableBPTForTokensZeroPriceImpact}}),Object.defineProperty(E,"weightedBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return m.weightedBPTForTokensZeroPriceImpact}}),E.APR_THRESHOLD=1e4,E.AaveHelpers=class{static getRate(qe,ge){return ie(function*(){return(yield new g.Contract(qe,Te,ge).getRate()).toString()})()}},E.AaveRates=Sf,E.AssetHelpers=X,E.BalancerAPIArgsFormatter=$s,E.BalancerError=Oi,E.BalancerErrors=pe,E.BalancerMinterAuthorization=me,E.BalancerSDK=class{constructor(qe,ge=new Yu(qe),Ne=new t0(qe)){this.config=qe,this.sor=ge,this.subgraph=Ne,this.networkConfig=Mc(qe),this.provider=ge.provider,this.data=new Rn(this.networkConfig,ge.provider,qe.subgraphQuery),this.swaps=new df(this.config),this.relayer=new Qs(this.swaps),this.pricing=new jf(qe,this.swaps),this.pools=new Pd(this.networkConfig,this.data),this.balancerContracts=new kd(this.networkConfig.addresses.contracts,ge.provider),this.zaps=new Iu(this.networkConfig.chainId)}get rpcProvider(){return this.sor.provider}get contracts(){return this.balancerContracts.contracts}},E.BlockNumberRepository=xt,E.CoingeckoHistoricalPriceRepository=uc,E.CoingeckoPriceRepository=No,E.ComposableStablePoolEncoder=N,E.Data=Rn,E.Debouncer=hi,E.FeeCollectorRepository=I0,E.FeeDistributorRepository=Qp,E.GaugeControllerMulticallRepository=gd,E.GaugeSharesRepository=yr,E.GraphQLArgsBuilder=go,E.HistoricalPriceProvider=wp,E.Liquidity=Sn,E.LiquidityGaugeSubgraphRPCProvider=Wf,E.LiquidityGaugesMulticallRepository=_p,E.LiquidityGaugesSubgraphRepository=pc,E.ManagedPoolEncoder=v,E.POOLS=function(qe){return ae[qe]?ae[qe]:we},E.PoolGaugesRepository=Mo,E.PoolJoinExitRepository=bd,E.PoolSharesRepository=Zl,E.Pools=Pd,E.PoolsBalancerAPIRepository=class{constructor(qe){var ge,Ne;this.pools=[],this.skip=0,this.client=new w1(qe.url,qe.apiKey),this.query={args:Object.assign({},(null===(ge=qe.query)||void 0===ge?void 0:ge.args)||{chainId:1,orderBy:"totalLiquidity",orderDirection:"desc",where:{swapEnabled:{eq:!0},totalShares:{gt:.05}}}),attrs:Object.assign({},(null===(Ne=qe.query)||void 0===Ne?void 0:Ne.attrs)||{id:!0,address:!0})},delete this.query.args.skip}fetchFromCache(qe){const ge=(null==qe?void 0:qe.first)||10,Ne=(null==qe?void 0:qe.skip)||0,Ke=this.pools.slice(Ne,ge+Ne);return this.skip=Ne+ge,Ke}fetch(qe){var ge=this;return ie(function*(){if(ge.pools.length>((null==qe?void 0:qe.first)||10)+((null==qe?void 0:qe.skip)||0))return ge.fetchFromCache(qe);ge.nextToken&&(ge.query.args.nextToken=ge.nextToken),(null==qe?void 0:qe.first)&&(ge.query.args.first=2*qe.first);const Ne=new go(ge.query.args).format(new $s),Ke=ge.query.attrs;Ke.nextToken=!0;const ot={pools:{__args:Ne,...Ke}},Ct=(yield ge.client.get(ot)).pools;return ge.nextToken=Ct.nextToken,ge.pools=ge.pools.concat(Ct.pools.map(ge.format)),ge.skip=ge.pools.length,ge.fetchFromCache(qe)})()}find(qe){var ge=this;return ie(function*(){return 0==ge.pools.length&&(yield ge.fetch()),ge.findBy("id",qe)})()}findBy(qe,ge){var Ne=this;return ie(function*(){0==Ne.pools.length&&(yield Ne.fetch());const Ke=Ne.pools.find(ot=>ot[qe]==ge);if(Ke)return Ne.format(Ke)})()}format(qe){var ge,Ne,Ke,ot;if(null===(ge=qe.apr)||void 0===ge?void 0:ge.rewardAprs.breakdown){const Ct=JSON.parse(null===(Ne=qe.apr)||void 0===Ne?void 0:Ne.rewardAprs.breakdown);qe.apr.rewardAprs.breakdown=Ct}if(null===(Ke=qe.apr)||void 0===Ke?void 0:Ke.tokenAprs.breakdown){const Ct=JSON.parse(null===(ot=qe.apr)||void 0===ot?void 0:ot.tokenAprs.breakdown);qe.apr.tokenAprs.breakdown=Ct}return qe}},E.PoolsFallbackRepository=class{constructor(qe,ge={}){this.providers=qe,this.currentProviderIdx=0,this.timeout=ge.timeout||1e4}fetch(qe){var ge=this;return ie(function*(){return ge.fallbackQuery("fetch",[qe])})()}get currentProvider(){if(this.providers.length&&!(this.currentProviderIdx>=this.providers.length))return this.providers[this.currentProviderIdx]}find(qe){var ge=this;return ie(function*(){return ge.fallbackQuery("find",[qe])})()}findBy(qe,ge){var Ne=this;return ie(function*(){return Ne.fallbackQuery("findBy",[qe,ge])})()}fallbackQuery(qe,ge){var Ne=this;return ie(function*(){if(Ne.currentProviderIdx>=Ne.providers.length)throw new Error("No working providers found");let Ke;try{const ot=Ne.providers[Ne.currentProviderIdx];Ke=yield Promise.race([ot[qe].apply(ot,ge),new Promise((Ct,Vt)=>setTimeout(()=>Vt(new Error("timeout")),Ne.timeout))])}catch(ot){const Ct=ot.message;"timeout"===Ct?console.error("Provider "+Ne.currentProviderIdx+" timed out, falling back to next provider"):console.error("Provider "+Ne.currentProviderIdx+" failed with error: ",Ct,", falling back to next provider"),Ne.currentProviderIdx++,Ke=yield Ne.fallbackQuery.call(Ne,qe,ge)}return Ke})()}},E.PoolsStaticRepository=class{constructor(qe){this.pools=qe}find(qe){var ge=this;return ie(function*(){return ge.pools.find(Ne=>Ne.id.toLowerCase()===qe.toLowerCase())})()}findBy(qe,ge){var Ne=this;return ie(function*(){return Ne.pools.find(Ke=>Ke[qe]===ge)})()}all(){var qe=this;return ie(function*(){return qe.pools})()}where(qe){var ge=this;return ie(function*(){return(yield ge.all()).filter(qe)})()}},E.PoolsSubgraphOnChainRepository=Jd,E.PoolsSubgraphRepository=Yn,E.ProtocolFeesProvider=xp,E.Relayer=Qs,E.RelayerAuthorization=ke,E.SHALLOW_COMPOSABLE_STABLE_BUFFER=1e6,E.Sor=Yu,E.StablePoolEncoder=y,E.StaticTokenPriceProvider=class{constructor(qe){this.tokenPrices=Object.fromEntries(Object.entries(qe).map(([ge,Ne])=>[ge.toLowerCase(),Ne]))}find(qe){var ge=this;return ie(function*(){const Ne=qe.toLowerCase(),Ke=ge.tokenPrices[Ne];if(Ke)return Ke})()}findBy(qe,ge){var Ne=this;return ie(function*(){if("address"==qe)return Ne.find(ge)})()}},E.StaticTokenProvider=A0,E.Subgraph=t0,E.SubgraphArgsFormatter=is,E.SubgraphPriceRepository=l0,E.Swaps=df,E.TokenPriceProvider=Bl,E.TokenYieldsRepository=Xe,E.WeightedPoolEncoder=M,E.accountToAddress=_e,E.addressMapIn=mr,E.balEmissions=mf,E.bn=qe=>f.parseFixed(`${qe}`,18),E.buildRelayerCalls=function(qe,ge,Ne,Ke,ot,Ct,Vt){const Ht=function(qe,ge){return function(ot,Ct){const Vt=[];let Ht=u.cloneDeep(hr);Ht.assets=Ct,Ht.limits=Array(Ct.length).fill(f.BigNumber.from("0"));let un=!0,pn={};for(const yn of ot)yn.type===cn.Swap?(un&&(pn=yn,un=!1),yn.isBptIn&&Ht.approveTokens.push(yn.assets[yn.swap.assetInIndex]),yn.fromInternal===pn.fromInternal&&yn.toInternal===pn.toInternal&&yn.receiver===pn.receiver&&yn.sender===pn.sender||Ht.swaps.length>0&&(Vt.push(Ht),Ht=u.cloneDeep(hr),Ht.assets=Ct,Ht.limits=Array(Ct.length).fill(f.BigNumber.from("0"))),Ht.swaps.push(yn.swap),Ht.opRef.push(...yn.opRef),Ht.fromInternal=yn.fromInternal,Ht.toInternal=yn.toInternal,Ht.sender=yn.sender,Ht.receiver=yn.receiver,yn.hasTokenIn?(Ht.hasTokenIn=!0,Ht.limits[yn.swap.assetInIndex]=Ht.limits[yn.swap.assetInIndex].add(yn.amountIn)):Ht.limits[yn.swap.assetInIndex]=x.MaxInt256,yn.hasTokenOut&&(Ht.hasTokenOut=!0,Ht.limits[yn.swap.assetOutIndex]=Ht.limits[yn.swap.assetOutIndex].sub(yn.minOut)),pn=yn):(Ht.swaps.length>0&&(Vt.push(Ht),Ht=u.cloneDeep(hr),Ht.assets=Ct,Ht.limits=Array(Ct.length).fill(f.BigNumber.from("0"))),Vt.push(yn));return Ht.swaps.length>0&&Vt.push(Ht),Vt}(function(ot){const Ct=[],Vt=[],Ht=[];for(const un of ot)un.type===cn.Exit||un.type===cn.Join?un.hasTokenIn?Ct.push(un):un.hasTokenOut?Vt.push(un):Ht.push(un):Ht.push(un);return[...Ct,...Ht,...Vt]}(qe),ge)}(function(Zn,fr,zr,ci,ai,li,bi,os){const es=ci.findIndex(io=>io.toLowerCase()===Zn.toLowerCase()),Ds=ci.findIndex(io=>io.toLowerCase()===fr.toLowerCase()),ws=[];let Zs=0,Us={};for(const io of zr)if(Fi(io,ci)){const[Xs,ao]=Vn(io,es,Ds,Zs,ci,ai,bi,os);Zs=ao,ws.push(Xs),Us=Xs}else{if(!Nr(io,ci)){const Xs=io.amount,[ao,ia]=Tr(io,es,Ds,Zs,ci,ai,li,bi,os);Us.type===cn.Swap&&"0"===Xs&&(Us.receiver=Us.sender,Us.toInternal=Us.fromInternal,Us.opRef=[],ao.sender=Us.receiver,ao.fromInternal=Us.fromInternal,ao.amountIn="0",ao.swap.amount="0"),Zs=ia,ws.push(ao),Us=ao;continue}{const[Xs,ao]=lr(io,es,Ds,Zs,ci,ai,bi,os);Zs=ao,ws.push(Xs),Us=Xs}}return ws}(qe.tokenIn,qe.tokenOut,qe.swaps,qe.tokenAddresses,Ct,ge,Ne,Ke),qe.tokenAddresses),un=[],pn=[],yn=[];Vt&&un.push(Qs.encodeSetRelayerApproval(Ke,!0,Vt));for(const Zn of Ht){if(Zn.type===cn.Exit){const fr=ge.find(li=>li.id===Zn.poolId);if(void 0===fr)throw new Oi(E.BalancerErrorCode.NO_POOL_DATA);const[zr,ci,ai]=di(fr,Zn,ot);un.push(zr),pn.push(f.BigNumber.from(ci)),yn.push(f.BigNumber.from(ai))}if(Zn.type===cn.Join){const fr=ge.find(li=>li.id===Zn.poolId);if(void 0===fr)throw new Oi(E.BalancerErrorCode.NO_POOL_DATA);const[zr,ci,ai]=Kr(fr,Zn,ot);un.push(zr),pn.push(f.BigNumber.from(ci)),yn.push(f.BigNumber.from(ai))}if(Zn.type===cn.BatchSwap){const[fr,zr,ci]=ui(Zn,qe.tokenIn,qe.tokenOut);un.push(...fr),pn.push(f.BigNumber.from(zr)),yn.push(f.BigNumber.from(ci))}}return function(Zn,fr,zr,ci){const ai=Zn.reduce((os=f.BigNumber.from(0),es)=>os.add(es)),bi=fr.reduce((os=f.BigNumber.from(0),es)=>os.add(es)).sub(Wi(zr.returnAmount,f.BigNumber.from(ci)));if(!ai.eq(zr.swapAmount)||!bi.lt("3"))throw new Oi(E.BalancerErrorCode.RELAY_SWAP_AMOUNTS)}(pn,yn,qe,Ct),{to:Ke,data:jr.encodeFunctionData("multicall",[un]),rawCalls:un}},E.canUseJoinExit=function(qe,ge,Ne){return qe!==m.SwapTypes.SwapExactOut&&ge.toLowerCase()!==x.AddressZero.toLowerCase()&&Ne.toLowerCase()!==x.AddressZero.toLowerCase()},E.formatFixed=cs,E.formatFromBigInt18=function(qe){return f.formatFixed(f.BigNumber.from(qe),18)},E.getLimitsForSlippage=so,E.getPoolAddress=Q,E.getPoolNonce=ce,E.getPoolSpecialization=ee,E.insert=Xi,E.isNormalizedWeights=qe=>qe.reduce((Ne,Ke)=>Ne.add(Ke),x.Zero).eq(x.WeiPerEther),E.isSameAddress=rs,E.parseFixed=wi,E.parsePoolInfo=st,E.parseToBigInt18=$i,E.signPermit=function(){var qe=ie(function*(ge,Ne,Ke,ot,Ct=x.MaxUint256,Vt){const{chainId:Ht}=yield ge.provider.getNetwork(),un=yield Ne.getAddress();Vt||(Vt=yield ge.nonces(un));const pn={name:yield ge.name(),version:"1",chainId:Ht,verifyingContract:ge.address},yn={owner:un,spender:yield _e(Ke),value:ot,nonce:Vt,deadline:Ct},Zn=yield Ne._signTypedData(pn,{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},yn);return{...b.splitSignature(Zn),deadline:f.BigNumber.from(Ct),nonce:f.BigNumber.from(Vt)}});return function(ge,Ne,Ke,ot){return qe.apply(this,arguments)}}(),E.someJoinExit=function(qe,ge,Ne){return ge.some(Ke=>function(ot,Ct,Vt){const Ht=ot.find(un=>un.id===Ct.poolId);return"Weighted"===(null==Ht?void 0:Ht.poolType)&&[Vt[Ct.assetInIndex],Vt[Ct.assetOutIndex]].includes(Ht.address)}(qe,Ke,Ne))},E.splitPoolId=qe=>({address:Q(qe),specialization:ee(qe),nonce:ce(qe)}),E.toNormalizedWeights=function(qe){if(100==qe.length)return Array(100).fill(x.WeiPerEther.div(100));const ge=qe.reduce((ot,Ct)=>ot.add(Ct),x.Zero);if(ge.eq(x.WeiPerEther))return qe;const Ne=[];let Ke=x.Zero;for(let ot=0;ot{Ne.price&&(ge[Ne.address]=Ne.price)}),ge},E.unwrapToken=Fr,Object.defineProperty(E,"__esModule",{value:!0})}(be,Y(7910),Y(11843),Y(34078),Y(2885),Y(36776),Y(61488),Y(11221),Y(28686),Y(23815),Y(80488),Y(8206),Y(80831),Y(47106),Y(22721),Y(80233))},76959:function(bt,be,Y){"use strict";var ie=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(be,"__esModule",{value:!0});var z=Y(58673),O=ie(Y(27012)),E=function(x){return z.isExtractableFile(x)||null!==x&&"object"==typeof x&&"function"==typeof x.pipe};be.default=function(x,f,T){var g=z.extractFiles({query:x,variables:f,operationName:T},"",E),b=g.clone,l=g.files;if(0===l.size){if(!Array.isArray(x))return JSON.stringify(b);if(void 0!==f&&!Array.isArray(f))throw new Error("Cannot create request body with given variable type, array expected");var h=x.reduce(function(S,I,P){return S.push({query:I,variables:f?f[P]:void 0}),S},[]);return JSON.stringify(h)}var m=new("undefined"==typeof FormData?O.default:FormData);m.append("operations",JSON.stringify(b));var _={},w=0;return l.forEach(function(S){_[++w]=S}),m.append("map",JSON.stringify(_)),w=0,l.forEach(function(S,I){m.append(""+ ++w,I)}),m}},47106:function(bt,be,Y){"use strict";var ie=this&&this.__assign||function(){return ie=Object.assign||function(o){for(var y,M=1,v=arguments.length;M0&&D[D.length-1])&&(6===B[0]||2===B[0])){M=0;continue}if(3===B[0]&&(!D||B[1]>D[0]&&B[1]{"use strict";Y.r(be),Y.d(be,{ComposableStablePool:()=>lo,FxMaths:()=>Od,FxPool:()=>ol,Gyro2Maths:()=>Uh,Gyro2Pool:()=>Ti,Gyro3Maths:()=>ha,Gyro3Pool:()=>Fo,GyroEMathFunctions:()=>t0,GyroEMaths:()=>Sd,GyroEV2Pool:()=>ql,GyroHelpers:()=>Or,GyroHelpersSignedFixedPoint:()=>e0,LinearMaths:()=>po,LinearPool:()=>rr,MetaStablePool:()=>xa,OldBigNumber:()=>M,PhantomStablePool:()=>Ji,PoolFilter:()=>ke,PoolTypes:()=>Ce,RouteProposer:()=>Fl,SOR:()=>Ja,StableMathBigInt:()=>Qa,StableMaths:()=>hi,StablePool:()=>ja,SwapTypes:()=>xe,WeightedMaths:()=>Gn,WeightedPool:()=>Kn,ZERO:()=>v,balancesFromTokenInOut:()=>au,bnum:()=>C,formatSequence:()=>Rd,getSpotPriceAfterSwapForPath:()=>rc,getTokenAddressesForSwap:()=>qc,parseToPoolsDict:()=>kl,safeParseFixed:()=>X,stableBPTForTokensZeroPriceImpact:()=>e1,weightedBPTForTokensZeroPriceImpact:()=>im});var ie=Y(34553),z=Y(71677),O=Y(2024),E=Y(2885),d=Y(16659),x=Y(51528),f=Y(36776),T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},g={exports:{}};!function(Je,oe){var He="__lodash_hash_undefined__",We=9007199254740991,Xe="[object Arguments]",_t="[object Boolean]",xt="[object Date]",cn="[object Function]",In="[object GeneratorFunction]",Rn="[object Map]",hr="[object Number]",jr="[object Object]",ni="[object Promise]",Fi="[object RegExp]",Nr="[object Set]",Ci="[object String]",Wo="[object Symbol]",Go="[object WeakMap]",Ha="[object ArrayBuffer]",Ba="[object DataView]",Vn="[object Float32Array]",lr="[object Float64Array]",Tr="[object Int8Array]",di="[object Int16Array]",Kr="[object Int32Array]",ui="[object Uint8Array]",qe="[object Uint8ClampedArray]",ge="[object Uint16Array]",Ne="[object Uint32Array]",ot=/\w*$/,Ct=/^\[object .+?Constructor\]$/,Vt=/^(?:0|[1-9]\d*)$/,Ht={};Ht[Xe]=Ht["[object Array]"]=Ht[Ha]=Ht[Ba]=Ht[_t]=Ht[xt]=Ht[Vn]=Ht[lr]=Ht[Tr]=Ht[di]=Ht[Kr]=Ht[Rn]=Ht[hr]=Ht[jr]=Ht[Fi]=Ht[Nr]=Ht[Ci]=Ht[Wo]=Ht[ui]=Ht[qe]=Ht[ge]=Ht[Ne]=!0,Ht["[object Error]"]=Ht[cn]=Ht[Go]=!1;var pn="object"==typeof self&&self&&self.Object===Object&&self,yn="object"==typeof T&&T&&T.Object===Object&&T||pn||Function("return this")(),Zn=oe&&!oe.nodeType&&oe,fr=Zn&&Je&&!Je.nodeType&&Je,zr=fr&&fr.exports===Zn;function ci(zn,_i){return zn.set(_i[0],_i[1]),zn}function ai(zn,_i){return zn.add(_i),zn}function os(zn,_i,fs,ko){var Ld=-1,yl=zn?zn.length:0;for(ko&&yl&&(fs=zn[++Ld]);++Ld-1},Wu.prototype.set=function(zn,_i){var fs=this.__data__,ko=C0(fs,zn);return ko<0?fs.push([zn,_i]):fs[ko][1]=_i,this},Is.prototype.clear=function(){this.__data__={hash:new Zi,map:new(ut||Wu),string:new Zi}},Is.prototype.delete=function(zn){return Dt(this,zn).delete(zn)},Is.prototype.get=function(zn){return Dt(this,zn).get(zn)},Is.prototype.has=function(zn){return Dt(this,zn).has(zn)},Is.prototype.set=function(zn,_i){return Dt(this,zn).set(zn,_i),this},p0.prototype.clear=function(){this.__data__=new Wu},p0.prototype.delete=function(zn){return this.__data__.delete(zn)},p0.prototype.get=function(zn){return this.__data__.get(zn)},p0.prototype.has=function(zn){return this.__data__.has(zn)},p0.prototype.set=function(zn,_i){var fs=this.__data__;if(fs instanceof Wu){var ko=fs.__data__;if(!ut||ko.length<199)return ko.push([zn,_i]),this;fs=this.__data__=new Is(ko)}return fs.set(zn,_i),this};var Nn=Se?Us(Se,Object):function(){return[]},Mr=function(zn){return vd.call(zn)};function Oo(zn,_i){return!!(_i=_i??We)&&("number"==typeof zn||Vt.test(zn))&&zn>-1&&zn%1==0&&zn<_i}function Jo(zn){var _i=zn&&zn.constructor;return zn===("function"==typeof _i&&_i.prototype||ia)}function Lo(zn){if(null!=zn){try{return sm.call(zn)}catch{}try{return zn+""}catch{}}return""}function mc(zn,_i){return zn===_i||zn!=zn&&_i!=_i}(Qe&&Mr(new Qe(new ArrayBuffer(1)))!=Ba||ut&&Mr(new ut)!=Rn||At&&Mr(At.resolve())!=ni||Zt&&Mr(new Zt)!=Nr||Jt&&Mr(new Jt)!=Go)&&(Mr=function(zn){var _i=vd.call(zn),fs=_i==jr?zn.constructor:void 0,ko=fs?Lo(fs):void 0;if(ko)switch(ko){case Pn:return Ba;case Xn:return Rn;case or:return ni;case Er:return Nr;case Hr:return Go}return _i});var zu=Array.isArray;function Ru(zn){return null!=zn&&function(zn){return"number"==typeof zn&&zn>-1&&zn%1==0&&zn<=We}(zn.length)&&!_d(zn)}var Tc=Ue||function(){return!1};function _d(zn){var _i=l2(zn)?vd.call(zn):"";return _i==cn||_i==In}function l2(zn){var _i=typeof zn;return!!zn&&("object"==_i||"function"==_i)}function Sp(zn){return Ru(zn)?function(zn,_i){var fs=zu(zn)||function(zn){return function(zn){return function(zn){return!!zn&&"object"==typeof zn}(zn)&&Ru(zn)}(zn)&&h0.call(zn,"callee")&&(!Ll.call(zn,"callee")||vd.call(zn)==Xe)}(zn)?function(zn,_i){for(var fs=-1,ko=Array(zn);++fs0||Je===oe?oe:oe-1}function H(Je){for(var oe,Pe,He=1,We=Je.length,Xe=Je[0]+"";He$t^Pe?1:-1;for(_t=(xt=We.length)<($t=Xe.length)?xt:$t,at=0;at<_t;at++)if(We[at]!=Xe[at])return We[at]>Xe[at]^Pe?1:-1;return xt==$t?0:xt>$t^Pe?1:-1}function K(Je,oe,Pe,He){if(JePe||Je!==u(Je))throw Error(m+(He||"Argument")+("number"==typeof Je?JePe?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Je))}function R(Je){var oe=Je.c.length-1;return G(Je.e/S)==oe&&Je.c[oe]%2!=0}function o(Je,oe){return(Je.length>1?Je.charAt(0)+"."+Je.slice(1):Je)+(oe<0?"e":"e+")+oe}function y(Je,oe,Pe){var He,We;if(oe<0){for(We=Pe+".";++oe;We+=Pe);Je=We+Je}else if(++oe>(He=Je.length)){for(We=Pe,oe-=He;--oe;We+=Pe);Je+=We}else oeIn?ot.c=ot.e=null:Vn.e=10;qe/=10,ui++);return void(ui>In?ot.c=ot.e=null:(ot.e=ui,ot.c=[Vn]))}Ke=String(Vn)}else{if(!l.test(Ke=String(Vn)))return He(ot,Ke,ge);ot.s=45==Ke.charCodeAt(0)?(Ke=Ke.slice(1),-1):1}(ui=Ke.indexOf("."))>-1&&(Ke=Ke.replace(".","")),(qe=Ke.search(/e/i))>0?(ui<0&&(ui=qe),ui+=+Ke.slice(qe+1),Ke=Ke.substring(0,qe)):ui<0&&(ui=Ke.length)}else{if(K(lr,2,Fi.length,"Base"),10==lr)return Ha(ot=new Nr(Vn),at+ot.e+1,_t);if(Ke=String(Vn),ge="number"==typeof Vn){if(0*Vn!=0)return He(ot,Ke,ge,lr);if(ot.s=1/Vn<0?(Ke=Ke.slice(1),-1):1,Nr.DEBUG&&Ke.replace(/^0\.0*|\./,"").length>15)throw Error(_+Vn)}else ot.s=45===Ke.charCodeAt(0)?(Ke=Ke.slice(1),-1):1;for(Tr=Fi.slice(0,lr),ui=qe=0,Ne=Ke.length;qeui){ui=Ne;continue}}else if(!Kr&&(Ke==Ke.toUpperCase()&&(Ke=Ke.toLowerCase())||Ke==Ke.toLowerCase()&&(Ke=Ke.toUpperCase()))){Kr=!0,qe=-1,ui=0;continue}return He(ot,String(Vn),ge,lr)}ge=!1,(ui=(Ke=Pe(Ke,lr,10,ot.s)).indexOf("."))>-1?Ke=Ke.replace(".",""):ui=Ke.length}for(qe=0;48===Ke.charCodeAt(qe);qe++);for(Ne=Ke.length;48===Ke.charCodeAt(--Ne););if(Ke=Ke.slice(qe,++Ne)){if(Ne-=qe,ge&&Nr.DEBUG&&Ne>15&&(Vn>I||Vn!==u(Vn)))throw Error(_+ot.s*Vn);if((ui=ui-qe-1)>In)ot.c=ot.e=null;else if(ui=$t)?o(Ne,qe):y(Ne,qe,"0");else if(ui=(Vn=Ha(new Nr(Vn),lr,Tr)).e,ge=(Ne=H(Vn.c)).length,1==di||2==di&&(lr<=ui||ui<=xt)){for(;gege){if(--lr>0)for(Ne+=".";lr--;Ne+="0");}else if((lr+=ui-ge)>0)for(ui+1==ge&&(Ne+=".");lr--;Ne+="0");return Vn.s<0&&Kr?"-"+Ne:Ne}function Wo(Vn,lr){for(var Tr,di=1,Kr=new Nr(Vn[0]);di=10;Kr/=10,di++);return(Tr=di+Tr*S-1)>In?Vn.c=Vn.e=null:Tr=10;ge/=10,Kr++);if((ui=lr-Kr)<0)ui+=S,ot=(Ne=Ct[Ke=0])/Vt[Kr-(qe=lr)-1]%10|0;else if((Ke=h((ui+1)/S))>=Ct.length){if(!di)break e;for(;Ct.length<=Ke;Ct.push(0));Ne=ot=0,Kr=1,qe=(ui%=S)-S+1}else{for(Ne=ge=Ct[Ke],Kr=1;ge>=10;ge/=10,Kr++);ot=(qe=(ui%=S)-S+Kr)<0?0:Ne/Vt[Kr-qe-1]%10|0}if(di=di||lr<0||null!=Ct[Ke+1]||(qe<0?Ne:Ne%Vt[Kr-qe-1]),di=Tr<4?(ot||di)&&(0==Tr||Tr==(Vn.s<0?3:2)):ot>5||5==ot&&(4==Tr||di||6==Tr&&(ui>0?qe>0?Ne/Vt[Kr-qe]:0:Ct[Ke-1])%10&1||Tr==(Vn.s<0?8:7)),lr<1||!Ct[0])return Ct.length=0,di?(Ct[0]=Vt[(S-(lr-=Vn.e+1)%S)%S],Vn.e=-lr||0):Ct[0]=Vn.e=0,Vn;if(0==ui?(Ct.length=Ke,ge=1,Ke--):(Ct.length=Ke+1,ge=Vt[S-ui],Ct[Ke]=qe>0?u(Ne/Vt[Kr-qe]%Vt[qe])*ge:0),di)for(;;){if(0==Ke){for(ui=1,qe=Ct[0];qe>=10;qe/=10,ui++);for(qe=Ct[0]+=ge,ge=1;qe>=10;qe/=10,ge++);ui!=ge&&(Vn.e++,Ct[0]==w&&(Ct[0]=1));break}if(Ct[Ke]+=ge,Ct[Ke]!=w)break;Ct[Ke--]=0,ge=1}for(ui=Ct.length;0===Ct[--ui];Ct.pop());}Vn.e>In?Vn.c=Vn.e=null:Vn.e=$t?o(lr,Tr):y(lr,Tr,"0"),Vn.s<0?"-"+lr:lr)}return Nr.clone=W,Nr.ROUND_UP=0,Nr.ROUND_DOWN=1,Nr.ROUND_CEIL=2,Nr.ROUND_FLOOR=3,Nr.ROUND_HALF_UP=4,Nr.ROUND_HALF_DOWN=5,Nr.ROUND_HALF_EVEN=6,Nr.ROUND_HALF_CEIL=7,Nr.ROUND_HALF_FLOOR=8,Nr.EUCLID=9,Nr.config=Nr.set=function(Vn){var lr,Tr;if(null!=Vn){if("object"!=typeof Vn)throw Error(m+"Object expected: "+Vn);if(Vn.hasOwnProperty(lr="DECIMAL_PLACES")&&(K(Tr=Vn[lr],0,V,lr),at=Tr),Vn.hasOwnProperty(lr="ROUNDING_MODE")&&(K(Tr=Vn[lr],0,8,lr),_t=Tr),Vn.hasOwnProperty(lr="EXPONENTIAL_AT")&&((Tr=Vn[lr])&&Tr.pop?(K(Tr[0],-V,0,lr),K(Tr[1],0,V,lr),xt=Tr[0],$t=Tr[1]):(K(Tr,-V,V,lr),xt=-($t=Tr<0?-Tr:Tr))),Vn.hasOwnProperty(lr="RANGE"))if((Tr=Vn[lr])&&Tr.pop)K(Tr[0],-V,-1,lr),K(Tr[1],1,V,lr),cn=Tr[0],In=Tr[1];else{if(K(Tr,-V,V,lr),!Tr)throw Error(m+lr+" cannot be zero: "+Tr);cn=-(In=Tr<0?-Tr:Tr)}if(Vn.hasOwnProperty(lr="CRYPTO")){if((Tr=Vn[lr])!==!!Tr)throw Error(m+lr+" not true or false: "+Tr);if(Tr){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Rn=!Tr,Error(m+"crypto unavailable");Rn=Tr}else Rn=Tr}if(Vn.hasOwnProperty(lr="MODULO_MODE")&&(K(Tr=Vn[lr],0,9,lr),hr=Tr),Vn.hasOwnProperty(lr="POW_PRECISION")&&(K(Tr=Vn[lr],0,V,lr),jr=Tr),Vn.hasOwnProperty(lr="FORMAT")){if("object"!=typeof(Tr=Vn[lr]))throw Error(m+lr+" not an object: "+Tr);ni=Tr}if(Vn.hasOwnProperty(lr="ALPHABET")){if("string"!=typeof(Tr=Vn[lr])||/^.$|[+-.\s]|(.).*\1/.test(Tr))throw Error(m+lr+" invalid: "+Tr);Fi=Tr}}return{DECIMAL_PLACES:at,ROUNDING_MODE:_t,EXPONENTIAL_AT:[xt,$t],RANGE:[cn,In],CRYPTO:Rn,MODULO_MODE:hr,POW_PRECISION:jr,FORMAT:ni,ALPHABET:Fi}},Nr.isBigNumber=function(Vn){if(!Vn||!0!==Vn._isBigNumber)return!1;if(!Nr.DEBUG)return!0;var lr,Tr,di=Vn.c,Kr=Vn.e,ui=Vn.s;e:if("[object Array]"=={}.toString.call(di)){if((1===ui||-1===ui)&&Kr>=-V&&Kr<=V&&Kr===u(Kr)){if(0===di[0]){if(0===Kr&&1===di.length)return!0;break e}if((lr=(Kr+1)%S)<1&&(lr+=S),String(di[0]).length==lr){for(lr=0;lr=w||Tr!==u(Tr))break e;if(0!==Tr)return!0}}}else if(null===di&&null===Kr&&(null===ui||1===ui||-1===ui))return!0;throw Error(m+"Invalid BigNumber: "+Vn)},Nr.maximum=Nr.max=function(){return Wo(arguments,We.lt)},Nr.minimum=Nr.min=function(){return Wo(arguments,We.gt)},Nr.random=(Vn=9007199254740992,lr=Math.random()*Vn&2097151?function(){return u(Math.random()*Vn)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(Tr){var di,Kr,ui,qe,ge,Ne=0,Ke=[],ot=new Nr(Xe);if(null==Tr?Tr=at:K(Tr,0,V),qe=h(Tr/S),Rn)if(crypto.getRandomValues){for(di=crypto.getRandomValues(new Uint32Array(qe*=2));Ne>>11))>=9e15?(Kr=crypto.getRandomValues(new Uint32Array(2)),di[Ne]=Kr[0],di[Ne+1]=Kr[1]):(Ke.push(ge%1e14),Ne+=2);Ne=qe/2}else{if(!crypto.randomBytes)throw Rn=!1,Error(m+"crypto unavailable");for(di=crypto.randomBytes(qe*=7);Ne=9e15?crypto.randomBytes(7).copy(di,Ne):(Ke.push(ge%1e14),Ne+=7);Ne=qe/7}if(!Rn)for(;Ne=10;ge/=10,Ne++);NeKr-1&&(null==ge[qe+1]&&(ge[qe+1]=0),ge[qe+1]+=ge[qe]/Kr|0,ge[qe]%=Kr)}return ge.reverse()}return function(Tr,di,Kr,ui,qe){var ge,Ne,Ke,ot,Ct,Vt,Ht,un,pn=Tr.indexOf("."),yn=at,Zn=_t;for(pn>=0&&(ot=jr,jr=0,Tr=Tr.replace(".",""),Vt=(un=new Nr(di)).pow(Tr.length-pn),jr=ot,un.c=lr(y(H(Vt.c),Vt.e,"0"),10,Kr,Vn),un.e=un.c.length),Ke=ot=(Ht=lr(Tr,di,Kr,qe?(ge=Fi,Vn):(ge=Vn,Fi))).length;0==Ht[--ot];Ht.pop());if(!Ht[0])return ge.charAt(0);if(pn<0?--Ke:(Vt.c=Ht,Vt.e=Ke,Vt.s=ui,Ht=(Vt=oe(Vt,un,yn,Zn,Kr)).c,Ct=Vt.r,Ke=Vt.e),pn=Ht[Ne=Ke+yn+1],ot=Kr/2,Ct=Ct||Ne<0||null!=Ht[Ne+1],Ct=Zn<4?(null!=pn||Ct)&&(0==Zn||Zn==(Vt.s<0?3:2)):pn>ot||pn==ot&&(4==Zn||Ct||6==Zn&&1&Ht[Ne-1]||Zn==(Vt.s<0?8:7)),Ne<1||!Ht[0])Tr=Ct?y(ge.charAt(1),-yn,ge.charAt(0)):ge.charAt(0);else{if(Ht.length=Ne,Ct)for(--Kr;++Ht[--Ne]>Kr;)Ht[Ne]=0,Ne||(++Ke,Ht=[1].concat(Ht));for(ot=Ht.length;!Ht[--ot];);for(pn=0,Tr="";pn<=ot;Tr+=ge.charAt(Ht[pn++]));Tr=y(Tr,Ke,ge.charAt(0))}return Tr}}(),oe=function(){function Vn(di,Kr,ui){var qe,ge,Ne,Ke,ot=0,Ct=di.length,Vt=Kr%L,Ht=Kr/L|0;for(di=di.slice();Ct--;)ot=((ge=Vt*(Ne=di[Ct]%L)+(qe=Ht*Ne+(Ke=di[Ct]/L|0)*Vt)%L*L+ot)/ui|0)+(qe/L|0)+Ht*Ke,di[Ct]=ge%ui;return ot&&(di=[ot].concat(di)),di}function lr(di,Kr,ui,qe){var ge,Ne;if(ui!=qe)Ne=ui>qe?1:-1;else for(ge=Ne=0;geKr[ge]?1:-1;break}return Ne}function Tr(di,Kr,ui,qe){for(var ge=0;ui--;)di[ui]-=ge,di[ui]=(ge=di[ui]1;di.splice(0,1));}return function(di,Kr,ui,qe,ge){var Ne,Ke,ot,Ct,Vt,Ht,un,pn,yn,Zn,fr,zr,ci,ai,li,bi,os,es=di.s==Kr.s?1:-1,Ds=di.c,ws=Kr.c;if(!(Ds&&Ds[0]&&ws&&ws[0]))return new Nr(di.s&&Kr.s&&(Ds?!ws||Ds[0]!=ws[0]:ws)?Ds&&0==Ds[0]||!ws?0*es:es/0:NaN);for(yn=(pn=new Nr(es)).c=[],es=ui+(Ke=di.e-Kr.e)+1,ge||(ge=w,Ke=G(di.e/S)-G(Kr.e/S),es=es/S|0),ot=0;ws[ot]==(Ds[ot]||0);ot++);if(ws[ot]>(Ds[ot]||0)&&Ke--,es<0)yn.push(1),Ct=!0;else{for(ai=Ds.length,bi=ws.length,ot=0,es+=2,(Vt=u(ge/(ws[0]+1)))>1&&(ws=Vn(ws,Vt,ge),Ds=Vn(Ds,Vt,ge),bi=ws.length,ai=Ds.length),ci=bi,fr=(Zn=Ds.slice(0,bi)).length;fr=ge/2&&li++;do{if(Vt=0,(Ne=lr(ws,Zn,bi,fr))<0){if(zr=Zn[0],bi!=fr&&(zr=zr*ge+(Zn[1]||0)),(Vt=u(zr/li))>1)for(Vt>=ge&&(Vt=ge-1),un=(Ht=Vn(ws,Vt,ge)).length,fr=Zn.length;1==lr(Ht,Zn,un,fr);)Vt--,Tr(Ht,bi=10;es/=10,ot++);Ha(pn,ui+(pn.e=ot+Ke*S-1)+1,qe,Ct)}else pn.e=Ke,pn.r=+Ct;return pn}}(),He=function(){var Vn=/^(-?)0([xbo])(?=\w[\w.]*$)/i,lr=/^([^.]+)\.$/,Tr=/^\.([^.]+)$/,di=/^-?(Infinity|NaN)$/,Kr=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(ui,qe,ge,Ne){var Ke,ot=ge?qe:qe.replace(Kr,"");if(di.test(ot))ui.s=isNaN(ot)?null:ot<0?-1:1;else{if(!ge&&(ot=ot.replace(Vn,function(Ct,Vt,Ht){return Ke="x"==(Ht=Ht.toLowerCase())?16:"b"==Ht?2:8,Ne&&Ne!=Ke?Ct:Vt}),Ne&&(Ke=Ne,ot=ot.replace(lr,"$1").replace(Tr,"0.$1")),qe!=ot))return new Nr(ot,Ke);if(Nr.DEBUG)throw Error(m+"Not a"+(Ne?" base "+Ne:"")+" number: "+qe);ui.s=null}ui.c=ui.e=null}}(),We.absoluteValue=We.abs=function(){var Vn=new Nr(this);return Vn.s<0&&(Vn.s=1),Vn},We.comparedTo=function(Vn,lr){return j(this,new Nr(Vn,lr))},We.decimalPlaces=We.dp=function(Vn,lr){var Tr,di,Kr;if(null!=Vn)return K(Vn,0,V),null==lr?lr=_t:K(lr,0,8),Ha(new Nr(this),Vn+this.e+1,lr);if(!(Tr=this.c))return null;if(di=((Kr=Tr.length-1)-G(this.e/S))*S,Kr=Tr[Kr])for(;Kr%10==0;Kr/=10,di--);return di<0&&(di=0),di},We.dividedBy=We.div=function(Vn,lr){return oe(this,new Nr(Vn,lr),at,_t)},We.dividedToIntegerBy=We.idiv=function(Vn,lr){return oe(this,new Nr(Vn,lr),0,1)},We.exponentiatedBy=We.pow=function(Vn,lr){var Tr,di,Kr,ui,ge,Ne,Ke,ot,Ct=this;if((Vn=new Nr(Vn)).c&&!Vn.isInteger())throw Error(m+"Exponent not an integer: "+Ba(Vn));if(null!=lr&&(lr=new Nr(lr)),ge=Vn.e>14,!Ct.c||!Ct.c[0]||1==Ct.c[0]&&!Ct.e&&1==Ct.c.length||!Vn.c||!Vn.c[0])return ot=new Nr(Math.pow(+Ba(Ct),ge?2-R(Vn):+Ba(Vn))),lr?ot.mod(lr):ot;if(Ne=Vn.s<0,lr){if(lr.c?!lr.c[0]:!lr.s)return new Nr(NaN);(di=!Ne&&Ct.isInteger()&&lr.isInteger())&&(Ct=Ct.mod(lr))}else{if(Vn.e>9&&(Ct.e>0||Ct.e<-1||(0==Ct.e?Ct.c[0]>1||ge&&Ct.c[1]>=24e7:Ct.c[0]<8e13||ge&&Ct.c[0]<=9999975e7)))return ui=Ct.s<0&&R(Vn)?-0:0,Ct.e>-1&&(ui=1/ui),new Nr(Ne?1/ui:ui);jr&&(ui=h(jr/S+2))}for(ge?(Tr=new Nr(.5),Ne&&(Vn.s=1),Ke=R(Vn)):Ke=(Kr=Math.abs(+Ba(Vn)))%2,ot=new Nr(Xe);;){if(Ke){if(!(ot=ot.times(Ct)).c)break;ui?ot.c.length>ui&&(ot.c.length=ui):di&&(ot=ot.mod(lr))}if(Kr){if(0===(Kr=u(Kr/2)))break;Ke=Kr%2}else if(Ha(Vn=Vn.times(Tr),Vn.e+1,1),Vn.e>14)Ke=R(Vn);else{if(0==(Kr=+Ba(Vn)))break;Ke=Kr%2}Ct=Ct.times(Ct),ui?Ct.c&&Ct.c.length>ui&&(Ct.c.length=ui):di&&(Ct=Ct.mod(lr))}return di?ot:(Ne&&(ot=Xe.div(ot)),lr?ot.mod(lr):ui?Ha(ot,jr,_t,void 0):ot)},We.integerValue=function(Vn){var lr=new Nr(this);return null==Vn?Vn=_t:K(Vn,0,8),Ha(lr,lr.e+1,Vn)},We.isEqualTo=We.eq=function(Vn,lr){return 0===j(this,new Nr(Vn,lr))},We.isFinite=function(){return!!this.c},We.isGreaterThan=We.gt=function(Vn,lr){return j(this,new Nr(Vn,lr))>0},We.isGreaterThanOrEqualTo=We.gte=function(Vn,lr){return 1===(lr=j(this,new Nr(Vn,lr)))||0===lr},We.isInteger=function(){return!!this.c&&G(this.e/S)>this.c.length-2},We.isLessThan=We.lt=function(Vn,lr){return j(this,new Nr(Vn,lr))<0},We.isLessThanOrEqualTo=We.lte=function(Vn,lr){return-1===(lr=j(this,new Nr(Vn,lr)))||0===lr},We.isNaN=function(){return!this.s},We.isNegative=function(){return this.s<0},We.isPositive=function(){return this.s>0},We.isZero=function(){return!!this.c&&0==this.c[0]},We.minus=function(Vn,lr){var Tr,di,Kr,ui,qe=this,ge=qe.s;if(lr=(Vn=new Nr(Vn,lr)).s,!ge||!lr)return new Nr(NaN);if(ge!=lr)return Vn.s=-lr,qe.plus(Vn);var Ne=qe.e/S,Ke=Vn.e/S,ot=qe.c,Ct=Vn.c;if(!Ne||!Ke){if(!ot||!Ct)return ot?(Vn.s=-lr,Vn):new Nr(Ct?qe:NaN);if(!ot[0]||!Ct[0])return Ct[0]?(Vn.s=-lr,Vn):new Nr(ot[0]?qe:3==_t?-0:0)}if(Ne=G(Ne),Ke=G(Ke),ot=ot.slice(),ge=Ne-Ke){for((ui=ge<0)?(ge=-ge,Kr=ot):(Ke=Ne,Kr=Ct),Kr.reverse(),lr=ge;lr--;Kr.push(0));Kr.reverse()}else for(di=(ui=(ge=ot.length)<(lr=Ct.length))?ge:lr,ge=lr=0;lr0)for(;lr--;ot[Tr++]=0);for(lr=w-1;di>ge;){if(ot[--di]=0;){for(Tr=0,Vt=zr[Kr]%yn,Ht=zr[Kr]/yn|0,ui=Kr+(qe=Ne);ui>Kr;)Tr=((Ke=Vt*(Ke=fr[--qe]%yn)+(ge=Ht*Ke+(ot=fr[qe]/yn|0)*Vt)%yn*yn+un[ui]+Tr)/pn|0)+(ge/yn|0)+Ht*ot,un[ui--]=Ke%pn;un[ui]=Tr}return Tr?++di:un.splice(0,1),Go(Vn,un,di)},We.negated=function(){var Vn=new Nr(this);return Vn.s=-Vn.s||null,Vn},We.plus=function(Vn,lr){var Tr,di=this,Kr=di.s;if(lr=(Vn=new Nr(Vn,lr)).s,!Kr||!lr)return new Nr(NaN);if(Kr!=lr)return Vn.s=-lr,di.minus(Vn);var ui=di.e/S,qe=Vn.e/S,ge=di.c,Ne=Vn.c;if(!ui||!qe){if(!ge||!Ne)return new Nr(Kr/0);if(!ge[0]||!Ne[0])return Ne[0]?Vn:new Nr(ge[0]?di:0*Kr)}if(ui=G(ui),qe=G(qe),ge=ge.slice(),Kr=ui-qe){for(Kr>0?(qe=ui,Tr=Ne):(Kr=-Kr,Tr=ge),Tr.reverse();Kr--;Tr.push(0));Tr.reverse()}for((Kr=ge.length)-(lr=Ne.length)<0&&(Tr=Ne,Ne=ge,ge=Tr,lr=Kr),Kr=0;lr;)Kr=(ge[--lr]=ge[lr]+Ne[lr]+Kr)/w|0,ge[lr]=w===ge[lr]?0:ge[lr]%w;return Kr&&(ge=[Kr].concat(ge),++qe),Go(Vn,ge,qe)},We.precision=We.sd=function(Vn,lr){var Tr,di,Kr;if(null!=Vn&&Vn!==!!Vn)return K(Vn,1,V),null==lr?lr=_t:K(lr,0,8),Ha(new Nr(this),Vn,lr);if(!(Tr=this.c))return null;if(di=(Kr=Tr.length-1)*S+1,Kr=Tr[Kr]){for(;Kr%10==0;Kr/=10,di--);for(Kr=Tr[0];Kr>=10;Kr/=10,di++);}return Vn&&this.e+1>di&&(di=this.e+1),di},We.shiftedBy=function(Vn){return K(Vn,-I,I),this.times("1e"+Vn)},We.squareRoot=We.sqrt=function(){var Vn,lr,Tr,di,Kr,ui=this,qe=ui.c,ge=ui.s,Ne=ui.e,Ke=at+4,ot=new Nr("0.5");if(1!==ge||!qe||!qe[0])return new Nr(!ge||ge<0&&(!qe||qe[0])?NaN:qe?ui:1/0);if(0==(ge=Math.sqrt(+Ba(ui)))||ge==1/0?(((lr=H(qe)).length+Ne)%2==0&&(lr+="0"),ge=Math.sqrt(+lr),Ne=G((Ne+1)/2)-(Ne<0||Ne%2),Tr=new Nr(lr=ge==1/0?"5e"+Ne:(lr=ge.toExponential()).slice(0,lr.indexOf("e")+1)+Ne)):Tr=new Nr(ge+""),Tr.c[0])for((ge=(Ne=Tr.e)+Ke)<3&&(ge=0);;)if(Tr=ot.times((Kr=Tr).plus(oe(ui,Kr,Ke,1))),H(Kr.c).slice(0,ge)===(lr=H(Tr.c)).slice(0,ge)){if(Tr.e0&&un>0){for(ot=Ht.substr(0,ui=un%ge||ge);ui0&&(ot+=Ke+Ht.slice(ui)),Vt&&(ot="-"+ot)}di=Ct?ot+(Tr.decimalSeparator||"")+((Ne=+Tr.fractionGroupSize)?Ct.replace(new RegExp("\\d{"+Ne+"}\\B","g"),"$&"+(Tr.fractionGroupSeparator||"")):Ct):ot}return(Tr.prefix||"")+di+(Tr.suffix||"")},We.toFraction=function(Vn){var lr,Tr,di,Kr,ui,qe,ge,Ne,Ke,ot,Ct,Vt,Ht=this,un=Ht.c;if(null!=Vn&&(!(ge=new Nr(Vn)).isInteger()&&(ge.c||1!==ge.s)||ge.lt(Xe)))throw Error(m+"Argument "+(ge.isInteger()?"out of range: ":"not an integer: ")+Ba(ge));if(!un)return new Nr(Ht);for(lr=new Nr(Xe),Ke=Tr=new Nr(Xe),di=Ne=new Nr(Xe),Vt=H(un),ui=lr.e=Vt.length-Ht.e-1,lr.c[0]=P[(qe=ui%S)<0?S+qe:qe],Vn=!Vn||ge.comparedTo(lr)>0?ui>0?lr:Ke:ge,qe=In,In=1/0,ge=new Nr(Vt),Ne.c[0]=0;ot=oe(ge,lr,0,1),1!=(Kr=Tr.plus(ot.times(di))).comparedTo(Vn);)Tr=di,di=Kr,Ke=Ne.plus(ot.times(Kr=Ke)),Ne=Kr,lr=ge.minus(ot.times(Kr=lr)),ge=Kr;return Kr=oe(Vn.minus(Tr),di,0,1),Ne=Ne.plus(Kr.times(Ke)),Tr=Tr.plus(Kr.times(di)),Ne.s=Ke.s=Ht.s,Ct=oe(Ke,di,ui*=2,_t).minus(Ht).abs().comparedTo(oe(Ne,Tr,ui,_t).minus(Ht).abs())<1?[Ke,di]:[Ne,Tr],In=qe,Ct},We.toNumber=function(){return+Ba(this)},We.toPrecision=function(Vn,lr){return null!=Vn&&K(Vn,1,V),Ci(this,Vn,lr,2)},We.toString=function(Vn){var lr,Tr=this,di=Tr.s,Kr=Tr.e;return null===Kr?di?(lr="Infinity",di<0&&(lr="-"+lr)):lr="NaN":(null==Vn?lr=Kr<=xt||Kr>=$t?o(H(Tr.c),Kr):y(H(Tr.c),Kr,"0"):10===Vn?lr=y(H((Tr=Ha(new Nr(Tr),at+Kr+1,_t)).c),Tr.e,"0"):(K(Vn,2,Fi.length,"Base"),lr=Pe(y(H(Tr.c),Kr,"0"),10,Vn,di,!0)),di<0&&Tr.c[0]&&(lr="-"+lr)),lr},We.valueOf=We.toJSON=function(){return Ba(this)},We._isBigNumber=!0,We[Symbol.toStringTag]="BigNumber",We[Symbol.for("nodejs.util.inspect.custom")]=We.valueOf,null!=Je&&Nr.set(Je),Nr}();M.config({EXPONENTIAL_AT:[-100,100],ROUNDING_MODE:1,DECIMAL_PLACES:18});const v=C(0),k=C(1),D=C("Infinity");function N(Je,oe){const Pe=new M(oe.toString()),He=new M(10).pow(Pe);return Je.times(He)}function C(Je){return new M(Je.toString())}const a=BigInt(0),B=BigInt(1),Q=BigInt("1000000000000000000"),ee=(Je,oe)=>{if(!Je)throw new Error(oe)};function ce(Je){const oe=BigInt(18)-Je;return Q*BigInt(10)**oe}class ae{static add(oe,Pe){const He=oe+Pe;return ee(Pe>=0&&He>=oe||Pe<0&&He=Pe?oe:Pe}static min(oe,Pe){return oe=this.MIN_NATURAL_EXPONENT&&oe<=this.MAX_NATURAL_EXPONENT,"Errors.INVALID_EXPONENT"),oe<0)return this.ONE_18*this.ONE_18/this.exp(BigInt(-1)*oe);let Pe;oe>=this.x0?(oe-=this.x0,Pe=this.a0):oe>=this.x1?(oe-=this.x1,Pe=this.a1):Pe=BigInt(1),oe*=BigInt(100);let He=this.ONE_20;oe>=this.x2&&(oe-=this.x2,He=He*this.a2/this.ONE_20),oe>=this.x3&&(oe-=this.x3,He=He*this.a3/this.ONE_20),oe>=this.x4&&(oe-=this.x4,He=He*this.a4/this.ONE_20),oe>=this.x5&&(oe-=this.x5,He=He*this.a5/this.ONE_20),oe>=this.x6&&(oe-=this.x6,He=He*this.a6/this.ONE_20),oe>=this.x7&&(oe-=this.x7,He=He*this.a7/this.ONE_20),oe>=this.x8&&(oe-=this.x8,He=He*this.a8/this.ONE_20),oe>=this.x9&&(oe-=this.x9,He=He*this.a9/this.ONE_20);let Xe,We=this.ONE_20;return Xe=oe,We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(2),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(3),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(4),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(5),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(6),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(7),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(8),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(9),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(10),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(11),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(12),We+=Xe,He*We/this.ONE_20*Pe/BigInt(100)}static _ln_36(oe){const Pe=((oe*=this.ONE_18)-this.ONE_36)*this.ONE_36/(oe+this.ONE_36),He=Pe*Pe/this.ONE_36;let We=Pe,Xe=We;return We=We*He/this.ONE_36,Xe+=We/BigInt(3),We=We*He/this.ONE_36,Xe+=We/BigInt(5),We=We*He/this.ONE_36,Xe+=We/BigInt(7),We=We*He/this.ONE_36,Xe+=We/BigInt(9),We=We*He/this.ONE_36,Xe+=We/BigInt(11),We=We*He/this.ONE_36,Xe+=We/BigInt(13),We=We*He/this.ONE_36,Xe+=We/BigInt(15),Xe*BigInt(2)}static _ln(oe){if(oe=this.a0*this.ONE_18&&(oe/=this.a0,Pe+=this.x0),oe>=this.a1*this.ONE_18&&(oe/=this.a1,Pe+=this.x1),Pe*=BigInt(100),(oe*=BigInt(100))>=this.a2&&(oe=oe*this.ONE_20/this.a2,Pe+=this.x2),oe>=this.a3&&(oe=oe*this.ONE_20/this.a3,Pe+=this.x3),oe>=this.a4&&(oe=oe*this.ONE_20/this.a4,Pe+=this.x4),oe>=this.a5&&(oe=oe*this.ONE_20/this.a5,Pe+=this.x5),oe>=this.a6&&(oe=oe*this.ONE_20/this.a6,Pe+=this.x6),oe>=this.a7&&(oe=oe*this.ONE_20/this.a7,Pe+=this.x7),oe>=this.a8&&(oe=oe*this.ONE_20/this.a8,Pe+=this.x8),oe>=this.a9&&(oe=oe*this.ONE_20/this.a9,Pe+=this.x9),oe>=this.a10&&(oe=oe*this.ONE_20/this.a10,Pe+=this.x10),oe>=this.a11&&(oe=oe*this.ONE_20/this.a11,Pe+=this.x11);const He=(oe-this.ONE_20)*this.ONE_20/(oe+this.ONE_20),We=He*He/this.ONE_20;let Xe=He,at=Xe;return Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(3),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(5),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(7),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(9),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(11),at*=BigInt(2),(Pe+at)/BigInt(100)}}Te.ONE_18=BigInt("1000000000000000000"),Te.ONE_20=BigInt("100000000000000000000"),Te.ONE_36=BigInt("1000000000000000000000000000000000000"),Te.MAX_NATURAL_EXPONENT=BigInt("130000000000000000000"),Te.MIN_NATURAL_EXPONENT=BigInt("-41000000000000000000"),Te.LN_36_LOWER_BOUND=BigInt(Te.ONE_18)-BigInt("100000000000000000"),Te.LN_36_UPPER_BOUND=BigInt(Te.ONE_18)+BigInt("100000000000000000"),Te.MILD_EXPONENT_BOUND=BigInt(2)**BigInt(254)/Te.ONE_20,Te.x0=BigInt("128000000000000000000"),Te.a0=BigInt("38877084059945950922200000000000000000000000000000000000"),Te.x1=BigInt("64000000000000000000"),Te.a1=BigInt("6235149080811616882910000000"),Te.x2=BigInt("3200000000000000000000"),Te.a2=BigInt("7896296018268069516100000000000000"),Te.x3=BigInt("1600000000000000000000"),Te.a3=BigInt("888611052050787263676000000"),Te.x4=BigInt("800000000000000000000"),Te.a4=BigInt("298095798704172827474000"),Te.x5=BigInt("400000000000000000000"),Te.a5=BigInt("5459815003314423907810"),Te.x6=BigInt("200000000000000000000"),Te.a6=BigInt("738905609893065022723"),Te.x7=BigInt("100000000000000000000"),Te.a7=BigInt("271828182845904523536"),Te.x8=BigInt("50000000000000000000"),Te.a8=BigInt("164872127070012814685"),Te.x9=BigInt("25000000000000000000"),Te.a9=BigInt("128402541668774148407"),Te.x10=BigInt("12500000000000000000"),Te.a10=BigInt("113314845306682631683"),Te.x11=BigInt("6250000000000000000"),Te.a11=BigInt("106449445891785942956");const le=(Je,oe)=>(0,E.getAddress)(Je)===(0,E.getAddress)(oe);function X(Je,oe=0){const[Pe,He]=Je.split(".");if(!He)return(0,z.Ox)(Je,oe);const We=Pe+"."+He.slice(0,oe);return(0,z.Ox)(We,oe)}const ne=Je=>(0,z.Ox)(Je.balance,18).mul((0,z.Ox)(Je.priceRate??"1",18)).div(d.Ce).toBigInt(),pe=(Je,oe)=>{const Pe=ce(BigInt(oe.decimals));return O.O$.from(function(Je,oe){return ae.mulDownFixed(Je,oe)}(Je,Pe).toString()).mul((0,z.Ox)(oe.priceRate??"1",18)).div(d.Ce).toBigInt()},_e=(Je,oe)=>function(Je,oe){return ae.divDownFixed(Je,oe)}(Je*Q/BigInt((0,z.Ox)(oe.priceRate??"1",18).toString()),ce(BigInt(oe.decimals)));var xe=(()=>{return(Je=xe||(xe={}))[Je.SwapExactIn=0]="SwapExactIn",Je[Je.SwapExactOut=1]="SwapExactOut",xe;var Je})(),Ce=(()=>{return(Je=Ce||(Ce={}))[Je.Weighted=0]="Weighted",Je[Je.Stable=1]="Stable",Je[Je.Element=2]="Element",Je[Je.MetaStable=3]="MetaStable",Je[Je.Linear=4]="Linear",Je[Je.Gyro2=5]="Gyro2",Je[Je.Gyro3=6]="Gyro3",Je[Je.GyroE=7]="GyroE",Je[Je.Fx=8]="Fx",Ce;var Je})(),ke=(()=>{return(Je=ke||(ke={})).All="All",Je.Weighted="Weighted",Je.Stable="Stable",Je.MetaStable="MetaStable",Je.LiquidityBootstrapping="LiquidityBootstrapping",Je.Investment="Investment",Je.Element="Element",Je.StablePhantom="StablePhantom",Je.ComposableStable="ComposableStable",Je.Gyro2="Gyro2",Je.Gyro3="Gyro3",Je.GyroE="GyroE",Je.AaveLinear="AaveLinear",Je.Linear="Linear",Je.EulerLinear="EulerLinear",Je.ERC4626Linear="ERC4626Linear",Je.BeefyLinear="BeefyLinear",Je.GearboxLinear="GearboxLinear",Je.MidasLinear="MidasLinear",Je.ReaperLinear="ReaperLinear",Je.SiloLinear="SiloLinear",Je.TetuLinear="TetuLinear",Je.YearnLinear="YearnLinear",Je.FX="FX",ke;var Je})();const me=BigInt("3000000000000000000");function Ee(Je,oe,Pe,He,We,Xe){We=function(Je,oe){return Je-ae.mulUpFixed(Je,oe)}(We,Xe);const at=ae.divDownFixed(oe,He),_t=ae.add(Je,We),xt=ae.divUpFixed(Je,_t),$t=ae.powUpFixed(xt,at);return ae.mulDownFixed(Pe,ae.complementFixed($t))}function ze(Je,oe,Pe,He,We,Xe){const at=ae.divUpFixed(Pe,Pe-We),_t=ae.divUpFixed(He,oe),xt=ae.powUpFixed(at,_t),$t=ae.sub(xt,ae.ONE);return function(Je,oe){return ae.divUpFixed(Je,ae.complementFixed(oe))}(ae.mulUpFixed(Je,$t),Xe)}function ht(Je,oe,Pe,He,We){const Xe=new Array(Pe.length);let at=a;for(let xt=0;xtat){const In=ae.mulDownFixed(Je[xt],ae.sub(at,ae.ONE)),Rn=ae.sub(Pe[xt],In),hr=ae.mulUpFixed(Rn,We);$t=ae.add(In,ae.sub(Rn,hr))}else $t=Pe[xt];const cn=ae.divDownFixed(ae.add(Je[xt],$t),Je[xt]);_t=ae.mulDownFixed(_t,ae.powDown(cn,oe[xt]))}return _t>ae.ONE?ae.mulDownFixed(He,ae.sub(_t,ae.ONE)):a}function wt(Je,oe,Pe){const He=ae.divDownFixed(oe,Pe),We=new Array(Je.length);for(let Xe=0;XeHe[_t]){const cn=ae.mulDownFixed(Je[_t],ae.complementFixed(We)),In=ae.sub(Pe[_t],cn),Rn=ae.divUpFixed(In,ae.complementFixed(Xe));xt=ae.add(cn,Rn)}else xt=Pe[_t];const $t=ae.divDownFixed(ae.sub(Je[_t],xt),Je[_t]);at=ae.mulDownFixed(at,ae.powDown($t,oe[_t]))}return at}(Je,oe,Pe,Xe,at,We);return ae.mulUpFixed(He,ae.complementFixed(_t))}const Ye=(Je,oe,Pe,He,We)=>{const Xe=ae.divUpFixed(ae.add(He,Pe),He);if(Xe>me)throw new Error("MAX_OUT_BPT_FOR_TOKEN_IN");const at=ae.powUpFixed(Xe,ae.divUpFixed(ae.ONE,oe)),_t=ae.mulUpFixed(Je,ae.sub(at,ae.ONE)),xt=ae.complementFixed(oe),$t=ae.mulUpFixed(_t,xt),cn=ae.sub(_t,$t);return ae.add(cn,ae.divUpFixed($t,ae.complementFixed(We)))};function dn(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightIn,18)),Xe=parseFloat((0,z.S5)(oe.weightOut,18)),at=Je.toNumber(),_t=parseFloat((0,z.S5)(oe.swapFee,18));return C(-Pe*Xe/(He*(-1+_t)*(Pe/(at+Pe-at*_t))**((We+Xe)/Xe)*We))}function Nt(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightIn,18)),Xe=parseFloat((0,z.S5)(oe.weightOut,18));return C(-Pe*(He/(-Je.toNumber()+He))**((We+Xe)/We)*Xe/(He*(-1+parseFloat((0,z.S5)(oe.swapFee,18)))*We))}function It(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightIn,18)),Xe=Je.toNumber(),at=parseFloat((0,z.S5)(oe.swapFee,18));return C(Pe*((Xe+Pe+Xe*at*(-1+We))/Pe)**(1-We)/(He*(1+at*(-1+We))*We))}function jt(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightOut,18));return C((1-Je.toNumber()/Pe)**((-1+We)/We)*Pe*(1+parseFloat((0,z.S5)(oe.swapFee))*(-1+We))*We/He)}function Yt(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,18)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightOut,18)),Xe=Je.toNumber(),at=parseFloat((0,z.S5)(oe.swapFee,18));return C(Pe*(1+at*(-1+We))*We*(1+Xe*(-1+at-at*We)/He)**(-1+We)/He)}function Wn(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,18)),We=parseFloat((0,z.S5)(oe.weightIn,18)),Xe=Je.toNumber();return C(((Xe+He)/He)**(1/We)*Pe/((Xe+He)*(1+parseFloat((0,z.S5)(oe.swapFee,18))*(-1+We))*We))}function fn(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightIn,18)),Xe=parseFloat((0,z.S5)(oe.weightOut,18)),at=Je.toNumber();return C((We+Xe)/(He*(Pe/(at+Pe-at*parseFloat((0,z.S5)(oe.swapFee,18))))**(We/Xe)*We))}function $n(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightIn,18)),Xe=parseFloat((0,z.S5)(oe.weightOut,18)),at=Je.toNumber();return C(-Pe*(He/(-at+He))**(Xe/We)*Xe*(We+Xe)/((at-He)**2*(-1+parseFloat((0,z.S5)(oe.swapFee,18)))*We**2))}function Yr(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,z.S5)(oe.balanceOut,18)),We=parseFloat((0,z.S5)(oe.weightIn,18)),Xe=Je.toNumber();return C(-(-1+We)/(He*((Xe+Pe+Xe*parseFloat((0,z.S5)(oe.swapFee,18))*(-1+We))/Pe)**We*We))}function Bn(Je,oe){const Pe=parseFloat((0,z.S5)(oe.balanceIn,18)),He=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,z.S5)(oe.weightOut,18)),Xe=Je.toNumber();return C(-(1+parseFloat((0,z.S5)(oe.swapFee,18))*(-1+We))*(-1+We)/((1-Xe/Pe)**(1/We)*He))}var Gn=Object.freeze({__proto__:null,_calcOutGivenIn:Ee,_calcInGivenOut:ze,_spotPriceAfterSwapExactTokenInForTokenOutBigInt:function(Je,oe,Pe,He,We,Xe){const at=ae.mulUpFixed(Je,He);let _t=ae.mulUpFixed(Pe,oe);const xt=ae.complementFixed(Xe);_t=ae.mulUpFixed(_t,xt);const $t=ae.divUpFixed(Je,ae.add(ae.mulUpFixed(We,xt),Je)),cn=ae.divUpFixed(oe+He,He);return _t=ae.mulUpFixed(_t,ae.powUpFixed($t,cn)),ae.divUpFixed(at,_t)},_spotPriceAfterSwapTokenInForExactTokenOutBigInt:function(Je,oe,Pe,He,We,Xe){let at=ae.mulUpFixed(Je,He);const _t=ae.complementFixed(Xe),xt=ae.divUpFixed(Pe,ae.sub(Pe,We)),$t=ae.divUpFixed(oe+He,oe);at=ae.mulUpFixed(at,ae.powUpFixed(xt,$t));const cn=ae.mulUpFixed(ae.mulUpFixed(Pe,oe),_t);return ae.divUpFixed(at,cn)},_calcBptOutGivenExactTokensIn:ht,_calcTokensOutGivenExactBptIn:wt,_calcTokenOutGivenExactBptIn:Pt,_calcBptInGivenExactTokensOut:st,_calcTokenInGivenExactBptOut:Ye,_calculateInvariant:function(Je,oe){let Pe=ae.ONE;for(let He=0;He{return(Je=Lr||(Lr={}))[Je.BptToToken=0]="BptToToken",Je[Je.TokenToBpt=1]="TokenToBpt",Je[Je.TokenToToken=2]="TokenToToken",Lr;var Je})();class Kn{constructor(oe,Pe,He,We,Xe,at,_t){this.poolType=Ce.Weighted,this.MAX_IN_RATIO=(0,z.Ox)("0.3",18),this.MAX_OUT_RATIO=(0,z.Ox)("0.3",18),this.isLBP=!1,this.id=oe,this.address=Pe,this.swapFee=(0,z.Ox)(He,18),this.totalShares=(0,z.Ox)(Xe,18),this.tokens=at,this.tokensList=_t,this.totalWeight=(0,z.Ox)(We,18)}static fromPool(oe,Pe){if(!oe.totalWeight)throw new Error("WeightedPool missing totalWeight");const He=new Kn(oe.id,oe.address,oe.swapFee,oe.totalWeight,oe.totalShares,oe.tokens,oe.tokensList);return Pe&&(He.isLBP=!0),He}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=(0,z.Ox)(We.weight,18).mul(d.Ce).div(this.totalWeight),xt=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(Pe));if(xt<0)throw"Pool does not contain tokenOut";const $t=this.tokens[xt],cn=$t.balance,In=$t.decimals,Rn=(0,z.Ox)($t.weight,18).mul(d.Ce).div(this.totalWeight);let hr;return hr=oe==this.address?Lr.BptToToken:Pe==this.address?Lr.TokenToBpt:Lr.TokenToToken,{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(In),balanceIn:(0,z.Ox)(Xe,at),balanceOut:(0,z.Ox)(cn,In),pairType:hr,weightIn:_t,weightOut:Rn,swapFee:this.swapFee}}getNormalizedWeights(){return this.tokens.map(oe=>(0,z.Ox)(oe.weight,18).mul(d.Ce).div(this.totalWeight).toBigInt())}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){return C(Pe===xe.SwapExactIn?(0,z.S5)(oe.balanceIn.mul(this.MAX_IN_RATIO).div(d.Ce),oe.decimalsIn):(0,z.S5)(oe.balanceOut.mul(this.MAX_OUT_RATIO).div(d.Ce),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){le(this.address,oe)&&this.updateTotalShares(Pe);const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,z.S5)(Pe,He.decimals)}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){if(Pe.isNaN())return Pe;const He=(0,z.Ox)(Pe.dp(18,1).toString(),18).toBigInt(),We=oe.decimalsIn,Xe=oe.decimalsOut,at=(0,z.Ox)(oe.balanceIn.toString(),18-We).toBigInt(),_t=(0,z.Ox)(oe.balanceOut.toString(),18-Xe).toBigInt(),xt=oe.weightIn.toBigInt(),$t=oe.weightOut.toBigInt(),cn=oe.swapFee.toBigInt();let In;try{return In=oe.pairType===Lr.TokenToBpt?ht([at,BigInt(1)],[xt,ae.ONE-xt],[He,BigInt(0)],_t,cn):oe.pairType===Lr.BptToToken?Pt(_t,$t,He,at,cn):Ee(at,xt,_t,$t,He,cn),N(C(In.toString()),-18)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){if(Pe.isNaN())return Pe;const He=(0,z.Ox)(Pe.dp(18,1).toString(),18).toBigInt(),We=oe.decimalsIn,Xe=oe.decimalsOut,at=(0,z.Ox)(oe.balanceIn.toString(),18-We).toBigInt(),_t=(0,z.Ox)(oe.balanceOut.toString(),18-Xe).toBigInt(),xt=oe.weightIn.toBigInt(),$t=oe.weightOut.toBigInt(),cn=oe.swapFee.toBigInt();let In;try{return In=oe.pairType===Lr.TokenToBpt?Ye(at,xt,He,_t,cn):oe.pairType===Lr.BptToToken?st([_t,BigInt(1)],[$t,ae.ONE-$t],[He,BigInt(0)],at,cn):ze(at,xt,_t,$t,He,cn),N(C(In.toString()),-18)}catch{return v}}_calcTokensOutGivenExactBptIn(oe){const Pe=this.tokens.filter(He=>!le(He.address,this.address)).map(He=>ne(He));try{return wt(Pe,oe.toBigInt(),this.totalShares.toBigInt()).map((Xe,at)=>_e(Xe,this.tokens[at])).map(Xe=>O.O$.from(Xe))}catch{return new Array(Pe.length).fill(v)}}_calcBptOutGivenExactTokensIn(oe){try{const Pe=new Array(oe.length).fill(BigInt(0)),He=new Array(oe.length).fill(BigInt(0));this.tokens.filter(Xe=>!le(Xe.address,this.address)).forEach((Xe,at)=>{Pe[at]=pe(BigInt(oe[at].toString()),Xe),He[at]=ne(Xe)});const We=ht(He,this.getNormalizedWeights(),Pe,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(We.toString())}catch{return d._Y}}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.pairType===Lr.TokenToBpt?It(Pe,oe):oe.pairType===Lr.BptToToken?jt(Pe,oe):dn(Pe,oe)}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return oe.pairType===Lr.TokenToBpt?Wn(Pe,oe):oe.pairType===Lr.BptToToken?Yt(Pe,oe):Nt(Pe,oe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.pairType===Lr.TokenToBpt?Yr(Pe,oe):oe.pairType===Lr.BptToToken?Bn(Pe,oe):fn(Pe,oe)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return $n(Pe,oe)}}function sr(Je,oe){let Pe=v;const He=oe.length;for(let xt=0;xtWe){if(Xe-We<=1)return Xe}else if(We-Xe<=1)return Xe}throw new Error("Errors.STABLE_INVARIANT_DIDNT_CONVERGE")}function $i(Je,oe,Pe,He,We,Xe){We=function(Je,oe){return Je-ae.mulUpFixed(Je,oe)}(We,Xe);const at=cs(Je,oe);oe[Pe]=oe[Pe]+We;const xt=so(Je,oe,at,He);return oe[He]-xt-BigInt(1)}function rs(Je,oe,Pe,He,We,Xe){const at=cs(Je,oe);oe[He]=ae.sub(oe[He],We);const _t=so(Je,oe,at,Pe);let xt=ae.add(ae.sub(_t,oe[Pe]),BigInt(1));return xt=function(Je,oe){return ae.divUpFixed(Je,ae.complementFixed(oe))}(xt,Xe),xt}function Xi(Je,oe,Pe,He,We){let Xe=BigInt(0);for(let Rn=0;Rn_t){const jr=ae.mulDownFixed(oe[Rn],_t-ae.ONE);hr=jr+ae.mulDownFixed(Pe[Rn]-jr,ae.ONE-We)}else hr=Pe[Rn];xt[Rn]=oe[Rn]+hr}const $t=cs(Je,oe),cn=cs(Je,xt),In=ae.divDownFixed(cn,$t);return In>ae.ONE?ae.mulDownFixed(He,In-ae.ONE):BigInt(0)}function $s(Je,oe,Pe,He,We,Xe){const at=cs(Je,oe),xt=so(Je,oe,ae.mulUpFixed(ae.divUpFixed(ae.add(We,He),We),at),Pe),$t=ae.sub(xt,oe[Pe]);let cn=BigInt(0);for(let ni=0;niat[Rn]){const jr=ae.mulDownFixed(oe[Rn],ae.complementFixed(_t));hr=jr+ae.divUpFixed(Pe[Rn]-jr,ae.ONE-We)}else hr=Pe[Rn];xt[Rn]=oe[Rn]-hr}const $t=cs(Je,oe),cn=cs(Je,xt),In=ae.divDownFixed(cn,$t);return ae.mulUpFixed(He,ae.complementFixed(In))}function go(Je,oe,Pe,He,We,Xe){const at=cs(Je,oe),xt=so(Je,oe,ae.mulUpFixed(ae.divUpFixed(We-He,We),at),Pe),$t=oe[Pe]-xt;let cn=BigInt(0);for(let ni=0;nicn){if(In-cn<=1)return In}else if(cn-In<=1)return In;throw new Error("Errors.STABLE_GET_BALANCE_DIDNT_CONVERGE")}function Oi(Je,oe,Pe,He,We,Xe){const at=oe.length,_t=cs(Je,oe);let xt=BigInt(0);for(let Nr=0;Nr$t==Pe?We:BigInt(0));let _t=Lu(Je,oe,He+Xi(Je,oe,Xe,He,BigInt(0)),Pe);return _t=ae.divUpFixed(ae.ONE,_t),_t},_spotPriceAfterSwapTokenInForExactBPTOut:function(Je,oe,Pe,He,We){const at=$s(Je,[...oe],Pe,We,He,BigInt(0));oe[Pe]=oe[Pe]+at;let _t=Lu(Je,oe,He+We,Pe);return _t=ae.divUpFixed(ae.ONE,_t),_t},_spotPriceAfterSwapExactBPTInForTokenOut:function(Je,oe,Pe,He,We){const Xe=go(Je,oe,Pe,We,He,BigInt(0));return oe[Pe]=oe[Pe]-Xe,Lu(Je,oe,ae.sub(He,We),Pe)},_spotPriceAfterSwapBPTInForExactTokenOut:function(Je,oe,Pe,He,We){oe[Pe]=ae.sub(oe[Pe],We);const Xe=oe.map((xt,$t)=>$t==Pe?We:BigInt(0));return Lu(Je,oe,He-is(Je,oe,Xe,He,BigInt(0)),Pe)},_poolDerivatives:Oi,_poolDerivativesBPT:Lu});let ja=(()=>{class Je{constructor(Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.Stable,this.MAX_IN_RATIO=(0,z.Ox)("0.3",18),this.MAX_OUT_RATIO=(0,z.Ox)("0.3",18),this.id=Pe,this.address=He,this.amp=(0,z.Ox)(We,Je.AMP_DECIMALS),this.swapFee=(0,z.Ox)(Xe,18),this.totalShares=(0,z.Ox)(at,18),this.tokens=_t,this.tokensList=xt}static fromPool(Pe){if(!Pe.amp)throw new Error("StablePool missing amp factor");return new Je(Pe.id,Pe.address,Pe.amp,Pe.swapFee,Pe.totalShares,Pe.tokens,Pe.tokensList)}parsePoolPairData(Pe,He){const We=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(Pe));if(We<0)throw"Pool does not contain tokenIn";const Xe=this.tokens[We],at=Xe.balance,_t=Xe.decimals,xt=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(He));if(xt<0)throw"Pool does not contain tokenOut";const $t=this.tokens[xt],cn=$t.balance,In=$t.decimals,Rn=this.tokens.map(({balance:ni})=>C(ni)),hr=this.tokens.map(({balance:ni})=>(0,z.Ox)(ni,18));return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:Pe,tokenOut:He,balanceIn:(0,z.Ox)(at,_t),balanceOut:(0,z.Ox)(cn,In),swapFee:this.swapFee,allBalances:Rn,allBalancesScaled:hr,amp:this.amp,tokenIndexIn:We,tokenIndexOut:xt,decimalsIn:Number(_t),decimalsOut:Number(In)}}getNormalizedLiquidity(Pe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,v))}getLimitAmountSwap(Pe,He){return C(He===xe.SwapExactIn?(0,z.S5)(Pe.balanceIn.mul(this.MAX_IN_RATIO).div(d.Ce),Pe.decimalsIn):(0,z.S5)(Pe.balanceOut.mul(this.MAX_OUT_RATIO).div(d.Ce),Pe.decimalsOut))}updateTokenBalanceForPool(Pe,He){if(le(this.address,Pe))this.updateTotalShares(He);else{const We=this.tokens.find(Xe=>le(Xe.address,Pe));if(!We)throw Error("Pool does not contain this token");We.balance=(0,z.S5)(He,We.decimals)}}updateTotalShares(Pe){this.totalShares=Pe}_exactTokenInForTokenOut(Pe,He){try{if(He.isZero())return v;const Xe=this.subtractSwapFeeAmount((0,z.Ox)(He.dp(Pe.decimalsIn).toString(),Pe.decimalsIn),Pe.swapFee).mul(10**(18-Pe.decimalsIn));return N(C($i(this.amp.toBigInt(),Pe.allBalancesScaled.map(_t=>_t.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,Xe.toBigInt(),BigInt(0)).toString()),-18).dp(Pe.decimalsOut,1)}catch{return v}}_tokenInForExactTokenOut(Pe,He){try{if(He.isZero())return v;const We=(0,z.Ox)(He.dp(18).toString(),18);let Xe=rs(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,We.toBigInt(),BigInt(0));const at=BigInt(10**(18-Pe.decimalsIn));return Xe=(Xe+at-BigInt(1))/at,C(this.addSwapFeeAmount(O.O$.from(Xe),Pe.swapFee).toString()).div(10**Pe.decimalsIn)}catch(We){return console.error(`_evminGivenOut: ${We.message}`),v}}_calcTokensOutGivenExactBptIn(Pe){const He=this.tokens.filter(We=>!le(We.address,this.address)).map(We=>ne(We));try{return ji(He,Pe.toBigInt(),this.totalShares.toBigInt()).map((at,_t)=>_e(at,this.tokens[_t])).map(at=>O.O$.from(at))}catch{return new Array(He.length).fill(v)}}_calcBptOutGivenExactTokensIn(Pe){try{const He=new Array(Pe.length).fill(BigInt(0)),We=new Array(Pe.length).fill(BigInt(0));this.tokens.filter(at=>!le(at.address,this.address)).forEach((at,_t)=>{He[_t]=pe(BigInt(Pe[_t].toString()),at),We[_t]=ne(at)});const Xe=Xi(this.amp.toBigInt(),We,He,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(Xe.toString())}catch{return d._Y}}_spotPriceAfterSwapExactTokenInForTokenOut(Pe,He){return Tn(He,Pe)}_spotPriceAfterSwapTokenInForExactTokenOut(Pe,He){return Qn(He,Pe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,He){return Vi(He,Pe)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(Pe,He){return ar(He,Pe)}subtractSwapFeeAmount(Pe,He){const We=Pe.mul(He).add(d.Ce.sub(1)).div(d.Ce);return Pe.sub(We)}addSwapFeeAmount(Pe,He){const We=d.Ce.sub(He);return Pe.mul(d.Ce).add(We.sub(1)).div(We)}}return Je.AMP_DECIMALS=3,Je})(),xa=(()=>{class Je{constructor(Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.MetaStable,this.MAX_IN_RATIO=(0,z.Ox)("0.3",18),this.MAX_OUT_RATIO=(0,z.Ox)("0.3",18),this.id=Pe,this.address=He,this.amp=(0,z.Ox)(We,Je.AMP_DECIMALS),this.swapFee=(0,z.Ox)(Xe,18),this.totalShares=(0,z.Ox)(at,18),this.tokens=_t,this.tokensList=xt}static fromPool(Pe){if(!Pe.amp)throw new Error("MetaStablePool missing amp factor");return new Je(Pe.id,Pe.address,Pe.amp,Pe.swapFee,Pe.totalShares,Pe.tokens,Pe.tokensList)}parsePoolPairData(Pe,He){const We=this.tokens.findIndex(Nr=>(0,E.getAddress)(Nr.address)===(0,E.getAddress)(Pe));if(We<0)throw"Pool does not contain tokenIn";const Xe=this.tokens[We],at=Xe.decimals,_t=(0,z.Ox)(Xe.priceRate,18),xt=(0,z.S5)((0,z.Ox)(Xe.balance,at).mul(_t).div(d.Ce),at),$t=this.tokens.findIndex(Nr=>(0,E.getAddress)(Nr.address)===(0,E.getAddress)(He));if($t<0)throw"Pool does not contain tokenOut";const cn=this.tokens[$t],In=cn.decimals,Rn=(0,z.Ox)(cn.priceRate,18),hr=(0,z.S5)((0,z.Ox)(cn.balance,In).mul(Rn).div(d.Ce),In),jr=this.tokens.map(({balance:Nr,priceRate:Ci})=>C(Nr).times(C(Ci))),ni=this.tokens.map(({balance:Nr,priceRate:Ci})=>(0,z.Ox)(Nr,18).mul((0,z.Ox)(Ci,18)).div(d.Ce));return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:Pe,tokenOut:He,balanceIn:(0,z.Ox)(xt,at),balanceOut:(0,z.Ox)(hr,In),swapFee:this.swapFee,allBalances:jr,allBalancesScaled:ni,amp:this.amp,tokenIndexIn:We,tokenIndexOut:$t,decimalsIn:Number(at),decimalsOut:Number(In),tokenInPriceRate:_t,tokenOutPriceRate:Rn}}getNormalizedLiquidity(Pe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,v))}getLimitAmountSwap(Pe,He){return C(He===xe.SwapExactIn?(0,z.S5)(Pe.balanceIn.mul(this.MAX_IN_RATIO).div(Pe.tokenInPriceRate),Pe.decimalsIn):(0,z.S5)(Pe.balanceOut.mul(this.MAX_OUT_RATIO).div(Pe.tokenOutPriceRate),Pe.decimalsOut))}updateTokenBalanceForPool(Pe,He){if(le(this.address,Pe))this.updateTotalShares(He);else{const We=this.tokens.find(Xe=>le(Xe.address,Pe));if(!We)throw Error("Pool does not contain this token");We.balance=(0,z.S5)(He,We.decimals)}}updateTotalShares(Pe){this.totalShares=Pe}_exactTokenInForTokenOut(Pe,He){try{if(He.isZero())return v;const Xe=this.subtractSwapFeeAmount((0,z.Ox)(He.dp(Pe.decimalsIn).toString(),Pe.decimalsIn),Pe.swapFee).mul(Pe.tokenInPriceRate).div(d.Ce),at=$i(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,Xe.toBigInt(),BigInt(0)),_t=O.O$.from(at).mul(d.Ce).div(Pe.tokenOutPriceRate);return C((0,z.S5)(_t,18))}catch{return v}}_tokenInForExactTokenOut(Pe,He){try{if(He.isZero())return v;const We=Pe.decimalsIn,Xe=Pe.decimalsOut,at=Pe.tokenInPriceRate.toBigInt()*BigInt(10**(18-We)),_t=Pe.tokenOutPriceRate.toBigInt()*BigInt(10**(18-Xe)),$t=BigInt(He.times(10**Xe).dp(0).toString())*_t/BigInt(10**18),In=rs(this.amp.toBigInt(),Pe.allBalancesScaled.map(hr=>hr.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,$t,BigInt(0))*BigInt(10**18)/at;return C(this.addSwapFeeAmount(O.O$.from(In),Pe.swapFee).toString()).div(10**Pe.decimalsIn)}catch(We){return console.error(`_evminGivenOut: ${We.message}`),v}}_calcTokensOutGivenExactBptIn(Pe){const He=this.tokens.filter(We=>!le(We.address,this.address)).map(We=>ne(We));try{return ji(He,Pe.toBigInt(),this.totalShares.toBigInt()).map((at,_t)=>O.O$.from(_e(at,this.tokens[_t]).toString()))}catch{return new Array(He.length).fill(v)}}_calcBptOutGivenExactTokensIn(Pe){try{const He=new Array(Pe.length).fill(BigInt(0)),We=new Array(Pe.length).fill(BigInt(0));this.tokens.filter(at=>!le(at.address,this.address)).forEach((at,_t)=>{He[_t]=pe(BigInt(Pe[_t].toString()),at),We[_t]=ne(at)});const Xe=Xi(this.amp.toBigInt(),We,He,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(Xe.toString())}catch{return d._Y}}_spotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,z.S5)(Pe.tokenOutPriceRate,18));return Tn(He.times((0,z.S5)(Pe.tokenInPriceRate,18)),Pe).div(We).times(Xe)}_spotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,z.S5)(Pe.tokenOutPriceRate,18));return Qn(He.times((0,z.S5)(Pe.tokenOutPriceRate,18)),Pe).div(We).times(Xe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenOutPriceRate,18));return Vi(He,Pe).times(We)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,z.S5)(Pe.tokenOutPriceRate,18));return ar(He,Pe).div(We).times(Xe).times(Xe)}subtractSwapFeeAmount(Pe,He){const We=Pe.mul(He).add(d.Ce.sub(1)).div(d.Ce);return Pe.sub(We)}addSwapFeeAmount(Pe,He){const We=d.Ce.sub(He);return Pe.mul(d.Ce).add(We.sub(1)).div(We)}}return Je.AMP_DECIMALS=3,Je})();function Du(Je,oe,Pe,He,We){if(He==BigInt(0))return aa(Je,We);const Xe=aa(oe,We),_t=aa(oe+Je,We)-Xe,xt=eu(Xe,Pe,We);return ae.divDown(ae.mul(He,_t),xt)}function Na(Je,oe,Pe,He,We){const Xe=aa(oe,We),_t=Xe-aa(oe-Je,We),xt=tu(Xe,Pe,We);return ae.divUp(ae.mul(He,_t),xt)}function Va(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=eu(Xe,Pe,We),xt=tu(Xe,Pe-Je,We);return He-ae.divDown(ae.mul(He,xt),at)}function Uu(Je,oe,Pe,He,We){const Xe=aa(oe,We),_t=aa(oe+Je,We)-Xe;return ae.divDownFixed(_t,We.rate)}function Eu(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=aa(oe-Je,We);return ae.divUpFixed(Xe-at,We.rate)}function jo(Je,oe,Pe,He,We){if(He==BigInt(0))return rl(Je,We);const Xe=aa(oe,We),at=eu(Xe,Pe,We);return rl(Xe+ae.divUp(ae.mul(at,Je),He),We)-oe}function yo(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=tu(Xe,Pe,We);return oe-rl(Xe-ae.divDown(ae.mul(at,Je),He),We)}function Vc(Je,oe,Pe,He,We){return oe-rl(aa(oe,We)-ae.mulDownFixed(Je,We.rate),We)}function El(Je,oe,Pe,He,We){return rl(aa(oe,We)+ae.mulUpFixed(Je,We.rate),We)-oe}function ec(Je,oe,Pe,He,We){if(He==BigInt(0))return ae.mulDownFixed(Je,We.rate);const Xe=aa(oe,We),at=eu(Xe,Pe,We),xt=tu(Xe,Pe+Je,We);return ae.divDown(ae.mul(He,xt),at)-He}function kc(Je,oe,Pe,He,We){if(He==BigInt(0))return ae.divUpFixed(Je,We.rate);const Xe=aa(oe,We),at=eu(Xe,Pe,We);return ae.divUpFixed(ae.divUp(ae.mul(He+Je,at),He)-Xe,We.rate)-Pe}function Cc(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=eu(Xe,Pe,We);return Pe-ae.divUpFixed(ae.divUp(ae.mul(He-Je,at),He)-Xe,We.rate)}function eu(Je,oe,Pe){return Je+ae.mulUpFixed(oe,Pe.rate)}function tu(Je,oe,Pe){return Je+ae.mulDownFixed(oe,Pe.rate)}function aa(Je,oe){if(Je{return(Je=Sn||(Sn={}))[Je.BptToMainToken=0]="BptToMainToken",Je[Je.MainTokenToBpt=1]="MainTokenToBpt",Je[Je.MainTokenToWrappedToken=2]="MainTokenToWrappedToken",Je[Je.WrappedTokenToMainToken=3]="WrappedTokenToMainToken",Je[Je.BptToWrappedToken=4]="BptToWrappedToken",Je[Je.WrappedTokenToBpt=5]="WrappedTokenToBpt",Sn;var Je})();class rr{constructor(oe,Pe,He,We,Xe,at,_t,xt,$t,cn){this.poolType=Ce.Linear,this.MAX_RATIO=(0,z.Ox)("10",18),this.ALMOST_ONE=(0,z.Ox)("0.99",18),this.MAX_TOKEN_BALANCE=O.O$.from("2").pow("112").sub("1"),this.id=oe,this.address=Pe,this.swapFee=(0,z.Ox)(He,18),this.totalShares=(0,z.Ox)(We,18),this.tokens=Xe,this.tokensList=at,this.mainIndex=_t,this.bptIndex=this.tokensList.indexOf(this.address),this.wrappedIndex=xt,this.wrappedDecimals=this.tokens[this.wrappedIndex].decimals,this.lowerTarget=(0,z.Ox)($t,18),this.upperTarget=(0,z.Ox)(cn,18)}static fromPool(oe){if(void 0===oe.mainIndex)throw new Error("LinearPool missing mainIndex");if(void 0===oe.wrappedIndex)throw new Error("LinearPool missing wrappedIndex");if(!oe.lowerTarget)throw new Error("LinearPool missing lowerTarget");if(!oe.upperTarget)throw new Error("LinearPool missing upperTarget");return new rr(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.mainIndex,oe.wrappedIndex,oe.lowerTarget,oe.upperTarget)}parsePoolPairData(oe,Pe){let He;const We=this.tokens.find(jr=>le(jr.address,oe));if(!We)throw Error(`Pool does not contain token in ${oe}`);const Xe=We.decimals,at=(0,z.Ox)(We.balance,Xe),_t=this.tokens.find(jr=>le(jr.address,Pe));if(!_t)throw Error(`Pool does not contain token out ${Pe}`);const xt=_t.decimals,$t=(0,z.Ox)(_t.balance,xt);He=le(oe,this.address)?le(Pe,this.tokens[this.wrappedIndex].address)?Sn.BptToWrappedToken:Sn.BptToMainToken:le(Pe,this.address)?le(oe,this.tokens[this.wrappedIndex].address)?Sn.WrappedTokenToBpt:Sn.MainTokenToBpt:le(oe,this.tokens[this.wrappedIndex].address)?Sn.WrappedTokenToMainToken:Sn.MainTokenToWrappedToken;const cn=this.tokens.map(({balance:jr})=>(0,z.Ox)(jr,18)),In=cn[this.bptIndex],Rn=this.MAX_TOKEN_BALANCE.sub(In);return{id:this.id,address:this.address,poolType:this.poolType,pairType:He,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(Xe),decimalsOut:Number(xt),balanceIn:at,balanceOut:$t,swapFee:this.swapFee,wrappedBalance:N(C(this.tokens[this.wrappedIndex].balance),this.wrappedDecimals),wrappedBalanceScaled:cn[this.wrappedIndex],wrappedDecimals:this.wrappedDecimals,rate:(0,z.Ox)(this.tokens[this.wrappedIndex].priceRate,18),lowerTarget:this.lowerTarget,upperTarget:this.upperTarget,mainBalanceScaled:cn[this.mainIndex],bptBalanceScaled:In,virtualBptSupply:Rn}}getNormalizedLiquidity(oe){return D}getLimitAmountSwap(oe,Pe){const He=oe,We=N(C(oe.balanceOut.toString()),-oe.decimalsOut);return Pe===xe.SwapExactIn?He.pairType===Sn.MainTokenToBpt?this._mainTokenInForExactBPTOut(oe,We.times(this.ALMOST_ONE.toString()).div(d.Ce.toString())):He.pairType===Sn.WrappedTokenToBpt?N(C(this.MAX_TOKEN_BALANCE.toString()),-18):He.pairType===Sn.BptToMainToken?this._BPTInForExactMainTokenOut(He,We.times(this.ALMOST_ONE.toString()).div(d.Ce.toString())):He.pairType===Sn.BptToWrappedToken?this._BPTInForExactWrappedTokenOut(oe,We.times(this.ALMOST_ONE.toString()).div(d.Ce.toString())):He.pairType===Sn.MainTokenToWrappedToken||He.pairType===Sn.WrappedTokenToMainToken?N(C(oe.balanceOut.mul(this.ALMOST_ONE).div(d.Ce).toString()),-oe.decimalsOut):C(0):He.pairType===Sn.MainTokenToBpt||He.pairType===Sn.WrappedTokenToBpt?N(C(oe.balanceOut.mul(this.MAX_RATIO).div(d.Ce).toString()),-oe.decimalsOut):He.pairType===Sn.BptToMainToken||He.pairType===Sn.BptToWrappedToken||He.pairType===Sn.MainTokenToWrappedToken||He.pairType===Sn.WrappedTokenToMainToken?N(C(oe.balanceOut.mul(this.ALMOST_ONE).div(d.Ce).toString()),-oe.decimalsOut):C(0)}updateTokenBalanceForPool(oe,Pe){const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");if(le(this.address,oe)){const Xe=(0,z.Ox)(He.balance,He.decimals).sub(Pe),at=this.totalShares.add(Xe);this.updateTotalShares(at)}He.balance=(0,z.S5)(Pe,He.decimals)}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){return oe.pairType===Sn.MainTokenToBpt?this._exactMainTokenInForBPTOut(oe,Pe):oe.pairType===Sn.BptToMainToken?this._exactBPTInForMainTokenOut(oe,Pe):oe.pairType===Sn.WrappedTokenToBpt?this._exactWrappedTokenInForBPTOut(oe,Pe):oe.pairType===Sn.BptToWrappedToken?this._exactBPTInForWrappedTokenOut(oe,Pe):oe.pairType===Sn.MainTokenToWrappedToken?this._exactMainTokenInForWrappedOut(oe,Pe):oe.pairType===Sn.WrappedTokenToMainToken?this._exactWrappedTokenInForMainOut(oe,Pe):C(0)}_exactWrappedTokenInForMainOut(oe,Pe){try{return N(C(Vc((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactMainTokenInForWrappedOut(oe,Pe){try{return N(C(Uu((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactMainTokenInForBPTOut(oe,Pe){try{return N(C(Du((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactBPTInForMainTokenOut(oe,Pe){try{return N(C(yo((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactWrappedTokenInForBPTOut(oe,Pe){try{return N(C(ec((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactBPTInForWrappedTokenOut(oe,Pe){try{return N(C(Cc((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){return oe.pairType===Sn.MainTokenToBpt?this._mainTokenInForExactBPTOut(oe,Pe):oe.pairType===Sn.BptToMainToken?this._BPTInForExactMainTokenOut(oe,Pe):oe.pairType===Sn.WrappedTokenToBpt?this._wrappedTokenInForExactBPTOut(oe,Pe):oe.pairType===Sn.BptToWrappedToken?this._BPTInForExactWrappedTokenOut(oe,Pe):oe.pairType===Sn.MainTokenToWrappedToken?this._mainTokenInForExactWrappedOut(oe,Pe):oe.pairType===Sn.WrappedTokenToMainToken?this._wrappedTokenInForExactMainOut(oe,Pe):C(0)}_wrappedTokenInForExactMainOut(oe,Pe){try{return N(C(Eu((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_mainTokenInForExactWrappedOut(oe,Pe){try{return N(C(El((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_mainTokenInForExactBPTOut(oe,Pe){try{return N(C(jo((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_BPTInForExactMainTokenOut(oe,Pe){try{return N(C(Na((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_wrappedTokenInForExactBPTOut(oe,Pe){try{return N(C(kc((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_BPTInForExactWrappedTokenOut(oe,Pe){try{return N(C(Va((0,z.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const He=(0,z.Ox)(Pe.dp(18).toString(),18).toBigInt(),We=oe.mainBalanceScaled.toBigInt(),Xe=oe.wrappedBalanceScaled.toBigInt(),at=oe.virtualBptSupply.toBigInt(),_t={fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()};let xt;if(oe.pairType===Sn.MainTokenToBpt)xt=_o(He,We,Xe,at,_t);else if(oe.pairType===Sn.BptToMainToken)xt=Tu(He,We,Xe,at,_t);else if(oe.pairType===Sn.WrappedTokenToBpt)xt=Vu(0,We,Xe,at,_t);else if(oe.pairType===Sn.BptToWrappedToken)xt=ua(0,We,Xe,at,_t);else if(oe.pairType===Sn.MainTokenToWrappedToken)xt=na(He,We,0,0,_t);else{if(oe.pairType!==Sn.WrappedTokenToMainToken)return C(0);xt=ou(He,We,0,0,_t)}return N(C(xt.toString()),-18).dp(oe.decimalsOut,0)}catch{return C(0)}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=(0,z.Ox)(Pe.dp(18).toString(),18).toBigInt(),We=oe.mainBalanceScaled.toBigInt(),Xe=oe.wrappedBalanceScaled.toBigInt(),at=oe.virtualBptSupply.toBigInt(),_t={fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()};let xt;if(oe.pairType===Sn.MainTokenToBpt)xt=ta(He,We,Xe,at,_t);else if(oe.pairType===Sn.BptToMainToken)xt=qo(He,We,Xe,at,_t);else if(oe.pairType===Sn.WrappedTokenToBpt)xt=Pu(0,We,Xe,at,_t);else if(oe.pairType===Sn.BptToWrappedToken)xt=oc(0,We,Xe,at,_t);else if(oe.pairType===Sn.MainTokenToWrappedToken)xt=xo(He,We,0,0,_t);else{if(oe.pairType!==Sn.WrappedTokenToMainToken)return C(0);xt=Wa(He,We,0,0,_t)}return N(C(xt.toString()),-18).dp(oe.decimalsOut,0)}catch{return C(0)}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return C(0)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return C(0)}}function zs(Je,oe,Pe){let He=oe(0,E.getAddress)(jr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.decimals,at=this.tokens.findIndex(jr=>(0,E.getAddress)(jr.address)===(0,E.getAddress)(Pe));if(at<0)throw"Pool does not contain tokenOut";const _t=this.tokens[at],xt=_t.decimals,$t=(0,z.Ox)(We.balance,Xe),cn=(0,z.Ox)(_t.balance,xt);let In=$t,Rn=cn;return oe==this.principalToken?In=$t.add(this.totalShares):Pe==this.principalToken&&(Rn=cn.add(this.totalShares)),{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,principalToken:this.principalToken,baseToken:this.baseToken,decimalsIn:Number(Xe),decimalsOut:Number(xt),balanceIn:In,balanceOut:Rn,swapFee:this.swapFee,totalShares:this.totalShares,expiryTime:this.expiryTime,unitSeconds:this.unitSeconds,currentBlockTimestamp:this.currentBlockTimestamp}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){const He=(0,z.Ox)("0.3",18);if(Pe===xe.SwapExactIn){const We=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),Xe=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),at=zs(this.expiryTime,this.currentBlockTimestamp,this.unitSeconds);return C((We**(1-at)+Xe**(1-at))**(1/(1-at))-We)}return C((0,z.S5)(oe.balanceOut.mul(He).div(d.Ce),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,z.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){if(Je.isZero())return Je;const Pe=parseFloat((0,z.S5)(oe.swapFee,18)),He=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(We-(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe))-Math.abs(at-We+(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)))*Pe)}(Pe,oe)}_tokenInForExactTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){if(Je.isZero())return Je;const Pe=parseFloat((0,z.S5)(oe.swapFee,18)),He=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(-He+(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe))+Math.abs(-at-He+(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)))*Pe)}(Pe,oe)}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,z.S5)(oe.swapFee,18)),He=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(1/((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe-Math.abs(1-(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe)*Pe))}(Pe,oe)}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,z.S5)(oe.swapFee,18)),He=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)/(-at+We)**Xe+Math.abs((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)/(-at+We)**Xe-1)*Pe)}(Pe,oe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,z.S5)(oe.swapFee,18)),He=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(-(-((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-2))*(1/(1-Xe)-1)*(1-Xe)/(at+He)**(2*Xe)-(at+He)**(-1-Xe)*(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)*Xe-Pe*Math.abs((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-2)*(1/(1-Xe)-1)*(1-Xe)/(at+He)**(2*Xe)+(at+He)**(-1-Xe)*(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)*Xe))/((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe-Math.abs(1-(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe)*Pe)**2)}(Pe,oe)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,z.S5)(oe.swapFee,18)),He=parseFloat((0,z.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,z.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-2)*(1/(1-Xe)-1)*(1-Xe)/(-at+We)**(2*Xe)+(-at+We)**(-1-Xe)*(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)*Xe+Pe*Math.abs((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-2)*(1/(1-Xe)-1)*(1-Xe)/(-at+We)**(2*Xe)+(-at+We)**(-1-Xe)*(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)*Xe))}(Pe,oe)}}const co=C(1e3);function Vo(Je,oe){let Pe=v;const He=oe.length;for(let xt=0;xt{return(Je=Ni||(Ni={}))[Je.BptToToken=0]="BptToToken",Je[Je.TokenToBpt=1]="TokenToBpt",Je[Je.TokenToToken=2]="TokenToToken",Ni;var Je})();let Ji=(()=>{class Je{constructor(Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.MetaStable,this.ALMOST_ONE=(0,z.Ox)("0.99",18),this.id=Pe,this.address=He,this.amp=(0,z.Ox)(We,Je.AMP_DECIMALS),this.swapFee=(0,z.Ox)(Xe,18),this.totalShares=(0,z.Ox)(at,18),this.tokens=_t,this.tokensList=xt}static fromPool(Pe){if(!Pe.amp)throw new Error("PhantomStablePool missing amp factor");return new Je(Pe.id,Pe.address,Pe.amp,Pe.swapFee,Pe.totalShares,Pe.tokens,Pe.tokensList)}static removeBPT(Pe){const He=b(Pe),We=Pe.bptIndex;return-1!=We&&(He.allBalances.splice(We,1),He.allBalancesScaled.splice(We,1),We(0,E.getAddress)(Go.address)===(0,E.getAddress)(Pe));if(We<0)throw"Pool does not contain tokenIn";const Xe=this.tokens[We],at=C(Xe.balance).times(C(Xe.priceRate)).dp(Xe.decimals).toString(),_t=Xe.decimals,xt=(0,z.Ox)(Xe.priceRate,18),$t=this.tokens.findIndex(Go=>(0,E.getAddress)(Go.address)===(0,E.getAddress)(He));if($t<0)throw"Pool does not contain tokenOut";const cn=this.tokens[$t],In=C(cn.balance).times(C(cn.priceRate)).dp(cn.decimals).toString(),Rn=cn.decimals,hr=(0,z.Ox)(cn.priceRate,18),jr=this.tokens.map(({balance:Go,priceRate:Ha})=>C(Go).times(C(Ha))),ni=this.tokens.map(({balance:Go,priceRate:Ha})=>(0,z.Ox)(Go,18).mul((0,z.Ox)(Ha,18)).div(d.Ce));let Fi;Fi=le(Pe,this.address)?Ni.BptToToken:le(He,this.address)?Ni.TokenToBpt:Ni.TokenToToken;const Nr=this.tokensList.indexOf(this.address),Ci=this.totalShares,Wo={id:this.id,address:this.address,poolType:this.poolType,pairType:Fi,bptIndex:Nr,tokenIn:Pe,tokenOut:He,balanceIn:(0,z.Ox)(at,_t),balanceOut:(0,z.Ox)(In,Rn),swapFee:this.swapFee,allBalances:jr,allBalancesScaled:ni,amp:this.amp,tokenIndexIn:We,tokenIndexOut:$t,decimalsIn:Number(_t),decimalsOut:Number(Rn),tokenInPriceRate:xt,tokenOutPriceRate:hr,virtualBptSupply:Ci};return Je.removeBPT(Wo)}getNormalizedLiquidity(Pe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,v))}getLimitAmountSwap(Pe,He){return C((0,z.S5)(Pe.balanceOut.mul(this.ALMOST_ONE).div(Pe.tokenOutPriceRate),Pe.decimalsOut))}updateTokenBalanceForPool(Pe,He){const We=this.tokens.find(Xe=>le(Xe.address,Pe));if(!We)throw Error("Pool does not contain this token");if(le(this.address,Pe)){const at=(0,z.Ox)(We.balance,We.decimals).sub(He),_t=this.totalShares.add(at);this.updateTotalShares(_t)}We.balance=(0,z.S5)(He,We.decimals)}updateTotalShares(Pe){this.totalShares=Pe}_exactTokenInForTokenOut(Pe,He){try{if(He.isZero())return v;const Xe=this.subtractSwapFeeAmount((0,z.Ox)(He.dp(18).toString(),18),Pe.swapFee).mul(Pe.tokenInPriceRate).div(d.Ce);let at;if(Pe.pairType===Ni.TokenToBpt){const xt=Array(Pe.allBalancesScaled.length).fill(BigInt(0));xt[Pe.tokenIndexIn]=Xe.toBigInt(),at=Xi(this.amp.toBigInt(),Pe.allBalancesScaled.map($t=>$t.toBigInt()),xt,Pe.virtualBptSupply.toBigInt(),BigInt(0))}else at=Pe.pairType===Ni.BptToToken?go(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexOut,Xe.toBigInt(),Pe.virtualBptSupply.toBigInt(),BigInt(0)):$i(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,Xe.toBigInt(),BigInt(0));const _t=O.O$.from(at).mul(d.Ce).div(Pe.tokenOutPriceRate);return C((0,z.S5)(_t,18))}catch{return v}}_tokenInForExactTokenOut(Pe,He){try{if(He.isZero())return v;const We=(0,z.Ox)(He.dp(18).toString(),18).mul(Pe.tokenOutPriceRate).div(d.Ce);let Xe;if(Pe.pairType===Ni.TokenToBpt)Xe=$s(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,We.toBigInt(),Pe.virtualBptSupply.toBigInt(),BigInt(0));else if(Pe.pairType===Ni.BptToToken){const xt=Array(Pe.allBalancesScaled.length).fill(BigInt(0));xt[Pe.tokenIndexOut]=We.toBigInt(),Xe=is(this.amp.toBigInt(),Pe.allBalancesScaled.map($t=>$t.toBigInt()),xt,Pe.virtualBptSupply.toBigInt(),BigInt(0))}else Xe=rs(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,We.toBigInt(),BigInt(0));const at=O.O$.from(Xe).mul(d.Ce).div(Pe.tokenInPriceRate),_t=this.addSwapFeeAmount(at,Pe.swapFee);return C((0,z.S5)(_t,18))}catch(We){return console.error(`PhantomStable _evminGivenOut: ${We.message}`),v}}_calcTokensOutGivenExactBptIn(Pe){throw new Error("PhantomPool does not have exit pool (_calcTokensOutGivenExactBptIn).")}_calcBptOutGivenExactTokensIn(Pe){throw new Error("PhantomPool does not have join pool (_calcBptOutGivenExactTokensIn).")}_spotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,z.S5)(Pe.tokenOutPriceRate,18)),at=He.times(C((0,z.S5)(Pe.tokenInPriceRate,18)));let _t;return _t=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,decimalsOut:Xe,tokenIndexIn:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=xn(xt,at,_t);let Rn=C((0,z.S5)(We,Xe));xt[at]=xt[at].plus(Je.times(In)),Rn=Rn.plus(qd(Je,oe));let hr=Ea(cn,xt,Rn,at,!0,!0,!1);return hr=C(1).div(hr.times(In)),hr}(at,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,tokenIndexOut:Xe,swapFee:at,decimalsIn:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Wc(Je,oe),Rn=xn(xt,Xe,at);let hr=C((0,z.S5)(We,_t));return xt[Xe]=xt[Xe].minus(In.div(Rn)),hr=hr.minus(Je),Ea(cn,xt,hr,Xe,!0,!1,!1).div(Rn)}(at,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1));_t[We]=_t[We].plus(Je.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),_t[Xe]=_t[Xe].minus(sa(Je,oe));let cn=nd($t,_t,We,Xe,!0,!1);return cn=k.div(cn.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),cn}(at,Pe),_t.div(We).times(Xe)}_spotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,z.S5)(Pe.tokenOutPriceRate,18)),at=He.times((0,z.S5)(Pe.tokenOutPriceRate,18));let _t;return _t=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,tokenIndexIn:Xe,decimalsOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Po(Je,oe),Rn=xn(xt,Xe,_t);xt[Xe]=xt[Xe].plus(In.times(Rn));let hr=C((0,z.S5)(We,at));hr=hr.plus(Je);let jr=Ea(cn,xt,hr,Xe,!0,!0,!0);return jr=k.div(jr.times(Rn)),jr}(at,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,decimalsIn:Xe,tokenIndexOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=xn(xt,at,_t);xt[at]=xt[at].minus(Je.div(In));let Rn=C((0,z.S5)(We,Xe));return Rn=Rn.minus(Hu(Je,oe)),Ea(cn,xt,Rn,at,!0,!1,!0).div(In)}(at,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1)),cn=nu(Je,oe).times(d.Ce.sub(at).toString()).div(d.Ce.toString());_t[We]=_t[We].plus(cn),_t[Xe]=_t[Xe].minus(Je);let In=nd($t,_t,We,Xe,!0,!0);return In=k.div(In.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),In}(at,Pe),_t.div(We).times(Xe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenOutPriceRate,18)),Xe=He.times((0,z.S5)(Pe.tokenInPriceRate,18));let at;return at=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,balanceOut:We,decimalsOut:Xe,tokenIndexIn:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=xn(xt,at,_t);xt[at]=xt[at].plus(Je.times(In));let Rn=C((0,z.S5)(We,Xe));return Rn=Rn.plus(qd(Je,oe)),Ea(cn,xt,Rn,at,!1,!0,!1)}(Xe,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,balanceIn:We,decimalsIn:Xe,tokenIndexOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Wc(Je,oe),Rn=xn(xt,at,_t);xt[at]=xt[at].minus(In.div(Rn));let hr=C((0,z.S5)(We,Xe));return hr=hr.minus(Je),Ea(cn,xt,hr,at,!1,!1,!1).div(Rn)}(Xe,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1));return _t[We]=_t[We].plus(Je.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),_t[Xe]=_t[Xe].minus(sa(Je,oe)),nd($t,_t,We,Xe,!1,!1)}(Xe,Pe),at.times(We)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,z.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,z.S5)(Pe.tokenOutPriceRate,18)),at=He.times((0,z.S5)(Pe.tokenOutPriceRate,18));let _t;return _t=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,balanceOut:We,decimalsOut:Xe,tokenIndexIn:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Po(Je,oe),Rn=xn(xt,at,_t);xt[at]=xt[at].plus(In.times(Rn));let hr=C((0,z.S5)(We,Xe));return hr=hr.plus(Je),Ea(cn,xt,hr,at,!1,!0,!0).div(Rn)}(at,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,balanceIn:We,decimalsIn:Xe,tokenIndexOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Hu(Je,oe),Rn=xn(xt,at,_t);xt[at]=xt[at].minus(Je.div(Rn));let hr=C((0,z.S5)(We,Xe));return hr=hr.minus(In),Ea(cn,xt,hr,at,!1,!1,!0).div(Rn.pow(2))}(at,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1)),cn=C((0,z.S5)(at,18)),In=nu(Je,oe).times(C(1).minus(cn));_t[We]=_t[We].plus(In),_t[Xe]=_t[Xe].minus(Je);const Rn=C(1).minus(cn);return nd($t,_t,We,Xe,!1,!0).div(Rn)}(at,Pe),_t.div(We).times(Xe).times(Xe)}subtractSwapFeeAmount(Pe,He){const We=Pe.mul(He).add(d.Ce.sub(1)).div(d.Ce);return Pe.sub(We)}addSwapFeeAmount(Pe,He){const We=d.Ce.sub(He);return Pe.mul(d.Ce).add(We.sub(1)).div(We)}}return Je.AMP_DECIMALS=3,Je})();class lo extends Ji{constructor(oe,Pe,He,We,Xe,at,_t){super(oe,Pe,He,We,Xe,at,_t)}static fromPool(oe){if(!oe.amp)throw new Error("ComposableStablePool missing amp factor");return new lo(oe.id,oe.address,oe.amp,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList)}_exactTokenInForTokenOut(oe,Pe){try{if(Pe.isZero())return v;const He=(0,z.Ox)(Pe.dp(18).toString(),18).mul(oe.tokenInPriceRate).div(d.Ce);let We;if(oe.pairType===Ni.TokenToBpt){const at=Array(oe.allBalancesScaled.length).fill(BigInt(0));at[oe.tokenIndexIn]=He.toBigInt(),We=Xi(this.amp.toBigInt(),oe.allBalancesScaled.map(_t=>_t.toBigInt()),at,oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt())}else We=oe.pairType===Ni.BptToToken?go(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexOut,He.toBigInt(),oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt()):$i(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexIn,oe.tokenIndexOut,He.toBigInt(),oe.swapFee.toBigInt());const Xe=O.O$.from(We).mul(d.Ce).div(oe.tokenOutPriceRate);return C((0,z.S5)(Xe,18)).dp(oe.decimalsOut)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){try{if(Pe.isZero())return v;const He=(0,z.Ox)(Pe.dp(18).toString(),18).mul(oe.tokenOutPriceRate).div(d.Ce);let We;if(oe.pairType===Ni.TokenToBpt)We=$s(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexIn,He.toBigInt(),oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt());else if(oe.pairType===Ni.BptToToken){const at=Array(oe.allBalancesScaled.length).fill(BigInt(0));at[oe.tokenIndexOut]=He.toBigInt(),We=is(this.amp.toBigInt(),oe.allBalancesScaled.map(_t=>_t.toBigInt()),at,oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt())}else We=rs(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexIn,oe.tokenIndexOut,He.toBigInt(),oe.swapFee.toBigInt());const Xe=O.O$.from(We).mul(d.Ce).div(oe.tokenInPriceRate);return C((0,z.S5)(Xe,18)).dp(oe.decimalsOut)}catch(He){return console.error(`PhantomStable _evminGivenOut: ${He.message}`),v}}_calcTokensOutGivenExactBptIn(oe){const Pe=this.tokens.filter(We=>!le(We.address,this.address)),He=Pe.map(We=>ne(We));try{return ji(He,oe.toBigInt(),this.totalShares.toBigInt()).map((at,_t)=>_e(at,Pe[_t])).map(at=>O.O$.from(at))}catch{return new Array(He.length).fill(v)}}_calcBptOutGivenExactTokensIn(oe){try{const Pe=new Array(oe.length).fill(BigInt(0)),He=new Array(oe.length).fill(BigInt(0));this.tokens.filter(Xe=>!le(Xe.address,this.address)).forEach((Xe,at)=>{Pe[at]=pe(BigInt(oe[at].toString()),Xe),He[at]=ne(Xe)});const We=Xi(this.amp.toBigInt(),He,Pe,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(We.toString())}catch(Pe){return console.error(Pe),d._Y}}}const qs=O.O$.from("316227766016837933"),Ka=O.O$.from("31622776601683793"),Ko=O.O$.from("3162277660168379"),dl=O.O$.from("316227766016837"),Gc=O.O$.from("31622776601683"),Rc=O.O$.from("3162277660168"),Ki=O.O$.from("316227766016"),ga=O.O$.from("31622776601"),Ur=O.O$.from("3162277660"),ca=O.O$.from(10).pow(38),wf=O.O$.from(10).pow(8),ra=O.O$.from("999999000000000000");function du(Je,oe){return Je.mul(oe).sub(1).div(d.Ce).add(1)}function ka(Je,oe){return Je.mul(d.Ce).sub(1).div(oe).add(1)}function Dr(Je,oe){return Je.mul(oe).div(d.Ce)}function Eo(Je,oe){return Je.mul(d.Ce).div(oe)}function Io(Je,oe){return Je.mul(oe).div(ca)}function Ho(Je,oe){if(oe.isZero())throw new Error("ZERO DIVISION");return Je.mul(ca).div(oe)}function $o(Je,oe){return Je.mul(oe).div(d.Ce)}function oa(Je,oe){if(oe.isZero())throw new Error("ZERO DIVISION");return Je.mul(d.Ce).div(oe)}function Bo(Je,oe){const Pe=Je.mul(oe);return Pe.gt(0)?Pe.sub(1).div(d.Ce).add(1):Pe.lt(0)?Pe.add(1).div(d.Ce).sub(1):O.O$.from(0)}function xf(Je,oe){if(oe.isZero())throw new Error("ZERO DIVISION");return oe.lt(0)&&(oe=oe.mul(-1),Je=Je.mul(-1)),Je.isZero()?O.O$.from(0):Je.gt(0)?Je.mul(d.Ce).sub(1).div(oe).add(1):Je.mul(d.Ce).add(1).div(oe.sub(1))}function la(Je,oe){const Pe=O.O$.from(10).pow(19),He=oe.div(Pe),We=oe.isNegative()?oe.mul(-1).mod(Pe).mul(-1):oe.mod(Pe),Xe=Je.mul(He),at=Je.mul(We);return Xe.lte(0)&&at.lte(0)?Xe.add(at.div(Pe)).div(Pe):Xe.add(at.div(Pe)).sub(1).div(Pe).add(1)}function tc(Je,oe){const Pe=O.O$.from(10).pow(19),He=oe.div(Pe),We=oe.isNegative()?oe.mul(-1).mod(Pe).mul(-1):oe.mod(Pe),Xe=Je.mul(He),at=Je.mul(We);return Xe.gte(0)&&at.gte(0)?Xe.add(at.div(Pe)).div(Pe):Xe.add(at.div(Pe)).add(1).div(Pe).sub(1)}function fc(Je,oe){if(Je.isZero())return O.O$.from(0);let Pe=function(Je){return Je.gte(d.Ce)?O.O$.from(2).pow(function(Je){let oe=0;for(let Pe=128;Pe>=2;Pe/=2){const He=O.O$.from(2).pow(Pe);Je.gte(He)&&(Je=Je.div(He),oe+=Pe/2)}return oe}(Je.div(d.Ce))).mul(d.Ce):Je.lte("10")?Ur:Je.lte("100")?O.O$.from("10000000000"):Je.lte("1000")?ga:Je.lte("10000")?O.O$.from("100000000000"):Je.lte("100000")?Ki:Je.lte("1000000")?O.O$.from("1000000000000"):Je.lte("10000000")?Rc:Je.lte("100000000")?O.O$.from("10000000000000"):Je.lte("1000000000")?Gc:Je.lte("10000000000")?O.O$.from("100000000000000"):Je.lte("100000000000")?dl:Je.lte("1000000000000")?O.O$.from("1000000000000000"):Je.lte("10000000000000")?Ko:Je.lte("100000000000000")?O.O$.from("10000000000000000"):Je.lte("1000000000000000")?Ka:Je.lte("10000000000000000")?O.O$.from("100000000000000000"):Je.lte("100000000000000000")?qs:Je}(Je);for(const We of new Array(7).fill(0))Pe=Pe.add(Je.mul(d.Ce).div(Pe)).div(2);const He=Pe.mul(Pe).div(d.Ce);if(!He.lte(Je.add(du(Pe,oe)))||!He.gte(Je.sub(du(Pe,oe))))throw new Error("GyroEPool: sqrt failed");return Pe}var e0=Object.freeze({__proto__:null,mulUp:du,divUp:ka,mulDown:Dr,divDown:Eo,mulXpU:Io,divXpU:Ho,mulDownMagU:$o,divDownMagU:oa,mulUpMagU:Bo,divUpMagU:xf,mulUpXpToNpU:la,mulDownXpToNpU:tc,sqrt:fc});function Nc(Je,oe,Pe){return[Eo(Je,Pe),Dr(Je,oe)]}function Kd(Je,oe,Pe){const[He,We,Xe,at]=Fh(Je,oe,Pe);return hl(He,We,Xe,at)}function Fh(Je,oe,Pe){const He=d.Ce.sub(Eo(oe,Pe)),We=Eo(Je[1],Pe),Xe=Dr(Je[0],oe),at=We.add(Xe),_t=Dr(Je[0],Je[1]);let xt=Dr(Dr(Dr(Je[0],Je[0]),oe),oe);const $t=Eo(Dr(Dr(Dr(Je[0],Je[1]),d.Ce.mul(2)),oe),Pe),cn=Eo(Dr(Je[1],Je[1]),du(Pe,Pe));return xt=xt.add($t).add(cn),[He,at,xt,_t]}function hl(Je,oe,Pe,He){const We=du(Je,d.Ce.mul(2)),Xe=Dr(Dr(He,d.Ce.mul(4)),Je),_t=fc(Pe.add(Xe),O.O$.from(5));return Eo(oe.add(_t),We)}function mh(Je,oe,Pe,He,We){const Xe=Je.add(du(He,d.Ce.add(2))),at=oe.add(Dr(We,d.Ce.sub(1))),_t=Eo(Dr(at,Pe),Xe.add(Pe));if(_t.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");return _t}function dd(Je,oe,Pe,He,We){if(Pe.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");const Xe=Je.add(du(He,d.Ce.add(2))),at=oe.add(Dr(We,d.Ce.sub(1)));return ka(du(Xe,Pe),at.sub(Pe))}function Tl(Je,oe,Pe,He,We,Xe){const at=d.Ce.sub(Xe);return Eo(Je[0].add(He).add(Dr(at,oe)),Dr(at,Je[1].add(We).sub(Pe)))}function Ff(Je,oe,Pe){return Eo(O.O$.from(2).mul(d.Ce),Je[1].add(Pe).sub(oe))}function gh(Je,oe,Pe,He,We,Xe){const at=O.O$.from(2).mul(d.Ce),_t=d.Ce.sub(Xe),$t=Je[0].add(He).add(Dr(_t,oe)),cn=Je[1].add(We),In=Dr(cn.sub(Pe),cn.sub(Pe));return Dr(Eo(at,_t),Eo($t,In))}var Uh=Object.freeze({__proto__:null,_findVirtualParams:Nc,_calculateInvariant:Kd,_calculateQuadraticTerms:Fh,_calculateQuadratic:hl,_calcOutGivenIn:mh,_calcInGivenOut:dd,_calculateNewSpotPrice:Tl,_derivativeSpotPriceAfterSwapExactTokenInForTokenOut:Ff,_derivativeSpotPriceAfterSwapTokenInForExactTokenOut:gh,_getNormalizedLiquidity:function(Je,oe){return Je[1].add(oe).div(2)}});function Hc(Je,oe){const Pe=oe.map(He=>(0,z.Ox)("1",He));return Je.map((He,We)=>He.mul(d.Ce).div(Pe[We]))}function fd(Je,oe){const Pe=Je.mul(oe).div(d.Ce);return Je.sub(Pe)}function Ca(Je,oe){return Je.mul(d.Ce).div(d.Ce.sub(oe))}var Or=Object.freeze({__proto__:null,_normalizeBalances:Hc,_reduceFee:fd,_addFee:Ca});class Ti{constructor(oe,Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.Gyro2,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.sqrtAlpha=X(_t,18),this.sqrtBeta=X(xt,18)}static fromPool(oe){if(!oe.sqrtAlpha||!oe.sqrtBeta)throw new Error("Pool missing Gyro2 sqrtAlpha and/or sqrtBeta params");return new Ti(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.sqrtAlpha,oe.sqrtBeta)}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals,In=0===He;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:X(Xe,at),balanceOut:X($t,cn),swapFee:this.swapFee,sqrtAlpha:In?this.sqrtAlpha:Eo(d.Ce,this.sqrtBeta),sqrtBeta:In?this.sqrtBeta:Eo(d.Ce,this.sqrtAlpha)}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),_t=Dr(Kd(We,oe.sqrtAlpha,oe.sqrtBeta),Eo(d.Ce,oe.sqrtAlpha).sub(Eo(d.Ce,oe.sqrtBeta))).sub(We[0]),xt=Eo(_t,d.Ce.sub(oe.swapFee));return C((0,z.S5)(Dr(xt,ra),18))}return C((0,z.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,z.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){try{const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=Kd(We,oe.sqrtAlpha,oe.sqrtBeta),[at,_t]=Nc(Xe,oe.sqrtAlpha,oe.sqrtBeta),$t=fd(X(Pe.toString(),18),oe.swapFee),cn=mh(We[0],We[1],$t,at,_t);return C((0,z.S5)(cn,18))}catch{return C(0)}}_tokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),Xe=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),at=Kd(Xe,oe.sqrtAlpha,oe.sqrtBeta),[_t,xt]=Nc(at,oe.sqrtAlpha,oe.sqrtBeta),cn=Ca(dd(Xe[0],Xe[1],He,_t,xt),oe.swapFee);return C((0,z.S5)(cn,18))}catch{return C(0)}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=Kd(We,oe.sqrtAlpha,oe.sqrtBeta),[at,_t]=Nc(Xe,oe.sqrtAlpha,oe.sqrtBeta),xt=X(Pe.toString(),18),$t=fd(xt,oe.swapFee),In=Tl(We,xt,mh(We[0],We[1],$t,at,_t),at,_t,oe.swapFee);return C((0,z.S5)(In,18))}catch{return C(0)}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),Xe=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),at=Kd(Xe,oe.sqrtAlpha,oe.sqrtBeta),[_t,xt]=Nc(at,oe.sqrtAlpha,oe.sqrtBeta),In=Tl(Xe,Ca(dd(Xe[0],Xe[1],He,_t,xt),oe.swapFee),He,_t,xt,oe.swapFee);return C((0,z.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=Kd(We,oe.sqrtAlpha,oe.sqrtBeta),[at,_t]=Nc(Xe,oe.sqrtAlpha,oe.sqrtBeta),$t=fd(X(Pe.toString(),18),oe.swapFee),In=Ff(We,mh(We[0],We[1],$t,at,_t),_t);return C((0,z.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),Xe=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),at=Kd(Xe,oe.sqrtAlpha,oe.sqrtBeta),[_t,xt]=Nc(at,oe.sqrtAlpha,oe.sqrtBeta),In=gh(Xe,Ca(dd(Xe[0],Xe[1],He,_t,xt),oe.swapFee),He,_t,xt,oe.swapFee);return C((0,z.S5)(In,18))}catch{return C(0)}}}const ii=O.O$.from(10).pow(29).mul(487),to=O.O$.from(10).pow(9);function Ia(Je,oe){const[Pe,He,We,Xe]=jh(Je,oe);return Lt(Pe,He,We,Xe,oe)}function jh(Je,oe){const Pe=Dr(oe,oe),He=Dr(Pe,oe),We=d.Ce.sub(He),at=Dr(Dr(Je[0].add(Je[1]).add(Je[2]),oe),oe),_t=Dr(Je[0],Je[1]).add(Dr(Je[1],Je[2])).add(Dr(Je[2],Je[0]));return[We,at,Dr(_t,oe),Dr(Dr(Je[0],Je[1]),Je[2])]}function Lt(Je,oe,Pe,He,We){let Xe=en(Je,oe,Pe);return Xe=Dn(Je,oe,Pe,He,We,Xe),Xe}function en(Je,oe,Pe){const He=du(oe,oe).add(du(du(Je,Pe),d.Ce.mul(3)));return du(ka(oe,Je.mul(3)).add(ka(fc(He,O.O$.from(5)),Je.mul(3))),d.Ce.sub(Je).gte(d.Ce.div(2))?d.Ce.mul(3).div(2):d.Ce.mul(2))}function Dn(Je,oe,Pe,He,We,Xe){let at=O.O$.from(0);for(let _t=0;_t<255;++_t){const[xt,$t]=cr(0,oe,Pe,He,We,Xe);if(xt.lte(1)||_t>=5&&$t||_t>=5&&xt.gte(at.div(O.O$.from(8))))return Xe;at=xt,Xe=$t?Xe.add(xt):Xe.sub(xt)}throw new Error("Gyro3Pool: Newton Method did not converge on required invariant")}function cr(Je,oe,Pe,He,We,Xe){let at=O.O$.from(0);at=Dr(Xe,Xe).mul(3),at=at.sub(Dr(Dr(Dr(at,We),We),We)),at=at.sub(Dr(Xe,oe).mul(2)).sub(Pe);const xt=function(Je,oe,Pe){let He=O.O$.from(0);if(Je.lte(ii))He=Je.mul(Je).div(d.Ce).mul(Je).div(d.Ce),He=He.sub(He.mul(oe).div(d.Ce).mul(oe).div(d.Ce).mul(oe).div(d.Ce)),He=He.mul(d.Ce).div(Pe);else{He=Je.mul(Je).div(d.Ce),He=He.mul(Je.div(d.Ce)).add(He.mul(Je.mod(d.Ce)).div(d.Ce));let We=He;for(let Xe=0;Xe<3;Xe++)We=We.mul(oe.div(to)).div(to).add(We.mul(oe.mod(to)));He=He.sub(We),He=He.mul(to).div(Pe.div(to))}return He}(Xe,We,at);let $t=Dr(Dr(Xe,Xe),oe);$t=Eo($t.add(Dr(Xe,Pe)),at),$t=$t.add(Eo(He,at));const cn=$t.gte(xt);return[cn?$t.sub(xt):xt.sub($t),cn]}function Gr(Je,oe,Pe,He){const We=Je.add(du(He,d.Ce.add(2))),at=oe.add(Dr(He,d.Ce.sub(1))).mul(Pe).div(We.add(Pe));if(at.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");return at}function Bi(Je,oe,Pe,He){if(Pe.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");const We=Je.add(du(He,d.Ce.add(2))),Xe=oe.add(Dr(He,d.Ce.sub(1)));return ka(du(We,Pe),Xe.sub(Pe))}function Ai(Je,oe,Pe,He,We){const Xe=d.Ce.sub(We);return Eo(Je[0].add(He).add(Dr(Xe,oe)),Dr(Xe,Je[1].add(He).sub(Pe)))}function gi(Je,oe,Pe){return Eo(O.O$.from(2).mul(d.Ce),Je[1].add(Pe).sub(oe))}function Bs(Je,oe,Pe,He,We){const Xe=O.O$.from(2).mul(d.Ce),at=d.Ce.sub(We),xt=Je[0].add(He).add(Dr(at,oe)),$t=Je[1].add(He),cn=Dr($t.sub(Pe),$t.sub(Pe));return Dr(Eo(Xe,at),Eo(xt,cn))}var ha=Object.freeze({__proto__:null,_calculateInvariant:Ia,_calculateCubicTerms:jh,_calculateCubic:Lt,_calculateCubicStartingPoint:en,_runNewtonIteration:Dn,_calcNewtonDelta:cr,_calcOutGivenIn:Gr,_calcInGivenOut:Bi,_calculateNewSpotPrice:Ai,_derivativeSpotPriceAfterSwapExactTokenInForTokenOut:gi,_derivativeSpotPriceAfterSwapTokenInForExactTokenOut:Bs,_getNormalizedLiquidity:function(Je,oe){return Je[1].add(oe).div(2)}});class Fo{constructor(oe,Pe,He,We,Xe,at,_t){this.poolType=Ce.Gyro3,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.root3Alpha=X(_t,18)}static findToken(oe,Pe,He){const We=oe.find(Xe=>(0,E.getAddress)(Xe.address)===(0,E.getAddress)(Pe));if(!We)throw new Error(He);return We}static fromPool(oe){if(!oe.root3Alpha)throw new Error("Pool missing root3Alpha");if(X(oe.root3Alpha,18).lte(0)||X(oe.root3Alpha,18).gte(d.Ce))throw new Error("Invalid root3Alpha parameter");if(3!==oe.tokens.length)throw new Error("Gyro3Pool must contain three tokens only");return new Fo(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.root3Alpha)}parsePoolPairData(oe,Pe){const He=Fo.findToken(this.tokens,oe,"Pool does not contain tokenIn"),We=He.balance,Xe=He.decimals,at=Fo.findToken(this.tokens,Pe,"Pool does not contain tokenOut"),_t=at.balance,xt=at.decimals,$t=this.tokens.find(hr=>(0,E.getAddress)(hr.address)!==(0,E.getAddress)(Pe)&&(0,E.getAddress)(hr.address)!==(0,E.getAddress)(oe));if(!$t)throw new Error("Pool does not contain a valid third token");const cn=$t.balance,In=$t.decimals;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(Xe),decimalsOut:Number(xt),decimalsTertiary:Number(In),balanceIn:X(We,Xe),balanceOut:X(_t,xt),balanceTertiary:X(cn,In),swapFee:this.swapFee}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),$t=Eo(Dr(Xe[0].add(_t),Xe[1].add(_t)),_t).sub(_t).sub(Xe[0]),cn=Eo($t,d.Ce.sub(oe.swapFee));return C((0,z.S5)(Dr(cn,ra),18))}return C((0,z.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,z.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){try{const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),$t=fd(X(Pe.toString(),18),oe.swapFee),cn=Gr(Xe[0],Xe[1],$t,_t);return C((0,z.S5)(cn,18))}catch{return C(0)}}_tokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),at=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),xt=Dr(Ia(at,this.root3Alpha),this.root3Alpha),cn=Ca(Bi(at[0],at[1],He,xt),oe.swapFee);return C((0,z.S5)(cn,18))}catch{return C(0)}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),xt=X(Pe.toString(),18),$t=fd(xt,oe.swapFee),In=Ai(Xe,xt,Gr(Xe[0],Xe[1],$t,_t),_t,oe.swapFee);return C((0,z.S5)(In,18))}catch{return C(0)}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),at=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),xt=Dr(Ia(at,this.root3Alpha),this.root3Alpha),In=Ai(at,Ca(Bi(at[0],at[1],He,xt),oe.swapFee),He,xt,oe.swapFee);return C((0,z.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),$t=fd(X(Pe.toString(),18),oe.swapFee),In=gi(Xe,Gr(Xe[0],Xe[1],$t,_t),_t);return C((0,z.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),at=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),xt=Dr(Ia(at,this.root3Alpha),this.root3Alpha),In=Bs(at,Ca(Bi(at[0],at[1],He,xt),oe.swapFee),He,xt,oe.swapFee);return C((0,z.S5)(In,18))}catch{return C(0)}}}const Sa=O.O$.from(10).pow(34),Zo=O.O$.from(10).pow(37).mul(3);function Ma(Je,oe){const Pe=Dr(Je,oe);return Je.sub(Pe)}function $u(Je,oe){return Eo(Je,d.Ce.sub(oe))}function bu(Je,oe){const Pe=oe.map(He=>(0,z.Ox)("1",He));return Je.map((He,We)=>He.mul(d.Ce).div(Pe[We]))}function au(Je,oe,Pe){return Pe?[Je,oe]:[oe,Je]}function Mc(Je,oe,Pe,He,We){if(0===We){const Xe=function(Je,oe,Pe){const He=Ho(oe.tauBeta.x.sub(oe.tauAlpha.x),oe.dSq),We=Ho(oe.tauBeta.y.sub(oe.tauAlpha.y),oe.dSq);let Xe=tc($o($o(Pe.y,Je.lambda),Je.c),He);return Xe=Xe.add(We.gt(O.O$.from(0))?$o(Pe.y,Je.s):tc(Bo(Pe.x,Je.s),We)),Xe}(Je,oe,Pe);if(He.gt(Sa)||He.gt(Xe))throw new Error("ASSET BOUNDS EXCEEDED")}else{const Xe=function(Je,oe,Pe){const He=Ho(oe.tauBeta.x.sub(oe.tauAlpha.x),oe.dSq),We=Ho(oe.tauBeta.y.sub(oe.tauAlpha.y),oe.dSq);let Xe=tc($o($o(Pe.y,Je.lambda),Je.s),He);return Xe=Xe.add(We.gt(O.O$.from(0))?$o(Pe.y,Je.c):tc(Bo(Pe.x,Je.c),We)),Xe}(Je,oe,Pe);if(He.gt(Sa)||He.gt(Xe))throw new Error("ASSET BOUNDS EXCEEDED")}}function b1(Je,oe,Pe,He){const We={x:hd(oe,Pe,He),y:Ad(oe,Pe,He)};return Vh(oe.lambda,Je,oe.s,oe.c,He,We,Pe.tauBeta,Pe.dSq)}function yh(Je,oe,Pe,He){const We={x:Ad(oe,Pe,He),y:hd(oe,Pe,He)};return Vh(oe.lambda,Je,oe.c,oe.s,He,We,{x:Pe.tauAlpha.x.mul(-1),y:Pe.tauAlpha.y},Pe.dSq)}function hd(Je,oe,Pe,He){const We=He?oe.tauAlpha:oe.tauBeta,Xe=Ho(We.x,oe.dSq);let at=We.x.gt(O.O$.from(0))?la(Bo(Bo(Pe.x,Je.lambda),Je.c),Xe):la($o($o(Pe.y,Je.lambda),Je.c),Xe);return at=at.add(la(Bo(Pe.x,Je.s),Ho(We.y,oe.dSq))),at}function Ad(Je,oe,Pe,He){const We=He?oe.tauBeta:oe.tauAlpha,Xe=Ho(We.x,oe.dSq);let at=We.x.lt(O.O$.from(0))?la(Bo(Bo(Pe.x,Je.lambda),Je.s),Xe.mul(-1)):la($o($o(Pe.y.mul(-1),Je.lambda),Je.s),Xe);return at=at.add(la(Bo(Pe.x,Je.c),Ho(We.y,oe.dSq))),at}function Vh(Je,oe,Pe,He,We,Xe,at,_t){const xt={x:ca.sub(oa(oa(ca,Je),Je)),y:ca.sub(xf(xf(ca,Je),Je))},$t={a:O.O$.from(0),b:O.O$.from(0),c:O.O$.from(0)},cn=oe.sub(Xe.x);$t.b=cn.gt(O.O$.from(0))?la($o($o(cn.mul(-1),Pe),He),Ho(xt.y,_t)):la(Bo(Bo(cn.mul(-1),Pe),He),Ho(xt.x,_t).add(1));const In={x:Ho($o($o(xt.y,Pe),Pe),_t),y:Ho(Bo(Bo(xt.x,Pe),Pe),_t.add(1)).add(1)};return In.x=ca.sub(In.x),In.y=ca.sub(In.y),$t.c=j0(oe,We,Je,Pe,He,at,_t).mul(-1),$t.c=$t.c.add(tc($o(We.y,We.y),In.y)),$t.c=$t.c.gt(O.O$.from(0))?fc($t.c,O.O$.from(5)):O.O$.from(0),$t.a=$t.b.sub($t.c).gt(O.O$.from(0))?la($t.b.sub($t.c),Ho(ca,In.y).add(1)):la($t.b.sub($t.c),Ho(ca,In.x)),$t.a.add(Xe.y)}function j0(Je,oe,Pe,He,We,Xe,at){const _t={x:Io(at,at),y:Bo(oe.x,oe.x)},xt={a:O.O$.from(0),b:O.O$.from(0),c:O.O$.from(0)};let $t=Ho(Io(Xe.x,Xe.y),_t.x);return $t.gt(O.O$.from(0))?(xt.a=Bo(_t.y,He.mul(2)),xt.a=la(Bo(xt.a,We),$t.add(7))):(xt.a=$o($o(oe.y,oe.y),He.mul(2)),xt.a=la($o(xt.a,We),$t)),xt.b=Xe.x.lt(O.O$.from(0))?la(Bo(Bo(oe.x,Je),We.mul(2)),Ho(Xe.x,at).mul(-1).add(3)):la($o($o(oe.y.mul(-1),Je),We.mul(2)),Ho(Xe.x,at)),xt.a=xt.a.add(xt.b),$t=Ho(Io(Xe.y,Xe.y),_t.x).add(7),xt.b=Bo(_t.y,He),xt.b=la(Bo(xt.b,He),$t),xt.c=la($o($o(oe.y.mul(-1),Je),He.mul(2)),Ho(Xe.y,at)),xt.b=xt.b.add(xt.c).add(Bo(Je,Je)),xt.b=xt.b.gt(O.O$.from(0))?xf(xt.b,Pe):oa(xt.b,Pe),xt.a=xt.a.add(xt.b),xt.a=xt.a.gt(O.O$.from(0))?xf(xt.a,Pe):oa(xt.a,Pe),$t=Ho(Io(Xe.x,Xe.x),_t.x).add(7),la(Bo(Bo(_t.y,We),We),$t).add(xt.a)}function lf(Je,oe,Pe,He){const We={x:hd(oe,Pe,He),y:Ad(oe,Pe,He)};return Hh(oe.lambda,Je,oe.s,oe.c,He,We,Pe.tauBeta,Pe.dSq)}function bh(Je,oe,Pe,He){const We={x:Ad(oe,Pe,He),y:hd(oe,Pe,He)};return Hh(oe.lambda,Je,oe.c,oe.s,He,We,{x:Pe.tauAlpha.x.mul(-1),y:Pe.tauAlpha.y},Pe.dSq)}function Hh(Je,oe,Pe,He,We,Xe,at,_t){const xt={x:ca.sub(oa(oa(ca,Je),Je)),y:ca.sub(xf(xf(ca,Je),Je))},$t={a:O.O$.from(0),b:O.O$.from(0),c:O.O$.from(0)},cn=oe.sub(Xe.x);$t.b=la($o(Pe,He),Ho(xt.y,_t));const In={x:Ho($o($o(xt.y,Pe),Pe),_t),y:Ho(Bo(Bo(xt.x,Pe),Pe),_t.add(1)).add(1)};return In.x=ca.sub(In.x),In.y=ca.sub(In.y),$t.c=j0(oe,We,Je,Pe,He,at,_t).mul(-1),$t.c=$t.c.add(tc($o(We.y,We.y),In.y)),$t.c=$t.c.gt(O.O$.from(0))?fc($t.c,O.O$.from(5)):O.O$.from(0),$t.c=Dr(Dr($t.c,Je),Je),$t.c=Eo(cn,$t.c),$t.a=$t.b.sub($t.c).gt(O.O$.from(0))?la($t.b.sub($t.c),Ho(ca,In.y).add(1)):la($t.b.sub($t.c),Ho(ca,In.x)),$t.a}function nc(Je,oe,Pe,He,We,Xe){const at=We.y,{c:_t,s:xt,lambda:$t}=oe,[cn,In]=Je,Rn=hd(oe,Pe,We),hr=Ad(oe,Pe,We),jr=d.Ce.sub(Eo(d.Ce,Dr($t,$t))),ni=d.Ce.sub(He);let Fi;return Fi=fc(0===Xe?Dr(Dr(at,at),d.Ce.sub(Dr(jr,Dr(xt,xt)))).sub(Eo(Dr(cn.sub(Rn),cn.sub(Rn)),Dr($t,$t))):Dr(Dr(at,at),d.Ce.sub(Dr(jr,Dr(_t,_t)))).sub(Eo(Dr(In.sub(hr),In.sub(hr)),Dr($t,$t))),O.O$.from(5)),{x0:cn,y0:In,c:_t,s:xt,lambda:$t,a:Rn,b:hr,ls:jr,f:ni,r:at,R:Fi}}function Al(Je,oe,Pe,He,We){const{y0:Xe,c:at,s:_t,lambda:xt,b:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,1);return Eo(Dr(Eo(d.Ce,d.Ce.sub(Dr(cn,Dr(at,at)))),Dr(In,Dr(Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t)),Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t))))),Dr(Dr(xt,xt),Dr(In,In)).add(Dr(Xe.sub($t),Xe.sub($t))))}function V0(Je,oe,Pe,He,We){const{x0:Xe,c:at,s:_t,lambda:xt,a:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,0);return Eo(Dr(Eo(d.Ce,d.Ce.sub(Dr(cn,Dr(_t,_t)))),Dr(In,Dr(Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t)),Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t))))),Dr(Dr(xt,xt),Dr(In,In)).add(Dr(Xe.sub($t),Xe.sub($t))))}function v1(Je,oe,Pe,He,We){const{x0:Xe,c:at,s:_t,lambda:xt,a:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,0);return Eo(Dr(d.Ce.sub(Dr(cn,Dr(_t,_t))),Eo(d.Ce,Dr(Dr(xt,xt),In)).add(Eo(Dr(Xe.sub($t),Xe.sub($t)),Dr(Dr(Dr(xt,xt),Dr(xt,xt)),Dr(In,Dr(In,In)))))),Dr(Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In))),Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In)))))}function df(Je,oe,Pe,He,We){const{y0:Xe,c:at,s:_t,lambda:xt,b:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,1);return Eo(Dr(d.Ce.sub(Dr(cn,Dr(at,at))),Eo(d.Ce,Dr(Dr(xt,xt),In)).add(Eo(Dr(Xe.sub($t),Xe.sub($t)),Dr(Dr(Dr(xt,xt),Dr(xt,xt)),Dr(In,Dr(In,In)))))),Dr(Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In))),Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In)))))}function Zd(Je,oe,Pe,He,We){const{x0:Xe,s:at,lambda:_t,a:xt,ls:$t,R:cn,f:In}=nc(Je,oe,Pe,He,We,0);return Dr(Eo(d.Ce,Dr(In,d.Ce.sub(Dr($t,Dr(at,at))))),Eo(d.Ce,Dr(Dr(_t,_t),cn)).add(Eo(Dr(Xe.sub(xt),Xe.sub(xt)),Dr(Dr(Dr(_t,_t),Dr(_t,_t)),Dr(Dr(cn,cn),cn)))))}function Qs(Je,oe,Pe,He,We){const{y0:Xe,c:at,lambda:_t,b:xt,ls:$t,R:cn,f:In}=nc(Je,oe,Pe,He,We,1);return Dr(Eo(d.Ce,Dr(In,d.Ce.sub(Dr($t,Dr(at,at))))),Eo(d.Ce,Dr(Dr(_t,_t),cn)).add(Eo(Dr(Xe.sub(xt),Xe.sub(xt)),Dr(Dr(Dr(_t,_t),Dr(_t,_t)),Dr(Dr(cn,cn),cn)))))}var t0=Object.freeze({__proto__:null,calcSpotPriceYGivenX:lf,calcSpotPriceXGivenY:bh,normalizedLiquidityYIn:Al,normalizedLiquidityXIn:V0,dPyDXIn:v1,dPxDYIn:df,dPxDXOut:Zd,dPyDYOut:Qs});function hc(Je,oe,Pe){const[He,We]=Je;if(He.add(We).gt(Sa))throw new Error("MAX ASSETS EXCEEDED");const Xe=function(Je,oe,Pe,He){const We=Io(He.dSq,He.dSq),Xe=Ho(oa(oa(He.w,Pe.lambda).add(He.z),Pe.lambda),We);let at=tc($o(Je,Pe.c).sub($o(oe,Pe.s)),Xe),_t=$o($o(Je,Pe.lambda),Pe.s).add($o($o(oe,Pe.lambda),Pe.c));return at=at.add(tc(_t,Ho(He.u,We))),_t=$o(Je,Pe.s).add($o(oe,Pe.c)),at=at.add(tc(_t,Ho(He.v,We))),at}(He,We,oe,Pe),at=function(Je,oe,Pe,He){let We=function(Je,oe,Pe,He){let We=Bo(Bo(Bo(Je,Je),Pe.c),Pe.c).add(Bo(Bo(Bo(oe,oe),Pe.s),Pe.s));We=We.sub($o($o($o(Je,oe),Pe.c.mul(2)),Pe.s));const Xe=Io(He.u,He.u).add(oa(Io(He.u.mul(2),He.v),Pe.lambda)).add(oa(oa(Io(He.v,He.v),Pe.lambda),Pe.lambda));let at=tc(We.mul(-1),Xe);return at=at.add(tc(oa(oa(We.sub(9),Pe.lambda),Pe.lambda),Ho(ca,He.dSq))),at}(Je,oe,Pe,He).add(function(Je,oe,Pe,He){let We=$o($o($o(Je,Je).sub(Bo(oe,oe)),Pe.c.mul(2)),Pe.s);const Xe=$o(oe,Je.mul(2));We=We.add($o($o(Xe,Pe.c),Pe.c)).sub($o($o(Xe,Pe.s),Pe.s));let at=Io(He.z,He.u).add(oa(oa(Io(He.w,He.v),Pe.lambda),Pe.lambda));return at=at.add(oa(Io(He.w,He.u).add(Io(He.z,He.v)),Pe.lambda)),at=Ho(at,Io(Io(Io(He.dSq,He.dSq),He.dSq),He.dSq)),tc(We,at)}(Je,oe,Pe,He));We=We.add(function(Je,oe,Pe,He){let We=Bo(Bo(Bo(Je,Je),Pe.s),Pe.s).add(Bo(Bo(Bo(oe,oe),Pe.c),Pe.c));We=We.add(Bo(Bo(Bo(Je,oe),Pe.s.mul(2)),Pe.c));let Xe=Io(He.z,He.z).add(oa(oa(Io(He.w,He.w),Pe.lambda),Pe.lambda));Xe=Xe.add(oa(Io(He.z.mul(2),He.w),Pe.lambda)),Xe=Ho(Xe,Io(Io(Io(He.dSq,He.dSq),He.dSq),He.dSq));let at=tc(We.mul(-1),Xe);return at=at.add(tc(We.sub(9),Ho(ca,He.dSq))),at}(Je,oe,Pe,He));const Xe=Bo(Je,Je).add(Bo(oe,oe)).div(ca);return We=We.gt(0)?fc(We,O.O$.from(5)):O.O$.from(0),[We,Xe]}(He,We,oe,Pe),_t=at[0];let xt=at[1];xt=_t.gt(0)?xf(xt.add(1),_t.mul(2)):xt.gt(0)?fc(xt,O.O$.from(5)):O.O$.from(10).pow(9),xt=Bo(oe.lambda,He.add(We)).div(ca).add(xt).add(1).mul(20);const $t=Ho(ca,function(Je,oe){const Pe=Io(Io(oe.dSq,oe.dSq),oe.dSq);let He=Bo(Je.lambda,Ho(Io(oe.u.mul(2),oe.v),Pe));He=He.add(Bo(Bo(Ho(Io(oe.u.add(1),oe.u.add(1)),Pe),Je.lambda),Je.lambda)),He=He.add(Ho(Io(oe.v,oe.v),Pe));const We=xf(oe.w,Je.lambda).add(oe.z);return He=He.add(Ho(Io(We,We),Pe)),He}(oe,Pe).sub(ca)),cn=tc(Xe.add(_t).sub(xt),$t);if(xt=la(xt,$t),xt=xt.add(la(cn,$t).mul(oe.lambda.mul(oe.lambda).div(O.O$.from(10).pow(36))).mul(40).div(ca)).add(1),cn.add(xt).gt(Zo))throw new Error("MAX INVARIANT EXCEEDED");return[cn,xt]}function n0(Je,oe,Pe,He,We,Xe){if(oe.lt(wf))return O.O$.from(0);const at=Number(!Pe),_t=Number(Pe),xt=Pe?b1:yh,$t=Je[at].add(oe);Mc(He,We,Xe,$t,at);const cn=xt($t,He,We,Xe),In=Je[_t].sub(cn);if(In.lt(0))throw new Error("ASSET BOUNDS EXCEEDED 1");return In}function H0(Je,oe,Pe,He,We,Xe){if(oe.lt(wf))return O.O$.from(0);const at=Number(!Pe),_t=Number(Pe),xt=Pe?yh:b1;if(oe.gt(Je[_t]))throw new Error("ASSET BOUNDS EXCEEDED 2");const cn=xt(Je[_t].sub(oe),He,We,Xe);Mc(He,We,Xe,cn,at);const In=cn.sub(Je[at]);if(In.lt(0))throw new Error("ASSET BOUNDS EXCEEDED 3");return In}function ac(Je,oe,Pe,He,We,Xe,at){const _t=Number(!Pe),xt=d.Ce.sub(at),In=(Pe?lf:bh)(Je[_t].add(oe),He,We,Xe);return Eo(d.Ce,Dr(In,xt))}function Id(Je,oe,Pe,He,We,Xe,at){const _t=Number(Pe),xt=d.Ce.sub(at);return Eo((Pe?bh:lf)(Je[_t].sub(oe),He,We,Xe),xt)}function Au(Je,oe,Pe,He,We,Xe){return Number(!oe)?df(Je,Pe,He,Xe,We):v1(Je,Pe,He,Xe,We)}function x0(Je,oe,Pe,He,We,Xe){return Number(!oe)?Zd(Je,Pe,He,Xe,We):Qs(Je,Pe,He,Xe,We)}var Sd=Object.freeze({__proto__:null,calculateNormalizedLiquidity:function(Je,oe,Pe,He,We,Xe){return Xe?V0(Je,oe,Pe,We,He):Al(Je,oe,Pe,We,He)},calculateInvariantWithError:hc,calcOutGivenIn:n0,calcInGivenOut:H0,calcSpotPriceAfterSwapOutGivenIn:ac,calcSpotPriceAfterSwapInGivenOut:Id,calcDerivativePriceAfterSwapOutGivenIn:Au,calcDerivativeSpotPriceAfterSwapInGivenOut:x0});class r0{constructor(oe,Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.GyroE,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.gyroEParams={alpha:X(_t.alpha,18),beta:X(_t.beta,18),c:X(_t.c,18),s:X(_t.s,18),lambda:X(_t.lambda,18)},this.derivedGyroEParams={tauAlpha:{x:X(xt.tauAlphaX,38),y:X(xt.tauAlphaY,38)},tauBeta:{x:X(xt.tauBetaX,38),y:X(xt.tauBetaY,38)},u:X(xt.u,38),v:X(xt.v,38),w:X(xt.w,38),z:X(xt.z,38),dSq:X(xt.dSq,38)}}static fromPool(oe){const{alpha:Pe,beta:He,c:We,s:Xe,lambda:at,tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni}=oe,Fi={alpha:Pe,beta:He,c:We,s:Xe,lambda:at},Nr={tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni};if(!Object.values(Fi).every(Ci=>Ci)||!Object.values(Nr).every(Ci=>Ci))throw new Error("Pool missing GyroE params and/or GyroE derived params");return new r0(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,Fi,Nr)}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals,In=0===He;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:X(Xe,at),balanceOut:X($t,cn),swapFee:this.swapFee,tokenInIsToken0:In}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const He=bu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},xt=oe.tokenInIsToken0?hd:Ad,In=Eo(xt(this.gyroEParams,this.derivedGyroEParams,_t).sub(xt(this.gyroEParams,this.derivedGyroEParams,_t,!0)).sub(He[0]),d.Ce.sub(oe.swapFee));return C((0,z.S5)(Dr(In,ra),18))}return C((0,z.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,z.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){const He=bu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},cn=n0(We,Ma(X(Pe.toString(),18),oe.swapFee),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t);return C((0,z.S5)(cn,18))}_tokenInForExactTokenOut(oe,Pe){const He=bu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},cn=$u(H0(We,X(Pe.toString(),18),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t),oe.swapFee);return C((0,z.S5)(cn,18))}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){const He=bu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},cn=ac(We,Ma(X(Pe.toString(),18),oe.swapFee),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t,oe.swapFee);return C((0,z.S5)(cn,18))}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){const He=bu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},$t=Id(We,X(Pe.toString(),18),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t,oe.swapFee);return C((0,z.S5)($t,18))}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){const He=X(Pe.toString(),18),We=bu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=Au([Xe[0].add(Ma(He,oe.swapFee)),Xe[1]],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee);return C((0,z.S5)($t,18))}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){const He=bu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},xt=X(Pe.toString(),18),$t=x0([We[0],We[1].sub(xt)],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t,oe.swapFee);return C((0,z.S5)($t,18))}}function Yd(Je,oe,Pe){const He=oe.map(We=>(0,z.Ox)("1",We));return Je.map((We,Xe)=>Dr(We.mul(d.Ce).div(He[Xe]),Pe[Xe]))}const kd=au;class ql{constructor(oe,Pe,He,We,Xe,at,_t,xt,$t){this.poolType=Ce.GyroE,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.tokenRates=[X($t[0],18),X($t[1],18)],this.gyroEParams={alpha:X(_t.alpha,18),beta:X(_t.beta,18),c:X(_t.c,18),s:X(_t.s,18),lambda:X(_t.lambda,18)},this.derivedGyroEParams={tauAlpha:{x:X(xt.tauAlphaX,38),y:X(xt.tauAlphaY,38)},tauBeta:{x:X(xt.tauBetaX,38),y:X(xt.tauBetaY,38)},u:X(xt.u,38),v:X(xt.v,38),w:X(xt.w,38),z:X(xt.z,38),dSq:X(xt.dSq,38)}}static fromPool(oe){const{alpha:Pe,beta:He,c:We,s:Xe,lambda:at,tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni,tokenRates:Fi}=oe,Nr={alpha:Pe,beta:He,c:We,s:Xe,lambda:at},Ci={tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni};if(!Object.values(Nr).every(Wo=>Wo)||!Object.values(Ci).every(Wo=>Wo))throw new Error("Pool missing GyroE params and/or GyroE derived params");if(!Fi)throw new Error("GyroEV2 Pool missing tokenRates");return new ql(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,Nr,Ci,Fi)}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals,In=0===He;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:X(Xe,at),balanceOut:X($t,cn),swapFee:this.swapFee,tokenInIsToken0:In}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=oe.tokenInIsToken0?hd:Ad,In=Eo($t(this.gyroEParams,this.derivedGyroEParams,xt).sub($t(this.gyroEParams,this.derivedGyroEParams,xt,!0)).sub(We[0]),He[0]),Rn=Eo(In,d.Ce.sub(oe.swapFee));return C((0,z.S5)(Dr(Rn,ra),18))}return C((0,z.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,z.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=X(Pe.toString(),18),hr=Eo(n0(Xe,Dr(Ma($t,oe.swapFee),He[0]),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt),He[1]);return C((0,z.S5)(hr,18))}catch{return v}}_tokenInForExactTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=X(Pe.toString(),18),hr=$u(Eo(H0(Xe,Dr($t,He[1]),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt),He[0]),oe.swapFee);return C((0,z.S5)(hr,18))}catch{return v}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},In=Dr(Ma(X(Pe.toString(),18),oe.swapFee),He[0]),hr=Eo(Dr(ac(Xe,In,oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee),He[1]),He[0]);return C((0,z.S5)(hr,18))}catch{return v}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},cn=Dr(X(Pe.toString(),18),He[1]),Rn=Eo(Dr(Id(Xe,cn,oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee),He[1]),He[0]);return C((0,z.S5)(Rn,18))}catch{return v}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),We=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),Xe=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],We),at=au(Xe[0],Xe[1],oe.tokenInIsToken0),[_t,xt]=hc(at,this.gyroEParams,this.derivedGyroEParams),$t={x:_t.add(xt.mul(2)),y:_t},cn=Au([at[0].add(Ma(Dr(He,We[0]),oe.swapFee)),at[1]],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,$t,oe.swapFee),In=Dr(cn,We[1]);return C((0,z.S5)(In,18))}catch{return v}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=X(Pe.toString(),18),cn=x0([Xe[0],Xe[1].sub(Dr($t,He[1]))],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee),In=Eo(Dr(He[1],He[1]),He[0]),Rn=Dr(cn,In);return C((0,z.S5)(Rn,18))}catch{return v}}}const Ef=Je=>C(((BigInt((0,z.Ox)(Je,18).toString())+1n<<64n)/10n**18n*10n**36n>>64n).toString()).div(C(10).pow(18)).decimalPlaces(3,M.ROUND_UP),mn=(0,z.Ox)("1",36),$0=(0,z.Ox)("1",18),Cd=C(10).pow(36),sd=(0,z.Ox)("-0.000001000000000000024",36),vu=(0,z.Ox)("10000000000000",36),pd=(0,z.Ox)("0.25",36);var fo=(()=>{return(Je=fo||(fo={})).LowerHalt="CurveMath/lower-halt",Je.UpperHalt="CurveMath/upper-halt",Je.SwapInvariantViolation="CurveMath/swap-invariant-violation",Je.SwapConvergenceFailed="CurveMath/swap-convergence-failed",Je.CannotSwap="CannotSwap",fo;var Je})();const ff=Je=>"0x2791bca1f2de4661ed88a30c99a7a9449aa84174"==Je||"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"==Je||"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"==Je,_1=Je=>{const oe=Vf(X(Je.balanceIn.toString(),36),Je.decimalsIn,Je.tokenInLatestFXPrice,Je.tokenInfxOracleDecimals),Pe=Vf(X(Je.balanceOut.toString(),36),Je.decimalsOut,Je.tokenOutLatestFXPrice,Je.tokenOutfxOracleDecimals);return{tokenInReservesInNumeraire_36:oe,tokenOutReservesInNumeraire_36:Pe,_oGLiq_36:oe.add(Pe)}},yp=(Je,oe,Pe)=>{const He=ff(oe.tokenIn)?Vf(X(oe.balanceOut.toString(),36),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals):Vf(X(oe.balanceIn.toString(),36),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals),We=ff(oe.tokenIn)?Vf(X(oe.balanceIn.toString(),36),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals):Vf(X(oe.balanceOut.toString(),36),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals),Xe=ff(oe.tokenIn)?oe.tokenOutLatestFXPrice.mul(mn).div(X("1",oe.tokenOutfxOracleDecimals)):oe.tokenInLatestFXPrice.mul(mn).div(X("1",oe.tokenInfxOracleDecimals)),at=((Je,oe,Pe)=>{let He;return He=Je?Vf(X(Pe.toString(),oe.decimalsIn),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals):Vf(X(Pe.toString(),oe.decimalsOut),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals),He})(Pe,oe,Je);return{alpha_36:X(oe.alpha.toString(),18),beta_36:(0,z.Ox)(oe.beta.toString(),18),delta_36:(0,z.Ox)(oe.delta.toString(),18),epsilon_36:(0,z.Ox)(oe.epsilon.toString(),18),lambda_36:(0,z.Ox)(oe.lambda.toString(),18),baseTokenRate_36:Xe,_oGLiq_36:He.add(We),_nGLiq_36:He.add(We),_oBals_36:[We,He],_nBals_36:ff(oe.tokenIn)?[We.add(at),He.sub(at)]:[We.sub(at),He.add(at)],givenAmountInNumeraire_36:at}},$h=(Je,oe,Pe,He)=>X(Je.toString(),oe).div(mn).mul(X("1",He)).mul(mn).div(X(Pe.toString(),36)),Vf=(Je,oe,Pe,He)=>Je.mul(X(Pe.toString(),36)).div(mn).div(mn).div(X("1",He)).mul(mn).div(X("1",oe)),hf=(Je,oe,Pe,He)=>{let We,Xe,at=O.O$.from(0);return Je.lt(oe)?(We=oe.mul(mn.sub(Pe)).div(mn),Je.lt(We)?(Xe=We.sub(Je),at=Xe.mul(mn).div(oe),at=at.mul(He).div(mn),at.gt(pd)&&(at=pd),at=at.mul(Xe).div(mn)):at=O.O$.from(0)):(We=oe.mul(Pe.add(mn)).div(mn),Je.gt(We)?(Xe=Je.sub(We),at=Xe.mul(mn).div(oe),at=at.mul(He).div(mn),at.gt(pd)&&(at=pd),at=at.mul(Xe).div(mn)):at=O.O$.from(0)),at},pf=(Je,oe,Pe,He,We)=>{const Xe=oe.length;let at=O.O$.from(0);for(let _t=0;_t{const _t=[X("0.5",36),X("0.5",36)],xt=at.alpha_36,$t=at.beta_36,cn=at.delta_36,In=at.lambda_36;let Rn=We.mul(-1);const hr=pf(Je,Pe,$t,cn,_t);let jr;for(let ni=0;ni<32;ni++){jr=pf(oe,He,$t,cn,_t);const Fi=Rn;if(Rn=hr.lt(jr)?We.add(hr.sub(jr)).mul(-1):We.add(In.mul(hr.sub(jr)).div(mn)).mul(-1),Rn.mul(mn).div(vu).eq(Fi.mul(mn).div(vu)))return oe=Je.add(We).add(Rn),He[Xe]=Pe[Xe].add(Rn),tm(Je,oe,Pe,He,_t,xt),Kp(Je,hr,oe,jr),[Rn,oe];oe=Je.add(We).add(Rn),He[Xe]=Pe[Xe].add(Rn)}throw new Error(fo.SwapConvergenceFailed)},tm=(Je,oe,Pe,He,We,Xe)=>{const at=He.length;for(let _t=0;_t{const We=Pe.sub(He),Xe=Je.sub(oe),at=We.sub(Xe);if(at.gt(0)||at.gte(sd))return!0;throw new Error(fo.SwapInvariantViolation)};function o0(Je,oe){const Pe=yp(X(Je.toString(),36),oe,!0),He=Pe.givenAmountInNumeraire_36;if(oe.tokenIn===oe.tokenOut)return C($h(He,oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsIn));const xt=Md(Pe._oGLiq_36,Pe._nGLiq_36,Pe._oBals_36,Pe._nBals_36,He,ff(oe.tokenIn)?1:0,Pe);if(void 0===xt)throw new Error(fo.CannotSwap);{const cn=xt[0].mul(mn.sub(Pe.epsilon_36)).div(mn);return C($h(cn.abs(),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsOut))}}function Zp(Je,oe){const Pe=yp(X(Je.toString(),36),oe,!1),He=Pe.givenAmountInNumeraire_36.mul(-1);oe.tokenIn===oe.tokenOut&&C($h(He,oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsOut));const We=Md(Pe._oGLiq_36,Pe._nGLiq_36,Pe._oBals_36,Pe._nBals_36,He,ff(oe.tokenIn)?0:1,Pe);if(void 0===We)throw new Error(fo.CannotSwap);{const Xe=X(oe.epsilon.toString(),18),at=We[0].mul(mn.add(Xe)).div(mn);return C($h(at.abs(),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsIn))}}const Iu=(Je,oe)=>{const Pe=yp(Je,oe,!0);return C(Md(Pe._oGLiq_36,Pe._nGLiq_36,Pe._oBals_36,Pe._nBals_36,(0,z.Ox)("1",36),0,Pe)[0].abs().mul(mn.sub(Pe.epsilon_36)).div(mn).mul(Pe.baseTokenRate_36).div(mn).toString()).div(Cd)},Tf=(Je,oe)=>{const Pe=X(oe.toString(),36),He=yp(Pe,Je,!0),We=He.givenAmountInNumeraire_36,Xe=He._oGLiq_36,at=He._nBals_36,_t=He.baseTokenRate_36,xt=He.beta_36,$t=He.epsilon_36,hr=Md(Xe,He._nGLiq_36,He._oBals_36,at,We,ff(Je.tokenIn)?1:0,He)[0],jr=xt.add(mn).div(2).mul(Xe).div(mn),ni=mn.sub(xt).div(2).mul(Xe).div(mn);if(ff(Je.tokenIn)){const Fi=at[0];return at[1].lt(ni)&&Fi.gt(jr)?oe.isZero()?Iu(Pe,Je):C(hr.mul(mn.sub($t)).abs().div(We.abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.mul(mn.sub($t)).div(mn).toString()).div(Cd)}{const Fi=at[1];return at[0].lt(ni)&&Fi.gt(jr)?oe.isZero()?Iu(Pe,Je):C(hr.mul(mn.sub($t)).abs().div(We.abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.toString()).div(mn.toString()).times(C(1).minus(C($t.toString()).div(Cd)))}},E0=(Je,oe)=>{const Pe=X(oe.toString(),36),He=yp(Pe,Je,!1),We=He.givenAmountInNumeraire_36.mul(-1),Xe=He._oGLiq_36,at=He._nBals_36,_t=He.baseTokenRate_36,xt=He.beta_36,$t=He.epsilon_36,hr=Md(Xe,He._nGLiq_36,He._oBals_36,at,We,ff(Je.tokenIn)?0:1,He)[0],jr=xt.add(mn).div(2).mul(Xe).div(mn),ni=mn.sub(xt).div(2).mul(Xe).div(mn);if(ff(Je.tokenIn)){const Fi=at[0];return at[1].lt(ni)&&Fi.gt(jr)?C(We.abs().mul(mn).div(hr.mul($t.add(mn)).div(mn).abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.mul(mn.sub($t)).div(mn).toString()).div(Cd)}{const Nr=at[1],Ci=at[0].lt(ni),Wo=Nr.gt(jr);return Ci&&Wo?C(We.abs().mul(mn).div(hr.mul($t.add(mn)).div(mn).abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.mul(mn.sub($t)).div(mn).toString()).div(Cd)}},W0=(Je,oe)=>{const Pe=Iu((0,z.Ox)("1",36),oe),Xe=Tf(oe,Je).minus(Pe).div(Pe);return Xe.isZero()?C(1).div($0.toString()):Xe.abs()},Af=(Je,oe)=>{const Pe=Iu((0,z.Ox)("1",36),oe);return E0(oe,Je).minus(Pe).div(Pe).abs()};var Od=Object.freeze({__proto__:null,ONE_36:mn,ONE_18:$0,OLD_ONE_36:Cd,CURVEMATH_MAX_DIFF_36:sd,ONE_TO_THE_THIRTEEN_NUM_36:vu,get CurveMathRevert(){return fo},poolBalancesToNumeraire:_1,viewRawAmount:$h,viewNumeraireAmount:Vf,_exactTokenInForTokenOut:o0,_tokenInForExactTokenOut:Zp,spotPriceBeforeSwap:Iu,_spotPriceAfterSwapExactTokenInForTokenOut:Tf,_spotPriceAfterSwapTokenInForExactTokenOut:E0,_derivativeSpotPriceAfterSwapExactTokenInForTokenOut:W0,_derivativeSpotPriceAfterSwapTokenInForExactTokenOut:Af});class ol{constructor(oe,Pe,He,We,Xe,at,_t,xt,$t,cn,In){this.poolType=Ce.Fx,this.id=oe,this.address=Pe,this.swapFee=(0,z.Ox)(He,18),this.totalShares=(0,z.Ox)(We,18),this.tokens=Xe,this.tokensList=at,this.alpha=Ef(_t),this.beta=Ef(xt),this.lambda=Ef($t),this.delta=C((0,z.Ox)(cn,18).toString()),this.epsilon=Ef(In)}static fromPool(oe){if(!(oe.alpha&&oe.beta&&oe.lambda&&oe.delta&&oe.epsilon))throw new Error("FX Pool Missing Subgraph Field");return new ol(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.alpha,oe.beta,oe.lambda,oe.delta,oe.epsilon)}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(Rn=>(0,E.getAddress)(Rn.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(Rn=>(0,E.getAddress)(Rn.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals;if(!xt.token?.latestFXPrice||!We.token?.latestFXPrice)throw"FX Pool Missing LatestFxPrice";return null==xt.token?.fxOracleDecimals&&(xt.token.fxOracleDecimals=8),null==We.token?.fxOracleDecimals&&(We.token.fxOracleDecimals=8),{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:(0,z.Ox)(Xe,at),balanceOut:(0,z.Ox)($t,cn),swapFee:this.swapFee,alpha:this.alpha,beta:this.beta,lambda:this.lambda,delta:this.delta,epsilon:this.epsilon,tokenInLatestFXPrice:(0,z.Ox)(We.token.latestFXPrice,We.token.fxOracleDecimals),tokenOutLatestFXPrice:(0,z.Ox)(xt.token.latestFXPrice,xt.token.fxOracleDecimals),tokenInfxOracleDecimals:We.token.fxOracleDecimals,tokenOutfxOracleDecimals:xt.token.fxOracleDecimals}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){return this._inHigherPrecision(this._getLimitAmountSwap,oe,Pe)}_getLimitAmountSwap(oe,Pe){try{const He=_1(oe),Xe=X(oe.alpha.toString(),18).add(mn).mul(He._oGLiq_36).div(mn).div(2);if(Pe===xe.SwapExactIn){const at=Xe.sub(He.tokenInReservesInNumeraire_36.toString());return C($h(at,oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsIn))}{const at=Xe.sub(He.tokenOutReservesInNumeraire_36);return C($h(at,oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsOut))}}catch{return v}}updateTokenBalanceForPool(oe,Pe){if(this.address==oe)this.totalShares=Pe;else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,z.S5)(Pe,He.decimals)}}_exactTokenInForTokenOut(oe,Pe){try{return this._inHigherPrecision(o0,Pe,oe)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){try{return this._inHigherPrecision(Zp,Pe,oe)}catch{return v}}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{return this._inHigherPrecision(Tf,oe,Pe)}catch{return v}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{return this._inHigherPrecision(E0,oe,Pe)}catch{return v}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{return this._inHigherPrecision(W0,Pe,oe)}catch{return v}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{return this._inHigherPrecision(Af,Pe,oe)}catch{return v}}_inHigherPrecision(oe,...Pe){const He=M.config({}).DECIMAL_PLACES;M.config({DECIMAL_PLACES:36});try{const We=oe.apply(this,Pe);return M.config({DECIMAL_PLACES:He}),We}catch(We){throw M.config({DECIMAL_PLACES:He}),We}}}function vh(Je,oe=0){if(!Je.swapEnabled)return;let Pe;try{const He=Je.poolType.toString().includes("Linear");if(!He&&!(Je.poolType in ke))return void console.error(`Unsupported pool type: ${Je.poolType} ${Je.id}`);if("Weighted"===Je.poolType||"Investment"===Je.poolType)Pe=Kn.fromPool(Je,!1);else if("LiquidityBootstrapping"===Je.poolType)Pe=Kn.fromPool(Je,!0);else if("Stable"===Je.poolType)Pe=ja.fromPool(Je);else if("MetaStable"===Je.poolType)Pe=xa.fromPool(Je);else if("Element"===Je.poolType)Pe=Rs.fromPool(Je),Pe.setCurrentBlockTimestamp(oe);else if(He)Pe=rr.fromPool(Je);else if("StablePhantom"===Je.poolType)Pe=Ji.fromPool(Je);else if("ComposableStable"===Je.poolType)Pe=lo.fromPool(Je);else if("Gyro2"===Je.poolType)Pe=Ti.fromPool(Je);else if("Gyro3"===Je.poolType)Pe=Fo.fromPool(Je);else if("GyroE"===Je.poolType)Pe=2===Je.poolTypeVersion?ql.fromPool(Je):r0.fromPool(Je);else{if("FX"!==Je.poolType)return void console.error(`Unknown pool type or type field missing: ${Je.poolType} ${Je.id}`);Pe=ol.fromPool(Je)}}catch(He){return void console.error(`parseNewPool: ${He.message}`)}return Pe}function mf(Je,oe,Pe,He){return Pe===xe.SwapExactIn?oe.poolType!==Ce.Linear&&oe.balanceIn.isZero()?v:Je._exactTokenInForTokenOut(oe,He):oe.balanceOut.isZero()?v:N(He,oe.decimalsOut).gte(oe.balanceOut.toString())?D:Je._tokenInForExactTokenOut(oe,He)}let pl="0.00001";try{pl=process.env.PRICE_ERROR_TOLERANCE||"0.00001"}catch(Je){console&&console.log(Je)}const Yp=new M(pl),md=new M("0.01"),If=C("0.000000000000000001");function Il(Je,oe,Pe,He){if(Pe.gt(C((0,z.S5)(Je.limitAmount,He))))return oe===xe.SwapExactIn?v:D;const We=Wh(Je,oe,Pe);return oe===xe.SwapExactIn?We[We.length-1]:We[0]}function Wh(Je,oe,Pe){const He=Je.pools,We=Je.poolPairData,Xe=[Pe];if(oe===xe.SwapExactIn)for(let at=0;at{let[_t,xt]=Sl(Je,oe,He,We,Xe,at),$t=He;if(1===He.length)return{swapAmounts:$t,paths:_t};const cn=C((0,z.S5)(Pe,We));let In=_t;const Rn=[];let hr=JSON.stringify(In.map(({id:jr})=>jr).sort());for(;!Rn.includes(hr)&&(Rn.push(hr),_t=In,[$t,xt]=u0(_t,oe,cn,$t,xt),[In,xt]=Sl(Je,oe,$t,We,Xe,at),0!==In.length);){const jr=In.map(({id:ni})=>ni).sort();hr=JSON.stringify(jr)}return{swapAmounts:$t,paths:_t}};function Sl(Je,oe,Pe,He,We,Xe){const at=[],_t=[],xt=b(Je);return[...Pe].sort((cn,In)=>In.minus(cn).toNumber()).forEach(cn=>{let In=-1,Rn=D;if(xt.forEach((hr,jr)=>{if(C((0,z.S5)(hr.limitAmount,He)).gte(cn)){let ni;ni=C((0,z.S5)(hr.limitAmount,He)).eq(cn)?D:function(Je,oe,Pe,He,We,Xe){if(Pe.lt(md))return rc(Je,oe,Pe);let at=Il(Je,oe,Pe,He);const _t=C((0,z.S5)(Xe,We)).times(Je.pools.length);return oe===xe.SwapExactIn?(at=at.minus(_t),Pe.div(at)):(Pe=Pe.plus(_t),at.div(Pe))}(hr,oe,cn,He,We,Xe),ni.lte(Rn)&&(Rn=ni,In=jr)}}),-1===In)return at.push({id:"",swaps:[],poolPairData:[],limitAmount:O.O$.from("0"),pools:[]}),void _t.push(v);at.push(xt[In]),_t.push(cn.minus(C((0,z.S5)(xt[In].limitAmount,He)))),xt.splice(In,1)}),[at,_t]}function u0(Je,oe,Pe,He,We){let Xe=k,at=[],_t=0;for(;Xe.isGreaterThan(Yp);){[at,He,We]=Pd(Je,oe,Pe,He,We,_t);const xt=M.max.apply(null,at),$t=M.min.apply(null,at);if(Xe=xt.minus($t).div($t),_t++,_t>100)break}return[He,We]}function Pd(Je,oe,Pe,He,We,Xe){let at=v,_t=v;const xt=[],$t=[];He.forEach((jr,ni)=>{if(0==Xe&&jr.gte(v)&&We[ni].lte(v)||0!=Xe&&jr.gt(v)&&We[ni].lt(v)){const Fi=Je[ni],Nr=rc(Fi,oe,jr);xt.push(Nr);const Ci=function(Je,oe,Pe){const He=Je.poolPairData,We=Je.pools,Xe=We.length,at=Wh(Je,oe,Pe),_t=Nl(Je,oe,at);let xt=C(0);if(oe===xe.SwapExactIn)for(let $t=0;$t{if(0==Xe&&jr.gte(v)&&We[ni].lte(v)||0!=Xe&&jr.gt(v)&&We[ni].lt(v)){const Fi=cn.minus(xt[ni]).div($t[ni]);He[ni]=He[ni].plus(Fi),We[ni]=We[ni].plus(Fi)}});M.min.apply(null,He).lt(v)||M.max.apply(null,We).gt(v);)[He,We]=T0(He,We,$t);const In=[];let Rn=v;He.forEach((jr,ni)=>{Rn=Rn.plus(jr),(0==Xe&&jr.gte(v)&&We[ni].lte(v)||0!=Xe&&jr.gt(v)&&We[ni].lt(v))&&In.push(rc(Je[ni],oe,jr))});const hr=Pe.minus(Rn);for(let jr=0;jr{_t.lte(v)?(at=at.plus(_t),We=We.plus(k.div(Pe[xt]))):oe[xt].gte(v)?(at=at.plus(oe[xt]),Xe=Xe.plus(k.div(Pe[xt]))):He=He.plus(k.div(Pe[xt]))}),Je.forEach((_t,xt)=>{if(_t.lte(v))Je[xt]=v,oe[xt]=oe[xt].minus(_t);else if(oe[xt].gte(v))Je[xt]=Je[xt].minus(oe[xt]),oe[xt]=v;else{const $t=at.times(k.div(Pe[xt])).div(He);Je[xt]=Je[xt].plus($t),oe[xt]=oe[xt].plus($t)}}),He.isZero()&&(at.lt(v)?Je.forEach((_t,xt)=>{if(oe[xt].isZero()){const $t=at.times(k.div(Pe[xt])).div(Xe);Je[xt]=Je[xt].plus($t),oe[xt]=oe[xt].plus($t)}}):Je.forEach((_t,xt)=>{if(Je[xt].isZero()){const $t=at.times(k.div(Pe[xt])).div(We);Je[xt]=Je[xt].plus($t),oe[xt]=oe[xt].plus($t)}})),[Je,oe]}const gd=(Je,oe,Pe,He)=>{let We=new M(0);return Je.forEach((Xe,at)=>{We=We.plus(Il(Xe,oe,Pe[at],He))}),We};var vp=[{inputs:[{internalType:"contract IAuthorizer",name:"authorizer",type:"address"},{internalType:"contract IWETH",name:"weth",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"AuthorizerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExternalBalanceTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"delta",type:"int256"}],name:"InternalBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"liquidityProvider",type:"address"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"deltas",type:"int256[]"},{indexed:!1,internalType:"uint256[]",name:"protocolFeeAmounts",type:"uint256[]"}],name:"PoolBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"assetManager",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"cashDelta",type:"int256"},{indexed:!1,internalType:"int256",name:"managedDelta",type:"int256"}],name:"PoolBalanceManaged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"PoolRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"RelayerApprovalChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"contract IERC20",name:"tokenIn",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"amountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountOut",type:"uint256"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"TokensDeregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"TokensRegistered",type:"event"},{inputs:[],name:"WETH",outputs:[{internalType:"contract IWETH",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"assetDeltas",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"deregisterTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"getInternalBalance",outputs:[{internalType:"uint256[]",name:"balances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"enum IVault.PoolSpecialization",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPoolTokenInfo",outputs:[{internalType:"uint256",name:"cash",type:"uint256"},{internalType:"uint256",name:"managed",type:"uint256"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"assetManager",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPoolTokens",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract ProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"relayer",type:"address"}],name:"hasApprovedRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.PoolBalanceOpKind",name:"kind",type:"uint8"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct IVault.PoolBalanceOp[]",name:"ops",type:"tuple[]"}],name:"managePoolBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"}],name:"queryBatchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"registerPool",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"registerTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"setAuthorizer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setRelayerApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"amountCalculated",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];const c0={tokenAddresses:[],swaps:[],swapAmount:d._Y,swapAmountForSwaps:d._Y,tokenIn:"",tokenInForSwaps:"",tokenOut:"",tokenOutFromSwaps:"",returnAmount:d._Y,returnAmountConsideringFees:d._Y,returnAmountFromSwaps:d._Y,marketSp:d._Y.toString()},yr={Networks:[1,42],stETH:{1:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",42:"0x4803bb90d18a1cb7a2187344fe4feb0e07878d05"},wstETH:{1:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",42:"0xa387b91e393cfb9356a460370842bc8dbb2f29af"},WETH:{1:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",42:"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1"},DAI:{1:"0x6b175474e89094c44da98b954eedeac495271d0f",42:"0x04df6e4121c27713ed22341e7c7df330f56f289b"},USDC:{1:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",42:"0xc2569dd7d0fd715b054fbf16e75b001e5c0c1115"},USDT:{1:"0xdac17f958d2ee523a2206206994597c13d831ec7",42:"0xcc08220af469192c53295fdd34cfb8df29aa17ab"},StaticPools:{staBal:{1:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",42:"0x45f78862bd3aa5205e63141fa7f2d35f38eb87c30000000000000000000000fd"},wethDai:{1:"0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a",42:"0x3a19030ed746bd1c3f2b0f996ff9479af04c5f0a000200000000000000000004"},wstEthWeth:{1:"0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080",42:"0xe08590bde837eb9b2d42aa1196469d6e08fe96ec000200000000000000000101"}}},Oa={1:{},42:{}};function pc(Je,oe,Pe,He){return Wf.apply(this,arguments)}function Wf(){return(Wf=(0,ie.Z)(function*(Je,oe,Pe,He){const Xe=new f.Contract("0xBA12222222228d8Ba445958a75a0704d566BF2C8",vp,He),at={sender:x.d,recipient:x.d,fromInternalBalance:!1,toInternalBalance:!1};try{const _t=yield Xe.callStatic.queryBatchSwap(Je,oe,Pe,at);return Je===xe.SwapExactIn?_t[Pe.length-1].mul(-1):_t[0]}catch{return console.error("SOR - Lido Static Route QueryBatchSwap Error. No swaps."),d._Y}})).apply(this,arguments)}function w1(Je,oe,Pe,He){const We=[];for(let Xe=0;XeIn.id===at.poolId);if(1!==_t.length)return C(0);const xt=vh(_t[0]);if(!xt)return C(0);const $t=xt.parsePoolPairData(Pe[at.assetInIndex],Pe[at.assetOutIndex]);let cn;cn=Je===xe.SwapExactIn?xt._spotPriceAfterSwapExactTokenInForTokenOut($t,v):xt._spotPriceAfterSwapTokenInForExactTokenOut($t,v),We.push(cn)}return We.reduce((Xe,at)=>Xe.times(at))}function Yn(Je,oe){return Jd.apply(this,arguments)}function Jd(){return(Jd=(0,ie.Z)(function*(Je,oe){return yield new f.Contract(yr.wstETH[oe],["function tokensPerStEth() external view returns (uint256)"],Je).tokensPerStEth()})).apply(this,arguments)}function yd(){return(yd=(0,ie.Z)(function*(Je,oe,Pe,He,We,Xe,at){let _t,xt=!1;Pe===yr.stETH[oe]&&(Pe=yr.wstETH[oe],_t=!0),He===yr.stETH[oe]&&(He=yr.wstETH[oe],xt=!0);const $t=b(c0),cn=Oa[oe][`${Pe}${He}${We}`];return cn?($t.tokenAddresses=cn.tokenAddresses,$t.swaps=cn.swaps,$t.swapAmount=Xe,$t.swaps[0].amount=$t.swapAmount.toString(),$t.tokenIn=_t?yr.stETH[oe]:Pe,$t.tokenOut=xt?yr.stETH[oe]:He,$t.marketSp=w1(We,$t.swaps,$t.tokenAddresses,Je).toString(),$t.returnAmount=yield pc(We,$t.swaps,$t.tokenAddresses,at),$t.returnAmount.isZero()?b(c0):($t.returnAmountConsideringFees=$t.returnAmount,$t)):$t})).apply(this,arguments)}Oa[1][`${yr.DAI[1]}${yr.wstETH[1]}0`]={name:"DAI/wstETH-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wethDai[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.DAI[1]}0`]={name:"wstETH/DAI-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[1][`${yr.DAI[1]}${yr.wstETH[1]}1`]={name:"DAI/wstETH-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.DAI[1]}1`]={name:"wstETH/DAI-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1]],swaps:[{poolId:yr.StaticPools.wethDai[1],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.USDC[1]}${yr.wstETH[1]}0`]={name:"USDC/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.USDC[1]}${yr.wstETH[1]}1`]={name:"USDC/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDC[1]}0`]={name:"wstETH/USDC-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDC[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDC[1]}1`]={name:"wstETH/USDC-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDC[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.USDT[1]}${yr.wstETH[1]}0`]={name:"USDT/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.USDT[1]}${yr.wstETH[1]}1`]={name:"USDT/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDT[1]}0`]={name:"wstETH/USDT-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDT[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDT[1]}1`]={name:"wstETH/USDT-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDT[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.USDC[42]}${yr.wstETH[42]}0`]={name:"USDC/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wethDai[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDC[42]}0`]={name:"wstETH/USDC-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[42][`${yr.USDC[42]}${yr.wstETH[42]}1`]={name:"USDC/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDC[42]}1`]={name:"wstETH/USDC-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42]],swaps:[{poolId:yr.StaticPools.wethDai[42],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.DAI[42]}${yr.wstETH[42]}0`]={name:"DAI/wstETH-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.DAI[42]}${yr.wstETH[42]}1`]={name:"DAI/wstETH-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.DAI[42]}0`]={name:"wstETH/DAI-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.DAI[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.DAI[42]}1`]={name:"wstETH/DAI-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.DAI[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.USDT[42]}${yr.wstETH[42]}0`]={name:"USDT/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.USDT[42]}${yr.wstETH[42]}1`]={name:"USDT/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDT[42]}0`]={name:"wstETH/USDT-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.USDT[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDT[42]}1`]={name:"wstETH/USDT-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.USDT[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]};const bd={Networks:[1],1:{"0xd46ba6d942050d489dbd938a2c909a5d5039a161":"0xedb171c18ce90b633db442f2a6f72874093b49ef","0x1e6bb68acec8fefbd87d192be09bb274170a0548":"0xF03387d8d0FF326ab586A58E0ab4121d106147DF"}};function Zl(Je,oe){return A0.apply(this,arguments)}function A0(){return(A0=(0,ie.Z)(function*(Je,oe){return new f.Contract(oe,["function underlyingToWrapper(uint256 amount) external view returns (uint256)"],Je).underlyingToWrapper(d.Ce)})).apply(this,arguments)}var No=(()=>{return(Je=No||(No={}))[Je.None=0]="None",Je[Je.ETH=1]="ETH",Je[Je.stETH=2]="stETH",Je[Je.Unbutton=3]="Unbutton",No;var Je})();function l0(){return(l0=(0,ie.Z)(function*(Je,oe,Pe,He,We,Xe){Pe=Pe.toLowerCase(),He=He.toLowerCase();let at=Xe,_t=Pe,xt=No.None,$t=He,cn=No.None,In=d.Ce,Rn=d.Ce;if(Pe===x.d&&(_t=We.weth.toLowerCase(),xt=No.ETH),He===x.d&&($t=We.weth.toLowerCase(),cn=No.ETH),Pe===yr.stETH[We.chainId]){_t=yr.wstETH[We.chainId],xt=No.stETH;const jr=yield Yn(Je,We.chainId);In=jr,oe===xe.SwapExactIn&&(at=Xe.mul(jr).div(d.Ce))}if(He===yr.stETH[We.chainId]){$t=yr.wstETH[We.chainId],cn=No.stETH;const jr=yield Yn(Je,We.chainId);Rn=jr,oe===xe.SwapExactOut&&(at=Xe.mul(jr).div(d.Ce))}const hr=bd[We.chainId]||{};return hr[Pe]&&(_t=hr[Pe],xt=No.Unbutton,In=yield Zl(Je,_t),oe===xe.SwapExactIn&&(at=Xe.mul(In).div(d.Ce))),hr[He]&&($t=hr[He],cn=No.Unbutton,Rn=yield Zl(Je,$t),oe===xe.SwapExactOut&&(at=Xe.mul(Rn).div(d.Ce))),{swapAmountOriginal:Xe,swapAmountForSwaps:at,tokenIn:{addressOriginal:Pe,addressForSwaps:_t,wrapType:xt,rate:In},tokenOut:{addressOriginal:He,addressForSwaps:$t,wrapType:cn,rate:Rn}}})).apply(this,arguments)}const qc=Je=>[...new Set(Je.flatMap(Pe=>[Pe.tokenIn,Pe.tokenOut]))],Rd=(Je,oe,Pe)=>(Je===xe.SwapExactOut&&(oe=oe.reverse()),oe.map((He,We)=>{let Xe="0";if(0===We){const cn=Je===xe.SwapExactIn?He.tokenInDecimals:He.tokenOutDecimals;Xe=N(C(He.swapAmount),cn).decimalPlaces(0,1).toString()}const at=Je===xe.SwapExactIn?He.tokenOutDecimals:He.tokenInDecimals,_t=N(C(He.returnAmount??"0"),at).decimalPlaces(0,1).toString(),xt=Pe.indexOf(He.tokenIn),$t=Pe.indexOf(He.tokenOut);return{poolId:He.pool,assetInIndex:xt,assetOutIndex:$t,amount:Xe,userData:"0x",returnAmount:_t}}));class G0{constructor(oe){this.poolDataService=oe,this.pools=[],this._finishedFetching=!1}get finishedFetching(){return this._finishedFetching}getPools(oe){const Pe=b(this.pools);if(oe)for(const He of Pe)"Weighted"!==He.poolType&&"Investment"!==He.poolType||(He.tokens.push({address:He.address,balance:He.totalShares,decimals:18,priceRate:"1",weight:"0"}),He.tokensList.push(He.address));return Pe}fetchPools(oe,Pe){var He=this;return(0,ie.Z)(function*(){try{return He.pools=yield He.poolDataService.getPools(oe,Pe),He._finishedFetching=!0,!0}catch(We){return He._finishedFetching=!1,He.pools=[],console.error(`Error: fetchPools(): ${We}`),!1}})()}}function Gh(Je,oe,Pe,He){const We={},Xe={},at={};return Object.keys(Je).forEach(_t=>{const xt=Je[_t],$t=new Set(xt.tokensList),cn=$t.has(oe.toLowerCase()),In=$t.has(Pe.toLowerCase());if(cn&&In)We[xt.id]=xt;else if(He>1)if(cn&&!In)for(const Rn of $t)Xe[Rn]||(Xe[Rn]=new Set([])),Xe[Rn].add(xt.id);else if(!cn&&In)for(const Rn of[...$t])at[Rn]||(at[Rn]=new Set([])),at[Rn].add(xt.id)}),[We,Xe,at]}function d0(Je,oe,Pe,He,We,Xe){const at=[];for(const _t in Pe){const xt=f0([Je,oe],[Xe[_t]]);at.push(xt)}for(const _t in He)if(We[_t]){let $t,In,xt=v,cn=v;for(const Rn of[...He[_t]]){const hr=Xe[Rn],jr=hr.parsePoolPairData(Je,_t),ni=hr.getNormalizedLiquidity(jr);ni.isGreaterThanOrEqualTo(xt)&&(xt=ni,$t=hr.id)}for(const Rn of[...We[_t]]){const hr=Xe[Rn],jr=hr.parsePoolPairData(_t,oe),ni=hr.getNormalizedLiquidity(jr);ni.isGreaterThanOrEqualTo(cn)&&(cn=ni,In=hr.id)}if($t&&In){const Rn=f0([Je,_t,oe],[Xe[$t],Xe[In]]);at.push(Rn)}}return at}function zh(Je,oe,Pe,He){const We=function(Je,oe,Pe,He){const We=new Set,Xe=[],at=[],_t=He.connectingTokens?He.connectingTokens.map(In=>In.address):[];for(const In in Pe){const Rn=Pe[In];Rn.poolType==Ce.Linear?(Xe.push(Rn.address),We.add(Rn)):((Rn.tokensList.map(jr=>jr.toLowerCase()).includes(Rn.address)||Rn.poolType===Ce.Weighted)&&at.push(Rn),He.lbpRaisingTokens&&Rn.isLBP&&Bd(We,He.lbpRaisingTokens,Rn,Je,oe,_t,Pe))}if(0==Xe.length)return{};for(const In of _t)q0(Je,In,Pe,We),q0(In,oe,Pe,We);const xt=new Set;for(const In of at)In.tokensList.some(Rn=>Xe.includes(Rn))&&(We.add(In),xt.add(In.address));for(const In in Pe){const Rn=Pe[In];Rn.tokensList.some(hr=>xt.has(hr))&&We.add(Rn)}return He.wETHwstETH&&Pe[He.wETHwstETH.id]&&We.add(Pe[He.wETHwstETH.id]),function(Je){const oe={};for(const Pe of Je){const He=Pe.tokensList.length;for(let We=0;Weoe[Xe]);We.length>2&&Pe.push(f0(He[0],We))}return Pe}(Xe,Pe)}function xp(Je,oe,Pe){const He=[Je];He.unshift(oe.edge);let We=oe.parentIndices;for(;-1!==We[0];)He.unshift(Pe[We[0]][We[1]].edge),We=Pe[We[0]][We[1]].parentIndices;const Xe=He.map(_t=>_t[0]);return Xe.splice(0,1),[He.map(_t=>_t[2]),Xe]}function f0(Je,oe){let Pe,He;const We=[],Xe=[];let at="";for(let xt=0;xtPe.tokensList.length>0&&"0"!==Pe.tokens[0].balance).map(Pe=>[Pe.id,vh(Pe,oe)]).filter(([,Pe])=>void 0!==Pe))}function qh(Je,oe,Pe){let He;const We=Je.tokensList;if(We.includes(Pe)&&!oe.includes(Pe))for(let Xe=0;Xe<2;Xe++)We[Xe]==Pe&&(He=We[1-Xe]);return He}function Bd(Je,oe,Pe,He,We,Xe,at){const _t=oe.map(cn=>cn.toLowerCase());if(0===_t.length)return;const xt=qh(Pe,_t,He),$t=qh(Pe,_t,We);if(xt||$t){Je.add(Pe);for(const cn of Xe)xt&&xt!==cn&&q0(xt,cn,at,Je),$t&&$t!==cn&&q0(cn,$t,at,Je)}}function q0(Je,oe,Pe,He){const We=Gf(Je,oe,Pe);We&&He.add(Pe[We])}function T1(Je,oe){let Pe=d._Y;return Je.forEach(We=>{We.limitAmount=function(Je,oe){const Pe=Je.poolPairData;let He;if(oe===xe.SwapExactIn){He=Je.pools[Pe.length-1].getLimitAmountSwap(Pe[Pe.length-1],xe.SwapExactIn);for(let Xe=Pe.length-2;Xe>=0;Xe--){const at=Je.pools[Xe].getLimitAmountSwap(Pe[Xe],xe.SwapExactIn);if(Je.pools[Xe].getLimitAmountSwap(Pe[Xe],xe.SwapExactOut).lte(He))He=at;else{const xt=mf(Je.pools[Xe],Je.poolPairData[Xe],xe.SwapExactOut,He);He=M.min(xt,at)}}return He.isZero()?d._Y:(0,z.Ox)(He.dp(Pe[0].decimalsIn).toString(),Pe[0].decimalsIn)}He=Je.pools[0].getLimitAmountSwap(Pe[0],xe.SwapExactOut);for(let We=1;WeXe.limitAmount.gt(We.limitAmount)?1:-1),Pe]}class Fl{constructor(oe){this.config=oe,this.cache={}}getCandidatePaths(oe,Pe,He,We,Xe){if(oe=oe.toLowerCase(),Pe=Pe.toLowerCase(),0===We.length)return[];const at=this.cache[`${oe}${Pe}${He}${Xe.timestamp}`];if(!Xe.forceRefresh&&at)return at.paths;const _t=kl(We,Xe.timestamp),[xt,$t,cn]=Gh(_t,oe,Pe,Xe.maxPools),In=d0(oe,Pe,xt,$t,cn,_t),Rn=zh(oe,Pe,_t,this.config),hr=function(Je,oe,Pe,He,We){const Xe=We.usdcConnectingPool;if(!Xe)return[];const at=Pe[Xe.id],_t=We.staBal3Pool?.address;if(!at||!_t)return[];const xt=Gf(Je,_t,He),$t=Gf(_t,oe,He);if(xt&&!$t){const In=f0([Je,_t,Xe.usdc],[He[xt],at]),Rn=Gf(Xe.usdc,oe,He);return null===Rn?[]:[E1([In,f0([Xe.usdc,oe],[He[Rn]])])]}if(!xt&&$t){const cn=Gf(Je,Xe.usdc,He);if(null===cn)return[];const Rn=He[cn],hr=f0([Xe.usdc,_t,oe],[at,He[$t]]);return[E1([f0([Je,Xe.usdc],[Rn]),hr])]}return[]}(oe,Pe,_t,_t,this.config),jr=function(Je,oe,Pe,He){const We=[];return He.forEach(Xe=>{const at=function(Je,oe,Pe,He){const We=function(Je,oe,Pe,He){const We=Pe[He];return!We||We.tokensList.some(Xe=>Xe.toLowerCase()===Je.toLowerCase()||Xe.toLowerCase()===oe.toLowerCase())?null:We}(Je,oe,Pe,He);if(null===We)return[];const Xe=function(Je,oe,Pe,He){const We=He.tokensList.map(Xe=>({token:Xe,mostLiquidPoolIn:null,mostLiquidPoolOut:null}));return We.forEach(Xe=>{const at=Gf(Je,Xe.token,Pe),_t=Gf(Xe.token,oe,Pe);Xe.mostLiquidPoolIn=at?Pe[at]:null,Xe.mostLiquidPoolOut=_t?Pe[_t]:null}),We}(Je,oe,Pe,We);return function(Je,oe,Pe,He){const We=[];return Pe.forEach((Xe,at)=>{const _t=Xe.mostLiquidPoolIn;_t&&[...Pe.slice(0,at),...Pe.slice(at+1)].forEach($t=>{$t.mostLiquidPoolOut&&We.push(f0([Je,Xe.token,$t.token,oe],[_t,He,$t.mostLiquidPoolOut]))})}),We}(Je,oe,Xe,We)}(Je,oe,Pe,Xe);We.push(...at)}),We}(oe,Pe,_t,this.config.triPathMidPoolIds??[]),ni=In.concat(...Rn).concat(...hr).concat(...jr),[Fi]=T1(ni,He);return this.cache[`${oe}${Pe}${He}${Xe.timestamp}`]={paths:Fi},Fi}getCandidatePathsFromDict(oe,Pe,He,We,Xe){if(oe=oe.toLowerCase(),Pe=Pe.toLowerCase(),0===Object.keys(We).length)return[];const[at,_t,xt]=Gh(We,oe,Pe,Xe),$t=d0(oe,Pe,at,_t,xt,We),cn=zh(oe,Pe,We,this.config),In=$t.concat(...cn),[Rn]=T1(In,He);return Rn}}class zf{constructor(oe,Pe){this.tokenPriceService=Pe,this.tokenPriceCache={AddressZero:"1",[oe.weth.toLowerCase()]:"1"}}convertGasCostToToken(oe,Pe,He,We=O.O$.from("85000")){var Xe=this;return(0,ie.Z)(function*(){if(He.isZero()||We.isZero())return d._Y;const at=yield Xe.getNativeAssetPriceInToken(oe),_t=O.O$.from(N(C(at),Pe).dp(0).toString());return He.mul(We).mul(_t).div(d.Ce)})()}setNativeAssetPriceInToken(oe,Pe){this.tokenPriceCache[oe.toLowerCase()]=Pe}getNativeAssetPriceInToken(oe){var Pe=this;return(0,ie.Z)(function*(){const He=Pe.tokenPriceCache[oe.toLowerCase()];if(He)return He;try{const We=yield Pe.tokenPriceService.getNativeAssetPriceInToken(oe);return Pe.setNativeAssetPriceInToken(oe,We),We}catch(We){return console.log("Error Getting Token Price. Defaulting to 0."),console.log(We),"0"}})()}}class Ja{constructor(oe,Pe,He,We){this.provider=oe,this.config=Pe,this.defaultSwapOptions={gasPrice:(0,z.Ox)("50",9),swapGas:O.O$.from("85000"),poolTypeFilter:ke.All,maxPools:4,timestamp:Math.floor(Date.now()/1e3),forceRefresh:!1},this.poolCacher=new G0(He),this.routeProposer=new Fl(Pe),this.swapCostCalculator=new zf(Pe,We)}getPools(oe){return this.poolCacher.getPools(oe)}fetchPools(oe,Pe){var He=this;return(0,ie.Z)(function*(){return He.poolCacher.fetchPools(oe,Pe)})()}getSwaps(oe,Pe,He,We,Xe,at=!1){var _t=this;return(0,ie.Z)(function*(){if(!_t.poolCacher.finishedFetching)return b(c0);const xt={..._t.defaultSwapOptions,...Xe};_t.useBpt!==at&&(xt.forceRefresh=!0,_t.useBpt=at);const cn=((Je,oe)=>oe===ke.All?Je:Je.filter(Pe=>Pe.poolType===oe))(_t.poolCacher.getPools(at),xt.poolTypeFilter),In=yield function(Je,oe,Pe,He,We,Xe){return l0.apply(this,arguments)}(_t.provider,He,oe,Pe,_t.config,O.O$.from(We));let Rn;return Rn=function(Je,oe,Pe){return!!yr.Networks.includes(Je)&&(oe=oe.toLowerCase(),Pe=Pe.toLowerCase(),oe===yr.wstETH[Je]&&Pe===yr.DAI[Je]||oe===yr.wstETH[Je]&&Pe===yr.USDC[Je]||oe===yr.wstETH[Je]&&Pe===yr.USDT[Je]||oe===yr.DAI[Je]&&Pe===yr.wstETH[Je]||oe===yr.USDC[Je]&&Pe===yr.wstETH[Je]||oe===yr.USDT[Je]&&Pe===yr.wstETH[Je]||oe===yr.stETH[Je]&&Pe===yr.DAI[Je]||oe===yr.stETH[Je]&&Pe===yr.USDC[Je]||oe===yr.stETH[Je]&&Pe===yr.USDT[Je]||oe===yr.DAI[Je]&&Pe===yr.stETH[Je]||oe===yr.USDC[Je]&&Pe===yr.stETH[Je]||oe===yr.USDT[Je]&&Pe===yr.stETH[Je])}(_t.config.chainId,oe,Pe)?yield function(Je,oe,Pe,He,We,Xe,at){return yd.apply(this,arguments)}(cn,_t.config.chainId,In.tokenIn.addressForSwaps,In.tokenOut.addressForSwaps,He,In.swapAmountForSwaps,_t.provider):yield _t.processSwaps(In.tokenIn.addressForSwaps,In.tokenOut.addressForSwaps,He,In.swapAmountForSwaps,cn,xt),Rn.returnAmount.isZero()||(Rn=function(Je,oe,Pe,He){if(0===Je.swaps.length||(Je.tokenIn=Pe.tokenIn.addressOriginal,Je.tokenOut=Pe.tokenOut.addressOriginal,Je.swapAmountForSwaps=Je.swapAmount,Je.returnAmountFromSwaps=Je.returnAmount,Je.tokenInForSwaps=Pe.tokenIn.addressForSwaps,Je.tokenOutFromSwaps=Pe.tokenOut.addressForSwaps,Pe.tokenIn.wrapType===No.None&&Pe.tokenOut.wrapType===No.None))return Je;(Pe.tokenIn.wrapType===No.ETH||Pe.tokenOut.wrapType===No.ETH)&&(Je.tokenAddresses=Je.tokenAddresses.map(Xe=>le(Xe,He.weth)?x.d:Xe));const We=Xe=>Xe===No.stETH||Xe===No.Unbutton;return(We(Pe.tokenIn.wrapType)&&oe===xe.SwapExactIn||We(Pe.tokenOut.wrapType)&&oe===xe.SwapExactOut)&&(Je.swapAmount=Pe.swapAmountOriginal,Je.swapAmountForSwaps=Pe.swapAmountForSwaps),oe===xe.SwapExactIn&&We(Pe.tokenOut.wrapType)&&(Je.returnAmount=Je.returnAmount.mul(d.Ce).div(Pe.tokenOut.rate),Je.returnAmountConsideringFees=Je.returnAmountConsideringFees.mul(d.Ce).div(Pe.tokenOut.rate)),oe===xe.SwapExactOut&&We(Pe.tokenIn.wrapType)&&(Je.returnAmount=Je.returnAmount.mul(d.Ce).div(Pe.tokenIn.rate),Je.returnAmountConsideringFees=Je.returnAmountConsideringFees.mul(d.Ce).div(Pe.tokenIn.rate)),Je}(Rn,He,In,_t.config)),Rn})()}getCostOfSwapInToken(oe,Pe,He,We){var Xe=this;return(0,ie.Z)(function*(){return He.isZero()?d._Y:Xe.swapCostCalculator.convertGasCostToToken(oe,Pe,He,We)})()}processSwaps(oe,Pe,He,We,Xe,at){var _t=this;return(0,ie.Z)(function*(){if(0===Xe.length)return b(c0);const xt=_t.routeProposer.getCandidatePaths(oe,Pe,He,Xe,at);if(0==xt.length)return b(c0);let $t,cn;xt[0].swaps.forEach(Nr=>{le(Nr.tokenIn,oe)&&($t=Nr.tokenInDecimals),le(Nr.tokenOut,Pe)&&(cn=Nr.tokenOutDecimals)});const In=yield _t.getCostOfSwapInToken(He===xe.SwapExactIn?Pe:oe,He===xe.SwapExactIn?cn:$t,at.gasPrice,at.swapGas),[Rn,hr,jr,ni]=_t.getBestPaths(xt,We,He,$t,cn,In,at.maxPools);return function(Je,oe,Pe,He,We,Xe,at,_t){if(0===Je.length)return b(c0);const xt=b(Je),$t=(Je=>[...new Set(Je.flatMap(Pe=>Pe.flatMap(He=>[He.tokenIn,He.tokenOut])))])(xt),cn=xt.flatMap(hr=>Rd(oe,hr,$t)),In=Pe.sub((Je=>Je.reduce((oe,{amount:Pe})=>oe.add(Pe),d._Y))(cn));return In.gt(0)&&(cn[0].amount=O.O$.from(cn[0].amount).add(In).toString()),{swapAmount:Pe,swapAmountForSwaps:Pe,returnAmount:Xe,returnAmountFromSwaps:Xe,returnAmountConsideringFees:at,swaps:cn,tokenAddresses:$t,tokenIn:He,tokenOut:We,marketSp:_t}}(Rn,He,We,oe,Pe,hr,ni,jr)})()}getBestPaths(oe,Pe,He,We,Xe,at,_t){const[xt,$t]=He===xe.SwapExactIn?[We,Xe]:[Xe,We],[cn,In,Rn,hr]=((Je,oe,Pe,He,We,Xe,at)=>{if(0==Je.length||Pe.isZero())return[[],v,v,v];const _t=function(Je,oe){if(0===Je.length)return[];const Pe=[];for(let He=0;He(Ci.push(Wo.add(Ci[Ci.length-1]||d._Y)),Ci),[]);if(Pe.gt(xt[xt.length-1]))return[[],v,v,v];const $t=xt.findIndex(Ci=>Pe.lte(Ci))+1,cn=_t.slice(0,$t),In=xt[$t-1].sub(Pe);cn[cn.length-1]=cn[cn.length-1].sub(In);const[Rn,hr,jr]=((Je,oe,Pe,He,We,Xe,at,_t,xt,$t)=>{let cn=oe===xe.SwapExactIn?D.times(-1):D,In=[],Rn=[],hr=He.map(jr=>C((0,z.S5)(jr,Xe)));for(let jr=_t;jr<=Je.length;jr++){if(jr!=_t){const Vn=(0,z.S5)(Pe,Xe),lr=M.min.apply(null,[C(Vn).times(C(1/jr)),(0,z.S5)(We[jr-1],Xe)]);hr.forEach((Tr,di)=>{hr[di]=Tr.times(k.minus(lr.div(Vn)))}),lr.isZero()||hr.push(lr)}const{paths:ni,swapAmounts:Fi}=wh(Je,oe,Pe,hr,Xe,at,$t);hr=Fi;const Nr=gd(ni,oe,hr,Xe),Ci=ni.reduce((Vn,lr)=>Vn+lr.swaps.length,0),Wo=(0,z.S5)($t,at);let Go=!1,Ha=v;const Ba=C(Ci).times(Wo);if(oe===xe.SwapExactIn?(Ha=Nr.minus(Ba),Go=Ha.isGreaterThan(cn)):(Ha=Nr.plus(Ba),Go=Ha.isLessThan(cn)),!Go||(In=[...hr],Rn=[...ni],cn=Ha,Ci>=xt))break}return Rn=Rn.filter((jr,ni)=>!In[ni].isZero()),In=In.filter(jr=>!jr.isZero()),[Rn,In,cn]})(Je,oe,Pe,cn,_t,He,We,$t,Xe,at),[ni,Fi,Nr]=((Je,oe,Pe,He)=>{const We=[];let Xe=He[0],at=Je[0],_t=v;if(Je.forEach(($t,cn)=>{const In=He[cn];In.gt(Xe)&&(Xe=In,at=$t);const Rn=$t.poolPairData,hr=[],jr=[];let ni;const Fi=Rn.length;if(jr.push(In),oe===xe.SwapExactIn){for(let Nr=0;Nr0){const $t=He.reduce((In,Rn)=>In.plus(Rn),v),cn=Pe.minus($t);if(oe===xe.SwapExactIn)We[0][0].swapAmount=C(We[0][0].swapAmount).plus(cn).toString();else{const In=Je[0].swaps.length-1;We[0][In].swapAmount=C(We[0][In].swapAmount).plus(cn).toString()}}if(_t.eq(0))return[[],v,v];const xt=rc(at,oe,v);return[We,_t,xt]})(Rn,oe,C((0,z.S5)(Pe,He)),hr);return Fi.eq(0)?[[],v,v,v]:[ni,Fi,Nr,jr]})(oe,He,Pe,xt,$t,_t,at);return[cn,(0,z.Ox)(In.dp($t,M.ROUND_FLOOR).toString(),$t),Rn.toString(),(0,z.Ox)(hr.dp($t,M.ROUND_FLOOR).toString(),$t)]}}function im(Je,oe,Pe,He,We){const Xe=He.reduce((at,_t,xt)=>{const cn=Wn(v,{balanceIn:Je[xt],decimalsIn:oe[xt],balanceOut:We,weightIn:Pe[xt],swapFee:d._Y}),Rn=C((0,z.S5)(_t,oe[xt])).div(cn).toString();return O.O$.from(at).add((0,z.Ox)(Rn,18))},d._Y);return O.O$.from(Xe)}function e1(Je,oe,Pe,He,We){if(Je.length!=Pe.length)throw"allBalances and amounts have to have same length";const Xe=Je.map((_t,xt)=>C((0,z.S5)(_t,oe[xt]))),at=Pe.reduce((_t,xt,$t)=>{const cn={amp:O.O$.from(We),allBalances:Xe,tokenIndexIn:$t,balanceOut:He,decimalsOut:18,swapFee:d._Y},In=ki(v,cn),hr=C((0,z.S5)(xt,oe[$t])).div(In).toString();return O.O$.from(_t).add((0,z.Ox)(hr,18))},d._Y);return O.O$.from(at)}},39885:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Authorizer__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"address",name:"admin",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"actionId",type:"bytes32"},{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"",type:"address"}],name:"canPerform",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"grantRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"grantRolesToMany",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"revokeRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"revokeRolesFromMany",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.Authorizer__factory=O,O.abi=z},77460:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BalancerHelpers__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.BalancerHelpers__factory=O,O.abi=z},84267:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.InvestmentPoolFactory__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"},{internalType:"uint256",name:"managementSwapFeePercentage",type:"uint256"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.InvestmentPoolFactory__factory=O,O.abi=z},99598:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.InvestmentPool__factory=void 0;const ie=Y(94464),z=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"},{internalType:"uint256",name:"managementSwapFeePercentage",type:"uint256"}],internalType:"struct InvestmentPool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"startWeights",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"GradualWeightUpdateScheduled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"managementFeePercentage",type:"uint256"}],name:"ManagementFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"ManagementFeesCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"swapEnabled",type:"bool"}],name:"SwapEnabledSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCollectedManagementFees",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"collectedFees",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getGradualWeightUpdateParams",outputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getManagementSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumWeightChangeDuration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapEnabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"currentBalanceTokenIn",type:"uint256"},{internalType:"uint256",name:"currentBalanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapEnabled",type:"bool"}],name:"setSwapEnabled",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"updateWeightsGradually",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"}],name:"withdrawCollectedManagementFees",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.InvestmentPool__factory=O,O.abi=z},89445:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.LidoRelayer__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IwstETH",name:"wstETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"swapAmounts",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getStETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWstETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"swapAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.LidoRelayer__factory=O,O.abi=z},59198:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.LiquidityBootstrappingPoolFactory__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.LiquidityBootstrappingPoolFactory__factory=O,O.abi=z},76389:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.LiquidityBootstrappingPool__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"startWeights",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"GradualWeightUpdateScheduled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"swapEnabled",type:"bool"}],name:"SwapEnabledSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getGradualWeightUpdateParams",outputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapEnabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapEnabled",type:"bool"}],name:"setSwapEnabled",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"updateWeightsGradually",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.LiquidityBootstrappingPool__factory=O,O.abi=z},45949:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.MerkleRedeem__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"},{internalType:"contract IERC20",name:"_rewardToken",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"rewardToken",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardPaid",type:"event"},{inputs:[{internalType:"address",name:"liquidityProvider",type:"address"},{internalType:"uint256",name:"begin",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"}],name:"claimStatus",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"claimedBalance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],name:"claimWeek",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{components:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],internalType:"struct MerkleRedeem.Claim[]",name:"claims",type:"tuple[]"}],name:"claimWeeks",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{components:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],internalType:"struct MerkleRedeem.Claim[]",name:"claims",type:"tuple[]"}],name:"claimWeeksToInternalBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{internalType:"address payable",name:"callbackContract",type:"address"},{internalType:"bytes",name:"callbackData",type:"bytes"},{components:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],internalType:"struct MerkleRedeem.Claim[]",name:"claims",type:"tuple[]"}],name:"claimWeeksWithCallback",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"address",name:"",type:"address"}],name:"claimed",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"begin",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"}],name:"merkleRoots",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rewardToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"bytes32",name:"_merkleRoot",type:"bytes32"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"seedAllocations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"liquidityProvider",type:"address"},{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"claimedBalance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],name:"verifyClaim",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"weekMerkleRoots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.MerkleRedeem__factory=O,O.abi=z},83429:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.MetaStablePoolFactory__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"priceRateCacheDuration",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.MetaStablePoolFactory__factory=O,O.abi=z},8337:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.MetaStablePool__factory=void 0;const ie=Y(94464),z=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"priceRateCacheDuration",type:"uint256[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct MetaStablePool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"OracleEnabledChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"PriceRateCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"contract IRateProvider",name:"provider",type:"address"},{indexed:!1,internalType:"uint256",name:"cacheDuration",type:"uint256"}],name:"PriceRateProviderSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLargestSafeQueryWindow",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"lastInvariant",type:"uint256"},{internalType:"uint256",name:"lastInvariantAmp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"}],name:"getLatest",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOracleMiscData",outputs:[{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"logTotalSupply",type:"int256"},{internalType:"uint256",name:"oracleSampleCreationTimestamp",type:"uint256"},{internalType:"uint256",name:"oracleIndex",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAccumulatorQuery[]",name:"queries",type:"tuple[]"}],name:"getPastAccumulators",outputs:[{internalType:"int256[]",name:"results",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPriceRateCache",outputs:[{internalType:"uint256",name:"rate",type:"uint256"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"uint256",name:"expires",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"providers",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getSample",outputs:[{internalType:"int256",name:"logPairPrice",type:"int256"},{internalType:"int256",name:"accLogPairPrice",type:"int256"},{internalType:"int256",name:"logBptPrice",type:"int256"},{internalType:"int256",name:"accLogBptPrice",type:"int256"},{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"accLogInvariant",type:"int256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"secs",type:"uint256"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAverageQuery[]",name:"queries",type:"tuple[]"}],name:"getTimeWeightedAverage",outputs:[{internalType:"uint256[]",name:"results",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalSamples",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"setPriceRateCacheDuration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"updatePriceRateCache",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.MetaStablePool__factory=O,O.abi=z},70869:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.StablePoolFactory__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.StablePoolFactory__factory=O,O.abi=z},34027:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.StablePool__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.StablePool__factory=O,O.abi=z},49702:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Vault__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IAuthorizer",name:"authorizer",type:"address"},{internalType:"contract IWETH",name:"weth",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"AuthorizerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExternalBalanceTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"delta",type:"int256"}],name:"InternalBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"liquidityProvider",type:"address"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"deltas",type:"int256[]"},{indexed:!1,internalType:"uint256[]",name:"protocolFeeAmounts",type:"uint256[]"}],name:"PoolBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"assetManager",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"cashDelta",type:"int256"},{indexed:!1,internalType:"int256",name:"managedDelta",type:"int256"}],name:"PoolBalanceManaged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"PoolRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"RelayerApprovalChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"contract IERC20",name:"tokenIn",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"amountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountOut",type:"uint256"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"TokensDeregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"TokensRegistered",type:"event"},{inputs:[],name:"WETH",outputs:[{internalType:"contract IWETH",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"assetDeltas",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"deregisterTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"getInternalBalance",outputs:[{internalType:"uint256[]",name:"balances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"enum IVault.PoolSpecialization",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPoolTokenInfo",outputs:[{internalType:"uint256",name:"cash",type:"uint256"},{internalType:"uint256",name:"managed",type:"uint256"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"assetManager",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPoolTokens",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract ProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"relayer",type:"address"}],name:"hasApprovedRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.PoolBalanceOpKind",name:"kind",type:"uint8"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct IVault.PoolBalanceOp[]",name:"ops",type:"tuple[]"}],name:"managePoolBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"}],name:"queryBatchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"registerPool",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"registerTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"setAuthorizer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setRelayerApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"amountCalculated",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.Vault__factory=O,O.abi=z},62241:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WETH__factory=void 0;const ie=Y(94464),z=[{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.WETH__factory=O,O.abi=z},70384:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPool2TokensFactory__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.WeightedPool2TokensFactory__factory=O,O.abi=z},31039:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPool2Tokens__factory=void 0;const ie=Y(94464),z=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"token0",type:"address"},{internalType:"contract IERC20",name:"token1",type:"address"},{internalType:"uint256",name:"normalizedWeight0",type:"uint256"},{internalType:"uint256",name:"normalizedWeight1",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct WeightedPool2Tokens.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"OracleEnabledChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLargestSafeQueryWindow",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"}],name:"getLatest",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiscData",outputs:[{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"logTotalSupply",type:"int256"},{internalType:"uint256",name:"oracleSampleCreationTimestamp",type:"uint256"},{internalType:"uint256",name:"oracleIndex",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAccumulatorQuery[]",name:"queries",type:"tuple[]"}],name:"getPastAccumulators",outputs:[{internalType:"int256[]",name:"results",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getSample",outputs:[{internalType:"int256",name:"logPairPrice",type:"int256"},{internalType:"int256",name:"accLogPairPrice",type:"int256"},{internalType:"int256",name:"logBptPrice",type:"int256"},{internalType:"int256",name:"accLogBptPrice",type:"int256"},{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"accLogInvariant",type:"int256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"secs",type:"uint256"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAverageQuery[]",name:"queries",type:"tuple[]"}],name:"getTimeWeightedAverage",outputs:[{internalType:"uint256[]",name:"results",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalSamples",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.WeightedPool2Tokens__factory=O,O.abi=z},69449:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPoolFactory__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.WeightedPoolFactory__factory=O,O.abi=z},33009:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPool__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.WeightedPool__factory=O,O.abi=z},52971:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WstETHRateProvider__factory=void 0;const ie=Y(94464),z=[{inputs:[{internalType:"contract IwstETH",name:"_wstETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"wstETH",outputs:[{internalType:"contract IwstETH",name:"",type:"address"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(z)}static connect(d,x){return new ie.Contract(d,z,x)}}be.WstETHRateProvider__factory=O,O.abi=z},8206:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WETH__factory=be.InvestmentPoolFactory__factory=be.InvestmentPool__factory=be.WstETHRateProvider__factory=be.LidoRelayer__factory=be.MerkleRedeem__factory=be.MetaStablePoolFactory__factory=be.MetaStablePool__factory=be.LiquidityBootstrappingPoolFactory__factory=be.LiquidityBootstrappingPool__factory=be.StablePoolFactory__factory=be.StablePool__factory=be.WeightedPoolFactory__factory=be.WeightedPool2TokensFactory__factory=be.WeightedPool2Tokens__factory=be.WeightedPool__factory=be.Vault__factory=be.BalancerHelpers__factory=be.Authorizer__factory=void 0;var ie=Y(39885);Object.defineProperty(be,"Authorizer__factory",{enumerable:!0,get:function(){return ie.Authorizer__factory}});var z=Y(77460);Object.defineProperty(be,"BalancerHelpers__factory",{enumerable:!0,get:function(){return z.BalancerHelpers__factory}});var O=Y(49702);Object.defineProperty(be,"Vault__factory",{enumerable:!0,get:function(){return O.Vault__factory}});var E=Y(33009);Object.defineProperty(be,"WeightedPool__factory",{enumerable:!0,get:function(){return E.WeightedPool__factory}});var d=Y(31039);Object.defineProperty(be,"WeightedPool2Tokens__factory",{enumerable:!0,get:function(){return d.WeightedPool2Tokens__factory}});var x=Y(70384);Object.defineProperty(be,"WeightedPool2TokensFactory__factory",{enumerable:!0,get:function(){return x.WeightedPool2TokensFactory__factory}});var f=Y(69449);Object.defineProperty(be,"WeightedPoolFactory__factory",{enumerable:!0,get:function(){return f.WeightedPoolFactory__factory}});var T=Y(34027);Object.defineProperty(be,"StablePool__factory",{enumerable:!0,get:function(){return T.StablePool__factory}});var g=Y(70869);Object.defineProperty(be,"StablePoolFactory__factory",{enumerable:!0,get:function(){return g.StablePoolFactory__factory}});var b=Y(76389);Object.defineProperty(be,"LiquidityBootstrappingPool__factory",{enumerable:!0,get:function(){return b.LiquidityBootstrappingPool__factory}});var l=Y(59198);Object.defineProperty(be,"LiquidityBootstrappingPoolFactory__factory",{enumerable:!0,get:function(){return l.LiquidityBootstrappingPoolFactory__factory}});var h=Y(8337);Object.defineProperty(be,"MetaStablePool__factory",{enumerable:!0,get:function(){return h.MetaStablePool__factory}});var u=Y(83429);Object.defineProperty(be,"MetaStablePoolFactory__factory",{enumerable:!0,get:function(){return u.MetaStablePoolFactory__factory}});var m=Y(45949);Object.defineProperty(be,"MerkleRedeem__factory",{enumerable:!0,get:function(){return m.MerkleRedeem__factory}});var _=Y(89445);Object.defineProperty(be,"LidoRelayer__factory",{enumerable:!0,get:function(){return _.LidoRelayer__factory}});var w=Y(52971);Object.defineProperty(be,"WstETHRateProvider__factory",{enumerable:!0,get:function(){return w.WstETHRateProvider__factory}});var S=Y(99598);Object.defineProperty(be,"InvestmentPool__factory",{enumerable:!0,get:function(){return S.InvestmentPool__factory}});var I=Y(84267);Object.defineProperty(be,"InvestmentPoolFactory__factory",{enumerable:!0,get:function(){return I.InvestmentPoolFactory__factory}});var P=Y(62241);Object.defineProperty(be,"WETH__factory",{enumerable:!0,get:function(){return P.WETH__factory}})},21362:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="abi/5.7.0"},53941:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>o,$:()=>y});var ie=Y(61488),z=Y(92275),O=Y(53898),E=Y(21362),d=Y(91125),x=Y(2885);class f extends d.XI{constructor(v){super("address","address",v,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(v,k){try{k=(0,x.getAddress)(k)}catch(D){this._throwError(D.message,k)}return v.writeValue(k)}decode(v){return(0,x.getAddress)((0,ie.hexZeroPad)(v.readValue().toHexString(),20))}}class T extends d.XI{constructor(v){super(v.name,v.type,void 0,v.dynamic),this.coder=v}defaultValue(){return this.coder.defaultValue()}encode(v,k){return this.coder.encode(v,k)}decode(v){return this.coder.decode(v)}}const g=new O.Logger(E.i);function b(M,v,k){let D=null;if(Array.isArray(k))D=k;else if(k&&"object"==typeof k){let Q={};D=v.map(ee=>{const ce=ee.localName;return ce||g.throwError("cannot encode object for signature with missing names",O.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:ee,value:k}),Q[ce]&&g.throwError("cannot encode object for signature with duplicate names",O.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:ee,value:k}),Q[ce]=!0,k[ce]})}else g.throwArgumentError("invalid tuple value","tuple",k);v.length!==D.length&&g.throwArgumentError("types/value length mismatch","tuple",k);let N=new d.QV(M.wordSize),C=new d.QV(M.wordSize),a=[];v.forEach((Q,ee)=>{let ce=D[ee];if(Q.dynamic){let ue=C.length;Q.encode(C,ce);let we=N.writeUpdatableValue();a.push(ae=>{we(ae+ue)})}else Q.encode(N,ce)}),a.forEach(Q=>{Q(N.length)});let B=M.appendWriter(N);return B+=M.appendWriter(C),B}function l(M,v){let k=[],D=M.subReader(0);v.forEach(C=>{let a=null;if(C.dynamic){let B=M.readValue(),Q=D.subReader(B.toNumber());try{a=C.decode(Q)}catch(ee){if(ee.code===O.Logger.errors.BUFFER_OVERRUN)throw ee;a=ee,a.baseType=C.name,a.name=C.localName,a.type=C.type}}else try{a=C.decode(M)}catch(B){if(B.code===O.Logger.errors.BUFFER_OVERRUN)throw B;a=B,a.baseType=C.name,a.name=C.localName,a.type=C.type}null!=a&&k.push(a)});const N=v.reduce((C,a)=>{const B=a.localName;return B&&(C[B]||(C[B]=0),C[B]++),C},{});v.forEach((C,a)=>{let B=C.localName;if(!B||1!==N[B]||("length"===B&&(B="_length"),null!=k[B]))return;const Q=k[a];Q instanceof Error?Object.defineProperty(k,B,{enumerable:!0,get:()=>{throw Q}}):k[B]=Q});for(let C=0;C{throw a}})}return Object.freeze(k)}class h extends d.XI{constructor(v,k,D){super("array",v.type+"["+(k>=0?k:"")+"]",D,-1===k||v.dynamic),this.coder=v,this.length=k}defaultValue(){const v=this.coder.defaultValue(),k=[];for(let D=0;Dv._data.length&&g.throwError("insufficient data length",O.Logger.errors.BUFFER_OVERRUN,{length:v._data.length,count:k}));let D=[];for(let N=0;N{a.dynamic&&(D=!0),N.push(a.type)}),super("tuple","tuple("+N.join(",")+")",k,D),this.coders=v}defaultValue(){const v=[];this.coders.forEach(D=>{v.push(D.defaultValue())});const k=this.coders.reduce((D,N)=>{const C=N.localName;return C&&(D[C]||(D[C]=0),D[C]++),D},{});return this.coders.forEach((D,N)=>{let C=D.localName;!C||1!==k[C]||("length"===C&&(C="_length"),null==v[C]&&(v[C]=v[N]))}),Object.freeze(v)}encode(v,k){return b(v,this.coders,k)}decode(v){return v.coerce(this.name,l(v,this.coders))}}var H=Y(55586);const j=new O.Logger(E.i),K=new RegExp(/^bytes([0-9]*)$/),R=new RegExp(/^(u?int)([0-9]*)$/);class o{constructor(v){(0,z.defineReadOnly)(this,"coerceFunc",v||null)}_getCoder(v){switch(v.baseType){case"address":return new f(v.name);case"bool":return new u(v.name);case"string":return new W(v.name);case"bytes":return new _(v.name);case"array":return new h(this._getCoder(v.arrayChildren),v.arrayLength,v.name);case"tuple":return new G((v.components||[]).map(D=>this._getCoder(D)),v.name);case"":return new S(v.name)}let k=v.type.match(R);if(k){let D=parseInt(k[2]||"256");return(0===D||D>256||D%8!=0)&&j.throwArgumentError("invalid "+k[1]+" bit length","param",v),new L(D/8,"int"===k[1],v.name)}if(k=v.type.match(K),k){let D=parseInt(k[1]);return(0===D||D>32)&&j.throwArgumentError("invalid bytes length","param",v),new w(D,v.name)}return j.throwArgumentError("invalid type","type",v.type)}_getWordSize(){return 32}_getReader(v,k){return new d.Ej(v,this._getWordSize(),this.coerceFunc,k)}_getWriter(){return new d.QV(this._getWordSize())}getDefaultValue(v){const k=v.map(N=>this._getCoder(H._R.from(N)));return new G(k,"_").defaultValue()}encode(v,k){v.length!==k.length&&j.throwError("types/values length mismatch",O.Logger.errors.INVALID_ARGUMENT,{count:{types:v.length,values:k.length},value:{types:v,values:k}});const D=v.map(a=>this._getCoder(H._R.from(a))),N=new G(D,"_"),C=this._getWriter();return N.encode(C,k),C.data}decode(v,k,D){const N=v.map(a=>this._getCoder(H._R.from(a)));return new G(N,"_").decode(this._getReader((0,ie.arrayify)(k),D))}}const y=new o},91125:(bt,be,Y)=>{"use strict";Y.d(be,{BR:()=>f,XI:()=>T,QV:()=>g,Ej:()=>b});var ie=Y(61488),z=Y(2024),O=Y(92275),E=Y(53898),d=Y(21362);const x=new E.Logger(d.i);function f(l){const h=[],u=function(m,_){if(Array.isArray(_))for(let w in _){const S=m.slice();S.push(w);try{u(S,_[w])}catch(I){h.push({path:S,error:I})}}};return u([],l),h}class T{constructor(h,u,m,_){this.name=h,this.type=u,this.localName=m,this.dynamic=_}_throwError(h,u){x.throwArgumentError(h,this.localName,u)}}class g{constructor(h){(0,O.defineReadOnly)(this,"wordSize",h||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(h)}get data(){return(0,ie.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(h){return this._data.push(h),this._dataLength+=h.length,h.length}appendWriter(h){return this._writeData((0,ie.concat)(h._data))}writeBytes(h){let u=(0,ie.arrayify)(h);const m=u.length%this.wordSize;return m&&(u=(0,ie.concat)([u,this._padding.slice(m)])),this._writeData(u)}_getValue(h){let u=(0,ie.arrayify)(z.O$.from(h));return u.length>this.wordSize&&x.throwError("value out-of-bounds",E.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:u.length}),u.length%this.wordSize&&(u=(0,ie.concat)([this._padding.slice(u.length%this.wordSize),u])),u}writeValue(h){return this._writeData(this._getValue(h))}writeUpdatableValue(){const h=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,u=>{this._data[h]=this._getValue(u)}}}class b{constructor(h,u,m,_){(0,O.defineReadOnly)(this,"_data",(0,ie.arrayify)(h)),(0,O.defineReadOnly)(this,"wordSize",u||32),(0,O.defineReadOnly)(this,"_coerceFunc",m),(0,O.defineReadOnly)(this,"allowLoose",_),this._offset=0}get data(){return(0,ie.hexlify)(this._data)}get consumed(){return this._offset}static coerce(h,u){let m=h.match("^u?int([0-9]+)$");return m&&parseInt(m[1])<=48&&(u=u.toNumber()),u}coerce(h,u){return this._coerceFunc?this._coerceFunc(h,u):b.coerce(h,u)}_peekBytes(h,u,m){let _=Math.ceil(u/this.wordSize)*this.wordSize;return this._offset+_>this._data.length&&(this.allowLoose&&m&&this._offset+u<=this._data.length?_=u:x.throwError("data out-of-bounds",E.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+_})),this._data.slice(this._offset,this._offset+_)}subReader(h){return new b(this._data.slice(this._offset+h),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(h,u){let m=this._peekBytes(0,h,!!u);return this._offset+=m.length,m.slice(0,h)}readValue(){return z.O$.from(this.readBytes(this.wordSize))}}},55586:(bt,be,Y)=>{"use strict";Y.d(be,{pc:()=>h,_R:()=>m,HY:()=>w,QV:()=>S,Xg:()=>V,YW:()=>W,IC:()=>H});var ie=Y(2024),z=Y(92275),O=Y(53898),E=Y(21362);const d=new O.Logger(E.i),x={};let f={calldata:!0,memory:!0,storage:!0},T={calldata:!0,memory:!0};function g(M,v){if("bytes"===M||"string"===M){if(f[v])return!0}else if("address"===M){if("payable"===v)return!0}else if((M.indexOf("[")>=0||"tuple"===M)&&T[v])return!0;return(f[v]||"payable"===v)&&d.throwArgumentError("invalid modifier","name",v),!1}function l(M,v){for(let k in v)(0,z.defineReadOnly)(M,k,v[k])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),u=new RegExp(/^(.*)\[([0-9]*)\]$/);class m{constructor(v,k){v!==x&&d.throwError("use fromString",O.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),l(this,k);let D=this.type.match(u);l(this,D?{arrayLength:parseInt(D[2]||"-1"),arrayChildren:m.fromObject({type:D[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.json){let D={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(D.indexed=this.indexed),this.components&&(D.components=this.components.map(N=>JSON.parse(N.format(v)))),JSON.stringify(D)}let k="";return"array"===this.baseType?(k+=this.arrayChildren.format(v),k+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(v!==h.sighash&&(k+=this.type),k+="("+this.components.map(D=>D.format(v)).join(v===h.full?", ":",")+")"):k+=this.type,v!==h.sighash&&(!0===this.indexed&&(k+=" indexed"),v===h.full&&this.name&&(k+=" "+this.name)),k}static from(v,k){return"string"==typeof v?m.fromString(v,k):m.fromObject(v)}static fromObject(v){return m.isParamType(v)?v:new m(x,{name:v.name||null,type:j(v.type),indexed:null==v.indexed?null:!!v.indexed,components:v.components?v.components.map(m.fromObject):null})}static fromString(v,k){return N=function(M,v){let k=M;function D(B){d.throwArgumentError(`unexpected character at position ${B}`,"param",M)}function N(B){let Q={type:"",name:"",parent:B,state:{allowType:!0}};return v&&(Q.indexed=!1),Q}M=M.replace(/\s/g," ");let C={type:"",name:"",state:{allowType:!0}},a=C;for(let B=0;Bm.fromString(k,v))}class w{constructor(v,k){v!==x&&d.throwError("use a static from method",O.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),l(this,k),this._isFragment=!0,Object.freeze(this)}static from(v){return w.isFragment(v)?v:"string"==typeof v?w.fromString(v):w.fromObject(v)}static fromObject(v){if(w.isFragment(v))return v;switch(v.type){case"function":return W.fromObject(v);case"event":return S.fromObject(v);case"constructor":return V.fromObject(v);case"error":return H.fromObject(v);case"fallback":case"receive":return null}return d.throwArgumentError("invalid fragment object","value",v)}static fromString(v){return"event"===(v=(v=(v=v.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?S.fromString(v.substring(5).trim()):"function"===v.split(" ")[0]?W.fromString(v.substring(8).trim()):"constructor"===v.split("(")[0].trim()?V.fromString(v.trim()):"error"===v.split(" ")[0]?H.fromString(v.substring(5).trim()):d.throwArgumentError("unsupported fragment","value",v)}static isFragment(v){return!(!v||!v._isFragment)}}class S extends w{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(D=>JSON.parse(D.format(v)))});let k="";return v!==h.sighash&&(k+="event "),k+=this.name+"("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ",v!==h.sighash&&this.anonymous&&(k+="anonymous "),k.trim()}static from(v){return"string"==typeof v?S.fromString(v):S.fromObject(v)}static fromObject(v){if(S.isEventFragment(v))return v;"event"!==v.type&&d.throwArgumentError("invalid event object","value",v);const k={name:R(v.name),anonymous:v.anonymous,inputs:v.inputs?v.inputs.map(m.fromObject):[],type:"event"};return new S(x,k)}static fromString(v){let k=v.match(o);k||d.throwArgumentError("invalid event string","value",v);let D=!1;return k[3].split(" ").forEach(N=>{switch(N.trim()){case"anonymous":D=!0;break;case"":break;default:d.warn("unknown modifier: "+N)}}),S.fromObject({name:k[1].trim(),anonymous:D,inputs:_(k[2],!0),type:"event"})}static isEventFragment(v){return v&&v._isFragment&&"event"===v.type}}function I(M,v){v.gas=null;let k=M.split("@");return 1!==k.length?(k.length>2&&d.throwArgumentError("invalid human-readable ABI signature","value",M),k[1].match(/^[0-9]+$/)||d.throwArgumentError("invalid human-readable ABI signature gas","value",M),v.gas=ie.O$.from(k[1]),k[0]):M}function P(M,v){v.constant=!1,v.payable=!1,v.stateMutability="nonpayable",M.split(" ").forEach(k=>{switch(k.trim()){case"constant":v.constant=!0;break;case"payable":v.payable=!0,v.stateMutability="payable";break;case"nonpayable":v.payable=!1,v.stateMutability="nonpayable";break;case"pure":v.constant=!0,v.stateMutability="pure";break;case"view":v.constant=!0,v.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+k)}})}function L(M){let v={constant:!1,payable:!0,stateMutability:"payable"};return null!=M.stateMutability?(v.stateMutability=M.stateMutability,v.constant="view"===v.stateMutability||"pure"===v.stateMutability,null!=M.constant&&!!M.constant!==v.constant&&d.throwArgumentError("cannot have constant function with mutability "+v.stateMutability,"value",M),v.payable="payable"===v.stateMutability,null!=M.payable&&!!M.payable!==v.payable&&d.throwArgumentError("cannot have payable function with mutability "+v.stateMutability,"value",M)):null!=M.payable?(v.payable=!!M.payable,null==M.constant&&!v.payable&&"constructor"!==M.type&&d.throwArgumentError("unable to determine stateMutability","value",M),v.constant=!!M.constant,v.stateMutability=v.constant?"view":v.payable?"payable":"nonpayable",v.payable&&v.constant&&d.throwArgumentError("cannot have constant payable function","value",M)):null!=M.constant?(v.constant=!!M.constant,v.payable=!v.constant,v.stateMutability=v.constant?"view":"payable"):"constructor"!==M.type&&d.throwArgumentError("unable to determine stateMutability","value",M),v}class V extends w{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.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(D=>JSON.parse(D.format(v)))});v===h.sighash&&d.throwError("cannot format a constructor for sighash",O.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let k="constructor("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(k+=this.stateMutability+" "),k.trim()}static from(v){return"string"==typeof v?V.fromString(v):V.fromObject(v)}static fromObject(v){if(V.isConstructorFragment(v))return v;"constructor"!==v.type&&d.throwArgumentError("invalid constructor object","value",v);let k=L(v);k.constant&&d.throwArgumentError("constructor cannot be constant","value",v);const D={name:null,type:v.type,inputs:v.inputs?v.inputs.map(m.fromObject):[],payable:k.payable,stateMutability:k.stateMutability,gas:v.gas?ie.O$.from(v.gas):null};return new V(x,D)}static fromString(v){let k={type:"constructor"},D=(v=I(v,k)).match(o);return(!D||"constructor"!==D[1].trim())&&d.throwArgumentError("invalid constructor string","value",v),k.inputs=_(D[2].trim(),!1),P(D[3].trim(),k),V.fromObject(k)}static isConstructorFragment(v){return v&&v._isFragment&&"constructor"===v.type}}class W extends V{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.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(D=>JSON.parse(D.format(v))),outputs:this.outputs.map(D=>JSON.parse(D.format(v)))});let k="";return v!==h.sighash&&(k+="function "),k+=this.name+"("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ",v!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(k+=this.stateMutability+" "):this.constant&&(k+="view "),this.outputs&&this.outputs.length&&(k+="returns ("+this.outputs.map(D=>D.format(v)).join(", ")+") "),null!=this.gas&&(k+="@"+this.gas.toString()+" ")),k.trim()}static from(v){return"string"==typeof v?W.fromString(v):W.fromObject(v)}static fromObject(v){if(W.isFunctionFragment(v))return v;"function"!==v.type&&d.throwArgumentError("invalid function object","value",v);let k=L(v);const D={type:v.type,name:R(v.name),constant:k.constant,inputs:v.inputs?v.inputs.map(m.fromObject):[],outputs:v.outputs?v.outputs.map(m.fromObject):[],payable:k.payable,stateMutability:k.stateMutability,gas:v.gas?ie.O$.from(v.gas):null};return new W(x,D)}static fromString(v){let k={type:"function"},D=(v=I(v,k)).split(" returns ");D.length>2&&d.throwArgumentError("invalid function string","value",v);let N=D[0].match(o);if(N||d.throwArgumentError("invalid function signature","value",v),k.name=N[1].trim(),k.name&&R(k.name),k.inputs=_(N[2],!1),P(N[3].trim(),k),D.length>1){let C=D[1].match(o);(""!=C[1].trim()||""!=C[3].trim())&&d.throwArgumentError("unexpected tokens","value",v),k.outputs=_(C[2],!1)}else k.outputs=[];return W.fromObject(k)}static isFunctionFragment(v){return v&&v._isFragment&&"function"===v.type}}function G(M){const v=M.format();return("Error(string)"===v||"Panic(uint256)"===v)&&d.throwArgumentError(`cannot specify user defined ${v} error`,"fragment",M),M}class H extends w{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(D=>JSON.parse(D.format(v)))});let k="";return v!==h.sighash&&(k+="error "),k+=this.name+"("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ",k.trim()}static from(v){return"string"==typeof v?H.fromString(v):H.fromObject(v)}static fromObject(v){if(H.isErrorFragment(v))return v;"error"!==v.type&&d.throwArgumentError("invalid error object","value",v);const k={type:v.type,name:R(v.name),inputs:v.inputs?v.inputs.map(m.fromObject):[]};return G(new H(x,k))}static fromString(v){let k={type:"error"},D=v.match(o);return D||d.throwArgumentError("invalid error signature","value",v),k.name=D[1].trim(),k.name&&R(k.name),k.inputs=_(D[2],!1),G(H.fromObject(k))}static isErrorFragment(v){return v&&v._isFragment&&"error"===v.type}}function j(M){return M.match(/^uint($|[^1-9])/)?M="uint256"+M.substring(4):M.match(/^int($|[^1-9])/)&&(M="int256"+M.substring(3)),M}const K=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function R(M){return(!M||!M.match(K))&&d.throwArgumentError(`invalid identifier "${M}"`,"value",M),M}const o=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},7910:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{ConstructorFragment:()=>ie.Xg,ErrorFragment:()=>ie.IC,EventFragment:()=>ie.QV,Fragment:()=>ie.HY,FunctionFragment:()=>ie.YW,ParamType:()=>ie._R,FormatTypes:()=>ie.pc,AbiCoder:()=>z.R,defaultAbiCoder:()=>z.$,Interface:()=>O.vU,Indexed:()=>O.Hk,checkResultErrors:()=>E.BR,LogDescription:()=>O.CC,TransactionDescription:()=>O.vk});var ie=Y(55586),z=Y(53941),O=Y(20886),E=Y(91125)},20886:(bt,be,Y)=>{"use strict";Y.d(be,{CC:()=>h,vk:()=>u,Hk:()=>_,vU:()=>I});var ie=Y(2885),z=Y(2024),O=Y(61488),E=Y(67475),d=Y(28518),x=Y(92275),f=Y(53941),T=Y(55586),g=Y(53898),b=Y(21362);const l=new g.Logger(b.i);class h extends x.Description{}class u extends x.Description{}class m extends x.Description{}class _ extends x.Description{static isIndexed(L){return!(!L||!L._isIndexed)}}const w={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function S(P,L){const V=new Error(`deferred error during ABI decoding triggered accessing ${P}`);return V.error=L,V}class I{constructor(L){let V=[];V="string"==typeof L?JSON.parse(L):L,(0,x.defineReadOnly)(this,"fragments",V.map(W=>T.HY.from(W)).filter(W=>null!=W)),(0,x.defineReadOnly)(this,"_abiCoder",(0,x.getStatic)(new.target,"getAbiCoder")()),(0,x.defineReadOnly)(this,"functions",{}),(0,x.defineReadOnly)(this,"errors",{}),(0,x.defineReadOnly)(this,"events",{}),(0,x.defineReadOnly)(this,"structs",{}),this.fragments.forEach(W=>{let G=null;switch(W.type){case"constructor":return this.deploy?void l.warn("duplicate definition - constructor"):void(0,x.defineReadOnly)(this,"deploy",W);case"function":G=this.functions;break;case"event":G=this.events;break;case"error":G=this.errors;break;default:return}let H=W.format();G[H]?l.warn("duplicate definition - "+H):G[H]=W}),this.deploy||(0,x.defineReadOnly)(this,"deploy",T.Xg.from({payable:!1,type:"constructor"})),(0,x.defineReadOnly)(this,"_isInterface",!0)}format(L){L||(L=T.pc.full),L===T.pc.sighash&&l.throwArgumentError("interface does not support formatting sighash","format",L);const V=this.fragments.map(W=>W.format(L));return L===T.pc.json?JSON.stringify(V.map(W=>JSON.parse(W))):V}static getAbiCoder(){return f.$}static getAddress(L){return(0,ie.getAddress)(L)}static getSighash(L){return(0,O.hexDataSlice)((0,E.id)(L.format()),0,4)}static getEventTopic(L){return(0,E.id)(L.format())}getFunction(L){if((0,O.isHexString)(L)){for(const W in this.functions)if(L===this.getSighash(W))return this.functions[W];l.throwArgumentError("no matching function","sighash",L)}if(-1===L.indexOf("(")){const W=L.trim(),G=Object.keys(this.functions).filter(H=>H.split("(")[0]===W);return 0===G.length?l.throwArgumentError("no matching function","name",W):G.length>1&&l.throwArgumentError("multiple matching functions","name",W),this.functions[G[0]]}const V=this.functions[T.YW.fromString(L).format()];return V||l.throwArgumentError("no matching function","signature",L),V}getEvent(L){if((0,O.isHexString)(L)){const W=L.toLowerCase();for(const G in this.events)if(W===this.getEventTopic(G))return this.events[G];l.throwArgumentError("no matching event","topichash",W)}if(-1===L.indexOf("(")){const W=L.trim(),G=Object.keys(this.events).filter(H=>H.split("(")[0]===W);return 0===G.length?l.throwArgumentError("no matching event","name",W):G.length>1&&l.throwArgumentError("multiple matching events","name",W),this.events[G[0]]}const V=this.events[T.QV.fromString(L).format()];return V||l.throwArgumentError("no matching event","signature",L),V}getError(L){if((0,O.isHexString)(L)){const W=(0,x.getStatic)(this.constructor,"getSighash");for(const G in this.errors)if(L===W(this.errors[G]))return this.errors[G];l.throwArgumentError("no matching error","sighash",L)}if(-1===L.indexOf("(")){const W=L.trim(),G=Object.keys(this.errors).filter(H=>H.split("(")[0]===W);return 0===G.length?l.throwArgumentError("no matching error","name",W):G.length>1&&l.throwArgumentError("multiple matching errors","name",W),this.errors[G[0]]}const V=this.errors[T.YW.fromString(L).format()];return V||l.throwArgumentError("no matching error","signature",L),V}getSighash(L){if("string"==typeof L)try{L=this.getFunction(L)}catch(V){try{L=this.getError(L)}catch{throw V}}return(0,x.getStatic)(this.constructor,"getSighash")(L)}getEventTopic(L){return"string"==typeof L&&(L=this.getEvent(L)),(0,x.getStatic)(this.constructor,"getEventTopic")(L)}_decodeParams(L,V){return this._abiCoder.decode(L,V)}_encodeParams(L,V){return this._abiCoder.encode(L,V)}encodeDeploy(L){return this._encodeParams(this.deploy.inputs,L||[])}decodeErrorResult(L,V){"string"==typeof L&&(L=this.getError(L));const W=(0,O.arrayify)(V);return(0,O.hexlify)(W.slice(0,4))!==this.getSighash(L)&&l.throwArgumentError(`data signature does not match error ${L.name}.`,"data",(0,O.hexlify)(W)),this._decodeParams(L.inputs,W.slice(4))}encodeErrorResult(L,V){return"string"==typeof L&&(L=this.getError(L)),(0,O.hexlify)((0,O.concat)([this.getSighash(L),this._encodeParams(L.inputs,V||[])]))}decodeFunctionData(L,V){"string"==typeof L&&(L=this.getFunction(L));const W=(0,O.arrayify)(V);return(0,O.hexlify)(W.slice(0,4))!==this.getSighash(L)&&l.throwArgumentError(`data signature does not match function ${L.name}.`,"data",(0,O.hexlify)(W)),this._decodeParams(L.inputs,W.slice(4))}encodeFunctionData(L,V){return"string"==typeof L&&(L=this.getFunction(L)),(0,O.hexlify)((0,O.concat)([this.getSighash(L),this._encodeParams(L.inputs,V||[])]))}decodeFunctionResult(L,V){"string"==typeof L&&(L=this.getFunction(L));let W=(0,O.arrayify)(V),G=null,H="",j=null,K=null,R=null;switch(W.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(L.outputs,W)}catch{}break;case 4:{const o=(0,O.hexlify)(W.slice(0,4)),y=w[o];if(y)j=this._abiCoder.decode(y.inputs,W.slice(4)),K=y.name,R=y.signature,y.reason&&(G=j[0]),"Error"===K?H=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(j[0])}`:"Panic"===K&&(H=`; VM Exception while processing transaction: reverted with panic code ${j[0]}`);else try{const M=this.getError(o);j=this._abiCoder.decode(M.inputs,W.slice(4)),K=M.name,R=M.format()}catch{}break}}return l.throwError("call revert exception"+H,g.Logger.errors.CALL_EXCEPTION,{method:L.format(),data:(0,O.hexlify)(V),errorArgs:j,errorName:K,errorSignature:R,reason:G})}encodeFunctionResult(L,V){return"string"==typeof L&&(L=this.getFunction(L)),(0,O.hexlify)(this._abiCoder.encode(L.outputs,V||[]))}encodeFilterTopics(L,V){"string"==typeof L&&(L=this.getEvent(L)),V.length>L.inputs.length&&l.throwError("too many arguments for "+L.format(),g.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:V});let W=[];L.anonymous||W.push(this.getEventTopic(L));const G=(H,j)=>"string"===H.type?(0,E.id)(j):"bytes"===H.type?(0,d.keccak256)((0,O.hexlify)(j)):("bool"===H.type&&"boolean"==typeof j&&(j=j?"0x01":"0x00"),H.type.match(/^u?int/)&&(j=z.O$.from(j).toHexString()),"address"===H.type&&this._abiCoder.encode(["address"],[j]),(0,O.hexZeroPad)((0,O.hexlify)(j),32));for(V.forEach((H,j)=>{let K=L.inputs[j];K.indexed?null==H?W.push(null):"array"===K.baseType||"tuple"===K.baseType?l.throwArgumentError("filtering with tuples or arrays not supported","contract."+K.name,H):Array.isArray(H)?W.push(H.map(R=>G(K,R))):W.push(G(K,H)):null!=H&&l.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+K.name,H)});W.length&&null===W[W.length-1];)W.pop();return W}encodeEventLog(L,V){"string"==typeof L&&(L=this.getEvent(L));const W=[],G=[],H=[];return L.anonymous||W.push(this.getEventTopic(L)),V.length!==L.inputs.length&&l.throwArgumentError("event arguments/values mismatch","values",V),L.inputs.forEach((j,K)=>{const R=V[K];if(j.indexed)if("string"===j.type)W.push((0,E.id)(R));else if("bytes"===j.type)W.push((0,d.keccak256)(R));else{if("tuple"===j.baseType||"array"===j.baseType)throw new Error("not implemented");W.push(this._abiCoder.encode([j.type],[R]))}else G.push(j),H.push(R)}),{data:this._abiCoder.encode(G,H),topics:W}}decodeEventLog(L,V,W){if("string"==typeof L&&(L=this.getEvent(L)),null!=W&&!L.anonymous){let v=this.getEventTopic(L);(!(0,O.isHexString)(W[0],32)||W[0].toLowerCase()!==v)&&l.throwError("fragment/topic mismatch",g.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:v,value:W[0]}),W=W.slice(1)}let G=[],H=[],j=[];L.inputs.forEach((v,k)=>{v.indexed?"string"===v.type||"bytes"===v.type||"tuple"===v.baseType||"array"===v.baseType?(G.push(T._R.fromObject({type:"bytes32",name:v.name})),j.push(!0)):(G.push(v),j.push(!1)):(H.push(v),j.push(!1))});let K=null!=W?this._abiCoder.decode(G,(0,O.concat)(W)):null,R=this._abiCoder.decode(H,V,!0),o=[],y=0,M=0;L.inputs.forEach((v,k)=>{if(v.indexed)if(null==K)o[k]=new _({_isIndexed:!0,hash:null});else if(j[k])o[k]=new _({_isIndexed:!0,hash:K[M++]});else try{o[k]=K[M++]}catch(D){o[k]=D}else try{o[k]=R[y++]}catch(D){o[k]=D}if(v.name&&null==o[v.name]){const D=o[k];D instanceof Error?Object.defineProperty(o,v.name,{enumerable:!0,get:()=>{throw S(`property ${JSON.stringify(v.name)}`,D)}}):o[v.name]=D}});for(let v=0;v{throw S(`index ${v}`,k)}})}return Object.freeze(o)}parseTransaction(L){let V=this.getFunction(L.data.substring(0,10).toLowerCase());return V?new u({args:this._abiCoder.decode(V.inputs,"0x"+L.data.substring(10)),functionFragment:V,name:V.name,signature:V.format(),sighash:this.getSighash(V),value:z.O$.from(L.value||"0")}):null}parseLog(L){let V=this.getEvent(L.topics[0]);return!V||V.anonymous?null:new h({eventFragment:V,name:V.name,signature:V.format(),topic:this.getEventTopic(V),args:this.decodeEventLog(V,L.data,L.topics)})}parseError(L){const V=(0,O.hexlify)(L);let W=this.getError(V.substring(0,10).toLowerCase());return W?new m({args:this._abiCoder.decode(W.inputs,"0x"+V.substring(10)),errorFragment:W,name:W.name,signature:W.format(),sighash:this.getSighash(W)}):null}static isInterface(L){return!(!L||!L._isInterface)}}},11527:(bt,be,Y)=>{"use strict";Y.d(be,{Sg:()=>f,zt:()=>l});var ie=Y(2024),z=Y(92275),O=Y(53898);const x=new O.Logger("abstract-provider/5.7.0");class f extends z.Description{static isForkEvent(u){return!(!u||!u._isForkEvent)}}class l{constructor(){x.checkAbstract(new.target,l),(0,z.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return h=this,u=void 0,_=function*(){const{block:u,gasPrice:m}=yield(0,z.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(I=>null)});let _=null,w=null,S=null;return u&&u.baseFeePerGas&&(_=u.baseFeePerGas,S=ie.O$.from("1500000000"),w=u.baseFeePerGas.mul(2).add(S)),{lastBaseFeePerGas:_,maxFeePerGas:w,maxPriorityFeePerGas:S,gasPrice:m}},new((m=void 0)||(m=Promise))(function(S,I){function P(W){try{V(_.next(W))}catch(G){I(G)}}function L(W){try{V(_.throw(W))}catch(G){I(G)}}function V(W){W.done?S(W.value):function(S){return S instanceof m?S:new m(function(I){I(S)})}(W.value).then(P,L)}V((_=_.apply(h,u||[])).next())});var h,u,m,_}addListener(u,m){return this.on(u,m)}removeListener(u,m){return this.off(u,m)}static isProvider(u){return!(!u||!u._isProvider)}}},11221:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{Signer:()=>T,VoidSigner:()=>g});var ie=Y(92275),z=Y(53898),E=function(b,l,h,u){return new(h||(h=Promise))(function(_,w){function S(L){try{P(u.next(L))}catch(V){w(V)}}function I(L){try{P(u.throw(L))}catch(V){w(V)}}function P(L){L.done?_(L.value):function(_){return _ instanceof h?_:new h(function(w){w(_)})}(L.value).then(S,I)}P((u=u.apply(b,l||[])).next())})};const d=new z.Logger("abstract-signer/5.7.0"),x=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],f=[z.Logger.errors.INSUFFICIENT_FUNDS,z.Logger.errors.NONCE_EXPIRED,z.Logger.errors.REPLACEMENT_UNDERPRICED];class T{constructor(){d.checkAbstract(new.target,T),(0,ie.defineReadOnly)(this,"_isSigner",!0)}getBalance(l){return E(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),l)})}getTransactionCount(l){return E(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),l)})}estimateGas(l){return E(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const h=yield(0,ie.resolveProperties)(this.checkTransaction(l));return yield this.provider.estimateGas(h)})}call(l,h){return E(this,void 0,void 0,function*(){this._checkProvider("call");const u=yield(0,ie.resolveProperties)(this.checkTransaction(l));return yield this.provider.call(u,h)})}sendTransaction(l){return E(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const h=yield this.populateTransaction(l),u=yield this.signTransaction(h);return yield this.provider.sendTransaction(u)})}getChainId(){return E(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return E(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return E(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(l){return E(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(l)})}checkTransaction(l){for(const u in l)-1===x.indexOf(u)&&d.throwArgumentError("invalid transaction key: "+u,"transaction",l);const h=(0,ie.shallowCopy)(l);return h.from=null==h.from?this.getAddress():Promise.all([Promise.resolve(h.from),this.getAddress()]).then(u=>(u[0].toLowerCase()!==u[1].toLowerCase()&&d.throwArgumentError("from address mismatch","transaction",l),u[0])),h}populateTransaction(l){return E(this,void 0,void 0,function*(){const h=yield(0,ie.resolveProperties)(this.checkTransaction(l));null!=h.to&&(h.to=Promise.resolve(h.to).then(m=>E(this,void 0,void 0,function*(){if(null==m)return null;const _=yield this.resolveName(m);return null==_&&d.throwArgumentError("provided ENS name resolves to null","tx.to",m),_})),h.to.catch(m=>{}));const u=null!=h.maxFeePerGas||null!=h.maxPriorityFeePerGas;if(null==h.gasPrice||2!==h.type&&!u?(0===h.type||1===h.type)&&u&&d.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",l):d.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",l),2!==h.type&&null!=h.type||null==h.maxFeePerGas||null==h.maxPriorityFeePerGas)if(0===h.type||1===h.type)null==h.gasPrice&&(h.gasPrice=this.getGasPrice());else{const m=yield this.getFeeData();if(null==h.type)if(null!=m.maxFeePerGas&&null!=m.maxPriorityFeePerGas)if(h.type=2,null!=h.gasPrice){const _=h.gasPrice;delete h.gasPrice,h.maxFeePerGas=_,h.maxPriorityFeePerGas=_}else null==h.maxFeePerGas&&(h.maxFeePerGas=m.maxFeePerGas),null==h.maxPriorityFeePerGas&&(h.maxPriorityFeePerGas=m.maxPriorityFeePerGas);else null!=m.gasPrice?(u&&d.throwError("network does not support EIP-1559",z.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==h.gasPrice&&(h.gasPrice=m.gasPrice),h.type=0):d.throwError("failed to get consistent fee data",z.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===h.type&&(null==h.maxFeePerGas&&(h.maxFeePerGas=m.maxFeePerGas),null==h.maxPriorityFeePerGas&&(h.maxPriorityFeePerGas=m.maxPriorityFeePerGas))}else h.type=2;return null==h.nonce&&(h.nonce=this.getTransactionCount("pending")),null==h.gasLimit&&(h.gasLimit=this.estimateGas(h).catch(m=>{if(f.indexOf(m.code)>=0)throw m;return d.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",z.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:m,tx:h})})),h.chainId=null==h.chainId?this.getChainId():Promise.all([Promise.resolve(h.chainId),this.getChainId()]).then(m=>(0!==m[1]&&m[0]!==m[1]&&d.throwArgumentError("chainId address mismatch","transaction",l),m[0])),yield(0,ie.resolveProperties)(h)})}_checkProvider(l){this.provider||d.throwError("missing provider",z.Logger.errors.UNSUPPORTED_OPERATION,{operation:l||"_checkProvider"})}static isSigner(l){return!(!l||!l._isSigner)}}class g extends T{constructor(l,h){super(),(0,ie.defineReadOnly)(this,"address",l),(0,ie.defineReadOnly)(this,"provider",h||null)}getAddress(){return Promise.resolve(this.address)}_fail(l,h){return Promise.resolve().then(()=>{d.throwError(l,z.Logger.errors.UNSUPPORTED_OPERATION,{operation:h})})}signMessage(l){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(l){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(l,h,u){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(l){return new g(this.address,l)}}},2885:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{getAddress:()=>m,getContractAddress:()=>S,getCreate2Address:()=>I,getIcapAddress:()=>w,isAddress:()=>_});var ie=Y(61488),z=Y(2024),O=Y(28518),E=Y(29276);const f=new(Y(53898).Logger)("address/5.7.0");function T(P){(0,ie.isHexString)(P,20)||f.throwArgumentError("invalid address","address",P);const L=(P=P.toLowerCase()).substring(2).split(""),V=new Uint8Array(40);for(let G=0;G<40;G++)V[G]=L[G].charCodeAt(0);const W=(0,ie.arrayify)((0,O.keccak256)(V));for(let G=0;G<40;G+=2)W[G>>1]>>4>=8&&(L[G]=L[G].toUpperCase()),(15&W[G>>1])>=8&&(L[G+1]=L[G+1].toUpperCase());return"0x"+L.join("")}const l={};for(let P=0;P<10;P++)l[String(P)]=String(P);for(let P=0;P<26;P++)l[String.fromCharCode(65+P)]=String(10+P);const h=Math.floor((P=9007199254740991,Math.log10?Math.log10(P):Math.log(P)/Math.LN10));var P;function u(P){let L=(P=(P=P.toUpperCase()).substring(4)+P.substring(0,2)+"00").split("").map(W=>l[W]).join("");for(;L.length>=h;){let W=L.substring(0,h);L=parseInt(W,10)%97+L.substring(W.length)}let V=String(98-parseInt(L,10)%97);for(;V.length<2;)V="0"+V;return V}function m(P){let L=null;if("string"!=typeof P&&f.throwArgumentError("invalid address","address",P),P.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==P.substring(0,2)&&(P="0x"+P),L=T(P),P.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&L!==P&&f.throwArgumentError("bad address checksum","address",P);else if(P.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(P.substring(2,4)!==u(P)&&f.throwArgumentError("bad icap checksum","address",P),L=(0,z.g$)(P.substring(4));L.length<40;)L="0"+L;L=T("0x"+L)}else f.throwArgumentError("invalid address","address",P);return L}function _(P){try{return m(P),!0}catch{}return!1}function w(P){let L=(0,z.t2)(m(P).substring(2)).toUpperCase();for(;L.length<30;)L="0"+L;return"XE"+u("XE00"+L)+L}function S(P){let L=null;try{L=m(P.from)}catch{f.throwArgumentError("missing from address","transaction",P)}const V=(0,ie.stripZeros)((0,ie.arrayify)(z.O$.from(P.nonce).toHexString()));return m((0,ie.hexDataSlice)((0,O.keccak256)((0,E.encode)([L,V])),12))}function I(P,L,V){return 32!==(0,ie.hexDataLength)(L)&&f.throwArgumentError("salt must be 32 bytes","salt",L),32!==(0,ie.hexDataLength)(V)&&f.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",V),m((0,ie.hexDataSlice)((0,O.keccak256)((0,ie.concat)(["0xff",m(P),L,V])),12))}},53744:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BaseX:()=>O,Base32:()=>E,Base58:()=>d});var ie=Y(61488),z=Y(92275);class O{constructor(f){(0,z.defineReadOnly)(this,"alphabet",f),(0,z.defineReadOnly)(this,"base",f.length),(0,z.defineReadOnly)(this,"_alphabetMap",{}),(0,z.defineReadOnly)(this,"_leader",f.charAt(0));for(let T=0;T0;)g.push(h%this.base),h=h/this.base|0}let b="";for(let l=0;0===T[l]&&l=0;--l)b+=this.alphabet[g[l]];return b}decode(f){if("string"!=typeof f)throw new TypeError("Expected String");let T=[];if(0===f.length)return new Uint8Array(T);T.push(0);for(let g=0;g>=8;for(;l>0;)T.push(255&l),l>>=8}for(let g=0;f[g]===this._leader&&g{"use strict";Y.d(be,{i:()=>ie});const ie="bignumber/5.7.0"},2024:(bt,be,Y)=>{"use strict";Y.d(be,{Zm:()=>b,O$:()=>h,g$:()=>S,t2:()=>I});var ie=Y(62630),z=Y.n(ie),O=Y(61488),E=Y(53898),d=Y(64325),x=z().BN;const f=new E.Logger(d.i),T={},g=9007199254740991;function b(P){return null!=P&&(h.isBigNumber(P)||"number"==typeof P&&P%1==0||"string"==typeof P&&!!P.match(/^-?[0-9]+$/)||(0,O.isHexString)(P)||"bigint"==typeof P||(0,O.isBytes)(P))}let l=!1;class h{constructor(L,V){L!==T&&f.throwError("cannot call constructor directly; use BigNumber.from",E.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=V,this._isBigNumber=!0,Object.freeze(this)}fromTwos(L){return m(_(this).fromTwos(L))}toTwos(L){return m(_(this).toTwos(L))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(L){return m(_(this).add(_(L)))}sub(L){return m(_(this).sub(_(L)))}div(L){return h.from(L).isZero()&&w("division-by-zero","div"),m(_(this).div(_(L)))}mul(L){return m(_(this).mul(_(L)))}mod(L){const V=_(L);return V.isNeg()&&w("division-by-zero","mod"),m(_(this).umod(V))}pow(L){const V=_(L);return V.isNeg()&&w("negative-power","pow"),m(_(this).pow(V))}and(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("unbound-bitwise-result","and"),m(_(this).and(V))}or(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("unbound-bitwise-result","or"),m(_(this).or(V))}xor(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("unbound-bitwise-result","xor"),m(_(this).xor(V))}mask(L){return(this.isNegative()||L<0)&&w("negative-width","mask"),m(_(this).maskn(L))}shl(L){return(this.isNegative()||L<0)&&w("negative-width","shl"),m(_(this).shln(L))}shr(L){return(this.isNegative()||L<0)&&w("negative-width","shr"),m(_(this).shrn(L))}eq(L){return _(this).eq(_(L))}lt(L){return _(this).lt(_(L))}lte(L){return _(this).lte(_(L))}gt(L){return _(this).gt(_(L))}gte(L){return _(this).gte(_(L))}isNegative(){return"-"===this._hex[0]}isZero(){return _(this).isZero()}toNumber(){try{return _(this).toNumber()}catch{w("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return f.throwError("this platform does not support BigInt",E.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?l||(l=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):f.throwError(16===arguments[0]?"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()":"BigNumber.toString does not accept parameters",E.Logger.errors.UNEXPECTED_ARGUMENT,{})),_(this).toString(10)}toHexString(){return this._hex}toJSON(L){return{type:"BigNumber",hex:this.toHexString()}}static from(L){if(L instanceof h)return L;if("string"==typeof L)return L.match(/^-?0x[0-9a-f]+$/i)?new h(T,u(L)):L.match(/^-?[0-9]+$/)?new h(T,u(new x(L))):f.throwArgumentError("invalid BigNumber string","value",L);if("number"==typeof L)return L%1&&w("underflow","BigNumber.from",L),(L>=g||L<=-g)&&w("overflow","BigNumber.from",L),h.from(String(L));const V=L;if("bigint"==typeof V)return h.from(V.toString());if((0,O.isBytes)(V))return h.from((0,O.hexlify)(V));if(V)if(V.toHexString){const W=V.toHexString();if("string"==typeof W)return h.from(W)}else{let W=V._hex;if(null==W&&"BigNumber"===V.type&&(W=V.hex),"string"==typeof W&&((0,O.isHexString)(W)||"-"===W[0]&&(0,O.isHexString)(W.substring(1))))return h.from(W)}return f.throwArgumentError("invalid BigNumber value","value",L)}static isBigNumber(L){return!(!L||!L._isBigNumber)}}function u(P){if("string"!=typeof P)return u(P.toString(16));if("-"===P[0])return"-"===(P=P.substring(1))[0]&&f.throwArgumentError("invalid hex","value",P),"0x00"===(P=u(P))?P:"-"+P;if("0x"!==P.substring(0,2)&&(P="0x"+P),"0x"===P)return"0x00";for(P.length%2&&(P="0x0"+P.substring(2));P.length>4&&"0x00"===P.substring(0,4);)P="0x"+P.substring(4);return P}function m(P){return h.from(u(P))}function _(P){const L=h.from(P).toHexString();return new x("-"===L[0]?"-"+L.substring(3):L.substring(2),16)}function w(P,L,V){const W={fault:P,operation:L};return null!=V&&(W.value=V),f.throwError(P,E.Logger.errors.NUMERIC_FAULT,W)}function S(P){return new x(P,36).toString(16)}function I(P){return new x(P,16).toString(36)}},71677:(bt,be,Y)=>{"use strict";Y.d(be,{S5:()=>h,Ox:()=>u,xO:()=>m,xs:()=>_});var ie=Y(61488),z=Y(53898),O=Y(64325),E=Y(2024);const d=new z.Logger(O.i),x={},f=E.O$.from(0),T=E.O$.from(-1);function g(I,P,L,V){const W={fault:P,operation:L};return void 0!==V&&(W.value=V),d.throwError(I,z.Logger.errors.NUMERIC_FAULT,W)}let b="0";for(;b.length<256;)b+=b;function l(I){if("number"!=typeof I)try{I=E.O$.from(I).toNumber()}catch{}return"number"==typeof I&&I>=0&&I<=256&&!(I%1)?"1"+b.substring(0,I):d.throwArgumentError("invalid decimal size","decimals",I)}function h(I,P){null==P&&(P=0);const L=l(P),V=(I=E.O$.from(I)).lt(f);V&&(I=I.mul(T));let W=I.mod(L).toString();for(;W.length2&&d.throwArgumentError("too many decimal points","value",I);let G=W[0],H=W[1];for(G||(G="0"),H||(H="0");"0"===H[H.length-1];)H=H.substring(0,H.length-1);for(H.length>L.length-1&&g("fractional component exceeds decimals","underflow","parseFixed"),""===H&&(H="0");H.lengthnull==P[H]?K:(typeof P[H]!==j&&d.throwArgumentError("invalid fixed format ("+H+" not "+j+")","format."+H,P[H]),P[H]);L=G("signed","boolean",L),V=G("width","number",V),W=G("decimals","number",W)}return V%8&&d.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",V),W>80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",W),new m(x,L,V,W)}}class _{constructor(P,L,V,W){P!==x&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",z.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=W,this._hex=L,this._value=V,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(P){this.format.name!==P.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",P)}addUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.add(V),this.format.decimals,this.format)}subUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.sub(V),this.format.decimals,this.format)}mulUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.mul(V).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.mul(this.format._multiplier).div(V),this.format.decimals,this.format)}floor(){const P=this.toString().split(".");1===P.length&&P.push("0");let L=_.from(P[0],this.format);const V=!P[1].match(/^(0*)$/);return this.isNegative()&&V&&(L=L.subUnsafe(w.toFormat(L.format))),L}ceiling(){const P=this.toString().split(".");1===P.length&&P.push("0");let L=_.from(P[0],this.format);const V=!P[1].match(/^(0*)$/);return!this.isNegative()&&V&&(L=L.addUnsafe(w.toFormat(L.format))),L}round(P){null==P&&(P=0);const L=this.toString().split(".");if(1===L.length&&L.push("0"),(P<0||P>80||P%1)&&d.throwArgumentError("invalid decimal count","decimals",P),L[1].length<=P)return this;const V=_.from("1"+b.substring(0,P),this.format),W=S.toFormat(this.format);return this.mulUnsafe(V).addUnsafe(W).floor().divUnsafe(V)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(P){if(null==P)return this._hex;P%8&&d.throwArgumentError("invalid byte width","width",P);const L=E.O$.from(this._hex).fromTwos(this.format.width).toTwos(P).toHexString();return(0,ie.hexZeroPad)(L,P/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(P){return _.fromString(this._value,P)}static fromValue(P,L,V){return null==V&&null!=L&&!(0,E.Zm)(L)&&(V=L,L=null),null==L&&(L=0),null==V&&(V="fixed"),_.fromString(h(P,L),m.from(V))}static fromString(P,L){null==L&&(L="fixed");const V=m.from(L),W=u(P,V.decimals);!V.signed&&W.lt(f)&&g("unsigned value cannot be negative","overflow","value",P);let G=null;V.signed?G=W.toTwos(V.width).toHexString():(G=W.toHexString(),G=(0,ie.hexZeroPad)(G,V.width/8));const H=h(W,V.decimals);return new _(x,G,H,V)}static fromBytes(P,L){null==L&&(L="fixed");const V=m.from(L);if((0,ie.arrayify)(P).length>V.width/8)throw new Error("overflow");let W=E.O$.from(P);V.signed&&(W=W.fromTwos(V.width));const G=W.toTwos((V.signed?0:1)+V.width).toHexString(),H=h(W,V.decimals);return new _(x,G,H,V)}static from(P,L){if("string"==typeof P)return _.fromString(P,L);if((0,ie.isBytes)(P))return _.fromBytes(P,L);try{return _.fromValue(P,0,L)}catch(V){if(V.code!==z.Logger.errors.INVALID_ARGUMENT)throw V}return d.throwArgumentError("invalid FixedNumber value","value",P)}static isFixedNumber(P){return!(!P||!P._isFixedNumber)}}const w=_.from(1),S=_.from("0.5")},34078:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BigNumber:()=>ie.O$,formatFixed:()=>z.S5,FixedFormat:()=>z.xO,FixedNumber:()=>z.xs,parseFixed:()=>z.Ox,_base16To36:()=>ie.t2,_base36To16:()=>ie.g$});var ie=Y(2024),z=Y(71677)},61488:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{arrayify:()=>g,concat:()=>b,hexConcat:()=>I,hexDataLength:()=>w,hexDataSlice:()=>S,hexStripZeros:()=>L,hexValue:()=>P,hexZeroPad:()=>V,hexlify:()=>_,isBytes:()=>T,isBytesLike:()=>x,isHexString:()=>u,joinSignature:()=>G,splitSignature:()=>W,stripZeros:()=>l,zeroPad:()=>h});const O=new(Y(53898).Logger)("bytes/5.7.0");function E(H){return!!H.toHexString}function d(H){return H.slice||(H.slice=function(){const j=Array.prototype.slice.call(arguments);return d(new Uint8Array(Array.prototype.slice.apply(H,j)))}),H}function x(H){return u(H)&&!(H.length%2)||T(H)}function f(H){return"number"==typeof H&&H==H&&H%1==0}function T(H){if(null==H)return!1;if(H.constructor===Uint8Array)return!0;if("string"==typeof H||!f(H.length)||H.length<0)return!1;for(let j=0;j=256)return!1}return!0}function g(H,j){if(j||(j={}),"number"==typeof H){O.checkSafeUint53(H,"invalid arrayify value");const K=[];for(;H;)K.unshift(255&H),H=parseInt(String(H/256));return 0===K.length&&K.push(0),d(new Uint8Array(K))}if(j.allowMissingPrefix&&"string"==typeof H&&"0x"!==H.substring(0,2)&&(H="0x"+H),E(H)&&(H=H.toHexString()),u(H)){let K=H.substring(2);K.length%2&&("left"===j.hexPad?K="0"+K:"right"===j.hexPad?K+="0":O.throwArgumentError("hex data is odd-length","value",H));const R=[];for(let o=0;og(o)),K=j.reduce((o,y)=>o+y.length,0),R=new Uint8Array(K);return j.reduce((o,y)=>(R.set(y,o),o+y.length),0),d(R)}function l(H){let j=g(H);if(0===j.length)return j;let K=0;for(;Kj&&O.throwArgumentError("value out of range","value",arguments[0]);const K=new Uint8Array(j);return K.set(H,j-H.length),d(K)}function u(H,j){return!("string"!=typeof H||!H.match(/^0x[0-9A-Fa-f]*$/)||j&&H.length!==2+2*j)}const m="0123456789abcdef";function _(H,j){if(j||(j={}),"number"==typeof H){O.checkSafeUint53(H,"invalid hexlify value");let K="";for(;H;)K=m[15&H]+K,H=Math.floor(H/16);return K.length?(K.length%2&&(K="0"+K),"0x"+K):"0x00"}if("bigint"==typeof H)return(H=H.toString(16)).length%2?"0x0"+H:"0x"+H;if(j.allowMissingPrefix&&"string"==typeof H&&"0x"!==H.substring(0,2)&&(H="0x"+H),E(H))return H.toHexString();if(u(H))return H.length%2&&("left"===j.hexPad?H="0x0"+H.substring(2):"right"===j.hexPad?H+="0":O.throwArgumentError("hex data is odd-length","value",H)),H.toLowerCase();if(T(H)){let K="0x";for(let R=0;R>4]+m[15&o]}return K}return O.throwArgumentError("invalid hexlify value","value",H)}function w(H){if("string"!=typeof H)H=_(H);else if(!u(H)||H.length%2)return null;return(H.length-2)/2}function S(H,j,K){return"string"!=typeof H?H=_(H):(!u(H)||H.length%2)&&O.throwArgumentError("invalid hexData","value",H),j=2+2*j,null!=K?"0x"+H.substring(j,2+2*K):"0x"+H.substring(j)}function I(H){let j="0x";return H.forEach(K=>{j+=_(K).substring(2)}),j}function P(H){const j=L(_(H,{hexPad:"left"}));return"0x"===j?"0x0":j}function L(H){"string"!=typeof H&&(H=_(H)),u(H)||O.throwArgumentError("invalid hex string","value",H),H=H.substring(2);let j=0;for(;j2*j+2&&O.throwArgumentError("value out of range","value",arguments[1]);H.length<2*j+2;)H="0x0"+H.substring(2);return H}function W(H){const j={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(x(H)){let K=g(H);64===K.length?(j.v=27+(K[32]>>7),K[32]&=127,j.r=_(K.slice(0,32)),j.s=_(K.slice(32,64))):65===K.length?(j.r=_(K.slice(0,32)),j.s=_(K.slice(32,64)),j.v=K[64]):O.throwArgumentError("invalid signature string","signature",H),j.v<27&&(0===j.v||1===j.v?j.v+=27:O.throwArgumentError("signature invalid v byte","signature",H)),j.recoveryParam=1-j.v%2,j.recoveryParam&&(K[32]|=128),j._vs=_(K.slice(32,64))}else{if(j.r=H.r,j.s=H.s,j.v=H.v,j.recoveryParam=H.recoveryParam,j._vs=H._vs,null!=j._vs){const o=h(g(j._vs),32);j._vs=_(o);const y=o[0]>=128?1:0;null==j.recoveryParam?j.recoveryParam=y:j.recoveryParam!==y&&O.throwArgumentError("signature recoveryParam mismatch _vs","signature",H),o[0]&=127;const M=_(o);null==j.s?j.s=M:j.s!==M&&O.throwArgumentError("signature v mismatch _vs","signature",H)}null==j.recoveryParam?null==j.v?O.throwArgumentError("signature missing v and recoveryParam","signature",H):j.recoveryParam=0===j.v||1===j.v?j.v:1-j.v%2:null==j.v?j.v=27+j.recoveryParam:j.recoveryParam!==(0===j.v||1===j.v?j.v:1-j.v%2)&&O.throwArgumentError("signature recoveryParam mismatch v","signature",H),null!=j.r&&u(j.r)?j.r=V(j.r,32):O.throwArgumentError("signature missing or invalid r","signature",H),null!=j.s&&u(j.s)?j.s=V(j.s,32):O.throwArgumentError("signature missing or invalid s","signature",H);const K=g(j.s);K[0]>=128&&O.throwArgumentError("signature s out of range","signature",H),j.recoveryParam&&(K[0]|=128);const R=_(K);j._vs&&(u(j._vs)||O.throwArgumentError("signature invalid _vs","signature",H),j._vs=V(j._vs,32)),null==j._vs?j._vs=R:j._vs!==R&&O.throwArgumentError("signature _vs mismatch v and s","signature",H)}return j.yParityAndS=j._vs,j.compact=j.r+j.yParityAndS.substring(2),j}function G(H){return _(b([(H=W(H)).r,H.s,H.recoveryParam?"0x1c":"0x1b"]))}},51528:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>ie});const ie="0x0000000000000000000000000000000000000000"},16659:(bt,be,Y)=>{"use strict";Y.d(be,{tL:()=>z,_Y:()=>O,fh:()=>E,Py:()=>d,Ce:()=>x,Bz:()=>f,$B:()=>T,PS:()=>g});var ie=Y(2024);const z=ie.O$.from(-1),O=ie.O$.from(0),E=ie.O$.from(1),d=ie.O$.from(2),x=ie.O$.from("1000000000000000000"),f=ie.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),T=ie.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),g=ie.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},45052:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>ie});const ie="0x0000000000000000000000000000000000000000000000000000000000000000"},11843:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{AddressZero:()=>ie.d,EtherSymbol:()=>E,HashZero:()=>O.R,MaxInt256:()=>z.PS,MaxUint256:()=>z.Bz,MinInt256:()=>z.$B,NegativeOne:()=>z.tL,One:()=>z.fh,Two:()=>z.Py,WeiPerEther:()=>z.Ce,Zero:()=>z._Y});var ie=Y(51528),z=Y(16659),O=Y(45052);const E="\u039e"},36776:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BaseContract:()=>y,Contract:()=>M,ContractFactory:()=>v});var ie=Y(91125),z=Y(20886),O=Y(11527),E=Y(11221),d=Y(2885),x=Y(2024),f=Y(61488),T=Y(92275),g=Y(32701),b=Y(53898),h=function(k,D,N,C){return new(N||(N=Promise))(function(B,Q){function ee(we){try{ue(C.next(we))}catch(ae){Q(ae)}}function ce(we){try{ue(C.throw(we))}catch(ae){Q(ae)}}function ue(we){we.done?B(we.value):function(B){return B instanceof N?B:new N(function(Q){Q(B)})}(we.value).then(ee,ce)}ue((C=C.apply(k,D||[])).next())})};const u=new b.Logger("contracts/5.7.0"),m={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function _(k,D){return h(this,void 0,void 0,function*(){const N=yield D;"string"!=typeof N&&u.throwArgumentError("invalid address or ENS name","name",N);try{return(0,d.getAddress)(N)}catch{}k||u.throwError("a provider or signer is needed to resolve ENS names",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const C=yield k.resolveName(N);return null==C&&u.throwArgumentError("resolver or addr is not configured for ENS name","name",N),C})}function w(k,D,N){return h(this,void 0,void 0,function*(){return Array.isArray(N)?yield Promise.all(N.map((C,a)=>w(k,Array.isArray(D)?D[a]:D[C.name],C))):"address"===N.type?yield _(k,D):"tuple"===N.type?yield w(k,D,N.components):"array"===N.baseType?Array.isArray(D)?yield Promise.all(D.map(C=>w(k,C,N.arrayChildren))):Promise.reject(u.makeError("invalid value for array",b.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:D})):D})}function S(k,D,N){return h(this,void 0,void 0,function*(){let C={};N.length===D.inputs.length+1&&"object"==typeof N[N.length-1]&&(C=(0,T.shallowCopy)(N.pop())),u.checkArgumentCount(N.length,D.inputs.length,"passed to contract"),k.signer?C.from=C.from?(0,T.resolveProperties)({override:_(k.signer,C.from),signer:k.signer.getAddress()}).then(ue=>h(this,void 0,void 0,function*(){return(0,d.getAddress)(ue.signer)!==ue.override&&u.throwError("Contract with a Signer cannot override from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),ue.override})):k.signer.getAddress():C.from&&(C.from=_(k.provider,C.from));const a=yield(0,T.resolveProperties)({args:w(k.signer||k.provider,N,D.inputs),address:k.resolvedAddress,overrides:(0,T.resolveProperties)(C)||{}}),B=k.interface.encodeFunctionData(D,a.args),Q={data:B,to:a.address},ee=a.overrides;if(null!=ee.nonce&&(Q.nonce=x.O$.from(ee.nonce).toNumber()),null!=ee.gasLimit&&(Q.gasLimit=x.O$.from(ee.gasLimit)),null!=ee.gasPrice&&(Q.gasPrice=x.O$.from(ee.gasPrice)),null!=ee.maxFeePerGas&&(Q.maxFeePerGas=x.O$.from(ee.maxFeePerGas)),null!=ee.maxPriorityFeePerGas&&(Q.maxPriorityFeePerGas=x.O$.from(ee.maxPriorityFeePerGas)),null!=ee.from&&(Q.from=ee.from),null!=ee.type&&(Q.type=ee.type),null!=ee.accessList&&(Q.accessList=(0,g.accessListify)(ee.accessList)),null==Q.gasLimit&&null!=D.gas){let ue=21e3;const we=(0,f.arrayify)(B);for(let ae=0;aenull!=C[ue]);return ce.length&&u.throwError(`cannot override ${ce.map(ue=>JSON.stringify(ue)).join(",")}`,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:ce}),Q})}function L(k,D){const N=D.wait.bind(D);D.wait=C=>N(C).then(a=>(a.events=a.logs.map(B=>{let Q=(0,T.deepCopy)(B),ee=null;try{ee=k.interface.parseLog(B)}catch{}return ee&&(Q.args=ee.args,Q.decode=(ce,ue)=>k.interface.decodeEventLog(ee.eventFragment,ce,ue),Q.event=ee.name,Q.eventSignature=ee.signature),Q.removeListener=()=>k.provider,Q.getBlock=()=>k.provider.getBlock(a.blockHash),Q.getTransaction=()=>k.provider.getTransaction(a.transactionHash),Q.getTransactionReceipt=()=>Promise.resolve(a),Q}),a))}function V(k,D,N){const C=k.signer||k.provider;return function(...a){return h(this,void 0,void 0,function*(){let B;if(a.length===D.inputs.length+1&&"object"==typeof a[a.length-1]){const ce=(0,T.shallowCopy)(a.pop());null!=ce.blockTag&&(B=yield ce.blockTag),delete ce.blockTag,a.push(ce)}null!=k.deployTransaction&&(yield k._deployed(B));const Q=yield S(k,D,a),ee=yield C.call(Q,B);try{let ce=k.interface.decodeFunctionResult(D,ee);return N&&1===D.outputs.length&&(ce=ce[0]),ce}catch(ce){throw ce.code===b.Logger.errors.CALL_EXCEPTION&&(ce.address=k.address,ce.args=a,ce.transaction=Q),ce}})}}function G(k,D,N){return D.constant?V(k,D,N):function(k,D){return function(...N){return h(this,void 0,void 0,function*(){k.signer||u.throwError("sending a transaction requires a signer",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=k.deployTransaction&&(yield k._deployed());const C=yield S(k,D,N),a=yield k.signer.sendTransaction(C);return L(k,a),a})}}(k,D)}function H(k){return!k.address||null!=k.topics&&0!==k.topics.length?(k.address||"*")+"@"+(k.topics?k.topics.map(D=>Array.isArray(D)?D.join("|"):D).join(":"):""):"*"}class j{constructor(D,N){(0,T.defineReadOnly)(this,"tag",D),(0,T.defineReadOnly)(this,"filter",N),this._listeners=[]}addListener(D,N){this._listeners.push({listener:D,once:N})}removeListener(D){let N=!1;this._listeners=this._listeners.filter(C=>!(!N&&C.listener===D&&(N=!0,1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(D=>D.listener)}listenerCount(){return this._listeners.length}run(D){const N=this.listenerCount();return this._listeners=this._listeners.filter(C=>{const a=D.slice();return setTimeout(()=>{C.listener.apply(this,a)},0),!C.once}),N}prepareEvent(D){}getEmit(D){return[D]}}class K extends j{constructor(){super("error",null)}}class R extends j{constructor(D,N,C,a){const B={address:D};let Q=N.getEventTopic(C);a?(Q!==a[0]&&u.throwArgumentError("topic mismatch","topics",a),B.topics=a.slice()):B.topics=[Q],super(H(B),B),(0,T.defineReadOnly)(this,"address",D),(0,T.defineReadOnly)(this,"interface",N),(0,T.defineReadOnly)(this,"fragment",C)}prepareEvent(D){super.prepareEvent(D),D.event=this.fragment.name,D.eventSignature=this.fragment.format(),D.decode=(N,C)=>this.interface.decodeEventLog(this.fragment,N,C);try{D.args=this.interface.decodeEventLog(this.fragment,D.data,D.topics)}catch(N){D.args=null,D.decodeError=N}}getEmit(D){const N=(0,ie.BR)(D.args);if(N.length)throw N[0].error;const C=(D.args||[]).slice();return C.push(D),C}}class o extends j{constructor(D,N){super("*",{address:D}),(0,T.defineReadOnly)(this,"address",D),(0,T.defineReadOnly)(this,"interface",N)}prepareEvent(D){super.prepareEvent(D);try{const N=this.interface.parseLog(D);D.event=N.name,D.eventSignature=N.signature,D.decode=(C,a)=>this.interface.decodeEventLog(N.eventFragment,C,a),D.args=N.args}catch{}}}class y{constructor(D,N,C){(0,T.defineReadOnly)(this,"interface",(0,T.getStatic)(new.target,"getInterface")(N)),null==C?((0,T.defineReadOnly)(this,"provider",null),(0,T.defineReadOnly)(this,"signer",null)):E.Signer.isSigner(C)?((0,T.defineReadOnly)(this,"provider",C.provider||null),(0,T.defineReadOnly)(this,"signer",C)):O.zt.isProvider(C)?((0,T.defineReadOnly)(this,"provider",C),(0,T.defineReadOnly)(this,"signer",null)):u.throwArgumentError("invalid signer or provider","signerOrProvider",C),(0,T.defineReadOnly)(this,"callStatic",{}),(0,T.defineReadOnly)(this,"estimateGas",{}),(0,T.defineReadOnly)(this,"functions",{}),(0,T.defineReadOnly)(this,"populateTransaction",{}),(0,T.defineReadOnly)(this,"filters",{});{const Q={};Object.keys(this.interface.events).forEach(ee=>{const ce=this.interface.events[ee];(0,T.defineReadOnly)(this.filters,ee,(...ue)=>({address:this.address,topics:this.interface.encodeFilterTopics(ce,ue)})),Q[ce.name]||(Q[ce.name]=[]),Q[ce.name].push(ee)}),Object.keys(Q).forEach(ee=>{const ce=Q[ee];1===ce.length?(0,T.defineReadOnly)(this.filters,ee,this.filters[ce[0]]):u.warn(`Duplicate definition of ${ee} (${ce.join(", ")})`)})}if((0,T.defineReadOnly)(this,"_runningEvents",{}),(0,T.defineReadOnly)(this,"_wrappedEmits",{}),null==D&&u.throwArgumentError("invalid contract address or ENS name","addressOrName",D),(0,T.defineReadOnly)(this,"address",D),this.provider)(0,T.defineReadOnly)(this,"resolvedAddress",_(this.provider,D));else try{(0,T.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,d.getAddress)(D)))}catch{u.throwError("provider is required to use ENS name as contract address",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(Q=>{});const a={},B={};Object.keys(this.interface.functions).forEach(Q=>{const ee=this.interface.functions[Q];if(B[Q])u.warn(`Duplicate ABI entry for ${JSON.stringify(Q)}`);else{B[Q]=!0;{const ce=ee.name;a[`%${ce}`]||(a[`%${ce}`]=[]),a[`%${ce}`].push(Q)}null==this[Q]&&(0,T.defineReadOnly)(this,Q,G(this,ee,!0)),null==this.functions[Q]&&(0,T.defineReadOnly)(this.functions,Q,G(this,ee,!1)),null==this.callStatic[Q]&&(0,T.defineReadOnly)(this.callStatic,Q,V(this,ee,!0)),null==this.populateTransaction[Q]&&(0,T.defineReadOnly)(this.populateTransaction,Q,function(k,D){return function(...N){return S(k,D,N)}}(this,ee)),null==this.estimateGas[Q]&&(0,T.defineReadOnly)(this.estimateGas,Q,function(k,D){const N=k.signer||k.provider;return function(...C){return h(this,void 0,void 0,function*(){N||u.throwError("estimate require a provider or signer",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const a=yield S(k,D,C);return yield N.estimateGas(a)})}}(this,ee))}}),Object.keys(a).forEach(Q=>{const ee=a[Q];if(ee.length>1)return;Q=Q.substring(1);const ce=ee[0];try{null==this[Q]&&(0,T.defineReadOnly)(this,Q,this[ce])}catch{}null==this.functions[Q]&&(0,T.defineReadOnly)(this.functions,Q,this.functions[ce]),null==this.callStatic[Q]&&(0,T.defineReadOnly)(this.callStatic,Q,this.callStatic[ce]),null==this.populateTransaction[Q]&&(0,T.defineReadOnly)(this.populateTransaction,Q,this.populateTransaction[ce]),null==this.estimateGas[Q]&&(0,T.defineReadOnly)(this.estimateGas,Q,this.estimateGas[ce])})}static getContractAddress(D){return(0,d.getContractAddress)(D)}static getInterface(D){return z.vU.isInterface(D)?D:new z.vU(D)}deployed(){return this._deployed()}_deployed(D){return this._deployedPromise||(this._deployedPromise=this.deployTransaction?this.deployTransaction.wait().then(()=>this):this.provider.getCode(this.address,D).then(N=>("0x"===N&&u.throwError("contract not deployed",b.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(D){this.signer||u.throwError("sending a transactions require a signer",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const N=(0,T.shallowCopy)(D||{});return["from","to"].forEach(function(C){null!=N[C]&&u.throwError("cannot override "+C,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:C})}),N.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(N))}connect(D){"string"==typeof D&&(D=new E.VoidSigner(D,this.provider));const N=new this.constructor(this.address,this.interface,D);return this.deployTransaction&&(0,T.defineReadOnly)(N,"deployTransaction",this.deployTransaction),N}attach(D){return new this.constructor(D,this.interface,this.signer||this.provider)}static isIndexed(D){return z.Hk.isIndexed(D)}_normalizeRunningEvent(D){return this._runningEvents[D.tag]?this._runningEvents[D.tag]:D}_getRunningEvent(D){if("string"==typeof D){if("error"===D)return this._normalizeRunningEvent(new K);if("event"===D)return this._normalizeRunningEvent(new j("event",null));if("*"===D)return this._normalizeRunningEvent(new o(this.address,this.interface));const N=this.interface.getEvent(D);return this._normalizeRunningEvent(new R(this.address,this.interface,N))}if(D.topics&&D.topics.length>0){try{const C=D.topics[0];if("string"!=typeof C)throw new Error("invalid topic");const a=this.interface.getEvent(C);return this._normalizeRunningEvent(new R(this.address,this.interface,a,D.topics))}catch{}const N={address:this.address,topics:D.topics};return this._normalizeRunningEvent(new j(H(N),N))}return this._normalizeRunningEvent(new o(this.address,this.interface))}_checkRunningEvents(D){if(0===D.listenerCount()){delete this._runningEvents[D.tag];const N=this._wrappedEmits[D.tag];N&&D.filter&&(this.provider.off(D.filter,N),delete this._wrappedEmits[D.tag])}}_wrapEvent(D,N,C){const a=(0,T.deepCopy)(N);return a.removeListener=()=>{!C||(D.removeListener(C),this._checkRunningEvents(D))},a.getBlock=()=>this.provider.getBlock(N.blockHash),a.getTransaction=()=>this.provider.getTransaction(N.transactionHash),a.getTransactionReceipt=()=>this.provider.getTransactionReceipt(N.transactionHash),D.prepareEvent(a),a}_addEventListener(D,N,C){if(this.provider||u.throwError("events require a provider or a signer with a provider",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),D.addListener(N,C),this._runningEvents[D.tag]=D,!this._wrappedEmits[D.tag]){const a=B=>{let Q=this._wrapEvent(D,B,N);if(null==Q.decodeError)try{const ee=D.getEmit(Q);this.emit(D.filter,...ee)}catch(ee){Q.decodeError=ee.error}null!=D.filter&&this.emit("event",Q),null!=Q.decodeError&&this.emit("error",Q.decodeError,Q)};this._wrappedEmits[D.tag]=a,null!=D.filter&&this.provider.on(D.filter,a)}}queryFilter(D,N,C){const a=this._getRunningEvent(D),B=(0,T.shallowCopy)(a.filter);return"string"==typeof N&&(0,f.isHexString)(N,32)?(null!=C&&u.throwArgumentError("cannot specify toBlock with blockhash","toBlock",C),B.blockHash=N):(B.fromBlock=N??0,B.toBlock=C??"latest"),this.provider.getLogs(B).then(Q=>Q.map(ee=>this._wrapEvent(a,ee,null)))}on(D,N){return this._addEventListener(this._getRunningEvent(D),N,!1),this}once(D,N){return this._addEventListener(this._getRunningEvent(D),N,!0),this}emit(D,...N){if(!this.provider)return!1;const C=this._getRunningEvent(D),a=C.run(N)>0;return this._checkRunningEvents(C),a}listenerCount(D){return this.provider?null==D?Object.keys(this._runningEvents).reduce((N,C)=>N+this._runningEvents[C].listenerCount(),0):this._getRunningEvent(D).listenerCount():0}listeners(D){if(!this.provider)return[];if(null==D){const N=[];for(let C in this._runningEvents)this._runningEvents[C].listeners().forEach(a=>{N.push(a)});return N}return this._getRunningEvent(D).listeners()}removeAllListeners(D){if(!this.provider)return this;if(null==D){for(const C in this._runningEvents){const a=this._runningEvents[C];a.removeAllListeners(),this._checkRunningEvents(a)}return this}const N=this._getRunningEvent(D);return N.removeAllListeners(),this._checkRunningEvents(N),this}off(D,N){if(!this.provider)return this;const C=this._getRunningEvent(D);return C.removeListener(N),this._checkRunningEvents(C),this}removeListener(D,N){return this.off(D,N)}}class M extends y{}class v{constructor(D,N,C){let a=null;a="string"==typeof N?N:(0,f.isBytes)(N)?(0,f.hexlify)(N):N&&"string"==typeof N.object?N.object:"!","0x"!==a.substring(0,2)&&(a="0x"+a),(!(0,f.isHexString)(a)||a.length%2)&&u.throwArgumentError("invalid bytecode","bytecode",N),C&&!E.Signer.isSigner(C)&&u.throwArgumentError("invalid signer","signer",C),(0,T.defineReadOnly)(this,"bytecode",a),(0,T.defineReadOnly)(this,"interface",(0,T.getStatic)(new.target,"getInterface")(D)),(0,T.defineReadOnly)(this,"signer",C||null)}getDeployTransaction(...D){let N={};if(D.length===this.interface.deploy.inputs.length+1&&"object"==typeof D[D.length-1]){N=(0,T.shallowCopy)(D.pop());for(const C in N)if(!m[C])throw new Error("unknown transaction override "+C)}return["data","from","to"].forEach(C=>{null!=N[C]&&u.throwError("cannot override "+C,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:C})}),N.value&&!x.O$.from(N.value).isZero()&&!this.interface.deploy.payable&&u.throwError("non-payable constructor cannot override value",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:N.value}),u.checkArgumentCount(D.length,this.interface.deploy.inputs.length," in Contract constructor"),N.data=(0,f.hexlify)((0,f.concat)([this.bytecode,this.interface.encodeDeploy(D)])),N}deploy(...D){return h(this,void 0,void 0,function*(){let N={};D.length===this.interface.deploy.inputs.length+1&&(N=D.pop()),u.checkArgumentCount(D.length,this.interface.deploy.inputs.length," in Contract constructor");const C=yield w(this.signer,D,this.interface.deploy.inputs);C.push(N);const a=this.getDeployTransaction(...C),B=yield this.signer.sendTransaction(a),Q=(0,T.getStatic)(this.constructor,"getContractAddress")(B),ee=(0,T.getStatic)(this.constructor,"getContract")(Q,this.interface,this.signer);return L(ee,B),(0,T.defineReadOnly)(ee,"deployTransaction",B),ee})}attach(D){return this.constructor.getContract(D,this.interface,this.signer)}connect(D){return new this.constructor(this.interface,this.bytecode,D)}static fromSolidity(D,N){null==D&&u.throwError("missing compiler output",b.Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof D&&(D=JSON.parse(D));let a=null;return D.bytecode?a=D.bytecode:D.evm&&D.evm.bytecode&&(a=D.evm.bytecode),new this(D.abi,a,N)}static getInterface(D){return M.getInterface(D)}static getContractAddress(D){return(0,d.getContractAddress)(D)}static getContract(D,N,C){return new M(D,N,C)}}},88022:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="hash/5.7.0"},67475:(bt,be,Y)=>{"use strict";Y.d(be,{id:()=>O});var ie=Y(28518),z=Y(8822);function O(E){return(0,ie.keccak256)((0,z.Y0)(E))}},778:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{id:()=>ie.id,dnsEncode:()=>z.Kn,namehash:()=>z.VM,isValidName:()=>z.r1,ensNormalize:()=>z.w3,messagePrefix:()=>O.B,hashMessage:()=>O.r,_TypedDataEncoder:()=>E.E});var ie=Y(67475),z=Y(21),O=Y(78429),E=Y(72072)},78429:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>E,r:()=>d});var ie=Y(61488),z=Y(28518),O=Y(8822);const E="\x19Ethereum Signed Message:\n";function d(x){return"string"==typeof x&&(x=(0,O.Y0)(x)),(0,z.keccak256)((0,ie.concat)([(0,O.Y0)(E),(0,O.Y0)(String(x.length)),x]))}},21:(bt,be,Y)=>{"use strict";Y.d(be,{Kn:()=>X,w3:()=>ae,r1:()=>Te,VM:()=>le});var ie=Y(61488),z=Y(8822),O=Y(28518),E=Y(53898),d=Y(88022);function T(ne,pe){null==pe&&(pe=1);const _e=[],xe=_e.forEach,Ce=function(ke,me){xe.call(ke,function(Ee){me>0&&Array.isArray(Ee)?Ce(Ee,me-1):_e.push(Ee)})};return Ce(ne,pe),_e}function u(ne){return 1&ne?~ne>>1:ne>>1}function _(ne,pe){let _e=Array(ne);for(let xe=0,Ce=-1;xepe[me]):_e}function L(ne,pe,_e){let xe=Array(ne).fill(void 0).map(()=>[]);for(let Ce=0;Cexe[me].push(ke));return xe}function V(ne,pe){let _e=1+pe(),xe=pe(),Ce=function(ne){let pe=[];for(;;){let _e=ne();if(0==_e)break;pe.push(_e)}return pe}(pe);return T(L(Ce.length,1+ne,pe).map((me,Ee)=>{const ze=me[0],Ve=me.slice(1);return Array(Ce[Ee]).fill(void 0).map((nt,tt)=>{let mt=tt*xe;return[ze+tt*_e,Ve.map(ht=>ht+mt)]})}))}function W(ne,pe){return L(1+pe(),1+ne,pe).map(Ce=>[Ce[0],Ce.slice(1)])}const j=function(ne){let pe=0;return()=>ne[pe++]}(function(ne){let pe=0;function _e(){return ne[pe++]<<8|ne[pe++]}let xe=_e(),Ce=1,ke=[0,1];for(let dn=1;dn>--ze&1}const mt=Math.pow(2,31),ht=mt>>>1,wt=ht>>1,Pt=mt-1;let st=0;for(let dn=0;dn<31;dn++)st=st<<1|nt();let Ye=[],gt=0,St=mt;for(;;){let dn=Math.floor(((st-gt+1)*Ce-1)/St),Nt=0,It=xe;for(;It-Nt>1;){let Yt=Nt+It>>>1;dn>>1|nt(),qt=qt<<1^ht,jt=(jt^ht)<<1|ht|1;gt=qt,St=1+jt-qt}let Wt=xe-4;return Ye.map(dn=>{switch(dn-Wt){case 3:return Wt+65792+(ne[Ee++]<<16|ne[Ee++]<<8|ne[Ee++]);case 2:return Wt+256+(ne[Ee++]<<8|ne[Ee++]);case 1:return Wt+ne[Ee++];default:return dn-1}})}(function(ne){ne=atob(ne);const pe=[];for(let _e=0;_exe-Ce);return function _e(){let xe=[];for(;;){let Ve=S(ne,pe);if(0==Ve.length)break;xe.push({set:new Set(Ve),node:_e()})}xe.sort((Ve,nt)=>nt.set.size-Ve.set.size);let Ce=ne(),ke=Ce%3;Ce=Ce/3|0;let me=!!(1&Ce);return Ce>>=1,{branches:xe,valid:ke,fe0f:me,save:1==Ce,check:2==Ce}}()}(j);function k(ne){return(0,z.XL)(ne)}function D(ne){return ne.filter(pe=>65039!=pe)}function N(ne){for(let pe of ne.split(".")){let _e=k(pe);try{for(let xe=_e.lastIndexOf(95)-1;xe>=0;xe--)if(95!==_e[xe])throw new Error("underscore only allowed at start");if(_e.length>=4&&_e.every(xe=>xe<128)&&45===_e[2]&&45===_e[3])throw new Error("invalid label extension")}catch(xe){throw new Error(`Invalid label "${pe}": ${xe.message}`)}}return ne}function Q(ne,pe){var _e;let Ce,ke,xe=y,me=[],Ee=ne.length;for(pe&&(pe.length=0);Ee;){let ze=ne[--Ee];if(xe=null===(_e=xe.branches.find(Ve=>Ve.set.has(ze)))||void 0===_e?void 0:_e.node,!xe)break;if(xe.save)ke=ze;else if(xe.check&&ze===ke)break;me.push(ze),xe.fe0f&&(me.push(65039),Ee>0&&65039==ne[Ee-1]&&Ee--),xe.valid&&(Ce=me.slice(),2==xe.valid&&Ce.splice(1,1),pe&&pe.push(...ne.slice(Ee).reverse()),ne.length=Ee)}return Ce}const ee=new E.Logger(d.i),ce=new Uint8Array(32);function ue(ne){if(0===ne.length)throw new Error("invalid ENS name; empty component");return ne}function we(ne){const pe=(0,z.Y0)(function(ne){return N(function(ne,pe){let _e=k(ne).reverse(),xe=[];for(;_e.length;){let Ce=Q(_e);if(Ce){xe.push(...pe(Ce));continue}let ke=_e.pop();if(K.has(ke)){xe.push(ke);continue}if(R.has(ke))continue;let me=o[ke];if(!me)throw new Error(`Disallowed codepoint: 0x${ke.toString(16).toUpperCase()}`);xe.push(...me)}return N(function(ne){return ne.normalize("NFC")}(String.fromCodePoint(...xe)))}(ne,D))}(ne)),_e=[];if(0===ne.length)return _e;let xe=0;for(let Ce=0;Ce=pe.length)throw new Error("invalid ENS name; empty component");return _e.push(ue(pe.slice(xe))),_e}function ae(ne){return we(ne).map(pe=>(0,z.ZN)(pe)).join(".")}function Te(ne){try{return 0!==we(ne).length}catch{}return!1}function le(ne){"string"!=typeof ne&&ee.throwArgumentError("invalid ENS name; not a string","name",ne);let pe=ce;const _e=we(ne);for(;_e.length;)pe=(0,O.keccak256)((0,ie.concat)([pe,(0,O.keccak256)(_e.pop())]));return(0,ie.hexlify)(pe)}function X(ne){return(0,ie.hexlify)((0,ie.concat)(we(ne).map(pe=>{if(pe.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const _e=new Uint8Array(pe.length+1);return _e.set(pe,1),_e[0]=_e.length-1,_e})))+"00"}ce.fill(0)},72072:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>j});var ie=Y(2885),z=Y(2024),O=Y(61488),E=Y(28518),d=Y(92275),x=Y(53898),f=Y(88022),T=Y(67475);const b=new x.Logger(f.i),l=new Uint8Array(32);l.fill(0);const h=z.O$.from(-1),u=z.O$.from(0),m=z.O$.from(1),_=z.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),S=(0,O.hexZeroPad)(m.toHexString(),32),I=(0,O.hexZeroPad)(u.toHexString(),32),P={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},L=["name","version","chainId","verifyingContract","salt"];function V(K){return function(R){return"string"!=typeof R&&b.throwArgumentError(`invalid domain value for ${JSON.stringify(K)}`,`domain.${K}`,R),R}}const W={name:V("name"),version:V("version"),chainId:function(K){try{return z.O$.from(K).toString()}catch{}return b.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",K)},verifyingContract:function(K){try{return(0,ie.getAddress)(K).toLowerCase()}catch{}return b.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",K)},salt:function(K){try{const R=(0,O.arrayify)(K);if(32!==R.length)throw new Error("bad length");return(0,O.hexlify)(R)}catch{}return b.throwArgumentError('invalid domain value "salt"',"domain.salt",K)}};function G(K){{const R=K.match(/^(u?)int(\d*)$/);if(R){const o=""===R[1],y=parseInt(R[2]||"256");(y%8!=0||y>256||R[2]&&R[2]!==String(y))&&b.throwArgumentError("invalid numeric width","type",K);const M=_.mask(o?y-1:y),v=o?M.add(m).mul(h):u;return function(k){const D=z.O$.from(k);return(D.lt(v)||D.gt(M))&&b.throwArgumentError(`value out-of-bounds for ${K}`,"value",k),(0,O.hexZeroPad)(D.toTwos(256).toHexString(),32)}}}{const R=K.match(/^bytes(\d+)$/);if(R){const o=parseInt(R[1]);return(0===o||o>32||R[1]!==String(o))&&b.throwArgumentError("invalid bytes width","type",K),function(y){return(0,O.arrayify)(y).length!==o&&b.throwArgumentError(`invalid length for ${K}`,"value",y),function(K){const R=(0,O.arrayify)(K),o=R.length%32;return o?(0,O.hexConcat)([R,l.slice(o)]):(0,O.hexlify)(R)}(y)}}}switch(K){case"address":return function(R){return(0,O.hexZeroPad)((0,ie.getAddress)(R),32)};case"bool":return function(R){return R?S:I};case"bytes":return function(R){return(0,E.keccak256)(R)};case"string":return function(R){return(0,T.id)(R)}}return null}function H(K,R){return`${K}(${R.map(({name:o,type:y})=>y+" "+o).join(",")})`}class j{constructor(R){(0,d.defineReadOnly)(this,"types",Object.freeze((0,d.deepCopy)(R))),(0,d.defineReadOnly)(this,"_encoderCache",{}),(0,d.defineReadOnly)(this,"_types",{});const o={},y={},M={};Object.keys(R).forEach(D=>{o[D]={},y[D]=[],M[D]={}});for(const D in R){const N={};R[D].forEach(C=>{N[C.name]&&b.throwArgumentError(`duplicate variable name ${JSON.stringify(C.name)} in ${JSON.stringify(D)}`,"types",R),N[C.name]=!0;const a=C.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===D&&b.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",R),!G(a)&&(y[a]||b.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",R),y[a].push(D),o[D][a]=!0)})}const v=Object.keys(y).filter(D=>0===y[D].length);0===v.length?b.throwArgumentError("missing primary type","types",R):v.length>1&&b.throwArgumentError(`ambiguous primary types or unused types: ${v.map(D=>JSON.stringify(D)).join(", ")}`,"types",R),(0,d.defineReadOnly)(this,"primaryType",v[0]),function k(D,N){N[D]&&b.throwArgumentError(`circular type reference to ${JSON.stringify(D)}`,"types",R),N[D]=!0,Object.keys(o[D]).forEach(C=>{!y[C]||(k(C,N),Object.keys(N).forEach(a=>{M[a][C]=!0}))}),delete N[D]}(this.primaryType,{});for(const D in M){const N=Object.keys(M[D]);N.sort(),this._types[D]=H(D,R[D])+N.map(C=>H(C,R[C])).join("")}}getEncoder(R){let o=this._encoderCache[R];return o||(o=this._encoderCache[R]=this._getEncoder(R)),o}_getEncoder(R){{const M=G(R);if(M)return M}const o=R.match(/^(.*)(\x5b(\d*)\x5d)$/);if(o){const M=o[1],v=this.getEncoder(M),k=parseInt(o[3]);return D=>{k>=0&&D.length!==k&&b.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",D);let N=D.map(v);return this._types[M]&&(N=N.map(E.keccak256)),(0,E.keccak256)((0,O.hexConcat)(N))}}const y=this.types[R];if(y){const M=(0,T.id)(this._types[R]);return v=>{const k=y.map(({name:D,type:N})=>{const C=this.getEncoder(N)(v[D]);return this._types[N]?(0,E.keccak256)(C):C});return k.unshift(M),(0,O.hexConcat)(k)}}return b.throwArgumentError(`unknown type: ${R}`,"type",R)}encodeType(R){const o=this._types[R];return o||b.throwArgumentError(`unknown type: ${JSON.stringify(R)}`,"name",R),o}encodeData(R,o){return this.getEncoder(R)(o)}hashStruct(R,o){return(0,E.keccak256)(this.encodeData(R,o))}encode(R){return this.encodeData(this.primaryType,R)}hash(R){return this.hashStruct(this.primaryType,R)}_visit(R,o,y){if(G(R))return y(R,o);const M=R.match(/^(.*)(\x5b(\d*)\x5d)$/);if(M){const k=M[1],D=parseInt(M[3]);return D>=0&&o.length!==D&&b.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o),o.map(N=>this._visit(k,N,y))}const v=this.types[R];return v?v.reduce((k,{name:D,type:N})=>(k[D]=this._visit(N,o[D],y),k),{}):b.throwArgumentError(`unknown type: ${R}`,"type",R)}visit(R,o){return this._visit(this.primaryType,R,o)}static from(R){return new j(R)}static getPrimaryType(R){return j.from(R).primaryType}static hashStruct(R,o,y){return j.from(o).hashStruct(R,y)}static hashDomain(R){const o=[];for(const y in R){const M=P[y];M||b.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(y)}`,"domain",R),o.push({name:y,type:M})}return o.sort((y,M)=>L.indexOf(y.name)-L.indexOf(M.name)),j.hashStruct("EIP712Domain",{EIP712Domain:o},R)}static encode(R,o,y){return(0,O.hexConcat)(["0x1901",j.hashDomain(R),j.from(o).hash(y)])}static hash(R,o,y){return(0,E.keccak256)(j.encode(R,o,y))}static resolveNames(R,o,y,M){return function(K,R,o,y){return new(o||(o=Promise))(function(v,k){function D(a){try{C(y.next(a))}catch(B){k(B)}}function N(a){try{C(y.throw(a))}catch(B){k(B)}}function C(a){a.done?v(a.value):function(v){return v instanceof o?v:new o(function(k){k(v)})}(a.value).then(D,N)}C((y=y.apply(K,R||[])).next())})}(this,void 0,void 0,function*(){R=(0,d.shallowCopy)(R);const v={};R.verifyingContract&&!(0,O.isHexString)(R.verifyingContract,20)&&(v[R.verifyingContract]="0x");const k=j.from(o);k.visit(y,(D,N)=>("address"===D&&!(0,O.isHexString)(N,20)&&(v[N]="0x"),N));for(const D in v)v[D]=yield M(D);return R.verifyingContract&&v[R.verifyingContract]&&(R.verifyingContract=v[R.verifyingContract]),y=k.visit(y,(D,N)=>"address"===D&&v[N]?v[N]:N),{domain:R,value:y}})}static getPayload(R,o,y){j.hashDomain(R);const M={},v=[];L.forEach(N=>{const C=R[N];null!=C&&(M[N]=W[N](C),v.push({name:N,type:P[N]}))});const k=j.from(o),D=(0,d.shallowCopy)(o);return D.EIP712Domain?b.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",o):D.EIP712Domain=v,k.encode(y),{types:D,domain:M,primaryType:k.primaryType,message:k.visit(y,(N,C)=>{if(N.match(/^bytes(\d*)/))return(0,O.hexlify)((0,O.arrayify)(C));if(N.match(/^u?int/))return z.O$.from(C).toString();switch(N){case"address":return C.toLowerCase();case"bool":return!!C;case"string":return"string"!=typeof C&&b.throwArgumentError("invalid string","value",C),C}return b.throwArgumentError("unsupported type","type",N)})}}}},49593:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{HDNode:()=>j,defaultPath:()=>H,entropyToMnemonic:()=>o,getAccountPath:()=>M,isValidMnemonic:()=>y,mnemonicToEntropy:()=>R,mnemonicToSeed:()=>K});var ie=Y(53744),z=Y(61488),O=Y(2024),E=Y(8822),d=Y(39938),x=Y(92275),f=Y(99596),T=Y(15614),g=Y(83389),b=Y(32701),l=Y(33692);const m=new(Y(53898).Logger)("hdnode/5.7.0"),_=O.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),w=(0,E.Y0)("Bitcoin seed"),S=2147483648;function I(v){return(1<=256)throw new Error("Depth too large!");return V((0,z.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,z.hexlify)(this.depth),this.parentFingerprint,(0,z.hexZeroPad)((0,z.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,z.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new j(G,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(k){if(k>4294967295)throw new Error("invalid index - "+String(k));let D=this.path;D&&(D+="/"+(k&~S));const N=new Uint8Array(37);if(k&S){if(!this.privateKey)throw new Error("cannot derive child of neutered node");N.set((0,z.arrayify)(this.privateKey),1),D&&(D+="'")}else N.set((0,z.arrayify)(this.publicKey));for(let we=24;we>=0;we-=8)N[33+(we>>3)]=k>>24-we&255;const C=(0,z.arrayify)((0,T.Gy)(g.p.sha512,this.chainCode,N)),a=C.slice(0,32),B=C.slice(32);let Q=null,ee=null;this.privateKey?Q=L(O.O$.from(a).add(this.privateKey).mod(_)):ee=new f.SigningKey((0,z.hexlify)(a))._addPoint(this.publicKey);let ce=D;const ue=this.mnemonic;return ue&&(ce=Object.freeze({phrase:ue.phrase,path:D,locale:ue.locale||"en"})),new j(G,Q,ee,this.fingerprint,L(B),k,this.depth+1,ce)}derivePath(k){const D=k.split("/");if(0===D.length||"m"===D[0]&&0!==this.depth)throw new Error("invalid path - "+k);"m"===D[0]&&D.shift();let N=this;for(let C=0;C=S)throw new Error("invalid path index - "+a);N=N._derive(S+B)}else{if(!a.match(/^[0-9]+$/))throw new Error("invalid path component - "+a);{const B=parseInt(a);if(B>=S)throw new Error("invalid path index - "+a);N=N._derive(B)}}}return N}static _fromSeed(k,D){const N=(0,z.arrayify)(k);if(N.length<16||N.length>64)throw new Error("invalid seed");const C=(0,z.arrayify)((0,T.Gy)(g.p.sha512,w,N));return new j(G,L(C.slice(0,32)),null,"0x00000000",L(C.slice(32)),0,0,D)}static fromMnemonic(k,D,N){return k=o(R(k,N=W(N)),N),j._fromSeed(K(k,D),{phrase:k,path:"m",locale:N.locale})}static fromSeed(k){return j._fromSeed(k,null)}static fromExtendedKey(k){const D=ie.Base58.decode(k);(82!==D.length||V(D.slice(0,78))!==k)&&m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const N=D[4],C=(0,z.hexlify)(D.slice(5,9)),a=parseInt((0,z.hexlify)(D.slice(9,13)).substring(2),16),B=(0,z.hexlify)(D.slice(13,45)),Q=D.slice(45,78);switch((0,z.hexlify)(D.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new j(G,null,(0,z.hexlify)(Q),C,B,a,N,null);case"0x0488ade4":case"0x04358394 ":if(0!==Q[0])break;return new j(G,(0,z.hexlify)(Q.slice(1)),null,C,B,a,N,null)}return m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function K(v,k){k||(k="");const D=(0,E.Y0)("mnemonic"+k,E.Uj.NFKD);return(0,d.n)((0,E.Y0)(v,E.Uj.NFKD),D,2048,64,"sha512")}function R(v,k){k=W(k),m.checkNormalize();const D=k.split(v);if(D.length%3!=0)throw new Error("invalid mnemonic");const N=(0,z.arrayify)(new Uint8Array(Math.ceil(11*D.length/8)));let C=0;for(let ce=0;ce>3]|=1<<7-C%8),C++}const a=32*D.length/3,Q=I(D.length/3);if(((0,z.arrayify)((0,T.JQ)(N.slice(0,a/8)))[0]&Q)!=(N[N.length-1]&Q))throw new Error("invalid checksum");return(0,z.hexlify)(N.slice(0,a/8))}function o(v,k){if(k=W(k),(v=(0,z.arrayify)(v)).length%4!=0||v.length<16||v.length>32)throw new Error("invalid entropy");const D=[0];let N=11;for(let B=0;B8?(D[D.length-1]<<=8,D[D.length-1]|=v[B],N-=8):(D[D.length-1]<<=N,D[D.length-1]|=v[B]>>8-N,D.push(v[B]&P(8-N)),N+=3);const C=v.length/4,a=(0,z.arrayify)((0,T.JQ)(v))[0]&I(C);return D[D.length-1]<<=C,D[D.length-1]|=a>>8-C,k.join(D.map(B=>k.getWord(B)))}function y(v,k){try{return R(v,k),!0}catch{}return!1}function M(v){return("number"!=typeof v||v<0||v>=S||v%1)&&m.throwArgumentError("invalid account index","index",v),`m/44'/60'/${v}'/0/0`}},38590:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="json-wallets/5.7.0"},53746:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{decryptCrowdsale:()=>m,decryptJsonWallet:()=>S,decryptJsonWalletSync:()=>I,decryptKeystore:()=>w.pe,decryptKeystoreSync:()=>w.hb,encryptKeystore:()=>w.HI,getJsonWalletAddress:()=>_.Rb,isCrowdsaleWallet:()=>_.LW,isKeystoreWallet:()=>_.aO});var ie=Y(52280),z=Y.n(ie),O=Y(2885),E=Y(61488),d=Y(28518),x=Y(39938),f=Y(8822),T=Y(92275),g=Y(53898),b=Y(38590),l=Y(93137);const h=new g.Logger(b.i);class u extends T.Description{isCrowdsaleAccount(L){return!(!L||!L._isCrowdsaleAccount)}}function m(P,L){const V=JSON.parse(P);L=(0,l.Ij)(L);const W=(0,O.getAddress)((0,l.gx)(V,"ethaddr")),G=(0,l.p3)((0,l.gx)(V,"encseed"));(!G||G.length%16!=0)&&h.throwArgumentError("invalid encseed","json",P);const H=(0,E.arrayify)((0,x.n)(L,L,2e3,32,"sha256")).slice(0,16),j=G.slice(0,16),K=G.slice(16),R=new(z().ModeOfOperation.cbc)(H,j),o=z().padding.pkcs7.strip((0,E.arrayify)(R.decrypt(K)));let y="";for(let k=0;k{"use strict";Y.d(be,{LW:()=>z,aO:()=>O,Rb:()=>E});var ie=Y(2885);function z(d){let x=null;try{x=JSON.parse(d)}catch{return!1}return x.encseed&&x.ethaddr}function O(d){let x=null;try{x=JSON.parse(d)}catch{return!1}return!(!x.version||parseInt(x.version)!==x.version||3!==parseInt(x.version))}function E(d){if(z(d))try{return(0,ie.getAddress)(JSON.parse(d).ethaddr)}catch{return null}if(O(d))try{return(0,ie.getAddress)(JSON.parse(d).address)}catch{return null}return null}},66484:(bt,be,Y)=>{"use strict";Y.d(be,{hb:()=>j,pe:()=>K,HI:()=>R});var ie=Y(52280),z=Y.n(ie),O=Y(21719),E=Y.n(O),d=Y(2885),x=Y(61488),f=Y(49593),T=Y(28518),g=Y(39938),b=Y(42563),l=Y(92275),h=Y(32701),u=Y(93137),m=Y(53898),_=Y(38590);const S=new m.Logger(_.i);function I(o){return null!=o&&o.mnemonic&&o.mnemonic.phrase}class P extends l.Description{isKeystoreAccount(y){return!(!y||!y._isKeystoreAccount)}}function V(o,y){const M=(0,u.p3)((0,u.gx)(o,"crypto/ciphertext"));if((0,x.hexlify)((0,T.keccak256)((0,x.concat)([y.slice(16,32),M]))).substring(2)!==(0,u.gx)(o,"crypto/mac").toLowerCase())throw new Error("invalid password");const k=function(o,y,M){if("aes-128-ctr"===(0,u.gx)(o,"crypto/cipher")){const k=(0,u.p3)((0,u.gx)(o,"crypto/cipherparams/iv")),D=new(z().Counter)(k),N=new(z().ModeOfOperation.ctr)(y,D);return(0,x.arrayify)(N.decrypt(M))}return null}(o,y.slice(0,16),M);k||S.throwError("unsupported cipher",m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const D=y.slice(32,64),N=(0,h.computeAddress)(k);if(o.address){let a=o.address.toLowerCase();if("0x"!==a.substring(0,2)&&(a="0x"+a),(0,d.getAddress)(a)!==N)throw new Error("address mismatch")}const C={_isKeystoreAccount:!0,address:N,privateKey:(0,x.hexlify)(k)};if("0.1"===(0,u.gx)(o,"x-ethers/version")){const a=(0,u.p3)((0,u.gx)(o,"x-ethers/mnemonicCiphertext")),B=(0,u.p3)((0,u.gx)(o,"x-ethers/mnemonicCounter")),Q=new(z().Counter)(B),ee=new(z().ModeOfOperation.ctr)(D,Q),ce=(0,u.gx)(o,"x-ethers/path")||f.defaultPath,ue=(0,u.gx)(o,"x-ethers/locale")||"en",we=(0,x.arrayify)(ee.decrypt(a));try{const ae=(0,f.entropyToMnemonic)(we,ue),Te=f.HDNode.fromMnemonic(ae,null,ue).derivePath(ce);if(Te.privateKey!=C.privateKey)throw new Error("mnemonic mismatch");C.mnemonic=Te.mnemonic}catch(ae){if(ae.code!==m.Logger.errors.INVALID_ARGUMENT||"wordlist"!==ae.argument)throw ae}}return new P(C)}function W(o,y,M,v,k){return(0,x.arrayify)((0,g.n)(o,y,M,v,k))}function G(o,y,M,v,k){return Promise.resolve(W(o,y,M,v,k))}function H(o,y,M,v,k){const D=(0,u.Ij)(y),N=(0,u.gx)(o,"crypto/kdf");if(N&&"string"==typeof N){const C=function(a,B){return S.throwArgumentError("invalid key-derivation function parameters",a,B)};if("scrypt"===N.toLowerCase()){const a=(0,u.p3)((0,u.gx)(o,"crypto/kdfparams/salt")),B=parseInt((0,u.gx)(o,"crypto/kdfparams/n")),Q=parseInt((0,u.gx)(o,"crypto/kdfparams/r")),ee=parseInt((0,u.gx)(o,"crypto/kdfparams/p"));(!B||!Q||!ee)&&C("kdf",N),0!=(B&B-1)&&C("N",B);const ce=parseInt((0,u.gx)(o,"crypto/kdfparams/dklen"));return 32!==ce&&C("dklen",ce),v(D,a,B,Q,ee,64,k)}if("pbkdf2"===N.toLowerCase()){const a=(0,u.p3)((0,u.gx)(o,"crypto/kdfparams/salt"));let B=null;const Q=(0,u.gx)(o,"crypto/kdfparams/prf");"hmac-sha256"===Q?B="sha256":"hmac-sha512"===Q?B="sha512":C("prf",Q);const ee=parseInt((0,u.gx)(o,"crypto/kdfparams/c")),ce=parseInt((0,u.gx)(o,"crypto/kdfparams/dklen"));return 32!==ce&&C("dklen",ce),M(D,a,ee,ce,B)}}return S.throwArgumentError("unsupported key-derivation function","kdf",N)}function j(o,y){const M=JSON.parse(o);return V(M,H(M,y,W,E().syncScrypt))}function K(o,y,M){return function(o,y,M,v){return new(M||(M=Promise))(function(D,N){function C(Q){try{B(v.next(Q))}catch(ee){N(ee)}}function a(Q){try{B(v.throw(Q))}catch(ee){N(ee)}}function B(Q){Q.done?D(Q.value):function(D){return D instanceof M?D:new M(function(N){N(D)})}(Q.value).then(C,a)}B((v=v.apply(o,y||[])).next())})}(this,void 0,void 0,function*(){const v=JSON.parse(o);return V(v,yield H(v,y,G,E().scrypt,M))})}function R(o,y,M,v){try{if((0,d.getAddress)(o.address)!==(0,h.computeAddress)(o.privateKey))throw new Error("address/privateKey mismatch");if(I(o)){const Te=o.mnemonic;if(f.HDNode.fromMnemonic(Te.phrase,null,Te.locale).derivePath(Te.path||f.defaultPath).privateKey!=o.privateKey)throw new Error("mnemonic mismatch")}}catch(Te){return Promise.reject(Te)}"function"==typeof M&&!v&&(v=M,M={}),M||(M={});const k=(0,x.arrayify)(o.privateKey),D=(0,u.Ij)(y);let N=null,C=null,a=null;if(I(o)){const Te=o.mnemonic;N=(0,x.arrayify)((0,f.mnemonicToEntropy)(Te.phrase,Te.locale||"en")),C=Te.path||f.defaultPath,a=Te.locale||"en"}let B=M.client;B||(B="ethers.js");let Q=null;Q=M.salt?(0,x.arrayify)(M.salt):(0,b.O)(32);let ee=null;if(M.iv){if(ee=(0,x.arrayify)(M.iv),16!==ee.length)throw new Error("invalid iv")}else ee=(0,b.O)(16);let ce=null;if(M.uuid){if(ce=(0,x.arrayify)(M.uuid),16!==ce.length)throw new Error("invalid uuid")}else ce=(0,b.O)(16);let ue=1<<17,we=8,ae=1;return M.scrypt&&(M.scrypt.N&&(ue=M.scrypt.N),M.scrypt.r&&(we=M.scrypt.r),M.scrypt.p&&(ae=M.scrypt.p)),E().scrypt(D,Q,ue,we,ae,64,v).then(Te=>{const le=(Te=(0,x.arrayify)(Te)).slice(0,16),X=Te.slice(16,32),ne=Te.slice(32,64),pe=new(z().Counter)(ee),_e=new(z().ModeOfOperation.ctr)(le,pe),xe=(0,x.arrayify)(_e.encrypt(k)),Ce=(0,T.keccak256)((0,x.concat)([X,xe])),ke={address:o.address.substring(2).toLowerCase(),id:(0,u.EH)(ce),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,x.hexlify)(ee).substring(2)},ciphertext:(0,x.hexlify)(xe).substring(2),kdf:"scrypt",kdfparams:{salt:(0,x.hexlify)(Q).substring(2),n:ue,dklen:32,p:ae,r:we},mac:Ce.substring(2)}};if(N){const me=(0,b.O)(16),Ee=new(z().Counter)(me),ze=new(z().ModeOfOperation.ctr)(ne,Ee),Ve=(0,x.arrayify)(ze.encrypt(N)),nt=new Date,tt=nt.getUTCFullYear()+"-"+(0,u.VP)(nt.getUTCMonth()+1,2)+"-"+(0,u.VP)(nt.getUTCDate(),2)+"T"+(0,u.VP)(nt.getUTCHours(),2)+"-"+(0,u.VP)(nt.getUTCMinutes(),2)+"-"+(0,u.VP)(nt.getUTCSeconds(),2)+".0Z";ke["x-ethers"]={client:B,gethFilename:"UTC--"+tt+"--"+ke.address,mnemonicCounter:(0,x.hexlify)(me).substring(2),mnemonicCiphertext:(0,x.hexlify)(Ve).substring(2),path:C,locale:a,version:"0.1"}}return JSON.stringify(ke)})}},93137:(bt,be,Y)=>{"use strict";Y.d(be,{p3:()=>O,VP:()=>E,Ij:()=>d,gx:()=>x,EH:()=>f});var ie=Y(61488),z=Y(8822);function O(T){return"string"==typeof T&&"0x"!==T.substring(0,2)&&(T="0x"+T),(0,ie.arrayify)(T)}function E(T,g){for(T=String(T);T.length{"use strict";Y.r(be),Y.d(be,{keccak256:()=>E});var ie=Y(37109),z=Y.n(ie),O=Y(61488);function E(d){return"0x"+z().keccak_256((0,O.arrayify)(d))}},53898:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{ErrorCode:()=>b,LogLevel:()=>g,Logger:()=>h});let z=!1,O=!1;const E={debug:1,default:2,info:2,warning:3,error:4,off:5};let d=E.default,x=null;const T=function(){try{const u=[];if(["NFD","NFC","NFKD","NFKC"].forEach(m=>{try{if("test"!=="test".normalize(m))throw new Error("bad normalize")}catch{u.push(m)}}),u.length)throw new Error("missing "+u.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(u){return u.message}return null}();var g=(()=>{return(u=g||(g={})).DEBUG="DEBUG",u.INFO="INFO",u.WARNING="WARNING",u.ERROR="ERROR",u.OFF="OFF",g;var u})(),b=(()=>{return(u=b||(b={})).UNKNOWN_ERROR="UNKNOWN_ERROR",u.NOT_IMPLEMENTED="NOT_IMPLEMENTED",u.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",u.NETWORK_ERROR="NETWORK_ERROR",u.SERVER_ERROR="SERVER_ERROR",u.TIMEOUT="TIMEOUT",u.BUFFER_OVERRUN="BUFFER_OVERRUN",u.NUMERIC_FAULT="NUMERIC_FAULT",u.MISSING_NEW="MISSING_NEW",u.INVALID_ARGUMENT="INVALID_ARGUMENT",u.MISSING_ARGUMENT="MISSING_ARGUMENT",u.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",u.CALL_EXCEPTION="CALL_EXCEPTION",u.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",u.NONCE_EXPIRED="NONCE_EXPIRED",u.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",u.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",u.TRANSACTION_REPLACED="TRANSACTION_REPLACED",u.ACTION_REJECTED="ACTION_REJECTED",b;var u})();const l="0123456789abcdef";let h=(()=>{class u{constructor(_){Object.defineProperty(this,"version",{enumerable:!0,value:_,writable:!1})}_log(_,w){const S=_.toLowerCase();null==E[S]&&this.throwArgumentError("invalid log level name","logLevel",_),!(d>E[S])&&console.log.apply(console,w)}debug(..._){this._log(u.levels.DEBUG,_)}info(..._){this._log(u.levels.INFO,_)}warn(..._){this._log(u.levels.WARNING,_)}makeError(_,w,S){if(O)return this.makeError("censored error",w,{});w||(w=u.errors.UNKNOWN_ERROR),S||(S={});const I=[];Object.keys(S).forEach(W=>{const G=S[W];try{if(G instanceof Uint8Array){let H="";for(let j=0;j>4],H+=l[15&G[j]];I.push(W+"=Uint8Array(0x"+H+")")}else I.push(W+"="+JSON.stringify(G))}catch{I.push(W+"="+JSON.stringify(S[W].toString()))}}),I.push(`code=${w}`),I.push(`version=${this.version}`);const P=_;let L="";switch(w){case b.NUMERIC_FAULT:{L="NUMERIC_FAULT";const W=_;switch(W){case"overflow":case"underflow":case"division-by-zero":L+="-"+W;break;case"negative-power":case"negative-width":L+="-unsupported";break;case"unbound-bitwise-result":L+="-unbound-result"}break}case b.CALL_EXCEPTION:case b.INSUFFICIENT_FUNDS:case b.MISSING_NEW:case b.NONCE_EXPIRED:case b.REPLACEMENT_UNDERPRICED:case b.TRANSACTION_REPLACED:case b.UNPREDICTABLE_GAS_LIMIT:L=w}L&&(_+=" [ See: https://links.ethers.org/v5-errors-"+L+" ]"),I.length&&(_+=" ("+I.join(", ")+")");const V=new Error(_);return V.reason=P,V.code=w,Object.keys(S).forEach(function(W){V[W]=S[W]}),V}throwError(_,w,S){throw this.makeError(_,w,S)}throwArgumentError(_,w,S){return this.throwError(_,u.errors.INVALID_ARGUMENT,{argument:w,value:S})}assert(_,w,S,I){_||this.throwError(w,S,I)}assertArgument(_,w,S,I){_||this.throwArgumentError(w,S,I)}checkNormalize(_){null==_&&(_="platform missing String.prototype.normalize"),T&&this.throwError("platform missing String.prototype.normalize",u.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:T})}checkSafeUint53(_,w){"number"==typeof _&&(null==w&&(w="value not safe"),(_<0||_>=9007199254740991)&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:_}),_%1&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:_}))}checkArgumentCount(_,w,S){S=S?": "+S:"",_w&&this.throwError("too many arguments"+S,u.errors.UNEXPECTED_ARGUMENT,{count:_,expectedCount:w})}checkNew(_,w){(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}checkAbstract(_,w){_===w?this.throwError("cannot instantiate abstract class "+JSON.stringify(w.name)+" directly; use a sub-class",u.errors.UNSUPPORTED_OPERATION,{name:_.name,operation:"new"}):(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}static globalLogger(){return x||(x=new u("logger/5.7.0")),x}static setCensorship(_,w){if(!_&&w&&this.globalLogger().throwError("cannot permanently disable censorship",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),z){if(!_)return;this.globalLogger().throwError("error censorship permanent",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}O=!!_,z=!!w}static setLogLevel(_){const w=E[_.toLowerCase()];null!=w?d=w:u.globalLogger().warn("invalid log level - "+_)}static from(_){return new u(_)}}return u.errors=b,u.levels=g,u})()},35473:(bt,be,Y)=>{"use strict";Y.d(be,{H:()=>l});const O=new(Y(53898).Logger)("networks/5.7.1");function d(h){const u=function(m,_){null==_&&(_={});const w=[];if(m.InfuraProvider&&"-"!==_.infura)try{w.push(new m.InfuraProvider(h,_.infura))}catch{}if(m.EtherscanProvider&&"-"!==_.etherscan)try{w.push(new m.EtherscanProvider(h,_.etherscan))}catch{}if(m.AlchemyProvider&&"-"!==_.alchemy)try{w.push(new m.AlchemyProvider(h,_.alchemy))}catch{}if(m.PocketProvider&&"-"!==_.pocket){const S=["goerli","ropsten","rinkeby","sepolia"];try{const I=new m.PocketProvider(h,_.pocket);I.network&&-1===S.indexOf(I.network.name)&&w.push(I)}catch{}}if(m.CloudflareProvider&&"-"!==_.cloudflare)try{w.push(new m.CloudflareProvider(h))}catch{}if(m.AnkrProvider&&"-"!==_.ankr)try{const S=["ropsten"],I=new m.AnkrProvider(h,_.ankr);I.network&&-1===S.indexOf(I.network.name)&&w.push(I)}catch{}if(0===w.length)return null;if(m.FallbackProvider){let S=1;return null!=_.quorum?S=_.quorum:"homestead"===h&&(S=2),new m.FallbackProvider(w,S)}return w[0]};return u.renetwork=function(m){return d(m)},u}function x(h,u){const m=function(_,w){return _.JsonRpcProvider?new _.JsonRpcProvider(h,u):null};return m.renetwork=function(_){return x(h,_)},m}const f={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:d("homestead")},T={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:d("ropsten")},g={chainId:63,name:"classicMordor",_defaultProvider:x("https://www.ethercluster.com/mordor","classicMordor")},b={unspecified:{chainId:0,name:"unspecified"},homestead:f,mainnet:f,morden:{chainId:2,name:"morden"},ropsten:T,testnet:T,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:d("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:d("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:d("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:d("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:x("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:g,classicTestnet:g,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:x("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:d("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:d("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"}};function l(h){if(null==h)return null;if("number"==typeof h){for(const _ in b){const w=b[_];if(w.chainId===h)return{name:w.name,chainId:w.chainId,ensAddress:w.ensAddress||null,_defaultProvider:w._defaultProvider||null}}return{chainId:h,name:"unknown"}}if("string"==typeof h){const _=b[h];return null==_?null:{name:_.name,chainId:_.chainId,ensAddress:_.ensAddress,_defaultProvider:_._defaultProvider||null}}const u=b[h.name];if(!u)return"number"!=typeof h.chainId&&O.throwArgumentError("invalid network chainId","network",h),h;0!==h.chainId&&h.chainId!==u.chainId&&O.throwArgumentError("network chainId mismatch","network",h);let m=h._defaultProvider||null;return null==m&&u._defaultProvider&&(m=function(h){return h&&"function"==typeof h.renetwork}(u._defaultProvider)?u._defaultProvider.renetwork(h):u._defaultProvider),{name:h.name,chainId:u.chainId,ensAddress:h.ensAddress||u.ensAddress||null,_defaultProvider:m}}},39938:(bt,be,Y)=>{"use strict";Y.d(be,{n:()=>O});var ie=Y(61488),z=Y(15614);function O(E,d,x,f,T){E=(0,ie.arrayify)(E),d=(0,ie.arrayify)(d);let g,b=1;const l=new Uint8Array(f),h=new Uint8Array(d.length+4);let u,m;h.set(d);for(let _=1;_<=b;_++){h[d.length]=_>>24&255,h[d.length+1]=_>>16&255,h[d.length+2]=_>>8&255,h[d.length+3]=255&_;let w=(0,ie.arrayify)((0,z.Gy)(T,E,h));g||(g=w.length,m=new Uint8Array(g),b=Math.ceil(f/g),u=f-(b-1)*g),m.set(w);for(let P=1;P{"use strict";Y.r(be),Y.d(be,{Description:()=>m,checkProperties:()=>T,deepCopy:()=>u,defineReadOnly:()=>d,getStatic:()=>x,resolveProperties:()=>f,shallowCopy:()=>g});var ie=Y(53898);const E=new ie.Logger("properties/5.7.0");function d(_,w,S){Object.defineProperty(_,w,{enumerable:!0,value:S,writable:!1})}function x(_,w){for(let S=0;S<32;S++){if(_[w])return _[w];if(!_.prototype||"object"!=typeof _.prototype)break;_=Object.getPrototypeOf(_.prototype).constructor}return null}function f(_){return function(_,w,S,I){return new(S||(S=Promise))(function(L,V){function W(j){try{H(I.next(j))}catch(K){V(K)}}function G(j){try{H(I.throw(j))}catch(K){V(K)}}function H(j){j.done?L(j.value):function(L){return L instanceof S?L:new S(function(V){V(L)})}(j.value).then(W,G)}H((I=I.apply(_,w||[])).next())})}(this,void 0,void 0,function*(){const w=Object.keys(_).map(I=>Promise.resolve(_[I]).then(L=>({key:I,value:L})));return(yield Promise.all(w)).reduce((I,P)=>(I[P.key]=P.value,I),{})})}function T(_,w){(!_||"object"!=typeof _)&&E.throwArgumentError("invalid object","object",_),Object.keys(_).forEach(S=>{w[S]||E.throwArgumentError("invalid object key - "+S,"transaction:"+S,_)})}function g(_){const w={};for(const S in _)w[S]=_[S];return w}const b={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function l(_){if(null==_||b[typeof _])return!0;if(Array.isArray(_)||"object"==typeof _){if(!Object.isFrozen(_))return!1;const w=Object.keys(_);for(let S=0;Su(w)));if("object"==typeof _){const w={};for(const S in _){const I=_[S];void 0!==I&&d(w,S,u(I))}return w}return E.throwArgumentError("Cannot deepCopy "+typeof _,"object",_)}function u(_){return h(_)}class m{constructor(w){for(const S in w)this[S]=u(w[S])}}},5102:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="providers/5.7.2"},70744:(bt,be,Y)=>{"use strict";Y.d(be,{Zk:()=>Te,H2:()=>ue});var ie=Y(11527),z=Y(61488),d=Y(53744),x=Y(2024),f=Y(45052),T=Y(21),g=Y(35473),b=Y(92275),l=Y(15614),h=Y(8822),u=Y(51838),m=Y(29901),_=Y.n(m),w=Y(53898),S=Y(5102),I=Y(47949),P=function(le,X,ne,pe){return new(ne||(ne=Promise))(function(xe,Ce){function ke(ze){try{Ee(pe.next(ze))}catch(Ve){Ce(Ve)}}function me(ze){try{Ee(pe.throw(ze))}catch(Ve){Ce(Ve)}}function Ee(ze){ze.done?xe(ze.value):function(xe){return xe instanceof ne?xe:new ne(function(Ce){Ce(xe)})}(ze.value).then(ke,me)}Ee((pe=pe.apply(le,X||[])).next())})};const L=new w.Logger(S.i);function W(le){return null==le?"null":(32!==(0,z.hexDataLength)(le)&&L.throwArgumentError("invalid topic","topic",le),le.toLowerCase())}function G(le){for(le=le.slice();le.length>0&&null==le[le.length-1];)le.pop();return le.map(X=>{if(Array.isArray(X)){const ne={};X.forEach(_e=>{ne[W(_e)]=!0});const pe=Object.keys(ne);return pe.sort(),pe.join("|")}return W(X)}).join("&")}function j(le){if("string"==typeof le){if(le=le.toLowerCase(),32===(0,z.hexDataLength)(le))return"tx:"+le;if(-1===le.indexOf(":"))return le}else{if(Array.isArray(le))return"filter:*:"+G(le);if(ie.Sg.isForkEvent(le))throw L.warn("not implemented"),new Error("not implemented");if(le&&"object"==typeof le)return"filter:"+(le.address||"*")+":"+G(le.topics||[])}throw new Error("invalid event - "+le)}function K(){return(new Date).getTime()}function R(le){return new Promise(X=>{setTimeout(X,le)})}const o=["block","network","pending","poll"];class y{constructor(X,ne,pe){(0,b.defineReadOnly)(this,"tag",X),(0,b.defineReadOnly)(this,"listener",ne),(0,b.defineReadOnly)(this,"once",pe),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(){const X=this.tag.split(":");return"tx"!==X[0]?null:X[1]}get filter(){const X=this.tag.split(":");if("filter"!==X[0])return null;const ne=X[1],pe=""===(le=X[2])?[]:le.split(/&/g).map(X=>{if(""===X)return[];const ne=X.split("|").map(pe=>"null"===pe?null:pe);return 1===ne.length?ne[0]:ne}),_e={};var le;return pe.length>0&&(_e.topics=pe),ne&&"*"!==ne&&(_e.address=ne),_e}pollable(){return this.tag.indexOf(":")>=0||o.indexOf(this.tag)>=0}}const M={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 v(le){return(0,z.hexZeroPad)(x.O$.from(le).toHexString(),32)}function k(le){return d.Base58.encode((0,z.concat)([le,(0,z.hexDataSlice)((0,l.JQ)((0,l.JQ)(le)),0,4)]))}const D=new RegExp("^(ipfs)://(.*)$","i"),N=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),D,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function C(le,X){try{return(0,h.ZN)(a(le,X))}catch{}return null}function a(le,X){if("0x"===le)return null;const ne=x.O$.from((0,z.hexDataSlice)(le,X,X+32)).toNumber(),pe=x.O$.from((0,z.hexDataSlice)(le,ne,ne+32)).toNumber();return(0,z.hexDataSlice)(le,ne+32,ne+32+pe)}function B(le){return le.match(/^ipfs:\/\/ipfs\//i)?le=le.substring(12):le.match(/^ipfs:\/\//i)?le=le.substring(7):L.throwArgumentError("unsupported IPFS format","link",le),`https://gateway.ipfs.io/ipfs/${le}`}function Q(le){const X=(0,z.arrayify)(le);if(X.length>32)throw new Error("internal; should not happen");const ne=new Uint8Array(32);return ne.set(X,32-X.length),ne}function ee(le){if(le.length%32==0)return le;const X=new Uint8Array(32*Math.ceil(le.length/32));return X.set(le),X}function ce(le){const X=[];let ne=0;for(let pe=0;pex.O$.from(X).eq(1)).catch(X=>{if(X.code===w.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,X})),this._supportsEip2544}_fetch(X,ne){return P(this,void 0,void 0,function*(){const pe={to:this.address,ccipReadEnabled:!0,data:(0,z.hexConcat)([X,(0,T.VM)(this.name),ne||"0x"])};let _e=!1;(yield this.supportsWildcard())&&(_e=!0,pe.data=(0,z.hexConcat)(["0x9061b923",ce([(0,T.Kn)(this.name),pe.data])]));try{let xe=yield this.provider.call(pe);return(0,z.arrayify)(xe).length%32==4&&L.throwError("resolver threw error",w.Logger.errors.CALL_EXCEPTION,{transaction:pe,data:xe}),_e&&(xe=a(xe,0)),xe}catch(xe){if(xe.code===w.Logger.errors.CALL_EXCEPTION)return null;throw xe}})}_fetchBytes(X,ne){return P(this,void 0,void 0,function*(){const pe=yield this._fetch(X,ne);return null!=pe?a(pe,0):null})}_getAddress(X,ne){const pe=M[String(X)];if(null==pe&&L.throwError(`unsupported coin type: ${X}`,w.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${X})`}),"eth"===pe.ilk)return this.provider.formatter.address(ne);const _e=(0,z.arrayify)(ne);if(null!=pe.p2pkh){const xe=ne.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(xe){const Ce=parseInt(xe[1],16);if(xe[2].length===2*Ce&&Ce>=1&&Ce<=75)return k((0,z.concat)([[pe.p2pkh],"0x"+xe[2]]))}}if(null!=pe.p2sh){const xe=ne.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(xe){const Ce=parseInt(xe[1],16);if(xe[2].length===2*Ce&&Ce>=1&&Ce<=75)return k((0,z.concat)([[pe.p2sh],"0x"+xe[2]]))}}if(null!=pe.prefix){const xe=_e[1];let Ce=_e[0];if(0===Ce?20!==xe&&32!==xe&&(Ce=-1):Ce=-1,Ce>=0&&_e.length===2+xe&&xe>=1&&xe<=75){const ke=_().toWords(_e.slice(2));return ke.unshift(Ce),_().encode(pe.prefix,ke)}}return null}getAddress(X){return P(this,void 0,void 0,function*(){if(null==X&&(X=60),60===X)try{const _e=yield this._fetch("0x3b3b57de");return"0x"===_e||_e===f.R?null:this.provider.formatter.callAddress(_e)}catch(_e){if(_e.code===w.Logger.errors.CALL_EXCEPTION)return null;throw _e}const ne=yield this._fetchBytes("0xf1cb7e06",v(X));if(null==ne||"0x"===ne)return null;const pe=this._getAddress(X,ne);return null==pe&&L.throwError("invalid or unsupported coin data",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${X})`,coinType:X,data:ne}),pe})}getAvatar(){return P(this,void 0,void 0,function*(){const X=[{type:"name",content:this.name}];try{const ne=yield this.getText("avatar");if(null==ne)return null;for(let pe=0;peCe[me]);return"sia://"+ke}return L.throwError("invalid or unsupported content hash data",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:X})})}getText(X){return P(this,void 0,void 0,function*(){let ne=(0,h.Y0)(X);ne=(0,z.concat)([v(64),v(ne.length),ne]),ne.length%32!=0&&(ne=(0,z.concat)([ne,(0,z.hexZeroPad)("0x",32-X.length%32)]));const pe=yield this._fetchBytes("0x59d1d43c",(0,z.hexlify)(ne));return null==pe||"0x"===pe?null:(0,h.ZN)(pe)})}}let we=null,ae=1;class Te extends ie.zt{constructor(X){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,b.defineReadOnly)(this,"anyNetwork","any"===X),this.anyNetwork&&(X=this.detectNetwork()),X instanceof Promise)this._networkPromise=X,X.catch(ne=>{}),this._ready().catch(ne=>{});else{const ne=(0,b.getStatic)(new.target,"getNetwork")(X);ne?((0,b.defineReadOnly)(this,"_network",ne),this.emit("network",ne,null)):L.throwArgumentError("invalid network","network",X)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return P(this,void 0,void 0,function*(){if(null==this._network){let X=null;if(this._networkPromise)try{X=yield this._networkPromise}catch{}null==X&&(X=yield this.detectNetwork()),X||L.throwError("no network detected",w.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=X:(0,b.defineReadOnly)(this,"_network",X),this.emit("network",X,null))}return this._network})}get ready(){return(0,u.poll)(()=>this._ready().then(X=>X,X=>{if(X.code!==w.Logger.errors.NETWORK_ERROR||"noNetwork"!==X.event)throw X}))}static getFormatter(){return null==we&&(we=new I.Mb),we}static getNetwork(X){return(0,g.H)(X??"homestead")}ccipReadFetch(X,ne,pe){return P(this,void 0,void 0,function*(){if(this.disableCcipRead||0===pe.length)return null;const _e=X.to.toLowerCase(),xe=ne.toLowerCase(),Ce=[];for(let ke=0;ke=0?null:JSON.stringify({data:xe,sender:_e}),Ve=yield(0,u.fetchJson)({url:Ee,errorPassThrough:!0},ze,(tt,mt)=>(tt.status=mt.statusCode,tt));if(Ve.data)return Ve.data;const nt=Ve.message||"unknown error";if(Ve.status>=400&&Ve.status<500)return L.throwError(`response not found during CCIP fetch: ${nt}`,w.Logger.errors.SERVER_ERROR,{url:me,errorMessage:nt});Ce.push(nt)}return L.throwError(`error encountered during CCIP fetch: ${Ce.map(ke=>JSON.stringify(ke)).join(", ")}`,w.Logger.errors.SERVER_ERROR,{urls:pe,errorMessages:Ce})})}_getInternalBlockNumber(X){return P(this,void 0,void 0,function*(){if(yield this._ready(),X>0)for(;this._internalBlockNumber;){const _e=this._internalBlockNumber;try{const xe=yield _e;if(K()-xe.respTime<=X)return xe.blockNumber;break}catch{if(this._internalBlockNumber===_e)break}}const ne=K(),pe=(0,b.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(_e=>null,_e=>_e)}).then(({blockNumber:_e,networkError:xe})=>{if(xe)throw this._internalBlockNumber===pe&&(this._internalBlockNumber=null),xe;const Ce=K();return(_e=x.O$.from(_e).toNumber()){this._internalBlockNumber===pe&&(this._internalBlockNumber=null)}),(yield pe).blockNumber})}poll(){return P(this,void 0,void 0,function*(){const X=ae++,ne=[];let pe=null;try{pe=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(_e){return void this.emit("error",_e)}if(this._setFastBlockNumber(pe),this.emit("poll",X,pe),pe!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=pe-1),Math.abs(this._emitted.block-pe)>1e3)L.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${pe})`),this.emit("error",L.makeError("network block skew detected",w.Logger.errors.NETWORK_ERROR,{blockNumber:pe,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",pe);else for(let _e=this._emitted.block+1;_e<=pe;_e++)this.emit("block",_e);this._emitted.block!==pe&&(this._emitted.block=pe,Object.keys(this._emitted).forEach(_e=>{if("block"===_e)return;const xe=this._emitted[_e];"pending"!==xe&&pe-xe>12&&delete this._emitted[_e]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=pe-1),this._events.forEach(_e=>{switch(_e.type){case"tx":{const xe=_e.hash;let Ce=this.getTransactionReceipt(xe).then(ke=>(!ke||null==ke.blockNumber||(this._emitted["t:"+xe]=ke.blockNumber,this.emit(xe,ke)),null)).catch(ke=>{this.emit("error",ke)});ne.push(Ce);break}case"filter":if(!_e._inflight){_e._inflight=!0,-2===_e._lastBlockNumber&&(_e._lastBlockNumber=pe-1);const xe=_e.filter;xe.fromBlock=_e._lastBlockNumber+1,xe.toBlock=pe;const Ce=xe.toBlock-this._maxFilterBlockRange;Ce>xe.fromBlock&&(xe.fromBlock=Ce),xe.fromBlock<0&&(xe.fromBlock=0);const ke=this.getLogs(xe).then(me=>{_e._inflight=!1,0!==me.length&&me.forEach(Ee=>{Ee.blockNumber>_e._lastBlockNumber&&(_e._lastBlockNumber=Ee.blockNumber),this._emitted["b:"+Ee.blockHash]=Ee.blockNumber,this._emitted["t:"+Ee.transactionHash]=Ee.blockNumber,this.emit(xe,Ee)})}).catch(me=>{this.emit("error",me),_e._inflight=!1});ne.push(ke)}}}),this._lastBlockNumber=pe,Promise.all(ne).then(()=>{this.emit("didPoll",X)}).catch(_e=>{this.emit("error",_e)})}else this.emit("didPoll",X)})}resetEventsBlock(X){this._lastBlockNumber=X-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return P(this,void 0,void 0,function*(){return L.throwError("provider does not support network detection",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return P(this,void 0,void 0,function*(){const X=yield this._ready(),ne=yield this.detectNetwork();if(X.chainId!==ne.chainId){if(this.anyNetwork)return this._network=ne,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",ne,X),yield R(0),this._network;const pe=L.makeError("underlying network changed",w.Logger.errors.NETWORK_ERROR,{event:"changed",network:X,detectedNetwork:ne});throw this.emit("error",pe),pe}return X})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(X=>{this._setFastBlockNumber(X)},X=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(X){X&&!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))):!X&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(X){if("number"!=typeof X||X<=0||parseInt(String(X))!=X)throw new Error("invalid polling interval");this._pollingInterval=X,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const X=K();return X-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=X,this._fastBlockNumberPromise=this.getBlockNumber().then(ne=>((null==this._fastBlockNumber||ne>this._fastBlockNumber)&&(this._fastBlockNumber=ne),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(X){null!=this._fastBlockNumber&&Xthis._fastBlockNumber)&&(this._fastBlockNumber=X,this._fastBlockNumberPromise=Promise.resolve(X)))}waitForTransaction(X,ne,pe){return P(this,void 0,void 0,function*(){return this._waitForTransaction(X,ne??1,pe||0,null)})}_waitForTransaction(X,ne,pe,_e){return P(this,void 0,void 0,function*(){const xe=yield this.getTransactionReceipt(X);return(xe?xe.confirmations:0)>=ne?xe:new Promise((Ce,ke)=>{const me=[];let Ee=!1;const ze=function(){return!!Ee||(Ee=!0,me.forEach(nt=>{nt()}),!1)},Ve=nt=>{nt.confirmations{this.removeListener(X,Ve)}),_e){let nt=_e.startBlock,tt=null;const mt=ht=>P(this,void 0,void 0,function*(){Ee||(yield R(1e3),this.getTransactionCount(_e.from).then(wt=>P(this,void 0,void 0,function*(){if(!Ee){if(wt<=_e.nonce)nt=ht;else{{const Pt=yield this.getTransaction(X);if(Pt&&null!=Pt.blockNumber)return}for(null==tt&&(tt=nt-3,tt<_e.startBlock&&(tt=_e.startBlock));tt<=ht;){if(Ee)return;const Pt=yield this.getBlockWithTransactions(tt);for(let st=0;st{Ee||this.once("block",mt)}))});if(Ee)return;this.once("block",mt),me.push(()=>{this.removeListener("block",mt)})}if("number"==typeof pe&&pe>0){const nt=setTimeout(()=>{ze()||ke(L.makeError("timeout exceeded",w.Logger.errors.TIMEOUT,{timeout:pe}))},pe);nt.unref&&nt.unref(),me.push(()=>{clearTimeout(nt)})}})})}getBlockNumber(){return P(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return P(this,void 0,void 0,function*(){yield this.getNetwork();const X=yield this.perform("getGasPrice",{});try{return x.O$.from(X)}catch(ne){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:X,error:ne})}})}getBalance(X,ne){return P(this,void 0,void 0,function*(){yield this.getNetwork();const pe=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(ne)}),_e=yield this.perform("getBalance",pe);try{return x.O$.from(_e)}catch(xe){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getBalance",params:pe,result:_e,error:xe})}})}getTransactionCount(X,ne){return P(this,void 0,void 0,function*(){yield this.getNetwork();const pe=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(ne)}),_e=yield this.perform("getTransactionCount",pe);try{return x.O$.from(_e).toNumber()}catch(xe){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:pe,result:_e,error:xe})}})}getCode(X,ne){return P(this,void 0,void 0,function*(){yield this.getNetwork();const pe=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(ne)}),_e=yield this.perform("getCode",pe);try{return(0,z.hexlify)(_e)}catch(xe){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getCode",params:pe,result:_e,error:xe})}})}getStorageAt(X,ne,pe){return P(this,void 0,void 0,function*(){yield this.getNetwork();const _e=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(pe),position:Promise.resolve(ne).then(Ce=>(0,z.hexValue)(Ce))}),xe=yield this.perform("getStorageAt",_e);try{return(0,z.hexlify)(xe)}catch(Ce){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:_e,result:xe,error:Ce})}})}_wrapTransaction(X,ne,pe){if(null!=ne&&32!==(0,z.hexDataLength)(ne))throw new Error("invalid response - sendTransaction");const _e=X;return null!=ne&&X.hash!==ne&&L.throwError("Transaction hash mismatch from Provider.sendTransaction.",w.Logger.errors.UNKNOWN_ERROR,{expectedHash:X.hash,returnedHash:ne}),_e.wait=(xe,Ce)=>P(this,void 0,void 0,function*(){let ke;null==xe&&(xe=1),null==Ce&&(Ce=0),0!==xe&&null!=pe&&(ke={data:X.data,from:X.from,nonce:X.nonce,to:X.to,value:X.value,startBlock:pe});const me=yield this._waitForTransaction(X.hash,xe,Ce,ke);return null==me&&0===xe?null:(this._emitted["t:"+X.hash]=me.blockNumber,0===me.status&&L.throwError("transaction failed",w.Logger.errors.CALL_EXCEPTION,{transactionHash:X.hash,transaction:X,receipt:me}),me)}),_e}sendTransaction(X){return P(this,void 0,void 0,function*(){yield this.getNetwork();const ne=yield Promise.resolve(X).then(xe=>(0,z.hexlify)(xe)),pe=this.formatter.transaction(X);null==pe.confirmations&&(pe.confirmations=0);const _e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const xe=yield this.perform("sendTransaction",{signedTransaction:ne});return this._wrapTransaction(pe,xe,_e)}catch(xe){throw xe.transaction=pe,xe.transactionHash=pe.hash,xe}})}_getTransactionRequest(X){return P(this,void 0,void 0,function*(){const ne=yield X,pe={};return["from","to"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe?this._getAddress(xe):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe?x.O$.from(xe):null))}),["type"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe??null))}),ne.accessList&&(pe.accessList=this.formatter.accessList(ne.accessList)),["data"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe?(0,z.hexlify)(xe):null))}),this.formatter.transactionRequest(yield(0,b.resolveProperties)(pe))})}_getFilter(X){return P(this,void 0,void 0,function*(){X=yield X;const ne={};return null!=X.address&&(ne.address=this._getAddress(X.address)),["blockHash","topics"].forEach(pe=>{null!=X[pe]&&(ne[pe]=X[pe])}),["fromBlock","toBlock"].forEach(pe=>{null!=X[pe]&&(ne[pe]=this._getBlockTag(X[pe]))}),this.formatter.filter(yield(0,b.resolveProperties)(ne))})}_call(X,ne,pe){return P(this,void 0,void 0,function*(){pe>=10&&L.throwError("CCIP read exceeded maximum redirections",w.Logger.errors.SERVER_ERROR,{redirects:pe,transaction:X});const _e=X.to,xe=yield this.perform("call",{transaction:X,blockTag:ne});if(pe>=0&&"latest"===ne&&null!=_e&&"0x556f1830"===xe.substring(0,10)&&(0,z.hexDataLength)(xe)%32==4)try{const Ce=(0,z.hexDataSlice)(xe,4),ke=(0,z.hexDataSlice)(Ce,0,32);x.O$.from(ke).eq(_e)||L.throwError("CCIP Read sender did not match",w.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:X,data:xe});const me=[],Ee=x.O$.from((0,z.hexDataSlice)(Ce,32,64)).toNumber(),ze=x.O$.from((0,z.hexDataSlice)(Ce,Ee,Ee+32)).toNumber(),Ve=(0,z.hexDataSlice)(Ce,Ee+32);for(let Pt=0;PtP(this,void 0,void 0,function*(){const xe=yield this.perform("getBlock",_e);if(null==xe)return null!=_e.blockHash&&null==this._emitted["b:"+_e.blockHash]||null!=_e.blockTag&&pe>this._emitted.block?null:void 0;if(ne){let Ce=null;for(let me=0;methis._wrapTransaction(me)),ke}return this.formatter.block(xe)}),{oncePoll:this})})}getBlock(X){return this._getBlock(X,!1)}getBlockWithTransactions(X){return this._getBlock(X,!0)}getTransaction(X){return P(this,void 0,void 0,function*(){yield this.getNetwork(),X=yield X;const ne={transactionHash:this.formatter.hash(X,!0)};return(0,u.poll)(()=>P(this,void 0,void 0,function*(){const pe=yield this.perform("getTransaction",ne);if(null==pe)return null==this._emitted["t:"+X]?null:void 0;const _e=this.formatter.transactionResponse(pe);if(null==_e.blockNumber)_e.confirmations=0;else if(null==_e.confirmations){let Ce=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-_e.blockNumber+1;Ce<=0&&(Ce=1),_e.confirmations=Ce}return this._wrapTransaction(_e)}),{oncePoll:this})})}getTransactionReceipt(X){return P(this,void 0,void 0,function*(){yield this.getNetwork(),X=yield X;const ne={transactionHash:this.formatter.hash(X,!0)};return(0,u.poll)(()=>P(this,void 0,void 0,function*(){const pe=yield this.perform("getTransactionReceipt",ne);if(null==pe)return null==this._emitted["t:"+X]?null:void 0;if(null==pe.blockHash)return;const _e=this.formatter.receipt(pe);if(null==_e.blockNumber)_e.confirmations=0;else if(null==_e.confirmations){let Ce=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-_e.blockNumber+1;Ce<=0&&(Ce=1),_e.confirmations=Ce}return _e}),{oncePoll:this})})}getLogs(X){return P(this,void 0,void 0,function*(){yield this.getNetwork();const ne=yield(0,b.resolveProperties)({filter:this._getFilter(X)}),pe=yield this.perform("getLogs",ne);return pe.forEach(_e=>{null==_e.removed&&(_e.removed=!1)}),I.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(pe)})}getEtherPrice(){return P(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(X){return P(this,void 0,void 0,function*(){if("number"==typeof(X=yield X)&&X<0){X%1&&L.throwArgumentError("invalid BlockTag","blockTag",X);let ne=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return ne+=X,ne<0&&(ne=0),this.formatter.blockTag(ne)}return this.formatter.blockTag(X)})}getResolver(X){return P(this,void 0,void 0,function*(){let ne=X;for(;;){if(""===ne||"."===ne||"eth"!==X&&"eth"===ne)return null;const pe=yield this._getResolver(ne,"getResolver");if(null!=pe){const _e=new ue(this,pe,X);return ne===X||(yield _e.supportsWildcard())?_e:null}ne=ne.split(".").slice(1).join(".")}})}_getResolver(X,ne){return P(this,void 0,void 0,function*(){null==ne&&(ne="ENS");const pe=yield this.getNetwork();pe.ensAddress||L.throwError("network does not support ENS",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:ne,network:pe.name});try{const _e=yield this.call({to:pe.ensAddress,data:"0x0178b8bf"+(0,T.VM)(X).substring(2)});return this.formatter.callAddress(_e)}catch{}return null})}resolveName(X){return P(this,void 0,void 0,function*(){X=yield X;try{return Promise.resolve(this.formatter.address(X))}catch(pe){if((0,z.isHexString)(X))throw pe}"string"!=typeof X&&L.throwArgumentError("invalid ENS name","name",X);const ne=yield this.getResolver(X);return ne?yield ne.getAddress():null})}lookupAddress(X){return P(this,void 0,void 0,function*(){X=yield X;const ne=(X=this.formatter.address(X)).substring(2).toLowerCase()+".addr.reverse",pe=yield this._getResolver(ne,"lookupAddress");if(null==pe)return null;const _e=C(yield this.call({to:pe,data:"0x691f3431"+(0,T.VM)(ne).substring(2)}),0);return(yield this.resolveName(_e))!=X?null:_e})}getAvatar(X){return P(this,void 0,void 0,function*(){let ne=null;if((0,z.isHexString)(X)){const xe=this.formatter.address(X).substring(2).toLowerCase()+".addr.reverse",Ce=yield this._getResolver(xe,"getAvatar");if(!Ce)return null;ne=new ue(this,Ce,xe);try{const ke=yield ne.getAvatar();if(ke)return ke.url}catch(ke){if(ke.code!==w.Logger.errors.CALL_EXCEPTION)throw ke}try{const ke=C(yield this.call({to:Ce,data:"0x691f3431"+(0,T.VM)(xe).substring(2)}),0);ne=yield this.getResolver(ke)}catch(ke){if(ke.code!==w.Logger.errors.CALL_EXCEPTION)throw ke;return null}}else if(ne=yield this.getResolver(X),!ne)return null;const pe=yield ne.getAvatar();return null==pe?null:pe.url})}perform(X,ne){return L.throwError(X+" not implemented",w.Logger.errors.NOT_IMPLEMENTED,{operation:X})}_startEvent(X){this.polling=this._events.filter(ne=>ne.pollable()).length>0}_stopEvent(X){this.polling=this._events.filter(ne=>ne.pollable()).length>0}_addEventListener(X,ne,pe){const _e=new y(j(X),ne,pe);return this._events.push(_e),this._startEvent(_e),this}on(X,ne){return this._addEventListener(X,ne,!1)}once(X,ne){return this._addEventListener(X,ne,!0)}emit(X,...ne){let pe=!1,_e=[],xe=j(X);return this._events=this._events.filter(Ce=>Ce.tag!==xe||(setTimeout(()=>{Ce.listener.apply(this,ne)},0),pe=!0,!Ce.once||(_e.push(Ce),!1))),_e.forEach(Ce=>{this._stopEvent(Ce)}),pe}listenerCount(X){if(!X)return this._events.length;let ne=j(X);return this._events.filter(pe=>pe.tag===ne).length}listeners(X){if(null==X)return this._events.map(pe=>pe.listener);let ne=j(X);return this._events.filter(pe=>pe.tag===ne).map(pe=>pe.listener)}off(X,ne){if(null==ne)return this.removeAllListeners(X);const pe=[];let _e=!1,xe=j(X);return this._events=this._events.filter(Ce=>!(Ce.tag===xe&&Ce.listener==ne&&!_e&&(_e=!0,pe.push(Ce),1))),pe.forEach(Ce=>{this._stopEvent(Ce)}),this}removeAllListeners(X){let ne=[];if(null==X)ne=this._events,this._events=[];else{const pe=j(X);this._events=this._events.filter(_e=>_e.tag!==pe||(ne.push(_e),!1))}return ne.forEach(pe=>{this._stopEvent(pe)}),this}}},12539:(bt,be,Y)=>{"use strict";Y.d(be,{A:()=>w});var ie=Y(61488),z=Y(92275),O=Y(32701),E=Y(51838),d=Y(47949),x=Y(53898),f=Y(5102),T=Y(70744),g=function(S,I,P,L){return new(P||(P=Promise))(function(W,G){function H(R){try{K(L.next(R))}catch(o){G(o)}}function j(R){try{K(L.throw(R))}catch(o){G(o)}}function K(R){R.done?W(R.value):function(W){return W instanceof P?W:new P(function(G){G(W)})}(R.value).then(H,j)}K((L=L.apply(S,I||[])).next())})};const b=new x.Logger(f.i);function l(S){const I={};for(let P in S){if(null==S[P])continue;let L=S[P];"type"===P&&0===L||(L={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[P]?(0,ie.hexValue)((0,ie.hexlify)(L)):"accessList"===P?"["+(0,O.accessListify)(L).map(V=>`{address:"${V.address}",storageKeys:["${V.storageKeys.join('","')}"]}`).join(",")+"]":(0,ie.hexlify)(L),I[P]=L)}return I}function h(S){if(0==S.status&&("No records found"===S.message||"No transactions found"===S.message))return S.result;if(1!=S.status||"string"!=typeof S.message||!S.message.match(/^OK/)){const I=new Error("invalid response");throw I.result=JSON.stringify(S),(S.result||"").toLowerCase().indexOf("rate limit")>=0&&(I.throttleRetry=!0),I}return S.result}function u(S){if(S&&0==S.status&&"NOTOK"==S.message&&(S.result||"").toLowerCase().indexOf("rate limit")>=0){const I=new Error("throttled response");throw I.result=JSON.stringify(S),I.throttleRetry=!0,I}if("2.0"!=S.jsonrpc){const I=new Error("invalid response");throw I.result=JSON.stringify(S),I}if(S.error){const I=new Error(S.error.message||"unknown error");throw S.error.code&&(I.code=S.error.code),S.error.data&&(I.data=S.error.data),I}return S.result}function m(S){if("pending"===S)throw new Error("pending not supported");return"latest"===S?S:parseInt(S.substring(2),16)}function _(S,I,P){if("call"===S&&I.code===x.Logger.errors.SERVER_ERROR){const V=I.error;if(V&&(V.message.match(/reverted/i)||V.message.match(/VM execution error/i))){let W=V.data;if(W&&(W="0x"+W.replace(/^.*0x/i,"")),(0,ie.isHexString)(W))return W;b.throwError("missing revert data in call exception",x.Logger.errors.CALL_EXCEPTION,{error:I,data:"0x"})}}let L=I.message;throw I.code===x.Logger.errors.SERVER_ERROR&&(I.error&&"string"==typeof I.error.message?L=I.error.message:"string"==typeof I.body?L=I.body:"string"==typeof I.responseText&&(L=I.responseText)),L=(L||"").toLowerCase(),L.match(/insufficient funds/)&&b.throwError("insufficient funds for intrinsic transaction cost",x.Logger.errors.INSUFFICIENT_FUNDS,{error:I,method:S,transaction:P}),L.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&b.throwError("nonce has already been used",x.Logger.errors.NONCE_EXPIRED,{error:I,method:S,transaction:P}),L.match(/another transaction with same nonce/)&&b.throwError("replacement fee too low",x.Logger.errors.REPLACEMENT_UNDERPRICED,{error:I,method:S,transaction:P}),L.match(/execution failed due to an exception|execution reverted/)&&b.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",x.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:I,method:S,transaction:P}),I}class w extends T.Zk{constructor(I,P){super(I),(0,z.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,z.defineReadOnly)(this,"apiKey",P||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return b.throwArgumentError("unsupported network","network",this.network.name)}getUrl(I,P){const L=Object.keys(P).reduce((W,G)=>{const H=P[G];return null!=H&&(W+=`&${G}=${H}`),W},"");return`${this.baseUrl}/api?module=${I}${L}${this.apiKey?`&apikey=${this.apiKey}`:""}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(I,P){return P.module=I,P.apikey=this.apiKey,P}fetch(I,P,L){return g(this,void 0,void 0,function*(){const V=L?this.getPostUrl():this.getUrl(I,P),W=L?this.getPostData(I,P):null,G="proxy"===I?u:h;this.emit("debug",{action:"request",request:V,provider:this});const H={url:V,throttleSlotInterval:1e3,throttleCallback:(R,o)=>(this.isCommunityResource()&&(0,d.vh)(),Promise.resolve(!0))};let j=null;W&&(H.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},j=Object.keys(W).map(R=>`${R}=${W[R]}`).join("&"));const K=yield(0,E.fetchJson)(H,j,G||u);return this.emit("debug",{action:"response",request:V,response:(0,z.deepCopy)(K),provider:this}),K})}detectNetwork(){return g(this,void 0,void 0,function*(){return this.network})}perform(I,P){const L=Object.create(null,{perform:{get:()=>super.perform}});return g(this,void 0,void 0,function*(){switch(I){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:P.address,tag:P.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:P.address,tag:P.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:P.address,tag:P.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:P.address,position:P.position,tag:P.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:P.signedTransaction},!0).catch(V=>_("sendTransaction",V,P.signedTransaction));case"getBlock":if(P.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:P.blockTag,boolean:P.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:P.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:P.transactionHash});case"call":{if("latest"!==P.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const V=l(P.transaction);V.module="proxy",V.action="eth_call";try{return yield this.fetch("proxy",V,!0)}catch(W){return _("call",W,P.transaction)}}case"estimateGas":{const V=l(P.transaction);V.module="proxy",V.action="eth_estimateGas";try{return yield this.fetch("proxy",V,!0)}catch(W){return _("estimateGas",W,P.transaction)}}case"getLogs":{const V={action:"getLogs"};if(P.filter.fromBlock&&(V.fromBlock=m(P.filter.fromBlock)),P.filter.toBlock&&(V.toBlock=m(P.filter.toBlock)),P.filter.address&&(V.address=P.filter.address),P.filter.topics&&P.filter.topics.length>0&&(P.filter.topics.length>1&&b.throwError("unsupported topic count",x.Logger.errors.UNSUPPORTED_OPERATION,{topics:P.filter.topics}),1===P.filter.topics.length)){const H=P.filter.topics[0];("string"!=typeof H||66!==H.length)&&b.throwError("unsupported topic format",x.Logger.errors.UNSUPPORTED_OPERATION,{topic0:H}),V.topic0=H}const W=yield this.fetch("logs",V);let G={};for(let H=0;H{["contractAddress","to"].forEach(function(j){""==G[j]&&delete G[j]}),null==G.creates&&null!=G.contractAddress&&(G.creates=G.contractAddress);const H=this.formatter.transactionResponse(G);return G.timeStamp&&(H.timestamp=parseInt(G.timeStamp)),H})})}isCommunityResource(){return null==this.apiKey}}},47949:(bt,be,Y)=>{"use strict";Y.d(be,{Mb:()=>b,Ed:()=>l,Gp:()=>h,vh:()=>m});var ie=Y(2885),z=Y(2024),O=Y(61488),E=Y(51528),d=Y(92275),x=Y(32701),f=Y(53898),T=Y(5102);const g=new f.Logger(T.i);class b{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const w={},S=this.address.bind(this),I=this.bigNumber.bind(this),P=this.blockTag.bind(this),L=this.data.bind(this),V=this.hash.bind(this),W=this.hex.bind(this),G=this.number.bind(this),H=this.type.bind(this);return w.transaction={hash:V,type:H,accessList:b.allowNull(this.accessList.bind(this),null),blockHash:b.allowNull(V,null),blockNumber:b.allowNull(G,null),transactionIndex:b.allowNull(G,null),confirmations:b.allowNull(G,null),from:S,gasPrice:b.allowNull(I),maxPriorityFeePerGas:b.allowNull(I),maxFeePerGas:b.allowNull(I),gasLimit:I,to:b.allowNull(S,null),value:I,nonce:G,data:L,r:b.allowNull(this.uint256),s:b.allowNull(this.uint256),v:b.allowNull(G),creates:b.allowNull(S,null),raw:b.allowNull(L)},w.transactionRequest={from:b.allowNull(S),nonce:b.allowNull(G),gasLimit:b.allowNull(I),gasPrice:b.allowNull(I),maxPriorityFeePerGas:b.allowNull(I),maxFeePerGas:b.allowNull(I),to:b.allowNull(S),value:b.allowNull(I),data:b.allowNull(K=>this.data(K,!0)),type:b.allowNull(G),accessList:b.allowNull(this.accessList.bind(this),null)},w.receiptLog={transactionIndex:G,blockNumber:G,transactionHash:V,address:S,topics:b.arrayOf(V),data:L,logIndex:G,blockHash:V},w.receipt={to:b.allowNull(this.address,null),from:b.allowNull(this.address,null),contractAddress:b.allowNull(S,null),transactionIndex:G,root:b.allowNull(W),gasUsed:I,logsBloom:b.allowNull(L),blockHash:V,transactionHash:V,logs:b.arrayOf(this.receiptLog.bind(this)),blockNumber:G,confirmations:b.allowNull(G,null),cumulativeGasUsed:I,effectiveGasPrice:b.allowNull(I),status:b.allowNull(G),type:H},w.block={hash:b.allowNull(V),parentHash:V,number:G,timestamp:G,nonce:b.allowNull(W),difficulty:this.difficulty.bind(this),gasLimit:I,gasUsed:I,miner:b.allowNull(S),extraData:L,transactions:b.allowNull(b.arrayOf(V)),baseFeePerGas:b.allowNull(I)},w.blockWithTransactions=(0,d.shallowCopy)(w.block),w.blockWithTransactions.transactions=b.allowNull(b.arrayOf(this.transactionResponse.bind(this))),w.filter={fromBlock:b.allowNull(P,void 0),toBlock:b.allowNull(P,void 0),blockHash:b.allowNull(V,void 0),address:b.allowNull(S,void 0),topics:b.allowNull(this.topics.bind(this),void 0)},w.filterLog={blockNumber:b.allowNull(G),blockHash:b.allowNull(V),transactionIndex:G,removed:b.allowNull(this.boolean.bind(this)),address:S,data:b.allowFalsish(L,"0x"),topics:b.arrayOf(V),transactionHash:V,logIndex:G},w}accessList(w){return(0,x.accessListify)(w||[])}number(w){return"0x"===w?0:z.O$.from(w).toNumber()}type(w){return"0x"===w||null==w?0:z.O$.from(w).toNumber()}bigNumber(w){return z.O$.from(w)}boolean(w){if("boolean"==typeof w)return w;if("string"==typeof w){if("true"===(w=w.toLowerCase()))return!0;if("false"===w)return!1}throw new Error("invalid boolean - "+w)}hex(w,S){return"string"==typeof w&&(!S&&"0x"!==w.substring(0,2)&&(w="0x"+w),(0,O.isHexString)(w))?w.toLowerCase():g.throwArgumentError("invalid hash","value",w)}data(w,S){const I=this.hex(w,S);if(I.length%2!=0)throw new Error("invalid data; odd-length - "+w);return I}address(w){return(0,ie.getAddress)(w)}callAddress(w){if(!(0,O.isHexString)(w,32))return null;const S=(0,ie.getAddress)((0,O.hexDataSlice)(w,12));return S===E.d?null:S}contractAddress(w){return(0,ie.getContractAddress)(w)}blockTag(w){if(null==w)return"latest";if("earliest"===w)return"0x0";switch(w){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return w}if("number"==typeof w||(0,O.isHexString)(w))return(0,O.hexValue)(w);throw new Error("invalid blockTag")}hash(w,S){const I=this.hex(w,S);return 32!==(0,O.hexDataLength)(I)?g.throwArgumentError("invalid hash","value",w):I}difficulty(w){if(null==w)return null;const S=z.O$.from(w);try{return S.toNumber()}catch{}return null}uint256(w){if(!(0,O.isHexString)(w))throw new Error("invalid uint256");return(0,O.hexZeroPad)(w,32)}_block(w,S){null!=w.author&&null==w.miner&&(w.miner=w.author);const I=null!=w._difficulty?w._difficulty:w.difficulty,P=b.check(S,w);return P._difficulty=null==I?null:z.O$.from(I),P}block(w){return this._block(w,this.formats.block)}blockWithTransactions(w){return this._block(w,this.formats.blockWithTransactions)}transactionRequest(w){return b.check(this.formats.transactionRequest,w)}transactionResponse(w){null!=w.gas&&null==w.gasLimit&&(w.gasLimit=w.gas),w.to&&z.O$.from(w.to).isZero()&&(w.to="0x0000000000000000000000000000000000000000"),null!=w.input&&null==w.data&&(w.data=w.input),null==w.to&&null==w.creates&&(w.creates=this.contractAddress(w)),(1===w.type||2===w.type)&&null==w.accessList&&(w.accessList=[]);const S=b.check(this.formats.transaction,w);if(null!=w.chainId){let I=w.chainId;(0,O.isHexString)(I)&&(I=z.O$.from(I).toNumber()),S.chainId=I}else{let I=w.networkId;null==I&&null==S.v&&(I=w.chainId),(0,O.isHexString)(I)&&(I=z.O$.from(I).toNumber()),"number"!=typeof I&&null!=S.v&&(I=(S.v-35)/2,I<0&&(I=0),I=parseInt(I)),"number"!=typeof I&&(I=0),S.chainId=I}return S.blockHash&&"x"===S.blockHash.replace(/0/g,"")&&(S.blockHash=null),S}transaction(w){return(0,x.parse)(w)}receiptLog(w){return b.check(this.formats.receiptLog,w)}receipt(w){const S=b.check(this.formats.receipt,w);if(null!=S.root)if(S.root.length<=4){const I=z.O$.from(S.root).toNumber();0===I||1===I?(null!=S.status&&S.status!==I&&g.throwArgumentError("alt-root-status/status mismatch","value",{root:S.root,status:S.status}),S.status=I,delete S.root):g.throwArgumentError("invalid alt-root-status","value.root",S.root)}else 66!==S.root.length&&g.throwArgumentError("invalid root hash","value.root",S.root);return null!=S.status&&(S.byzantium=!0),S}topics(w){return Array.isArray(w)?w.map(S=>this.topics(S)):null!=w?this.hash(w,!0):null}filter(w){return b.check(this.formats.filter,w)}filterLog(w){return b.check(this.formats.filterLog,w)}static check(w,S){const I={};for(const P in w)try{const L=w[P](S[P]);void 0!==L&&(I[P]=L)}catch(L){throw L.checkKey=P,L.checkValue=S[P],L}return I}static allowNull(w,S){return function(I){return null==I?S:w(I)}}static allowFalsish(w,S){return function(I){return I?w(I):S}}static arrayOf(w){return function(S){if(!Array.isArray(S))throw new Error("not an array");const I=[];return S.forEach(function(P){I.push(w(P))}),I}}}function l(_){return _&&"function"==typeof _.isCommunityResource}function h(_){return l(_)&&_.isCommunityResource()}let u=!1;function m(){u||(u=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},80831:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{AlchemyProvider:()=>W,AlchemyWebSocketProvider:()=>V,AnkrProvider:()=>K,BaseProvider:()=>O.Zk,CloudflareProvider:()=>y,EtherscanProvider:()=>M.A,FallbackProvider:()=>_e,Formatter:()=>d.Mb,InfuraProvider:()=>Ee,InfuraWebSocketProvider:()=>me,IpcProvider:()=>xe,JsonRpcBatchProvider:()=>ze,JsonRpcProvider:()=>f.r,JsonRpcSigner:()=>f.C,NodesmithProvider:()=>tt,PocketProvider:()=>wt,Provider:()=>ie.zt,Resolver:()=>O.H2,StaticJsonRpcProvider:()=>S,UrlJsonRpcProvider:()=>I,Web3Provider:()=>St,WebSocketProvider:()=>m,getDefaultProvider:()=>dn,getNetwork:()=>z.H,isCommunityResourcable:()=>d.Ed,isCommunityResource:()=>d.Gp,showThrottleMessage:()=>d.vh});var ie=Y(11527),z=Y(35473),O=Y(70744),E=Y(92275),d=Y(47949),x=Y(2024),f=Y(61522),T=Y(53898),g=Y(5102);let b=null;try{if(b=WebSocket,null==b)throw new Error("inject please")}catch{const It=new T.Logger(g.i);b=function(){It.throwError("WebSockets not supported in this environment",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var l=function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch($r){fn($r)}}function Yr(Bn){try{Ln(jt.throw(Bn))}catch($r){fn($r)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Yr)}Ln((jt=jt.apply(Nt,It||[])).next())})};const h=new T.Logger(g.i);let u=1;class m extends f.r{constructor(It,qt){"any"===qt&&h.throwError("WebSocketProvider does not support 'any' network yet",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof It?It:"_websocket",qt),this._pollingInterval=-1,this._wsReady=!1,(0,E.defineReadOnly)(this,"_websocket","string"==typeof It?new b(this.connection.url):It),(0,E.defineReadOnly)(this,"_requests",{}),(0,E.defineReadOnly)(this,"_subs",{}),(0,E.defineReadOnly)(this,"_subIds",{}),(0,E.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(Yt=>{this.websocket.send(this._requests[Yt].payload)})},this.websocket.onmessage=Yt=>{const Wn=Yt.data,fn=JSON.parse(Wn);if(null!=fn.id){const $n=String(fn.id),Yr=this._requests[$n];if(delete this._requests[$n],void 0!==fn.result)Yr.callback(null,fn.result),this.emit("debug",{action:"response",request:JSON.parse(Yr.payload),response:fn.result,provider:this});else{let Ln=null;fn.error?(Ln=new Error(fn.error.message||"unknown error"),(0,E.defineReadOnly)(Ln,"code",fn.error.code||null),(0,E.defineReadOnly)(Ln,"response",Wn)):Ln=new Error("unknown error"),Yr.callback(Ln,void 0),this.emit("debug",{action:"response",error:Ln,request:JSON.parse(Yr.payload),provider:this})}}else if("eth_subscription"===fn.method){const $n=this._subs[fn.params.subscription];$n&&$n.processFunc(fn.params.result)}else console.warn("this should not happen")};const jt=setInterval(()=>{this.emit("poll")},1e3);jt.unref&&jt.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(It){h.throwError("cannot reset events block on WebSocketProvider",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(It){h.throwError("cannot set polling interval on WebSocketProvider",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return l(this,void 0,void 0,function*(){return null})}set polling(It){!It||h.throwError("cannot set polling on WebSocketProvider",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(It,qt){const jt=u++;return new Promise((Yt,Wn)=>{const $n=JSON.stringify({method:It,params:qt,id:jt,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse($n),provider:this}),this._requests[String(jt)]={callback:function(Yr,Ln){return Yr?Wn(Yr):Yt(Ln)},payload:$n},this._wsReady&&this.websocket.send($n)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(It,qt,jt){return l(this,void 0,void 0,function*(){let Yt=this._subIds[It];null==Yt&&(Yt=Promise.all(qt).then(fn=>this.send("eth_subscribe",fn)),this._subIds[It]=Yt);const Wn=yield Yt;this._subs[Wn]={tag:It,processFunc:jt}})}_startEvent(It){switch(It.type){case"block":this._subscribe("block",["newHeads"],qt=>{const jt=x.O$.from(qt.number).toNumber();this._emitted.block=jt,this.emit("block",jt)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],qt=>{this.emit("pending",qt)});break;case"filter":this._subscribe(It.tag,["logs",this._getFilter(It.filter)],qt=>{null==qt.removed&&(qt.removed=!1),this.emit(It.filter,this.formatter.filterLog(qt))});break;case"tx":{const qt=jt=>{const Yt=jt.hash;this.getTransactionReceipt(Yt).then(Wn=>{!Wn||this.emit(Yt,Wn)})};qt(It),this._subscribe("tx",["newHeads"],jt=>{this._events.filter(Yt=>"tx"===Yt.type).forEach(qt)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",It)}}_stopEvent(It){let qt=It.tag;if("tx"===It.type){if(this._events.filter(Yt=>"tx"===Yt.type).length)return;qt="tx"}else if(this.listenerCount(It.event))return;const jt=this._subIds[qt];!jt||(delete this._subIds[qt],jt.then(Yt=>{!this._subs[Yt]||(delete this._subs[Yt],this.send("eth_unsubscribe",[Yt]))}))}destroy(){return l(this,void 0,void 0,function*(){this.websocket.readyState===b.CONNECTING&&(yield new Promise(It=>{this.websocket.onopen=function(){It(!0)},this.websocket.onerror=function(){It(!1)}})),this.websocket.close(1e3)})}}const w=new T.Logger(g.i);class S extends f.r{detectNetwork(){const It=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch($r){fn($r)}}function Yr(Bn){try{Ln(jt.throw(Bn))}catch($r){fn($r)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Yr)}Ln((jt=jt.apply(Nt,It||[])).next())})}(this,void 0,void 0,function*(){let qt=this.network;return null==qt&&(qt=yield It.detectNetwork.call(this),qt||w.throwError("no network detected",T.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,E.defineReadOnly)(this,"_network",qt),this.emit("network",qt,null))),qt})}}class I extends S{constructor(It,qt){w.checkAbstract(new.target,I),It=(0,E.getStatic)(new.target,"getNetwork")(It),qt=(0,E.getStatic)(new.target,"getApiKey")(qt),super((0,E.getStatic)(new.target,"getUrl")(It,qt),It),"string"==typeof qt?(0,E.defineReadOnly)(this,"apiKey",qt):null!=qt&&Object.keys(qt).forEach(Yt=>{(0,E.defineReadOnly)(this,Yt,qt[Yt])})}_startPending(){w.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(It){return w.throwError("API provider does not support signing",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(It){return It}static getUrl(It,qt){return w.throwError("not implemented; sub-classes must override getUrl",T.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const P=new T.Logger(g.i),L="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class V extends m{constructor(It,qt){const jt=new W(It,qt);super(jt.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),jt.network),(0,E.defineReadOnly)(this,"apiKey",jt.apiKey)}isCommunityResource(){return this.apiKey===L}}class W extends I{static getWebSocketProvider(It,qt){return new V(It,qt)}static getApiKey(It){return null==It?L:(It&&"string"!=typeof It&&P.throwArgumentError("invalid apiKey","apiKey",It),It)}static getUrl(It,qt){let jt=null;switch(It.name){case"homestead":jt="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":jt="eth-goerli.g.alchemy.com/v2/";break;case"matic":jt="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":jt="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":jt="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":jt="arb-goerli.g.alchemy.com/v2/";break;case"optimism":jt="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":jt="opt-goerli.g.alchemy.com/v2/";break;default:P.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+jt+qt,throttleCallback:(Yt,Wn)=>(qt===L&&(0,d.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===L}}const G=new T.Logger(g.i),H="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function j(Nt){switch(Nt){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return G.throwArgumentError("unsupported network","name",Nt)}class K extends I{isCommunityResource(){return this.apiKey===H}static getApiKey(It){return It??H}static getUrl(It,qt){null==qt&&(qt=H);const jt={allowGzip:!0,url:"https://"+j(It.name)+qt,throttleCallback:(Yt,Wn)=>(qt.apiKey===H&&(0,d.vh)(),Promise.resolve(!0))};return null!=qt.projectSecret&&(jt.user="",jt.password=qt.projectSecret),jt}}const o=new T.Logger(g.i);class y extends I{static getApiKey(It){return null!=It&&o.throwArgumentError("apiKey not supported for cloudflare","apiKey",It),null}static getUrl(It,qt){let jt=null;return"homestead"===It.name?jt="https://cloudflare-eth.com/":o.throwArgumentError("unsupported network","network",arguments[0]),jt}perform(It,qt){const jt=Object.create(null,{perform:{get:()=>super.perform}});return function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch($r){fn($r)}}function Yr(Bn){try{Ln(jt.throw(Bn))}catch($r){fn($r)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Yr)}Ln((jt=jt.apply(Nt,It||[])).next())})}(this,void 0,void 0,function*(){return"getBlockNumber"===It?(yield jt.perform.call(this,"getBlock",{blockTag:"latest"})).number:jt.perform.call(this,It,qt)})}}var M=Y(12539),v=Y(61488),k=Y(34820),D=Y(51838),N=function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch($r){fn($r)}}function Yr(Bn){try{Ln(jt.throw(Bn))}catch($r){fn($r)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Yr)}Ln((jt=jt.apply(Nt,It||[])).next())})};const C=new T.Logger(g.i);function a(){return(new Date).getTime()}function B(Nt){let It=null;for(let qt=0;qtIt?null:(jt+Yt)/2}function ee(Nt){if(null===Nt)return"null";if("number"==typeof Nt||"boolean"==typeof Nt)return JSON.stringify(Nt);if("string"==typeof Nt)return Nt;if(x.O$.isBigNumber(Nt))return Nt.toString();if(Array.isArray(Nt))return JSON.stringify(Nt.map(It=>ee(It)));if("object"==typeof Nt){const It=Object.keys(Nt);return It.sort(),"{"+It.map(qt=>{let jt=Nt[qt];return jt="function"==typeof jt?"[function]":ee(jt),JSON.stringify(qt)+":"+jt}).join(",")+"}"}throw new Error("unknown value type: "+typeof Nt)}let ce=1;function ue(Nt){let It=null,qt=null,jt=new Promise(fn=>{It=function(){qt&&(clearTimeout(qt),qt=null),fn()},qt=setTimeout(It,Nt)});return{cancel:It,getPromise:function(){return jt},wait:fn=>(jt=jt.then(fn),jt)}}const we=[T.Logger.errors.CALL_EXCEPTION,T.Logger.errors.INSUFFICIENT_FUNDS,T.Logger.errors.NONCE_EXPIRED,T.Logger.errors.REPLACEMENT_UNDERPRICED,T.Logger.errors.UNPREDICTABLE_GAS_LIMIT],ae=["address","args","errorArgs","errorSignature","method","transaction"];function Te(Nt,It){const qt={weight:Nt.weight};return Object.defineProperty(qt,"provider",{get:()=>Nt.provider}),Nt.start&&(qt.start=Nt.start),It&&(qt.duration=It-Nt.start),Nt.done&&(Nt.error?qt.error=Nt.error:qt.result=Nt.result||null),qt}function ne(Nt,It){return N(this,void 0,void 0,function*(){const qt=Nt.provider;return null!=qt.blockNumber&&qt.blockNumber>=It||-1===It?qt:(0,D.poll)(()=>new Promise((jt,Yt)=>{setTimeout(function(){return jt(qt.blockNumber>=It?qt:Nt.cancelled?null:void 0)},0)}),{oncePoll:qt})})}function pe(Nt,It,qt,jt){return N(this,void 0,void 0,function*(){let Yt=Nt.provider;switch(qt){case"getBlockNumber":case"getGasPrice":return Yt[qt]();case"getEtherPrice":if(Yt.getEtherPrice)return Yt.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),Yt[qt](jt.address,jt.blockTag||"latest");case"getStorageAt":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),Yt.getStorageAt(jt.address,jt.position,jt.blockTag||"latest");case"getBlock":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),Yt[jt.includeTransactions?"getBlockWithTransactions":"getBlock"](jt.blockTag||jt.blockHash);case"call":case"estimateGas":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),"call"===qt&&jt.blockTag?Yt[qt](jt.transaction,jt.blockTag):Yt[qt](jt.transaction);case"getTransaction":case"getTransactionReceipt":return Yt[qt](jt.transactionHash);case"getLogs":{let Wn=jt.filter;return(Wn.fromBlock&&(0,v.isHexString)(Wn.fromBlock)||Wn.toBlock&&(0,v.isHexString)(Wn.toBlock))&&(Yt=yield ne(Nt,It)),Yt.getLogs(Wn)}}return C.throwError("unknown method error",T.Logger.errors.UNKNOWN_ERROR,{method:qt,params:jt})})}class _e extends O.Zk{constructor(It,qt){0===It.length&&C.throwArgumentError("missing providers","providers",It);const jt=It.map((fn,$n)=>{if(ie.zt.isProvider(fn)){const Bn=(0,d.Gp)(fn)?2e3:750;return Object.freeze({provider:fn,weight:1,stallTimeout:Bn,priority:1})}const Yr=(0,E.shallowCopy)(fn);null==Yr.priority&&(Yr.priority=1),null==Yr.stallTimeout&&(Yr.stallTimeout=(0,d.Gp)(fn)?2e3:750),null==Yr.weight&&(Yr.weight=1);const Ln=Yr.weight;return(Ln%1||Ln>512||Ln<1)&&C.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${$n}].weight`,Ln),Object.freeze(Yr)}),Yt=jt.reduce((fn,$n)=>fn+$n.weight,0);null==qt?qt=Yt/2:qt>Yt&&C.throwArgumentError("quorum will always fail; larger than total weight","quorum",qt);let Wn=B(jt.map(fn=>fn.provider.network));null==Wn&&(Wn=new Promise((fn,$n)=>{setTimeout(()=>{this.detectNetwork().then(fn,$n)},0)})),super(Wn),(0,E.defineReadOnly)(this,"providerConfigs",Object.freeze(jt)),(0,E.defineReadOnly)(this,"quorum",qt),this._highestBlockNumber=-1}detectNetwork(){return N(this,void 0,void 0,function*(){return B(yield Promise.all(this.providerConfigs.map(qt=>qt.provider.getNetwork())))})}perform(It,qt){return N(this,void 0,void 0,function*(){if("sendTransaction"===It){const Yr=yield Promise.all(this.providerConfigs.map(Ln=>Ln.provider.sendTransaction(qt.signedTransaction).then(Bn=>Bn.hash,Bn=>Bn)));for(let Ln=0;Ln$n.result);let fn=Q(Yt.map($n=>$n.result),2);if(null!=fn)return fn=Math.ceil(fn),Wn.indexOf(fn+1)>=0&&fn++,fn>=Nt._highestBlockNumber&&(Nt._highestBlockNumber=fn),Nt._highestBlockNumber};case"getGasPrice":return function(Yt){const Wn=Yt.map(fn=>fn.result);return Wn.sort(),Wn[Math.floor(Wn.length/2)]};case"getEtherPrice":return function(Yt){return Q(Yt.map(Wn=>Wn.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":jt=function(Yt){return null==Yt?null:((Yt=(0,E.shallowCopy)(Yt)).confirmations=-1,ee(Yt))};break;case"getBlock":jt=qt.includeTransactions?function(Yt){return null==Yt?null:((Yt=(0,E.shallowCopy)(Yt)).transactions=Yt.transactions.map(Wn=>((Wn=(0,E.shallowCopy)(Wn)).confirmations=-1,Wn)),ee(Yt))}:function(Yt){return null==Yt?null:ee(Yt)};break;default:throw new Error("unknown method: "+It)}return function(Nt,It){return function(qt){const jt={};qt.forEach(Wn=>{const fn=Nt(Wn.result);jt[fn]||(jt[fn]={count:0,result:Wn.result}),jt[fn].count++});const Yt=Object.keys(jt);for(let Wn=0;Wn=It)return fn.result}}}(jt,Nt.quorum)}(this,It,qt),Yt=(0,k.y)(this.providerConfigs.map(E.shallowCopy));Yt.sort((Yr,Ln)=>Yr.priority-Ln.priority);const Wn=this._highestBlockNumber;let fn=0,$n=!0;for(;;){const Yr=a();let Ln=Yt.filter(bn=>bn.runner&&Yr-bn.startbn+Lr.weight,0);for(;Ln{bn.staller=null}),bn.runner=pe(bn,Wn,It,qt).then(Kn=>{bn.done=!0,bn.result=Kn,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:Lr,backend:Te(bn,a()),request:{method:It,params:(0,E.deepCopy)(qt)},provider:this})},Kn=>{bn.done=!0,bn.error=Kn,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:Lr,backend:Te(bn,a()),request:{method:It,params:(0,E.deepCopy)(qt)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:Lr,backend:Te(bn,null),request:{method:It,params:(0,E.deepCopy)(qt)},provider:this}),Ln+=bn.weight}const Bn=[];Yt.forEach(bn=>{bn.done||!bn.runner||(Bn.push(bn.runner),bn.staller&&Bn.push(bn.staller.getPromise()))}),Bn.length&&(yield Promise.race(Bn));const $r=Yt.filter(bn=>bn.done&&null==bn.error);if($r.length>=this.quorum){const bn=jt($r);if(void 0!==bn)return Yt.forEach(Lr=>{Lr.staller&&Lr.staller.cancel(),Lr.cancelled=!0}),bn;$n||(yield ue(100).getPromise()),$n=!1}const Gn=Yt.reduce((bn,Lr)=>{if(!Lr.done||null==Lr.error)return bn;const Kn=Lr.error.code;return we.indexOf(Kn)>=0&&(bn[Kn]||(bn[Kn]={error:Lr.error,weight:0}),bn[Kn].weight+=Lr.weight),bn},{});if(Object.keys(Gn).forEach(bn=>{const Lr=Gn[bn];if(Lr.weight{Ii.staller&&Ii.staller.cancel(),Ii.cancelled=!0});const Kn=Lr.error,sr={};ae.forEach(Ii=>{null!=Kn[Ii]&&(sr[Ii]=Kn[Ii])}),C.throwError(Kn.reason||Kn.message,bn,sr)}),0===Yt.filter(bn=>!bn.done).length)break}return Yt.forEach(Yr=>{Yr.staller&&Yr.staller.cancel(),Yr.cancelled=!0}),C.throwError("failed to meet quorum",T.Logger.errors.SERVER_ERROR,{method:It,params:qt,results:Yt.map(Yr=>Te(Yr)),provider:this})})}}const xe=null,Ce=new T.Logger(g.i),ke="84842078b09946638c03157f83405213";class me extends m{constructor(It,qt){const jt=new Ee(It,qt),Yt=jt.connection;Yt.password&&Ce.throwError("INFURA WebSocket project secrets unsupported",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"}),super(Yt.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),It),(0,E.defineReadOnly)(this,"apiKey",jt.projectId),(0,E.defineReadOnly)(this,"projectId",jt.projectId),(0,E.defineReadOnly)(this,"projectSecret",jt.projectSecret)}isCommunityResource(){return this.projectId===ke}}class Ee extends I{static getWebSocketProvider(It,qt){return new me(It,qt)}static getApiKey(It){const qt={apiKey:ke,projectId:ke,projectSecret:null};return null==It||("string"==typeof It?qt.projectId=It:null!=It.projectSecret?(Ce.assertArgument("string"==typeof It.projectId,"projectSecret requires a projectId","projectId",It.projectId),Ce.assertArgument("string"==typeof It.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),qt.projectId=It.projectId,qt.projectSecret=It.projectSecret):It.projectId&&(qt.projectId=It.projectId),qt.apiKey=qt.projectId),qt}static getUrl(It,qt){let jt=null;switch(It?It.name:"unknown"){case"homestead":jt="mainnet.infura.io";break;case"goerli":jt="goerli.infura.io";break;case"sepolia":jt="sepolia.infura.io";break;case"matic":jt="polygon-mainnet.infura.io";break;case"maticmum":jt="polygon-mumbai.infura.io";break;case"optimism":jt="optimism-mainnet.infura.io";break;case"optimism-goerli":jt="optimism-goerli.infura.io";break;case"arbitrum":jt="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":jt="arbitrum-goerli.infura.io";break;default:Ce.throwError("unsupported network",T.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:It})}const Yt={allowGzip:!0,url:"https://"+jt+"/v3/"+qt.projectId,throttleCallback:(Wn,fn)=>(qt.projectId===ke&&(0,d.vh)(),Promise.resolve(!0))};return null!=qt.projectSecret&&(Yt.user="",Yt.password=qt.projectSecret),Yt}isCommunityResource(){return this.projectId===ke}}class ze extends f.r{send(It,qt){const jt={method:It,params:qt,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const Yt={request:jt,resolve:null,reject:null},Wn=new Promise((fn,$n)=>{Yt.resolve=fn,Yt.reject=$n});return this._pendingBatch.push(Yt),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{const fn=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const $n=fn.map(Yr=>Yr.request);return this.emit("debug",{action:"requestBatch",request:(0,E.deepCopy)($n),provider:this}),(0,D.fetchJson)(this.connection,JSON.stringify($n)).then(Yr=>{this.emit("debug",{action:"response",request:$n,response:Yr,provider:this}),fn.forEach((Ln,Bn)=>{const $r=Yr[Bn];if($r.error){const Gn=new Error($r.error.message);Gn.code=$r.error.code,Gn.data=$r.error.data,Ln.reject(Gn)}else Ln.resolve($r.result)})},Yr=>{this.emit("debug",{action:"response",error:Yr,request:$n,provider:this}),fn.forEach(Ln=>{Ln.reject(Yr)})})},10)),Wn}}const Ve=new T.Logger(g.i);class tt extends I{static getApiKey(It){return It&&"string"!=typeof It&&Ve.throwArgumentError("invalid apiKey","apiKey",It),It||"ETHERS_JS_SHARED"}static getUrl(It,qt){Ve.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let jt=null;switch(It.name){case"homestead":jt="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":jt="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":jt="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":jt="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":jt="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ve.throwArgumentError("unsupported network","network",arguments[0])}return jt+"?apiKey="+qt}}const mt=new T.Logger(g.i),ht="62e1ad51b37b8e00394bda3b";class wt extends I{static getApiKey(It){const qt={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==It?qt.applicationId=ht:"string"==typeof It?qt.applicationId=It:null!=It.applicationSecretKey?(qt.applicationId=It.applicationId,qt.applicationSecretKey=It.applicationSecretKey):It.applicationId?qt.applicationId=It.applicationId:mt.throwArgumentError("unsupported PocketProvider apiKey","apiKey",It),qt}static getUrl(It,qt){let jt=null;switch(It?It.name:"unknown"){case"goerli":jt="eth-goerli.gateway.pokt.network";break;case"homestead":jt="eth-mainnet.gateway.pokt.network";break;case"kovan":jt="poa-kovan.gateway.pokt.network";break;case"matic":jt="poly-mainnet.gateway.pokt.network";break;case"maticmum":jt="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":jt="eth-rinkeby.gateway.pokt.network";break;case"ropsten":jt="eth-ropsten.gateway.pokt.network";break;default:mt.throwError("unsupported network",T.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:It})}const Wn={headers:{},url:`https://${jt}/v1/lb/${qt.applicationId}`};return null!=qt.applicationSecretKey&&(Wn.user="",Wn.password=qt.applicationSecretKey),Wn}isCommunityResource(){return this.applicationId===ht}}const Pt=new T.Logger(g.i);let st=1;function Ye(Nt,It){const qt="Web3LegacyFetcher";return function(jt,Yt){const Wn={method:jt,params:Yt,id:st++,jsonrpc:"2.0"};return new Promise((fn,$n)=>{this.emit("debug",{action:"request",fetcher:qt,request:(0,E.deepCopy)(Wn),provider:this}),It(Wn,(Yr,Ln)=>{if(Yr)return this.emit("debug",{action:"response",fetcher:qt,error:Yr,request:Wn,provider:this}),$n(Yr);if(this.emit("debug",{action:"response",fetcher:qt,request:Wn,response:Ln,provider:this}),Ln.error){const Bn=new Error(Ln.error.message);return Bn.code=Ln.error.code,Bn.data=Ln.error.data,$n(Bn)}fn(Ln.result)})})}}class St extends f.r{constructor(It,qt){null==It&&Pt.throwArgumentError("missing provider","provider",It);let jt=null,Yt=null,Wn=null;var Nt;"function"==typeof It?(jt="unknown:",Yt=It):(jt=It.host||It.path||"",!jt&&It.isMetaMask&&(jt="metamask"),Wn=It,It.request?(""===jt&&(jt="eip-1193:"),Nt=It,Yt=function(It,qt){null==qt&&(qt=[]);const jt={method:It,params:qt};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,E.deepCopy)(jt),provider:this}),Nt.request(jt).then(Yt=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:jt,response:Yt,provider:this}),Yt),Yt=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:jt,error:Yt,provider:this}),Yt})}):It.sendAsync?Yt=Ye(0,It.sendAsync.bind(It)):It.send?Yt=Ye(0,It.send.bind(It)):Pt.throwArgumentError("unsupported provider","provider",It),jt||(jt="unknown:")),super(jt,qt),(0,E.defineReadOnly)(this,"jsonRpcFetchFunc",Yt),(0,E.defineReadOnly)(this,"provider",Wn)}send(It,qt){return this.jsonRpcFetchFunc(It,qt)}}const Wt=new T.Logger(g.i);function dn(Nt,It){if(null==Nt&&(Nt="homestead"),"string"==typeof Nt){const jt=Nt.match(/^(ws|http)s?:/i);if(jt)switch(jt[1].toLowerCase()){case"http":case"https":return new f.r(Nt);case"ws":case"wss":return new m(Nt);default:Wt.throwArgumentError("unsupported URL scheme","network",Nt)}}const qt=(0,z.H)(Nt);return(!qt||!qt._defaultProvider)&&Wt.throwError("unsupported getDefaultProvider network",T.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:Nt}),qt._defaultProvider({FallbackProvider:_e,AlchemyProvider:W,AnkrProvider:K,CloudflareProvider:y,EtherscanProvider:M.A,InfuraProvider:Ee,JsonRpcProvider:f.r,NodesmithProvider:tt,PocketProvider:wt,Web3Provider:St,IpcProvider:xe},It)}},61522:(bt,be,Y)=>{"use strict";Y.d(be,{C:()=>V,r:()=>H});var ie=Y(11221),z=Y(2024),O=Y(61488),E=Y(72072),d=Y(92275),x=Y(8822),f=Y(32701),T=Y(51838),g=Y(53898),b=Y(5102),l=Y(70744),h=function(j,K,R,o){return new(R||(R=Promise))(function(M,v){function k(C){try{N(o.next(C))}catch(a){v(a)}}function D(C){try{N(o.throw(C))}catch(a){v(a)}}function N(C){C.done?M(C.value):function(M){return M instanceof R?M:new R(function(v){v(M)})}(C.value).then(k,D)}N((o=o.apply(j,K||[])).next())})};const u=new g.Logger(b.i),m=["call","estimateGas"];function _(j,K){if(null==j)return null;if("string"==typeof j.message&&j.message.match("reverted")){const R=(0,O.isHexString)(j.data)?j.data:null;if(!K||R)return{message:j.message,data:R}}if("object"==typeof j){for(const R in j){const o=_(j[R],K);if(o)return o}return null}if("string"==typeof j)try{return _(JSON.parse(j),K)}catch{}return null}function w(j,K,R){const o=R.transaction||R.signedTransaction;if("call"===j){const M=_(K,!0);if(M)return M.data;u.throwError("missing revert data in call exception; Transaction reverted without a reason string",g.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:o,error:K})}if("estimateGas"===j){let M=_(K.body,!1);null==M&&(M=_(K,!1)),M&&u.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:M.message,method:j,transaction:o,error:K})}let y=K.message;throw K.code===g.Logger.errors.SERVER_ERROR&&K.error&&"string"==typeof K.error.message?y=K.error.message:"string"==typeof K.body?y=K.body:"string"==typeof K.responseText&&(y=K.responseText),y=(y||"").toLowerCase(),y.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&u.throwError("insufficient funds for intrinsic transaction cost",g.Logger.errors.INSUFFICIENT_FUNDS,{error:K,method:j,transaction:o}),y.match(/nonce (is )?too low/i)&&u.throwError("nonce has already been used",g.Logger.errors.NONCE_EXPIRED,{error:K,method:j,transaction:o}),y.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&u.throwError("replacement fee too low",g.Logger.errors.REPLACEMENT_UNDERPRICED,{error:K,method:j,transaction:o}),y.match(/only replay-protected/i)&&u.throwError("legacy pre-eip-155 transactions not supported",g.Logger.errors.UNSUPPORTED_OPERATION,{error:K,method:j,transaction:o}),m.indexOf(j)>=0&&y.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&u.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:K,method:j,transaction:o}),K}function S(j){return new Promise(function(K){setTimeout(K,j)})}function I(j){if(j.error){const K=new Error(j.error.message);throw K.code=j.error.code,K.data=j.error.data,K}return j.result}function P(j){return j&&j.toLowerCase()}const L={};class V extends ie.Signer{constructor(K,R,o){if(super(),K!==L)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,d.defineReadOnly)(this,"provider",R),null==o&&(o=0),"string"==typeof o?((0,d.defineReadOnly)(this,"_address",this.provider.formatter.address(o)),(0,d.defineReadOnly)(this,"_index",null)):"number"==typeof o?((0,d.defineReadOnly)(this,"_index",o),(0,d.defineReadOnly)(this,"_address",null)):u.throwArgumentError("invalid address or index","addressOrIndex",o)}connect(K){return u.throwError("cannot alter JSON-RPC Signer connection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new W(L,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(K=>(K.length<=this._index&&u.throwError("unknown account #"+this._index,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(K[this._index])))}sendUncheckedTransaction(K){K=(0,d.shallowCopy)(K);const R=this.getAddress().then(o=>(o&&(o=o.toLowerCase()),o));if(null==K.gasLimit){const o=(0,d.shallowCopy)(K);o.from=R,K.gasLimit=this.provider.estimateGas(o)}return null!=K.to&&(K.to=Promise.resolve(K.to).then(o=>h(this,void 0,void 0,function*(){if(null==o)return null;const y=yield this.provider.resolveName(o);return null==y&&u.throwArgumentError("provided ENS name resolves to null","tx.to",o),y}))),(0,d.resolveProperties)({tx:(0,d.resolveProperties)(K),sender:R}).then(({tx:o,sender:y})=>{null!=o.from?o.from.toLowerCase()!==y&&u.throwArgumentError("from address mismatch","transaction",K):o.from=y;const M=this.provider.constructor.hexlifyTransaction(o,{from:!0});return this.provider.send("eth_sendTransaction",[M]).then(v=>v,v=>("string"==typeof v.message&&v.message.match(/user denied/i)&&u.throwError("user rejected transaction",g.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:o}),w("sendTransaction",v,M)))})}signTransaction(K){return u.throwError("signing transactions is unsupported",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(K){return h(this,void 0,void 0,function*(){const R=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),o=yield this.sendUncheckedTransaction(K);try{return yield(0,T.poll)(()=>h(this,void 0,void 0,function*(){const y=yield this.provider.getTransaction(o);if(null!==y)return this.provider._wrapTransaction(y,o,R)}),{oncePoll:this.provider})}catch(y){throw y.transactionHash=o,y}})}signMessage(K){return h(this,void 0,void 0,function*(){const R="string"==typeof K?(0,x.Y0)(K):K,o=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,O.hexlify)(R),o.toLowerCase()])}catch(y){throw"string"==typeof y.message&&y.message.match(/user denied/i)&&u.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:o,messageData:K}),y}})}_legacySignMessage(K){return h(this,void 0,void 0,function*(){const R="string"==typeof K?(0,x.Y0)(K):K,o=yield this.getAddress();try{return yield this.provider.send("eth_sign",[o.toLowerCase(),(0,O.hexlify)(R)])}catch(y){throw"string"==typeof y.message&&y.message.match(/user denied/i)&&u.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:o,messageData:K}),y}})}_signTypedData(K,R,o){return h(this,void 0,void 0,function*(){const y=yield E.E.resolveNames(K,R,o,v=>this.provider.resolveName(v)),M=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[M.toLowerCase(),JSON.stringify(E.E.getPayload(y.domain,R,y.value))])}catch(v){throw"string"==typeof v.message&&v.message.match(/user denied/i)&&u.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:M,messageData:{domain:y.domain,types:R,value:y.value}}),v}})}unlock(K){return h(this,void 0,void 0,function*(){const R=this.provider,o=yield this.getAddress();return R.send("personal_unlockAccount",[o.toLowerCase(),K,null])})}}class W extends V{sendTransaction(K){return this.sendUncheckedTransaction(K).then(R=>({hash:R,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:o=>this.provider.waitForTransaction(R,o)}))}}const G={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class H extends l.Zk{constructor(K,R){let o=R;null==o&&(o=new Promise((y,M)=>{setTimeout(()=>{this.detectNetwork().then(v=>{y(v)},v=>{M(v)})},0)})),super(o),K||(K=(0,d.getStatic)(this.constructor,"defaultUrl")()),(0,d.defineReadOnly)(this,"connection",Object.freeze("string"==typeof K?{url:K}:(0,d.shallowCopy)(K))),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 h(this,void 0,void 0,function*(){yield S(0);let K=null;try{K=yield this.send("eth_chainId",[])}catch{try{K=yield this.send("net_version",[])}catch{}}if(null!=K){const R=(0,d.getStatic)(this.constructor,"getNetwork");try{return R(z.O$.from(K).toNumber())}catch(o){return u.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{chainId:K,event:"invalidNetwork",serverError:o})}}return u.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(K){return new V(L,this,K)}getUncheckedSigner(K){return this.getSigner(K).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(K=>K.map(R=>this.formatter.address(R)))}send(K,R){const o={method:K,params:R,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,d.deepCopy)(o),provider:this});const y=["eth_chainId","eth_blockNumber"].indexOf(K)>=0;if(y&&this._cache[K])return this._cache[K];const M=(0,T.fetchJson)(this.connection,JSON.stringify(o),I).then(v=>(this.emit("debug",{action:"response",request:o,response:v,provider:this}),v),v=>{throw this.emit("debug",{action:"response",error:v,request:o,provider:this}),v});return y&&(this._cache[K]=M,setTimeout(()=>{this._cache[K]=null},0)),M}prepareRequest(K,R){switch(K){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[P(R.address),R.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[P(R.address),R.blockTag]];case"getCode":return["eth_getCode",[P(R.address),R.blockTag]];case"getStorageAt":return["eth_getStorageAt",[P(R.address),(0,O.hexZeroPad)(R.position,32),R.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[R.signedTransaction]];case"getBlock":return R.blockTag?["eth_getBlockByNumber",[R.blockTag,!!R.includeTransactions]]:R.blockHash?["eth_getBlockByHash",[R.blockHash,!!R.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[R.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[R.transactionHash]];case"call":return["eth_call",[(0,d.getStatic)(this.constructor,"hexlifyTransaction")(R.transaction,{from:!0}),R.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,d.getStatic)(this.constructor,"hexlifyTransaction")(R.transaction,{from:!0})]];case"getLogs":return R.filter&&null!=R.filter.address&&(R.filter.address=P(R.filter.address)),["eth_getLogs",[R.filter]]}return null}perform(K,R){return h(this,void 0,void 0,function*(){if("call"===K||"estimateGas"===K){const y=R.transaction;if(y&&null!=y.type&&z.O$.from(y.type).isZero()&&null==y.maxFeePerGas&&null==y.maxPriorityFeePerGas){const M=yield this.getFeeData();null==M.maxFeePerGas&&null==M.maxPriorityFeePerGas&&((R=(0,d.shallowCopy)(R)).transaction=(0,d.shallowCopy)(y),delete R.transaction.type)}}const o=this.prepareRequest(K,R);null==o&&u.throwError(K+" not implemented",g.Logger.errors.NOT_IMPLEMENTED,{operation:K});try{return yield this.send(o[0],o[1])}catch(y){return w(K,y,R)}})}_startEvent(K){"pending"===K.tag&&this._startPending(),super._startEvent(K)}_startPending(){if(null!=this._pendingFilter)return;const K=this,R=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=R,R.then(function(o){return function y(){K.send("eth_getFilterChanges",[o]).then(function(M){if(K._pendingFilter!=R)return null;let v=Promise.resolve();return M.forEach(function(k){K._emitted["t:"+k.toLowerCase()]="pending",v=v.then(function(){return K.getTransaction(k).then(function(D){return K.emit("pending",D),null})})}),v.then(function(){return S(1e3)})}).then(function(){if(K._pendingFilter==R)return setTimeout(function(){y()},0),null;K.send("eth_uninstallFilter",[o])}).catch(M=>{})}(),o}).catch(o=>{})}_stopEvent(K){"pending"===K.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(K)}static hexlifyTransaction(K,R){const o=(0,d.shallowCopy)(G);if(R)for(const M in R)R[M]&&(o[M]=!0);(0,d.checkProperties)(K,o);const y={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(M){if(null==K[M])return;const v=(0,O.hexValue)(z.O$.from(K[M]));"gasLimit"===M&&(M="gas"),y[M]=v}),["from","to","data"].forEach(function(M){null!=K[M]&&(y[M]=(0,O.hexlify)(K[M]))}),K.accessList&&(y.accessList=(0,f.accessListify)(K.accessList)),y}}},8859:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{randomBytes:()=>ie.O,shuffled:()=>z.y});var ie=Y(42563),z=Y(34820)},42563:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>T});var ie=Y(61488),z=Y(53898);const E=new z.Logger("random/5.7.0"),x=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();let f=x.crypto||x.msCrypto;function T(g){(g<=0||g>1024||g%1||g!=g)&&E.throwArgumentError("invalid length","length",g);const b=new Uint8Array(g);return f.getRandomValues(b),(0,ie.arrayify)(b)}(!f||!f.getRandomValues)&&(E.warn("WARNING: Missing strong random number source"),f={getRandomValues:function(g){return E.throwError("no secure random source avaialble",z.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},34820:(bt,be,Y)=>{"use strict";function ie(z){for(let O=(z=z.slice()).length-1;O>0;O--){const E=Math.floor(Math.random()*(O+1)),d=z[O];z[O]=z[E],z[E]=d}return z}Y.d(be,{y:()=>ie})},29276:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{decode:()=>l,encode:()=>T});var ie=Y(61488),z=Y(53898);const E=new z.Logger("rlp/5.7.0");function d(h){const u=[];for(;h;)u.unshift(255&h),h>>=8;return u}function x(h,u,m){let _=0;for(let w=0;wu+1+_&&E.throwError("child data too short",z.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+_,result:w}}function b(h,u){if(0===h.length&&E.throwError("data too short",z.Logger.errors.BUFFER_OVERRUN,{}),h[u]>=248){const m=h[u]-247;u+1+m>h.length&&E.throwError("data short segment too short",z.Logger.errors.BUFFER_OVERRUN,{});const _=x(h,u+1,m);return u+1+m+_>h.length&&E.throwError("data long segment too short",z.Logger.errors.BUFFER_OVERRUN,{}),g(h,u,u+1+m,m+_)}if(h[u]>=192){const m=h[u]-192;return u+1+m>h.length&&E.throwError("data array too short",z.Logger.errors.BUFFER_OVERRUN,{}),g(h,u,u+1,m)}if(h[u]>=184){const m=h[u]-183;u+1+m>h.length&&E.throwError("data array too short",z.Logger.errors.BUFFER_OVERRUN,{});const _=x(h,u+1,m);return u+1+m+_>h.length&&E.throwError("data array too short",z.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+m+_,result:(0,ie.hexlify)(h.slice(u+1+m,u+1+m+_))}}if(h[u]>=128){const m=h[u]-128;return u+1+m>h.length&&E.throwError("data too short",z.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+m,result:(0,ie.hexlify)(h.slice(u+1,u+1+m))}}return{consumed:1,result:(0,ie.hexlify)(h[u])}}function l(h){const u=(0,ie.arrayify)(h),m=b(u,0);return m.consumed!==u.length&&E.throwArgumentError("invalid rlp data","data",h),m.result}},67591:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{computeHmac:()=>ie.Gy,ripemd160:()=>ie.bP,sha256:()=>ie.JQ,sha512:()=>ie.o,SupportedAlgorithm:()=>z.p});var ie=Y(15614),z=Y(83389)},15614:(bt,be,Y)=>{"use strict";Y.d(be,{Gy:()=>l,bP:()=>T,JQ:()=>g,o:()=>b});var ie=Y(37909),z=Y.n(ie),O=Y(61488),E=Y(83389),d=Y(53898);const f=new d.Logger("sha2/5.7.0");function T(h){return"0x"+z().ripemd160().update((0,O.arrayify)(h)).digest("hex")}function g(h){return"0x"+z().sha256().update((0,O.arrayify)(h)).digest("hex")}function b(h){return"0x"+z().sha512().update((0,O.arrayify)(h)).digest("hex")}function l(h,u,m){return E.p[h]||f.throwError("unsupported algorithm "+h,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:h}),"0x"+z().hmac(z()[h],(0,O.arrayify)(u)).update((0,O.arrayify)(m)).digest("hex")}},83389:(bt,be,Y)=>{"use strict";Y.d(be,{p:()=>ie});var ie=(()=>{return(z=ie||(ie={})).sha256="sha256",z.sha512="sha512",ie;var z})()},99596:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{SigningKey:()=>ze,computePublicKey:()=>nt,recoverPublicKey:()=>Ve});var ie=Y(62630),z=Y.n(ie),O=Y(37909),E=Y.n(O);function f(tt,mt,ht){return tt(ht={path:mt,exports:{},require:function(wt,Pt){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},ht.exports),ht.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var h=u;function u(tt,mt){if(!tt)throw new Error(mt||"Assertion failed")}u.equal=function(mt,ht,wt){if(mt!=ht)throw new Error(wt||"Assertion failed: "+mt+" != "+ht)};var m=f(function(tt,mt){var ht=mt;function Pt(Ye){return 1===Ye.length?"0"+Ye:Ye}function st(Ye){for(var gt="",St=0;St>8,It=255&dn;Nt?St.push(Nt,It):St.push(It)}return St},ht.zero2=Pt,ht.toHex=st,ht.encode=function(gt,St){return"hex"===St?st(gt):gt}}),_=f(function(tt,mt){var ht=mt;ht.assert=h,ht.toArray=m.toArray,ht.zero2=m.zero2,ht.toHex=m.toHex,ht.encode=m.encode,ht.getNAF=function(St,Wt,dn){var Nt=new Array(Math.max(St.bitLength(),dn)+1);Nt.fill(0);for(var It=1<(It>>1)-1?(It>>1)-Wn:Wn):Yt=0,Nt[jt]=Yt,qt.iushrn(1)}return Nt},ht.getJSF=function(St,Wt){var dn=[[],[]];St=St.clone(),Wt=Wt.clone();for(var qt,Nt=0,It=0;St.cmpn(-Nt)>0||Wt.cmpn(-It)>0;){var Wn,fn,jt=St.andln(3)+Nt&3,Yt=Wt.andln(3)+It&3;3===jt&&(jt=-1),3===Yt&&(Yt=-1),Wn=0==(1&jt)?0:3!=(qt=St.andln(7)+Nt&7)&&5!==qt||2!==Yt?jt:-jt,dn[0].push(Wn),fn=0==(1&Yt)?0:3!=(qt=Wt.andln(7)+It&7)&&5!==qt||2!==jt?Yt:-Yt,dn[1].push(fn),2*Nt===Wn+1&&(Nt=1-Nt),2*It===fn+1&&(It=1-It),St.iushrn(1),Wt.iushrn(1)}return dn},ht.cachedProperty=function(St,Wt,dn){var Nt="_"+Wt;St.prototype[Wt]=function(){return void 0!==this[Nt]?this[Nt]:this[Nt]=dn.call(this)}},ht.parseBytes=function(St){return"string"==typeof St?ht.toArray(St,"hex"):St},ht.intFromLE=function(St){return new(z())(St,"hex","le")}}),w=_.getNAF,S=_.getJSF,I=_.assert;function P(tt,mt){this.type=tt,this.p=new(z())(mt.p,16),this.red=mt.prime?z().red(mt.prime):z().mont(this.p),this.zero=new(z())(0).toRed(this.red),this.one=new(z())(1).toRed(this.red),this.two=new(z())(2).toRed(this.red),this.n=mt.n&&new(z())(mt.n,16),this.g=mt.g&&this.pointFromJSON(mt.g,mt.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var ht=this.n&&this.p.div(this.n);!ht||ht.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var L=P;function V(tt,mt){this.curve=tt,this.type=mt,this.precomputed=null}P.prototype.point=function(){throw new Error("Not implemented")},P.prototype.validate=function(){throw new Error("Not implemented")},P.prototype._fixedNafMul=function(mt,ht){I(mt.precomputed);var wt=mt._getDoubles(),Pt=w(ht,1,this._bitLength),st=(1<=gt;Wt--)St=(St<<1)+Pt[Wt];Ye.push(St)}for(var dn=this.jpoint(null,null,null),Nt=this.jpoint(null,null,null),It=st;It>0;It--){for(gt=0;gt=0;St--){for(var Wt=0;St>=0&&0===Ye[St];St--)Wt++;if(St>=0&&Wt++,gt=gt.dblp(Wt),St<0)break;var dn=Ye[St];I(0!==dn),gt="affine"===mt.type?gt.mixedAdd(dn>0?st[dn-1>>1]:st[-dn-1>>1].neg()):gt.add(dn>0?st[dn-1>>1]:st[-dn-1>>1].neg())}return"affine"===mt.type?gt.toP():gt},P.prototype._wnafMulAdd=function(mt,ht,wt,Pt,st){var dn,Nt,It,Ye=this._wnafT1,gt=this._wnafT2,St=this._wnafT3,Wt=0;for(dn=0;dn=1;dn-=2){var jt=dn-1,Yt=dn;if(1===Ye[jt]&&1===Ye[Yt]){var Wn=[ht[jt],null,null,ht[Yt]];0===ht[jt].y.cmp(ht[Yt].y)?(Wn[1]=ht[jt].add(ht[Yt]),Wn[2]=ht[jt].toJ().mixedAdd(ht[Yt].neg())):0===ht[jt].y.cmp(ht[Yt].y.redNeg())?(Wn[1]=ht[jt].toJ().mixedAdd(ht[Yt]),Wn[2]=ht[jt].add(ht[Yt].neg())):(Wn[1]=ht[jt].toJ().mixedAdd(ht[Yt]),Wn[2]=ht[jt].toJ().mixedAdd(ht[Yt].neg()));var fn=[-3,-1,-5,-7,0,7,5,1,3],$n=S(wt[jt],wt[Yt]);for(Wt=Math.max($n[0].length,Wt),St[jt]=new Array(Wt),St[Yt]=new Array(Wt),Nt=0;Nt=0;dn--){for(var Gn=0;dn>=0;){var bn=!0;for(Nt=0;Nt=0&&Gn++,Bn=Bn.dblp(Gn),dn<0)break;for(Nt=0;Nt0?It=gt[Nt][Lr-1>>1]:Lr<0&&(It=gt[Nt][-Lr-1>>1].neg()),Bn="affine"===It.type?Bn.mixedAdd(It):Bn.add(It))}}for(dn=0;dn=Math.ceil((mt.bitLength()+1)/ht.step)},V.prototype._getDoubles=function(mt,ht){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var wt=[this],Pt=this,st=0;st=0&&(qt=Wt,jt=dn),Nt.negative&&(Nt=Nt.neg(),It=It.neg()),qt.negative&&(qt=qt.neg(),jt=jt.neg()),[{a:Nt,b:It},{a:qt,b:jt}]},H.prototype._endoSplit=function(mt){var ht=this.endo.basis,wt=ht[0],Pt=ht[1],st=Pt.b.mul(mt).divRound(this.n),Ye=wt.b.neg().mul(mt).divRound(this.n),gt=st.mul(wt.a),St=Ye.mul(Pt.a),Wt=st.mul(wt.b),dn=Ye.mul(Pt.b);return{k1:mt.sub(gt).sub(St),k2:Wt.add(dn).neg()}},H.prototype.pointFromX=function(mt,ht){(mt=new(z())(mt,16)).red||(mt=mt.toRed(this.red));var wt=mt.redSqr().redMul(mt).redIAdd(mt.redMul(this.a)).redIAdd(this.b),Pt=wt.redSqrt();if(0!==Pt.redSqr().redSub(wt).cmp(this.zero))throw new Error("invalid point");var st=Pt.fromRed().isOdd();return(ht&&!st||!ht&&st)&&(Pt=Pt.redNeg()),this.point(mt,Pt)},H.prototype.validate=function(mt){if(mt.inf)return!0;var ht=mt.x,wt=mt.y,Pt=this.a.redMul(ht),st=ht.redSqr().redMul(ht).redIAdd(Pt).redIAdd(this.b);return 0===wt.redSqr().redISub(st).cmpn(0)},H.prototype._endoWnafMulAdd=function(mt,ht,wt){for(var Pt=this._endoWnafT1,st=this._endoWnafT2,Ye=0;Ye":""},K.prototype.isInfinity=function(){return this.inf},K.prototype.add=function(mt){if(this.inf)return mt;if(mt.inf)return this;if(this.eq(mt))return this.dbl();if(this.neg().eq(mt))return this.curve.point(null,null);if(0===this.x.cmp(mt.x))return this.curve.point(null,null);var ht=this.y.redSub(mt.y);0!==ht.cmpn(0)&&(ht=ht.redMul(this.x.redSub(mt.x).redInvm()));var wt=ht.redSqr().redISub(this.x).redISub(mt.x),Pt=ht.redMul(this.x.redSub(wt)).redISub(this.y);return this.curve.point(wt,Pt)},K.prototype.dbl=function(){if(this.inf)return this;var mt=this.y.redAdd(this.y);if(0===mt.cmpn(0))return this.curve.point(null,null);var ht=this.curve.a,wt=this.x.redSqr(),Pt=mt.redInvm(),st=wt.redAdd(wt).redIAdd(wt).redIAdd(ht).redMul(Pt),Ye=st.redSqr().redISub(this.x.redAdd(this.x)),gt=st.redMul(this.x.redSub(Ye)).redISub(this.y);return this.curve.point(Ye,gt)},K.prototype.getX=function(){return this.x.fromRed()},K.prototype.getY=function(){return this.y.fromRed()},K.prototype.mul=function(mt){return mt=new(z())(mt,16),this.isInfinity()?this:this._hasDoubles(mt)?this.curve._fixedNafMul(this,mt):this.curve.endo?this.curve._endoWnafMulAdd([this],[mt]):this.curve._wnafMul(this,mt)},K.prototype.mulAdd=function(mt,ht,wt){var Pt=[this,ht],st=[mt,wt];return this.curve.endo?this.curve._endoWnafMulAdd(Pt,st):this.curve._wnafMulAdd(1,Pt,st,2)},K.prototype.jmulAdd=function(mt,ht,wt){var Pt=[this,ht],st=[mt,wt];return this.curve.endo?this.curve._endoWnafMulAdd(Pt,st,!0):this.curve._wnafMulAdd(1,Pt,st,2,!0)},K.prototype.eq=function(mt){return this===mt||this.inf===mt.inf&&(this.inf||0===this.x.cmp(mt.x)&&0===this.y.cmp(mt.y))},K.prototype.neg=function(mt){if(this.inf)return this;var ht=this.curve.point(this.x,this.y.redNeg());if(mt&&this.precomputed){var wt=this.precomputed,Pt=function(st){return st.neg()};ht.precomputed={naf:wt.naf&&{wnd:wt.naf.wnd,points:wt.naf.points.map(Pt)},doubles:wt.doubles&&{step:wt.doubles.step,points:wt.doubles.points.map(Pt)}}}return ht},K.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},W(R,L.BasePoint),H.prototype.jpoint=function(mt,ht,wt){return new R(this,mt,ht,wt)},R.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var mt=this.z.redInvm(),ht=mt.redSqr(),wt=this.x.redMul(ht),Pt=this.y.redMul(ht).redMul(mt);return this.curve.point(wt,Pt)},R.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},R.prototype.add=function(mt){if(this.isInfinity())return mt;if(mt.isInfinity())return this;var ht=mt.z.redSqr(),wt=this.z.redSqr(),Pt=this.x.redMul(ht),st=mt.x.redMul(wt),Ye=this.y.redMul(ht.redMul(mt.z)),gt=mt.y.redMul(wt.redMul(this.z)),St=Pt.redSub(st),Wt=Ye.redSub(gt);if(0===St.cmpn(0))return 0!==Wt.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var dn=St.redSqr(),Nt=dn.redMul(St),It=Pt.redMul(dn),qt=Wt.redSqr().redIAdd(Nt).redISub(It).redISub(It),jt=Wt.redMul(It.redISub(qt)).redISub(Ye.redMul(Nt)),Yt=this.z.redMul(mt.z).redMul(St);return this.curve.jpoint(qt,jt,Yt)},R.prototype.mixedAdd=function(mt){if(this.isInfinity())return mt.toJ();if(mt.isInfinity())return this;var ht=this.z.redSqr(),wt=this.x,Pt=mt.x.redMul(ht),st=this.y,Ye=mt.y.redMul(ht).redMul(this.z),gt=wt.redSub(Pt),St=st.redSub(Ye);if(0===gt.cmpn(0))return 0!==St.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var Wt=gt.redSqr(),dn=Wt.redMul(gt),Nt=wt.redMul(Wt),It=St.redSqr().redIAdd(dn).redISub(Nt).redISub(Nt),qt=St.redMul(Nt.redISub(It)).redISub(st.redMul(dn)),jt=this.z.redMul(gt);return this.curve.jpoint(It,qt,jt)},R.prototype.dblp=function(mt){if(0===mt)return this;if(this.isInfinity())return this;if(!mt)return this.dbl();var ht;if(this.curve.zeroA||this.curve.threeA){var wt=this;for(ht=0;ht=0)return!1;if(wt.redIAdd(st),0===this.x.cmp(wt))return!0}},R.prototype.inspect=function(){return this.isInfinity()?"":""},R.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var o=f(function(tt,mt){var ht=mt;ht.base=L,ht.short=j,ht.mont=null,ht.edwards=null}),y=f(function(tt,mt){var Ye,ht=mt,wt=_.assert;function Pt(gt){this.curve="short"===gt.type?new o.short(gt):"edwards"===gt.type?new o.edwards(gt):new o.mont(gt),this.g=this.curve.g,this.n=this.curve.n,this.hash=gt.hash,wt(this.g.validate(),"Invalid curve"),wt(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function st(gt,St){Object.defineProperty(ht,gt,{configurable:!0,enumerable:!0,get:function(){var Wt=new Pt(St);return Object.defineProperty(ht,gt,{configurable:!0,enumerable:!0,value:Wt}),Wt}})}ht.PresetCurve=Pt,st("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:E().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),st("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:E().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),st("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:E().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),st("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:E().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"]}),st("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:E().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"]}),st("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:E().sha256,gRed:!1,g:["9"]}),st("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:E().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{Ye=null.crash()}catch{Ye=void 0}st("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:E().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Ye]})});function M(tt){if(!(this instanceof M))return new M(tt);this.hash=tt.hash,this.predResist=!!tt.predResist,this.outLen=this.hash.outSize,this.minEntropy=tt.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var mt=m.toArray(tt.entropy,tt.entropyEnc||"hex"),ht=m.toArray(tt.nonce,tt.nonceEnc||"hex"),wt=m.toArray(tt.pers,tt.persEnc||"hex");h(mt.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(mt,ht,wt)}var v=M;M.prototype._init=function(mt,ht,wt){var Pt=mt.concat(ht).concat(wt);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var st=0;st=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(mt.concat(wt||[])),this._reseed=1},M.prototype.generate=function(mt,ht,wt,Pt){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof ht&&(Pt=wt,wt=ht,ht=null),wt&&(wt=m.toArray(wt,Pt||"hex"),this._update(wt));for(var st=[];st.length"};var C=_.assert;function a(tt,mt){if(tt instanceof a)return tt;this._importDER(tt,mt)||(C(tt.r&&tt.s,"Signature without r or s"),this.r=new(z())(tt.r,16),this.s=new(z())(tt.s,16),this.recoveryParam=void 0===tt.recoveryParam?null:tt.recoveryParam)}var B=a;function Q(){this.place=0}function ee(tt,mt){var ht=tt[mt.place++];if(!(128&ht))return ht;var wt=15&ht;if(0===wt||wt>4)return!1;for(var Pt=0,st=0,Ye=mt.place;st>>=0;return!(Pt<=127)&&(mt.place=Ye,Pt)}function ce(tt){for(var mt=0,ht=tt.length-1;!tt[mt]&&!(128&tt[mt+1])&&mt>>3);for(tt.push(128|ht);--ht;)tt.push(mt>>>(ht<<3)&255);tt.push(mt)}}a.prototype._importDER=function(mt,ht){mt=_.toArray(mt,ht);var wt=new Q;if(48!==mt[wt.place++])return!1;var Pt=ee(mt,wt);if(!1===Pt||Pt+wt.place!==mt.length||2!==mt[wt.place++])return!1;var st=ee(mt,wt);if(!1===st)return!1;var Ye=mt.slice(wt.place,st+wt.place);if(wt.place+=st,2!==mt[wt.place++])return!1;var gt=ee(mt,wt);if(!1===gt||mt.length!==gt+wt.place)return!1;var St=mt.slice(wt.place,gt+wt.place);if(0===Ye[0]){if(!(128&Ye[1]))return!1;Ye=Ye.slice(1)}if(0===St[0]){if(!(128&St[1]))return!1;St=St.slice(1)}return this.r=new(z())(Ye),this.s=new(z())(St),this.recoveryParam=null,!0},a.prototype.toDER=function(mt){var ht=this.r.toArray(),wt=this.s.toArray();for(128&ht[0]&&(ht=[0].concat(ht)),128&wt[0]&&(wt=[0].concat(wt)),ht=ce(ht),wt=ce(wt);!(wt[0]||128&wt[1]);)wt=wt.slice(1);var Pt=[2];ue(Pt,ht.length),(Pt=Pt.concat(ht)).push(2),ue(Pt,wt.length);var st=Pt.concat(wt),Ye=[48];return ue(Ye,st.length),Ye=Ye.concat(st),_.encode(Ye,mt)};var we=function(){throw new Error("unsupported")},ae=_.assert;function Te(tt){if(!(this instanceof Te))return new Te(tt);"string"==typeof tt&&(ae(Object.prototype.hasOwnProperty.call(y,tt),"Unknown curve "+tt),tt=y[tt]),tt instanceof y.PresetCurve&&(tt={curve:tt}),this.curve=tt.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=tt.curve.g,this.g.precompute(tt.curve.n.bitLength()+1),this.hash=tt.hash||tt.curve.hash}var le=Te;Te.prototype.keyPair=function(mt){return new N(this,mt)},Te.prototype.keyFromPrivate=function(mt,ht){return N.fromPrivate(this,mt,ht)},Te.prototype.keyFromPublic=function(mt,ht){return N.fromPublic(this,mt,ht)},Te.prototype.genKeyPair=function(mt){mt||(mt={});for(var ht=new v({hash:this.hash,pers:mt.pers,persEnc:mt.persEnc||"utf8",entropy:mt.entropy||we(),entropyEnc:mt.entropy&&mt.entropyEnc||"utf8",nonce:this.n.toArray()}),wt=this.n.byteLength(),Pt=this.n.sub(new(z())(2));;){var st=new(z())(ht.generate(wt));if(!(st.cmp(Pt)>0))return st.iaddn(1),this.keyFromPrivate(st)}},Te.prototype._truncateToN=function(mt,ht){var wt=8*mt.byteLength()-this.n.bitLength();return wt>0&&(mt=mt.ushrn(wt)),!ht&&mt.cmp(this.n)>=0?mt.sub(this.n):mt},Te.prototype.sign=function(mt,ht,wt,Pt){"object"==typeof wt&&(Pt=wt,wt=null),Pt||(Pt={}),ht=this.keyFromPrivate(ht,wt),mt=this._truncateToN(new(z())(mt,16));for(var st=this.n.byteLength(),Ye=ht.getPrivate().toArray("be",st),gt=mt.toArray("be",st),St=new v({hash:this.hash,entropy:Ye,nonce:gt,pers:Pt.pers,persEnc:Pt.persEnc||"utf8"}),Wt=this.n.sub(new(z())(1)),dn=0;;dn++){var Nt=Pt.k?Pt.k(dn):new(z())(St.generate(this.n.byteLength()));if(!((Nt=this._truncateToN(Nt,!0)).cmpn(1)<=0||Nt.cmp(Wt)>=0)){var It=this.g.mul(Nt);if(!It.isInfinity()){var qt=It.getX(),jt=qt.umod(this.n);if(0!==jt.cmpn(0)){var Yt=Nt.invm(this.n).mul(jt.mul(ht.getPrivate()).iadd(mt));if(0!==(Yt=Yt.umod(this.n)).cmpn(0)){var Wn=(It.getY().isOdd()?1:0)|(0!==qt.cmp(jt)?2:0);return Pt.canonical&&Yt.cmp(this.nh)>0&&(Yt=this.n.sub(Yt),Wn^=1),new B({r:jt,s:Yt,recoveryParam:Wn})}}}}}},Te.prototype.verify=function(mt,ht,wt,Pt){mt=this._truncateToN(new(z())(mt,16)),wt=this.keyFromPublic(wt,Pt);var st=(ht=new B(ht,"hex")).r,Ye=ht.s;if(st.cmpn(1)<0||st.cmp(this.n)>=0||Ye.cmpn(1)<0||Ye.cmp(this.n)>=0)return!1;var dn,gt=Ye.invm(this.n),St=gt.mul(mt).umod(this.n),Wt=gt.mul(st).umod(this.n);return this.curve._maxwellTrick?!(dn=this.g.jmulAdd(St,wt.getPublic(),Wt)).isInfinity()&&dn.eqXToP(st):!(dn=this.g.mulAdd(St,wt.getPublic(),Wt)).isInfinity()&&0===dn.getX().umod(this.n).cmp(st)},Te.prototype.recoverPubKey=function(tt,mt,ht,wt){ae((3&ht)===ht,"The recovery param is more than two bits"),mt=new B(mt,wt);var Pt=this.n,st=new(z())(tt),Ye=mt.r,gt=mt.s,St=1&ht,Wt=ht>>1;if(Ye.cmp(this.curve.p.umod(this.curve.n))>=0&&Wt)throw new Error("Unable to find sencond key candinate");Ye=this.curve.pointFromX(Wt?Ye.add(this.curve.n):Ye,St);var dn=mt.r.invm(Pt),Nt=Pt.sub(st).mul(dn).umod(Pt),It=gt.mul(dn).umod(Pt);return this.g.mulAdd(Nt,Ye,It)},Te.prototype.getKeyRecoveryParam=function(tt,mt,ht,wt){if(null!==(mt=new B(mt,wt)).recoveryParam)return mt.recoveryParam;for(var Pt=0;Pt<4;Pt++){var st;try{st=this.recoverPubKey(tt,mt,Pt)}catch{continue}if(st.eq(ht))return Pt}throw new Error("Unable to find valid recovery factor")};var ne=f(function(tt,mt){var ht=mt;ht.version="6.5.4",ht.utils=_,ht.rand=function(){throw new Error("unsupported")},ht.curve=o,ht.curves=y,ht.ec=le,ht.eddsa=null}).ec,pe=Y(61488),_e=Y(92275);const ke=new(Y(53898).Logger)("signing-key/5.7.0");let me=null;function Ee(){return me||(me=new ne("secp256k1")),me}class ze{constructor(mt){(0,_e.defineReadOnly)(this,"curve","secp256k1"),(0,_e.defineReadOnly)(this,"privateKey",(0,pe.hexlify)(mt)),32!==(0,pe.hexDataLength)(this.privateKey)&&ke.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const ht=Ee().keyFromPrivate((0,pe.arrayify)(this.privateKey));(0,_e.defineReadOnly)(this,"publicKey","0x"+ht.getPublic(!1,"hex")),(0,_e.defineReadOnly)(this,"compressedPublicKey","0x"+ht.getPublic(!0,"hex")),(0,_e.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(mt){const ht=Ee().keyFromPublic((0,pe.arrayify)(this.publicKey)),wt=Ee().keyFromPublic((0,pe.arrayify)(mt));return"0x"+ht.pub.add(wt.pub).encodeCompressed("hex")}signDigest(mt){const ht=Ee().keyFromPrivate((0,pe.arrayify)(this.privateKey)),wt=(0,pe.arrayify)(mt);32!==wt.length&&ke.throwArgumentError("bad digest length","digest",mt);const Pt=ht.sign(wt,{canonical:!0});return(0,pe.splitSignature)({recoveryParam:Pt.recoveryParam,r:(0,pe.hexZeroPad)("0x"+Pt.r.toString(16),32),s:(0,pe.hexZeroPad)("0x"+Pt.s.toString(16),32)})}computeSharedSecret(mt){const ht=Ee().keyFromPrivate((0,pe.arrayify)(this.privateKey)),wt=Ee().keyFromPublic((0,pe.arrayify)(nt(mt)));return(0,pe.hexZeroPad)("0x"+ht.derive(wt.getPublic()).toString(16),32)}static isSigningKey(mt){return!(!mt||!mt._isSigningKey)}}function Ve(tt,mt){const ht=(0,pe.splitSignature)(mt),wt={r:(0,pe.arrayify)(ht.r),s:(0,pe.arrayify)(ht.s)};return"0x"+Ee().recoverPubKey((0,pe.arrayify)(tt),wt,ht.recoveryParam).encode("hex",!1)}function nt(tt,mt){const ht=(0,pe.arrayify)(tt);if(32===ht.length){const wt=new ze(ht);return mt?"0x"+Ee().keyFromPrivate(ht).getPublic(!0,"hex"):wt.publicKey}return 33===ht.length?mt?(0,pe.hexlify)(ht):"0x"+Ee().keyFromPublic(ht).getPublic(!1,"hex"):65===ht.length?mt?"0x"+Ee().keyFromPublic(ht).getPublic(!0,"hex"):(0,pe.hexlify)(ht):ke.throwArgumentError("invalid public or private key","key","[REDACTED]")}},37979:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{keccak256:()=>_,pack:()=>m,sha256:()=>w});var ie=Y(2024),z=Y(61488),O=Y(28518),E=Y(15614),d=Y(8822),x=Y(53898);const T=new RegExp("^bytes([0-9]+)$"),g=new RegExp("^(u?int)([0-9]*)$"),b=new RegExp("^(.*)\\[([0-9]*)\\]$"),h=new x.Logger("solidity/5.7.0");function u(S,I,P){switch(S){case"address":return P?(0,z.zeroPad)(I,32):(0,z.arrayify)(I);case"string":return(0,d.Y0)(I);case"bytes":return(0,z.arrayify)(I);case"bool":return I=I?"0x01":"0x00",P?(0,z.zeroPad)(I,32):(0,z.arrayify)(I)}let L=S.match(g);if(L){let V=parseInt(L[2]||"256");return(L[2]&&String(V)!==L[2]||V%8!=0||0===V||V>256)&&h.throwArgumentError("invalid number type","type",S),P&&(V=256),I=ie.O$.from(I).toTwos(V),(0,z.zeroPad)(I,V/8)}if(L=S.match(T),L){const V=parseInt(L[1]);return(String(V)!==L[1]||0===V||V>32)&&h.throwArgumentError("invalid bytes type","type",S),(0,z.arrayify)(I).byteLength!==V&&h.throwArgumentError(`invalid value for ${S}`,"value",I),P?(0,z.arrayify)((I+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):I}if(L=S.match(b),L&&Array.isArray(I)){const V=L[1];parseInt(L[2]||String(I.length))!=I.length&&h.throwArgumentError(`invalid array length for ${S}`,"value",I);const G=[];return I.forEach(function(H){G.push(u(V,H,!0))}),(0,z.concat)(G)}return h.throwArgumentError("invalid type","type",S)}function m(S,I){S.length!=I.length&&h.throwArgumentError("wrong number of values; expected ${ types.length }","values",I);const P=[];return S.forEach(function(L,V){P.push(u(L,I[V]))}),(0,z.hexlify)((0,z.concat)(P))}function _(S,I){return(0,O.keccak256)(m(S,I))}function w(S,I){return(0,E.JQ)(m(S,I))}},44688:(bt,be,Y)=>{"use strict";Y.d(be,{s:()=>E,F:()=>d});var ie=Y(45052),z=Y(61488),O=Y(8822);function E(x){const f=(0,O.Y0)(x);if(f.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,z.hexlify)((0,z.concat)([f,ie.R]).slice(0,32))}function d(x){const f=(0,z.arrayify)(x);if(32!==f.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==f[31])throw new Error("invalid bytes32 string - no null terminator");let T=31;for(;0===f[T-1];)T--;return(0,O.ZN)(f.slice(0,T))}},17188:(bt,be,Y)=>{"use strict";Y.d(be,{Ll:()=>S});var ie=Y(8822);function O(I,P){P||(P=function(W){return[parseInt(W,16)]});let L=0,V={};return I.split(",").forEach(W=>{let G=W.split(":");L+=parseInt(G[0],16),V[L]=P(G[1])}),V}function E(I){let P=0;return I.split(",").map(L=>{let V=L.split("-");1===V.length?V[1]="0":""===V[1]&&(V[1]="1");let W=P+parseInt(V[0],16);return P=parseInt(V[1],16),{l:W,h:P}})}function d(I,P){let L=0;for(let V=0;V=L&&I<=L+W.h&&(I-L)%(W.d||1)==0){if(W.e&&-1!==W.e.indexOf(I-L))continue;return W}}return null}const x=E("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),f="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(I=>parseInt(I,16)),T=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],g=O("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),b=O("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l=O("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function(I){if(I.length%4!=0)throw new Error("bad data");let P=[];for(let L=0;L(L.forEach(V=>{P.push(V)}),P),[])}(P.map(V=>{if(f.indexOf(V)>=0)return[];if(V>=65024&&V<=65039)return[];let W=function(I){let P=d(I,T);if(P)return[I+P.s];let L=g[I];if(L)return L;let V=b[I];return V?[I+V[0]]:l[I]||null}(V);return W||[V]})),P=(0,ie.XL)((0,ie.uu)(P),ie.Uj.NFKC),P.forEach(V=>{if(function(I){return!!d(I,h)}(V))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),P.forEach(V=>{if(function(I){return!!d(I,x)}(V))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let L=(0,ie.uu)(P);if("-"===L.substring(0,1)||"--"===L.substring(2,4)||"-"===L.substring(L.length-1))throw new Error("invalid hyphen");return L}},46956:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{_toEscapedUtf8String:()=>O.U$,toUtf8Bytes:()=>O.Y0,toUtf8CodePoints:()=>O.XL,toUtf8String:()=>O.ZN,Utf8ErrorFuncs:()=>O.te,Utf8ErrorReason:()=>O.Uw,UnicodeNormalizationForm:()=>O.Uj,formatBytes32String:()=>ie.s,parseBytes32String:()=>ie.F,nameprep:()=>z.Ll});var ie=Y(44688),z=Y(17188),O=Y(8822)},8822:(bt,be,Y)=>{"use strict";Y.d(be,{Uj:()=>d,te:()=>b,Uw:()=>x,U$:()=>m,uu:()=>_,Y0:()=>h,XL:()=>S,ZN:()=>w});var ie=Y(61488);const E=new(Y(53898).Logger)("strings/5.7.0");var d=(()=>{return(I=d||(d={})).current="",I.NFC="NFC",I.NFD="NFD",I.NFKC="NFKC",I.NFKD="NFKD",d;var I})(),x=(()=>{return(I=x||(x={})).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",x;var I})();function T(I,P,L,V,W){if(I===x.BAD_PREFIX||I===x.UNEXPECTED_CONTINUE){let G=0;for(let H=P+1;H>6==2;H++)G++;return G}return I===x.OVERRUN?L.length-P-1:0}const b=Object.freeze({error:function(I,P,L,V,W){return E.throwArgumentError(`invalid codepoint at offset ${P}; ${I}`,"bytes",L)},ignore:T,replace:function(I,P,L,V,W){return I===x.OVERLONG?(V.push(W),0):(V.push(65533),T(I,P,L))}});function l(I,P){null==P&&(P=b.error),I=(0,ie.arrayify)(I);const L=[];let V=0;for(;V>7==0){L.push(W);continue}let G=null,H=null;if(192==(224&W))G=1,H=127;else if(224==(240&W))G=2,H=2047;else{if(240!=(248&W)){V+=P(128==(192&W)?x.UNEXPECTED_CONTINUE:x.BAD_PREFIX,V-1,I,L);continue}G=3,H=65535}if(V-1+G>=I.length){V+=P(x.OVERRUN,V-1,I,L);continue}let j=W&(1<<8-G-1)-1;for(let K=0;K1114111){V+=P(x.OUT_OF_RANGE,V-1-G,I,L,j);continue}if(j>=55296&&j<=57343){V+=P(x.UTF16_SURROGATE,V-1-G,I,L,j);continue}if(j<=H){V+=P(x.OVERLONG,V-1-G,I,L,j);continue}L.push(j)}}return L}function h(I,P=d.current){P!=d.current&&(E.checkNormalize(),I=I.normalize(P));let L=[];for(let V=0;V>6|192),L.push(63&W|128);else if(55296==(64512&W)){V++;const G=I.charCodeAt(V);if(V>=I.length||56320!=(64512&G))throw new Error("invalid utf-8 string");const H=65536+((1023&W)<<10)+(1023&G);L.push(H>>18|240),L.push(H>>12&63|128),L.push(H>>6&63|128),L.push(63&H|128)}else L.push(W>>12|224),L.push(W>>6&63|128),L.push(63&W|128)}return(0,ie.arrayify)(L)}function u(I){const P="0000"+I.toString(16);return"\\u"+P.substring(P.length-4)}function m(I,P){return'"'+l(I,P).map(L=>{if(L<256){switch(L){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(L>=32&&L<127)return String.fromCharCode(L)}return L<=65535?u(L):u(55296+((L-=65536)>>10&1023))+u(56320+(1023&L))}).join("")+'"'}function _(I){return I.map(P=>P<=65535?String.fromCharCode(P):(P-=65536,String.fromCharCode(55296+(P>>10&1023),56320+(1023&P)))).join("")}function w(I,P){return _(l(I,P))}function S(I,P=d.current){return l(h(I,P))}},32701:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{TransactionTypes:()=>h,accessListify:()=>V,computeAddress:()=>S,parse:()=>v,recoverAddress:()=>I,serialize:()=>K});var ie=Y(2885),z=Y(2024),O=Y(61488),E=Y(16659),d=Y(28518),x=Y(92275),f=Y(29276),T=Y(99596),g=Y(53898);const l=new g.Logger("transactions/5.7.0");var h=(()=>{return(k=h||(h={}))[k.legacy=0]="legacy",k[k.eip2930=1]="eip2930",k[k.eip1559=2]="eip1559",h;var k})();function u(k){return"0x"===k?null:(0,ie.getAddress)(k)}function m(k){return"0x"===k?E._Y:z.O$.from(k)}const _=[{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"}],w={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function S(k){const D=(0,T.computePublicKey)(k);return(0,ie.getAddress)((0,O.hexDataSlice)((0,d.keccak256)((0,O.hexDataSlice)(D,1)),12))}function I(k,D){return S((0,T.recoverPublicKey)((0,O.arrayify)(k),D))}function P(k,D){const N=(0,O.stripZeros)(z.O$.from(k).toHexString());return N.length>32&&l.throwArgumentError("invalid length for "+D,"transaction:"+D,k),N}function L(k,D){return{address:(0,ie.getAddress)(k),storageKeys:(D||[]).map((N,C)=>(32!==(0,O.hexDataLength)(N)&&l.throwArgumentError("invalid access list storageKey",`accessList[${k}:${C}]`,N),N.toLowerCase()))}}function V(k){if(Array.isArray(k))return k.map((N,C)=>Array.isArray(N)?(N.length>2&&l.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${C}]`,N),L(N[0],N[1])):L(N.address,N.storageKeys));const D=Object.keys(k).map(N=>{const C=k[N].reduce((a,B)=>(a[B]=!0,a),{});return L(N,Object.keys(C).sort())});return D.sort((N,C)=>N.address.localeCompare(C.address)),D}function W(k){return V(k).map(D=>[D.address,D.storageKeys])}function G(k,D){if(null!=k.gasPrice){const C=z.O$.from(k.gasPrice),a=z.O$.from(k.maxFeePerGas||0);C.eq(a)||l.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:C,maxFeePerGas:a})}const N=[P(k.chainId||0,"chainId"),P(k.nonce||0,"nonce"),P(k.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(k.maxFeePerGas||0,"maxFeePerGas"),P(k.gasLimit||0,"gasLimit"),null!=k.to?(0,ie.getAddress)(k.to):"0x",P(k.value||0,"value"),k.data||"0x",W(k.accessList||[])];if(D){const C=(0,O.splitSignature)(D);N.push(P(C.recoveryParam,"recoveryParam")),N.push((0,O.stripZeros)(C.r)),N.push((0,O.stripZeros)(C.s))}return(0,O.hexConcat)(["0x02",f.encode(N)])}function H(k,D){const N=[P(k.chainId||0,"chainId"),P(k.nonce||0,"nonce"),P(k.gasPrice||0,"gasPrice"),P(k.gasLimit||0,"gasLimit"),null!=k.to?(0,ie.getAddress)(k.to):"0x",P(k.value||0,"value"),k.data||"0x",W(k.accessList||[])];if(D){const C=(0,O.splitSignature)(D);N.push(P(C.recoveryParam,"recoveryParam")),N.push((0,O.stripZeros)(C.r)),N.push((0,O.stripZeros)(C.s))}return(0,O.hexConcat)(["0x01",f.encode(N)])}function K(k,D){if(null==k.type||0===k.type)return null!=k.accessList&&l.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",k),function(k,D){(0,x.checkProperties)(k,w);const N=[];_.forEach(function(Q){let ee=k[Q.name]||[];const ce={};Q.numeric&&(ce.hexPad="left"),ee=(0,O.arrayify)((0,O.hexlify)(ee,ce)),Q.length&&ee.length!==Q.length&&ee.length>0&&l.throwArgumentError("invalid length for "+Q.name,"transaction:"+Q.name,ee),Q.maxLength&&(ee=(0,O.stripZeros)(ee),ee.length>Q.maxLength&&l.throwArgumentError("invalid length for "+Q.name,"transaction:"+Q.name,ee)),N.push((0,O.hexlify)(ee))});let C=0;if(null!=k.chainId?(C=k.chainId,"number"!=typeof C&&l.throwArgumentError("invalid transaction.chainId","transaction",k)):D&&!(0,O.isBytesLike)(D)&&D.v>28&&(C=Math.floor((D.v-35)/2)),0!==C&&(N.push((0,O.hexlify)(C)),N.push("0x"),N.push("0x")),!D)return f.encode(N);const a=(0,O.splitSignature)(D);let B=27+a.recoveryParam;return 0!==C?(N.pop(),N.pop(),N.pop(),B+=2*C+8,a.v>28&&a.v!==B&&l.throwArgumentError("transaction.chainId/signature.v mismatch","signature",D)):a.v!==B&&l.throwArgumentError("transaction.chainId/signature.v mismatch","signature",D),N.push((0,O.hexlify)(B)),N.push((0,O.stripZeros)((0,O.arrayify)(a.r))),N.push((0,O.stripZeros)((0,O.arrayify)(a.s))),f.encode(N)}(k,D);switch(k.type){case 1:return H(k,D);case 2:return G(k,D)}return l.throwError(`unsupported transaction type: ${k.type}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:k.type})}function R(k,D,N){try{const C=m(D[0]).toNumber();if(0!==C&&1!==C)throw new Error("bad recid");k.v=C}catch{l.throwArgumentError("invalid v for transaction type: 1","v",D[0])}k.r=(0,O.hexZeroPad)(D[1],32),k.s=(0,O.hexZeroPad)(D[2],32);try{const C=(0,d.keccak256)(N(k));k.from=I(C,{r:k.r,s:k.s,recoveryParam:k.v})}catch{}}function v(k){const D=(0,O.arrayify)(k);if(D[0]>127)return function(k){const D=f.decode(k);9!==D.length&&6!==D.length&&l.throwArgumentError("invalid raw transaction","rawTransaction",k);const N={nonce:m(D[0]).toNumber(),gasPrice:m(D[1]),gasLimit:m(D[2]),to:u(D[3]),value:m(D[4]),data:D[5],chainId:0};if(6===D.length)return N;try{N.v=z.O$.from(D[6]).toNumber()}catch{return N}if(N.r=(0,O.hexZeroPad)(D[7],32),N.s=(0,O.hexZeroPad)(D[8],32),z.O$.from(N.r).isZero()&&z.O$.from(N.s).isZero())N.chainId=N.v,N.v=0;else{N.chainId=Math.floor((N.v-35)/2),N.chainId<0&&(N.chainId=0);let C=N.v-27;const a=D.slice(0,6);0!==N.chainId&&(a.push((0,O.hexlify)(N.chainId)),a.push("0x"),a.push("0x"),C-=2*N.chainId+8);const B=(0,d.keccak256)(f.encode(a));try{N.from=I(B,{r:(0,O.hexlify)(N.r),s:(0,O.hexlify)(N.s),recoveryParam:C})}catch{}N.hash=(0,d.keccak256)(k)}return N.type=null,N}(D);switch(D[0]){case 1:return function(k){const D=f.decode(k.slice(1));8!==D.length&&11!==D.length&&l.throwArgumentError("invalid component count for transaction type: 1","payload",(0,O.hexlify)(k));const N={type:1,chainId:m(D[0]).toNumber(),nonce:m(D[1]).toNumber(),gasPrice:m(D[2]),gasLimit:m(D[3]),to:u(D[4]),value:m(D[5]),data:D[6],accessList:V(D[7])};return 8===D.length||(N.hash=(0,d.keccak256)(k),R(N,D.slice(8),H)),N}(D);case 2:return function(k){const D=f.decode(k.slice(1));9!==D.length&&12!==D.length&&l.throwArgumentError("invalid component count for transaction type: 2","payload",(0,O.hexlify)(k));const N=m(D[2]),C=m(D[3]),a={type:2,chainId:m(D[0]).toNumber(),nonce:m(D[1]).toNumber(),maxPriorityFeePerGas:N,maxFeePerGas:C,gasPrice:null,gasLimit:m(D[4]),to:u(D[5]),value:m(D[6]),data:D[7],accessList:V(D[8])};return 9===D.length||(a.hash=(0,d.keccak256)(k),R(a,D.slice(9),G)),a}(D)}return l.throwError(`unsupported transaction type: ${D[0]}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:D[0]})}},2519:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{commify:()=>x,formatEther:()=>g,formatUnits:()=>f,parseEther:()=>b,parseUnits:()=>T});var ie=Y(71677);const E=new(Y(53898).Logger)("units/5.7.0"),d=["wei","kwei","mwei","gwei","szabo","finney","ether"];function x(l){const h=String(l).split(".");(h.length>2||!h[0].match(/^-?[0-9]*$/)||h[1]&&!h[1].match(/^[0-9]*$/)||"."===l||"-."===l)&&E.throwArgumentError("invalid value","value",l);let u=h[0],m="";for("-"===u.substring(0,1)&&(m="-",u=u.substring(1));"0"===u.substring(0,1);)u=u.substring(1);""===u&&(u="0");let _="";for(2===h.length&&(_="."+(h[1]||"0"));_.length>2&&"0"===_[_.length-1];)_=_.substring(0,_.length-1);const w=[];for(;u.length;){if(u.length<=3){w.unshift(u);break}{const S=u.length-3;w.unshift(u.substring(S)),u=u.substring(0,S)}}return m+w.join(",")+_}function f(l,h){if("string"==typeof h){const u=d.indexOf(h);-1!==u&&(h=3*u)}return(0,ie.S5)(l,h??18)}function T(l,h){if("string"!=typeof l&&E.throwArgumentError("value must be a string","value",l),"string"==typeof h){const u=d.indexOf(h);-1!==u&&(h=3*u)}return(0,ie.Ox)(l,h??18)}function g(l){return f(l,18)}function b(l){return T(l,18)}},6846:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{Wallet:()=>V,verifyMessage:()=>W,verifyTypedData:()=>G});var ie=Y(2885),z=Y(11527),O=Y(11221),E=Y(61488),d=Y(78429),x=Y(72072),f=Y(49593),T=Y(28518),g=Y(92275),b=Y(42563),l=Y(99596),h=Y(53746),u=Y(66484),m=Y(32701),_=Y(53898),S=function(H,j,K,R){return new(K||(K=Promise))(function(y,M){function v(N){try{D(R.next(N))}catch(C){M(C)}}function k(N){try{D(R.throw(N))}catch(C){M(C)}}function D(N){N.done?y(N.value):function(y){return y instanceof K?y:new K(function(M){M(y)})}(N.value).then(v,k)}D((R=R.apply(H,j||[])).next())})};const I=new _.Logger("wallet/5.7.0");class V extends O.Signer{constructor(j,K){if(super(),null!=(H=j)&&(0,E.isHexString)(H.privateKey,32)&&null!=H.address){const R=new l.SigningKey(j.privateKey);if((0,g.defineReadOnly)(this,"_signingKey",()=>R),(0,g.defineReadOnly)(this,"address",(0,m.computeAddress)(this.publicKey)),this.address!==(0,ie.getAddress)(j.address)&&I.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(H){const j=H.mnemonic;return j&&j.phrase}(j)){const o=j.mnemonic;(0,g.defineReadOnly)(this,"_mnemonic",()=>({phrase:o.phrase,path:o.path||f.defaultPath,locale:o.locale||"en"}));const y=this.mnemonic,M=f.HDNode.fromMnemonic(y.phrase,null,y.locale).derivePath(y.path);(0,m.computeAddress)(M.privateKey)!==this.address&&I.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,g.defineReadOnly)(this,"_mnemonic",()=>null)}else{if(l.SigningKey.isSigningKey(j))"secp256k1"!==j.curve&&I.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,g.defineReadOnly)(this,"_signingKey",()=>j);else{"string"==typeof j&&j.match(/^[0-9a-f]*$/i)&&64===j.length&&(j="0x"+j);const R=new l.SigningKey(j);(0,g.defineReadOnly)(this,"_signingKey",()=>R)}(0,g.defineReadOnly)(this,"_mnemonic",()=>null),(0,g.defineReadOnly)(this,"address",(0,m.computeAddress)(this.publicKey))}var H;K&&!z.zt.isProvider(K)&&I.throwArgumentError("invalid provider","provider",K),(0,g.defineReadOnly)(this,"provider",K||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(j){return new V(this,j)}signTransaction(j){return(0,g.resolveProperties)(j).then(K=>{null!=K.from&&((0,ie.getAddress)(K.from)!==this.address&&I.throwArgumentError("transaction from address mismatch","transaction.from",j.from),delete K.from);const R=this._signingKey().signDigest((0,T.keccak256)((0,m.serialize)(K)));return(0,m.serialize)(K,R)})}signMessage(j){return S(this,void 0,void 0,function*(){return(0,E.joinSignature)(this._signingKey().signDigest((0,d.r)(j)))})}_signTypedData(j,K,R){return S(this,void 0,void 0,function*(){const o=yield x.E.resolveNames(j,K,R,y=>(null==this.provider&&I.throwError("cannot resolve ENS names without a provider",_.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:y}),this.provider.resolveName(y)));return(0,E.joinSignature)(this._signingKey().signDigest(x.E.hash(o.domain,K,o.value)))})}encrypt(j,K,R){if("function"==typeof K&&!R&&(R=K,K={}),R&&"function"!=typeof R)throw new Error("invalid callback");return K||(K={}),(0,u.HI)(this,j,K,R)}static createRandom(j){let K=(0,b.O)(16);j||(j={}),j.extraEntropy&&(K=(0,E.arrayify)((0,E.hexDataSlice)((0,T.keccak256)((0,E.concat)([K,j.extraEntropy])),0,16)));const R=(0,f.entropyToMnemonic)(K,j.locale);return V.fromMnemonic(R,j.path,j.locale)}static fromEncryptedJson(j,K,R){return(0,h.decryptJsonWallet)(j,K,R).then(o=>new V(o))}static fromEncryptedJsonSync(j,K){return new V((0,h.decryptJsonWalletSync)(j,K))}static fromMnemonic(j,K,R){return K||(K=f.defaultPath),new V(f.HDNode.fromMnemonic(j,null,R).derivePath(K))}}function W(H,j){return(0,m.recoverAddress)((0,d.r)(H),j)}function G(H,j,K,R){return(0,m.recoverAddress)(x.E.hash(H,j,K),R)}},51838:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{_fetchData:()=>_,fetchJson:()=>w,poll:()=>S});var ie=Y(61488);function z(I){I=atob(I);const P=[];for(let L=0;L{G[j.toLowerCase()]=H}):V.headers.keys().forEach(H=>{G[H.toLowerCase()]=V.headers.get(H)}),{headers:G,statusCode:V.status,statusMessage:V.statusText,body:(0,ie.arrayify)(new Uint8Array(W))}})}const l=new x.Logger("web/5.7.1");function h(I){return new Promise(P=>{setTimeout(P,I)})}function u(I,P){if(null==I)return null;if("string"==typeof I)return I;if((0,ie.isBytesLike)(I)){if(P&&("text"===P.split("/")[0]||"application/json"===P.split(";")[0].trim()))try{return(0,d.ZN)(I)}catch{}return(0,ie.hexlify)(I)}return I}function m(I){return(0,d.Y0)(I.replace(/%([0-9a-f][0-9a-f])/gi,(P,L)=>String.fromCharCode(parseInt(L,16))))}function _(I,P,L){const V="object"==typeof I&&null!=I.throttleLimit?I.throttleLimit:12;l.assertArgument(V>0&&V%1==0,"invalid connection throttle limit","connection.throttleLimit",V);const W="object"==typeof I?I.throttleCallback:null,G="object"==typeof I&&"number"==typeof I.throttleSlotInterval?I.throttleSlotInterval:100;l.assertArgument(G>0&&G%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",G);const H="object"==typeof I&&!!I.errorPassThrough,j={};let K=null;const R={method:"GET"};let o=!1,y=12e4;if("string"==typeof I)K=I;else if("object"==typeof I){if((null==I||null==I.url)&&l.throwArgumentError("missing URL","connection.url",I),K=I.url,"number"==typeof I.timeout&&I.timeout>0&&(y=I.timeout),I.headers)for(const C in I.headers)j[C.toLowerCase()]={key:C,value:String(I.headers[C])},["if-none-match","if-modified-since"].indexOf(C.toLowerCase())>=0&&(o=!0);R.allowGzip=!!I.allowGzip,null!=I.user&&null!=I.password&&("https:"!==K.substring(0,6)&&!0!==I.allowInsecureAuthentication&&l.throwError("basic authentication requires a secure https url",x.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:K,user:I.user,password:"[REDACTED]"}),j.authorization={key:"Authorization",value:"Basic "+O((0,d.Y0)(I.user+":"+I.password))}),null!=I.skipFetchSetup&&(R.skipFetchSetup=!!I.skipFetchSetup),null!=I.fetchOptions&&(R.fetchOptions=(0,E.shallowCopy)(I.fetchOptions))}const M=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=K?K.match(M):null;if(v)try{const C={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?z(v[3]):m(v[3])};let a=C.body;return L&&(a=L(C.body,C)),Promise.resolve(a)}catch(C){l.throwError("processing response error",x.Logger.errors.SERVER_ERROR,{body:u(v[1],v[2]),error:C,requestBody:null,requestMethod:"GET",url:K})}P&&(R.method="POST",R.body=P,null==j["content-type"]&&(j["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==j["content-length"]&&(j["content-length"]={key:"Content-Length",value:String(P.length)}));const k={};Object.keys(j).forEach(C=>{const a=j[C];k[a.key]=a.value}),R.headers=k;const D=function(){let C=null;return{promise:new Promise(function(Q,ee){y&&(C=setTimeout(()=>{null!=C&&(C=null,ee(l.makeError("timeout",x.Logger.errors.TIMEOUT,{requestBody:u(R.body,k["content-type"]),requestMethod:R.method,timeout:y,url:K})))},y))}),cancel:function(){null!=C&&(clearTimeout(C),C=null)}}}(),N=function(){return function(I,P,L,V){return new(L||(L=Promise))(function(G,H){function j(o){try{R(V.next(o))}catch(y){H(y)}}function K(o){try{R(V.throw(o))}catch(y){H(y)}}function R(o){o.done?G(o.value):function(G){return G instanceof L?G:new L(function(H){H(G)})}(o.value).then(j,K)}R((V=V.apply(I,P||[])).next())})}(this,void 0,void 0,function*(){for(let C=0;C=300)&&(D.cancel(),l.throwError("bad response",x.Logger.errors.SERVER_ERROR,{status:a.statusCode,headers:a.headers,body:u(B,a.headers?a.headers["content-type"]:null),requestBody:u(R.body,k["content-type"]),requestMethod:R.method,url:K})),L)try{const Q=yield L(B,a);return D.cancel(),Q}catch(Q){if(Q.throttleRetry&&C"content-type"===j.toLowerCase()).length||(G.headers=(0,E.shallowCopy)(G.headers),G.headers["content-type"]="application/json"):G.headers={"content-type":"application/json"},I=G}return _(I,W,(G,H)=>{let j=null;if(null!=G)try{j=JSON.parse((0,d.ZN)(G))}catch(K){l.throwError("invalid JSON",x.Logger.errors.SERVER_ERROR,{body:G,error:K})}return L&&(j=L(j,H)),j})}function S(I,P){return P||(P={}),null==(P=(0,E.shallowCopy)(P)).floor&&(P.floor=0),null==P.ceiling&&(P.ceiling=1e4),null==P.interval&&(P.interval=250),new Promise(function(L,V){let W=null,G=!1;const H=()=>!G&&(G=!0,W&&clearTimeout(W),!0);P.timeout&&(W=setTimeout(()=>{H()&&V(new Error("timeout"))},P.timeout));const j=P.retryLimit;let K=0;!function R(){return I().then(function(o){if(void 0!==o)H()&&L(o);else if(P.oncePoll)P.oncePoll.once("poll",R);else if(P.onceBlock)P.onceBlock.once("block",R);else if(!G){if(K++,K>j)return void(H()&&V(new Error("retry limit reached")));let y=P.interval*parseInt(String(Math.random()*Math.pow(2,K)));yP.ceiling&&(y=P.ceiling),setTimeout(R,y)}return null},function(o){H()&&V(o)})}()})}},14667:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>f});var ie=Y(67475),z=Y(92275);const x=new(Y(53898).Logger)("wordlists/5.7.0");class f{constructor(g){x.checkAbstract(new.target,f),(0,z.defineReadOnly)(this,"locale",g)}split(g){return g.toLowerCase().split(/ +/g)}join(g){return g.join(" ")}static check(g){const b=[];for(let l=0;l<2048;l++){const h=g.getWord(l);if(l!==g.getWordIndex(h))return"0x";b.push(h)}return(0,ie.id)(b.join("\n")+"\n")}static register(g,b){b||(b=g.locale)}}},33692:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>f});var ie=Y(14667);let O=null;function E(T){if(null==O&&(O="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==ie.D.check(T)))throw O=null,new Error("BIP39 Wordlist for en (English) FAILED")}const x=new class extends ie.D{constructor(){super("en")}getWord(g){return E(this),O[g]}getWordIndex(g){return E(this),O.indexOf(g)}};ie.D.register(x);const f={en:x}},67083:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(94846);function x(k,D,N){return void 0===D&&(D=new Uint8Array(2)),void 0===N&&(N=0),D[N+0]=k>>>8,D[N+1]=k>>>0,D}function f(k,D,N){return void 0===D&&(D=new Uint8Array(2)),void 0===N&&(N=0),D[N+0]=k>>>0,D[N+1]=k>>>8,D}function T(k,D){return void 0===D&&(D=0),k[D]<<24|k[D+1]<<16|k[D+2]<<8|k[D+3]}function g(k,D){return void 0===D&&(D=0),(k[D]<<24|k[D+1]<<16|k[D+2]<<8|k[D+3])>>>0}function b(k,D){return void 0===D&&(D=0),k[D+3]<<24|k[D+2]<<16|k[D+1]<<8|k[D]}function l(k,D){return void 0===D&&(D=0),(k[D+3]<<24|k[D+2]<<16|k[D+1]<<8|k[D])>>>0}function h(k,D,N){return void 0===D&&(D=new Uint8Array(4)),void 0===N&&(N=0),D[N+0]=k>>>24,D[N+1]=k>>>16,D[N+2]=k>>>8,D[N+3]=k>>>0,D}function u(k,D,N){return void 0===D&&(D=new Uint8Array(4)),void 0===N&&(N=0),D[N+0]=k>>>0,D[N+1]=k>>>8,D[N+2]=k>>>16,D[N+3]=k>>>24,D}function I(k,D,N){return void 0===D&&(D=new Uint8Array(8)),void 0===N&&(N=0),h(k/4294967296>>>0,D,N),h(k>>>0,D,N+4),D}function P(k,D,N){return void 0===D&&(D=new Uint8Array(8)),void 0===N&&(N=0),u(k>>>0,D,N),u(k/4294967296>>>0,D,N+4),D}be.readInt16BE=function(k,D){return void 0===D&&(D=0),(k[D+0]<<8|k[D+1])<<16>>16},be.readUint16BE=function(k,D){return void 0===D&&(D=0),(k[D+0]<<8|k[D+1])>>>0},be.readInt16LE=function(k,D){return void 0===D&&(D=0),(k[D+1]<<8|k[D])<<16>>16},be.readUint16LE=function(k,D){return void 0===D&&(D=0),(k[D+1]<<8|k[D])>>>0},be.writeUint16BE=x,be.writeInt16BE=x,be.writeUint16LE=f,be.writeInt16LE=f,be.readInt32BE=T,be.readUint32BE=g,be.readInt32LE=b,be.readUint32LE=l,be.writeUint32BE=h,be.writeInt32BE=h,be.writeUint32LE=u,be.writeInt32LE=u,be.readInt64BE=function(k,D){void 0===D&&(D=0);var N=T(k,D),C=T(k,D+4);return 4294967296*N+C-4294967296*(C>>31)},be.readUint64BE=function(k,D){return void 0===D&&(D=0),4294967296*g(k,D)+g(k,D+4)},be.readInt64LE=function(k,D){void 0===D&&(D=0);var N=b(k,D);return 4294967296*b(k,D+4)+N-4294967296*(N>>31)},be.readUint64LE=function(k,D){void 0===D&&(D=0);var N=l(k,D);return 4294967296*l(k,D+4)+N},be.writeUint64BE=I,be.writeInt64BE=I,be.writeUint64LE=P,be.writeInt64LE=P,be.readUintBE=function(k,D,N){if(void 0===N&&(N=0),k%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(k/8>D.length-N)throw new Error("readUintBE: array is too short for the given bitLength");for(var C=0,a=1,B=k/8+N-1;B>=N;B--)C+=D[B]*a,a*=256;return C},be.readUintLE=function(k,D,N){if(void 0===N&&(N=0),k%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(k/8>D.length-N)throw new Error("readUintLE: array is too short for the given bitLength");for(var C=0,a=1,B=N;B=C;B--)N[B]=D/a&255,a*=256;return N},be.writeUintLE=function(k,D,N,C){if(void 0===N&&(N=new Uint8Array(k/8)),void 0===C&&(C=0),k%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!ie.isSafeInteger(D))throw new Error("writeUintLE value must be an integer");for(var a=1,B=C;B{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(67083),z=Y(91897);function E(T,g,b){for(var l=1634760805,h=857760878,u=2036477234,m=1797285236,_=b[3]<<24|b[2]<<16|b[1]<<8|b[0],w=b[7]<<24|b[6]<<16|b[5]<<8|b[4],S=b[11]<<24|b[10]<<16|b[9]<<8|b[8],I=b[15]<<24|b[14]<<16|b[13]<<8|b[12],P=b[19]<<24|b[18]<<16|b[17]<<8|b[16],L=b[23]<<24|b[22]<<16|b[21]<<8|b[20],V=b[27]<<24|b[26]<<16|b[25]<<8|b[24],W=b[31]<<24|b[30]<<16|b[29]<<8|b[28],G=g[3]<<24|g[2]<<16|g[1]<<8|g[0],H=g[7]<<24|g[6]<<16|g[5]<<8|g[4],j=g[11]<<24|g[10]<<16|g[9]<<8|g[8],K=g[15]<<24|g[14]<<16|g[13]<<8|g[12],R=l,o=h,y=u,M=m,v=_,k=w,D=S,N=I,C=P,a=L,B=V,Q=W,ee=G,ce=H,ue=j,we=K,ae=0;ae<20;ae+=2)v=(v^=C=C+(ee=(ee^=R=R+v|0)>>>16|ee<<16)|0)>>>20|v<<12,k=(k^=a=a+(ce=(ce^=o=o+k|0)>>>16|ce<<16)|0)>>>20|k<<12,D=(D^=B=B+(ue=(ue^=y=y+D|0)>>>16|ue<<16)|0)>>>20|D<<12,N=(N^=Q=Q+(we=(we^=M=M+N|0)>>>16|we<<16)|0)>>>20|N<<12,D=(D^=B=B+(ue=(ue^=y=y+D|0)>>>24|ue<<8)|0)>>>25|D<<7,N=(N^=Q=Q+(we=(we^=M=M+N|0)>>>24|we<<8)|0)>>>25|N<<7,k=(k^=a=a+(ce=(ce^=o=o+k|0)>>>24|ce<<8)|0)>>>25|k<<7,v=(v^=C=C+(ee=(ee^=R=R+v|0)>>>24|ee<<8)|0)>>>25|v<<7,k=(k^=B=B+(we=(we^=R=R+k|0)>>>16|we<<16)|0)>>>20|k<<12,D=(D^=Q=Q+(ee=(ee^=o=o+D|0)>>>16|ee<<16)|0)>>>20|D<<12,N=(N^=C=C+(ce=(ce^=y=y+N|0)>>>16|ce<<16)|0)>>>20|N<<12,v=(v^=a=a+(ue=(ue^=M=M+v|0)>>>16|ue<<16)|0)>>>20|v<<12,N=(N^=C=C+(ce=(ce^=y=y+N|0)>>>24|ce<<8)|0)>>>25|N<<7,v=(v^=a=a+(ue=(ue^=M=M+v|0)>>>24|ue<<8)|0)>>>25|v<<7,D=(D^=Q=Q+(ee=(ee^=o=o+D|0)>>>24|ee<<8)|0)>>>25|D<<7,k=(k^=B=B+(we=(we^=R=R+k|0)>>>24|we<<8)|0)>>>25|k<<7;ie.writeUint32LE(R+l|0,T,0),ie.writeUint32LE(o+h|0,T,4),ie.writeUint32LE(y+u|0,T,8),ie.writeUint32LE(M+m|0,T,12),ie.writeUint32LE(v+_|0,T,16),ie.writeUint32LE(k+w|0,T,20),ie.writeUint32LE(D+S|0,T,24),ie.writeUint32LE(N+I|0,T,28),ie.writeUint32LE(C+P|0,T,32),ie.writeUint32LE(a+L|0,T,36),ie.writeUint32LE(B+V|0,T,40),ie.writeUint32LE(Q+W|0,T,44),ie.writeUint32LE(ee+G|0,T,48),ie.writeUint32LE(ce+H|0,T,52),ie.writeUint32LE(ue+j|0,T,56),ie.writeUint32LE(we+K|0,T,60)}function d(T,g,b,l,h){if(void 0===h&&(h=0),32!==T.length)throw new Error("ChaCha: key size must be 32 bytes");if(l.length>>=8,g++;if(l>0)throw new Error("ChaCha: counter overflow")}be.streamXOR=d,be.stream=function(T,g,b,l){return void 0===l&&(l=0),z.wipe(b),d(T,g,b,b,l)}},91573:(bt,be,Y)=>{"use strict";var z=Y(25046),O=Y(37852),E=Y(91897),d=Y(67083),x=Y(3054);be.Cv=32,be.WH=12,be.pg=16;var f=new Uint8Array(16),T=function(){function g(b){if(this.nonceLength=be.WH,this.tagLength=be.pg,b.length!==be.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(b)}return g.prototype.seal=function(b,l,h,u){if(b.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var m=new Uint8Array(16);m.set(b,m.length-b.length);var _=new Uint8Array(32);z.stream(this._key,m,_,4);var S,w=l.length+this.tagLength;if(u){if(u.length!==w)throw new Error("ChaCha20Poly1305: incorrect destination length");S=u}else S=new Uint8Array(w);return z.streamXOR(this._key,m,l,S,4),this._authenticate(S.subarray(S.length-this.tagLength,S.length),_,S.subarray(0,S.length-this.tagLength),h),E.wipe(m),S},g.prototype.open=function(b,l,h,u){if(b.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(l.length0&&m.update(f.subarray(u.length%16))),m.update(h),h.length%16>0&&m.update(f.subarray(h.length%16));var _=new Uint8Array(8);u&&d.writeUint64LE(u.length,_),m.update(_),d.writeUint64LE(h.length,_),m.update(_);for(var w=m.digest(),S=0;S{"use strict";function z(E,d){if(E.length!==d.length)return 0;for(var x=0,f=0;f>>8}Object.defineProperty(be,"__esModule",{value:!0}),be.select=function(E,d,x){return~(E-1)&d|E-1&x},be.lessOrEqual=function(E,d){return(0|E)-(0|d)-1>>>31&1},be.compare=z,be.equal=function(E,d){return 0!==E.length&&0!==d.length&&0!==z(E,d)}},47903:(bt,be,Y)=>{"use strict";be.Xx=be._w=be.aP=be.KS=be.jQ=void 0;Y(52632);const O=Y(16);Y(91897);function d(Te){const le=new Float64Array(16);if(Te)for(let X=0;X>16&1),X[xe-1]&=65535;X[15]=ne[15]-32767-(X[14]>>16&1);const _e=X[15]>>16&1;X[14]&=65535,w(ne,X,1-_e)}for(let pe=0;pe<16;pe++)Te[2*pe]=255&ne[pe],Te[2*pe+1]=ne[pe]>>8}function L(Te){const le=new Uint8Array(32);return S(le,Te),1&le[0]}function W(Te,le,X){for(let ne=0;ne<16;ne++)Te[ne]=le[ne]+X[ne]}function G(Te,le,X){for(let ne=0;ne<16;ne++)Te[ne]=le[ne]-X[ne]}function H(Te,le,X){let ne,pe,_e=0,xe=0,Ce=0,ke=0,me=0,Ee=0,ze=0,Ve=0,nt=0,tt=0,mt=0,ht=0,wt=0,Pt=0,st=0,Ye=0,gt=0,St=0,Wt=0,dn=0,Nt=0,It=0,qt=0,jt=0,Yt=0,Wn=0,fn=0,$n=0,Yr=0,Ln=0,Bn=0,$r=X[0],Gn=X[1],bn=X[2],Lr=X[3],Kn=X[4],sr=X[5],Ii=X[6],Un=X[7],ir=X[8],ts=X[9],Tn=X[10],Qn=X[11],Vi=X[12],ar=X[13],br=X[14],ki=X[15];ne=le[0],_e+=ne*$r,xe+=ne*Gn,Ce+=ne*bn,ke+=ne*Lr,me+=ne*Kn,Ee+=ne*sr,ze+=ne*Ii,Ve+=ne*Un,nt+=ne*ir,tt+=ne*ts,mt+=ne*Tn,ht+=ne*Qn,wt+=ne*Vi,Pt+=ne*ar,st+=ne*br,Ye+=ne*ki,ne=le[1],xe+=ne*$r,Ce+=ne*Gn,ke+=ne*bn,me+=ne*Lr,Ee+=ne*Kn,ze+=ne*sr,Ve+=ne*Ii,nt+=ne*Un,tt+=ne*ir,mt+=ne*ts,ht+=ne*Tn,wt+=ne*Qn,Pt+=ne*Vi,st+=ne*ar,Ye+=ne*br,gt+=ne*ki,ne=le[2],Ce+=ne*$r,ke+=ne*Gn,me+=ne*bn,Ee+=ne*Lr,ze+=ne*Kn,Ve+=ne*sr,nt+=ne*Ii,tt+=ne*Un,mt+=ne*ir,ht+=ne*ts,wt+=ne*Tn,Pt+=ne*Qn,st+=ne*Vi,Ye+=ne*ar,gt+=ne*br,St+=ne*ki,ne=le[3],ke+=ne*$r,me+=ne*Gn,Ee+=ne*bn,ze+=ne*Lr,Ve+=ne*Kn,nt+=ne*sr,tt+=ne*Ii,mt+=ne*Un,ht+=ne*ir,wt+=ne*ts,Pt+=ne*Tn,st+=ne*Qn,Ye+=ne*Vi,gt+=ne*ar,St+=ne*br,Wt+=ne*ki,ne=le[4],me+=ne*$r,Ee+=ne*Gn,ze+=ne*bn,Ve+=ne*Lr,nt+=ne*Kn,tt+=ne*sr,mt+=ne*Ii,ht+=ne*Un,wt+=ne*ir,Pt+=ne*ts,st+=ne*Tn,Ye+=ne*Qn,gt+=ne*Vi,St+=ne*ar,Wt+=ne*br,dn+=ne*ki,ne=le[5],Ee+=ne*$r,ze+=ne*Gn,Ve+=ne*bn,nt+=ne*Lr,tt+=ne*Kn,mt+=ne*sr,ht+=ne*Ii,wt+=ne*Un,Pt+=ne*ir,st+=ne*ts,Ye+=ne*Tn,gt+=ne*Qn,St+=ne*Vi,Wt+=ne*ar,dn+=ne*br,Nt+=ne*ki,ne=le[6],ze+=ne*$r,Ve+=ne*Gn,nt+=ne*bn,tt+=ne*Lr,mt+=ne*Kn,ht+=ne*sr,wt+=ne*Ii,Pt+=ne*Un,st+=ne*ir,Ye+=ne*ts,gt+=ne*Tn,St+=ne*Qn,Wt+=ne*Vi,dn+=ne*ar,Nt+=ne*br,It+=ne*ki,ne=le[7],Ve+=ne*$r,nt+=ne*Gn,tt+=ne*bn,mt+=ne*Lr,ht+=ne*Kn,wt+=ne*sr,Pt+=ne*Ii,st+=ne*Un,Ye+=ne*ir,gt+=ne*ts,St+=ne*Tn,Wt+=ne*Qn,dn+=ne*Vi,Nt+=ne*ar,It+=ne*br,qt+=ne*ki,ne=le[8],nt+=ne*$r,tt+=ne*Gn,mt+=ne*bn,ht+=ne*Lr,wt+=ne*Kn,Pt+=ne*sr,st+=ne*Ii,Ye+=ne*Un,gt+=ne*ir,St+=ne*ts,Wt+=ne*Tn,dn+=ne*Qn,Nt+=ne*Vi,It+=ne*ar,qt+=ne*br,jt+=ne*ki,ne=le[9],tt+=ne*$r,mt+=ne*Gn,ht+=ne*bn,wt+=ne*Lr,Pt+=ne*Kn,st+=ne*sr,Ye+=ne*Ii,gt+=ne*Un,St+=ne*ir,Wt+=ne*ts,dn+=ne*Tn,Nt+=ne*Qn,It+=ne*Vi,qt+=ne*ar,jt+=ne*br,Yt+=ne*ki,ne=le[10],mt+=ne*$r,ht+=ne*Gn,wt+=ne*bn,Pt+=ne*Lr,st+=ne*Kn,Ye+=ne*sr,gt+=ne*Ii,St+=ne*Un,Wt+=ne*ir,dn+=ne*ts,Nt+=ne*Tn,It+=ne*Qn,qt+=ne*Vi,jt+=ne*ar,Yt+=ne*br,Wn+=ne*ki,ne=le[11],ht+=ne*$r,wt+=ne*Gn,Pt+=ne*bn,st+=ne*Lr,Ye+=ne*Kn,gt+=ne*sr,St+=ne*Ii,Wt+=ne*Un,dn+=ne*ir,Nt+=ne*ts,It+=ne*Tn,qt+=ne*Qn,jt+=ne*Vi,Yt+=ne*ar,Wn+=ne*br,fn+=ne*ki,ne=le[12],wt+=ne*$r,Pt+=ne*Gn,st+=ne*bn,Ye+=ne*Lr,gt+=ne*Kn,St+=ne*sr,Wt+=ne*Ii,dn+=ne*Un,Nt+=ne*ir,It+=ne*ts,qt+=ne*Tn,jt+=ne*Qn,Yt+=ne*Vi,Wn+=ne*ar,fn+=ne*br,$n+=ne*ki,ne=le[13],Pt+=ne*$r,st+=ne*Gn,Ye+=ne*bn,gt+=ne*Lr,St+=ne*Kn,Wt+=ne*sr,dn+=ne*Ii,Nt+=ne*Un,It+=ne*ir,qt+=ne*ts,jt+=ne*Tn,Yt+=ne*Qn,Wn+=ne*Vi,fn+=ne*ar,$n+=ne*br,Yr+=ne*ki,ne=le[14],st+=ne*$r,Ye+=ne*Gn,gt+=ne*bn,St+=ne*Lr,Wt+=ne*Kn,dn+=ne*sr,Nt+=ne*Ii,It+=ne*Un,qt+=ne*ir,jt+=ne*ts,Yt+=ne*Tn,Wn+=ne*Qn,fn+=ne*Vi,$n+=ne*ar,Yr+=ne*br,Ln+=ne*ki,ne=le[15],Ye+=ne*$r,gt+=ne*Gn,St+=ne*bn,Wt+=ne*Lr,dn+=ne*Kn,Nt+=ne*sr,It+=ne*Ii,qt+=ne*Un,jt+=ne*ir,Yt+=ne*ts,Wn+=ne*Tn,fn+=ne*Qn,$n+=ne*Vi,Yr+=ne*ar,Ln+=ne*br,Bn+=ne*ki,_e+=38*gt,xe+=38*St,Ce+=38*Wt,ke+=38*dn,me+=38*Nt,Ee+=38*It,ze+=38*qt,Ve+=38*jt,nt+=38*Yt,tt+=38*Wn,mt+=38*fn,ht+=38*$n,wt+=38*Yr,Pt+=38*Ln,st+=38*Bn,pe=1,ne=_e+pe+65535,pe=Math.floor(ne/65536),_e=ne-65536*pe,ne=xe+pe+65535,pe=Math.floor(ne/65536),xe=ne-65536*pe,ne=Ce+pe+65535,pe=Math.floor(ne/65536),Ce=ne-65536*pe,ne=ke+pe+65535,pe=Math.floor(ne/65536),ke=ne-65536*pe,ne=me+pe+65535,pe=Math.floor(ne/65536),me=ne-65536*pe,ne=Ee+pe+65535,pe=Math.floor(ne/65536),Ee=ne-65536*pe,ne=ze+pe+65535,pe=Math.floor(ne/65536),ze=ne-65536*pe,ne=Ve+pe+65535,pe=Math.floor(ne/65536),Ve=ne-65536*pe,ne=nt+pe+65535,pe=Math.floor(ne/65536),nt=ne-65536*pe,ne=tt+pe+65535,pe=Math.floor(ne/65536),tt=ne-65536*pe,ne=mt+pe+65535,pe=Math.floor(ne/65536),mt=ne-65536*pe,ne=ht+pe+65535,pe=Math.floor(ne/65536),ht=ne-65536*pe,ne=wt+pe+65535,pe=Math.floor(ne/65536),wt=ne-65536*pe,ne=Pt+pe+65535,pe=Math.floor(ne/65536),Pt=ne-65536*pe,ne=st+pe+65535,pe=Math.floor(ne/65536),st=ne-65536*pe,ne=Ye+pe+65535,pe=Math.floor(ne/65536),Ye=ne-65536*pe,_e+=pe-1+37*(pe-1),pe=1,ne=_e+pe+65535,pe=Math.floor(ne/65536),_e=ne-65536*pe,ne=xe+pe+65535,pe=Math.floor(ne/65536),xe=ne-65536*pe,ne=Ce+pe+65535,pe=Math.floor(ne/65536),Ce=ne-65536*pe,ne=ke+pe+65535,pe=Math.floor(ne/65536),ke=ne-65536*pe,ne=me+pe+65535,pe=Math.floor(ne/65536),me=ne-65536*pe,ne=Ee+pe+65535,pe=Math.floor(ne/65536),Ee=ne-65536*pe,ne=ze+pe+65535,pe=Math.floor(ne/65536),ze=ne-65536*pe,ne=Ve+pe+65535,pe=Math.floor(ne/65536),Ve=ne-65536*pe,ne=nt+pe+65535,pe=Math.floor(ne/65536),nt=ne-65536*pe,ne=tt+pe+65535,pe=Math.floor(ne/65536),tt=ne-65536*pe,ne=mt+pe+65535,pe=Math.floor(ne/65536),mt=ne-65536*pe,ne=ht+pe+65535,pe=Math.floor(ne/65536),ht=ne-65536*pe,ne=wt+pe+65535,pe=Math.floor(ne/65536),wt=ne-65536*pe,ne=Pt+pe+65535,pe=Math.floor(ne/65536),Pt=ne-65536*pe,ne=st+pe+65535,pe=Math.floor(ne/65536),st=ne-65536*pe,ne=Ye+pe+65535,pe=Math.floor(ne/65536),Ye=ne-65536*pe,_e+=pe-1+37*(pe-1),Te[0]=_e,Te[1]=xe,Te[2]=Ce,Te[3]=ke,Te[4]=me,Te[5]=Ee,Te[6]=ze,Te[7]=Ve,Te[8]=nt,Te[9]=tt,Te[10]=mt,Te[11]=ht,Te[12]=wt,Te[13]=Pt,Te[14]=st,Te[15]=Ye}function j(Te,le){H(Te,le,le)}function o(Te,le){const X=d(),ne=d(),pe=d(),_e=d(),xe=d(),Ce=d(),ke=d(),me=d(),Ee=d();G(X,Te[1],Te[0]),G(Ee,le[1],le[0]),H(X,X,Ee),W(ne,Te[0],Te[1]),W(Ee,le[0],le[1]),H(ne,ne,Ee),H(pe,Te[3],le[3]),H(pe,pe,b),H(_e,Te[2],le[2]),W(_e,_e,_e),G(xe,ne,X),G(Ce,_e,pe),W(ke,_e,pe),W(me,ne,X),H(Te[0],xe,Ce),H(Te[1],me,ke),H(Te[2],ke,Ce),H(Te[3],xe,me)}function y(Te,le,X){for(let ne=0;ne<4;ne++)w(Te[ne],le[ne],X)}function M(Te,le){const X=d(),ne=d(),pe=d();(function(Te,le){const X=d();let ne;for(ne=0;ne<16;ne++)X[ne]=le[ne];for(ne=253;ne>=0;ne--)j(X,X),2!==ne&&4!==ne&&H(X,X,le);for(ne=0;ne<16;ne++)Te[ne]=X[ne]})(pe,le[2]),H(X,le[0],pe),H(ne,le[1],pe),S(Te,ne),Te[31]^=L(X)<<7}function k(Te,le){const X=[d(),d(),d(),d()];m(X[0],l),m(X[1],h),m(X[2],T),H(X[3],l,h),function(Te,le,X){m(Te[0],f),m(Te[1],T),m(Te[2],T),m(Te[3],f);for(let ne=255;ne>=0;--ne){const pe=X[ne/8|0]>>(7&ne)&1;y(Te,le,pe),o(le,Te),o(Te,Te),y(Te,le,pe)}}(Te,X,le)}be._w=function(Te){if(Te.length!==be.aP)throw new Error(`ed25519: seed must be ${be.aP} bytes`);const le=(0,O.hash)(Te);le[0]&=248,le[31]&=127,le[31]|=64;const X=new Uint8Array(32),ne=[d(),d(),d(),d()];k(ne,le),M(X,ne);const pe=new Uint8Array(64);return pe.set(Te),pe.set(X,32),{publicKey:X,secretKey:pe}};const a=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 B(Te,le){let X,ne,pe,_e;for(ne=63;ne>=32;--ne){for(X=0,pe=ne-32,_e=ne-12;pe<_e;++pe)le[pe]+=X-16*le[ne]*a[pe-(ne-32)],X=Math.floor((le[pe]+128)/256),le[pe]-=256*X;le[pe]+=X,le[ne]=0}for(X=0,pe=0;pe<32;pe++)le[pe]+=X-(le[31]>>4)*a[pe],X=le[pe]>>8,le[pe]&=255;for(pe=0;pe<32;pe++)le[pe]-=X*a[pe];for(ne=0;ne<32;ne++)le[ne+1]+=le[ne]>>8,Te[ne]=255&le[ne]}function Q(Te){const le=new Float64Array(64);for(let X=0;X<64;X++)le[X]=Te[X];for(let X=0;X<64;X++)Te[X]=0;B(Te,le)}be.Xx=function(Te,le){const X=new Float64Array(64),ne=[d(),d(),d(),d()],pe=(0,O.hash)(Te.subarray(0,32));pe[0]&=248,pe[31]&=127,pe[31]|=64;const _e=new Uint8Array(64);_e.set(pe.subarray(32),32);const xe=new O.SHA512;xe.update(_e.subarray(32)),xe.update(le);const Ce=xe.digest();xe.clean(),Q(Ce),k(ne,Ce),M(_e,ne),xe.reset(),xe.update(_e.subarray(0,32)),xe.update(Te.subarray(32)),xe.update(le);const ke=xe.digest();Q(ke);for(let me=0;me<32;me++)X[me]=Ce[me];for(let me=0;me<32;me++)for(let Ee=0;Ee<32;Ee++)X[me+Ee]+=ke[me]*pe[Ee];return B(_e.subarray(32),X),_e}},22266:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.isSerializableHash=function(ie){return void 0!==ie.saveState&&void 0!==ie.restoreState&&void 0!==ie.cleanSavedState}},37651:(bt,be,Y)=>{"use strict";var z=Y(56283),O=Y(91897),E=function(){function d(x,f,T,g){void 0===T&&(T=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=x,this._info=g;var b=z.hmac(this._hash,T,f);this._hmac=new z.HMAC(x,b),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return d.prototype._fillBuffer=function(){this._counter[0]++;var x=this._counter[0];if(0===x)throw new Error("hkdf: cannot expand more");this._hmac.reset(),x>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},d.prototype.expand=function(x){for(var f=new Uint8Array(x),T=0;T{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(22266),z=Y(3054),O=Y(91897),E=function(){function x(f,T){this._finished=!1,this._inner=new f,this._outer=new f,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var g=new Uint8Array(this.blockSize);T.length>this.blockSize?this._inner.update(T).finish(g).clean():g.set(T);for(var b=0;b{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.mul=Math.imul||function(x,f){var g=65535&x,l=65535&f;return g*l+((x>>>16&65535)*l+g*(f>>>16&65535)<<16>>>0)|0},be.add=function(x,f){return x+f|0},be.sub=function(x,f){return x-f|0},be.rotl=function(x,f){return x<>>32-f},be.rotr=function(x,f){return x<<32-f|x>>>f},be.isInteger=Number.isInteger||function(x){return"number"==typeof x&&isFinite(x)&&Math.floor(x)===x},be.MAX_SAFE_INTEGER=9007199254740991,be.isSafeInteger=function(x){return be.isInteger(x)&&x>=-be.MAX_SAFE_INTEGER&&x<=be.MAX_SAFE_INTEGER}},37852:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(3054),z=Y(91897);be.DIGEST_LENGTH=16;var O=function(){function x(f){this.digestLength=be.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 T=f[0]|f[1]<<8;this._r[0]=8191&T;var g=f[2]|f[3]<<8;this._r[1]=8191&(T>>>13|g<<3);var b=f[4]|f[5]<<8;this._r[2]=7939&(g>>>10|b<<6);var l=f[6]|f[7]<<8;this._r[3]=8191&(b>>>7|l<<9);var h=f[8]|f[9]<<8;this._r[4]=255&(l>>>4|h<<12),this._r[5]=h>>>1&8190;var u=f[10]|f[11]<<8;this._r[6]=8191&(h>>>14|u<<2);var m=f[12]|f[13]<<8;this._r[7]=8065&(u>>>11|m<<5);var _=f[14]|f[15]<<8;this._r[8]=8191&(m>>>8|_<<8),this._r[9]=_>>>5&127,this._pad[0]=f[16]|f[17]<<8,this._pad[1]=f[18]|f[19]<<8,this._pad[2]=f[20]|f[21]<<8,this._pad[3]=f[22]|f[23]<<8,this._pad[4]=f[24]|f[25]<<8,this._pad[5]=f[26]|f[27]<<8,this._pad[6]=f[28]|f[29]<<8,this._pad[7]=f[30]|f[31]<<8}return x.prototype._blocks=function(f,T,g){for(var b=this._fin?0:2048,l=this._h[0],h=this._h[1],u=this._h[2],m=this._h[3],_=this._h[4],w=this._h[5],S=this._h[6],I=this._h[7],P=this._h[8],L=this._h[9],V=this._r[0],W=this._r[1],G=this._r[2],H=this._r[3],j=this._r[4],K=this._r[5],R=this._r[6],o=this._r[7],y=this._r[8],M=this._r[9];g>=16;){var v=f[T+0]|f[T+1]<<8,k=f[T+2]|f[T+3]<<8,D=f[T+4]|f[T+5]<<8,N=f[T+6]|f[T+7]<<8,C=f[T+8]|f[T+9]<<8,a=f[T+10]|f[T+11]<<8,B=f[T+12]|f[T+13]<<8,Q=f[T+14]|f[T+15]<<8,ee=0,ce=ee;ce+=(l+=8191&v)*V,ce+=(h+=8191&(v>>>13|k<<3))*(5*M),ce+=(u+=8191&(k>>>10|D<<6))*(5*y),ce+=(m+=8191&(D>>>7|N<<9))*(5*o),ee=(ce+=(_+=8191&(N>>>4|C<<12))*(5*R))>>>13,ce&=8191,ce+=(w+=C>>>1&8191)*(5*K),ce+=(S+=8191&(C>>>14|a<<2))*(5*j),ce+=(I+=8191&(a>>>11|B<<5))*(5*H),ce+=(P+=8191&(B>>>8|Q<<8))*(5*G);var ue=ee+=(ce+=(L+=Q>>>5|b)*(5*W))>>>13;ue+=l*W,ue+=h*V,ue+=u*(5*M),ue+=m*(5*y),ee=(ue+=_*(5*o))>>>13,ue&=8191,ue+=w*(5*R),ue+=S*(5*K),ue+=I*(5*j),ue+=P*(5*H),ee+=(ue+=L*(5*G))>>>13,ue&=8191;var we=ee;we+=l*G,we+=h*W,we+=u*V,we+=m*(5*M),ee=(we+=_*(5*y))>>>13,we&=8191,we+=w*(5*o),we+=S*(5*R),we+=I*(5*K),we+=P*(5*j);var ae=ee+=(we+=L*(5*H))>>>13;ae+=l*H,ae+=h*G,ae+=u*W,ae+=m*V,ee=(ae+=_*(5*M))>>>13,ae&=8191,ae+=w*(5*y),ae+=S*(5*o),ae+=I*(5*R),ae+=P*(5*K);var Te=ee+=(ae+=L*(5*j))>>>13;Te+=l*j,Te+=h*H,Te+=u*G,Te+=m*W,ee=(Te+=_*V)>>>13,Te&=8191,Te+=w*(5*M),Te+=S*(5*y),Te+=I*(5*o),Te+=P*(5*R);var le=ee+=(Te+=L*(5*K))>>>13;le+=l*K,le+=h*j,le+=u*H,le+=m*G,ee=(le+=_*W)>>>13,le&=8191,le+=w*V,le+=S*(5*M),le+=I*(5*y),le+=P*(5*o);var X=ee+=(le+=L*(5*R))>>>13;X+=l*R,X+=h*K,X+=u*j,X+=m*H,ee=(X+=_*G)>>>13,X&=8191,X+=w*W,X+=S*V,X+=I*(5*M),X+=P*(5*y);var ne=ee+=(X+=L*(5*o))>>>13;ne+=l*o,ne+=h*R,ne+=u*K,ne+=m*j,ee=(ne+=_*H)>>>13,ne&=8191,ne+=w*G,ne+=S*W,ne+=I*V,ne+=P*(5*M);var pe=ee+=(ne+=L*(5*y))>>>13;pe+=l*y,pe+=h*o,pe+=u*R,pe+=m*K,ee=(pe+=_*j)>>>13,pe&=8191,pe+=w*H,pe+=S*G,pe+=I*W,pe+=P*V;var _e=ee+=(pe+=L*(5*M))>>>13;_e+=l*M,_e+=h*y,_e+=u*o,_e+=m*R,ee=(_e+=_*K)>>>13,_e&=8191,_e+=w*j,_e+=S*H,_e+=I*G,_e+=P*W,l=ce=8191&(ee=(ee=((ee+=(_e+=L*V)>>>13)<<2)+ee|0)+(ce&=8191)|0),h=ue+=ee>>>=13,u=we&=8191,m=ae&=8191,_=Te&=8191,w=le&=8191,S=X&=8191,I=ne&=8191,P=pe&=8191,L=_e&=8191,T+=16,g-=16}this._h[0]=l,this._h[1]=h,this._h[2]=u,this._h[3]=m,this._h[4]=_,this._h[5]=w,this._h[6]=S,this._h[7]=I,this._h[8]=P,this._h[9]=L},x.prototype.finish=function(f,T){void 0===T&&(T=0);var b,l,h,u,g=new Uint16Array(10);if(this._leftover){for(u=this._leftover,this._buffer[u++]=1;u<16;u++)this._buffer[u]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(b=this._h[1]>>>13,this._h[1]&=8191,u=2;u<10;u++)this._h[u]+=b,b=this._h[u]>>>13,this._h[u]&=8191;for(this._h[0]+=5*b,b=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=b,b=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=b,g[0]=this._h[0]+5,b=g[0]>>>13,g[0]&=8191,u=1;u<10;u++)g[u]=this._h[u]+b,b=g[u]>>>13,g[u]&=8191;for(g[9]-=8192,l=(1^b)-1,u=0;u<10;u++)g[u]&=l;for(l=~l,u=0;u<10;u++)this._h[u]=this._h[u]&l|g[u];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),this._h[0]=65535&(h=this._h[0]+this._pad[0]),u=1;u<8;u++)this._h[u]=65535&(h=(this._h[u]+this._pad[u]|0)+(h>>>16)|0);return f[T+0]=this._h[0]>>>0,f[T+1]=this._h[0]>>>8,f[T+2]=this._h[1]>>>0,f[T+3]=this._h[1]>>>8,f[T+4]=this._h[2]>>>0,f[T+5]=this._h[2]>>>8,f[T+6]=this._h[3]>>>0,f[T+7]=this._h[3]>>>8,f[T+8]=this._h[4]>>>0,f[T+9]=this._h[4]>>>8,f[T+10]=this._h[5]>>>0,f[T+11]=this._h[5]>>>8,f[T+12]=this._h[6]>>>0,f[T+13]=this._h[6]>>>8,f[T+14]=this._h[7]>>>0,f[T+15]=this._h[7]>>>8,this._finished=!0,this},x.prototype.update=function(f){var b,T=0,g=f.length;if(this._leftover){(b=16-this._leftover)>g&&(b=g);for(var l=0;l=16&&(this._blocks(f,T,b=g-g%16),T+=b,g-=b),g){for(l=0;l{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.randomStringForEntropy=be.randomString=be.randomUint32=be.randomBytes=be.defaultRandomSource=void 0;const ie=Y(88920),z=Y(67083),O=Y(91897);function E(g,b=be.defaultRandomSource){return b.randomBytes(g)}be.defaultRandomSource=new ie.SystemRandomSource,be.randomBytes=E,be.randomUint32=function(g=be.defaultRandomSource){const b=E(4,g),l=(0,z.readUint32LE)(b);return(0,O.wipe)(b),l};const x="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function f(g,b=x,l=be.defaultRandomSource){if(b.length<2)throw new Error("randomString charset is too short");if(b.length>256)throw new Error("randomString charset is too long");let h="";const u=b.length,m=256-256%u;for(;g>0;){const _=E(Math.ceil(256*g/m),l);for(let w=0;w<_.length&&g>0;w++){const S=_[w];S{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BrowserRandomSource=void 0,be.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const O="undefined"!=typeof self?self.crypto||self.msCrypto:null;O&&void 0!==O.getRandomValues&&(this._crypto=O,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(O){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const E=new Uint8Array(O);for(let d=0;d{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.NodeRandomSource=void 0;const ie=Y(91897);be.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const E=Y(19726);E&&E.randomBytes&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(E){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let d=this._crypto.randomBytes(E);if(d.length!==E)throw new Error("NodeRandomSource: got fewer bytes than requested");const x=new Uint8Array(E);for(let f=0;f{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.SystemRandomSource=void 0;const ie=Y(65695),z=Y(49398);be.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new ie.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new z.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(d){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(d)}}},41027:(bt,be,Y)=>{"use strict";var z=Y(67083),O=Y(91897);be.k=32,be.cn=64;var E=function(){function T(){this.digestLength=be.k,this.blockSize=be.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 T.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},T.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},T.prototype.clean=function(){O.wipe(this._buffer),O.wipe(this._temp),this.reset()},T.prototype.update=function(g,b){if(void 0===b&&(b=g.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var l=0;if(this._bytesHashed+=b,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=g[l++],b--;this._bufferLength===this.blockSize&&(x(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(b>=this.blockSize&&(l=x(this._temp,this._state,g,l,b),b%=this.blockSize);b>0;)this._buffer[this._bufferLength++]=g[l++],b--;return this},T.prototype.finish=function(g){if(!this._finished){var b=this._bytesHashed,l=this._bufferLength,h=b/536870912|0,u=b<<3,m=b%64<56?64:128;this._buffer[l]=128;for(var _=l+1;_0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},T.prototype.restoreState=function(g){return this._state.set(g.state),this._bufferLength=g.bufferLength,g.buffer&&this._buffer.set(g.buffer),this._bytesHashed=g.bytesHashed,this._finished=!1,this},T.prototype.cleanSavedState=function(g){O.wipe(g.state),g.buffer&&O.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},T}();be.mE=E;var d=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 x(T,g,b,l,h){for(;h>=64;){for(var u=g[0],m=g[1],_=g[2],w=g[3],S=g[4],I=g[5],P=g[6],L=g[7],V=0;V<16;V++)T[V]=z.readUint32BE(b,l+4*V);for(V=16;V<64;V++){var G=T[V-2];T[V]=((H=(G>>>17|G<<15)^(G>>>19|G<<13)^G>>>10)+T[V-7]|0)+((j=((G=T[V-15])>>>7|G<<25)^(G>>>18|G<<14)^G>>>3)+T[V-16]|0)}for(V=0;V<64;V++){var H=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&I^~S&P)|0)+(L+(d[V]+T[V]|0)|0)|0,j=((u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10))+(u&m^u&_^m&_)|0;L=P,P=I,I=S,S=w+H|0,w=_,_=m,m=u,u=H+j|0}g[0]+=u,g[1]+=m,g[2]+=_,g[3]+=w,g[4]+=S,g[5]+=I,g[6]+=P,g[7]+=L,l+=64,h-=64}return l}be.vp=function(T){var g=new E;g.update(T);var b=g.digest();return g.clean(),b}},16:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(67083),z=Y(91897);be.DIGEST_LENGTH=64,be.BLOCK_SIZE=128;var O=function(){function f(){this.digestLength=be.DIGEST_LENGTH,this.blockSize=be.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 f.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},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){z.wipe(this._buffer),z.wipe(this._tempHi),z.wipe(this._tempLo),this.reset()},f.prototype.update=function(T,g){if(void 0===g&&(g=T.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var b=0;if(this._bytesHashed+=g,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=T[b++],g--;this._bufferLength===this.blockSize&&(d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(g>=this.blockSize&&(b=d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,T,b,g),g%=this.blockSize);g>0;)this._buffer[this._bufferLength++]=T[b++],g--;return this},f.prototype.finish=function(T){if(!this._finished){var g=this._bytesHashed,b=this._bufferLength,l=g/536870912|0,h=g<<3,u=g%128<112?128:256;this._buffer[b]=128;for(var m=b+1;m0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(T){return this._stateHi.set(T.stateHi),this._stateLo.set(T.stateLo),this._bufferLength=T.bufferLength,T.buffer&&this._buffer.set(T.buffer),this._bytesHashed=T.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(T){z.wipe(T.stateHi),z.wipe(T.stateLo),T.buffer&&z.wipe(T.buffer),T.bufferLength=0,T.bytesHashed=0},f}();be.SHA512=O;var E=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 d(f,T,g,b,l,h,u){for(var M,v,k,D,N,C,a,B,m=g[0],_=g[1],w=g[2],S=g[3],I=g[4],P=g[5],L=g[6],V=g[7],W=b[0],G=b[1],H=b[2],j=b[3],K=b[4],R=b[5],o=b[6],y=b[7];u>=128;){for(var Q=0;Q<16;Q++)f[Q]=ie.readUint32BE(l,ee=8*Q+h),T[Q]=ie.readUint32BE(l,ee+4);for(Q=0;Q<80;Q++){var ne,ze,ue=_,we=w,ae=S,Te=I,le=P,X=L,_e=G,xe=H,Ce=j,ke=K,me=R,Ee=o;if(N=65535&(v=y),C=v>>>16,a=65535&(M=V),B=M>>>16,N+=65535&(v=(K>>>14|I<<18)^(K>>>18|I<<14)^(I>>>9|K<<23)),C+=v>>>16,a+=65535&(M=(I>>>14|K<<18)^(I>>>18|K<<14)^(K>>>9|I<<23)),B+=M>>>16,N+=65535&(v=K&R^~K&o),C+=v>>>16,a+=65535&(M=I&P^~I&L),B+=M>>>16,N+=65535&(v=E[2*Q+1]),C+=v>>>16,a+=65535&(M=E[2*Q]),B+=M>>>16,C+=(v=T[Q%16])>>>16,a+=65535&(M=f[Q%16]),B+=M>>>16,a+=(C+=(N+=65535&v)>>>16)>>>16,N=65535&(v=D=65535&N|C<<16),C=v>>>16,a=65535&(M=k=65535&a|(B+=a>>>16)<<16),B=M>>>16,N+=65535&(v=(W>>>28|m<<4)^(m>>>2|W<<30)^(m>>>7|W<<25)),C+=v>>>16,a+=65535&(M=(m>>>28|W<<4)^(W>>>2|m<<30)^(W>>>7|m<<25)),B+=M>>>16,C+=(v=W&G^W&H^G&H)>>>16,a+=65535&(M=m&_^m&w^_&w),B+=M>>>16,ne=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,ze=65535&N|C<<16,N=65535&(v=Ce),C=v>>>16,a=65535&(M=ae),B=M>>>16,C+=(v=D)>>>16,a+=65535&(M=k),B+=M>>>16,_=m,w=ue,S=we,I=ae=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,P=Te,L=le,V=X,m=ne,G=W,H=_e,j=xe,K=Ce=65535&N|C<<16,R=ke,o=me,y=Ee,W=ze,Q%16==15)for(var ee=0;ee<16;ee++)N=65535&(v=T[ee]),C=v>>>16,a=65535&(M=f[ee]),B=M>>>16,N+=65535&(v=T[(ee+9)%16]),C+=v>>>16,a+=65535&(M=f[(ee+9)%16]),B+=M>>>16,N+=65535&(v=((D=T[(ee+1)%16])>>>1|(k=f[(ee+1)%16])<<31)^(D>>>8|k<<24)^(D>>>7|k<<25)),C+=v>>>16,a+=65535&(M=(k>>>1|D<<31)^(k>>>8|D<<24)^k>>>7),B+=M>>>16,C+=(v=((D=T[(ee+14)%16])>>>19|(k=f[(ee+14)%16])<<13)^(k>>>29|D<<3)^(D>>>6|k<<26))>>>16,a+=65535&(M=(k>>>19|D<<13)^(D>>>29|k<<3)^k>>>6),B+=M>>>16,f[ee]=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,T[ee]=65535&N|C<<16}N=65535&(v=W),C=v>>>16,a=65535&(M=m),B=M>>>16,C+=(v=b[0])>>>16,a+=65535&(M=g[0]),B+=M>>>16,g[0]=m=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[0]=W=65535&N|C<<16,N=65535&(v=G),C=v>>>16,a=65535&(M=_),B=M>>>16,C+=(v=b[1])>>>16,a+=65535&(M=g[1]),B+=M>>>16,g[1]=_=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[1]=G=65535&N|C<<16,N=65535&(v=H),C=v>>>16,a=65535&(M=w),B=M>>>16,C+=(v=b[2])>>>16,a+=65535&(M=g[2]),B+=M>>>16,g[2]=w=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[2]=H=65535&N|C<<16,N=65535&(v=j),C=v>>>16,a=65535&(M=S),B=M>>>16,C+=(v=b[3])>>>16,a+=65535&(M=g[3]),B+=M>>>16,g[3]=S=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[3]=j=65535&N|C<<16,N=65535&(v=K),C=v>>>16,a=65535&(M=I),B=M>>>16,C+=(v=b[4])>>>16,a+=65535&(M=g[4]),B+=M>>>16,g[4]=I=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[4]=K=65535&N|C<<16,N=65535&(v=R),C=v>>>16,a=65535&(M=P),B=M>>>16,C+=(v=b[5])>>>16,a+=65535&(M=g[5]),B+=M>>>16,g[5]=P=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[5]=R=65535&N|C<<16,N=65535&(v=o),C=v>>>16,a=65535&(M=L),B=M>>>16,C+=(v=b[6])>>>16,a+=65535&(M=g[6]),B+=M>>>16,g[6]=L=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[6]=o=65535&N|C<<16,N=65535&(v=y),C=v>>>16,a=65535&(M=V),B=M>>>16,C+=(v=b[7])>>>16,a+=65535&(M=g[7]),B+=M>>>16,g[7]=V=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[7]=y=65535&N|C<<16,h+=128,u-=128}return h}be.hash=function(f){var T=new O;T.update(f);var g=T.digest();return T.clean(),g}},91897:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.wipe=function(ie){for(var z=0;z{"use strict";be.gi=be.Au=be.KS=be.kz=void 0;const z=Y(52632),O=Y(91897);function E(V){const W=new Float64Array(16);if(V)for(let G=0;G=0;--N){const C=G[N>>>3]>>>(7&N)&1;T(j,K,C),T(R,o,C),l(y,j,R),h(j,j,R),l(R,K,o),h(K,K,o),m(o,y),m(M,j),u(j,R,j),u(R,K,y),l(y,j,R),h(j,j,R),m(K,j),h(R,o,M),u(j,R,x),l(j,j,o),u(R,R,j),u(j,o,M),u(o,K,H),m(K,y),T(j,K,C),T(R,o,C)}for(let N=0;N<16;N++)H[N+16]=j[N],H[N+32]=R[N],H[N+48]=K[N],H[N+64]=o[N];const v=H.subarray(32),k=H.subarray(16);(function(V,W){const G=E();for(let H=0;H<16;H++)G[H]=W[H];for(let H=253;H>=0;H--)m(G,G),2!==H&&4!==H&&u(G,G,W);for(let H=0;H<16;H++)V[H]=G[H]})(v,v),u(k,k,v);const D=new Uint8Array(32);return function(V,W){const G=E(),H=E();for(let j=0;j<16;j++)H[j]=W[j];f(H),f(H),f(H);for(let j=0;j<2;j++){G[0]=H[0]-65517;for(let R=1;R<15;R++)G[R]=H[R]-65535-(G[R-1]>>16&1),G[R-1]&=65535;G[15]=H[15]-32767-(G[14]>>16&1);const K=G[15]>>16&1;G[14]&=65535,T(H,G,1-K)}for(let j=0;j<16;j++)V[2*j]=255&H[j],V[2*j+1]=H[j]>>8}(D,k),D}function S(V){return w(V,d)}be.Au=function(V){const W=(0,z.randomBytes)(32,V),G=function(V){if(V.length!==be.KS)throw new Error(`x25519: seed must be ${be.KS} bytes`);const W=new Uint8Array(V);return{publicKey:S(W),secretKey:W}}(W);return(0,O.wipe)(W),G},be.gi=function(V,W,G=!1){if(V.length!==be.kz)throw new Error("X25519: incorrect secret key length");if(W.length!==be.kz)throw new Error("X25519: incorrect public key length");const H=w(V,W);if(G){let j=0;for(let K=0;K{"use strict";function Y(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function ie(){const O=Y();return O.subtle||O.webkitSubtle}Object.defineProperty(be,"__esModule",{value:!0}),be.isBrowserCryptoAvailable=be.getSubtleCrypto=be.getBrowerCrypto=void 0,be.getBrowerCrypto=Y,be.getSubtleCrypto=ie,be.isBrowserCryptoAvailable=function(){return!!Y()&&!!ie()}},69537:(bt,be)=>{"use strict";function Y(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function ie(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(be,"__esModule",{value:!0}),be.isBrowser=be.isNode=be.isReactNative=void 0,be.isReactNative=Y,be.isNode=ie,be.isBrowser=function(){return!Y()&&!ie()}},38572:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(33172);ie.__exportStar(Y(5158),be),ie.__exportStar(Y(69537),be)},52399:(bt,be,Y)=>{"use strict";Y.d(be,{q:()=>ie});class ie{}},1577:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{IEvents:()=>ie.q});var ie=Y(52399)},63029:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.HEARTBEAT_EVENTS=be.HEARTBEAT_INTERVAL=void 0;const ie=Y(14611);be.HEARTBEAT_INTERVAL=ie.FIVE_SECONDS,be.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},76505:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),Y(83411).__exportStar(Y(63029),be)},33435:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.HeartBeat=void 0;const ie=Y(83411),z=Y(93105),O=Y(14611),E=Y(76157),d=Y(76505);class x extends E.IHeartBeat{constructor(T){super(T),this.events=new z.EventEmitter,this.interval=d.HEARTBEAT_INTERVAL,this.interval=(null==T?void 0:T.interval)||d.HEARTBEAT_INTERVAL}static init(T){return ie.__awaiter(this,void 0,void 0,function*(){const g=new x(T);return yield g.init(),g})}init(){return ie.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(T,g){this.events.on(T,g)}once(T,g){this.events.once(T,g)}off(T,g){this.events.off(T,g)}removeListener(T,g){this.events.removeListener(T,g)}initialize(){return ie.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),O.toMiliseconds(this.interval))})}pulse(){this.events.emit(d.HEARTBEAT_EVENTS.pulse)}}be.HeartBeat=x},38960:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(83411);ie.__exportStar(Y(33435),be),ie.__exportStar(Y(76157),be),ie.__exportStar(Y(76505),be)},41760:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.IHeartBeat=void 0;const ie=Y(1577);be.IHeartBeat=class extends ie.IEvents{constructor(E){super()}}},76157:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),Y(83411).__exportStar(Y(41760),be)},6930:(bt,be,Y)=>{"use strict";Y.d(be,{k:()=>m,Z:()=>w});var ie=Y(34553),z=Y(93105),O=Y(75630),E=Y.n(O);function T(S){return"string"==typeof S?S:(S=>JSON.stringify(S,(I,P)=>"bigint"==typeof P?P.toString()+"n":P))(S)||""}var g=Y(22339);const h={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class m{constructor(I,P=!1){if(this.url=I,this.disableProviderPing=P,this.events=new z.EventEmitter,this.isAvailable=!1,this.registering=!1,!(0,g.isHttpUrl)(I))throw new Error(`Provided URL is not compatible with HTTP connection: ${I}`);this.url=I,this.disableProviderPing=P}get connected(){return this.isAvailable}get connecting(){return this.registering}on(I,P){this.events.on(I,P)}once(I,P){this.events.once(I,P)}off(I,P){this.events.off(I,P)}removeListener(I,P){this.events.removeListener(I,P)}open(I=this.url){var P=this;return(0,ie.Z)(function*(){yield P.register(I)})()}close(){var I=this;return(0,ie.Z)(function*(){if(!I.isAvailable)throw new Error("Connection already closed");I.onClose()})()}send(I,P){var L=this;return(0,ie.Z)(function*(){L.isAvailable||(yield L.register());try{const V=T(I),G=yield(yield E()(L.url,Object.assign(Object.assign({},h),{body:V}))).json();L.onPayload({data:G})}catch(V){L.onError(I.id,V)}})()}register(I=this.url){var P=this;return(0,ie.Z)(function*(){if(!(0,g.isHttpUrl)(I))throw new Error(`Provided URL is not compatible with HTTP connection: ${I}`);if(P.registering){const L=P.events.getMaxListeners();return(P.events.listenerCount("register_error")>=L||P.events.listenerCount("open")>=L)&&P.events.setMaxListeners(L+1),new Promise((V,W)=>{P.events.once("register_error",G=>{P.resetMaxListeners(),W(G)}),P.events.once("open",()=>{if(P.resetMaxListeners(),void 0===P.isAvailable)return W(new Error("HTTP connection is missing or invalid"));V()})})}P.url=I,P.registering=!0;try{if(!P.disableProviderPing){const L=T({id:1,jsonrpc:"2.0",method:"test",params:[]});yield E()(I,Object.assign(Object.assign({},h),{body:L}))}P.onOpen()}catch(L){const V=P.parseError(L);throw P.events.emit("register_error",V),P.onClose(),V}})()}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(I){if(void 0===I.data)return;const P="string"==typeof I.data?function(S){if("string"!=typeof S)throw new Error("Cannot safe json parse value of type "+typeof S);try{return(S=>{const P=S.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(P,(L,V)=>"string"==typeof V&&V.match(/^\d+n$/)?BigInt(V.substring(0,V.length-1)):V)})(S)}catch{return S}}(I.data):I.data;this.events.emit("payload",P)}onError(I,P){const L=this.parseError(P),V=L.message||L.toString(),W=(0,g.formatJsonRpcError)(I,V);this.events.emit("payload",W)}parseError(I,P=this.url){return(0,g.CX)(I,P,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const w=m},10321:(bt,be,Y)=>{"use strict";Y.d(be,{r:()=>E});var ie=Y(34553),z=Y(93105),O=Y(22339);class E extends O.IJsonRpcProvider{constructor(T){super(T),this.events=new z.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(T),this.connection.connected&&this.registerEventListeners()}connect(T=this.connection){var g=this;return(0,ie.Z)(function*(){yield g.open(T)})()}disconnect(){var T=this;return(0,ie.Z)(function*(){yield T.close()})()}on(T,g){this.events.on(T,g)}once(T,g){this.events.once(T,g)}off(T,g){this.events.off(T,g)}removeListener(T,g){this.events.removeListener(T,g)}request(T,g){var b=this;return(0,ie.Z)(function*(){return b.requestStrict((0,O.formatJsonRpcRequest)(T.method,T.params||[],T.id||(0,O.getBigIntRpcId)().toString()),g)})()}requestStrict(T,g){var b=this;return(0,ie.Z)(function*(){return new Promise(function(){var l=(0,ie.Z)(function*(h,u){if(!b.connection.connected)try{yield b.open()}catch(m){u(m)}b.events.on(`${T.id}`,m=>{(0,O.isJsonRpcError)(m)?u(m.error):h(m.result)});try{yield b.connection.send(T,g)}catch(m){u(m)}});return function(h,u){return l.apply(this,arguments)}}())})()}setConnection(T=this.connection){return T}onPayload(T){this.events.emit("payload",T),(0,O.isJsonRpcResponse)(T)?this.events.emit(`${T.id}`,T):this.events.emit("message",{type:T.method,data:T.params})}onClose(T){T&&3e3===T.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${T.code} ${T.reason?`(${T.reason})`:""}`)),this.events.emit("disconnect")}open(T=this.connection){var g=this;return(0,ie.Z)(function*(){g.connection===T&&g.connection.connected||(g.connection.connected&&g.close(),"string"==typeof T&&(yield g.connection.open(T),T=g.connection),g.connection=g.setConnection(T),yield g.connection.open(),g.registerEventListeners(),g.events.emit("connect"))})()}close(){var T=this;return(0,ie.Z)(function*(){yield T.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",T=>this.onPayload(T)),this.connection.on("close",T=>this.onClose(T)),this.connection.on("error",T=>this.events.emit("error",T)),this.connection.on("register_error",T=>this.onClose()),this.hasRegisteredEventListeners=!0)}}},52885:(bt,be,Y)=>{"use strict";Y.d(be,{O4:()=>d,CA:()=>x,dQ:()=>f,xK:()=>g,JV:()=>b});const d="INTERNAL_ERROR",x="SERVER_ERROR",f=[-32700,-32600,-32601,-32602,-32603],g={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"},[d]:{code:-32603,message:"Internal error"},[x]:{code:-32e3,message:"Server error"}},b=x},84275:(bt,be,Y)=>{"use strict";var ie=Y(38572);Y.o(ie,"IJsonRpcProvider")&&Y.d(be,{IJsonRpcProvider:function(){return ie.IJsonRpcProvider}}),Y.o(ie,"formatJsonRpcError")&&Y.d(be,{formatJsonRpcError:function(){return ie.formatJsonRpcError}}),Y.o(ie,"formatJsonRpcRequest")&&Y.d(be,{formatJsonRpcRequest:function(){return ie.formatJsonRpcRequest}}),Y.o(ie,"formatJsonRpcResult")&&Y.d(be,{formatJsonRpcResult:function(){return ie.formatJsonRpcResult}}),Y.o(ie,"getBigIntRpcId")&&Y.d(be,{getBigIntRpcId:function(){return ie.getBigIntRpcId}}),Y.o(ie,"isHttpUrl")&&Y.d(be,{isHttpUrl:function(){return ie.isHttpUrl}}),Y.o(ie,"isJsonRpcError")&&Y.d(be,{isJsonRpcError:function(){return ie.isJsonRpcError}}),Y.o(ie,"isJsonRpcRequest")&&Y.d(be,{isJsonRpcRequest:function(){return ie.isJsonRpcRequest}}),Y.o(ie,"isJsonRpcResponse")&&Y.d(be,{isJsonRpcResponse:function(){return ie.isJsonRpcResponse}}),Y.o(ie,"isJsonRpcResult")&&Y.d(be,{isJsonRpcResult:function(){return ie.isJsonRpcResult}}),Y.o(ie,"isLocalhostUrl")&&Y.d(be,{isLocalhostUrl:function(){return ie.isLocalhostUrl}}),Y.o(ie,"isReactNative")&&Y.d(be,{isReactNative:function(){return ie.isReactNative}}),Y.o(ie,"isWsUrl")&&Y.d(be,{isWsUrl:function(){return ie.isWsUrl}}),Y.o(ie,"payloadId")&&Y.d(be,{payloadId:function(){return ie.payloadId}})},93938:(bt,be,Y)=>{"use strict";Y.d(be,{i5:()=>O,by:()=>d,L2:()=>x,CX:()=>T});var ie=Y(52885);function O(g){return ie.dQ.includes(g)}function d(g){return Object.keys(ie.xK).includes(g)?ie.xK[g]:ie.xK[ie.JV]}function x(g){return Object.values(ie.xK).find(l=>l.code===g)||ie.xK[ie.JV]}function T(g,b,l){return g.message.includes("getaddrinfo ENOTFOUND")||g.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${l} RPC url at ${b}`):g}},90863:(bt,be,Y)=>{"use strict";Y.d(be,{o0:()=>O,CS:()=>E,sT:()=>d,tm:()=>x,RI:()=>f});var ie=Y(93938),z=Y(52885);function O(g=3){return Date.now()*Math.pow(10,g)+Math.floor(Math.random()*Math.pow(10,g))}function E(g=6){return BigInt(O(g))}function d(g,b,l){return{id:l||O(),jsonrpc:"2.0",method:g,params:b}}function x(g,b){return{id:g,jsonrpc:"2.0",result:b}}function f(g,b,l){return{id:g,jsonrpc:"2.0",error:T(b,l)}}function T(g,b){return void 0===g?(0,ie.by)(z.O4):("string"==typeof g&&(g=Object.assign(Object.assign({},(0,ie.by)(z.CA)),{message:g})),void 0!==b&&(g.data=b),(0,ie.i5)(g.code)&&(g=(0,ie.L2)(g.code)),g)}},22339:(bt,be,Y)=>{"use strict";Y.d(be,{CX:()=>z.CX,formatJsonRpcError:()=>E.RI,formatJsonRpcRequest:()=>E.sT,formatJsonRpcResult:()=>E.tm,getBigIntRpcId:()=>E.CS,payloadId:()=>E.o0,IJsonRpcProvider:()=>d.x0,isHttpUrl:()=>x.jK,isLocalhostUrl:()=>x.JF,isWsUrl:()=>x.UZ,isJsonRpcError:()=>f.jg,isJsonRpcRequest:()=>f.DW,isJsonRpcResponse:()=>f.u,isJsonRpcResult:()=>f.k4}),Y(52885);var z=Y(93938),O=Y(84275);Y.o(O,"IJsonRpcProvider")&&Y.d(be,{IJsonRpcProvider:function(){return O.IJsonRpcProvider}}),Y.o(O,"formatJsonRpcError")&&Y.d(be,{formatJsonRpcError:function(){return O.formatJsonRpcError}}),Y.o(O,"formatJsonRpcRequest")&&Y.d(be,{formatJsonRpcRequest:function(){return O.formatJsonRpcRequest}}),Y.o(O,"formatJsonRpcResult")&&Y.d(be,{formatJsonRpcResult:function(){return O.formatJsonRpcResult}}),Y.o(O,"getBigIntRpcId")&&Y.d(be,{getBigIntRpcId:function(){return O.getBigIntRpcId}}),Y.o(O,"isHttpUrl")&&Y.d(be,{isHttpUrl:function(){return O.isHttpUrl}}),Y.o(O,"isJsonRpcError")&&Y.d(be,{isJsonRpcError:function(){return O.isJsonRpcError}}),Y.o(O,"isJsonRpcRequest")&&Y.d(be,{isJsonRpcRequest:function(){return O.isJsonRpcRequest}}),Y.o(O,"isJsonRpcResponse")&&Y.d(be,{isJsonRpcResponse:function(){return O.isJsonRpcResponse}}),Y.o(O,"isJsonRpcResult")&&Y.d(be,{isJsonRpcResult:function(){return O.isJsonRpcResult}}),Y.o(O,"isLocalhostUrl")&&Y.d(be,{isLocalhostUrl:function(){return O.isLocalhostUrl}}),Y.o(O,"isReactNative")&&Y.d(be,{isReactNative:function(){return O.isReactNative}}),Y.o(O,"isWsUrl")&&Y.d(be,{isWsUrl:function(){return O.isWsUrl}}),Y.o(O,"payloadId")&&Y.d(be,{payloadId:function(){return O.payloadId}});var E=Y(90863),d=Y(57572),x=Y(96796),f=Y(9087)},57572:(bt,be,Y)=>{"use strict";Y.d(be,{x0:()=>E});class E extends class extends class{}{constructor(){super()}}{constructor(x){super()}}},96796:(bt,be,Y)=>{"use strict";function E(T,g){const b=function(T){const g=T.match(new RegExp(/^\w+:/,"gi"));if(g&&g.length)return g[0]}(T);return void 0!==b&&new RegExp(g).test(b)}function d(T){return E(T,"^https?:")}function x(T){return E(T,"^wss?:")}function f(T){return new RegExp("wss?://localhost(:d{2,5})?").test(T)}Y.d(be,{jK:()=>d,UZ:()=>x,JF:()=>f})},9087:(bt,be,Y)=>{"use strict";function ie(f){return"object"==typeof f&&"id"in f&&"jsonrpc"in f&&"2.0"===f.jsonrpc}function z(f){return ie(f)&&"method"in f}function O(f){return ie(f)&&(E(f)||d(f))}function E(f){return"result"in f}function d(f){return"error"in f}Y.d(be,{DW:()=>z,u:()=>O,k4:()=>E,jg:()=>d})},57808:(bt,be,Y)=>{"use strict";Y.d(be,{Z:()=>w});var ie=Y(34553),z=Y(93105);var f=Y(22339);const l=S=>S.split("?")[0],u="undefined"!=typeof WebSocket?WebSocket:"undefined"!=typeof global&&void 0!==global.WebSocket?global.WebSocket:"undefined"!=typeof window&&void 0!==window.WebSocket?window.WebSocket:"undefined"!=typeof self&&void 0!==self.WebSocket?self.WebSocket:Y(98164),w=class{constructor(I){if(this.url=I,this.events=new z.EventEmitter,this.registering=!1,!(0,f.isWsUrl)(I))throw new Error(`Provided URL is not compatible with WebSocket connection: ${I}`);this.url=I}get connected(){return void 0!==this.socket}get connecting(){return this.registering}on(I,P){this.events.on(I,P)}once(I,P){this.events.once(I,P)}off(I,P){this.events.off(I,P)}removeListener(I,P){this.events.removeListener(I,P)}open(I=this.url){var P=this;return(0,ie.Z)(function*(){yield P.register(I)})()}close(){var I=this;return(0,ie.Z)(function*(){return new Promise((P,L)=>{void 0!==I.socket?(I.socket.onclose=V=>{I.onClose(V),P()},I.socket.close()):L(new Error("Connection already closed"))})})()}send(I,P){var L=this;return(0,ie.Z)(function*(){void 0===L.socket&&(L.socket=yield L.register());try{L.socket.send("string"==typeof(S=I)?S:(S=>JSON.stringify(S,(I,P)=>"bigint"==typeof P?P.toString()+"n":P))(S)||"")}catch(V){L.onError(I.id,V)}var S})()}register(I=this.url){if(!(0,f.isWsUrl)(I))throw new Error(`Provided URL is not compatible with WebSocket connection: ${I}`);if(this.registering){const P=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=P||this.events.listenerCount("open")>=P)&&this.events.setMaxListeners(P+1),new Promise((L,V)=>{this.events.once("register_error",W=>{this.resetMaxListeners(),V(W)}),this.events.once("open",()=>{if(this.resetMaxListeners(),void 0===this.socket)return V(new Error("WebSocket connection is missing or invalid"));L(this.socket)})})}return this.url=I,this.registering=!0,new Promise((P,L)=>{const V=(0,f.isReactNative)()?void 0:{rejectUnauthorized:!(0,f.isLocalhostUrl)(I)},W=new u(I,[],V);"undefined"!=typeof WebSocket||"undefined"!=typeof global&&void 0!==global.WebSocket||"undefined"!=typeof window&&void 0!==window.WebSocket||"undefined"!=typeof self&&void 0!==self.WebSocket?W.onerror=G=>{L(this.emitError(G.error))}:W.on("error",G=>{L(this.emitError(G))}),W.onopen=()=>{this.onOpen(W),P(W)}})}onOpen(I){I.onmessage=P=>this.onPayload(P),I.onclose=P=>this.onClose(P),this.socket=I,this.registering=!1,this.events.emit("open")}onClose(I){this.socket=void 0,this.registering=!1,this.events.emit("close",I)}onPayload(I){if(void 0===I.data)return;const P="string"==typeof I.data?function(S){if("string"!=typeof S)throw new Error("Cannot safe json parse value of type "+typeof S);try{return(S=>{const P=S.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(P,(L,V)=>"string"==typeof V&&V.match(/^\d+n$/)?BigInt(V.substring(0,V.length-1)):V)})(S)}catch{return S}}(I.data):I.data;this.events.emit("payload",P)}onError(I,P){const L=this.parseError(P),V=L.message||L.toString(),W=(0,f.formatJsonRpcError)(I,V);this.events.emit("payload",W)}parseError(I,P=this.url){return(0,f.CX)(I,l(P),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(I){const P=this.parseError(new Error((null==I?void 0:I.message)||`WebSocket connection failed for host: ${l(this.url)}`));return this.events.emit("register_error",P),P}}},98164:bt=>{"use strict";bt.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},3226:(bt,be,Y)=>{"use strict";const z=Y(57436),O=Y(28898),E=z.__importDefault(Y(87733)),d=Y(54653);be.ZP=class{constructor(){this.localStorage=E.default}getKeys(){return z.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return z.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(d.parseEntry)})}getItem(T){return z.__awaiter(this,void 0,void 0,function*(){const g=this.localStorage.getItem(T);if(null!==g)return O.safeJsonParse(g)})}setItem(T,g){return z.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(T,O.safeJsonStringify(g))})}removeItem(T){return z.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(T)})}}},87733:bt=>{"use strict";!function(){let be;function Y(){}be=Y,be.prototype.getItem=function(ie){return this.hasOwnProperty(ie)?String(this[ie]):null},be.prototype.setItem=function(ie,z){this[ie]=String(z)},be.prototype.removeItem=function(ie){delete this[ie]},be.prototype.clear=function(){const ie=this;Object.keys(ie).forEach(function(z){ie[z]=void 0,delete ie[z]})},be.prototype.key=function(ie){return ie=ie||0,Object.keys(this)[ie]},be.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),bt.exports="undefined"!=typeof global&&global.localStorage?global.localStorage:"undefined"!=typeof window&&window.localStorage?window.localStorage:new Y}()},54653:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(57436);ie.__exportStar(Y(87402),be),ie.__exportStar(Y(94164),be)},87402:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.IKeyValueStorage=void 0,be.IKeyValueStorage=class{}},94164:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.parseEntry=void 0;const ie=Y(28898);be.parseEntry=function(O){var E;return[O[0],ie.safeJsonParse(null!==(E=O[1])&&void 0!==E?E:"")]}},73671:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.PINO_CUSTOM_CONTEXT_KEY=be.PINO_LOGGER_DEFAULTS=void 0,be.PINO_LOGGER_DEFAULTS={level:"info"},be.PINO_CUSTOM_CONTEXT_KEY="custom_context"},66486:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.pino=void 0;const ie=Y(17978),z=ie.__importDefault(Y(22694));Object.defineProperty(be,"pino",{enumerable:!0,get:function(){return z.default}}),ie.__exportStar(Y(73671),be),ie.__exportStar(Y(70769),be)},70769:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.generateChildLogger=be.formatChildLoggerContext=be.getLoggerContext=be.setBrowserLoggerContext=be.getBrowserLoggerContext=be.getDefaultLoggerOptions=void 0;const ie=Y(73671);function O(T,g=ie.PINO_CUSTOM_CONTEXT_KEY){return T[g]||""}function E(T,g,b=ie.PINO_CUSTOM_CONTEXT_KEY){return T[b]=g,T}function d(T,g=ie.PINO_CUSTOM_CONTEXT_KEY){let b="";return b=void 0===T.bindings?O(T,g):T.bindings().context||"",b}function x(T,g,b=ie.PINO_CUSTOM_CONTEXT_KEY){const l=d(T,b);return l.trim()?`${l}/${g}`:g}be.getDefaultLoggerOptions=function(T){return Object.assign(Object.assign({},T),{level:(null==T?void 0:T.level)||ie.PINO_LOGGER_DEFAULTS.level})},be.getBrowserLoggerContext=O,be.setBrowserLoggerContext=E,be.getLoggerContext=d,be.formatChildLoggerContext=x,be.generateChildLogger=function(T,g,b=ie.PINO_CUSTOM_CONTEXT_KEY){const l=x(T,g,b);return E(T.child({context:l}),l,b)}},9964:(bt,be,Y)=>{"use strict";Y.d(be,{RELAY_JSONRPC:()=>z}),Y(45785);const z={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}}},45785:()=>{},62757:(bt,be,Y)=>{"use strict";Y.d(be,{encodeIss:()=>o,generateKeyPair:()=>a,signJWT:()=>B});var ie=Y(34553),z=Y(47903),O=Y(52632),E=Y(14611);const d="EdDSA",T="base64url",h="did",u="key",m="base58btc";var P=Y(15703),L=Y(88838),V=Y(47366);function R(we){return(0,L.B)((0,V.m)(function(we){return"string"==typeof we?we:(we=>JSON.stringify(we,(ae,Te)=>"bigint"==typeof Te?Te.toString()+"n":Te))(we)||""}(we),"utf8"),T)}function o(we){const ae=(0,V.m)("K36",m),Te="z"+(0,L.B)((0,P.z)([ae,we]),m);return[h,u,Te].join(":")}function M(we){return(0,L.B)(we,T)}function k(we){return(0,V.m)([R(we.header),R(we.payload)].join("."),"utf8")}function N(we){return[R(we.header),R(we.payload),M(we.signature)].join(".")}function a(we=(0,O.randomBytes)(32)){return z._w(we)}function B(we,ae,Te,le){return Q.apply(this,arguments)}function Q(){return(Q=(0,ie.Z)(function*(we,ae,Te,le,X=(0,E.fromMiliseconds)(Date.now())){const ne={alg:d,typ:"JWT"},xe={iss:o(le.publicKey),sub:we,aud:ae,iat:X,exp:X+Te},Ce=k({header:ne,payload:xe});return N({header:ne,payload:xe,signature:z.Xx(le.secretKey,Ce)})})).apply(this,arguments)}Y(58083)},58083:()=>{},78847:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(80017);ie.__exportStar(Y(77662),be),ie.__exportStar(Y(28456),be)},77662:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ONE_THOUSAND=be.ONE_HUNDRED=void 0,be.ONE_HUNDRED=100,be.ONE_THOUSAND=1e3},28456:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ONE_YEAR=be.FOUR_WEEKS=be.THREE_WEEKS=be.TWO_WEEKS=be.ONE_WEEK=be.THIRTY_DAYS=be.SEVEN_DAYS=be.FIVE_DAYS=be.THREE_DAYS=be.ONE_DAY=be.TWENTY_FOUR_HOURS=be.TWELVE_HOURS=be.SIX_HOURS=be.THREE_HOURS=be.ONE_HOUR=be.SIXTY_MINUTES=be.THIRTY_MINUTES=be.TEN_MINUTES=be.FIVE_MINUTES=be.ONE_MINUTE=be.SIXTY_SECONDS=be.THIRTY_SECONDS=be.TEN_SECONDS=be.FIVE_SECONDS=be.ONE_SECOND=void 0,be.ONE_SECOND=1,be.FIVE_SECONDS=5,be.TEN_SECONDS=10,be.THIRTY_SECONDS=30,be.SIXTY_SECONDS=60,be.ONE_MINUTE=be.SIXTY_SECONDS,be.FIVE_MINUTES=5*be.ONE_MINUTE,be.TEN_MINUTES=10*be.ONE_MINUTE,be.THIRTY_MINUTES=30*be.ONE_MINUTE,be.SIXTY_MINUTES=60*be.ONE_MINUTE,be.ONE_HOUR=be.SIXTY_MINUTES,be.THREE_HOURS=3*be.ONE_HOUR,be.SIX_HOURS=6*be.ONE_HOUR,be.TWELVE_HOURS=12*be.ONE_HOUR,be.TWENTY_FOUR_HOURS=24*be.ONE_HOUR,be.ONE_DAY=be.TWENTY_FOUR_HOURS,be.THREE_DAYS=3*be.ONE_DAY,be.FIVE_DAYS=5*be.ONE_DAY,be.SEVEN_DAYS=7*be.ONE_DAY,be.THIRTY_DAYS=30*be.ONE_DAY,be.ONE_WEEK=be.SEVEN_DAYS,be.TWO_WEEKS=2*be.ONE_WEEK,be.THREE_WEEKS=3*be.ONE_WEEK,be.FOUR_WEEKS=4*be.ONE_WEEK,be.ONE_YEAR=365*be.ONE_DAY},14611:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(80017);ie.__exportStar(Y(47344),be),ie.__exportStar(Y(1429),be),ie.__exportStar(Y(40214),be),ie.__exportStar(Y(78847),be)},40214:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),Y(80017).__exportStar(Y(47997),be)},47997:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.IWatch=void 0,be.IWatch=class{}},45442:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.fromMiliseconds=be.toMiliseconds=void 0;const ie=Y(78847);be.toMiliseconds=function(E){return E*ie.ONE_THOUSAND},be.fromMiliseconds=function(E){return Math.floor(E/ie.ONE_THOUSAND)}},67406:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.delay=void 0,be.delay=function(ie){return new Promise(z=>{setTimeout(()=>{z(!0)},ie)})}},47344:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(80017);ie.__exportStar(Y(67406),be),ie.__exportStar(Y(45442),be)},1429:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Watch=void 0;class Y{constructor(){this.timestamps=new Map}start(z){if(this.timestamps.has(z))throw new Error(`Watch already started for label: ${z}`);this.timestamps.set(z,{started:Date.now()})}stop(z){const O=this.get(z);if(void 0!==O.elapsed)throw new Error(`Watch already stopped for label: ${z}`);const E=Date.now()-O.started;this.timestamps.set(z,{started:O.started,elapsed:E})}get(z){const O=this.timestamps.get(z);if(void 0===O)throw new Error(`No timestamp found for label: ${z}`);return O}elapsed(z){const O=this.get(z);return O.elapsed||Date.now()-O.started}}be.Watch=Y,be.default=Y},75274:(bt,be,Y)=>{"use strict";Y.d(be,{O$:()=>h,g$:()=>S});var ie=Y(16440),z=Y.n(ie),O=Y(57966),E=Y(87686),x=z().BN;const f=new E.Yd("bignumber/5.5.0"),T={},g=9007199254740991;let l=!1;class h{constructor(L,V){f.checkNew(new.target,h),L!==T&&f.throwError("cannot call constructor directly; use BigNumber.from",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=V,this._isBigNumber=!0,Object.freeze(this)}fromTwos(L){return m(_(this).fromTwos(L))}toTwos(L){return m(_(this).toTwos(L))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(L){return m(_(this).add(_(L)))}sub(L){return m(_(this).sub(_(L)))}div(L){return h.from(L).isZero()&&w("division by zero","div"),m(_(this).div(_(L)))}mul(L){return m(_(this).mul(_(L)))}mod(L){const V=_(L);return V.isNeg()&&w("cannot modulo negative values","mod"),m(_(this).umod(V))}pow(L){const V=_(L);return V.isNeg()&&w("cannot raise to negative values","pow"),m(_(this).pow(V))}and(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("cannot 'and' negative values","and"),m(_(this).and(V))}or(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("cannot 'or' negative values","or"),m(_(this).or(V))}xor(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("cannot 'xor' negative values","xor"),m(_(this).xor(V))}mask(L){return(this.isNegative()||L<0)&&w("cannot mask negative values","mask"),m(_(this).maskn(L))}shl(L){return(this.isNegative()||L<0)&&w("cannot shift negative values","shl"),m(_(this).shln(L))}shr(L){return(this.isNegative()||L<0)&&w("cannot shift negative values","shr"),m(_(this).shrn(L))}eq(L){return _(this).eq(_(L))}lt(L){return _(this).lt(_(L))}lte(L){return _(this).lte(_(L))}gt(L){return _(this).gt(_(L))}gte(L){return _(this).gte(_(L))}isNegative(){return"-"===this._hex[0]}isZero(){return _(this).isZero()}toNumber(){try{return _(this).toNumber()}catch{w("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return f.throwError("this platform does not support BigInt",E.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?l||(l=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):f.throwError(16===arguments[0]?"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()":"BigNumber.toString does not accept parameters",E.Yd.errors.UNEXPECTED_ARGUMENT,{})),_(this).toString(10)}toHexString(){return this._hex}toJSON(L){return{type:"BigNumber",hex:this.toHexString()}}static from(L){if(L instanceof h)return L;if("string"==typeof L)return L.match(/^-?0x[0-9a-f]+$/i)?new h(T,u(L)):L.match(/^-?[0-9]+$/)?new h(T,u(new x(L))):f.throwArgumentError("invalid BigNumber string","value",L);if("number"==typeof L)return L%1&&w("underflow","BigNumber.from",L),(L>=g||L<=-g)&&w("overflow","BigNumber.from",L),h.from(String(L));const V=L;if("bigint"==typeof V)return h.from(V.toString());if((0,O._t)(V))return h.from((0,O.Dv)(V));if(V)if(V.toHexString){const W=V.toHexString();if("string"==typeof W)return h.from(W)}else{let W=V._hex;if(null==W&&"BigNumber"===V.type&&(W=V.hex),"string"==typeof W&&((0,O.A7)(W)||"-"===W[0]&&(0,O.A7)(W.substring(1))))return h.from(W)}return f.throwArgumentError("invalid BigNumber value","value",L)}static isBigNumber(L){return!(!L||!L._isBigNumber)}}function u(P){if("string"!=typeof P)return u(P.toString(16));if("-"===P[0])return"-"===(P=P.substring(1))[0]&&f.throwArgumentError("invalid hex","value",P),"0x00"===(P=u(P))?P:"-"+P;if("0x"!==P.substring(0,2)&&(P="0x"+P),"0x"===P)return"0x00";for(P.length%2&&(P="0x0"+P.substring(2));P.length>4&&"0x00"===P.substring(0,4);)P="0x"+P.substring(4);return P}function m(P){return h.from(u(P))}function _(P){const L=h.from(P).toHexString();return new x("-"===L[0]?"-"+L.substring(3):L.substring(2),16)}function w(P,L,V){const W={fault:P,operation:L};return null!=V&&(W.value=V),f.throwError(P,E.Yd.errors.NUMERIC_FAULT,W)}function S(P){return new x(P,36).toString(16)}},57966:(bt,be,Y)=>{"use strict";Y.d(be,{lE:()=>g,zo:()=>b,xs:()=>I,E1:()=>w,p3:()=>S,$P:()=>P,$m:()=>V,Dv:()=>_,_t:()=>T,Zq:()=>x,A7:()=>u,N:()=>W,G1:()=>l});const O=new(Y(87686).Yd)("bytes/5.5.0");function E(H){return!!H.toHexString}function d(H){return H.slice||(H.slice=function(){const j=Array.prototype.slice.call(arguments);return d(new Uint8Array(Array.prototype.slice.apply(H,j)))}),H}function x(H){return u(H)&&!(H.length%2)||T(H)}function f(H){return"number"==typeof H&&H==H&&H%1==0}function T(H){if(null==H)return!1;if(H.constructor===Uint8Array)return!0;if("string"==typeof H||!f(H.length)||H.length<0)return!1;for(let j=0;j=256)return!1}return!0}function g(H,j){if(j||(j={}),"number"==typeof H){O.checkSafeUint53(H,"invalid arrayify value");const K=[];for(;H;)K.unshift(255&H),H=parseInt(String(H/256));return 0===K.length&&K.push(0),d(new Uint8Array(K))}if(j.allowMissingPrefix&&"string"==typeof H&&"0x"!==H.substring(0,2)&&(H="0x"+H),E(H)&&(H=H.toHexString()),u(H)){let K=H.substring(2);K.length%2&&("left"===j.hexPad?K="0x0"+K.substring(2):"right"===j.hexPad?K+="0":O.throwArgumentError("hex data is odd-length","value",H));const R=[];for(let o=0;og(o)),K=j.reduce((o,y)=>o+y.length,0),R=new Uint8Array(K);return j.reduce((o,y)=>(R.set(y,o),o+y.length),0),d(R)}function l(H){let j=g(H);if(0===j.length)return j;let K=0;for(;K>4]+m[15&o]}return K}return O.throwArgumentError("invalid hexlify value","value",H)}function w(H){if("string"!=typeof H)H=_(H);else if(!u(H)||H.length%2)return null;return(H.length-2)/2}function S(H,j,K){return"string"!=typeof H?H=_(H):(!u(H)||H.length%2)&&O.throwArgumentError("invalid hexData","value",H),j=2+2*j,null!=K?"0x"+H.substring(j,2+2*K):"0x"+H.substring(j)}function I(H){let j="0x";return H.forEach(K=>{j+=_(K).substring(2)}),j}function P(H){const j=function(H){"string"!=typeof H&&(H=_(H)),u(H)||O.throwArgumentError("invalid hex string","value",H),H=H.substring(2);let j=0;for(;j2*j+2&&O.throwArgumentError("value out of range","value",arguments[1]);H.length<2*j+2;)H="0x0"+H.substring(2);return H}function W(H){const j={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(x(H)){const K=g(H);65!==K.length&&O.throwArgumentError("invalid signature string; must be 65 bytes","signature",H),j.r=_(K.slice(0,32)),j.s=_(K.slice(32,64)),j.v=K[64],j.v<27&&(0===j.v||1===j.v?j.v+=27:O.throwArgumentError("signature invalid v byte","signature",H)),j.recoveryParam=1-j.v%2,j.recoveryParam&&(K[32]|=128),j._vs=_(K.slice(32,64))}else{if(j.r=H.r,j.s=H.s,j.v=H.v,j.recoveryParam=H.recoveryParam,j._vs=H._vs,null!=j._vs){const o=function(H,j){(H=g(H)).length>j&&O.throwArgumentError("value out of range","value",arguments[0]);const K=new Uint8Array(j);return K.set(H,j-H.length),d(K)}(g(j._vs),32);j._vs=_(o);const y=o[0]>=128?1:0;null==j.recoveryParam?j.recoveryParam=y:j.recoveryParam!==y&&O.throwArgumentError("signature recoveryParam mismatch _vs","signature",H),o[0]&=127;const M=_(o);null==j.s?j.s=M:j.s!==M&&O.throwArgumentError("signature v mismatch _vs","signature",H)}null==j.recoveryParam?null==j.v?O.throwArgumentError("signature missing v and recoveryParam","signature",H):j.recoveryParam=0===j.v||1===j.v?j.v:1-j.v%2:null==j.v?j.v=27+j.recoveryParam:j.recoveryParam!==(0===j.v||1===j.v?j.v:1-j.v%2)&&O.throwArgumentError("signature recoveryParam mismatch v","signature",H),null!=j.r&&u(j.r)?j.r=V(j.r,32):O.throwArgumentError("signature missing or invalid r","signature",H),null!=j.s&&u(j.s)?j.s=V(j.s,32):O.throwArgumentError("signature missing or invalid s","signature",H);const K=g(j.s);K[0]>=128&&O.throwArgumentError("signature s out of range","signature",H),j.recoveryParam&&(K[0]|=128);const R=_(K);j._vs&&(u(j._vs)||O.throwArgumentError("signature invalid _vs","signature",H),j._vs=V(j._vs,32)),null==j._vs?j._vs=R:j._vs!==R&&O.throwArgumentError("signature _vs mismatch v and s","signature",H)}return j}},87686:(bt,be,Y)=>{"use strict";Y.d(be,{Yd:()=>h});let z=!1,O=!1;const E={debug:1,default:2,info:2,warning:3,error:4,off:5};let d=E.default,x=null;const T=function(){try{const u=[];if(["NFD","NFC","NFKD","NFKC"].forEach(m=>{try{if("test"!=="test".normalize(m))throw new Error("bad normalize")}catch{u.push(m)}}),u.length)throw new Error("missing "+u.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(u){return u.message}return null}();var g=(()=>{return(u=g||(g={})).DEBUG="DEBUG",u.INFO="INFO",u.WARNING="WARNING",u.ERROR="ERROR",u.OFF="OFF",g;var u})(),b=(()=>{return(u=b||(b={})).UNKNOWN_ERROR="UNKNOWN_ERROR",u.NOT_IMPLEMENTED="NOT_IMPLEMENTED",u.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",u.NETWORK_ERROR="NETWORK_ERROR",u.SERVER_ERROR="SERVER_ERROR",u.TIMEOUT="TIMEOUT",u.BUFFER_OVERRUN="BUFFER_OVERRUN",u.NUMERIC_FAULT="NUMERIC_FAULT",u.MISSING_NEW="MISSING_NEW",u.INVALID_ARGUMENT="INVALID_ARGUMENT",u.MISSING_ARGUMENT="MISSING_ARGUMENT",u.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",u.CALL_EXCEPTION="CALL_EXCEPTION",u.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",u.NONCE_EXPIRED="NONCE_EXPIRED",u.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",u.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",u.TRANSACTION_REPLACED="TRANSACTION_REPLACED",b;var u})();const l="0123456789abcdef";let h=(()=>{class u{constructor(_){Object.defineProperty(this,"version",{enumerable:!0,value:_,writable:!1})}_log(_,w){const S=_.toLowerCase();null==E[S]&&this.throwArgumentError("invalid log level name","logLevel",_),!(d>E[S])&&console.log.apply(console,w)}debug(..._){this._log(u.levels.DEBUG,_)}info(..._){this._log(u.levels.INFO,_)}warn(..._){this._log(u.levels.WARNING,_)}makeError(_,w,S){if(O)return this.makeError("censored error",w,{});w||(w=u.errors.UNKNOWN_ERROR),S||(S={});const I=[];Object.keys(S).forEach(V=>{const W=S[V];try{if(W instanceof Uint8Array){let G="";for(let H=0;H>4],G+=l[15&W[H]];I.push(V+"=Uint8Array(0x"+G+")")}else I.push(V+"="+JSON.stringify(W))}catch{I.push(V+"="+JSON.stringify(S[V].toString()))}}),I.push(`code=${w}`),I.push(`version=${this.version}`);const P=_;I.length&&(_+=" ("+I.join(", ")+")");const L=new Error(_);return L.reason=P,L.code=w,Object.keys(S).forEach(function(V){L[V]=S[V]}),L}throwError(_,w,S){throw this.makeError(_,w,S)}throwArgumentError(_,w,S){return this.throwError(_,u.errors.INVALID_ARGUMENT,{argument:w,value:S})}assert(_,w,S,I){_||this.throwError(w,S,I)}assertArgument(_,w,S,I){_||this.throwArgumentError(w,S,I)}checkNormalize(_){null==_&&(_="platform missing String.prototype.normalize"),T&&this.throwError("platform missing String.prototype.normalize",u.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:T})}checkSafeUint53(_,w){"number"==typeof _&&(null==w&&(w="value not safe"),(_<0||_>=9007199254740991)&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:_}),_%1&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:_}))}checkArgumentCount(_,w,S){S=S?": "+S:"",_w&&this.throwError("too many arguments"+S,u.errors.UNEXPECTED_ARGUMENT,{count:_,expectedCount:w})}checkNew(_,w){(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}checkAbstract(_,w){_===w?this.throwError("cannot instantiate abstract class "+JSON.stringify(w.name)+" directly; use a sub-class",u.errors.UNSUPPORTED_OPERATION,{name:_.name,operation:"new"}):(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}static globalLogger(){return x||(x=new u("logger/5.5.0")),x}static setCensorship(_,w){if(!_&&w&&this.globalLogger().throwError("cannot permanently disable censorship",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),z){if(!_)return;this.globalLogger().throwError("error censorship permanent",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}O=!!_,z=!!w}static setLogLevel(_){const w=E[_.toLowerCase()];null!=w?d=w:u.globalLogger().warn("invalid log level - "+_)}static from(_){return new u(_)}}return u.errors=b,u.levels=g,u})()},16440:function(bt,be,Y){!function(ie,z){"use strict";function O(R,o){if(!R)throw new Error(o||"Assertion failed")}function E(R,o){R.super_=o;var y=function(){};y.prototype=o.prototype,R.prototype=new y,R.prototype.constructor=R}function d(R,o,y){if(d.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,null!==R&&(("le"===o||"be"===o)&&(y=o,o=10),this._init(R||0,o||10,y||"be"))}var x;"object"==typeof ie?ie.exports=d:z.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(5612).Buffer}catch{}function f(R,o){var y=R.charCodeAt(o);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Yr=0|k[3],Ln=8191&Yr,Bn=Yr>>>13,$r=0|k[4],Gn=8191&$r,bn=$r>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,Gn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,Gn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,Gn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,Gn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,Gn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,Gn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,Gn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,Gn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,Gn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,Gn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,Gn),a=(a=Math.imul(St,bn))+Math.imul(Wt,Gn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},94654:(bt,be,Y)=>{"use strict";Y.d(be,{X:()=>z});var ie=Y(6704);class z extends ie.x{constructor(E){super(),this._value=E}get value(){return this.getValue()}_subscribe(E){const d=super._subscribe(E);return!d.closed&&E.next(this._value),d}getValue(){const{hasError:E,thrownError:d,_value:x}=this;if(E)throw d;return this._throwIfClosed(),x}next(E){super.next(this._value=E)}}},96837:(bt,be,Y)=>{"use strict";Y.d(be,{y:()=>b});var ie=Y(70598),z=Y(72095),O=Y(41385),E=Y(62594);var f=Y(78951),T=Y(23854),g=Y(72752);let b=(()=>{class m{constructor(w){w&&(this._subscribe=w)}lift(w){const S=new m;return S.source=this,S.operator=w,S}subscribe(w,S,I){const P=function(m){return m&&m instanceof ie.Lv||function(m){return m&&(0,T.m)(m.next)&&(0,T.m)(m.error)&&(0,T.m)(m.complete)}(m)&&(0,z.Nn)(m)}(w)?w:new ie.Hp(w,S,I);return(0,g.x)(()=>{const{operator:L,source:V}=this;P.add(L?L.call(P,V):V?this._subscribe(P):this._trySubscribe(P))}),P}_trySubscribe(w){try{return this._subscribe(w)}catch(S){w.error(S)}}forEach(w,S){return new(S=l(S))((I,P)=>{const L=new ie.Hp({next:V=>{try{w(V)}catch(W){P(W),L.unsubscribe()}},error:P,complete:I});this.subscribe(L)})}_subscribe(w){var S;return null===(S=this.source)||void 0===S?void 0:S.subscribe(w)}[O.L](){return this}pipe(...w){return function(m){return 0===m.length?E.y:1===m.length?m[0]:function(w){return m.reduce((S,I)=>I(S),w)}}(w)(this)}toPromise(w){return new(w=l(w))((S,I)=>{let P;this.subscribe(L=>P=L,L=>I(L),()=>S(P))})}}return m.create=_=>new m(_),m})();function l(m){var _;return null!==(_=m??f.v.Promise)&&void 0!==_?_:Promise}},6704:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>f});var ie=Y(96837),z=Y(72095);const E=(0,Y(79526).d)(g=>function(){g(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var d=Y(36821),x=Y(72752);let f=(()=>{class g extends ie.y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(l){const h=new T(this,this);return h.operator=l,h}_throwIfClosed(){if(this.closed)throw new E}next(l){(0,x.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const h of this.currentObservers)h.next(l)}})}error(l){(0,x.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=l;const{observers:h}=this;for(;h.length;)h.shift().error(l)}})}complete(){(0,x.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:l}=this;for(;l.length;)l.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var l;return(null===(l=this.observers)||void 0===l?void 0:l.length)>0}_trySubscribe(l){return this._throwIfClosed(),super._trySubscribe(l)}_subscribe(l){return this._throwIfClosed(),this._checkFinalizedStatuses(l),this._innerSubscribe(l)}_innerSubscribe(l){const{hasError:h,isStopped:u,observers:m}=this;return h||u?z.Lc:(this.currentObservers=null,m.push(l),new z.w0(()=>{this.currentObservers=null,(0,d.P)(m,l)}))}_checkFinalizedStatuses(l){const{hasError:h,thrownError:u,isStopped:m}=this;h?l.error(u):m&&l.complete()}asObservable(){const l=new ie.y;return l.source=this,l}}return g.create=(b,l)=>new T(b,l),g})();class T extends f{constructor(b,l){super(),this.destination=b,this.source=l}next(b){var l,h;null===(h=null===(l=this.destination)||void 0===l?void 0:l.next)||void 0===h||h.call(l,b)}error(b){var l,h;null===(h=null===(l=this.destination)||void 0===l?void 0:l.error)||void 0===h||h.call(l,b)}complete(){var b,l;null===(l=null===(b=this.destination)||void 0===b?void 0:b.complete)||void 0===l||l.call(b)}_subscribe(b){var l,h;return null!==(h=null===(l=this.source)||void 0===l?void 0:l.subscribe(b))&&void 0!==h?h:z.Lc}}},70598:(bt,be,Y)=>{"use strict";Y.d(be,{Hp:()=>w,Lv:()=>h});var ie=Y(23854),z=Y(72095),O=Y(78951),E=Y(77833),d=Y(72556);const x=g("C",void 0,void 0);function g(V,W,G){return{kind:V,value:W,error:G}}var b=Y(35888),l=Y(72752);class h extends z.w0{constructor(W){super(),this.isStopped=!1,W?(this.destination=W,(0,z.Nn)(W)&&W.add(this)):this.destination=L}static create(W,G,H){return new w(W,G,H)}next(W){this.isStopped?P(g("N",W,void 0),this):this._next(W)}error(W){this.isStopped?P(g("E",void 0,W),this):(this.isStopped=!0,this._error(W))}complete(){this.isStopped?P(x,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(W){this.destination.next(W)}_error(W){try{this.destination.error(W)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const u=Function.prototype.bind;function m(V,W){return u.call(V,W)}class _{constructor(W){this.partialObserver=W}next(W){const{partialObserver:G}=this;if(G.next)try{G.next(W)}catch(H){S(H)}}error(W){const{partialObserver:G}=this;if(G.error)try{G.error(W)}catch(H){S(H)}else S(W)}complete(){const{partialObserver:W}=this;if(W.complete)try{W.complete()}catch(G){S(G)}}}class w extends h{constructor(W,G,H){let j;if(super(),(0,ie.m)(W)||!W)j={next:W??void 0,error:G??void 0,complete:H??void 0};else{let K;this&&O.v.useDeprecatedNextContext?(K=Object.create(W),K.unsubscribe=()=>this.unsubscribe(),j={next:W.next&&m(W.next,K),error:W.error&&m(W.error,K),complete:W.complete&&m(W.complete,K)}):j=W}this.destination=new _(j)}}function S(V){O.v.useDeprecatedSynchronousErrorHandling?(0,l.O)(V):(0,E.h)(V)}function P(V,W){const{onStoppedNotification:G}=O.v;G&&b.z.setTimeout(()=>G(V,W))}const L={closed:!0,next:d.Z,error:function(V){throw V},complete:d.Z}},72095:(bt,be,Y)=>{"use strict";Y.d(be,{Lc:()=>x,w0:()=>d,Nn:()=>f});var ie=Y(23854);const O=(0,Y(79526).d)(g=>function(l){g(this),this.message=l?`${l.length} errors occurred during unsubscription:\n${l.map((h,u)=>`${u+1}) ${h.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=l});var E=Y(36821);class d{constructor(b){this.initialTeardown=b,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let b;if(!this.closed){this.closed=!0;const{_parentage:l}=this;if(l)if(this._parentage=null,Array.isArray(l))for(const m of l)m.remove(this);else l.remove(this);const{initialTeardown:h}=this;if((0,ie.m)(h))try{h()}catch(m){b=m instanceof O?m.errors:[m]}const{_finalizers:u}=this;if(u){this._finalizers=null;for(const m of u)try{T(m)}catch(_){b=b??[],_ instanceof O?b=[...b,..._.errors]:b.push(_)}}if(b)throw new O(b)}}add(b){var l;if(b&&b!==this)if(this.closed)T(b);else{if(b instanceof d){if(b.closed||b._hasParent(this))return;b._addParent(this)}(this._finalizers=null!==(l=this._finalizers)&&void 0!==l?l:[]).push(b)}}_hasParent(b){const{_parentage:l}=this;return l===b||Array.isArray(l)&&l.includes(b)}_addParent(b){const{_parentage:l}=this;this._parentage=Array.isArray(l)?(l.push(b),l):l?[l,b]:b}_removeParent(b){const{_parentage:l}=this;l===b?this._parentage=null:Array.isArray(l)&&(0,E.P)(l,b)}remove(b){const{_finalizers:l}=this;l&&(0,E.P)(l,b),b instanceof d&&b._removeParent(this)}}d.EMPTY=(()=>{const g=new d;return g.closed=!0,g})();const x=d.EMPTY;function f(g){return g instanceof d||g&&"closed"in g&&(0,ie.m)(g.remove)&&(0,ie.m)(g.add)&&(0,ie.m)(g.unsubscribe)}function T(g){(0,ie.m)(g)?g():g.unsubscribe()}},78951:(bt,be,Y)=>{"use strict";Y.d(be,{v:()=>ie});const ie={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},67379:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>z});const z=new(Y(96837).y)(d=>d.complete())},19475:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>H});var ie=Y(44298),z=Y(14926),O=Y(51665),E=Y(74661);function d(j,K=0){return(0,O.e)((R,o)=>{R.subscribe((0,E.x)(o,y=>(0,z.f)(o,j,()=>o.next(y),K),()=>(0,z.f)(o,j,()=>o.complete(),K),y=>(0,z.f)(o,j,()=>o.error(y),K)))})}function x(j,K=0){return(0,O.e)((R,o)=>{o.add(j.schedule(()=>R.subscribe(o),K))})}var g=Y(96837),l=Y(82902),h=Y(23854);function m(j,K){if(!j)throw new Error("Iterable cannot be null");return new g.y(R=>{(0,z.f)(R,K,()=>{const o=j[Symbol.asyncIterator]();(0,z.f)(R,K,()=>{o.next().then(y=>{y.done?R.complete():R.next(y.value)})},0,!0)})})}var _=Y(92119),w=Y(54529),S=Y(27251),I=Y(49054),P=Y(98045),L=Y(56689),V=Y(51080);function H(j,K){return K?function(j,K){if(null!=j){if((0,_.c)(j))return function(j,K){return(0,ie.Xf)(j).pipe(x(K),d(K))}(j,K);if((0,S.z)(j))return function(j,K){return new g.y(R=>{let o=0;return K.schedule(function(){o===j.length?R.complete():(R.next(j[o++]),R.closed||this.schedule())})})}(j,K);if((0,w.t)(j))return function(j,K){return(0,ie.Xf)(j).pipe(x(K),d(K))}(j,K);if((0,P.D)(j))return m(j,K);if((0,I.T)(j))return function(j,K){return new g.y(R=>{let o;return(0,z.f)(R,K,()=>{o=j[l.h](),(0,z.f)(R,K,()=>{let y,M;try{({value:y,done:M}=o.next())}catch(v){return void R.error(v)}M?R.complete():R.next(y)},0,!0)}),()=>(0,h.m)(null==o?void 0:o.return)&&o.return()})}(j,K);if((0,V.L)(j))return function(j,K){return m((0,V.Q)(j),K)}(j,K)}throw(0,L.z)(j)}(j,K):(0,ie.Xf)(j)}},44298:(bt,be,Y)=>{"use strict";Y.d(be,{Xf:()=>u});var ie=Y(97582),z=Y(27251),O=Y(54529),E=Y(96837),d=Y(92119),x=Y(98045),f=Y(56689),T=Y(49054),g=Y(51080),b=Y(23854),l=Y(77833),h=Y(41385);function u(V){if(V instanceof E.y)return V;if(null!=V){if((0,d.c)(V))return function(V){return new E.y(W=>{const G=V[h.L]();if((0,b.m)(G.subscribe))return G.subscribe(W);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(V);if((0,z.z)(V))return function(V){return new E.y(W=>{for(let G=0;G{V.then(G=>{W.closed||(W.next(G),W.complete())},G=>W.error(G)).then(null,l.h)})}(V);if((0,x.D)(V))return I(V);if((0,T.T)(V))return function(V){return new E.y(W=>{for(const G of V)if(W.next(G),W.closed)return;W.complete()})}(V);if((0,g.L)(V))return function(V){return I((0,g.Q)(V))}(V)}throw(0,f.z)(V)}function I(V){return new E.y(W=>{(function(V,W){var G,H,j,K;return(0,ie.__awaiter)(this,void 0,void 0,function*(){try{for(G=(0,ie.__asyncValues)(V);!(H=yield G.next()).done;)if(W.next(H.value),W.closed)return}catch(R){j={error:R}}finally{try{H&&!H.done&&(K=G.return)&&(yield K.call(G))}finally{if(j)throw j.error}}W.complete()})})(V,W).catch(G=>W.error(G))})}},74661:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>z});var ie=Y(70598);function z(E,d,x,f,T){return new O(E,d,x,f,T)}class O extends ie.Lv{constructor(d,x,f,T,g,b){super(d),this.onFinalize=g,this.shouldUnsubscribe=b,this._next=x?function(l){try{x(l)}catch(h){d.error(h)}}:super._next,this._error=T?function(l){try{T(l)}catch(h){d.error(h)}finally{this.unsubscribe()}}:super._error,this._complete=f?function(){try{f()}catch(l){d.error(l)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var d;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:x}=this;super.unsubscribe(),!x&&(null===(d=this.onFinalize)||void 0===d||d.call(this))}}}},83005:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>E});var ie=Y(62594),z=Y(51665),O=Y(74661);function E(x,f=ie.y){return x=x??d,(0,z.e)((T,g)=>{let b,l=!0;T.subscribe((0,O.x)(g,h=>{const u=f(h);(l||!x(b,u))&&(l=!1,b=u,g.next(h))}))})}function d(x,f){return x===f}},80909:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>O});var ie=Y(51665),z=Y(74661);function O(E,d){return(0,ie.e)((x,f)=>{let T=0;x.subscribe((0,z.x)(f,g=>E.call(d,g,T++)&&f.next(g)))})}},81163:(bt,be,Y)=>{"use strict";Y.d(be,{U:()=>O});var ie=Y(51665),z=Y(74661);function O(E,d){return(0,ie.e)((x,f)=>{let T=0;x.subscribe((0,z.x)(f,g=>{f.next(E.call(d,g,T++))}))})}},74204:(bt,be,Y)=>{"use strict";Y.d(be,{J:()=>O});var ie=Y(260),z=Y(62594);function O(E=1/0){return(0,ie.z)(z.y,E)}},260:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>T});var ie=Y(81163),z=Y(44298),O=Y(51665),d=(Y(14926),Y(74661)),f=Y(23854);function T(g,b,l=1/0){return(0,f.m)(b)?T((h,u)=>(0,ie.U)((m,_)=>b(h,m,u,_))((0,z.Xf)(g(h,u))),l):("number"==typeof b&&(l=b),(0,O.e)((h,u)=>function(g,b,l,h,u,m,_,w){const S=[];let I=0,P=0,L=!1;const V=()=>{L&&!S.length&&!I&&b.complete()},W=H=>I{I++;let j=!1;(0,z.Xf)(l(H,P++)).subscribe((0,d.x)(b,K=>{b.next(K)},()=>{j=!0},void 0,()=>{if(j)try{for(I--;S.length&&I{L=!0,V()})),()=>{}}(h,u,g,l)))}},45898:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>d});var ie=Y(44298),z=Y(6704),O=Y(70598),E=Y(51665);function d(f={}){const{connector:T=(()=>new z.x),resetOnError:g=!0,resetOnComplete:b=!0,resetOnRefCountZero:l=!0}=f;return h=>{let u,m,_,w=0,S=!1,I=!1;const P=()=>{null==m||m.unsubscribe(),m=void 0},L=()=>{P(),u=_=void 0,S=I=!1},V=()=>{const W=u;L(),null==W||W.unsubscribe()};return(0,E.e)((W,G)=>{w++,!I&&!S&&P();const H=_=_??T();G.add(()=>{w--,0===w&&!I&&!S&&(m=x(V,l))}),H.subscribe(G),!u&&w>0&&(u=new O.Hp({next:j=>H.next(j),error:j=>{I=!0,P(),m=x(L,g,j),H.error(j)},complete:()=>{S=!0,P(),m=x(L,b),H.complete()}}),(0,ie.Xf)(W).subscribe(u))})(h)}}function x(f,T,...g){if(!0===T)return void f();if(!1===T)return;const b=new O.Hp({next:()=>{b.unsubscribe(),f()}});return(0,ie.Xf)(T(...g)).subscribe(b)}},5677:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>d});var ie=Y(6704),z=Y(50150);class O extends ie.x{constructor(f=1/0,T=1/0,g=z.l){super(),this._bufferSize=f,this._windowTime=T,this._timestampProvider=g,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=T===1/0,this._bufferSize=Math.max(1,f),this._windowTime=Math.max(1,T)}next(f){const{isStopped:T,_buffer:g,_infiniteTimeWindow:b,_timestampProvider:l,_windowTime:h}=this;T||(g.push(f),!b&&g.push(l.now()+h)),this._trimBuffer(),super.next(f)}_subscribe(f){this._throwIfClosed(),this._trimBuffer();const T=this._innerSubscribe(f),{_infiniteTimeWindow:g,_buffer:b}=this,l=b.slice();for(let h=0;hnew O(g,f,T),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:b})}},36645:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>f});var ie=Y(74204),O=Y(66279),E=Y(19475);function d(...T){return(0,ie.J)(1)((0,E.D)(T,(0,O.yG)(T)))}var x=Y(51665);function f(...T){const g=(0,O.yG)(T);return(0,x.e)((b,l)=>{(g?d(T,b,g):d(T,b)).subscribe(l)})}},50150:(bt,be,Y)=>{"use strict";Y.d(be,{l:()=>ie});const ie={now:()=>(ie.delegate||Date).now(),delegate:void 0}},35888:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>ie});const ie={setTimeout(z,O,...E){const{delegate:d}=ie;return(null==d?void 0:d.setTimeout)?d.setTimeout(z,O,...E):setTimeout(z,O,...E)},clearTimeout(z){const{delegate:O}=ie;return((null==O?void 0:O.clearTimeout)||clearTimeout)(z)},delegate:void 0}},82902:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>z});const z="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},41385:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>ie});const ie="function"==typeof Symbol&&Symbol.observable||"@@observable"},66279:(bt,be,Y)=>{"use strict";Y.d(be,{_6:()=>x,jO:()=>E,yG:()=>d});var ie=Y(23854);function O(f){return f[f.length-1]}function E(f){return(0,ie.m)(O(f))?f.pop():void 0}function d(f){return function(f){return f&&(0,ie.m)(f.schedule)}(O(f))?f.pop():void 0}function x(f,T){return"number"==typeof O(f)?f.pop():T}},36821:(bt,be,Y)=>{"use strict";function ie(z,O){if(z){const E=z.indexOf(O);0<=E&&z.splice(E,1)}}Y.d(be,{P:()=>ie})},79526:(bt,be,Y)=>{"use strict";function ie(z){const E=z(d=>{Error.call(d),d.stack=(new Error).stack});return E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,E}Y.d(be,{d:()=>ie})},72752:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>O,O:()=>E});var ie=Y(78951);let z=null;function O(d){if(ie.v.useDeprecatedSynchronousErrorHandling){const x=!z;if(x&&(z={errorThrown:!1,error:null}),d(),x){const{errorThrown:f,error:T}=z;if(z=null,f)throw T}}else d()}function E(d){ie.v.useDeprecatedSynchronousErrorHandling&&z&&(z.errorThrown=!0,z.error=d)}},14926:(bt,be,Y)=>{"use strict";function ie(z,O,E,d=0,x=!1){const f=O.schedule(function(){E(),x?z.add(this.schedule(null,d)):this.unsubscribe()},d);if(z.add(f),!x)return f}Y.d(be,{f:()=>ie})},62594:(bt,be,Y)=>{"use strict";function ie(z){return z}Y.d(be,{y:()=>ie})},27251:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>ie});const ie=z=>z&&"number"==typeof z.length&&"function"!=typeof z},98045:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>z});var ie=Y(23854);function z(O){return Symbol.asyncIterator&&(0,ie.m)(null==O?void 0:O[Symbol.asyncIterator])}},23854:(bt,be,Y)=>{"use strict";function ie(z){return"function"==typeof z}Y.d(be,{m:()=>ie})},92119:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>O});var ie=Y(41385),z=Y(23854);function O(E){return(0,z.m)(E[ie.L])}},49054:(bt,be,Y)=>{"use strict";Y.d(be,{T:()=>O});var ie=Y(82902),z=Y(23854);function O(E){return(0,z.m)(null==E?void 0:E[ie.h])}},54529:(bt,be,Y)=>{"use strict";Y.d(be,{t:()=>z});var ie=Y(23854);function z(O){return(0,ie.m)(null==O?void 0:O.then)}},51080:(bt,be,Y)=>{"use strict";Y.d(be,{Q:()=>O,L:()=>E});var ie=Y(97582),z=Y(23854);function O(d){return(0,ie.__asyncGenerator)(this,arguments,function*(){const f=d.getReader();try{for(;;){const{value:T,done:g}=yield(0,ie.__await)(f.read());if(g)return yield(0,ie.__await)(void 0);yield yield(0,ie.__await)(T)}}finally{f.releaseLock()}})}function E(d){return(0,z.m)(null==d?void 0:d.getReader)}},51665:(bt,be,Y)=>{"use strict";Y.d(be,{e:()=>O});var ie=Y(23854);function O(E){return d=>{if(function(E){return(0,ie.m)(null==E?void 0:E.lift)}(d))return d.lift(function(x){try{return E(x,this)}catch(f){this.error(f)}});throw new TypeError("Unable to lift unknown Observable type")}}},72556:(bt,be,Y)=>{"use strict";function ie(){}Y.d(be,{Z:()=>ie})},77833:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>O});var ie=Y(78951),z=Y(35888);function O(E){z.z.setTimeout(()=>{const{onUnhandledError:d}=ie.v;if(!d)throw E;d(E)})}},56689:(bt,be,Y)=>{"use strict";function ie(z){return new TypeError(`You provided ${null!==z&&"object"==typeof z?"an invalid object":`'${z}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}Y.d(be,{z:()=>ie})},69337:(bt,be,Y)=>{"use strict";const ie=Y(96434),z=Y(12658),O="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;be.Buffer=f,be.SlowBuffer=function(st){return+st!=st&&(st=0),f.alloc(+st)},be.INSPECT_MAX_BYTES=50;const E=2147483647;function x(st){if(st>E)throw new RangeError('The value "'+st+'" is invalid for option "size"');const Ye=new Uint8Array(st);return Object.setPrototypeOf(Ye,f.prototype),Ye}function f(st,Ye,gt){if("number"==typeof st){if("string"==typeof Ye)throw new TypeError('The "string" argument must be of type string. Received type number');return l(st)}return T(st,Ye,gt)}function T(st,Ye,gt){if("string"==typeof st)return function(st,Ye){if(("string"!=typeof Ye||""===Ye)&&(Ye="utf8"),!f.isEncoding(Ye))throw new TypeError("Unknown encoding: "+Ye);const gt=0|P(st,Ye);let St=x(gt);const Wt=St.write(st,Ye);return Wt!==gt&&(St=St.slice(0,Wt)),St}(st,Ye);if(ArrayBuffer.isView(st))return function(st){if(tt(st,Uint8Array)){const Ye=new Uint8Array(st);return _(Ye.buffer,Ye.byteOffset,Ye.byteLength)}return u(st)}(st);if(null==st)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof st);if(tt(st,ArrayBuffer)||st&&tt(st.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(tt(st,SharedArrayBuffer)||st&&tt(st.buffer,SharedArrayBuffer)))return _(st,Ye,gt);if("number"==typeof st)throw new TypeError('The "value" argument must not be of type number. Received type number');const St=st.valueOf&&st.valueOf();if(null!=St&&St!==st)return f.from(St,Ye,gt);const Wt=function(st){if(f.isBuffer(st)){const Ye=0|S(st.length),gt=x(Ye);return 0===gt.length||st.copy(gt,0,0,Ye),gt}return void 0!==st.length?"number"!=typeof st.length||mt(st.length)?x(0):u(st):"Buffer"===st.type&&Array.isArray(st.data)?u(st.data):void 0}(st);if(Wt)return Wt;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof st[Symbol.toPrimitive])return f.from(st[Symbol.toPrimitive]("string"),Ye,gt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof st)}function g(st){if("number"!=typeof st)throw new TypeError('"size" argument must be of type number');if(st<0)throw new RangeError('The value "'+st+'" is invalid for option "size"')}function l(st){return g(st),x(st<0?0:0|S(st))}function u(st){const Ye=st.length<0?0:0|S(st.length),gt=x(Ye);for(let St=0;St=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return 0|st}function P(st,Ye){if(f.isBuffer(st))return st.length;if(ArrayBuffer.isView(st)||tt(st,ArrayBuffer))return st.byteLength;if("string"!=typeof st)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof st);const gt=st.length,St=arguments.length>2&&!0===arguments[2];if(!St&&0===gt)return 0;let Wt=!1;for(;;)switch(Ye){case"ascii":case"latin1":case"binary":return gt;case"utf8":case"utf-8":return me(st).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*gt;case"hex":return gt>>>1;case"base64":return Ve(st).length;default:if(Wt)return St?-1:me(st).length;Ye=(""+Ye).toLowerCase(),Wt=!0}}function L(st,Ye,gt){let St=!1;if((void 0===Ye||Ye<0)&&(Ye=0),Ye>this.length||((void 0===gt||gt>this.length)&&(gt=this.length),gt<=0)||(gt>>>=0)<=(Ye>>>=0))return"";for(st||(st="utf8");;)switch(st){case"hex":return C(this,Ye,gt);case"utf8":case"utf-8":return M(this,Ye,gt);case"ascii":return D(this,Ye,gt);case"latin1":case"binary":return N(this,Ye,gt);case"base64":return y(this,Ye,gt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,Ye,gt);default:if(St)throw new TypeError("Unknown encoding: "+st);st=(st+"").toLowerCase(),St=!0}}function V(st,Ye,gt){const St=st[Ye];st[Ye]=st[gt],st[gt]=St}function W(st,Ye,gt,St,Wt){if(0===st.length)return-1;if("string"==typeof gt?(St=gt,gt=0):gt>2147483647?gt=2147483647:gt<-2147483648&&(gt=-2147483648),mt(gt=+gt)&&(gt=Wt?0:st.length-1),gt<0&&(gt=st.length+gt),gt>=st.length){if(Wt)return-1;gt=st.length-1}else if(gt<0){if(!Wt)return-1;gt=0}if("string"==typeof Ye&&(Ye=f.from(Ye,St)),f.isBuffer(Ye))return 0===Ye.length?-1:G(st,Ye,gt,St,Wt);if("number"==typeof Ye)return Ye&=255,"function"==typeof Uint8Array.prototype.indexOf?Wt?Uint8Array.prototype.indexOf.call(st,Ye,gt):Uint8Array.prototype.lastIndexOf.call(st,Ye,gt):G(st,[Ye],gt,St,Wt);throw new TypeError("val must be string, number or Buffer")}function G(st,Ye,gt,St,Wt){let jt,dn=1,Nt=st.length,It=Ye.length;if(void 0!==St&&("ucs2"===(St=String(St).toLowerCase())||"ucs-2"===St||"utf16le"===St||"utf-16le"===St)){if(st.length<2||Ye.length<2)return-1;dn=2,Nt/=2,It/=2,gt/=2}function qt(Yt,Wn){return 1===dn?Yt[Wn]:Yt.readUInt16BE(Wn*dn)}if(Wt){let Yt=-1;for(jt=gt;jtNt&&(gt=Nt-It),jt=gt;jt>=0;jt--){let Yt=!0;for(let Wn=0;WnWt&&(St=Wt):St=Wt;const dn=Ye.length;let Nt;for(St>dn/2&&(St=dn/2),Nt=0;Nt>8,Wt=gt%256,dn.push(Wt),dn.push(St);return dn}(Ye,st.length-gt),st,gt,St)}function y(st,Ye,gt){return ie.fromByteArray(0===Ye&>===st.length?st:st.slice(Ye,gt))}function M(st,Ye,gt){gt=Math.min(st.length,gt);const St=[];let Wt=Ye;for(;Wt239?4:dn>223?3:dn>191?2:1;if(Wt+It<=gt){let qt,jt,Yt,Wn;switch(It){case 1:dn<128&&(Nt=dn);break;case 2:qt=st[Wt+1],128==(192&qt)&&(Wn=(31&dn)<<6|63&qt,Wn>127&&(Nt=Wn));break;case 3:qt=st[Wt+1],jt=st[Wt+2],128==(192&qt)&&128==(192&jt)&&(Wn=(15&dn)<<12|(63&qt)<<6|63&jt,Wn>2047&&(Wn<55296||Wn>57343)&&(Nt=Wn));break;case 4:qt=st[Wt+1],jt=st[Wt+2],Yt=st[Wt+3],128==(192&qt)&&128==(192&jt)&&128==(192&Yt)&&(Wn=(15&dn)<<18|(63&qt)<<12|(63&jt)<<6|63&Yt,Wn>65535&&Wn<1114112&&(Nt=Wn))}}null===Nt?(Nt=65533,It=1):Nt>65535&&(Nt-=65536,St.push(Nt>>>10&1023|55296),Nt=56320|1023&Nt),St.push(Nt),Wt+=It}return function(st){const Ye=st.length;if(Ye<=v)return String.fromCharCode.apply(String,st);let gt="",St=0;for(;StWt.length?(f.isBuffer(Nt)||(Nt=f.from(Nt)),Nt.copy(Wt,dn)):Uint8Array.prototype.set.call(Wt,Nt,dn);else{if(!f.isBuffer(Nt))throw new TypeError('"list" argument must be an Array of Buffers');Nt.copy(Wt,dn)}dn+=Nt.length}return Wt},f.byteLength=P,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const Ye=this.length;if(Ye%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let gt=0;gtgt&&(Ye+=" ... "),""},O&&(f.prototype[O]=f.prototype.inspect),f.prototype.compare=function(Ye,gt,St,Wt,dn){if(tt(Ye,Uint8Array)&&(Ye=f.from(Ye,Ye.offset,Ye.byteLength)),!f.isBuffer(Ye))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ye);if(void 0===gt&&(gt=0),void 0===St&&(St=Ye?Ye.length:0),void 0===Wt&&(Wt=0),void 0===dn&&(dn=this.length),gt<0||St>Ye.length||Wt<0||dn>this.length)throw new RangeError("out of range index");if(Wt>=dn&>>=St)return 0;if(Wt>=dn)return-1;if(gt>=St)return 1;if(this===Ye)return 0;let Nt=(dn>>>=0)-(Wt>>>=0),It=(St>>>=0)-(gt>>>=0);const qt=Math.min(Nt,It),jt=this.slice(Wt,dn),Yt=Ye.slice(gt,St);for(let Wn=0;Wn>>=0,isFinite(St)?(St>>>=0,void 0===Wt&&(Wt="utf8")):(Wt=St,St=void 0)}const dn=this.length-gt;if((void 0===St||St>dn)&&(St=dn),Ye.length>0&&(St<0||gt<0)||gt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Wt||(Wt="utf8");let Nt=!1;for(;;)switch(Wt){case"hex":return H(this,Ye,gt,St);case"utf8":case"utf-8":return j(this,Ye,gt,St);case"ascii":case"latin1":case"binary":return K(this,Ye,gt,St);case"base64":return R(this,Ye,gt,St);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,Ye,gt,St);default:if(Nt)throw new TypeError("Unknown encoding: "+Wt);Wt=(""+Wt).toLowerCase(),Nt=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const v=4096;function D(st,Ye,gt){let St="";gt=Math.min(st.length,gt);for(let Wt=Ye;WtSt)&&(gt=St);let Wt="";for(let dn=Ye;dngt)throw new RangeError("Trying to access beyond buffer length")}function Q(st,Ye,gt,St,Wt,dn){if(!f.isBuffer(st))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ye>Wt||Yest.length)throw new RangeError("Index out of range")}function ee(st,Ye,gt,St,Wt){pe(Ye,St,Wt,st,gt,7);let dn=Number(Ye&BigInt(4294967295));st[gt++]=dn,dn>>=8,st[gt++]=dn,dn>>=8,st[gt++]=dn,dn>>=8,st[gt++]=dn;let Nt=Number(Ye>>BigInt(32)&BigInt(4294967295));return st[gt++]=Nt,Nt>>=8,st[gt++]=Nt,Nt>>=8,st[gt++]=Nt,Nt>>=8,st[gt++]=Nt,gt}function ce(st,Ye,gt,St,Wt){pe(Ye,St,Wt,st,gt,7);let dn=Number(Ye&BigInt(4294967295));st[gt+7]=dn,dn>>=8,st[gt+6]=dn,dn>>=8,st[gt+5]=dn,dn>>=8,st[gt+4]=dn;let Nt=Number(Ye>>BigInt(32)&BigInt(4294967295));return st[gt+3]=Nt,Nt>>=8,st[gt+2]=Nt,Nt>>=8,st[gt+1]=Nt,Nt>>=8,st[gt]=Nt,gt+8}function ue(st,Ye,gt,St,Wt,dn){if(gt+St>st.length)throw new RangeError("Index out of range");if(gt<0)throw new RangeError("Index out of range")}function we(st,Ye,gt,St,Wt){return Ye=+Ye,gt>>>=0,Wt||ue(st,0,gt,4),z.write(st,Ye,gt,St,23,4),gt+4}function ae(st,Ye,gt,St,Wt){return Ye=+Ye,gt>>>=0,Wt||ue(st,0,gt,8),z.write(st,Ye,gt,St,52,8),gt+8}f.prototype.slice=function(Ye,gt){const St=this.length;(Ye=~~Ye)<0?(Ye+=St)<0&&(Ye=0):Ye>St&&(Ye=St),(gt=void 0===gt?St:~~gt)<0?(gt+=St)<0&&(gt=0):gt>St&&(gt=St),gt>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=this[Ye],dn=1,Nt=0;for(;++Nt>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=this[Ye+--gt],dn=1;for(;gt>0&&(dn*=256);)Wt+=this[Ye+--gt]*dn;return Wt},f.prototype.readUint8=f.prototype.readUInt8=function(Ye,gt){return Ye>>>=0,gt||B(Ye,1,this.length),this[Ye]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,2,this.length),this[Ye]|this[Ye+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,2,this.length),this[Ye]<<8|this[Ye+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),(this[Ye]|this[Ye+1]<<8|this[Ye+2]<<16)+16777216*this[Ye+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),16777216*this[Ye]+(this[Ye+1]<<16|this[Ye+2]<<8|this[Ye+3])},f.prototype.readBigUInt64LE=wt(function(Ye){_e(Ye>>>=0,"offset");const gt=this[Ye],St=this[Ye+7];(void 0===gt||void 0===St)&&xe(Ye,this.length-8);const Wt=gt+256*this[++Ye]+65536*this[++Ye]+this[++Ye]*2**24,dn=this[++Ye]+256*this[++Ye]+65536*this[++Ye]+St*2**24;return BigInt(Wt)+(BigInt(dn)<>>=0,"offset");const gt=this[Ye],St=this[Ye+7];(void 0===gt||void 0===St)&&xe(Ye,this.length-8);const Wt=gt*2**24+65536*this[++Ye]+256*this[++Ye]+this[++Ye],dn=this[++Ye]*2**24+65536*this[++Ye]+256*this[++Ye]+St;return(BigInt(Wt)<>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=this[Ye],dn=1,Nt=0;for(;++Nt=dn&&(Wt-=Math.pow(2,8*gt)),Wt},f.prototype.readIntBE=function(Ye,gt,St){Ye>>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=gt,dn=1,Nt=this[Ye+--Wt];for(;Wt>0&&(dn*=256);)Nt+=this[Ye+--Wt]*dn;return dn*=128,Nt>=dn&&(Nt-=Math.pow(2,8*gt)),Nt},f.prototype.readInt8=function(Ye,gt){return Ye>>>=0,gt||B(Ye,1,this.length),128&this[Ye]?-1*(255-this[Ye]+1):this[Ye]},f.prototype.readInt16LE=function(Ye,gt){Ye>>>=0,gt||B(Ye,2,this.length);const St=this[Ye]|this[Ye+1]<<8;return 32768&St?4294901760|St:St},f.prototype.readInt16BE=function(Ye,gt){Ye>>>=0,gt||B(Ye,2,this.length);const St=this[Ye+1]|this[Ye]<<8;return 32768&St?4294901760|St:St},f.prototype.readInt32LE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),this[Ye]|this[Ye+1]<<8|this[Ye+2]<<16|this[Ye+3]<<24},f.prototype.readInt32BE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),this[Ye]<<24|this[Ye+1]<<16|this[Ye+2]<<8|this[Ye+3]},f.prototype.readBigInt64LE=wt(function(Ye){_e(Ye>>>=0,"offset");const gt=this[Ye],St=this[Ye+7];return(void 0===gt||void 0===St)&&xe(Ye,this.length-8),(BigInt(this[Ye+4]+256*this[Ye+5]+65536*this[Ye+6]+(St<<24))<>>=0,"offset");const gt=this[Ye],St=this[Ye+7];(void 0===gt||void 0===St)&&xe(Ye,this.length-8);const Wt=(gt<<24)+65536*this[++Ye]+256*this[++Ye]+this[++Ye];return(BigInt(Wt)<>>=0,gt||B(Ye,4,this.length),z.read(this,Ye,!0,23,4)},f.prototype.readFloatBE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),z.read(this,Ye,!1,23,4)},f.prototype.readDoubleLE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,8,this.length),z.read(this,Ye,!0,52,8)},f.prototype.readDoubleBE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,8,this.length),z.read(this,Ye,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(Ye,gt,St,Wt){Ye=+Ye,gt>>>=0,St>>>=0,Wt||Q(this,Ye,gt,St,Math.pow(2,8*St)-1,0);let dn=1,Nt=0;for(this[gt]=255&Ye;++Nt>>=0,St>>>=0,Wt||Q(this,Ye,gt,St,Math.pow(2,8*St)-1,0);let dn=St-1,Nt=1;for(this[gt+dn]=255&Ye;--dn>=0&&(Nt*=256);)this[gt+dn]=Ye/Nt&255;return gt+St},f.prototype.writeUint8=f.prototype.writeUInt8=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,1,255,0),this[gt]=255&Ye,gt+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,65535,0),this[gt]=255&Ye,this[gt+1]=Ye>>>8,gt+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,65535,0),this[gt]=Ye>>>8,this[gt+1]=255&Ye,gt+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,4294967295,0),this[gt+3]=Ye>>>24,this[gt+2]=Ye>>>16,this[gt+1]=Ye>>>8,this[gt]=255&Ye,gt+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,4294967295,0),this[gt]=Ye>>>24,this[gt+1]=Ye>>>16,this[gt+2]=Ye>>>8,this[gt+3]=255&Ye,gt+4},f.prototype.writeBigUInt64LE=wt(function(Ye,gt=0){return ee(this,Ye,gt,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=wt(function(Ye,gt=0){return ce(this,Ye,gt,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(Ye,gt,St,Wt){if(Ye=+Ye,gt>>>=0,!Wt){const qt=Math.pow(2,8*St-1);Q(this,Ye,gt,St,qt-1,-qt)}let dn=0,Nt=1,It=0;for(this[gt]=255&Ye;++dn>0)-It&255;return gt+St},f.prototype.writeIntBE=function(Ye,gt,St,Wt){if(Ye=+Ye,gt>>>=0,!Wt){const qt=Math.pow(2,8*St-1);Q(this,Ye,gt,St,qt-1,-qt)}let dn=St-1,Nt=1,It=0;for(this[gt+dn]=255&Ye;--dn>=0&&(Nt*=256);)Ye<0&&0===It&&0!==this[gt+dn+1]&&(It=1),this[gt+dn]=(Ye/Nt>>0)-It&255;return gt+St},f.prototype.writeInt8=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,1,127,-128),Ye<0&&(Ye=255+Ye+1),this[gt]=255&Ye,gt+1},f.prototype.writeInt16LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,32767,-32768),this[gt]=255&Ye,this[gt+1]=Ye>>>8,gt+2},f.prototype.writeInt16BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,32767,-32768),this[gt]=Ye>>>8,this[gt+1]=255&Ye,gt+2},f.prototype.writeInt32LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,2147483647,-2147483648),this[gt]=255&Ye,this[gt+1]=Ye>>>8,this[gt+2]=Ye>>>16,this[gt+3]=Ye>>>24,gt+4},f.prototype.writeInt32BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,2147483647,-2147483648),Ye<0&&(Ye=4294967295+Ye+1),this[gt]=Ye>>>24,this[gt+1]=Ye>>>16,this[gt+2]=Ye>>>8,this[gt+3]=255&Ye,gt+4},f.prototype.writeBigInt64LE=wt(function(Ye,gt=0){return ee(this,Ye,gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=wt(function(Ye,gt=0){return ce(this,Ye,gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(Ye,gt,St){return we(this,Ye,gt,!0,St)},f.prototype.writeFloatBE=function(Ye,gt,St){return we(this,Ye,gt,!1,St)},f.prototype.writeDoubleLE=function(Ye,gt,St){return ae(this,Ye,gt,!0,St)},f.prototype.writeDoubleBE=function(Ye,gt,St){return ae(this,Ye,gt,!1,St)},f.prototype.copy=function(Ye,gt,St,Wt){if(!f.isBuffer(Ye))throw new TypeError("argument should be a Buffer");if(St||(St=0),!Wt&&0!==Wt&&(Wt=this.length),gt>=Ye.length&&(gt=Ye.length),gt||(gt=0),Wt>0&&Wt=this.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("sourceEnd out of bounds");Wt>this.length&&(Wt=this.length),Ye.length-gt>>=0,St=void 0===St?this.length:St>>>0,Ye||(Ye=0),"number"==typeof Ye)for(dn=gt;dn=St+4;gt-=3)Ye=`_${st.slice(gt-3,gt)}${Ye}`;return`${st.slice(0,gt)}${Ye}`}function pe(st,Ye,gt,St,Wt,dn){if(st>gt||st3?0===Ye||Ye===BigInt(0)?`>= 0${Nt} and < 2${Nt} ** ${8*(dn+1)}${Nt}`:`>= -(2${Nt} ** ${8*(dn+1)-1}${Nt}) and < 2 ** ${8*(dn+1)-1}${Nt}`:`>= ${Ye}${Nt} and <= ${gt}${Nt}`,new Te.ERR_OUT_OF_RANGE("value",It,st)}!function(st,Ye,gt){_e(Ye,"offset"),(void 0===st[Ye]||void 0===st[Ye+gt])&&xe(Ye,st.length-(gt+1))}(St,Wt,dn)}function _e(st,Ye){if("number"!=typeof st)throw new Te.ERR_INVALID_ARG_TYPE(Ye,"number",st)}function xe(st,Ye,gt){throw Math.floor(st)!==st?(_e(st,gt),new Te.ERR_OUT_OF_RANGE(gt||"offset","an integer",st)):Ye<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(gt||"offset",`>= ${gt?1:0} and <= ${Ye}`,st)}le("ERR_BUFFER_OUT_OF_BOUNDS",function(st){return st?`${st} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),le("ERR_INVALID_ARG_TYPE",function(st,Ye){return`The "${st}" argument must be of type number. Received type ${typeof Ye}`},TypeError),le("ERR_OUT_OF_RANGE",function(st,Ye,gt){let St=`The value of "${st}" is out of range.`,Wt=gt;return Number.isInteger(gt)&&Math.abs(gt)>2**32?Wt=X(String(gt)):"bigint"==typeof gt&&(Wt=String(gt),(gt>BigInt(2)**BigInt(32)||gt<-(BigInt(2)**BigInt(32)))&&(Wt=X(Wt)),Wt+="n"),St+=` It must be ${Ye}. Received ${Wt}`,St},RangeError);const Ce=/[^+/0-9A-Za-z-_]/g;function me(st,Ye){let gt;Ye=Ye||1/0;const St=st.length;let Wt=null;const dn=[];for(let Nt=0;Nt55295&><57344){if(!Wt){if(gt>56319){(Ye-=3)>-1&&dn.push(239,191,189);continue}if(Nt+1===St){(Ye-=3)>-1&&dn.push(239,191,189);continue}Wt=gt;continue}if(gt<56320){(Ye-=3)>-1&&dn.push(239,191,189),Wt=gt;continue}gt=65536+(Wt-55296<<10|gt-56320)}else Wt&&(Ye-=3)>-1&&dn.push(239,191,189);if(Wt=null,gt<128){if((Ye-=1)<0)break;dn.push(gt)}else if(gt<2048){if((Ye-=2)<0)break;dn.push(gt>>6|192,63>|128)}else if(gt<65536){if((Ye-=3)<0)break;dn.push(gt>>12|224,gt>>6&63|128,63>|128)}else{if(!(gt<1114112))throw new Error("Invalid code point");if((Ye-=4)<0)break;dn.push(gt>>18|240,gt>>12&63|128,gt>>6&63|128,63>|128)}}return dn}function Ve(st){return ie.toByteArray(function(st){if((st=(st=st.split("=")[0]).trim().replace(Ce,"")).length<2)return"";for(;st.length%4!=0;)st+="=";return st}(st))}function nt(st,Ye,gt,St){let Wt;for(Wt=0;Wt=Ye.length||Wt>=st.length);++Wt)Ye[Wt+gt]=st[Wt];return Wt}function tt(st,Ye){return st instanceof Ye||null!=st&&null!=st.constructor&&null!=st.constructor.name&&st.constructor.name===Ye.name}function mt(st){return st!=st}const ht=function(){const st="0123456789abcdef",Ye=new Array(256);for(let gt=0;gt<16;++gt){const St=16*gt;for(let Wt=0;Wt<16;++Wt)Ye[St+Wt]=st[gt]+st[Wt]}return Ye}();function wt(st){return"undefined"==typeof BigInt?Pt:st}function Pt(){throw new Error("BigInt not supported")}},98983:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{EthereumProvider:()=>Ec,OPTIONAL_EVENTS:()=>C0,OPTIONAL_METHODS:()=>ys,REQUIRED_EVENTS:()=>bs,REQUIRED_METHODS:()=>qf,default:()=>Ps});var ie=Y(34553),z=Y(93105),O=Y.n(z),E=Y(91573),d=Y(37651),x=Y(52632),f=Y(41027),T=Y(72180),g=Y(81361),b=function(Ot,De,Me){if(Me||2===arguments.length)for(var Dt,pt=0,vt=De.length;pt"u")throw new Error("missing sender public key");if(typeof Ot?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:De,senderPublicKey:Ot?.senderPublicKey,receiverPublicKey:Ot?.receiverPublicKey}}function $n(Ot){return 1===Ot.type&&"string"==typeof Ot.senderPublicKey&&"string"==typeof Ot.receiverPublicKey}var Yr=Object.defineProperty,Ln=Object.getOwnPropertySymbols,Bn=Object.prototype.hasOwnProperty,$r=Object.prototype.propertyIsEnumerable,Gn=(Ot,De,Me)=>De in Ot?Yr(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,bn=(Ot,De)=>{for(var Me in De||(De={}))Bn.call(De,Me)&&Gn(Ot,Me,De[Me]);if(Ln)for(var Me of Ln(De))$r.call(De,Me)&&Gn(Ot,Me,De[Me]);return Ot};const Tn="js";function Qn(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Vi(){return!(0,y.getDocument)()&&!!(0,y.getNavigator)()&&"ReactNative"===navigator.product}function ar(){return!Qn()&&!!(0,y.getNavigator)()}function br(){return Vi()?"react-native":Qn()?"node":ar()?"browser":"unknown"}function wi(Ot,De,Me){const pt=function(){if("react-native"===br()&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:Me,Version:pt}=global.Platform;return[Me,pt].join("-")}const Ot=function(Ot){return Ot?H(Ot):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new _:"undefined"!=typeof navigator?H(navigator.userAgent):"undefined"!=typeof process&&process.version?new h(process.version.slice(1)):null}();if(null===Ot)return"unknown";const De=Ot.os?Ot.os.replace(" ","").toLowerCase():"unknown";return"browser"===Ot.type?[De,Ot.name,Ot.version].join("-"):[De,Ot.version].join("-")}(),vt=function(){var Ot;const De=br();return"browser"===De?[De,(null==(Ot=(0,y.getLocation)())?void 0:Ot.host)||"unknown"].join(":"):De}();return[[Ot,De].join("-"),[Tn,Me].join("-"),pt,vt].join("/")}function is(Ot,De){return Ot.filter(Me=>De.includes(Me)).length===Ot.length}function ji(Ot){return Object.fromEntries(Ot.entries())}function so(Ot){return new Map(Object.entries(Ot))}function _s(Ot=o.FIVE_MINUTES,De){const Me=(0,o.toMiliseconds)(Ot||o.FIVE_MINUTES);let pt,vt,Dt;return{resolve:nn=>{Dt&&pt&&(clearTimeout(Dt),pt(nn))},reject:nn=>{Dt&&vt&&(clearTimeout(Dt),vt(nn))},done:()=>new Promise((nn,Nn)=>{Dt=setTimeout(()=>{Nn(new Error(De))},Me),pt=nn,vt=Nn})}}function Ao(Ot,De,Me){return new Promise(function(){var pt=(0,ie.Z)(function*(vt,Dt){const nn=setTimeout(()=>Dt(new Error(Me)),De);try{vt(yield Ot)}catch(Nn){Dt(Nn)}clearTimeout(nn)});return function(vt,Dt){return pt.apply(this,arguments)}}())}function zi(Ot,De){if("string"==typeof De&&De.startsWith(`${Ot}:`))return De;if("topic"===Ot.toLowerCase()){if("string"!=typeof De)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${De}`}if("id"===Ot.toLowerCase()){if("number"!=typeof De)throw new Error('Value must be "number" for expirer target type: id');return`id:${De}`}throw new Error(`Unknown expirer target type: ${Ot}`)}function Lu(Ot){const[De,Me]=Ot.split(":"),pt={id:void 0,topic:void 0};if("topic"===De&&"string"==typeof Me)pt.topic=Me;else{if("id"!==De||!Number.isInteger(Number(Me)))throw new Error(`Invalid target, expected id:number or topic:string, got ${De}:${Me}`);pt.id=Number(Me)}return pt}function Qa(Ot,De){return(0,o.fromMiliseconds)((De||Date.now())+(0,o.toMiliseconds)(Ot))}function ja(Ot){return Date.now()>=(0,o.toMiliseconds)(Ot)}function xa(Ot,De){return`${Ot}${De?`:${De}`:""}`}function Du(Ot=[],De=[]){return[...new Set([...Ot,...De])]}function Va(){return(Va=(0,ie.Z)(function*({id:Ot,topic:De,wcDeepLink:Me}){try{if(!Me)return;let vt=("string"==typeof Me?JSON.parse(Me):Me)?.href;if("string"!=typeof vt)return;vt.endsWith("/")&&(vt=vt.slice(0,-1));const Dt=`${vt}/wc?requestId=${Ot}&sessionTopic=${De}`,nn=br();"browser"===nn?Dt.startsWith("https://")?window.open(Dt,"_blank","noreferrer noopener"):window.open(Dt,"_self","noreferrer noopener"):"react-native"===nn&&typeof(null==global?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(Dt))}catch(pt){console.error(pt)}})).apply(this,arguments)}function Eu(Ot){return Ot?.relay||{protocol:"irn"}}function jo(Ot){const De=k.RELAY_JSONRPC[Ot];if(typeof De>"u")throw new Error(`Relay Protocol not supported: ${Ot}`);return De}var yo=Object.defineProperty,Vc=Object.getOwnPropertySymbols,El=Object.prototype.hasOwnProperty,ec=Object.prototype.propertyIsEnumerable,kc=(Ot,De,Me)=>De in Ot?yo(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me;function eu(Ot,De="-"){const Me={},pt="relay"+De;return Object.keys(Ot).forEach(vt=>{if(vt.startsWith(pt)){const Dt=vt.replace(pt,"");Me[Dt]=Ot[vt]}}),Me}function aa(Ot){return Ot.startsWith("//")?Ot.substring(2):Ot}function Wa(Ot){const De=[];return Ot.forEach(Me=>{const[pt,vt]=Me.split(":");De.push(`${pt}:${vt}`)}),De}function oc(Ot){return Ot.includes(":")}function po(Ot){return oc(Ot)?Ot.split(":")[0]:Ot}const rr={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},hn={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Cn(Ot,De){const{message:Me,code:pt}=hn[Ot];return{message:De?`${Me} ${De}`:Me,code:pt}}function Ir(Ot,De){const{message:Me,code:pt}=rr[Ot];return{message:De?`${Me} ${De}`:Me,code:pt}}function Ei(Ot,De){return!!Array.isArray(Ot)&&(!(typeof De<"u"&&Ot.length)||Ot.every(De))}function Os(Ot){return Object.getPrototypeOf(Ot)===Object.prototype&&Object.keys(Ot).length}function Cs(Ot){return typeof Ot>"u"}function zs(Ot,De){return!(!De||!Cs(Ot))||"string"==typeof Ot&&!!Ot.trim().length}function Rs(Ot,De){return!(!De||!Cs(Ot))||"number"==typeof Ot&&!isNaN(Ot)}function Vo(Ot){return!(!zs(Ot,!1)||!Ot.includes(":"))&&2===Ot.split(":").length}function ru(Ot){let De=!0;return Ei(Ot)?Ot.length&&(De=Ot.every(Me=>zs(Me,!1))):De=!1,De}function Ut(Ot,De){let Me=null;return Object.values(Ot).forEach(pt=>{if(Me)return;const vt=function(Ot,De){let Me=null;return ru(Ot?.methods)?ru(Ot?.events)||(Me=Ir("UNSUPPORTED_EVENTS",`${De}, events should be an array of strings or empty array for no events`)):Me=Ir("UNSUPPORTED_METHODS",`${De}, methods should be an array of strings or empty array for no methods`),Me}(pt,`${De}, namespace`);vt&&(Me=vt)}),Me}function et(Ot,De){let Me=null;if(Ot&&Os(Ot)){const pt=Ut(Ot,De);pt&&(Me=pt);const vt=function(Ot,De){let Me=null;return Object.values(Ot).forEach(pt=>{if(Me)return;const vt=function(Ot,De){let Me=null;return Ei(Ot)?Ot.forEach(pt=>{Me||function(Ot){if(zs(Ot,!1)&&Ot.includes(":")){const De=Ot.split(":");if(3===De.length){const Me=De[0]+":"+De[1];return!!De[2]&&Vo(Me)}}return!1}(pt)||(Me=Ir("UNSUPPORTED_ACCOUNTS",`${De}, account ${pt} should be a string and conform to "namespace:chainId:address" format`))}):Me=Ir("UNSUPPORTED_ACCOUNTS",`${De}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),Me}(pt?.accounts,`${De} namespace`);vt&&(Me=vt)}),Me}(Ot,De);vt&&(Me=vt)}else Me=Cn("MISSING_OR_INVALID",`${De}, namespaces should be an object with data`);return Me}function zt(Ot){return zs(Ot.protocol,!0)}function tr(Ot){return typeof Ot<"u"&&null!==typeof Ot}function As(Ot,De){return!(!Vo(De)||!function(Ot){const De=[];return Object.values(Ot).forEach(Me=>{De.push(...Wa(Me.accounts))}),De}(Ot).includes(De))}function lo(Ot,De,Me){let pt=null;const vt=function(Ot){const De={};return Object.keys(Ot).forEach(Me=>{var pt;Me.includes(":")?De[Me]=Ot[Me]:null==(pt=Ot[Me].chains)||pt.forEach(vt=>{De[vt]={methods:Ot[Me].methods,events:Ot[Me].events}})}),De}(Ot),Dt=function(Ot){const De={};return Object.keys(Ot).forEach(Me=>{Me.includes(":")?De[Me]=Ot[Me]:Wa(Ot[Me].accounts)?.forEach(vt=>{De[vt]={accounts:Ot[Me].accounts.filter(Dt=>Dt.includes(`${vt}:`)),methods:Ot[Me].methods,events:Ot[Me].events}})}),De}(De),nn=Object.keys(vt),Nn=Object.keys(Dt),Mr=Ka(Object.keys(Ot)),Vr=Ka(Object.keys(De)),Si=Mr.filter(ls=>!Vr.includes(ls));return Si.length&&(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces keys don't satisfy requiredNamespaces.\n Required: ${Si.toString()}\n Received: ${Object.keys(De).toString()}`)),is(nn,Nn)||(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces chains don't satisfy required namespaces.\n Required: ${nn.toString()}\n Approved: ${Nn.toString()}`)),Object.keys(De).forEach(ls=>{if(!ls.includes(":")||pt)return;const Oo=Wa(De[ls].accounts);Oo.includes(ls)||(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces accounts don't satisfy namespace accounts for ${ls}\n Required: ${ls}\n Approved: ${Oo.toString()}`))}),nn.forEach(ls=>{pt||(is(vt[ls].methods,Dt[ls].methods)?is(vt[ls].events,Dt[ls].events)||(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces events don't satisfy namespace events for ${ls}`)):pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces methods don't satisfy namespace methods for ${ls}`))}),pt}function Ka(Ot){return[...new Set(Ot.map(De=>De.includes(":")?De.split(":")[0]:De))]}function Gc(){const Ot=br();return new Promise(De=>{switch(Ot){case"browser":De(ar()&&navigator?.onLine);break;case"react-native":De(function(){return ga.apply(this,arguments)}());break;default:De(!0)}})}function ga(){return(ga=(0,ie.Z)(function*(){return!(Vi()&&typeof global<"u"&&null!=global&&global.NetInfo)||(yield null==global?void 0:global.NetInfo.fetch())?.isConnected})).apply(this,arguments)}const du={};class ka{static get(De){return du[De]}static set(De,Me){du[De]=Me}static delete(De){delete du[De]}}var Dr=Y(3226),Eo=Y(38960),Io=Y(66486),Ho=Y(52399);class $o extends Ho.q{constructor(De){super(),this.opts=De,this.protocol="wc",this.version=2}}class Bo extends Ho.q{constructor(De,Me){super(),this.core=De,this.logger=Me,this.records=new Map}}class la extends Ho.q{constructor(De,Me){super(),this.relayer=De,this.logger=Me}}class tc extends Ho.q{constructor(De){super()}}class rd extends Ho.q{constructor(De,Me){super(),this.relayer=De,this.logger=Me}}class Nc extends Ho.q{constructor(De,Me){super(),this.core=De,this.logger=Me}}var Hc=Y(62757),fd=Y(10321),Ca=Y(22339),Or=Y(57808),Ti=Y(6856),ii=Y.n(Ti),iu=function(Ot,De){if(Ot.length>=255)throw new TypeError("Alphabet too long");for(var Me=new Uint8Array(256),pt=0;pt>>0,Bc=new Uint8Array(mc);uo[Jo];){var zu=Me[uo.charCodeAt(Jo)];if(255===zu)return;for(var Ru=0,gc=mc-1;(0!==zu||Ru>>0)%256>>>0,zu=zu/256>>>0;if(0!==zu)throw new Error("Non-zero carry");ul=Ru,Jo++}if(" "!==uo[Jo]){for(var Tc=mc-ul;Tc!==mc&&0===Bc[Tc];)Tc++;for(var _d=new Uint8Array(Lo+(mc-Tc)),Y0=Lo;Tc!==mc;)_d[Y0++]=Bc[Tc++];return _d}}}return{encode:function(uo){if(uo instanceof Uint8Array||(ArrayBuffer.isView(uo)?uo=new Uint8Array(uo.buffer,uo.byteOffset,uo.byteLength):Array.isArray(uo)&&(uo=Uint8Array.from(uo))),!(uo instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===uo.length)return"";for(var Jo=0,Lo=0,ul=0,mc=uo.length;ul!==mc&&0===uo[ul];)ul++,Jo++;for(var Bc=(mc-ul)*Si+1>>>0,zu=new Uint8Array(Bc);ul!==mc;){for(var Ru=uo[ul],gc=0,Tc=Bc-1;(0!==Ru||gc>>0)%Nn>>>0,Ru=Ru/Nn>>>0;if(0!==Ru)throw new Error("Non-zero carry");Lo=gc,ul++}for(var _d=Bc-Lo;_d!==Bc&&0===zu[_d];)_d++;for(var Y0=Mr.repeat(Jo);_d{if(Ot instanceof Uint8Array&&"Uint8Array"===Ot.constructor.name)return Ot;if(Ot instanceof ArrayBuffer)return new Uint8Array(Ot);if(ArrayBuffer.isView(Ot))return new Uint8Array(Ot.buffer,Ot.byteOffset,Ot.byteLength);throw new Error("Unknown type, must be binary type")};class Lt{constructor(De,Me,pt){this.name=De,this.prefix=Me,this.baseEncode=pt}encode(De){if(De instanceof Uint8Array)return`${this.prefix}${this.baseEncode(De)}`;throw Error("Unknown type, must be binary type")}}class en{constructor(De,Me,pt){if(this.name=De,this.prefix=Me,void 0===Me.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=Me.codePointAt(0),this.baseDecode=pt}decode(De){if("string"==typeof De){if(De.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(De)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(De.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(De){return cr(this,De)}}class Dn{constructor(De){this.decoders=De}or(De){return cr(this,De)}decode(De){const pt=this.decoders[De[0]];if(pt)return pt.decode(De);throw RangeError(`Unable to decode multibase string ${JSON.stringify(De)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const cr=(Ot,De)=>new Dn({...Ot.decoders||{[Ot.prefix]:Ot},...De.decoders||{[De.prefix]:De}});class Gr{constructor(De,Me,pt,vt){this.name=De,this.prefix=Me,this.baseEncode=pt,this.baseDecode=vt,this.encoder=new Lt(De,Me,pt),this.decoder=new en(De,Me,vt)}encode(De){return this.encoder.encode(De)}decode(De){return this.decoder.decode(De)}}const Bi=({name:Ot,prefix:De,encode:Me,decode:pt})=>new Gr(Ot,De,Me,pt),Ai=({prefix:Ot,name:De,alphabet:Me})=>{const{encode:pt,decode:vt}=iu(Me,De);return Bi({prefix:Ot,name:De,encode:pt,decode:Dt=>fu(vt(Dt))})},Ns=({name:Ot,prefix:De,bitsPerChar:Me,alphabet:pt})=>Bi({prefix:De,name:Ot,encode:vt=>((Ot,De,Me)=>{const pt="="===De[De.length-1],vt=(1<Me;)nn-=Me,Dt+=De[vt&Nn>>nn];if(nn&&(Dt+=De[vt&Nn<((Ot,De,Me,pt)=>{const vt={};for(let Si=0;Si=8&&(Nn-=8,nn[Vr++]=255&Mr>>Nn)}if(Nn>=Me||255&Mr<<8-Nn)throw new SyntaxError("Unexpected end of data");return nn})(vt,pt,Me,Ot)}),ha=Bi({prefix:"\0",name:"identity",encode:Ot=>(Ot=>(new TextDecoder).decode(Ot))(Ot),decode:Ot=>(Ot=>(new TextEncoder).encode(Ot))(Ot)});var Fo=Object.freeze({__proto__:null,identity:ha});const Sa=Ns({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Zo=Object.freeze({__proto__:null,base2:Sa});const Ma=Ns({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var $u=Object.freeze({__proto__:null,base8:Ma});const bu=Ai({prefix:"9",name:"base10",alphabet:"0123456789"});var au=Object.freeze({__proto__:null,base10:bu});const zl=Ns({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),sl=Ns({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var id=Object.freeze({__proto__:null,base16:zl,base16upper:sl});const Lf=Ns({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Uf=Ns({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),zc=Ns({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Mc=Ns({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Yu=Ns({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),hu=Ns({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),b1=Ns({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),yh=Ns({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),hd=Ns({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ad=Object.freeze({__proto__:null,base32:Lf,base32upper:Uf,base32pad:zc,base32padupper:Mc,base32hex:Yu,base32hexupper:hu,base32hexpad:b1,base32hexpadupper:yh,base32z:hd});const Vh=Ai({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),j0=Ai({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var lf=Object.freeze({__proto__:null,base36:Vh,base36upper:j0});const bh=Ai({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Hh=Ai({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var nc=Object.freeze({__proto__:null,base58btc:bh,base58flickr:Hh});const Al=Ns({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),V0=Ns({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),v1=Ns({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),df=Ns({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Zd=Object.freeze({__proto__:null,base64:Al,base64pad:V0,base64url:v1,base64urlpad:df});const Qs=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),t0=Qs.reduce((Ot,De,Me)=>(Ot[Me]=De,Ot),[]),jf=Qs.reduce((Ot,De,Me)=>(Ot[De.codePointAt(0)]=Me,Ot),[]),H0=Bi({prefix:"\u{1f680}",name:"base256emoji",encode:function(Ot){return Ot.reduce((De,Me)=>De+t0[Me],"")},decode:function(Ot){const De=[];for(const Me of Ot){const pt=jf[Me.codePointAt(0)];if(void 0===pt)throw new Error(`Non-base256emoji character: ${Me}`);De.push(pt)}return new Uint8Array(De)}});var ac=Object.freeze({__proto__:null,base256emoji:H0}),r0=Math.pow(2,31),$0=Math.pow(2,7),Cd=Math.pow(2,14),sd=Math.pow(2,21),vu=Math.pow(2,28),pd=Math.pow(2,35),fo=Math.pow(2,42),ff=Math.pow(2,49),s0=Math.pow(2,56),_1=Math.pow(2,63),$h={encode:function Yd(Ot,De,Me){De=De||[];for(var pt=Me=Me||0;Ot>=r0;)De[Me++]=255&Ot|128,Ot/=128;for(;-128&Ot;)De[Me++]=255&Ot|128,Ot>>>=7;return De[Me]=0|Ot,Yd.bytes=Me-pt+1,De},decode:function mn(Ot,De){var Dt,Me=0,pt=0,vt=De=De||0,nn=Ot.length;do{if(vt>=nn)throw mn.bytes=0,new RangeError("Could not decode varint");Dt=Ot[vt++],Me+=pt<28?(127&Dt)<=128);return mn.bytes=vt-De,Me},encodingLength:function(Ot){return Ot<$0?1:Ot(Vf.encode(Ot,De,Me),De),pf=Ot=>Vf.encodingLength(Ot),Md=(Ot,De)=>{const Me=De.byteLength,pt=pf(Ot),vt=pt+pf(Me),Dt=new Uint8Array(vt+Me);return hf(Ot,Dt,0),hf(Me,Dt,pt),Dt.set(De,vt),new tm(Ot,Me,De,Dt)};class tm{constructor(De,Me,pt,vt){this.code=De,this.size=Me,this.digest=pt,this.bytes=vt}}const Kp=({name:Ot,code:De,encode:Me})=>new o0(Ot,De,Me);class o0{constructor(De,Me,pt){this.name=De,this.code=Me,this.encode=pt}digest(De){if(De instanceof Uint8Array){const Me=this.encode(De);return Me instanceof Uint8Array?Md(this.code,Me):Me.then(pt=>Md(this.code,pt))}throw Error("Unknown type, must be binary type")}}const Zp=Ot=>function(){var De=(0,ie.Z)(function*(Me){return new Uint8Array(yield crypto.subtle.digest(Ot,Me))});return function(Me){return De.apply(this,arguments)}}(),Iu=Kp({name:"sha2-256",code:18,encode:Zp("SHA-256")}),Tf=Kp({name:"sha2-512",code:19,encode:Zp("SHA-512")});Object.freeze({__proto__:null,sha256:Iu,sha512:Tf});const Od=fu;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:Od,digest:Ot=>Md(0,Od(Ot))}}),new TextEncoder,new TextDecoder;const pl={...Fo,...Zo,...$u,...au,...id,...Ad,...lf,...nc,...Zd,...ac};function Yp(Ot){return null!=globalThis.Buffer?new Uint8Array(Ot.buffer,Ot.byteOffset,Ot.byteLength):Ot}function md(Ot,De,Me,pt){return{name:Ot,prefix:De,encoder:{name:Ot,prefix:De,encode:Me},decoder:{decode:pt}}}const If=md("utf8","u",Ot=>"u"+new TextDecoder("utf8").decode(Ot),Ot=>(new TextEncoder).encode(Ot.substring(1))),bp=md("ascii","a",Ot=>{let De="a";for(let Me=0;Me{const De=function(Ot=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Yp(globalThis.Buffer.allocUnsafe(Ot)):new Uint8Array(Ot)}((Ot=Ot.substring(1)).length);for(let Me=0;Me(this.isInitialized(),this.keychain.has(vt)),this.set=function(){var vt=(0,ie.Z)(function*(Dt,nn){pt.isInitialized(),pt.keychain.set(Dt,nn),yield pt.persist()});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.get=vt=>{this.isInitialized();const Dt=this.keychain.get(vt);if(typeof Dt>"u"){const{message:nn}=Cn("NO_MATCHING_KEY",`${this.name}: ${vt}`);throw new Error(nn)}return Dt},this.del=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),pt.keychain.delete(Dt),yield pt.persist()});return function(Dt){return vt.apply(this,arguments)}}(),this.core=De,this.logger=(0,Io.generateChildLogger)(Me,this.name)}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setKeyChain(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,ji(De))})()}getKeyChain(){var De=this;return(0,ie.Z)(function*(){const Me=yield De.core.storage.getItem(De.storageKey);return typeof Me<"u"?so(Me):void 0})()}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setKeyChain(De.keychain)})()}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class xh{constructor(De,Me,pt){var vt=this;this.core=De,this.logger=Me,this.name="crypto",this.initialized=!1,this.init=(0,ie.Z)(function*(){vt.initialized||(yield vt.keychain.init(),vt.initialized=!0)}),this.hasKeys=Dt=>(this.isInitialized(),this.keychain.has(Dt)),this.getClientId=(0,ie.Z)(function*(){vt.isInitialized();const Dt=yield vt.getClientSeed(),nn=Hc.generateKeyPair(Dt);return Hc.encodeIss(nn.publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const Dt=function(){const Ot=T.Au();return{privateKey:(0,g.BB)(Ot.secretKey,Ee),publicKey:(0,g.BB)(Ot.publicKey,Ee)}}();return this.setPrivateKey(Dt.publicKey,Dt.privateKey)},this.signJWT=function(){var Dt=(0,ie.Z)(function*(nn){vt.isInitialized();const Nn=yield vt.getClientSeed(),Mr=Hc.generateKeyPair(Nn),Vr=Ye(),Si=Hf;return yield Hc.signJWT(Vr,nn,Si,Mr)});return function(nn){return Dt.apply(this,arguments)}}(),this.generateSharedKey=(Dt,nn,Nn)=>{this.isInitialized();const Vr=function(Ot,De){const Me=T.gi((0,g.mL)(Ot,Ee),(0,g.mL)(De,Ee),!0),pt=new d.t(f.mE,Me).expand(32);return(0,g.BB)(pt,Ee)}(this.getPrivateKey(Dt),nn);return this.setSymKey(Vr,Nn)},this.setSymKey=function(){var Dt=(0,ie.Z)(function*(nn,Nn){vt.isInitialized();const Mr=Nn||function(Ot){const De=(0,f.vp)((0,g.mL)(Ot,Ee));return(0,g.BB)(De,Ee)}(nn);return yield vt.keychain.set(Mr,nn),Mr});return function(nn,Nn){return Dt.apply(this,arguments)}}(),this.deleteKeyPair=function(){var Dt=(0,ie.Z)(function*(nn){vt.isInitialized(),yield vt.keychain.del(nn)});return function(nn){return Dt.apply(this,arguments)}}(),this.deleteSymKey=function(){var Dt=(0,ie.Z)(function*(nn){vt.isInitialized(),yield vt.keychain.del(nn)});return function(nn){return Dt.apply(this,arguments)}}(),this.encode=function(){var Dt=(0,ie.Z)(function*(nn,Nn,Mr){vt.isInitialized();const Vr=fn(Mr),Si=function(Ot){return"string"==typeof Ot?Ot:(Ot=>JSON.stringify(Ot,(De,Me)=>"bigint"==typeof Me?Me.toString()+"n":Me))(Ot)||""}(Nn);if($n(Vr)){const uo=Vr.senderPublicKey,Jo=Vr.receiverPublicKey;nn=yield vt.generateSharedKey(uo,Jo)}const ls=vt.getSymKey(nn),{type:Oo,senderPublicKey:Yo}=Vr;return function(Ot){const De=function(Ot){return(0,g.mL)(`${Ot}`,"base10")}(typeof Ot.type<"u"?Ot.type:0);if(1===Nt(De)&&typeof Ot.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const Me=typeof Ot.senderPublicKey<"u"?(0,g.mL)(Ot.senderPublicKey,Ee):void 0,pt=typeof Ot.iv<"u"?(0,g.mL)(Ot.iv,Ee):(0,x.randomBytes)(12);return function(Ot){if(1===Nt(Ot.type)){if(typeof Ot.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,g.BB)((0,g.zo)([Ot.type,Ot.senderPublicKey,Ot.iv,Ot.sealed]),ze)}return(0,g.BB)((0,g.zo)([Ot.type,Ot.iv,Ot.sealed]),ze)}({type:De,sealed:new E.OK((0,g.mL)(Ot.symKey,Ee)).seal(pt,(0,g.mL)(Ot.message,Ve)),iv:pt,senderPublicKey:Me})}({type:Oo,symKey:ls,message:Si,senderPublicKey:Yo})});return function(nn,Nn,Mr){return Dt.apply(this,arguments)}}(),this.decode=function(){var Dt=(0,ie.Z)(function*(nn,Nn,Mr){vt.isInitialized();const Vr=function(Ot,De){const Me=Yt(Ot);return fn({type:Nt(Me.type),senderPublicKey:typeof Me.senderPublicKey<"u"?(0,g.BB)(Me.senderPublicKey,Ee):void 0,receiverPublicKey:De?.receiverPublicKey})}(Nn,Mr);if($n(Vr)){const Si=Vr.receiverPublicKey,ls=Vr.senderPublicKey;nn=yield vt.generateSharedKey(Si,ls)}try{const ls=function(Ot){const De=new E.OK((0,g.mL)(Ot.symKey,Ee)),{sealed:Me,iv:pt}=Yt(Ot.encoded),vt=De.open(pt,Me);if(null===vt)throw new Error("Failed to decrypt");return(0,g.BB)(vt,Ve)}({symKey:vt.getSymKey(nn),encoded:Nn});return function(Ot){if("string"!=typeof Ot)throw new Error("Cannot safe json parse value of type "+typeof Ot);try{return(Ot=>{const Me=Ot.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(Me,(pt,vt)=>"string"==typeof vt&&vt.match(/^\d+n$/)?BigInt(vt.substring(0,vt.length-1)):vt)})(Ot)}catch{return Ot}}(ls)}catch(Si){vt.logger.error(`Failed to decode message from topic: '${nn}', clientId: '${yield vt.getClientId()}'`),vt.logger.error(Si)}});return function(nn,Nn,Mr){return Dt.apply(this,arguments)}}(),this.getPayloadType=Dt=>Nt(Yt(Dt).type),this.getPayloadSenderPublicKey=Dt=>{const nn=Yt(Dt);return nn.senderPublicKey?(0,g.BB)(nn.senderPublicKey,Ee):void 0},this.core=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.keychain=pt||new xp(this.core,this.logger)}get context(){return(0,Io.getLoggerContext)(this.logger)}setPrivateKey(De,Me){var pt=this;return(0,ie.Z)(function*(){return yield pt.keychain.set(De,Me),De})()}getPrivateKey(De){return this.keychain.get(De)}getClientSeed(){var De=this;return(0,ie.Z)(function*(){let Me="";try{Me=De.keychain.get(Xp)}catch{Me=Ye(),yield De.keychain.set(Xp,Me)}return function(Ot,De="utf8"){const Me=Jp[De];if(!Me)throw new Error(`Unsupported encoding "${De}"`);return"utf8"!==De&&"utf-8"!==De||null==globalThis.Buffer||null==globalThis.Buffer.from?Me.decoder.decode(`${Me.prefix}${Ot}`):Yp(globalThis.Buffer.from(Ot,"utf-8"))}(Me,"base16")})()}getSymKey(De){return this.keychain.get(De)}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class f0 extends class{constructor(De,Me){this.logger=De,this.core=Me}}{constructor(De,Me){var pt;super(De,Me),pt=this,this.logger=De,this.core=Me,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){if(!pt.initialized){pt.logger.trace("Initialized");try{const vt=yield pt.getRelayerMessages();typeof vt<"u"&&(pt.messages=vt),pt.logger.debug(`Successfully Restored records for ${pt.name}`),pt.logger.trace({type:"method",method:"restore",size:pt.messages.size})}catch(vt){pt.logger.debug(`Failed to Restore records for ${pt.name}`),pt.logger.error(vt)}finally{pt.initialized=!0}}}),this.set=function(){var vt=(0,ie.Z)(function*(Dt,nn){pt.isInitialized();const Nn=Wt(nn);let Mr=pt.messages.get(Dt);return typeof Mr>"u"&&(Mr={}),typeof Mr[Nn]<"u"||(Mr[Nn]=nn,pt.messages.set(Dt,Mr),yield pt.persist()),Nn});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.get=vt=>{this.isInitialized();let Dt=this.messages.get(vt);return typeof Dt>"u"&&(Dt={}),Dt},this.has=(vt,Dt)=>(this.isInitialized(),typeof this.get(vt)[Wt(Dt)]<"u"),this.del=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),pt.messages.delete(Dt),yield pt.persist()});return function(Dt){return vt.apply(this,arguments)}}(),this.logger=(0,Io.generateChildLogger)(De,this.name),this.core=Me}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setRelayerMessages(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,ji(De))})()}getRelayerMessages(){var De=this;return(0,ie.Z)(function*(){const Me=yield De.core.storage.getItem(De.storageKey);return typeof Me<"u"?so(Me):void 0})()}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setRelayerMessages(De.messages)})()}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class Gf extends la{constructor(De,Me){var pt;super(De,Me),pt=this,this.relayer=De,this.logger=Me,this.events=new z.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,o.toMiliseconds)(o.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){var Mr;pt.logger.debug("Publishing Payload"),pt.logger.trace({type:"method",method:"publish",params:{topic:Dt,message:nn,opts:Nn}});try{const Vr=Nn?.ttl||Pd,Si=Eu(Nn),ls=Nn?.prompt||!1,Oo=Nn?.tag||0,Yo=Nn?.id||(0,Ca.getBigIntRpcId)().toString(),uo={topic:Dt,message:nn,opts:{ttl:Vr,relay:Si,prompt:ls,tag:Oo,id:Yo}},Jo=setTimeout(()=>pt.queue.set(Yo,uo),pt.publishTimeout);try{yield yield Ao(pt.rpcPublish(Dt,nn,Vr,Si,ls,Oo,Yo),pt.publishTimeout,"Failed to publish payload, please try again."),pt.removeRequestFromQueue(Yo),pt.relayer.events.emit("relayer_publish",uo)}catch(Lo){if(pt.logger.debug("Publishing Payload stalled"),pt.needsTransportRestart=!0,null!=(Mr=Nn?.internal)&&Mr.throwOnFailedPublish)throw pt.removeRequestFromQueue(Yo),Lo;return}finally{clearTimeout(Jo)}pt.logger.debug("Successfully Published Payload"),pt.logger.trace({type:"method",method:"publish",params:{topic:Dt,message:nn,opts:Nn}})}catch(Vr){throw pt.logger.debug("Failed to Publish Payload"),pt.logger.error(Vr),Vr}});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.relayer=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.registerEventListeners()}get context(){return(0,Io.getLoggerContext)(this.logger)}rpcPublish(De,Me,pt,vt,Dt,nn,Nn){var Mr,Vr,Si,ls;const Oo={method:jo(vt.protocol).publish,params:{topic:De,message:Me,ttl:pt,prompt:Dt,tag:nn},id:Nn};return Cs(null==(Mr=Oo.params)?void 0:Mr.prompt)&&(null==(Vr=Oo.params)||delete Vr.prompt),Cs(null==(Si=Oo.params)?void 0:Si.tag)&&(null==(ls=Oo.params)||delete ls.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:Oo}),this.relayer.request(Oo)}removeRequestFromQueue(De){this.queue.delete(De)}checkQueue(){var De=this;this.queue.forEach(function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,message:Dt,opts:nn}=pt;yield De.publish(vt,Dt,nn)});return function(pt){return Me.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit("relayer_connection_stalled");this.checkQueue()}),this.relayer.on("relayer_message_ack",De=>{this.removeRequestFromQueue(De.id.toString())})}}class E1{constructor(){this.map=new Map,this.set=(De,Me)=>{const pt=this.get(De);this.exists(De,Me)||this.map.set(De,[...pt,Me])},this.get=De=>this.map.get(De)||[],this.exists=(De,Me)=>this.get(De).includes(Me),this.delete=(De,Me)=>{if(typeof Me>"u")return void this.map.delete(De);if(!this.map.has(De))return;const pt=this.get(De);if(!this.exists(De,Me))return;const vt=pt.filter(Dt=>Dt!==Me);vt.length?this.map.set(De,vt):this.map.delete(De)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var kf=Object.defineProperty,kl=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Bd=Object.getOwnPropertySymbols,q0=Object.prototype.hasOwnProperty,T1=Object.prototype.propertyIsEnumerable,Eh=(Ot,De,Me)=>De in Ot?kf(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Cf=(Ot,De)=>{for(var Me in De||(De={}))q0.call(De,Me)&&Eh(Ot,Me,De[Me]);if(Bd)for(var Me of Bd(De))T1.call(De,Me)&&Eh(Ot,Me,De[Me]);return Ot},ml=(Ot,De)=>kl(Ot,qh(De));class Ep extends rd{constructor(De,Me){var pt;super(De,Me),pt=this,this.relayer=De,this.logger=Me,this.subscriptions=new Map,this.topicMap=new E1,this.events=new z.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=rc,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=(0,ie.Z)(function*(){pt.initialized||(pt.logger.trace("Initialized"),pt.registerEventListeners(),pt.clientId=yield pt.relayer.core.crypto.getClientId())}),this.subscribe=function(){var vt=(0,ie.Z)(function*(Dt,nn){yield pt.restartToComplete(),pt.isInitialized(),pt.logger.debug("Subscribing Topic"),pt.logger.trace({type:"method",method:"subscribe",params:{topic:Dt,opts:nn}});try{const Nn=Eu(nn),Mr={topic:Dt,relay:Nn};pt.pending.set(Dt,Mr);const Vr=yield pt.rpcSubscribe(Dt,Nn);return pt.onSubscribe(Vr,Mr),pt.logger.debug("Successfully Subscribed Topic"),pt.logger.trace({type:"method",method:"subscribe",params:{topic:Dt,opts:nn}}),Vr}catch(Nn){throw pt.logger.debug("Failed to Subscribe Topic"),pt.logger.error(Nn),Nn}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.unsubscribe=function(){var vt=(0,ie.Z)(function*(Dt,nn){yield pt.restartToComplete(),pt.isInitialized(),typeof nn?.id<"u"?yield pt.unsubscribeById(Dt,nn.id,nn):yield pt.unsubscribeByTopic(Dt,nn)});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.isSubscribed=function(){var vt=(0,ie.Z)(function*(Dt){return!!pt.topics.includes(Dt)||(yield new Promise((nn,Nn)=>{const Mr=new o.Watch;Mr.start(pt.pendingSubscriptionWatchLabel);const Vr=setInterval(()=>{!pt.pending.has(Dt)&&pt.topics.includes(Dt)&&(clearInterval(Vr),Mr.stop(pt.pendingSubscriptionWatchLabel),nn(!0)),Mr.elapsed(pt.pendingSubscriptionWatchLabel)>=uc&&(clearInterval(Vr),Mr.stop(pt.pendingSubscriptionWatchLabel),Nn(new Error("Subscription resolution timeout")))},pt.pollingInterval)}).catch(()=>!1))});return function(Dt){return vt.apply(this,arguments)}}(),this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.restart=(0,ie.Z)(function*(){pt.restartInProgress=!0,yield pt.restore(),yield pt.reset(),pt.restartInProgress=!1}),this.relayer=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.clientId=""}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(De,Me){let pt=!1;try{pt=this.getSubscription(De).topic===Me}catch{}return pt}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(De,Me){var pt=this;return(0,ie.Z)(function*(){const vt=pt.topicMap.get(De);yield Promise.all(vt.map(function(){var Dt=(0,ie.Z)(function*(nn){return yield pt.unsubscribeById(De,nn,Me)});return function(nn){return Dt.apply(this,arguments)}}()))})()}unsubscribeById(De,Me,pt){var vt=this;return(0,ie.Z)(function*(){vt.logger.debug("Unsubscribing Topic"),vt.logger.trace({type:"method",method:"unsubscribe",params:{topic:De,id:Me,opts:pt}});try{const Dt=Eu(pt);yield vt.rpcUnsubscribe(De,Me,Dt);const nn=Ir("USER_DISCONNECTED",`${vt.name}, ${De}`);yield vt.onUnsubscribe(De,Me,nn),vt.logger.debug("Successfully Unsubscribed Topic"),vt.logger.trace({type:"method",method:"unsubscribe",params:{topic:De,id:Me,opts:pt}})}catch(Dt){throw vt.logger.debug("Failed to Unsubscribe Topic"),vt.logger.error(Dt),Dt}})()}rpcSubscribe(De,Me){var pt=this;return(0,ie.Z)(function*(){const vt={method:jo(Me.protocol).subscribe,params:{topic:De}};pt.logger.debug("Outgoing Relay Payload"),pt.logger.trace({type:"payload",direction:"outgoing",request:vt});try{yield yield Ao(pt.relayer.request(vt),pt.subscribeTimeout)}catch{pt.logger.debug("Outgoing Relay Subscribe Payload stalled"),pt.relayer.events.emit("relayer_connection_stalled")}return Wt(De+pt.clientId)})()}rpcBatchSubscribe(De){var Me=this;return(0,ie.Z)(function*(){if(!De.length)return;const vt={method:jo(De[0].relay.protocol).batchSubscribe,params:{topics:De.map(Dt=>Dt.topic)}};Me.logger.debug("Outgoing Relay Payload"),Me.logger.trace({type:"payload",direction:"outgoing",request:vt});try{return yield yield Ao(Me.relayer.request(vt),Me.subscribeTimeout)}catch{Me.logger.debug("Outgoing Relay Payload stalled"),Me.relayer.events.emit("relayer_connection_stalled")}})()}rpcUnsubscribe(De,Me,pt){const vt={method:jo(pt.protocol).unsubscribe,params:{topic:De,id:Me}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:vt}),this.relayer.request(vt)}onSubscribe(De,Me){this.setSubscription(De,ml(Cf({},Me),{id:De})),this.pending.delete(Me.topic)}onBatchSubscribe(De){De.length&&De.forEach(Me=>{this.setSubscription(Me.id,Cf({},Me)),this.pending.delete(Me.topic)})}onUnsubscribe(De,Me,pt){var vt=this;return(0,ie.Z)(function*(){vt.events.removeAllListeners(Me),vt.hasSubscription(Me,De)&&vt.deleteSubscription(Me,pt),yield vt.relayer.messages.del(De)})()}setRelayerSubscriptions(De){var Me=this;return(0,ie.Z)(function*(){yield Me.relayer.core.storage.setItem(Me.storageKey,De)})()}getRelayerSubscriptions(){var De=this;return(0,ie.Z)(function*(){return yield De.relayer.core.storage.getItem(De.storageKey)})()}setSubscription(De,Me){this.subscriptions.has(De)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:De,subscription:Me}),this.addSubscription(De,Me))}addSubscription(De,Me){this.subscriptions.set(De,Cf({},Me)),this.topicMap.set(Me.topic,De),this.events.emit(bd_created,Me)}getSubscription(De){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:De});const Me=this.subscriptions.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw new Error(pt)}return Me}deleteSubscription(De,Me){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:De,reason:Me});const pt=this.getSubscription(De);this.subscriptions.delete(De),this.topicMap.delete(pt.topic,De),this.events.emit(bd_deleted,ml(Cf({},pt),{reason:Me}))}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setRelayerSubscriptions(De.values),De.events.emit("subscription_sync")})()}reset(){var De=this;return(0,ie.Z)(function*(){if(De.cached.length){const Me=Math.ceil(De.cached.length/De.batchSubscribeTopicsLimit);for(let pt=0;pt"u"||!Me.length)return;if(De.subscriptions.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),De.logger.error(`${De.name}: ${JSON.stringify(De.values)}`),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored subscriptions for ${De.name}`),De.logger.trace({type:"method",method:"restore",subscriptions:De.values})}catch(Me){De.logger.debug(`Failed to Restore subscriptions for ${De.name}`),De.logger.error(Me)}})()}batchSubscribe(De){var Me=this;return(0,ie.Z)(function*(){if(!De.length)return;const pt=yield Me.rpcBatchSubscribe(De);Ei(pt)&&Me.onBatchSubscribe(pt.map((vt,Dt)=>ml(Cf({},De[Dt]),{id:vt})))})()}onConnect(){var De=this;return(0,ie.Z)(function*(){De.restartInProgress||(yield De.restart(),De.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var De=this;return(0,ie.Z)(function*(){if(!De.initialized||De.relayer.transportExplicitlyClosed)return;const Me=[];De.pending.forEach(pt=>{Me.push(pt)}),yield De.batchSubscribe(Me)})()}registerEventListeners(){var De=this;this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,(0,ie.Z)(function*(){yield De.checkPending()})),this.relayer.on("relayer_connect",(0,ie.Z)(function*(){yield De.onConnect()})),this.relayer.on("relayer_disconnect",()=>{this.onDisconnect()}),this.events.on(bd_created,function(){var Me=(0,ie.Z)(function*(pt){const vt=bd_created;De.logger.info(`Emitting ${vt}`),De.logger.debug({type:"event",event:vt,data:pt}),yield De.persist()});return function(pt){return Me.apply(this,arguments)}}()),this.events.on(bd_deleted,function(){var Me=(0,ie.Z)(function*(pt){const vt=bd_deleted;De.logger.info(`Emitting ${vt}`),De.logger.debug({type:"event",event:vt,data:pt}),yield De.persist()});return function(pt){return Me.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}restartToComplete(){var De=this;return(0,ie.Z)(function*(){De.restartInProgress&&(yield new Promise(Me=>{const pt=setInterval(()=>{De.restartInProgress||(clearInterval(pt),Me())},De.pollingInterval)}))})()}}var Tp=Object.defineProperty,K0=Object.getOwnPropertySymbols,Fl=Object.prototype.hasOwnProperty,zf=Object.prototype.propertyIsEnumerable,Ja=(Ot,De,Me)=>De in Ot?Tp(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me;class e1 extends tc{constructor(De){var Me;super(De),Me=this,this.protocol="wc",this.version=2,this.events=new z.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=function(){var pt=(0,ie.Z)(function*(vt){Me.logger.debug("Publishing Request Payload");try{return yield Me.toEstablishConnection(),yield Me.provider.request(vt)}catch(Dt){throw Me.logger.debug("Failed to Publish Request"),Me.logger.error(Dt),Dt}});return function(vt){return pt.apply(this,arguments)}}(),this.onPayloadHandler=pt=>{this.onProviderPayload(pt)},this.onConnectHandler=()=>{this.events.emit("relayer_connect")},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=pt=>{this.logger.error(pt),this.events.emit("relayer_error",pt),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on("payload",this.onPayloadHandler),this.provider.on("connect",this.onConnectHandler),this.provider.on("disconnect",this.onDisconnectHandler),this.provider.on("error",this.onProviderErrorHandler)},this.core=De.core,this.logger=typeof De.logger<"u"&&"string"!=typeof De.logger?(0,Io.generateChildLogger)(De.logger,this.name):(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De.logger||"error"})),this.messages=new f0(this.logger,De.core),this.subscriber=new Ep(this,this.logger),this.publisher=new Gf(this,this.logger),this.relayUrl=De?.relayUrl||vp,this.projectId=De.projectId,this.provider={}}init(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized"),De.registerEventListeners(),yield De.createProvider(),yield Promise.all([De.messages.init(),De.subscriber.init()]);try{yield De.transportOpen()}catch{De.logger.warn(`Connection via ${De.relayUrl} failed, attempting to connect via failover domain ${c0}...`),yield De.restartTransport(c0)}De.initialized=!0,setTimeout((0,ie.Z)(function*(){0===De.subscriber.topics.length&&(De.logger.info("No topics subscribed to after init, closing transport"),yield De.transportClose(),De.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return(0,Io.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(De,Me,pt){var vt=this;return(0,ie.Z)(function*(){vt.isInitialized(),yield vt.publisher.publish(De,Me,pt),yield vt.recordMessageEvent({topic:De,message:Me,publishedAt:Date.now()})})()}subscribe(De,Me){var pt=this;return(0,ie.Z)(function*(){var vt;pt.isInitialized();let Dt=(null==(vt=pt.subscriber.topicMap.get(De))?void 0:vt[0])||"";return Dt||(yield Promise.all([new Promise(nn=>{pt.subscriber.once(bd_created,Nn=>{Nn.topic===De&&nn()})}),new Promise(function(){var nn=(0,ie.Z)(function*(Nn){Dt=yield pt.subscriber.subscribe(De,Me),Nn()});return function(Nn){return nn.apply(this,arguments)}}())]),Dt)})()}unsubscribe(De,Me){var pt=this;return(0,ie.Z)(function*(){pt.isInitialized(),yield pt.subscriber.unsubscribe(De,Me)})()}on(De,Me){this.events.on(De,Me)}once(De,Me){this.events.once(De,Me)}off(De,Me){this.events.off(De,Me)}removeListener(De,Me){this.events.removeListener(De,Me)}transportClose(){var De=this;return(0,ie.Z)(function*(){De.transportExplicitlyClosed=!0,De.hasExperiencedNetworkDisruption&&De.connected?yield Ao(De.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>De.onProviderDisconnect()):De.connected&&(yield De.provider.disconnect())})()}transportOpen(De){var Me=this;return(0,ie.Z)(function*(){if(Me.transportExplicitlyClosed=!1,yield Me.confirmOnlineStateOrThrow(),!Me.connectionAttemptInProgress){De&&De!==Me.relayUrl&&(Me.relayUrl=De,yield Me.transportClose(),yield Me.createProvider()),Me.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(pt=>{if(!Me.initialized)return pt();Me.subscriber.once("subscription_resubscribed",()=>{pt()})}),new Promise(function(){var pt=(0,ie.Z)(function*(vt,Dt){try{yield Ao(Me.provider.connect(),1e4,`Socket stalled when trying to connect to ${Me.relayUrl}`)}catch(nn){return void Dt(nn)}vt()});return function(vt,Dt){return pt.apply(this,arguments)}}())])}catch(pt){if(Me.logger.error(pt),!Me.isConnectionStalled(pt.message))throw pt;Me.provider.events.emit("disconnect")}finally{Me.connectionAttemptInProgress=!1,Me.hasExperiencedNetworkDisruption=!1}}})()}restartTransport(De){var Me=this;return(0,ie.Z)(function*(){yield Me.confirmOnlineStateOrThrow(),!Me.connectionAttemptInProgress&&(Me.relayUrl=De||Me.relayUrl,yield Me.transportClose(),yield Me.createProvider(),yield Me.transportOpen())})()}confirmOnlineStateOrThrow(){return(0,ie.Z)(function*(){if(!(yield Gc()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}isConnectionStalled(De){return this.staleConnectionErrors.some(Me=>De.includes(Me))}createProvider(){var De=this;return(0,ie.Z)(function*(){De.provider.connection&&De.unregisterProviderListeners();const Me=yield De.core.crypto.signJWT(De.relayUrl);De.provider=new fd.r(new Or.Z(function({protocol:Ot,version:De,relayUrl:Me,sdkVersion:pt,auth:vt,projectId:Dt,useOnCloseEvent:nn}){const Nn=Me.split("?"),Mr=wi(Ot,De,pt),Si=function(Ot,De){let Me=v.parse(Ot);return Me=bn(bn({},Me),De),v.stringify(Me)}(Nn[1]||"",{auth:vt,ua:Mr,projectId:Dt,useOnCloseEvent:nn||void 0});return Nn[0]+"?"+Si}({sdkVersion:"2.10.1",protocol:De.protocol,version:De.version,relayUrl:De.relayUrl,projectId:De.projectId,auth:Me,useOnCloseEvent:!0}))),De.registerProviderListeners()})()}recordMessageEvent(De){var Me=this;return(0,ie.Z)(function*(){const{topic:pt,message:vt}=De;yield Me.messages.set(pt,vt)})()}shouldIgnoreMessageEvent(De){var Me=this;return(0,ie.Z)(function*(){const{topic:pt,message:vt}=De;if(!vt||0===vt.length)return Me.logger.debug(`Ignoring invalid/empty message: ${vt}`),!0;if(!(yield Me.subscriber.isSubscribed(pt)))return Me.logger.debug(`Ignoring message for non-subscribed topic ${pt}`),!0;const Dt=Me.messages.has(pt,vt);return Dt&&Me.logger.debug(`Ignoring duplicate message: ${vt}`),Dt})()}onProviderPayload(De){var Me=this;return(0,ie.Z)(function*(){if(Me.logger.debug("Incoming Relay Payload"),Me.logger.trace({type:"payload",direction:"incoming",payload:De}),(0,Ca.isJsonRpcRequest)(De)){if(!De.method.endsWith("_subscription"))return;const pt=De.params,{topic:vt,message:Dt,publishedAt:nn}=pt.data,Nn={topic:vt,message:Dt,publishedAt:nn};Me.logger.debug("Emitting Relayer Payload"),Me.logger.trace(((Ot,De)=>{for(var Me in De||(De={}))Fl.call(De,Me)&&Ja(Ot,Me,De[Me]);if(K0)for(var Me of K0(De))zf.call(De,Me)&&Ja(Ot,Me,De[Me]);return Ot})({type:"event",event:pt.id},Nn)),Me.events.emit(pt.id,Nn),yield Me.acknowledgePayload(De),yield Me.onMessageEvent(Nn)}else(0,Ca.isJsonRpcResponse)(De)&&Me.events.emit("relayer_message_ack",De)})()}onMessageEvent(De){var Me=this;return(0,ie.Z)(function*(){(yield Me.shouldIgnoreMessageEvent(De))||(Me.events.emit("relayer_message",De),yield Me.recordMessageEvent(De))})()}acknowledgePayload(De){var Me=this;return(0,ie.Z)(function*(){const pt=(0,Ca.formatJsonRpcResult)(De.id,!0);yield Me.provider.connection.send(pt)})()}unregisterProviderListeners(){this.provider.off("payload",this.onPayloadHandler),this.provider.off("connect",this.onConnectHandler),this.provider.off("disconnect",this.onDisconnectHandler),this.provider.off("error",this.onProviderErrorHandler)}registerEventListeners(){var De=this;return(0,ie.Z)(function*(){De.events.on("relayer_connection_stalled",()=>{De.restartTransport().catch(pt=>De.logger.error(pt))});let Me=yield Gc();!function(Ot){switch(br()){case"browser":!function(Ot){ar()&&(window.addEventListener("online",()=>Ot(!0)),window.addEventListener("offline",()=>Ot(!1)))}(Ot);break;case"react-native":!function(Ot){Vi()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(De=>Ot(De?.isConnected))}(Ot)}}(function(){var pt=(0,ie.Z)(function*(vt){De.initialized&&Me!==vt&&(Me=vt,vt?yield De.restartTransport().catch(Dt=>De.logger.error(Dt)):(De.hasExperiencedNetworkDisruption=!0,yield De.transportClose().catch(Dt=>De.logger.error(Dt))))});return function(vt){return pt.apply(this,arguments)}}())})()}onProviderDisconnect(){this.events.emit("relayer_disconnect"),this.attemptToReconnect()}attemptToReconnect(){var De=this;this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((0,ie.Z)(function*(){yield De.restartTransport().catch(Me=>De.logger.error(Me))}),(0,o.toMiliseconds)(Wf)))}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}toEstablishConnection(){var De=this;return(0,ie.Z)(function*(){if(yield De.confirmOnlineStateOrThrow(),!De.connected){if(De.connectionAttemptInProgress)return yield new Promise(Me=>{const pt=setInterval(()=>{De.connected&&(clearInterval(pt),Me())},De.connectionStatusPollingInterval)});yield De.restartTransport()}})()}}var Je=Object.defineProperty,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,We=(Ot,De,Me)=>De in Ot?Je(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Xe=(Ot,De)=>{for(var Me in De||(De={}))Pe.call(De,Me)&&We(Ot,Me,De[Me]);if(oe)for(var Me of oe(De))He.call(De,Me)&&We(Ot,Me,De[Me]);return Ot};class at extends class{constructor(De,Me,pt,vt){this.core=De,this.logger=Me,this.name=pt}}{constructor(De,Me,pt,vt=rc,Dt){var nn;super(De,Me,pt,vt),nn=this,this.core=De,this.logger=Me,this.name=pt,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){nn.initialized||(nn.logger.trace("Initialized"),yield nn.restore(),nn.cached.forEach(Nn=>{nn.getKey&&null!==Nn&&!Cs(Nn)?nn.map.set(nn.getKey(Nn),Nn):function(Ot){var De;return null==(De=Ot?.proposer)?void 0:De.publicKey}(Nn)?nn.map.set(Nn.id,Nn):Nn?.topic&&nn.map.set(Nn.topic,Nn)}),nn.cached=[],nn.initialized=!0)}),this.set=function(){var Nn=(0,ie.Z)(function*(Mr,Vr){nn.isInitialized(),nn.map.has(Mr)?yield nn.update(Mr,Vr):(nn.logger.debug("Setting value"),nn.logger.trace({type:"method",method:"set",key:Mr,value:Vr}),nn.map.set(Mr,Vr),yield nn.persist())});return function(Mr,Vr){return Nn.apply(this,arguments)}}(),this.get=Nn=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:Nn}),this.getData(Nn)),this.getAll=Nn=>(this.isInitialized(),Nn?this.values.filter(Mr=>Object.keys(Nn).every(Vr=>ii()(Mr[Vr],Nn[Vr]))):this.values),this.update=function(){var Nn=(0,ie.Z)(function*(Mr,Vr){nn.isInitialized(),nn.logger.debug("Updating value"),nn.logger.trace({type:"method",method:"update",key:Mr,update:Vr});const Si=Xe(Xe({},nn.getData(Mr)),Vr);nn.map.set(Mr,Si),yield nn.persist()});return function(Mr,Vr){return Nn.apply(this,arguments)}}(),this.delete=function(){var Nn=(0,ie.Z)(function*(Mr,Vr){nn.isInitialized(),nn.map.has(Mr)&&(nn.logger.debug("Deleting value"),nn.logger.trace({type:"method",method:"delete",key:Mr,reason:Vr}),nn.map.delete(Mr),yield nn.persist())});return function(Mr,Vr){return Nn.apply(this,arguments)}}(),this.logger=(0,Io.generateChildLogger)(Me,this.name),this.storagePrefix=vt,this.getKey=Dt}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,De)})()}getDataStore(){var De=this;return(0,ie.Z)(function*(){return yield De.core.storage.getItem(De.storageKey)})()}getData(De){const Me=this.map.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw this.logger.error(pt),new Error(pt)}return Me}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setDataStore(De.values)})()}restore(){var De=this;return(0,ie.Z)(function*(){try{const Me=yield De.getDataStore();if(typeof Me>"u"||!Me.length)return;if(De.map.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored value for ${De.name}`),De.logger.trace({type:"method",method:"restore",value:De.values})}catch(Me){De.logger.debug(`Failed to Restore value for ${De.name}`),De.logger.error(Me)}})()}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class _t{constructor(De,Me){var pt=this;this.core=De,this.logger=Me,this.name="pairing",this.version="0.3",this.events=new(O()),this.initialized=!1,this.storagePrefix=rc,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=(0,ie.Z)(function*(){pt.initialized||(yield pt.pairings.init(),yield pt.cleanup(),pt.registerRelayerEvents(),pt.registerExpirerEvents(),pt.initialized=!0,pt.logger.trace("Initialized"))}),this.register=({methods:vt})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...vt])]},this.create=(0,ie.Z)(function*(){pt.isInitialized();const vt=Ye(),Dt=yield pt.core.crypto.setSymKey(vt),nn=Qa(o.FIVE_MINUTES),Nn={protocol:"irn"},Mr={topic:Dt,expiry:nn,relay:Nn,active:!1},Vr=function(Ot){return`${Ot.protocol}:${Ot.topic}@${Ot.version}?`+v.stringify(((Ot,De)=>{for(var Me in De||(De={}))El.call(De,Me)&&kc(Ot,Me,De[Me]);if(Vc)for(var Me of Vc(De))ec.call(De,Me)&&kc(Ot,Me,De[Me]);return Ot})({symKey:Ot.symKey},function(Ot,De="-"){const pt={};return Object.keys(Ot).forEach(vt=>{Ot[vt]&&(pt["relay"+De+vt]=Ot[vt])}),pt}(Ot.relay)))}({protocol:pt.core.protocol,version:pt.core.version,topic:Dt,symKey:vt,relay:Nn});return yield pt.pairings.set(Dt,Mr),yield pt.core.relayer.subscribe(Dt),pt.core.expirer.set(Dt,nn),{topic:Dt,uri:Vr}}),this.pair=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),pt.isValidPair(Dt);const{topic:nn,symKey:Nn,relay:Mr}=function(Ot){const De=Ot.indexOf(":"),Me=-1!==Ot.indexOf("?")?Ot.indexOf("?"):void 0,pt=Ot.substring(0,De),vt=Ot.substring(De+1,Me).split("@"),Dt=typeof Me<"u"?Ot.substring(Me):"",nn=v.parse(Dt);return{protocol:pt,topic:aa(vt[0]),version:parseInt(vt[1],10),symKey:nn.symKey,relay:eu(nn)}}(Dt.uri);let Vr;if(pt.pairings.keys.includes(nn)&&(Vr=pt.pairings.get(nn),Vr.active))throw new Error(`Pairing already exists: ${nn}. Please try again with a new connection URI.`);pt.core.crypto.keychain.has(nn)||(yield pt.core.crypto.setSymKey(Nn,nn),yield pt.core.relayer.subscribe(nn,{relay:Mr}));const Si=Qa(o.FIVE_MINUTES),ls={topic:nn,relay:Mr,expiry:Si,active:!1};return yield pt.pairings.set(nn,ls),pt.core.expirer.set(nn,Si),Dt.activatePairing&&(yield pt.activate({topic:nn})),pt.events.emit("pairing_create",ls),ls});return function(Dt){return vt.apply(this,arguments)}}(),this.activate=function(){var vt=(0,ie.Z)(function*({topic:Dt}){pt.isInitialized();const nn=Qa(o.THIRTY_DAYS);yield pt.pairings.update(Dt,{active:!0,expiry:nn}),pt.core.expirer.set(Dt,nn)});return function(Dt){return vt.apply(this,arguments)}}(),this.ping=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),yield pt.isValidPing(Dt);const{topic:nn}=Dt;if(pt.pairings.keys.includes(nn)){const Nn=yield pt.sendRequest(nn,"wc_pairingPing",{}),{done:Mr,resolve:Vr,reject:Si}=_s();pt.events.once(xa("pairing_ping",Nn),({error:ls})=>{ls?Si(ls):Vr()}),yield Mr()}});return function(Dt){return vt.apply(this,arguments)}}(),this.updateExpiry=function(){var vt=(0,ie.Z)(function*({topic:Dt,expiry:nn}){pt.isInitialized(),yield pt.pairings.update(Dt,{expiry:nn})});return function(Dt){return vt.apply(this,arguments)}}(),this.updateMetadata=function(){var vt=(0,ie.Z)(function*({topic:Dt,metadata:nn}){pt.isInitialized(),yield pt.pairings.update(Dt,{peerMetadata:nn})});return function(Dt){return vt.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),yield pt.isValidDisconnect(Dt);const{topic:nn}=Dt;pt.pairings.keys.includes(nn)&&(yield pt.sendRequest(nn,"wc_pairingDelete",Ir("USER_DISCONNECTED")),yield pt.deletePairing(nn))});return function(Dt){return vt.apply(this,arguments)}}(),this.sendRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){const Mr=(0,Ca.formatJsonRpcRequest)(nn,Nn),Vr=yield pt.core.crypto.encode(Dt,Mr),Si=qc[nn].req;return pt.core.history.set(Dt,Mr),pt.core.relayer.publish(Dt,Vr,Si),Mr.id});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.sendResult=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){const Mr=(0,Ca.formatJsonRpcResult)(Dt,Nn),Vr=yield pt.core.crypto.encode(nn,Mr),Si=yield pt.core.history.get(nn,Dt),ls=qc[Si.request.method].res;yield pt.core.relayer.publish(nn,Vr,ls),yield pt.core.history.resolve(Mr)});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.sendError=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){const Mr=(0,Ca.formatJsonRpcError)(Dt,Nn),Vr=yield pt.core.crypto.encode(nn,Mr),Si=yield pt.core.history.get(nn,Dt),ls=qc[Si.request.method]?qc[Si.request.method].res:qc.unregistered_method.res;yield pt.core.relayer.publish(nn,Vr,ls),yield pt.core.history.resolve(Mr)});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.deletePairing=function(){var vt=(0,ie.Z)(function*(Dt,nn){yield pt.core.relayer.unsubscribe(Dt),yield Promise.all([pt.pairings.delete(Dt,Ir("USER_DISCONNECTED")),pt.core.crypto.deleteSymKey(Dt),nn?Promise.resolve():pt.core.expirer.del(Dt)])});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.cleanup=(0,ie.Z)(function*(){const vt=pt.pairings.getAll().filter(Dt=>ja(Dt.expiry));yield Promise.all(vt.map(Dt=>pt.deletePairing(Dt.topic)))}),this.onRelayEventRequest=vt=>{const{topic:Dt,payload:nn}=vt;switch(nn.method){case"wc_pairingPing":return this.onPairingPingRequest(Dt,nn);case"wc_pairingDelete":return this.onPairingDeleteRequest(Dt,nn);default:return this.onUnknownRpcMethodRequest(Dt,nn)}},this.onRelayEventResponse=function(){var vt=(0,ie.Z)(function*(Dt){const{topic:nn,payload:Nn}=Dt,Mr=(yield pt.core.history.get(nn,Nn.id)).request.method;return"wc_pairingPing"===Mr?pt.onPairingPingResponse(nn,Nn):pt.onUnknownRpcMethodResponse(Mr)});return function(Dt){return vt.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn){const{id:Nn}=nn;try{pt.isValidPing({topic:Dt}),yield pt.sendResult(Nn,Dt,!0),pt.events.emit("pairing_ping",{id:Nn,topic:Dt})}catch(Mr){yield pt.sendError(Nn,Dt,Mr),pt.logger.error(Mr)}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.onPairingPingResponse=(vt,Dt)=>{const{id:nn}=Dt;setTimeout(()=>{(0,Ca.isJsonRpcResult)(Dt)?this.events.emit(xa("pairing_ping",nn),{}):(0,Ca.isJsonRpcError)(Dt)&&this.events.emit(xa("pairing_ping",nn),{error:Dt.error})},500)},this.onPairingDeleteRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn){const{id:Nn}=nn;try{pt.isValidDisconnect({topic:Dt}),yield pt.deletePairing(Dt),pt.events.emit("pairing_delete",{id:Nn,topic:Dt})}catch(Mr){yield pt.sendError(Nn,Dt,Mr),pt.logger.error(Mr)}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn){const{id:Nn,method:Mr}=nn;try{if(pt.registeredMethods.includes(Mr))return;const Vr=Ir("WC_METHOD_UNSUPPORTED",Mr);yield pt.sendError(Nn,Dt,Vr),pt.logger.error(Vr)}catch(Vr){yield pt.sendError(Nn,Dt,Vr),pt.logger.error(Vr)}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=vt=>{this.registeredMethods.includes(vt)||this.logger.error(Ir("WC_METHOD_UNSUPPORTED",vt))},this.isValidPair=vt=>{if(!tr(vt)){const{message:Dt}=Cn("MISSING_OR_INVALID",`pair() params: ${vt}`);throw new Error(Dt)}if(!function(Ot){if(zs(Ot,!1))try{return typeof new URL(Ot)<"u"}catch{return!1}return!1}(vt.uri)){const{message:Dt}=Cn("MISSING_OR_INVALID",`pair() uri: ${vt.uri}`);throw new Error(Dt)}},this.isValidPing=function(){var vt=(0,ie.Z)(function*(Dt){if(!tr(Dt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`ping() params: ${Dt}`);throw new Error(Nn)}const{topic:nn}=Dt;yield pt.isValidPairingTopic(nn)});return function(Dt){return vt.apply(this,arguments)}}(),this.isValidDisconnect=function(){var vt=(0,ie.Z)(function*(Dt){if(!tr(Dt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`disconnect() params: ${Dt}`);throw new Error(Nn)}const{topic:nn}=Dt;yield pt.isValidPairingTopic(nn)});return function(Dt){return vt.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var vt=(0,ie.Z)(function*(Dt){if(!zs(Dt,!1)){const{message:nn}=Cn("MISSING_OR_INVALID",`pairing topic should be a string: ${Dt}`);throw new Error(nn)}if(!pt.pairings.keys.includes(Dt)){const{message:nn}=Cn("NO_MATCHING_KEY",`pairing topic doesn't exist: ${Dt}`);throw new Error(nn)}if(ja(pt.pairings.get(Dt).expiry)){yield pt.deletePairing(Dt);const{message:nn}=Cn("EXPIRED",`pairing topic: ${Dt}`);throw new Error(nn)}});return function(Dt){return vt.apply(this,arguments)}}(),this.core=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.pairings=new at(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Io.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}registerRelayerEvents(){var De=this;this.core.relayer.on("relayer_message",function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,message:Dt}=pt;if(!De.pairings.keys.includes(vt)||De.ignoredPayloadTypes.includes(De.core.crypto.getPayloadType(Dt)))return;const nn=yield De.core.crypto.decode(vt,Dt);try{(0,Ca.isJsonRpcRequest)(nn)?(De.core.history.set(vt,nn),De.onRelayEventRequest({topic:vt,payload:nn})):(0,Ca.isJsonRpcResponse)(nn)&&(yield De.core.history.resolve(nn),yield De.onRelayEventResponse({topic:vt,payload:nn}),De.core.history.delete(vt,nn.id))}catch(Nn){De.logger.error(Nn)}});return function(pt){return Me.apply(this,arguments)}}())}registerExpirerEvents(){var De=this;this.core.expirer.on(Nd_expired,function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt}=Lu(pt.target);vt&&De.pairings.keys.includes(vt)&&(yield De.deletePairing(vt,!0),De.events.emit("pairing_expire",{topic:vt}))});return function(pt){return Me.apply(this,arguments)}}())}}class xt extends Bo{constructor(De,Me){var pt;super(De,Me),pt=this,this.core=De,this.logger=Me,this.records=new Map,this.events=new z.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){pt.initialized||(pt.logger.trace("Initialized"),yield pt.restore(),pt.cached.forEach(vt=>pt.records.set(vt.id,vt)),pt.cached=[],pt.registerEventListeners(),pt.initialized=!0)}),this.set=(vt,Dt,nn)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:vt,request:Dt,chainId:nn}),this.records.has(Dt.id))return;const Nn={id:Dt.id,topic:vt,request:{method:Dt.method,params:Dt.params||null},chainId:nn,expiry:Qa(o.THIRTY_DAYS)};this.records.set(Nn.id,Nn),this.events.emit("history_created",Nn)},this.resolve=function(){var vt=(0,ie.Z)(function*(Dt){if(pt.isInitialized(),pt.logger.debug("Updating JSON-RPC response history record"),pt.logger.trace({type:"method",method:"update",response:Dt}),!pt.records.has(Dt.id))return;const nn=yield pt.getRecord(Dt.id);typeof nn.response>"u"&&(nn.response=(0,Ca.isJsonRpcError)(Dt)?{error:Dt.error}:{result:Dt.result},pt.records.set(nn.id,nn),pt.events.emit("history_updated",nn))});return function(Dt){return vt.apply(this,arguments)}}(),this.get=function(){var vt=(0,ie.Z)(function*(Dt,nn){return pt.isInitialized(),pt.logger.debug("Getting record"),pt.logger.trace({type:"method",method:"get",topic:Dt,id:nn}),yield pt.getRecord(nn)});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.delete=(vt,Dt)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:Dt}),this.values.forEach(nn=>{if(nn.topic===vt){if(typeof Dt<"u"&&nn.id!==Dt)return;this.records.delete(nn.id),this.events.emit("history_deleted",nn)}})},this.exists=function(){var vt=(0,ie.Z)(function*(Dt,nn){return pt.isInitialized(),!!pt.records.has(nn)&&(yield pt.getRecord(nn)).topic===Dt});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.logger=(0,Io.generateChildLogger)(Me,this.name)}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const De=[];return this.values.forEach(Me=>{if(typeof Me.response<"u")return;const pt={topic:Me.topic,request:(0,Ca.formatJsonRpcRequest)(Me.request.method,Me.request.params,Me.id),chainId:Me.chainId};return De.push(pt)}),De}setJsonRpcRecords(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,De)})()}getJsonRpcRecords(){var De=this;return(0,ie.Z)(function*(){return yield De.core.storage.getItem(De.storageKey)})()}getRecord(De){this.isInitialized();const Me=this.records.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw new Error(pt)}return Me}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setJsonRpcRecords(De.values),De.events.emit("history_sync")})()}restore(){var De=this;return(0,ie.Z)(function*(){try{const Me=yield De.getJsonRpcRecords();if(typeof Me>"u"||!Me.length)return;if(De.records.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored records for ${De.name}`),De.logger.trace({type:"method",method:"restore",records:De.values})}catch(Me){De.logger.debug(`Failed to Restore records for ${De.name}`),De.logger.error(Me)}})()}registerEventListeners(){this.events.on("history_created",De=>{const Me="history_created";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,record:De}),this.persist()}),this.events.on("history_updated",De=>{const Me="history_updated";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,record:De}),this.persist()}),this.events.on("history_deleted",De=>{const Me="history_deleted";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,record:De}),this.persist()}),this.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(De=>{(0,o.toMiliseconds)(De.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${De.id}`),this.delete(De.topic,De.id))})}catch(De){this.logger.warn(De)}}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class $t extends Nc{constructor(De,Me){var pt;super(De,Me),pt=this,this.core=De,this.logger=Me,this.expirations=new Map,this.events=new z.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){pt.initialized||(pt.logger.trace("Initialized"),yield pt.restore(),pt.cached.forEach(vt=>pt.expirations.set(vt.target,vt)),pt.cached=[],pt.registerEventListeners(),pt.initialized=!0)}),this.has=vt=>{try{const Dt=this.formatTarget(vt);return typeof this.getExpiration(Dt)<"u"}catch{return!1}},this.set=(vt,Dt)=>{this.isInitialized();const nn=this.formatTarget(vt),Nn={target:nn,expiry:Dt};this.expirations.set(nn,Nn),this.checkExpiry(nn,Nn),this.events.emit("expirer_created",{target:nn,expiration:Nn})},this.get=vt=>{this.isInitialized();const Dt=this.formatTarget(vt);return this.getExpiration(Dt)},this.del=vt=>{if(this.isInitialized(),this.has(vt)){const Dt=this.formatTarget(vt),nn=this.getExpiration(Dt);this.expirations.delete(Dt),this.events.emit("expirer_deleted",{target:Dt,expiration:nn})}},this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.logger=(0,Io.generateChildLogger)(Me,this.name)}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(De){if("string"==typeof De)return zi("topic",De);if("number"==typeof De)return function(Ot){return zi("id",Ot)}(De);const{message:Me}=Cn("UNKNOWN_TYPE","Target type: "+typeof De);throw new Error(Me)}setExpirations(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,De)})()}getExpirations(){var De=this;return(0,ie.Z)(function*(){return yield De.core.storage.getItem(De.storageKey)})()}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setExpirations(De.values),De.events.emit("expirer_sync")})()}restore(){var De=this;return(0,ie.Z)(function*(){try{const Me=yield De.getExpirations();if(typeof Me>"u"||!Me.length)return;if(De.expirations.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored expirations for ${De.name}`),De.logger.trace({type:"method",method:"restore",expirations:De.values})}catch(Me){De.logger.debug(`Failed to Restore expirations for ${De.name}`),De.logger.error(Me)}})()}getExpiration(De){const Me=this.expirations.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw this.logger.error(pt),new Error(pt)}return Me}checkExpiry(De,Me){const{expiry:pt}=Me;(0,o.toMiliseconds)(pt)-Date.now()<=0&&this.expire(De,Me)}expire(De,Me){this.expirations.delete(De),this.events.emit(Nd_expired,{target:De,expiration:Me})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((De,Me)=>this.checkExpiry(Me,De))}registerEventListeners(){this.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on("expirer_created",De=>{const Me="expirer_created";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,data:De}),this.persist()}),this.events.on(Nd_expired,De=>{const Me=Nd_expired;this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,data:De}),this.persist()}),this.events.on("expirer_deleted",De=>{const Me="expirer_deleted";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,data:De}),this.persist()})}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class cn extends class{constructor(De,Me){this.projectId=De,this.logger=Me}}{constructor(De,Me){var pt;super(De,Me),pt=this,this.projectId=De,this.logger=Me,this.name=I0,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var vt=(0,ie.Z)(function*(Dt){if(pt.verifyDisabled||Vi()||!ar())return;const nn=Dt?.verifyUrl||z0;pt.verifyUrl!==nn&&pt.removeIframe(),pt.verifyUrl=nn;try{yield pt.createIframe()}catch(Nn){pt.logger.info(`Verify iframe failed to load: ${pt.verifyUrl}`),pt.logger.info(Nn)}if(!pt.initialized){pt.removeIframe(),pt.verifyUrl=zh;try{yield pt.createIframe()}catch(Nn){pt.logger.info(`Verify iframe failed to load: ${pt.verifyUrl}`),pt.logger.info(Nn),pt.verifyDisabled=!0}}});return function(Dt){return vt.apply(this,arguments)}}(),this.register=function(){var vt=(0,ie.Z)(function*(Dt){pt.initialized?pt.sendPost(Dt.attestationId):(pt.addToQueue(Dt.attestationId),yield pt.init())});return function(Dt){return vt.apply(this,arguments)}}(),this.resolve=function(){var vt=(0,ie.Z)(function*(Dt){if(pt.isDevEnv)return"";const nn=Dt?.verifyUrl||z0;let Nn;try{Nn=yield pt.fetchAttestation(Dt.attestationId,nn)}catch(Mr){pt.logger.info(`failed to resolve attestation: ${Dt.attestationId} from url: ${nn}`),pt.logger.info(Mr),Nn=yield pt.fetchAttestation(Dt.attestationId,zh)}return Nn});return function(Dt){return vt.apply(this,arguments)}}(),this.fetchAttestation=function(){var vt=(0,ie.Z)(function*(Dt,nn){pt.logger.info(`resolving attestation: ${Dt} from url: ${nn}`);const Nn=pt.startAbortTimer(2*o.ONE_SECOND),Mr=yield fetch(`${nn}/attestation/${Dt}`,{signal:pt.abortController.signal});return clearTimeout(Nn),200===Mr.status?yield Mr.json():void 0});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.addToQueue=vt=>{this.queue.push(vt)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(vt=>this.sendPost(vt)),this.queue=[])},this.sendPost=vt=>{var Dt;try{if(!this.iframe)return;null==(Dt=this.iframe.contentWindow)||Dt.postMessage(vt,"*"),this.logger.info(`postMessage sent: ${vt} ${this.verifyUrl}`)}catch{}},this.createIframe=(0,ie.Z)(function*(){let vt;const Dt=nn=>{"verify_ready"===nn.data&&(pt.initialized=!0,pt.processQueue(),window.removeEventListener("message",Dt),vt())};yield Promise.race([new Promise(nn=>{if(document.getElementById(I0))return nn();window.addEventListener("message",Dt);const Nn=document.createElement("iframe");Nn.id=I0,Nn.src=`${pt.verifyUrl}/${pt.projectId}`,Nn.style.display="none",document.body.append(Nn),pt.iframe=Nn,vt=nn}),new Promise((nn,Nn)=>setTimeout(()=>{window.removeEventListener("message",Dt),Nn("verify iframe load timeout")},(0,o.toMiliseconds)(o.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.logger=(0,Io.generateChildLogger)(Me,this.name),this.verifyUrl=z0,this.abortController=new AbortController,this.isDevEnv=Qn()&&process.env.IS_VITEST}get context(){return(0,Io.getLoggerContext)(this.logger)}startAbortTimer(De){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,o.toMiliseconds)(De))}}var In=Object.defineProperty,Rn=Object.getOwnPropertySymbols,hr=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,ni=(Ot,De,Me)=>De in Ot?In(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Fi=(Ot,De)=>{for(var Me in De||(De={}))hr.call(De,Me)&&ni(Ot,Me,De[Me]);if(Rn)for(var Me of Rn(De))jr.call(De,Me)&&ni(Ot,Me,De[Me]);return Ot};class Nr extends $o{constructor(De){super(De),this.protocol="wc",this.version=2,this.name="core",this.events=new z.EventEmitter,this.initialized=!1,this.on=(pt,vt)=>this.events.on(pt,vt),this.once=(pt,vt)=>this.events.once(pt,vt),this.off=(pt,vt)=>this.events.off(pt,vt),this.removeListener=(pt,vt)=>this.events.removeListener(pt,vt),this.projectId=De?.projectId,this.relayUrl=De?.relayUrl||vp;const Me=typeof De?.logger<"u"&&"string"!=typeof De?.logger?De.logger:(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De?.logger||"error"}));this.logger=(0,Io.generateChildLogger)(Me,this.name),this.heartbeat=new Eo.HeartBeat,this.crypto=new xh(this,this.logger,De?.keychain),this.history=new xt(this,this.logger),this.expirer=new $t(this,this.logger),this.storage=null!=De&&De.storage?De.storage:new Dr.ZP(Fi(Fi({},rm),De?.storageOptions)),this.relayer=new e1({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new _t(this,this.logger),this.verify=new cn(this.projectId||"",this.logger)}static init(De){return(0,ie.Z)(function*(){const Me=new Nr(De);yield Me.initialize();const pt=yield Me.crypto.getClientId();return yield Me.storage.setItem("WALLETCONNECT_CLIENT_ID",pt),Me})()}get context(){return(0,Io.getLoggerContext)(this.logger)}start(){var De=this;return(0,ie.Z)(function*(){De.initialized||(yield De.initialize())})()}initialize(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized");try{yield De.crypto.init(),yield De.history.init(),yield De.expirer.init(),yield De.relayer.init(),yield De.heartbeat.init(),yield De.pairing.init(),De.initialized=!0,De.logger.info("Core Initialization Success")}catch(Me){throw De.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,Me),De.logger.error(Me.message),Me}})()}}const Ci=Nr,Ba="wc@2:client:",di="WALLETCONNECT_DEEPLINK_CHOICE",Ke="Proposal expired",Ct=o.SEVEN_DAYS,Ht={wc_sessionPropose:{req:{ttl:o.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:o.ONE_DAY,prompt:!1,tag:1104},res:{ttl:o.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:o.ONE_DAY,prompt:!1,tag:1106},res:{ttl:o.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:o.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:o.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:o.ONE_DAY,prompt:!1,tag:1112},res:{ttl:o.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:o.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:o.THIRTY_SECONDS,prompt:!1,tag:1115}}},un={min:o.FIVE_MINUTES,max:o.SEVEN_DAYS},Zn=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var fr=Object.defineProperty,zr=Object.defineProperties,ci=Object.getOwnPropertyDescriptors,ai=Object.getOwnPropertySymbols,li=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,os=(Ot,De,Me)=>De in Ot?fr(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,es=(Ot,De)=>{for(var Me in De||(De={}))li.call(De,Me)&&os(Ot,Me,De[Me]);if(ai)for(var Me of ai(De))bi.call(De,Me)&&os(Ot,Me,De[Me]);return Ot},Ds=(Ot,De)=>zr(Ot,ci(De));class ws extends class{constructor(De){this.client=De}}{constructor(De){var Me;super(De),Me=this,this.name="engine",this.events=new(O()),this.initialized=!1,this.ignoredPayloadTypes=[1],this.requestQueue={state:"IDLE",queue:[]},this.sessionRequestQueue={state:"IDLE",queue:[]},this.requestQueueDelay=o.ONE_SECOND,this.init=(0,ie.Z)(function*(){Me.initialized||(yield Me.cleanup(),Me.registerRelayerEvents(),Me.registerExpirerEvents(),Me.registerPairingEvents(),Me.client.core.pairing.register({methods:Object.keys(Ht)}),Me.initialized=!0,setTimeout(()=>{Me.sessionRequestQueue.queue=Me.getPendingSessionRequests(),Me.processSessionRequestQueue()},(0,o.toMiliseconds)(Me.requestQueueDelay)))}),this.connect=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized();const Dt=Ds(es({},vt),{requiredNamespaces:vt.requiredNamespaces||{},optionalNamespaces:vt.optionalNamespaces||{}});yield Me.isValidConnect(Dt);const{pairingTopic:nn,requiredNamespaces:Nn,optionalNamespaces:Mr,sessionProperties:Vr,relays:Si}=Dt;let Oo,ls=nn,Yo=!1;if(ls&&(Yo=Me.client.core.pairing.pairings.get(ls).active),!ls||!Yo){const{topic:Ru,uri:gc}=yield Me.client.core.pairing.create();ls=Ru,Oo=gc}const uo=yield Me.client.core.crypto.generateKeyPair(),Jo=es({requiredNamespaces:Nn,optionalNamespaces:Mr,relays:Si??[{protocol:"irn"}],proposer:{publicKey:uo,metadata:Me.client.metadata}},Vr&&{sessionProperties:Vr}),{reject:Lo,resolve:ul,done:mc}=_s(o.FIVE_MINUTES,Ke);if(Me.events.once(xa("session_connect"),function(){var Ru=(0,ie.Z)(function*({error:gc,session:Tc}){if(gc)Lo(gc);else if(Tc){Tc.self.publicKey=uo;const _d=Ds(es({},Tc),{requiredNamespaces:Tc.requiredNamespaces,optionalNamespaces:Tc.optionalNamespaces});yield Me.client.session.set(Tc.topic,_d),yield Me.setExpiry(Tc.topic,Tc.expiry),ls&&(yield Me.client.core.pairing.updateMetadata({topic:ls,metadata:Tc.peer.metadata})),ul(_d)}});return function(gc){return Ru.apply(this,arguments)}}()),!ls){const{message:Ru}=Cn("NO_MATCHING_KEY",`connect() pairing topic: ${ls}`);throw new Error(Ru)}const Bc=yield Me.sendRequest({topic:ls,method:"wc_sessionPropose",params:Jo}),zu=Qa(o.FIVE_MINUTES);return yield Me.setProposal(Bc,es({id:Bc,expiry:zu},Jo)),{uri:Oo,approval:mc}});return function(vt){return pt.apply(this,arguments)}}(),this.pair=function(){var pt=(0,ie.Z)(function*(vt){return yield Me.isInitialized(),yield Me.client.core.pairing.pair(vt)});return function(vt){return pt.apply(this,arguments)}}(),this.approve=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidApprove(vt);const{id:Dt,relayProtocol:nn,namespaces:Nn,sessionProperties:Mr}=vt,Vr=Me.client.proposal.get(Dt);let{pairingTopic:Si,proposer:ls,requiredNamespaces:Oo,optionalNamespaces:Yo}=Vr;Si=Si||"",Os(Oo)||(Oo=function(Ot,De){const Me=et(Ot,"approve()");if(Me)throw new Error(Me.message);const pt={};for(const[vt,Dt]of Object.entries(Ot))pt[vt]={methods:Dt.methods,events:Dt.events,chains:Dt.accounts.map(nn=>`${nn.split(":")[0]}:${nn.split(":")[1]}`)};return pt}(Nn));const uo=yield Me.client.core.crypto.generateKeyPair(),Jo=ls.publicKey,Lo=yield Me.client.core.crypto.generateSharedKey(uo,Jo);Si&&Dt&&(yield Me.client.core.pairing.updateMetadata({topic:Si,metadata:ls.metadata}),yield Me.sendResult({id:Dt,topic:Si,result:{relay:{protocol:nn??"irn"},responderPublicKey:uo}}),yield Me.client.proposal.delete(Dt,Ir("USER_DISCONNECTED")),yield Me.client.core.pairing.activate({topic:Si}));const ul=es({relay:{protocol:nn??"irn"},namespaces:Nn,requiredNamespaces:Oo,optionalNamespaces:Yo,pairingTopic:Si,controller:{publicKey:uo,metadata:Me.client.metadata},expiry:Qa(Ct)},Mr&&{sessionProperties:Mr});yield Me.client.core.relayer.subscribe(Lo),yield Me.sendRequest({topic:Lo,method:"wc_sessionSettle",params:ul,throwOnFailedPublish:!0});const mc=Ds(es({},ul),{topic:Lo,pairingTopic:Si,acknowledged:!1,self:ul.controller,peer:{publicKey:ls.publicKey,metadata:ls.metadata},controller:uo});return yield Me.client.session.set(Lo,mc),yield Me.setExpiry(Lo,Qa(Ct)),{topic:Lo,acknowledged:()=>new Promise(Bc=>setTimeout(()=>Bc(Me.client.session.get(Lo)),500))}});return function(vt){return pt.apply(this,arguments)}}(),this.reject=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidReject(vt);const{id:Dt,reason:nn}=vt,{pairingTopic:Nn}=Me.client.proposal.get(Dt);Nn&&(yield Me.sendError(Dt,Nn,nn),yield Me.client.proposal.delete(Dt,Ir("USER_DISCONNECTED")))});return function(vt){return pt.apply(this,arguments)}}(),this.update=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidUpdate(vt);const{topic:Dt,namespaces:nn}=vt,Nn=yield Me.sendRequest({topic:Dt,method:"wc_sessionUpdate",params:{namespaces:nn}}),{done:Mr,resolve:Vr,reject:Si}=_s();return Me.events.once(xa("session_update",Nn),({error:ls})=>{ls?Si(ls):Vr()}),yield Me.client.session.update(Dt,{namespaces:nn}),{acknowledged:Mr}});return function(vt){return pt.apply(this,arguments)}}(),this.extend=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidExtend(vt);const{topic:Dt}=vt,nn=yield Me.sendRequest({topic:Dt,method:"wc_sessionExtend",params:{}}),{done:Nn,resolve:Mr,reject:Vr}=_s();return Me.events.once(xa("session_extend",nn),({error:Si})=>{Si?Vr(Si):Mr()}),yield Me.setExpiry(Dt,Qa(Ct)),{acknowledged:Nn}});return function(vt){return pt.apply(this,arguments)}}(),this.request=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidRequest(vt);const{chainId:Dt,request:nn,topic:Nn,expiry:Mr}=vt,Vr=(0,Ca.payloadId)(),{done:Si,resolve:ls,reject:Oo}=_s(Mr);return Me.events.once(xa("session_request",Vr),({error:Yo,result:uo})=>{Yo?Oo(Yo):ls(uo)}),yield Promise.all([new Promise(function(){var Yo=(0,ie.Z)(function*(uo){yield Me.sendRequest({clientRpcId:Vr,topic:Nn,method:"wc_sessionRequest",params:{request:nn,chainId:Dt},expiry:Mr,throwOnFailedPublish:!0}).catch(Jo=>Oo(Jo)),Me.client.events.emit("session_request_sent",{topic:Nn,request:nn,chainId:Dt,id:Vr}),uo()});return function(uo){return Yo.apply(this,arguments)}}()),new Promise(function(){var Yo=(0,ie.Z)(function*(uo){const Jo=yield Me.client.core.storage.getItem(di);(function(Ot){Va.apply(this,arguments)})({id:Vr,topic:Nn,wcDeepLink:Jo}),uo()});return function(uo){return Yo.apply(this,arguments)}}()),Si()]).then(Yo=>Yo[2])});return function(vt){return pt.apply(this,arguments)}}(),this.respond=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidRespond(vt);const{topic:Dt,response:nn}=vt,{id:Nn}=nn;(0,Ca.isJsonRpcResult)(nn)?yield Me.sendResult({id:Nn,topic:Dt,result:nn.result,throwOnFailedPublish:!0}):(0,Ca.isJsonRpcError)(nn)&&(yield Me.sendError(Nn,Dt,nn.error)),Me.cleanupAfterResponse(vt)});return function(vt){return pt.apply(this,arguments)}}(),this.ping=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidPing(vt);const{topic:Dt}=vt;if(Me.client.session.keys.includes(Dt)){const nn=yield Me.sendRequest({topic:Dt,method:"wc_sessionPing",params:{}}),{done:Nn,resolve:Mr,reject:Vr}=_s();Me.events.once(xa("session_ping",nn),({error:Si})=>{Si?Vr(Si):Mr()}),yield Nn()}else Me.client.core.pairing.pairings.keys.includes(Dt)&&(yield Me.client.core.pairing.ping({topic:Dt}))});return function(vt){return pt.apply(this,arguments)}}(),this.emit=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidEmit(vt);const{topic:Dt,event:nn,chainId:Nn}=vt;yield Me.sendRequest({topic:Dt,method:"wc_sessionEvent",params:{event:nn,chainId:Nn}})});return function(vt){return pt.apply(this,arguments)}}(),this.disconnect=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidDisconnect(vt);const{topic:Dt}=vt;Me.client.session.keys.includes(Dt)?(yield Me.sendRequest({topic:Dt,method:"wc_sessionDelete",params:Ir("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield Me.deleteSession(Dt)):yield Me.client.core.pairing.disconnect({topic:Dt})});return function(vt){return pt.apply(this,arguments)}}(),this.find=pt=>(this.isInitialized(),this.client.session.getAll().filter(vt=>function(Ot,De){const{requiredNamespaces:Me}=De,pt=Object.keys(Ot.namespaces),vt=Object.keys(Me);let Dt=!0;return!!is(vt,pt)&&(pt.forEach(nn=>{const{accounts:Nn,methods:Mr,events:Vr}=Ot.namespaces[nn],Si=Wa(Nn),ls=Me[nn];is(ne(nn,ls),Si)&&is(ls.methods,Mr)&&is(ls.events,Vr)||(Dt=!1)}),Dt)}(vt,pt))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=function(){var pt=(0,ie.Z)(function*(vt){if(vt.pairingTopic)try{const Dt=Me.client.core.pairing.pairings.get(vt.pairingTopic),nn=Me.client.core.pairing.pairings.getAll().filter(Nn=>{var Mr,Vr;return(null==(Mr=Nn.peerMetadata)?void 0:Mr.url)&&(null==(Vr=Nn.peerMetadata)?void 0:Vr.url)===vt.peer.metadata.url&&Nn.topic&&Nn.topic!==Dt.topic});if(0===nn.length)return;Me.client.logger.info(`Cleaning up ${nn.length} duplicate pairing(s)`),yield Promise.all(nn.map(Nn=>Me.client.core.pairing.disconnect({topic:Nn.topic}))),Me.client.logger.info("Duplicate pairings clean up finished")}catch(Dt){Me.client.logger.error(Dt)}});return function(vt){return pt.apply(this,arguments)}}(),this.deleteSession=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{self:nn}=Me.client.session.get(vt);yield Me.client.core.relayer.unsubscribe(vt),Me.client.session.delete(vt,Ir("USER_DISCONNECTED")),Me.client.core.crypto.keychain.has(nn.publicKey)&&(yield Me.client.core.crypto.deleteKeyPair(nn.publicKey)),Me.client.core.crypto.keychain.has(vt)&&(yield Me.client.core.crypto.deleteSymKey(vt)),Dt||Me.client.core.expirer.del(vt),Me.client.core.storage.removeItem(di).catch(Nn=>Me.client.logger.warn(Nn))});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.deleteProposal=function(){var pt=(0,ie.Z)(function*(vt,Dt){yield Promise.all([Me.client.proposal.delete(vt,Ir("USER_DISCONNECTED")),Dt?Promise.resolve():Me.client.core.expirer.del(vt)])});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt,nn=!1){yield Promise.all([Me.client.pendingRequest.delete(vt,Dt),nn?Promise.resolve():Me.client.core.expirer.del(vt)]),Me.sessionRequestQueue.queue=Me.sessionRequestQueue.queue.filter(Nn=>Nn.id!==vt),nn&&(Me.sessionRequestQueue.state="IDLE")});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.setExpiry=function(){var pt=(0,ie.Z)(function*(vt,Dt){Me.client.session.keys.includes(vt)&&(yield Me.client.session.update(vt,{expiry:Dt})),Me.client.core.expirer.set(vt,Dt)});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.setProposal=function(){var pt=(0,ie.Z)(function*(vt,Dt){yield Me.client.proposal.set(vt,Dt),Me.client.core.expirer.set(vt,Dt.expiry)});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var pt=(0,ie.Z)(function*(vt){const Dt=Ht.wc_sessionRequest.req.ttl,{id:nn,topic:Nn,params:Mr,verifyContext:Vr}=vt;yield Me.client.pendingRequest.set(nn,{id:nn,topic:Nn,params:Mr,verifyContext:Vr}),Dt&&Me.client.core.expirer.set(nn,Qa(Dt))});return function(vt){return pt.apply(this,arguments)}}(),this.sendRequest=function(){var pt=(0,ie.Z)(function*(vt){const{topic:Dt,method:nn,params:Nn,expiry:Mr,relayRpcId:Vr,clientRpcId:Si,throwOnFailedPublish:ls}=vt,Oo=(0,Ca.formatJsonRpcRequest)(nn,Nn,Si);if(ar()&&Zn.includes(nn)){const Jo=Wt(JSON.stringify(Oo));Me.client.core.verify.register({attestationId:Jo})}const Yo=yield Me.client.core.crypto.encode(Dt,Oo),uo=Ht[nn].req;return Mr&&(uo.ttl=Mr),Vr&&(uo.id=Vr),Me.client.core.history.set(Dt,Oo),ls?(uo.internal=Ds(es({},uo.internal),{throwOnFailedPublish:!0}),yield Me.client.core.relayer.publish(Dt,Yo,uo)):Me.client.core.relayer.publish(Dt,Yo,uo).catch(Jo=>Me.client.logger.error(Jo)),Oo.id});return function(vt){return pt.apply(this,arguments)}}(),this.sendResult=function(){var pt=(0,ie.Z)(function*(vt){const{id:Dt,topic:nn,result:Nn,throwOnFailedPublish:Mr}=vt,Vr=(0,Ca.formatJsonRpcResult)(Dt,Nn),Si=yield Me.client.core.crypto.encode(nn,Vr),ls=yield Me.client.core.history.get(nn,Dt),Oo=Ht[ls.request.method].res;Mr?(Oo.internal=Ds(es({},Oo.internal),{throwOnFailedPublish:!0}),yield Me.client.core.relayer.publish(nn,Si,Oo)):Me.client.core.relayer.publish(nn,Si,Oo).catch(Yo=>Me.client.logger.error(Yo)),yield Me.client.core.history.resolve(Vr)});return function(vt){return pt.apply(this,arguments)}}(),this.sendError=function(){var pt=(0,ie.Z)(function*(vt,Dt,nn){const Nn=(0,Ca.formatJsonRpcError)(vt,nn),Mr=yield Me.client.core.crypto.encode(Dt,Nn),Vr=yield Me.client.core.history.get(Dt,vt);Me.client.core.relayer.publish(Dt,Mr,Ht[Vr.request.method].res),yield Me.client.core.history.resolve(Nn)});return function(vt,Dt,nn){return pt.apply(this,arguments)}}(),this.cleanup=(0,ie.Z)(function*(){const pt=[],vt=[];Me.client.session.getAll().forEach(Dt=>{ja(Dt.expiry)&&pt.push(Dt.topic)}),Me.client.proposal.getAll().forEach(Dt=>{ja(Dt.expiry)&&vt.push(Dt.id)}),yield Promise.all([...pt.map(Dt=>Me.deleteSession(Dt)),...vt.map(Dt=>Me.deleteProposal(Dt))])}),this.onRelayEventRequest=function(){var pt=(0,ie.Z)(function*(vt){Me.requestQueue.queue.push(vt),yield Me.processRequestsQueue()});return function(vt){return pt.apply(this,arguments)}}(),this.processRequestsQueue=(0,ie.Z)(function*(){if("ACTIVE"!==Me.requestQueue.state){for(Me.client.logger.info(`Request queue starting with ${Me.requestQueue.queue.length} requests`);Me.requestQueue.queue.length>0;){Me.requestQueue.state="ACTIVE";const pt=Me.requestQueue.queue.shift();if(pt)try{Me.processRequest(pt),yield new Promise(vt=>setTimeout(vt,300))}catch(vt){Me.client.logger.warn(vt)}}Me.requestQueue.state="IDLE"}else Me.client.logger.info("Request queue already active, skipping...")}),this.processRequest=pt=>{const{topic:vt,payload:Dt}=pt,nn=Dt.method;switch(nn){case"wc_sessionPropose":return this.onSessionProposeRequest(vt,Dt);case"wc_sessionSettle":return this.onSessionSettleRequest(vt,Dt);case"wc_sessionUpdate":return this.onSessionUpdateRequest(vt,Dt);case"wc_sessionExtend":return this.onSessionExtendRequest(vt,Dt);case"wc_sessionPing":return this.onSessionPingRequest(vt,Dt);case"wc_sessionDelete":return this.onSessionDeleteRequest(vt,Dt);case"wc_sessionRequest":return this.onSessionRequest(vt,Dt);case"wc_sessionEvent":return this.onSessionEventRequest(vt,Dt);default:return this.client.logger.info(`Unsupported request method ${nn}`)}},this.onRelayEventResponse=function(){var pt=(0,ie.Z)(function*(vt){const{topic:Dt,payload:nn}=vt,Nn=(yield Me.client.core.history.get(Dt,nn.id)).request.method;switch(Nn){case"wc_sessionPropose":return Me.onSessionProposeResponse(Dt,nn);case"wc_sessionSettle":return Me.onSessionSettleResponse(Dt,nn);case"wc_sessionUpdate":return Me.onSessionUpdateResponse(Dt,nn);case"wc_sessionExtend":return Me.onSessionExtendResponse(Dt,nn);case"wc_sessionPing":return Me.onSessionPingResponse(Dt,nn);case"wc_sessionRequest":return Me.onSessionRequestResponse(Dt,nn);default:return Me.client.logger.info(`Unsupported response method ${Nn}`)}});return function(vt){return pt.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=pt=>{const{topic:vt}=pt,{message:Dt}=Cn("MISSING_OR_INVALID",`Decoded payload on topic ${vt} is not identifiable as a JSON-RPC request or a response.`);throw new Error(Dt)},this.onSessionProposeRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{params:nn,id:Nn}=Dt;try{Me.isValidConnect(es({},Dt.params));const Mr=Qa(o.FIVE_MINUTES),Vr=es({id:Nn,pairingTopic:vt,expiry:Mr},nn);yield Me.setProposal(Nn,Vr);const Si=Wt(JSON.stringify(Dt)),ls=yield Me.getVerifyContext(Si,Vr.proposer.metadata);Me.client.events.emit("session_proposal",{id:Nn,params:Vr,verifyContext:ls})}catch(Mr){yield Me.sendError(Nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;if((0,Ca.isJsonRpcResult)(Dt)){const{result:Nn}=Dt;Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:Nn});const Mr=Me.client.proposal.get(nn);Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:Mr});const Vr=Mr.proposer.publicKey;Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:Vr});const Si=Nn.responderPublicKey;Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:Si});const ls=yield Me.client.core.crypto.generateSharedKey(Vr,Si);Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:ls});const Oo=yield Me.client.core.relayer.subscribe(ls);Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:Oo}),yield Me.client.core.pairing.activate({topic:vt})}else(0,Ca.isJsonRpcError)(Dt)&&(yield Me.client.proposal.delete(nn,Ir("USER_DISCONNECTED")),Me.events.emit(xa("session_connect"),{error:Dt.error}))});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn,params:Nn}=Dt;try{Me.isValidSessionSettleRequest(Nn);const{relay:Mr,controller:Vr,expiry:Si,namespaces:ls,requiredNamespaces:Oo,optionalNamespaces:Yo,sessionProperties:uo,pairingTopic:Jo}=Dt.params,Lo=es({topic:vt,relay:Mr,expiry:Si,namespaces:ls,acknowledged:!0,pairingTopic:Jo,requiredNamespaces:Oo,optionalNamespaces:Yo,controller:Vr.publicKey,self:{publicKey:"",metadata:Me.client.metadata},peer:{publicKey:Vr.publicKey,metadata:Vr.metadata}},uo&&{sessionProperties:uo});yield Me.sendResult({id:Dt.id,topic:vt,result:!0}),Me.events.emit(xa("session_connect"),{session:Lo}),Me.cleanupDuplicatePairings(Lo)}catch(Mr){yield Me.sendError(nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;(0,Ca.isJsonRpcResult)(Dt)?(yield Me.client.session.update(vt,{acknowledged:!0}),Me.events.emit(xa("session_approve",nn),{})):(0,Ca.isJsonRpcError)(Dt)&&(yield Me.client.session.delete(vt,Ir("USER_DISCONNECTED")),Me.events.emit(xa("session_approve",nn),{error:Dt.error}))});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{params:nn,id:Nn}=Dt;try{const Mr=`${vt}_session_update`,Vr=ka.get(Mr);if(Vr&&Me.isRequestOutOfSync(Vr,Nn))return void Me.client.logger.info(`Discarding out of sync request - ${Nn}`);Me.isValidUpdate(es({topic:vt},nn)),yield Me.client.session.update(vt,{namespaces:nn.namespaces}),yield Me.sendResult({id:Nn,topic:vt,result:!0}),Me.client.events.emit("session_update",{id:Nn,topic:vt,params:nn}),ka.set(Mr,Nn)}catch(Mr){yield Me.sendError(Nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.isRequestOutOfSync=(pt,vt)=>parseInt(vt.toString().slice(0,-3))<=parseInt(pt.toString().slice(0,-3)),this.onSessionUpdateResponse=(pt,vt)=>{const{id:Dt}=vt;(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_update",Dt),{}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_update",Dt),{error:vt.error})},this.onSessionExtendRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;try{Me.isValidExtend({topic:vt}),yield Me.setExpiry(vt,Qa(Ct)),yield Me.sendResult({id:nn,topic:vt,result:!0}),Me.client.events.emit("session_extend",{id:nn,topic:vt})}catch(Nn){yield Me.sendError(nn,vt,Nn),Me.client.logger.error(Nn)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionExtendResponse=(pt,vt)=>{const{id:Dt}=vt;(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_extend",Dt),{}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_extend",Dt),{error:vt.error})},this.onSessionPingRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;try{Me.isValidPing({topic:vt}),yield Me.sendResult({id:nn,topic:vt,result:!0}),Me.client.events.emit("session_ping",{id:nn,topic:vt})}catch(Nn){yield Me.sendError(nn,vt,Nn),Me.client.logger.error(Nn)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionPingResponse=(pt,vt)=>{const{id:Dt}=vt;setTimeout(()=>{(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_ping",Dt),{}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_ping",Dt),{error:vt.error})},500)},this.onSessionDeleteRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;try{Me.isValidDisconnect({topic:vt,reason:Dt.params}),yield Promise.all([new Promise(Nn=>{Me.client.core.relayer.once("relayer_publish",(0,ie.Z)(function*(){Nn(yield Me.deleteSession(vt))}))}),Me.sendResult({id:nn,topic:vt,result:!0})]),Me.client.events.emit("session_delete",{id:nn,topic:vt})}catch(Nn){Me.client.logger.error(Nn)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn,params:Nn}=Dt;try{Me.isValidRequest(es({topic:vt},Nn));const Mr=Wt(JSON.stringify((0,Ca.formatJsonRpcRequest)("wc_sessionRequest",Nn,nn))),Vr=Me.client.session.get(vt),ls={id:nn,topic:vt,params:Nn,verifyContext:yield Me.getVerifyContext(Mr,Vr.peer.metadata)};yield Me.setPendingSessionRequest(ls),Me.addSessionRequestToSessionRequestQueue(ls),Me.processSessionRequestQueue()}catch(Mr){yield Me.sendError(nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionRequestResponse=(pt,vt)=>{const{id:Dt}=vt;(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_request",Dt),{result:vt.result}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_request",Dt),{error:vt.error})},this.onSessionEventRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn,params:Nn}=Dt;try{const Mr=`${vt}_session_event_${Nn.event.name}`,Vr=ka.get(Mr);if(Vr&&Me.isRequestOutOfSync(Vr,nn))return void Me.client.logger.info(`Discarding out of sync request - ${nn}`);Me.isValidEmit(es({topic:vt},Nn)),Me.client.events.emit("session_event",{id:nn,topic:vt,params:Nn}),ka.set(Mr,nn)}catch(Mr){yield Me.sendError(nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=pt=>{this.sessionRequestQueue.queue.push(pt)},this.cleanupAfterResponse=pt=>{this.deletePendingSessionRequest(pt.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state="IDLE",this.processSessionRequestQueue()},(0,o.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if("ACTIVE"===this.sessionRequestQueue.state)return void this.client.logger.info("session request queue is already active.");const pt=this.sessionRequestQueue.queue[0];if(pt)try{this.sessionRequestQueue.state="ACTIVE",this.client.events.emit("session_request",pt)}catch(vt){this.client.logger.error(vt)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=pt=>{if(pt.active)return;const vt=this.client.proposal.getAll().find(Dt=>Dt.pairingTopic===pt.topic);vt&&this.onSessionProposeRequest(pt.topic,(0,Ca.formatJsonRpcRequest)("wc_sessionPropose",{requiredNamespaces:vt.requiredNamespaces,optionalNamespaces:vt.optionalNamespaces,relays:vt.relays,proposer:vt.proposer},vt.id))},this.isValidConnect=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:Si}=Cn("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(vt)}`);throw new Error(Si)}const{pairingTopic:Dt,requiredNamespaces:nn,optionalNamespaces:Nn,sessionProperties:Mr,relays:Vr}=vt;if(Cs(Dt)||(yield Me.isValidPairingTopic(Dt)),!function(Ot,De){let Me=!1;return Ot?Ot&&Ei(Ot)&&Ot.length&&Ot.forEach(pt=>{Me=zt(pt)}):Me=!0,Me}(Vr)){const{message:Si}=Cn("MISSING_OR_INVALID",`connect() relays: ${Vr}`);throw new Error(Si)}!Cs(nn)&&0!==Os(nn)&&Me.validateNamespaces(nn,"requiredNamespaces"),!Cs(Nn)&&0!==Os(Nn)&&Me.validateNamespaces(Nn,"optionalNamespaces"),Cs(Mr)||Me.validateSessionProps(Mr,"sessionProperties")});return function(vt){return pt.apply(this,arguments)}}(),this.validateNamespaces=(pt,vt)=>{const Dt=function(Ot,De,Me){let pt=null;if(Ot&&Os(Ot)){const vt=Ut(Ot,De);vt&&(pt=vt);const Dt=function(Ot,De,Me){let pt=null;return Object.entries(Ot).forEach(([vt,Dt])=>{if(pt)return;const nn=function(Ot,De,Me){let pt=null;return Ei(De)&&De.length?De.forEach(vt=>{pt||Vo(vt)||(pt=Ir("UNSUPPORTED_CHAINS",`${Me}, chain ${vt} should be a string and conform to "namespace:chainId" format`))}):Vo(Ot)||(pt=Ir("UNSUPPORTED_CHAINS",`${Me}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),pt}(vt,ne(vt,Dt),`${De} ${Me}`);nn&&(pt=nn)}),pt}(Ot,De,Me);Dt&&(pt=Dt)}else pt=Cn("MISSING_OR_INVALID",`${De}, ${Me} should be an object with data`);return pt}(pt,"connect()",vt);if(Dt)throw new Error(Dt.message)},this.isValidApprove=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt))throw new Error(Cn("MISSING_OR_INVALID",`approve() params: ${vt}`).message);const{id:Dt,namespaces:nn,relayProtocol:Nn,sessionProperties:Mr}=vt;yield Me.isValidProposalId(Dt);const Vr=Me.client.proposal.get(Dt),Si=et(nn,"approve()");if(Si)throw new Error(Si.message);const ls=lo(Vr.requiredNamespaces,nn,"approve()");if(ls)throw new Error(ls.message);if(!zs(Nn,!0)){const{message:Oo}=Cn("MISSING_OR_INVALID",`approve() relayProtocol: ${Nn}`);throw new Error(Oo)}Cs(Mr)||Me.validateSessionProps(Mr,"sessionProperties")});return function(vt){return pt.apply(this,arguments)}}(),this.isValidReject=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`reject() params: ${vt}`);throw new Error(Nn)}const{id:Dt,reason:nn}=vt;if(yield Me.isValidProposalId(Dt),!((Ot=nn)&&"object"==typeof Ot&&Ot.code&&Rs(Ot.code,!1)&&Ot.message&&zs(Ot.message,!1))){const{message:Nn}=Cn("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(nn)}`);throw new Error(Nn)}var Ot});return function(vt){return pt.apply(this,arguments)}}(),this.isValidSessionSettleRequest=pt=>{if(!tr(pt)){const{message:Si}=Cn("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${pt}`);throw new Error(Si)}const{relay:vt,controller:Dt,namespaces:nn,expiry:Nn}=pt;if(!zt(vt)){const{message:Si}=Cn("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(Si)}const Mr=function(Ot,De){let Me=null;return zs(Ot?.publicKey,!1)||(Me=Cn("MISSING_OR_INVALID","onSessionSettleRequest() controller public key should be a string")),Me}(Dt);if(Mr)throw new Error(Mr.message);const Vr=et(nn,"onSessionSettleRequest()");if(Vr)throw new Error(Vr.message);if(ja(Nn)){const{message:Si}=Cn("EXPIRED","onSessionSettleRequest()");throw new Error(Si)}},this.isValidUpdate=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:Si}=Cn("MISSING_OR_INVALID",`update() params: ${vt}`);throw new Error(Si)}const{topic:Dt,namespaces:nn}=vt;yield Me.isValidSessionTopic(Dt);const Nn=Me.client.session.get(Dt),Mr=et(nn,"update()");if(Mr)throw new Error(Mr.message);const Vr=lo(Nn.requiredNamespaces,nn,"update()");if(Vr)throw new Error(Vr.message)});return function(vt){return pt.apply(this,arguments)}}(),this.isValidExtend=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:nn}=Cn("MISSING_OR_INVALID",`extend() params: ${vt}`);throw new Error(nn)}const{topic:Dt}=vt;yield Me.isValidSessionTopic(Dt)});return function(vt){return pt.apply(this,arguments)}}(),this.isValidRequest=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() params: ${vt}`);throw new Error(Si)}const{topic:Dt,request:nn,chainId:Nn,expiry:Mr}=vt;yield Me.isValidSessionTopic(Dt);const{namespaces:Vr}=Me.client.session.get(Dt);if(!As(Vr,Nn)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() chainId: ${Nn}`);throw new Error(Si)}if(Cs(Ot=nn)||!zs(Ot.method,!1)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() ${JSON.stringify(nn)}`);throw new Error(Si)}var Ot;if(!function(Ot,De,Me){return!!zs(Me,!1)&&function(Ot,De){const Me=[];return Object.values(Ot).forEach(pt=>{Wa(pt.accounts).includes(De)&&Me.push(...pt.methods)}),Me}(Ot,De).includes(Me)}(Vr,Nn,nn.method)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() method: ${nn.method}`);throw new Error(Si)}if(Mr&&!function(Ot,De){return Rs(Ot,!1)&&Ot<=De.max&&Ot>=De.min}(Mr,un)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() expiry: ${Mr}. Expiry must be a number (in seconds) between ${un.min} and ${un.max}`);throw new Error(Si)}});return function(vt){return pt.apply(this,arguments)}}(),this.isValidRespond=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`respond() params: ${vt}`);throw new Error(Nn)}const{topic:Dt,response:nn}=vt;if(yield Me.isValidSessionTopic(Dt),Cs(Ot=nn)||Cs(Ot.result)&&Cs(Ot.error)||!Rs(Ot.id,!1)||!zs(Ot.jsonrpc,!1)){const{message:Nn}=Cn("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(nn)}`);throw new Error(Nn)}var Ot});return function(vt){return pt.apply(this,arguments)}}(),this.isValidPing=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:nn}=Cn("MISSING_OR_INVALID",`ping() params: ${vt}`);throw new Error(nn)}const{topic:Dt}=vt;yield Me.isValidSessionOrPairingTopic(Dt)});return function(vt){return pt.apply(this,arguments)}}(),this.isValidEmit=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() params: ${vt}`);throw new Error(Vr)}const{topic:Dt,event:nn,chainId:Nn}=vt;yield Me.isValidSessionTopic(Dt);const{namespaces:Mr}=Me.client.session.get(Dt);if(!As(Mr,Nn)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() chainId: ${Nn}`);throw new Error(Vr)}if(Cs(Ot=nn)||!zs(Ot.name,!1)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(nn)}`);throw new Error(Vr)}var Ot;if(!function(Ot,De,Me){return!!zs(Me,!1)&&function(Ot,De){const Me=[];return Object.values(Ot).forEach(pt=>{Wa(pt.accounts).includes(De)&&Me.push(...pt.events)}),Me}(Ot,De).includes(Me)}(Mr,Nn,nn.name)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(nn)}`);throw new Error(Vr)}});return function(vt){return pt.apply(this,arguments)}}(),this.isValidDisconnect=function(){var pt=(0,ie.Z)(function*(vt){if(!tr(vt)){const{message:nn}=Cn("MISSING_OR_INVALID",`disconnect() params: ${vt}`);throw new Error(nn)}const{topic:Dt}=vt;yield Me.isValidSessionOrPairingTopic(Dt)});return function(vt){return pt.apply(this,arguments)}}(),this.getVerifyContext=function(){var pt=(0,ie.Z)(function*(vt,Dt){const nn={verified:{verifyUrl:Dt.verifyUrl||z0,validation:"UNKNOWN",origin:Dt.url||""}};try{const Nn=yield Me.client.core.verify.resolve({attestationId:vt,verifyUrl:Dt.verifyUrl});Nn&&(nn.verified.origin=Nn.origin,nn.verified.isScam=Nn.isScam,nn.verified.validation=Nn.origin===new URL(Dt.url).origin?"VALID":"INVALID")}catch(Nn){Me.client.logger.info(Nn)}return Me.client.logger.info(`Verify context: ${JSON.stringify(nn)}`),nn});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.validateSessionProps=(pt,vt)=>{Object.values(pt).forEach(Dt=>{if(!zs(Dt,!1)){const{message:nn}=Cn("MISSING_OR_INVALID",`${vt} must be in Record format. Received: ${JSON.stringify(Dt)}`);throw new Error(nn)}})}}isInitialized(){var De=this;return(0,ie.Z)(function*(){if(!De.initialized){const{message:Me}=Cn("NOT_INITIALIZED",De.name);throw new Error(Me)}yield De.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var De=this;this.client.core.relayer.on("relayer_message",function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,message:Dt}=pt;if(De.ignoredPayloadTypes.includes(De.client.core.crypto.getPayloadType(Dt)))return;const nn=yield De.client.core.crypto.decode(vt,Dt);try{(0,Ca.isJsonRpcRequest)(nn)?(De.client.core.history.set(vt,nn),De.onRelayEventRequest({topic:vt,payload:nn})):(0,Ca.isJsonRpcResponse)(nn)?(yield De.client.core.history.resolve(nn),yield De.onRelayEventResponse({topic:vt,payload:nn}),De.client.core.history.delete(vt,nn.id)):De.onRelayEventUnknownPayload({topic:vt,payload:nn})}catch(Nn){De.client.logger.error(Nn)}});return function(pt){return Me.apply(this,arguments)}}())}registerExpirerEvents(){var De=this;this.client.core.expirer.on(Nd_expired,function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,id:Dt}=Lu(pt.target);if(Dt&&De.client.pendingRequest.keys.includes(Dt))return yield De.deletePendingSessionRequest(Dt,Cn("EXPIRED"),!0);vt?De.client.session.keys.includes(vt)&&(yield De.deleteSession(vt,!0),De.client.events.emit("session_expire",{topic:vt})):Dt&&(yield De.deleteProposal(Dt,!0),De.client.events.emit("proposal_expire",{id:Dt}))});return function(pt){return Me.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on("pairing_create",De=>this.onPairingCreated(De))}isValidPairingTopic(De){if(!zs(De,!1)){const{message:Me}=Cn("MISSING_OR_INVALID",`pairing topic should be a string: ${De}`);throw new Error(Me)}if(!this.client.core.pairing.pairings.keys.includes(De)){const{message:Me}=Cn("NO_MATCHING_KEY",`pairing topic doesn't exist: ${De}`);throw new Error(Me)}if(ja(this.client.core.pairing.pairings.get(De).expiry)){const{message:Me}=Cn("EXPIRED",`pairing topic: ${De}`);throw new Error(Me)}}isValidSessionTopic(De){var Me=this;return(0,ie.Z)(function*(){if(!zs(De,!1)){const{message:pt}=Cn("MISSING_OR_INVALID",`session topic should be a string: ${De}`);throw new Error(pt)}if(!Me.client.session.keys.includes(De)){const{message:pt}=Cn("NO_MATCHING_KEY",`session topic doesn't exist: ${De}`);throw new Error(pt)}if(ja(Me.client.session.get(De).expiry)){yield Me.deleteSession(De);const{message:pt}=Cn("EXPIRED",`session topic: ${De}`);throw new Error(pt)}})()}isValidSessionOrPairingTopic(De){var Me=this;return(0,ie.Z)(function*(){if(Me.client.session.keys.includes(De))yield Me.isValidSessionTopic(De);else{if(!Me.client.core.pairing.pairings.keys.includes(De)){if(zs(De,!1)){const{message:pt}=Cn("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${De}`);throw new Error(pt)}{const{message:pt}=Cn("MISSING_OR_INVALID",`session or pairing topic should be a string: ${De}`);throw new Error(pt)}}Me.isValidPairingTopic(De)}})()}isValidProposalId(De){var Me=this;return(0,ie.Z)(function*(){if("number"!=typeof De){const{message:pt}=Cn("MISSING_OR_INVALID",`proposal id should be a number: ${De}`);throw new Error(pt)}if(!Me.client.proposal.keys.includes(De)){const{message:pt}=Cn("NO_MATCHING_KEY",`proposal id doesn't exist: ${De}`);throw new Error(pt)}if(ja(Me.client.proposal.get(De).expiry)){yield Me.deleteProposal(De);const{message:pt}=Cn("EXPIRED",`proposal id: ${De}`);throw new Error(pt)}})()}}class Zs extends at{constructor(De,Me){super(De,Me,"proposal",Ba),this.core=De,this.logger=Me}}class Us extends at{constructor(De,Me){super(De,Me,"session",Ba),this.core=De,this.logger=Me}}class io extends at{constructor(De,Me){super(De,Me,"request",Ba,pt=>pt.id),this.core=De,this.logger=Me}}class Xs extends class{constructor(De){this.opts=De,this.protocol="wc",this.version=2}}{constructor(De){var Me;super(De),Me=this,this.protocol="wc",this.version=2,this.name="client",this.events=new z.EventEmitter,this.on=(vt,Dt)=>this.events.on(vt,Dt),this.once=(vt,Dt)=>this.events.once(vt,Dt),this.off=(vt,Dt)=>this.events.off(vt,Dt),this.removeListener=(vt,Dt)=>this.events.removeListener(vt,Dt),this.removeAllListeners=vt=>this.events.removeAllListeners(vt),this.connect=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.connect(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.pair=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.pair(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.approve=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.approve(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.reject=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.reject(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.update=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.update(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.extend=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.extend(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.request=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.request(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.respond=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.respond(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.ping=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.ping(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.emit=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.emit(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.disconnect=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.disconnect(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.find=vt=>{try{return this.engine.find(vt)}catch(Dt){throw this.logger.error(Dt.message),Dt}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(vt){throw this.logger.error(vt.message),vt}},this.name=De?.name||"client",this.metadata=De?.metadata||(0,M.D)()||{name:"",description:"",url:"",icons:[""]};const pt=typeof De?.logger<"u"&&"string"!=typeof De?.logger?De.logger:(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De?.logger||"error"}));this.core=De?.core||new Ci(De),this.logger=(0,Io.generateChildLogger)(pt,this.name),this.session=new Us(this.core,this.logger),this.proposal=new Zs(this.core,this.logger),this.pendingRequest=new io(this.core,this.logger),this.engine=new ws(this)}static init(De){return(0,ie.Z)(function*(){const Me=new Xs(De);return yield Me.initialize(),Me})()}get context(){return(0,Io.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized");try{yield De.core.start(),yield De.session.init(),yield De.proposal.init(),yield De.pendingRequest.init(),yield De.engine.init(),De.core.verify.init({verifyUrl:De.metadata.verifyUrl}),De.logger.info("SignClient Initialization Success")}catch(Me){throw De.logger.info("SignClient Initialization Failure"),De.logger.error(Me.message),Me}})()}}var ia=Y(6930);const vd="wc@2:universal_provider:";var Ot,De,S0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Z0={exports:{}};Ot=Z0,De=Z0.exports,function(){var Me,nn="Expected a function",Mr="__lodash_hash_undefined__",Si="__lodash_placeholder__",fs=1/0,ko=9007199254740991,Cl=4294967295,Oc=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],Gi="[object Arguments]",Ls="[object Array]",Kh="[object Boolean]",r1="[object Date]",Zh="[object Error]",kp="[object Function]",Jb="[object GeneratorFunction]",Yh="[object Map]",Q2="[object Number]",dt="[object Object]",ju="[object Promise]",Ta="[object RegExp]",Jh="[object Set]",bl="[object String]",Ul="[object Symbol]",I1="[object WeakMap]",Xh="[object ArrayBuffer]",S1="[object DataView]",k1="[object Float32Array]",Xb="[object Float64Array]",Mp="[object Int8Array]",C1="[object Int16Array]",Op="[object Int32Array]",eg="[object Uint8Array]",Qb="[object Uint8ClampedArray]",Rm="[object Uint16Array]",Wg="[object Uint32Array]",Ev=/\b__p \+= '';/g,e6=/\b(__p \+=) '' \+/g,Tv=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Uy=/&(?:amp|lt|gt|quot|#39);/g,jy=/[&<>"']/g,Av=RegExp(Uy.source),Vy=RegExp(jy.source),Hy=/<%-([\s\S]+?)%>/g,v8=/<%([\s\S]+?)%>/g,t6=/<%=([\s\S]+?)%>/g,_8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Iv=/^\w*$/,Sv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n6=/[\\^$.*+?()[\]{}|]/g,w8=RegExp(n6.source),$y=/^\s+/,x8=/\s/,r6=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,M1=/\{\n\/\* \[wrapped with (.+)\] \*/,O1=/,? & /,i6=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gg=/[()=,{}\[\]\/\s]/,zg=/\\(\\)?/g,tg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ng=/\w*$/,s6=/^[-+]0x[0-9a-f]+$/i,D1=/^0b[01]+$/i,qg=/^\[object .+?Constructor\]$/,kv=/^0o[0-7]+$/i,E8=/^(?:0|[1-9]\d*)$/,Wy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nm=/($^)/,rg=/['\n\r\u2028\u2029\\]/g,ig="\\ud800-\\udfff",Kg="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",P1="\\u2700-\\u27bf",d2="a-z\\xdf-\\xf6\\xf8-\\xff",Zg="A-Z\\xc0-\\xd6\\xd8-\\xde",Yg="\\ufe0e\\ufe0f",qy="\\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",o6="["+ig+"]",Ah="["+qy+"]",Ky="["+Kg+"]",Zy="\\d+",um="["+P1+"]",wu="["+d2+"]",Jg="[^"+ig+qy+Zy+P1+d2+Zg+"]",m0="\\ud83c[\\udffb-\\udfff]",X0="[^"+ig+"]",i1="(?:\\ud83c[\\udde6-\\uddff]){2}",Yy="[\\ud800-\\udbff][\\udc00-\\udfff]",Lm="["+Zg+"]",Jy="(?:"+wu+"|"+Jg+")",Ov="(?:"+Lm+"|"+Jg+")",cm="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",p2="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Dp="(?:"+Ky+"|"+m0+")?",m2="["+Yg+"]?",sg=m2+Dp+"(?:\\u200d(?:"+[X0,i1,Yy].join("|")+")"+m2+Dp+")*",a6="(?:"+[um,i1,Yy].join("|")+")"+sg,u6="(?:"+[X0+Ky+"?",Ky,i1,Yy,o6].join("|")+")",Dv=RegExp("['\u2019]","g"),c6=RegExp(Ky,"g"),Qg=RegExp(m0+"(?="+m0+")|"+u6+sg,"g"),Pv=RegExp([Lm+"?"+wu+"+"+cm+"(?="+[Ah,Lm,"$"].join("|")+")",Ov+"+"+p2+"(?="+[Ah,Lm+Jy,"$"].join("|")+")",Lm+"?"+Jy+"+"+cm,Lm+"+"+p2,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zy,a6].join("|"),"g"),Qh=RegExp("[\\u200d"+ig+Kg+Yg+"]"),lm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ey=["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"],Xy=-1,jl={};jl[k1]=jl[Xb]=jl[Mp]=jl[C1]=jl[Op]=jl[eg]=jl[Qb]=jl[Rm]=jl[Wg]=!0,jl[Gi]=jl[Ls]=jl[Xh]=jl[Kh]=jl[S1]=jl[r1]=jl[Zh]=jl[kp]=jl[Yh]=jl[Q2]=jl[dt]=jl[Ta]=jl[Jh]=jl[bl]=jl[I1]=!1;var Zc={};Zc[Gi]=Zc[Ls]=Zc[Xh]=Zc[S1]=Zc[Kh]=Zc[r1]=Zc[k1]=Zc[Xb]=Zc[Mp]=Zc[C1]=Zc[Op]=Zc[Yh]=Zc[Q2]=Zc[dt]=Zc[Ta]=Zc[Jh]=Zc[bl]=Zc[Ul]=Zc[eg]=Zc[Qb]=Zc[Rm]=Zc[Wg]=!0,Zc[Zh]=Zc[kp]=Zc[I1]=!1;var og={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Rv=parseFloat,Nv=parseInt,ag="object"==typeof S0&&S0&&S0.Object===Object&&S0,ty="object"==typeof self&&self&&self.Object===Object&&self,Dl=ag||ty||Function("return this")(),mu=De&&!De.nodeType&&De,s1=mu&&Ot&&!Ot.nodeType&&Ot,g0=s1&&s1.exports===mu,y2=g0&&ag.process,Q0=function(){try{return s1&&s1.require&&s1.require("util").types||y2&&y2.binding&&y2.binding("util")}catch{}}(),yc=Q0&&Q0.isArrayBuffer,ny=Q0&&Q0.isDate,ug=Q0&&Q0.isMap,Um=Q0&&Q0.isRegExp,Qy=Q0&&Q0.isSet,eb=Q0&&Q0.isTypedArray;function eh(ei,ss,Mi){switch(Mi.length){case 0:return ei.call(ss);case 1:return ei.call(ss,Mi[0]);case 2:return ei.call(ss,Mi[0],Mi[1]);case 3:return ei.call(ss,Mi[0],Mi[1],Mi[2])}return ei.apply(ss,Mi)}function ry(ei,ss,Mi,Uo){for(var ku=-1,Yc=null==ei?0:ei.length;++ku-1}function a1(ei,ss,Mi){for(var Uo=-1,ku=null==ei?0:ei.length;++Uo-1;);return Mi}function oy(ei,ss){for(var Mi=ei.length;Mi--&&jd(ss,ei[Mi],0)>-1;);return Mi}function ib(ei,ss){for(var Mi=ei.length,Uo=0;Mi--;)ei[Mi]===ss&&++Uo;return Uo}var th=rb({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),sb=rb({"&":"&","<":"<",">":">",'"':""","'":"'"});function ob(ei){return"\\"+og[ei]}function T2(ei){return Qh.test(ei)}function hg(ei){var ss=-1,Mi=Array(ei.size);return ei.forEach(function(Uo,ku){Mi[++ss]=[ku,Uo]}),Mi}function ub(ei,ss){return function(Mi){return ei(ss(Mi))}}function N1(ei,ss){for(var Mi=-1,Uo=ei.length,ku=0,Yc=[];++Mi",""":'"',"'":"'"}),fm=function ei(ss){var ve,Mi=(ss=null==ss?Dl:fm.defaults(Dl.Object(),ss,fm.pick(Dl,ey))).Array,Uo=ss.Date,ku=ss.Error,Yc=ss.Function,wd=ss.Math,vl=ss.Object,cy=ss.RegExp,p6=ss.String,Of=ss.TypeError,M0=Mi.prototype,mg=vl.prototype,gg=ss["__core-js_shared__"],yg=Yc.prototype.toString,Fc=mg.hasOwnProperty,m6=0,g6=(ve=/[^.]+$/.exec(gg&&gg.keys&&gg.keys.IE_PROTO||""))?"Symbol(src)_1."+ve:"",lb=mg.toString,O0=yg.call(vl),ya=Dl._,Wv=cy("^"+yg.call(Fc).replace(n6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A2=g0?ss.Buffer:Me,hm=ss.Symbol,ly=ss.Uint8Array,bg=A2?A2.allocUnsafe:Me,dy=ub(vl.getPrototypeOf,vl),fy=vl.create,db=mg.propertyIsEnumerable,$m=M0.splice,Wm=hm?hm.isConcatSpreadable:Me,I2=hm?hm.iterator:Me,Df=hm?hm.toStringTag:Me,pm=function(){try{var ve=wb(vl,"defineProperty");return ve({},"",{}),ve}catch{}}(),y6=ss.clearTimeout!==Dl.clearTimeout&&ss.clearTimeout,Gv=Uo&&Uo.now!==Dl.Date.now&&Uo.now,vg=ss.setTimeout!==Dl.setTimeout&&ss.setTimeout,D0=wd.ceil,mm=wd.floor,gf=vl.getOwnPropertySymbols,gm=A2?A2.isBuffer:Me,_g=ss.isFinite,Ch=M0.join,Cu=ub(vl.keys,vl),Xl=wd.max,Vd=wd.min,S2=Uo.now,k2=ss.parseInt,Gm=wd.random,C2=M0.reverse,F1=wb(ss,"DataView"),u1=wb(ss,"Map"),ym=wb(ss,"Promise"),zm=wb(ss,"Set"),M2=wb(ss,"WeakMap"),qm=wb(vl,"create"),wg=M2&&new M2,bm={},fb=C6(F1),ye=C6(u1),Be=C6(ym),ct=C6(zm),Gt=C6(M2),it=hm?hm.prototype:Me,Fn=it?it.valueOf:Me,nr=it?it.toString:Me;function rn(ve){if(Ql(ve)&&!Ku(ve)&&!(ve instanceof Ri)){if(ve instanceof ns)return ve;if(Fc.call(ve,"__wrapped__"))return KI(ve)}return new ns(ve)}var Xr=function(){function ve(){}return function(Fe){if(!Wd(Fe))return{};if(fy)return fy(Fe);ve.prototype=Fe;var lt=new ve;return ve.prototype=Me,lt}}();function ms(){}function ns(ve,Fe){this.__wrapped__=ve,this.__actions__=[],this.__chain__=!!Fe,this.__index__=0,this.__values__=Me}function Ri(ve){this.__wrapped__=ve,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Cl,this.__views__=[]}function uu(ve){var Fe=-1,lt=null==ve?0:ve.length;for(this.clear();++Fe=Fe?ve:Fe)),ve}function np(ve,Fe,lt,Kt,_n,jn){var xr,Rr=1&Fe,si=2&Fe,xs=4&Fe;if(lt&&(xr=_n?lt(ve,Kt,_n,jn):lt(ve)),xr!==Me)return xr;if(!Wd(ve))return ve;var Es=Ku(ve);if(Es){if(xr=function(ve){var Fe=ve.length,lt=new ve.constructor(Fe);return Fe&&"string"==typeof ve[0]&&Fc.call(ve,"index")&&(lt.index=ve.index,lt.input=ve.input),lt}(ve),!Rr)return $d(ve,xr)}else{var js=B0(ve),gs=js==kp||js==Jb;if(Ym(ve))return kt(ve,Rr);if(js==dt||js==Gi||gs&&!_n){if(xr=si||gs?{}:L9(ve),!Rr)return si?function(ve,Fe){return rp(ve,l3(ve),Fe)}(ve,function(ve,Fe){return ve&&rp(Fe,d1(Fe),ve)}(xr,ve)):function(ve,Fe){return rp(ve,g4(ve),Fe)}(ve,k8(xr,ve))}else{if(!Zc[js])return _n?ve:{};xr=function(ve,Fe,lt){var Kt=ve.constructor;switch(Fe){case Xh:return bc(ve);case Kh:case r1:return new Kt(+ve);case S1:return function(ve,Fe){var lt=Fe?bc(ve.buffer):ve.buffer;return new ve.constructor(lt,ve.byteOffset,ve.byteLength)}(ve,lt);case k1:case Xb:case Mp:case C1:case Op:case eg:case Qb:case Rm:case Wg:return $l(ve,lt);case Yh:return new Kt;case Q2:case bl:return new Kt(ve);case Ta:return function(ve){var Fe=new ve.constructor(ve.source,ng.exec(ve));return Fe.lastIndex=ve.lastIndex,Fe}(ve);case Jh:return new Kt;case Ul:return function(ve){return Fn?vl(Fn.call(ve)):{}}(ve)}}(ve,js,Rr)}}jn||(jn=new rh);var Ro=jn.get(ve);if(Ro)return Ro;jn.set(ve,xr),N4(ve)?ve.forEach(function(lu){xr.add(np(lu,Fe,lt,lu,ve,jn))}):KS(ve)&&ve.forEach(function(lu,Sc){xr.set(Sc,np(lu,Fe,lt,Sc,ve,jn))});var ho=Es?Me:(xs?si?F9:Mh:si?d1:uh)(ve);return ef(ho||ve,function(lu,Sc){ho&&(lu=ve[Sc=lu]),pb(xr,Sc,np(lu,Fe,lt,Sc,ve,jn))}),xr}function u4(ve,Fe,lt){var Kt=lt.length;if(null==ve)return!Kt;for(ve=vl(ve);Kt--;){var _n=lt[Kt],xr=ve[_n];if(xr===Me&&!(_n in ve)||!(0,Fe[_n])(xr))return!1}return!0}function Xt(ve,Fe,lt){if("function"!=typeof ve)throw new Of(nn);return k6(function(){ve.apply(Me,lt)},Fe)}function py(ve,Fe,lt,Kt){var _n=-1,jn=v2,xr=!0,Rr=ve.length,si=[],xs=Fe.length;if(!Rr)return si;lt&&(Fe=Vl(Fe,kh(lt))),Kt?(jn=a1,xr=!1):Fe.length>=200&&(jn=E2,xr=!1,Fe=new O2(Fe));e:for(;++_n-1},tf.prototype.set=function(ve,Fe){var lt=this.__data__,Kt=mb(lt,ve);return Kt<0?(++this.size,lt.push([ve,Fe])):lt[Kt][1]=Fe,this},U1.prototype.clear=function(){this.size=0,this.__data__={hash:new uu,map:new(u1||tf),string:new uu}},U1.prototype.delete=function(ve){var Fe=U8(this,ve).delete(ve);return this.size-=Fe?1:0,Fe},U1.prototype.get=function(ve){return U8(this,ve).get(ve)},U1.prototype.has=function(ve){return U8(this,ve).has(ve)},U1.prototype.set=function(ve,Fe){var lt=U8(this,ve),Kt=lt.size;return lt.set(ve,Fe),this.size+=lt.size==Kt?0:1,this},O2.prototype.add=O2.prototype.push=function(ve){return this.__data__.set(ve,Mr),this},O2.prototype.has=function(ve){return this.__data__.has(ve)},rh.prototype.clear=function(){this.__data__=new tf,this.size=0},rh.prototype.delete=function(ve){var Fe=this.__data__,lt=Fe.delete(ve);return this.size=Fe.size,lt},rh.prototype.get=function(ve){return this.__data__.get(ve)},rh.prototype.has=function(ve){return this.__data__.has(ve)},rh.prototype.set=function(ve,Fe){var lt=this.__data__;if(lt instanceof tf){var Kt=lt.__data__;if(!u1||Kt.length<199)return Kt.push([ve,Fe]),this.size=++lt.size,this;lt=this.__data__=new U1(Kt)}return lt.set(ve,Fe),this.size=lt.size,this};var Mt=k9(Wr),gb=k9(R0,!0);function c4(ve,Fe){var lt=!0;return Mt(ve,function(Kt,_n,jn){return lt=!!Fe(Kt,_n,jn)}),lt}function Ae(ve,Fe,lt){for(var Kt=-1,_n=ve.length;++Kt<_n;){var jn=ve[Kt],xr=Fe(jn);if(null!=xr&&(Rr===Me?xr==xr&&!oh(xr):lt(xr,Rr)))var Rr=xr,si=jn}return si}function qn(ve,Fe){var lt=[];return Mt(ve,function(Kt,_n,jn){Fe(Kt,_n,jn)&<.push(Kt)}),lt}function P0(ve,Fe,lt,Kt,_n){var jn=-1,xr=ve.length;for(lt||(lt=V9),_n||(_n=[]);++jn0&<(Rr)?Fe>1?P0(Rr,Fe-1,lt,Kt,_n):Sh(_n,Rr):Kt||(_n[_n.length]=Rr)}return _n}var _6=C9(),Qr=C9(!0);function Wr(ve,Fe){return ve&&_6(ve,Fe,uh)}function R0(ve,Fe){return ve&&Qr(ve,Fe,uh)}function Di(ve,Fe){return o1(Fe,function(lt){return Ey(ve[lt])})}function j1(ve,Fe){for(var lt=0,Kt=(Fe=Km(Fe,ve)).length;null!=ve&<Fe}function Jv(ve,Fe){return null!=ve&&Fc.call(ve,Fe)}function l4(ve,Fe){return null!=ve&&Fe in vl(ve)}function my(ve,Fe,lt){for(var Kt=lt?a1:v2,_n=ve[0].length,jn=ve.length,xr=jn,Rr=Mi(jn),si=1/0,xs=[];xr--;){var Es=ve[xr];xr&&Fe&&(Es=Vl(Es,kh(Fe))),si=Vd(Es.length,si),Rr[xr]=!lt&&(Fe||_n>=120&&Es.length>=120)?new O2(xr&&Es):Me}Es=ve[0];var js=-1,gs=Rr[0];e:for(;++js<_n&&xs.length=Rr?si:si*("desc"==lt[Kt]?-1:1)}return ve.index-Fe.index}(jn,xr,lt)});Mi--;)ei[Mi]=ei[Mi].value;return ei}(de(ve,function(jn,xr,Rr){return{criteria:Vl(Fe,function(xs){return xs(jn)}),index:++Kt,value:jn}}))}function ln(ve,Fe,lt){for(var Kt=-1,_n=Fe.length,jn={};++Kt<_n;){var xr=Fe[Kt],Rr=j1(ve,xr);lt(Rr,xr)&&Hs(jn,Km(xr,ve),Rr)}return jn}function vn(ve,Fe,lt,Kt){var _n=Kt?d6:jd,jn=-1,xr=Fe.length,Rr=ve;for(ve===Fe&&(Fe=$d(Fe)),lt&&(Rr=Vl(ve,kh(lt)));++jn-1;)Rr!==ve&&$m.call(Rr,si,1),$m.call(ve,si,1);return ve}function Mn(ve,Fe){for(var lt=ve?Fe.length:0,Kt=lt-1;lt--;){var _n=Fe[lt];if(lt==Kt||_n!==jn){var jn=_n;B2(_n)?$m.call(ve,_n,1):P2(ve,_n)}}return ve}function Hn(ve,Fe){return ve+mm(Gm()*(Fe-ve+1))}function Ar(ve,Fe){var lt="";if(!ve||Fe<1||Fe>ko)return lt;do{Fe%2&&(lt+=ve),(Fe=mm(Fe/2))&&(ve+=ve)}while(Fe);return lt}function Zr(ve,Fe){return V8(S6(ve,Fe,F0),ve+"")}function ri(ve){return v6(B6(ve))}function Ks(ve,Fe){var lt=B6(ve);return H8(lt,xg(Fe,0,lt.length))}function Hs(ve,Fe,lt,Kt){if(!Wd(ve))return ve;for(var _n=-1,jn=(Fe=Km(Fe,ve)).length,xr=jn-1,Rr=ve;null!=Rr&&++_n_n?0:_n+Fe),(lt=lt>_n?_n:lt)<0&&(lt+=_n),_n=Fe>lt?0:lt-Fe>>>0,Fe>>>=0;for(var jn=Mi(_n);++Kt<_n;)jn[Kt]=ve[Kt+Fe];return jn}function Xc(ve,Fe){var lt;return Mt(ve,function(Kt,_n,jn){return!(lt=Fe(Kt,_n,jn))}),!!lt}function nf(ve,Fe,lt){var Kt=0,_n=null==ve?Kt:ve.length;if("number"==typeof Fe&&Fe==Fe&&_n<=2147483647){for(;Kt<_n;){var jn=Kt+_n>>>1,xr=ve[jn];null!==xr&&!oh(xr)&&(lt?xr<=Fe:xr=200){var xs=Fe?null:N9(ve);if(xs)return ay(xs);xr=!1,_n=E2,si=new O2}else si=Fe?[]:Rr;e:for(;++Kt=Kt?ve:Ss(ve,Fe,lt)}var n3=y6||function(ve){return Dl.clearTimeout(ve)};function kt(ve,Fe){if(Fe)return ve.slice();var lt=ve.length,Kt=bg?bg(lt):new ve.constructor(lt);return ve.copy(Kt),Kt}function bc(ve){var Fe=new ve.constructor(ve.byteLength);return new ly(Fe).set(new ly(ve)),Fe}function $l(ve,Fe){var lt=Fe?bc(ve.buffer):ve.buffer;return new ve.constructor(lt,ve.byteOffset,ve.length)}function Bp(ve,Fe){if(ve!==Fe){var lt=ve!==Me,Kt=null===ve,_n=ve==ve,jn=oh(ve),xr=Fe!==Me,Rr=null===Fe,si=Fe==Fe,xs=oh(Fe);if(!Rr&&!xs&&!jn&&ve>Fe||jn&&xr&&si&&!Rr&&!xs||Kt&&xr&&si||!lt&&si||!_n)return 1;if(!Kt&&!jn&&!xs&&ve1?lt[_n-1]:Me,xr=_n>2?lt[2]:Me;for(jn=ve.length>3&&"function"==typeof jn?(_n--,jn):Me,xr&&Fp(lt[0],lt[1],xr)&&(jn=_n<3?Me:jn,_n=1),Fe=vl(Fe);++Kt<_n;){var Rr=lt[Kt];Rr&&ve(Fe,Rr,Kt,jn)}return Fe})}function k9(ve,Fe){return function(lt,Kt){if(null==lt)return lt;if(!Lp(lt))return ve(lt,Kt);for(var _n=lt.length,jn=Fe?_n:-1,xr=vl(lt);(Fe?jn--:++jn<_n)&&!1!==Kt(xr[jn],jn,xr););return lt}}function C9(ve){return function(Fe,lt,Kt){for(var _n=-1,jn=vl(Fe),xr=Kt(Fe),Rr=xr.length;Rr--;){var si=xr[ve?Rr:++_n];if(!1===lt(jn[si],si,jn))break}return Fe}}function M9(ve){return function(Fe){var lt=T2(Fe=wl(Fe))?ep(Fe):Me,Kt=lt?lt[0]:Fe.charAt(0),_n=lt?R2(lt,1).join(""):Fe.slice(1);return Kt[ve]()+_n}}function A6(ve){return function(Fe){return jm(z4(Hx(Fe).replace(Dv,"")),ve,"")}}function s3(ve){return function(){var Fe=arguments;switch(Fe.length){case 0:return new ve;case 1:return new ve(Fe[0]);case 2:return new ve(Fe[0],Fe[1]);case 3:return new ve(Fe[0],Fe[1],Fe[2]);case 4:return new ve(Fe[0],Fe[1],Fe[2],Fe[3]);case 5:return new ve(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4]);case 6:return new ve(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5]);case 7:return new ve(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6])}var lt=Xr(ve.prototype),Kt=ve.apply(lt,Fe);return Wd(Kt)?Kt:lt}}function O9(ve){return function(Fe,lt,Kt){var _n=vl(Fe);if(!Lp(Fe)){var jn=ps(lt,3);Fe=uh(Fe),lt=function(Rr){return jn(_n[Rr],Rr,_n)}}var xr=ve(Fe,lt,Kt);return xr>-1?_n[jn?Fe[xr]:xr]:Me}}function D9(ve){return vy(function(Fe){var lt=Fe.length,Kt=lt,_n=ns.prototype.thru;for(ve&&Fe.reverse();Kt--;){var jn=Fe[Kt];if("function"!=typeof jn)throw new Of(nn);if(_n&&!xr&&"wrapper"==u3(jn))var xr=new ns([],!0)}for(Kt=xr?Kt:lt;++Kt1&&Uc.reverse(),Es&&siRr))return!1;var xs=jn.get(ve),Es=jn.get(Fe);if(xs&&Es)return xs==Fe&&Es==ve;var js=-1,gs=!0,Ro=2<?new O2:Me;for(jn.set(ve,Fe),jn.set(Fe,ve);++js-1&&ve%1==0&&ve1?"& ":"")+Fe[Kt],Fe=Fe.join(lt>2?", ":" "),ve.replace(r6,"{\n/* [wrapped with "+Fe+"] */\n")}(Kt,function(ve,Fe){return ef(Oc,function(lt){var Kt="_."+lt[0];Fe<[1]&&!v2(ve,Kt)&&ve.push(Kt)}),ve.sort()}(function(ve){var Fe=ve.match(M1);return Fe?Fe[1].split(O1):[]}(Kt),lt)))}function E4(ve){var Fe=0,lt=0;return function(){var Kt=S2(),_n=16-(Kt-lt);if(lt=Kt,_n>0){if(++Fe>=800)return arguments[0]}else Fe=0;return ve.apply(Me,arguments)}}function H8(ve,Fe){var lt=-1,Kt=ve.length,_n=Kt-1;for(Fe=Fe===Me?Kt:Fe;++lt1?ve[Fe-1]:Me;return lt="function"==typeof lt?(ve.pop(),lt):Me,ax(ve,lt)});function ES(ve){var Fe=rn(ve);return Fe.__chain__=!0,Fe}function Eb(ve,Fe){return Fe(ve)}var TS=vy(function(ve){var Fe=ve.length,lt=Fe?ve[0]:0,Kt=this.__wrapped__,_n=function(jn){return hy(jn,ve)};return!(Fe>1||this.__actions__.length)&&Kt instanceof Ri&&B2(lt)?((Kt=Kt.slice(lt,+lt+(Fe?1:0))).__actions__.push({func:Eb,args:[_n],thisArg:Me}),new ns(Kt,this.__chain__).thru(function(jn){return Fe&&!jn.length&&jn.push(Me),jn})):this.thru(_n)}),Ig=i3(function(ve,Fe,lt){Fc.call(ve,lt)?++ve[lt]:vm(ve,lt,1)}),EP=O9(T4),kS=O9(Z9);function Sg(ve,Fe){return(Ku(ve)?ef:Mt)(ve,ps(Fe,3))}function P4(ve,Fe){return(Ku(ve)?b2:gb)(ve,ps(Fe,3))}var fx=i3(function(ve,Fe,lt){Fc.call(ve,lt)?ve[lt].push(Fe):vm(ve,lt,[Fe])}),TP=Zr(function(ve,Fe,lt){var Kt=-1,_n="function"==typeof Fe,jn=Lp(ve)?Mi(ve.length):[];return Mt(ve,function(xr){jn[++Kt]=_n?eh(Fe,xr,lt):an(xr,Fe,lt)}),jn}),DS=i3(function(ve,Fe,lt){vm(ve,lt,Fe)});function W8(ve,Fe){return(Ku(ve)?Vl:de)(ve,ps(Fe,3))}var hx=i3(function(ve,Fe,lt){ve[lt?0:1].push(Fe)},function(){return[[],[]]}),P6=Zr(function(ve,Fe){if(null==ve)return[];var lt=Fe.length;return lt>1&&Fp(ve,Fe[0],Fe[1])?Fe=[]:lt>2&&Fp(Fe[0],Fe[1],Fe[2])&&(Fe=[Fe[0]]),Bt(ve,P0(Fe,1),[])}),Tb=Gv||function(){return Dl.Date.now()};function bx(ve,Fe,lt){return Fe=lt?Me:Fe,N2(ve,128,Me,Me,Me,Me,Fe=ve&&null==Fe?ve.length:Fe)}function vx(ve,Fe){var lt;if("function"!=typeof Fe)throw new Of(nn);return ve=Xu(ve),function(){return--ve>0&&(lt=Fe.apply(this,arguments)),ve<=1&&(Fe=Me),lt}}var _x=Zr(function(ve,Fe,lt){var Kt=1;if(lt.length){var _n=N1(lt,c3(_x));Kt|=32}return N2(ve,Kt,Fe,lt,_n)}),wx=Zr(function(ve,Fe,lt){var Kt=3;if(lt.length){var _n=N1(lt,c3(wx));Kt|=32}return N2(Fe,Kt,ve,lt,_n)});function Ex(ve,Fe,lt){var Kt,_n,jn,xr,Rr,si,xs=0,Es=!1,js=!1,gs=!0;if("function"!=typeof ve)throw new Of(nn);function Ro(b0){var Gd=Kt,f1=_n;return Kt=_n=Me,xs=b0,xr=ve.apply(f1,Gd)}function wo(b0){return xs=b0,Rr=k6(Sc,Fe),Es?Ro(b0):xr}function lu(b0){var Gd=b0-si;return si===Me||Gd>=Fe||Gd<0||js&&b0-xs>=jn}function Sc(){var b0=Tb();if(lu(b0))return Uc(b0);Rr=k6(Sc,function(b0){var r7=Fe-(b0-si);return js?Vd(r7,jn-(b0-xs)):r7}(b0))}function Uc(b0){return Rr=Me,gs&&Kt?Ro(b0):(Kt=_n=Me,xr)}function xu(){var b0=Tb(),Gd=lu(b0);if(Kt=arguments,_n=this,si=b0,Gd){if(Rr===Me)return wo(si);if(js)return n3(Rr),Rr=k6(Sc,Fe),Ro(si)}return Rr===Me&&(Rr=k6(Sc,Fe)),xr}return Fe=xm(Fe)||0,Wd(lt)&&(Es=!!lt.leading,jn=(js="maxWait"in lt)?Xl(xm(lt.maxWait)||0,Fe):jn,gs="trailing"in lt?!!lt.trailing:gs),xu.cancel=function(){Rr!==Me&&n3(Rr),xs=0,Kt=si=_n=Rr=Me},xu.flush=function(){return Rr===Me?xr:Uc(Tb())},xu}var FS=Zr(function(ve,Fe){return Xt(ve,1,Fe)}),LS=Zr(function(ve,Fe,lt){return Xt(ve,xm(Fe)||0,lt)});function G8(ve,Fe){if("function"!=typeof ve||null!=Fe&&"function"!=typeof Fe)throw new Of(nn);var lt=function(){var Kt=arguments,_n=Fe?Fe.apply(this,Kt):Kt[0],jn=lt.cache;if(jn.has(_n))return jn.get(_n);var xr=ve.apply(this,Kt);return lt.cache=jn.set(_n,xr)||jn,xr};return lt.cache=new(G8.Cache||U1),lt}function z8(ve){if("function"!=typeof ve)throw new Of(nn);return function(){var Fe=arguments;switch(Fe.length){case 0:return!ve.call(this);case 1:return!ve.call(this,Fe[0]);case 2:return!ve.call(this,Fe[0],Fe[1]);case 3:return!ve.call(this,Fe[0],Fe[1],Fe[2])}return!ve.apply(this,Fe)}}G8.Cache=U1;var jS=E6(function(ve,Fe){var lt=(Fe=1==Fe.length&&Ku(Fe[0])?Vl(Fe[0],kh(ps())):Vl(P0(Fe,1),kh(ps()))).length;return Zr(function(Kt){for(var _n=-1,jn=Vd(Kt.length,lt);++_n=Fe}),_y=gy(function(){return arguments}())?gy:function(ve){return Ql(ve)&&Fc.call(ve,"callee")&&!db.call(ve,"callee")},Ku=Mi.isArray,qS=yc?kh(yc):function(ve){return Ql(ve)&&y0(ve)==Xh};function Lp(ve){return null!=ve&&Up(ve.length)&&!Ey(ve)}function Yf(ve){return Ql(ve)&&Lp(ve)}var Ym=gm||Sb,K8=ny?kh(ny):function(ve){return Ql(ve)&&y0(ve)==r1};function xy(ve){if(!Ql(ve))return!1;var Fe=y0(ve);return Fe==Zh||"[object DOMException]"==Fe||"string"==typeof ve.message&&"string"==typeof ve.name&&!jp(ve)}function Ey(ve){if(!Wd(ve))return!1;var Fe=y0(ve);return Fe==kp||Fe==Jb||"[object AsyncFunction]"==Fe||"[object Proxy]"==Fe}function Bu(ve){return"number"==typeof ve&&ve==Xu(ve)}function Up(ve){return"number"==typeof ve&&ve>-1&&ve%1==0&&ve<=ko}function Wd(ve){var Fe=typeof ve;return null!=ve&&("object"==Fe||"function"==Fe)}function Ql(ve){return null!=ve&&"object"==typeof ve}var KS=ug?kh(ug):function(ve){return Ql(ve)&&B0(ve)==Yh};function rf(ve){return"number"==typeof ve||Ql(ve)&&y0(ve)==Q2}function jp(ve){if(!Ql(ve)||y0(ve)!=dt)return!1;var Fe=dy(ve);if(null===Fe)return!0;var lt=Fc.call(Fe,"constructor")&&Fe.constructor;return"function"==typeof lt&< instanceof lt&&yg.call(lt)==O0}var Z8=Um?kh(Um):function(ve){return Ql(ve)&&y0(ve)==Ta},N4=Qy?kh(Qy):function(ve){return Ql(ve)&&B0(ve)==Jh};function R6(ve){return"string"==typeof ve||!Ku(ve)&&Ql(ve)&&y0(ve)==bl}function oh(ve){return"symbol"==typeof ve||Ql(ve)&&y0(ve)==Ul}var L2=eb?kh(eb):function(ve){return Ql(ve)&&Up(ve.length)&&!!jl[y0(ve)]},Ox=a3(re),B4=a3(function(ve,Fe){return ve<=Fe});function N6(ve){if(!ve)return[];if(Lp(ve))return R6(ve)?ep(ve):$d(ve);if(I2&&ve[I2])return function(ei){for(var ss,Mi=[];!(ss=ei.next()).done;)Mi.push(ss.value);return Mi}(ve[I2]());var Fe=B0(ve);return(Fe==Yh?hg:Fe==Jh?ay:B6)(ve)}function Jm(ve){return ve?(ve=xm(ve))===fs||ve===-fs?17976931348623157e292*(ve<0?-1:1):ve==ve?ve:0:0===ve?ve:0}function Xu(ve){var Fe=Jm(ve),lt=Fe%1;return Fe==Fe?lt?Fe-lt:Fe:0}function Ib(ve){return ve?xg(Xu(ve),0,Cl):0}function xm(ve){if("number"==typeof ve)return ve;if(oh(ve))return NaN;if(Wd(ve)){var Fe="function"==typeof ve.valueOf?ve.valueOf():ve;ve=Wd(Fe)?Fe+"":Fe}if("string"!=typeof ve)return 0===ve?ve:+ve;ve=x2(ve);var lt=D1.test(ve);return lt||kv.test(ve)?Nv(ve.slice(2),lt?2:8):s6.test(ve)?NaN:+ve}function _3(ve){return rp(ve,d1(ve))}function wl(ve){return null==ve?"":N0(ve)}var Px=T6(function(ve,Fe){if(d3(Fe)||Lp(Fe))rp(Fe,uh(Fe),ve);else for(var lt in Fe)Fc.call(Fe,lt)&&pb(ve,lt,Fe[lt])}),w3=T6(function(ve,Fe){rp(Fe,d1(Fe),ve)}),Y8=T6(function(ve,Fe,lt,Kt){rp(Fe,d1(Fe),ve,Kt)}),F4=T6(function(ve,Fe,lt,Kt){rp(Fe,uh(Fe),ve,Kt)}),L4=vy(hy),MP=Zr(function(ve,Fe){ve=vl(ve);var lt=-1,Kt=Fe.length,_n=Kt>2?Fe[2]:Me;for(_n&&Fp(Fe[0],Fe[1],_n)&&(Kt=1);++lt1),jn}),rp(ve,F9(ve),lt),Kt&&(lt=np(lt,7,_b));for(var _n=Fe.length;_n--;)P2(lt,Fe[_n]);return lt}),H4=vy(function(ve,Fe){return null==ve?{}:function(ve,Fe){return ln(ve,Fe,function(lt,Kt){return U4(ve,Kt)})}(ve,Fe)});function Bx(ve,Fe){if(null==ve)return{};var lt=Vl(F9(ve),function(Kt){return[Kt]});return Fe=ps(Fe),ln(ve,lt,function(Kt,_n){return Fe(Kt,_n[0])})}var Fx=p4(uh),Lx=p4(d1);function B6(ve){return null==ve?[]:sy(ve,uh(ve))}var mk=A6(function(ve,Fe,lt){return Fe=Fe.toLowerCase(),ve+(lt?Vx(Fe):Fe)});function Vx(ve){return J8(wl(ve).toLowerCase())}function Hx(ve){return(ve=wl(ve))&&ve.replace(Wy,th).replace(c6,"")}var bk=A6(function(ve,Fe,lt){return ve+(lt?"-":"")+Fe.toLowerCase()}),vk=A6(function(ve,Fe,lt){return ve+(lt?" ":"")+Fe.toLowerCase()}),BP=M9("toLowerCase"),Ek=A6(function(ve,Fe,lt){return ve+(lt?"_":"")+Fe.toLowerCase()}),Ak=A6(function(ve,Fe,lt){return ve+(lt?" ":"")+J8(Fe)}),zx=A6(function(ve,Fe,lt){return ve+(lt?" ":"")+Fe.toUpperCase()}),J8=M9("toUpperCase");function z4(ve,Fe,lt){return ve=wl(ve),(Fe=lt?Me:Fe)===Me?function(ei){return lm.test(ei)}(ve)?function(ei){return ei.match(Pv)||[]}(ve):function(ei){return ei.match(i6)||[]}(ve):ve.match(Fe)||[]}var qx=Zr(function(ve,Fe){try{return eh(ve,Me,Fe)}catch(lt){return xy(lt)?lt:new ku(lt)}}),kk=vy(function(ve,Fe){return ef(Fe,function(lt){lt=Ag(lt),vm(ve,lt,_x(ve[lt],ve))}),ve});function q4(ve){return function(){return ve}}var Mk=D9(),Ok=D9(!0);function F0(ve){return ve}function Zx(ve){return e3("function"==typeof ve?ve:np(ve,1))}var jP=Zr(function(ve,Fe){return function(lt){return an(lt,ve,Fe)}}),Jx=Zr(function(ve,Fe){return function(lt){return an(ve,lt,Fe)}});function K4(ve,Fe,lt){var Kt=uh(Fe),_n=Di(Fe,Kt);null==lt&&(!Wd(Fe)||!_n.length&&Kt.length)&&(lt=Fe,Fe=ve,ve=this,_n=Di(Fe,uh(Fe)));var jn=!(Wd(lt)&&"chain"in lt&&!lt.chain),xr=Ey(ve);return ef(_n,function(Rr){var si=Fe[Rr];ve[Rr]=si,xr&&(ve.prototype[Rr]=function(){var xs=this.__chain__;if(jn||xs){var Es=ve(this.__wrapped__),js=Es.__actions__=$d(this.__actions__);return js.push({func:si,args:arguments,thisArg:ve}),Es.__chain__=xs,Es}return si.apply(ve,Sh([this.value()],arguments))})}),ve}function sf(){}var vc=d4(Vl),X8=d4(tb),Pk=d4(dm);function Y4(ve){return v4(ve)?lg(Ag(ve)):function(ve){return function(Fe){return j1(Fe,ve)}}(ve)}var Nk=f4(),Bk=f4(!0);function J4(){return[]}function Sb(){return!1}var Fk=N8(function(ve,Fe){return ve+Fe},0),X4=B8("ceil"),Lk=N8(function(ve,Fe){return ve/Fe},1),Q8=B8("floor"),mo=N8(function(ve,Fe){return ve*Fe},1),Hk=B8("round"),e5=N8(function(ve,Fe){return ve-Fe},0);return rn.after=function(ve,Fe){if("function"!=typeof Fe)throw new Of(nn);return ve=Xu(ve),function(){if(--ve<1)return Fe.apply(this,arguments)}},rn.ary=bx,rn.assign=Px,rn.assignIn=w3,rn.assignInWith=Y8,rn.assignWith=F4,rn.at=L4,rn.before=vx,rn.bind=_x,rn.bindAll=kk,rn.bindKey=wx,rn.castArray=function(){if(!arguments.length)return[];var ve=arguments[0];return Ku(ve)?ve:[ve]},rn.chain=ES,rn.chunk=function(ve,Fe,lt){Fe=(lt?Fp(ve,Fe,lt):Fe===Me)?1:Xl(Xu(Fe),0);var Kt=null==ve?0:ve.length;if(!Kt||Fe<1)return[];for(var _n=0,jn=0,xr=Mi(D0(Kt/Fe));_n_n?0:_n+lt),(Kt=Kt===Me||Kt>_n?_n:Xu(Kt))<0&&(Kt+=_n),Kt=lt>Kt?0:Ib(Kt);lt>>0)?(ve=wl(ve))&&("string"==typeof Fe||null!=Fe&&!Z8(Fe))&&!(Fe=N0(Fe))&&T2(ve)?R2(ep(ve),0,lt):ve.split(Fe,lt):[]},rn.spread=function(ve,Fe){if("function"!=typeof ve)throw new Of(nn);return Fe=null==Fe?0:Xl(Xu(Fe),0),Zr(function(lt){var Kt=lt[Fe],_n=R2(lt,0,Fe);return Kt&&Sh(_n,Kt),eh(ve,this,_n)})},rn.tail=function(ve){var Fe=null==ve?0:ve.length;return Fe?Ss(ve,1,Fe):[]},rn.take=function(ve,Fe,lt){return ve&&ve.length?Ss(ve,0,(Fe=lt||Fe===Me?1:Xu(Fe))<0?0:Fe):[]},rn.takeRight=function(ve,Fe,lt){var Kt=null==ve?0:ve.length;return Kt?Ss(ve,(Fe=Kt-(Fe=lt||Fe===Me?1:Xu(Fe)))<0?0:Fe,Kt):[]},rn.takeRightWhile=function(ve,Fe){return ve&&ve.length?Rp(ve,ps(Fe,3),!1,!0):[]},rn.takeWhile=function(ve,Fe){return ve&&ve.length?Rp(ve,ps(Fe,3)):[]},rn.tap=function(ve,Fe){return Fe(ve),ve},rn.throttle=function(ve,Fe,lt){var Kt=!0,_n=!0;if("function"!=typeof ve)throw new Of(nn);return Wd(lt)&&(Kt="leading"in lt?!!lt.leading:Kt,_n="trailing"in lt?!!lt.trailing:_n),Ex(ve,Fe,{leading:Kt,maxWait:Fe,trailing:_n})},rn.thru=Eb,rn.toArray=N6,rn.toPairs=Fx,rn.toPairsIn=Lx,rn.toPath=function(ve){return Ku(ve)?Vl(ve,Ag):oh(ve)?[ve]:$d(z9(wl(ve)))},rn.toPlainObject=_3,rn.transform=function(ve,Fe,lt){var Kt=Ku(ve),_n=Kt||Ym(ve)||L2(ve);if(Fe=ps(Fe,4),null==lt){var jn=ve&&ve.constructor;lt=_n?Kt?new jn:[]:Wd(ve)&&Ey(jn)?Xr(dy(ve)):{}}return(_n?ef:Wr)(ve,function(xr,Rr,si){return Fe(lt,xr,Rr,si)}),lt},rn.unary=function(ve){return bx(ve,1)},rn.union=k4,rn.unionBy=C4,rn.unionWith=ox,rn.uniq=function(ve){return ve&&ve.length?H1(ve):[]},rn.uniqBy=function(ve,Fe){return ve&&ve.length?H1(ve,ps(Fe,2)):[]},rn.uniqWith=function(ve,Fe){return Fe="function"==typeof Fe?Fe:Me,ve&&ve.length?H1(ve,Me,Fe):[]},rn.unset=function(ve,Fe){return null==ve||P2(ve,Fe)},rn.unzip=g3,rn.unzipWith=ax,rn.update=function(ve,Fe,lt){return null==ve?ve:t3(ve,Fe,Eg(lt))},rn.updateWith=function(ve,Fe,lt,Kt){return Kt="function"==typeof Kt?Kt:Me,null==ve?ve:t3(ve,Fe,Eg(lt),Kt)},rn.values=B6,rn.valuesIn=function(ve){return null==ve?[]:sy(ve,d1(ve))},rn.without=Ya,rn.words=z4,rn.wrap=function(ve,Fe){return Ac(Eg(Fe),ve)},rn.xor=wS,rn.xorBy=ux,rn.xorWith=cx,rn.zip=lx,rn.zipObject=function(ve,Fe){return bb(ve||[],Fe||[],pb)},rn.zipObjectDeep=function(ve,Fe){return bb(ve||[],Fe||[],Hs)},rn.zipWith=l1,rn.entries=Fx,rn.entriesIn=Lx,rn.extend=w3,rn.extendWith=Y8,K4(rn,rn),rn.add=Fk,rn.attempt=qx,rn.camelCase=mk,rn.capitalize=Vx,rn.ceil=X4,rn.clamp=function(ve,Fe,lt){return lt===Me&&(lt=Fe,Fe=Me),lt!==Me&&(lt=(lt=xm(lt))==lt?lt:0),Fe!==Me&&(Fe=(Fe=xm(Fe))==Fe?Fe:0),xg(xm(ve),Fe,lt)},rn.clone=function(ve){return np(ve,4)},rn.cloneDeep=function(ve){return np(ve,5)},rn.cloneDeepWith=function(ve,Fe){return np(ve,5,Fe="function"==typeof Fe?Fe:Me)},rn.cloneWith=function(ve,Fe){return np(ve,4,Fe="function"==typeof Fe?Fe:Me)},rn.conformsTo=function(ve,Fe){return null==Fe||u4(ve,Fe,uh(Fe))},rn.deburr=Hx,rn.defaultTo=function(ve,Fe){return null==ve||ve!=ve?Fe:ve},rn.divide=Lk,rn.endsWith=function(ve,Fe,lt){ve=wl(ve),Fe=N0(Fe);var Kt=ve.length,_n=lt=lt===Me?Kt:xg(Xu(lt),0,Kt);return(lt-=Fe.length)>=0&&ve.slice(lt,_n)==Fe},rn.eq=_m,rn.escape=function(ve){return(ve=wl(ve))&&Vy.test(ve)?ve.replace(jy,sb):ve},rn.escapeRegExp=function(ve){return(ve=wl(ve))&&w8.test(ve)?ve.replace(n6,"\\$&"):ve},rn.every=function(ve,Fe,lt){var Kt=Ku(ve)?tb:c4;return lt&&Fp(ve,Fe,lt)&&(Fe=Me),Kt(ve,ps(Fe,3))},rn.find=EP,rn.findIndex=T4,rn.findKey=function(ve,Fe){return iy(ve,ps(Fe,3),Wr)},rn.findLast=kS,rn.findLastIndex=Z9,rn.findLastKey=function(ve,Fe){return iy(ve,ps(Fe,3),R0)},rn.floor=Q8,rn.forEach=Sg,rn.forEachRight=P4,rn.forIn=function(ve,Fe){return null==ve?ve:_6(ve,ps(Fe,3),d1)},rn.forInRight=function(ve,Fe){return null==ve?ve:Qr(ve,ps(Fe,3),d1)},rn.forOwn=function(ve,Fe){return ve&&Wr(ve,ps(Fe,3))},rn.forOwnRight=function(ve,Fe){return ve&&R0(ve,ps(Fe,3))},rn.get=ah,rn.gt=R4,rn.gte=Sx,rn.has=function(ve,Fe){return null!=ve&&y4(ve,Fe,Jv)},rn.hasIn=U4,rn.head=X9,rn.identity=F0,rn.includes=function(ve,Fe,lt,Kt){ve=Lp(ve)?ve:B6(ve),lt=lt&&!Kt?Xu(lt):0;var _n=ve.length;return lt<0&&(lt=Xl(_n+lt,0)),R6(ve)?lt<=_n&&ve.indexOf(Fe,lt)>-1:!!_n&&jd(ve,Fe,lt)>-1},rn.indexOf=function(ve,Fe,lt){var Kt=null==ve?0:ve.length;if(!Kt)return-1;var _n=null==lt?0:Xu(lt);return _n<0&&(_n=Xl(Kt+_n,0)),jd(ve,Fe,_n)},rn.inRange=function(ve,Fe,lt){return Fe=Jm(Fe),lt===Me?(lt=Fe,Fe=0):lt=Jm(lt),function(ve,Fe,lt){return ve>=Vd(Fe,lt)&&ve=-ko&&ve<=ko},rn.isSet=N4,rn.isString=R6,rn.isSymbol=oh,rn.isTypedArray=L2,rn.isUndefined=function(ve){return ve===Me},rn.isWeakMap=function(ve){return Ql(ve)&&B0(ve)==I1},rn.isWeakSet=function(ve){return Ql(ve)&&"[object WeakSet]"==y0(ve)},rn.join=function(ve,Fe){return null==ve?"":Ch.call(ve,Fe)},rn.kebabCase=bk,rn.last=$1,rn.lastIndexOf=function(ve,Fe,lt){var Kt=null==ve?0:ve.length;if(!Kt)return-1;var _n=Kt;return lt!==Me&&(_n=(_n=Xu(lt))<0?Xl(Kt+_n,0):Vd(_n,Kt-1)),Fe==Fe?function(ei,ss,Mi){for(var Uo=Mi+1;Uo--;)if(ei[Uo]===ss)return Uo;return Uo}(ve,Fe,_n):Hl(ve,cg,_n,!0)},rn.lowerCase=vk,rn.lowerFirst=BP,rn.lt=Ox,rn.lte=B4,rn.max=function(ve){return ve&&ve.length?Ae(ve,F0,dr):Me},rn.maxBy=function(ve,Fe){return ve&&ve.length?Ae(ve,ps(Fe,2),dr):Me},rn.mean=function(ve){return Hm(ve,F0)},rn.meanBy=function(ve,Fe){return Hm(ve,ps(Fe,2))},rn.min=function(ve){return ve&&ve.length?Ae(ve,F0,re):Me},rn.minBy=function(ve,Fe){return ve&&ve.length?Ae(ve,ps(Fe,2),re):Me},rn.stubArray=J4,rn.stubFalse=Sb,rn.stubObject=function(){return{}},rn.stubString=function(){return""},rn.stubTrue=function(){return!0},rn.multiply=mo,rn.nth=function(ve,Fe){return ve&&ve.length?Rt(ve,Xu(Fe)):Me},rn.noConflict=function(){return Dl._===this&&(Dl._=ya),this},rn.noop=sf,rn.now=Tb,rn.pad=function(ve,Fe,lt){ve=wl(ve);var Kt=(Fe=Xu(Fe))?B1(ve):0;if(!Fe||Kt>=Fe)return ve;var _n=(Fe-Kt)/2;return o3(mm(_n),lt)+ve+o3(D0(_n),lt)},rn.padEnd=function(ve,Fe,lt){ve=wl(ve);var Kt=(Fe=Xu(Fe))?B1(ve):0;return Fe&&KtFe){var Kt=ve;ve=Fe,Fe=Kt}if(lt||ve%1||Fe%1){var _n=Gm();return Vd(ve+_n*(Fe-ve+Rv("1e-"+((_n+"").length-1))),Fe)}return Hn(ve,Fe)},rn.reduce=function(ve,Fe,lt){var Kt=Ku(ve)?jm:f6,_n=arguments.length<3;return Kt(ve,ps(Fe,4),lt,_n,Mt)},rn.reduceRight=function(ve,Fe,lt){var Kt=Ku(ve)?_2:f6,_n=arguments.length<3;return Kt(ve,ps(Fe,4),lt,_n,gb)},rn.repeat=function(ve,Fe,lt){return Fe=(lt?Fp(ve,Fe,lt):Fe===Me)?1:Xu(Fe),Ar(wl(ve),Fe)},rn.replace=function(){var ve=arguments,Fe=wl(ve[0]);return ve.length<3?Fe:Fe.replace(ve[1],ve[2])},rn.result=function(ve,Fe,lt){var Kt=-1,_n=(Fe=Km(Fe,ve)).length;for(_n||(_n=1,ve=Me);++Kt<_n;){var jn=null==ve?Me:ve[Ag(Fe[Kt])];jn===Me&&(Kt=_n,jn=lt),ve=Ey(jn)?jn.call(ve):jn}return ve},rn.round=Hk,rn.runInContext=ei,rn.sample=function(ve){return(Ku(ve)?v6:ri)(ve)},rn.size=function(ve){if(null==ve)return 0;if(Lp(ve))return R6(ve)?B1(ve):ve.length;var Fe=B0(ve);return Fe==Yh||Fe==Jh?ve.size:se(ve).length},rn.snakeCase=Ek,rn.some=function(ve,Fe,lt){var Kt=Ku(ve)?dm:Xc;return lt&&Fp(ve,Fe,lt)&&(Fe=Me),Kt(ve,ps(Fe,3))},rn.sortedIndex=function(ve,Fe){return nf(ve,Fe)},rn.sortedIndexBy=function(ve,Fe,lt){return Kf(ve,Fe,ps(lt,2))},rn.sortedIndexOf=function(ve,Fe){var lt=null==ve?0:ve.length;if(lt){var Kt=nf(ve,Fe);if(Ktko)return[];var lt=Cl,Kt=Vd(ve,Cl);Fe=ps(Fe),ve-=Cl;for(var _n=fg(Kt,Fe);++lt=jn)return ve;var Rr=lt-B1(Kt);if(Rr<1)return Kt;var si=xr?R2(xr,0,Rr).join(""):ve.slice(0,Rr);if(_n===Me)return si+Kt;if(xr&&(Rr+=si.length-Rr),Z8(_n)){if(ve.slice(Rr).search(_n)){var xs,Es=si;for(_n.global||(_n=cy(_n.source,wl(ng.exec(_n))+"g")),_n.lastIndex=0;xs=_n.exec(Es);)var js=xs.index;si=si.slice(0,js===Me?Rr:js)}}else if(ve.indexOf(N0(_n),Rr)!=Rr){var gs=si.lastIndexOf(_n);gs>-1&&(si=si.slice(0,gs))}return si+Kt},rn.unescape=function(ve){return(ve=wl(ve))&&Av.test(ve)?ve.replace(Uy,h6):ve},rn.uniqueId=function(ve){var Fe=++m6;return wl(ve)+Fe},rn.upperCase=zx,rn.upperFirst=J8,rn.each=Sg,rn.eachRight=P4,rn.first=X9,K4(rn,function(){var ve={};return Wr(rn,function(Fe,lt){Fc.call(rn.prototype,lt)||(ve[lt]=Fe)}),ve}(),{chain:!1}),rn.VERSION="4.17.21",ef(["bind","bindKey","curry","curryRight","partial","partialRight"],function(ve){rn[ve].placeholder=rn}),ef(["drop","take"],function(ve,Fe){Ri.prototype[ve]=function(lt){lt=lt===Me?1:Xl(Xu(lt),0);var Kt=this.__filtered__&&!Fe?new Ri(this):this.clone();return Kt.__filtered__?Kt.__takeCount__=Vd(lt,Kt.__takeCount__):Kt.__views__.push({size:Vd(lt,Cl),type:ve+(Kt.__dir__<0?"Right":"")}),Kt},Ri.prototype[ve+"Right"]=function(lt){return this.reverse()[ve](lt).reverse()}}),ef(["filter","map","takeWhile"],function(ve,Fe){var lt=Fe+1,Kt=1==lt||3==lt;Ri.prototype[ve]=function(_n){var jn=this.clone();return jn.__iteratees__.push({iteratee:ps(_n,3),type:lt}),jn.__filtered__=jn.__filtered__||Kt,jn}}),ef(["head","last"],function(ve,Fe){var lt="take"+(Fe?"Right":"");Ri.prototype[ve]=function(){return this[lt](1).value()[0]}}),ef(["initial","tail"],function(ve,Fe){var lt="drop"+(Fe?"":"Right");Ri.prototype[ve]=function(){return this.__filtered__?new Ri(this):this[lt](1)}}),Ri.prototype.compact=function(){return this.filter(F0)},Ri.prototype.find=function(ve){return this.filter(ve).head()},Ri.prototype.findLast=function(ve){return this.reverse().find(ve)},Ri.prototype.invokeMap=Zr(function(ve,Fe){return"function"==typeof ve?new Ri(this):this.map(function(lt){return an(lt,ve,Fe)})}),Ri.prototype.reject=function(ve){return this.filter(z8(ps(ve)))},Ri.prototype.slice=function(ve,Fe){ve=Xu(ve);var lt=this;return lt.__filtered__&&(ve>0||Fe<0)?new Ri(lt):(ve<0?lt=lt.takeRight(-ve):ve&&(lt=lt.drop(ve)),Fe!==Me&&(lt=(Fe=Xu(Fe))<0?lt.dropRight(-Fe):lt.take(Fe-ve)),lt)},Ri.prototype.takeRightWhile=function(ve){return this.reverse().takeWhile(ve).reverse()},Ri.prototype.toArray=function(){return this.take(Cl)},Wr(Ri.prototype,function(ve,Fe){var lt=/^(?:filter|find|map|reject)|While$/.test(Fe),Kt=/^(?:head|last)$/.test(Fe),_n=rn[Kt?"take"+("last"==Fe?"Right":""):Fe],jn=Kt||/^find/.test(Fe);_n&&(rn.prototype[Fe]=function(){var xr=this.__wrapped__,Rr=Kt?[1]:arguments,si=xr instanceof Ri,xs=Rr[0],Es=si||Ku(xr),js=function(Sc){var Uc=_n.apply(rn,Sh([Sc],Rr));return Kt&&gs?Uc[0]:Uc};Es&<&&"function"==typeof xs&&1!=xs.length&&(si=Es=!1);var gs=this.__chain__,Ro=!!this.__actions__.length,wo=jn&&!gs,ho=si&&!Ro;if(!jn&&Es){xr=ho?xr:new Ri(this);var lu=ve.apply(xr,Rr);return lu.__actions__.push({func:Eb,args:[js],thisArg:Me}),new ns(lu,gs)}return wo&&ho?ve.apply(this,Rr):(lu=this.thru(js),wo?Kt?lu.value()[0]:lu.value():lu)})}),ef(["pop","push","shift","sort","splice","unshift"],function(ve){var Fe=M0[ve],lt=/^(?:push|sort|unshift)$/.test(ve)?"tap":"thru",Kt=/^(?:pop|shift)$/.test(ve);rn.prototype[ve]=function(){var _n=arguments;if(Kt&&!this.__chain__){var jn=this.value();return Fe.apply(Ku(jn)?jn:[],_n)}return this[lt](function(xr){return Fe.apply(Ku(xr)?xr:[],_n)})}}),Wr(Ri.prototype,function(ve,Fe){var lt=rn[Fe];if(lt){var Kt=lt.name+"";Fc.call(bm,Kt)||(bm[Kt]=[]),bm[Kt].push({name:Fe,func:lt})}}),bm[R8(Me,2).name]=[{name:"wrapper",func:Me}],Ri.prototype.clone=function(){var ve=new Ri(this.__wrapped__);return ve.__actions__=$d(this.__actions__),ve.__dir__=this.__dir__,ve.__filtered__=this.__filtered__,ve.__iteratees__=$d(this.__iteratees__),ve.__takeCount__=this.__takeCount__,ve.__views__=$d(this.__views__),ve},Ri.prototype.reverse=function(){if(this.__filtered__){var ve=new Ri(this);ve.__dir__=-1,ve.__filtered__=!0}else(ve=this.clone()).__dir__*=-1;return ve},Ri.prototype.value=function(){var ve=this.__wrapped__.value(),Fe=this.__dir__,lt=Ku(ve),Kt=Fe<0,_n=lt?ve.length:0,jn=function(ve,Fe,lt){for(var Kt=-1,_n=lt.length;++Kt<_n;){var jn=lt[Kt],xr=jn.size;switch(jn.type){case"drop":ve+=xr;break;case"dropRight":Fe-=xr;break;case"take":Fe=Vd(Fe,ve+xr);break;case"takeRight":ve=Xl(ve,Fe-xr)}}return{start:ve,end:Fe}}(0,_n,this.__views__),xr=jn.start,Rr=jn.end,si=Rr-xr,xs=Kt?Rr:xr-1,Es=this.__iteratees__,js=Es.length,gs=0,Ro=Vd(si,this.__takeCount__);if(!lt||!Kt&&_n==si&&Ro==si)return Np(ve,this.__actions__);var wo=[];e:for(;si--&&gs=this.__values__.length;return{done:ve,value:ve?Me:this.__values__[this.__index__++]}},rn.prototype.plant=function(ve){for(var Fe,lt=this;lt instanceof ms;){var Kt=KI(lt);Kt.__index__=0,Kt.__values__=Me,Fe?_n.__wrapped__=Kt:Fe=Kt;var _n=Kt;lt=lt.__wrapped__}return _n.__wrapped__=ve,Fe},rn.prototype.reverse=function(){var ve=this.__wrapped__;if(ve instanceof Ri){var Fe=ve;return this.__actions__.length&&(Fe=new Ri(this)),(Fe=Fe.reverse()).__actions__.push({func:Eb,args:[S4],thisArg:Me}),new ns(Fe,this.__chain__)}return this.thru(S4)},rn.prototype.toJSON=rn.prototype.valueOf=rn.prototype.value=function(){return Np(this.__wrapped__,this.__actions__)},rn.prototype.first=rn.prototype.head,I2&&(rn.prototype[I2]=function(){return this}),rn}();s1?((s1.exports=fm)._=fm,mu._=fm):Dl._=fm}.call(S0);var u2=Object.defineProperty,om=Object.defineProperties,Ll=Object.getOwnPropertyDescriptors,Ap=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Le=(Ot,De,Me)=>De in Ot?u2(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Qe=(Ot,De)=>{for(var Me in De||(De={}))Se.call(De,Me)&&Le(Ot,Me,De[Me]);if(Ap)for(var Me of Ap(De))Ue.call(De,Me)&&Le(Ot,Me,De[Me]);return Ot},ut=(Ot,De)=>om(Ot,Ll(De));function At(Ot,De,Me){var pt;const vt=function(Ot){const[De,Me]=Ot.split(":");return{namespace:De,reference:Me}}(Ot);return(null==(pt=De.rpcMap)?void 0:pt[vt.reference])||`https://rpc.walletconnect.com/v1/?chainId=${vt.namespace}:${vt.reference}&projectId=${Me}`}function Zt(Ot){return Ot.includes(":")?Ot.split(":")[1]:Ot}function Jt(Ot){return Ot.map(De=>`${De.split(":")[0]}:${De.split(":")[1]}`)}function Xn(Ot){var De,Me,pt,vt;const Dt={};if(!Os(Ot))return Dt;for(const[nn,Nn]of Object.entries(Ot)){const Mr=oc(nn)?[nn]:Nn.chains,Vr=Nn.methods||[],Si=Nn.events||[],ls=Nn.rpcMap||{},Oo=po(nn);Dt[Oo]=ut(Qe(Qe({},Dt[Oo]),Nn),{chains:Du(Mr,null==(De=Dt[Oo])?void 0:De.chains),methods:Du(Vr,null==(Me=Dt[Oo])?void 0:Me.methods),events:Du(Si,null==(pt=Dt[Oo])?void 0:pt.events),rpcMap:Qe(Qe({},ls),null==(vt=Dt[Oo])?void 0:vt.rpcMap)})}return Dt}function or(Ot){return Ot.includes(":")?Ot.split(":")[2]:Ot}function Er(Ot){const De={};for(const[Me,pt]of Object.entries(Ot)){const vt=pt.methods||[],Dt=pt.events||[],nn=pt.accounts||[],Nn=oc(Me)?[Me]:pt.chains?pt.chains:Jt(pt.accounts);De[Me]={chains:Nn,methods:vt,events:Dt,accounts:nn}}return De}function Hr(Ot){return"number"==typeof Ot?Ot:Ot.includes("0x")?parseInt(Ot,16):Ot.includes(":")?Number(Ot.split(":")[1]):Number(Ot)}const oi={},vi=Ot=>oi[Ot],Zi=(Ot,De)=>{oi[Ot]=De};class Fs{constructor(De){this.name="polkadot",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getAccounts(){const De=this.namespace.accounts;return De&&De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2])||[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class vo{constructor(De){this.name="eip155",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}request(De){var Me=this;return(0,ie.Z)(function*(){switch(De.request.method){case"eth_requestAccounts":case"eth_accounts":return Me.getAccounts();case"wallet_switchEthereumChain":return yield Me.handleSwitchChain(De);case"eth_chainId":return parseInt(Me.getDefaultChain())}return Me.namespace.methods.includes(De.request.method)?yield Me.client.request(De):Me.getHttpProvider().request(De.request)})()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(parseInt(De),Me),this.chainId=parseInt(De),this.events.emit("default_chain_changed",`${this.name}:${De}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}createHttpProvider(De,Me){const pt=Me||At(`${this.name}:${De}`,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.k(pt,vi("disableProviderPing")))}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=parseInt(Zt(Me));De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}getHttpProvider(){const De=this.chainId,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}handleSwitchChain(De){var Me=this;return(0,ie.Z)(function*(){var pt,vt;let Dt=De.request.params?null==(pt=De.request.params[0])?void 0:pt.chainId:"0x0";Dt=Dt.startsWith("0x")?Dt:`0x${Dt}`;const nn=parseInt(Dt,16);if(Me.isChainApproved(nn))Me.setDefaultChain(`${nn}`);else{if(!Me.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${nn}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);yield Me.client.request({topic:De.topic,request:{method:De.request.method,params:[{chainId:Dt}]},chainId:null==(vt=Me.namespace.chains)?void 0:vt[0]}),Me.setDefaultChain(`${nn}`)}return null})()}isChainApproved(De){return this.namespace.chains.includes(`${this.name}:${De}`)}}class Za{constructor(De){this.name="solana",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class Da{constructor(De){this.name="cosmos",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class eo{constructor(De){this.name="cip34",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{const pt=this.getCardanoRPCUrl(Me),vt=Zt(Me);De[vt]=this.createHttpProvider(vt,pt)}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}getCardanoRPCUrl(De){const Me=this.namespace.rpcMap;if(Me)return Me[De]}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||this.getCardanoRPCUrl(De);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class Wu{constructor(De){this.name="elrond",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class fl{constructor(De){this.name="multiversx",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}var Kc=Object.defineProperty,Xd=Object.defineProperties,Yl=Object.getOwnPropertyDescriptors,Jl=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,_u=Object.prototype.propertyIsEnumerable,al=(Ot,De,Me)=>De in Ot?Kc(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,k0=(Ot,De)=>{for(var Me in De||(De={}))Is.call(De,Me)&&al(Ot,Me,De[Me]);if(Jl)for(var Me of Jl(De))_u.call(De,Me)&&al(Ot,Me,De[Me]);return Ot},Ip=(Ot,De)=>Xd(Ot,Yl(De));class Dm{constructor(De){this.events=new(O()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=De,this.logger=typeof De?.logger<"u"&&"string"!=typeof De?.logger?De.logger:(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De?.logger||"error"})),this.disableProviderPing=De?.disableProviderPing||!1}static init(De){return(0,ie.Z)(function*(){const Me=new Dm(De);return yield Me.initialize(),Me})()}request(De,Me){var pt=this;return(0,ie.Z)(function*(){const[vt,Dt]=pt.validateChain(Me);if(!pt.session)throw new Error("Please call connect() before request()");return yield pt.getProvider(vt).request({request:k0({},De),chainId:`${vt}:${Dt}`,topic:pt.session.topic})})()}sendAsync(De,Me,pt){this.request(De,pt).then(vt=>Me(null,vt)).catch(vt=>Me(vt,void 0))}enable(){var De=this;return(0,ie.Z)(function*(){if(!De.client)throw new Error("Sign Client not initialized");return De.session||(yield De.connect({namespaces:De.namespaces,optionalNamespaces:De.optionalNamespaces,sessionProperties:De.sessionProperties})),yield De.requestAccounts()})()}disconnect(){var De=this;return(0,ie.Z)(function*(){var Me;if(!De.session)throw new Error("Please call connect() before enable()");yield De.client.disconnect({topic:null==(Me=De.session)?void 0:Me.topic,reason:Ir("USER_DISCONNECTED")}),yield De.cleanup()})()}connect(De){var Me=this;return(0,ie.Z)(function*(){if(!Me.client)throw new Error("Sign Client not initialized");if(Me.setNamespaces(De),yield Me.cleanupPendingPairings(),!De.skipPairing)return yield Me.pair(De.pairingTopic)})()}on(De,Me){this.events.on(De,Me)}once(De,Me){this.events.once(De,Me)}removeListener(De,Me){this.events.removeListener(De,Me)}off(De,Me){this.events.off(De,Me)}get isWalletConnect(){return!0}pair(De){var Me=this;return(0,ie.Z)(function*(){Me.shouldAbortPairingAttempt=!1;let pt=0;do{if(Me.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(pt>=Me.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:vt,approval:Dt}=yield Me.client.connect({pairingTopic:De,requiredNamespaces:Me.namespaces,optionalNamespaces:Me.optionalNamespaces,sessionProperties:Me.sessionProperties});vt&&(Me.uri=vt,Me.events.emit("display_uri",vt)),yield Dt().then(nn=>{Me.session=nn,Me.namespaces||(Me.namespaces=Er(nn.namespaces),Me.persist("namespaces",Me.namespaces))}).catch(nn=>{if(nn.message!==Ke)throw nn;pt++})}while(!Me.session);return Me.onConnect(),Me.session})()}setDefaultChain(De,Me){try{if(!this.session)return;const[pt,vt]=this.validateChain(De);this.getProvider(pt).setDefaultChain(vt,Me)}catch(pt){if(!/Please call connect/.test(pt.message))throw pt}}cleanupPendingPairings(De={}){var Me=this;return(0,ie.Z)(function*(){Me.logger.info("Cleaning up inactive pairings...");const pt=Me.client.pairing.getAll();if(Ei(pt)){for(const vt of pt)De.deletePairings?Me.client.core.expirer.set(vt.topic,0):yield Me.client.core.relayer.subscriber.unsubscribe(vt.topic);Me.logger.info(`Inactive pairings cleared: ${pt.length}`)}})()}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}checkStorage(){var De=this;return(0,ie.Z)(function*(){De.namespaces=yield De.getFromStore("namespaces"),De.optionalNamespaces=(yield De.getFromStore("optionalNamespaces"))||{},De.client.session.length&&(De.session=De.client.session.get(De.client.session.keys[De.client.session.keys.length-1]),De.createProviders())})()}initialize(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized"),yield De.createClient(),yield De.checkStorage(),De.registerEventListeners()})()}createClient(){var De=this;return(0,ie.Z)(function*(){De.client=De.providerOpts.client||(yield Xs.init({logger:De.providerOpts.logger||"error",relayUrl:De.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:De.providerOpts.projectId,metadata:De.providerOpts.metadata,storageOptions:De.providerOpts.storageOptions,storage:De.providerOpts.storage,name:De.providerOpts.name})),De.logger.trace("SignClient Initialized")})()}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const De=[...new Set(Object.keys(this.session.namespaces).map(Me=>po(Me)))];Zi("client",this.client),Zi("events",this.events),Zi("disableProviderPing",this.disableProviderPing),De.forEach(Me=>{if(!this.session)return;const pt=function(Ot,De){const Me=Object.keys(De.namespaces).filter(vt=>vt.includes(Ot));if(!Me.length)return[];const pt=[];return Me.forEach(vt=>{pt.push(...De.namespaces[vt].accounts)}),pt}(Me,this.session),vt=Jt(pt),Dt=function(Ot={},De={}){const Me=Xn(Ot),pt=Xn(De);return Z0.exports.merge(Me,pt)}(this.namespaces,this.optionalNamespaces),nn=Ip(k0({},Dt[Me]),{accounts:pt,chains:vt});switch(Me){case"eip155":this.rpcProviders[Me]=new vo({namespace:nn});break;case"solana":this.rpcProviders[Me]=new Za({namespace:nn});break;case"cosmos":this.rpcProviders[Me]=new Da({namespace:nn});break;case"polkadot":this.rpcProviders[Me]=new Fs({namespace:nn});break;case"cip34":this.rpcProviders[Me]=new eo({namespace:nn});break;case"elrond":this.rpcProviders[Me]=new Wu({namespace:nn});break;case"multiversx":this.rpcProviders[Me]=new fl({namespace:nn})}})}registerEventListeners(){var De=this;if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",Me=>{this.events.emit("session_ping",Me)}),this.client.on("session_event",Me=>{const{params:pt}=Me,{event:vt}=pt;if("accountsChanged"===vt.name){const Dt=vt.data;Dt&&Ei(Dt)&&this.events.emit("accountsChanged",Dt.map(or))}else if("chainChanged"===vt.name){const Dt=pt.chainId,nn=pt.event.data,Nn=po(Dt),Mr=Hr(Dt)!==Hr(nn)?`${Nn}:${Hr(nn)}`:Dt;this.onChainChanged(Mr)}else this.events.emit(vt.name,vt.data);this.events.emit("session_event",Me)}),this.client.on("session_update",({topic:Me,params:pt})=>{var vt;const{namespaces:Dt}=pt,nn=null==(vt=this.client)?void 0:vt.session.get(Me);this.session=Ip(k0({},nn),{namespaces:Dt}),this.onSessionUpdate(),this.events.emit("session_update",{topic:Me,params:pt})}),this.client.on("session_delete",function(){var Me=(0,ie.Z)(function*(pt){yield De.cleanup(),De.events.emit("session_delete",pt),De.events.emit("disconnect",Ip(k0({},Ir("USER_DISCONNECTED")),{data:pt.topic}))});return function(pt){return Me.apply(this,arguments)}}()),this.on("default_chain_changed",Me=>{this.onChainChanged(Me,!0)})}getProvider(De){if(!this.rpcProviders[De])throw new Error(`Provider not found: ${De}`);return this.rpcProviders[De]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(De=>{var Me;this.getProvider(De).updateNamespace(null==(Me=this.session)?void 0:Me.namespaces[De])})}setNamespaces(De){const{namespaces:Me,optionalNamespaces:pt,sessionProperties:vt}=De;Me&&Object.keys(Me).length&&(this.namespaces=Me),pt&&Object.keys(pt).length&&(this.optionalNamespaces=pt),this.sessionProperties=vt,this.persist("namespaces",Me),this.persist("optionalNamespaces",pt)}validateChain(De){const[Me,pt]=De?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[Me,pt];if(Me&&!Object.keys(this.namespaces||{}).map(nn=>po(nn)).includes(Me))throw new Error(`Namespace '${Me}' is not configured. Please call connect() first with namespace config.`);if(Me&&pt)return[Me,pt];const vt=po(Object.keys(this.namespaces)[0]);return[vt,this.rpcProviders[vt].getDefaultChain()]}requestAccounts(){var De=this;return(0,ie.Z)(function*(){const[Me]=De.validateChain();return yield De.getProvider(Me).requestAccounts()})()}onChainChanged(De,Me=!1){var pt;if(!this.namespaces)return;const[vt,Dt]=this.validateChain(De);Me||this.getProvider(vt).setDefaultChain(Dt),(null!=(pt=this.namespaces[vt])?pt:this.namespaces[`${vt}:${Dt}`]).defaultChain=Dt,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",Dt)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}cleanup(){var De=this;return(0,ie.Z)(function*(){De.session=void 0,De.namespaces=void 0,De.optionalNamespaces=void 0,De.sessionProperties=void 0,De.persist("namespaces",void 0),De.persist("optionalNamespaces",void 0),De.persist("sessionProperties",void 0),yield De.cleanupPendingPairings({deletePairings:!0})})()}persist(De,Me){this.client.core.storage.setItem(`${vd}/${De}`,Me)}getFromStore(De){var Me=this;return(0,ie.Z)(function*(){return yield Me.client.core.storage.getItem(`${vd}/${De}`)})()}}const p0=Dm,qf=["eth_sendTransaction","personal_sign"],ys=["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"],bs=["chainChanged","accountsChanged"],C0=["chainChanged","accountsChanged","message","disconnect","connect"];var Hi=Object.defineProperty,n1=Object.defineProperties,_a=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,cc=Object.prototype.hasOwnProperty,Qd=Object.prototype.propertyIsEnumerable,Ui=(Ot,De,Me)=>De in Ot?Hi(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,vr=(Ot,De)=>{for(var Me in De||(De={}))cc.call(De,Me)&&Ui(Ot,Me,De[Me]);if(ro)for(var Me of ro(De))Qd.call(De,Me)&&Ui(Ot,Me,De[Me]);return Ot},So=(Ot,De)=>n1(Ot,_a(De));function Pi(Ot){return Number(Ot[0].split(":")[1])}function Fa(Ot){return`0x${Ot.toString(16)}`}class Ps{constructor(){this.events=new z.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(De,Me)=>(this.events.on(De,Me),this),this.once=(De,Me)=>(this.events.once(De,Me),this),this.removeListener=(De,Me)=>(this.events.removeListener(De,Me),this),this.off=(De,Me)=>(this.events.off(De,Me),this),this.parseAccount=De=>this.isCompatibleChainId(De)?this.parseAccountId(De).address:De,this.signer={},this.rpc={}}static init(De){return(0,ie.Z)(function*(){const Me=new Ps;return yield Me.initialize(De),Me})()}request(De){var Me=this;return(0,ie.Z)(function*(){return yield Me.signer.request(De,Me.formatChainId(Me.chainId))})()}sendAsync(De,Me){this.signer.sendAsync(De,Me,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){var De=this;return(0,ie.Z)(function*(){return De.session||(yield De.connect()),yield De.request({method:"eth_requestAccounts"})})()}connect(De){var Me=this;return(0,ie.Z)(function*(){if(!Me.signer.client)throw new Error("Provider not initialized. Call init() first");Me.loadConnectOpts(De);const{required:pt,optional:vt}=function(Ot){const{chains:De,optionalChains:Me,methods:pt,optionalMethods:vt,events:Dt,optionalEvents:nn,rpcMap:Nn}=Ot;if(!Ei(De))throw new Error("Invalid chains");const Mr={chains:De,methods:pt||qf,events:Dt||bs,rpcMap:vr({},De.length?{[Pi(De)]:Nn[Pi(De)]}:{})},Vr=Dt?.filter(Yo=>!bs.includes(Yo)),Si=pt?.filter(Yo=>!qf.includes(Yo));if(!(Me||nn||vt||null!=Vr&&Vr.length||null!=Si&&Si.length))return{required:De.length?Mr:void 0};const Oo={chains:[...new Set(Vr?.length&&Si?.length||!Me?Mr.chains.concat(Me||[]):Me)],methods:[...new Set(Mr.methods.concat(null!=vt&&vt.length?vt:ys))],events:[...new Set(Mr.events.concat(null!=nn&&nn.length?nn:C0))],rpcMap:Nn};return{required:De.length?Mr:void 0,optional:Me.length?Oo:void 0}}(Me.rpc);try{const Dt=yield new Promise(function(){var Nn=(0,ie.Z)(function*(Mr,Vr){var Si;Me.rpc.showQrModal&&(null==(Si=Me.modal)||Si.subscribeModal(ls=>{!ls.open&&!Me.signer.session&&(Me.signer.abortPairingAttempt(),Vr(new Error("Connection request reset. Please try again.")))})),yield Me.signer.connect(So(vr({namespaces:vr({},pt&&{[Me.namespace]:pt})},vt&&{optionalNamespaces:{[Me.namespace]:vt}}),{pairingTopic:De?.pairingTopic})).then(ls=>{Mr(ls)}).catch(ls=>{Vr(new Error(ls.message))})});return function(Mr,Vr){return Nn.apply(this,arguments)}}());if(!Dt)return;const nn=function(Ot,De=[]){const Me=[];return Object.keys(Ot).forEach(pt=>{De.length&&!De.includes(pt)||Me.push(...Ot[pt].accounts)}),Me}(Dt.namespaces,[Me.namespace]);Me.setChainIds(Me.rpc.chains.length?Me.rpc.chains:nn),Me.setAccounts(nn),Me.events.emit("connect",{chainId:Fa(Me.chainId)})}catch(Dt){throw Me.signer.logger.error(Dt),Dt}finally{Me.modal&&Me.modal.closeModal()}})()}disconnect(){var De=this;return(0,ie.Z)(function*(){De.session&&(yield De.signer.disconnect()),De.reset()})()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",De=>{const{params:Me}=De,{event:pt}=Me;"accountsChanged"===pt.name?(this.accounts=this.parseAccounts(pt.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===pt.name?this.setChainId(this.formatChainId(pt.data)):this.events.emit(pt.name,pt.data),this.events.emit("session_event",De)}),this.signer.on("chainChanged",De=>{const Me=parseInt(De);this.chainId=Me,this.events.emit("chainChanged",Fa(this.chainId)),this.persist()}),this.signer.on("session_update",De=>{this.events.emit("session_update",De)}),this.signer.on("session_delete",De=>{this.reset(),this.events.emit("session_delete",De),this.events.emit("disconnect",So(vr({},Ir("USER_DISCONNECTED")),{data:De.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",De=>{var Me,pt;this.rpc.showQrModal&&(null==(Me=this.modal)||Me.closeModal(),null==(pt=this.modal)||pt.openModal({uri:De})),this.events.emit("display_uri",De)})}switchEthereumChain(De){this.request({method:"wallet_switchEthereumChain",params:[{chainId:De.toString(16)}]})}isCompatibleChainId(De){return"string"==typeof De&&De.startsWith(`${this.namespace}:`)}formatChainId(De){return`${this.namespace}:${De}`}parseChainId(De){return Number(De.split(":")[1])}setChainIds(De){const Me=De.filter(pt=>this.isCompatibleChainId(pt)).map(pt=>this.parseChainId(pt));Me.length&&(this.chainId=Me[0],this.events.emit("chainChanged",Fa(this.chainId)),this.persist())}setChainId(De){if(this.isCompatibleChainId(De)){const Me=this.parseChainId(De);this.chainId=Me,this.switchEthereumChain(Me)}}parseAccountId(De){const[Me,pt,vt]=De.split(":");return{chainId:`${Me}:${pt}`,address:vt}}setAccounts(De){this.accounts=De.filter(Me=>this.parseChainId(this.parseAccountId(Me).chainId)===this.chainId).map(Me=>this.parseAccountId(Me).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(De){var Me,pt;const vt=null!=(Me=De?.chains)?Me:[],Dt=null!=(pt=De?.optionalChains)?pt:[],nn=vt.concat(Dt);if(!nn.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const Nn=vt.length?De?.methods||qf:[],Mr=vt.length?De?.events||bs:[],Vr=De?.optionalMethods||[],Si=De?.optionalEvents||[],ls=De?.rpcMap||this.buildRpcMap(nn,De.projectId),Oo=De?.qrModalOptions||void 0;return{chains:vt?.map(Yo=>this.formatChainId(Yo)),optionalChains:Dt.map(Yo=>this.formatChainId(Yo)),methods:Nn,events:Mr,optionalMethods:Vr,optionalEvents:Si,rpcMap:ls,showQrModal:!(null==De||!De.showQrModal),qrModalOptions:Oo,projectId:De.projectId,metadata:De.metadata}}buildRpcMap(De,Me){const pt={};return De.forEach(vt=>{pt[vt]=this.getRpcUrl(vt,Me)}),pt}initialize(De){var Me=this;return(0,ie.Z)(function*(){if(Me.rpc=Me.getRpcConfig(De),Me.chainId=Pi(Me.rpc.chains.length?Me.rpc.chains:Me.rpc.optionalChains),Me.signer=yield p0.init({projectId:Me.rpc.projectId,metadata:Me.rpc.metadata,disableProviderPing:De.disableProviderPing,relayUrl:De.relayUrl,storageOptions:De.storageOptions}),Me.registerEventListeners(),yield Me.loadPersistedSession(),Me.rpc.showQrModal){let pt;try{const{WalletConnectModal:vt}=yield Y.e(2687).then(Y.bind(Y,52687));pt=vt}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(pt)try{Me.modal=new pt(vr({walletConnectVersion:2,projectId:Me.rpc.projectId,standaloneChains:Me.rpc.chains},Me.rpc.qrModalOptions))}catch(vt){throw Me.signer.logger.error(vt),new Error("Could not generate WalletConnectModal Instance")}}})()}loadConnectOpts(De){if(!De)return;const{chains:Me,optionalChains:pt,rpcMap:vt}=De;Me&&Ei(Me)&&(this.rpc.chains=Me.map(Dt=>this.formatChainId(Dt)),Me.forEach(Dt=>{this.rpc.rpcMap[Dt]=vt?.[Dt]||this.getRpcUrl(Dt)})),pt&&Ei(pt)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=pt?.map(Dt=>this.formatChainId(Dt)),pt.forEach(Dt=>{this.rpc.rpcMap[Dt]=vt?.[Dt]||this.getRpcUrl(Dt)}))}getRpcUrl(De,Me){var pt;return(null==(pt=this.rpc.rpcMap)?void 0:pt[De])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${De}&projectId=${Me||this.rpc.projectId}`}loadPersistedSession(){var De=this;return(0,ie.Z)(function*(){if(!De.session)return;const Me=yield De.signer.client.core.storage.getItem(`${De.STORAGE_KEY}/chainId`),pt=De.session.namespaces[`${De.namespace}:${Me}`]?De.session.namespaces[`${De.namespace}:${Me}`]:De.session.namespaces[De.namespace];De.setChainIds(Me?[De.formatChainId(Me)]:pt?.accounts),De.setAccounts(pt?.accounts)})()}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(De){return"string"==typeof De||De instanceof String?[this.parseAccount(De)]:De.map(Me=>this.parseAccount(Me))}}const Ec=Ps},53685:(bt,be)=>{"use strict";function Y(h){let u;return"undefined"!=typeof window&&void 0!==window[h]&&(u=window[h]),u}function ie(h){const u=Y(h);if(!u)throw new Error(`${h} is not defined in Window`);return u}Object.defineProperty(be,"__esModule",{value:!0}),be.getLocalStorage=be.getLocalStorageOrThrow=be.getCrypto=be.getCryptoOrThrow=be.getLocation=be.getLocationOrThrow=be.getNavigator=be.getNavigatorOrThrow=be.getDocument=be.getDocumentOrThrow=be.getFromWindowOrThrow=be.getFromWindow=void 0,be.getFromWindow=Y,be.getFromWindowOrThrow=ie,be.getDocumentOrThrow=function(){return ie("document")},be.getDocument=function(){return Y("document")},be.getNavigatorOrThrow=function(){return ie("navigator")},be.getNavigator=function(){return Y("navigator")},be.getLocationOrThrow=function(){return ie("location")},be.getLocation=function(){return Y("location")},be.getCryptoOrThrow=function(){return ie("crypto")},be.getCrypto=function(){return Y("crypto")},be.getLocalStorageOrThrow=function(){return ie("localStorage")},be.getLocalStorage=function(){return Y("localStorage")}},58165:(bt,be,Y)=>{"use strict";be.D=void 0;const z=Y(53685);be.D=function(){let E,d;try{E=z.getDocumentOrThrow(),d=z.getLocationOrThrow()}catch{return null}function f(..._){const w=E.getElementsByTagName("meta");for(let S=0;SI.getAttribute(L)).filter(L=>!!L&&_.includes(L));if(P.length&&P){const L=I.getAttribute("content");if(L)return L}}return""}const b=function(){let _=f("name","og:site_name","og:title","twitter:title");return _||(_=E.title),_}();return{description:f("description","og:description","twitter:description","keywords"),url:d.origin,icons:function(){const _=E.getElementsByTagName("link"),w=[];for(let S=0;S<_.length;S++){const I=_[S],P=I.getAttribute("rel");if(P&&P.toLowerCase().indexOf("icon")>-1){const L=I.getAttribute("href");if(L)if(-1===L.toLowerCase().indexOf("https:")&&-1===L.toLowerCase().indexOf("http:")&&0!==L.indexOf("//")){let V=d.protocol+"//"+d.host;if(0===L.indexOf("/"))V+=L;else{const W=d.pathname.split("/");W.pop(),V+=W.join("/")+"/"+L}w.push(V)}else 0===L.indexOf("//")?w.push(d.protocol+L):w.push(L)}}return w}(),name:b}}},15463:(bt,be,Y)=>{"use strict";const ie=Y(82915),z=Y(65361),O=Y(95967),E=Y(10979),x=Symbol("encodeFragmentIdentifier");function g(I){if("string"!=typeof I||1!==I.length)throw new TypeError("arrayFormatSeparator must be single character string")}function b(I,P){return P.encode?P.strict?ie(I):encodeURIComponent(I):I}function l(I,P){return P.decode?z(I):I}function h(I){return Array.isArray(I)?I.sort():"object"==typeof I?h(Object.keys(I)).sort((P,L)=>Number(P)-Number(L)).map(P=>I[P]):I}function u(I){const P=I.indexOf("#");return-1!==P&&(I=I.slice(0,P)),I}function _(I){const P=(I=u(I)).indexOf("?");return-1===P?"":I.slice(P+1)}function w(I,P){return P.parseNumbers&&!Number.isNaN(Number(I))&&"string"==typeof I&&""!==I.trim()?I=Number(I):P.parseBooleans&&null!==I&&("true"===I.toLowerCase()||"false"===I.toLowerCase())&&(I="true"===I.toLowerCase()),I}function S(I,P){g((P=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},P)).arrayFormatSeparator);const L=function(I){let P;switch(I.arrayFormat){case"index":return(L,V,W)=>{P=/\[(\d*)\]$/.exec(L),L=L.replace(/\[\d*\]$/,""),P?(void 0===W[L]&&(W[L]={}),W[L][P[1]]=V):W[L]=V};case"bracket":return(L,V,W)=>{P=/(\[\])$/.exec(L),W[L=L.replace(/\[\]$/,"")]=P?void 0!==W[L]?[].concat(W[L],V):[V]:V};case"colon-list-separator":return(L,V,W)=>{P=/(:list)$/.exec(L),W[L=L.replace(/:list$/,"")]=P?void 0!==W[L]?[].concat(W[L],V):[V]:V};case"comma":case"separator":return(L,V,W)=>{const G="string"==typeof V&&V.includes(I.arrayFormatSeparator),H="string"==typeof V&&!G&&l(V,I).includes(I.arrayFormatSeparator);V=H?l(V,I):V;const j=G||H?V.split(I.arrayFormatSeparator).map(K=>l(K,I)):null===V?V:l(V,I);W[L]=j};case"bracket-separator":return(L,V,W)=>{const G=/(\[\])$/.test(L);if(L=L.replace(/\[\]$/,""),!G)return void(W[L]=V&&l(V,I));const H=null===V?[]:V.split(I.arrayFormatSeparator).map(j=>l(j,I));W[L]=void 0!==W[L]?[].concat(W[L],H):H};default:return(L,V,W)=>{W[L]=void 0!==W[L]?[].concat(W[L],V):V}}}(P),V=Object.create(null);if("string"!=typeof I||!(I=I.trim().replace(/^[?#&]/,"")))return V;for(const W of I.split("&")){if(""===W)continue;let[G,H]=O(P.decode?W.replace(/\+/g," "):W,"=");H=void 0===H?null:["comma","separator","bracket-separator"].includes(P.arrayFormat)?H:l(H,P),L(l(G,P),H,V)}for(const W of Object.keys(V)){const G=V[W];if("object"==typeof G&&null!==G)for(const H of Object.keys(G))G[H]=w(G[H],P);else V[W]=w(G,P)}return!1===P.sort?V:(!0===P.sort?Object.keys(V).sort():Object.keys(V).sort(P.sort)).reduce((W,G)=>{const H=V[G];return W[G]=Boolean(H)&&"object"==typeof H&&!Array.isArray(H)?h(H):H,W},Object.create(null))}be.extract=_,be.parse=S,be.stringify=(I,P)=>{if(!I)return"";g((P=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},P)).arrayFormatSeparator);const L=H=>P.skipNull&&(I=>null==I)(I[H])||P.skipEmptyString&&""===I[H],V=function(I){switch(I.arrayFormat){case"index":return P=>(L,V)=>{const W=L.length;return void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,[b(P,I),"[",W,"]"].join("")]:[...L,[b(P,I),"[",b(W,I),"]=",b(V,I)].join("")]};case"bracket":return P=>(L,V)=>void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,[b(P,I),"[]"].join("")]:[...L,[b(P,I),"[]=",b(V,I)].join("")];case"colon-list-separator":return P=>(L,V)=>void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,[b(P,I),":list="].join("")]:[...L,[b(P,I),":list=",b(V,I)].join("")];case"comma":case"separator":case"bracket-separator":{const P="bracket-separator"===I.arrayFormat?"[]=":"=";return L=>(V,W)=>void 0===W||I.skipNull&&null===W||I.skipEmptyString&&""===W?V:(W=null===W?"":W,0===V.length?[[b(L,I),P,b(W,I)].join("")]:[[V,b(W,I)].join(I.arrayFormatSeparator)])}default:return P=>(L,V)=>void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,b(P,I)]:[...L,[b(P,I),"=",b(V,I)].join("")]}}(P),W={};for(const H of Object.keys(I))L(H)||(W[H]=I[H]);const G=Object.keys(W);return!1!==P.sort&&G.sort(P.sort),G.map(H=>{const j=I[H];return void 0===j?"":null===j?b(H,P):Array.isArray(j)?0===j.length&&"bracket-separator"===P.arrayFormat?b(H,P)+"[]":j.reduce(V(H),[]).join("&"):b(H,P)+"="+b(j,P)}).filter(H=>H.length>0).join("&")},be.parseUrl=(I,P)=>{P=Object.assign({decode:!0},P);const[L,V]=O(I,"#");return Object.assign({url:L.split("?")[0]||"",query:S(_(I),P)},P&&P.parseFragmentIdentifier&&V?{fragmentIdentifier:l(V,P)}:{})},be.stringifyUrl=(I,P)=>{P=Object.assign({encode:!0,strict:!0,[x]:!0},P);const L=u(I.url).split("?")[0]||"",V=be.extract(I.url),W=be.parse(V,{sort:!1}),G=Object.assign(W,I.query);let H=be.stringify(G,P);H&&(H=`?${H}`);let j=function(I){let P="";const L=I.indexOf("#");return-1!==L&&(P=I.slice(L)),P}(I.url);return I.fragmentIdentifier&&(j=`#${P[x]?b(I.fragmentIdentifier,P):I.fragmentIdentifier}`),`${L}${H}${j}`},be.pick=(I,P,L)=>{L=Object.assign({parseFragmentIdentifier:!0,[x]:!1},L);const{url:V,query:W,fragmentIdentifier:G}=be.parseUrl(I,L);return be.stringifyUrl({url:V,query:E(W,P),fragmentIdentifier:G},L)},be.exclude=(I,P,L)=>{const V=Array.isArray(P)?W=>!P.includes(W):(W,G)=>!P(W,G);return be.pick(I,V,L)}},52280:function(bt){"use strict";!function(be){function Y(N){return parseInt(N)===N}function ie(N){if(!Y(N.length))return!1;for(var C=0;C255)return!1;return!0}function z(N,C){if(N.buffer&&ArrayBuffer.isView(N)&&"Uint8Array"===N.name)return C&&(N=N.slice?N.slice():Array.prototype.slice.call(N)),N;if(Array.isArray(N)){if(!ie(N))throw new Error("Array contains invalid value: "+N);return new Uint8Array(N)}if(Y(N.length)&&ie(N))return new Uint8Array(N);throw new Error("unsupported array-like object")}function O(N){return new Uint8Array(N)}function E(N,C,a,B,Q){(null!=B||null!=Q)&&(N=N.slice?N.slice(B,Q):Array.prototype.slice.call(N,B,Q)),C.set(N,a)}var C,d={toBytes:function(a){var B=[],Q=0;for(a=encodeURI(a);Q191&&ee<224?(B.push(String.fromCharCode((31&ee)<<6|63&a[Q+1])),Q+=2):(B.push(String.fromCharCode((15&ee)<<12|(63&a[Q+1])<<6|63&a[Q+2])),Q+=3)}return B.join("")}},x=(C="0123456789abcdef",{toBytes:function(B){for(var Q=[],ee=0;ee>4]+C[15&ce])}return Q.join("")}}),f={16:10,24:12,32:14},T=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],g=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],b=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],l=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],h=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],u=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],_=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],S=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],I=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],P=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],L=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],V=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],W=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function G(N){for(var C=[],a=0;a>2][C%4]=Q[C],this._Kd[N-ee][C%4]=Q[C];for(var we,ce=0,ue=B;ue>16&255]<<24^g[we>>8&255]<<16^g[255&we]<<8^g[we>>24&255]^T[ce]<<24,ce+=1,8!=B)for(C=1;C>8&255]<<8^g[we>>16&255]<<16^g[we>>24&255]<<24,C=B/2+1;C>2][Te=ue%4]=Q[C],this._Kd[N-ae][Te]=Q[C++],ue++}for(var ae=1;ae>24&255]^L[we>>16&255]^V[we>>8&255]^W[255&we]},H.prototype.encrypt=function(N){if(16!=N.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var C=this._Ke.length-1,a=[0,0,0,0],B=G(N),Q=0;Q<4;Q++)B[Q]^=this._Ke[0][Q];for(var ee=1;ee>24&255]^h[B[(Q+1)%4]>>16&255]^u[B[(Q+2)%4]>>8&255]^m[255&B[(Q+3)%4]]^this._Ke[ee][Q];B=a.slice()}var ue,ce=O(16);for(Q=0;Q<4;Q++)ce[4*Q]=255&(g[B[Q]>>24&255]^(ue=this._Ke[C][Q])>>24),ce[4*Q+1]=255&(g[B[(Q+1)%4]>>16&255]^ue>>16),ce[4*Q+2]=255&(g[B[(Q+2)%4]>>8&255]^ue>>8),ce[4*Q+3]=255&(g[255&B[(Q+3)%4]]^ue);return ce},H.prototype.decrypt=function(N){if(16!=N.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var C=this._Kd.length-1,a=[0,0,0,0],B=G(N),Q=0;Q<4;Q++)B[Q]^=this._Kd[0][Q];for(var ee=1;ee>24&255]^w[B[(Q+3)%4]>>16&255]^S[B[(Q+2)%4]>>8&255]^I[255&B[(Q+1)%4]]^this._Kd[ee][Q];B=a.slice()}var ue,ce=O(16);for(Q=0;Q<4;Q++)ce[4*Q]=255&(b[B[Q]>>24&255]^(ue=this._Kd[C][Q])>>24),ce[4*Q+1]=255&(b[B[(Q+3)%4]>>16&255]^ue>>16),ce[4*Q+2]=255&(b[B[(Q+2)%4]>>8&255]^ue>>8),ce[4*Q+3]=255&(b[255&B[(Q+1)%4]]^ue);return ce};var j=function(N){if(!(this instanceof j))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new H(N)};j.prototype.encrypt=function(N){if((N=z(N)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var C=O(N.length),a=O(16),B=0;B=0;--C)this._counter[C]=N%256,N>>=8},y.prototype.setBytes=function(N){if(16!=(N=z(N,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=N},y.prototype.increment=function(){for(var N=15;N>=0;N--){if(255!==this._counter[N]){this._counter[N]++;break}this._counter[N]=0}};var M=function(N,C){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",C instanceof y||(C=new y(C)),this._counter=C,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new H(N)};M.prototype.encrypt=function(N){for(var C=z(N,!0),a=0;a16)throw new Error("PKCS#7 padding byte out of range");for(var a=N.length-C,B=0;B{"use strict";const ie=be;ie.bignum=Y(32260),ie.define=Y(37738).define,ie.base=Y(38384),ie.constants=Y(82779),ie.decoders=Y(41274),ie.encoders=Y(7549)},37738:(bt,be,Y)=>{"use strict";const ie=Y(7549),z=Y(41274),O=Y(59879);function d(x,f){this.name=x,this.body=f,this.decoders={},this.encoders={}}be.define=function(f,T){return new d(f,T)},d.prototype._createNamed=function(f){const T=this.name;function g(b){this._initNamed(b,T)}return O(g,f),g.prototype._initNamed=function(l,h){f.call(this,l,h)},new g(this)},d.prototype._getDecoder=function(f){return this.decoders.hasOwnProperty(f=f||"der")||(this.decoders[f]=this._createNamed(z[f])),this.decoders[f]},d.prototype.decode=function(f,T,g){return this._getDecoder(T).decode(f,g)},d.prototype._getEncoder=function(f){return this.encoders.hasOwnProperty(f=f||"der")||(this.encoders[f]=this._createNamed(ie[f])),this.encoders[f]},d.prototype.encode=function(f,T,g){return this._getEncoder(T).encode(f,g)}},12227:(bt,be,Y)=>{"use strict";const ie=Y(59879),z=Y(24475).b,O=Y(88114).Buffer;function E(x,f){z.call(this,f),O.isBuffer(x)?(this.base=x,this.offset=0,this.length=x.length):this.error("Input not Buffer")}function d(x,f){if(Array.isArray(x))this.length=0,this.value=x.map(function(T){return d.isEncoderBuffer(T)||(T=new d(T,f)),this.length+=T.length,T},this);else if("number"==typeof x){if(!(0<=x&&x<=255))return f.error("non-byte EncoderBuffer value");this.value=x,this.length=1}else if("string"==typeof x)this.value=x,this.length=O.byteLength(x);else{if(!O.isBuffer(x))return f.error("Unsupported type: "+typeof x);this.value=x,this.length=x.length}}ie(E,z),be.C=E,E.isDecoderBuffer=function(f){return f instanceof E||"object"==typeof f&&O.isBuffer(f.base)&&"DecoderBuffer"===f.constructor.name&&"number"==typeof f.offset&&"number"==typeof f.length&&"function"==typeof f.save&&"function"==typeof f.restore&&"function"==typeof f.isEmpty&&"function"==typeof f.readUInt8&&"function"==typeof f.skip&&"function"==typeof f.raw},E.prototype.save=function(){return{offset:this.offset,reporter:z.prototype.save.call(this)}},E.prototype.restore=function(f){const T=new E(this.base);return T.offset=f.offset,T.length=this.offset,this.offset=f.offset,z.prototype.restore.call(this,f.reporter),T},E.prototype.isEmpty=function(){return this.offset===this.length},E.prototype.readUInt8=function(f){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(f||"DecoderBuffer overrun")},E.prototype.skip=function(f,T){if(!(this.offset+f<=this.length))return this.error(T||"DecoderBuffer overrun");const g=new E(this.base);return g._reporterState=this._reporterState,g.offset=this.offset,g.length=this.offset+f,this.offset+=f,g},E.prototype.raw=function(f){return this.base.slice(f?f.offset:this.offset,this.length)},be.R=d,d.isEncoderBuffer=function(f){return f instanceof d||"object"==typeof f&&"EncoderBuffer"===f.constructor.name&&"number"==typeof f.length&&"function"==typeof f.join},d.prototype.join=function(f,T){return f||(f=O.alloc(this.length)),T||(T=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(g){g.join(f,T),T+=g.length}):("number"==typeof this.value?f[T]=this.value:"string"==typeof this.value?f.write(this.value,T):O.isBuffer(this.value)&&this.value.copy(f,T),T+=this.length)),f}},38384:(bt,be,Y)=>{"use strict";const ie=be;ie.Reporter=Y(24475).b,ie.DecoderBuffer=Y(12227).C,ie.EncoderBuffer=Y(12227).R,ie.Node=Y(14652)},14652:(bt,be,Y)=>{"use strict";const ie=Y(24475).b,z=Y(12227).R,O=Y(12227).C,E=Y(86055),d=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],x=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(d);function T(b,l,h){const u={};this._baseState=u,u.name=h,u.enc=b,u.parent=l||null,u.children=null,u.tag=null,u.args=null,u.reverseArgs=null,u.choice=null,u.optional=!1,u.any=!1,u.obj=!1,u.use=null,u.useDecoder=null,u.key=null,u.default=null,u.explicit=null,u.implicit=null,u.contains=null,u.parent||(u.children=[],this._wrap())}bt.exports=T;const g=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];T.prototype.clone=function(){const l=this._baseState,h={};g.forEach(function(m){h[m]=l[m]});const u=new this.constructor(h.parent);return u._baseState=h,u},T.prototype._wrap=function(){const l=this._baseState;x.forEach(function(h){this[h]=function(){const m=new this.constructor(this);return l.children.push(m),m[h].apply(m,arguments)}},this)},T.prototype._init=function(l){const h=this._baseState;E(null===h.parent),l.call(this),h.children=h.children.filter(function(u){return u._baseState.parent===this},this),E.equal(h.children.length,1,"Root node can have only one child")},T.prototype._useArgs=function(l){const h=this._baseState,u=l.filter(function(m){return m instanceof this.constructor},this);l=l.filter(function(m){return!(m instanceof this.constructor)},this),0!==u.length&&(E(null===h.children),h.children=u,u.forEach(function(m){m._baseState.parent=this},this)),0!==l.length&&(E(null===h.args),h.args=l,h.reverseArgs=l.map(function(m){if("object"!=typeof m||m.constructor!==Object)return m;const _={};return Object.keys(m).forEach(function(w){w==(0|w)&&(w|=0),_[m[w]]=w}),_}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(b){T.prototype[b]=function(){throw new Error(b+" not implemented for encoding: "+this._baseState.enc)}}),d.forEach(function(b){T.prototype[b]=function(){const h=this._baseState,u=Array.prototype.slice.call(arguments);return E(null===h.tag),h.tag=b,this._useArgs(u),this}}),T.prototype.use=function(l){E(l);const h=this._baseState;return E(null===h.use),h.use=l,this},T.prototype.optional=function(){return this._baseState.optional=!0,this},T.prototype.def=function(l){const h=this._baseState;return E(null===h.default),h.default=l,h.optional=!0,this},T.prototype.explicit=function(l){const h=this._baseState;return E(null===h.explicit&&null===h.implicit),h.explicit=l,this},T.prototype.implicit=function(l){const h=this._baseState;return E(null===h.explicit&&null===h.implicit),h.implicit=l,this},T.prototype.obj=function(){const l=this._baseState,h=Array.prototype.slice.call(arguments);return l.obj=!0,0!==h.length&&this._useArgs(h),this},T.prototype.key=function(l){const h=this._baseState;return E(null===h.key),h.key=l,this},T.prototype.any=function(){return this._baseState.any=!0,this},T.prototype.choice=function(l){const h=this._baseState;return E(null===h.choice),h.choice=l,this._useArgs(Object.keys(l).map(function(u){return l[u]})),this},T.prototype.contains=function(l){const h=this._baseState;return E(null===h.use),h.contains=l,this},T.prototype._decode=function(l,h){const u=this._baseState;if(null===u.parent)return l.wrapResult(u.children[0]._decode(l,h));let S,m=u.default,_=!0,w=null;if(null!==u.key&&(w=l.enterKey(u.key)),u.optional){let I=null;if(null!==u.explicit?I=u.explicit:null!==u.implicit?I=u.implicit:null!==u.tag&&(I=u.tag),null!==I||u.any){if(_=this._peekTag(l,I,u.any),l.isError(_))return _}else{const P=l.save();try{null===u.choice?this._decodeGeneric(u.tag,l,h):this._decodeChoice(l,h),_=!0}catch{_=!1}l.restore(P)}}if(u.obj&&_&&(S=l.enterObject()),_){if(null!==u.explicit){const P=this._decodeTag(l,u.explicit);if(l.isError(P))return P;l=P}const I=l.offset;if(null===u.use&&null===u.choice){let P;u.any&&(P=l.save());const L=this._decodeTag(l,null!==u.implicit?u.implicit:u.tag,u.any);if(l.isError(L))return L;u.any?m=l.raw(P):l=L}if(h&&h.track&&null!==u.tag&&h.track(l.path(),I,l.length,"tagged"),h&&h.track&&null!==u.tag&&h.track(l.path(),l.offset,l.length,"content"),u.any||(m=null===u.choice?this._decodeGeneric(u.tag,l,h):this._decodeChoice(l,h)),l.isError(m))return m;if(!u.any&&null===u.choice&&null!==u.children&&u.children.forEach(function(L){L._decode(l,h)}),u.contains&&("octstr"===u.tag||"bitstr"===u.tag)){const P=new O(m);m=this._getUse(u.contains,l._reporterState.obj)._decode(P,h)}}return u.obj&&_&&(m=l.leaveObject(S)),null===u.key||null===m&&!0!==_?null!==w&&l.exitKey(w):l.leaveKey(w,u.key,m),m},T.prototype._decodeGeneric=function(l,h,u){const m=this._baseState;return"seq"===l||"set"===l?null:"seqof"===l||"setof"===l?this._decodeList(h,l,m.args[0],u):/str$/.test(l)?this._decodeStr(h,l,u):"objid"===l&&m.args?this._decodeObjid(h,m.args[0],m.args[1],u):"objid"===l?this._decodeObjid(h,null,null,u):"gentime"===l||"utctime"===l?this._decodeTime(h,l,u):"null_"===l?this._decodeNull(h,u):"bool"===l?this._decodeBool(h,u):"objDesc"===l?this._decodeStr(h,l,u):"int"===l||"enum"===l?this._decodeInt(h,m.args&&m.args[0],u):null!==m.use?this._getUse(m.use,h._reporterState.obj)._decode(h,u):h.error("unknown tag: "+l)},T.prototype._getUse=function(l,h){const u=this._baseState;return u.useDecoder=this._use(l,h),E(null===u.useDecoder._baseState.parent),u.useDecoder=u.useDecoder._baseState.children[0],u.implicit!==u.useDecoder._baseState.implicit&&(u.useDecoder=u.useDecoder.clone(),u.useDecoder._baseState.implicit=u.implicit),u.useDecoder},T.prototype._decodeChoice=function(l,h){const u=this._baseState;let m=null,_=!1;return Object.keys(u.choice).some(function(w){const S=l.save(),I=u.choice[w];try{const P=I._decode(l,h);if(l.isError(P))return!1;m={type:w,value:P},_=!0}catch{return l.restore(S),!1}return!0},this),_?m:l.error("Choice not matched")},T.prototype._createEncoderBuffer=function(l){return new z(l,this.reporter)},T.prototype._encode=function(l,h,u){const m=this._baseState;if(null!==m.default&&m.default===l)return;const _=this._encodeValue(l,h,u);return void 0===_||this._skipDefault(_,h,u)?void 0:_},T.prototype._encodeValue=function(l,h,u){const m=this._baseState;if(null===m.parent)return m.children[0]._encode(l,h||new ie);let _=null;if(this.reporter=h,m.optional&&void 0===l){if(null===m.default)return;l=m.default}let w=null,S=!1;if(m.any)_=this._createEncoderBuffer(l);else if(m.choice)_=this._encodeChoice(l,h);else if(m.contains)w=this._getUse(m.contains,u)._encode(l,h),S=!0;else if(m.children)w=m.children.map(function(I){if("null_"===I._baseState.tag)return I._encode(null,h,l);if(null===I._baseState.key)return h.error("Child should have a key");const P=h.enterKey(I._baseState.key);if("object"!=typeof l)return h.error("Child expected, but input is not object");const L=I._encode(l[I._baseState.key],h,l);return h.leaveKey(P),L},this).filter(function(I){return I}),w=this._createEncoderBuffer(w);else if("seqof"===m.tag||"setof"===m.tag){if(!m.args||1!==m.args.length)return h.error("Too many args for : "+m.tag);if(!Array.isArray(l))return h.error("seqof/setof, but data is not Array");const I=this.clone();I._baseState.implicit=null,w=this._createEncoderBuffer(l.map(function(P){return this._getUse(this._baseState.args[0],l)._encode(P,h)},I))}else null!==m.use?_=this._getUse(m.use,u)._encode(l,h):(w=this._encodePrimitive(m.tag,l),S=!0);if(!m.any&&null===m.choice){const I=null!==m.implicit?m.implicit:m.tag,P=null===m.implicit?"universal":"context";null===I?null===m.use&&h.error("Tag could be omitted only for .use()"):null===m.use&&(_=this._encodeComposite(I,S,P,w))}return null!==m.explicit&&(_=this._encodeComposite(m.explicit,!1,"context",_)),_},T.prototype._encodeChoice=function(l,h){const u=this._baseState,m=u.choice[l.type];return m||E(!1,l.type+" not found in "+JSON.stringify(Object.keys(u.choice))),m._encode(l.value,h)},T.prototype._encodePrimitive=function(l,h){const u=this._baseState;if(/str$/.test(l))return this._encodeStr(h,l);if("objid"===l&&u.args)return this._encodeObjid(h,u.reverseArgs[0],u.args[1]);if("objid"===l)return this._encodeObjid(h,null,null);if("gentime"===l||"utctime"===l)return this._encodeTime(h,l);if("null_"===l)return this._encodeNull();if("int"===l||"enum"===l)return this._encodeInt(h,u.args&&u.reverseArgs[0]);if("bool"===l)return this._encodeBool(h);if("objDesc"===l)return this._encodeStr(h,l);throw new Error("Unsupported tag: "+l)},T.prototype._isNumstr=function(l){return/^[0-9 ]*$/.test(l)},T.prototype._isPrintstr=function(l){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(l)}},24475:(bt,be,Y)=>{"use strict";const ie=Y(59879);function z(E){this._reporterState={obj:null,path:[],options:E||{},errors:[]}}function O(E,d){this.path=E,this.rethrow(d)}be.b=z,z.prototype.isError=function(d){return d instanceof O},z.prototype.save=function(){const d=this._reporterState;return{obj:d.obj,pathLen:d.path.length}},z.prototype.restore=function(d){const x=this._reporterState;x.obj=d.obj,x.path=x.path.slice(0,d.pathLen)},z.prototype.enterKey=function(d){return this._reporterState.path.push(d)},z.prototype.exitKey=function(d){const x=this._reporterState;x.path=x.path.slice(0,d-1)},z.prototype.leaveKey=function(d,x,f){const T=this._reporterState;this.exitKey(d),null!==T.obj&&(T.obj[x]=f)},z.prototype.path=function(){return this._reporterState.path.join("/")},z.prototype.enterObject=function(){const d=this._reporterState,x=d.obj;return d.obj={},x},z.prototype.leaveObject=function(d){const x=this._reporterState,f=x.obj;return x.obj=d,f},z.prototype.error=function(d){let x;const f=this._reporterState,T=d instanceof O;if(x=T?d:new O(f.path.map(function(g){return"["+JSON.stringify(g)+"]"}).join(""),d.message||d,d.stack),!f.options.partial)throw x;return T||f.errors.push(x),x},z.prototype.wrapResult=function(d){const x=this._reporterState;return x.options.partial?{result:this.isError(d)?null:d,errors:x.errors}:d},ie(O,Error),O.prototype.rethrow=function(d){if(this.message=d+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,O),!this.stack)try{throw new Error(this.message)}catch(x){this.stack=x.stack}return this}},32953:(bt,be)=>{"use strict";function Y(ie){const z={};return Object.keys(ie).forEach(function(O){(0|O)==O&&(O|=0),z[ie[O]]=O}),z}be.tagClass={0:"universal",1:"application",2:"context",3:"private"},be.tagClassByName=Y(be.tagClass),be.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},be.tagByName=Y(be.tag)},82779:(bt,be,Y)=>{"use strict";const ie=be;ie._reverse=function(O){const E={};return Object.keys(O).forEach(function(d){(0|d)==d&&(d|=0),E[O[d]]=d}),E},ie.der=Y(32953)},14163:(bt,be,Y)=>{"use strict";const ie=Y(59879),z=Y(32260),O=Y(12227).C,E=Y(14652),d=Y(32953);function x(b){this.enc="der",this.name=b.name,this.entity=b,this.tree=new f,this.tree._init(b.body)}function f(b){E.call(this,"der",b)}function T(b,l){let h=b.readUInt8(l);if(b.isError(h))return h;const u=d.tagClass[h>>6],m=0==(32&h);if(31==(31&h)){let w=h;for(h=0;128==(128&w);){if(w=b.readUInt8(l),b.isError(w))return w;h<<=7,h|=127&w}}else h&=31;return{cls:u,primitive:m,tag:h,tagStr:d.tag[h]}}function g(b,l,h){let u=b.readUInt8(h);if(b.isError(u))return u;if(!l&&128===u)return null;if(0==(128&u))return u;const m=127&u;if(m>4)return b.error("length octect is too long");u=0;for(let _=0;_{"use strict";const ie=be;ie.der=Y(14163),ie.pem=Y(60773)},60773:(bt,be,Y)=>{"use strict";const ie=Y(59879),z=Y(88114).Buffer,O=Y(14163);function E(d){O.call(this,d),this.enc="pem"}ie(E,O),bt.exports=E,E.prototype.decode=function(x,f){const T=x.toString().split(/[\r\n]+/g),g=f.label.toUpperCase(),b=/^-----(BEGIN|END) ([^-]+)-----$/;let l=-1,h=-1;for(let _=0;_{"use strict";const ie=Y(59879),z=Y(88114).Buffer,O=Y(14652),E=Y(32953);function d(g){this.enc="der",this.name=g.name,this.entity=g,this.tree=new x,this.tree._init(g.body)}function x(g){O.call(this,"der",g)}function f(g){return g<10?"0"+g:g}bt.exports=d,d.prototype.encode=function(b,l){return this.tree._encode(b,l).join()},ie(x,O),x.prototype._encodeComposite=function(b,l,h,u){const m=function(g,b,l,h){let u;if("seqof"===g?g="seq":"setof"===g&&(g="set"),E.tagByName.hasOwnProperty(g))u=E.tagByName[g];else{if("number"!=typeof g||(0|g)!==g)return h.error("Unknown tag: "+g);u=g}return u>=31?h.error("Multi-octet tag encoding unsupported"):(b||(u|=32),u|=E.tagClassByName[l||"universal"]<<6,u)}(b,l,h,this.reporter);if(u.length<128){const S=z.alloc(2);return S[0]=m,S[1]=u.length,this._createEncoderBuffer([S,u])}let _=1;for(let S=u.length;S>=256;S>>=8)_++;const w=z.alloc(2+_);w[0]=m,w[1]=128|_;for(let S=1+_,I=u.length;I>0;S--,I>>=8)w[S]=255&I;return this._createEncoderBuffer([w,u])},x.prototype._encodeStr=function(b,l){if("bitstr"===l)return this._createEncoderBuffer([0|b.unused,b.data]);if("bmpstr"===l){const h=z.alloc(2*b.length);for(let u=0;u=40)return this.reporter.error("Second objid identifier OOB");b.splice(0,2,40*b[0]+b[1])}let u=0;for(let w=0;w=128;S>>=7)u++}const m=z.alloc(u);let _=m.length-1;for(let w=b.length-1;w>=0;w--){let S=b[w];for(m[_--]=127&S;(S>>=7)>0;)m[_--]=128|127&S}return this._createEncoderBuffer(m)},x.prototype._encodeTime=function(b,l){let h;const u=new Date(b);return"gentime"===l?h=[f(u.getUTCFullYear()),f(u.getUTCMonth()+1),f(u.getUTCDate()),f(u.getUTCHours()),f(u.getUTCMinutes()),f(u.getUTCSeconds()),"Z"].join(""):"utctime"===l?h=[f(u.getUTCFullYear()%100),f(u.getUTCMonth()+1),f(u.getUTCDate()),f(u.getUTCHours()),f(u.getUTCMinutes()),f(u.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+l+" time is not supported yet"),this._encodeStr(h,"octstr")},x.prototype._encodeNull=function(){return this._createEncoderBuffer("")},x.prototype._encodeInt=function(b,l){if("string"==typeof b){if(!l)return this.reporter.error("String int or enum given, but no values map");if(!l.hasOwnProperty(b))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(b));b=l[b]}if("number"!=typeof b&&!z.isBuffer(b)){const m=b.toArray();!b.sign&&128&m[0]&&m.unshift(0),b=z.from(m)}if(z.isBuffer(b)){let m=b.length;0===b.length&&m++;const _=z.alloc(m);return b.copy(_),0===b.length&&(_[0]=0),this._createEncoderBuffer(_)}if(b<128)return this._createEncoderBuffer(b);if(b<256)return this._createEncoderBuffer([0,b]);let h=1;for(let m=b;m>=256;m>>=8)h++;const u=new Array(h);for(let m=u.length-1;m>=0;m--)u[m]=255&b,b>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(z.from(u))},x.prototype._encodeBool=function(b){return this._createEncoderBuffer(b?255:0)},x.prototype._use=function(b,l){return"function"==typeof b&&(b=b(l)),b._getEncoder("der").tree},x.prototype._skipDefault=function(b,l,h){const u=this._baseState;let m;if(null===u.default)return!1;const _=b.join();if(void 0===u.defaultBuffer&&(u.defaultBuffer=this._encodeValue(u.default,l,h).join()),_.length!==u.defaultBuffer.length)return!1;for(m=0;m<_.length;m++)if(_[m]!==u.defaultBuffer[m])return!1;return!0}},7549:(bt,be,Y)=>{"use strict";const ie=be;ie.der=Y(75079),ie.pem=Y(76163)},76163:(bt,be,Y)=>{"use strict";const ie=Y(59879),z=Y(75079);function O(E){z.call(this,E),this.enc="pem"}ie(O,z),bt.exports=O,O.prototype.encode=function(d,x){const T=z.prototype.encode.call(this,d).toString("base64"),g=["-----BEGIN "+x.label+"-----"];for(let b=0;b=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Yr=0|k[3],Ln=8191&Yr,Bn=Yr>>>13,$r=0|k[4],Gn=8191&$r,bn=$r>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,Gn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,Gn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,Gn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,Gn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,Gn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,Gn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,Gn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,Gn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,Gn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,Gn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,Gn),a=(a=Math.imul(St,bn))+Math.imul(Wt,Gn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},28686:(bt,be,Y)=>{bt.exports=Y(15454)},44054:(bt,be,Y)=>{"use strict";var ie=Y(59471),z=Y(5650),O=Y(10300),E=Y(97790),d=Y(34634),x=Y(71929),f=Y(32984),T=Y(15886),g=Y(62567),b=Y(88728);bt.exports=function(h){return new Promise(function(m,_){var P,w=h.data,S=h.headers,I=h.responseType;function L(){h.cancelToken&&h.cancelToken.unsubscribe(P),h.signal&&h.signal.removeEventListener("abort",P)}ie.isFormData(w)&&delete S["Content-Type"];var V=new XMLHttpRequest;if(h.auth){var W=h.auth.username||"",G=h.auth.password?unescape(encodeURIComponent(h.auth.password)):"";S.Authorization="Basic "+btoa(W+":"+G)}var H=d(h.baseURL,h.url);function j(){if(V){var R="getAllResponseHeaders"in V?x(V.getAllResponseHeaders()):null;z(function(v){m(v),L()},function(v){_(v),L()},{data:I&&"text"!==I&&"json"!==I?V.response:V.responseText,status:V.status,statusText:V.statusText,headers:R,config:h,request:V}),V=null}}if(V.open(h.method.toUpperCase(),E(H,h.params,h.paramsSerializer),!0),V.timeout=h.timeout,"onloadend"in V?V.onloadend=j:V.onreadystatechange=function(){!V||4!==V.readyState||0===V.status&&(!V.responseURL||0!==V.responseURL.indexOf("file:"))||setTimeout(j)},V.onabort=function(){!V||(_(T("Request aborted",h,"ECONNABORTED",V)),V=null)},V.onerror=function(){_(T("Network Error",h,null,V)),V=null},V.ontimeout=function(){var o=h.timeout?"timeout of "+h.timeout+"ms exceeded":"timeout exceeded";h.timeoutErrorMessage&&(o=h.timeoutErrorMessage),_(T(o,h,(h.transitional||g.transitional).clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",V)),V=null},ie.isStandardBrowserEnv()){var K=(h.withCredentials||f(H))&&h.xsrfCookieName?O.read(h.xsrfCookieName):void 0;K&&(S[h.xsrfHeaderName]=K)}"setRequestHeader"in V&&ie.forEach(S,function(o,y){void 0===w&&"content-type"===y.toLowerCase()?delete S[y]:V.setRequestHeader(y,o)}),ie.isUndefined(h.withCredentials)||(V.withCredentials=!!h.withCredentials),I&&"json"!==I&&(V.responseType=h.responseType),"function"==typeof h.onDownloadProgress&&V.addEventListener("progress",h.onDownloadProgress),"function"==typeof h.onUploadProgress&&V.upload&&V.upload.addEventListener("progress",h.onUploadProgress),(h.cancelToken||h.signal)&&(P=function(R){!V||(_(!R||R&&R.type?new b("canceled"):R),V.abort(),V=null)},h.cancelToken&&h.cancelToken.subscribe(P),h.signal&&(h.signal.aborted?P():h.signal.addEventListener("abort",P))),w||(w=null),V.send(w)})}},15454:(bt,be,Y)=>{"use strict";var ie=Y(59471),z=Y(81533),O=Y(53227),E=Y(4018),f=function x(T){var g=new O(T),b=z(O.prototype.request,g);return ie.extend(b,O.prototype,g),ie.extend(b,g),b.create=function(h){return x(E(T,h))},b}(Y(62567));f.Axios=O,f.Cancel=Y(88728),f.CancelToken=Y(40701),f.isCancel=Y(32130),f.VERSION=Y(15370).version,f.all=function(g){return Promise.all(g)},f.spread=Y(28908),f.isAxiosError=Y(99541),bt.exports=f,bt.exports.default=f},88728:bt=>{"use strict";function be(Y){this.message=Y}be.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},be.prototype.__CANCEL__=!0,bt.exports=be},40701:(bt,be,Y)=>{"use strict";var ie=Y(88728);function z(O){if("function"!=typeof O)throw new TypeError("executor must be a function.");var E;this.promise=new Promise(function(f){E=f});var d=this;this.promise.then(function(x){if(d._listeners){var f,T=d._listeners.length;for(f=0;f{"use strict";bt.exports=function(Y){return!(!Y||!Y.__CANCEL__)}},53227:(bt,be,Y)=>{"use strict";var ie=Y(59471),z=Y(97790),O=Y(93976),E=Y(36764),d=Y(4018),x=Y(43558),f=x.validators;function T(g){this.defaults=g,this.interceptors={request:new O,response:new O}}T.prototype.request=function(b){"string"==typeof b?(b=arguments[1]||{}).url=arguments[0]:b=b||{},(b=d(this.defaults,b)).method=b.method?b.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var l=b.transitional;void 0!==l&&x.assertOptions(l,{silentJSONParsing:f.transitional(f.boolean),forcedJSONParsing:f.transitional(f.boolean),clarifyTimeoutError:f.transitional(f.boolean)},!1);var h=[],u=!0;this.interceptors.request.forEach(function(V){"function"==typeof V.runWhen&&!1===V.runWhen(b)||(u=u&&V.synchronous,h.unshift(V.fulfilled,V.rejected))});var _,m=[];if(this.interceptors.response.forEach(function(V){m.push(V.fulfilled,V.rejected)}),!u){var w=[E,void 0];for(Array.prototype.unshift.apply(w,h),w=w.concat(m),_=Promise.resolve(b);w.length;)_=_.then(w.shift(),w.shift());return _}for(var S=b;h.length;){var I=h.shift(),P=h.shift();try{S=I(S)}catch(L){P(L);break}}try{_=E(S)}catch(L){return Promise.reject(L)}for(;m.length;)_=_.then(m.shift(),m.shift());return _},T.prototype.getUri=function(b){return b=d(this.defaults,b),z(b.url,b.params,b.paramsSerializer).replace(/^\?/,"")},ie.forEach(["delete","get","head","options"],function(b){T.prototype[b]=function(l,h){return this.request(d(h||{},{method:b,url:l,data:(h||{}).data}))}}),ie.forEach(["post","put","patch"],function(b){T.prototype[b]=function(l,h,u){return this.request(d(u||{},{method:b,url:l,data:h}))}}),bt.exports=T},93976:(bt,be,Y)=>{"use strict";var ie=Y(59471);function z(){this.handlers=[]}z.prototype.use=function(E,d,x){return this.handlers.push({fulfilled:E,rejected:d,synchronous:!!x&&x.synchronous,runWhen:x?x.runWhen:null}),this.handlers.length-1},z.prototype.eject=function(E){this.handlers[E]&&(this.handlers[E]=null)},z.prototype.forEach=function(E){ie.forEach(this.handlers,function(x){null!==x&&E(x)})},bt.exports=z},34634:(bt,be,Y)=>{"use strict";var ie=Y(95164),z=Y(31540);bt.exports=function(E,d){return E&&!ie(d)?z(E,d):d}},15886:(bt,be,Y)=>{"use strict";var ie=Y(29570);bt.exports=function(O,E,d,x,f){var T=new Error(O);return ie(T,E,d,x,f)}},36764:(bt,be,Y)=>{"use strict";var ie=Y(59471),z=Y(64284),O=Y(32130),E=Y(62567),d=Y(88728);function x(f){if(f.cancelToken&&f.cancelToken.throwIfRequested(),f.signal&&f.signal.aborted)throw new d("canceled")}bt.exports=function(T){return x(T),T.headers=T.headers||{},T.data=z.call(T,T.data,T.headers,T.transformRequest),T.headers=ie.merge(T.headers.common||{},T.headers[T.method]||{},T.headers),ie.forEach(["delete","get","head","post","put","patch","common"],function(l){delete T.headers[l]}),(T.adapter||E.adapter)(T).then(function(l){return x(T),l.data=z.call(T,l.data,l.headers,T.transformResponse),l},function(l){return O(l)||(x(T),l&&l.response&&(l.response.data=z.call(T,l.response.data,l.response.headers,T.transformResponse))),Promise.reject(l)})}},29570:bt=>{"use strict";bt.exports=function(Y,ie,z,O,E){return Y.config=ie,z&&(Y.code=z),Y.request=O,Y.response=E,Y.isAxiosError=!0,Y.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},Y}},4018:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=function(O,E){E=E||{};var d={};function x(h,u){return ie.isPlainObject(h)&&ie.isPlainObject(u)?ie.merge(h,u):ie.isPlainObject(u)?ie.merge({},u):ie.isArray(u)?u.slice():u}function f(h){return ie.isUndefined(E[h])?ie.isUndefined(O[h])?void 0:x(void 0,O[h]):x(O[h],E[h])}function T(h){if(!ie.isUndefined(E[h]))return x(void 0,E[h])}function g(h){return ie.isUndefined(E[h])?ie.isUndefined(O[h])?void 0:x(void 0,O[h]):x(void 0,E[h])}function b(h){return h in E?x(O[h],E[h]):h in O?x(void 0,O[h]):void 0}var l={url:T,method:T,data:T,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:b};return ie.forEach(Object.keys(O).concat(Object.keys(E)),function(u){var m=l[u]||f,_=m(u);ie.isUndefined(_)&&m!==b||(d[u]=_)}),d}},5650:(bt,be,Y)=>{"use strict";var ie=Y(15886);bt.exports=function(O,E,d){var x=d.config.validateStatus;d.status&&x&&!x(d.status)?E(ie("Request failed with status code "+d.status,d.config,null,d.request,d)):O(d)}},64284:(bt,be,Y)=>{"use strict";var ie=Y(59471),z=Y(62567);bt.exports=function(E,d,x){var f=this||z;return ie.forEach(x,function(g){E=g.call(f,E,d)}),E}},62567:(bt,be,Y)=>{"use strict";var ie=Y(59471),z=Y(12196),O=Y(29570),E={"Content-Type":"application/x-www-form-urlencoded"};function d(g,b){!ie.isUndefined(g)&&ie.isUndefined(g["Content-Type"])&&(g["Content-Type"]=b)}var g,T={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(g=Y(44054)),g),transformRequest:[function(b,l){return z(l,"Accept"),z(l,"Content-Type"),ie.isFormData(b)||ie.isArrayBuffer(b)||ie.isBuffer(b)||ie.isStream(b)||ie.isFile(b)||ie.isBlob(b)?b:ie.isArrayBufferView(b)?b.buffer:ie.isURLSearchParams(b)?(d(l,"application/x-www-form-urlencoded;charset=utf-8"),b.toString()):ie.isObject(b)||l&&"application/json"===l["Content-Type"]?(d(l,"application/json"),function(g,b,l){if(ie.isString(g))try{return(0,JSON.parse)(g),ie.trim(g)}catch(h){if("SyntaxError"!==h.name)throw h}return(0,JSON.stringify)(g)}(b)):b}],transformResponse:[function(b){var l=this.transitional||T.transitional,m=!(l&&l.silentJSONParsing)&&"json"===this.responseType;if(m||l&&l.forcedJSONParsing&&ie.isString(b)&&b.length)try{return JSON.parse(b)}catch(_){if(m)throw"SyntaxError"===_.name?O(_,this,"E_JSON_PARSE"):_}return b}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(b){return b>=200&&b<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ie.forEach(["delete","get","head"],function(b){T.headers[b]={}}),ie.forEach(["post","put","patch"],function(b){T.headers[b]=ie.merge(E)}),bt.exports=T},15370:bt=>{bt.exports={version:"0.24.0"}},81533:bt=>{"use strict";bt.exports=function(Y,ie){return function(){for(var O=new Array(arguments.length),E=0;E{"use strict";var ie=Y(59471);function z(O){return encodeURIComponent(O).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}bt.exports=function(E,d,x){if(!d)return E;var f;if(x)f=x(d);else if(ie.isURLSearchParams(d))f=d.toString();else{var T=[];ie.forEach(d,function(l,h){null==l||(ie.isArray(l)?h+="[]":l=[l],ie.forEach(l,function(m){ie.isDate(m)?m=m.toISOString():ie.isObject(m)&&(m=JSON.stringify(m)),T.push(z(h)+"="+z(m))}))}),f=T.join("&")}if(f){var g=E.indexOf("#");-1!==g&&(E=E.slice(0,g)),E+=(-1===E.indexOf("?")?"?":"&")+f}return E}},31540:bt=>{"use strict";bt.exports=function(Y,ie){return ie?Y.replace(/\/+$/,"")+"/"+ie.replace(/^\/+/,""):Y}},10300:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=ie.isStandardBrowserEnv()?{write:function(E,d,x,f,T,g){var b=[];b.push(E+"="+encodeURIComponent(d)),ie.isNumber(x)&&b.push("expires="+new Date(x).toGMTString()),ie.isString(f)&&b.push("path="+f),ie.isString(T)&&b.push("domain="+T),!0===g&&b.push("secure"),document.cookie=b.join("; ")},read:function(E){var d=document.cookie.match(new RegExp("(^|;\\s*)("+E+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove:function(E){this.write(E,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},95164:bt=>{"use strict";bt.exports=function(Y){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(Y)}},99541:bt=>{"use strict";bt.exports=function(Y){return"object"==typeof Y&&!0===Y.isAxiosError}},32984:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=ie.isStandardBrowserEnv()?function(){var d,O=/(msie|trident)/i.test(navigator.userAgent),E=document.createElement("a");function x(f){var T=f;return O&&(E.setAttribute("href",T),T=E.href),E.setAttribute("href",T),{href:E.href,protocol:E.protocol?E.protocol.replace(/:$/,""):"",host:E.host,search:E.search?E.search.replace(/^\?/,""):"",hash:E.hash?E.hash.replace(/^#/,""):"",hostname:E.hostname,port:E.port,pathname:"/"===E.pathname.charAt(0)?E.pathname:"/"+E.pathname}}return d=x(window.location.href),function(T){var g=ie.isString(T)?x(T):T;return g.protocol===d.protocol&&g.host===d.host}}():function(){return!0}},12196:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=function(O,E){ie.forEach(O,function(x,f){f!==E&&f.toUpperCase()===E.toUpperCase()&&(O[E]=x,delete O[f])})}},71929:(bt,be,Y)=>{"use strict";var ie=Y(59471),z=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];bt.exports=function(E){var x,f,T,d={};return E&&ie.forEach(E.split("\n"),function(b){if(T=b.indexOf(":"),x=ie.trim(b.substr(0,T)).toLowerCase(),f=ie.trim(b.substr(T+1)),x){if(d[x]&&z.indexOf(x)>=0)return;d[x]="set-cookie"===x?(d[x]?d[x]:[]).concat([f]):d[x]?d[x]+", "+f:f}}),d}},28908:bt=>{"use strict";bt.exports=function(Y){return function(z){return Y.apply(null,z)}}},43558:(bt,be,Y)=>{"use strict";var ie=Y(15370).version,z={};["object","boolean","number","function","string","symbol"].forEach(function(d,x){z[d]=function(T){return typeof T===d||"a"+(x<1?"n ":" ")+d}});var O={};z.transitional=function(x,f,T){function g(b,l){return"[Axios v"+ie+"] Transitional option '"+b+"'"+l+(T?". "+T:"")}return function(b,l,h){if(!1===x)throw new Error(g(l," has been removed"+(f?" in "+f:"")));return f&&!O[l]&&(O[l]=!0,console.warn(g(l," has been deprecated since v"+f+" and will be removed in the near future"))),!x||x(b,l,h)}},bt.exports={assertOptions:function(d,x,f){if("object"!=typeof d)throw new TypeError("options must be an object");for(var T=Object.keys(d),g=T.length;g-- >0;){var b=T[g],l=x[b];if(l){var h=d[b],u=void 0===h||l(h,b,d);if(!0!==u)throw new TypeError("option "+b+" must be "+u)}else if(!0!==f)throw Error("Unknown option "+b)}},validators:z}},59471:(bt,be,Y)=>{"use strict";var ie=Y(81533),z=Object.prototype.toString;function O(j){return"[object Array]"===z.call(j)}function E(j){return void 0===j}function l(j){return null!==j&&"object"==typeof j}function h(j){if("[object Object]"!==z.call(j))return!1;var K=Object.getPrototypeOf(j);return null===K||K===Object.prototype}function w(j){return"[object Function]"===z.call(j)}function V(j,K){if(null!=j)if("object"!=typeof j&&(j=[j]),O(j))for(var R=0,o=j.length;R{"use strict";be.byteLength=function(u){var m=x(u),w=m[1];return 3*(m[0]+w)/4-w},be.toByteArray=function(u){var m,V,_=x(u),w=_[0],S=_[1],I=new z(function(u,m,_){return 3*(m+_)/4-_}(0,w,S)),P=0,L=S>0?w-4:w;for(V=0;V>16&255,I[P++]=m>>8&255,I[P++]=255&m;return 2===S&&(m=ie[u.charCodeAt(V)]<<2|ie[u.charCodeAt(V+1)]>>4,I[P++]=255&m),1===S&&(m=ie[u.charCodeAt(V)]<<10|ie[u.charCodeAt(V+1)]<<4|ie[u.charCodeAt(V+2)]>>2,I[P++]=m>>8&255,I[P++]=255&m),I},be.fromByteArray=function(u){for(var m,_=u.length,w=_%3,S=[],I=16383,P=0,L=_-w;PL?L:P+I));return 1===w?S.push(Y[(m=u[_-1])>>2]+Y[m<<4&63]+"=="):2===w&&S.push(Y[(m=(u[_-2]<<8)+u[_-1])>>10]+Y[m>>4&63]+Y[m<<2&63]+"="),S.join("")};for(var Y=[],ie=[],z="undefined"!=typeof Uint8Array?Uint8Array:Array,O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=0,d=O.length;E0)throw new Error("Invalid string. Length must be a multiple of 4");var _=u.indexOf("=");return-1===_&&(_=m),[_,_===m?0:4-_%4]}function b(u){return Y[u>>18&63]+Y[u>>12&63]+Y[u>>6&63]+Y[63&u]}function l(u,m,_){for(var S=[],I=m;I<_;I+=3)S.push(b((u[I]<<16&16711680)+(u[I+1]<<8&65280)+(255&u[I+2])));return S.join("")}ie["-".charCodeAt(0)]=62,ie["_".charCodeAt(0)]=63},29901:bt=>{"use strict";for(var be="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Y={},ie=0;ie>25;return(33554431&m)<<5^996825010&-(_>>0&1)^642813549&-(_>>1&1)^513874426&-(_>>2&1)^1027748829&-(_>>3&1)^705979059&-(_>>4&1)}function E(m){for(var _=1,w=0;w126)return"Invalid prefix ("+m+")";_=O(_)^S>>5}for(_=O(_),w=0;w(_=_||90))return"Exceeds length limit";var w=m.toLowerCase(),S=m.toUpperCase();if(m!==w&&m!==S)return"Mixed-case string "+m;var I=(m=w).lastIndexOf("1");if(-1===I)return"No separator character for "+m;if(0===I)return"Missing prefix for "+m;var P=m.slice(0,I),L=m.slice(I+1);if(L.length<6)return"Data too short";var V=E(P);if("string"==typeof V)return V;for(var W=[],G=0;G=L.length)&&W.push(j)}return 1!==V?"Invalid checksum for "+m:{prefix:P,words:W}}function g(m,_,w,S){for(var I=0,P=0,L=(1<=w;)V.push(I>>(P-=w)&L);if(S)P>0&&V.push(I<=_)return"Excess padding";if(I<(w=w||90))throw new TypeError("Exceeds length limit");var S=E(m=m.toLowerCase());if("string"==typeof S)throw new Error(S);for(var I=m+"1",P=0;P<_.length;++P){var L=_[P];if(L>>5!=0)throw new Error("Non 5-bit word");S=O(S)^L,I+=be.charAt(L)}for(P=0;P<6;++P)S=O(S);for(S^=1,P=0;P<6;++P)I+=be.charAt(S>>5*(5-P)&31);return I},toWordsUnsafe:function(m){var _=g(m,8,5,!0);if(Array.isArray(_))return _},toWords:function(m){var _=g(m,8,5,!0);if(Array.isArray(_))return _;throw new Error(_)},fromWordsUnsafe:function(m){var _=g(m,5,8,!1);if(Array.isArray(_))return _},fromWords:function(m){var _=g(m,5,8,!1);if(Array.isArray(_))return _;throw new Error(_)}}},46821:function(bt,be,Y){var ie;!function(z){"use strict";var O,x=1e6,f=1e6,b="[big.js] ",l=b+"Invalid ",h=l+"decimal places",u=l+"rounding mode",m=b+"Division by zero",_={},w=void 0,S=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function L(W,G,H,j){var K=W.c,R=W.e+G+1;if(R=5;else if(2===H)j=K[R]>5||5==K[R]&&(j||R<0||K[R+1]!==w||1&K[R-1]);else if(3===H)j=j||!!K[0];else if(j=!1,0!==H)throw Error(u);if(R<1)K.length=1,j?(W.e=-G,K[0]=1):K[0]=W.e=0;else{if(K.length=R--,j)for(;++K[R]>9;)K[R]=0,R--||(++W.e,K.unshift(1));for(R=K.length;!K[--R];)K.pop()}}else if(H<0||H>3||H!==~~H)throw Error(u);return W}function V(W,G,H,j){var K,R,o=W.constructor,y=!W.c[0];if(H!==w){if(H!==~~H||H<(3==G)||H>x)throw Error(3==G?l+"precision":h);for(H=j-(W=new o(W)).e,W.c.length>++j&&L(W,H,o.RM),2==G&&(j=W.e+H+1);W.c.length=o.PE))R=R.charAt(0)+(H>1?"."+R.slice(1):"")+(K<0?"e":"e+")+K;else if(K<0){for(;++K;)R="0"+R;R="0."+R}else if(K>0)if(++K>H)for(K-=H;K--;)R+="0";else K1&&(R=R.charAt(0)+"."+R.slice(1));return W.s<0&&(!y||4==G)?"-"+R:R}_.abs=function(){var W=new this.constructor(this);return W.s=1,W},_.cmp=function(W){var G,H=this,j=H.c,K=(W=new H.constructor(W)).c,R=H.s,o=W.s,y=H.e,M=W.e;if(!j[0]||!K[0])return j[0]?R:K[0]?-o:0;if(R!=o)return R;if(G=R<0,y!=M)return y>M^G?1:-1;for(o=(y=j.length)<(M=K.length)?y:M,R=-1;++RK[R]^G?1:-1;return y==M?0:y>M^G?1:-1},_.div=function(W){var G=this,H=G.constructor,j=G.c,K=(W=new H(W)).c,R=G.s==W.s?1:-1,o=H.DP;if(o!==~~o||o<0||o>x)throw Error(h);if(!K[0])throw Error(m);if(!j[0])return new H(0*R);var y,M,v,k,D,N=K.slice(),C=y=K.length,a=j.length,B=j.slice(0,y),Q=B.length,ee=W,ce=ee.c=[],ue=0,we=o+(ee.e=G.e-W.e)+1;for(ee.s=R,R=we<0?0:we,N.unshift(0);Q++Q?1:-1;else for(D=-1,k=0;++DB[D]?1:-1;break}if(!(k<0))break;for(M=Q==y?K:N;Q;){if(B[--Q]we&&L(ee,o,H.RM,B[0]!==w),ee},_.eq=function(W){return!this.cmp(W)},_.gt=function(W){return this.cmp(W)>0},_.gte=function(W){return this.cmp(W)>-1},_.lt=function(W){return this.cmp(W)<0},_.lte=function(W){return this.cmp(W)<1},_.minus=_.sub=function(W){var G,H,j,K,R=this,o=R.constructor,y=R.s,M=(W=new o(W)).s;if(y!=M)return W.s=-M,R.plus(W);var v=R.c.slice(),k=R.e,D=W.c,N=W.e;if(!v[0]||!D[0])return D[0]?(W.s=-M,W):new o(v[0]?R:0);if(y=k-N){for((K=y<0)?(y=-y,j=v):(N=k,j=D),j.reverse(),M=y;M--;)j.push(0);j.reverse()}else for(H=((K=v.length0)for(;M--;)v[G++]=0;for(M=G;H>y;){if(v[--H]0?(M=o,G=v):(K=-K,G=y),G.reverse();K--;)G.push(0);G.reverse()}for(y.length-v.length<0&&(G=v,v=y,y=G),K=v.length,R=0;K;y[K]%=10)R=(y[--K]=y[K]+v[K]+R)/10|0;for(R&&(y.unshift(R),++M),K=y.length;0===y[--K];)y.pop();return W.c=y,W.e=M,W},_.pow=function(W){var G=this,H=new G.constructor(1),j=H,K=W<0;if(W!==~~W||W<-f||W>f)throw Error(l+"exponent");for(K&&(W=-W);1&W&&(j=j.times(G)),W>>=1;)G=G.times(G);return K?H.div(j):j},_.round=function(W,G){var H=this.constructor;if(W===w)W=0;else if(W!==~~W||W<-x||W>x)throw Error(h);return L(new H(this),W,G===w?H.RM:G)},_.sqrt=function(){var W,G,H,j=this,K=j.constructor,R=j.s,o=j.e,y=new K(.5);if(!j.c[0])return new K(j);if(R<0)throw Error(b+"No square root");0===(R=Math.sqrt(j+""))||R===1/0?((G=j.c.join("")).length+o&1||(G+="0"),o=((o+1)/2|0)-(o<0||1&o),W=new K(((R=Math.sqrt(G))==1/0?"1e":(R=R.toExponential()).slice(0,R.indexOf("e")+1))+o)):W=new K(R),o=W.e+(K.DP+=4);do{W=y.times((H=W).plus(j.div(H)))}while(H.c.slice(0,o).join("")!==W.c.slice(0,o).join(""));return L(W,K.DP-=4,K.RM)},_.times=_.mul=function(W){var G,H=this,j=H.constructor,K=H.c,R=(W=new j(W)).c,o=K.length,y=R.length,M=H.e,v=W.e;if(W.s=H.s==W.s?1:-1,!K[0]||!R[0])return new j(0*W.s);for(W.e=M+v,oM;)y=G[v]+R[M]*K[v-M-1]+y,G[v--]=y%10,y=y/10|0;G[v]=(G[v]+y)%10}for(y?++W.e:G.shift(),M=G.length;!G[--M];)G.pop();return W.c=G,W},_.toExponential=function(W){return V(this,1,W,W)},_.toFixed=function(W){return V(this,2,W,this.e+W)},_.toPrecision=function(W){return V(this,3,W,W-1)},_.toString=function(){return V(this)},_.valueOf=_.toJSON=function(){return V(this,4)},(O=function I(){function W(G){var H=this;if(!(H instanceof W))return G===w?I():new W(G);G instanceof W?(H.s=G.s,H.e=G.e,H.c=G.c.slice()):function(W,G){var H,j,K;if(0===G&&1/G<0)G="-0";else if(!S.test(G+=""))throw Error(l+"number");for(W.s="-"==G.charAt(0)?(G=G.slice(1),-1):1,(H=G.indexOf("."))>-1&&(G=G.replace(".","")),(j=G.search(/e/i))>0?(H<0&&(H=j),H+=+G.slice(j+1),G=G.substring(0,j)):H<0&&(H=G.length),K=G.length,j=0;j0&&"0"==G.charAt(--K););for(W.e=H-j-1,W.c=[],H=0;j<=K;)W.c[H++]=+G.charAt(j++)}}(H,G),H.constructor=W}return W.prototype=_,W.DP=20,W.RM=1,W.NE=-7,W.PE=21,W.version="5.2.2",W}()).default=O.Big=O,void 0!==(ie=function(){return O}.call(be,Y,be,bt))&&(bt.exports=ie)}()},62630:function(bt,be,Y){!function(ie,z){"use strict";function O(M,v){if(!M)throw new Error(v||"Assertion failed")}function E(M,v){M.super_=v;var k=function(){};k.prototype=v.prototype,M.prototype=new k,M.prototype.constructor=M}function d(M,v,k){if(d.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,null!==M&&(("le"===v||"be"===v)&&(k=v,v=10),this._init(M||0,v||10,k||"be"))}var x;"object"==typeof ie?ie.exports=d:z.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(46601).Buffer}catch{}function f(M,v){var k=M.charCodeAt(v);return k>=48&&k<=57?k-48:k>=65&&k<=70?k-55:k>=97&&k<=102?k-87:void O(!1,"Invalid character in "+M)}function T(M,v,k){var D=f(M,k);return k-1>=v&&(D|=f(M,k-1)<<4),D}function g(M,v,k,D){for(var N=0,C=0,a=Math.min(M.length,k),B=v;B=49?Q-49+10:Q>=17?Q-17+10:Q,O(Q>=0&&C0?v:k},d.min=function(v,k){return v.cmp(k)<0?v:k},d.prototype._init=function(v,k,D){if("number"==typeof v)return this._initNumber(v,k,D);if("object"==typeof v)return this._initArray(v,k,D);"hex"===k&&(k=16),O(k===(0|k)&&k>=2&&k<=36);var N=0;"-"===(v=v.toString().replace(/\s+/g,""))[0]&&(N++,this.negative=1),N=0;N-=3)this.words[C]|=(a=v[N]|v[N-1]<<8|v[N-2]<<16)<>>26-B&67108863,(B+=24)>=26&&(B-=26,C++);else if("le"===D)for(N=0,C=0;N>>26-B&67108863,(B+=24)>=26&&(B-=26,C++);return this._strip()},d.prototype._parseHex=function(v,k,D){this.length=Math.ceil((v.length-k)/6),this.words=new Array(this.length);for(var N=0;N=k;N-=2)B=T(v,k,N)<=18?(C-=18,this.words[a+=1]|=B>>>26):C+=8;else for(N=(v.length-k)%2==0?k+1:k;N=18?(C-=18,this.words[a+=1]|=B>>>26):C+=8;this._strip()},d.prototype._parseBase=function(v,k,D){this.words=[0],this.length=1;for(var N=0,C=1;C<=67108863;C*=k)N++;N--,C=C/k|0;for(var a=v.length-D,B=a%N,Q=Math.min(a,a-B)+D,ee=0,ce=D;ce1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{d.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch{d.prototype.inspect=l}else d.prototype.inspect=l;function l(){return(this.red?""}var 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"],u=[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],m=[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 S(M,v,k){k.negative=v.negative^M.negative;var D=M.length+v.length|0;k.length=D,D=D-1|0;var N=0|M.words[0],C=0|v.words[0],a=N*C,Q=a/67108864|0;k.words[0]=67108863&a;for(var ee=1;ee>>26,ue=67108863&Q,we=Math.min(ee,v.length-1),ae=Math.max(0,ee-M.length+1);ae<=we;ae++)ce+=(a=(N=0|M.words[ee-ae|0])*(C=0|v.words[ae])+ue)/67108864|0,ue=67108863&a;k.words[ee]=0|ue,Q=0|ce}return 0!==Q?k.words[ee]=0|Q:k.length--,k._strip()}d.prototype.toString=function(v,k){var D;if(k=0|k||1,16===(v=v||10)||"hex"===v){D="";for(var N=0,C=0,a=0;a>>24-N&16777215,(N+=2)>=26&&(N-=26,a--),D=0!==C||a!==this.length-1?h[6-Q.length]+Q+D:Q+D}for(0!==C&&(D=C.toString(16)+D);D.length%k!=0;)D="0"+D;return 0!==this.negative&&(D="-"+D),D}if(v===(0|v)&&v>=2&&v<=36){var ee=u[v],ce=m[v];D="";var ue=this.clone();for(ue.negative=0;!ue.isZero();){var we=ue.modrn(ce).toString(v);D=(ue=ue.idivn(ce)).isZero()?we+D:h[ee-we.length]+we+D}for(this.isZero()&&(D="0"+D);D.length%k!=0;)D="0"+D;return 0!==this.negative&&(D="-"+D),D}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var v=this.words[0];return 2===this.length?v+=67108864*this.words[1]:3===this.length&&1===this.words[2]?v+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-v:v},d.prototype.toJSON=function(){return this.toString(16,2)},x&&(d.prototype.toBuffer=function(v,k){return this.toArrayLike(x,v,k)}),d.prototype.toArray=function(v,k){return this.toArrayLike(Array,v,k)},d.prototype.toArrayLike=function(v,k,D){this._strip();var N=this.byteLength(),C=D||Math.max(1,N);O(N<=C,"byte array longer than desired length"),O(C>0,"Requested array length <= 0");var a=function(v,k){return v.allocUnsafe?v.allocUnsafe(k):new v(k)}(v,C);return this["_toArrayLike"+("le"===k?"LE":"BE")](a,N),a},d.prototype._toArrayLikeLE=function(v,k){for(var D=0,N=0,C=0,a=0;C>8&255),D>16&255),6===a?(D>24&255),N=0,a=0):(N=B>>>24,a+=2)}if(D=0&&(v[D--]=B>>8&255),D>=0&&(v[D--]=B>>16&255),6===a?(D>=0&&(v[D--]=B>>24&255),N=0,a=0):(N=B>>>24,a+=2)}if(D>=0)for(v[D--]=N;D>=0;)v[D--]=0},d.prototype._countBits=Math.clz32?function(v){return 32-Math.clz32(v)}:function(v){var k=v,D=0;return k>=4096&&(D+=13,k>>>=13),k>=64&&(D+=7,k>>>=7),k>=8&&(D+=4,k>>>=4),k>=2&&(D+=2,k>>>=2),D+k},d.prototype._zeroBits=function(v){if(0===v)return 26;var k=v,D=0;return 0==(8191&k)&&(D+=13,k>>>=13),0==(127&k)&&(D+=7,k>>>=7),0==(15&k)&&(D+=4,k>>>=4),0==(3&k)&&(D+=2,k>>>=2),0==(1&k)&&D++,D},d.prototype.bitLength=function(){var k=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+k},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,k=0;kv.length?this.clone().ior(v):v.clone().ior(this)},d.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},d.prototype.iuand=function(v){var k;k=this.length>v.length?v:this;for(var D=0;Dv.length?this.clone().iand(v):v.clone().iand(this)},d.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},d.prototype.iuxor=function(v){var k,D;this.length>v.length?(k=this,D=v):(k=v,D=this);for(var N=0;Nv.length?this.clone().ixor(v):v.clone().ixor(this)},d.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},d.prototype.inotn=function(v){O("number"==typeof v&&v>=0);var k=0|Math.ceil(v/26),D=v%26;this._expand(k),D>0&&k--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-D),this._strip()},d.prototype.notn=function(v){return this.clone().inotn(v)},d.prototype.setn=function(v,k){O("number"==typeof v&&v>=0);var D=v/26|0,N=v%26;return this._expand(D+1),this.words[D]=k?this.words[D]|1<v.length?(D=this,N=v):(D=v,N=this);for(var C=0,a=0;a>>26;for(;0!==C&&a>>26;if(this.length=D.length,0!==C)this.words[this.length]=C,this.length++;else if(D!==this)for(;av.length?this.clone().iadd(v):v.clone().iadd(this)},d.prototype.isub=function(v){if(0!==v.negative){v.negative=0;var k=this.iadd(v);return v.negative=1,k._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var N,C,D=this.cmp(v);if(0===D)return this.negative=0,this.length=1,this.words[0]=0,this;D>0?(N=this,C=v):(N=v,C=this);for(var a=0,B=0;B>26,this.words[B]=67108863&k;for(;0!==a&&B>26,this.words[B]=67108863&k;if(0===a&&B>>13,Te=0|N[1],le=8191&Te,X=Te>>>13,ne=0|N[2],pe=8191&ne,_e=ne>>>13,xe=0|N[3],Ce=8191&xe,ke=xe>>>13,me=0|N[4],Ee=8191&me,ze=me>>>13,Ve=0|N[5],nt=8191&Ve,tt=Ve>>>13,mt=0|N[6],ht=8191&mt,wt=mt>>>13,Pt=0|N[7],st=8191&Pt,Ye=Pt>>>13,gt=0|N[8],St=8191>,Wt=gt>>>13,dn=0|N[9],Nt=8191&dn,It=dn>>>13,qt=0|C[0],jt=8191&qt,Yt=qt>>>13,Wn=0|C[1],fn=8191&Wn,$n=Wn>>>13,Yr=0|C[2],Ln=8191&Yr,Bn=Yr>>>13,$r=0|C[3],Gn=8191&$r,bn=$r>>>13,Lr=0|C[4],Kn=8191&Lr,sr=Lr>>>13,Ii=0|C[5],Un=8191&Ii,ir=Ii>>>13,ts=0|C[6],Tn=8191&ts,Qn=ts>>>13,Vi=0|C[7],ar=8191&Vi,br=Vi>>>13,ki=0|C[8],ur=8191&ki,mr=ki>>>13,Fr=0|C[9],hi=8191&Fr,wi=Fr>>>13;D.negative=v.negative^k.negative,D.length=19;var cs=(B+(Q=Math.imul(we,jt))|0)+((8191&(ee=(ee=Math.imul(we,Yt))+Math.imul(ae,jt)|0))<<13)|0;B=((ce=Math.imul(ae,Yt))+(ee>>>13)|0)+(cs>>>26)|0,cs&=67108863,Q=Math.imul(le,jt),ee=(ee=Math.imul(le,Yt))+Math.imul(X,jt)|0,ce=Math.imul(X,Yt);var $i=(B+(Q=Q+Math.imul(we,fn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,$n)|0)+(ee>>>13)|0)+($i>>>26)|0,$i&=67108863,Q=Math.imul(pe,jt),ee=(ee=Math.imul(pe,Yt))+Math.imul(_e,jt)|0,ce=Math.imul(_e,Yt),Q=Q+Math.imul(le,fn)|0,ee=(ee=ee+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,ce=ce+Math.imul(X,$n)|0;var rs=(B+(Q=Q+Math.imul(we,Ln)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0))<<13)|0;B=((ce=ce+Math.imul(ae,Bn)|0)+(ee>>>13)|0)+(rs>>>26)|0,rs&=67108863,Q=Math.imul(Ce,jt),ee=(ee=Math.imul(Ce,Yt))+Math.imul(ke,jt)|0,ce=Math.imul(ke,Yt),Q=Q+Math.imul(pe,fn)|0,ee=(ee=ee+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,ce=ce+Math.imul(_e,$n)|0,Q=Q+Math.imul(le,Ln)|0,ee=(ee=ee+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,ce=ce+Math.imul(X,Bn)|0;var Xi=(B+(Q=Q+Math.imul(we,Gn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,bn)|0)+(ee>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,Q=Math.imul(Ee,jt),ee=(ee=Math.imul(Ee,Yt))+Math.imul(ze,jt)|0,ce=Math.imul(ze,Yt),Q=Q+Math.imul(Ce,fn)|0,ee=(ee=ee+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,ce=ce+Math.imul(ke,$n)|0,Q=Q+Math.imul(pe,Ln)|0,ee=(ee=ee+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,ce=ce+Math.imul(_e,Bn)|0,Q=Q+Math.imul(le,Gn)|0,ee=(ee=ee+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,ce=ce+Math.imul(X,bn)|0;var $s=(B+(Q=Q+Math.imul(we,Kn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,sr)|0)+(ee>>>13)|0)+($s>>>26)|0,$s&=67108863,Q=Math.imul(nt,jt),ee=(ee=Math.imul(nt,Yt))+Math.imul(tt,jt)|0,ce=Math.imul(tt,Yt),Q=Q+Math.imul(Ee,fn)|0,ee=(ee=ee+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,ce=ce+Math.imul(ze,$n)|0,Q=Q+Math.imul(Ce,Ln)|0,ee=(ee=ee+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,ce=ce+Math.imul(ke,Bn)|0,Q=Q+Math.imul(pe,Gn)|0,ee=(ee=ee+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,ce=ce+Math.imul(_e,bn)|0,Q=Q+Math.imul(le,Kn)|0,ee=(ee=ee+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,ce=ce+Math.imul(X,sr)|0;var is=(B+(Q=Q+Math.imul(we,Un)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0))<<13)|0;B=((ce=ce+Math.imul(ae,ir)|0)+(ee>>>13)|0)+(is>>>26)|0,is&=67108863,Q=Math.imul(ht,jt),ee=(ee=Math.imul(ht,Yt))+Math.imul(wt,jt)|0,ce=Math.imul(wt,Yt),Q=Q+Math.imul(nt,fn)|0,ee=(ee=ee+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,ce=ce+Math.imul(tt,$n)|0,Q=Q+Math.imul(Ee,Ln)|0,ee=(ee=ee+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,ce=ce+Math.imul(ze,Bn)|0,Q=Q+Math.imul(Ce,Gn)|0,ee=(ee=ee+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,ce=ce+Math.imul(ke,bn)|0,Q=Q+Math.imul(pe,Kn)|0,ee=(ee=ee+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,ce=ce+Math.imul(_e,sr)|0,Q=Q+Math.imul(le,Un)|0,ee=(ee=ee+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,ce=ce+Math.imul(X,ir)|0;var go=(B+(Q=Q+Math.imul(we,Tn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,Qn)|0)+(ee>>>13)|0)+(go>>>26)|0,go&=67108863,Q=Math.imul(st,jt),ee=(ee=Math.imul(st,Yt))+Math.imul(Ye,jt)|0,ce=Math.imul(Ye,Yt),Q=Q+Math.imul(ht,fn)|0,ee=(ee=ee+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,ce=ce+Math.imul(wt,$n)|0,Q=Q+Math.imul(nt,Ln)|0,ee=(ee=ee+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,ce=ce+Math.imul(tt,Bn)|0,Q=Q+Math.imul(Ee,Gn)|0,ee=(ee=ee+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,ce=ce+Math.imul(ze,bn)|0,Q=Q+Math.imul(Ce,Kn)|0,ee=(ee=ee+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,ce=ce+Math.imul(ke,sr)|0,Q=Q+Math.imul(pe,Un)|0,ee=(ee=ee+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,ce=ce+Math.imul(_e,ir)|0,Q=Q+Math.imul(le,Tn)|0,ee=(ee=ee+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,ce=ce+Math.imul(X,Qn)|0;var ji=(B+(Q=Q+Math.imul(we,ar)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,br)|0)+Math.imul(ae,ar)|0))<<13)|0;B=((ce=ce+Math.imul(ae,br)|0)+(ee>>>13)|0)+(ji>>>26)|0,ji&=67108863,Q=Math.imul(St,jt),ee=(ee=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,ce=Math.imul(Wt,Yt),Q=Q+Math.imul(st,fn)|0,ee=(ee=ee+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,ce=ce+Math.imul(Ye,$n)|0,Q=Q+Math.imul(ht,Ln)|0,ee=(ee=ee+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,ce=ce+Math.imul(wt,Bn)|0,Q=Q+Math.imul(nt,Gn)|0,ee=(ee=ee+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,ce=ce+Math.imul(tt,bn)|0,Q=Q+Math.imul(Ee,Kn)|0,ee=(ee=ee+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,ce=ce+Math.imul(ze,sr)|0,Q=Q+Math.imul(Ce,Un)|0,ee=(ee=ee+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,ce=ce+Math.imul(ke,ir)|0,Q=Q+Math.imul(pe,Tn)|0,ee=(ee=ee+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,ce=ce+Math.imul(_e,Qn)|0,Q=Q+Math.imul(le,ar)|0,ee=(ee=ee+Math.imul(le,br)|0)+Math.imul(X,ar)|0,ce=ce+Math.imul(X,br)|0;var so=(B+(Q=Q+Math.imul(we,ur)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;B=((ce=ce+Math.imul(ae,mr)|0)+(ee>>>13)|0)+(so>>>26)|0,so&=67108863,Q=Math.imul(Nt,jt),ee=(ee=Math.imul(Nt,Yt))+Math.imul(It,jt)|0,ce=Math.imul(It,Yt),Q=Q+Math.imul(St,fn)|0,ee=(ee=ee+Math.imul(St,$n)|0)+Math.imul(Wt,fn)|0,ce=ce+Math.imul(Wt,$n)|0,Q=Q+Math.imul(st,Ln)|0,ee=(ee=ee+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,ce=ce+Math.imul(Ye,Bn)|0,Q=Q+Math.imul(ht,Gn)|0,ee=(ee=ee+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,ce=ce+Math.imul(wt,bn)|0,Q=Q+Math.imul(nt,Kn)|0,ee=(ee=ee+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,ce=ce+Math.imul(tt,sr)|0,Q=Q+Math.imul(Ee,Un)|0,ee=(ee=ee+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,ce=ce+Math.imul(ze,ir)|0,Q=Q+Math.imul(Ce,Tn)|0,ee=(ee=ee+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,ce=ce+Math.imul(ke,Qn)|0,Q=Q+Math.imul(pe,ar)|0,ee=(ee=ee+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,ce=ce+Math.imul(_e,br)|0,Q=Q+Math.imul(le,ur)|0,ee=(ee=ee+Math.imul(le,mr)|0)+Math.imul(X,ur)|0,ce=ce+Math.imul(X,mr)|0;var oo=(B+(Q=Q+Math.imul(we,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,wi)|0)+Math.imul(ae,hi)|0))<<13)|0;B=((ce=ce+Math.imul(ae,wi)|0)+(ee>>>13)|0)+(oo>>>26)|0,oo&=67108863,Q=Math.imul(Nt,fn),ee=(ee=Math.imul(Nt,$n))+Math.imul(It,fn)|0,ce=Math.imul(It,$n),Q=Q+Math.imul(St,Ln)|0,ee=(ee=ee+Math.imul(St,Bn)|0)+Math.imul(Wt,Ln)|0,ce=ce+Math.imul(Wt,Bn)|0,Q=Q+Math.imul(st,Gn)|0,ee=(ee=ee+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,ce=ce+Math.imul(Ye,bn)|0,Q=Q+Math.imul(ht,Kn)|0,ee=(ee=ee+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,ce=ce+Math.imul(wt,sr)|0,Q=Q+Math.imul(nt,Un)|0,ee=(ee=ee+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,ce=ce+Math.imul(tt,ir)|0,Q=Q+Math.imul(Ee,Tn)|0,ee=(ee=ee+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,ce=ce+Math.imul(ze,Qn)|0,Q=Q+Math.imul(Ce,ar)|0,ee=(ee=ee+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,ce=ce+Math.imul(ke,br)|0,Q=Q+Math.imul(pe,ur)|0,ee=(ee=ee+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0,ce=ce+Math.imul(_e,mr)|0;var zo=(B+(Q=Q+Math.imul(le,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(le,wi)|0)+Math.imul(X,hi)|0))<<13)|0;B=((ce=ce+Math.imul(X,wi)|0)+(ee>>>13)|0)+(zo>>>26)|0,zo&=67108863,Q=Math.imul(Nt,Ln),ee=(ee=Math.imul(Nt,Bn))+Math.imul(It,Ln)|0,ce=Math.imul(It,Bn),Q=Q+Math.imul(St,Gn)|0,ee=(ee=ee+Math.imul(St,bn)|0)+Math.imul(Wt,Gn)|0,ce=ce+Math.imul(Wt,bn)|0,Q=Q+Math.imul(st,Kn)|0,ee=(ee=ee+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,ce=ce+Math.imul(Ye,sr)|0,Q=Q+Math.imul(ht,Un)|0,ee=(ee=ee+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,ce=ce+Math.imul(wt,ir)|0,Q=Q+Math.imul(nt,Tn)|0,ee=(ee=ee+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,ce=ce+Math.imul(tt,Qn)|0,Q=Q+Math.imul(Ee,ar)|0,ee=(ee=ee+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,ce=ce+Math.imul(ze,br)|0,Q=Q+Math.imul(Ce,ur)|0,ee=(ee=ee+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0,ce=ce+Math.imul(ke,mr)|0;var Wi=(B+(Q=Q+Math.imul(pe,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(pe,wi)|0)+Math.imul(_e,hi)|0))<<13)|0;B=((ce=ce+Math.imul(_e,wi)|0)+(ee>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,Q=Math.imul(Nt,Gn),ee=(ee=Math.imul(Nt,bn))+Math.imul(It,Gn)|0,ce=Math.imul(It,bn),Q=Q+Math.imul(St,Kn)|0,ee=(ee=ee+Math.imul(St,sr)|0)+Math.imul(Wt,Kn)|0,ce=ce+Math.imul(Wt,sr)|0,Q=Q+Math.imul(st,Un)|0,ee=(ee=ee+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,ce=ce+Math.imul(Ye,ir)|0,Q=Q+Math.imul(ht,Tn)|0,ee=(ee=ee+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,ce=ce+Math.imul(wt,Qn)|0,Q=Q+Math.imul(nt,ar)|0,ee=(ee=ee+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,ce=ce+Math.imul(tt,br)|0,Q=Q+Math.imul(Ee,ur)|0,ee=(ee=ee+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0,ce=ce+Math.imul(ze,mr)|0;var bo=(B+(Q=Q+Math.imul(Ce,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,wi)|0)+Math.imul(ke,hi)|0))<<13)|0;B=((ce=ce+Math.imul(ke,wi)|0)+(ee>>>13)|0)+(bo>>>26)|0,bo&=67108863,Q=Math.imul(Nt,Kn),ee=(ee=Math.imul(Nt,sr))+Math.imul(It,Kn)|0,ce=Math.imul(It,sr),Q=Q+Math.imul(St,Un)|0,ee=(ee=ee+Math.imul(St,ir)|0)+Math.imul(Wt,Un)|0,ce=ce+Math.imul(Wt,ir)|0,Q=Q+Math.imul(st,Tn)|0,ee=(ee=ee+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,ce=ce+Math.imul(Ye,Qn)|0,Q=Q+Math.imul(ht,ar)|0,ee=(ee=ee+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,ce=ce+Math.imul(wt,br)|0,Q=Q+Math.imul(nt,ur)|0,ee=(ee=ee+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0,ce=ce+Math.imul(tt,mr)|0;var _s=(B+(Q=Q+Math.imul(Ee,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ee,wi)|0)+Math.imul(ze,hi)|0))<<13)|0;B=((ce=ce+Math.imul(ze,wi)|0)+(ee>>>13)|0)+(_s>>>26)|0,_s&=67108863,Q=Math.imul(Nt,Un),ee=(ee=Math.imul(Nt,ir))+Math.imul(It,Un)|0,ce=Math.imul(It,ir),Q=Q+Math.imul(St,Tn)|0,ee=(ee=ee+Math.imul(St,Qn)|0)+Math.imul(Wt,Tn)|0,ce=ce+Math.imul(Wt,Qn)|0,Q=Q+Math.imul(st,ar)|0,ee=(ee=ee+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,ce=ce+Math.imul(Ye,br)|0,Q=Q+Math.imul(ht,ur)|0,ee=(ee=ee+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0,ce=ce+Math.imul(wt,mr)|0;var Ao=(B+(Q=Q+Math.imul(nt,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(nt,wi)|0)+Math.imul(tt,hi)|0))<<13)|0;B=((ce=ce+Math.imul(tt,wi)|0)+(ee>>>13)|0)+(Ao>>>26)|0,Ao&=67108863,Q=Math.imul(Nt,Tn),ee=(ee=Math.imul(Nt,Qn))+Math.imul(It,Tn)|0,ce=Math.imul(It,Qn),Q=Q+Math.imul(St,ar)|0,ee=(ee=ee+Math.imul(St,br)|0)+Math.imul(Wt,ar)|0,ce=ce+Math.imul(Wt,br)|0,Q=Q+Math.imul(st,ur)|0,ee=(ee=ee+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0,ce=ce+Math.imul(Ye,mr)|0;var zi=(B+(Q=Q+Math.imul(ht,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(ht,wi)|0)+Math.imul(wt,hi)|0))<<13)|0;B=((ce=ce+Math.imul(wt,wi)|0)+(ee>>>13)|0)+(zi>>>26)|0,zi&=67108863,Q=Math.imul(Nt,ar),ee=(ee=Math.imul(Nt,br))+Math.imul(It,ar)|0,ce=Math.imul(It,br),Q=Q+Math.imul(St,ur)|0,ee=(ee=ee+Math.imul(St,mr)|0)+Math.imul(Wt,ur)|0,ce=ce+Math.imul(Wt,mr)|0;var Ms=(B+(Q=Q+Math.imul(st,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(st,wi)|0)+Math.imul(Ye,hi)|0))<<13)|0;B=((ce=ce+Math.imul(Ye,wi)|0)+(ee>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,Q=Math.imul(Nt,ur),ee=(ee=Math.imul(Nt,mr))+Math.imul(It,ur)|0,ce=Math.imul(It,mr);var Oi=(B+(Q=Q+Math.imul(St,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(St,wi)|0)+Math.imul(Wt,hi)|0))<<13)|0;B=((ce=ce+Math.imul(Wt,wi)|0)+(ee>>>13)|0)+(Oi>>>26)|0,Oi&=67108863;var Lu=(B+(Q=Math.imul(Nt,hi))|0)+((8191&(ee=(ee=Math.imul(Nt,wi))+Math.imul(It,hi)|0))<<13)|0;return B=((ce=Math.imul(It,wi))+(ee>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,a[0]=cs,a[1]=$i,a[2]=rs,a[3]=Xi,a[4]=$s,a[5]=is,a[6]=go,a[7]=ji,a[8]=so,a[9]=oo,a[10]=zo,a[11]=Wi,a[12]=bo,a[13]=_s,a[14]=Ao,a[15]=zi,a[16]=Ms,a[17]=Oi,a[18]=Lu,0!==B&&(a[19]=B,D.length++),D};function P(M,v,k){k.negative=v.negative^M.negative,k.length=M.length+v.length;for(var D=0,N=0,C=0;C>>26)|0)>>>26,a&=67108863}k.words[C]=B,D=a,a=N}return 0!==D?k.words[C]=D:k.length--,k._strip()}function L(M,v,k){return P(M,v,k)}function V(M,v){this.x=M,this.y=v}Math.imul||(I=S),d.prototype.mulTo=function(v,k){var N=this.length+v.length;return 10===this.length&&10===v.length?I(this,v,k):N<63?S(this,v,k):N<1024?P(this,v,k):L(this,v,k)},V.prototype.makeRBT=function(v){for(var k=new Array(v),D=d.prototype._countBits(v)-1,N=0;N>=1;return N},V.prototype.permute=function(v,k,D,N,C,a){for(var B=0;B>>=1)C++;return 1<>>=13),C>>>=13;for(a=2*k;a>=26,D+=C/67108864|0,D+=a>>>26,this.words[N]=67108863&a}return 0!==D&&(this.words[N]=D,this.length++),k?this.ineg():this},d.prototype.muln=function(v){return this.clone().imuln(v)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(v){var k=function(M){for(var v=new Array(M.bitLength()),k=0;k>>k%26&1;return v}(v);if(0===k.length)return new d(1);for(var D=this,N=0;N=0);var C,k=v%26,D=(v-k)/26,N=67108863>>>26-k<<26-k;if(0!==k){var a=0;for(C=0;C>>26-k}a&&(this.words[C]=a,this.length++)}if(0!==D){for(C=this.length-1;C>=0;C--)this.words[C+D]=this.words[C];for(C=0;C=0),N=k?(k-k%26)/26:0;var C=v%26,a=Math.min((v-C)/26,this.length),B=67108863^67108863>>>C<a)for(this.length-=a,ee=0;ee=0&&(0!==ce||ee>=N);ee--){var ue=0|this.words[ee];this.words[ee]=ce<<26-C|ue>>>C,ce=ue&B}return Q&&0!==ce&&(Q.words[Q.length++]=ce),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},d.prototype.ishrn=function(v,k,D){return O(0===this.negative),this.iushrn(v,k,D)},d.prototype.shln=function(v){return this.clone().ishln(v)},d.prototype.ushln=function(v){return this.clone().iushln(v)},d.prototype.shrn=function(v){return this.clone().ishrn(v)},d.prototype.ushrn=function(v){return this.clone().iushrn(v)},d.prototype.testn=function(v){O("number"==typeof v&&v>=0);var k=v%26,D=(v-k)/26;return!(this.length<=D||!(this.words[D]&1<=0);var k=v%26,D=(v-k)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=D?this:(0!==k&&D++,this.length=Math.min(D,this.length),0!==k&&(this.words[this.length-1]&=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},d.prototype.isubn=function(v){if(O("number"==typeof v),O(v<67108864),v<0)return this.iaddn(-v);if(0!==this.negative)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(Q/67108864|0),this.words[C+D]=67108863&a}for(;C>26,this.words[C+D]=67108863&a;if(0===B)return this._strip();for(O(-1===B),B=0,C=0;C>26,this.words[C]=67108863&a;return this.negative=1,this._strip()},d.prototype._wordDiv=function(v,k){var D,N=this.clone(),C=v,a=0|C.words[C.length-1];0!=(D=26-this._countBits(a))&&(C=C.ushln(D),N.iushln(D),a=0|C.words[C.length-1]);var ee,Q=N.length-C.length;if("mod"!==k){(ee=new d(null)).length=Q+1,ee.words=new Array(ee.length);for(var ce=0;ce=0;we--){var ae=67108864*(0|N.words[C.length+we])+(0|N.words[C.length+we-1]);for(ae=Math.min(ae/a|0,67108863),N._ishlnsubmul(C,ae,we);0!==N.negative;)ae--,N.negative=0,N._ishlnsubmul(C,1,we),N.isZero()||(N.negative^=1);ee&&(ee.words[we]=ae)}return ee&&ee._strip(),N._strip(),"div"!==k&&0!==D&&N.iushrn(D),{div:ee||null,mod:N}},d.prototype.divmod=function(v,k,D){return O(!v.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===v.negative?(a=this.neg().divmod(v,k),"mod"!==k&&(N=a.div.neg()),"div"!==k&&(C=a.mod.neg(),D&&0!==C.negative&&C.iadd(v)),{div:N,mod:C}):0===this.negative&&0!==v.negative?(a=this.divmod(v.neg(),k),"mod"!==k&&(N=a.div.neg()),{div:N,mod:a.mod}):0!=(this.negative&v.negative)?(a=this.neg().divmod(v.neg(),k),"div"!==k&&(C=a.mod.neg(),D&&0!==C.negative&&C.isub(v)),{div:a.div,mod:C}):v.length>this.length||this.cmp(v)<0?{div:new d(0),mod:this}:1===v.length?"div"===k?{div:this.divn(v.words[0]),mod:null}:"mod"===k?{div:null,mod:new d(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new d(this.modrn(v.words[0]))}:this._wordDiv(v,k);var N,C,a},d.prototype.div=function(v){return this.divmod(v,"div",!1).div},d.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},d.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},d.prototype.divRound=function(v){var k=this.divmod(v);if(k.mod.isZero())return k.div;var D=0!==k.div.negative?k.mod.isub(v):k.mod,N=v.ushrn(1),C=v.andln(1),a=D.cmp(N);return a<0||1===C&&0===a?k.div:0!==k.div.negative?k.div.isubn(1):k.div.iaddn(1)},d.prototype.modrn=function(v){var k=v<0;k&&(v=-v),O(v<=67108863);for(var D=(1<<26)%v,N=0,C=this.length-1;C>=0;C--)N=(D*N+(0|this.words[C]))%v;return k?-N:N},d.prototype.modn=function(v){return this.modrn(v)},d.prototype.idivn=function(v){var k=v<0;k&&(v=-v),O(v<=67108863);for(var D=0,N=this.length-1;N>=0;N--){var C=(0|this.words[N])+67108864*D;this.words[N]=C/v|0,D=C%v}return this._strip(),k?this.ineg():this},d.prototype.divn=function(v){return this.clone().idivn(v)},d.prototype.egcd=function(v){O(0===v.negative),O(!v.isZero());var k=this,D=v.clone();k=0!==k.negative?k.umod(v):k.clone();for(var N=new d(1),C=new d(0),a=new d(0),B=new d(1),Q=0;k.isEven()&&D.isEven();)k.iushrn(1),D.iushrn(1),++Q;for(var ee=D.clone(),ce=k.clone();!k.isZero();){for(var ue=0,we=1;0==(k.words[0]&we)&&ue<26;++ue,we<<=1);if(ue>0)for(k.iushrn(ue);ue-- >0;)(N.isOdd()||C.isOdd())&&(N.iadd(ee),C.isub(ce)),N.iushrn(1),C.iushrn(1);for(var ae=0,Te=1;0==(D.words[0]&Te)&&ae<26;++ae,Te<<=1);if(ae>0)for(D.iushrn(ae);ae-- >0;)(a.isOdd()||B.isOdd())&&(a.iadd(ee),B.isub(ce)),a.iushrn(1),B.iushrn(1);k.cmp(D)>=0?(k.isub(D),N.isub(a),C.isub(B)):(D.isub(k),a.isub(N),B.isub(C))}return{a,b:B,gcd:D.iushln(Q)}},d.prototype._invmp=function(v){O(0===v.negative),O(!v.isZero());var ue,k=this,D=v.clone();k=0!==k.negative?k.umod(v):k.clone();for(var N=new d(1),C=new d(0),a=D.clone();k.cmpn(1)>0&&D.cmpn(1)>0;){for(var B=0,Q=1;0==(k.words[0]&Q)&&B<26;++B,Q<<=1);if(B>0)for(k.iushrn(B);B-- >0;)N.isOdd()&&N.iadd(a),N.iushrn(1);for(var ee=0,ce=1;0==(D.words[0]&ce)&&ee<26;++ee,ce<<=1);if(ee>0)for(D.iushrn(ee);ee-- >0;)C.isOdd()&&C.iadd(a),C.iushrn(1);k.cmp(D)>=0?(k.isub(D),N.isub(C)):(D.isub(k),C.isub(N))}return(ue=0===k.cmpn(1)?N:C).cmpn(0)<0&&ue.iadd(v),ue},d.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var k=this.clone(),D=v.clone();k.negative=0,D.negative=0;for(var N=0;k.isEven()&&D.isEven();N++)k.iushrn(1),D.iushrn(1);for(;;){for(;k.isEven();)k.iushrn(1);for(;D.isEven();)D.iushrn(1);var C=k.cmp(D);if(C<0){var a=k;k=D,D=a}else if(0===C||0===D.cmpn(1))break;k.isub(D)}return D.iushln(N)},d.prototype.invm=function(v){return this.egcd(v).a.umod(v)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(v){return this.words[0]&v},d.prototype.bincn=function(v){O("number"==typeof v);var k=v%26,D=(v-k)/26,N=1<>>26,this.words[a]=B&=67108863}return 0!==C&&(this.words[a]=C,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(v){var D,k=v<0;if(0!==this.negative&&!k)return-1;if(0===this.negative&&k)return 1;if(this._strip(),this.length>1)D=1;else{k&&(v=-v),O(v<=67108863,"Number is too big");var N=0|this.words[0];D=N===v?0:Nv.length)return 1;if(this.length=0;D--){var N=0|this.words[D],C=0|v.words[D];if(N!==C){NC&&(k=1);break}}return k},d.prototype.gtn=function(v){return 1===this.cmpn(v)},d.prototype.gt=function(v){return 1===this.cmp(v)},d.prototype.gten=function(v){return this.cmpn(v)>=0},d.prototype.gte=function(v){return this.cmp(v)>=0},d.prototype.ltn=function(v){return-1===this.cmpn(v)},d.prototype.lt=function(v){return-1===this.cmp(v)},d.prototype.lten=function(v){return this.cmpn(v)<=0},d.prototype.lte=function(v){return this.cmp(v)<=0},d.prototype.eqn=function(v){return 0===this.cmpn(v)},d.prototype.eq=function(v){return 0===this.cmp(v)},d.red=function(v){return new o(v)},d.prototype.toRed=function(v){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),v.convertTo(this)._forceRed(v)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(v){return this.red=v,this},d.prototype.forceRed=function(v){return O(!this.red,"Already a number in reduction context"),this._forceRed(v)},d.prototype.redAdd=function(v){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},d.prototype.redIAdd=function(v){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},d.prototype.redSub=function(v){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},d.prototype.redISub=function(v){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},d.prototype.redShl=function(v){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},d.prototype.redMul=function(v){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},d.prototype.redIMul=function(v){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(v){return O(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var W={k256:null,p224:null,p192:null,p25519:null};function G(M,v){this.name=M,this.p=new d(v,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function H(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function j(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function K(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function R(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function o(M){if("string"==typeof M){var v=d._prime(M);this.m=v.p,this.prime=v}else O(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}function y(M){o.call(this,M),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}G.prototype._tmp=function(){var v=new d(null);return v.words=new Array(Math.ceil(this.n/13)),v},G.prototype.ireduce=function(v){var D,k=v;do{this.split(k,this.tmp),D=(k=(k=this.imulK(k)).iadd(this.tmp)).bitLength()}while(D>this.n);var N=D0?k.isub(this.p):void 0!==k.strip?k.strip():k._strip(),k},G.prototype.split=function(v,k){v.iushrn(this.n,0,k)},G.prototype.imulK=function(v){return v.imul(this.k)},E(H,G),H.prototype.split=function(v,k){for(var D=4194303,N=Math.min(v.length,9),C=0;C>>22,a=B}v.words[C-10]=a>>>=22,v.length-=0===a&&v.length>10?10:9},H.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var k=0,D=0;D>>=26,v.words[D]=C,k=N}return 0!==k&&(v.words[v.length++]=k),v},d._prime=function(v){if(W[v])return W[v];var k;if("k256"===v)k=new H;else if("p224"===v)k=new j;else if("p192"===v)k=new K;else{if("p25519"!==v)throw new Error("Unknown prime "+v);k=new R}return W[v]=k,k},o.prototype._verify1=function(v){O(0===v.negative,"red works only with positives"),O(v.red,"red works only with red numbers")},o.prototype._verify2=function(v,k){O(0==(v.negative|k.negative),"red works only with positives"),O(v.red&&v.red===k.red,"red works only with red numbers")},o.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(b(v,v.umod(this.m)._forceRed(this)),v)},o.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},o.prototype.add=function(v,k){this._verify2(v,k);var D=v.add(k);return D.cmp(this.m)>=0&&D.isub(this.m),D._forceRed(this)},o.prototype.iadd=function(v,k){this._verify2(v,k);var D=v.iadd(k);return D.cmp(this.m)>=0&&D.isub(this.m),D},o.prototype.sub=function(v,k){this._verify2(v,k);var D=v.sub(k);return D.cmpn(0)<0&&D.iadd(this.m),D._forceRed(this)},o.prototype.isub=function(v,k){this._verify2(v,k);var D=v.isub(k);return D.cmpn(0)<0&&D.iadd(this.m),D},o.prototype.shl=function(v,k){return this._verify1(v),this.imod(v.ushln(k))},o.prototype.imul=function(v,k){return this._verify2(v,k),this.imod(v.imul(k))},o.prototype.mul=function(v,k){return this._verify2(v,k),this.imod(v.mul(k))},o.prototype.isqr=function(v){return this.imul(v,v.clone())},o.prototype.sqr=function(v){return this.mul(v,v)},o.prototype.sqrt=function(v){if(v.isZero())return v.clone();var k=this.m.andln(3);if(O(k%2==1),3===k){var D=this.m.add(new d(1)).iushrn(2);return this.pow(v,D)}for(var N=this.m.subn(1),C=0;!N.isZero()&&0===N.andln(1);)C++,N.iushrn(1);O(!N.isZero());var a=new d(1).toRed(this),B=a.redNeg(),Q=this.m.subn(1).iushrn(1),ee=this.m.bitLength();for(ee=new d(2*ee*ee).toRed(this);0!==this.pow(ee,Q).cmp(B);)ee.redIAdd(B);for(var ce=this.pow(ee,N),ue=this.pow(v,N.addn(1).iushrn(1)),we=this.pow(v,N),ae=C;0!==we.cmp(a);){for(var Te=we,le=0;0!==Te.cmp(a);le++)Te=Te.redSqr();O(le=0;C--){for(var ce=k.words[C],ue=ee-1;ue>=0;ue--){var we=ce>>ue&1;a!==N[0]&&(a=this.sqr(a)),0!==we||0!==B?(B<<=1,B|=we,(4==++Q||0===C&&0===ue)&&(a=this.mul(a,N[B]),Q=0,B=0)):Q=0}ee=26}return a},o.prototype.convertTo=function(v){var k=v.umod(this.m);return k===v?k.clone():k},o.prototype.convertFrom=function(v){var k=v.clone();return k.red=null,k},d.mont=function(v){return new y(v)},E(y,o),y.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},y.prototype.convertFrom=function(v){var k=this.imod(v.mul(this.rinv));return k.red=null,k},y.prototype.imul=function(v,k){if(v.isZero()||k.isZero())return v.words[0]=0,v.length=1,v;var D=v.imul(k),N=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=D.isub(N).iushrn(this.shift),a=C;return C.cmp(this.m)>=0?a=C.isub(this.m):C.cmpn(0)<0&&(a=C.iadd(this.m)),a._forceRed(this)},y.prototype.mul=function(v,k){if(v.isZero()||k.isZero())return new d(0)._forceRed(this);var D=v.mul(k),N=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=D.isub(N).iushrn(this.shift),a=C;return C.cmp(this.m)>=0?a=C.isub(this.m):C.cmpn(0)<0&&(a=C.iadd(this.m)),a._forceRed(this)},y.prototype.invm=function(v){return this.imod(v._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},23845:function(bt){bt.exports=function(be){var Y={};function ie(z){if(Y[z])return Y[z].exports;var O=Y[z]={i:z,l:!1,exports:{}};return be[z].call(O.exports,O,O.exports,ie),O.l=!0,O.exports}return ie.m=be,ie.c=Y,ie.d=function(z,O,E){ie.o(z,O)||Object.defineProperty(z,O,{enumerable:!0,get:E})},ie.r=function(z){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(z,"__esModule",{value:!0})},ie.t=function(z,O){if(1&O&&(z=ie(z)),8&O||4&O&&"object"==typeof z&&z&&z.__esModule)return z;var E=Object.create(null);if(ie.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:z}),2&O&&"string"!=typeof z)for(var d in z)ie.d(E,d,function(x){return z[x]}.bind(null,d));return E},ie.n=function(z){var O=z&&z.__esModule?function(){return z.default}:function(){return z};return ie.d(O,"a",O),O},ie.o=function(z,O){return Object.prototype.hasOwnProperty.call(z,O)},ie.p="",ie(ie.s=90)}({17:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var z=ie(18),O=function(){function E(){}return E.getFirstMatch=function(d,x){var f=x.match(d);return f&&f.length>0&&f[1]||""},E.getSecondMatch=function(d,x){var f=x.match(d);return f&&f.length>1&&f[2]||""},E.matchAndReturnConst=function(d,x,f){if(d.test(x))return f},E.getWindowsVersionName=function(d){switch(d){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},E.getMacOSVersionName=function(d){var x=d.split(".").splice(0,2).map(function(f){return parseInt(f,10)||0});if(x.push(0),10===x[0])switch(x[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},E.getAndroidVersionName=function(d){var x=d.split(".").splice(0,2).map(function(f){return parseInt(f,10)||0});if(x.push(0),!(1===x[0]&&x[1]<5))return 1===x[0]&&x[1]<6?"Cupcake":1===x[0]&&x[1]>=6?"Donut":2===x[0]&&x[1]<2?"Eclair":2===x[0]&&2===x[1]?"Froyo":2===x[0]&&x[1]>2?"Gingerbread":3===x[0]?"Honeycomb":4===x[0]&&x[1]<1?"Ice Cream Sandwich":4===x[0]&&x[1]<4?"Jelly Bean":4===x[0]&&x[1]>=4?"KitKat":5===x[0]?"Lollipop":6===x[0]?"Marshmallow":7===x[0]?"Nougat":8===x[0]?"Oreo":9===x[0]?"Pie":void 0},E.getVersionPrecision=function(d){return d.split(".").length},E.compareVersions=function(d,x,f){void 0===f&&(f=!1);var T=E.getVersionPrecision(d),g=E.getVersionPrecision(x),b=Math.max(T,g),l=0,h=E.map([d,x],function(u){var m=b-E.getVersionPrecision(u),_=u+new Array(m+1).join(".0");return E.map(_.split("."),function(w){return new Array(20-w.length).join("0")+w}).reverse()});for(f&&(l=b-Math.min(T,g)),b-=1;b>=l;){if(h[0][b]>h[1][b])return 1;if(h[0][b]===h[1][b]){if(b===l)return 0;b-=1}else if(h[0][b]1?g-1:0),l=1;l0){var S=Object.keys(u),I=x.default.find(S,function(H){return h.isOS(H)});if(I){var P=this.satisfies(u[I]);if(void 0!==P)return P}var L=x.default.find(S,function(H){return h.isPlatform(H)});if(L){var V=this.satisfies(u[L]);if(void 0!==V)return V}}if(w>0){var W=Object.keys(_),G=x.default.find(W,function(H){return h.isBrowser(H,!0)});if(void 0!==G)return this.compareVersion(_[G])}},b.isBrowser=function(l,h){void 0===h&&(h=!1);var u=this.getBrowserName().toLowerCase(),m=l.toLowerCase(),_=x.default.getBrowserTypeByAlias(m);return h&&_&&(m=_.toLowerCase()),m===u},b.compareVersion=function(l){var h=[0],u=l,m=!1,_=this.getBrowserVersion();if("string"==typeof _)return">"===l[0]||"<"===l[0]?(u=l.substr(1),"="===l[1]?(m=!0,u=l.substr(2)):h=[],h.push(">"===l[0]?1:-1)):"="===l[0]?u=l.substr(1):"~"===l[0]&&(m=!0,u=l.substr(1)),h.indexOf(x.default.compareVersions(_,u,m))>-1},b.isOS=function(l){return this.getOSName(!0)===String(l).toLowerCase()},b.isPlatform=function(l){return this.getPlatformType(!0)===String(l).toLowerCase()},b.isEngine=function(l){return this.getEngineName(!0)===String(l).toLowerCase()},b.is=function(l,h){return void 0===h&&(h=!1),this.isBrowser(l,h)||this.isOS(l)||this.isPlatform(l)},b.some=function(l){var h=this;return void 0===l&&(l=[]),l.some(function(u){return h.is(u)})},g}();Y.default=T,be.exports=Y.default},92:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var z,O=(z=ie(17))&&z.__esModule?z:{default:z},E=/version\/(\d+(\.?_?\d+)+)/i;Y.default=[{test:[/googlebot/i],describe:function(x){var f={name:"Googlebot"},T=O.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/opera/i],describe:function(x){var f={name:"Opera"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/opr\/|opios/i],describe:function(x){var f={name:"Opera"},T=O.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/SamsungBrowser/i],describe:function(x){var f={name:"Samsung Internet for Android"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/Whale/i],describe:function(x){var f={name:"NAVER Whale Browser"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/MZBrowser/i],describe:function(x){var f={name:"MZ Browser"},T=O.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/focus/i],describe:function(x){var f={name:"Focus"},T=O.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/swing/i],describe:function(x){var f={name:"Swing"},T=O.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/coast/i],describe:function(x){var f={name:"Opera Coast"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(x){var f={name:"Opera Touch"},T=O.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/yabrowser/i],describe:function(x){var f={name:"Yandex Browser"},T=O.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/ucbrowser/i],describe:function(x){var f={name:"UC Browser"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/Maxthon|mxios/i],describe:function(x){var f={name:"Maxthon"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/epiphany/i],describe:function(x){var f={name:"Epiphany"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/puffin/i],describe:function(x){var f={name:"Puffin"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/sleipnir/i],describe:function(x){var f={name:"Sleipnir"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/k-meleon/i],describe:function(x){var f={name:"K-Meleon"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/micromessenger/i],describe:function(x){var f={name:"WeChat"},T=O.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/qqbrowser/i],describe:function(x){var f={name:/qqbrowserlite/i.test(x)?"QQ Browser Lite":"QQ Browser"},T=O.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/msie|trident/i],describe:function(x){var f={name:"Internet Explorer"},T=O.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/\sedg\//i],describe:function(x){var f={name:"Microsoft Edge"},T=O.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/edg([ea]|ios)/i],describe:function(x){var f={name:"Microsoft Edge"},T=O.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/vivaldi/i],describe:function(x){var f={name:"Vivaldi"},T=O.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/seamonkey/i],describe:function(x){var f={name:"SeaMonkey"},T=O.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/sailfish/i],describe:function(x){var f={name:"Sailfish"},T=O.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,x);return T&&(f.version=T),f}},{test:[/silk/i],describe:function(x){var f={name:"Amazon Silk"},T=O.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/phantom/i],describe:function(x){var f={name:"PhantomJS"},T=O.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/slimerjs/i],describe:function(x){var f={name:"SlimerJS"},T=O.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(x){var f={name:"BlackBerry"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/(web|hpw)[o0]s/i],describe:function(x){var f={name:"WebOS Browser"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/bada/i],describe:function(x){var f={name:"Bada"},T=O.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/tizen/i],describe:function(x){var f={name:"Tizen"},T=O.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/qupzilla/i],describe:function(x){var f={name:"QupZilla"},T=O.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/firefox|iceweasel|fxios/i],describe:function(x){var f={name:"Firefox"},T=O.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/electron/i],describe:function(x){var f={name:"Electron"},T=O.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/MiuiBrowser/i],describe:function(x){var f={name:"Miui"},T=O.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/chromium/i],describe:function(x){var f={name:"Chromium"},T=O.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/chrome|crios|crmo/i],describe:function(x){var f={name:"Chrome"},T=O.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/GSA/i],describe:function(x){var f={name:"Google Search"},T=O.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:function(x){var f=!x.test(/like android/i),T=x.test(/android/i);return f&&T},describe:function(x){var f={name:"Android Browser"},T=O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/playstation 4/i],describe:function(x){var f={name:"PlayStation 4"},T=O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/safari|applewebkit/i],describe:function(x){var f={name:"Safari"},T=O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/.*/i],describe:function(x){var f=-1!==x.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:O.default.getFirstMatch(f,x),version:O.default.getSecondMatch(f,x)}}}],be.exports=Y.default},93:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var z,O=(z=ie(17))&&z.__esModule?z:{default:z},E=ie(18);Y.default=[{test:[/Roku\/DVP/],describe:function(x){var f=O.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,x);return{name:E.OS_MAP.Roku,version:f}}},{test:[/windows phone/i],describe:function(x){var f=O.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.WindowsPhone,version:f}}},{test:[/windows /i],describe:function(x){var f=O.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,x),T=O.default.getWindowsVersionName(f);return{name:E.OS_MAP.Windows,version:f,versionName:T}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(x){var f={name:E.OS_MAP.iOS},T=O.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,x);return T&&(f.version=T),f}},{test:[/macintosh/i],describe:function(x){var f=O.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,x).replace(/[_\s]/g,"."),T=O.default.getMacOSVersionName(f),g={name:E.OS_MAP.MacOS,version:f};return T&&(g.versionName=T),g}},{test:[/(ipod|iphone|ipad)/i],describe:function(x){var f=O.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,x).replace(/[_\s]/g,".");return{name:E.OS_MAP.iOS,version:f}}},{test:function(x){var f=!x.test(/like android/i),T=x.test(/android/i);return f&&T},describe:function(x){var f=O.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,x),T=O.default.getAndroidVersionName(f),g={name:E.OS_MAP.Android,version:f};return T&&(g.versionName=T),g}},{test:[/(web|hpw)[o0]s/i],describe:function(x){var f=O.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,x),T={name:E.OS_MAP.WebOS};return f&&f.length&&(T.version=f),T}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(x){var f=O.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,x)||O.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,x)||O.default.getFirstMatch(/\bbb(\d+)/i,x);return{name:E.OS_MAP.BlackBerry,version:f}}},{test:[/bada/i],describe:function(x){var f=O.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.Bada,version:f}}},{test:[/tizen/i],describe:function(x){var f=O.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.Tizen,version:f}}},{test:[/linux/i],describe:function(){return{name:E.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:E.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(x){var f=O.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.PlayStation4,version:f}}}],be.exports=Y.default},94:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var z,O=(z=ie(17))&&z.__esModule?z:{default:z},E=ie(18);Y.default=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(x){var f=O.default.getFirstMatch(/(can-l01)/i,x)&&"Nova",T={type:E.PLATFORMS_MAP.mobile,vendor:"Huawei"};return f&&(T.model=f),T}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet}}},{test:function(x){var f=x.test(/ipod|iphone/i),T=x.test(/like (ipod|iphone)/i);return f&&!T},describe:function(x){var f=O.default.getFirstMatch(/(ipod|iphone)/i,x);return{type:E.PLATFORMS_MAP.mobile,vendor:"Apple",model:f}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(x){return"blackberry"===x.getBrowserName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(x){return"bada"===x.getBrowserName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(x){return"windows phone"===x.getBrowserName()},describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(x){var f=Number(String(x.getOSVersion()).split(".")[0]);return"android"===x.getOSName(!0)&&f>=3},describe:function(){return{type:E.PLATFORMS_MAP.tablet}}},{test:function(x){return"android"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(x){return"macos"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(x){return"windows"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop}}},{test:function(x){return"linux"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop}}},{test:function(x){return"playstation 4"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.tv}}},{test:function(x){return"roku"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.tv}}}],be.exports=Y.default},95:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var z,O=(z=ie(17))&&z.__esModule?z:{default:z},E=ie(18);Y.default=[{test:function(x){return"microsoft edge"===x.getBrowserName(!0)},describe:function(x){if(/\sedg\//i.test(x))return{name:E.ENGINE_MAP.Blink};var f=O.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,x);return{name:E.ENGINE_MAP.EdgeHTML,version:f}}},{test:[/trident/i],describe:function(x){var f={name:E.ENGINE_MAP.Trident},T=O.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:function(x){return x.test(/presto/i)},describe:function(x){var f={name:E.ENGINE_MAP.Presto},T=O.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:function(x){var f=x.test(/gecko/i),T=x.test(/like gecko/i);return f&&!T},describe:function(x){var f={name:E.ENGINE_MAP.Gecko},T=O.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:E.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(x){var f={name:E.ENGINE_MAP.WebKit},T=O.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}}],be.exports=Y.default}})},34761:(bt,be,Y)=>{var ie;function z(E){this.rand=E}if(bt.exports=function(d){return ie||(ie=new z(null)),ie.generate(d)},bt.exports.Rand=z,z.prototype.generate=function(d){return this._rand(d)},z.prototype._rand=function(d){if(this.rand.getBytes)return this.rand.getBytes(d);for(var x=new Uint8Array(d),f=0;f{var ie=Y(55859).Buffer;function z(T){ie.isBuffer(T)||(T=ie.from(T));for(var g=T.length/4|0,b=new Array(g),l=0;l>>24]^m[I>>>16&255]^_[P>>>8&255]^w[255&L]^g[j++],W=u[I>>>24]^m[P>>>16&255]^_[L>>>8&255]^w[255&S]^g[j++],G=u[P>>>24]^m[L>>>16&255]^_[S>>>8&255]^w[255&I]^g[j++],H=u[L>>>24]^m[S>>>16&255]^_[I>>>8&255]^w[255&P]^g[j++],S=V,I=W,P=G,L=H;return V=(l[S>>>24]<<24|l[I>>>16&255]<<16|l[P>>>8&255]<<8|l[255&L])^g[j++],W=(l[I>>>24]<<24|l[P>>>16&255]<<16|l[L>>>8&255]<<8|l[255&S])^g[j++],G=(l[P>>>24]<<24|l[L>>>16&255]<<16|l[S>>>8&255]<<8|l[255&I])^g[j++],H=(l[L>>>24]<<24|l[S>>>16&255]<<16|l[I>>>8&255]<<8|l[255&P])^g[j++],[V>>>=0,W>>>=0,G>>>=0,H>>>=0]}var d=[0,1,2,4,8,16,32,64,128,27,54],x=function(){for(var T=new Array(256),g=0;g<256;g++)T[g]=g<128?g<<1:g<<1^283;for(var b=[],l=[],h=[[],[],[],[]],u=[[],[],[],[]],m=0,_=0,w=0;w<256;++w){var S=_^_<<1^_<<2^_<<3^_<<4;b[m]=S=S>>>8^255&S^99,l[S]=m;var I=T[m],P=T[I],L=T[P],V=257*T[S]^16843008*S;h[0][m]=V<<24|V>>>8,h[1][m]=V<<16|V>>>16,h[2][m]=V<<8|V>>>24,h[3][m]=V,u[0][S]=(V=16843009*L^65537*P^257*I^16843008*m)<<24|V>>>8,u[1][S]=V<<16|V>>>16,u[2][S]=V<<8|V>>>24,u[3][S]=V,0===m?m=_=1:(m=I^T[T[T[L^I]]],_^=T[T[_]])}return{SBOX:b,INV_SBOX:l,SUB_MIX:h,INV_SUB_MIX:u}}();function f(T){this._key=z(T),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var T=this._key,g=T.length,b=g+6,l=4*(b+1),h=[],u=0;u>>24)>>>24]<<24|x.SBOX[m>>>16&255]<<16|x.SBOX[m>>>8&255]<<8|x.SBOX[255&m],m^=d[u/g|0]<<24):g>6&&u%g==4&&(m=x.SBOX[m>>>24]<<24|x.SBOX[m>>>16&255]<<16|x.SBOX[m>>>8&255]<<8|x.SBOX[255&m]),h[u]=h[u-g]^m}for(var _=[],w=0;w>>24]]^x.INV_SUB_MIX[1][x.SBOX[I>>>16&255]]^x.INV_SUB_MIX[2][x.SBOX[I>>>8&255]]^x.INV_SUB_MIX[3][x.SBOX[255&I]]}this._nRounds=b,this._keySchedule=h,this._invKeySchedule=_},f.prototype.encryptBlockRaw=function(T){return E(T=z(T),this._keySchedule,x.SUB_MIX,x.SBOX,this._nRounds)},f.prototype.encryptBlock=function(T){var g=this.encryptBlockRaw(T),b=ie.allocUnsafe(16);return b.writeUInt32BE(g[0],0),b.writeUInt32BE(g[1],4),b.writeUInt32BE(g[2],8),b.writeUInt32BE(g[3],12),b},f.prototype.decryptBlock=function(T){var g=(T=z(T))[1];T[1]=T[3],T[3]=g;var b=E(T,this._invKeySchedule,x.INV_SUB_MIX,x.INV_SBOX,this._nRounds),l=ie.allocUnsafe(16);return l.writeUInt32BE(b[0],0),l.writeUInt32BE(b[3],4),l.writeUInt32BE(b[2],8),l.writeUInt32BE(b[1],12),l},f.prototype.scrub=function(){O(this._keySchedule),O(this._invKeySchedule),O(this._key)},bt.exports.AES=f},90295:(bt,be,Y)=>{var ie=Y(30875),z=Y(55859).Buffer,O=Y(65834),E=Y(59879),d=Y(24504),x=Y(33910),f=Y(61643);function b(l,h,u,m){O.call(this);var _=z.alloc(4,0);this._cipher=new ie.AES(h);var w=this._cipher.encryptBlock(_);this._ghash=new d(w),u=function(l,h,u){if(12===h.length)return l._finID=z.concat([h,z.from([0,0,0,1])]),z.concat([h,z.from([0,0,0,2])]);var m=new d(u),_=h.length,w=_%16;m.update(h),w&&m.update(z.alloc(w=16-w,0)),m.update(z.alloc(8,0));var S=8*_,I=z.alloc(8);I.writeUIntBE(S,0,8),m.update(I),l._finID=m.state;var P=z.from(l._finID);return f(P),P}(this,u,w),this._prev=z.from(u),this._cache=z.allocUnsafe(0),this._secCache=z.allocUnsafe(0),this._decrypt=m,this._alen=0,this._len=0,this._mode=l,this._authTag=null,this._called=!1}E(b,O),b.prototype._update=function(l){if(!this._called&&this._alen){var h=16-this._alen%16;h<16&&(h=z.alloc(h,0),this._ghash.update(h))}this._called=!0;var u=this._mode.encrypt(this,l);return this._ghash.update(this._decrypt?l:u),this._len+=l.length,u},b.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var l=x(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(l,h){var u=0;l.length!==h.length&&u++;for(var m=Math.min(l.length,h.length),_=0;_{var ie=Y(66481),z=Y(63617),O=Y(44946);be.createCipher=be.Cipher=ie.createCipher,be.createCipheriv=be.Cipheriv=ie.createCipheriv,be.createDecipher=be.Decipher=z.createDecipher,be.createDecipheriv=be.Decipheriv=z.createDecipheriv,be.listCiphers=be.getCiphers=function(){return Object.keys(O)}},63617:(bt,be,Y)=>{var ie=Y(90295),z=Y(55859).Buffer,O=Y(49396),E=Y(49223),d=Y(65834),x=Y(30875),f=Y(92367);function g(m,_,w){d.call(this),this._cache=new b,this._last=void 0,this._cipher=new x.AES(_),this._prev=z.from(w),this._mode=m,this._autopadding=!0}function b(){this.cache=z.allocUnsafe(0)}function h(m,_,w){var S=O[m.toLowerCase()];if(!S)throw new TypeError("invalid suite type");if("string"==typeof w&&(w=z.from(w)),"GCM"!==S.mode&&w.length!==S.iv)throw new TypeError("invalid iv length "+w.length);if("string"==typeof _&&(_=z.from(_)),_.length!==S.key/8)throw new TypeError("invalid key length "+_.length);return"stream"===S.type?new E(S.module,_,w,!0):"auth"===S.type?new ie(S.module,_,w,!0):new g(S.module,_,w)}Y(59879)(g,d),g.prototype._update=function(m){this._cache.add(m);for(var _,w,S=[];_=this._cache.get(this._autopadding);)w=this._mode.decrypt(this,_),S.push(w);return z.concat(S)},g.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return function(m){var _=m[15];if(_<1||_>16)throw new Error("unable to decrypt data");for(var w=-1;++w<_;)if(m[w+(16-_)]!==_)throw new Error("unable to decrypt data");if(16!==_)return m.slice(0,16-_)}(this._mode.decrypt(this,m));if(m)throw new Error("data not multiple of block length")},g.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this},b.prototype.add=function(m){this.cache=z.concat([this.cache,m])},b.prototype.get=function(m){var _;if(m){if(this.cache.length>16)return _=this.cache.slice(0,16),this.cache=this.cache.slice(16),_}else if(this.cache.length>=16)return _=this.cache.slice(0,16),this.cache=this.cache.slice(16),_;return null},b.prototype.flush=function(){if(this.cache.length)return this.cache},be.createDecipher=function(m,_){var w=O[m.toLowerCase()];if(!w)throw new TypeError("invalid suite type");var S=f(_,!1,w.key,w.iv);return h(m,S.key,S.iv)},be.createDecipheriv=h},66481:(bt,be,Y)=>{var ie=Y(49396),z=Y(90295),O=Y(55859).Buffer,E=Y(49223),d=Y(65834),x=Y(30875),f=Y(92367);function g(m,_,w){d.call(this),this._cache=new l,this._cipher=new x.AES(_),this._prev=O.from(w),this._mode=m,this._autopadding=!0}Y(59879)(g,d),g.prototype._update=function(m){this._cache.add(m);for(var _,w,S=[];_=this._cache.get();)w=this._mode.encrypt(this,_),S.push(w);return O.concat(S)};var b=O.alloc(16,16);function l(){this.cache=O.allocUnsafe(0)}function h(m,_,w){var S=ie[m.toLowerCase()];if(!S)throw new TypeError("invalid suite type");if("string"==typeof _&&(_=O.from(_)),_.length!==S.key/8)throw new TypeError("invalid key length "+_.length);if("string"==typeof w&&(w=O.from(w)),"GCM"!==S.mode&&w.length!==S.iv)throw new TypeError("invalid iv length "+w.length);return"stream"===S.type?new E(S.module,_,w):"auth"===S.type?new z(S.module,_,w):new g(S.module,_,w)}g.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return m=this._mode.encrypt(this,m),this._cipher.scrub(),m;if(!m.equals(b))throw this._cipher.scrub(),new Error("data not multiple of block length")},g.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this},l.prototype.add=function(m){this.cache=O.concat([this.cache,m])},l.prototype.get=function(){if(this.cache.length>15){var m=this.cache.slice(0,16);return this.cache=this.cache.slice(16),m}return null},l.prototype.flush=function(){for(var m=16-this.cache.length,_=O.allocUnsafe(m),w=-1;++w{var ie=Y(55859).Buffer,z=ie.alloc(16,0);function E(x){var f=ie.allocUnsafe(16);return f.writeUInt32BE(x[0]>>>0,0),f.writeUInt32BE(x[1]>>>0,4),f.writeUInt32BE(x[2]>>>0,8),f.writeUInt32BE(x[3]>>>0,12),f}function d(x){this.h=x,this.state=ie.alloc(16,0),this.cache=ie.allocUnsafe(0)}d.prototype.ghash=function(x){for(var f=-1;++f0;T--)x[T]=x[T]>>>1|(1&x[T-1])<<31;x[0]=x[0]>>>1,b&&(x[0]=x[0]^225<<24)}this.state=E(f)},d.prototype.update=function(x){this.cache=ie.concat([this.cache,x]);for(var f;this.cache.length>=16;)f=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(f)},d.prototype.final=function(x,f){return this.cache.length&&this.ghash(ie.concat([this.cache,z],16)),this.ghash(E([0,x,0,f])),this.state},bt.exports=d},61643:bt=>{bt.exports=function(Y){for(var z,ie=Y.length;ie--;){if(255!==(z=Y.readUInt8(ie))){z++,Y.writeUInt8(z,ie);break}Y.writeUInt8(0,ie)}}},64552:(bt,be,Y)=>{var ie=Y(33910);be.encrypt=function(z,O){var E=ie(O,z._prev);return z._prev=z._cipher.encryptBlock(E),z._prev},be.decrypt=function(z,O){var E=z._prev;z._prev=O;var d=z._cipher.decryptBlock(O);return ie(d,E)}},97606:(bt,be,Y)=>{var ie=Y(55859).Buffer,z=Y(33910);function O(E,d,x){var f=d.length,T=z(d,E._cache);return E._cache=E._cache.slice(f),E._prev=ie.concat([E._prev,x?d:T]),T}be.encrypt=function(E,d,x){for(var T,f=ie.allocUnsafe(0);d.length;){if(0===E._cache.length&&(E._cache=E._cipher.encryptBlock(E._prev),E._prev=ie.allocUnsafe(0)),!(E._cache.length<=d.length)){f=ie.concat([f,O(E,d,x)]);break}f=ie.concat([f,O(E,d.slice(0,T=E._cache.length),x)]),d=d.slice(T)}return f}},47850:(bt,be,Y)=>{var ie=Y(55859).Buffer;function z(E,d,x){for(var l,h,T=-1,b=0;++T<8;)b+=(128&(h=E._cipher.encryptBlock(E._prev)[0]^(l=d&1<<7-T?128:0)))>>T%8,E._prev=O(E._prev,x?l:h);return b}function O(E,d){var x=E.length,f=-1,T=ie.allocUnsafe(E.length);for(E=ie.concat([E,ie.from([d])]);++f>7;return T}be.encrypt=function(E,d,x){for(var f=d.length,T=ie.allocUnsafe(f),g=-1;++g{var ie=Y(55859).Buffer;function z(O,E,d){var f=O._cipher.encryptBlock(O._prev)[0]^E;return O._prev=ie.concat([O._prev.slice(1),ie.from([d?E:f])]),f}be.encrypt=function(O,E,d){for(var x=E.length,f=ie.allocUnsafe(x),T=-1;++T{var ie=Y(33910),z=Y(55859).Buffer,O=Y(61643);function E(x){var f=x._cipher.encryptBlockRaw(x._prev);return O(x._prev),f}be.encrypt=function(x,f){var T=Math.ceil(f.length/16),g=x._cache.length;x._cache=z.concat([x._cache,z.allocUnsafe(16*T)]);for(var b=0;b{be.encrypt=function(Y,ie){return Y._cipher.encryptBlock(ie)},be.decrypt=function(Y,ie){return Y._cipher.decryptBlock(ie)}},49396:(bt,be,Y)=>{var ie={ECB:Y(48562),CBC:Y(64552),CFB:Y(97606),CFB8:Y(56377),CFB1:Y(47850),OFB:Y(87461),CTR:Y(29306),GCM:Y(29306)},z=Y(44946);for(var O in z)z[O].module=ie[z[O].mode];bt.exports=z},87461:(bt,be,Y)=>{var ie=Y(33910);function z(O){return O._prev=O._cipher.encryptBlock(O._prev),O._prev}be.encrypt=function(O,E){for(;O._cache.length{var ie=Y(30875),z=Y(55859).Buffer,O=Y(65834);function d(x,f,T,g){O.call(this),this._cipher=new ie.AES(f),this._prev=z.from(T),this._cache=z.allocUnsafe(0),this._secCache=z.allocUnsafe(0),this._decrypt=g,this._mode=x}Y(59879)(d,O),d.prototype._update=function(x){return this._mode.encrypt(this,x,this._decrypt)},d.prototype._final=function(){this._cipher.scrub()},bt.exports=d},37991:(bt,be,Y)=>{var ie=Y(33796),z=Y(39586),O=Y(49396),E=Y(83908),d=Y(92367);function T(l,h,u){if(l=l.toLowerCase(),O[l])return z.createCipheriv(l,h,u);if(E[l])return new ie({key:h,iv:u,mode:l});throw new TypeError("invalid suite type")}function g(l,h,u){if(l=l.toLowerCase(),O[l])return z.createDecipheriv(l,h,u);if(E[l])return new ie({key:h,iv:u,mode:l,decrypt:!0});throw new TypeError("invalid suite type")}be.createCipher=be.Cipher=function(l,h){var u,m;if(l=l.toLowerCase(),O[l])u=O[l].key,m=O[l].iv;else{if(!E[l])throw new TypeError("invalid suite type");u=8*E[l].key,m=E[l].iv}var _=d(h,!1,u,m);return T(l,_.key,_.iv)},be.createCipheriv=be.Cipheriv=T,be.createDecipher=be.Decipher=function(l,h){var u,m;if(l=l.toLowerCase(),O[l])u=O[l].key,m=O[l].iv;else{if(!E[l])throw new TypeError("invalid suite type");u=8*E[l].key,m=E[l].iv}var _=d(h,!1,u,m);return g(l,_.key,_.iv)},be.createDecipheriv=be.Decipheriv=g,be.listCiphers=be.getCiphers=function(){return Object.keys(E).concat(z.getCiphers())}},33796:(bt,be,Y)=>{var ie=Y(65834),z=Y(68534),O=Y(59879),E=Y(55859).Buffer,d={"des-ede3-cbc":z.CBC.instantiate(z.EDE),"des-ede3":z.EDE,"des-ede-cbc":z.CBC.instantiate(z.EDE),"des-ede":z.EDE,"des-cbc":z.CBC.instantiate(z.DES),"des-ecb":z.DES};function x(f){ie.call(this);var b,T=f.mode.toLowerCase(),g=d[T];b=f.decrypt?"decrypt":"encrypt";var l=f.key;E.isBuffer(l)||(l=E.from(l)),("des-ede"===T||"des-ede-cbc"===T)&&(l=E.concat([l,l.slice(0,8)]));var h=f.iv;E.isBuffer(h)||(h=E.from(h)),this._des=g.create({key:l,iv:h,type:b})}d.des=d["des-cbc"],d.des3=d["des-ede3-cbc"],bt.exports=x,O(x,ie),x.prototype._update=function(f){return E.from(this._des.update(f))},x.prototype._final=function(){return E.from(this._des.final())}},83908:(bt,be)=>{be["des-ecb"]={key:8,iv:0},be["des-cbc"]=be.des={key:8,iv:8},be["des-ede3-cbc"]=be.des3={key:24,iv:8},be["des-ede3"]={key:24,iv:0},be["des-ede-cbc"]={key:16,iv:8},be["des-ede"]={key:16,iv:0}},85842:(bt,be,Y)=>{var ie=Y(62630),z=Y(16589);function E(x){var T,f=x.modulus.byteLength();do{T=new ie(z(f))}while(T.cmp(x.modulus)>=0||!T.umod(x.prime1)||!T.umod(x.prime2));return T}function d(x,f){var T=function(x){var f=E(x);return{blinder:f.toRed(ie.mont(x.modulus)).redPow(new ie(x.publicExponent)).fromRed(),unblinder:f.invm(x.modulus)}}(f),g=f.modulus.byteLength(),b=new ie(x).mul(T.blinder).umod(f.modulus),l=b.toRed(ie.mont(f.prime1)),h=b.toRed(ie.mont(f.prime2)),u=f.coefficient,m=f.prime1,_=f.prime2,w=l.redPow(f.exponent1).fromRed(),S=h.redPow(f.exponent2).fromRed(),I=w.isub(S).imul(u).umod(m).imul(_);return S.iadd(I).imul(T.unblinder).umod(f.modulus).toArrayLike(Buffer,"be",g)}d.getr=E,bt.exports=d},6380:(bt,be,Y)=>{bt.exports=Y(8770)},23566:(bt,be,Y)=>{var ie=Y(55859).Buffer,z=Y(12506),O=Y(18300),E=Y(59879),d=Y(7052),x=Y(48022),f=Y(8770);function T(h){O.Writable.call(this);var u=f[h];if(!u)throw new Error("Unknown message digest");this._hashType=u.hash,this._hash=z(u.hash),this._tag=u.id,this._signType=u.sign}function g(h){O.Writable.call(this);var u=f[h];if(!u)throw new Error("Unknown message digest");this._hash=z(u.hash),this._tag=u.id,this._signType=u.sign}function b(h){return new T(h)}function l(h){return new g(h)}Object.keys(f).forEach(function(h){f[h].id=ie.from(f[h].id,"hex"),f[h.toLowerCase()]=f[h]}),E(T,O.Writable),T.prototype._write=function(u,m,_){this._hash.update(u),_()},T.prototype.update=function(u,m){return"string"==typeof u&&(u=ie.from(u,m)),this._hash.update(u),this},T.prototype.sign=function(u,m){this.end();var _=this._hash.digest(),w=d(_,u,this._hashType,this._signType,this._tag);return m?w.toString(m):w},E(g,O.Writable),g.prototype._write=function(u,m,_){this._hash.update(u),_()},g.prototype.update=function(u,m){return"string"==typeof u&&(u=ie.from(u,m)),this._hash.update(u),this},g.prototype.verify=function(u,m,_){"string"==typeof m&&(m=ie.from(m,_)),this.end();var w=this._hash.digest();return x(m,w,u,this._signType,this._tag)},bt.exports={Sign:b,Verify:l,createSign:b,createVerify:l}},7052:(bt,be,Y)=>{var ie=Y(55859).Buffer,z=Y(85903),O=Y(85842),E=Y(5247).ec,d=Y(62630),x=Y(81997),f=Y(1308);function h(S,I,P,L){if((S=ie.from(S.toArray())).length0&&P.ishrn(L),P}function _(S,I,P){var L,V;do{for(L=ie.alloc(0);8*L.length{var ie=Y(55859).Buffer,z=Y(62630),O=Y(5247).ec,E=Y(81997),d=Y(1308);function g(b,l){if(b.cmpn(0)<=0)throw new Error("invalid sig");if(b.cmp(l)>=l)throw new Error("invalid sig")}bt.exports=function(b,l,h,u,m){var _=E(h);if("ec"===_.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(b,l,h){var u=d[h.data.algorithm.curve.join(".")];if(!u)throw new Error("unknown curve "+h.data.algorithm.curve.join("."));return new O(u).verify(l,b,h.data.subjectPrivateKey.data)}(b,l,_)}if("dsa"===_.type){if("dsa"!==u)throw new Error("wrong public key type");return function(b,l,h){var u=h.data.p,m=h.data.q,_=h.data.g,w=h.data.pub_key,S=E.signature.decode(b,"der"),I=S.s,P=S.r;g(I,m),g(P,m);var L=z.mont(u),V=I.invm(m);return 0===_.toRed(L).redPow(new z(l).mul(V).mod(m)).fromRed().mul(w.toRed(L).redPow(P.mul(V).mod(m)).fromRed()).mod(u).mod(m).cmp(P)}(b,l,_)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");l=ie.concat([m,l]);for(var w=_.modulus.byteLength(),S=[1],I=0;l.length+S.length+2{bt.exports=function(Y,ie){for(var z=Math.min(Y.length,ie.length),O=new Buffer(z),E=0;E{"use strict";var ie=Y(96434),z=Y(12658),O="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;be.Buffer=f,be.SlowBuffer=function(ke){return+ke!=ke&&(ke=0),f.alloc(+ke)},be.INSPECT_MAX_BYTES=50;var E=2147483647;function x(ke){if(ke>E)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var me=new Uint8Array(ke);return Object.setPrototypeOf(me,f.prototype),me}function f(ke,me,Ee){if("number"==typeof ke){if("string"==typeof me)throw new TypeError('The "string" argument must be of type string. Received type number');return l(ke)}return T(ke,me,Ee)}function T(ke,me,Ee){if("string"==typeof ke)return function(ke,me){if(("string"!=typeof me||""===me)&&(me="utf8"),!f.isEncoding(me))throw new TypeError("Unknown encoding: "+me);var Ee=0|P(ke,me),ze=x(Ee),Ve=ze.write(ke,me);return Ve!==Ee&&(ze=ze.slice(0,Ve)),ze}(ke,me);if(ArrayBuffer.isView(ke))return function(ke){if(_e(ke,Uint8Array)){var me=new Uint8Array(ke);return _(me.buffer,me.byteOffset,me.byteLength)}return u(ke)}(ke);if(null==ke)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(_e(ke,ArrayBuffer)||ke&&_e(ke.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(_e(ke,SharedArrayBuffer)||ke&&_e(ke.buffer,SharedArrayBuffer)))return _(ke,me,Ee);if("number"==typeof ke)throw new TypeError('The "value" argument must not be of type number. Received type number');var ze=ke.valueOf&&ke.valueOf();if(null!=ze&&ze!==ke)return f.from(ze,me,Ee);var Ve=function(ke){if(f.isBuffer(ke)){var me=0|S(ke.length),Ee=x(me);return 0===Ee.length||ke.copy(Ee,0,0,me),Ee}return void 0!==ke.length?"number"!=typeof ke.length||xe(ke.length)?x(0):u(ke):"Buffer"===ke.type&&Array.isArray(ke.data)?u(ke.data):void 0}(ke);if(Ve)return Ve;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof ke[Symbol.toPrimitive])return f.from(ke[Symbol.toPrimitive]("string"),me,Ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}function g(ke){if("number"!=typeof ke)throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function l(ke){return g(ke),x(ke<0?0:0|S(ke))}function u(ke){for(var me=ke.length<0?0:0|S(ke.length),Ee=x(me),ze=0;ze=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return 0|ke}function P(ke,me){if(f.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||_e(ke,ArrayBuffer))return ke.byteLength;if("string"!=typeof ke)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var Ee=ke.length,ze=arguments.length>2&&!0===arguments[2];if(!ze&&0===Ee)return 0;for(var Ve=!1;;)switch(me){case"ascii":case"latin1":case"binary":return Ee;case"utf8":case"utf-8":return Te(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ee;case"hex":return Ee>>>1;case"base64":return ne(ke).length;default:if(Ve)return ze?-1:Te(ke).length;me=(""+me).toLowerCase(),Ve=!0}}function L(ke,me,Ee){var ze=!1;if((void 0===me||me<0)&&(me=0),me>this.length||((void 0===Ee||Ee>this.length)&&(Ee=this.length),Ee<=0)||(Ee>>>=0)<=(me>>>=0))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return C(this,me,Ee);case"utf8":case"utf-8":return M(this,me,Ee);case"ascii":return D(this,me,Ee);case"latin1":case"binary":return N(this,me,Ee);case"base64":return y(this,me,Ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,me,Ee);default:if(ze)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ze=!0}}function V(ke,me,Ee){var ze=ke[me];ke[me]=ke[Ee],ke[Ee]=ze}function W(ke,me,Ee,ze,Ve){if(0===ke.length)return-1;if("string"==typeof Ee?(ze=Ee,Ee=0):Ee>2147483647?Ee=2147483647:Ee<-2147483648&&(Ee=-2147483648),xe(Ee=+Ee)&&(Ee=Ve?0:ke.length-1),Ee<0&&(Ee=ke.length+Ee),Ee>=ke.length){if(Ve)return-1;Ee=ke.length-1}else if(Ee<0){if(!Ve)return-1;Ee=0}if("string"==typeof me&&(me=f.from(me,ze)),f.isBuffer(me))return 0===me.length?-1:G(ke,me,Ee,ze,Ve);if("number"==typeof me)return me&=255,"function"==typeof Uint8Array.prototype.indexOf?Ve?Uint8Array.prototype.indexOf.call(ke,me,Ee):Uint8Array.prototype.lastIndexOf.call(ke,me,Ee):G(ke,[me],Ee,ze,Ve);throw new TypeError("val must be string, number or Buffer")}function G(ke,me,Ee,ze,Ve){var wt,nt=1,tt=ke.length,mt=me.length;if(void 0!==ze&&("ucs2"===(ze=String(ze).toLowerCase())||"ucs-2"===ze||"utf16le"===ze||"utf-16le"===ze)){if(ke.length<2||me.length<2)return-1;nt=2,tt/=2,mt/=2,Ee/=2}function ht(gt,St){return 1===nt?gt[St]:gt.readUInt16BE(St*nt)}if(Ve){var Pt=-1;for(wt=Ee;wttt&&(Ee=tt-mt),wt=Ee;wt>=0;wt--){for(var st=!0,Ye=0;YeVe&&(ze=Ve):ze=Ve;var nt=me.length;ze>nt/2&&(ze=nt/2);for(var tt=0;tt>8,nt.push(Ee%256),nt.push(ze);return nt}(me,ke.length-Ee),ke,Ee,ze)}function y(ke,me,Ee){return ie.fromByteArray(0===me&&Ee===ke.length?ke:ke.slice(me,Ee))}function M(ke,me,Ee){Ee=Math.min(ke.length,Ee);for(var ze=[],Ve=me;Ve239?4:nt>223?3:nt>191?2:1;if(Ve+mt<=Ee)switch(mt){case 1:nt<128&&(tt=nt);break;case 2:128==(192&(ht=ke[Ve+1]))&&(st=(31&nt)<<6|63&ht)>127&&(tt=st);break;case 3:wt=ke[Ve+2],128==(192&(ht=ke[Ve+1]))&&128==(192&wt)&&(st=(15&nt)<<12|(63&ht)<<6|63&wt)>2047&&(st<55296||st>57343)&&(tt=st);break;case 4:wt=ke[Ve+2],Pt=ke[Ve+3],128==(192&(ht=ke[Ve+1]))&&128==(192&wt)&&128==(192&Pt)&&(st=(15&nt)<<18|(63&ht)<<12|(63&wt)<<6|63&Pt)>65535&&st<1114112&&(tt=st)}null===tt?(tt=65533,mt=1):tt>65535&&(ze.push((tt-=65536)>>>10&1023|55296),tt=56320|1023&tt),ze.push(tt),Ve+=mt}return function(ke){var me=ke.length;if(me<=v)return String.fromCharCode.apply(String,ke);for(var Ee="",ze=0;zeVe.length?f.from(tt).copy(Ve,nt):Uint8Array.prototype.set.call(Ve,tt,nt);else{if(!f.isBuffer(tt))throw new TypeError('"list" argument must be an Array of Buffers');tt.copy(Ve,nt)}nt+=tt.length}return Ve},f.byteLength=P,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var me=this.length;if(me%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ee=0;EeEe&&(me+=" ... "),""},O&&(f.prototype[O]=f.prototype.inspect),f.prototype.compare=function(me,Ee,ze,Ve,nt){if(_e(me,Uint8Array)&&(me=f.from(me,me.offset,me.byteLength)),!f.isBuffer(me))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof me);if(void 0===Ee&&(Ee=0),void 0===ze&&(ze=me?me.length:0),void 0===Ve&&(Ve=0),void 0===nt&&(nt=this.length),Ee<0||ze>me.length||Ve<0||nt>this.length)throw new RangeError("out of range index");if(Ve>=nt&&Ee>=ze)return 0;if(Ve>=nt)return-1;if(Ee>=ze)return 1;if(this===me)return 0;for(var tt=(nt>>>=0)-(Ve>>>=0),mt=(ze>>>=0)-(Ee>>>=0),ht=Math.min(tt,mt),wt=this.slice(Ve,nt),Pt=me.slice(Ee,ze),st=0;st>>=0,isFinite(ze)?(ze>>>=0,void 0===Ve&&(Ve="utf8")):(Ve=ze,ze=void 0)}var nt=this.length-Ee;if((void 0===ze||ze>nt)&&(ze=nt),me.length>0&&(ze<0||Ee<0)||Ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");for(var tt=!1;;)switch(Ve){case"hex":return H(this,me,Ee,ze);case"utf8":case"utf-8":return j(this,me,Ee,ze);case"ascii":case"latin1":case"binary":return K(this,me,Ee,ze);case"base64":return R(this,me,Ee,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,me,Ee,ze);default:if(tt)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).toLowerCase(),tt=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var v=4096;function D(ke,me,Ee){var ze="";Ee=Math.min(ke.length,Ee);for(var Ve=me;Veze)&&(Ee=ze);for(var Ve="",nt=me;ntEe)throw new RangeError("Trying to access beyond buffer length")}function Q(ke,me,Ee,ze,Ve,nt){if(!f.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(me>Ve||meke.length)throw new RangeError("Index out of range")}function ee(ke,me,Ee,ze,Ve,nt){if(Ee+ze>ke.length)throw new RangeError("Index out of range");if(Ee<0)throw new RangeError("Index out of range")}function ce(ke,me,Ee,ze,Ve){return me=+me,Ee>>>=0,Ve||ee(ke,0,Ee,4),z.write(ke,me,Ee,ze,23,4),Ee+4}function ue(ke,me,Ee,ze,Ve){return me=+me,Ee>>>=0,Ve||ee(ke,0,Ee,8),z.write(ke,me,Ee,ze,52,8),Ee+8}f.prototype.slice=function(me,Ee){var ze=this.length;(me=~~me)<0?(me+=ze)<0&&(me=0):me>ze&&(me=ze),(Ee=void 0===Ee?ze:~~Ee)<0?(Ee+=ze)<0&&(Ee=0):Ee>ze&&(Ee=ze),Ee>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=this[me],nt=1,tt=0;++tt>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=this[me+--Ee],nt=1;Ee>0&&(nt*=256);)Ve+=this[me+--Ee]*nt;return Ve},f.prototype.readUint8=f.prototype.readUInt8=function(me,Ee){return me>>>=0,Ee||B(me,1,this.length),this[me]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(me,Ee){return me>>>=0,Ee||B(me,2,this.length),this[me]|this[me+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(me,Ee){return me>>>=0,Ee||B(me,2,this.length),this[me]<<8|this[me+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),(this[me]|this[me+1]<<8|this[me+2]<<16)+16777216*this[me+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),16777216*this[me]+(this[me+1]<<16|this[me+2]<<8|this[me+3])},f.prototype.readIntLE=function(me,Ee,ze){me>>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=this[me],nt=1,tt=0;++tt=(nt*=128)&&(Ve-=Math.pow(2,8*Ee)),Ve},f.prototype.readIntBE=function(me,Ee,ze){me>>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=Ee,nt=1,tt=this[me+--Ve];Ve>0&&(nt*=256);)tt+=this[me+--Ve]*nt;return tt>=(nt*=128)&&(tt-=Math.pow(2,8*Ee)),tt},f.prototype.readInt8=function(me,Ee){return me>>>=0,Ee||B(me,1,this.length),128&this[me]?-1*(255-this[me]+1):this[me]},f.prototype.readInt16LE=function(me,Ee){me>>>=0,Ee||B(me,2,this.length);var ze=this[me]|this[me+1]<<8;return 32768&ze?4294901760|ze:ze},f.prototype.readInt16BE=function(me,Ee){me>>>=0,Ee||B(me,2,this.length);var ze=this[me+1]|this[me]<<8;return 32768&ze?4294901760|ze:ze},f.prototype.readInt32LE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),this[me]|this[me+1]<<8|this[me+2]<<16|this[me+3]<<24},f.prototype.readInt32BE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),this[me]<<24|this[me+1]<<16|this[me+2]<<8|this[me+3]},f.prototype.readFloatLE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),z.read(this,me,!0,23,4)},f.prototype.readFloatBE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),z.read(this,me,!1,23,4)},f.prototype.readDoubleLE=function(me,Ee){return me>>>=0,Ee||B(me,8,this.length),z.read(this,me,!0,52,8)},f.prototype.readDoubleBE=function(me,Ee){return me>>>=0,Ee||B(me,8,this.length),z.read(this,me,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(me,Ee,ze,Ve){me=+me,Ee>>>=0,ze>>>=0,Ve||Q(this,me,Ee,ze,Math.pow(2,8*ze)-1,0);var tt=1,mt=0;for(this[Ee]=255&me;++mt>>=0,ze>>>=0,Ve||Q(this,me,Ee,ze,Math.pow(2,8*ze)-1,0);var tt=ze-1,mt=1;for(this[Ee+tt]=255&me;--tt>=0&&(mt*=256);)this[Ee+tt]=me/mt&255;return Ee+ze},f.prototype.writeUint8=f.prototype.writeUInt8=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,1,255,0),this[Ee]=255&me,Ee+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,65535,0),this[Ee]=255&me,this[Ee+1]=me>>>8,Ee+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,65535,0),this[Ee]=me>>>8,this[Ee+1]=255&me,Ee+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,4294967295,0),this[Ee+3]=me>>>24,this[Ee+2]=me>>>16,this[Ee+1]=me>>>8,this[Ee]=255&me,Ee+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,4294967295,0),this[Ee]=me>>>24,this[Ee+1]=me>>>16,this[Ee+2]=me>>>8,this[Ee+3]=255&me,Ee+4},f.prototype.writeIntLE=function(me,Ee,ze,Ve){if(me=+me,Ee>>>=0,!Ve){var nt=Math.pow(2,8*ze-1);Q(this,me,Ee,ze,nt-1,-nt)}var tt=0,mt=1,ht=0;for(this[Ee]=255&me;++tt>0)-ht&255;return Ee+ze},f.prototype.writeIntBE=function(me,Ee,ze,Ve){if(me=+me,Ee>>>=0,!Ve){var nt=Math.pow(2,8*ze-1);Q(this,me,Ee,ze,nt-1,-nt)}var tt=ze-1,mt=1,ht=0;for(this[Ee+tt]=255&me;--tt>=0&&(mt*=256);)me<0&&0===ht&&0!==this[Ee+tt+1]&&(ht=1),this[Ee+tt]=(me/mt>>0)-ht&255;return Ee+ze},f.prototype.writeInt8=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,1,127,-128),me<0&&(me=255+me+1),this[Ee]=255&me,Ee+1},f.prototype.writeInt16LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,32767,-32768),this[Ee]=255&me,this[Ee+1]=me>>>8,Ee+2},f.prototype.writeInt16BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,32767,-32768),this[Ee]=me>>>8,this[Ee+1]=255&me,Ee+2},f.prototype.writeInt32LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,2147483647,-2147483648),this[Ee]=255&me,this[Ee+1]=me>>>8,this[Ee+2]=me>>>16,this[Ee+3]=me>>>24,Ee+4},f.prototype.writeInt32BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,2147483647,-2147483648),me<0&&(me=4294967295+me+1),this[Ee]=me>>>24,this[Ee+1]=me>>>16,this[Ee+2]=me>>>8,this[Ee+3]=255&me,Ee+4},f.prototype.writeFloatLE=function(me,Ee,ze){return ce(this,me,Ee,!0,ze)},f.prototype.writeFloatBE=function(me,Ee,ze){return ce(this,me,Ee,!1,ze)},f.prototype.writeDoubleLE=function(me,Ee,ze){return ue(this,me,Ee,!0,ze)},f.prototype.writeDoubleBE=function(me,Ee,ze){return ue(this,me,Ee,!1,ze)},f.prototype.copy=function(me,Ee,ze,Ve){if(!f.isBuffer(me))throw new TypeError("argument should be a Buffer");if(ze||(ze=0),!Ve&&0!==Ve&&(Ve=this.length),Ee>=me.length&&(Ee=me.length),Ee||(Ee=0),Ve>0&&Ve=this.length)throw new RangeError("Index out of range");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),me.length-Ee>>=0,ze=void 0===ze?this.length:ze>>>0,me||(me=0),"number"==typeof me)for(tt=Ee;tt55295&&Ee<57344){if(!Ve){if(Ee>56319){(me-=3)>-1&&nt.push(239,191,189);continue}if(tt+1===ze){(me-=3)>-1&&nt.push(239,191,189);continue}Ve=Ee;continue}if(Ee<56320){(me-=3)>-1&&nt.push(239,191,189),Ve=Ee;continue}Ee=65536+(Ve-55296<<10|Ee-56320)}else Ve&&(me-=3)>-1&&nt.push(239,191,189);if(Ve=null,Ee<128){if((me-=1)<0)break;nt.push(Ee)}else if(Ee<2048){if((me-=2)<0)break;nt.push(Ee>>6|192,63&Ee|128)}else if(Ee<65536){if((me-=3)<0)break;nt.push(Ee>>12|224,Ee>>6&63|128,63&Ee|128)}else{if(!(Ee<1114112))throw new Error("Invalid code point");if((me-=4)<0)break;nt.push(Ee>>18|240,Ee>>12&63|128,Ee>>6&63|128,63&Ee|128)}}return nt}function ne(ke){return ie.toByteArray(function(ke){if((ke=(ke=ke.split("=")[0]).trim().replace(we,"")).length<2)return"";for(;ke.length%4!=0;)ke+="=";return ke}(ke))}function pe(ke,me,Ee,ze){for(var Ve=0;Ve=me.length||Ve>=ke.length);++Ve)me[Ve+Ee]=ke[Ve];return Ve}function _e(ke,me){return ke instanceof me||null!=ke&&null!=ke.constructor&&null!=ke.constructor.name&&ke.constructor.name===me.name}function xe(ke){return ke!=ke}var Ce=function(){for(var ke="0123456789abcdef",me=new Array(256),Ee=0;Ee<16;++Ee)for(var ze=16*Ee,Ve=0;Ve<16;++Ve)me[ze+Ve]=ke[Ee]+ke[Ve];return me}()},19568:(bt,be,Y)=>{"use strict";var ie=Y(18540),z=Y(60044),O=z(ie("String.prototype.indexOf"));bt.exports=function(d,x){var f=ie(d,!!x);return"function"==typeof f&&O(d,".prototype.")>-1?z(f):f}},60044:(bt,be,Y)=>{"use strict";var ie=Y(75396),z=Y(18540),O=z("%Function.prototype.apply%"),E=z("%Function.prototype.call%"),d=z("%Reflect.apply%",!0)||ie.call(E,O),x=z("%Object.getOwnPropertyDescriptor%",!0),f=z("%Object.defineProperty%",!0),T=z("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}bt.exports=function(l){var h=d(ie,E,arguments);if(x&&f){var u=x(h,"length");u.configurable&&f(h,"length",{value:1+T(0,l.length-(arguments.length-1))})}return h};var g=function(){return d(ie,O,arguments)};f?f(bt.exports,"apply",{value:g}):bt.exports.apply=g},65834:(bt,be,Y)=>{var ie=Y(55859).Buffer,z=Y(36917).Transform,O=Y(32519).s;function d(x){z.call(this),this.hashMode="string"==typeof x,this.hashMode?this[x]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Y(59879)(d,z),d.prototype.update=function(x,f,T){"string"==typeof x&&(x=ie.from(x,f));var g=this._update(x);return this.hashMode?this:(T&&(g=this._toString(g,T)),g)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(x,f,T){var g;try{this.hashMode?this._update(x):this.push(this._update(x))}catch(b){g=b}finally{T(g)}},d.prototype._flush=function(x){var f;try{this.push(this.__final())}catch(T){f=T}x(f)},d.prototype._finalOrDigest=function(x){var f=this.__final()||ie.alloc(0);return x&&(f=this._toString(f,x,!0)),f},d.prototype._toString=function(x,f,T){if(this._decoder||(this._decoder=new O(f),this._encoding=f),this._encoding!==f)throw new Error("can't switch encodings");var g=this._decoder.write(x);return T&&(g+=this._decoder.end()),g},bt.exports=d},84892:(bt,be,Y)=>{var ie=Y(5247),z=Y(96479);bt.exports=function(f){return new E(f)};var O={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function E(x){this.curveType=O[x],this.curveType||(this.curveType={name:x}),this.curve=new ie.ec(this.curveType.name),this.keys=void 0}function d(x,f,T){Array.isArray(x)||(x=x.toArray());var g=new Buffer(x);if(T&&g.length=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Yr=0|k[3],Ln=8191&Yr,Bn=Yr>>>13,$r=0|k[4],Gn=8191&$r,bn=$r>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,Gn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,Gn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,Gn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,Gn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,Gn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,Gn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,Gn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,Gn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,Gn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,Gn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,Gn),a=(a=Math.imul(St,bn))+Math.imul(Wt,Gn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},12506:(bt,be,Y)=>{"use strict";var ie=Y(59879),z=Y(53264),O=Y(75207),E=Y(45829),d=Y(65834);function x(f){d.call(this,"digest"),this._hash=f}ie(x,d),x.prototype._update=function(f){this._hash.update(f)},x.prototype._final=function(){return this._hash.digest()},bt.exports=function(T){return"md5"===(T=T.toLowerCase())?new z:"rmd160"===T||"ripemd160"===T?new O:new x(E(T))}},84464:(bt,be,Y)=>{var ie=Y(53264);bt.exports=function(z){return(new ie).update(z).digest()}},85903:(bt,be,Y)=>{"use strict";var ie=Y(59879),z=Y(43715),O=Y(65834),E=Y(55859).Buffer,d=Y(84464),x=Y(75207),f=Y(45829),T=E.alloc(128);function g(b,l){O.call(this,"digest"),"string"==typeof l&&(l=E.from(l));var h="sha512"===b||"sha384"===b?128:64;this._alg=b,this._key=l,l.length>h?l=("rmd160"===b?new x:f(b)).update(l).digest():l.length{"use strict";var ie=Y(59879),z=Y(55859).Buffer,O=Y(65834),E=z.alloc(128),d=64;function x(f,T){O.call(this,"digest"),"string"==typeof T&&(T=z.from(T)),this._alg=f,this._key=T,T.length>d?T=f(T):T.length-1};function b(y){if("string"!=typeof y&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function l(y){return"string"!=typeof y&&(y=String(y)),y}function h(y){var M={next:function(){var v=y.shift();return{done:void 0===v,value:v}}};return x_iterable&&(M[Symbol.iterator]=function(){return M}),M}function u(y){this.map={},y instanceof u?y.forEach(function(M,v){this.append(v,M)},this):Array.isArray(y)?y.forEach(function(M){this.append(M[0],M[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(M){this.append(M,y[M])},this)}function m(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function _(y){return new Promise(function(M,v){y.onload=function(){M(y.result)},y.onerror=function(){v(y.error)}})}function w(y){var M=new FileReader,v=_(M);return M.readAsArrayBuffer(y),v}function P(y){if(y.slice)return y.slice(0);var M=new Uint8Array(y.byteLength);return M.set(new Uint8Array(y)),M.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(y){this._bodyInit=y,y?"string"==typeof y?this._bodyText=y:x_blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:x_formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:x_searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():x_arrayBuffer&&x_blob&&function(y){return y&&DataView.prototype.isPrototypeOf(y)}(y)?(this._bodyArrayBuffer=P(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):x_arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||g(y))?this._bodyArrayBuffer=P(y):this._bodyText=y=Object.prototype.toString.call(y):this._bodyText="",this.headers.get("content-type")||("string"==typeof y?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):x_searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},x_blob&&(this.blob=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(w)}),this.text=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return function(y){var M=new FileReader,v=_(M);return M.readAsText(y),v}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(y){for(var M=new Uint8Array(y),v=new Array(M.length),k=0;k-1?M:y}(M.method||this.method||"GET"),this.mode=M.mode||this.mode||null,this.signal=M.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&v)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(v)}function H(y){var M=new FormData;return y.trim().split("&").forEach(function(v){if(v){var k=v.split("="),D=k.shift().replace(/\+/g," "),N=k.join("=").replace(/\+/g," ");M.append(decodeURIComponent(D),decodeURIComponent(N))}}),M}function j(y){var M=new u;return y.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(k){var D=k.split(":"),N=D.shift().trim();if(N){var C=D.join(":").trim();M.append(N,C)}}),M}function K(y,M){M||(M={}),this.type="default",this.status=void 0===M.status?200:M.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in M?M.statusText:"OK",this.headers=new u(M.headers),this.url=M.url||"",this._initBody(y)}G.prototype.clone=function(){return new G(this,{body:this._bodyInit})},L.call(G.prototype),L.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},K.error=function(){var y=new K(null,{status:0,statusText:""});return y.type="error",y};var R=[301,302,303,307,308];K.redirect=function(y,M){if(-1===R.indexOf(M))throw new RangeError("Invalid status code");return new K(null,{status:M,headers:{location:y}})},d.DOMException=O.DOMException;try{new d.DOMException}catch{d.DOMException=function(M,v){this.message=M,this.name=v;var k=Error(M);this.stack=k.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function o(y,M){return new Promise(function(v,k){var D=new G(y,M);if(D.signal&&D.signal.aborted)return k(new d.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function C(){N.abort()}N.onload=function(){var a={status:N.status,statusText:N.statusText,headers:j(N.getAllResponseHeaders()||"")};a.url="responseURL"in N?N.responseURL:a.headers.get("X-Request-URL"),v(new K("response"in N?N.response:N.responseText,a))},N.onerror=function(){k(new TypeError("Network request failed"))},N.ontimeout=function(){k(new TypeError("Network request failed"))},N.onabort=function(){k(new d.DOMException("Aborted","AbortError"))},N.open(D.method,D.url,!0),"include"===D.credentials?N.withCredentials=!0:"omit"===D.credentials&&(N.withCredentials=!1),"responseType"in N&&x_blob&&(N.responseType="blob"),D.headers.forEach(function(a,B){N.setRequestHeader(B,a)}),D.signal&&(D.signal.addEventListener("abort",C),N.onreadystatechange=function(){4===N.readyState&&D.signal.removeEventListener("abort",C)}),N.send(void 0===D._bodyInit?null:D._bodyInit)})}o.polyfill=!0,O.fetch||(O.fetch=o,O.Headers=u,O.Request=G,O.Response=K),d.Headers=u,d.Request=G,d.Response=K,d.fetch=o,Object.defineProperty(d,"__esModule",{value:!0})}({}),ie.fetch.ponyfill=!0,delete ie.fetch.polyfill;var z=ie;(be=z.fetch).default=z.fetch,be.fetch=z.fetch,be.Headers=z.Headers,be.Request=z.Request,be.Response=z.Response,bt.exports=be},19726:(bt,be,Y)=>{"use strict";be.randomBytes=be.rng=be.pseudoRandomBytes=be.prng=Y(16589),be.createHash=be.Hash=Y(12506),be.createHmac=be.Hmac=Y(85903);var ie=Y(6380),z=Object.keys(ie),O=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(z);be.getHashes=function(){return O};var E=Y(14161);be.pbkdf2=E.pbkdf2,be.pbkdf2Sync=E.pbkdf2Sync;var d=Y(37991);be.Cipher=d.Cipher,be.createCipher=d.createCipher,be.Cipheriv=d.Cipheriv,be.createCipheriv=d.createCipheriv,be.Decipher=d.Decipher,be.createDecipher=d.createDecipher,be.Decipheriv=d.Decipheriv,be.createDecipheriv=d.createDecipheriv,be.getCiphers=d.getCiphers,be.listCiphers=d.listCiphers;var x=Y(52322);be.DiffieHellmanGroup=x.DiffieHellmanGroup,be.createDiffieHellmanGroup=x.createDiffieHellmanGroup,be.getDiffieHellman=x.getDiffieHellman,be.createDiffieHellman=x.createDiffieHellman,be.DiffieHellman=x.DiffieHellman;var f=Y(23566);be.createSign=f.createSign,be.Sign=f.Sign,be.createVerify=f.createVerify,be.Verify=f.Verify,be.createECDH=Y(84892);var T=Y(37537);be.publicEncrypt=T.publicEncrypt,be.privateEncrypt=T.privateEncrypt,be.publicDecrypt=T.publicDecrypt,be.privateDecrypt=T.privateDecrypt;var g=Y(43594);be.randomFill=g.randomFill,be.randomFillSync=g.randomFillSync,be.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},be.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},79748:function(bt,be,Y){var ie;!function(z){"use strict";var h,O=1e9,E={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},d=!0,x="[DecimalError] ",f=x+"Invalid argument: ",T=x+"Exponent out of range: ",g=Math.floor,b=Math.pow,l=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,u=1e7,_=9007199254740991,w=g(_/7),S={};function I(N,C){var a,B,Q,ee,ce,ue,we,ae,Te=N.constructor,le=Te.precision;if(!N.s||!C.s)return C.s||(C=new Te(N)),d?o(C,le):C;if(ae=C.d,ce=N.e,Q=C.e,we=(we=N.d).slice(),ee=ce-Q){for(ee<0?(B=we,ee=-ee,ue=ae.length):(B=ae,Q=ce,ue=we.length),ee>(ue=(ce=Math.ceil(le/7))>ue?ce+1:ue+1)&&(ee=ue,B.length=1),B.reverse();ee--;)B.push(0);B.reverse()}for((ue=we.length)-(ee=ae.length)<0&&(ee=ue,B=ae,ae=we,we=B),a=0;ee;)a=(we[--ee]=we[ee]+ae[ee]+a)/u|0,we[ee]%=u;for(a&&(we.unshift(a),++Q),ue=we.length;0==we[--ue];)we.pop();return C.d=we,C.e=Q,d?o(C,le):C}function P(N,C,a){if(N!==~~N||Na)throw Error(f+N)}function L(N){var C,a,B,Q=N.length-1,ee="",ce=N[0];if(Q>0){for(ee+=ce,C=1;CN.e^ee.s<0?1:-1;for(C=0,a=(B=ee.d.length)<(Q=N.d.length)?B:Q;CN.d[C]^ee.s<0?1:-1;return B===Q?0:B>Q^ee.s<0?1:-1},S.decimalPlaces=S.dp=function(){var N=this,C=N.d.length-1,a=7*(C-N.e);if(C=N.d[C])for(;C%10==0;C/=10)a--;return a<0?0:a},S.dividedBy=S.div=function(N){return V(this,new this.constructor(N))},S.dividedToIntegerBy=S.idiv=function(N){var a=this.constructor;return o(V(this,new a(N),0,1),a.precision)},S.equals=S.eq=function(N){return!this.cmp(N)},S.exponent=function(){return G(this)},S.greaterThan=S.gt=function(N){return this.cmp(N)>0},S.greaterThanOrEqualTo=S.gte=function(N){return this.cmp(N)>=0},S.isInteger=S.isint=function(){return this.e>this.d.length-2},S.isNegative=S.isneg=function(){return this.s<0},S.isPositive=S.ispos=function(){return this.s>0},S.isZero=function(){return 0===this.s},S.lessThan=S.lt=function(N){return this.cmp(N)<0},S.lessThanOrEqualTo=S.lte=function(N){return this.cmp(N)<1},S.logarithm=S.log=function(N){var C,a=this,B=a.constructor,Q=B.precision,ee=Q+5;if(void 0===N)N=new B(10);else if((N=new B(N)).s<1||N.eq(h))throw Error(x+"NaN");if(a.s<1)throw Error(x+(a.s?"NaN":"-Infinity"));return a.eq(h)?new B(0):(d=!1,C=V(K(a,ee),K(N,ee),ee),d=!0,o(C,Q))},S.minus=S.sub=function(N){var C=this;return N=new C.constructor(N),C.s==N.s?y(C,N):I(C,(N.s=-N.s,N))},S.modulo=S.mod=function(N){var C,a=this,B=a.constructor,Q=B.precision;if(!(N=new B(N)).s)throw Error(x+"NaN");return a.s?(d=!1,C=V(a,N,0,1).times(N),d=!0,a.minus(C)):o(new B(a),Q)},S.naturalExponential=S.exp=function(){return W(this)},S.naturalLogarithm=S.ln=function(){return K(this)},S.negated=S.neg=function(){var N=new this.constructor(this);return N.s=-N.s||0,N},S.plus=S.add=function(N){var C=this;return N=new C.constructor(N),C.s==N.s?I(C,N):y(C,(N.s=-N.s,N))},S.precision=S.sd=function(N){var C,a,B,Q=this;if(void 0!==N&&N!==!!N&&1!==N&&0!==N)throw Error(f+N);if(C=G(Q)+1,a=7*(B=Q.d.length-1)+1,B=Q.d[B]){for(;B%10==0;B/=10)a--;for(B=Q.d[0];B>=10;B/=10)a++}return N&&C>a?C:a},S.squareRoot=S.sqrt=function(){var N,C,a,B,Q,ee,ce,ue=this,we=ue.constructor;if(ue.s<1){if(!ue.s)return new we(0);throw Error(x+"NaN")}for(N=G(ue),d=!1,0==(Q=Math.sqrt(+ue))||Q==1/0?(((C=L(ue.d)).length+N)%2==0&&(C+="0"),Q=Math.sqrt(C),N=g((N+1)/2)-(N<0||N%2),B=new we(C=Q==1/0?"5e"+N:(C=Q.toExponential()).slice(0,C.indexOf("e")+1)+N)):B=new we(Q.toString()),Q=ce=(a=we.precision)+3;;)if(B=(ee=B).plus(V(ue,ee,ce+2)).times(.5),L(ee.d).slice(0,ce)===(C=L(B.d)).slice(0,ce)){if(C=C.slice(ce-3,ce+1),Q==ce&&"4999"==C){if(o(ee,a+1,0),ee.times(ee).eq(ue)){B=ee;break}}else if("9999"!=C)break;ce+=4}return d=!0,o(B,a)},S.times=S.mul=function(N){var C,a,B,Q,ee,ce,ue,we,ae,Te=this,le=Te.constructor,X=Te.d,ne=(N=new le(N)).d;if(!Te.s||!N.s)return new le(0);for(N.s*=Te.s,a=Te.e+N.e,(we=X.length)<(ae=ne.length)&&(ee=X,X=ne,ne=ee,ce=we,we=ae,ae=ce),ee=[],B=ce=we+ae;B--;)ee.push(0);for(B=ae;--B>=0;){for(C=0,Q=we+B;Q>B;)ue=ee[Q]+ne[B]*X[Q-B-1]+C,ee[Q--]=ue%u|0,C=ue/u|0;ee[Q]=(ee[Q]+C)%u|0}for(;!ee[--ce];)ee.pop();return C?++a:ee.shift(),N.d=ee,N.e=a,d?o(N,le.precision):N},S.toDecimalPlaces=S.todp=function(N,C){var a=this,B=a.constructor;return a=new B(a),void 0===N?a:(P(N,0,O),void 0===C?C=B.rounding:P(C,0,8),o(a,N+G(a)+1,C))},S.toExponential=function(N,C){var a,B=this,Q=B.constructor;return void 0===N?a=M(B,!0):(P(N,0,O),void 0===C?C=Q.rounding:P(C,0,8),a=M(B=o(new Q(B),N+1,C),!0,N+1)),a},S.toFixed=function(N,C){var a,B,Q=this,ee=Q.constructor;return void 0===N?M(Q):(P(N,0,O),void 0===C?C=ee.rounding:P(C,0,8),a=M((B=o(new ee(Q),N+G(Q)+1,C)).abs(),!1,N+G(B)+1),Q.isneg()&&!Q.isZero()?"-"+a:a)},S.toInteger=S.toint=function(){var N=this,C=N.constructor;return o(new C(N),G(N)+1,C.rounding)},S.toNumber=function(){return+this},S.toPower=S.pow=function(N){var C,a,B,Q,ee,ue=this,we=ue.constructor,Te=+(N=new we(N));if(!N.s)return new we(h);if(!(ue=new we(ue)).s){if(N.s<1)throw Error(x+"Infinity");return ue}if(ue.eq(h))return ue;if(B=we.precision,N.eq(h))return o(ue,B);if(ee=ue.s,(C=N.e)>=(a=N.d.length-1)){if((a=Te<0?-Te:Te)<=_){for(Q=new we(h),C=Math.ceil(B/7+4),d=!1;a%2&&v((Q=Q.times(ue)).d,C),0!==(a=g(a/2));)v((ue=ue.times(ue)).d,C);return d=!0,N.s<0?new we(h).div(Q):o(Q,B)}}else if(ee<0)throw Error(x+"NaN");return ee=ee<0&&1&N.d[Math.max(C,a)]?-1:1,ue.s=1,d=!1,Q=N.times(K(ue,B+12)),d=!0,(Q=W(Q)).s=ee,Q},S.toPrecision=function(N,C){var a,B,Q=this,ee=Q.constructor;return void 0===N?B=M(Q,(a=G(Q))<=ee.toExpNeg||a>=ee.toExpPos):(P(N,1,O),void 0===C?C=ee.rounding:P(C,0,8),B=M(Q=o(new ee(Q),N,C),N<=(a=G(Q))||a<=ee.toExpNeg,N)),B},S.toSignificantDigits=S.tosd=function(N,C){var B=this.constructor;return void 0===N?(N=B.precision,C=B.rounding):(P(N,1,O),void 0===C?C=B.rounding:P(C,0,8)),o(new B(this),N,C)},S.toString=S.valueOf=S.val=S.toJSON=function(){var N=this,C=G(N),a=N.constructor;return M(N,C<=a.toExpNeg||C>=a.toExpPos)};var V=function(){function N(B,Q){var ee,ce=0,ue=B.length;for(B=B.slice();ue--;)B[ue]=(ee=B[ue]*Q+ce)%u|0,ce=ee/u|0;return ce&&B.unshift(ce),B}function C(B,Q,ee,ce){var ue,we;if(ee!=ce)we=ee>ce?1:-1;else for(ue=we=0;ueQ[ue]?1:-1;break}return we}function a(B,Q,ee){for(var ce=0;ee--;)B[ee]-=ce,B[ee]=(ce=B[ee]1;)B.shift()}return function(B,Q,ee,ce){var ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt=B.constructor,ht=B.s==Q.s?1:-1,wt=B.d,Pt=Q.d;if(!B.s)return new mt(B);if(!Q.s)throw Error(x+"Division by zero");for(we=B.e-Q.e,nt=Pt.length,ze=wt.length,pe=(ne=new mt(ht)).d=[],ae=0;Pt[ae]==(wt[ae]||0);)++ae;if(Pt[ae]>(wt[ae]||0)&&--we,(ke=null==ee?ee=mt.precision:ce?ee+(G(B)-G(Q))+1:ee)<0)return new mt(0);if(ke=ke/7+2|0,ae=0,1==nt)for(Te=0,Pt=Pt[0],ke++;(ae1&&(Pt=N(Pt,Te),wt=N(wt,Te),nt=Pt.length,ze=wt.length),Ee=nt,xe=(_e=wt.slice(0,nt)).length;xe=u/2&&++Ve;do{Te=0,(ue=C(Pt,_e,nt,xe))<0?(Ce=_e[0],nt!=xe&&(Ce=Ce*u+(_e[1]||0)),(Te=Ce/Ve|0)>1?(Te>=u&&(Te=u-1),1==(ue=C(le=N(Pt,Te),_e,X=le.length,xe=_e.length))&&(Te--,a(le,nt16)throw Error(T+G(N));if(!N.s)return new Te(h);for(null==C?(d=!1,ue=le):ue=C,ce=new Te(.03125);N.abs().gte(.1);)N=N.times(ce),ae+=5;for(ue+=Math.log(b(2,ae))/Math.LN10*2+5|0,a=Q=ee=new Te(h),Te.precision=ue;;){if(Q=o(Q.times(N),ue),a=a.times(++we),L((ce=ee.plus(V(Q,a,ue))).d).slice(0,ue)===L(ee.d).slice(0,ue)){for(;ae--;)ee=o(ee.times(ee),ue);return Te.precision=le,null==C?(d=!0,o(ee,le)):ee}ee=ce}}function G(N){for(var C=7*N.e,a=N.d[0];a>=10;a/=10)C++;return C}function H(N,C,a){if(C>N.LN10.sd())throw d=!0,a&&(N.precision=a),Error(x+"LN10 precision limit exceeded");return o(new N(N.LN10),C)}function j(N){for(var C="";N--;)C+="0";return C}function K(N,C){var a,B,Q,ee,ce,ue,we,ae,Te,le=1,ne=N,pe=ne.d,_e=ne.constructor,xe=_e.precision;if(ne.s<1)throw Error(x+(ne.s?"NaN":"-Infinity"));if(ne.eq(h))return new _e(0);if(null==C?(d=!1,ae=xe):ae=C,ne.eq(10))return null==C&&(d=!0),H(_e,ae);if(_e.precision=ae+=10,B=(a=L(pe)).charAt(0),ee=G(ne),!(Math.abs(ee)<15e14))return we=H(_e,ae+2,xe).times(ee+""),ne=K(new _e(B+"."+a.slice(1)),ae-10).plus(we),_e.precision=xe,null==C?(d=!0,o(ne,xe)):ne;for(;B<7&&1!=B||1==B&&a.charAt(1)>3;)B=(a=L((ne=ne.times(N)).d)).charAt(0),le++;for(ee=G(ne),B>1?(ne=new _e("0."+a),ee++):ne=new _e(B+"."+a.slice(1)),ue=ce=ne=V(ne.minus(h),ne.plus(h),ae),Te=o(ne.times(ne),ae),Q=3;;){if(ce=o(ce.times(Te),ae),L((we=ue.plus(V(ce,new _e(Q),ae))).d).slice(0,ae)===L(ue.d).slice(0,ae))return ue=ue.times(2),0!==ee&&(ue=ue.plus(H(_e,ae+2,xe).times(ee+""))),ue=V(ue,new _e(le),ae),_e.precision=xe,null==C?(d=!0,o(ue,xe)):ue;ue=we,Q+=2}}function R(N,C){var a,B,Q;for((a=C.indexOf("."))>-1&&(C=C.replace(".","")),(B=C.search(/e/i))>0?(a<0&&(a=B),a+=+C.slice(B+1),C=C.substring(0,B)):a<0&&(a=C.length),B=0;48===C.charCodeAt(B);)++B;for(Q=C.length;48===C.charCodeAt(Q-1);)--Q;if(C=C.slice(B,Q)){if(Q-=B,N.e=g((a=a-B-1)/7),N.d=[],B=(a+1)%7,a<0&&(B+=7),Bw||N.e<-w))throw Error(T+a)}else N.s=0,N.e=0,N.d=[0];return N}function o(N,C,a){var B,Q,ee,ce,ue,we,ae,Te,le=N.d;for(ce=1,ee=le[0];ee>=10;ee/=10)ce++;if((B=C-ce)<0)B+=7,Q=C,ae=le[Te=0];else{if((Te=Math.ceil((B+1)/7))>=(ee=le.length))return N;for(ae=ee=le[Te],ce=1;ee>=10;ee/=10)ce++;Q=(B%=7)-7+ce}if(void 0!==a&&(ue=ae/(ee=b(10,ce-Q-1))%10|0,we=C<0||void 0!==le[Te+1]||ae%ee,we=a<4?(ue||we)&&(0==a||a==(N.s<0?3:2)):ue>5||5==ue&&(4==a||we||6==a&&(B>0?Q>0?ae/b(10,ce-Q):0:le[Te-1])%10&1||a==(N.s<0?8:7))),C<1||!le[0])return we?(ee=G(N),le.length=1,le[0]=b(10,(7-(C=C-ee-1)%7)%7),N.e=g(-C/7)||0):(le.length=1,le[0]=N.e=N.s=0),N;if(0==B?(le.length=Te,ee=1,Te--):(le.length=Te+1,ee=b(10,7-B),le[Te]=Q>0?(ae/b(10,ce-Q)%b(10,Q)|0)*ee:0),we)for(;;){if(0==Te){(le[0]+=ee)==u&&(le[0]=1,++N.e);break}if(le[Te]+=ee,le[Te]!=u)break;le[Te--]=0,ee=1}for(B=le.length;0===le[--B];)le.pop();if(d&&(N.e>w||N.e<-w))throw Error(T+G(N));return N}function y(N,C){var a,B,Q,ee,ce,ue,we,ae,Te,le,X=N.constructor,ne=X.precision;if(!N.s||!C.s)return C.s?C.s=-C.s:C=new X(N),d?o(C,ne):C;if(le=C.d,B=C.e,ae=N.e,we=(we=N.d).slice(),ce=ae-B){for((Te=ce<0)?(a=we,ce=-ce,ue=le.length):(a=le,B=ae,ue=we.length),ce>(Q=Math.max(Math.ceil(ne/7),ue)+2)&&(ce=Q,a.length=1),a.reverse(),Q=ce;Q--;)a.push(0);a.reverse()}else{for((Te=(Q=we.length)<(ue=le.length))&&(ue=Q),Q=0;Q0;--Q)we[ue++]=0;for(Q=le.length;Q>ce;){if(we[--Q]0?ee=ee.charAt(0)+"."+ee.slice(1)+j(B):ce>1&&(ee=ee.charAt(0)+"."+ee.slice(1)),ee=ee+(Q<0?"e":"e+")+Q):Q<0?(ee="0."+j(-Q-1)+ee,a&&(B=a-ce)>0&&(ee+=j(B))):Q>=ce?(ee+=j(Q+1-ce),a&&(B=a-Q-1)>0&&(ee=ee+"."+j(B))):((B=Q+1)0&&(Q+1===ce&&(ee+="."),ee+=j(B))),N.s<0?"-"+ee:ee}function v(N,C){if(N.length>C)return N.length=C,!0}function D(N){if(!N||"object"!=typeof N)throw Error(x+"Object expected");var C,a,B,Q=["precision",1,O,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(C=0;C=Q[C+1]&&B<=Q[C+2]))throw Error(f+a+": "+B);this[a]=B}if(void 0!==(B=N[a="LN10"])){if(B!=Math.LN10)throw Error(f+a+": "+B);this[a]=new this(B)}return this}(E=function k(N){var C,a,B;function Q(ee){var ce=this;if(!(ce instanceof Q))return new Q(ee);if(ce.constructor=Q,ee instanceof Q)return ce.s=ee.s,ce.e=ee.e,void(ce.d=(ee=ee.d)?ee.slice():ee);if("number"==typeof ee){if(0*ee!=0)throw Error(f+ee);if(ee>0)ce.s=1;else{if(!(ee<0))return ce.s=0,ce.e=0,void(ce.d=[0]);ee=-ee,ce.s=-1}return ee===~~ee&&ee<1e7?(ce.e=0,void(ce.d=[ee])):R(ce,ee.toString())}if("string"!=typeof ee)throw Error(f+ee);if(45===ee.charCodeAt(0)?(ee=ee.slice(1),ce.s=-1):ce.s=1,!l.test(ee))throw Error(f+ee);R(ce,ee)}if(Q.prototype=S,Q.ROUND_UP=0,Q.ROUND_DOWN=1,Q.ROUND_CEIL=2,Q.ROUND_FLOOR=3,Q.ROUND_HALF_UP=4,Q.ROUND_HALF_DOWN=5,Q.ROUND_HALF_EVEN=6,Q.ROUND_HALF_CEIL=7,Q.ROUND_HALF_FLOOR=8,Q.clone=k,Q.config=Q.set=D,void 0===N&&(N={}),N)for(B=["precision","rounding","toExpNeg","toExpPos","LN10"],C=0;C{"use strict";var be="%[a-f0-9]{2}",Y=new RegExp("("+be+")|([^%]+?)","gi"),ie=new RegExp("("+be+")+","gi");function z(d,x){try{return[decodeURIComponent(d.join(""))]}catch{}if(1===d.length)return d;var f=d.slice(0,x=x||1),T=d.slice(x);return Array.prototype.concat.call([],z(f),z(T))}function O(d){try{return decodeURIComponent(d)}catch{for(var x=d.match(Y)||[],f=1;f{"use strict";var be=function(S){return!(!(w=S)||"object"!=typeof w||function(w){var S=Object.prototype.toString.call(w);return"[object RegExp]"===S||"[object Date]"===S||function(w){return w.$$typeof===O}(w)}(S));var w},O="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function x(w,S){return!1!==S.clone&&S.isMergeableObject(w)?m(function(w){return Array.isArray(w)?[]:{}}(w),w,S):w}function f(w,S,I){return w.concat(S).map(function(P){return x(P,I)})}function b(w){return Object.keys(w).concat(function(w){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(w).filter(function(S){return Object.propertyIsEnumerable.call(w,S)}):[]}(w))}function l(w,S){try{return S in w}catch{return!1}}function m(w,S,I){(I=I||{}).arrayMerge=I.arrayMerge||f,I.isMergeableObject=I.isMergeableObject||be,I.cloneUnlessOtherwiseSpecified=x;var P=Array.isArray(S);return P===Array.isArray(w)?P?I.arrayMerge(w,S,I):function(w,S,I){var P={};return I.isMergeableObject(w)&&b(w).forEach(function(L){P[L]=x(w[L],I)}),b(S).forEach(function(L){(function(w,S){return l(w,S)&&!(Object.hasOwnProperty.call(w,S)&&Object.propertyIsEnumerable.call(w,S))})(w,L)||(P[L]=l(w,L)&&I.isMergeableObject(S[L])?function(w,S){if(!S.customMerge)return m;var I=S.customMerge(w);return"function"==typeof I?I:m}(L,I)(w[L],S[L],I):x(S[L],I))}),P}(w,S,I):x(S,I)}m.all=function(S,I){if(!Array.isArray(S))throw new Error("first argument should be an array");return S.reduce(function(P,L){return m(P,L,I)},{})},bt.exports=m},68534:(bt,be,Y)=>{"use strict";be.utils=Y(86157),be.Cipher=Y(82243),be.DES=Y(62917),be.CBC=Y(78029),be.EDE=Y(81082)},78029:(bt,be,Y)=>{"use strict";var ie=Y(86055),z=Y(59879),O={};function E(x){ie.equal(x.length,8,"Invalid IV length"),this.iv=new Array(8);for(var f=0;f{"use strict";var ie=Y(86055);function z(O){this.options=O,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==O.padding}bt.exports=z,z.prototype._init=function(){},z.prototype.update=function(E){return 0===E.length?[]:"decrypt"===this.type?this._updateDecrypt(E):this._updateEncrypt(E)},z.prototype._buffer=function(E,d){for(var x=Math.min(this.buffer.length-this.bufferOff,E.length-d),f=0;f0;f--)d+=this._buffer(E,d),x+=this._flushBuffer(T,x);return d+=this._buffer(E,d),T},z.prototype.final=function(E){var d,x;return E&&(d=this.update(E)),x="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),d?d.concat(x):x},z.prototype._pad=function(E,d){if(0===d)return!1;for(;d{"use strict";var ie=Y(86055),z=Y(59879),O=Y(86157),E=Y(82243);function d(){this.tmp=new Array(2),this.keys=null}function x(T){E.call(this,T);var g=new d;this._desState=g,this.deriveKeys(g,T.key)}z(x,E),bt.exports=x,x.create=function(g){return new x(g)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];x.prototype.deriveKeys=function(g,b){g.keys=new Array(32),ie.equal(b.length,this.blockSize,"Invalid key length");var l=O.readUInt32BE(b,0),h=O.readUInt32BE(b,4);O.pc1(l,h,g.tmp,0),l=g.tmp[0],h=g.tmp[1];for(var u=0;u>>1];l=O.r28shl(l,m),h=O.r28shl(h,m),O.pc2(l,h,g.keys,u)}},x.prototype._update=function(g,b,l,h){var u=this._desState,m=O.readUInt32BE(g,b),_=O.readUInt32BE(g,b+4);O.ip(m,_,u.tmp,0),m=u.tmp[0],_=u.tmp[1],"encrypt"===this.type?this._encrypt(u,m,_,u.tmp,0):this._decrypt(u,m,_,u.tmp,0),_=u.tmp[1],O.writeUInt32BE(l,m=u.tmp[0],h),O.writeUInt32BE(l,_,h+4)},x.prototype._pad=function(g,b){if(!1===this.padding)return!1;for(var l=g.length-b,h=b;h>>0,m=V}O.rip(_,m,h,u)},x.prototype._decrypt=function(g,b,l,h,u){for(var m=l,_=b,w=g.keys.length-2;w>=0;w-=2){var S=g.keys[w],I=g.keys[w+1];O.expand(m,g.tmp,0);var P=O.substitute(S^=g.tmp[0],I^=g.tmp[1]),V=m;m=(_^O.permute(P))>>>0,_=V}O.rip(m,_,h,u)}},81082:(bt,be,Y)=>{"use strict";var ie=Y(86055),z=Y(59879),O=Y(82243),E=Y(62917);function d(f,T){ie.equal(T.length,24,"Invalid key length");var g=T.slice(0,8),b=T.slice(8,16),l=T.slice(16,24);this.ciphers="encrypt"===f?[E.create({type:"encrypt",key:g}),E.create({type:"decrypt",key:b}),E.create({type:"encrypt",key:l})]:[E.create({type:"decrypt",key:l}),E.create({type:"encrypt",key:b}),E.create({type:"decrypt",key:g})]}function x(f){O.call(this,f);var T=new d(this.type,this.options.key);this._edeState=T}z(x,O),bt.exports=x,x.create=function(T){return new x(T)},x.prototype._update=function(T,g,b,l){var h=this._edeState;h.ciphers[0]._update(T,g,b,l),h.ciphers[1]._update(b,l,b,l),h.ciphers[2]._update(b,l,b,l)},x.prototype._pad=E.prototype._pad,x.prototype._unpad=E.prototype._unpad},86157:(bt,be)=>{"use strict";be.readUInt32BE=function(E,d){return(E[0+d]<<24|E[1+d]<<16|E[2+d]<<8|E[3+d])>>>0},be.writeUInt32BE=function(E,d,x){E[0+x]=d>>>24,E[1+x]=d>>>16&255,E[2+x]=d>>>8&255,E[3+x]=255&d},be.ip=function(E,d,x,f){for(var T=0,g=0,b=6;b>=0;b-=2){for(var l=0;l<=24;l+=8)T<<=1,T|=d>>>l+b&1;for(l=0;l<=24;l+=8)T<<=1,T|=E>>>l+b&1}for(b=6;b>=0;b-=2){for(l=1;l<=25;l+=8)g<<=1,g|=d>>>l+b&1;for(l=1;l<=25;l+=8)g<<=1,g|=E>>>l+b&1}x[f+0]=T>>>0,x[f+1]=g>>>0},be.rip=function(E,d,x,f){for(var T=0,g=0,b=0;b<4;b++)for(var l=24;l>=0;l-=8)T<<=1,T|=d>>>l+b&1,T<<=1,T|=E>>>l+b&1;for(b=4;b<8;b++)for(l=24;l>=0;l-=8)g<<=1,g|=d>>>l+b&1,g<<=1,g|=E>>>l+b&1;x[f+0]=T>>>0,x[f+1]=g>>>0},be.pc1=function(E,d,x,f){for(var T=0,g=0,b=7;b>=5;b--){for(var l=0;l<=24;l+=8)T<<=1,T|=d>>l+b&1;for(l=0;l<=24;l+=8)T<<=1,T|=E>>l+b&1}for(l=0;l<=24;l+=8)T<<=1,T|=d>>l+b&1;for(b=1;b<=3;b++){for(l=0;l<=24;l+=8)g<<=1,g|=d>>l+b&1;for(l=0;l<=24;l+=8)g<<=1,g|=E>>l+b&1}for(l=0;l<=24;l+=8)g<<=1,g|=E>>l+b&1;x[f+0]=T>>>0,x[f+1]=g>>>0},be.r28shl=function(E,d){return E<>>28-d};var Y=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];be.pc2=function(E,d,x,f){for(var T=0,g=0,b=Y.length>>>1,l=0;l>>Y[l]&1;for(l=b;l>>Y[l]&1;x[f+0]=T>>>0,x[f+1]=g>>>0},be.expand=function(E,d,x){var f=0,T=0;f=(1&E)<<5|E>>>27;for(var g=23;g>=15;g-=4)f<<=6,f|=E>>>g&63;for(g=11;g>=3;g-=4)T|=E>>>g&63,T<<=6;T|=(31&E)<<1|E>>>31,d[x+0]=f>>>0,d[x+1]=T>>>0};var ie=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];be.substitute=function(E,d){for(var x=0,f=0;f<4;f++)x<<=4,x|=ie[64*f+(E>>>18-6*f&63)];for(f=0;f<4;f++)x<<=4,x|=ie[256+64*f+(d>>>18-6*f&63)];return x>>>0};var z=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];be.permute=function(E){for(var d=0,x=0;x>>z[x]&1;return d>>>0},be.padSplit=function(E,d,x){for(var f=E.toString(2);f.length{var ie=Y(84069),z=Y(29799),O=Y(26374),d={binary:!0,hex:!0,base64:!0};be.DiffieHellmanGroup=be.createDiffieHellmanGroup=be.getDiffieHellman=function(f){var T=new Buffer(z[f].prime,"hex"),g=new Buffer(z[f].gen,"hex");return new O(T,g)},be.createDiffieHellman=be.DiffieHellman=function x(f,T,g,b){return Buffer.isBuffer(T)||void 0===d[T]?x(f,"binary",T,g):(T=T||"binary",b=b||"binary",g=g||new Buffer([2]),Buffer.isBuffer(g)||(g=new Buffer(g,b)),"number"==typeof f?new O(ie(f,g),g,!0):(Buffer.isBuffer(f)||(f=new Buffer(f,T)),new O(f,g,!0)))}},26374:(bt,be,Y)=>{var ie=Y(74980),O=new(Y(14398)),E=new ie(24),d=new ie(11),x=new ie(10),f=new ie(3),T=new ie(7),g=Y(84069),b=Y(16589);function l(S,I){return I=I||"utf8",Buffer.isBuffer(S)||(S=new Buffer(S,I)),this._pub=new ie(S),this}function h(S,I){return I=I||"utf8",Buffer.isBuffer(S)||(S=new Buffer(S,I)),this._priv=new ie(S),this}bt.exports=_;var u={};function _(S,I,P){this.setGenerator(I),this.__prime=new ie(S),this._prime=ie.mont(this.__prime),this._primeLen=S.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,P?(this.setPublicKey=l,this.setPrivateKey=h):this._primeCode=8}function w(S,I){var P=new Buffer(S.toArray());return I?P.toString(I):P}Object.defineProperty(_.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(S,I){var P=I.toString("hex"),L=[P,S.toString(16)].join("_");if(L in u)return u[L];var W,V=0;if(S.isEven()||!g.simpleSieve||!g.fermatTest(S)||!O.test(S))return V+=1,u[L]=V+="02"===P||"05"===P?8:4,V;switch(O.test(S.shrn(1))||(V+=2),P){case"02":S.mod(E).cmp(d)&&(V+=8);break;case"05":(W=S.mod(x)).cmp(f)&&W.cmp(T)&&(V+=8);break;default:V+=4}return u[L]=V,V}(this.__prime,this.__gen)),this._primeCode}}),_.prototype.generateKeys=function(){return this._priv||(this._priv=new ie(b(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},_.prototype.computeSecret=function(S){var I=(S=(S=new ie(S)).toRed(this._prime)).redPow(this._priv).fromRed(),P=new Buffer(I.toArray()),L=this.getPrime();if(P.length{var ie=Y(16589);bt.exports=V,V.simpleSieve=P,V.fermatTest=L;var z=Y(74980),O=new z(24),d=new(Y(14398)),x=new z(1),f=new z(2),T=new z(5),l=(new z(16),new z(8),new z(10)),h=new z(3),m=(new z(7),new z(11)),_=new z(4),S=(new z(12),null);function P(W){for(var G=function(){if(null!==S)return S;var G=[];G[0]=2;for(var H=1,j=3;j<1048576;j+=2){for(var K=Math.ceil(Math.sqrt(j)),R=0;RW;)H.ishrn(1);if(H.isEven()&&H.iadd(x),H.testn(1)||H.iadd(f),G.cmp(f)){if(!G.cmp(T))for(;H.mod(l).cmp(h);)H.iadd(_)}else for(;H.mod(O).cmp(m);)H.iadd(_);if(P(j=H.shrn(1))&&P(H)&&L(j)&&L(H)&&d.test(j)&&d.test(H))return H}}},74980:function(bt,be,Y){!function(ie,z){"use strict";function O(R,o){if(!R)throw new Error(o||"Assertion failed")}function E(R,o){R.super_=o;var y=function(){};y.prototype=o.prototype,R.prototype=new y,R.prototype.constructor=R}function d(R,o,y){if(d.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,null!==R&&(("le"===o||"be"===o)&&(y=o,o=10),this._init(R||0,o||10,y||"be"))}var x;"object"==typeof ie?ie.exports=d:z.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(7748).Buffer}catch{}function f(R,o){var y=R.charCodeAt(o);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Yr=0|k[3],Ln=8191&Yr,Bn=Yr>>>13,$r=0|k[4],Gn=8191&$r,bn=$r>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,Gn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,Gn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,Gn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,Gn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,Gn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,Gn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,Gn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,Gn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,Gn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,Gn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,Gn),a=(a=Math.imul(St,bn))+Math.imul(Wt,Gn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},5247:(bt,be,Y)=>{"use strict";var ie=be;ie.version=Y(18597).i8,ie.utils=Y(22946),ie.rand=Y(34761),ie.curve=Y(93868),ie.curves=Y(73346),ie.ec=Y(17237),ie.eddsa=Y(61615)},10780:(bt,be,Y)=>{"use strict";var ie=Y(24584),z=Y(22946),O=z.getNAF,E=z.getJSF,d=z.assert;function x(T,g){this.type=T,this.p=new ie(g.p,16),this.red=g.prime?ie.red(g.prime):ie.mont(this.p),this.zero=new ie(0).toRed(this.red),this.one=new ie(1).toRed(this.red),this.two=new ie(2).toRed(this.red),this.n=g.n&&new ie(g.n,16),this.g=g.g&&this.pointFromJSON(g.g,g.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var b=this.n&&this.p.div(this.n);!b||b.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(T,g){this.curve=T,this.type=g,this.precomputed=null}bt.exports=x,x.prototype.point=function(){throw new Error("Not implemented")},x.prototype.validate=function(){throw new Error("Not implemented")},x.prototype._fixedNafMul=function(g,b){d(g.precomputed);var l=g._getDoubles(),h=O(b,1,this._bitLength),u=(1<=_;S--)w=(w<<1)+h[S];m.push(w)}for(var I=this.jpoint(null,null,null),P=this.jpoint(null,null,null),L=u;L>0;L--){for(_=0;_=0;w--){for(var S=0;w>=0&&0===m[w];w--)S++;if(w>=0&&S++,_=_.dblp(S),w<0)break;var I=m[w];d(0!==I),_="affine"===g.type?_.mixedAdd(I>0?u[I-1>>1]:u[-I-1>>1].neg()):_.add(I>0?u[I-1>>1]:u[-I-1>>1].neg())}return"affine"===g.type?_.toP():_},x.prototype._wnafMulAdd=function(g,b,l,h,u){var I,P,L,m=this._wnafT1,_=this._wnafT2,w=this._wnafT3,S=0;for(I=0;I=1;I-=2){var W=I-1,G=I;if(1===m[W]&&1===m[G]){var H=[b[W],null,null,b[G]];0===b[W].y.cmp(b[G].y)?(H[1]=b[W].add(b[G]),H[2]=b[W].toJ().mixedAdd(b[G].neg())):0===b[W].y.cmp(b[G].y.redNeg())?(H[1]=b[W].toJ().mixedAdd(b[G]),H[2]=b[W].add(b[G].neg())):(H[1]=b[W].toJ().mixedAdd(b[G]),H[2]=b[W].toJ().mixedAdd(b[G].neg()));var j=[-3,-1,-5,-7,0,7,5,1,3],K=E(l[W],l[G]);for(S=Math.max(K[0].length,S),w[W]=new Array(S),w[G]=new Array(S),P=0;P=0;I--){for(var v=0;I>=0;){var k=!0;for(P=0;P=0&&v++,y=y.dblp(v),I<0)break;for(P=0;P0?L=_[P][D-1>>1]:D<0&&(L=_[P][-D-1>>1].neg()),y="affine"===L.type?y.mixedAdd(L):y.add(L))}}for(I=0;I=Math.ceil((g.bitLength()+1)/b.step)},f.prototype._getDoubles=function(g,b){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var l=[this],h=this,u=0;u{"use strict";var ie=Y(22946),z=Y(24584),O=Y(59879),E=Y(10780),d=ie.assert;function x(T){this.twisted=1!=(0|T.a),this.mOneA=this.twisted&&-1==(0|T.a),this.extended=this.mOneA,E.call(this,"edwards",T),this.a=new z(T.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new z(T.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new z(T.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),d(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|T.c)}function f(T,g,b,l,h){E.BasePoint.call(this,T,"projective"),null===g&&null===b&&null===l?(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 z(g,16),this.y=new z(b,16),this.z=l?new z(l,16):this.curve.one,this.t=h&&new z(h,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()))))}O(x,E),bt.exports=x,x.prototype._mulA=function(g){return this.mOneA?g.redNeg():this.a.redMul(g)},x.prototype._mulC=function(g){return this.oneC?g:this.c.redMul(g)},x.prototype.jpoint=function(g,b,l,h){return this.point(g,b,l,h)},x.prototype.pointFromX=function(g,b){(g=new z(g,16)).red||(g=g.toRed(this.red));var l=g.redSqr(),h=this.c2.redSub(this.a.redMul(l)),u=this.one.redSub(this.c2.redMul(this.d).redMul(l)),m=h.redMul(u.redInvm()),_=m.redSqrt();if(0!==_.redSqr().redSub(m).cmp(this.zero))throw new Error("invalid point");var w=_.fromRed().isOdd();return(b&&!w||!b&&w)&&(_=_.redNeg()),this.point(g,_)},x.prototype.pointFromY=function(g,b){(g=new z(g,16)).red||(g=g.toRed(this.red));var l=g.redSqr(),h=l.redSub(this.c2),u=l.redMul(this.d).redMul(this.c2).redSub(this.a),m=h.redMul(u.redInvm());if(0===m.cmp(this.zero)){if(b)throw new Error("invalid point");return this.point(this.zero,g)}var _=m.redSqrt();if(0!==_.redSqr().redSub(m).cmp(this.zero))throw new Error("invalid point");return _.fromRed().isOdd()!==b&&(_=_.redNeg()),this.point(_,g)},x.prototype.validate=function(g){if(g.isInfinity())return!0;g.normalize();var b=g.x.redSqr(),l=g.y.redSqr(),h=b.redMul(this.a).redAdd(l),u=this.c2.redMul(this.one.redAdd(this.d.redMul(b).redMul(l)));return 0===h.cmp(u)},O(f,E.BasePoint),x.prototype.pointFromJSON=function(g){return f.fromJSON(this,g)},x.prototype.point=function(g,b,l,h){return new f(this,g,b,l,h)},f.fromJSON=function(g,b){return new f(g,b[0],b[1],b[2])},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var g=this.x.redSqr(),b=this.y.redSqr(),l=this.z.redSqr();l=l.redIAdd(l);var h=this.curve._mulA(g),u=this.x.redAdd(this.y).redSqr().redISub(g).redISub(b),m=h.redAdd(b),_=m.redSub(l),w=h.redSub(b),S=u.redMul(_),I=m.redMul(w),P=u.redMul(w),L=_.redMul(m);return this.curve.point(S,I,L,P)},f.prototype._projDbl=function(){var h,u,m,_,w,S,g=this.x.redAdd(this.y).redSqr(),b=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var I=(_=this.curve._mulA(b)).redAdd(l);this.zOne?(h=g.redSub(b).redSub(l).redMul(I.redSub(this.curve.two)),u=I.redMul(_.redSub(l)),m=I.redSqr().redSub(I).redSub(I)):(w=this.z.redSqr(),S=I.redSub(w).redISub(w),h=g.redSub(b).redISub(l).redMul(S),u=I.redMul(_.redSub(l)),m=I.redMul(S))}else _=b.redAdd(l),w=this.curve._mulC(this.z).redSqr(),S=_.redSub(w).redSub(w),h=this.curve._mulC(g.redISub(_)).redMul(S),u=this.curve._mulC(_).redMul(b.redISub(l)),m=_.redMul(S);return this.curve.point(h,u,m)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(g){var b=this.y.redSub(this.x).redMul(g.y.redSub(g.x)),l=this.y.redAdd(this.x).redMul(g.y.redAdd(g.x)),h=this.t.redMul(this.curve.dd).redMul(g.t),u=this.z.redMul(g.z.redAdd(g.z)),m=l.redSub(b),_=u.redSub(h),w=u.redAdd(h),S=l.redAdd(b),I=m.redMul(_),P=w.redMul(S),L=m.redMul(S),V=_.redMul(w);return this.curve.point(I,P,V,L)},f.prototype._projAdd=function(g){var P,L,b=this.z.redMul(g.z),l=b.redSqr(),h=this.x.redMul(g.x),u=this.y.redMul(g.y),m=this.curve.d.redMul(h).redMul(u),_=l.redSub(m),w=l.redAdd(m),S=this.x.redAdd(this.y).redMul(g.x.redAdd(g.y)).redISub(h).redISub(u),I=b.redMul(_).redMul(S);return this.curve.twisted?(P=b.redMul(w).redMul(u.redSub(this.curve._mulA(h))),L=_.redMul(w)):(P=b.redMul(w).redMul(u.redSub(h)),L=this.curve._mulC(_).redMul(w)),this.curve.point(I,P,L)},f.prototype.add=function(g){return this.isInfinity()?g:g.isInfinity()?this:this.curve.extended?this._extAdd(g):this._projAdd(g)},f.prototype.mul=function(g){return this._hasDoubles(g)?this.curve._fixedNafMul(this,g):this.curve._wnafMul(this,g)},f.prototype.mulAdd=function(g,b,l){return this.curve._wnafMulAdd(1,[this,b],[g,l],2,!1)},f.prototype.jmulAdd=function(g,b,l){return this.curve._wnafMulAdd(1,[this,b],[g,l],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var g=this.z.redInvm();return this.x=this.x.redMul(g),this.y=this.y.redMul(g),this.t&&(this.t=this.t.redMul(g)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(g){return this===g||0===this.getX().cmp(g.getX())&&0===this.getY().cmp(g.getY())},f.prototype.eqXToP=function(g){var b=g.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(b))return!0;for(var l=g.clone(),h=this.curve.redN.redMul(this.z);;){if(l.iadd(this.curve.n),l.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(h),0===this.x.cmp(b))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},93868:(bt,be,Y)=>{"use strict";var ie=be;ie.base=Y(10780),ie.short=Y(29918),ie.mont=Y(52218),ie.edwards=Y(86121)},52218:(bt,be,Y)=>{"use strict";var ie=Y(24584),z=Y(59879),O=Y(10780),E=Y(22946);function d(f){O.call(this,"mont",f),this.a=new ie(f.a,16).toRed(this.red),this.b=new ie(f.b,16).toRed(this.red),this.i4=new ie(4).toRed(this.red).redInvm(),this.two=new ie(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function x(f,T,g){O.BasePoint.call(this,f,"projective"),null===T&&null===g?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new ie(T,16),this.z=new ie(g,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}z(d,O),bt.exports=d,d.prototype.validate=function(T){var g=T.normalize().x,b=g.redSqr(),l=b.redMul(g).redAdd(b.redMul(this.a)).redAdd(g);return 0===l.redSqrt().redSqr().cmp(l)},z(x,O.BasePoint),d.prototype.decodePoint=function(T,g){return this.point(E.toArray(T,g),1)},d.prototype.point=function(T,g){return new x(this,T,g)},d.prototype.pointFromJSON=function(T){return x.fromJSON(this,T)},x.prototype.precompute=function(){},x.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},x.fromJSON=function(T,g){return new x(T,g[0],g[1]||T.one)},x.prototype.inspect=function(){return this.isInfinity()?"":""},x.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},x.prototype.dbl=function(){var g=this.x.redAdd(this.z).redSqr(),l=this.x.redSub(this.z).redSqr(),h=g.redSub(l),u=g.redMul(l),m=h.redMul(l.redAdd(this.curve.a24.redMul(h)));return this.curve.point(u,m)},x.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},x.prototype.diffAdd=function(T,g){var b=this.x.redAdd(this.z),l=this.x.redSub(this.z),h=T.x.redAdd(T.z),m=T.x.redSub(T.z).redMul(b),_=h.redMul(l),w=g.z.redMul(m.redAdd(_).redSqr()),S=g.x.redMul(m.redISub(_).redSqr());return this.curve.point(w,S)},x.prototype.mul=function(T){for(var g=T.clone(),b=this,l=this.curve.point(null,null),u=[];0!==g.cmpn(0);g.iushrn(1))u.push(g.andln(1));for(var m=u.length-1;m>=0;m--)0===u[m]?(b=b.diffAdd(l,this),l=l.dbl()):(l=b.diffAdd(l,this),b=b.dbl());return l},x.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},x.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},x.prototype.eq=function(T){return 0===this.getX().cmp(T.getX())},x.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},x.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},29918:(bt,be,Y)=>{"use strict";var ie=Y(22946),z=Y(24584),O=Y(59879),E=Y(10780),d=ie.assert;function x(g){E.call(this,"short",g),this.a=new z(g.a,16).toRed(this.red),this.b=new z(g.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(g),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(g,b,l,h){E.BasePoint.call(this,g,"affine"),null===b&&null===l?(this.x=null,this.y=null,this.inf=!0):(this.x=new z(b,16),this.y=new z(l,16),h&&(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 T(g,b,l,h){E.BasePoint.call(this,g,"jacobian"),null===b&&null===l&&null===h?(this.x=this.curve.one,this.y=this.curve.one,this.z=new z(0)):(this.x=new z(b,16),this.y=new z(l,16),this.z=new z(h,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}O(x,E),bt.exports=x,x.prototype._getEndomorphism=function(b){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var l,h;if(b.beta)l=new z(b.beta,16).toRed(this.red);else{var u=this._getEndoRoots(this.p);l=(l=u[0].cmp(u[1])<0?u[0]:u[1]).toRed(this.red)}if(b.lambda)h=new z(b.lambda,16);else{var m=this._getEndoRoots(this.n);0===this.g.mul(m[0]).x.cmp(this.g.x.redMul(l))?h=m[0]:d(0===this.g.mul(h=m[1]).x.cmp(this.g.x.redMul(l)))}return{beta:l,lambda:h,basis:b.basis?b.basis.map(function(w){return{a:new z(w.a,16),b:new z(w.b,16)}}):this._getEndoBasis(h)}}},x.prototype._getEndoRoots=function(b){var l=b===this.p?this.red:z.mont(b),h=new z(2).toRed(l).redInvm(),u=h.redNeg(),m=new z(3).toRed(l).redNeg().redSqrt().redMul(h);return[u.redAdd(m).fromRed(),u.redSub(m).fromRed()]},x.prototype._getEndoBasis=function(b){for(var I,P,L,V,W,G,H,K,R,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=b,u=this.n.clone(),m=new z(1),_=new z(0),w=new z(0),S=new z(1),j=0;0!==h.cmpn(0);){var o=u.div(h);K=u.sub(o.mul(h)),R=w.sub(o.mul(m));var y=S.sub(o.mul(_));if(!L&&K.cmp(l)<0)I=H.neg(),P=m,L=K.neg(),V=R;else if(L&&2==++j)break;H=K,u=h,h=K,w=m,m=R,S=_,_=y}W=K.neg(),G=R;var M=L.sqr().add(V.sqr());return W.sqr().add(G.sqr()).cmp(M)>=0&&(W=I,G=P),L.negative&&(L=L.neg(),V=V.neg()),W.negative&&(W=W.neg(),G=G.neg()),[{a:L,b:V},{a:W,b:G}]},x.prototype._endoSplit=function(b){var l=this.endo.basis,h=l[0],u=l[1],m=u.b.mul(b).divRound(this.n),_=h.b.neg().mul(b).divRound(this.n),w=m.mul(h.a),S=_.mul(u.a),I=m.mul(h.b),P=_.mul(u.b);return{k1:b.sub(w).sub(S),k2:I.add(P).neg()}},x.prototype.pointFromX=function(b,l){(b=new z(b,16)).red||(b=b.toRed(this.red));var h=b.redSqr().redMul(b).redIAdd(b.redMul(this.a)).redIAdd(this.b),u=h.redSqrt();if(0!==u.redSqr().redSub(h).cmp(this.zero))throw new Error("invalid point");var m=u.fromRed().isOdd();return(l&&!m||!l&&m)&&(u=u.redNeg()),this.point(b,u)},x.prototype.validate=function(b){if(b.inf)return!0;var l=b.x,h=b.y,u=this.a.redMul(l),m=l.redSqr().redMul(l).redIAdd(u).redIAdd(this.b);return 0===h.redSqr().redISub(m).cmpn(0)},x.prototype._endoWnafMulAdd=function(b,l,h){for(var u=this._endoWnafT1,m=this._endoWnafT2,_=0;_":""},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(b){if(this.inf)return b;if(b.inf)return this;if(this.eq(b))return this.dbl();if(this.neg().eq(b))return this.curve.point(null,null);if(0===this.x.cmp(b.x))return this.curve.point(null,null);var l=this.y.redSub(b.y);0!==l.cmpn(0)&&(l=l.redMul(this.x.redSub(b.x).redInvm()));var h=l.redSqr().redISub(this.x).redISub(b.x),u=l.redMul(this.x.redSub(h)).redISub(this.y);return this.curve.point(h,u)},f.prototype.dbl=function(){if(this.inf)return this;var b=this.y.redAdd(this.y);if(0===b.cmpn(0))return this.curve.point(null,null);var l=this.curve.a,h=this.x.redSqr(),u=b.redInvm(),m=h.redAdd(h).redIAdd(h).redIAdd(l).redMul(u),_=m.redSqr().redISub(this.x.redAdd(this.x)),w=m.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,w)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(b){return b=new z(b,16),this.isInfinity()?this:this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve.endo?this.curve._endoWnafMulAdd([this],[b]):this.curve._wnafMul(this,b)},f.prototype.mulAdd=function(b,l,h){var u=[this,l],m=[b,h];return this.curve.endo?this.curve._endoWnafMulAdd(u,m):this.curve._wnafMulAdd(1,u,m,2)},f.prototype.jmulAdd=function(b,l,h){var u=[this,l],m=[b,h];return this.curve.endo?this.curve._endoWnafMulAdd(u,m,!0):this.curve._wnafMulAdd(1,u,m,2,!0)},f.prototype.eq=function(b){return this===b||this.inf===b.inf&&(this.inf||0===this.x.cmp(b.x)&&0===this.y.cmp(b.y))},f.prototype.neg=function(b){if(this.inf)return this;var l=this.curve.point(this.x,this.y.redNeg());if(b&&this.precomputed){var h=this.precomputed,u=function(m){return m.neg()};l.precomputed={naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(u)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(u)}}}return l},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},O(T,E.BasePoint),x.prototype.jpoint=function(b,l,h){return new T(this,b,l,h)},T.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var b=this.z.redInvm(),l=b.redSqr(),h=this.x.redMul(l),u=this.y.redMul(l).redMul(b);return this.curve.point(h,u)},T.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},T.prototype.add=function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var l=b.z.redSqr(),h=this.z.redSqr(),u=this.x.redMul(l),m=b.x.redMul(h),_=this.y.redMul(l.redMul(b.z)),w=b.y.redMul(h.redMul(this.z)),S=u.redSub(m),I=_.redSub(w);if(0===S.cmpn(0))return 0!==I.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var P=S.redSqr(),L=P.redMul(S),V=u.redMul(P),W=I.redSqr().redIAdd(L).redISub(V).redISub(V),G=I.redMul(V.redISub(W)).redISub(_.redMul(L)),H=this.z.redMul(b.z).redMul(S);return this.curve.jpoint(W,G,H)},T.prototype.mixedAdd=function(b){if(this.isInfinity())return b.toJ();if(b.isInfinity())return this;var l=this.z.redSqr(),h=this.x,u=b.x.redMul(l),m=this.y,_=b.y.redMul(l).redMul(this.z),w=h.redSub(u),S=m.redSub(_);if(0===w.cmpn(0))return 0!==S.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var I=w.redSqr(),P=I.redMul(w),L=h.redMul(I),V=S.redSqr().redIAdd(P).redISub(L).redISub(L),W=S.redMul(L.redISub(V)).redISub(m.redMul(P)),G=this.z.redMul(w);return this.curve.jpoint(V,W,G)},T.prototype.dblp=function(b){if(0===b)return this;if(this.isInfinity())return this;if(!b)return this.dbl();var l;if(this.curve.zeroA||this.curve.threeA){var h=this;for(l=0;l=0)return!1;if(h.redIAdd(m),0===this.x.cmp(h))return!0}},T.prototype.inspect=function(){return this.isInfinity()?"":""},T.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},73346:(bt,be,Y)=>{"use strict";var T,ie=be,z=Y(37909),O=Y(93868),d=Y(22946).assert;function x(g){this.curve="short"===g.type?new O.short(g):"edwards"===g.type?new O.edwards(g):new O.mont(g),this.g=this.curve.g,this.n=this.curve.n,this.hash=g.hash,d(this.g.validate(),"Invalid curve"),d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(g,b){Object.defineProperty(ie,g,{configurable:!0,enumerable:!0,get:function(){var l=new x(b);return Object.defineProperty(ie,g,{configurable:!0,enumerable:!0,value:l}),l}})}ie.PresetCurve=x,f("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:z.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("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:z.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("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:z.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("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:z.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"]}),f("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:z.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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:z.sha256,gRed:!1,g:["9"]}),f("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:z.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{T=Y(5503)}catch{T=void 0}f("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:z.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",T]})},17237:(bt,be,Y)=>{"use strict";var ie=Y(24584),z=Y(72730),O=Y(22946),E=Y(73346),d=Y(34761),x=O.assert,f=Y(12806),T=Y(46799);function g(b){if(!(this instanceof g))return new g(b);"string"==typeof b&&(x(Object.prototype.hasOwnProperty.call(E,b),"Unknown curve "+b),b=E[b]),b instanceof E.PresetCurve&&(b={curve:b}),this.curve=b.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=b.curve.g,this.g.precompute(b.curve.n.bitLength()+1),this.hash=b.hash||b.curve.hash}bt.exports=g,g.prototype.keyPair=function(l){return new f(this,l)},g.prototype.keyFromPrivate=function(l,h){return f.fromPrivate(this,l,h)},g.prototype.keyFromPublic=function(l,h){return f.fromPublic(this,l,h)},g.prototype.genKeyPair=function(l){l||(l={});for(var h=new z({hash:this.hash,pers:l.pers,persEnc:l.persEnc||"utf8",entropy:l.entropy||d(this.hash.hmacStrength),entropyEnc:l.entropy&&l.entropyEnc||"utf8",nonce:this.n.toArray()}),u=this.n.byteLength(),m=this.n.sub(new ie(2));;){var _=new ie(h.generate(u));if(!(_.cmp(m)>0))return _.iaddn(1),this.keyFromPrivate(_)}},g.prototype._truncateToN=function(l,h){var u=8*l.byteLength()-this.n.bitLength();return u>0&&(l=l.ushrn(u)),!h&&l.cmp(this.n)>=0?l.sub(this.n):l},g.prototype.sign=function(l,h,u,m){"object"==typeof u&&(m=u,u=null),m||(m={}),h=this.keyFromPrivate(h,u),l=this._truncateToN(new ie(l,16));for(var _=this.n.byteLength(),w=h.getPrivate().toArray("be",_),S=l.toArray("be",_),I=new z({hash:this.hash,entropy:w,nonce:S,pers:m.pers,persEnc:m.persEnc||"utf8"}),P=this.n.sub(new ie(1)),L=0;;L++){var V=m.k?m.k(L):new ie(I.generate(this.n.byteLength()));if(!((V=this._truncateToN(V,!0)).cmpn(1)<=0||V.cmp(P)>=0)){var W=this.g.mul(V);if(!W.isInfinity()){var G=W.getX(),H=G.umod(this.n);if(0!==H.cmpn(0)){var j=V.invm(this.n).mul(H.mul(h.getPrivate()).iadd(l));if(0!==(j=j.umod(this.n)).cmpn(0)){var K=(W.getY().isOdd()?1:0)|(0!==G.cmp(H)?2:0);return m.canonical&&j.cmp(this.nh)>0&&(j=this.n.sub(j),K^=1),new T({r:H,s:j,recoveryParam:K})}}}}}},g.prototype.verify=function(l,h,u,m){l=this._truncateToN(new ie(l,16)),u=this.keyFromPublic(u,m);var _=(h=new T(h,"hex")).r,w=h.s;if(_.cmpn(1)<0||_.cmp(this.n)>=0||w.cmpn(1)<0||w.cmp(this.n)>=0)return!1;var L,S=w.invm(this.n),I=S.mul(l).umod(this.n),P=S.mul(_).umod(this.n);return this.curve._maxwellTrick?!(L=this.g.jmulAdd(I,u.getPublic(),P)).isInfinity()&&L.eqXToP(_):!(L=this.g.mulAdd(I,u.getPublic(),P)).isInfinity()&&0===L.getX().umod(this.n).cmp(_)},g.prototype.recoverPubKey=function(b,l,h,u){x((3&h)===h,"The recovery param is more than two bits"),l=new T(l,u);var m=this.n,_=new ie(b),w=l.r,S=l.s,I=1&h,P=h>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&P)throw new Error("Unable to find sencond key candinate");w=this.curve.pointFromX(P?w.add(this.curve.n):w,I);var L=l.r.invm(m),V=m.sub(_).mul(L).umod(m),W=S.mul(L).umod(m);return this.g.mulAdd(V,w,W)},g.prototype.getKeyRecoveryParam=function(b,l,h,u){if(null!==(l=new T(l,u)).recoveryParam)return l.recoveryParam;for(var m=0;m<4;m++){var _;try{_=this.recoverPubKey(b,l,m)}catch{continue}if(_.eq(h))return m}throw new Error("Unable to find valid recovery factor")}},12806:(bt,be,Y)=>{"use strict";var ie=Y(24584),O=Y(22946).assert;function E(d,x){this.ec=d,this.priv=null,this.pub=null,x.priv&&this._importPrivate(x.priv,x.privEnc),x.pub&&this._importPublic(x.pub,x.pubEnc)}bt.exports=E,E.fromPublic=function(x,f,T){return f instanceof E?f:new E(x,{pub:f,pubEnc:T})},E.fromPrivate=function(x,f,T){return f instanceof E?f:new E(x,{priv:f,privEnc:T})},E.prototype.validate=function(){var x=this.getPublic();return x.isInfinity()?{result:!1,reason:"Invalid public key"}:x.validate()?x.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"}},E.prototype.getPublic=function(x,f){return"string"==typeof x&&(f=x,x=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),f?this.pub.encode(f,x):this.pub},E.prototype.getPrivate=function(x){return"hex"===x?this.priv.toString(16,2):this.priv},E.prototype._importPrivate=function(x,f){this.priv=new ie(x,f||16),this.priv=this.priv.umod(this.ec.curve.n)},E.prototype._importPublic=function(x,f){if(x.x||x.y)return"mont"===this.ec.curve.type?O(x.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&O(x.x&&x.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(x.x,x.y));this.pub=this.ec.curve.decodePoint(x,f)},E.prototype.derive=function(x){return x.validate()||O(x.validate(),"public point not validated"),x.mul(this.priv).getX()},E.prototype.sign=function(x,f,T){return this.ec.sign(x,this,f,T)},E.prototype.verify=function(x,f){return this.ec.verify(x,f,this)},E.prototype.inspect=function(){return""}},46799:(bt,be,Y)=>{"use strict";var ie=Y(24584),z=Y(22946),O=z.assert;function E(g,b){if(g instanceof E)return g;this._importDER(g,b)||(O(g.r&&g.s,"Signature without r or s"),this.r=new ie(g.r,16),this.s=new ie(g.s,16),this.recoveryParam=void 0===g.recoveryParam?null:g.recoveryParam)}function d(){this.place=0}function x(g,b){var l=g[b.place++];if(!(128&l))return l;var h=15&l;if(0===h||h>4)return!1;for(var u=0,m=0,_=b.place;m>>=0;return!(u<=127)&&(b.place=_,u)}function f(g){for(var b=0,l=g.length-1;!g[b]&&!(128&g[b+1])&&b>>3);for(g.push(128|l);--l;)g.push(b>>>(l<<3)&255);g.push(b)}}bt.exports=E,E.prototype._importDER=function(b,l){b=z.toArray(b,l);var h=new d;if(48!==b[h.place++])return!1;var u=x(b,h);if(!1===u||u+h.place!==b.length||2!==b[h.place++])return!1;var m=x(b,h);if(!1===m)return!1;var _=b.slice(h.place,m+h.place);if(h.place+=m,2!==b[h.place++])return!1;var w=x(b,h);if(!1===w||b.length!==w+h.place)return!1;var S=b.slice(h.place,w+h.place);if(0===_[0]){if(!(128&_[1]))return!1;_=_.slice(1)}if(0===S[0]){if(!(128&S[1]))return!1;S=S.slice(1)}return this.r=new ie(_),this.s=new ie(S),this.recoveryParam=null,!0},E.prototype.toDER=function(b){var l=this.r.toArray(),h=this.s.toArray();for(128&l[0]&&(l=[0].concat(l)),128&h[0]&&(h=[0].concat(h)),l=f(l),h=f(h);!(h[0]||128&h[1]);)h=h.slice(1);var u=[2];T(u,l.length),(u=u.concat(l)).push(2),T(u,h.length);var m=u.concat(h),_=[48];return T(_,m.length),_=_.concat(m),z.encode(_,b)}},61615:(bt,be,Y)=>{"use strict";var ie=Y(37909),z=Y(73346),O=Y(22946),E=O.assert,d=O.parseBytes,x=Y(46014),f=Y(36317);function T(g){if(E("ed25519"===g,"only tested with ed25519 so far"),!(this instanceof T))return new T(g);this.curve=g=z[g].curve,this.g=g.g,this.g.precompute(g.n.bitLength()+1),this.pointClass=g.point().constructor,this.encodingLength=Math.ceil(g.n.bitLength()/8),this.hash=ie.sha512}bt.exports=T,T.prototype.sign=function(b,l){b=d(b);var h=this.keyFromSecret(l),u=this.hashInt(h.messagePrefix(),b),m=this.g.mul(u),_=this.encodePoint(m),w=this.hashInt(_,h.pubBytes(),b).mul(h.priv()),S=u.add(w).umod(this.curve.n);return this.makeSignature({R:m,S,Rencoded:_})},T.prototype.verify=function(b,l,h){b=d(b),l=this.makeSignature(l);var u=this.keyFromPublic(h),m=this.hashInt(l.Rencoded(),u.pubBytes(),b),_=this.g.mul(l.S());return l.R().add(u.pub().mul(m)).eq(_)},T.prototype.hashInt=function(){for(var b=this.hash(),l=0;l{"use strict";var ie=Y(22946),z=ie.assert,O=ie.parseBytes,E=ie.cachedProperty;function d(x,f){this.eddsa=x,this._secret=O(f.secret),x.isPoint(f.pub)?this._pub=f.pub:this._pubBytes=O(f.pub)}d.fromPublic=function(f,T){return T instanceof d?T:new d(f,{pub:T})},d.fromSecret=function(f,T){return T instanceof d?T:new d(f,{secret:T})},d.prototype.secret=function(){return this._secret},E(d,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),E(d,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),E(d,"privBytes",function(){var f=this.eddsa,T=this.hash(),g=f.encodingLength-1,b=T.slice(0,f.encodingLength);return b[0]&=248,b[g]&=127,b[g]|=64,b}),E(d,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),E(d,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),E(d,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),d.prototype.sign=function(f){return z(this._secret,"KeyPair can only verify"),this.eddsa.sign(f,this)},d.prototype.verify=function(f,T){return this.eddsa.verify(f,T,this)},d.prototype.getSecret=function(f){return z(this._secret,"KeyPair is public only"),ie.encode(this.secret(),f)},d.prototype.getPublic=function(f){return ie.encode(this.pubBytes(),f)},bt.exports=d},36317:(bt,be,Y)=>{"use strict";var ie=Y(24584),z=Y(22946),O=z.assert,E=z.cachedProperty,d=z.parseBytes;function x(f,T){this.eddsa=f,"object"!=typeof T&&(T=d(T)),Array.isArray(T)&&(T={R:T.slice(0,f.encodingLength),S:T.slice(f.encodingLength)}),O(T.R&&T.S,"Signature without R or S"),f.isPoint(T.R)&&(this._R=T.R),T.S instanceof ie&&(this._S=T.S),this._Rencoded=Array.isArray(T.R)?T.R:T.Rencoded,this._Sencoded=Array.isArray(T.S)?T.S:T.Sencoded}E(x,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),E(x,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),E(x,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),E(x,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),x.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},x.prototype.toHex=function(){return z.encode(this.toBytes(),"hex").toUpperCase()},bt.exports=x},5503:bt=>{bt.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"]]}}},22946:(bt,be,Y)=>{"use strict";var ie=be,z=Y(24584),O=Y(86055),E=Y(14869);ie.assert=O,ie.toArray=E.toArray,ie.zero2=E.zero2,ie.toHex=E.toHex,ie.encode=E.encode,ie.getNAF=function(b,l,h){var u=new Array(Math.max(b.bitLength(),h)+1);u.fill(0);for(var m=1<(m>>1)-1?(m>>1)-I:I):S=0,u[w]=S,_.iushrn(1)}return u},ie.getJSF=function(b,l){var h=[[],[]];b=b.clone(),l=l.clone();for(var _,u=0,m=0;b.cmpn(-u)>0||l.cmpn(-m)>0;){var I,P,w=b.andln(3)+u&3,S=l.andln(3)+m&3;3===w&&(w=-1),3===S&&(S=-1),I=0==(1&w)?0:3!=(_=b.andln(7)+u&7)&&5!==_||2!==S?w:-w,h[0].push(I),P=0==(1&S)?0:3!=(_=l.andln(7)+m&7)&&5!==_||2!==w?S:-S,h[1].push(P),2*u===I+1&&(u=1-u),2*m===P+1&&(m=1-m),b.iushrn(1),l.iushrn(1)}return h},ie.cachedProperty=function(b,l,h){var u="_"+l;b.prototype[l]=function(){return void 0!==this[u]?this[u]:this[u]=h.call(this)}},ie.parseBytes=function(b){return"string"==typeof b?ie.toArray(b,"hex"):b},ie.intFromLE=function(b){return new z(b,"hex","le")}},24584:function(bt,be,Y){!function(ie,z){"use strict";function O(R,o){if(!R)throw new Error(o||"Assertion failed")}function E(R,o){R.super_=o;var y=function(){};y.prototype=o.prototype,R.prototype=new y,R.prototype.constructor=R}function d(R,o,y){if(d.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,null!==R&&(("le"===o||"be"===o)&&(y=o,o=10),this._init(R||0,o||10,y||"be"))}var x;"object"==typeof ie?ie.exports=d:z.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(85568).Buffer}catch{}function f(R,o){var y=R.charCodeAt(o);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Yr=0|k[3],Ln=8191&Yr,Bn=Yr>>>13,$r=0|k[4],Gn=8191&$r,bn=$r>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,Gn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,Gn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,Gn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,Gn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,Gn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,Gn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,Gn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,Gn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,Gn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,Gn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,Gn),a=(a=Math.imul(St,bn))+Math.imul(Wt,Gn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},94464:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BaseContract:()=>O.BaseContract,BigNumber:()=>E.O$,Contract:()=>O.Contract,ContractFactory:()=>O.ContractFactory,FixedNumber:()=>d.xs,Signer:()=>x.Signer,VoidSigner:()=>x.VoidSigner,Wallet:()=>f.Wallet,Wordlist:()=>l.D,constants:()=>T,errors:()=>R.ErrorCode,ethers:()=>z,getDefaultProvider:()=>g.getDefaultProvider,logger:()=>ae,providers:()=>g,utils:()=>ie,version:()=>we,wordlists:()=>b.E});var ie={};Y.r(ie),Y.d(ie,{AbiCoder:()=>h.R,ConstructorFragment:()=>u.Xg,ErrorFragment:()=>u.IC,EventFragment:()=>u.QV,FormatTypes:()=>u.pc,Fragment:()=>u.HY,FunctionFragment:()=>u.YW,HDNode:()=>H.HDNode,Indexed:()=>_.Hk,Interface:()=>_.vU,LogDescription:()=>_.CC,Logger:()=>R.Logger,ParamType:()=>u._R,RLP:()=>D,SigningKey:()=>N.SigningKey,SupportedAlgorithm:()=>ue.p,TransactionDescription:()=>_.vk,TransactionTypes:()=>Q.TransactionTypes,UnicodeNormalizationForm:()=>a.Uj,Utf8ErrorFuncs:()=>a.te,Utf8ErrorReason:()=>a.Uw,_TypedDataEncoder:()=>G.E,_fetchData:()=>ce._fetchData,_toEscapedUtf8String:()=>a.U$,accessListify:()=>Q.accessListify,arrayify:()=>P.arrayify,base58:()=>I.Base58,base64:()=>S,checkProperties:()=>k.checkProperties,checkResultErrors:()=>m.BR,commify:()=>ee.commify,computeAddress:()=>Q.computeAddress,computeHmac:()=>o.Gy,computePublicKey:()=>N.computePublicKey,concat:()=>P.concat,deepCopy:()=>k.deepCopy,defaultAbiCoder:()=>h.$,defaultPath:()=>H.defaultPath,defineReadOnly:()=>k.defineReadOnly,dnsEncode:()=>L.Kn,entropyToMnemonic:()=>H.entropyToMnemonic,fetchJson:()=>ce.fetchJson,formatBytes32String:()=>B.s,formatEther:()=>ee.formatEther,formatUnits:()=>ee.formatUnits,getAccountPath:()=>H.getAccountPath,getAddress:()=>w.getAddress,getContractAddress:()=>w.getContractAddress,getCreate2Address:()=>w.getCreate2Address,getIcapAddress:()=>w.getIcapAddress,getJsonWalletAddress:()=>j.Rb,getStatic:()=>k.getStatic,hashMessage:()=>V.r,hexConcat:()=>P.hexConcat,hexDataLength:()=>P.hexDataLength,hexDataSlice:()=>P.hexDataSlice,hexStripZeros:()=>P.hexStripZeros,hexValue:()=>P.hexValue,hexZeroPad:()=>P.hexZeroPad,hexlify:()=>P.hexlify,id:()=>W.id,isAddress:()=>w.isAddress,isBytes:()=>P.isBytes,isBytesLike:()=>P.isBytesLike,isHexString:()=>P.isHexString,isValidMnemonic:()=>H.isValidMnemonic,isValidName:()=>L.r1,joinSignature:()=>P.joinSignature,keccak256:()=>K.keccak256,mnemonicToEntropy:()=>H.mnemonicToEntropy,mnemonicToSeed:()=>H.mnemonicToSeed,namehash:()=>L.VM,nameprep:()=>C.Ll,parseBytes32String:()=>B.F,parseEther:()=>ee.parseEther,parseTransaction:()=>Q.parse,parseUnits:()=>ee.parseUnits,poll:()=>ce.poll,randomBytes:()=>M.O,recoverAddress:()=>Q.recoverAddress,recoverPublicKey:()=>N.recoverPublicKey,resolveProperties:()=>k.resolveProperties,ripemd160:()=>o.bP,serializeTransaction:()=>Q.serialize,sha256:()=>o.JQ,sha512:()=>o.o,shallowCopy:()=>k.shallowCopy,shuffled:()=>v.y,solidityKeccak256:()=>y.keccak256,solidityPack:()=>y.pack,soliditySha256:()=>y.sha256,splitSignature:()=>P.splitSignature,stripZeros:()=>P.stripZeros,toUtf8Bytes:()=>a.Y0,toUtf8CodePoints:()=>a.XL,toUtf8String:()=>a.ZN,verifyMessage:()=>f.verifyMessage,verifyTypedData:()=>f.verifyTypedData,zeroPad:()=>P.zeroPad});var z={};Y.r(z),Y.d(z,{BaseContract:()=>O.BaseContract,BigNumber:()=>E.O$,Contract:()=>O.Contract,ContractFactory:()=>O.ContractFactory,FixedNumber:()=>d.xs,Signer:()=>x.Signer,VoidSigner:()=>x.VoidSigner,Wallet:()=>f.Wallet,Wordlist:()=>l.D,constants:()=>T,errors:()=>R.ErrorCode,getDefaultProvider:()=>g.getDefaultProvider,logger:()=>ae,providers:()=>g,utils:()=>ie,version:()=>we,wordlists:()=>b.E});var O=Y(36776),E=Y(2024),d=Y(71677),x=Y(11221),f=Y(6846),T=Y(11843),g=Y(80831),b=Y(33692),l=Y(14667),h=Y(53941),u=Y(55586),m=Y(91125),_=Y(20886),w=Y(2885),S=Y(67711),I=Y(53744),P=Y(61488),L=Y(21),V=Y(78429),W=Y(67475),G=Y(72072),H=Y(49593),j=Y(87989),K=Y(28518),R=Y(53898),o=Y(15614),y=Y(37979),M=Y(42563),v=Y(34820),k=Y(92275),D=Y(29276),N=Y(99596),C=Y(17188),a=Y(8822),B=Y(44688),Q=Y(32701),ee=Y(2519),ce=Y(51838),ue=Y(83389);const we="ethers/5.7.2",ae=new R.Logger(we);try{const Te=window;null==Te._ethers&&(Te._ethers=z)}catch{}},92673:function(bt,be,Y){"use strict";var ie=this&&this.__createBinding||(Object.create?function(R,o,y,M){void 0===M&&(M=y),Object.defineProperty(R,M,{enumerable:!0,get:function(){return o[y]}})}:function(R,o,y,M){void 0===M&&(M=y),R[M]=o[y]}),z=this&&this.__setModuleDefault||(Object.create?function(R,o){Object.defineProperty(R,"default",{enumerable:!0,value:o})}:function(R,o){R.default=o}),O=this&&this.__importStar||function(R){if(R&&R.__esModule)return R;var o={};if(null!=R)for(var y in R)"default"!==y&&Object.prototype.hasOwnProperty.call(R,y)&&ie(o,R,y);return z(o,R),o};Object.defineProperty(be,"__esModule",{value:!0}),be.formatBytes32String=be.Utf8ErrorFuncs=be.toUtf8String=be.toUtf8CodePoints=be.toUtf8Bytes=be._toEscapedUtf8String=be.nameprep=be.hexDataSlice=be.hexDataLength=be.hexZeroPad=be.hexValue=be.hexStripZeros=be.hexConcat=be.isHexString=be.hexlify=be.base64=be.base58=be.TransactionDescription=be.LogDescription=be.Interface=be.SigningKey=be.HDNode=be.defaultPath=be.isBytesLike=be.isBytes=be.zeroPad=be.stripZeros=be.concat=be.arrayify=be.shallowCopy=be.resolveProperties=be.getStatic=be.defineReadOnly=be.deepCopy=be.checkProperties=be.poll=be.fetchJson=be._fetchData=be.RLP=be.Logger=be.checkResultErrors=be.FormatTypes=be.ParamType=be.FunctionFragment=be.EventFragment=be.ErrorFragment=be.ConstructorFragment=be.Fragment=be.defaultAbiCoder=be.AbiCoder=void 0,be.Indexed=be.Utf8ErrorReason=be.UnicodeNormalizationForm=be.SupportedAlgorithm=be.mnemonicToSeed=be.isValidMnemonic=be.entropyToMnemonic=be.mnemonicToEntropy=be.getAccountPath=be.verifyTypedData=be.verifyMessage=be.recoverPublicKey=be.computePublicKey=be.recoverAddress=be.computeAddress=be.getJsonWalletAddress=be.TransactionTypes=be.serializeTransaction=be.parseTransaction=be.accessListify=be.joinSignature=be.splitSignature=be.soliditySha256=be.solidityKeccak256=be.solidityPack=be.shuffled=be.randomBytes=be.sha512=be.sha256=be.ripemd160=be.keccak256=be.computeHmac=be.commify=be.parseUnits=be.formatUnits=be.parseEther=be.formatEther=be.isAddress=be.getCreate2Address=be.getContractAddress=be.getIcapAddress=be.getAddress=be._TypedDataEncoder=be.id=be.isValidName=be.namehash=be.hashMessage=be.dnsEncode=be.parseBytes32String=void 0;var E=Y(7910);Object.defineProperty(be,"AbiCoder",{enumerable:!0,get:function(){return E.AbiCoder}}),Object.defineProperty(be,"checkResultErrors",{enumerable:!0,get:function(){return E.checkResultErrors}}),Object.defineProperty(be,"ConstructorFragment",{enumerable:!0,get:function(){return E.ConstructorFragment}}),Object.defineProperty(be,"defaultAbiCoder",{enumerable:!0,get:function(){return E.defaultAbiCoder}}),Object.defineProperty(be,"ErrorFragment",{enumerable:!0,get:function(){return E.ErrorFragment}}),Object.defineProperty(be,"EventFragment",{enumerable:!0,get:function(){return E.EventFragment}}),Object.defineProperty(be,"FormatTypes",{enumerable:!0,get:function(){return E.FormatTypes}}),Object.defineProperty(be,"Fragment",{enumerable:!0,get:function(){return E.Fragment}}),Object.defineProperty(be,"FunctionFragment",{enumerable:!0,get:function(){return E.FunctionFragment}}),Object.defineProperty(be,"Indexed",{enumerable:!0,get:function(){return E.Indexed}}),Object.defineProperty(be,"Interface",{enumerable:!0,get:function(){return E.Interface}}),Object.defineProperty(be,"LogDescription",{enumerable:!0,get:function(){return E.LogDescription}}),Object.defineProperty(be,"ParamType",{enumerable:!0,get:function(){return E.ParamType}}),Object.defineProperty(be,"TransactionDescription",{enumerable:!0,get:function(){return E.TransactionDescription}});var d=Y(2885);Object.defineProperty(be,"getAddress",{enumerable:!0,get:function(){return d.getAddress}}),Object.defineProperty(be,"getCreate2Address",{enumerable:!0,get:function(){return d.getCreate2Address}}),Object.defineProperty(be,"getContractAddress",{enumerable:!0,get:function(){return d.getContractAddress}}),Object.defineProperty(be,"getIcapAddress",{enumerable:!0,get:function(){return d.getIcapAddress}}),Object.defineProperty(be,"isAddress",{enumerable:!0,get:function(){return d.isAddress}});var x=O(Y(67711));be.base64=x;var f=Y(53744);Object.defineProperty(be,"base58",{enumerable:!0,get:function(){return f.Base58}});var T=Y(61488);Object.defineProperty(be,"arrayify",{enumerable:!0,get:function(){return T.arrayify}}),Object.defineProperty(be,"concat",{enumerable:!0,get:function(){return T.concat}}),Object.defineProperty(be,"hexConcat",{enumerable:!0,get:function(){return T.hexConcat}}),Object.defineProperty(be,"hexDataSlice",{enumerable:!0,get:function(){return T.hexDataSlice}}),Object.defineProperty(be,"hexDataLength",{enumerable:!0,get:function(){return T.hexDataLength}}),Object.defineProperty(be,"hexlify",{enumerable:!0,get:function(){return T.hexlify}}),Object.defineProperty(be,"hexStripZeros",{enumerable:!0,get:function(){return T.hexStripZeros}}),Object.defineProperty(be,"hexValue",{enumerable:!0,get:function(){return T.hexValue}}),Object.defineProperty(be,"hexZeroPad",{enumerable:!0,get:function(){return T.hexZeroPad}}),Object.defineProperty(be,"isBytes",{enumerable:!0,get:function(){return T.isBytes}}),Object.defineProperty(be,"isBytesLike",{enumerable:!0,get:function(){return T.isBytesLike}}),Object.defineProperty(be,"isHexString",{enumerable:!0,get:function(){return T.isHexString}}),Object.defineProperty(be,"joinSignature",{enumerable:!0,get:function(){return T.joinSignature}}),Object.defineProperty(be,"zeroPad",{enumerable:!0,get:function(){return T.zeroPad}}),Object.defineProperty(be,"splitSignature",{enumerable:!0,get:function(){return T.splitSignature}}),Object.defineProperty(be,"stripZeros",{enumerable:!0,get:function(){return T.stripZeros}});var g=Y(778);Object.defineProperty(be,"_TypedDataEncoder",{enumerable:!0,get:function(){return g._TypedDataEncoder}}),Object.defineProperty(be,"dnsEncode",{enumerable:!0,get:function(){return g.dnsEncode}}),Object.defineProperty(be,"hashMessage",{enumerable:!0,get:function(){return g.hashMessage}}),Object.defineProperty(be,"id",{enumerable:!0,get:function(){return g.id}}),Object.defineProperty(be,"isValidName",{enumerable:!0,get:function(){return g.isValidName}}),Object.defineProperty(be,"namehash",{enumerable:!0,get:function(){return g.namehash}});var b=Y(49593);Object.defineProperty(be,"defaultPath",{enumerable:!0,get:function(){return b.defaultPath}}),Object.defineProperty(be,"entropyToMnemonic",{enumerable:!0,get:function(){return b.entropyToMnemonic}}),Object.defineProperty(be,"getAccountPath",{enumerable:!0,get:function(){return b.getAccountPath}}),Object.defineProperty(be,"HDNode",{enumerable:!0,get:function(){return b.HDNode}}),Object.defineProperty(be,"isValidMnemonic",{enumerable:!0,get:function(){return b.isValidMnemonic}}),Object.defineProperty(be,"mnemonicToEntropy",{enumerable:!0,get:function(){return b.mnemonicToEntropy}}),Object.defineProperty(be,"mnemonicToSeed",{enumerable:!0,get:function(){return b.mnemonicToSeed}});var l=Y(53746);Object.defineProperty(be,"getJsonWalletAddress",{enumerable:!0,get:function(){return l.getJsonWalletAddress}});var h=Y(28518);Object.defineProperty(be,"keccak256",{enumerable:!0,get:function(){return h.keccak256}});var u=Y(53898);Object.defineProperty(be,"Logger",{enumerable:!0,get:function(){return u.Logger}});var m=Y(67591);Object.defineProperty(be,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(be,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(be,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(be,"sha512",{enumerable:!0,get:function(){return m.sha512}});var _=Y(37979);Object.defineProperty(be,"solidityKeccak256",{enumerable:!0,get:function(){return _.keccak256}}),Object.defineProperty(be,"solidityPack",{enumerable:!0,get:function(){return _.pack}}),Object.defineProperty(be,"soliditySha256",{enumerable:!0,get:function(){return _.sha256}});var w=Y(8859);Object.defineProperty(be,"randomBytes",{enumerable:!0,get:function(){return w.randomBytes}}),Object.defineProperty(be,"shuffled",{enumerable:!0,get:function(){return w.shuffled}});var S=Y(92275);Object.defineProperty(be,"checkProperties",{enumerable:!0,get:function(){return S.checkProperties}}),Object.defineProperty(be,"deepCopy",{enumerable:!0,get:function(){return S.deepCopy}}),Object.defineProperty(be,"defineReadOnly",{enumerable:!0,get:function(){return S.defineReadOnly}}),Object.defineProperty(be,"getStatic",{enumerable:!0,get:function(){return S.getStatic}}),Object.defineProperty(be,"resolveProperties",{enumerable:!0,get:function(){return S.resolveProperties}}),Object.defineProperty(be,"shallowCopy",{enumerable:!0,get:function(){return S.shallowCopy}});var I=O(Y(29276));be.RLP=I;var P=Y(99596);Object.defineProperty(be,"computePublicKey",{enumerable:!0,get:function(){return P.computePublicKey}}),Object.defineProperty(be,"recoverPublicKey",{enumerable:!0,get:function(){return P.recoverPublicKey}}),Object.defineProperty(be,"SigningKey",{enumerable:!0,get:function(){return P.SigningKey}});var L=Y(46956);Object.defineProperty(be,"formatBytes32String",{enumerable:!0,get:function(){return L.formatBytes32String}}),Object.defineProperty(be,"nameprep",{enumerable:!0,get:function(){return L.nameprep}}),Object.defineProperty(be,"parseBytes32String",{enumerable:!0,get:function(){return L.parseBytes32String}}),Object.defineProperty(be,"_toEscapedUtf8String",{enumerable:!0,get:function(){return L._toEscapedUtf8String}}),Object.defineProperty(be,"toUtf8Bytes",{enumerable:!0,get:function(){return L.toUtf8Bytes}}),Object.defineProperty(be,"toUtf8CodePoints",{enumerable:!0,get:function(){return L.toUtf8CodePoints}}),Object.defineProperty(be,"toUtf8String",{enumerable:!0,get:function(){return L.toUtf8String}}),Object.defineProperty(be,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return L.Utf8ErrorFuncs}});var V=Y(32701);Object.defineProperty(be,"accessListify",{enumerable:!0,get:function(){return V.accessListify}}),Object.defineProperty(be,"computeAddress",{enumerable:!0,get:function(){return V.computeAddress}}),Object.defineProperty(be,"parseTransaction",{enumerable:!0,get:function(){return V.parse}}),Object.defineProperty(be,"recoverAddress",{enumerable:!0,get:function(){return V.recoverAddress}}),Object.defineProperty(be,"serializeTransaction",{enumerable:!0,get:function(){return V.serialize}}),Object.defineProperty(be,"TransactionTypes",{enumerable:!0,get:function(){return V.TransactionTypes}});var W=Y(2519);Object.defineProperty(be,"commify",{enumerable:!0,get:function(){return W.commify}}),Object.defineProperty(be,"formatEther",{enumerable:!0,get:function(){return W.formatEther}}),Object.defineProperty(be,"parseEther",{enumerable:!0,get:function(){return W.parseEther}}),Object.defineProperty(be,"formatUnits",{enumerable:!0,get:function(){return W.formatUnits}}),Object.defineProperty(be,"parseUnits",{enumerable:!0,get:function(){return W.parseUnits}});var G=Y(6846);Object.defineProperty(be,"verifyMessage",{enumerable:!0,get:function(){return G.verifyMessage}}),Object.defineProperty(be,"verifyTypedData",{enumerable:!0,get:function(){return G.verifyTypedData}});var H=Y(51838);Object.defineProperty(be,"_fetchData",{enumerable:!0,get:function(){return H._fetchData}}),Object.defineProperty(be,"fetchJson",{enumerable:!0,get:function(){return H.fetchJson}}),Object.defineProperty(be,"poll",{enumerable:!0,get:function(){return H.poll}});var j=Y(67591);Object.defineProperty(be,"SupportedAlgorithm",{enumerable:!0,get:function(){return j.SupportedAlgorithm}});var K=Y(46956);Object.defineProperty(be,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return K.UnicodeNormalizationForm}}),Object.defineProperty(be,"Utf8ErrorReason",{enumerable:!0,get:function(){return K.Utf8ErrorReason}})},67711:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{decode:()=>z,encode:()=>O});var ie=Y(61488);function z(E){E=atob(E);const d=[];for(let x=0;x{"use strict";var be=Object.prototype.hasOwnProperty,Y="~";function ie(){}function z(x,f,T){this.fn=x,this.context=f,this.once=T||!1}function O(x,f,T,g,b){if("function"!=typeof T)throw new TypeError("The listener must be a function");var l=new z(T,g||x,b),h=Y?Y+f:f;return x._events[h]?x._events[h].fn?x._events[h]=[x._events[h],l]:x._events[h].push(l):(x._events[h]=l,x._eventsCount++),x}function E(x,f){0==--x._eventsCount?x._events=new ie:delete x._events[f]}function d(){this._events=new ie,this._eventsCount=0}Object.create&&(ie.prototype=Object.create(null),(new ie).__proto__||(Y=!1)),d.prototype.eventNames=function(){var T,g,f=[];if(0===this._eventsCount)return f;for(g in T=this._events)be.call(T,g)&&f.push(Y?g.slice(1):g);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(T)):f},d.prototype.listeners=function(f){var g=this._events[Y?Y+f:f];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,l=g.length,h=new Array(l);b{"use strict";var ie,be="object"==typeof Reflect?Reflect:null,Y=be&&"function"==typeof be.apply?be.apply:function(L,V,W){return Function.prototype.apply.call(L,V,W)};ie=be&&"function"==typeof be.ownKeys?be.ownKeys:Object.getOwnPropertySymbols?function(L){return Object.getOwnPropertyNames(L).concat(Object.getOwnPropertySymbols(L))}:function(L){return Object.getOwnPropertyNames(L)};var O=Number.isNaN||function(L){return L!=L};function E(){E.init.call(this)}bt.exports=E,bt.exports.once=function(P,L){return new Promise(function(V,W){function G(j){P.removeListener(L,H),W(j)}function H(){"function"==typeof P.removeListener&&P.removeListener("error",G),V([].slice.call(arguments))}I(P,L,H,{once:!0}),"error"!==L&&function(P,L,V){"function"==typeof P.on&&I(P,"error",L,{once:!0})}(P,G)})},E.EventEmitter=E,E.prototype._events=void 0,E.prototype._eventsCount=0,E.prototype._maxListeners=void 0;var d=10;function x(P){if("function"!=typeof P)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}function f(P){return void 0===P._maxListeners?E.defaultMaxListeners:P._maxListeners}function T(P,L,V,W){var G,H,j;if(x(V),void 0===(H=P._events)?(H=P._events=Object.create(null),P._eventsCount=0):(void 0!==H.newListener&&(P.emit("newListener",L,V.listener?V.listener:V),H=P._events),j=H[L]),void 0===j)j=H[L]=V,++P._eventsCount;else if("function"==typeof j?j=H[L]=W?[V,j]:[j,V]:W?j.unshift(V):j.push(V),(G=f(P))>0&&j.length>G&&!j.warned){j.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=P,K.type=L,K.count=j.length,function(P){console&&console.warn&&console.warn(P)}(K)}return P}function g(){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 b(P,L,V){var W={fired:!1,wrapFn:void 0,target:P,type:L,listener:V},G=g.bind(W);return G.listener=V,W.wrapFn=G,G}function l(P,L,V){var W=P._events;if(void 0===W)return[];var G=W[L];return void 0===G?[]:"function"==typeof G?V?[G.listener||G]:[G]:V?function(P){for(var L=new Array(P.length),V=0;V0&&(j=V[0]),j instanceof Error)throw j;var K=new Error("Unhandled error."+(j?" ("+j.message+")":""));throw K.context=j,K}var R=H[L];if(void 0===R)return!1;if("function"==typeof R)Y(R,this,V);else{var o=R.length,y=u(R,o);for(W=0;W=0;j--)if(W[j]===V||W[j].listener===V){K=W[j].listener,H=j;break}if(H<0)return this;0===H?W.shift():function(P,L){for(;L+1=0;G--)this.removeListener(L,V[G]);return this},E.prototype.listeners=function(L){return l(this,L,!0)},E.prototype.rawListeners=function(L){return l(this,L,!1)},E.listenerCount=function(P,L){return"function"==typeof P.listenerCount?P.listenerCount(L):h.call(P,L)},E.prototype.listenerCount=h,E.prototype.eventNames=function(){return this._eventsCount>0?ie(this._events):[]}},92367:(bt,be,Y)=>{var ie=Y(55859).Buffer,z=Y(53264);bt.exports=function(E,d,x,f){if(ie.isBuffer(E)||(E=ie.from(E,"binary")),d&&(ie.isBuffer(d)||(d=ie.from(d,"binary")),8!==d.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var T=x/8,g=ie.alloc(T),b=ie.alloc(f||0),l=ie.alloc(0);T>0||f>0;){var h=new z;h.update(l),h.update(E),d&&h.update(d),l=h.digest();var u=0;if(T>0){var m=g.length-T;u=Math.min(T,l.length),l.copy(g,m,0,u),T-=u}if(u0){var _=b.length-f,w=Math.min(f,l.length-u);l.copy(b,_,u,u+w),f-=w}}return l.fill(0),{key:g,iv:b}}},51669:bt=>{"use strict";bt.exports=function(Y){var z=Y.name,O=Y.type;this.uri=Y.uri,this.name=z,this.type=O}},66795:(bt,be,Y)=>{"use strict";var ie=Y(26046);bt.exports=function z(O,E,d){void 0===E&&(E=""),void 0===d&&(d=ie);var x,f=new Map;function T(h,u){var m=f.get(u);m?m.push.apply(m,h):f.set(u,h)}if(d(O))x=null,T([E],O);else{var g=E?E+".":"";if("undefined"!=typeof FileList&&O instanceof FileList)x=Array.prototype.map.call(O,function(h,u){return T([""+g+u],h),null});else if(Array.isArray(O))x=O.map(function(h,u){var m=z(h,""+g+u,d);return m.files.forEach(T),m.clone});else if(O&&O.constructor===Object)for(var b in x={},O){var l=z(O[b],""+g+b,d);l.files.forEach(T),x[b]=l.clone}else x=O}return{clone:x,files:f}}},58673:(bt,be,Y)=>{"use strict";be.ReactNativeFile=Y(51669),be.extractFiles=Y(66795),be.isExtractableFile=Y(26046)},26046:(bt,be,Y)=>{"use strict";var ie=Y(51669);bt.exports=function(O){return"undefined"!=typeof File&&O instanceof File||"undefined"!=typeof Blob&&O instanceof Blob||O instanceof ie}},10979:bt=>{"use strict";bt.exports=function(be,Y){for(var ie={},z=Object.keys(be),O=Array.isArray(Y),E=0;E{bt.exports="object"==typeof self?self.FormData:window.FormData},31609:bt=>{"use strict";var be="Function.prototype.bind called on incompatible ",Y=Array.prototype.slice,ie=Object.prototype.toString,z="[object Function]";bt.exports=function(E){var d=this;if("function"!=typeof d||ie.call(d)!==z)throw new TypeError(be+d);for(var f,x=Y.call(arguments,1),T=function(){if(this instanceof f){var u=d.apply(this,x.concat(Y.call(arguments)));return Object(u)===u?u:this}return d.apply(E,x.concat(Y.call(arguments)))},g=Math.max(0,d.length-x.length),b=[],l=0;l{"use strict";var ie=Y(31609);bt.exports=Function.prototype.bind||ie},18540:(bt,be,Y)=>{"use strict";var ie,z=SyntaxError,O=Function,E=TypeError,d=function(y){try{return O('"use strict"; return ('+y+").constructor;")()}catch{}},x=Object.getOwnPropertyDescriptor;if(x)try{x({},"")}catch{x=null}var f=function(){throw new E},T=x?function(){try{return f}catch{try{return x(arguments,"callee").get}catch{return f}}}():f,g=Y(59326)(),b=Y(41606)(),l=Object.getPrototypeOf||(b?function(y){return y.__proto__}:null),h={},u="undefined"!=typeof Uint8Array&&l?l(Uint8Array):ie,m={"%AggregateError%":"undefined"==typeof AggregateError?ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ie:ArrayBuffer,"%ArrayIteratorPrototype%":g&&l?l([][Symbol.iterator]()):ie,"%AsyncFromSyncIteratorPrototype%":ie,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?ie:Atomics,"%BigInt%":"undefined"==typeof BigInt?ie:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?ie:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?ie:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ie:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ie:FinalizationRegistry,"%Function%":O,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?ie:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ie:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&l?l(l([][Symbol.iterator]())):ie,"%JSON%":"object"==typeof JSON?JSON:ie,"%Map%":"undefined"==typeof Map?ie:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&l?l((new Map)[Symbol.iterator]()):ie,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ie:Promise,"%Proxy%":"undefined"==typeof Proxy?ie:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?ie:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ie:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&l?l((new Set)[Symbol.iterator]()):ie,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&l?l(""[Symbol.iterator]()):ie,"%Symbol%":g?Symbol:ie,"%SyntaxError%":z,"%ThrowTypeError%":T,"%TypedArray%":u,"%TypeError%":E,"%Uint8Array%":"undefined"==typeof Uint8Array?ie:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ie:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ie:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ie:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?ie:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ie:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ie:WeakSet};if(l)try{null.error}catch(y){var _=l(l(y));m["%Error.prototype%"]=_}var w=function y(M){var v;if("%AsyncFunction%"===M)v=d("async function () {}");else if("%GeneratorFunction%"===M)v=d("function* () {}");else if("%AsyncGeneratorFunction%"===M)v=d("async function* () {}");else if("%AsyncGenerator%"===M){var k=y("%AsyncGeneratorFunction%");k&&(v=k.prototype)}else if("%AsyncIteratorPrototype%"===M){var D=y("%AsyncGenerator%");D&&l&&(v=l(D.prototype))}return m[M]=v,v},S={"%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"]},I=Y(75396),P=Y(57709),L=I.call(Function.call,Array.prototype.concat),V=I.call(Function.apply,Array.prototype.splice),W=I.call(Function.call,String.prototype.replace),G=I.call(Function.call,String.prototype.slice),H=I.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,R=function(M){var v=G(M,0,1),k=G(M,-1);if("%"===v&&"%"!==k)throw new z("invalid intrinsic syntax, expected closing `%`");if("%"===k&&"%"!==v)throw new z("invalid intrinsic syntax, expected opening `%`");var D=[];return W(M,j,function(N,C,a,B){D[D.length]=a?W(B,K,"$1"):C||N}),D},o=function(M,v){var D,k=M;if(P(S,k)&&(k="%"+(D=S[k])[0]+"%"),P(m,k)){var N=m[k];if(N===h&&(N=w(k)),void 0===N&&!v)throw new E("intrinsic "+M+" exists, but is not available. Please file an issue!");return{alias:D,name:k,value:N}}throw new z("intrinsic "+M+" does not exist!")};bt.exports=function(M,v){if("string"!=typeof M||0===M.length)throw new E("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof v)throw new E('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,M))throw new z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var k=R(M),D=k.length>0?k[0]:"",N=o("%"+D+"%",v),C=N.name,a=N.value,B=!1,Q=N.alias;Q&&(D=Q[0],V(k,L([0,1],Q)));for(var ee=1,ce=!0;ee=k.length){var Te=x(a,ue);a=(ce=!!Te)&&"get"in Te&&!("originalValue"in Te.get)?Te.get:a[ue]}else ce=P(a,ue),a=a[ue];ce&&!B&&(m[C]=a)}}return a}},72353:function(bt,be,Y){"use strict";var ie=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(be,"__esModule",{value:!0});var z=Y(58673),O=ie(Y(27012)),E=Y(30212),d=function(f){return z.isExtractableFile(f)||null!==f&&"object"==typeof f&&"function"==typeof f.pipe};be.default=function(f,T,g,b){void 0===b&&(b=E.defaultJsonSerializer);var l=z.extractFiles({query:f,variables:T,operationName:g},"",d),h=l.clone,u=l.files;if(0===u.size){if(!Array.isArray(f))return b.stringify(h);if(void 0!==T&&!Array.isArray(T))throw new Error("Cannot create request body with given variable type, array expected");var m=f.reduce(function(P,L,V){return P.push({query:L,variables:T?T[V]:void 0}),P},[]);return b.stringify(m)}var w=new("undefined"==typeof FormData?O.default:FormData);w.append("operations",b.stringify(h));var S={},I=0;return u.forEach(function(P){S[++I]=P}),w.append("map",b.stringify(S)),I=0,u.forEach(function(P,L){w.append(""+ ++I,L)}),w}},30212:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.defaultJsonSerializer=void 0,be.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify}},24145:function(bt,be,Y){"use strict";var ie=this&&this.__assign||function(){return ie=Object.assign||function(W){for(var G,H=1,j=arguments.length;H0&&R[R.length-1])&&(6===v[0]||2===v[0])){H=0;continue}if(3===v[0]&&(!R||v[1]>R[0]&&v[1]0&&ee[ee.length-1])&&(6===ae[0]||2===ae[0])){a=0;continue}if(3===ae[0]&&(!ee||ae[1]>ee[0]&&ae[1]{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.parseBatchRequestsExtendedArgs=be.parseRawRequestExtendedArgs=be.parseRequestExtendedArgs=be.parseBatchRequestArgs=be.parseRawRequestArgs=be.parseRequestArgs=void 0,be.parseRequestArgs=function(x,f,T){return x.document?x:{document:x,variables:f,requestHeaders:T,signal:void 0}},be.parseRawRequestArgs=function(x,f,T){return x.query?x:{query:x,variables:f,requestHeaders:T,signal:void 0}},be.parseBatchRequestArgs=function(x,f){return x.documents?x:{documents:x,requestHeaders:f,signal:void 0}},be.parseRequestExtendedArgs=function(x,f,T,g){return x.document?x:{url:x,document:f,variables:T,requestHeaders:g,signal:void 0}},be.parseRawRequestExtendedArgs=function(x,f,T,g){return x.query?x:{url:x,query:f,variables:T,requestHeaders:g,signal:void 0}},be.parseBatchRequestsExtendedArgs=function(x,f,T){return x.documents?x:{url:x,documents:f,requestHeaders:T,signal:void 0}}},37439:function(bt,be){"use strict";var z,Y=this&&this.__extends||(z=function(O,E){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,x){d.__proto__=x}||function(d,x){for(var f in x)Object.prototype.hasOwnProperty.call(x,f)&&(d[f]=x[f])})(O,E)},function(O,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function d(){this.constructor=O}z(O,E),O.prototype=null===E?Object.create(E):(d.prototype=E.prototype,new d)});Object.defineProperty(be,"__esModule",{value:!0}),be.ClientError=void 0;var ie=function(z){function O(E,d){var x=this,f=O.extractMessage(E)+": "+JSON.stringify({response:E,request:d});return x=z.call(this,f)||this,Object.setPrototypeOf(x,O.prototype),x.response=E,x.request=d,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(x,O),x}return Y(O,z),O.extractMessage=function(E){try{return E.errors[0].message}catch{return"GraphQL Error (Code: "+E.status+")"}},O}(Error);be.ClientError=ie},41606:bt=>{"use strict";var be={foo:{}},Y=Object;bt.exports=function(){return{__proto__:be}.foo===be.foo&&!({__proto__:null}instanceof Y)}},59326:(bt,be,Y)=>{"use strict";var ie="undefined"!=typeof Symbol&&Symbol,z=Y(79045);bt.exports=function(){return"function"==typeof ie&&"function"==typeof Symbol&&"symbol"==typeof ie("foo")&&"symbol"==typeof Symbol("bar")&&z()}},79045:bt=>{"use strict";bt.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var Y={},ie=Symbol("test"),z=Object(ie);if("string"==typeof ie||"[object Symbol]"!==Object.prototype.toString.call(ie)||"[object Symbol]"!==Object.prototype.toString.call(z))return!1;for(ie in Y[ie]=42,Y)return!1;if("function"==typeof Object.keys&&0!==Object.keys(Y).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(Y).length)return!1;var E=Object.getOwnPropertySymbols(Y);if(1!==E.length||E[0]!==ie||!Object.prototype.propertyIsEnumerable.call(Y,ie))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var d=Object.getOwnPropertyDescriptor(Y,ie);if(42!==d.value||!0!==d.enumerable)return!1}return!0}},57709:(bt,be,Y)=>{"use strict";var ie=Y(75396);bt.exports=ie.call(Function.call,Object.prototype.hasOwnProperty)},5414:(bt,be,Y)=>{"use strict";var ie=Y(55859).Buffer,z=Y(18300).Transform;function d(x){z.call(this),this._block=ie.allocUnsafe(x),this._blockSize=x,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Y(59879)(d,z),d.prototype._transform=function(x,f,T){var g=null;try{this.update(x,f)}catch(b){g=b}T(g)},d.prototype._flush=function(x){var f=null;try{this.push(this.digest())}catch(T){f=T}x(f)},d.prototype.update=function(x,f){if(function(x,f){if(!ie.isBuffer(x)&&"string"!=typeof x)throw new TypeError("Data must be a string or a buffer")}(x),this._finalized)throw new Error("Digest already called");ie.isBuffer(x)||(x=ie.from(x,f));for(var T=this._block,g=0;this._blockOffset+x.length-g>=this._blockSize;){for(var b=this._blockOffset;b0;++l)this._length[l]+=h,(h=this._length[l]/4294967296|0)>0&&(this._length[l]-=4294967296*h);return this},d.prototype._update=function(){throw new Error("_update is not implemented")},d.prototype.digest=function(x){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var f=this._digest();void 0!==x&&(f=f.toString(x)),this._block.fill(0),this._blockOffset=0;for(var T=0;T<4;++T)this._length[T]=0;return f},d.prototype._digest=function(){throw new Error("_digest is not implemented")},bt.exports=d},37909:(bt,be,Y)=>{var ie=be;ie.utils=Y(8291),ie.common=Y(21393),ie.sha=Y(72221),ie.ripemd=Y(41960),ie.hmac=Y(51905),ie.sha1=ie.sha.sha1,ie.sha256=ie.sha.sha256,ie.sha224=ie.sha.sha224,ie.sha384=ie.sha.sha384,ie.sha512=ie.sha.sha512,ie.ripemd160=ie.ripemd.ripemd160},21393:(bt,be,Y)=>{"use strict";var ie=Y(8291),z=Y(86055);function O(){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}be.BlockHash=O,O.prototype.update=function(d,x){if(d=ie.toArray(d,x),this.pending=this.pending?this.pending.concat(d):d,this.pendingTotal+=d.length,this.pending.length>=this._delta8){var f=(d=this.pending).length%this._delta8;this.pending=d.slice(d.length-f,d.length),0===this.pending.length&&(this.pending=null),d=ie.join32(d,0,d.length-f,this.endian);for(var T=0;T>>24&255,T[g++]=d>>>16&255,T[g++]=d>>>8&255,T[g++]=255&d}else for(T[g++]=255&d,T[g++]=d>>>8&255,T[g++]=d>>>16&255,T[g++]=d>>>24&255,T[g++]=0,T[g++]=0,T[g++]=0,T[g++]=0,b=8;b{"use strict";var ie=Y(8291),z=Y(86055);function O(E,d,x){if(!(this instanceof O))return new O(E,d,x);this.Hash=E,this.blockSize=E.blockSize/8,this.outSize=E.outSize/8,this.inner=null,this.outer=null,this._init(ie.toArray(d,x))}bt.exports=O,O.prototype._init=function(d){d.length>this.blockSize&&(d=(new this.Hash).update(d).digest()),z(d.length<=this.blockSize);for(var x=d.length;x{"use strict";var ie=Y(8291),z=Y(21393),O=ie.rotl32,E=ie.sum32,d=ie.sum32_3,x=ie.sum32_4,f=z.BlockHash;function T(){if(!(this instanceof T))return new T;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function g(w,S,I,P){return w<=15?S^I^P:w<=31?S&I|~S&P:w<=47?(S|~I)^P:w<=63?S&P|I&~P:S^(I|~P)}function l(w){return w<=15?1352829926:w<=31?1548603684:w<=47?1836072691:w<=63?2053994217:0}ie.inherits(T,f),be.ripemd160=T,T.blockSize=512,T.outSize=160,T.hmacStrength=192,T.padLength=64,T.prototype._update=function(S,I){for(var P=this.h[0],L=this.h[1],V=this.h[2],W=this.h[3],G=this.h[4],H=P,j=L,K=V,R=W,o=G,y=0;y<80;y++){var M=E(O(x(P,g(y,L,V,W),S[h[y]+I],(w=y)<=15?0:w<=31?1518500249:w<=47?1859775393:w<=63?2400959708:2840853838),m[y]),G);P=G,G=W,W=O(V,10),V=L,L=M,M=E(O(x(H,g(79-y,j,K,R),S[u[y]+I],l(y)),_[y]),o),H=o,o=R,R=O(K,10),K=j,j=M}var w;M=d(this.h[1],V,R),this.h[1]=d(this.h[2],W,o),this.h[2]=d(this.h[3],G,H),this.h[3]=d(this.h[4],P,j),this.h[4]=d(this.h[0],L,K),this.h[0]=M},T.prototype._digest=function(S){return"hex"===S?ie.toHex32(this.h,"little"):ie.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],u=[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],m=[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],_=[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]},72221:(bt,be,Y)=>{"use strict";be.sha1=Y(63605),be.sha224=Y(29643),be.sha256=Y(66021),be.sha384=Y(3513),be.sha512=Y(54958)},63605:(bt,be,Y)=>{"use strict";var ie=Y(8291),z=Y(21393),O=Y(48491),E=ie.rotl32,d=ie.sum32,x=ie.sum32_5,f=O.ft_1,T=z.BlockHash,g=[1518500249,1859775393,2400959708,3395469782];function b(){if(!(this instanceof b))return new b;T.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ie.inherits(b,T),bt.exports=b,b.blockSize=512,b.outSize=160,b.hmacStrength=80,b.padLength=64,b.prototype._update=function(h,u){for(var m=this.W,_=0;_<16;_++)m[_]=h[u+_];for(;_{"use strict";var ie=Y(8291),z=Y(66021);function O(){if(!(this instanceof O))return new O;z.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ie.inherits(O,z),bt.exports=O,O.blockSize=512,O.outSize=224,O.hmacStrength=192,O.padLength=64,O.prototype._digest=function(d){return"hex"===d?ie.toHex32(this.h.slice(0,7),"big"):ie.split32(this.h.slice(0,7),"big")}},66021:(bt,be,Y)=>{"use strict";var ie=Y(8291),z=Y(21393),O=Y(48491),E=Y(86055),d=ie.sum32,x=ie.sum32_4,f=ie.sum32_5,T=O.ch32,g=O.maj32,b=O.s0_256,l=O.s1_256,h=O.g0_256,u=O.g1_256,m=z.BlockHash,_=[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 w(){if(!(this instanceof w))return new w;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=_,this.W=new Array(64)}ie.inherits(w,m),bt.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(I,P){for(var L=this.W,V=0;V<16;V++)L[V]=I[P+V];for(;V{"use strict";var ie=Y(8291),z=Y(54958);function O(){if(!(this instanceof O))return new O;z.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}ie.inherits(O,z),bt.exports=O,O.blockSize=1024,O.outSize=384,O.hmacStrength=192,O.padLength=128,O.prototype._digest=function(d){return"hex"===d?ie.toHex32(this.h.slice(0,12),"big"):ie.split32(this.h.slice(0,12),"big")}},54958:(bt,be,Y)=>{"use strict";var ie=Y(8291),z=Y(21393),O=Y(86055),E=ie.rotr64_hi,d=ie.rotr64_lo,x=ie.shr64_hi,f=ie.shr64_lo,T=ie.sum64,g=ie.sum64_hi,b=ie.sum64_lo,l=ie.sum64_4_hi,h=ie.sum64_4_lo,u=ie.sum64_5_hi,m=ie.sum64_5_lo,_=z.BlockHash,w=[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 S(){if(!(this instanceof S))return new S;_.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}function I(M,v,k,D,N){var C=M&k^~M&N;return C<0&&(C+=4294967296),C}function P(M,v,k,D,N,C){var a=v&D^~v&C;return a<0&&(a+=4294967296),a}function L(M,v,k,D,N){var C=M&k^M&N^k&N;return C<0&&(C+=4294967296),C}function V(M,v,k,D,N,C){var a=v&D^v&C^D&C;return a<0&&(a+=4294967296),a}function W(M,v){var C=E(M,v,28)^E(v,M,2)^E(v,M,7);return C<0&&(C+=4294967296),C}function G(M,v){var C=d(M,v,28)^d(v,M,2)^d(v,M,7);return C<0&&(C+=4294967296),C}function H(M,v){var C=E(M,v,14)^E(M,v,18)^E(v,M,9);return C<0&&(C+=4294967296),C}function j(M,v){var C=d(M,v,14)^d(M,v,18)^d(v,M,9);return C<0&&(C+=4294967296),C}function K(M,v){var C=E(M,v,1)^E(M,v,8)^x(M,v,7);return C<0&&(C+=4294967296),C}function R(M,v){var C=d(M,v,1)^d(M,v,8)^f(M,v,7);return C<0&&(C+=4294967296),C}function o(M,v){var C=E(M,v,19)^E(v,M,29)^x(M,v,6);return C<0&&(C+=4294967296),C}function y(M,v){var C=d(M,v,19)^d(v,M,29)^f(M,v,6);return C<0&&(C+=4294967296),C}ie.inherits(S,_),bt.exports=S,S.blockSize=1024,S.outSize=512,S.hmacStrength=192,S.padLength=128,S.prototype._prepareBlock=function(v,k){for(var D=this.W,N=0;N<32;N++)D[N]=v[k+N];for(;N{"use strict";var z=Y(8291).rotr32;function E(l,h,u){return l&h^~l&u}function d(l,h,u){return l&h^l&u^h&u}function x(l,h,u){return l^h^u}be.ft_1=function(l,h,u,m){return 0===l?E(h,u,m):1===l||3===l?x(h,u,m):2===l?d(h,u,m):void 0},be.ch32=E,be.maj32=d,be.p32=x,be.s0_256=function(l){return z(l,2)^z(l,13)^z(l,22)},be.s1_256=function(l){return z(l,6)^z(l,11)^z(l,25)},be.g0_256=function(l){return z(l,7)^z(l,18)^l>>>3},be.g1_256=function(l){return z(l,17)^z(l,19)^l>>>10}},8291:(bt,be,Y)=>{"use strict";var ie=Y(86055),z=Y(59879);function O(y,M){return!(55296!=(64512&y.charCodeAt(M))||M<0||M+1>=y.length)&&56320==(64512&y.charCodeAt(M+1))}function x(y){return(y>>>24|y>>>8&65280|y<<8&16711680|(255&y)<<24)>>>0}function T(y){return 1===y.length?"0"+y:y}function g(y){return 7===y.length?"0"+y:6===y.length?"00"+y:5===y.length?"000"+y:4===y.length?"0000"+y:3===y.length?"00000"+y:2===y.length?"000000"+y:1===y.length?"0000000"+y:y}be.inherits=z,be.toArray=function(y,M){if(Array.isArray(y))return y.slice();if(!y)return[];var v=[];if("string"==typeof y)if(M){if("hex"===M)for((y=y.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(y="0"+y),D=0;D>6|192,v[k++]=63&N|128):O(y,D)?(N=65536+((1023&N)<<10)+(1023&y.charCodeAt(++D)),v[k++]=N>>18|240,v[k++]=N>>12&63|128,v[k++]=N>>6&63|128,v[k++]=63&N|128):(v[k++]=N>>12|224,v[k++]=N>>6&63|128,v[k++]=63&N|128)}else for(D=0;D>>0;return N},be.split32=function(y,M){for(var v=new Array(4*y.length),k=0,D=0;k>>24,v[D+1]=N>>>16&255,v[D+2]=N>>>8&255,v[D+3]=255&N):(v[D+3]=N>>>24,v[D+2]=N>>>16&255,v[D+1]=N>>>8&255,v[D]=255&N)}return v},be.rotr32=function(y,M){return y>>>M|y<<32-M},be.rotl32=function(y,M){return y<>>32-M},be.sum32=function(y,M){return y+M>>>0},be.sum32_3=function(y,M,v){return y+M+v>>>0},be.sum32_4=function(y,M,v,k){return y+M+v+k>>>0},be.sum32_5=function(y,M,v,k,D){return y+M+v+k+D>>>0},be.sum64=function(y,M,v,k){var C=k+y[M+1]>>>0;y[M]=(C>>0,y[M+1]=C},be.sum64_hi=function(y,M,v,k){return(M+k>>>0>>0},be.sum64_lo=function(y,M,v,k){return M+k>>>0},be.sum64_4_hi=function(y,M,v,k,D,N,C,a){var B=0,Q=M;return B+=(Q=Q+k>>>0)>>0)>>0)>>0},be.sum64_4_lo=function(y,M,v,k,D,N,C,a){return M+k+N+a>>>0},be.sum64_5_hi=function(y,M,v,k,D,N,C,a,B,Q){var ee=0,ce=M;return ee+=(ce=ce+k>>>0)>>0)>>0)>>0)>>0},be.sum64_5_lo=function(y,M,v,k,D,N,C,a,B,Q){return M+k+N+a+Q>>>0},be.rotr64_hi=function(y,M,v){return(M<<32-v|y>>>v)>>>0},be.rotr64_lo=function(y,M,v){return(y<<32-v|M>>>v)>>>0},be.shr64_hi=function(y,M,v){return y>>>v},be.shr64_lo=function(y,M,v){return(y<<32-v|M>>>v)>>>0}},72730:(bt,be,Y)=>{"use strict";var ie=Y(37909),z=Y(14869),O=Y(86055);function E(d){if(!(this instanceof E))return new E(d);this.hash=d.hash,this.predResist=!!d.predResist,this.outLen=this.hash.outSize,this.minEntropy=d.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var x=z.toArray(d.entropy,d.entropyEnc||"hex"),f=z.toArray(d.nonce,d.nonceEnc||"hex"),T=z.toArray(d.pers,d.persEnc||"hex");O(x.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(x,f,T)}bt.exports=E,E.prototype._init=function(x,f,T){var g=x.concat(f).concat(T);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var b=0;b=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(x.concat(T||[])),this._reseed=1},E.prototype.generate=function(x,f,T,g){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof f&&(g=T,T=f,f=null),T&&(T=z.toArray(T,g||"hex"),this._update(T));for(var b=[];b.length{be.read=function(Y,ie,z,O,E){var d,x,f=8*E-O-1,T=(1<>1,b=-7,l=z?E-1:0,h=z?-1:1,u=Y[ie+l];for(l+=h,d=u&(1<<-b)-1,u>>=-b,b+=f;b>0;d=256*d+Y[ie+l],l+=h,b-=8);for(x=d&(1<<-b)-1,d>>=-b,b+=O;b>0;x=256*x+Y[ie+l],l+=h,b-=8);if(0===d)d=1-g;else{if(d===T)return x?NaN:1/0*(u?-1:1);x+=Math.pow(2,O),d-=g}return(u?-1:1)*x*Math.pow(2,d-O)},be.write=function(Y,ie,z,O,E,d){var x,f,T,g=8*d-E-1,b=(1<>1,h=23===E?Math.pow(2,-24)-Math.pow(2,-77):0,u=O?0:d-1,m=O?1:-1,_=ie<0||0===ie&&1/ie<0?1:0;for(ie=Math.abs(ie),isNaN(ie)||ie===1/0?(f=isNaN(ie)?1:0,x=b):(x=Math.floor(Math.log(ie)/Math.LN2),ie*(T=Math.pow(2,-x))<1&&(x--,T*=2),(ie+=x+l>=1?h/T:h*Math.pow(2,1-l))*T>=2&&(x++,T/=2),x+l>=b?(f=0,x=b):x+l>=1?(f=(ie*T-1)*Math.pow(2,E),x+=l):(f=ie*Math.pow(2,l-1)*Math.pow(2,E),x=0));E>=8;Y[z+u]=255&f,u+=m,f/=256,E-=8);for(x=x<0;Y[z+u]=255&x,u+=m,x/=256,g-=8);Y[z+u-m]|=128*_}},59879:bt=>{bt.exports="function"==typeof Object.create?function(Y,ie){ie&&(Y.super_=ie,Y.prototype=Object.create(ie.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}))}:function(Y,ie){if(ie){Y.super_=ie;var z=function(){};z.prototype=ie.prototype,Y.prototype=new z,Y.prototype.constructor=Y}}},18560:(bt,be,Y)=>{var ie=Y(31325).default;self,bt.exports=(()=>{return z={7629:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(9474),b=x(1687),l=x(8652),h=x(8160),u=x(3292),m=x(6354),_=x(8901),w=x(9708),S=x(6914),I=x(2294),P=x(6133),L=x(1152),V=x(8863),W=x(2036),G={Base:class{constructor(H){this.type=H,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new I.Ids,this._preferences=null,this._refs=new P.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return f("function"==typeof w.describe,"Manifest functionality disabled"),w.describe(this)}allow(){for(var H=arguments.length,j=new Array(H),K=0;K1&&void 0!==arguments[1]?arguments[1]:{};return f(void 0!==H,"Missing example"),h.assertOptions(j,["override"]),this._inner("examples",H,{single:!0,override:j.override})}external(H,j){return"object"==typeof H&&(f(!j,"Cannot combine options with description"),j=H.description,H=H.method),f("function"==typeof H,"Method must be a function"),f(void 0===j||j&&"string"==typeof j,"Description must be a non-empty string"),this._inner("externals",{method:H,description:j},{single:!0})}failover(H,j){return this._default("failover",H,j)}forbidden(){return this.presence("forbidden")}id(H){return H?(f("string"==typeof H,"id must be a non-empty string"),f(/^[^\.]+$/.test(H),"id cannot contain period character"),this.$_setFlag("id",H)):this.$_setFlag("id",void 0)}invalid(){for(var H=arguments.length,j=new Array(H),K=0;K0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof H,"Invalid mode:",H),this.$_setFlag("only",H)}optional(){return this.presence("optional")}prefs(H){f(H,"Missing preferences"),f(void 0===H.context,"Cannot override context"),f(void 0===H.externals,"Cannot override externals"),f(void 0===H.warnings,"Cannot override warnings"),f(void 0===H.debug,"Cannot override debug"),h.checkPreferences(H);const j=this.clone();return j._preferences=h.preferences(j._preferences,H),j}presence(H){return f(["optional","required","forbidden"].includes(H),"Unknown presence mode",H),this.$_setFlag("presence",H)}raw(){return this.$_setFlag("result",arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?void 0:"raw")}result(H){return f(["raw","strip"].includes(H),"Unknown result mode",H),this.$_setFlag("result",H)}required(){return this.presence("required")}strict(H){const j=this.clone();return j._preferences=h.preferences(j._preferences,{convert:void 0!==H&&!H}),j}strip(){return this.$_setFlag("result",arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?void 0:"strip")}tag(){for(var H=arguments.length,j=new Array(H),K=0;KR.keep||R.name!==K),j._singleRules.delete(K));for(const K of H._rules)H._definition.rules[K.method].multi||j._singleRules.set(K.name,K),j._rules.push(K);if(j._flags.empty&&H._flags.empty){j._flags.empty=j._flags.empty.concat(H._flags.empty);const K=Object.assign({},H._flags);delete K.empty,b(j._flags,K)}else if(H._flags.empty){j._flags.empty=H._flags.empty;const K=Object.assign({},H._flags);delete K.empty,b(j._flags,K)}else b(j._flags,H._flags);for(const K in H.$_terms){const R=H.$_terms[K];R?j.$_terms[K]=j.$_terms[K]?j.$_terms[K].concat(R):R.slice():j.$_terms[K]||(j.$_terms[K]=R)}return this.$_root._tracer&&this.$_root._tracer._combine(j,[this,H]),j.$_mutateRebuild()}extend(H){return f(!H.base,"Cannot extend type with another base"),_.type(this,H)}extract(H){return H=Array.isArray(H)?H:H.split("."),this._ids.reach(H)}fork(H,j){f(!this._inRuleset(),"Cannot fork inside a ruleset");let K=this;for(let R of[].concat(H))R=Array.isArray(R)?R:R.split("."),K=K._ids.fork(R,j,K);return K.$_temp.ruleset=!1,K}rule(H){const j=this._definition;h.assertOptions(H,Object.keys(j.modifiers)),f(!1!==this.$_temp.ruleset,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const K=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;f(K>=0&&KK.tailor(H),ref:!1}),j.$_temp.ruleset=!1,j.$_mutateRebuild()}tracer(){return L.location?L.location(this):this}validate(H,j){return V.entry(H,this,j)}validateAsync(H,j){return V.entryAsync(H,this,j)}$_addRule(H){"string"==typeof H&&(H={name:H}),f(H&&"object"==typeof H,"Invalid options"),f(H.name&&"string"==typeof H.name,"Invalid rule name");for(const y in H)f("_"!==y[0],"Cannot set private rule properties");const j=Object.assign({},H);j._resolve=[],j.method=j.method||j.name;const K=this._definition.rules[j.method],R=j.args;f(K,"Unknown rule",j.method);const o=this.clone();if(R){f(1===Object.keys(R).length||Object.keys(R).length===this._definition.rules[j.name].args.length,"Invalid rule definition for",this.type,j.name);for(const y in R){let M=R[y];if(K.argsByName){const v=K.argsByName.get(y);if(v.ref&&h.isResolvable(M))j._resolve.push(y),o.$_mutateRegister(M);else if(v.normalize&&(M=v.normalize(M),R[y]=M),v.assert){const k=h.validateArg(M,y,v);f(!k,k,"or reference")}}void 0!==M?R[y]=M:delete R[y]}}return K.multi||(o._ruleRemove(j.name,{clone:!1}),o._singleRules.set(j.name,j)),!1===o.$_temp.ruleset&&(o.$_temp.ruleset=null),K.priority?o._rules.unshift(j):o._rules.push(j),o}$_compile(H,j){return u.schema(this.$_root,H,j)}$_createError(H,j,K,R,o){let y=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const M=!1!==y.flags?this._flags:{},v=y.messages?S.merge(this._definition.messages,y.messages):this._definition.messages;return new m.Report(H,j,K,M,v,R,o)}$_getFlag(H){return this._flags[H]}$_getRule(H){return this._singleRules.get(H)}$_mapLabels(H){return H=Array.isArray(H)?H:H.split("."),this._ids.labels(H)}$_match(H,j,K,R){(K=Object.assign({},K)).abortEarly=!0,K._externals=!1,j.snapshot();const o=!V.validate(H,this,j,K,R).errors;return j.restore(),o}$_modify(H){return h.assertOptions(H,["each","once","ref","schema"]),I.schema(this,H)||this}$_mutateRebuild(){return f(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(H,j)=>{let{source:K,name:R,key:y}=j;const M=this._definition[K][R]&&this._definition[K][R].register;!1!==M&&this.$_mutateRegister(H,{family:M,key:y})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(H){let{family:j,key:K}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._refs.register(H,j),this._ids.register(H,{key:K})}$_property(H){return this._definition.properties[H]}$_reach(H){return this._ids.reach(H)}$_rootReferences(){return this._refs.roots()}$_setFlag(H,j){let K=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(f("_"===H[0]||!this._inRuleset(),"Cannot set flag inside a ruleset"),g(j,(this._definition.flags[H]||{}).default)&&(j=void 0),g(j,this._flags[H]))return this;const o=!1!==K.clone?this.clone():this;return void 0!==j?(o._flags[H]=j,o.$_mutateRegister(j)):delete o._flags[H],"_"!==H[0]&&(o.$_temp.ruleset=!1),o}$_parent(H){for(var j=arguments.length,K=new Array(j>1?j-1:0),R=1;R2&&void 0!==arguments[2]?arguments[2]:{};return h.assertOptions(K,"literal"),f(void 0!==j,"Missing",H,"value"),f("function"==typeof j||!K.literal,"Only function value supports literal option"),"function"==typeof j&&K.literal&&(j={[h.symbols.literal]:!0,literal:j}),this.$_setFlag(H,j)}_generate(H,j,K){if(!this.$_terms.whens)return{schema:this};const R=[],o=[];for(let v=0;vC)break}const y=o.join(", ");if(j.mainstay.tracer.debug(j,"rule","when",y),!y)return{schema:this};if(!j.mainstay.tracer.active&&this.$_temp.whens[y])return{schema:this.$_temp.whens[y],id:y};let M=this;this._definition.generate&&(M=this._definition.generate(this,H,j,K));for(const v of R)M=M.concat(v);return this.$_root._tracer&&this.$_root._tracer._combine(M,[this,...R]),this.$_temp.whens[y]=M,{schema:M,id:y}}_inner(H,j){let K=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(!this._inRuleset(),`Cannot set ${H} inside a ruleset`);const R=this.clone();return R.$_terms[H]&&!K.override||(R.$_terms[H]=[]),K.single?R.$_terms[H].push(j):R.$_terms[H].push(...j),R.$_temp.ruleset=!1,R}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(H){let j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._singleRules.has(H))return this;const K=!1!==j.clone?this.clone():this;K._singleRules.delete(H);const R=[];for(let o=0;o{"use strict";const f=x(375),T=x(8571),g=x(8160),b={max:1e3,supported:new Set(["undefined","boolean","number","string"])};d.provider={provision:l=>new b.Cache(l)},b.Cache=class{constructor(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};g.assertOptions(l,["max"]),f(void 0===l.max||l.max&&l.max>0&&isFinite(l.max),"Invalid max cache size"),this._max=l.max||b.max,this._map=new Map,this._list=new b.List}get length(){return this._map.size}set(l,h){if(null!==l&&!b.supported.has(typeof l))return;let u=this._map.get(l);if(u)return u.value=h,void this._list.first(u);u=this._list.unshift({key:l,value:h}),this._map.set(l,u),this._compact()}get(l){const h=this._map.get(l);if(h)return this._list.first(h),T(h.value)}_compact(){if(this._map.size>this._max){const l=this._list.pop();this._map.delete(l.key)}}},b.List=class{constructor(){this.tail=null,this.head=null}unshift(l){return l.next=null,l.prev=this.head,this.head&&(this.head.next=l),this.head=l,this.tail||(this.tail=l),l}first(l){l!==this.head&&(this._remove(l),this.unshift(l))}pop(){return this._remove(this.tail)}_remove(l){const{next:h,prev:u}=l;return h.prev=u,u&&(u.next=h),l===this.tail&&(this.tail=h),l.prev=null,l.next=null,l}}},8160:(E,d,x)=>{"use strict";const f=x(375),T=x(7916),g=x(5934);let b,l;const h={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};d.version=g.version,d.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},d.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},d.assertOptions=function(u,m){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Options";f(u&&"object"==typeof u&&!Array.isArray(u),"Options must be of type object");const w=Object.keys(u).filter(S=>!m.includes(S));f(0===w.length,`${_} contain unknown keys: ${w}`)},d.checkPreferences=function(u){l=l||x(3378);const m=l.preferences.validate(u);if(m.error)throw new T([m.error.details[0].message])},d.compare=function(u,m,_){switch(_){case"=":return u===m;case">":return u>m;case"<":return u=":return u>=m;case"<=":return u<=m}},d.default=function(u,m){return void 0===u?m:u},d.isIsoDate=function(u){return h.isoDate.test(u)},d.isNumber=function(u){return"number"==typeof u&&!isNaN(u)},d.isResolvable=function(u){return!!u&&(u[d.symbols.ref]||u[d.symbols.template])},d.isSchema=function(u){let m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const _=u&&u[d.symbols.any];return!!_&&(f(m.legacy||_.version===d.version,"Cannot mix different versions of joi schemas"),!0)},d.isValues=function(u){return u[d.symbols.values]},d.limit=function(u){return Number.isSafeInteger(u)&&u>=0},d.preferences=function(u,m){b=b||x(6914),u=u||{},m=m||{};const _=Object.assign({},u,m);return m.errors&&u.errors&&(_.errors=Object.assign({},u.errors,m.errors),_.errors.wrap=Object.assign({},u.errors.wrap,m.errors.wrap)),m.messages&&(_.messages=b.compile(m.messages,u.messages)),delete _[d.symbols.prefs],_},d.tryWithPath=function(u,m){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return u()}catch(w){throw w.path=void 0!==w.path?m+"."+w.path:m,_.append&&(w.message=`${w.message} (${w.path})`),w}},d.validateArg=function(u,m,_){let{assert:w,message:S}=_;if(d.isSchema(w)){const I=w.validate(u);return I.error?I.error.message:void 0}if(!w(u))return m?`${m} ${S}`:S},d.verifyFlat=function(u,m){for(const _ of u)f(!Array.isArray(_),"Method no longer accepts array arguments:",m)}},3292:(E,d,x)=>{"use strict";const f=x(375),T=x(8160),g=x(6133),b={};d.schema=function(l,h){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};T.assertOptions(u,["appendPath","override"]);try{return b.schema(l,h,u)}catch(m){throw u.appendPath&&void 0!==m.path&&(m.message=`${m.message} (${m.path})`),m}},b.schema=function(l,h,u){f(void 0!==h,"Invalid undefined schema"),Array.isArray(h)&&(f(h.length,"Invalid empty array schema"),1===h.length&&(h=h[0]));const m=function(_){for(var w=arguments.length,S=new Array(w>1?w-1:0),I=1;I2&&void 0!==arguments[2]?arguments[2]:{};T.assertOptions(u,["legacy"]);const m=h&&h[T.symbols.any];if(m)return f(u.legacy||m.version===T.version,"Cannot mix different versions of joi schemas:",m.version,T.version),h;if("object"!=typeof h||!u.legacy)return d.schema(l,h,{appendPath:!0});const _=b.walk(h);return _?_.compile(_.root,h):d.schema(l,h,{appendPath:!0})},b.walk=function(l){if("object"!=typeof l)return null;if(Array.isArray(l)){for(const u of l){const m=b.walk(u);if(m)return m}return null}const h=l[T.symbols.any];if(h)return{root:l[h.root],compile:h.compile};f(Object.getPrototypeOf(l)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const u in l){const m=b.walk(l[u]);if(m)return m}return null},b.simple=function(l){return null===l||["boolean","string","number"].includes(typeof l)},d.when=function(l,h,u){if(void 0===u&&(f(h&&"object"==typeof h,"Missing options"),u=h,h=g.create(".")),Array.isArray(u)&&(u={switch:u}),T.assertOptions(u,["is","not","then","otherwise","switch","break"]),T.isSchema(h))return f(void 0===u.is,'"is" can not be used with a schema condition'),f(void 0===u.not,'"not" can not be used with a schema condition'),f(void 0===u.switch,'"switch" can not be used with a schema condition'),b.condition(l,{is:h,then:u.then,otherwise:u.otherwise,break:u.break});if(f(g.isRef(h)||"string"==typeof h,"Invalid condition:",h),f(void 0===u.not||void 0===u.is,'Cannot combine "is" with "not"'),void 0===u.switch){let _=u;void 0!==u.not&&(_={is:u.not,then:u.otherwise,otherwise:u.then,break:u.break});let w=void 0!==_.is?l.$_compile(_.is):l.$_root.invalid(null,!1,0,"").required();return f(void 0!==_.then||void 0!==_.otherwise,'options must have at least one of "then", "otherwise", or "switch"'),f(void 0===_.break||void 0===_.then||void 0===_.otherwise,"Cannot specify then, otherwise, and break all together"),void 0===u.is||g.isRef(u.is)||T.isSchema(u.is)||(w=w.required()),b.condition(l,{ref:d.ref(h),is:w,then:_.then,otherwise:_.otherwise,break:_.break})}f(Array.isArray(u.switch),'"switch" must be an array'),f(void 0===u.is,'Cannot combine "switch" with "is"'),f(void 0===u.not,'Cannot combine "switch" with "not"'),f(void 0===u.then,'Cannot combine "switch" with "then"');const m={ref:d.ref(h),switch:[],break:u.break};for(let _=0;_{"use strict";const f=x(5688),T=x(8160),g=x(3328);d.Report=class{constructor(b,l,h,u,m,_,w){if(this.code=b,this.flags=u,this.messages=m,this.path=_.path,this.prefs=w,this.state=_,this.value=l,this.message=null,this.template=null,this.local=h||{},this.local.label=d.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const S=this.path[this.path.length-1];"object"!=typeof S&&(this.local.key=S)}}_setTemplate(b){if(this.template=b,!this.flags.label&&0===this.path.length){const l=this._template(this.template,"root");l&&(this.local.label=l)}}toString(){if(this.message)return this.message;const b=this.code;if(!this.prefs.errors.render)return this.code;const l=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===l?`Error code "${b}" is not defined, your custom type is missing the correct messages definition`:(this.message=l.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(b,l){return d.template(this.value,b,l||this.code,this.state,this.prefs)}},d.path=function(b){let l="";for(const h of b)"object"!=typeof h&&("string"==typeof h?(l&&(l+="."),l+=h):l+=`[${h}]`);return l},d.template=function(b,l,h,u,m){if(!l)return;if(g.isTemplate(l))return"root"!==h?l:null;let _=m.errors.language;if(T.isResolvable(_)&&(_=_.resolve(b,u,m)),_&&l[_]){if(void 0!==l[_][h])return l[_][h];if(void 0!==l[_]["*"])return l[_]["*"]}return l[h]?l[h]:l["*"]},d.label=function(b,l,h,u){if(b.label)return b.label;if(!h.errors.label)return"";let m=l.path;return"key"===h.errors.label&&l.path.length>1&&(m=l.path.slice(-1)),d.path(m)||d.template(null,h.messages,"root",l,h)||u&&d.template(null,u,"root",l,h)||"value"},d.process=function(b,l,h){if(!b)return null;const{override:u,message:m,details:_}=d.details(b);if(u)return u;if(h.errors.stack)return new d.ValidationError(m,_,l);const w=Error.stackTraceLimit;Error.stackTraceLimit=0;const S=new d.ValidationError(m,_,l);return Error.stackTraceLimit=w,S},d.details=function(b){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=[];const u=[];for(const m of b){if(m instanceof Error){if(!1!==l.override)return{override:m};const w=m.toString();h.push(w),u.push({message:w,type:"override",context:{error:m}});continue}const _=m.toString();h.push(_),u.push({message:_,path:m.path.filter(w=>"object"!=typeof w),type:m.code,context:m.local})}return h.length>1&&(h=[...new Set(h)]),{message:h.join(". "),details:u}},d.ValidationError=class extends Error{constructor(b,l,h){super(b),this._original=h,this.details=l}static isError(b){return b instanceof d.ValidationError}},d.ValidationError.prototype.isJoi=!0,d.ValidationError.prototype.name="ValidationError",d.ValidationError.prototype.annotate=f.error},8901:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(8160),b=x(6914),l={};d.type=function(h,u){const m=Object.getPrototypeOf(h),_=T(m),w=h._assign(Object.create(_)),S=Object.assign({},u);delete S.base,_._definition=S;const I=m._definition||{};S.messages=b.merge(I.messages,S.messages),S.properties=Object.assign({},I.properties,S.properties),w.type=S.type,S.flags=Object.assign({},I.flags,S.flags);const P=Object.assign({},I.terms);if(S.terms)for(const G in S.terms){const H=S.terms[G];f(void 0===w.$_terms[G],"Invalid term override for",S.type,G),w.$_terms[G]=H.init,P[G]=H}S.terms=P,S.args||(S.args=I.args),S.prepare=l.prepare(S.prepare,I.prepare),S.coerce&&("function"==typeof S.coerce&&(S.coerce={method:S.coerce}),S.coerce.from&&!Array.isArray(S.coerce.from)&&(S.coerce={method:S.coerce.method,from:[].concat(S.coerce.from)})),S.coerce=l.coerce(S.coerce,I.coerce),S.validate=l.validate(S.validate,I.validate);const L=Object.assign({},I.rules);if(S.rules)for(const G in S.rules){const H=S.rules[G];f("object"==typeof H,"Invalid rule definition for",S.type,G);let j=H.method;if(void 0===j&&(j=function(){return this.$_addRule(G)}),j&&(f(!_[G],"Rule conflict in",S.type,G),_[G]=j),f(!L[G],"Rule conflict in",S.type,G),L[G]=H,H.alias){const K=[].concat(H.alias);for(const R of K)_[R]=H.method}H.args&&(H.argsByName=new Map,H.args=H.args.map(K=>("string"==typeof K&&(K={name:K}),f(!H.argsByName.has(K.name),"Duplicated argument name",K.name),g.isSchema(K.assert)&&(K.assert=K.assert.strict().label(K.name)),H.argsByName.set(K.name,K),K)))}S.rules=L;const V=Object.assign({},I.modifiers);if(S.modifiers)for(const G in S.modifiers){f(!_[G],"Rule conflict in",S.type,G);const H=S.modifiers[G];f("function"==typeof H,"Invalid modifier definition for",S.type,G),_[G]=function(K){return this.rule({[G]:K})},V[G]=H}if(S.modifiers=V,S.overrides){_._super=m,w.$_super={};for(const G in S.overrides)f(m[G],"Cannot override missing",G),S.overrides[G][g.symbols.parent]=m[G],w.$_super[G]=m[G].bind(w);Object.assign(_,S.overrides)}S.cast=Object.assign({},I.cast,S.cast);const W=Object.assign({},I.manifest,S.manifest);return W.build=l.build(S.manifest&&S.manifest.build,I.manifest&&I.manifest.build),S.manifest=W,S.rebuild=l.rebuild(S.rebuild,I.rebuild),w},l.build=function(h,u){return h&&u?function(m,_){return u(h(m,_),_)}:h||u},l.coerce=function(h,u){return h&&u?{from:h.from&&u.from?[...new Set([...h.from,...u.from])]:null,method(m,_){let w;if((!u.from||u.from.includes(typeof m))&&(w=u.method(m,_),w)){if(w.errors||void 0===w.value)return w;m=w.value}if(!h.from||h.from.includes(typeof m)){const S=h.method(m,_);if(S)return S}return w}}:h||u},l.prepare=function(h,u){return h&&u?function(m,_){const w=h(m,_);if(w){if(w.errors||void 0===w.value)return w;m=w.value}return u(m,_)||w}:h||u},l.rebuild=function(h,u){return h&&u?function(m){u(m),h(m)}:h||u},l.validate=function(h,u){return h&&u?function(m,_){const w=u(m,_);if(w){if(w.errors&&(!Array.isArray(w.errors)||w.errors.length))return w;m=w.value}return h(m,_)||w}:h||u}},5107:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(8652),b=x(8160),l=x(3292),h=x(6354),u=x(8901),m=x(9708),_=x(6133),w=x(3328),S=x(1152);let I;const P={types:{alternatives:x(4946),any:x(8068),array:x(546),boolean:x(4937),date:x(7500),function:x(390),link:x(8785),number:x(3832),object:x(8966),string:x(7417),symbol:x(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const L={_types:new Set(Object.keys(P.types))};for(const V of L._types)L[V]=function(){for(var W=arguments.length,G=new Array(W),H=0;H2?W-2:0),H=2;H2?W-2:0),H=2;H{"use strict";const f=x(375),T=x(8571),g=x(3328);d.compile=function(b,l){if("string"==typeof b)return f(!l,"Cannot set single message string"),new g(b);if(g.isTemplate(b))return f(!l,"Cannot set single message template"),b;f("object"==typeof b&&!Array.isArray(b),"Invalid message options"),l=l?T(l):{};for(let h in b){const u=b[h];if("root"===h||g.isTemplate(u)){l[h]=u;continue}if("string"==typeof u){l[h]=new g(u);continue}f("object"==typeof u&&!Array.isArray(u),"Invalid message for",h);const m=h;for(h in l[m]=l[m]||{},u){const _=u[h];"root"===h||g.isTemplate(_)?l[m][h]=_:(f("string"==typeof _,"Invalid message for",h,"in",m),l[m][h]=new g(_))}}return l},d.decompile=function(b){const l={};for(let h in b){const u=b[h];if("root"===h){l.root=u;continue}if(g.isTemplate(u)){l[h]=u.describe({compact:!0});continue}const m=h;for(h in l[m]={},u){const _=u[h];"root"!==h?l[m][h]=_.describe({compact:!0}):l[m].root=_}}return l},d.merge=function(b,l){if(!b)return d.compile(l);if(!l)return b;if("string"==typeof l)return new g(l);if(g.isTemplate(l))return l;const h=T(b);for(let u in l){const m=l[u];if("root"===u||g.isTemplate(m)){h[u]=m;continue}if("string"==typeof m){h[u]=new g(m);continue}f("object"==typeof m&&!Array.isArray(m),"Invalid message for",u);const _=u;for(u in h[_]=h[_]||{},m){const w=m[u];"root"===u||g.isTemplate(w)?h[_][u]=w:(f("string"==typeof w,"Invalid message for",u,"in",_),h[_][u]=new g(w))}}return h}},2294:(E,d,x)=>{"use strict";const f=x(375),T=x(8160),g=x(6133),b={};d.Ids=b.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const l=new b.Ids;return l._byId=new Map(this._byId),l._byKey=new Map(this._byKey),l._schemaChain=this._schemaChain,l}concat(l){l._schemaChain&&(this._schemaChain=!0);for(const[h,u]of l._byId.entries())f(!this._byKey.has(h),"Schema id conflicts with existing key:",h),this._byId.set(h,u);for(const[h,u]of l._byKey.entries())f(!this._byId.has(h),"Schema key conflicts with existing id:",h),this._byKey.set(h,u)}fork(l,h,u){const m=this._collect(l);m.push({schema:u});const _=m.shift();let w={id:_.id,schema:h(_.schema)};f(T.isSchema(w.schema),"adjuster function failed to return a joi schema type");for(const S of m)w={id:S.id,schema:b.fork(S.schema,w.id,w.schema)};return w.schema}labels(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const u=l[0],m=this._get(u);if(!m)return[...h,...l].join(".");const _=l.slice(1);return h=[...h,m.schema._flags.label||u],_.length?m.schema._ids.labels(_,h):h.join(".")}reach(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const u=l[0],m=this._get(u);f(m,"Schema does not contain path",[...h,...l].join("."));const _=l.slice(1);return _.length?m.schema._ids.reach(_,[...h,u]):m.schema}register(l){let{key:h}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!l||!T.isSchema(l))return;(l.$_property("schemaChain")||l._ids._schemaChain)&&(this._schemaChain=!0);const u=l._flags.id;if(u){const m=this._byId.get(u);f(!m||m.schema===l,"Cannot add different schemas with the same id:",u),f(!this._byKey.has(u),"Schema id conflicts with existing key:",u),this._byId.set(u,{schema:l,id:u})}h&&(f(!this._byKey.has(h),"Schema already contains key:",h),f(!this._byId.has(h),"Schema key conflicts with existing id:",h),this._byKey.set(h,{schema:l,id:h}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const m=l[0],_=this._get(m);f(_,"Schema does not contain path",[...h,...l].join(".")),u=[_,...u];const w=l.slice(1);return w.length?_.schema._ids._collect(w,[...h,m],u):u}_get(l){return this._byId.get(l)||this._byKey.get(l)}},b.fork=function(l,h,u){const m=d.schema(l,{each:(_,w)=>{let{key:S}=w;if(h===(_._flags.id||S))return u},ref:!1});return m?m.$_mutateRebuild():l},d.schema=function(l,h){let u;for(const m in l._flags){if("_"===m[0])continue;const _=b.scan(l._flags[m],{source:"flags",name:m},h);void 0!==_&&(u=u||l.clone(),u._flags[m]=_)}for(let m=0;m{"use strict";const f=x(375),T=x(8571),g=x(9621),b=x(8160);let l;const h={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};d.create=function(u){let m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f("string"==typeof u,"Invalid reference key:",u),b.assertOptions(m,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),f(!m.prefix||"object"==typeof m.prefix,"options.prefix must be of type object");const _=Object.assign({},h.defaults,m);delete _.prefix;const w=_.separator,S=h.context(u,w,m.prefix);if(_.type=S.type,u=S.key,"value"===_.type)if(S.root&&(f(!w||u[0]!==w,"Cannot specify relative path with root prefix"),_.ancestor="root",u||(u=null)),w&&w===u)u=null,_.ancestor=0;else if(void 0!==_.ancestor)f(!w||!u||u[0]!==w,"Cannot combine prefix with ancestor option");else{const[I,P]=h.ancestor(u,w);P&&""===(u=u.slice(P))&&(u=null),_.ancestor=I}return _.path=w?null===u?[]:u.split(w):[u],new h.Ref(_)},d.in=function(u){let m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.create(u,{...m,in:!0})},d.isRef=function(u){return!!u&&!!u[b.symbols.ref]},h.Ref=class{constructor(u){f("object"==typeof u,"Invalid reference construction"),b.assertOptions(u,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),f([!1,void 0].includes(u.separator)||"string"==typeof u.separator&&1===u.separator.length,"Invalid separator"),f(!u.adjust||"function"==typeof u.adjust,"options.adjust must be a function"),f(!u.map||Array.isArray(u.map),"options.map must be an array"),f(!u.map||!u.adjust,"Cannot set both map and adjust options"),Object.assign(this,h.defaults,u),f("value"===this.type||void 0===this.ancestor,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(u,m,_,w){let S=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return f(!this.in||S.in,"Invalid in() reference usage"),"global"===this.type?this._resolve(_.context,m,S):"local"===this.type?this._resolve(w,m,S):this.ancestor?"root"===this.ancestor?this._resolve(m.ancestors[m.ancestors.length-1],m,S):(f(this.ancestor<=m.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(m.ancestors[this.ancestor-1],m,S)):this._resolve(u,m,S)}_resolve(u,m,_){let w;if("value"===this.type&&m.mainstay.shadow&&!1!==_.shadow&&(w=m.mainstay.shadow.get(this.absolute(m))),void 0===w&&(w=g(u,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(w=this.adjust(w)),this.map){const S=this.map.get(w);void 0!==S&&(w=S)}return m.mainstay&&m.mainstay.tracer.resolve(m,this,w),w}toString(){return this.display}absolute(u){return[...u.path.slice(0,-this.ancestor),...this.path]}clone(){return new h.Ref(this)}describe(){const u={path:this.path};"value"!==this.type&&(u.type=this.type),"."!==this.separator&&(u.separator=this.separator),"value"===this.type&&1!==this.ancestor&&(u.ancestor=this.ancestor),this.map&&(u.map=[...this.map]);for(const m of["adjust","iterables","render"])null!=this[m]&&(u[m]=this[m]);return!1!==this.in&&(u.in=!0),{ref:u}}updateDisplay(){const u=null!==this.key?this.key:"";if("value"!==this.type)return void(this.display=`ref:${this.type}:${u}`);if(!this.separator)return void(this.display=`ref:${u}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${u}`);if("root"===this.ancestor)return void(this.display=`ref:root:${u}`);if(1===this.ancestor)return void(this.display=`ref:${u||".."}`);const m=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${m}${u||""}`}},h.Ref.prototype[b.symbols.ref]=!0,d.build=function(u){return"value"===(u=Object.assign({},h.defaults,u)).type&&void 0===u.ancestor&&(u.ancestor=1),new h.Ref(u)},h.context=function(u,m){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u=u.trim(),_){const w=void 0===_.global?"$":_.global;if(w!==m&&u.startsWith(w))return{key:u.slice(w.length),type:"global"};const S=void 0===_.local?"#":_.local;if(S!==m&&u.startsWith(S))return{key:u.slice(S.length),type:"local"};const I=void 0===_.root?"/":_.root;if(I!==m&&u.startsWith(I))return{key:u.slice(I.length),type:"value",root:!0}}return{key:u,type:"value"}},h.ancestor=function(u,m){if(!m)return[1,0];if(u[0]!==m)return[1,0];if(u[1]!==m)return[0,1];let _=2;for(;u[_]===m;)++_;return[_-1,_]},d.toSibling=0,d.toParent=1,d.Manager=class{constructor(){this.refs=[]}register(u,m){if(u)if(m=void 0===m?d.toParent:m,Array.isArray(u))for(const _ of u)this.register(_,m);else if(b.isSchema(u))for(const _ of u._refs.refs)_.ancestor-m>=0&&this.refs.push({ancestor:_.ancestor-m,root:_.root});else d.isRef(u)&&"value"===u.type&&u.ancestor-m>=0&&this.refs.push({ancestor:u.ancestor-m,root:u.root}),l=l||x(3328),l.isTemplate(u)&&this.register(u.refs(),m)}get length(){return this.refs.length}clone(){const u=new d.Manager;return u.refs=T(this.refs),u}reset(){this.refs=[]}roots(){return this.refs.filter(u=>!u.ancestor).map(u=>u.root)}}},3378:(E,d,x)=>{"use strict";const f=x(5107),T={};T.wrap=f.string().min(1).max(2).allow(!1),d.preferences=f.object({allowUnknown:f.boolean(),abortEarly:f.boolean(),artifacts:f.boolean(),cache:f.boolean(),context:f.object(),convert:f.boolean(),dateFormat:f.valid("date","iso","string","time","utc"),debug:f.boolean(),errors:{escapeHtml:f.boolean(),label:f.valid("path","key",!1),language:[f.string(),f.object().ref()],render:f.boolean(),stack:f.boolean(),wrap:{label:T.wrap,array:T.wrap,string:T.wrap}},externals:f.boolean(),messages:f.object(),noDefaults:f.boolean(),nonEnumerables:f.boolean(),presence:f.valid("required","optional","forbidden"),skipFunctions:f.boolean(),stripUnknown:f.object({arrays:f.boolean(),objects:f.boolean()}).or("arrays","objects").allow(!0,!1),warnings:f.boolean()}).strict(),T.nameRx=/^[a-zA-Z0-9]\w*$/,T.rule=f.object({alias:f.array().items(f.string().pattern(T.nameRx)).single(),args:f.array().items(f.string(),f.object({name:f.string().pattern(T.nameRx).required(),ref:f.boolean(),assert:f.alternatives([f.function(),f.object().schema()]).conditional("ref",{is:!0,then:f.required()}),normalize:f.function(),message:f.string().when("assert",{is:f.function(),then:f.required()})})),convert:f.boolean(),manifest:f.boolean(),method:f.function().allow(!1),multi:f.boolean(),validate:f.function()}),d.extension=f.object({type:f.alternatives([f.string(),f.object().regex()]).required(),args:f.function(),cast:f.object().pattern(T.nameRx,f.object({from:f.function().maxArity(1).required(),to:f.function().minArity(1).maxArity(2).required()})),base:f.object().schema().when("type",{is:f.object().regex(),then:f.forbidden()}),coerce:[f.function().maxArity(3),f.object({method:f.function().maxArity(3).required(),from:f.array().items(f.string()).single()})],flags:f.object().pattern(T.nameRx,f.object({setter:f.string(),default:f.any()})),manifest:{build:f.function().arity(2)},messages:[f.object(),f.string()],modifiers:f.object().pattern(T.nameRx,f.function().minArity(1).maxArity(2)),overrides:f.object().pattern(T.nameRx,f.function()),prepare:f.function().maxArity(3),rebuild:f.function().arity(1),rules:f.object().pattern(T.nameRx,T.rule),terms:f.object().pattern(T.nameRx,f.object({init:f.array().allow(null).required(),manifest:f.object().pattern(/.+/,[f.valid("schema","single"),f.object({mapped:f.object({from:f.string().required(),to:f.string().required()}).required()})])})),validate:f.function().maxArity(3)}).strict(),d.extensions=f.array().items(f.object(),f.function().arity(1)).strict(),T.desc={buffer:f.object({buffer:f.string()}),func:f.object({function:f.function().required(),options:{literal:!0}}),override:f.object({override:!0}),ref:f.object({ref:f.object({type:f.valid("value","global","local"),path:f.array().required(),separator:f.string().length(1).allow(!1),ancestor:f.number().min(0).integer().allow("root"),map:f.array().items(f.array().length(2)).min(1),adjust:f.function(),iterables:f.boolean(),in:f.boolean(),render:f.boolean()}).required()}),regex:f.object({regex:f.string().min(3)}),special:f.object({special:f.valid("deep").required()}),template:f.object({template:f.string().required(),options:f.object()}),value:f.object({value:f.alternatives([f.object(),f.array()]).required()})},T.desc.entity=f.alternatives([f.array().items(f.link("...")),f.boolean(),f.function(),f.number(),f.string(),T.desc.buffer,T.desc.func,T.desc.ref,T.desc.regex,T.desc.special,T.desc.template,T.desc.value,f.link("/")]),T.desc.values=f.array().items(null,f.boolean(),f.function(),f.number().allow(1/0,-1/0),f.string().allow(""),f.symbol(),T.desc.buffer,T.desc.func,T.desc.override,T.desc.ref,T.desc.regex,T.desc.template,T.desc.value),T.desc.messages=f.object().pattern(/.+/,[f.string(),T.desc.template,f.object().pattern(/.+/,[f.string(),T.desc.template])]),d.description=f.object({type:f.string().required(),flags:f.object({cast:f.string(),default:f.any(),description:f.string(),empty:f.link("/"),failover:T.desc.entity,id:f.string(),label:f.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:f.boolean(),unit:f.string()}).unknown(),preferences:{allowUnknown:f.boolean(),abortEarly:f.boolean(),artifacts:f.boolean(),cache:f.boolean(),convert:f.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:f.boolean(),label:["path","key"],language:[f.string(),T.desc.ref],wrap:{label:T.wrap,array:T.wrap}},externals:f.boolean(),messages:T.desc.messages,noDefaults:f.boolean(),nonEnumerables:f.boolean(),presence:["required","optional","forbidden"],skipFunctions:f.boolean(),stripUnknown:f.object({arrays:f.boolean(),objects:f.boolean()}).or("arrays","objects").allow(!0,!1),warnings:f.boolean()},allow:T.desc.values,invalid:T.desc.values,rules:f.array().min(1).items({name:f.string().required(),args:f.object().min(1),keep:f.boolean(),message:[f.string(),T.desc.messages],warn:f.boolean()}),keys:f.object().pattern(/.*/,f.link("/")),link:T.desc.ref}).pattern(/^[a-z]\w*$/,f.any())},493:(E,d,x)=>{"use strict";const f=x(8571),T=x(9621),g=x(8160),b={value:Symbol("value")};E.exports=b.State=class{constructor(l,h,u){this.path=l,this.ancestors=h,this.mainstay=u.mainstay,this.schemas=u.schemas,this.debug=null}localize(l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const m=new b.State(l,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this);return u&&m.schemas&&(m.schemas=[b.schemas(u),...m.schemas]),m}nest(l,h){const u=new b.State(this.path,this.ancestors,this);return u.schemas=u.schemas&&[b.schemas(l),...u.schemas],u.debug=h,u}shadow(l,h){this.mainstay.shadow=this.mainstay.shadow||new b.Shadow,this.mainstay.shadow.set(this.path,l,h)}snapshot(){this.mainstay.shadow&&(this._snapshot=f(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}},b.schemas=function(l){return g.isSchema(l)?{schema:l}:l},b.Shadow=class{constructor(){this._values=null}set(l,h,u){if(!l.length||"strip"===u&&"number"==typeof l[l.length-1])return;this._values=this._values||new Map;let m=this._values;for(let _=0;_{"use strict";const f=x(375),T=x(8571),g=x(5277),b=x(1447),l=x(8160),h=x(6354),u=x(6133),m={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join("\x01"),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};E.exports=m.Template=class{constructor(_,w){f("string"==typeof _,"Template source must be a string"),f(!_.includes("\0")&&!_.includes("\x01"),"Template source cannot contain reserved control characters"),this.source=_,this.rendered=_,this._template=null,this._settings=T(w),this._parse()}_parse(){if(!this.source.includes("{"))return;const _=m.encode(this.source),w=m.split(_);let S=!1;const I=[],P=w.shift();P&&I.push(P);for(const L of w){const V="{"!==L[0],W=V?"}":"}}",G=L.indexOf(W);if(-1===G||"{"===L[1]){I.push(`{${m.decode(L)}`);continue}let H=L.slice(V?0:1,G);const j=":"===H[0];j&&(H=H.slice(1));const K=this._ref(m.decode(H),{raw:V,wrapped:j});I.push(K),"string"!=typeof K&&(S=!0);const R=L.slice(G+W.length);R&&I.push(m.decode(R))}S?this._template=I:this.rendered=I.join("")}static date(_,w){return m.dateFormat[w.dateFormat].call(_)}describe(){if(!this._settings&&(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).compact)return this.source;const w={template:this.source};return this._settings&&(w.options=this._settings),w}static build(_){return new m.Template(_.template,_.options)}isDynamic(){return!!this._template}static isTemplate(_){return!!_&&!!_[l.symbols.template]}refs(){if(!this._template)return;const _=[];for(const w of this._template)"string"!=typeof w&&_.push(...w.refs);return _}resolve(_,w,S,I){return this._template&&1===this._template.length?this._part(this._template[0],_,w,S,I,{}):this.render(_,w,S,I)}_part(_){for(var w=arguments.length,S=new Array(w>1?w-1:0),I=1;I4&&void 0!==arguments[4]?arguments[4]:{};if(!this.isDynamic())return this.rendered;const L=[];for(const V of this._template)if("string"==typeof V)L.push(V);else{const W=this._part(V,_,w,S,I,P),G=m.stringify(W,_,w,S,I,P);if(void 0!==G){const H=V.raw||!1===(P.errors&&P.errors.escapeHtml)?G:g(G);L.push(m.wrap(H,V.wrapped&&S.errors.wrap.label))}}return L.join("")}_ref(_,w){let{raw:S,wrapped:I}=w;const P=[],L=W=>{const G=u.create(W,this._settings);return P.push(G),H=>G.resolve(...H)};try{var V=new b.Parser(_,{reference:L,functions:m.functions,constants:m.constants})}catch(W){throw W.message=`Invalid template variable "${_}" fails due to: ${W.message}`,W}if(V.single){if("reference"===V.single.type){const W=P[0];return{ref:W,raw:S,refs:P,wrapped:I||"local"===W.type&&"label"===W.key}}return m.stringify(V.single.value)}return{formula:V,raw:S,refs:P}}toString(){return this.source}},m.Template.prototype[l.symbols.template]=!0,m.Template.prototype.isImmutable=!0,m.encode=function(_){return _.replace(/\\(\{+)/g,(w,S)=>m.opens.slice(0,S.length)).replace(/\\(\}+)/g,(w,S)=>m.closes.slice(0,S.length))},m.decode=function(_){return _.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},m.split=function(_){const w=[];let S="";for(let I=0;I<_.length;++I){const P=_[I];if("{"===P){let L="";for(;I+1<_.length&&"{"===_[I+1];)L+="{",++I;w.push(S),S=L}else S+=P}return w.push(S),w},m.wrap=function(_,w){return w?1===w.length?`${w}${_}${w}`:`${w[0]}${_}${w[1]}`:_},m.stringify=function(_,w,S,I,P){let L=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const V=typeof _,W=I&&I.errors&&I.errors.wrap||{};let G=!1;if(u.isRef(_)&&_.render&&(G=_.in,_=_.resolve(w,S,I,P,{in:_.in,...L})),null===_)return"null";if("string"===V)return m.wrap(_,L.arrayItems&&W.string);if("number"===V||"function"===V||"symbol"===V)return _.toString();if("object"!==V)return JSON.stringify(_);if(_ instanceof Date)return m.Template.date(_,I);if(_ instanceof Map){const j=[];for(const[K,R]of _.entries())j.push(`${K.toString()} -> ${R.toString()}`);_=j}if(!Array.isArray(_))return _.toString();const H=[];for(const j of _)H.push(m.stringify(j,w,S,I,P,{arrayItems:!0,...L}));return m.wrap(H.join(", "),!G&&W.array)},m.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},m.functions={if:(_,w,S)=>_?w:S,length:_=>"string"==typeof _?_.length:_&&"object"==typeof _?Array.isArray(_)?_.length:Object.keys(_).length:null,msg(_){const[w,S,I,P,L]=this,V=L.messages;if(!V)return"";const W=h.template(w,V[0],_,S,I)||h.template(w,V[1],_,S,I);return W?W.render(w,S,I,P,L):""},number:_=>"number"==typeof _?_:"string"==typeof _?parseFloat(_):"boolean"==typeof _?_?1:0:_ instanceof Date?_.getTime():null}},4946:(E,d,x)=>{"use strict";const f=x(375),T=x(1687),g=x(8068),b=x(8160),l=x(3292),h=x(6354),u=x(6133),m={};E.exports=g.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:u.toSibling}},args(_){for(var w=arguments.length,S=new Array(w>1?w-1:0),I=1;Ih.details(j,{override:!1}))})};if("one"===S._flags.match)return 1===W.length?{value:W[0]}:{errors:I("alternatives.one")};if(W.length!==S.$_terms.matches.length)return{errors:I("alternatives.all",{details:G.map(j=>h.details(j,{override:!1}))})};const H=j=>j.$_terms.matches.some(K=>"object"===K.schema.type||"alternatives"===K.schema.type&&H(K.schema));return H(S)?{value:W.reduce((j,K)=>T(j,K,{mergeArrays:!1}))}:{value:W[W.length-1]}}const V=[];for(let W=0;W"is"!==S.path[0]?w.label(_):void 0,ref:!1})}},rebuild(_){_.$_modify({each:w=>{b.isSchema(w)&&"array"===w.type&&_.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(_,w){if(w.matches)for(const S of w.matches){const{schema:I,ref:P,is:L,not:V,then:W,otherwise:G}=S;_=I?_.try(I):P?_.conditional(P,{is:L,then:W,not:V,otherwise:G,switch:S.switch}):_.conditional(L,{then:W,otherwise:G})}return _}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),m.errors=function(_,w){let{error:S,state:I}=w;if(!_.length)return{errors:S("alternatives.any")};if(1===_.length)return{errors:_[0].reports};const P=new Set,L=[];for(const{reports:V,schema:W}of _){if(V.length>1)return m.unmatched(_,S);const G=V[0];if(G instanceof h.Report==0)return m.unmatched(_,S);if(G.state.path.length!==I.path.length){L.push({type:W.type,report:G});continue}if("any.only"===G.code){for(const K of G.local.valids)P.add(K);continue}const[H,j]=G.code.split(".");"base"===j?P.add(H):L.push({type:W.type,report:G})}return L.length?1===L.length?{errors:L[0].report}:m.unmatched(_,S):{errors:S("alternatives.types",{types:[...P]})}},m.unmatched=function(_,w){const S=[];for(const I of _)S.push(...I.reports);return{errors:w("alternatives.match",h.details(S,{override:!1}))}}},8068:(E,d,x)=>{"use strict";const f=x(375),T=x(7629),g=x(8160),b=x(6914);E.exports=T.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(l,h){return f("function"==typeof l,"Method must be a function"),f(void 0===h||h&&"string"==typeof h,"Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:l,description:h}})},validate(l,h,u){let{method:m}=u;try{return m(l,h)}catch(_){return h.error("any.custom",{error:_})}},args:["method","description"],multi:!0},messages:{method(l){return this.prefs({messages:l})}},shared:{method(l){f(g.isSchema(l)&&l._flags.id,"Schema must be a schema with an id");const h=this.clone();return h.$_terms.shared=h.$_terms.shared||[],h.$_terms.shared.push(l),h.$_mutateRegister(l),h}},warning:{method(l,h){return f(l&&"string"==typeof l,"Invalid warning code"),this.$_addRule({name:"warning",args:{code:l,local:h},warn:!0})},validate(l,h,u){let{code:m,local:_}=u;return h.error(m,_)},args:["code","local"],multi:!0}},modifiers:{keep(l){l.keep=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]},message(l,h){l.message=b.compile(h)},warn(l){l.warn=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]}},manifest:{build(l,h){for(const u in h){const m=h[u];if(["examples","externals","metas","notes","tags"].includes(u))for(const _ of m)l=l[u.slice(0,-1)](_);else if("alterations"!==u)if("whens"!==u){if("shared"===u)for(const _ of m)l=l.shared(_)}else for(const _ of m){const{ref:w,is:S,not:I,then:P,otherwise:L,concat:V}=_;l=V?l.concat(V):w?l.when(w,{is:S,not:I,then:P,otherwise:L,switch:_.switch,break:_.break}):l.when(S,{then:P,otherwise:L,break:_.break})}else{const _={};for(const{target:w,adjuster:S}of m)_[w]=S;l=l.alter(_)}}return l}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(E,d,x)=>{"use strict";const f=x(375),T=x(9474),g=x(9621),b=x(8068),l=x(8160),h=x(3292),u={};E.exports=b.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(m,_){let{schema:w,state:S,prefs:I}=_;if(!Array.isArray(m))return;const P=w.$_getRule("sort");return P?u.sort(w,m,P.args.options,S,I):void 0}},validate(m,_){let{schema:w,error:S}=_;if(!Array.isArray(m)){if(w._flags.single){const I=[m];return I[l.symbols.arraySingle]=!0,{value:I}}return{errors:S("array.base")}}if(w.$_getRule("items")||w.$_terms.externals)return{value:m.slice()}},rules:{has:{method(m){m=this.$_compile(m,{appendPath:!0});const _=this.$_addRule({name:"has",args:{schema:m}});return _.$_mutateRegister(m),_},validate(m,_,w){let{state:S,prefs:I,error:P}=_,{schema:L}=w;const V=[m,...S.ancestors];for(let G=0;Gthis.$_compile(_[I]),I,{append:!0});S.$_terms.items.push(P)}return S.$_mutateRebuild()},validate(m,_){let{schema:w,error:S,state:I,prefs:P,errorsArray:L}=_;const V=w.$_terms._requireds.slice(),W=w.$_terms.ordered.slice(),G=[...w.$_terms._inclusions,...V],H=!m[l.symbols.arraySingle];delete m[l.symbols.arraySingle];const j=L();let K=m.length;for(let R=0;R="})}},ordered:{method(){for(var m=arguments.length,_=new Array(m),w=0;wthis.$_compile(_[I]),I,{append:!0});u.validateSingle(P,S),S.$_mutateRegister(P),S.$_terms.ordered.push(P)}return S.$_mutateRebuild()}},single:{method(m){const _=void 0===m||!!m;return f(!_||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",_)}},sort:{method(){let m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.assertOptions(m,["by","order"]);const _={order:m.order||"ascending"};return m.by&&(_.by=h.ref(m.by,{ancestor:0}),f(!_.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:_}})},validate(m,_,w){let{error:S,state:I,prefs:P,schema:L}=_,{options:V}=w;const{value:W,errors:G}=u.sort(L,m,V,I,P);if(G)return G;for(let H=0;H1&&void 0!==arguments[1]?arguments[1]:{};f(!m||"function"==typeof m||"string"==typeof m,"comparator must be a function or a string"),l.assertOptions(_,["ignoreUndefined","separator"]);const w={name:"unique",args:{options:_,comparator:m}};if(m)if("string"==typeof m){const S=l.default(_.separator,".");w.path=S?m.split(S):[m]}else w.comparator=m;return this.$_addRule(w)},validate(m,_,w,S){let{state:I,error:P}=_,{comparator:V,options:W}=w,{comparator:G,path:H}=S;const j={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},K=G||T,R=W.ignoreUndefined;for(let o=0;onew Set(m)}},rebuild(m){m.$_terms._inclusions=[],m.$_terms._exclusions=[],m.$_terms._requireds=[];for(const _ of m.$_terms.items)u.validateSingle(_,m),"required"===_._flags.presence?m.$_terms._requireds.push(_):"forbidden"===_._flags.presence?m.$_terms._exclusions.push(_):m.$_terms._inclusions.push(_);for(const _ of m.$_terms.ordered)u.validateSingle(_,m)},manifest:{build:(m,_)=>(_.items&&(m=m.items(..._.items)),_.ordered&&(m=m.ordered(..._.ordered)),m)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),u.fillMissedErrors=function(m,_,w,S,I,P){const L=[];let V=0;for(const W of w){const G=W._flags.label;G?L.push(G):++V}_.push(L.length?V?m.$_createError("array.includesRequiredBoth",S,{knownMisses:L,unknownMisses:V},I,P):m.$_createError("array.includesRequiredKnowns",S,{knownMisses:L},I,P):m.$_createError("array.includesRequiredUnknowns",S,{unknownMisses:V},I,P))},u.fillOrderedErrors=function(m,_,w,S,I,P){const L=[];for(const V of w)"required"===V._flags.presence&&L.push(V);L.length&&u.fillMissedErrors(m,_,L,S,I,P)},u.fillDefault=function(m,_,w,S){const I=[];let P=!0;for(let L=m.length-1;L>=0;--L){const V=m[L],W=[_,...w.ancestors],G=V.$_validate(void 0,w.localize(w.path,W,V),S).value;if(P){if(void 0===G)continue;P=!1}I.unshift(G)}I.length&&_.push(...I)},u.fastSplice=function(m,_){let w=_;for(;w{let j=u.compare(G,H,L,V);if(null!==j||(w.by&&(G=w.by.resolve(G,S,I),H=w.by.resolve(H,S,I)),j=u.compare(G,H,L,V),null!==j))return j;const K=typeof G;if(K!==typeof H)throw m.$_createError("array.sort.mismatching",_,null,S,I);if("number"!==K&&"string"!==K)throw m.$_createError("array.sort.unsupported",_,{type:K},S,I);return"number"===K?(G-H)*P:G{"use strict";const f=x(375),T=x(8068),g=x(8160),b=x(2036),l={isBool:function(h){return"boolean"==typeof h}};E.exports=T.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(h,u){let{schema:m}=u;if("boolean"!=typeof h){if("string"==typeof h){const _=m._flags.sensitive?h:h.toLowerCase();h="true"===_||"false"!==_&&h}return"boolean"!=typeof h&&(h=m.$_terms.truthy&&m.$_terms.truthy.has(h,null,null,!m._flags.sensitive)||(!m.$_terms.falsy||!m.$_terms.falsy.has(h,null,null,!m._flags.sensitive))&&h),{value:h}}},validate(h,u){let{error:m}=u;if("boolean"!=typeof h)return{value:h,errors:m("boolean.base")}},rules:{truthy:{method(){for(var h=arguments.length,u=new Array(h),m=0;m0&&void 0!==arguments[0])||arguments[0])}}},cast:{number:{from:l.isBool,to:(h,u)=>h?1:0},string:{from:l.isBool,to:(h,u)=>h?"true":"false"}},manifest:{build:(h,u)=>(u.truthy&&(h=h.truthy(...u.truthy)),u.falsy&&(h=h.falsy(...u.falsy)),h)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(E,d,x)=>{"use strict";const f=x(375),T=x(8068),g=x(8160),b=x(3328),l={isDate:function(h){return h instanceof Date}};E.exports=T.extend({type:"date",coerce:{from:["number","string"],method(h,u){let{schema:m}=u;return{value:l.parse(h,m._flags.format)||h}}},validate(h,u){let{schema:m,error:_,prefs:w}=u;if(h instanceof Date&&!isNaN(h.getTime()))return;const S=m._flags.format;return w.convert&&S&&"string"==typeof h?{value:h,errors:_("date.format",{format:S})}:{value:h,errors:_("date.base")}},rules:{compare:{method:!1,validate(h,u,m,_){let{date:w}=m,{name:S,operator:I,args:P}=_;const L="now"===w?Date.now():w.getTime();return g.compare(h.getTime(),L,I)?h:u.error("date."+S,{limit:P.date,value:h})},args:[{name:"date",ref:!0,normalize:h=>"now"===h?h:l.parse(h),assert:h=>null!==h,message:"must have a valid date format"}]},format:{method(h){return f(["iso","javascript","unix"].includes(h),"Unknown date format",h),this.$_setFlag("format",h)}},greater:{method(h){return this.$_addRule({name:"greater",method:"compare",args:{date:h},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(h){return this.$_addRule({name:"less",method:"compare",args:{date:h},operator:"<"})}},max:{method(h){return this.$_addRule({name:"max",method:"compare",args:{date:h},operator:"<="})}},min:{method(h){return this.$_addRule({name:"min",method:"compare",args:{date:h},operator:">="})}},timestamp:{method(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript";return f(["javascript","unix"].includes(h),'"type" must be one of "javascript, unix"'),this.format(h)}}},cast:{number:{from:l.isDate,to:(h,u)=>h.getTime()},string:{from:l.isDate,to(h,u){let{prefs:m}=u;return b.date(h,m)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),l.parse=function(h,u){if(h instanceof Date)return h;if("string"!=typeof h&&(isNaN(h)||!isFinite(h))||/^\s*$/.test(h))return null;if("iso"===u)return g.isIsoDate(h)?l.date(h.toString()):null;const m=h;if("string"==typeof h&&/^[+-]?\d+(\.\d+)?$/.test(h)&&(h=parseFloat(h)),u){if("javascript"===u)return l.date(1*h);if("unix"===u)return l.date(1e3*h);if("string"==typeof m)return null}return l.date(h)},l.date=function(h){const u=new Date(h);return isNaN(u.getTime())?null:u}},390:(E,d,x)=>{"use strict";const f=x(375),T=x(7824);E.exports=T.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(g){return f(Number.isSafeInteger(g)&&g>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:g}})},validate(g,b,l){let{n:h}=l;return g.length===h?g:b.error("function.arity",{n:h})}},class:{method(){return this.$_addRule("class")},validate:(g,b)=>/^\s*class\s/.test(g.toString())?g:b.error("function.class",{value:g})},minArity:{method(g){return f(Number.isSafeInteger(g)&&g>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:g}})},validate(g,b,l){let{n:h}=l;return g.length>=h?g:b.error("function.minArity",{n:h})}},maxArity:{method(g){return f(Number.isSafeInteger(g)&&g>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:g}})},validate(g,b,l){let{n:h}=l;return g.length<=h?g:b.error("function.maxArity",{n:h})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(E,d,x)=>{"use strict";const f=x(978),T=x(375),g=x(8571),b=x(3652),l=x(8068),h=x(8160),u=x(3292),m=x(6354),_=x(6133),w=x(3328),S={renameDefaults:{alias:!1,multiple:!1,override:!1}};E.exports=l.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(I,P)=>I.keys(P),validate(I,P){let{schema:L,error:V,state:W,prefs:G}=P;if(!I||typeof I!==L.$_property("typeof")||Array.isArray(I))return{value:I,errors:V("object.base",{type:L.$_property("typeof")})};if(!(L.$_terms.renames||L.$_terms.dependencies||L.$_terms.keys||L.$_terms.patterns||L.$_terms.externals))return;I=S.clone(I,G);const H=[];if(L.$_terms.renames&&!S.rename(L,I,W,G,H))return{value:I,errors:H};if(!L.$_terms.keys&&!L.$_terms.patterns&&!L.$_terms.dependencies)return{value:I,errors:H};const j=new Set(Object.keys(I));if(L.$_terms.keys){const K=[I,...W.ancestors];for(const R of L.$_terms.keys){const o=R.key,y=I[o];j.delete(o);const M=W.localize([...W.path,o],K,R),v=R.schema.$_validate(y,M,G);if(v.errors){if(G.abortEarly)return{value:I,errors:v.errors};void 0!==v.value&&(I[o]=v.value),H.push(...v.errors)}else"strip"===R.schema._flags.result||void 0===v.value&&void 0!==y?delete I[o]:void 0!==v.value&&(I[o]=v.value)}}if(j.size||L._flags._hasPatternMatch){const K=S.unknown(L,I,j,H,W,G);if(K)return K}if(L.$_terms.dependencies)for(const K of L.$_terms.dependencies){if(null!==K.key&&!1===S.isPresent(K.options)(K.key.resolve(I,W,G,null,{shadow:!1})))continue;const R=S.dependencies[K.rel](L,K,I,W,G);if(R){const o=L.$_createError(R.code,I,R.context,W,G);if(G.abortEarly)return{value:I,errors:o};H.push(o)}}return{value:I,errors:H}},rules:{and:{method(){for(var I=arguments.length,P=new Array(I),L=0;L!I.hasOwnProperty(L.key)):new S.Keys;for(const L in I)h.tryWithPath(()=>P.$_terms.keys.push({key:L,schema:this.$_compile(I[L])}),L)}else P.$_terms.keys=new S.Keys;else P.$_terms.keys=null;return P.$_mutateRebuild()}},length:{method(I){return this.$_addRule({name:"length",args:{limit:I},operator:"="})},validate(I,P,L,V){let{limit:W}=L,{name:G,operator:H,args:j}=V;return h.compare(Object.keys(I).length,W,H)?I:P.error("object."+G,{limit:j.limit,value:I})},args:[{name:"limit",ref:!0,assert:h.limit,message:"must be a positive integer"}]},max:{method(I){return this.$_addRule({name:"max",method:"length",args:{limit:I},operator:"<="})}},min:{method(I){return this.$_addRule({name:"min",method:"length",args:{limit:I},operator:">="})}},nand:{method(){for(var I=arguments.length,P=new Array(I),L=0;L2&&void 0!==arguments[2]?arguments[2]:{};const V=I instanceof RegExp;V||(I=this.$_compile(I,{appendPath:!0})),T(void 0!==P,"Invalid rule"),h.assertOptions(L,["fallthrough","matches"]),V&&T(!I.flags.includes("g")&&!I.flags.includes("y"),"pattern should not use global or sticky mode"),P=this.$_compile(P,{appendPath:!0});const W=this.clone();W.$_terms.patterns=W.$_terms.patterns||[];const G={[V?"regex":"schema"]:I,rule:P};return L.matches&&(G.matches=this.$_compile(L.matches),"array"!==G.matches.type&&(G.matches=G.matches.$_root.array().items(G.matches)),W.$_mutateRegister(G.matches),W.$_setFlag("_hasPatternMatch",!0,{clone:!1})),L.fallthrough&&(G.fallthrough=!0),W.$_terms.patterns.push(G),W.$_mutateRegister(P),W}},ref:{method(){return this.$_addRule("ref")},validate:(I,P)=>_.isRef(I)?I:P.error("object.refType",{value:I})},regex:{method(){return this.$_addRule("regex")},validate:(I,P)=>I instanceof RegExp?I:P.error("object.regex",{value:I})},rename:{method(I,P){let L=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};T("string"==typeof I||I instanceof RegExp,"Rename missing the from argument"),T("string"==typeof P||P instanceof w,"Invalid rename to argument"),T(P!==I,"Cannot rename key to same name:",I),h.assertOptions(L,["alias","ignoreUndefined","override","multiple"]);const V=this.clone();V.$_terms.renames=V.$_terms.renames||[];for(const W of V.$_terms.renames)T(W.from!==I,"Cannot rename the same key multiple times");return P instanceof w&&V.$_mutateRegister(P),V.$_terms.renames.push({from:I,to:P,options:f(S.renameDefaults,L)}),V}},schema:{method(){return this.$_addRule({name:"schema",args:{type:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any"}})},validate(I,P,L){let{type:V}=L;return!h.isSchema(I)||"any"!==V&&I.type!==V?P.error("object.schema",{type:V}):I}},unknown:{method(I){return this.$_setFlag("unknown",!1!==I)}},with:{method(I,P){return S.dependency(this,"with",I,P,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}},without:{method(I,P){return S.dependency(this,"without",I,P,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}},xor:{method(){for(var I=arguments.length,P=new Array(I),L=0;LP.add(L,{after:L.schema.$_rootReferences(),group:L.key}),L.key);I.$_terms.keys=new S.Keys(...P.nodes)}},manifest:{build(I,P){if(P.keys&&(I=I.keys(P.keys)),P.dependencies)for(const{rel:L,key:V=null,peers:W,options:G}of P.dependencies)I=S.dependency(I,L,V,W,G);if(P.patterns)for(const{regex:L,schema:V,rule:W,fallthrough:G,matches:H}of P.patterns)I=I.pattern(L||V,W,{fallthrough:G,matches:H});if(P.renames)for(const{from:L,to:V,options:W}of P.renames)I=I.rename(L,V,W);return I}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),S.clone=function(I,P){if("object"==typeof I){if(P.nonEnumerables)return g(I,{shallow:!0});const V=Object.create(Object.getPrototypeOf(I));return Object.assign(V,I),V}const L=function(){for(var V=arguments.length,W=new Array(V),G=0;G1&&"object"==typeof V[V.length-1]?V.pop():{}),h.assertOptions(W,["separator","isPresent"]),V=[].concat(V);const G=h.default(W.separator,"."),H=[];for(const K of V)T("string"==typeof K,P,"peers must be strings"),H.push(u.ref(K,{separator:G,ancestor:0,prefix:!1}));null!==L&&(L=u.ref(L,{separator:G,ancestor:0,prefix:!1}));const j=I.clone();return j.$_terms.dependencies=j.$_terms.dependencies||[],j.$_terms.dependencies.push(new S.Dependency(P,L,H,V,W)),j},S.dependencies={and(I,P,L,V,W){const G=[],H=[],j=P.peers.length,K=S.isPresent(P.options);for(const R of P.peers)!1===K(R.resolve(L,V,W,null,{shadow:!1}))?G.push(R.key):H.push(R.key);if(G.length!==j&&H.length!==j)return{code:"object.and",context:{present:H,presentWithLabels:S.keysToLabels(I,H),missing:G,missingWithLabels:S.keysToLabels(I,G)}}},nand(I,P,L,V,W){const G=[],H=S.isPresent(P.options);for(const R of P.peers)H(R.resolve(L,V,W,null,{shadow:!1}))&&G.push(R.key);if(G.length!==P.peers.length)return;const j=P.paths[0],K=P.paths.slice(1);return{code:"object.nand",context:{main:j,mainWithLabel:S.keysToLabels(I,j),peers:K,peersWithLabels:S.keysToLabels(I,K)}}},or(I,P,L,V,W){const G=S.isPresent(P.options);for(const H of P.peers)if(G(H.resolve(L,V,W,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:P.paths,peersWithLabels:S.keysToLabels(I,P.paths)}}},oxor(I,P,L,V,W){const G=[],H=S.isPresent(P.options);for(const K of P.peers)H(K.resolve(L,V,W,null,{shadow:!1}))&&G.push(K.key);if(!G.length||1===G.length)return;const j={peers:P.paths,peersWithLabels:S.keysToLabels(I,P.paths)};return j.present=G,j.presentWithLabels=S.keysToLabels(I,G),{code:"object.oxor",context:j}},with(I,P,L,V,W){const G=S.isPresent(P.options);for(const H of P.peers)if(!1===G(H.resolve(L,V,W,null,{shadow:!1})))return{code:"object.with",context:{main:P.key.key,mainWithLabel:S.keysToLabels(I,P.key.key),peer:H.key,peerWithLabel:S.keysToLabels(I,H.key)}}},without(I,P,L,V,W){const G=S.isPresent(P.options);for(const H of P.peers)if(G(H.resolve(L,V,W,null,{shadow:!1})))return{code:"object.without",context:{main:P.key.key,mainWithLabel:S.keysToLabels(I,P.key.key),peer:H.key,peerWithLabel:S.keysToLabels(I,H.key)}}},xor(I,P,L,V,W){const G=[],H=S.isPresent(P.options);for(const K of P.peers)H(K.resolve(L,V,W,null,{shadow:!1}))&&G.push(K.key);if(1===G.length)return;const j={peers:P.paths,peersWithLabels:S.keysToLabels(I,P.paths)};return 0===G.length?{code:"object.missing",context:j}:(j.present=G,j.presentWithLabels=S.keysToLabels(I,G),{code:"object.xor",context:j})}},S.keysToLabels=function(I,P){return Array.isArray(P)?P.map(L=>I.$_mapLabels(L)):I.$_mapLabels(P)},S.isPresent=function(I){return"function"==typeof I.isPresent?I.isPresent:P=>void 0!==P},S.rename=function(I,P,L,V,W){const G={};for(const H of I.$_terms.renames){const j=[],K="string"!=typeof H.from;if(K)for(const R in P){if(void 0===P[R]&&H.options.ignoreUndefined||R===H.to)continue;const o=H.from.exec(R);o&&j.push({from:R,to:H.to,match:o})}else!Object.prototype.hasOwnProperty.call(P,H.from)||void 0===P[H.from]&&H.options.ignoreUndefined||j.push(H);for(const R of j){const o=R.from;let y=R.to;if(y instanceof w&&(y=y.render(P,L,V,R.match)),o!==y){if(!H.options.multiple&&G[y]&&(W.push(I.$_createError("object.rename.multiple",P,{from:o,to:y,pattern:K},L,V)),V.abortEarly)||Object.prototype.hasOwnProperty.call(P,y)&&!H.options.override&&!G[y]&&(W.push(I.$_createError("object.rename.override",P,{from:o,to:y,pattern:K},L,V)),V.abortEarly))return!1;void 0===P[o]?delete P[y]:P[y]=P[o],G[y]=!0,H.options.alias||delete P[o]}}}return!0},S.unknown=function(I,P,L,V,W,G){if(I.$_terms.patterns){let H=!1;const j=I.$_terms.patterns.map(R=>{if(R.matches)return H=!0,[]}),K=[P,...W.ancestors];for(const R of L){const o=P[R],y=[...W.path,R];for(let M=0;M{"use strict";const f=x(375),T=x(8068),g=x(8160),b=x(3292),l=x(6354),h={};E.exports=T.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(u,m)=>u.ref(m),validate(u,m){let{schema:_,state:w,prefs:S}=m;f(_.$_terms.link,"Uninitialized link schema");const I=h.generate(_,u,w,S);return I.$_validate(u,w.nest(I,`link:${_.$_terms.link[0].ref.display}:${I.type}`),S)},generate:(u,m,_,w)=>h.generate(u,m,_,w),rules:{ref:{method(u){f(!this.$_terms.link,"Cannot reinitialize schema"),u=b.ref(u),f("value"===u.type||"local"===u.type,"Invalid reference type:",u.type),f("local"===u.type||"root"===u.ancestor||u.ancestor>0,"Link cannot reference itself");const m=this.clone();return m.$_terms.link=[{ref:u}],m}},relative:{method(){return this.$_setFlag("relative",!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}}},overrides:{concat(u){f(this.$_terms.link,"Uninitialized link schema"),f(g.isSchema(u),"Invalid schema object"),f("link"!==u.type,"Cannot merge type link with another link");const m=this.clone();return m.$_terms.whens||(m.$_terms.whens=[]),m.$_terms.whens.push({concat:u}),m.$_mutateRebuild()}},manifest:{build:(u,m)=>(f(m.link,"Invalid link description missing link"),u.ref(m.link))}}),h.generate=function(u,m,_,w){let S=_.mainstay.links.get(u);if(S)return S._generate(m,_,w).schema;const I=u.$_terms.link[0].ref,{perspective:P,path:L}=h.perspective(I,_);h.assert(P,"which is outside of schema boundaries",I,u,_,w);try{S=L.length?P.$_reach(L):P}catch{h.assert(!1,"to non-existing schema",I,u,_,w)}return h.assert("link"!==S.type,"which is another link",I,u,_,w),u._flags.relative||_.mainstay.links.set(u,S),S._generate(m,_,w).schema},h.perspective=function(u,m){if("local"===u.type){for(const{schema:_,key:w}of m.schemas){if((_._flags.id||w)===u.path[0])return{perspective:_,path:u.path.slice(1)};if(_.$_terms.shared)for(const S of _.$_terms.shared)if(S._flags.id===u.path[0])return{perspective:S,path:u.path.slice(1)}}return{perspective:null,path:null}}return"root"===u.ancestor?{perspective:m.schemas[m.schemas.length-1].schema,path:u.path}:{perspective:m.schemas[u.ancestor]&&m.schemas[u.ancestor].schema,path:u.path}},h.assert=function(u,m,_,w,S,I){u||f(!1,`"${l.label(w._flags,S,I)}" contains link reference "${_.display}" ${m}`)}},3832:(E,d,x)=>{"use strict";const f=x(375),T=x(8068),g=x(8160),b={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};E.exports=T.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(l,h){let{schema:u,error:m}=h;if(!l.match(b.numberRx))return;l=l.trim();const _={value:parseFloat(l)};if(0===_.value&&(_.value=0),!u._flags.unsafe)if(l.match(/e/i)){if(b.extractSignificantDigits(l)!==b.extractSignificantDigits(String(_.value)))return _.errors=m("number.unsafe"),_}else{const w=_.value.toString();if(w.match(/e/i))return _;if(w!==b.normalizeDecimal(l))return _.errors=m("number.unsafe"),_}return _}},validate(l,h){let{schema:u,error:m,prefs:_}=h;if(l===1/0||l===-1/0)return{value:l,errors:m("number.infinity")};if(!g.isNumber(l))return{value:l,errors:m("number.base")};const w={value:l};if(_.convert){const S=u.$_getRule("precision");if(S){const I=Math.pow(10,S.args.limit);w.value=Math.round(w.value*I)/I}}return 0===w.value&&(w.value=0),!u._flags.unsafe&&(l>Number.MAX_SAFE_INTEGER||l"})}},integer:{method(){return this.$_addRule("integer")},validate:(l,h)=>Math.trunc(l)-l==0?l:h.error("number.integer")},less:{method(l){return this.$_addRule({name:"less",method:"compare",args:{limit:l},operator:"<"})}},max:{method(l){return this.$_addRule({name:"max",method:"compare",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"compare",args:{limit:l},operator:">="})}},multiple:{method(l){return this.$_addRule({name:"multiple",args:{base:l}})},validate(l,h,u,m){let{base:_}=u;return l*(1/_)%1==0?l:h.error("number.multiple",{multiple:m.args.base,value:l})},args:[{name:"base",ref:!0,assert:l=>"number"==typeof l&&isFinite(l)&&l>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(l,h)=>Number.isSafeInteger(l)&&l>=0&&l<=65535?l:h.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(l){return f(Number.isSafeInteger(l),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:l}})},validate(l,h,u){let{limit:m}=u;const _=l.toString().match(b.precisionRx);return Math.max((_[1]?_[1].length:0)-(_[2]?parseInt(_[2],10):0),0)<=m?l:h.error("number.precision",{limit:m,value:l})},convert:!0},sign:{method(l){return f(["negative","positive"].includes(l),"Invalid sign",l),this.$_addRule({name:"sign",args:{sign:l}})},validate(l,h,u){let{sign:m}=u;return"negative"===m&&l<0||"positive"===m&&l>0?l:h.error(`number.${m}`)}},unsafe:{method(){let l=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof l,"enabled must be a boolean"),this.$_setFlag("unsafe",l)}}},cast:{string:{from:l=>"number"==typeof l,to:(l,h)=>l.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),b.extractSignificantDigits=function(l){return l.replace(b.exponentialPartRegex,"").replace(b.dotRegex,"").replace(b.trailingZerosRegex,"").replace(b.leadingSignAndZerosRegex,"")},b.normalizeDecimal=function(l){return(l=l.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&l.endsWith("0")&&(l=l.replace(/0+$/,"")),"-0"===l?"0":l}},8966:(E,d,x)=>{"use strict";const f=x(7824);E.exports=f.extend({type:"object",cast:{map:{from:T=>T&&"object"==typeof T,to:(T,g)=>new Map(Object.entries(T))}}})},7417:(E,d,x)=>{"use strict";const f=x(375),T=x(5380),g=x(1745),b=x(9959),l=x(6064),h=x(9926),u=x(5752),m=x(8068),_=x(8160),w={tlds:h instanceof Set&&{tlds:{allow:h,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:b.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};E.exports=m.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(S,I){let{schema:P,state:L,prefs:V}=I;const W=P.$_getRule("normalize");W&&(S=S.normalize(W.args.form));const G=P.$_getRule("case");G&&(S="upper"===G.args.direction?S.toLocaleUpperCase():S.toLocaleLowerCase());const H=P.$_getRule("trim");if(H&&H.args.enabled&&(S=S.trim()),P.$_terms.replacements)for(const K of P.$_terms.replacements)S=S.replace(K.pattern,K.replacement);const j=P.$_getRule("hex");if(j&&j.args.options.byteAligned&&S.length%2!=0&&(S=`0${S}`),P.$_getRule("isoDate")){const K=w.isoDate(S);K&&(S=K)}if(P._flags.truncate){const K=P.$_getRule("max");if(K){let R=K.args.limit;if(_.isResolvable(R)&&(R=R.resolve(S,L,V),!_.limit(R)))return{value:S,errors:P.$_createError("any.ref",R,{ref:K.args.limit,arg:"limit",reason:"must be a positive integer"},L,V)};S=S.slice(0,R)}}return{value:S}}},validate(S,I){let{schema:P,error:L}=I;if("string"!=typeof S)return{value:S,errors:L("string.base")};if(""===S){const V=P.$_getRule("min");return V&&0===V.args.limit?void 0:{value:S,errors:L("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(S,I)=>/^[a-zA-Z0-9]+$/.test(S)?S:I.error("string.alphanum")},base64:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _.assertOptions(S,["paddingRequired","urlSafe"]),S={urlSafe:!1,paddingRequired:!0,...S},f("boolean"==typeof S.paddingRequired,"paddingRequired must be boolean"),f("boolean"==typeof S.urlSafe,"urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:S}})},validate(S,I,P){let{options:L}=P;return w.base64Regex[L.paddingRequired][L.urlSafe].test(S)?S:I.error("string.base64")}},case:{method(S){return f(["lower","upper"].includes(S),"Invalid case:",S),this.$_addRule({name:"case",args:{direction:S}})},validate(S,I,P){let{direction:L}=P;return"lower"===L&&S===S.toLocaleLowerCase()||"upper"===L&&S===S.toLocaleUpperCase()?S:I.error(`string.${L}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(S,I){let P=S.length,L=0,V=1;for(;P--;){const W=S.charAt(P)*V;L+=W-9*(W>9),V^=3}return L>0&&L%10==0?S:I.error("string.creditCard")}},dataUri:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _.assertOptions(S,["paddingRequired"]),S={paddingRequired:!0,...S},f("boolean"==typeof S.paddingRequired,"paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:S}})},validate(S,I,P){let{options:L}=P;const V=S.match(w.dataUriRegex);return!V||V[2]&&"base64"===V[2]&&!w.base64Regex[L.paddingRequired].false.test(V[3])?I.error("string.dataUri"):S}},domain:{method(S){S&&_.assertOptions(S,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const I=w.addressOptions(S);return this.$_addRule({name:"domain",args:{options:S},address:I})},validate(S,I,P,L){let{address:V}=L;return T.isValid(S,V)?S:I.error("string.domain")}},email:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),f(void 0===S.multiple||"boolean"==typeof S.multiple,"multiple option must be an boolean");const I=w.addressOptions(S),P=new RegExp(`\\s*[${S.separator?l(S.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:S},regex:P,address:I})},validate(S,I,P,L){let{options:V}=P,{regex:W,address:G}=L;const H=V.multiple?S.split(W):[S],j=[];for(const K of H)g.isValid(K,G)||j.push(K);return j.length?I.error("string.email",{value:S,invalids:j}):S}},guid:{alias:"uuid",method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["version","separator"]);let I="";if(S.version){const V=[].concat(S.version);f(V.length>=1,"version must have at least 1 valid version specified");const W=new Set;for(let G=0;G0&&void 0!==arguments[0]?arguments[0]:{};return _.assertOptions(S,["byteAligned"]),S={byteAligned:!1,...S},f("boolean"==typeof S.byteAligned,"byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:S}})},validate(S,I,P){let{options:L}=P;return w.hexRegex.test(S)?L.byteAligned&&S.length%2!=0?I.error("string.hexAlign"):S:I.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(S,I)=>T.isValid(S,{minDomainSegments:1})||w.ipRegex.test(S)?S:I.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["cidr","version"]);const{cidr:I,versions:P,regex:L}=b.regex(S);return this.$_addRule({name:"ip",args:{options:{cidr:I,version:S.version?P:void 0}},regex:L})},validate(S,I,P,L){let{options:V}=P,{regex:W}=L;return W.test(S)?S:V.version?I.error("string.ipVersion",{value:S,cidr:V.cidr,version:V.version}):I.error("string.ip",{value:S,cidr:V.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(S,I){let{error:P}=I;return w.isoDate(S)?S:P("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(S,I)=>w.isoDurationRegex.test(S)?S:I.error("string.isoDuration")},length:{method(S,I){return w.length(this,"length",S,"=",I)},validate(S,I,P,L){let{limit:V,encoding:W}=P,{name:G,operator:H,args:j}=L;return _.compare(!W&&S.length,V,H)?S:I.error("string."+G,{limit:j.limit,value:S,encoding:W})},args:[{name:"limit",ref:!0,assert:_.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(S,I){return w.length(this,"max",S,"<=",I)},args:["limit","encoding"]},min:{method(S,I){return w.length(this,"min",S,">=",I)},args:["limit","encoding"]},normalize:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"NFC";return f(w.normalizationForms.includes(S),"normalization form must be one of "+w.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:S}})},validate(S,I,P){let{error:L}=I,{form:V}=P;return S===S.normalize(V)?S:L("string.normalize",{value:S,form:V})},convert:!0},pattern:{alias:"regex",method(S){let I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(S instanceof RegExp,"regex must be a RegExp"),f(!S.flags.includes("g")&&!S.flags.includes("y"),"regex should not use global or sticky mode"),"string"==typeof I&&(I={name:I}),_.assertOptions(I,["invert","name"]);const P=["string.pattern",I.invert?".invert":"",I.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:S,options:I},errorCode:P})},validate(S,I,P,L){let{regex:V,options:W}=P,{errorCode:G}=L;return V.test(S)^W.invert?S:I.error(G,{name:W.name,regex:V,value:S})},args:["regex","options"],multi:!0},replace:{method(S,I){"string"==typeof S&&(S=new RegExp(l(S),"g")),f(S instanceof RegExp,"pattern must be a RegExp"),f("string"==typeof I,"replacement must be a String");const P=this.clone();return P.$_terms.replacements||(P.$_terms.replacements=[]),P.$_terms.replacements.push({pattern:S,replacement:I}),P}},token:{method(){return this.$_addRule("token")},validate:(S,I)=>/^\w+$/.test(S)?S:I.error("string.token")},trim:{method(){let S=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof S,"enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:S}})},validate(S,I,P){let{enabled:L}=P;return L&&S!==S.trim()?I.error("string.trim"):S},convert:!0},truncate:{method(){let S=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof S,"enabled must be a boolean"),this.$_setFlag("truncate",S)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),S.domain&&_.assertOptions(S.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:I,scheme:P}=u.regex(S),L=S.domain?w.addressOptions(S.domain):null;return this.$_addRule({name:"uri",args:{options:S},regex:I,domain:L,scheme:P})},validate(S,I,P,L){let{options:V}=P,{regex:W,domain:G,scheme:H}=L;if(["http:/","https:/"].includes(S))return I.error("string.uri");const j=W.exec(S);if(j){const K=j[1]||j[2];return!G||V.allowRelative&&!K||T.isValid(K,G)?S:I.error("string.domain",{value:K})}return V.relativeOnly?I.error("string.uriRelativeOnly"):V.scheme?I.error("string.uriCustomScheme",{scheme:H,value:S}):I.error("string.uri")}}},manifest:{build(S,I){if(I.replacements)for(const{pattern:P,replacement:L}of I.replacements)S=S.replace(P,L);return S}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),w.addressOptions=function(S){if(!S||(f(void 0===S.minDomainSegments||Number.isSafeInteger(S.minDomainSegments)&&S.minDomainSegments>0,"minDomainSegments must be a positive integer"),f(void 0===S.maxDomainSegments||Number.isSafeInteger(S.maxDomainSegments)&&S.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),!1===S.tlds))return S;if(!0===S.tlds||void 0===S.tlds)return f(w.tlds,"Built-in TLD list disabled"),Object.assign({},S,w.tlds);f("object"==typeof S.tlds,"tlds must be true, false, or an object");const I=S.tlds.deny;if(I)return Array.isArray(I)&&(S=Object.assign({},S,{tlds:{deny:new Set(I)}})),f(S.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),f(!S.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),w.validateTlds(S.tlds.deny,"tlds.deny"),S;const P=S.tlds.allow;return P?!0===P?(f(w.tlds,"Built-in TLD list disabled"),Object.assign({},S,w.tlds)):(Array.isArray(P)&&(S=Object.assign({},S,{tlds:{allow:new Set(P)}})),f(S.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),w.validateTlds(S.tlds.allow,"tlds.allow"),S):S},w.validateTlds=function(S,I){for(const P of S)f(T.isValid(P,{minDomainSegments:1,maxDomainSegments:1}),`${I} must contain valid top level domain names`)},w.isoDate=function(S){if(!_.isIsoDate(S))return null;/.*T.*[+-]\d\d$/.test(S)&&(S+="00");const I=new Date(S);return isNaN(I.getTime())?null:I.toISOString()},w.length=function(S,I,P,L,V){return f(!V||!1,"Invalid encoding:",V),S.$_addRule({name:I,method:"length",args:{limit:P,encoding:V},operator:L})}},8826:(E,d,x)=>{"use strict";const f=x(375),T=x(8068),g={};g.Map=class extends Map{slice(){return new g.Map(this)}},E.exports=T.extend({type:"symbol",terms:{map:{init:new g.Map}},coerce:{method(b,l){let{schema:h,error:u}=l;const m=h.$_terms.map.get(b);return m&&(b=m),h._flags.only&&"symbol"!=typeof b?{value:b,errors:u("symbol.map",{map:h.$_terms.map})}:{value:b}}},validate(b,l){let{error:h}=l;if("symbol"!=typeof b)return{value:b,errors:h("symbol.base")}},rules:{map:{method(b){b&&!b[Symbol.iterator]&&"object"==typeof b&&(b=Object.entries(b)),f(b&&b[Symbol.iterator],"Iterable must be an iterable or object");const l=this.clone(),h=[];for(const u of b){f(u&&u[Symbol.iterator],"Entry must be an iterable");const[m,_]=u;f("object"!=typeof m&&"function"!=typeof m&&"symbol"!=typeof m,"Key must not be of type object, function, or Symbol"),f("symbol"==typeof _,"Value must be a Symbol"),l.$_terms.map.set(m,_),h.push(_)}return l.valid(...h)}}},manifest:{build:(b,l)=>(l.map&&(b=b.map(l.map)),b)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(738),b=x(9621),l=x(8160),h=x(6354),u=x(493),m={result:Symbol("result")};d.entry=function(_,w,S){let I=l.defaults;S&&(f(void 0===S.warnings,"Cannot override warnings preference in synchronous validation"),f(void 0===S.artifacts,"Cannot override artifacts preference in synchronous validation"),I=l.preferences(l.defaults,S));const P=m.entry(_,w,I);f(!P.mainstay.externals.length,"Schema with external rules must use validateAsync()");const L={value:P.value};return P.error&&(L.error=P.error),P.mainstay.warnings.length&&(L.warning=h.details(P.mainstay.warnings)),P.mainstay.debug&&(L.debug=P.mainstay.debug),P.mainstay.artifacts&&(L.artifacts=P.mainstay.artifacts),L},d.entryAsync=function(){var _=ie(function*(w,S,I){let P=l.defaults;I&&(P=l.preferences(l.defaults,I));const L=m.entry(w,S,P),V=L.mainstay;if(L.error)throw V.debug&&(L.error.debug=V.debug),L.error;if(V.externals.length){let G=L.value;const H=[];for(const j of V.externals){const K=j.state.path,R="link"===j.schema.type?V.links.get(j.schema):null;let o,y,M=G;const v=K.length?[G]:[],k=K.length?b(w,K):w;if(K.length){o=K[K.length-1];let D=G;for(const N of K.slice(0,-1))D=D[N],v.unshift(D);y=v[0],M=y[o]}try{const D=(C,a)=>(R||j.schema).$_createError(C,M,a,j.state,P),N=yield j.method(M,{schema:j.schema,linked:R,state:j.state,prefs:I,original:k,error:D,errorsArray:m.errorsArray,warn:(C,a)=>V.warnings.push((R||j.schema).$_createError(C,M,a,j.state,P)),message:(C,a)=>(R||j.schema).$_createError("external",M,a,j.state,P,{messages:C})});if(void 0===N||N===M)continue;if(N instanceof h.Report){if(V.tracer.log(j.schema,j.state,"rule","external","error"),H.push(N),P.abortEarly)break;continue}if(Array.isArray(N)&&N[l.symbols.errors]){if(V.tracer.log(j.schema,j.state,"rule","external","error"),H.push(...N),P.abortEarly)break;continue}y?(V.tracer.value(j.state,"rule",M,N,"external"),y[o]=N):(V.tracer.value(j.state,"rule",G,N,"external"),G=N)}catch(D){throw P.errors.label&&(D.message+=` (${j.label})`),D}}if(L.value=G,H.length)throw L.error=h.process(H,w,P),V.debug&&(L.error.debug=V.debug),L.error}if(!P.warnings&&!P.debug&&!P.artifacts)return L.value;const W={value:L.value};return V.warnings.length&&(W.warning=h.details(V.warnings)),V.debug&&(W.debug=V.debug),V.artifacts&&(W.artifacts=V.artifacts),W});return function(w,S,I){return _.apply(this,arguments)}}(),m.Mainstay=class{constructor(_,w,S){this.externals=[],this.warnings=[],this.tracer=_,this.debug=w,this.links=S,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const _=this._snapshots.pop();this.externals=_.externals,this.warnings=_.warnings}},m.entry=function(_,w,S){const{tracer:I,cleanup:P}=m.tracer(w,S),L=S.debug?[]:null,V=w._ids._schemaChain?new Map:null,W=new m.Mainstay(I,L,V),H=new u([],[],{mainstay:W,schemas:w._ids._schemaChain?[{schema:w}]:null}),j=d.validate(_,w,H,S);P&&w.$_root.untrace();const K=h.process(j.errors,_,S);return{value:j.value,error:K,mainstay:W}},m.tracer=function(_,w){return _.$_root._tracer?{tracer:_.$_root._tracer._register(_)}:w.debug?(f(_.$_root.trace,"Debug mode not supported"),{tracer:_.$_root.trace()._register(_),cleanup:!0}):{tracer:m.ignore}},d.validate=function(_,w,S,I){let P=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(w.$_terms.whens&&(w=w._generate(_,S,I).schema),w._preferences&&(I=m.prefs(w,I)),w._cache&&I.cache){const K=w._cache.get(_);if(S.mainstay.tracer.debug(S,"validate","cached",!!K),K)return K}const L=(K,R,o)=>w.$_createError(K,_,R,o||S,I),V={original:_,prefs:I,schema:w,state:S,error:L,errorsArray:m.errorsArray,warn:(K,R,o)=>S.mainstay.warnings.push(L(K,R,o)),message:(K,R)=>w.$_createError("custom",_,R,S,I,{messages:K})};S.mainstay.tracer.entry(w,S);const W=w._definition;if(W.prepare&&void 0!==_&&I.convert){const K=W.prepare(_,V);if(K){if(S.mainstay.tracer.value(S,"prepare",_,K.value),K.errors)return m.finalize(K.value,[].concat(K.errors),V);_=K.value}}if(W.coerce&&void 0!==_&&I.convert&&(!W.coerce.from||W.coerce.from.includes(typeof _))){const K=W.coerce.method(_,V);if(K){if(S.mainstay.tracer.value(S,"coerced",_,K.value),K.errors)return m.finalize(K.value,[].concat(K.errors),V);_=K.value}}const G=w._flags.empty;G&&G.$_match(m.trim(_,w),S.nest(G),l.defaults)&&(S.mainstay.tracer.value(S,"empty",_,void 0),_=void 0);const H=P.presence||w._flags.presence||(w._flags._endedSwitch?null:I.presence);if(void 0===_){if("forbidden"===H)return m.finalize(_,null,V);if("required"===H)return m.finalize(_,[w.$_createError("any.required",_,null,S,I)],V);if("optional"===H){if(w._flags.default!==l.symbols.deepDefault)return m.finalize(_,null,V);S.mainstay.tracer.value(S,"default",_,{}),_={}}}else if("forbidden"===H)return m.finalize(_,[w.$_createError("any.unknown",_,null,S,I)],V);const j=[];if(w._valids){const K=w._valids.get(_,S,I,w._flags.insensitive);if(K)return I.convert&&(S.mainstay.tracer.value(S,"valids",_,K.value),_=K.value),S.mainstay.tracer.filter(w,S,"valid",K),m.finalize(_,null,V);if(w._flags.only){const R=w.$_createError("any.only",_,{valids:w._valids.values({display:!0})},S,I);if(I.abortEarly)return m.finalize(_,[R],V);j.push(R)}}if(w._invalids){const K=w._invalids.get(_,S,I,w._flags.insensitive);if(K){S.mainstay.tracer.filter(w,S,"invalid",K);const R=w.$_createError("any.invalid",_,{invalids:w._invalids.values({display:!0})},S,I);if(I.abortEarly)return m.finalize(_,[R],V);j.push(R)}}if(W.validate){const K=W.validate(_,V);if(K&&(S.mainstay.tracer.value(S,"base",_,K.value),_=K.value,K.errors)){if(!Array.isArray(K.errors))return j.push(K.errors),m.finalize(_,j,V);if(K.errors.length)return j.push(...K.errors),m.finalize(_,j,V)}}return w._rules.length?m.rules(_,j,V):m.finalize(_,j,V)},m.rules=function(_,w,S){const{schema:I,state:P,prefs:L}=S;for(const V of I._rules){const W=I._definition.rules[V.method];if(W.convert&&L.convert){P.mainstay.tracer.log(I,P,"rule",V.name,"full");continue}let G,H=V.args;if(V._resolve.length){H=Object.assign({},H);for(const K of V._resolve){const R=W.argsByName.get(K),o=H[K].resolve(_,P,L),y=R.normalize?R.normalize(o):o,M=l.validateArg(y,null,R);if(M){G=I.$_createError("any.ref",o,{arg:K,ref:H[K],reason:M},P,L);break}H[K]=y}}G=G||W.validate(_,S,H,V);const j=m.rule(G,V);if(j.errors){if(P.mainstay.tracer.log(I,P,"rule",V.name,"error"),V.warn){P.mainstay.warnings.push(...j.errors);continue}if(L.abortEarly)return m.finalize(_,j.errors,S);w.push(...j.errors)}else P.mainstay.tracer.log(I,P,"rule",V.name,"pass"),P.mainstay.tracer.value(P,"rule",_,j.value,V.name),_=j.value}return m.finalize(_,w,S)},m.rule=function(_,w){return _ instanceof h.Report?(m.error(_,w),{errors:[_],value:null}):Array.isArray(_)&&_[l.symbols.errors]?(_.forEach(S=>m.error(S,w)),{errors:_,value:null}):{errors:null,value:_}},m.error=function(_,w){return w.message&&_._setTemplate(w.message),_},m.finalize=function(_,w,S){w=w||[];const{schema:I,state:P,prefs:L}=S;if(w.length){const W=m.default("failover",void 0,w,S);void 0!==W&&(P.mainstay.tracer.value(P,"failover",_,W),_=W,w=[])}if(w.length&&I._flags.error)if("function"==typeof I._flags.error){w=I._flags.error(w),Array.isArray(w)||(w=[w]);for(const W of w)f(W instanceof Error||W instanceof h.Report,"error() must return an Error object")}else w=[I._flags.error];if(void 0===_){const W=m.default("default",_,w,S);P.mainstay.tracer.value(P,"default",_,W),_=W}if(I._flags.cast&&void 0!==_){const W=I._definition.cast[I._flags.cast];if(W.from(_)){const G=W.to(_,S);P.mainstay.tracer.value(P,"cast",_,G,I._flags.cast),_=G}}if(I.$_terms.externals&&L.externals&&!1!==L._externals)for(const{method:W}of I.$_terms.externals)P.mainstay.externals.push({method:W,schema:I,state:P,label:h.label(I._flags,P,L)});const V={value:_,errors:w.length?w:null};return I._flags.result&&(V.value="strip"===I._flags.result?void 0:S.original,P.mainstay.tracer.value(P,I._flags.result,_,V.value),P.shadow(_,I._flags.result)),I._cache&&!1!==L.cache&&!I._refs.length&&I._cache.set(S.original,V),void 0===_||V.errors||void 0===I._flags.artifact||(P.mainstay.artifacts=P.mainstay.artifacts||new Map,P.mainstay.artifacts.has(I._flags.artifact)||P.mainstay.artifacts.set(I._flags.artifact,[]),P.mainstay.artifacts.get(I._flags.artifact).push(P.path)),V},m.prefs=function(_,w){const S=w===l.defaults;return S&&_._preferences[l.symbols.prefs]?_._preferences[l.symbols.prefs]:(w=l.preferences(w,_._preferences),S&&(_._preferences[l.symbols.prefs]=w),w)},m.default=function(_,w,S,I){const{schema:P,state:L,prefs:V}=I,W=P._flags[_];if(V.noDefaults||void 0===W)return w;if(L.mainstay.tracer.log(P,L,"rule",_,"full"),!W)return W;if("function"==typeof W){const G=W.length?[T(L.ancestors[0]),I]:[];try{return W(...G)}catch(H){return void S.push(P.$_createError(`any.${_}`,null,{error:H},L,V))}}return"object"!=typeof W?W:W[l.symbols.literal]?W.literal:l.isResolvable(W)?W.resolve(w,L,V):T(W)},m.trim=function(_,w){if("string"!=typeof _)return _;const S=w.$_getRule("trim");return S&&S.args.enabled?_.trim():_},m.ignore={active:!1,debug:g,entry:g,filter:g,log:g,resolve:g,value:g},m.errorsArray=function(){const _=[];return _[l.symbols.errors]=!0,_}},2036:(E,d,x)=>{"use strict";const f=x(375),T=x(9474),g=x(8160),b={};E.exports=b.Values=class{constructor(l,h){this._values=new Set(l),this._refs=new Set(h),this._lowercase=b.lowercases(l),this._override=!1}get length(){return this._values.size+this._refs.size}add(l,h){g.isResolvable(l)?this._refs.has(l)||(this._refs.add(l),h&&h.register(l)):this.has(l,null,null,!1)||(this._values.add(l),"string"==typeof l&&this._lowercase.set(l.toLowerCase(),l))}static merge(l,h,u){if(l=l||new b.Values,h){if(h._override)return h.clone();for(const m of[...h._values,...h._refs])l.add(m)}if(u)for(const m of[...u._values,...u._refs])l.remove(m);return l.length?l:null}remove(l){g.isResolvable(l)?this._refs.delete(l):(this._values.delete(l),"string"==typeof l&&this._lowercase.delete(l.toLowerCase()))}has(l,h,u,m){return!!this.get(l,h,u,m)}get(l,h,u,m){if(!this.length)return!1;if(this._values.has(l))return{value:l};if("string"==typeof l&&l&&m){const _=this._lowercase.get(l.toLowerCase());if(_)return{value:_}}if(!this._refs.size&&"object"!=typeof l)return!1;if("object"==typeof l)for(const _ of this._values)if(T(_,l))return{value:_};if(h)for(const _ of this._refs){const w=_.resolve(l,h,u,null,{in:!0});if(void 0===w)continue;const S=_.in&&"object"==typeof w?Array.isArray(w)?w:Object.keys(w):[w];for(const I of S)if(typeof I==typeof l)if(m&&l&&"string"==typeof l){if(I.toLowerCase()===l.toLowerCase())return{value:I,ref:_}}else if(T(I,l))return{value:I,ref:_}}return!1}override(){this._override=!0}values(l){if(l&&l.display){const h=[];for(const u of[...this._values,...this._refs])void 0!==u&&h.push(u);return h}return Array.from([...this._values,...this._refs])}clone(){const l=new b.Values(this._values,this._refs);return l._override=this._override,l}concat(l){f(!l._override,"Cannot concat override set of values");const h=new b.Values([...this._values,...l._values],[...this._refs,...l._refs]);return h._override=this._override,h}describe(){const l=[];this._override&&l.push({override:!0});for(const h of this._values.values())l.push(h&&"object"==typeof h?{value:h}:h);for(const h of this._refs.values())l.push(h.describe());return l}},b.Values.prototype[g.symbols.values]=!0,b.Values.prototype.slice=b.Values.prototype.clone,b.lowercases=function(l){const h=new Map;if(l)for(const u of l)"string"==typeof u&&h.set(u.toLowerCase(),u);return h}},978:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(1687),b=x(9621),l={};E.exports=function(h,u){let m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(f(h&&"object"==typeof h,"Invalid defaults value: must be an object"),f(!u||!0===u||"object"==typeof u,"Invalid source value: must be true, falsy or an object"),f("object"==typeof m,"Invalid options: must be an object"),!u)return null;if(m.shallow)return l.applyToDefaultsWithShallow(h,u,m);const _=T(h);if(!0===u)return _;const w=void 0!==m.nullOverride&&m.nullOverride;return g(_,u,{nullOverride:w,mergeArrays:!1})},l.applyToDefaultsWithShallow=function(h,u,m){const _=m.shallow;f(Array.isArray(_),"Invalid keys");const w=new Map,S=!0===u?null:new Set;for(let L of _){L=Array.isArray(L)?L:L.split(".");const V=b(h,L);V&&"object"==typeof V?w.set(V,S&&b(u,L)||V):S&&S.add(L)}const I=T(h,{},w);if(!S)return I;for(const L of S)l.reachCopy(I,u,L);return g(I,u,{nullOverride:void 0!==m.nullOverride&&m.nullOverride,mergeArrays:!1})},l.reachCopy=function(h,u,m){for(const S of m){if(!(S in u))return;const I=u[S];if("object"!=typeof I||null===I)return;u=I}const _=u;let w=h;for(let S=0;S{"use strict";const f=x(7916);E.exports=function(T){if(!T){for(var g=arguments.length,b=new Array(g>1?g-1:0),l=1;l{"use strict";const f=x(9621),T=x(4277),g=x(7043),b={needsProtoHack:new Set([T.set,T.map,T.weakSet,T.weakMap])};E.exports=b.clone=function(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("object"!=typeof l||null===l)return l;let m=b.clone,_=u;if(h.shallow){if(!0!==h.shallow)return b.cloneWithShallow(l,h);m=P=>P}else if(_){const P=_.get(l);if(P)return P}else _=new Map;const w=T.getInternalProto(l);if(w===T.buffer)return!1;if(w===T.date)return new Date(l.getTime());if(w===T.regex)return new RegExp(l);const S=b.base(l,w,h);if(S===l)return l;if(_&&_.set(l,S),w===T.set)for(const P of l)S.add(m(P,h,_));else if(w===T.map)for(const[P,L]of l)S.set(P,m(L,h,_));const I=g.keys(l,h);for(const P of I){if("__proto__"===P)continue;if(w===T.array&&"length"===P){S.length=l.length;continue}const L=Object.getOwnPropertyDescriptor(l,P);L?L.get||L.set?Object.defineProperty(S,P,L):L.enumerable?S[P]=m(l[P],h,_):Object.defineProperty(S,P,{enumerable:!1,writable:!0,configurable:!0,value:m(l[P],h,_)}):Object.defineProperty(S,P,{enumerable:!0,writable:!0,configurable:!0,value:m(l[P],h,_)})}return S},b.cloneWithShallow=function(l,h){const u=h.shallow;(h=Object.assign({},h)).shallow=!1;const m=new Map;for(const _ of u){const w=f(l,_);"object"!=typeof w&&"function"!=typeof w||m.set(w,w)}return b.clone(l,h,m)},b.base=function(l,h,u){if(!1===u.prototype)return b.needsProtoHack.has(h)?new h.constructor:h===T.array?[]:{};const m=Object.getPrototypeOf(l);if(m&&m.isImmutable)return l;if(h===T.array){const _=[];return m!==h&&Object.setPrototypeOf(_,m),_}if(b.needsProtoHack.has(h)){const _=new m.constructor;return m!==h&&Object.setPrototypeOf(_,m),_}return Object.create(m)}},9474:(E,d,x)=>{"use strict";const f=x(4277),T={mismatched:null};E.exports=function(g,b,l){return l=Object.assign({prototype:!0},l),!!T.isDeepEqual(g,b,l,[])},T.isDeepEqual=function(g,b,l,h){if(g===b)return 0!==g||1/g==1/b;const u=typeof g;if(u!==typeof b||null===g||null===b)return!1;if("function"===u){if(!l.deepFunction||g.toString()!==b.toString())return!1}else if("object"!==u)return g!=g&&b!=b;const m=T.getSharedType(g,b,!!l.prototype);switch(m){case f.buffer:return!1;case f.promise:return g===b;case f.regex:return g.toString()===b.toString();case T.mismatched:return!1}for(let _=h.length-1;_>=0;--_)if(h[_].isSame(g,b))return!0;h.push(new T.SeenEntry(g,b));try{return!!T.isDeepEqualObj(m,g,b,l,h)}finally{h.pop()}},T.getSharedType=function(g,b,l){if(l)return Object.getPrototypeOf(g)!==Object.getPrototypeOf(b)?T.mismatched:f.getInternalProto(g);const h=f.getInternalProto(g);return h!==f.getInternalProto(b)?T.mismatched:h},T.valueOf=function(g){const b=g.valueOf;if(void 0===b)return g;try{return b.call(g)}catch(l){return l}},T.hasOwnEnumerableProperty=function(g,b){return Object.prototype.propertyIsEnumerable.call(g,b)},T.isSetSimpleEqual=function(g,b){for(const l of Set.prototype.values.call(g))if(!Set.prototype.has.call(b,l))return!1;return!0},T.isDeepEqualObj=function(g,b,l,h,u){const{isDeepEqual:m,valueOf:_,hasOwnEnumerableProperty:w}=T,{keys:S,getOwnPropertySymbols:I}=Object;if(g===f.array){if(!h.part){if(b.length!==l.length)return!1;for(let G=0;G{"use strict";const f=x(8761);E.exports=class extends Error{constructor(T){super(T.filter(g=>""!==g).map(g=>"string"==typeof g?g:g instanceof Error?g.message:f(g)).join(" ")||"Unknown error"),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,d.assert)}}},5277:E=>{"use strict";const d={};E.exports=function(x){if(!x)return"";let f="";for(let T=0;T=256?"&#"+x+";":`&#x${x.toString(16).padStart(2,"0")};`)},d.isSafe=function(x){return d.safeCharCodes.has(x)},d.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),d.safeCharCodes=function(){const x=new Set;for(let f=32;f<123;++f)(f>=97||f>=65&&f<=90||f>=48&&f<=57||32===f||46===f||44===f||45===f||58===f||95===f)&&x.add(f);return x}()},6064:E=>{"use strict";E.exports=function(d){return d.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:E=>{"use strict";E.exports=function(){}},1687:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(7043),b={};E.exports=b.merge=function(l,h,u){if(f(l&&"object"==typeof l,"Invalid target value: must be an object"),f(null==h||"object"==typeof h,"Invalid source value: must be null, undefined, or an object"),!h)return l;if(u=Object.assign({nullOverride:!0,mergeArrays:!0},u),Array.isArray(h)){f(Array.isArray(l),"Cannot merge array onto an object"),u.mergeArrays||(l.length=0);for(let _=0;_{"use strict";const f=x(375),T={};E.exports=function(g,b,l){if(!1===b||null==b)return g;"string"==typeof(l=l||{})&&(l={separator:l});const h=Array.isArray(b);f(!h||!l.separator,"Separator option is not valid for array-based chain");const u=h?b:b.split(l.separator||".");let m=g;for(let _=0;_{"use strict";E.exports=function(){try{return JSON.stringify(...arguments)}catch(d){return"[Cannot display object: "+d.message+"]"}}},4277:(E,d)=>{"use strict";const x={};d=E.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},x.typeMap=new Map([["[object Error]",d.error],["[object Map]",d.map],["[object Promise]",d.promise],["[object Set]",d.set],["[object WeakMap]",d.weakMap],["[object WeakSet]",d.weakSet]]),d.getInternalProto=function(f){if(Array.isArray(f))return d.array;if(f instanceof Date)return d.date;if(f instanceof RegExp)return d.regex;if(f instanceof Error)return d.error;const T=Object.prototype.toString.call(f);return x.typeMap.get(T)||d.generic}},7043:(E,d)=>{"use strict";d.keys=function(x){return!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).symbols?Reflect.ownKeys(x):Object.getOwnPropertyNames(x)}},3652:(E,d,x)=>{"use strict";const f=x(375),T={};d.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(g,b){const l=[].concat((b=b||{}).before||[]),h=[].concat(b.after||[]),u=b.group||"?",m=b.sort||0;f(!l.includes(u),`Item cannot come before itself: ${u}`),f(!l.includes("?"),"Item cannot come before unassociated items"),f(!h.includes(u),`Item cannot come after itself: ${u}`),f(!h.includes("?"),"Item cannot come after unassociated items"),Array.isArray(g)||(g=[g]);for(const _ of g)this._items.push({seq:this._items.length,sort:m,before:l,after:h,group:u,node:_});if(!b.manual){const _=this._sort();f(_,"item","?"!==u?`added into group ${u}`:"","created a dependencies error")}return this.nodes}merge(g){Array.isArray(g)||(g=[g]);for(const l of g)if(l)for(const h of l._items)this._items.push(Object.assign({},h));this._items.sort(T.mergeSort);for(let l=0;lg.sort===b.sort?0:g.sort{"use strict";const f=x(443),T=x(2178),g={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:f.URL||URL};d.analyze=function(b){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!b)return T.code("DOMAIN_NON_EMPTY_STRING");if("string"!=typeof b)throw new Error("Invalid input: domain must be a string");if(b.length>256)return T.code("DOMAIN_TOO_LONG");if(g.nonAsciiRx.test(b)){if(!1===l.allowUnicode)return T.code("DOMAIN_INVALID_UNICODE_CHARS");b=b.normalize("NFC")}if(g.domainControlRx.test(b))return T.code("DOMAIN_INVALID_CHARS");b=g.punycode(b),l.allowFullyQualified&&"."===b[b.length-1]&&(b=b.slice(0,-1));const h=l.minDomainSegments||g.minDomainSegments,u=b.split(".");if(u.lengthl.maxDomainSegments)return T.code("DOMAIN_SEGMENTS_COUNT_MAX");const m=l.tlds;if(m){const _=u[u.length-1].toLowerCase();if(m.deny&&m.deny.has(_)||m.allow&&!m.allow.has(_))return T.code("DOMAIN_FORBIDDEN_TLDS")}for(let _=0;_63)return T.code("DOMAIN_LONG_SEGMENT");if(_{"use strict";const f=x(9848),T=x(5380),g=x(2178),b={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(f.TextEncoder||TextEncoder)};d.analyze=function(l,h){return b.email(l,h)},d.isValid=function(l,h){return!b.email(l,h)},b.email=function(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof l)throw new Error("Invalid input: email must be a string");if(!l)return g.code("EMPTY_STRING");const u=!b.nonAsciiRx.test(l);if(!u){if(!1===h.allowUnicode)return g.code("FORBIDDEN_UNICODE");l=l.normalize("NFC")}const m=l.split("@");if(2!==m.length)return g.code(m.length>2?"MULTIPLE_AT_CHAR":"MISSING_AT_CHAR");const[_,w]=m;if(!_)return g.code("EMPTY_LOCAL");if(!h.ignoreLength){if(l.length>254)return g.code("ADDRESS_TOO_LONG");if(b.encoder.encode(_).length>64)return g.code("LOCAL_TOO_LONG")}return b.local(_,u)||T.analyze(w,h)},b.local=function(l,h){const u=l.split(".");for(const m of u){if(!m.length)return g.code("EMPTY_LOCAL_SEGMENT");if(h){if(!b.atextRx.test(m))return g.code("INVALID_LOCAL_CHARS")}else for(const _ of m){if(b.atextRx.test(_))continue;const w=b.binary(_);if(!b.atomRx.test(w))return g.code("INVALID_LOCAL_CHARS")}}},b.binary=function(l){return Array.from(b.encoder.encode(l)).map(h=>String.fromCharCode(h)).join("")},b.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,b.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(E,d)=>{"use strict";d.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},d.code=function(x){return{code:x,error:d.codes[x]}}},9959:(E,d,x)=>{"use strict";const f=x(375),T=x(5752);d.regex=function(){let g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(void 0===g.cidr||"string"==typeof g.cidr,"options.cidr must be a string");const b=g.cidr?g.cidr.toLowerCase():"optional";f(["required","optional","forbidden"].includes(b),"options.cidr must be one of required, optional, forbidden"),f(void 0===g.version||"string"==typeof g.version||Array.isArray(g.version),"options.version must be a string or an array of string");let l=g.version||["ipv4","ipv6","ipvfuture"];Array.isArray(l)||(l=[l]),f(l.length>=1,"options.version must have at least 1 version specified");for(let m=0;m{if("forbidden"===b)return T.ip[m];const _=`\\/${"ipv4"===m?T.ip.v4Cidr:T.ip.v6Cidr}`;return"required"===b?`${T.ip[m]}${_}`:`${T.ip[m]}(?:${_})?`}).join("|")})`,u=new RegExp(`^${h}$`);return{cidr:b,versions:l,regex:u,raw:h}}},5752:(E,d,x)=>{"use strict";const f=x(375),T=x(6064),g={generate:function(){const b={},l="\\dA-Fa-f",h="["+l+"]",u="\\w-\\.~",m="!\\$&'\\(\\)\\*\\+,;=",_="%"+l,w=u+_+m+":@",S="["+w+"]",I="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";b.ipv4address="(?:"+I+"\\.){3}"+I;const P=h+"{1,4}",L="(?:"+P+":"+P+"|"+b.ipv4address+")",V="(?:"+P+":){6}"+L,W="::(?:"+P+":){5}"+L,G="(?:"+P+")?::(?:"+P+":){4}"+L,H="(?:(?:"+P+":){0,1}"+P+")?::(?:"+P+":){3}"+L,j="(?:(?:"+P+":){0,2}"+P+")?::(?:"+P+":){2}"+L,K="(?:(?:"+P+":){0,3}"+P+")?::"+P+":"+L,R="(?:(?:"+P+":){0,4}"+P+")?::"+L;b.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",b.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",b.ipv6address="(?:"+V+"|"+W+"|"+G+"|"+H+"|"+j+"|"+K+"|"+R+"|(?:(?:[\\dA-Fa-f]{1,4}:){0,5}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}|(?:(?:[\\dA-Fa-f]{1,4}:){0,6}[\\dA-Fa-f]{1,4})?::)",b.ipvFuture="v"+h+"+\\.["+u+m+":]+",b.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",b.schemeRegex=new RegExp(b.scheme);const M="["+u+_+m+":]*",k="(?:\\[(?:"+b.ipv6address+"|"+b.ipvFuture+")\\]|"+b.ipv4address+"|[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=]{1,255})",D="(?:"+M+"@)?"+k+"(?::\\d*)?",N="(?:"+M+"@)?("+k+")(?::\\d*)?",a=S+"+",B="(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*",Q="\\/(?:"+a+B+")?",ee=a+B,ce="["+u+_+m+"@]+"+B;return b.hierPart="(?:(?:\\/\\/"+D+B+")|"+Q+"|"+ee+"|(?:\\/\\/\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*))",b.hierPartCapture="(?:(?:\\/\\/"+N+B+")|"+Q+"|"+ee+")",b.relativeRef="(?:(?:\\/\\/"+D+B+")|"+Q+"|"+ce+"|)",b.relativeRefCapture="(?:(?:\\/\\/"+N+B+")|"+Q+"|"+ce+"|)",b.query="["+w+"\\/\\?]*(?=#|$)",b.queryWithSquareBrackets="["+w+"\\[\\]\\/\\?]*(?=#|$)",b.fragment="["+w+"\\/\\?]*",b}};g.rfc3986=g.generate(),d.ip={v4Cidr:g.rfc3986.ipv4Cidr,v6Cidr:g.rfc3986.ipv6Cidr,ipv4:g.rfc3986.ipv4address,ipv6:g.rfc3986.ipv6address,ipvfuture:g.rfc3986.ipvFuture},g.createRegex=function(b){const l=g.rfc3986,h="(?:\\?"+(b.allowQuerySquareBrackets?l.queryWithSquareBrackets:l.query)+")?(?:#"+l.fragment+")?",u=b.domain?l.relativeRefCapture:l.relativeRef;if(b.relativeOnly)return g.wrap(u+h);let m="";if(b.scheme){f(b.scheme instanceof RegExp||"string"==typeof b.scheme||Array.isArray(b.scheme),"scheme must be a RegExp, String, or Array");const S=[].concat(b.scheme);f(S.length>=1,"scheme must have at least 1 scheme specified");const I=[];for(let P=0;P0&&void 0!==arguments[0]?arguments[0]:{};return b.scheme||b.allowRelative||b.relativeOnly||b.allowQuerySquareBrackets||b.domain?g.createRegex(b):g.uriRegex}},1447:(E,d)=>{"use strict";const x={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};d.Parser=class{constructor(f){let T=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!T[x.settings]&&T.constants)for(const g in T.constants){const b=T.constants[g];if(null!==b&&!["boolean","number","string"].includes(typeof b))throw new Error(`Formula constant ${g} contains invalid ${typeof b} value type`)}this.settings=T[x.settings]?T:Object.assign({[x.settings]:!0,constants:{},functions:{}},T),this.single=null,this._parts=null,this._parse(f)}_parse(f){let T=[],g="",b=0,l=!1;const h=m=>{if(b)throw new Error("Formula missing closing parenthesis");const _=T.length?T[T.length-1]:null;if(l||g||m){if(_&&"reference"===_.type&&")"===m)return _.type="function",_.value=this._subFormula(g,_.value),void(g="");if(")"===m){const w=new d.Parser(g,this.settings);T.push({type:"segment",value:w})}else if(l){if("]"===l)return T.push({type:"reference",value:g}),void(g="");T.push({type:"literal",value:g})}else if(x.operatorCharacters.includes(g))_&&"operator"===_.type&&x.operators.includes(_.value+g)?_.value+=g:T.push({type:"operator",value:g});else if(g.match(x.numberRx))T.push({type:"constant",value:parseFloat(g)});else if(void 0!==this.settings.constants[g])T.push({type:"constant",value:this.settings.constants[g]});else{if(!g.match(x.tokenRx))throw new Error(`Formula contains invalid token: ${g}`);T.push({type:"reference",value:g})}g=""}};for(const m of f)l?m===l?(h(),l=!1):g+=m:b?"("===m?(g+=m,++b):")"===m?(--b,b?g+=m:h(m)):g+=m:m in x.literals?l=x.literals[m]:"("===m?(h(),++b):x.operatorCharacters.includes(m)?(h(),g=m,h()):" "!==m?g+=m:h();h(),T=T.map((m,_)=>"operator"!==m.type||"-"!==m.value||_&&"operator"!==T[_-1].type?m:{type:"operator",value:"n"});let u=!1;for(const m of T){if("operator"===m.type){if(x.operatorsPrefix.includes(m.value))continue;if(!u)throw new Error("Formula contains an operator in invalid position");if(!x.operators.includes(m.value))throw new Error(`Formula contains an unknown operator ${m.value}`)}else if(u)throw new Error("Formula missing expected operator");u=!u}if(!u)throw new Error("Formula contains invalid trailing operator");1===T.length&&["reference","literal","constant"].includes(T[0].type)&&(this.single={type:"reference"===T[0].type?"reference":"value",value:T[0].value}),this._parts=T.map(m=>{if("operator"===m.type)return x.operatorsPrefix.includes(m.value)?m:m.value;if("reference"!==m.type)return m.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(m.value))throw new Error(`Formula contains invalid reference ${m.value}`);return this.settings.reference?this.settings.reference(m.value):x.reference(m.value)})}_subFormula(f,T){const g=this.settings.functions[T];if("function"!=typeof g)throw new Error(`Formula contains unknown function ${T}`);let b=[];if(f){let l="",h=0,u=!1;const m=()=>{if(!l)throw new Error(`Formula contains function ${T} with invalid arguments ${f}`);b.push(l),l=""};for(let _=0;_new d.Parser(l,this.settings)),function(l){const h=[];for(const u of b)h.push(u.evaluate(l));return g.call(l,...h)}}evaluate(f){const T=this._parts.slice();for(let g=T.length-2;g>=0;--g){const b=T[g];if(b&&"operator"===b.type){const l=T[g+1];T.splice(g+1,1);const h=x.evaluate(l,f);T[g]=x.single(b.value,h)}}return x.operatorsOrder.forEach(g=>{for(let b=1;b":return T>g;case">=":return T>=g;case"==":return T===g;case"!=":return T!==g;case"&&":return T&&g;case"||":return T||g}return null},x.exists=function(f){return null!=f}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:E=>{"use strict";E.exports={version:"17.9.1"}}},O={},function E(d){var x=O[d];if(void 0!==x)return x.exports;var f=O[d]={exports:{}};return z[d](f,f.exports,E),f.exports}(5107);var z,O})()},37109:(bt,be,Y)=>{var ie;!function(){"use strict";var z="input is invalid type",E="object"==typeof window,d=E?window:{};d.JS_SHA3_NO_WINDOW&&(E=!1);var x=!E&&"object"==typeof self;!d.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?d=global:x&&(d=self);var T=!d.JS_SHA3_NO_COMMON_JS&&bt.exports,g=Y.amdO,b=!d.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),u=[4,1024,262144,67108864],w=[0,8,16,24],S=[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],I=[224,256,384,512],P=[128,256],L=["hex","buffer","arrayBuffer","array","digest"],V={128:168,256:136};(d.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ae){return"[object Array]"===Object.prototype.toString.call(ae)}),b&&(d.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ae){return"object"==typeof ae&&ae.buffer&&ae.buffer.constructor===ArrayBuffer});for(var W=function(ae,Te,le){return function(X){return new ce(ae,Te,ae).update(X)[le]()}},G=function(ae,Te,le){return function(X,ne){return new ce(ae,Te,ne).update(X)[le]()}},H=function(ae,Te,le){return function(X,ne,pe,_e){return k["cshake"+ae].update(X,ne,pe,_e)[le]()}},j=function(ae,Te,le){return function(X,ne,pe,_e){return k["kmac"+ae].update(X,ne,pe,_e)[le]()}},K=function(ae,Te,le,X){for(var ne=0;ne>5,this.byteCount=this.blockCount<<2,this.outputBlocks=le>>5,this.extraBytes=(31&le)>>3;for(var X=0;X<50;++X)this.s[X]=0}function ue(ae,Te,le){ce.call(this,ae,Te,le)}ce.prototype.update=function(ae){if(this.finalized)throw new Error("finalize already called");var Te,le=typeof ae;if("string"!==le){if("object"!==le)throw new Error(z);if(null===ae)throw new Error(z);if(b&&ae.constructor===ArrayBuffer)ae=new Uint8Array(ae);else if(!(Array.isArray(ae)||b&&ArrayBuffer.isView(ae)))throw new Error(z);Te=!0}for(var ke,me,X=this.blocks,ne=this.byteCount,pe=ae.length,_e=this.blockCount,xe=0,Ce=this.s;xe>2]|=ae[xe]<>2]|=me<>2]|=(192|me>>6)<>2]|=(128|63&me)<=57344?(X[ke>>2]|=(224|me>>12)<>2]|=(128|me>>6&63)<>2]|=(128|63&me)<>2]|=(240|me>>18)<>2]|=(128|me>>12&63)<>2]|=(128|me>>6&63)<>2]|=(128|63&me)<=ne){for(this.start=ke-ne,this.block=X[_e],ke=0;ke<_e;++ke)Ce[ke]^=X[ke];we(Ce),this.reset=!0}else this.start=ke}return this},ce.prototype.encode=function(ae,Te){var le=255&ae,X=1,ne=[le];for(le=255&(ae>>=8);le>0;)ne.unshift(le),le=255&(ae>>=8),++X;return Te?ne.push(X):ne.unshift(X),this.update(ne),ne.length},ce.prototype.encodeString=function(ae){var Te,le=typeof ae;if("string"!==le){if("object"!==le)throw new Error(z);if(null===ae)throw new Error(z);if(b&&ae.constructor===ArrayBuffer)ae=new Uint8Array(ae);else if(!(Array.isArray(ae)||b&&ArrayBuffer.isView(ae)))throw new Error(z);Te=!0}var X=0;if(Te)X=ae.length;else for(var pe=0;pe=57344?X+=3:(_e=65536+((1023&_e)<<10|1023&ae.charCodeAt(++pe)),X+=4)}return X+=this.encode(8*X),this.update(ae),X},ce.prototype.bytepad=function(ae,Te){for(var le=this.encode(Te),X=0;X>2]|=this.padding[3&Te],this.lastByteIndex===this.byteCount)for(ae[0]=ae[le],Te=1;Te>4&15]+l[15&xe]+l[xe>>12&15]+l[xe>>8&15]+l[xe>>20&15]+l[xe>>16&15]+l[xe>>28&15]+l[xe>>24&15];pe%ae==0&&(we(Te),ne=0)}return X&&(_e+=l[(xe=Te[ne])>>4&15]+l[15&xe],X>1&&(_e+=l[xe>>12&15]+l[xe>>8&15]),X>2&&(_e+=l[xe>>20&15]+l[xe>>16&15])),_e},ce.prototype.buffer=ce.prototype.arrayBuffer=function(){this.finalize();var xe,ae=this.blockCount,Te=this.s,le=this.outputBlocks,X=this.extraBytes,ne=0,pe=0,_e=this.outputBits>>3;xe=X?new ArrayBuffer(le+1<<2):new ArrayBuffer(_e);for(var Ce=new Uint32Array(xe);pe>8&255,_e[xe+2]=Ce>>16&255,_e[xe+3]=Ce>>24&255;pe%ae==0&&we(Te)}return X&&(_e[xe=pe<<2]=255&(Ce=Te[ne]),X>1&&(_e[xe+1]=Ce>>8&255),X>2&&(_e[xe+2]=Ce>>16&255)),_e},(ue.prototype=new ce).finalize=function(){return this.encode(this.outputBits,!0),ce.prototype.finalize.call(this)};var we=function(ae){var Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Yr,Ln,Bn,$r,Gn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn,Qn,Vi,ar,br,ki,ur,mr,Fr,hi,wi,cs,$i,rs,Xi,$s,is;for(X=0;X<48;X+=2)ne=ae[0]^ae[10]^ae[20]^ae[30]^ae[40],pe=ae[1]^ae[11]^ae[21]^ae[31]^ae[41],Ce=ae[4]^ae[14]^ae[24]^ae[34]^ae[44],ke=ae[5]^ae[15]^ae[25]^ae[35]^ae[45],me=ae[6]^ae[16]^ae[26]^ae[36]^ae[46],Ee=ae[7]^ae[17]^ae[27]^ae[37]^ae[47],le=(Ve=ae[9]^ae[19]^ae[29]^ae[39]^ae[49])^((xe=ae[3]^ae[13]^ae[23]^ae[33]^ae[43])<<1|(_e=ae[2]^ae[12]^ae[22]^ae[32]^ae[42])>>>31),ae[0]^=Te=(ze=ae[8]^ae[18]^ae[28]^ae[38]^ae[48])^(_e<<1|xe>>>31),ae[1]^=le,ae[10]^=Te,ae[11]^=le,ae[20]^=Te,ae[21]^=le,ae[30]^=Te,ae[31]^=le,ae[40]^=Te,ae[41]^=le,le=pe^(ke<<1|Ce>>>31),ae[2]^=Te=ne^(Ce<<1|ke>>>31),ae[3]^=le,ae[12]^=Te,ae[13]^=le,ae[22]^=Te,ae[23]^=le,ae[32]^=Te,ae[33]^=le,ae[42]^=Te,ae[43]^=le,le=xe^(Ee<<1|me>>>31),ae[4]^=Te=_e^(me<<1|Ee>>>31),ae[5]^=le,ae[14]^=Te,ae[15]^=le,ae[24]^=Te,ae[25]^=le,ae[34]^=Te,ae[35]^=le,ae[44]^=Te,ae[45]^=le,le=ke^(Ve<<1|ze>>>31),ae[6]^=Te=Ce^(ze<<1|Ve>>>31),ae[7]^=le,ae[16]^=Te,ae[17]^=le,ae[26]^=Te,ae[27]^=le,ae[36]^=Te,ae[37]^=le,ae[46]^=Te,ae[47]^=le,le=Ee^(pe<<1|ne>>>31),ae[8]^=Te=me^(ne<<1|pe>>>31),ae[9]^=le,ae[18]^=Te,ae[19]^=le,ae[28]^=Te,ae[29]^=le,ae[38]^=Te,ae[39]^=le,ae[48]^=Te,ae[49]^=le,tt=ae[1],ts=ae[11]<<4|ae[10]>>>28,Tn=ae[10]<<4|ae[11]>>>28,qt=ae[20]<<3|ae[21]>>>29,jt=ae[21]<<3|ae[20]>>>29,rs=ae[31]<<9|ae[30]>>>23,Xi=ae[30]<<9|ae[31]>>>23,sr=ae[40]<<18|ae[41]>>>14,Ii=ae[41]<<18|ae[40]>>>14,Yr=ae[2]<<1|ae[3]>>>31,Ln=ae[3]<<1|ae[2]>>>31,ht=ae[12]<<12|ae[13]>>>20,Qn=ae[22]<<10|ae[23]>>>22,Vi=ae[23]<<10|ae[22]>>>22,Yt=ae[33]<<13|ae[32]>>>19,Wn=ae[32]<<13|ae[33]>>>19,$s=ae[42]<<2|ae[43]>>>30,is=ae[43]<<2|ae[42]>>>30,mr=ae[5]<<30|ae[4]>>>2,Fr=ae[4]<<30|ae[5]>>>2,Bn=ae[14]<<6|ae[15]>>>26,$r=ae[15]<<6|ae[14]>>>26,Pt=ae[24]<<11|ae[25]>>>21,ar=ae[34]<<15|ae[35]>>>17,br=ae[35]<<15|ae[34]>>>17,fn=ae[45]<<29|ae[44]>>>3,$n=ae[44]<<29|ae[45]>>>3,Wt=ae[6]<<28|ae[7]>>>4,dn=ae[7]<<28|ae[6]>>>4,hi=ae[17]<<23|ae[16]>>>9,wi=ae[16]<<23|ae[17]>>>9,Gn=ae[26]<<25|ae[27]>>>7,bn=ae[27]<<25|ae[26]>>>7,st=ae[36]<<21|ae[37]>>>11,Ye=ae[37]<<21|ae[36]>>>11,ki=ae[47]<<24|ae[46]>>>8,ur=ae[46]<<24|ae[47]>>>8,Un=ae[8]<<27|ae[9]>>>5,ir=ae[9]<<27|ae[8]>>>5,Nt=ae[18]<<20|ae[19]>>>12,It=ae[19]<<20|ae[18]>>>12,cs=ae[29]<<7|ae[28]>>>25,$i=ae[28]<<7|ae[29]>>>25,Lr=ae[38]<<8|ae[39]>>>24,Kn=ae[39]<<8|ae[38]>>>24,gt=ae[48]<<14|ae[49]>>>18,St=ae[49]<<14|ae[48]>>>18,ae[0]=(nt=ae[0])^~(mt=ae[13]<<12|ae[12]>>>20)&(wt=ae[25]<<11|ae[24]>>>21),ae[1]=tt^~ht&Pt,ae[10]=Wt^~Nt&qt,ae[11]=dn^~It&jt,ae[20]=Yr^~Bn&Gn,ae[21]=Ln^~$r&bn,ae[30]=Un^~ts&Qn,ae[31]=ir^~Tn&Vi,ae[40]=mr^~hi&cs,ae[41]=Fr^~wi&$i,ae[2]=mt^~wt&st,ae[3]=ht^~Pt&Ye,ae[12]=Nt^~qt&Yt,ae[13]=It^~jt&Wn,ae[22]=Bn^~Gn&Lr,ae[23]=$r^~bn&Kn,ae[32]=ts^~Qn&ar,ae[33]=Tn^~Vi&br,ae[42]=hi^~cs&rs,ae[43]=wi^~$i&Xi,ae[4]=wt^~st>,ae[5]=Pt^~Ye&St,ae[14]=qt^~Yt&fn,ae[15]=jt^~Wn&$n,ae[24]=Gn^~Lr&sr,ae[25]=bn^~Kn&Ii,ae[34]=Qn^~ar&ki,ae[35]=Vi^~br&ur,ae[44]=cs^~rs&$s,ae[45]=$i^~Xi&is,ae[6]=st^~gt&nt,ae[7]=Ye^~St&tt,ae[16]=Yt^~fn&Wt,ae[17]=Wn^~$n&dn,ae[26]=Lr^~sr&Yr,ae[27]=Kn^~Ii&Ln,ae[36]=ar^~ki&Un,ae[37]=br^~ur&ir,ae[46]=rs^~$s&mr,ae[47]=Xi^~is&Fr,ae[8]=gt^~nt&mt,ae[9]=St^~tt&ht,ae[18]=fn^~Wt&Nt,ae[19]=$n^~dn&It,ae[28]=sr^~Yr&Bn,ae[29]=Ii^~Ln&$r,ae[38]=ki^~Un&ts,ae[39]=ur^~ir&Tn,ae[48]=$s^~mr&hi,ae[49]=is^~Fr&wi,ae[0]^=S[X],ae[1]^=S[X+1]};if(T)bt.exports=k;else{for(N=0;NE.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(x){var f=Number.isFinite;if("number"==typeof x){if(0===x)return E.__zero();if(E.__isOneDigitInt(x))return 0>x?E.__oneDigit(-x,!0):E.__oneDigit(x,!1);if(!f(x)||O(x)!==x)throw new RangeError("The number "+x+" cannot be converted to BigInt because it is not an integer");return E.__fromDouble(x)}if("string"==typeof x){const T=E.__fromString(x);if(null===T)throw new SyntaxError("Cannot convert "+x+" to a BigInt");return T}if("boolean"==typeof x)return!0===x?E.__oneDigit(1,!1):E.__zero();if("object"==typeof x){if(x.constructor===E)return x;const T=E.__toPrimitive(x);return E.BigInt(T)}throw new TypeError("Cannot convert "+x+" to a BigInt")}toDebugString(){const x=["BigInt["];for(const f of this)x.push((f&&(f>>>0).toString(16))+", ");return x.push("]"),x.join("")}toString(x=10){if(2>x||36>>=12;const w=m-12;let S=12<=m?0:h<<20+m,I=20+m;for(0>>30-w,S=h<>>30-I,I-=30;const P=E.__decideRounding(x,I,u,h);return(1===P||0===P&&1==(1&S))&&(S=S+1>>>0,0===S&&(_++,_>>>20!=0&&(_=0,l++,1023=E.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===x.length&&2===x.__digit(0)){const l=1+(0|T/30),u=new E(l,x.sign&&0!=(1&T));return u.__initializeDigits(),u.__setDigit(l-1,1<>=1;0!==T;T>>=1)b=E.multiply(b,b),0!=(1&T)&&(g=null===g?b:E.multiply(g,b));return g}static multiply(x,f){if(0===x.length)return x;if(0===f.length)return f;let T=x.length+f.length;30<=x.__clzmsd()+f.__clzmsd()&&T--;const g=new E(T,x.sign!==f.sign);g.__initializeDigits();for(let b=0;bE.__absoluteCompare(x,f))return E.__zero();const T=x.sign!==f.sign,g=f.__unsignedDigit(0);let b;if(1===f.length&&32767>=g){if(1===g)return T===x.sign?x:E.unaryMinus(x);b=E.__absoluteDivSmall(x,g,null)}else b=E.__absoluteDivLarge(x,f,!0,!1);return b.sign=T,b.__trim()}static remainder(x,f){if(0===f.length)throw new RangeError("Division by zero");if(0>E.__absoluteCompare(x,f))return x;const T=f.__unsignedDigit(0);if(1===f.length&&32767>=T){if(1===T)return E.__zero();const b=E.__absoluteModSmall(x,T);return 0===b?E.__zero():E.__oneDigit(b,x.sign)}const g=E.__absoluteDivLarge(x,f,!1,!0);return g.sign=x.sign,g.__trim()}static add(x,f){const T=x.sign;return T===f.sign?E.__absoluteAdd(x,f,T):0<=E.__absoluteCompare(x,f)?E.__absoluteSub(x,f,T):E.__absoluteSub(f,x,!T)}static subtract(x,f){const T=x.sign;return T===f.sign?0<=E.__absoluteCompare(x,f)?E.__absoluteSub(x,f,T):E.__absoluteSub(f,x,!T):E.__absoluteAdd(x,f,T)}static leftShift(x,f){return 0===f.length||0===x.length?x:f.sign?E.__rightShiftByAbsolute(x,f):E.__leftShiftByAbsolute(x,f)}static signedRightShift(x,f){return 0===f.length||0===x.length?x:f.sign?E.__leftShiftByAbsolute(x,f):E.__rightShiftByAbsolute(x,f)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(x,f){return 0>E.__compareToBigInt(x,f)}static lessThanOrEqual(x,f){return 0>=E.__compareToBigInt(x,f)}static greaterThan(x,f){return 0(x=O(x)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===x)return E.__zero();if(x>=E.__kMaxLengthBits)return f;const T=0|(x+29)/30;if(f.length(x=O(x)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===x)return E.__zero();if(f.sign){if(x>E.__kMaxLengthBits)throw new RangeError("BigInt too big");return E.__truncateAndSubFromPowerOfTwo(x,f,!1)}if(x>=E.__kMaxLengthBits)return f;const T=0|(x+29)/30;if(f.length>>g!=0?E.__truncateToNBits(x,f):f}static ADD(x,f){if(x=E.__toPrimitive(x),f=E.__toPrimitive(f),"string"==typeof x)return"string"!=typeof f&&(f=f.toString()),x+f;if("string"==typeof f)return x.toString()+f;if(x=E.__toNumeric(x),f=E.__toNumeric(f),E.__isBigInt(x)&&E.__isBigInt(f))return E.add(x,f);if("number"==typeof x&&"number"==typeof f)return x+f;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(x,f){return E.__compare(x,f,0)}static LE(x,f){return E.__compare(x,f,1)}static GT(x,f){return E.__compare(x,f,2)}static GE(x,f){return E.__compare(x,f,3)}static EQ(x,f){for(;;){if(E.__isBigInt(x))return E.__isBigInt(f)?E.equal(x,f):E.EQ(f,x);if("number"==typeof x){if(E.__isBigInt(f))return E.__equalToNumber(f,x);if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else if("string"==typeof x){if(E.__isBigInt(f))return null!==(x=E.__fromString(x))&&E.equal(x,f);if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else if("boolean"==typeof x){if(E.__isBigInt(f))return E.__equalToNumber(f,+x);if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else if("symbol"==typeof x){if(E.__isBigInt(f))return!1;if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else{if("object"!=typeof x)return x==f;if("object"==typeof f&&f.constructor!==E)return x==f;x=E.__toPrimitive(x)}}}static NE(x,f){return!E.EQ(x,f)}static __zero(){return new E(0,!1)}static __oneDigit(x,f){const T=new E(1,f);return T.__setDigit(0,x),T}__copy(){const x=new E(this.length,this.sign);for(let f=0;ff)b=-f-1;else{if(0===T)return-1;T--,g=x.__digit(T),b=29}let l=1<>>20)-1023,g=1+(0|T/30),b=new E(g,0>x);let l=1048575&E.__kBitConversionInts[1]|1048576,h=E.__kBitConversionInts[0];const m=T%30;let _,w=0;if(20>m){const S=20-m;w=S+32,_=l>>>S,l=l<<32-S|h>>>S,h<<=32-S}else if(20===m)w=32,_=l,l=h,h=0;else{const S=m-20;w=32-S,_=l<>>32-S,l=h<>>2,l=l<<30|h>>>2,h<<=30):_=0,b.__setDigit(S,_);return b.__trim()}static __isWhitespace(x){return 13>=x&&9<=x||(159>=x?32==x:131071>=x?160==x||5760==x:196607>=x?10>=(x&=131071)||40==x||41==x||47==x||95==x||4096==x:65279==x)}static __fromString(x,f=0){let T=0;const g=x.length;let b=0;if(b===g)return E.__zero();let l=x.charCodeAt(b);for(;E.__isWhitespace(l);){if(++b===g)return E.__zero();l=x.charCodeAt(b)}if(43===l){if(++b===g)return null;l=x.charCodeAt(b),T=1}else if(45===l){if(++b===g)return null;l=x.charCodeAt(b),T=-1}if(0===f){if(f=10,48===l){if(++b===g)return E.__zero();if(l=x.charCodeAt(b),88===l||120===l){if(f=16,++b===g)return null;l=x.charCodeAt(b)}else if(79===l||111===l){if(f=8,++b===g)return null;l=x.charCodeAt(b)}else if(66===l||98===l){if(f=2,++b===g)return null;l=x.charCodeAt(b)}}}else if(16===f&&48===l){if(++b===g)return E.__zero();if(l=x.charCodeAt(b),88===l||120===l){if(++b===g)return null;l=x.charCodeAt(b)}}if(0!=T&&10!==f)return null;for(;48===l;){if(++b===g)return E.__zero();l=x.charCodeAt(b)}const h=g-b;let u=E.__kMaxBitsPerChar[f],m=E.__kBitsPerCharTableMultiplier-1;if(h>1073741824/u)return null;const w=new E(0|(29+(u*h+m>>>E.__kBitsPerCharTableShift))/30,!1),S=10>f?f:10,I=10>=E.__kBitsPerCharTableShift;const P=[],L=[];let V=!1;do{let W=0,G=0;for(;;){let H;if(l-48>>>0>>0>>0>>0>>E.__kBitsPerCharTableShift)/30)}while(!P)}if(b!==g){if(!E.__isWhitespace(l))return null;for(b++;b>>m-l)}if(0!==b){if(g>=x.length)throw new Error("implementation bug");x.__setDigit(g++,b)}for(;g>>1)+(85&g),g=(51&g>>>2)+(51&g),g=(15&g>>>4)+(15&g);const b=g,l=f-1,h=x.__digit(T-1);let m=0|(30*T-E.__clz30(h)+b-1)/b;if(x.sign&&m++,268435456>>G,I=30-G;I>=b;)_[w--]=E.__kConversionChars[S&l],S>>>=b,I-=b}for(_[w--]=E.__kConversionChars[(S|h<>>b-I;0!==S;)_[w--]=E.__kConversionChars[S&l],S>>>=b;if(x.sign&&(_[w--]="-"),-1!=w)throw new Error("implementation bug");return _.join("")}static __toStringGeneric(x,f,T){const g=x.length;if(0===g)return"";if(1===g){let L=x.__unsignedDigit(0).toString(f);return!1===T&&x.sign&&(L="-"+L),L}const b=30*g-E.__clz30(x.__digit(g-1)),h=E.__kMaxBitsPerChar[f]-1;let u=b*E.__kBitsPerCharTableMultiplier;u+=h-1,u=0|u/h;const m=u+1>>1,_=E.exponentiate(E.__oneDigit(f,!1),E.__oneDigit(m,!1));let w,S;const I=_.__unsignedDigit(0);if(1===_.length&&32767>=I){w=new E(x.length,!1),w.__initializeDigits();let L=0;for(let V=2*x.length-1;0<=V;V--){const W=L<<15|x.__halfDigit(V);w.__setHalfDigit(V,0|W/I),L=0|W%I}S=L.toString(f)}else{const L=E.__absoluteDivLarge(x,_,!0,!0);w=L.quotient;const V=L.remainder.__trim();S=E.__toStringGeneric(V,f,!0)}w.__trim();let P=E.__toStringGeneric(w,f,!0);for(;S.lengthg?E.__absoluteLess(T):0}static __compareToNumber(x,f){if(E.__isOneDigitInt(f)){const T=x.sign,g=0>f;if(T!==g)return E.__unequalSign(T);if(0===x.length){if(g)throw new Error("implementation bug");return 0===f?0:-1}if(1b?E.__absoluteGreater(T):lf)return E.__unequalSign(T);if(0===f)throw new Error("implementation bug: should be handled elsewhere");if(0===x.length)return-1;E.__kBitConversionDouble[0]=f;const g=2047&E.__kBitConversionInts[1]>>>20;if(2047==g)throw new Error("implementation bug: handled elsewhere");const b=g-1023;if(0>b)return E.__absoluteGreater(T);const l=x.length;let h=x.__digit(l-1);const u=E.__clz30(h),m=30*l-u,_=b+1;if(m<_)return E.__absoluteLess(T);if(m>_)return E.__absoluteGreater(T);let w=1048576|1048575&E.__kBitConversionInts[1],S=E.__kBitConversionInts[0];const P=29-u;if(P!==(0|(m-1)%30))throw new Error("implementation bug");let L,V=0;if(20>P){const W=20-P;V=W+32,L=w>>>W,w=w<<32-W|S>>>W,S<<=32-W}else if(20===P)V=32,L=w,w=S,S=0;else{const W=P-20;V=32-W,L=w<>>32-W,w=S<>>=0,L>>>=0,h>L)return E.__absoluteGreater(T);if(h>>2,w=w<<30|S>>>2,S<<=30):L=0;const G=x.__unsignedDigit(W);if(G>L)return E.__absoluteGreater(T);if(Gf&&x.__unsignedDigit(0)===ie(f):0===E.__compareToDouble(x,f)}static __comparisonResultToBool(x,f){return 0===f?0>x:1===f?0>=x:2===f?0f;case 3:return x>=f}if(E.__isBigInt(x)&&"string"==typeof f)return null!==(f=E.__fromString(f))&&E.__comparisonResultToBool(E.__compareToBigInt(x,f),T);if("string"==typeof x&&E.__isBigInt(f))return null!==(x=E.__fromString(x))&&E.__comparisonResultToBool(E.__compareToBigInt(x,f),T);if(x=E.__toNumeric(x),f=E.__toNumeric(f),E.__isBigInt(x)){if(E.__isBigInt(f))return E.__comparisonResultToBool(E.__compareToBigInt(x,f),T);if("number"!=typeof f)throw new Error("implementation bug");return E.__comparisonResultToBool(E.__compareToNumber(x,f),T)}if("number"!=typeof x)throw new Error("implementation bug");if(E.__isBigInt(f))return E.__comparisonResultToBool(E.__compareToNumber(f,x),2^T);if("number"!=typeof f)throw new Error("implementation bug");return 0===T?xf:3===T?x>=f:void 0}__clzmsd(){return E.__clz30(this.__digit(this.length-1))}static __absoluteAdd(x,f,T){if(x.length>>30,b.__setDigit(h,1073741823&u)}for(;h>>30,b.__setDigit(h,1073741823&u)}return h>>30,g.__setDigit(l,1073741823&h)}for(;l>>30,g.__setDigit(l,1073741823&h)}return g.__trim()}static __absoluteAddOne(x,f,T=null){const g=x.length;null===T?T=new E(g,f):T.sign=f;let b=1;for(let l=0;l>>30,T.__setDigit(l,1073741823&h)}return 0!=b&&T.__setDigitGrow(g,1),T}static __absoluteSubOne(x,f){const T=x.length,g=new E(f=f||T,!1);let b=1;for(let l=0;l>>30,g.__setDigit(l,1073741823&h)}if(0!=b)throw new Error("implementation bug");for(let l=T;lg?0:x.__unsignedDigit(g)>f.__unsignedDigit(g)?1:-1}static __multiplyAccumulate(x,f,T,g){if(0===f)return;const b=32767&f,l=f>>>15;let h=0,u=0;for(let m,_=0;_>>15,P=E.__imul(S,b),L=E.__imul(S,l),V=E.__imul(I,b),W=E.__imul(I,l);m+=u+P+h,h=m>>>30,m&=1073741823,m+=((32767&L)<<15)+((32767&V)<<15),h+=m>>>30,u=W+(L>>>15)+(V>>>15),T.__setDigit(g,1073741823&m)}for(;0!=h||0!==u;g++){let m=T.__digit(g);m+=h+u,u=0,h=m>>>30,T.__setDigit(g,1073741823&m)}}static __internalMultiplyAdd(x,f,T,g,b){let l=T,h=0;for(let u=0;u>>15,f),S=_+((32767&w)<<15)+h+l;l=S>>>30,h=w>>>15,b.__setDigit(u,1073741823&S)}if(b.length>g)for(b.__setDigit(g++,l+h);gthis.length&&(T=this.length);const g=32767&x,b=x>>>15;let l=0,h=f;for(let u=0;u>>15,S=E.__imul(_,g),I=E.__imul(_,b),P=E.__imul(w,g),L=E.__imul(w,b);let V=h+S+l;l=V>>>30,V&=1073741823,V+=((32767&I)<<15)+((32767&P)<<15),l+=V>>>30,h=L+(I>>>15)+(P>>>15),this.__setDigit(u,1073741823&V)}if(0!=l||0!==h)throw new Error("implementation bug")}static __absoluteDivSmall(x,f,T=null){null===T&&(T=new E(x.length,!1));let g=0;for(let b,l=2*x.length-1;0<=l;l-=2){b=(g<<15|x.__halfDigit(l))>>>0;const h=0|b/f;g=0|b%f,b=(g<<15|x.__halfDigit(l-1))>>>0,g=0|b%f,T.__setDigit(l>>>1,h<<15|0|b/f)}return T}static __absoluteModSmall(x,f){let T=0;for(let g=2*x.length-1;0<=g;g--)T=0|((T<<15|x.__halfDigit(g))>>>0)%f;return T}static __absoluteDivLarge(x,f,T,g){const b=f.__halfDigitLength(),l=f.length,h=x.__halfDigitLength()-b;let u=null;T&&(u=new E(h+2>>>1,!1),u.__initializeDigits());const m=new E(b+2>>>1,!1);m.__initializeDigits();const _=E.__clz15(f.__halfDigit(b-1));0<_&&(f=E.__specialLeftShift(f,_,0));const w=E.__specialLeftShift(x,_,1),S=f.__halfDigit(b-1);let I=0;for(let P,L=h;0<=L;L--){P=32767;const V=w.__halfDigit(L+b);if(V!==S){const G=(V<<15|w.__halfDigit(L+b-1))>>>0;P=0|G/S;let H=0|G%S;const j=f.__halfDigit(b-2),K=w.__halfDigit(L+b-2);for(;E.__imul(P,j)>>>0>(H<<16|K)>>>0&&(P--,H+=S,!(32767>>1,I|P))}if(g)return w.__inplaceRightShift(_),T?{quotient:u,remainder:w}:w;if(T)return u;throw new Error("unreachable")}static __clz15(x){return E.__clz30(x)-15}__inplaceAdd(x,f,T){let g=0;for(let b=0;b>>15,this.__setHalfDigit(f+b,32767&l)}return g}__inplaceSub(x,f,T){let g=0;if(1&f){let b=this.__digit(f>>=1),l=32767&b,h=0;for(;h>>1;h++){const _=x.__digit(h),w=(b>>>15)-(32767&_)-g;g=1&w>>>15,this.__setDigit(f+h,(32767&w)<<15|32767&l),b=this.__digit(f+h+1),l=(32767&b)-(_>>>15)-g,g=1&l>>>15}const u=x.__digit(h),m=(b>>>15)-(32767&u)-g;if(g=1&m>>>15,this.__setDigit(f+h,(32767&m)<<15|32767&l),f+h+1>=this.length)throw new RangeError("out of bounds");0==(1&T)&&(b=this.__digit(f+h+1),l=(32767&b)-(u>>>15)-g,g=1&l>>>15,this.__setDigit(f+x.length,1073709056&b|32767&l))}else{f>>=1;let b=0;for(;b>>15;const I=(_>>>15)-(w>>>15)-g;g=1&I>>>15,this.__setDigit(f+b,(32767&I)<<15|32767&S)}const l=this.__digit(f+b),h=x.__digit(b),u=(32767&l)-(32767&h)-g;g=1&u>>>15;let m=0;0==(1&T)&&(m=(l>>>15)-(h>>>15)-g,g=1&m>>>15),this.__setDigit(f+b,(32767&m)<<15|32767&u)}return g}__inplaceRightShift(x){if(0===x)return;let f=this.__digit(0)>>>x;const T=this.length-1;for(let g=0;g>>x}this.__setDigit(T,f)}static __specialLeftShift(x,f,T){const g=x.length,b=new E(g+T,!1);if(0===f){for(let h=0;h>>30-f}return 0T)throw new RangeError("BigInt too big");const g=0|T/30,b=T%30,l=x.length,h=0!==b&&x.__digit(l-1)>>>30-b!=0,u=l+g+(h?1:0),m=new E(u,x.sign);if(0===b){let _=0;for(;_>>30-b}if(h)m.__setDigit(l+g,_);else if(0!==_)throw new Error("implementation bug")}return m.__trim()}static __rightShiftByAbsolute(x,f){const T=x.length,g=x.sign,b=E.__toShiftAmount(f);if(0>b)return E.__rightShiftByMaximum(g);const l=0|b/30,h=b%30;let u=T-l;if(0>=u)return E.__rightShiftByMaximum(g);let m=!1;if(g)if(0!=(x.__digit(l)&(1<>>h;const S=T-l-1;for(let I=0;I>>h}_.__setDigit(S,w)}return m&&(_=E.__absoluteAddOne(_,!0,_)),_.__trim()}static __rightShiftByMaximum(x){return x?E.__oneDigit(1,!0):E.__zero()}static __toShiftAmount(x){if(1E.__kMaxLengthBits?-1:f}static __toPrimitive(x,f="default"){if("object"!=typeof x||x.constructor===E)return x;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const b=x[Symbol.toPrimitive];if(b){const l=b(f);if("object"!=typeof l)return l;throw new TypeError("Cannot convert object to primitive value")}}const T=x.valueOf;if(T){const b=T.call(x);if("object"!=typeof b)return b}const g=x.toString;if(g){const b=g.call(x);if("object"!=typeof b)return b}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(x){return E.__isBigInt(x)?x:+x}static __isBigInt(x){return"object"==typeof x&&null!==x&&x.constructor===E}static __truncateToNBits(x,f){const T=0|(x+29)/30,g=new E(T,f.sign),b=T-1;for(let h=0;h>>h}return g.__setDigit(b,l),g.__trim()}static __truncateAndSubFromPowerOfTwo(x,f,T){var g=Math.min;const b=0|(x+29)/30,l=new E(b,T);let h=0;const u=b-1;let m=0;for(const I=g(u,f.length);h>>30,l.__setDigit(h,1073741823&P)}for(;h>>I;const P=1<<32-I;S=P-_-m,S&=P-1}return l.__setDigit(u,S),l.__trim()}__digit(x){return this[x]}__unsignedDigit(x){return this[x]>>>0}__setDigit(x,f){this[x]=0|f}__setDigitGrow(x,f){this[x]=0|f}__halfDigitLength(){const x=this.length;return 32767>=this.__unsignedDigit(x-1)?2*x-1:2*x}__halfDigit(x){return 32767&this[x>>>1]>>>15*(1&x)}__setHalfDigit(x,f){const T=x>>>1,g=this.__digit(T);this.__setDigit(T,1&x?32767&g|f<<15:1073709056&g|32767&f)}static __digitPow(x,f){let T=1;for(;0>>=1,x*=x;return T}static __isOneDigitInt(x){return(1073741823&x)===x}}return E.__kMaxLength=33554432,E.__kMaxLengthBits=E.__kMaxLength<<5,E.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],E.__kBitsPerCharTableShift=5,E.__kBitsPerCharTableMultiplier=1<>>0)/x)},E.__imul=be||function(d,x){return 0|d*x},E}()},80233:function(bt,be,Y){"use strict";var ie=this&&this.__createBinding||(Object.create?function(d,x,f,T){void 0===T&&(T=f),Object.defineProperty(d,T,{enumerable:!0,get:function(){return x[f]}})}:function(d,x,f,T){void 0===T&&(T=f),d[T]=x[f]}),z=this&&this.__exportStar||function(d,x){for(var f in d)"default"!==f&&!Object.prototype.hasOwnProperty.call(x,f)&&ie(x,d,f)};Object.defineProperty(be,"__esModule",{value:!0}),be.VariableType=be.EnumType=void 0,z(Y(45262),be);var O=Y(17854);Object.defineProperty(be,"EnumType",{enumerable:!0,get:function(){return O.EnumType}});var E=Y(68668);Object.defineProperty(be,"VariableType",{enumerable:!0,get:function(){return E.VariableType}})},45262:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.jsonToGraphQLQuery=be.configFields=void 0;var ie=Y(17854),z=Y(68668);function O(l){if(l instanceof ie.EnumType)return l.value;if(l instanceof z.VariableType)return"$".concat(l.value);if("object"!=typeof l||null===l)return JSON.stringify(l);if(Array.isArray(l))return"[".concat(l.map(function(u){return O(u)}).join(", "),"]");var h=Object.keys(l).map(function(u){return"".concat(u,": ").concat(O(l[u]))}).join(", ");return"{".concat(h,"}")}function T(l,h){return-1==be.configFields.indexOf(l)&&-1==h.indexOf(l)}function g(l,h,u,m){Object.keys(l).filter(function(_){return T(_,m.ignoreFields)}).forEach(function(_){var w=l[_];if("object"==typeof w){if(Array.isArray(w)&&!(w=w.find(function(o){return o&&"object"==typeof o})))return void u.push(["".concat(_),h]);if(w&&0===Object.keys(w).filter(function(o){return!1!==w[o]||m.includeFalsyKeys}).length)return;var I=Object.keys(w).filter(function(o){return T(o,m.ignoreFields)}).length>0,P="object"==typeof w.__args&&Object.keys(w.__args).length>0,L="object"==typeof w.__directives,V=w.__all_on instanceof Array,W="object"==typeof w.__on,G="".concat(_);if("string"==typeof w.__name&&(G="".concat(G," ").concat(w.__name)),"string"==typeof w.__aliasFor&&(G="".concat(G,": ").concat(w.__aliasFor)),"object"==typeof w.__variables&&Object.keys(w.__variables).length>0)G="".concat(G," (").concat(function(l){var h=[];for(var u in l)h.push("$".concat(u,": ").concat(l[u]));return h.join(", ")}(w.__variables),")");else if(P||L){var H="",j="";L&&(j=Object.entries(w.__directives).map(function(o){var y;return"@".concat(function(l){var h=Object.keys(l)[0],u=l[h];if("boolean"==typeof u||"object"==typeof u&&0===Object.keys(u).length)return h;if("object"==typeof u){var m=[];for(var _ in u){var w=O(u[_]).replace(/"/g,"");m.push("".concat(_,": ").concat(w))}return"".concat(h,"(").concat(m.join(", "),")")}throw new Error("Unsupported type for directive: ".concat(typeof u,". Types allowed: object, boolean.\n")+"Offending object: ".concat(JSON.stringify(l)))}(((y={})[o[0]]=o[1],y)))}).join(" ")),P&&(H="(".concat(function(l){var h=[];for(var u in l)h.push("".concat(u,": ").concat(O(l[u])));return h.join(", ")}(w.__args),")"));var K=L&&P?" ":"";G="".concat(G," ").concat(H).concat(K).concat(j)}u.push([G+(I||W||V?" {":""),h]),g(w,h+1,u,m),V&&w.__all_on.forEach(function(o){u.push(["...".concat(o),h+1])}),W&&(w.__on instanceof Array?w.__on:[w.__on]).forEach(function(o){u.push(["... on ".concat(o.__typeName," {"),h+1]),g(o,h+2,u,m),u.push(["}",h+1])}),(I||W||V)&&u.push(["}",h])}else(!0===m.includeFalsyKeys||w)&&u.push(["".concat(_),h])})}be.configFields=["__args","__alias","__aliasFor","__variables","__directives","__on","__all_on","__typeName","__name"],be.jsonToGraphQLQuery=function(l,h){if(void 0===h&&(h={}),!l||"object"!=typeof l)throw new Error("query object not specified");if(0==Object.keys(l).length)throw new Error("query object has no data");h.ignoreFields instanceof Array||(h.ignoreFields=[]);var u=[];g(l,0,u,h);var m="";return u.forEach(function(_){var w=_[0];h.pretty?(m&&(m+="\n"),m+=function(l){return Array(4*l+1).join(" ")}(_[1])+w):(m&&(m+=" "),m+=w)}),m}},17854:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.EnumType=void 0,be.EnumType=function(z){this.value=z}},68668:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.VariableType=void 0;var Y=function(){function ie(z){this.value=z}return ie.prototype.toJSON=function(){return"$".concat(this.value)},ie}();be.VariableType=Y},6856:(bt,be,Y)=>{bt=Y.nmd(bt);var z="__lodash_hash_undefined__",d=9007199254740991,x="[object Arguments]",f="[object Array]",g="[object Boolean]",b="[object Date]",l="[object Error]",h="[object Function]",m="[object Map]",_="[object Number]",S="[object Object]",I="[object Promise]",L="[object RegExp]",V="[object Set]",W="[object String]",j="[object WeakMap]",K="[object ArrayBuffer]",R="[object DataView]",Q=/^\[object .+?Constructor\]$/,ee=/^(?:0|[1-9]\d*)$/,ce={};ce["[object Float32Array]"]=ce["[object Float64Array]"]=ce["[object Int8Array]"]=ce["[object Int16Array]"]=ce["[object Int32Array]"]=ce["[object Uint8Array]"]=ce["[object Uint8ClampedArray]"]=ce["[object Uint16Array]"]=ce["[object Uint32Array]"]=!0,ce[x]=ce[f]=ce[K]=ce[g]=ce[R]=ce[b]=ce[l]=ce[h]=ce[m]=ce[_]=ce[S]=ce[L]=ce[V]=ce[W]=ce[j]=!1;var ue="object"==typeof global&&global&&global.Object===Object&&global,we="object"==typeof self&&self&&self.Object===Object&&self,ae=ue||we||Function("return this")(),Te=be&&!be.nodeType&&be,le=Te&&bt&&!bt.nodeType&&bt,X=le&&le.exports===Te,ne=X&&ue.process,pe=function(){try{return ne&&ne.binding&&ne.binding("util")}catch{}}(),_e=pe&&pe.isTypedArray;function ke(Sn,rr){for(var hn=-1,Cn=null==Sn?0:Sn.length;++hnCs))return!1;var Rs=Ei.get(Sn);if(Rs&&Ei.get(rr))return Rs==rr;var co=-1,Vo=!0,sa=2&hn?new so:void 0;for(Ei.set(Sn,rr),Ei.set(rr,Sn);++co-1},mr.prototype.set=function(Sn,rr){var hn=this.__data__,Cn=Lu(hn,Sn);return Cn<0?(++this.size,hn.push([Sn,rr])):hn[Cn][1]=rr,this},rs.prototype.clear=function(){this.size=0,this.__data__={hash:new Qn,map:new(Bn||mr),string:new Qn}},rs.prototype.delete=function(Sn){var rr=ec(this,Sn).delete(Sn);return this.size-=rr?1:0,rr},rs.prototype.get=function(Sn){return ec(this,Sn).get(Sn)},rs.prototype.has=function(Sn){return ec(this,Sn).has(Sn)},rs.prototype.set=function(Sn,rr){var hn=ec(this,Sn),Cn=hn.size;return hn.set(Sn,rr),this.size+=hn.size==Cn?0:1,this},so.prototype.add=so.prototype.push=function(Sn){return this.__data__.set(Sn,z),this},so.prototype.has=function(Sn){return this.__data__.has(Sn)},Wi.prototype.clear=function(){this.__data__=new mr,this.size=0},Wi.prototype.delete=function(Sn){var rr=this.__data__,hn=rr.delete(Sn);return this.size=rr.size,hn},Wi.prototype.get=function(Sn){return this.__data__.get(Sn)},Wi.prototype.has=function(Sn){return this.__data__.has(Sn)},Wi.prototype.set=function(Sn,rr){var hn=this.__data__;if(hn instanceof mr){var Cn=hn.__data__;if(!Bn||Cn.length<199)return Cn.push([Sn,rr]),this.size=++hn.size,this;hn=this.__data__=new rs(Cn)}return hn.set(Sn,rr),this.size=hn.size,this};var eu=fn?function(Sn){return null==Sn?[]:(Sn=Object(Sn),function(Sn,rr){for(var hn=-1,Cn=null==Sn?0:Sn.length,Ir=0,Ei=[];++hn-1&&Sn%1==0&&Sn-1&&Sn%1==0&&Sn<=d}function ou(Sn){var rr=typeof Sn;return null!=Sn&&("object"==rr||"function"==rr)}function Vu(Sn){return null!=Sn&&"object"==typeof Sn}var ua=_e?function(Sn){return function(rr){return Sn(rr)}}(_e):function(Sn){return Vu(Sn)&&na(Sn.length)&&!!ce[ja(Sn)]};function Pu(Sn){return function(Sn){return null!=Sn&&na(Sn.length)&&!Wa(Sn)}(Sn)?function(Sn,rr){var hn=ta(Sn),Cn=!hn&&_o(Sn),Ir=!hn&&!Cn&&qo(Sn),Ei=!hn&&!Cn&&!Ir&&ua(Sn),Os=hn||Cn||Ir||Ei,Cs=Os?function(Sn,rr){for(var hn=-1,Cn=Array(Sn);++hn{bt=Y.nmd(bt);var z="__lodash_hash_undefined__",d=9007199254740991,x="[object Arguments]",h="[object Function]",S="[object Object]",a=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,Q={};Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q[x]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object Boolean]"]=Q["[object DataView]"]=Q["[object Date]"]=Q["[object Error]"]=Q[h]=Q["[object Map]"]=Q["[object Number]"]=Q[S]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object WeakMap]"]=!1;var ee="object"==typeof global&&global&&global.Object===Object&&global,ce="object"==typeof self&&self&&self.Object===Object&&self,ue=ee||ce||Function("return this")(),we=be&&!be.nodeType&&be,ae=we&&bt&&!bt.nodeType&&bt,Te=ae&&ae.exports===we,le=Te&&ee.process,X=function(){try{return ae&&ae.require&&ae.require("util").types||le&&le.binding&&le.binding("util")}catch{}}(),ne=X&&X.isTypedArray;function pe(hn,Cn,Ir){switch(Ir.length){case 0:return hn.call(Cn);case 1:return hn.call(Cn,Ir[0]);case 2:return hn.call(Cn,Ir[0],Ir[1]);case 3:return hn.call(Cn,Ir[0],Ir[1],Ir[2])}return hn.apply(Cn,Ir)}var hn,me=Array.prototype,ze=Object.prototype,Ve=ue["__core-js_shared__"],nt=Function.prototype.toString,tt=ze.hasOwnProperty,mt=(hn=/[^.]+$/.exec(Ve&&Ve.keys&&Ve.keys.IE_PROTO||""))?"Symbol(src)_1."+hn:"",ht=ze.toString,wt=nt.call(Object),Pt=RegExp("^"+nt.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=Te?ue.Buffer:void 0,Ye=ue.Symbol,gt=ue.Uint8Array,Wt=function(hn,Cn){return function(Ir){return hn(Cn(Ir))}}(Object.getPrototypeOf,Object),dn=Object.create,Nt=ze.propertyIsEnumerable,It=me.splice,qt=Ye?Ye.toStringTag:void 0,jt=function(){try{var hn=Uu(Object,"defineProperty");return hn({},"",{}),hn}catch{}}(),Yt=st?st.isBuffer:void 0,Wn=Math.max,fn=Date.now,$n=Uu(ue,"Map"),Yr=Uu(Object,"create"),Ln=function(){function hn(){}return function(Cn){if(!Wa(Cn))return{};if(dn)return dn(Cn);hn.prototype=Cn;var Ir=new hn;return hn.prototype=void 0,Ir}}();function Bn(hn){var Cn=-1,Ir=null==hn?0:hn.length;for(this.clear();++Cn-1},sr.prototype.set=function(hn,Cn){var Ir=this.__data__,Ei=is(Ir,hn);return Ei<0?(++this.size,Ir.push([hn,Cn])):Ir[Ei][1]=Cn,this},Qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Bn,map:new($n||sr),string:new Bn}},Qn.prototype.delete=function(hn){var Cn=Va(this,hn).delete(hn);return this.size-=Cn?1:0,Cn},Qn.prototype.get=function(hn){return Va(this,hn).get(hn)},Qn.prototype.has=function(hn){return Va(this,hn).has(hn)},Qn.prototype.set=function(hn,Cn){var Ir=Va(this,hn),Ei=Ir.size;return Ir.set(hn,Cn),this.size+=Ir.size==Ei?0:1,this},mr.prototype.clear=function(){this.__data__=new sr,this.size=0},mr.prototype.delete=function(hn){var Cn=this.__data__,Ir=Cn.delete(hn);return this.size=Cn.size,Ir},mr.prototype.get=function(hn){return this.__data__.get(hn)},mr.prototype.has=function(hn){return this.__data__.has(hn)},mr.prototype.set=function(hn,Cn){var Ir=this.__data__;if(Ir instanceof sr){var Ei=Ir.__data__;if(!$n||Ei.length<199)return Ei.push([hn,Cn]),this.size=++Ir.size,this;Ir=this.__data__=new Qn(Ei)}return Ir.set(hn,Cn),this.size=Ir.size,this};var ji=function(Cn,Ir,Ei){for(var Os=-1,Cs=Object(Cn),zs=Ei(Cn),Rs=zs.length;Rs--;){var co=zs[++Os];if(!1===Ir(Cs[co],co,Cs))break}return Cn};function so(hn){return null==hn?void 0===hn?"[object Undefined]":"[object Null]":qt&&qt in Object(hn)?function(hn){var Cn=tt.call(hn,qt),Ir=hn[qt];try{hn[qt]=void 0;var Ei=!0}catch{}var Os=ht.call(hn);return Ei&&(Cn?hn[qt]=Ir:delete hn[qt]),Os}(hn):function(hn){return ht.call(hn)}(hn)}function oo(hn){return na(hn)&&so(hn)==x}function _s(hn,Cn,Ir,Ei,Os){hn!==Cn&&ji(Cn,function(Cs,zs){if(Os||(Os=new mr),Wa(Cs))!function(hn,Cn,Ir,Ei,Os,Cs,zs){var Rs=aa(hn,Ir),co=aa(Cn,Ir),Vo=zs.get(co);if(Vo)Xi(hn,Ir,Vo);else{var sa=Cs?Cs(Rs,co,Ir+"",hn,Cn,zs):void 0,nu=void 0===sa;if(nu){var Po=Vs(co),Hu=!Po&&Tu(co),Pc=!Po&&!Hu&&Vu(co);sa=co,Po||Hu||Pc?Vs(Rs)?sa=Rs:function(hn){return na(hn)&&_o(hn)}(Rs)?sa=function(hn,Cn){var Ir=-1,Ei=hn.length;for(Cn||(Cn=Array(Ei));++Ir-1&&hn%1==0&&hn0){if(++Cn>=800)return arguments[0]}else Cn=0;return hn.apply(void 0,arguments)}}(Ms);function Sr(hn,Cn){return hn===Cn||hn!=hn&&Cn!=Cn}var Qi=oo(function(){return arguments}())?oo:function(hn){return na(hn)&&tt.call(hn,"callee")&&!Nt.call(hn,"callee")},Vs=Array.isArray;function _o(hn){return null!=hn&&xo(hn.length)&&!qo(hn)}var Tu=Yt||function(){return!1};function qo(hn){if(!Wa(hn))return!1;var Cn=so(hn);return Cn==h||"[object GeneratorFunction]"==Cn||"[object AsyncFunction]"==Cn||"[object Proxy]"==Cn}function xo(hn){return"number"==typeof hn&&hn>-1&&hn%1==0&&hn<=d}function Wa(hn){var Cn=typeof hn;return null!=hn&&("object"==Cn||"function"==Cn)}function na(hn){return null!=hn&&"object"==typeof hn}var Vu=ne?function(hn){return function(Cn){return hn(Cn)}}(ne):function(hn){return na(hn)&&xo(hn.length)&&!!Q[so(hn)]};function Pu(hn){return _o(hn)?function(hn,Cn){var Ir=Vs(hn),Ei=!Ir&&Qi(hn),Os=!Ir&&!Ei&&Tu(hn),Cs=!Ir&&!Ei&&!Os&&Vu(hn),zs=Ir||Ei||Os||Cs,Rs=zs?function(hn,Cn){for(var Ir=-1,Ei=Array(hn);++Ir1?Ir[Os-1]:void 0,zs=Os>2?Ir[2]:void 0;for(Cs=hn.length>3&&"function"==typeof Cs?(Os--,Cs):void 0,zs&&function(hn,Cn,Ir){if(!Wa(Ir))return!1;var Ei=typeof Cn;return!!("number"==Ei?_o(Ir)&&yo(Cn,Ir.length):"string"==Ei&&Cn in Ir)&&Sr(Ir[Cn],hn)}(Ir[0],Ir[1],zs)&&(Cs=Os<3?void 0:Cs,Os=1),Cn=Object(Cn);++Ei{bt=Y.nmd(bt);var O="__lodash_hash_undefined__",x=1/0,f=9007199254740991,T="[object Arguments]",g="[object Array]",b="[object Boolean]",l="[object Date]",h="[object Error]",u="[object Function]",_="[object Map]",w="[object Number]",S="[object Object]",I="[object Promise]",P="[object RegExp]",L="[object Set]",V="[object String]",W="[object Symbol]",G="[object WeakMap]",H="[object ArrayBuffer]",j="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,B=/^\./,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=/^\[object .+?Constructor\]$/,we=/^(?:0|[1-9]\d*)$/,ae={};ae["[object Float32Array]"]=ae["[object Float64Array]"]=ae["[object Int8Array]"]=ae["[object Int16Array]"]=ae["[object Int32Array]"]=ae["[object Uint8Array]"]=ae["[object Uint8ClampedArray]"]=ae["[object Uint16Array]"]=ae["[object Uint32Array]"]=!0,ae[T]=ae[g]=ae[H]=ae[b]=ae[j]=ae[l]=ae[h]=ae[u]=ae[_]=ae[w]=ae[S]=ae[P]=ae[L]=ae[V]=ae[G]=!1;var Te="object"==typeof global&&global&&global.Object===Object&&global,le="object"==typeof self&&self&&self.Object===Object&&self,X=Te||le||Function("return this")(),ne=be&&!be.nodeType&&be,pe=ne&&bt&&!bt.nodeType&&bt,xe=pe&&pe.exports===ne&&Te.process,Ce=function(){try{return xe&&xe.binding("util")}catch{}}(),ke=Ce&&Ce.isTypedArray;function me(En,Ut,xn,et){for(var zt=-1,gn=En?En.length:0;++zt-1},mr.prototype.set=function(En,Ut){var xn=this.__data__,et=Lu(xn,En);return et<0?xn.push([En,Ut]):xn[et][1]=Ut,this},rs.prototype.clear=function(){this.__data__={hash:new Qn,map:new(Ln||mr),string:new Qn}},rs.prototype.delete=function(En){return ta(this,En).delete(En)},rs.prototype.get=function(En){return ta(this,En).get(En)},rs.prototype.has=function(En){return ta(this,En).has(En)},rs.prototype.set=function(En,Ut){return ta(this,En).set(En,Ut),this},so.prototype.add=so.prototype.push=function(En){return this.__data__.set(En,O),this},so.prototype.has=function(En){return this.__data__.has(En)},Wi.prototype.clear=function(){this.__data__=new mr},Wi.prototype.delete=function(En){return this.__data__.delete(En)},Wi.prototype.get=function(En){return this.__data__.get(En)},Wi.prototype.has=function(En){return this.__data__.has(En)},Wi.prototype.set=function(En,Ut){var xn=this.__data__;if(xn instanceof mr){var et=xn.__data__;if(!Ln||et.length<199)return et.push([En,Ut]),this;xn=this.__data__=new rs(et)}return xn.set(En,Ut),this};var ja=function(xn,et){if(null==xn)return xn;if(!zs(xn))return function(En,Ut){return En&&xa(En,Ut,Wc)}(xn,et);for(var zt=xn.length,gn=-1,kn=Object(xn);++gntr))return!1;var xi=gn.get(En);if(xi&&gn.get(Ut))return xi==Ut;var hs=-1,Ws=!0,As=1&zt?new so:void 0;for(gn.set(En,Ut),gn.set(Ut,En);++hs-1&&En%1==0&&En-1&&En%1==0&&En<=f}function sa(En){var Ut=typeof En;return!!En&&("object"==Ut||"function"==Ut)}function nu(En){return!!En&&"object"==typeof En}function Po(En){return"symbol"==typeof En||nu(En)&&It.call(En)==W}var Hu=ke?function(En){return function(Ut){return En(Ut)}}(ke):function(En){return nu(En)&&Vo(En.length)&&!!ae[It.call(En)]};function Wc(En){return zs(En)?function(En,Ut){var xn=Cs(En)||Os(En)?function(En,Ut){for(var xn=-1,et=Array(En);++xn{bt=Y.nmd(bt);var O="__lodash_hash_undefined__",x=1/0,f=9007199254740991,T="[object Arguments]",g="[object Array]",b="[object Boolean]",l="[object Date]",h="[object Error]",u="[object Function]",_="[object Map]",w="[object Number]",S="[object Object]",I="[object Promise]",P="[object RegExp]",L="[object Set]",V="[object String]",W="[object Symbol]",G="[object WeakMap]",H="[object ArrayBuffer]",j="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,B=/^\./,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=/^\[object .+?Constructor\]$/,we=/^(?:0|[1-9]\d*)$/,ae={};ae["[object Float32Array]"]=ae["[object Float64Array]"]=ae["[object Int8Array]"]=ae["[object Int16Array]"]=ae["[object Int32Array]"]=ae["[object Uint8Array]"]=ae["[object Uint8ClampedArray]"]=ae["[object Uint16Array]"]=ae["[object Uint32Array]"]=!0,ae[T]=ae[g]=ae[H]=ae[b]=ae[j]=ae[l]=ae[h]=ae[u]=ae[_]=ae[w]=ae[S]=ae[P]=ae[L]=ae[V]=ae[G]=!1;var Te="object"==typeof global&&global&&global.Object===Object&&global,le="object"==typeof self&&self&&self.Object===Object&&self,X=Te||le||Function("return this")(),ne=be&&!be.nodeType&&be,pe=ne&&bt&&!bt.nodeType&&bt,xe=pe&&pe.exports===ne&&Te.process,Ce=function(){try{return xe&&xe.binding("util")}catch{}}(),ke=Ce&&Ce.isTypedArray;function me(Ut,xn){return!(!Ut||!Ut.length)&&function(Ut,xn,et){if(xn!=xn)return function(Ut,xn,et,zt){for(var gn=Ut.length,kn=-1;++kn-1}function ze(Ut,xn){for(var et=-1,zt=Ut?Ut.length:0;++et-1},$i.prototype.set=function(Ut,xn){var et=this.__data__,zt=Na(et,Ut);return zt<0?et.push([Ut,xn]):et[zt][1]=xn,this},ji.prototype.clear=function(){this.__data__={hash:new ur,map:new(Lr||$i),string:new ur}},ji.prototype.delete=function(Ut){return ta(this,Ut).delete(Ut)},ji.prototype.get=function(Ut){return ta(this,Ut).get(Ut)},ji.prototype.has=function(Ut){return ta(this,Ut).has(Ut)},ji.prototype.set=function(Ut,xn){return ta(this,Ut).set(Ut,xn),this},_s.prototype.add=_s.prototype.push=function(Ut){return this.__data__.set(Ut,O),this},_s.prototype.has=function(Ut){return this.__data__.has(Ut)},Ms.prototype.clear=function(){this.__data__=new $i},Ms.prototype.delete=function(Ut){return this.__data__.delete(Ut)},Ms.prototype.get=function(Ut){return this.__data__.get(Ut)},Ms.prototype.has=function(Ut){return this.__data__.has(Ut)},Ms.prototype.set=function(Ut,xn){var et=this.__data__;if(et instanceof $i){var zt=et.__data__;if(!Lr||zt.length<199)return zt.push([Ut,xn]),this;et=this.__data__=new ji(zt)}return et.set(Ut,xn),this};var Sr=sr&&1/Wt(new sr([,-0]))[1]==x?function(Ut){return new sr(Ut)}:function(){};function Qi(Ut,xn,et,zt,gn,kn){var tr=2&gn,pi=Ut.length,xi=xn.length;if(pi!=xi&&!(tr&&xi>pi))return!1;var hs=kn.get(Ut);if(hs&&kn.get(xn))return hs==xn;var Ws=-1,As=!0,Ni=1&gn?new _s:void 0;for(kn.set(Ut,xn),kn.set(xn,Ut);++Ws-1&&Ut%1==0&&Ut-1&&Ut%1==0&&Ut<=f}function sa(Ut){var xn=typeof Ut;return!!Ut&&("object"==xn||"function"==xn)}function nu(Ut){return!!Ut&&"object"==typeof Ut}function Po(Ut){return"symbol"==typeof Ut||nu(Ut)&&fn.call(Ut)==W}var Hu=ke?function(Ut){return function(xn){return Ut(xn)}}(ke):function(Ut){return nu(Ut)&&Vo(Ut.length)&&!!ae[fn.call(Ut)]};function Wc(Ut){return zs(Ut)?function(Ut,xn){var et=Cs(Ut)||Os(Ut)?function(Ut,xn){for(var et=-1,zt=Array(Ut);++et=200){var hs=xn?null:Sr(Ut);if(hs)return Wt(hs);tr=!1,gn=Pt,xi=new _s}else xi=xn?[]:pi;e:for(;++zt"']/g,Bn=RegExp(Yr.source),$r=RegExp(Ln.source),Gn=/<%-([\s\S]+?)%>/g,bn=/<%([\s\S]+?)%>/g,Lr=/<%=([\s\S]+?)%>/g,Kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sr=/^\w*$/,Ii=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Un=/[\\^$.*+?()[\]{}|]/g,ir=RegExp(Un.source),ts=/^\s+/,Tn=/\s/,Qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vi=/\{\n\/\* \[wrapped with (.+)\] \*/,ar=/,? & /,br=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ki=/[()=,{}\[\]\/\s]/,ur=/\\(\\)?/g,mr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fr=/\w*$/,hi=/^[-+]0x[0-9a-f]+$/i,wi=/^0b[01]+$/i,cs=/^\[object .+?Constructor\]$/,$i=/^0o[0-7]+$/i,rs=/^(?:0|[1-9]\d*)$/,Xi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$s=/($^)/,is=/['\n\r\u2028\u2029\\]/g,go="\\ud800-\\udfff",zo="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Wi="\\u2700-\\u27bf",bo="a-z\\xdf-\\xf6\\xf8-\\xff",Oi="A-Z\\xc0-\\xd6\\xd8-\\xde",Lu="\\ufe0e\\ufe0f",Qa="\\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",xa="["+go+"]",Du="["+Qa+"]",Na="["+zo+"]",Va="\\d+",Uu="["+Wi+"]",Eu="["+bo+"]",jo="[^"+go+Qa+Va+Wi+bo+Oi+"]",yo="\\ud83c[\\udffb-\\udfff]",El="[^"+go+"]",ec="(?:\\ud83c[\\udde6-\\uddff]){2}",kc="[\\ud800-\\udbff][\\udc00-\\udfff]",Cc="["+Oi+"]",tu="(?:"+Eu+"|"+jo+")",aa="(?:"+Cc+"|"+jo+")",rl="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Jr="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Cr="(?:"+Na+"|"+yo+")?",Sr="["+Lu+"]?",ta=Sr+Cr+"(?:\\u200d(?:"+[El,ec,kc].join("|")+")"+Sr+Cr+")*",Tu="(?:"+[Uu,ec,kc].join("|")+")"+ta,qo="(?:"+[El+Na+"?",Na,ec,kc,xa].join("|")+")",xo=RegExp("['\u2019]","g"),Wa=RegExp(Na,"g"),na=RegExp(yo+"(?="+yo+")|"+qo+ta,"g"),ou=RegExp([Cc+"?"+Eu+"+"+rl+"(?="+[Du,Cc,"$"].join("|")+")",aa+"+"+Jr+"(?="+[Du,Cc+tu,"$"].join("|")+")",Cc+"?"+tu+"+"+rl,Cc+"+"+Jr,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Va,Tu].join("|"),"g"),Vu=RegExp("[\\u200d"+go+zo+Lu+"]"),ua=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pu=["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"],oc=-1,po={};po[gt]=po[St]=po[Wt]=po[dn]=po[Nt]=po[It]=po[qt]=po[jt]=po[Yt]=!0,po[ue]=po[we]=po[st]=po[Te]=po[Ye]=po[le]=po[ne]=po[pe]=po[xe]=po[Ce]=po[me]=po[Ve]=po[nt]=po[tt]=po[wt]=!1;var Sn={};Sn[ue]=Sn[we]=Sn[st]=Sn[Ye]=Sn[Te]=Sn[le]=Sn[gt]=Sn[St]=Sn[Wt]=Sn[dn]=Sn[Nt]=Sn[xe]=Sn[Ce]=Sn[me]=Sn[Ve]=Sn[nt]=Sn[tt]=Sn[mt]=Sn[It]=Sn[qt]=Sn[jt]=Sn[Yt]=!0,Sn[ne]=Sn[pe]=Sn[wt]=!1;var Ir={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ei=parseFloat,Os=parseInt,Cs="object"==typeof global&&global&&global.Object===Object&&global,zs="object"==typeof self&&self&&self.Object===Object&&self,Rs=Cs||zs||Function("return this")(),co=be&&!be.nodeType&&be,Vo=co&&bt&&!bt.nodeType&&bt,sa=Vo&&Vo.exports===co,nu=sa&&Cs.process,Po=function(){try{return Vo&&Vo.require&&Vo.require("util").types||nu&&nu.binding&&nu.binding("util")}catch{}}(),Hu=Po&&Po.isArrayBuffer,Pc=Po&&Po.isDate,ru=Po&&Po.isMap,qd=Po&&Po.isRegExp,Wc=Po&&Po.isSet,nd=Po&&Po.isTypedArray;function Ea(Or,Ti,ii){switch(ii.length){case 0:return Or.call(Ti);case 1:return Or.call(Ti,ii[0]);case 2:return Or.call(Ti,ii[0],ii[1]);case 3:return Or.call(Ti,ii[0],ii[1],ii[2])}return Or.apply(Ti,ii)}function En(Or,Ti,ii,to){for(var da=-1,iu=null==Or?0:Or.length;++da-1}function kn(Or,Ti,ii){for(var to=-1,da=null==Or?0:Or.length;++to-1;);return ii}function Ho(Or,Ti){for(var ii=Or.length;ii--&&Ka(Ti,Or[ii],0)>-1;);return ii}function $o(Or,Ti){for(var ii=Or.length,to=0;ii--;)Or[ii]===Ti&&++to;return to}var oa=Ki({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),Bo=Ki({"&":"&","<":"<",">":">",'"':""","'":"'"});function xf(Or){return"\\"+Ir[Or]}function tc(Or){return Vu.test(Or)}function rd(Or){var Ti=-1,ii=Array(Or.size);return Or.forEach(function(to,da){ii[++Ti]=[da,to]}),ii}function e0(Or,Ti){return function(ii){return Or(Ti(ii))}}function Nc(Or,Ti){for(var ii=-1,to=Or.length,da=0,iu=[];++ii",""":'"',"'":"'"}),Ca=function Or(Ti){var ye,ii=(Ti=null==Ti?Rs:Ca.defaults(Rs.Object(),Ti,Ca.pick(Rs,Pu))).Array,to=Ti.Date,da=Ti.Error,iu=Ti.Function,fu=Ti.Math,Ia=Ti.Object,jh=Ti.RegExp,Lt=Ti.String,en=Ti.TypeError,Dn=ii.prototype,Gr=Ia.prototype,Bi=Ti["__core-js_shared__"],Ai=iu.prototype.toString,gi=Gr.hasOwnProperty,Bs=0,Ns=(ye=/[^.]+$/.exec(Bi&&Bi.keys&&Bi.keys.IE_PROTO||""))?"Symbol(src)_1."+ye:"",ha=Gr.toString,Fo=Ai.call(Ia),Sa=Rs._,Zo=jh("^"+Ai.call(gi).replace(Un,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ma=sa?Ti.Buffer:z,$u=Ti.Symbol,bu=Ti.Uint8Array,au=Ma?Ma.allocUnsafe:z,zl=e0(Ia.getPrototypeOf,Ia),sl=Ia.create,id=Gr.propertyIsEnumerable,Lf=Dn.splice,Uf=$u?$u.isConcatSpreadable:z,zc=$u?$u.iterator:z,Mc=$u?$u.toStringTag:z,Yu=function(){try{var ye=Jt(Ia,"defineProperty");return ye({},"",{}),ye}catch{}}(),hu=Ti.clearTimeout!==Rs.clearTimeout&&Ti.clearTimeout,b1=to&&to.now!==Rs.Date.now&&to.now,yh=Ti.setTimeout!==Rs.setTimeout&&Ti.setTimeout,hd=fu.ceil,Ad=fu.floor,Vh=Ia.getOwnPropertySymbols,j0=Ma?Ma.isBuffer:z,lf=Ti.isFinite,bh=Dn.join,Hh=e0(Ia.keys,Ia),nc=fu.max,Al=fu.min,V0=to.now,v1=Ti.parseInt,df=fu.random,Zd=Dn.reverse,Qs=Jt(Ti,"DataView"),t0=Jt(Ti,"Map"),jf=Jt(Ti,"Promise"),hc=Jt(Ti,"Set"),n0=Jt(Ti,"WeakMap"),H0=Jt(Ia,"create"),ac=n0&&new n0,Id={},Au=ro(Qs),x0=ro(t0),Sd=ro(jf),r0=ro(hc),Yd=ro(n0),kd=$u?$u.prototype:z,ql=kd?kd.valueOf:z,Ef=kd?kd.toString:z;function mn(ye){if(ad(ye)&&!wu(ye)&&!(ye instanceof vu)){if(ye instanceof sd)return ye;if(gi.call(ye,"__wrapped__"))return Qd(ye)}return new sd(ye)}var $0=function(){function ye(){}return function(Be){if(!Ol(Be))return{};if(sl)return sl(Be);ye.prototype=Be;var ct=new ye;return ye.prototype=z,ct}}();function Cd(){}function sd(ye,Be){this.__wrapped__=ye,this.__actions__=[],this.__chain__=!!Be,this.__index__=0,this.__values__=z}function vu(ye){this.__wrapped__=ye,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=B,this.__views__=[]}function s0(ye){var Be=-1,ct=null==ye?0:ye.length;for(this.clear();++Be=Be?ye:Be)),ye}function Sl(ye,Be,ct,Gt,it,Fn){var nr,rn=1&Be,Xr=2&Be,ms=4&Be;if(ct&&(nr=it?ct(ye,Gt,it,Fn):ct(ye)),nr!==z)return nr;if(!Ol(ye))return ye;var ns=wu(ye);if(ns){if(nr=function(ye){var Be=ye.length,ct=new ye.constructor(Be);return Be&&"string"==typeof ye[0]&&gi.call(ye,"index")&&(ct.index=ye.index,ct.input=ye.input),ct}(ye),!rn)return Ct(ye,nr)}else{var Ri=or(ye),Co=Ri==pe||Ri==_e;if(i1(ye))return lr(ye,rn);if(Ri==me||Ri==ue||Co&&!it){if(nr=Xr||Co?{}:Zi(ye),!rn)return Xr?function(ye,Be){return Vt(ye,Xn(ye),Be)}(ye,function(ye,Be){return ye&&Vt(Be,jd(Be),ye)}(nr,ye)):function(ye,Be){return Vt(ye,Pn(ye),Be)}(ye,Dd(nr,ye))}else{if(!Sn[Ri])return it?ye:{};nr=function(ye,Be,ct){var Gt=ye.constructor;switch(Be){case st:return Tr(ye);case Te:case le:return new Gt(+ye);case Ye:return function(ye,Be){var ct=Be?Tr(ye.buffer):ye.buffer;return new ye.constructor(ct,ye.byteOffset,ye.byteLength)}(ye,ct);case gt:case St:case Wt:case dn:case Nt:case It:case qt:case jt:case Yt:return qe(ye,ct);case xe:return new Gt;case Ce:case tt:return new Gt(ye);case Ve:return function(ye){var Be=new ye.constructor(ye.source,Fr.exec(ye));return Be.lastIndex=ye.lastIndex,Be}(ye);case nt:return new Gt;case mt:return function(ye){return ql?Ia(ql.call(ye)):{}}(ye)}}(ye,Ri,rn)}}Fn||(Fn=new pl);var ea=Fn.get(ye);if(ea)return ea;Fn.set(ye,nr),jl(ye)?ye.forEach(function(za){nr.add(Sl(za,Be,ct,za,ye,Fn))}):sg(ye)&&ye.forEach(function(za,Ju){nr.set(Ju,Sl(za,Be,ct,Ju,ye,Fn))});var uu=ns?z:(ms?Xr?Se:Ap:Xr?jd:Hl)(ye);return Ut(uu||ye,function(za,Ju){uu&&(za=ye[Ju=za]),rc(nr,Ju,Sl(za,Be,ct,Ju,ye,Fn))}),nr}function Pd(ye,Be,ct){var Gt=ct.length;if(null==ye)return!Gt;for(ye=Ia(ye);Gt--;){var it=ct[Gt],nr=ye[it];if(nr===z&&!(it in ye)||!(0,Be[it])(nr))return!1}return!0}function T0(ye,Be,ct){if("function"!=typeof ye)throw new en(x);return qf(function(){ye.apply(z,ct)},Be)}function gd(ye,Be,ct,Gt){var it=-1,Fn=gn,nr=!0,rn=ye.length,Xr=[],ms=Be.length;if(!rn)return Xr;ct&&(Be=tr(Be,ka(ct))),Gt?(Fn=kn,nr=!1):Be.length>=200&&(Fn=Eo,nr=!1,Be=new ol(Be));e:for(;++it-1},pf.prototype.set=function(ye,Be){var ct=this.__data__,Gt=_h(ct,ye);return Gt<0?(++this.size,ct.push([ye,Be])):ct[Gt][1]=Be,this},Iu.prototype.clear=function(){this.size=0,this.__data__={hash:new s0,map:new(t0||pf),string:new s0}},Iu.prototype.delete=function(ye){var Be=At(this,ye).delete(ye);return this.size-=Be?1:0,Be},Iu.prototype.get=function(ye){return At(this,ye).get(ye)},Iu.prototype.has=function(ye){return At(this,ye).has(ye)},Iu.prototype.set=function(ye,Be){var ct=At(this,ye),Gt=ct.size;return ct.set(ye,Be),this.size+=ct.size==Gt?0:1,this},ol.prototype.add=ol.prototype.push=function(ye){return this.__data__.set(ye,T),this},ol.prototype.has=function(ye){return this.__data__.has(ye)},pl.prototype.clear=function(){this.__data__=new pf,this.size=0},pl.prototype.delete=function(ye){var Be=this.__data__,ct=Be.delete(ye);return this.size=Be.size,ct},pl.prototype.get=function(ye){return this.__data__.get(ye)},pl.prototype.has=function(ye){return this.__data__.has(ye)},pl.prototype.set=function(ye,Be){var ct=this.__data__;if(ct instanceof pf){var Gt=ct.__data__;if(!t0||Gt.length<199)return Gt.push([ye,Be]),this.size=++ct.size,this;ct=this.__data__=new Iu(Gt)}return ct.set(ye,Be),this.size=ct.size,this};var $f=Zn(Yn),vp=Zn(Jd,!0);function c0(ye,Be){var ct=!0;return $f(ye,function(Gt,it,Fn){return ct=!!Be(Gt,it,Fn)}),ct}function yr(ye,Be,ct){for(var Gt=-1,it=ye.length;++Gt0&&ct(rn)?Be>1?pc(rn,Be-1,ct,Gt,it):pi(it,rn):Gt||(it[it.length]=rn)}return it}var Wf=fr(),w1=fr(!0);function Yn(ye,Be){return ye&&Wf(ye,Be,Hl)}function Jd(ye,Be){return ye&&w1(ye,Be,Hl)}function Mo(ye,Be){return zt(Be,function(ct){return Dp(ye[ct])})}function yd(ye,Be){for(var ct=0,Gt=(Be=Go(Be,ye)).length;null!=ye&&ctBe}function No(ye,Be){return null!=ye&&gi.call(ye,Be)}function uc(ye,Be){return null!=ye&&Be in Ia(ye)}function Bl(ye,Be,ct){for(var Gt=ct?kn:gn,it=ye[0].length,Fn=ye.length,nr=Fn,rn=ii(Fn),Xr=1/0,ms=[];nr--;){var ns=ye[nr];nr&&Be&&(ns=tr(ns,ka(Be))),Xr=Al(ns.length,Xr),rn[nr]=!ct&&(Be||it>=120&&ns.length>=120)?new ol(nr&&ns):z}ns=ye[0];var Ri=-1,Co=rn[0];e:for(;++Ri=rn?Xr:Xr*("desc"==ct[Gt]?-1:1)}return ye.index-Be.index}(Fn,nr,ct)});ii--;)Or[ii]=Or[ii].value;return Or}(E1(ye,function(Fn,nr,rn){return{criteria:tr(Be,function(ms){return ms(Fn)}),index:++Gt,value:Fn}}))}function Cf(ye,Be,ct){for(var Gt=-1,it=Be.length,Fn={};++Gt-1;)rn!==ye&&Lf.call(rn,Xr,1),Lf.call(ye,Xr,1);return ye}function Tp(ye,Be){for(var ct=ye?Be.length:0,Gt=ct-1;ct--;){var it=Be[ct];if(ct==Gt||it!==Fn){var Fn=it;Da(it)?Lf.call(ye,it,1):Rn(ye,it)}}return ye}function K0(ye,Be){return ye+Ad(df()*(Be-ye+1))}function zf(ye,Be){var ct="";if(!ye||Be<1||Be>N)return ct;do{Be%2&&(ct+=ye),(Be=Ad(Be/2))&&(ye+=ye)}while(Be);return ct}function Ja(ye,Be){return ys(p0(ye,Be,O0),ye+"")}function im(ye){return Il(th(ye))}function e1(ye,Be){var ct=th(ye);return Hi(ct,Kl(Be,0,ct.length))}function Je(ye,Be,ct,Gt){if(!Ol(ye))return ye;for(var it=-1,Fn=(Be=Go(Be,ye)).length,nr=Fn-1,rn=ye;null!=rn&&++itit?0:it+Be),(ct=ct>it?it:ct)<0&&(ct+=it),it=Be>ct?0:ct-Be>>>0,Be>>>=0;for(var Fn=ii(it);++Gt>>1,nr=ye[Fn];null!==nr&&!Ih(nr)&&(ct?nr<=Be:nr=200){var ms=Be?null:sm(ye);if(ms)return Kd(ms);nr=!1,it=Eo,Xr=new ol}else Xr=Be?[]:rn;e:for(;++Gt=Gt?ye:We(ye,Be,ct)}var Vn=hu||function(ye){return Rs.clearTimeout(ye)};function lr(ye,Be){if(Be)return ye.slice();var ct=ye.length,Gt=au?au(ct):new ye.constructor(ct);return ye.copy(Gt),Gt}function Tr(ye){var Be=new ye.constructor(ye.byteLength);return new bu(Be).set(new bu(ye)),Be}function qe(ye,Be){var ct=Be?Tr(ye.buffer):ye.buffer;return new ye.constructor(ct,ye.byteOffset,ye.length)}function ge(ye,Be){if(ye!==Be){var ct=ye!==z,Gt=null===ye,it=ye==ye,Fn=Ih(ye),nr=Be!==z,rn=null===Be,Xr=Be==Be,ms=Ih(Be);if(!rn&&!ms&&!Fn&&ye>Be||Fn&&nr&&Xr&&!rn&&!ms||Gt&&nr&&Xr||!ct&&Xr||!it)return 1;if(!Gt&&!Fn&&!ms&&ye1?ct[it-1]:z,nr=it>2?ct[2]:z;for(Fn=ye.length>3&&"function"==typeof Fn?(it--,Fn):z,nr&&eo(ct[0],ct[1],nr)&&(Fn=it<3?z:Fn,it=1),Be=Ia(Be);++Gt-1?it[Fn?Be[nr]:nr]:z}}function es(ye){return Ll(function(Be){var ct=Be.length,Gt=ct,it=sd.prototype.thru;for(ye&&Be.reverse();Gt--;){var Fn=Be[Gt];if("function"!=typeof Fn)throw new en(x);if(it&&!nr&&"wrapper"==Le(Fn))var nr=new sd([],!0)}for(Gt=nr?Gt:ct;++Gt1&&lc.reverse(),ns&&Xrrn))return!1;var ms=Fn.get(ye),ns=Fn.get(Be);if(ms&&ns)return ms==Be&&ns==ye;var Ri=-1,Co=!0,ea=2&ct?new ol:z;for(Fn.set(ye,Be),Fn.set(Be,ye);++Ri-1&&ye%1==0&&ye1?"& ":"")+Be[Gt],Be=Be.join(ct>2?", ":" "),ye.replace(Qn,"{\n/* [wrapped with "+Be+"] */\n")}(Gt,function(ye,Be){return Ut(ce,function(ct){var Gt="_."+ct[0];Be&ct[1]&&!gn(ye,Gt)&&ye.push(Gt)}),ye.sort()}(function(ye){var Be=ye.match(Vi);return Be?Be[1].split(ar):[]}(Gt),ct)))}function C0(ye){var Be=0,ct=0;return function(){var Gt=V0(),it=16-(Gt-ct);if(ct=Gt,it>0){if(++Be>=800)return arguments[0]}else Be=0;return ye.apply(z,arguments)}}function Hi(ye,Be){var ct=-1,Gt=ye.length,it=Gt-1;for(Be=Be===z?Gt:Be;++ct1?ye[Be-1]:z;return ct="function"==typeof ct?(ye.pop(),ct):z,Zh(ye,ct)});function Ta(ye){var Be=mn(ye);return Be.__chain__=!0,Be}function bl(ye,Be){return Be(ye)}var Ul=Ll(function(ye){var Be=ye.length,ct=Be?ye[0]:0,Gt=this.__wrapped__,it=function(Fn){return wh(Fn,ye)};return!(Be>1||this.__actions__.length)&&Gt instanceof vu&&Da(ct)?((Gt=Gt.slice(ct,+ct+(Be?1:0))).__actions__.push({func:bl,args:[it],thisArg:z}),new sd(Gt,this.__chain__).thru(function(Fn){return Be&&!Fn.length&&Fn.push(z),Fn})):this.thru(it)}),Mp=pn(function(ye,Be,ct){gi.call(ye,ct)?++ye[ct]:Hf(ye,ct,1)}),eg=os(pt),Qb=os(vt);function e6(ye,Be){return(wu(ye)?Ut:$f)(ye,ut(Be,3))}function Tv(ye,Be){return(wu(ye)?xn:vp)(ye,ut(Be,3))}var Uy=pn(function(ye,Be,ct){gi.call(ye,ct)?ye[ct].push(Be):Hf(ye,ct,[Be])}),Av=Ja(function(ye,Be,ct){var Gt=-1,it="function"==typeof Be,Fn=m0(ye)?ii(ye.length):[];return $f(ye,function(nr){Fn[++Gt]=it?Ea(Be,nr,ct):qc(nr,Be,ct)}),Fn}),Vy=pn(function(ye,Be,ct){Hf(ye,ct,Be)});function Hy(ye,Be){return(wu(ye)?tr:E1)(ye,ut(Be,3))}var t6=pn(function(ye,Be,ct){ye[ct?0:1].push(Be)},function(){return[[],[]]}),M1=Ja(function(ye,Be){if(null==ye)return[];var ct=Be.length;return ct>1&&eo(ye,Be[0],Be[1])?Be=[]:ct>2&&eo(Be[0],Be[1],Be[2])&&(Be=[Be[0]]),T1(ye,pc(Be,1),[])}),O1=b1||function(){return Rs.Date.now()};function Gg(ye,Be,ct){return Be=ct?z:Be,vd(ye,G,z,z,z,z,Be=ye&&null==Be?ye.length:Be)}function zg(ye,Be){var ct;if("function"!=typeof Be)throw new en(x);return ye=mu(ye),function(){return--ye>0&&(ct=Be.apply(this,arguments)),ye<=1&&(Be=z),ct}}var tg=Ja(function(ye,Be,ct){var Gt=1;if(ct.length){var it=Nc(ct,Qe(tg));Gt|=V}return vd(ye,Gt,Be,ct,it)}),ng=Ja(function(ye,Be,ct){var Gt=3;if(ct.length){var it=Nc(ct,Qe(ng));Gt|=V}return vd(Be,Gt,ye,ct,it)});function qg(ye,Be,ct){var Gt,it,Fn,nr,rn,Xr,ms=0,ns=!1,Ri=!1,Co=!0;if("function"!=typeof ye)throw new en(x);function ea(Hd){var c1=Gt,L1=it;return Gt=it=z,ms=Hd,nr=ye.apply(L1,c1)}function Ga(Hd){return ms=Hd,rn=qf(Ju,Be),ns?ea(Hd):nr}function za(Hd){var c1=Hd-Xr;return Xr===z||c1>=Be||c1<0||Ri&&Hd-ms>=Fn}function Ju(){var Hd=O1();if(za(Hd))return lc(Hd);rn=qf(Ju,function(Hd){var b6=Be-(Hd-Xr);return Ri?Al(b6,Fn-(Hd-ms)):b6}(Hd))}function lc(Hd){return rn=z,Co&&Gt?ea(Hd):(Gt=it=z,nr)}function tf(){var Hd=O1(),c1=za(Hd);if(Gt=arguments,it=this,Xr=Hd,c1){if(rn===z)return Ga(Xr);if(Ri)return Vn(rn),rn=qf(Ju,Be),ea(Xr)}return rn===z&&(rn=qf(Ju,Be)),nr}return Be=g0(Be)||0,Ol(ct)&&(ns=!!ct.leading,Fn=(Ri="maxWait"in ct)?nc(g0(ct.maxWait)||0,Be):Fn,Co="trailing"in ct?!!ct.trailing:Co),tf.cancel=function(){rn!==z&&Vn(rn),ms=0,Gt=Xr=it=rn=z},tf.flush=function(){return rn===z?nr:lc(O1())},tf}var kv=Ja(function(ye,Be){return T0(ye,1,Be)}),E8=Ja(function(ye,Be,ct){return T0(ye,g0(Be)||0,ct)});function Nm(ye,Be){if("function"!=typeof ye||null!=Be&&"function"!=typeof Be)throw new en(x);var ct=function(){var Gt=arguments,it=Be?Be.apply(this,Gt):Gt[0],Fn=ct.cache;if(Fn.has(it))return Fn.get(it);var nr=ye.apply(this,Gt);return ct.cache=Fn.set(it,nr)||Fn,nr};return ct.cache=new(Nm.Cache||Iu),ct}function rg(ye){if("function"!=typeof ye)throw new en(x);return function(){var Be=arguments;switch(Be.length){case 0:return!ye.call(this);case 1:return!ye.call(this,Be[0]);case 2:return!ye.call(this,Be[0],Be[1]);case 3:return!ye.call(this,Be[0],Be[1],Be[2])}return!ye.apply(this,Be)}}Nm.Cache=Iu;var Cv=Ha(function(ye,Be){var ct=(Be=1==Be.length&&wu(Be[0])?tr(Be[0],ka(ut())):tr(pc(Be,1),ka(ut()))).length;return Ja(function(Gt){for(var it=-1,Fn=Al(Gt.length,ct);++it=Be}),um=Sf(function(){return arguments}())?Sf:function(ye){return ad(ye)&&gi.call(ye,"callee")&&!id.call(ye,"callee")},wu=ii.isArray,Jg=Hu?ka(Hu):function(ye){return ad(ye)&&Zl(ye)==st};function m0(ye){return null!=ye&&R1(ye.length)&&!Dp(ye)}function Ud(ye){return ad(ye)&&m0(ye)}var i1=j0||D0,Yy=Pc?ka(Pc):function(ye){return ad(ye)&&Zl(ye)==le};function cm(ye){if(!ad(ye))return!1;var Be=Zl(ye);return Be==ne||"[object DOMException]"==Be||"string"==typeof ye.message&&"string"==typeof ye.name&&!lm(ye)}function Dp(ye){if(!Ol(ye))return!1;var Be=Zl(ye);return Be==pe||Be==_e||"[object AsyncFunction]"==Be||"[object Proxy]"==Be}function m2(ye){return"number"==typeof ye&&ye==mu(ye)}function R1(ye){return"number"==typeof ye&&ye>-1&&ye%1==0&&ye<=N}function Ol(ye){var Be=typeof ye;return null!=ye&&("object"==Be||"function"==Be)}function ad(ye){return null!=ye&&"object"==typeof ye}var sg=ru?ka(ru):function(ye){return ad(ye)&&or(ye)==xe};function Qh(ye){return"number"==typeof ye||ad(ye)&&Zl(ye)==Ce}function lm(ye){if(!ad(ye)||Zl(ye)!=me)return!1;var Be=zl(ye);if(null===Be)return!0;var ct=gi.call(Be,"constructor")&&Be.constructor;return"function"==typeof ct&&ct instanceof ct&&Ai.call(ct)==Fo}var ey=qd?ka(qd):function(ye){return ad(ye)&&Zl(ye)==Ve},jl=Wc?ka(Wc):function(ye){return ad(ye)&&or(ye)==nt};function Zc(ye){return"string"==typeof ye||!wu(ye)&&ad(ye)&&Zl(ye)==tt}function Ih(ye){return"symbol"==typeof ye||ad(ye)&&Zl(ye)==mt}var g2=nd?ka(nd):function(ye){return ad(ye)&&R1(ye.length)&&!!po[Zl(ye)]},Nv=ia(Gf),ag=ia(function(ye,Be){return ye<=Be});function ty(ye){if(!ye)return[];if(m0(ye))return Zc(ye)?Tl(ye):Ct(ye);if(zc&&ye[zc])return function(Or){for(var Ti,ii=[];!(Ti=Or.next()).done;)ii.push(Ti.value);return ii}(ye[zc]());var Be=or(ye);return(Be==xe?rd:Be==nt?Kd:th)(ye)}function Dl(ye){return ye?(ye=g0(ye))===D||ye===-D?17976931348623157e292*(ye<0?-1:1):ye==ye?ye:0:0===ye?ye:0}function mu(ye){var Be=Dl(ye),ct=Be%1;return Be==Be?ct?Be-ct:Be:0}function s1(ye){return ye?Kl(mu(ye),0,B):0}function g0(ye){if("number"==typeof ye)return ye;if(Ih(ye))return a;if(Ol(ye)){var Be="function"==typeof ye.valueOf?ye.valueOf():ye;ye=Ol(Be)?Be+"":Be}if("string"!=typeof ye)return 0===ye?ye:+ye;ye=du(ye);var ct=wi.test(ye);return ct||$i.test(ye)?Os(ye.slice(2),ct?2:8):hi.test(ye)?a:+ye}function y2(ye){return Vt(ye,jd(ye))}function yc(ye){return null==ye?"":cn(ye)}var ny=yn(function(ye,Be){if(Jl(Be)||m0(Be))Vt(Be,Hl(Be),ye);else for(var ct in Be)gi.call(Be,ct)&&rc(ye,ct,Be[ct])}),ug=yn(function(ye,Be){Vt(Be,jd(Be),ye)}),Um=yn(function(ye,Be,ct,Gt){Vt(Be,jd(Be),ye,Gt)}),Qy=yn(function(ye,Be,ct,Gt){Vt(Be,Hl(Be),ye,Gt)}),eb=Ll(wh),ry=Ja(function(ye,Be){ye=Ia(ye);var ct=-1,Gt=Be.length,it=Gt>2?Be[2]:z;for(it&&eo(Be[0],Be[1],it)&&(Gt=1);++ct1),Fn}),Vt(ye,Se(ye),ct),Gt&&(ct=Sl(ct,7,S0));for(var it=Be.length;it--;)Rn(ct,Be[it]);return ct}),w2=Ll(function(ye,Be){return null==ye?{}:function(ye,Be){return Cf(ye,Be,function(ct,Gt){return Vm(ye,Gt)})}(ye,Be)});function dg(ye,Be){if(null==ye)return{};var ct=tr(Se(ye),function(Gt){return[Gt]});return Be=ut(Be),Cf(ye,ct,function(Gt,it){return Be(Gt,it[0])})}var kh=h0(Hl),sy=h0(jd);function th(ye){return null==ye?[]:Dr(ye,Hl(ye))}var Fv=ai(function(ye,Be,ct){return Be=Be.toLowerCase(),ye+(ct?ab(Be):Be)});function ab(ye){return Of(yc(ye).toLowerCase())}function hg(ye){return(ye=yc(ye))&&ye.replace(Xi,oa).replace(Wa,"")}var Lv=ai(function(ye,Be,ct){return ye+(ct?"-":"")+Be.toLowerCase()}),pg=ai(function(ye,Be,ct){return ye+(ct?" ":"")+Be.toLowerCase()}),cb=ci("toLowerCase"),Vv=ai(function(ye,Be,ct){return ye+(ct?"_":"")+Be.toLowerCase()}),fm=ai(function(ye,Be,ct){return ye+(ct?" ":"")+Of(Be)}),p6=ai(function(ye,Be,ct){return ye+(ct?" ":"")+Be.toUpperCase()}),Of=ci("toUpperCase");function M0(ye,Be,ct){return ye=yc(ye),(Be=ct?z:Be)===z?function(Or){return ua.test(Or)}(ye)?function(Or){return Or.match(ou)||[]}(ye):function(Or){return Or.match(br)||[]}(ye):ye.match(Be)||[]}var $v=Ja(function(ye,Be){try{return Ea(ye,z,Be)}catch(ct){return cm(ct)?ct:new da(ct)}}),mg=Ll(function(ye,Be){return Ut(Be,function(ct){ct=_a(ct),Hf(ye,ct,tg(ye[ct],ye))}),ye});function Fc(ye){return function(){return ye}}var g6=es(),lb=es(!0);function O0(ye){return ye}function ya(ye){return xp("function"==typeof ye?ye:Sl(ye,1))}var hm=Ja(function(ye,Be){return function(ct){return qc(ct,ye,Be)}}),ly=Ja(function(ye,Be){return function(ct){return qc(ye,ct,Be)}});function bg(ye,Be,ct){var Gt=Hl(Be),it=Mo(Be,Gt);null==ct&&(!Ol(Be)||!it.length&&Gt.length)&&(ct=Be,Be=ye,ye=this,it=Mo(Be,Hl(Be)));var Fn=!(Ol(ct)&&"chain"in ct&&!ct.chain),nr=Dp(ye);return Ut(it,function(rn){var Xr=Be[rn];ye[rn]=Xr,nr&&(ye.prototype[rn]=function(){var ms=this.__chain__;if(Fn||ms){var ns=ye(this.__wrapped__),Ri=ns.__actions__=Ct(this.__actions__);return Ri.push({func:Xr,args:arguments,thisArg:ye}),ns.__chain__=ms,ns}return Xr.apply(ye,pi([this.value()],arguments))})}),ye}function fy(){}var $m=Us(tr),Wm=Us(et),I2=Us(Ws);function Df(ye){return Wu(ye)?Rc(_a(ye)):function(ye){return function(Be){return yd(Be,ye)}}(ye)}var y6=ao(),Gv=ao(!0);function vg(){return[]}function D0(){return!1}var Xl=Zs(function(ye,Be){return ye+Be},0),Vd=od("ceil"),S2=Zs(function(ye,Be){return ye/Be},1),k2=od("floor"),M2=Zs(function(ye,Be){return ye*Be},1),qm=od("round"),wg=Zs(function(ye,Be){return ye-Be},0);return mn.after=function(ye,Be){if("function"!=typeof Be)throw new en(x);return ye=mu(ye),function(){if(--ye<1)return Be.apply(this,arguments)}},mn.ary=Gg,mn.assign=ny,mn.assignIn=ug,mn.assignInWith=Um,mn.assignWith=Qy,mn.at=eb,mn.before=zg,mn.bind=tg,mn.bindAll=mg,mn.bindKey=ng,mn.castArray=function(){if(!arguments.length)return[];var ye=arguments[0];return wu(ye)?ye:[ye]},mn.chain=Ta,mn.chunk=function(ye,Be,ct){Be=(ct?eo(ye,Be,ct):Be===z)?1:nc(mu(Be),0);var Gt=null==ye?0:ye.length;if(!Gt||Be<1)return[];for(var it=0,Fn=0,nr=ii(hd(Gt/Be));itit?0:it+ct),(Gt=Gt===z||Gt>it?it:mu(Gt))<0&&(Gt+=it),Gt=ct>Gt?0:s1(Gt);ct>>0)?(ye=yc(ye))&&("string"==typeof Be||null!=Be&&!ey(Be))&&!(Be=cn(Be))&&tc(ye)?Ba(Tl(ye),0,ct):ye.split(Be,ct):[]},mn.spread=function(ye,Be){if("function"!=typeof ye)throw new en(x);return Be=null==Be?0:nc(mu(Be),0),Ja(function(ct){var Gt=ct[Be],it=Ba(ct,0,Be);return Gt&&pi(it,Gt),Ea(ye,this,it)})},mn.tail=function(ye){var Be=null==ye?0:ye.length;return Be?We(ye,1,Be):[]},mn.take=function(ye,Be,ct){return ye&&ye.length?We(ye,0,(Be=ct||Be===z?1:mu(Be))<0?0:Be):[]},mn.takeRight=function(ye,Be,ct){var Gt=null==ye?0:ye.length;return Gt?We(ye,(Be=Gt-(Be=ct||Be===z?1:mu(Be)))<0?0:Be,Gt):[]},mn.takeRightWhile=function(ye,Be){return ye&&ye.length?jr(ye,ut(Be,3),!1,!0):[]},mn.takeWhile=function(ye,Be){return ye&&ye.length?jr(ye,ut(Be,3)):[]},mn.tap=function(ye,Be){return Be(ye),ye},mn.throttle=function(ye,Be,ct){var Gt=!0,it=!0;if("function"!=typeof ye)throw new en(x);return Ol(ct)&&(Gt="leading"in ct?!!ct.leading:Gt,it="trailing"in ct?!!ct.trailing:it),qg(ye,Be,{leading:Gt,maxWait:Be,trailing:it})},mn.thru=bl,mn.toArray=ty,mn.toPairs=kh,mn.toPairsIn=sy,mn.toPath=function(ye){return wu(ye)?tr(ye,_a):Ih(ye)?[ye]:Ct(n1(yc(ye)))},mn.toPlainObject=y2,mn.transform=function(ye,Be,ct){var Gt=wu(ye),it=Gt||i1(ye)||g2(ye);if(Be=ut(Be,4),null==ct){var Fn=ye&&ye.constructor;ct=it?Gt?new Fn:[]:Ol(ye)&&Dp(Fn)?$0(zl(ye)):{}}return(it?Ut:Yn)(ye,function(nr,rn,Xr){return Be(ct,nr,rn,Xr)}),ct},mn.unary=function(ye){return Gg(ye,1)},mn.union=Oc,mn.unionBy=Gi,mn.unionWith=Ls,mn.uniq=function(ye){return ye&&ye.length?In(ye):[]},mn.uniqBy=function(ye,Be){return ye&&ye.length?In(ye,ut(Be,2)):[]},mn.uniqWith=function(ye,Be){return Be="function"==typeof Be?Be:z,ye&&ye.length?In(ye,z,Be):[]},mn.unset=function(ye,Be){return null==ye||Rn(ye,Be)},mn.unzip=X2,mn.unzipWith=Zh,mn.update=function(ye,Be,ct){return null==ye?ye:hr(ye,Be,Wo(ct))},mn.updateWith=function(ye,Be,ct,Gt){return Gt="function"==typeof Gt?Gt:z,null==ye?ye:hr(ye,Be,Wo(ct),Gt)},mn.values=th,mn.valuesIn=function(ye){return null==ye?[]:Dr(ye,jd(ye))},mn.without=kp,mn.words=M0,mn.wrap=function(ye,Be){return Bm(Wo(Be),ye)},mn.xor=Jb,mn.xorBy=Yh,mn.xorWith=Q2,mn.zip=pu,mn.zipObject=function(ye,Be){return Nr(ye||[],Be||[],rc)},mn.zipObjectDeep=function(ye,Be){return Nr(ye||[],Be||[],Je)},mn.zipWith=Su,mn.entries=kh,mn.entriesIn=sy,mn.extend=ug,mn.extendWith=Um,bg(mn,mn),mn.add=Xl,mn.attempt=$v,mn.camelCase=Fv,mn.capitalize=ab,mn.ceil=Vd,mn.clamp=function(ye,Be,ct){return ct===z&&(ct=Be,Be=z),ct!==z&&(ct=(ct=g0(ct))==ct?ct:0),Be!==z&&(Be=(Be=g0(Be))==Be?Be:0),Kl(g0(ye),Be,ct)},mn.clone=function(ye){return Sl(ye,4)},mn.cloneDeep=function(ye){return Sl(ye,5)},mn.cloneDeepWith=function(ye,Be){return Sl(ye,5,Be="function"==typeof Be?Be:z)},mn.cloneWith=function(ye,Be){return Sl(ye,4,Be="function"==typeof Be?Be:z)},mn.conformsTo=function(ye,Be){return null==Be||Pd(ye,Be,Hl(Be))},mn.deburr=hg,mn.defaultTo=function(ye,Be){return null==ye||ye!=ye?Be:ye},mn.divide=S2,mn.endsWith=function(ye,Be,ct){ye=yc(ye),Be=cn(Be);var Gt=ye.length,it=ct=ct===z?Gt:Kl(mu(ct),0,Gt);return(ct-=Be.length)>=0&&ye.slice(ct,it)==Be},mn.eq=Ah,mn.escape=function(ye){return(ye=yc(ye))&&$r.test(ye)?ye.replace(Ln,Bo):ye},mn.escapeRegExp=function(ye){return(ye=yc(ye))&&ir.test(ye)?ye.replace(Un,"\\$&"):ye},mn.every=function(ye,Be,ct){var Gt=wu(ye)?et:c0;return ct&&eo(ye,Be,ct)&&(Be=z),Gt(ye,ut(Be,3))},mn.find=eg,mn.findIndex=pt,mn.findKey=function(ye,Be){return lo(ye,ut(Be,3),Yn)},mn.findLast=Qb,mn.findLastIndex=vt,mn.findLastKey=function(ye,Be){return lo(ye,ut(Be,3),Jd)},mn.floor=k2,mn.forEach=e6,mn.forEachRight=Tv,mn.forIn=function(ye,Be){return null==ye?ye:Wf(ye,ut(Be,3),jd)},mn.forInRight=function(ye,Be){return null==ye?ye:w1(ye,ut(Be,3),jd)},mn.forOwn=function(ye,Be){return ye&&Yn(ye,ut(Be,3))},mn.forOwnRight=function(ye,Be){return ye&&Jd(ye,ut(Be,3))},mn.get=_2,mn.gt=Ky,mn.gte=Zy,mn.has=function(ye,Be){return null!=ye&&oi(ye,Be,No)},mn.hasIn=Vm,mn.head=Vr,mn.identity=O0,mn.includes=function(ye,Be,ct,Gt){ye=m0(ye)?ye:th(ye),ct=ct&&!Gt?mu(ct):0;var it=ye.length;return ct<0&&(ct=nc(it+ct,0)),Zc(ye)?ct<=it&&ye.indexOf(Be,ct)>-1:!!it&&Ka(ye,Be,ct)>-1},mn.indexOf=function(ye,Be,ct){var Gt=null==ye?0:ye.length;if(!Gt)return-1;var it=null==ct?0:mu(ct);return it<0&&(it=nc(Gt+it,0)),Ka(ye,Be,it)},mn.inRange=function(ye,Be,ct){return Be=Dl(Be),ct===z?(ct=Be,Be=0):ct=Dl(ct),function(ye,Be,ct){return ye>=Al(Be,ct)&&ye=-N&&ye<=N},mn.isSet=jl,mn.isString=Zc,mn.isSymbol=Ih,mn.isTypedArray=g2,mn.isUndefined=function(ye){return ye===z},mn.isWeakMap=function(ye){return ad(ye)&&or(ye)==wt},mn.isWeakSet=function(ye){return ad(ye)&&"[object WeakSet]"==Zl(ye)},mn.join=function(ye,Be){return null==ye?"":bh.call(ye,Be)},mn.kebabCase=Lv,mn.last=Lo,mn.lastIndexOf=function(ye,Be,ct){var Gt=null==ye?0:ye.length;if(!Gt)return-1;var it=Gt;return ct!==z&&(it=(it=mu(ct))<0?nc(Gt+it,0):Al(it,Gt-1)),Be==Be?function(Or,Ti,ii){for(var to=ii+1;to--;)if(Or[to]===Ti)return to;return to}(ye,Be,it):qs(ye,dl,it,!0)},mn.lowerCase=pg,mn.lowerFirst=cb,mn.lt=Nv,mn.lte=ag,mn.max=function(ye){return ye&&ye.length?yr(ye,O0,A0):z},mn.maxBy=function(ye,Be){return ye&&ye.length?yr(ye,ut(Be,2),A0):z},mn.mean=function(ye){return Gc(ye,O0)},mn.meanBy=function(ye,Be){return Gc(ye,ut(Be,2))},mn.min=function(ye){return ye&&ye.length?yr(ye,O0,Gf):z},mn.minBy=function(ye,Be){return ye&&ye.length?yr(ye,ut(Be,2),Gf):z},mn.stubArray=vg,mn.stubFalse=D0,mn.stubObject=function(){return{}},mn.stubString=function(){return""},mn.stubTrue=function(){return!0},mn.multiply=M2,mn.nth=function(ye,Be){return ye&&ye.length?q0(ye,mu(Be)):z},mn.noConflict=function(){return Rs._===this&&(Rs._=Sa),this},mn.noop=fy,mn.now=O1,mn.pad=function(ye,Be,ct){ye=yc(ye);var Gt=(Be=mu(Be))?dd(ye):0;if(!Be||Gt>=Be)return ye;var it=(Be-Gt)/2;return io(Ad(it),ct)+ye+io(hd(it),ct)},mn.padEnd=function(ye,Be,ct){ye=yc(ye);var Gt=(Be=mu(Be))?dd(ye):0;return Be&&GtBe){var Gt=ye;ye=Be,Be=Gt}if(ct||ye%1||Be%1){var it=df();return Al(ye+it*(Be-ye+Ei("1e-"+((it+"").length-1))),Be)}return K0(ye,Be)},mn.reduce=function(ye,Be,ct){var Gt=wu(ye)?xi:ga,it=arguments.length<3;return Gt(ye,ut(Be,4),ct,it,$f)},mn.reduceRight=function(ye,Be,ct){var Gt=wu(ye)?hs:ga,it=arguments.length<3;return Gt(ye,ut(Be,4),ct,it,vp)},mn.repeat=function(ye,Be,ct){return Be=(ct?eo(ye,Be,ct):Be===z)?1:mu(Be),zf(yc(ye),Be)},mn.replace=function(){var ye=arguments,Be=yc(ye[0]);return ye.length<3?Be:Be.replace(ye[1],ye[2])},mn.result=function(ye,Be,ct){var Gt=-1,it=(Be=Go(Be,ye)).length;for(it||(it=1,ye=z);++GtN)return[];var ct=B,Gt=Al(ye,B);Be=ut(Be),ye-=B;for(var it=wf(Gt,Be);++ct=Fn)return ye;var rn=ct-dd(Gt);if(rn<1)return Gt;var Xr=nr?Ba(nr,0,rn).join(""):ye.slice(0,rn);if(it===z)return Xr+Gt;if(nr&&(rn+=Xr.length-rn),ey(it)){if(ye.slice(rn).search(it)){var ms,ns=Xr;for(it.global||(it=jh(it.source,yc(Fr.exec(it))+"g")),it.lastIndex=0;ms=it.exec(ns);)var Ri=ms.index;Xr=Xr.slice(0,Ri===z?rn:Ri)}}else if(ye.indexOf(cn(it),rn)!=rn){var Co=Xr.lastIndexOf(it);Co>-1&&(Xr=Xr.slice(0,Co))}return Xr+Gt},mn.unescape=function(ye){return(ye=yc(ye))&&Bn.test(ye)?ye.replace(Yr,gh):ye},mn.uniqueId=function(ye){var Be=++Bs;return yc(ye)+Be},mn.upperCase=p6,mn.upperFirst=Of,mn.each=e6,mn.eachRight=Tv,mn.first=Vr,bg(mn,function(){var ye={};return Yn(mn,function(Be,ct){gi.call(mn.prototype,ct)||(ye[ct]=Be)}),ye}(),{chain:!1}),mn.VERSION="4.17.21",Ut(["bind","bindKey","curry","curryRight","partial","partialRight"],function(ye){mn[ye].placeholder=mn}),Ut(["drop","take"],function(ye,Be){vu.prototype[ye]=function(ct){ct=ct===z?1:nc(mu(ct),0);var Gt=this.__filtered__&&!Be?new vu(this):this.clone();return Gt.__filtered__?Gt.__takeCount__=Al(ct,Gt.__takeCount__):Gt.__views__.push({size:Al(ct,B),type:ye+(Gt.__dir__<0?"Right":"")}),Gt},vu.prototype[ye+"Right"]=function(ct){return this.reverse()[ye](ct).reverse()}}),Ut(["filter","map","takeWhile"],function(ye,Be){var ct=Be+1,Gt=1==ct||3==ct;vu.prototype[ye]=function(it){var Fn=this.clone();return Fn.__iteratees__.push({iteratee:ut(it,3),type:ct}),Fn.__filtered__=Fn.__filtered__||Gt,Fn}}),Ut(["head","last"],function(ye,Be){var ct="take"+(Be?"Right":"");vu.prototype[ye]=function(){return this[ct](1).value()[0]}}),Ut(["initial","tail"],function(ye,Be){var ct="drop"+(Be?"":"Right");vu.prototype[ye]=function(){return this.__filtered__?new vu(this):this[ct](1)}}),vu.prototype.compact=function(){return this.filter(O0)},vu.prototype.find=function(ye){return this.filter(ye).head()},vu.prototype.findLast=function(ye){return this.reverse().find(ye)},vu.prototype.invokeMap=Ja(function(ye,Be){return"function"==typeof ye?new vu(this):this.map(function(ct){return qc(ct,ye,Be)})}),vu.prototype.reject=function(ye){return this.filter(rg(ut(ye)))},vu.prototype.slice=function(ye,Be){ye=mu(ye);var ct=this;return ct.__filtered__&&(ye>0||Be<0)?new vu(ct):(ye<0?ct=ct.takeRight(-ye):ye&&(ct=ct.drop(ye)),Be!==z&&(ct=(Be=mu(Be))<0?ct.dropRight(-Be):ct.take(Be-ye)),ct)},vu.prototype.takeRightWhile=function(ye){return this.reverse().takeWhile(ye).reverse()},vu.prototype.toArray=function(){return this.take(B)},Yn(vu.prototype,function(ye,Be){var ct=/^(?:filter|find|map|reject)|While$/.test(Be),Gt=/^(?:head|last)$/.test(Be),it=mn[Gt?"take"+("last"==Be?"Right":""):Be],Fn=Gt||/^find/.test(Be);!it||(mn.prototype[Be]=function(){var nr=this.__wrapped__,rn=Gt?[1]:arguments,Xr=nr instanceof vu,ms=rn[0],ns=Xr||wu(nr),Ri=function(Ju){var lc=it.apply(mn,pi([Ju],rn));return Gt&&Co?lc[0]:lc};ns&&ct&&"function"==typeof ms&&1!=ms.length&&(Xr=ns=!1);var Co=this.__chain__,ea=!!this.__actions__.length,Ga=Fn&&!Co,uu=Xr&&!ea;if(!Fn&&ns){nr=uu?nr:new vu(this);var za=ye.apply(nr,rn);return za.__actions__.push({func:bl,args:[Ri],thisArg:z}),new sd(za,Co)}return Ga&&uu?ye.apply(this,rn):(za=this.thru(Ri),Ga?Gt?za.value()[0]:za.value():za)})}),Ut(["pop","push","shift","sort","splice","unshift"],function(ye){var Be=Dn[ye],ct=/^(?:push|sort|unshift)$/.test(ye)?"tap":"thru",Gt=/^(?:pop|shift)$/.test(ye);mn.prototype[ye]=function(){var it=arguments;if(Gt&&!this.__chain__){var Fn=this.value();return Be.apply(wu(Fn)?Fn:[],it)}return this[ct](function(nr){return Be.apply(wu(nr)?nr:[],it)})}}),Yn(vu.prototype,function(ye,Be){var ct=mn[Be];if(ct){var Gt=ct.name+"";gi.call(Id,Gt)||(Id[Gt]=[]),Id[Gt].push({name:Be,func:ct})}}),Id[Ds(z,2).name]=[{name:"wrapper",func:z}],vu.prototype.clone=function(){var ye=new vu(this.__wrapped__);return ye.__actions__=Ct(this.__actions__),ye.__dir__=this.__dir__,ye.__filtered__=this.__filtered__,ye.__iteratees__=Ct(this.__iteratees__),ye.__takeCount__=this.__takeCount__,ye.__views__=Ct(this.__views__),ye},vu.prototype.reverse=function(){if(this.__filtered__){var ye=new vu(this);ye.__dir__=-1,ye.__filtered__=!0}else(ye=this.clone()).__dir__*=-1;return ye},vu.prototype.value=function(){var ye=this.__wrapped__.value(),Be=this.__dir__,ct=wu(ye),Gt=Be<0,it=ct?ye.length:0,Fn=function(ye,Be,ct){for(var Gt=-1,it=ct.length;++Gt=this.__values__.length;return{done:ye,value:ye?z:this.__values__[this.__index__++]}},mn.prototype.plant=function(ye){for(var Be,ct=this;ct instanceof Cd;){var Gt=Qd(ct);Gt.__index__=0,Gt.__values__=z,Be?it.__wrapped__=Gt:Be=Gt;var it=Gt;ct=ct.__wrapped__}return it.__wrapped__=ye,Be},mn.prototype.reverse=function(){var ye=this.__wrapped__;if(ye instanceof vu){var Be=ye;return this.__actions__.length&&(Be=new vu(this)),(Be=Be.reverse()).__actions__.push({func:bl,args:[Y0],thisArg:z}),new sd(Be,this.__chain__)}return this.thru(Y0)},mn.prototype.toJSON=mn.prototype.valueOf=mn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},mn.prototype.first=mn.prototype.head,zc&&(mn.prototype[zc]=function(){return this}),mn}();Rs._=Ca,(ie=function(){return Ca}.call(be,Y,be,bt))!==z&&(bt.exports=ie)}.call(this)},53264:(bt,be,Y)=>{"use strict";var ie=Y(59879),z=Y(5414),O=Y(55859).Buffer,E=new Array(16);function d(){z.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function x(l,h){return l<>>32-h}function f(l,h,u,m,_,w,S){return x(l+(h&u|~h&m)+_+w|0,S)+h|0}function T(l,h,u,m,_,w,S){return x(l+(h&m|u&~m)+_+w|0,S)+h|0}function g(l,h,u,m,_,w,S){return x(l+(h^u^m)+_+w|0,S)+h|0}function b(l,h,u,m,_,w,S){return x(l+(u^(h|~m))+_+w|0,S)+h|0}ie(d,z),d.prototype._update=function(){for(var l=E,h=0;h<16;++h)l[h]=this._block.readInt32LE(4*h);var u=this._a,m=this._b,_=this._c,w=this._d;u=f(u,m,_,w,l[0],3614090360,7),w=f(w,u,m,_,l[1],3905402710,12),_=f(_,w,u,m,l[2],606105819,17),m=f(m,_,w,u,l[3],3250441966,22),u=f(u,m,_,w,l[4],4118548399,7),w=f(w,u,m,_,l[5],1200080426,12),_=f(_,w,u,m,l[6],2821735955,17),m=f(m,_,w,u,l[7],4249261313,22),u=f(u,m,_,w,l[8],1770035416,7),w=f(w,u,m,_,l[9],2336552879,12),_=f(_,w,u,m,l[10],4294925233,17),m=f(m,_,w,u,l[11],2304563134,22),u=f(u,m,_,w,l[12],1804603682,7),w=f(w,u,m,_,l[13],4254626195,12),_=f(_,w,u,m,l[14],2792965006,17),u=T(u,m=f(m,_,w,u,l[15],1236535329,22),_,w,l[1],4129170786,5),w=T(w,u,m,_,l[6],3225465664,9),_=T(_,w,u,m,l[11],643717713,14),m=T(m,_,w,u,l[0],3921069994,20),u=T(u,m,_,w,l[5],3593408605,5),w=T(w,u,m,_,l[10],38016083,9),_=T(_,w,u,m,l[15],3634488961,14),m=T(m,_,w,u,l[4],3889429448,20),u=T(u,m,_,w,l[9],568446438,5),w=T(w,u,m,_,l[14],3275163606,9),_=T(_,w,u,m,l[3],4107603335,14),m=T(m,_,w,u,l[8],1163531501,20),u=T(u,m,_,w,l[13],2850285829,5),w=T(w,u,m,_,l[2],4243563512,9),_=T(_,w,u,m,l[7],1735328473,14),u=g(u,m=T(m,_,w,u,l[12],2368359562,20),_,w,l[5],4294588738,4),w=g(w,u,m,_,l[8],2272392833,11),_=g(_,w,u,m,l[11],1839030562,16),m=g(m,_,w,u,l[14],4259657740,23),u=g(u,m,_,w,l[1],2763975236,4),w=g(w,u,m,_,l[4],1272893353,11),_=g(_,w,u,m,l[7],4139469664,16),m=g(m,_,w,u,l[10],3200236656,23),u=g(u,m,_,w,l[13],681279174,4),w=g(w,u,m,_,l[0],3936430074,11),_=g(_,w,u,m,l[3],3572445317,16),m=g(m,_,w,u,l[6],76029189,23),u=g(u,m,_,w,l[9],3654602809,4),w=g(w,u,m,_,l[12],3873151461,11),_=g(_,w,u,m,l[15],530742520,16),u=b(u,m=g(m,_,w,u,l[2],3299628645,23),_,w,l[0],4096336452,6),w=b(w,u,m,_,l[7],1126891415,10),_=b(_,w,u,m,l[14],2878612391,15),m=b(m,_,w,u,l[5],4237533241,21),u=b(u,m,_,w,l[12],1700485571,6),w=b(w,u,m,_,l[3],2399980690,10),_=b(_,w,u,m,l[10],4293915773,15),m=b(m,_,w,u,l[1],2240044497,21),u=b(u,m,_,w,l[8],1873313359,6),w=b(w,u,m,_,l[15],4264355552,10),_=b(_,w,u,m,l[6],2734768916,15),m=b(m,_,w,u,l[13],1309151649,21),u=b(u,m,_,w,l[4],4149444226,6),w=b(w,u,m,_,l[11],3174756917,10),_=b(_,w,u,m,l[2],718787259,15),m=b(m,_,w,u,l[9],3951481745,21),this._a=this._a+u|0,this._b=this._b+m|0,this._c=this._c+_|0,this._d=this._d+w|0},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var l=O.allocUnsafe(16);return l.writeInt32LE(this._a,0),l.writeInt32LE(this._b,4),l.writeInt32LE(this._c,8),l.writeInt32LE(this._d,12),l},bt.exports=d},14398:(bt,be,Y)=>{var ie=Y(31770),z=Y(34761);function O(E){this.rand=E||new z.Rand}bt.exports=O,O.create=function(d){return new O(d)},O.prototype._randbelow=function(d){var x=d.bitLength(),f=Math.ceil(x/8);do{var T=new ie(this.rand.generate(f))}while(T.cmp(d)>=0);return T},O.prototype._randrange=function(d,x){var f=x.sub(d);return d.add(this._randbelow(f))},O.prototype.test=function(d,x,f){var T=d.bitLength(),g=ie.mont(d),b=new ie(1).toRed(g);x||(x=Math.max(1,T/48|0));for(var l=d.subn(1),h=0;!l.testn(h);h++);for(var u=d.shrn(h),m=l.toRed(g);x>0;x--){var w=this._randrange(new ie(2),l);f&&f(w);var S=w.toRed(g).redPow(u);if(0!==S.cmp(b)&&0!==S.cmp(m)){for(var I=1;I0;x--){var m=this._randrange(new ie(2),b),_=d.gcd(m);if(0!==_.cmpn(1))return _;var w=m.toRed(T).redPow(h);if(0!==w.cmp(g)&&0!==w.cmp(u)){for(var S=1;S=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Yr=0|k[3],Ln=8191&Yr,Bn=Yr>>>13,$r=0|k[4],Gn=8191&$r,bn=$r>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,Gn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,Gn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,Gn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,Gn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,Gn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,Gn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,Gn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,Gn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,Gn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,Gn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,Gn),a=(a=Math.imul(St,bn))+Math.imul(Wt,Gn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},86055:bt=>{function be(Y,ie){if(!Y)throw new Error(ie||"Assertion failed")}bt.exports=be,be.equal=function(ie,z,O){if(ie!=z)throw new Error(O||"Assertion failed: "+ie+" != "+z)}},14869:(bt,be)=>{"use strict";var Y=be;function z(E){return 1===E.length?"0"+E:E}function O(E){for(var d="",x=0;x>8,b=255&T;g?x.push(g,b):x.push(b)}return x},Y.zero2=z,Y.toHex=O,Y.encode=function(d,x){return"hex"===x?O(d):d}},81380:(bt,be,Y)=>{var ie="function"==typeof Map&&Map.prototype,z=Object.getOwnPropertyDescriptor&&ie?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,O=ie&&z&&"function"==typeof z.get?z.get:null,E=ie&&Map.prototype.forEach,d="function"==typeof Set&&Set.prototype,x=Object.getOwnPropertyDescriptor&&d?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,f=d&&x&&"function"==typeof x.get?x.get:null,T=d&&Set.prototype.forEach,b="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,w=Object.prototype.toString,S=Function.prototype.toString,I=String.prototype.match,P=String.prototype.slice,L=String.prototype.replace,V=String.prototype.toUpperCase,W=String.prototype.toLowerCase,G=RegExp.prototype.test,H=Array.prototype.concat,j=Array.prototype.join,K=Array.prototype.slice,R=Math.floor,o="function"==typeof BigInt?BigInt.prototype.valueOf:null,y=Object.getOwnPropertySymbols,M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,v="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol,1)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(It){return It.__proto__}:null);function C(It,qt){if(It===1/0||It===-1/0||It!=It||It&&It>-1e3&&It<1e3||G.call(/e/,qt))return qt;var jt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof It){var Yt=It<0?-R(-It):R(It);if(Yt!==It){var Wn=String(Yt),fn=P.call(qt,Wn.length+1);return L.call(Wn,jt,"$&_")+"."+L.call(L.call(fn,/([0-9]{3})/g,"$&_"),/_$/,"")}}return L.call(qt,jt,"$&_")}var a=Y(24654),B=a.custom,Q=pe(B)?B:null;function ee(It,qt,jt){var Yt="double"===(jt.quoteStyle||qt)?'"':"'";return Yt+It+Yt}function ce(It){return L.call(String(It),/"/g,""")}function ue(It){return!("[object Array]"!==ke(It)||k&&"object"==typeof It&&k in It)}function ae(It){return!("[object RegExp]"!==ke(It)||k&&"object"==typeof It&&k in It)}function pe(It){if(v)return It&&"object"==typeof It&&It instanceof Symbol;if("symbol"==typeof It)return!0;if(!It||"object"!=typeof It||!M)return!1;try{return M.call(It),!0}catch{}return!1}bt.exports=function It(qt,jt,Yt,Wn){var fn=jt||{};if(Ce(fn,"quoteStyle")&&"single"!==fn.quoteStyle&&"double"!==fn.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ce(fn,"maxStringLength")&&("number"==typeof fn.maxStringLength?fn.maxStringLength<0&&fn.maxStringLength!==1/0:null!==fn.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var $n=!Ce(fn,"customInspect")||fn.customInspect;if("boolean"!=typeof $n&&"symbol"!==$n)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ce(fn,"indent")&&null!==fn.indent&&"\t"!==fn.indent&&!(parseInt(fn.indent,10)===fn.indent&&fn.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ce(fn,"numericSeparator")&&"boolean"!=typeof fn.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Yr=fn.numericSeparator;if(void 0===qt)return"undefined";if(null===qt)return"null";if("boolean"==typeof qt)return qt?"true":"false";if("string"==typeof qt)return wt(qt,fn);if("number"==typeof qt){if(0===qt)return 1/0/qt>0?"0":"-0";var Ln=String(qt);return Yr?C(qt,Ln):Ln}if("bigint"==typeof qt){var Bn=String(qt)+"n";return Yr?C(qt,Bn):Bn}var $r=void 0===fn.depth?5:fn.depth;if(void 0===Yt&&(Yt=0),Yt>=$r&&$r>0&&"object"==typeof qt)return ue(qt)?"[Array]":"[Object]";var Gn=function(It,qt){var jt;if("\t"===It.indent)jt="\t";else{if(!("number"==typeof It.indent&&It.indent>0))return null;jt=j.call(Array(It.indent+1)," ")}return{base:jt,prev:j.call(Array(qt+1),jt)}}(fn,Yt);if(void 0===Wn)Wn=[];else if(Ee(Wn,qt)>=0)return"[Circular]";function bn(hi,wi,cs){if(wi&&(Wn=K.call(Wn)).push(wi),cs){var $i={depth:fn.depth};return Ce(fn,"quoteStyle")&&($i.quoteStyle=fn.quoteStyle),It(hi,$i,Yt+1,Wn)}return It(hi,fn,Yt+1,Wn)}if("function"==typeof qt&&!ae(qt)){var Lr=function(It){if(It.name)return It.name;var qt=I.call(S.call(It),/^function\s*([\w$]+)/);return qt?qt[1]:null}(qt),Kn=Nt(qt,bn);return"[Function"+(Lr?": "+Lr:" (anonymous)")+"]"+(Kn.length>0?" { "+j.call(Kn,", ")+" }":"")}if(pe(qt)){var sr=v?L.call(String(qt),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(qt);return"object"!=typeof qt||v?sr:st(sr)}if(function(It){return!(!It||"object"!=typeof It)&&("undefined"!=typeof HTMLElement&&It instanceof HTMLElement||"string"==typeof It.nodeName&&"function"==typeof It.getAttribute)}(qt)){for(var Ii="<"+W.call(String(qt.nodeName)),Un=qt.attributes||[],ir=0;ir"}if(ue(qt)){if(0===qt.length)return"[]";var ts=Nt(qt,bn);return Gn&&!function(It){for(var qt=0;qt=0)return!1;return!0}(ts)?"["+dn(ts,Gn)+"]":"[ "+j.call(ts,", ")+" ]"}if(function(It){return!("[object Error]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt)){var Tn=Nt(qt,bn);return"cause"in Error.prototype||!("cause"in qt)||D.call(qt,"cause")?0===Tn.length?"["+String(qt)+"]":"{ ["+String(qt)+"] "+j.call(Tn,", ")+" }":"{ ["+String(qt)+"] "+j.call(H.call("[cause]: "+bn(qt.cause),Tn),", ")+" }"}if("object"==typeof qt&&$n){if(Q&&"function"==typeof qt[Q]&&a)return a(qt,{depth:$r-Yt});if("symbol"!==$n&&"function"==typeof qt.inspect)return qt.inspect()}if(function(It){if(!O||!It||"object"!=typeof It)return!1;try{O.call(It);try{f.call(It)}catch{return!0}return It instanceof Map}catch{}return!1}(qt)){var Qn=[];return E&&E.call(qt,function(hi,wi){Qn.push(bn(wi,qt,!0)+" => "+bn(hi,qt))}),gt("Map",O.call(qt),Qn,Gn)}if(function(It){if(!f||!It||"object"!=typeof It)return!1;try{f.call(It);try{O.call(It)}catch{return!0}return It instanceof Set}catch{}return!1}(qt)){var Vi=[];return T&&T.call(qt,function(hi){Vi.push(bn(hi,qt))}),gt("Set",f.call(qt),Vi,Gn)}if(function(It){if(!b||!It||"object"!=typeof It)return!1;try{b.call(It,b);try{h.call(It,h)}catch{return!0}return It instanceof WeakMap}catch{}return!1}(qt))return Ye("WeakMap");if(function(It){if(!h||!It||"object"!=typeof It)return!1;try{h.call(It,h);try{b.call(It,b)}catch{return!0}return It instanceof WeakSet}catch{}return!1}(qt))return Ye("WeakSet");if(function(It){if(!m||!It||"object"!=typeof It)return!1;try{return m.call(It),!0}catch{}return!1}(qt))return Ye("WeakRef");if(function(It){return!("[object Number]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt))return st(bn(Number(qt)));if(function(It){if(!It||"object"!=typeof It||!o)return!1;try{return o.call(It),!0}catch{}return!1}(qt))return st(bn(o.call(qt)));if(function(It){return!("[object Boolean]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt))return st(_.call(qt));if(function(It){return!("[object String]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt))return st(bn(String(qt)));if(!function(It){return!("[object Date]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt)&&!ae(qt)){var ar=Nt(qt,bn),br=N?N(qt)===Object.prototype:qt instanceof Object||qt.constructor===Object,ki=qt instanceof Object?"":"null prototype",ur=!br&&k&&Object(qt)===qt&&k in qt?P.call(ke(qt),8,-1):ki?"Object":"",Fr=(br||"function"!=typeof qt.constructor?"":qt.constructor.name?qt.constructor.name+" ":"")+(ur||ki?"["+j.call(H.call([],ur||[],ki||[]),": ")+"] ":"");return 0===ar.length?Fr+"{}":Gn?Fr+"{"+dn(ar,Gn)+"}":Fr+"{ "+j.call(ar,", ")+" }"}return String(qt)};var xe=Object.prototype.hasOwnProperty||function(It){return It in this};function Ce(It,qt){return xe.call(It,qt)}function ke(It){return w.call(It)}function Ee(It,qt){if(It.indexOf)return It.indexOf(qt);for(var jt=0,Yt=It.length;jtqt.maxStringLength){var jt=It.length-qt.maxStringLength,Yt="... "+jt+" more character"+(jt>1?"s":"");return wt(P.call(It,0,qt.maxStringLength),qt)+Yt}return ee(L.call(L.call(It,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Pt),"single",qt)}function Pt(It){var qt=It.charCodeAt(0),jt={8:"b",9:"t",10:"n",12:"f",13:"r"}[qt];return jt?"\\"+jt:"\\x"+(qt<16?"0":"")+V.call(qt.toString(16))}function st(It){return"Object("+It+")"}function Ye(It){return It+" { ? }"}function gt(It,qt,jt,Yt){return It+" ("+qt+") {"+(Yt?dn(jt,Yt):j.call(jt,", "))+"}"}function dn(It,qt){if(0===It.length)return"";var jt="\n"+qt.prev+qt.base;return jt+j.call(It,","+jt)+"\n"+qt.prev}function Nt(It,qt){var jt=ue(It),Yt=[];if(jt){Yt.length=It.length;for(var Wn=0;Wn{"use strict";var ie=Y(62016);be.certificate=Y(96240);var z=ie.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});be.RSAPrivateKey=z;var O=ie.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});be.RSAPublicKey=O;var E=ie.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(d),this.key("subjectPublicKey").bitstr())});be.PublicKey=E;var d=ie.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),x=ie.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(d),this.key("subjectPrivateKey").octstr())});be.PrivateKey=x;var f=ie.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});be.EncryptedPrivateKey=f;var T=ie.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});be.DSAPrivateKey=T,be.DSAparam=ie.define("DSAparam",function(){this.int()});var g=ie.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(b),this.key("publicKey").optional().explicit(1).bitstr())});be.ECPrivateKey=g;var b=ie.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});be.signature=ie.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},96240:(bt,be,Y)=>{"use strict";var ie=Y(62016),z=ie.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),O=ie.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),E=ie.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),d=ie.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(E),this.key("subjectPublicKey").bitstr())}),x=ie.define("RelativeDistinguishedName",function(){this.setof(O)}),f=ie.define("RDNSequence",function(){this.seqof(x)}),T=ie.define("Name",function(){this.choice({rdnSequence:this.use(f)})}),g=ie.define("Validity",function(){this.seq().obj(this.key("notBefore").use(z),this.key("notAfter").use(z))}),b=ie.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),l=ie.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(E),this.key("issuer").use(T),this.key("validity").use(g),this.key("subject").use(T),this.key("subjectPublicKeyInfo").use(d),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(b).optional())}),h=ie.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(E),this.key("signatureValue").bitstr())});bt.exports=h},61553:(bt,be,Y)=>{var ie=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,z=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,O=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,E=Y(92367),d=Y(39586),x=Y(55859).Buffer;bt.exports=function(f,T){var l,g=f.toString(),b=g.match(ie);if(b){var u="aes"+b[1],m=x.from(b[2],"hex"),_=x.from(b[3].replace(/[\r\n]/g,""),"base64"),w=E(T,m.slice(0,8),parseInt(b[1],10)).key,S=[],I=d.createDecipheriv(u,w,m);S.push(I.update(_)),S.push(I.final()),l=x.concat(S)}else{var h=g.match(O);l=x.from(h[2].replace(/[\r\n]/g,""),"base64")}return{tag:g.match(z)[1],data:l}}},81997:(bt,be,Y)=>{var ie=Y(44673),z=Y(22562),O=Y(61553),E=Y(39586),d=Y(14161),x=Y(55859).Buffer;function f(g){var b;"object"==typeof g&&!x.isBuffer(g)&&(b=g.passphrase,g=g.key),"string"==typeof g&&(g=x.from(g));var m,_,l=O(g,b),h=l.tag,u=l.data;switch(h){case"CERTIFICATE":_=ie.certificate.decode(u,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(_||(_=ie.PublicKey.decode(u,"der")),m=_.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return ie.RSAPublicKey.decode(_.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return _.subjectPrivateKey=_.subjectPublicKey,{type:"ec",data:_};case"1.2.840.10040.4.1":return _.algorithm.params.pub_key=ie.DSAparam.decode(_.subjectPublicKey.data,"der"),{type:"dsa",data:_.algorithm.params};default:throw new Error("unknown key id "+m)}case"ENCRYPTED PRIVATE KEY":u=function(g,b){var l=g.algorithm.decrypt.kde.kdeparams.salt,h=parseInt(g.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=z[g.algorithm.decrypt.cipher.algo.join(".")],m=g.algorithm.decrypt.cipher.iv,_=g.subjectPrivateKey,w=parseInt(u.split("-")[1],10)/8,S=d.pbkdf2Sync(b,l,h,w,"sha1"),I=E.createDecipheriv(u,S,m),P=[];return P.push(I.update(_)),P.push(I.final()),x.concat(P)}(u=ie.EncryptedPrivateKey.decode(u,"der"),b);case"PRIVATE KEY":switch(m=(_=ie.PrivateKey.decode(u,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return ie.RSAPrivateKey.decode(_.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:_.algorithm.curve,privateKey:ie.ECPrivateKey.decode(_.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return _.algorithm.params.priv_key=ie.DSAparam.decode(_.subjectPrivateKey,"der"),{type:"dsa",params:_.algorithm.params};default:throw new Error("unknown key id "+m)}case"RSA PUBLIC KEY":return ie.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return ie.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:ie.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return{curve:(u=ie.ECPrivateKey.decode(u,"der")).parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+h)}}bt.exports=f,f.signature=ie.signature},14161:(bt,be,Y)=>{be.pbkdf2=Y(51898),be.pbkdf2Sync=Y(205)},51898:(bt,be,Y)=>{var x,l,ie=Y(55859).Buffer,z=Y(79024),O=Y(85657),E=Y(205),d=Y(16933),f=global.crypto&&global.crypto.subtle,T={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},g=[];function h(){return l||(l=global.process&&global.process.nextTick?global.process.nextTick:global.queueMicrotask?global.queueMicrotask:global.setImmediate?global.setImmediate:global.setTimeout)}function u(_,w,S,I,P){return f.importKey("raw",_,{name:"PBKDF2"},!1,["deriveBits"]).then(function(L){return f.deriveBits({name:"PBKDF2",salt:w,iterations:S,hash:{name:P}},L,I<<3)}).then(function(L){return ie.from(L)})}bt.exports=function(_,w,S,I,P,L){"function"==typeof P&&(L=P,P=void 0);var V=T[(P=P||"sha1").toLowerCase()];if(V&&"function"==typeof global.Promise){if(z(S,I),_=d(_,O,"Password"),w=d(w,O,"Salt"),"function"!=typeof L)throw new Error("No callback provided to pbkdf2");!function(_,w){_.then(function(S){h()(function(){w(null,S)})},function(S){h()(function(){w(S)})})}(function(_){if(global.process&&!global.process.browser||!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==g[_])return g[_];var w=u(x=x||ie.alloc(8),x,10,128,_).then(function(){return!0}).catch(function(){return!1});return g[_]=w,w}(V).then(function(W){return W?u(_,w,S,I,V):E(_,w,S,I,P)}),L)}else h()(function(){var W;try{W=E(_,w,S,I,P)}catch(G){return L(G)}L(null,W)})}},85657:bt=>{var be;be=global.process&&global.process.browser?"utf-8":global.process&&global.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",bt.exports=be},79024:bt=>{var be=Math.pow(2,30)-1;bt.exports=function(Y,ie){if("number"!=typeof Y)throw new TypeError("Iterations not a number");if(Y<0)throw new TypeError("Bad iterations");if("number"!=typeof ie)throw new TypeError("Key length not a number");if(ie<0||ie>be||ie!=ie)throw new TypeError("Bad key length")}},205:(bt,be,Y)=>{var ie=Y(84464),z=Y(75207),O=Y(45829),E=Y(55859).Buffer,d=Y(79024),x=Y(85657),f=Y(16933),T=E.alloc(128),g={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function b(u,m,_){var w=function(u){return"rmd160"===u||"ripemd160"===u?function(w){return(new z).update(w).digest()}:"md5"===u?ie:function(w){return O(u).update(w).digest()}}(u),S="sha512"===u||"sha384"===u?128:64;m.length>S?m=w(m):m.length{var ie=Y(55859).Buffer;bt.exports=function(z,O,E){if(ie.isBuffer(z))return z;if("string"==typeof z)return ie.from(z,O);if(ArrayBuffer.isView(z))return ie.from(z.buffer);throw new TypeError(E+" must be a string, a Buffer, a typed array or a DataView")}},37537:(bt,be,Y)=>{be.publicEncrypt=Y(74760),be.privateDecrypt=Y(31548),be.privateEncrypt=function(z,O){return be.publicEncrypt(z,O,!0)},be.publicDecrypt=function(z,O){return be.privateDecrypt(z,O,!0)}},30444:(bt,be,Y)=>{var ie=Y(12506),z=Y(55859).Buffer;function O(E){var d=z.allocUnsafe(4);return d.writeUInt32BE(E,0),d}bt.exports=function(E,d){for(var T,x=z.alloc(0),f=0;x.length=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Yr=0|k[3],Ln=8191&Yr,Bn=Yr>>>13,$r=0|k[4],Gn=8191&$r,bn=$r>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,Gn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,Gn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,Gn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,Gn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,Gn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,Gn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,Gn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,Gn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,Gn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,Gn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,Gn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,Gn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,Gn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,Gn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,Gn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,Gn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,Gn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,Gn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,Gn),a=(a=Math.imul(St,bn))+Math.imul(Wt,Gn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},31548:(bt,be,Y)=>{var ie=Y(81997),z=Y(30444),O=Y(84541),E=Y(46494),d=Y(85842),x=Y(12506),f=Y(6829),T=Y(55859).Buffer;bt.exports=function(u,m,_){var w;w=u.padding?u.padding:_?1:4;var P,S=ie(u),I=S.modulus.byteLength();if(m.length>I||new E(m).cmp(S.modulus)>=0)throw new Error("decryption error");P=_?f(new E(m),S):d(m,S);var L=T.alloc(I-P.length);if(P=T.concat([L,P],I),4===w)return function(h,u){var m=h.modulus.byteLength(),_=x("sha1").update(T.alloc(0)).digest(),w=_.length;if(0!==u[0])throw new Error("decryption error");var S=u.slice(1,w+1),I=u.slice(w+1),P=O(S,z(I,w)),L=O(I,z(P,m-w-1));if(function(h,u){h=T.from(h),u=T.from(u);var m=0,_=h.length;h.length!==u.length&&(m++,_=Math.min(h.length,u.length));for(var w=-1;++w<_;)m+=h[w]^u[w];return m}(_,L.slice(0,w)))throw new Error("decryption error");for(var V=w;0===L[V];)V++;if(1!==L[V++])throw new Error("decryption error");return L.slice(V)}(S,P);if(1===w)return function(h,u,m){for(var _=u.slice(0,2),w=2,S=0;0!==u[w++];)if(w>=u.length){S++;break}var I=u.slice(2,w-1);if(("0002"!==_.toString("hex")&&!m||"0001"!==_.toString("hex")&&m)&&S++,I.length<8&&S++,S)throw new Error("decryption error");return u.slice(w)}(0,P,_);if(3===w)return P;throw new Error("unknown padding")}},74760:(bt,be,Y)=>{var ie=Y(81997),z=Y(16589),O=Y(12506),E=Y(30444),d=Y(84541),x=Y(46494),f=Y(6829),T=Y(85842),g=Y(55859).Buffer;bt.exports=function(m,_,w){var S;S=m.padding?m.padding:w?1:4;var P,I=ie(m);if(4===S)P=function(u,m){var _=u.modulus.byteLength(),w=m.length,S=O("sha1").update(g.alloc(0)).digest(),I=S.length,P=2*I;if(w>_-P-2)throw new Error("message too long");var L=g.alloc(_-w-P-2),V=_-I-1,W=z(I),G=d(g.concat([S,L,g.alloc(1,1),m],V),E(W,V)),H=d(W,E(G,I));return new x(g.concat([g.alloc(1),H,G],_))}(I,_);else if(1===S)P=function(u,m,_){var I,w=m.length,S=u.modulus.byteLength();if(w>S-11)throw new Error("message too long");return I=_?g.alloc(S-w-3,255):function(u){for(var I,m=g.allocUnsafe(u),_=0,w=z(2*u),S=0;_=0)throw new Error("data too long for modulus")}return w?T(P,I):f(P,I)}},6829:(bt,be,Y)=>{var ie=Y(46494),z=Y(55859).Buffer;bt.exports=function(E,d){return z.from(E.toRed(ie.mont(d.modulus)).redPow(new ie(d.publicExponent)).fromRed().toArray())}},84541:bt=>{bt.exports=function(Y,ie){for(var z=Y.length,O=-1;++O{"use strict";var be=String.prototype.replace,Y=/%20/g;bt.exports={default:"RFC3986",formatters:{RFC1738:function(z){return be.call(z,Y,"+")},RFC3986:function(z){return String(z)}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},59009:(bt,be,Y)=>{"use strict";var ie=Y(75672),z=Y(19913),O=Y(8157);bt.exports={formats:O,parse:z,stringify:ie}},19913:(bt,be,Y)=>{"use strict";var ie=Y(16835),z=Object.prototype.hasOwnProperty,O=Array.isArray,E={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ie.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},x=function(u,m){return u&&"string"==typeof u&&m.comma&&u.indexOf(",")>-1?u.split(","):u},l=function(m,_,w,S){if(m){var I=w.allowDots?m.replace(/\.([^.[]+)/g,"[$1]"):m,L=/(\[[^[\]]*])/g,V=w.depth>0&&/(\[[^[\]]*])/.exec(I),W=V?I.slice(0,V.index):I,G=[];if(W){if(!w.plainObjects&&z.call(Object.prototype,W)&&!w.allowPrototypes)return;G.push(W)}for(var H=0;w.depth>0&&null!==(V=L.exec(I))&&H=0;--I){var P,L=u[I];if("[]"===L&&_.parseArrays)P=[].concat(S);else{P=_.plainObjects?Object.create(null):{};var V="["===L.charAt(0)&&"]"===L.charAt(L.length-1)?L.slice(1,-1):L,W=parseInt(V,10);_.parseArrays||""!==V?!isNaN(W)&&L!==V&&String(W)===V&&W>=0&&_.parseArrays&&W<=_.arrayLimit?(P=[])[W]=S:"__proto__"!==V&&(P[V]=S):P={0:S}}S=P}return S}(G,_,w,S)}};bt.exports=function(u,m){var _=function(m){if(!m)return E;if(null!=m.decoder&&"function"!=typeof m.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==m.charset&&"utf-8"!==m.charset&&"iso-8859-1"!==m.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===m.allowDots?E.allowDots:!!m.allowDots,allowPrototypes:"boolean"==typeof m.allowPrototypes?m.allowPrototypes:E.allowPrototypes,allowSparse:"boolean"==typeof m.allowSparse?m.allowSparse:E.allowSparse,arrayLimit:"number"==typeof m.arrayLimit?m.arrayLimit:E.arrayLimit,charset:void 0===m.charset?E.charset:m.charset,charsetSentinel:"boolean"==typeof m.charsetSentinel?m.charsetSentinel:E.charsetSentinel,comma:"boolean"==typeof m.comma?m.comma:E.comma,decoder:"function"==typeof m.decoder?m.decoder:E.decoder,delimiter:"string"==typeof m.delimiter||ie.isRegExp(m.delimiter)?m.delimiter:E.delimiter,depth:"number"==typeof m.depth||!1===m.depth?+m.depth:E.depth,ignoreQueryPrefix:!0===m.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof m.interpretNumericEntities?m.interpretNumericEntities:E.interpretNumericEntities,parameterLimit:"number"==typeof m.parameterLimit?m.parameterLimit:E.parameterLimit,parseArrays:!1!==m.parseArrays,plainObjects:"boolean"==typeof m.plainObjects?m.plainObjects:E.plainObjects,strictNullHandling:"boolean"==typeof m.strictNullHandling?m.strictNullHandling:E.strictNullHandling}}(m);if(""===u||null==u)return _.plainObjects?Object.create(null):{};for(var w="string"==typeof u?function(m,_){var V,w={__proto__:null},P=(_.ignoreQueryPrefix?m.replace(/^\?/,""):m).split(_.delimiter,_.parameterLimit===1/0?void 0:_.parameterLimit),L=-1,W=_.charset;if(_.charsetSentinel)for(V=0;V{"use strict";var ie=Y(11144),z=Y(16835),O=Y(8157),E=Object.prototype.hasOwnProperty,d={brackets:function(S){return S+"[]"},comma:"comma",indices:function(S,I){return S+"["+I+"]"},repeat:function(S){return S}},x=Array.isArray,f=Array.prototype.push,T=function(w,S){f.apply(w,x(S)?S:[S])},g=Date.prototype.toISOString,b=O.default,l={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:z.encode,encodeValuesOnly:!1,format:b,formatter:O.formatters[b],indices:!1,serializeDate:function(S){return g.call(S)},skipNulls:!1,strictNullHandling:!1},u={},m=function w(S,I,P,L,V,W,G,H,j,K,R,o,y,M,v,k){for(var D=S,N=k,C=0,a=!1;void 0!==(N=N.get(u))&&!a;){var B=N.get(S);if(C+=1,void 0!==B){if(B===C)throw new RangeError("Cyclic object value");a=!0}void 0===N.get(u)&&(C=0)}if("function"==typeof H?D=H(I,D):D instanceof Date?D=R(D):"comma"===P&&x(D)&&(D=z.maybeMap(D,function(pe){return pe instanceof Date?R(pe):pe})),null===D){if(V)return G&&!M?G(I,l.encoder,v,"key",o):I;D=""}if(function(S){return"string"==typeof S||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S}(D)||z.isBuffer(D))return G?[y(M?I:G(I,l.encoder,v,"key",o))+"="+y(G(D,l.encoder,v,"value",o))]:[y(I)+"="+y(String(D))];var ce,ee=[];if(void 0===D)return ee;if("comma"===P&&x(D))M&&G&&(D=z.maybeMap(D,G)),ce=[{value:D.length>0?D.join(",")||null:void 0}];else if(x(H))ce=H;else{var ue=Object.keys(D);ce=j?ue.sort(j):ue}for(var we=L&&x(D)&&1===D.length?I+"[]":I,ae=0;ae0?M+y:""}},16835:(bt,be,Y)=>{"use strict";var ie=Y(8157),z=Object.prototype.hasOwnProperty,O=Array.isArray,E=function(){for(var w=[],S=0;S<256;++S)w.push("%"+((S<16?"0":"")+S.toString(16)).toUpperCase());return w}(),x=function(S,I){for(var P=I&&I.plainObjects?Object.create(null):{},L=0;L1;){var I=S.pop(),P=I.obj[I.prop];if(O(P)){for(var L=[],V=0;V=48&&j<=57||j>=65&&j<=90||j>=97&&j<=122||V===ie.RFC1738&&(40===j||41===j)?G+=W.charAt(H):j<128?G+=E[j]:j<2048?G+=E[192|j>>6]+E[128|63&j]:j<55296||j>=57344?G+=E[224|j>>12]+E[128|j>>6&63]+E[128|63&j]:(j=65536+((1023&j)<<10|1023&W.charCodeAt(H+=1)),G+=E[240|j>>18]+E[128|j>>12&63]+E[128|j>>6&63]+E[128|63&j])}return G},isBuffer:function(S){return!(!S||"object"!=typeof S||!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S)))},isRegExp:function(S){return"[object RegExp]"===Object.prototype.toString.call(S)},maybeMap:function(S,I){if(O(S)){for(var P=[],L=0;L{"use strict";function be(ie){try{return JSON.stringify(ie)}catch{return'"[Circular]"'}}bt.exports=function(ie,z,O){var E=O&&O.stringify||be;if("object"==typeof ie&&null!==ie){var x=z.length+1;if(1===x)return ie;var f=new Array(x);f[0]=E(ie);for(var T=1;T-1?h:0,ie.charCodeAt(m+1)){case 100:case 102:if(l>=g||null==z[l])break;h=g||null==z[l])break;h=g||void 0===z[l])break;h",h=m+2,m++;break}b+=E(z[l]),h=m+2,m++;break;case 115:if(l>=g)break;h{"use strict";var E=Y(55859).Buffer,d=global.crypto||global.msCrypto;bt.exports=d&&d.getRandomValues?function(f,T){if(f>4294967295)throw new RangeError("requested too many random bytes");var g=E.allocUnsafe(f);if(f>0)if(f>65536)for(var b=0;b{"use strict";function ie(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var z=Y(55859),O=Y(16589),E=z.Buffer,d=z.kMaxLength,x=global.crypto||global.msCrypto,f=Math.pow(2,32)-1;function T(u,m){if("number"!=typeof u||u!=u)throw new TypeError("offset must be a number");if(u>f||u<0)throw new TypeError("offset must be a uint32");if(u>d||u>m)throw new RangeError("offset out of range")}function g(u,m,_){if("number"!=typeof u||u!=u)throw new TypeError("size must be a number");if(u>f||u<0)throw new TypeError("size must be a uint32");if(u+m>_||u>d)throw new RangeError("buffer too small")}function l(u,m,_,w){if(process.browser){var I=new Uint8Array(u.buffer,m,_);return x.getRandomValues(I),w?void process.nextTick(function(){w(null,u)}):u}if(!w)return O(_).copy(u,m),u;O(_,function(L,V){if(L)return w(L);V.copy(u,m),w(null,u)})}x&&x.getRandomValues||!process.browser?(be.randomFill=function(u,m,_,w){if(!(E.isBuffer(u)||u instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof m)w=m,m=0,_=u.length;else if("function"==typeof _)w=_,_=u.length-m;else if("function"!=typeof w)throw new TypeError('"cb" argument must be a function');return T(m,u.length),g(_,m,u.length),l(u,m,_,w)},be.randomFillSync=function(u,m,_){if(void 0===m&&(m=0),!(E.isBuffer(u)||u instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return T(m,u.length),void 0===_&&(_=u.length-m),g(_,m,u.length),l(u,m,_)}):(be.randomFill=ie,be.randomFillSync=ie)},48230:bt=>{"use strict";var Y={};function ie(x,f,T){T||(T=Error);var b=function(l){function h(u,m,_){return l.call(this,function(l,h,u){return"string"==typeof f?f:f(l,h,u)}(u,m,_))||this}return function(x,f){x.prototype=Object.create(f.prototype),x.prototype.constructor=x,x.__proto__=f}(h,l),h}(T);b.prototype.name=T.name,b.prototype.code=x,Y[x]=b}function z(x,f){if(Array.isArray(x)){var T=x.length;return x=x.map(function(g){return String(g)}),T>2?"one of ".concat(f," ").concat(x.slice(0,T-1).join(", "),", or ")+x[T-1]:2===T?"one of ".concat(f," ").concat(x[0]," or ").concat(x[1]):"of ".concat(f," ").concat(x[0])}return"of ".concat(f," ").concat(String(x))}ie("ERR_INVALID_OPT_VALUE",function(x,f){return'The value "'+f+'" is invalid for option "'+x+'"'},TypeError),ie("ERR_INVALID_ARG_TYPE",function(x,f,T){var g,b;if("string"==typeof f&&function(x,f,T){return x.substr(0,f.length)===f}(f,"not ")?(g="must not be",f=f.replace(/^not /,"")):g="must be",function(x,f,T){return(void 0===T||T>x.length)&&(T=x.length),x.substring(T-f.length,T)===f}(x," argument"))b="The ".concat(x," ").concat(g," ").concat(z(f,"type"));else{var l=function(x,f,T){return"number"!=typeof T&&(T=0),!(T+".".length>x.length)&&-1!==x.indexOf(".",T)}(x)?"property":"argument";b='The "'.concat(x,'" ').concat(l," ").concat(g," ").concat(z(f,"type"))}return b+". Received type ".concat(typeof T)},TypeError),ie("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ie("ERR_METHOD_NOT_IMPLEMENTED",function(x){return"The "+x+" method is not implemented"}),ie("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ie("ERR_STREAM_DESTROYED",function(x){return"Cannot call "+x+" after a stream was destroyed"}),ie("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ie("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ie("ERR_STREAM_WRITE_AFTER_END","write after end"),ie("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ie("ERR_UNKNOWN_ENCODING",function(x){return"Unknown encoding: "+x},TypeError),ie("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),bt.exports.q=Y},20942:(bt,be,Y)=>{"use strict";var ie=Object.keys||function(b){var l=[];for(var h in b)l.push(h);return l};bt.exports=f;var z=Y(32833),O=Y(37807);Y(59879)(f,z);for(var E=ie(O.prototype),d=0;d{"use strict";bt.exports=z;var ie=Y(55431);function z(O){if(!(this instanceof z))return new z(O);ie.call(this,O)}Y(59879)(z,ie),z.prototype._transform=function(O,E,d){d(null,O)}},32833:(bt,be,Y)=>{"use strict";var ie;bt.exports=R,R.ReadableState=K,Y(93105);var b,O=function(xe,Ce){return xe.listeners(Ce).length},E=Y(75112),d=Y(3875).Buffer,x=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},g=Y(94616);b=g&&g.debuglog?g.debuglog("stream"):function(){};var L,V,W,l=Y(39370),h=Y(10806),m=Y(12903).getHighWaterMark,_=Y(48230).q,w=_.ERR_INVALID_ARG_TYPE,S=_.ERR_STREAM_PUSH_AFTER_EOF,I=_.ERR_METHOD_NOT_IMPLEMENTED,P=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Y(59879)(R,E);var G=h.errorOrDestroy,H=["error","close","destroy","pause","resume"];function K(_e,xe,Ce){ie=ie||Y(20942),"boolean"!=typeof Ce&&(Ce=xe instanceof ie),this.objectMode=!!(_e=_e||{}).objectMode,Ce&&(this.objectMode=this.objectMode||!!_e.readableObjectMode),this.highWaterMark=m(this,_e,"readableHighWaterMark",Ce),this.buffer=new l,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&&(L||(L=Y(32519).s),this.decoder=new L(_e.encoding),this.encoding=_e.encoding)}function R(_e){if(ie=ie||Y(20942),!(this instanceof R))return new R(_e);this._readableState=new K(_e,this,this instanceof ie),this.readable=!0,_e&&("function"==typeof _e.read&&(this._read=_e.read),"function"==typeof _e.destroy&&(this._destroy=_e.destroy)),E.call(this)}function o(_e,xe,Ce,ke,me){b("readableAddChunk",xe);var ze,Ee=_e._readableState;if(null===xe)Ee.reading=!1,function(_e,xe){if(b("onEofChunk"),!xe.ended){if(xe.decoder){var Ce=xe.decoder.end();Ce&&Ce.length&&(xe.buffer.push(Ce),xe.length+=xe.objectMode?1:Ce.length)}xe.ended=!0,xe.sync?C(_e):(xe.needReadable=!1,xe.emittedReadable||(xe.emittedReadable=!0,a(_e)))}}(_e,Ee);else if(me||(ze=function(_e,xe){var Ce;return!function(_e){return d.isBuffer(_e)||_e instanceof x}(xe)&&"string"!=typeof xe&&void 0!==xe&&!_e.objectMode&&(Ce=new w("chunk",["string","Buffer","Uint8Array"],xe)),Ce}(Ee,xe)),ze)G(_e,ze);else if(Ee.objectMode||xe&&xe.length>0)if("string"!=typeof xe&&!Ee.objectMode&&Object.getPrototypeOf(xe)!==d.prototype&&(xe=function(_e){return d.from(_e)}(xe)),ke)Ee.endEmitted?G(_e,new P):y(_e,Ee,xe,!0);else if(Ee.ended)G(_e,new S);else{if(Ee.destroyed)return!1;Ee.reading=!1,Ee.decoder&&!Ce?(xe=Ee.decoder.write(xe),Ee.objectMode||0!==xe.length?y(_e,Ee,xe,!1):B(_e,Ee)):y(_e,Ee,xe,!1)}else ke||(Ee.reading=!1,B(_e,Ee));return!Ee.ended&&(Ee.lengthxe.highWaterMark&&(xe.highWaterMark=function(_e){return _e>=v?_e=v:(_e--,_e|=_e>>>1,_e|=_e>>>2,_e|=_e>>>4,_e|=_e>>>8,_e|=_e>>>16,_e++),_e}(_e)),_e<=xe.length?_e:xe.ended?xe.length:(xe.needReadable=!0,0))}function C(_e){var xe=_e._readableState;b("emitReadable",xe.needReadable,xe.emittedReadable),xe.needReadable=!1,xe.emittedReadable||(b("emitReadable",xe.flowing),xe.emittedReadable=!0,process.nextTick(a,_e))}function a(_e){var xe=_e._readableState;b("emitReadable_",xe.destroyed,xe.length,xe.ended),!xe.destroyed&&(xe.length||xe.ended)&&(_e.emit("readable"),xe.emittedReadable=!1),xe.needReadable=!xe.flowing&&!xe.ended&&xe.length<=xe.highWaterMark,Te(_e)}function B(_e,xe){xe.readingMore||(xe.readingMore=!0,process.nextTick(Q,_e,xe))}function Q(_e,xe){for(;!xe.reading&&!xe.ended&&(xe.length0,xe.resumeScheduled&&!xe.paused?xe.flowing=!0:_e.listenerCount("data")>0&&_e.resume()}function ue(_e){b("readable nexttick read 0"),_e.read(0)}function ae(_e,xe){b("resume",xe.reading),xe.reading||_e.read(0),xe.resumeScheduled=!1,_e.emit("resume"),Te(_e),xe.flowing&&!xe.reading&&_e.read(0)}function Te(_e){var xe=_e._readableState;for(b("flow",xe.flowing);xe.flowing&&null!==_e.read(););}function le(_e,xe){return 0===xe.length?null:(xe.objectMode?Ce=xe.buffer.shift():!_e||_e>=xe.length?(Ce=xe.decoder?xe.buffer.join(""):1===xe.buffer.length?xe.buffer.first():xe.buffer.concat(xe.length),xe.buffer.clear()):Ce=xe.buffer.consume(_e,xe.decoder),Ce);var Ce}function X(_e){var xe=_e._readableState;b("endReadable",xe.endEmitted),xe.endEmitted||(xe.ended=!0,process.nextTick(ne,xe,_e))}function ne(_e,xe){if(b("endReadableNT",_e.endEmitted,_e.length),!_e.endEmitted&&0===_e.length&&(_e.endEmitted=!0,xe.readable=!1,xe.emit("end"),_e.autoDestroy)){var Ce=xe._writableState;(!Ce||Ce.autoDestroy&&Ce.finished)&&xe.destroy()}}function pe(_e,xe){for(var Ce=0,ke=_e.length;Ce=xe.highWaterMark:xe.length>0)||xe.ended))return b("read: emitReadable",xe.length,xe.ended),0===xe.length&&xe.ended?X(this):C(this),null;if(0===(_e=D(_e,xe))&&xe.ended)return 0===xe.length&&X(this),null;var me,ke=xe.needReadable;return b("need readable",ke),(0===xe.length||xe.length-_e0?le(_e,xe):null)?(xe.needReadable=xe.length<=xe.highWaterMark,_e=0):(xe.length-=_e,xe.awaitDrain=0),0===xe.length&&(xe.ended||(xe.needReadable=!0),Ce!==_e&&xe.ended&&X(this)),null!==me&&this.emit("data",me),me},R.prototype._read=function(_e){G(this,new I("_read()"))},R.prototype.pipe=function(_e,xe){var Ce=this,ke=this._readableState;switch(ke.pipesCount){case 0:ke.pipes=_e;break;case 1:ke.pipes=[ke.pipes,_e];break;default:ke.pipes.push(_e)}ke.pipesCount+=1,b("pipe count=%d opts=%j",ke.pipesCount,xe);var Ee=xe&&!1===xe.end||_e===process.stdout||_e===process.stderr?Ye:Ve;function Ve(){b("onend"),_e.end()}ke.endEmitted?process.nextTick(Ee):Ce.once("end",Ee),_e.on("unpipe",function ze(gt,St){b("onunpipe"),gt===Ce&&St&&!1===St.hasUnpiped&&(St.hasUnpiped=!0,b("cleanup"),_e.removeListener("close",Pt),_e.removeListener("finish",st),_e.removeListener("drain",nt),_e.removeListener("error",wt),_e.removeListener("unpipe",ze),Ce.removeListener("end",Ve),Ce.removeListener("end",Ye),Ce.removeListener("data",ht),tt=!0,ke.awaitDrain&&(!_e._writableState||_e._writableState.needDrain)&&nt())});var nt=function(_e){return function(){var Ce=_e._readableState;b("pipeOnDrain",Ce.awaitDrain),Ce.awaitDrain&&Ce.awaitDrain--,0===Ce.awaitDrain&&O(_e,"data")&&(Ce.flowing=!0,Te(_e))}}(Ce);_e.on("drain",nt);var tt=!1;function ht(gt){b("ondata");var St=_e.write(gt);b("dest.write",St),!1===St&&((1===ke.pipesCount&&ke.pipes===_e||ke.pipesCount>1&&-1!==pe(ke.pipes,_e))&&!tt&&(b("false write response, pause",ke.awaitDrain),ke.awaitDrain++),Ce.pause())}function wt(gt){b("onerror",gt),Ye(),_e.removeListener("error",wt),0===O(_e,"error")&&G(_e,gt)}function Pt(){_e.removeListener("finish",st),Ye()}function st(){b("onfinish"),_e.removeListener("close",Pt),Ye()}function Ye(){b("unpipe"),Ce.unpipe(_e)}return Ce.on("data",ht),function(_e,xe,Ce){if("function"==typeof _e.prependListener)return _e.prependListener(xe,Ce);_e._events&&_e._events[xe]?Array.isArray(_e._events[xe])?_e._events[xe].unshift(Ce):_e._events[xe]=[Ce,_e._events[xe]]:_e.on(xe,Ce)}(_e,"error",wt),_e.once("close",Pt),_e.once("finish",st),_e.emit("pipe",Ce),ke.flowing||(b("pipe resume"),Ce.resume()),_e},R.prototype.unpipe=function(_e){var xe=this._readableState,Ce={hasUnpiped:!1};if(0===xe.pipesCount)return this;if(1===xe.pipesCount)return _e&&_e!==xe.pipes||(_e||(_e=xe.pipes),xe.pipes=null,xe.pipesCount=0,xe.flowing=!1,_e&&_e.emit("unpipe",this,Ce)),this;if(!_e){var ke=xe.pipes,me=xe.pipesCount;xe.pipes=null,xe.pipesCount=0,xe.flowing=!1;for(var Ee=0;Ee0,!1!==ke.flowing&&this.resume()):"readable"===_e&&!ke.endEmitted&&!ke.readableListening&&(ke.readableListening=ke.needReadable=!0,ke.flowing=!1,ke.emittedReadable=!1,b("on readable",ke.length,ke.reading),ke.length?C(this):ke.reading||process.nextTick(ue,this)),Ce},R.prototype.removeListener=function(_e,xe){var Ce=E.prototype.removeListener.call(this,_e,xe);return"readable"===_e&&process.nextTick(ce,this),Ce},R.prototype.removeAllListeners=function(_e){var xe=E.prototype.removeAllListeners.apply(this,arguments);return("readable"===_e||void 0===_e)&&process.nextTick(ce,this),xe},R.prototype.resume=function(){var _e=this._readableState;return _e.flowing||(b("resume"),_e.flowing=!_e.readableListening,function(_e,xe){xe.resumeScheduled||(xe.resumeScheduled=!0,process.nextTick(ae,_e,xe))}(this,_e)),_e.paused=!1,this},R.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(_e){var xe=this,Ce=this._readableState,ke=!1;for(var me in _e.on("end",function(){if(b("wrapped end"),Ce.decoder&&!Ce.ended){var ze=Ce.decoder.end();ze&&ze.length&&xe.push(ze)}xe.push(null)}),_e.on("data",function(ze){b("wrapped data"),Ce.decoder&&(ze=Ce.decoder.write(ze)),Ce.objectMode&&null==ze||!(Ce.objectMode||ze&&ze.length)||xe.push(ze)||(ke=!0,_e.pause())}),_e)void 0===this[me]&&"function"==typeof _e[me]&&(this[me]=function(Ve){return function(){return _e[Ve].apply(_e,arguments)}}(me));for(var Ee=0;Ee{"use strict";bt.exports=T;var ie=Y(48230).q,z=ie.ERR_METHOD_NOT_IMPLEMENTED,O=ie.ERR_MULTIPLE_CALLBACK,E=ie.ERR_TRANSFORM_ALREADY_TRANSFORMING,d=ie.ERR_TRANSFORM_WITH_LENGTH_0,x=Y(20942);function f(l,h){var u=this._transformState;u.transforming=!1;var m=u.writecb;if(null===m)return this.emit("error",new O);u.writechunk=null,u.writecb=null,null!=h&&this.push(h),m(l);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}function T(l){if(!(this instanceof T))return new T(l);x.call(this,l),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&("function"==typeof l.transform&&(this._transform=l.transform),"function"==typeof l.flush&&(this._flush=l.flush)),this.on("prefinish",g)}function g(){var l=this;"function"!=typeof this._flush||this._readableState.destroyed?b(this,null,null):this._flush(function(h,u){b(l,h,u)})}function b(l,h,u){if(h)return l.emit("error",h);if(null!=u&&l.push(u),l._writableState.length)throw new d;if(l._transformState.transforming)throw new E;return l.push(null)}Y(59879)(T,x),T.prototype.push=function(l,h){return this._transformState.needTransform=!1,x.prototype.push.call(this,l,h)},T.prototype._transform=function(l,h,u){u(new z("_transform()"))},T.prototype._write=function(l,h,u){var m=this._transformState;if(m.writecb=u,m.writechunk=l,m.writeencoding=h,!m.transforming){var _=this._readableState;(m.needTransform||_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}},T.prototype._read=function(l){var h=this._transformState;null===h.writechunk||h.transforming?h.needTransform=!0:(h.transforming=!0,this._transform(h.writechunk,h.writeencoding,h.afterTransform))},T.prototype._destroy=function(l,h){x.prototype._destroy.call(this,l,function(u){h(u)})}},37807:(bt,be,Y)=>{"use strict";function z(Te){var le=this;this.next=null,this.entry=null,this.finish=function(){!function(Te,le,X){var ne=Te.entry;for(Te.entry=null;ne;){var pe=ne.callback;le.pendingcb--,pe(undefined),ne=ne.next}le.corkedRequestsFree.next=Te}(le,Te)}}var O;bt.exports=K,K.WritableState=H;var j,E={deprecate:Y(15822)},d=Y(75112),x=Y(3875).Buffer,f=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},b=Y(10806),h=Y(12903).getHighWaterMark,u=Y(48230).q,m=u.ERR_INVALID_ARG_TYPE,_=u.ERR_METHOD_NOT_IMPLEMENTED,w=u.ERR_MULTIPLE_CALLBACK,S=u.ERR_STREAM_CANNOT_PIPE,I=u.ERR_STREAM_DESTROYED,P=u.ERR_STREAM_NULL_VALUES,L=u.ERR_STREAM_WRITE_AFTER_END,V=u.ERR_UNKNOWN_ENCODING,W=b.errorOrDestroy;function G(){}function H(Te,le,X){O=O||Y(20942),"boolean"!=typeof X&&(X=le instanceof O),this.objectMode=!!(Te=Te||{}).objectMode,X&&(this.objectMode=this.objectMode||!!Te.writableObjectMode),this.highWaterMark=h(this,Te,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===Te.decodeStrings),this.defaultEncoding=Te.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pe){!function(Te,le){var X=Te._writableState,ne=X.sync,pe=X.writecb;if("function"!=typeof pe)throw new w;if(function(Te){Te.writing=!1,Te.writecb=null,Te.length-=Te.writelen,Te.writelen=0}(X),le)!function(Te,le,X,ne,pe){--le.pendingcb,X?(process.nextTick(pe,ne),process.nextTick(ue,Te,le),Te._writableState.errorEmitted=!0,W(Te,ne)):(pe(ne),Te._writableState.errorEmitted=!0,W(Te,ne),ue(Te,le))}(Te,X,ne,le,pe);else{var _e=Q(X)||Te.destroyed;!_e&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest&&B(Te,X),ne?process.nextTick(C,Te,X,_e,pe):C(Te,X,_e,pe)}}(le,pe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==Te.emitClose,this.autoDestroy=!!Te.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new z(this)}function K(Te){var le=this instanceof(O=O||Y(20942));if(!le&&!j.call(K,this))return new K(Te);this._writableState=new H(Te,this,le),this.writable=!0,Te&&("function"==typeof Te.write&&(this._write=Te.write),"function"==typeof Te.writev&&(this._writev=Te.writev),"function"==typeof Te.destroy&&(this._destroy=Te.destroy),"function"==typeof Te.final&&(this._final=Te.final)),d.call(this)}function v(Te,le,X,ne,pe,_e,xe){le.writelen=ne,le.writecb=xe,le.writing=!0,le.sync=!0,le.destroyed?le.onwrite(new I("write")):X?Te._writev(pe,le.onwrite):Te._write(pe,_e,le.onwrite),le.sync=!1}function C(Te,le,X,ne){X||function(Te,le){0===le.length&&le.needDrain&&(le.needDrain=!1,Te.emit("drain"))}(Te,le),le.pendingcb--,ne(),ue(Te,le)}function B(Te,le){le.bufferProcessing=!0;var X=le.bufferedRequest;if(Te._writev&&X&&X.next){var pe=new Array(le.bufferedRequestCount),_e=le.corkedRequestsFree;_e.entry=X;for(var xe=0,Ce=!0;X;)pe[xe]=X,X.isBuf||(Ce=!1),X=X.next,xe+=1;pe.allBuffers=Ce,v(Te,le,!0,le.length,pe,"",_e.finish),le.pendingcb++,le.lastBufferedRequest=null,_e.next?(le.corkedRequestsFree=_e.next,_e.next=null):le.corkedRequestsFree=new z(le),le.bufferedRequestCount=0}else{for(;X;){var ke=X.chunk;if(v(Te,le,!1,le.objectMode?1:ke.length,ke,X.encoding,X.callback),X=X.next,le.bufferedRequestCount--,le.writing)break}null===X&&(le.lastBufferedRequest=null)}le.bufferedRequest=X,le.bufferProcessing=!1}function Q(Te){return Te.ending&&0===Te.length&&null===Te.bufferedRequest&&!Te.finished&&!Te.writing}function ee(Te,le){Te._final(function(X){le.pendingcb--,X&&W(Te,X),le.prefinished=!0,Te.emit("prefinish"),ue(Te,le)})}function ue(Te,le){var X=Q(le);if(X&&(function(Te,le){!le.prefinished&&!le.finalCalled&&("function"!=typeof Te._final||le.destroyed?(le.prefinished=!0,Te.emit("prefinish")):(le.pendingcb++,le.finalCalled=!0,process.nextTick(ee,Te,le)))}(Te,le),0===le.pendingcb&&(le.finished=!0,Te.emit("finish"),le.autoDestroy))){var ne=Te._readableState;(!ne||ne.autoDestroy&&ne.endEmitted)&&Te.destroy()}return X}Y(59879)(K,d),H.prototype.getBuffer=function(){for(var le=this.bufferedRequest,X=[];le;)X.push(le),le=le.next;return X},function(){try{Object.defineProperty(H.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(le){return!!j.call(this,le)||this===K&&le&&le._writableState instanceof H}})):j=function(le){return le instanceof this},K.prototype.pipe=function(){W(this,new S)},K.prototype.write=function(Te,le,X){var ne=this._writableState,pe=!1,_e=!ne.objectMode&&function(Te){return x.isBuffer(Te)||Te instanceof f}(Te);return _e&&!x.isBuffer(Te)&&(Te=function(Te){return x.from(Te)}(Te)),"function"==typeof le&&(X=le,le=null),_e?le="buffer":le||(le=ne.defaultEncoding),"function"!=typeof X&&(X=G),ne.ending?function(Te,le){var X=new L;W(Te,X),process.nextTick(le,X)}(this,X):(_e||function(Te,le,X,ne){var pe;return null===X?pe=new P:"string"!=typeof X&&!le.objectMode&&(pe=new m("chunk",["string","Buffer"],X)),!pe||(W(Te,pe),process.nextTick(ne,pe),!1)}(this,ne,Te,X))&&(ne.pendingcb++,pe=function(Te,le,X,ne,pe,_e){if(!X){var xe=function(Te,le,X){return!Te.objectMode&&!1!==Te.decodeStrings&&"string"==typeof le&&(le=x.from(le,X)),le}(le,ne,pe);ne!==xe&&(X=!0,pe="buffer",ne=xe)}var Ce=le.objectMode?1:ne.length;le.length+=Ce;var ke=le.length-1))throw new V(le);return this._writableState.defaultEncoding=le,this},Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),K.prototype._write=function(Te,le,X){X(new _("_write()"))},K.prototype._writev=null,K.prototype.end=function(Te,le,X){var ne=this._writableState;return"function"==typeof Te?(X=Te,Te=null,le=null):"function"==typeof le&&(X=le,le=null),null!=Te&&this.write(Te,le),ne.corked&&(ne.corked=1,this.uncork()),ne.ending||function(Te,le,X){le.ending=!0,ue(Te,le),X&&(le.finished?process.nextTick(X):Te.once("finish",X)),le.ended=!0,Te.writable=!1}(this,ne,X),this},Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(le){!this._writableState||(this._writableState.destroyed=le)}}),K.prototype.destroy=b.destroy,K.prototype._undestroy=b.undestroy,K.prototype._destroy=function(Te,le){le(Te)}},19983:(bt,be,Y)=>{"use strict";var ie;function z(L,V,W){return V=function(L){var V=function(L,V){if("object"!=typeof L||null===L)return L;var W=L[Symbol.toPrimitive];if(void 0!==W){var G=W.call(L,V);if("object"!=typeof G)return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(L)}(L,"string");return"symbol"==typeof V?V:String(V)}(V),V in L?Object.defineProperty(L,V,{value:W,enumerable:!0,configurable:!0,writable:!0}):L[V]=W,L}var d=Y(6820),x=Symbol("lastResolve"),f=Symbol("lastReject"),T=Symbol("error"),g=Symbol("ended"),b=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function u(L,V){return{value:L,done:V}}function m(L){var V=L[x];if(null!==V){var W=L[h].read();null!==W&&(L[b]=null,L[x]=null,L[f]=null,V(u(W,!1)))}}function _(L){process.nextTick(m,L)}var S=Object.getPrototypeOf(function(){}),I=Object.setPrototypeOf((z(ie={get stream(){return this[h]},next:function(){var V=this,W=this[T];if(null!==W)return Promise.reject(W);if(this[g])return Promise.resolve(u(void 0,!0));if(this[h].destroyed)return new Promise(function(K,R){process.nextTick(function(){V[T]?R(V[T]):K(u(void 0,!0))})});var H,G=this[b];if(G)H=new Promise(function(L,V){return function(W,G){L.then(function(){V[g]?W(u(void 0,!0)):V[l](W,G)},G)}}(G,this));else{var j=this[h].read();if(null!==j)return Promise.resolve(u(j,!1));H=new Promise(this[l])}return this[b]=H,H}},Symbol.asyncIterator,function(){return this}),z(ie,"return",function(){var V=this;return new Promise(function(W,G){V[h].destroy(null,function(H){H?G(H):W(u(void 0,!0))})})}),ie),S);bt.exports=function(V){var W,G=Object.create(I,(z(W={},h,{value:V,writable:!0}),z(W,x,{value:null,writable:!0}),z(W,f,{value:null,writable:!0}),z(W,T,{value:null,writable:!0}),z(W,g,{value:V._readableState.endEmitted,writable:!0}),z(W,l,{value:function(j,K){var R=G[h].read();R?(G[b]=null,G[x]=null,G[f]=null,j(u(R,!1))):(G[x]=j,G[f]=K)},writable:!0}),W));return G[b]=null,d(V,function(H){if(H&&"ERR_STREAM_PREMATURE_CLOSE"!==H.code){var j=G[f];return null!==j&&(G[b]=null,G[x]=null,G[f]=null,j(H)),void(G[T]=H)}var K=G[x];null!==K&&(G[b]=null,G[x]=null,G[f]=null,K(u(void 0,!0))),G[g]=!0}),V.on("readable",_.bind(null,G)),G}},39370:(bt,be,Y)=>{"use strict";function ie(_,w){var S=Object.keys(_);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(_);w&&(I=I.filter(function(P){return Object.getOwnPropertyDescriptor(_,P).enumerable})),S.push.apply(S,I)}return S}function z(_){for(var w=1;w0?this.tail.next=I:this.head=I,this.tail=I,++this.length}},{key:"unshift",value:function(S){var I={data:S,next:this.head};0===this.length&&(this.tail=I),this.head=I,++this.length}},{key:"shift",value:function(){if(0!==this.length){var S=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(0===this.length)return"";for(var I=this.head,P=""+I.data;I=I.next;)P+=S+I.data;return P}},{key:"concat",value:function(S){if(0===this.length)return b.alloc(0);for(var I=b.allocUnsafe(S>>>0),P=this.head,L=0;P;)m(P.data,I,L),L+=P.data.length,P=P.next;return I}},{key:"consume",value:function(S,I){var P;return SV.length?V.length:S;if(L+=W===V.length?V:V.slice(0,S),0==(S-=W)){W===V.length?(++P,this.head=I.next?I.next:this.tail=null):(this.head=I,I.data=V.slice(W));break}++P}return this.length-=P,L}},{key:"_getBuffer",value:function(S){var I=b.allocUnsafe(S),P=this.head,L=1;for(P.data.copy(I),S-=P.data.length;P=P.next;){var V=P.data,W=S>V.length?V.length:S;if(V.copy(I,I.length-S,0,W),0==(S-=W)){W===V.length?(++L,this.head=P.next?P.next:this.tail=null):(this.head=P,P.data=V.slice(W));break}++L}return this.length-=L,I}},{key:u,value:function(S,I){return h(this,z(z({},I),{},{depth:0,customInspect:!1}))}}]),_}()},10806:bt=>{"use strict";function Y(d,x){O(d,x),ie(d)}function ie(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function O(d,x){d.emit("error",x)}bt.exports={destroy:function(d,x){var f=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(x?x(d):d&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(O,this,d)):process.nextTick(O,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(b){!x&&b?f._writableState?f._writableState.errorEmitted?process.nextTick(ie,f):(f._writableState.errorEmitted=!0,process.nextTick(Y,f,b)):process.nextTick(Y,f,b):x?(process.nextTick(ie,f),x(b)):process.nextTick(ie,f)}),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(d,x){var f=d._readableState,T=d._writableState;f&&f.autoDestroy||T&&T.autoDestroy?d.destroy(x):d.emit("error",x)}}},6820:(bt,be,Y)=>{"use strict";var ie=Y(48230).q.ERR_STREAM_PREMATURE_CLOSE;function O(){}bt.exports=function d(x,f,T){if("function"==typeof f)return d(x,null,f);f||(f={}),T=function(x){var f=!1;return function(){if(!f){f=!0;for(var T=arguments.length,g=new Array(T),b=0;b{bt.exports=function(){throw new Error("Readable.from is not available in the browser")}},36076:(bt,be,Y)=>{"use strict";var ie,O=Y(48230).q,E=O.ERR_MISSING_ARGS,d=O.ERR_STREAM_DESTROYED;function x(u){if(u)throw u}function T(u,m,_,w){w=function(u){var m=!1;return function(){m||(m=!0,u.apply(void 0,arguments))}}(w);var S=!1;u.on("close",function(){S=!0}),void 0===ie&&(ie=Y(6820)),ie(u,{readable:m,writable:_},function(P){if(P)return w(P);S=!0,w()});var I=!1;return function(P){if(!S&&!I){if(I=!0,function(u){return u.setHeader&&"function"==typeof u.abort}(u))return u.abort();if("function"==typeof u.destroy)return u.destroy();w(P||new d("pipe"))}}}function g(u){u()}function b(u,m){return u.pipe(m)}function l(u){return u.length&&"function"==typeof u[u.length-1]?u.pop():x}bt.exports=function(){for(var u=arguments.length,m=new Array(u),_=0;_0,function(G){S||(S=G),G&&I.forEach(g),!V&&(I.forEach(g),w(S))})});return m.reduce(b)}},12903:(bt,be,Y)=>{"use strict";var ie=Y(48230).q.ERR_INVALID_OPT_VALUE;bt.exports={getHighWaterMark:function(E,d,x,f){var T=function(E,d,x){return null!=E.highWaterMark?E.highWaterMark:d?E[x]:null}(d,f,x);if(null!=T){if(!isFinite(T)||Math.floor(T)!==T||T<0)throw new ie(f?x:"highWaterMark",T);return Math.floor(T)}return E.objectMode?16:16384}}},75112:(bt,be,Y)=>{bt.exports=Y(93105).EventEmitter},18300:(bt,be,Y)=>{(be=bt.exports=Y(32833)).Stream=be,be.Readable=be,be.Writable=Y(37807),be.Duplex=Y(20942),be.Transform=Y(55431),be.PassThrough=Y(90619),be.finished=Y(6820),be.pipeline=Y(36076)},75207:(bt,be,Y)=>{"use strict";var ie=Y(3875).Buffer,z=Y(59879),O=Y(5414),E=new Array(16),d=[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],x=[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],f=[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],T=[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],g=[0,1518500249,1859775393,2400959708,2840853838],b=[1352829926,1548603684,1836072691,2053994217,0];function l(){O.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(I,P){return I<>>32-P}function u(I,P,L,V,W,G,H,j){return h(I+(P^L^V)+G+H|0,j)+W|0}function m(I,P,L,V,W,G,H,j){return h(I+(P&L|~P&V)+G+H|0,j)+W|0}function _(I,P,L,V,W,G,H,j){return h(I+((P|~L)^V)+G+H|0,j)+W|0}function w(I,P,L,V,W,G,H,j){return h(I+(P&V|L&~V)+G+H|0,j)+W|0}function S(I,P,L,V,W,G,H,j){return h(I+(P^(L|~V))+G+H|0,j)+W|0}z(l,O),l.prototype._update=function(){for(var I=E,P=0;P<16;++P)I[P]=this._block.readInt32LE(4*P);for(var L=0|this._a,V=0|this._b,W=0|this._c,G=0|this._d,H=0|this._e,j=0|this._a,K=0|this._b,R=0|this._c,o=0|this._d,y=0|this._e,M=0;M<80;M+=1){var v,k;M<16?(v=u(L,V,W,G,H,I[d[M]],g[0],f[M]),k=S(j,K,R,o,y,I[x[M]],b[0],T[M])):M<32?(v=m(L,V,W,G,H,I[d[M]],g[1],f[M]),k=w(j,K,R,o,y,I[x[M]],b[1],T[M])):M<48?(v=_(L,V,W,G,H,I[d[M]],g[2],f[M]),k=_(j,K,R,o,y,I[x[M]],b[2],T[M])):M<64?(v=w(L,V,W,G,H,I[d[M]],g[3],f[M]),k=m(j,K,R,o,y,I[x[M]],b[3],T[M])):(v=S(L,V,W,G,H,I[d[M]],g[4],f[M]),k=u(j,K,R,o,y,I[x[M]],b[4],T[M])),L=H,H=G,G=h(W,10),W=V,V=v,j=y,y=o,o=h(R,10),R=K,K=k}var D=this._b+W+o|0;this._b=this._c+G+y|0,this._c=this._d+H+j|0,this._d=this._e+L+K|0,this._e=this._a+V+R|0,this._a=D},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var I=ie.alloc?ie.alloc(20):new ie(20);return I.writeInt32LE(this._a,0),I.writeInt32LE(this._b,4),I.writeInt32LE(this._c,8),I.writeInt32LE(this._d,12),I.writeInt32LE(this._e,16),I},bt.exports=l},26215:(bt,be,Y)=>{"use strict";Y.d(be,{X:()=>O});var ie=Y(79765),z=Y(77971);class O extends ie.xQ{constructor(d){super(),this._value=d}get value(){return this.getValue()}_subscribe(d){const x=super._subscribe(d);return x&&!x.closed&&d.next(this._value),x}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new z.N;return this._value}next(d){super.next(this._value=d)}}},23098:(bt,be,Y)=>{"use strict";Y.d(be,{W:()=>E,P:()=>d});var ie=Y(59193),z=Y(25917),O=Y(40205),E=(()=>{return(x=E||(E={})).NEXT="N",x.ERROR="E",x.COMPLETE="C",E;var x})();class d{constructor(f,T,g){this.kind=f,this.value=T,this.error=g,this.hasValue="N"===f}observe(f){switch(this.kind){case"N":return f.next&&f.next(this.value);case"E":return f.error&&f.error(this.error);case"C":return f.complete&&f.complete()}}do(f,T,g){switch(this.kind){case"N":return f&&f(this.value);case"E":return T&&T(this.error);case"C":return g&&g()}}accept(f,T,g){return f&&"function"==typeof f.next?this.observe(f):this.do(f,T,g)}toObservable(){switch(this.kind){case"N":return(0,z.of)(this.value);case"E":return(0,O._)(this.error);case"C":return(0,ie.c)()}throw new Error("unexpected notification kind value")}static createNext(f){return void 0!==f?new d("N",f):d.undefinedValueNotification}static createError(f){return new d("E",void 0,f)}static createComplete(){return d.completeNotification}}d.completeNotification=new d("C"),d.undefinedValueNotification=new d("N",void 0)},39897:(bt,be,Y)=>{"use strict";Y.d(be,{y:()=>g});var ie=Y(13179),z=Y(77393),O=Y(29181),E=Y(46490),x=Y(16554),f=Y(34022),T=Y(82494);let g=(()=>{class l{constructor(u){this._isScalar=!1,u&&(this._subscribe=u)}lift(u){const m=new l;return m.source=this,m.operator=u,m}subscribe(u,m,_){const{operator:w}=this,S=function(l,h,u){if(l){if(l instanceof z.L)return l;if(l[O.b])return l[O.b]()}return l||h||u?new z.L(l,h,u):new z.L(E.c)}(u,m,_);if(S.add(w?w.call(S,this.source):this.source||T.v.useDeprecatedSynchronousErrorHandling&&!S.syncErrorThrowable?this._subscribe(S):this._trySubscribe(S)),T.v.useDeprecatedSynchronousErrorHandling&&S.syncErrorThrowable&&(S.syncErrorThrowable=!1,S.syncErrorThrown))throw S.syncErrorValue;return S}_trySubscribe(u){try{return this._subscribe(u)}catch(m){T.v.useDeprecatedSynchronousErrorHandling&&(u.syncErrorThrown=!0,u.syncErrorValue=m),(0,ie._)(u)?u.error(m):console.warn(m)}}forEach(u,m){return new(m=b(m))((_,w)=>{let S;S=this.subscribe(I=>{try{u(I)}catch(P){w(P),S&&S.unsubscribe()}},w,_)})}_subscribe(u){const{source:m}=this;return m&&m.subscribe(u)}[x.L](){return this}pipe(...u){return 0===u.length?this:(0,f.U)(u)(this)}toPromise(u){return new(u=b(u))((m,_)=>{let w;this.subscribe(S=>w=S,S=>_(S),()=>m(w))})}}return l.create=h=>new l(h),l})();function b(l){if(l||(l=T.v.Promise||Promise),!l)throw new Error("no Promise impl found");return l}},46490:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>O});var ie=Y(82494),z=Y(54449);const O={closed:!0,next(E){},error(E){if(ie.v.useDeprecatedSynchronousErrorHandling)throw E;(0,z.z)(E)},complete(){}}},55197:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>z});var ie=Y(77393);class z extends ie.L{notifyNext(E,d,x,f,T){this.destination.next(d)}notifyError(E,d){this.destination.error(E)}notifyComplete(E){this.destination.complete()}}},88229:(bt,be,Y)=>{"use strict";Y.d(be,{t:()=>f});var ie=Y(79765),z=Y(57771),O=Y(10826),E=Y(59746),d=Y(77971),x=Y(78858);class f extends ie.xQ{constructor(b=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,h){super(),this.scheduler=h,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=b<1?1:b,this._windowTime=l<1?1:l,l===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(b){if(!this.isStopped){const l=this._events;l.push(b),l.length>this._bufferSize&&l.shift()}super.next(b)}nextTimeWindow(b){this.isStopped||(this._events.push(new T(this._getNow(),b)),this._trimBufferThenGetEvents()),super.next(b)}_subscribe(b){const l=this._infiniteTimeWindow,h=l?this._events:this._trimBufferThenGetEvents(),u=this.scheduler,m=h.length;let _;if(this.closed)throw new d.N;if(this.isStopped||this.hasError?_=O.w.EMPTY:(this.observers.push(b),_=new x.W(this,b)),u&&b.add(b=new E.ht(b,u)),l)for(let w=0;wl&&(_=Math.max(_,m-l)),_>0&&u.splice(0,_),u}}class T{constructor(b,l){this.time=b,this.value=l}}},2217:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>ie});let ie=(()=>{class z{constructor(E,d=z.now){this.SchedulerAction=E,this.now=d}schedule(E,d=0,x){return new this.SchedulerAction(this,E).schedule(x,d)}}return z.now=()=>Date.now(),z})()},79765:(bt,be,Y)=>{"use strict";Y.d(be,{Yc:()=>f,xQ:()=>T});var ie=Y(39897),z=Y(77393),O=Y(10826),E=Y(77971),d=Y(78858),x=Y(29181);class f extends z.L{constructor(l){super(l),this.destination=l}}let T=(()=>{class b extends ie.y{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[x.b](){return new f(this)}lift(h){const u=new g(this,this);return u.operator=h,u}next(h){if(this.closed)throw new E.N;if(!this.isStopped){const{observers:u}=this,m=u.length,_=u.slice();for(let w=0;wnew g(l,h),b})();class g extends T{constructor(l,h){super(),this.destination=l,this.source=h}next(l){const{destination:h}=this;h&&h.next&&h.next(l)}error(l){const{destination:h}=this;h&&h.error&&this.destination.error(l)}complete(){const{destination:l}=this;l&&l.complete&&this.destination.complete()}_subscribe(l){const{source:h}=this;return h?this.source.subscribe(l):O.w.EMPTY}}},78858:(bt,be,Y)=>{"use strict";Y.d(be,{W:()=>z});var ie=Y(10826);class z extends ie.w{constructor(E,d){super(),this.subject=E,this.subscriber=d,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const E=this.subject,d=E.observers;if(this.subject=null,!d||0===d.length||E.isStopped||E.closed)return;const x=d.indexOf(this.subscriber);-1!==x&&d.splice(x,1)}}},77393:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>f});var ie=Y(69105),z=Y(46490),O=Y(10826),E=Y(29181),d=Y(82494),x=Y(54449);class f extends O.w{constructor(b,l,h){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=z.c;break;case 1:if(!b){this.destination=z.c;break}if("object"==typeof b){b instanceof f?(this.syncErrorThrowable=b.syncErrorThrowable,this.destination=b,b.add(this)):(this.syncErrorThrowable=!0,this.destination=new T(this,b));break}default:this.syncErrorThrowable=!0,this.destination=new T(this,b,l,h)}}[E.b](){return this}static create(b,l,h){const u=new f(b,l,h);return u.syncErrorThrowable=!1,u}next(b){this.isStopped||this._next(b)}error(b){this.isStopped||(this.isStopped=!0,this._error(b))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(b){this.destination.next(b)}_error(b){this.destination.error(b),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:b}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=b,this}}class T extends f{constructor(b,l,h,u){super(),this._parentSubscriber=b;let m,_=this;(0,ie.m)(l)?m=l:l&&(m=l.next,h=l.error,u=l.complete,l!==z.c&&(_=Object.create(l),(0,ie.m)(_.unsubscribe)&&this.add(_.unsubscribe.bind(_)),_.unsubscribe=this.unsubscribe.bind(this))),this._context=_,this._next=m,this._error=h,this._complete=u}next(b){if(!this.isStopped&&this._next){const{_parentSubscriber:l}=this;d.v.useDeprecatedSynchronousErrorHandling&&l.syncErrorThrowable?this.__tryOrSetError(l,this._next,b)&&this.unsubscribe():this.__tryOrUnsub(this._next,b)}}error(b){if(!this.isStopped){const{_parentSubscriber:l}=this,{useDeprecatedSynchronousErrorHandling:h}=d.v;if(this._error)h&&l.syncErrorThrowable?(this.__tryOrSetError(l,this._error,b),this.unsubscribe()):(this.__tryOrUnsub(this._error,b),this.unsubscribe());else if(l.syncErrorThrowable)h?(l.syncErrorValue=b,l.syncErrorThrown=!0):(0,x.z)(b),this.unsubscribe();else{if(this.unsubscribe(),h)throw b;(0,x.z)(b)}}}complete(){if(!this.isStopped){const{_parentSubscriber:b}=this;if(this._complete){const l=()=>this._complete.call(this._context);d.v.useDeprecatedSynchronousErrorHandling&&b.syncErrorThrowable?(this.__tryOrSetError(b,l),this.unsubscribe()):(this.__tryOrUnsub(l),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(b,l){try{b.call(this._context,l)}catch(h){if(this.unsubscribe(),d.v.useDeprecatedSynchronousErrorHandling)throw h;(0,x.z)(h)}}__tryOrSetError(b,l,h){if(!d.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{l.call(this._context,h)}catch(u){return d.v.useDeprecatedSynchronousErrorHandling?(b.syncErrorValue=u,b.syncErrorThrown=!0,!0):((0,x.z)(u),!0)}return!1}_unsubscribe(){const{_parentSubscriber:b}=this;this._context=null,this._parentSubscriber=null,b.unsubscribe()}}},10826:(bt,be,Y)=>{"use strict";Y.d(be,{w:()=>d});var f,ie=Y(59796),z=Y(81555),O=Y(69105),E=Y(57744);class d{constructor(T){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,T&&(this._ctorUnsubscribe=!0,this._unsubscribe=T)}unsubscribe(){let T;if(this.closed)return;let{_parentOrParents:g,_ctorUnsubscribe:b,_unsubscribe:l,_subscriptions:h}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,g instanceof d)g.remove(this);else if(null!==g)for(let u=0;uT.concat(g instanceof E.B?g.errors:g),[])}d.EMPTY=((f=new d).closed=!0,f)},82494:(bt,be,Y)=>{"use strict";Y.d(be,{v:()=>z});let ie=!1;const z={Promise:void 0,set useDeprecatedSynchronousErrorHandling(O){if(O){const E=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+E.stack)}else ie&&console.log("RxJS: Back to a better error behavior. Thank you. <3");ie=O},get useDeprecatedSynchronousErrorHandling(){return ie}}},85345:(bt,be,Y)=>{"use strict";Y.d(be,{IY:()=>E,Ds:()=>x,ft:()=>T});var ie=Y(77393),z=Y(39897),O=Y(87444);class E extends ie.L{constructor(b){super(),this.parent=b}_next(b){this.parent.notifyNext(b)}_error(b){this.parent.notifyError(b),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class x extends ie.L{notifyNext(b){this.destination.next(b)}notifyError(b){this.destination.error(b)}notifyComplete(){this.destination.complete()}}function T(g,b){if(b.closed)return;if(g instanceof z.y)return g.subscribe(b);let l;try{l=(0,O.s)(g)(b)}catch(h){b.error(h)}return l}},52441:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>d,N:()=>x});var ie=Y(79765),z=Y(39897),O=Y(10826),E=Y(51307);class d extends z.y{constructor(l,h){super(),this.source=l,this.subjectFactory=h,this._refCount=0,this._isComplete=!1}_subscribe(l){return this.getSubject().subscribe(l)}getSubject(){const l=this._subject;return(!l||l.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let l=this._connection;return l||(this._isComplete=!1,l=this._connection=new O.w,l.add(this.source.subscribe(new f(this.getSubject(),this))),l.closed&&(this._connection=null,l=O.w.EMPTY)),l}refCount(){return(0,E.x)()(this)}}const x=(()=>{const b=d.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:b._subscribe},_isComplete:{value:b._isComplete,writable:!0},getSubject:{value:b.getSubject},connect:{value:b.connect},refCount:{value:b.refCount}}})();class f extends ie.Yc{constructor(l,h){super(l),this.connectable=h}_error(l){this._unsubscribe(),super._error(l)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const l=this.connectable;if(l){this.connectable=null;const h=l._connection;l._refCount=0,l._subject=null,l._connection=null,h&&h.unsubscribe()}}}},9112:(bt,be,Y)=>{"use strict";Y.d(be,{aj:()=>f,Ms:()=>T});var ie=Y(54869),z=Y(59796),O=Y(55197),E=Y(20509),d=Y(56693);const x={};function f(...b){let l,h;return(0,ie.K)(b[b.length-1])&&(h=b.pop()),"function"==typeof b[b.length-1]&&(l=b.pop()),1===b.length&&(0,z.k)(b[0])&&(b=b[0]),(0,d.n)(b,h).lift(new T(l))}class T{constructor(l){this.resultSelector=l}call(l,h){return h.subscribe(new g(l,this.resultSelector))}}class g extends O.L{constructor(l,h){super(l),this.resultSelector=h,this.active=0,this.values=[],this.observables=[]}_next(l){this.values.push(x),this.observables.push(l)}_complete(){const l=this.observables,h=l.length;if(0===h)this.destination.complete();else{this.active=h,this.toRespond=h;for(let u=0;u{"use strict";Y.d(be,{z:()=>O});var ie=Y(25917),z=Y(65766);function O(...E){return(0,z.u)()((0,ie.of)(...E))}},41439:(bt,be,Y)=>{"use strict";Y.d(be,{P:()=>E});var ie=Y(39897),z=Y(69412),O=Y(59193);function E(d){return new ie.y(x=>{let f;try{f=d()}catch(g){return void x.error(g)}return(f?(0,z.D)(f):(0,O.c)()).subscribe(x)})}},59193:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>z,c:()=>O});var ie=Y(39897);const z=new ie.y(d=>d.complete());function O(d){return d?function(d){return new ie.y(x=>d.schedule(()=>x.complete()))}(d):z}},35758:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>x});var ie=Y(39897),z=Y(59796),O=Y(88002),E=Y(81555),d=Y(69412);function x(...T){if(1===T.length){const g=T[0];if((0,z.k)(g))return f(g,null);if((0,E.K)(g)&&Object.getPrototypeOf(g)===Object.prototype){const b=Object.keys(g);return f(b.map(l=>g[l]),b)}}if("function"==typeof T[T.length-1]){const g=T.pop();return f(T=1===T.length&&(0,z.k)(T[0])?T[0]:T,null).pipe((0,O.U)(b=>g(...b)))}return f(T,null)}function f(T,g){return new ie.y(b=>{const l=T.length;if(0===l)return void b.complete();const h=new Array(l);let u=0,m=0;for(let _=0;_{S||(S=!0,m++),h[_]=I},error:I=>b.error(I),complete:()=>{u++,(u===l||!S)&&(m===l&&b.next(g?g.reduce((I,P,L)=>(I[P]=h[L],I),{}):h),b.complete())}}))}})}},69412:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>E});var ie=Y(39897),z=Y(87444),O=Y(91115);function E(d,x){return x?(0,O.x)(d,x):d instanceof ie.y?d:new ie.y((0,z.s)(d))}},56693:(bt,be,Y)=>{"use strict";Y.d(be,{n:()=>E});var ie=Y(39897),z=Y(55015),O=Y(94087);function E(d,x){return x?(0,O.r)(d,x):new ie.y((0,z.V)(d))}},22759:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>x});var ie=Y(39897),z=Y(59796),O=Y(69105),E=Y(88002);function x(l,h,u,m){return(0,O.m)(u)&&(m=u,u=void 0),m?x(l,h,u).pipe((0,E.U)(_=>(0,z.k)(_)?m(..._):m(_))):new ie.y(_=>{f(l,h,function(S){_.next(arguments.length>1?Array.prototype.slice.call(arguments):S)},_,u)})}function f(l,h,u,m,_){let w;if(function(l){return l&&"function"==typeof l.addEventListener&&"function"==typeof l.removeEventListener}(l)){const S=l;l.addEventListener(h,u,_),w=()=>S.removeEventListener(h,u,_)}else if(function(l){return l&&"function"==typeof l.on&&"function"==typeof l.off}(l)){const S=l;l.on(h,u),w=()=>S.off(h,u)}else if(function(l){return l&&"function"==typeof l.addListener&&"function"==typeof l.removeListener}(l)){const S=l;l.addListener(h,u),w=()=>S.removeListener(h,u)}else{if(!l||!l.length)throw new TypeError("Invalid event target");for(let S=0,I=l.length;S{"use strict";Y.d(be,{T:()=>d});var ie=Y(39897),z=Y(54869),O=Y(63282),E=Y(56693);function d(...x){let f=Number.POSITIVE_INFINITY,T=null,g=x[x.length-1];return(0,z.K)(g)?(T=x.pop(),x.length>1&&"number"==typeof x[x.length-1]&&(f=x.pop())):"number"==typeof g&&(f=x.pop()),null===T&&1===x.length&&x[0]instanceof ie.y?x[0]:(0,O.J)(f)((0,E.n)(x,T))}},17757:(bt,be,Y)=>{"use strict";Y.d(be,{C:()=>O,F:()=>E});var ie=Y(39897),z=Y(98640);const O=new ie.y(z.Z);function E(){return O}},25917:(bt,be,Y)=>{"use strict";Y.d(be,{of:()=>E});var ie=Y(54869),z=Y(56693),O=Y(94087);function E(...d){let x=d[d.length-1];return(0,ie.K)(x)?(d.pop(),(0,O.r)(d,x)):(0,z.n)(d)}},98085:(bt,be,Y)=>{"use strict";Y.d(be,{S3:()=>d});var ie=Y(59796),z=Y(56693),O=Y(55197),E=Y(20509);function d(...T){if(1===T.length){if(!(0,ie.k)(T[0]))return T[0];T=T[0]}return(0,z.n)(T,void 0).lift(new x)}class x{call(g,b){return b.subscribe(new f(g))}}class f extends O.L{constructor(g){super(g),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(g){this.observables.push(g)}_complete(){const g=this.observables,b=g.length;if(0===b)this.destination.complete();else{for(let l=0;l{"use strict";Y.d(be,{_:()=>z});var ie=Y(39897);function z(E,d){return new ie.y(d?x=>d.schedule(O,0,{error:E,subscriber:x}):x=>x.error(E))}function O({error:E,subscriber:d}){d.error(E)}},46797:(bt,be,Y)=>{"use strict";Y.d(be,{H:()=>d});var ie=Y(39897),z=Y(33637),O=Y(26561),E=Y(54869);function d(f=0,T,g){let b=-1;return(0,O.k)(T)?b=Number(T)<1?1:Number(T):(0,E.K)(T)&&(g=T),(0,E.K)(g)||(g=z.P),new ie.y(l=>{const h=(0,O.k)(f)?f:+f-g.now();return g.schedule(x,h,{index:0,period:b,subscriber:l})})}function x(f){const{index:T,period:g,subscriber:b}=f;if(b.next(T),!b.closed){if(-1===g)return b.complete();f.index=T+1,this.schedule(f,g)}}},21571:(bt,be,Y)=>{"use strict";Y.d(be,{$R:()=>x,mx:()=>f});var ie=Y(56693),z=Y(59796),O=Y(77393),E=Y(20377),d=Y(85345);function x(...h){const u=h[h.length-1];return"function"==typeof u&&h.pop(),(0,ie.n)(h,void 0).lift(new f(u))}class f{constructor(u){this.resultSelector=u}call(u,m){return m.subscribe(new T(u,this.resultSelector))}}class T extends O.L{constructor(u,m,_=Object.create(null)){super(u),this.resultSelector=m,this.iterators=[],this.active=0,this.resultSelector="function"==typeof m?m:void 0}_next(u){const m=this.iterators;(0,z.k)(u)?m.push(new b(u)):m.push("function"==typeof u[E.hZ]?new g(u[E.hZ]()):new l(this.destination,this,u))}_complete(){const u=this.iterators,m=u.length;if(this.unsubscribe(),0!==m){this.active=m;for(let _=0;_this.index}hasCompleted(){return this.array.length===this.index}}class l extends d.Ds{constructor(u,m,_){super(u),this.parent=m,this.observable=_,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[E.hZ](){return this}next(){const u=this.buffer;return 0===u.length&&this.isComplete?{value:null,done:!0}:{value:u.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(u){this.buffer.push(u),this.parent.checkIterators()}subscribe(){return(0,d.ft)(this.observable,new d.IY(this))}}},49732:(bt,be,Y)=>{"use strict";Y.d(be,{U:()=>z});var ie=Y(85345);function z(d){return function(f){return f.lift(new O(d))}}class O{constructor(x){this.durationSelector=x}call(x,f){return f.subscribe(new E(x,this.durationSelector))}}class E extends ie.Ds{constructor(x,f){super(x),this.durationSelector=f,this.hasValue=!1}_next(x){if(this.value=x,this.hasValue=!0,!this.throttled){let f;try{const{durationSelector:g}=this;f=g(x)}catch(g){return this.destination.error(g)}const T=(0,ie.ft)(f,new ie.IY(this));!T||T.closed?this.clearThrottle():this.add(this.throttled=T)}}clearThrottle(){const{value:x,hasValue:f,throttled:T}=this;T&&(this.remove(T),this.throttled=void 0,T.unsubscribe()),f&&(this.value=void 0,this.hasValue=!1,this.destination.next(x))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}},45697:(bt,be,Y)=>{"use strict";Y.d(be,{e:()=>E});var ie=Y(33637),z=Y(49732),O=Y(46797);function E(d,x=ie.P){return(0,z.U)(()=>(0,O.H)(d,x))}},5304:(bt,be,Y)=>{"use strict";Y.d(be,{K:()=>z});var ie=Y(85345);function z(d){return function(f){const T=new O(d),g=f.lift(T);return T.caught=g}}class O{constructor(x){this.selector=x}call(x,f){return f.subscribe(new E(x,this.selector,this.caught))}}class E extends ie.Ds{constructor(x,f,T){super(x),this.selector=f,this.caught=T}error(x){if(!this.isStopped){let f;try{f=this.selector(x,this.caught)}catch(b){return void super.error(b)}this._unsubscribeAndRecycle();const T=new ie.IY(this);this.add(T);const g=(0,ie.ft)(f,T);g!==T&&this.add(g)}}}},65766:(bt,be,Y)=>{"use strict";Y.d(be,{u:()=>z});var ie=Y(63282);function z(){return(0,ie.J)(1)}},94612:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>z});var ie=Y(19773);function z(O,E){return(0,ie.zg)(O,E,1)}},54395:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>O});var ie=Y(77393),z=Y(33637);function O(f,T=z.P){return g=>g.lift(new E(f,T))}class E{constructor(T,g){this.dueTime=T,this.scheduler=g}call(T,g){return g.subscribe(new d(T,this.dueTime,this.scheduler))}}class d extends ie.L{constructor(T,g,b){super(T),this.dueTime=g,this.scheduler=b,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(T){this.clearDebounce(),this.lastValue=T,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(x,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:T}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(T)}}clearDebounce(){const T=this.debouncedSubscription;null!==T&&(this.remove(T),T.unsubscribe(),this.debouncedSubscription=null)}}function x(f){f.debouncedNext()}},95242:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>z});var ie=Y(77393);function z(d=null){return x=>x.lift(new O(d))}class O{constructor(x){this.defaultValue=x}call(x,f){return f.subscribe(new E(x,this.defaultValue))}}class E extends ie.L{constructor(x,f){super(x),this.defaultValue=f,this.isEmpty=!0}_next(x){this.isEmpty=!1,this.destination.next(x)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}},65792:(bt,be,Y)=>{"use strict";Y.d(be,{g:()=>d});var ie=Y(33637),z=Y(39989),O=Y(77393),E=Y(23098);function d(g,b=ie.P){const h=(0,z.J)(g)?+g-b.now():Math.abs(g);return u=>u.lift(new x(h,b))}class x{constructor(b,l){this.delay=b,this.scheduler=l}call(b,l){return l.subscribe(new f(b,this.delay,this.scheduler))}}class f extends O.L{constructor(b,l,h){super(b),this.delay=l,this.scheduler=h,this.queue=[],this.active=!1,this.errored=!1}static dispatch(b){const l=b.source,h=l.queue,u=b.scheduler,m=b.destination;for(;h.length>0&&h[0].time-u.now()<=0;)h.shift().notification.observe(m);if(h.length>0){const _=Math.max(0,h[0].time-u.now());this.schedule(b,_)}else this.unsubscribe(),l.active=!1}_schedule(b){this.active=!0,this.destination.add(b.schedule(f.dispatch,this.delay,{source:this,destination:this.destination,scheduler:b}))}scheduleNotification(b){if(!0===this.errored)return;const l=this.scheduler,h=new T(l.now()+this.delay,b);this.queue.push(h),!1===this.active&&this._schedule(l)}_next(b){this.scheduleNotification(E.P.createNext(b))}_error(b){this.errored=!0,this.queue=[],this.destination.error(b),this.unsubscribe()}_complete(){this.scheduleNotification(E.P.createComplete()),this.unsubscribe()}}class T{constructor(b,l){this.time=b,this.notification=l}}},87519:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>z});var ie=Y(77393);function z(d,x){return f=>f.lift(new O(d,x))}class O{constructor(x,f){this.compare=x,this.keySelector=f}call(x,f){return f.subscribe(new E(x,this.compare,this.keySelector))}}class E extends ie.L{constructor(x,f,T){super(x),this.keySelector=T,this.hasKey=!1,"function"==typeof f&&(this.compare=f)}compare(x,f){return x===f}_next(x){let f;try{const{keySelector:g}=this;f=g?g(x):x}catch(g){return this.destination.error(g)}let T=!1;if(this.hasKey)try{const{compare:g}=this;T=g(this.key,f)}catch(g){return this.destination.error(g)}else this.hasKey=!0;T||(this.key=f,this.destination.next(x))}}},86804:(bt,be,Y)=>{"use strict";Y.d(be,{l:()=>O});var ie=Y(29923),z=Y(25917);function O(...E){return d=>(0,ie.z)(d,(0,z.of)(...E))}},45435:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>z});var ie=Y(77393);function z(d,x){return function(T){return T.lift(new O(d,x))}}class O{constructor(x,f){this.predicate=x,this.thisArg=f}call(x,f){return f.subscribe(new E(x,this.predicate,this.thisArg))}}class E extends ie.L{constructor(x,f,T){super(x),this.predicate=f,this.thisArg=T,this.count=0}_next(x){let f;try{f=this.predicate.call(this.thisArg,x,this.count++)}catch(T){return void this.destination.error(T)}f&&this.destination.next(x)}}},68939:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>O});var ie=Y(77393),z=Y(10826);function O(x){return f=>f.lift(new E(x))}class E{constructor(f){this.callback=f}call(f,T){return T.subscribe(new d(f,this.callback))}}class d extends ie.L{constructor(f,T){super(f),this.add(new z.w(T))}}},28049:(bt,be,Y)=>{"use strict";Y.d(be,{P:()=>f});var ie=Y(13410),z=Y(45435),O=Y(15257),E=Y(95242),d=Y(44635),x=Y(54487);function f(T,g){const b=arguments.length>=2;return l=>l.pipe(T?(0,z.h)((h,u)=>T(h,u,l)):x.y,(0,O.q)(1),b?(0,E.d)(g):(0,d.T)(()=>new ie.K))}},12627:(bt,be,Y)=>{"use strict";Y.d(be,{Z:()=>f});var ie=Y(13410),z=Y(45435),O=Y(548),E=Y(44635),d=Y(95242),x=Y(54487);function f(T,g){const b=arguments.length>=2;return l=>l.pipe(T?(0,z.h)((h,u)=>T(h,u,l)):x.y,(0,O.h)(1),b?(0,d.d)(g):(0,E.T)(()=>new ie.K))}},88002:(bt,be,Y)=>{"use strict";Y.d(be,{U:()=>z});var ie=Y(77393);function z(d,x){return function(T){if("function"!=typeof d)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return T.lift(new O(d,x))}}class O{constructor(x,f){this.project=x,this.thisArg=f}call(x,f){return f.subscribe(new E(x,this.project,this.thisArg))}}class E extends ie.L{constructor(x,f,T){super(x),this.project=f,this.count=0,this.thisArg=T||this}_next(x){let f;try{f=this.project.call(this.thisArg,x,this.count++)}catch(T){return void this.destination.error(T)}this.destination.next(f)}}},63282:(bt,be,Y)=>{"use strict";Y.d(be,{J:()=>O});var ie=Y(19773),z=Y(54487);function O(E=Number.POSITIVE_INFINITY){return(0,ie.zg)(z.y,E)}},19773:(bt,be,Y)=>{"use strict";Y.d(be,{zg:()=>E,VS:()=>f});var ie=Y(88002),z=Y(69412),O=Y(85345);function E(T,g,b=Number.POSITIVE_INFINITY){return"function"==typeof g?l=>l.pipe(E((h,u)=>(0,z.D)(T(h,u)).pipe((0,ie.U)((m,_)=>g(h,m,u,_))),b)):("number"==typeof g&&(b=g),l=>l.lift(new d(T,b)))}class d{constructor(g,b=Number.POSITIVE_INFINITY){this.project=g,this.concurrent=b}call(g,b){return b.subscribe(new x(g,this.project,this.concurrent))}}class x extends O.Ds{constructor(g,b,l=Number.POSITIVE_INFINITY){super(g),this.project=b,this.concurrent=l,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(g){this.active0?this._next(g.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}const f=E},94458:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>z});var ie=Y(52441);function z(E,d){return function(f){let T;if(T="function"==typeof E?E:function(){return E},"function"==typeof d)return f.lift(new O(T,d));const g=Object.create(f,ie.N);return g.source=f,g.subjectFactory=T,g}}class O{constructor(d,x){this.subjectFactory=d,this.selector=x}call(d,x){const{selector:f}=this,T=this.subjectFactory(),g=f(T).subscribe(d);return g.add(x.subscribe(T)),g}}},59746:(bt,be,Y)=>{"use strict";Y.d(be,{QV:()=>O,ht:()=>d});var ie=Y(77393),z=Y(23098);function O(f,T=0){return function(b){return b.lift(new E(f,T))}}class E{constructor(T,g=0){this.scheduler=T,this.delay=g}call(T,g){return g.subscribe(new d(T,this.scheduler,this.delay))}}class d extends ie.L{constructor(T,g,b=0){super(T),this.scheduler=g,this.delay=b}static dispatch(T){const{notification:g,destination:b}=T;g.observe(b),this.unsubscribe()}scheduleMessage(T){this.destination.add(this.scheduler.schedule(d.dispatch,this.delay,new x(T,this.destination)))}_next(T){this.scheduleMessage(z.P.createNext(T))}_error(T){this.scheduleMessage(z.P.createError(T)),this.unsubscribe()}_complete(){this.scheduleMessage(z.P.createComplete()),this.unsubscribe()}}class x{constructor(T,g){this.notification=T,this.destination=g}}},59328:(bt,be,Y)=>{"use strict";Y.d(be,{G:()=>z});var ie=Y(77393);function z(){return d=>d.lift(new O)}class O{call(x,f){return f.subscribe(new E(x))}}class E extends ie.L{constructor(x){super(x),this.hasPrev=!1}_next(x){let f;this.hasPrev?f=[this.prev,x]:this.hasPrev=!0,this.prev=x,f&&this.destination.next(f)}}},51307:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>z});var ie=Y(77393);function z(){return function(x){return x.lift(new O(x))}}class O{constructor(x){this.connectable=x}call(x,f){const{connectable:T}=this;T._refCount++;const g=new E(x,T),b=f.subscribe(g);return g.closed||(g.connection=T.connect()),b}}class E extends ie.L{constructor(x,f){super(x),this.connectable=f}_unsubscribe(){const{connectable:x}=this;if(!x)return void(this.connection=null);this.connectable=null;const f=x._refCount;if(f<=0)return void(this.connection=null);if(x._refCount=f-1,f>1)return void(this.connection=null);const{connection:T}=this,g=x._connection;this.connection=null,g&&(!T||g===T)&&g.unsubscribe()}}},42145:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>z});var ie=Y(77393);function z(d,x){let f=!1;return arguments.length>=2&&(f=!0),function(g){return g.lift(new O(d,x,f))}}class O{constructor(x,f,T=!1){this.accumulator=x,this.seed=f,this.hasSeed=T}call(x,f){return f.subscribe(new E(x,this.accumulator,this.seed,this.hasSeed))}}class E extends ie.L{constructor(x,f,T,g){super(x),this.accumulator=f,this._seed=T,this.hasSeed=g,this.index=0}get seed(){return this._seed}set seed(x){this.hasSeed=!0,this._seed=x}_next(x){if(this.hasSeed)return this._tryNext(x);this.seed=x,this.destination.next(x)}_tryNext(x){const f=this.index++;let T;try{T=this.accumulator(this.seed,x,f)}catch(g){this.destination.error(g)}this.seed=T,this.destination.next(T)}}},78345:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>d});var ie=Y(94458),z=Y(51307),O=Y(79765);function E(){return new O.xQ}function d(){return x=>(0,z.x)()((0,ie.O)(E)(x))}},47349:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>z});var ie=Y(88229);function z(E,d,x){let f;return f=E&&"object"==typeof E?E:{bufferSize:E,windowTime:d,refCount:!1,scheduler:x},T=>T.lift(function({bufferSize:E=Number.POSITIVE_INFINITY,windowTime:d=Number.POSITIVE_INFINITY,refCount:x,scheduler:f}){let T,b,g=0,l=!1,h=!1;return function(m){let _;g++,!T||l?(l=!1,T=new ie.t(E,d,f),_=T.subscribe(this),b=m.subscribe({next(w){T.next(w)},error(w){l=!0,T.error(w)},complete(){h=!0,b=void 0,T.complete()}}),h&&(b=void 0)):_=T.subscribe(this),this.add(()=>{g--,_.unsubscribe(),_=void 0,b&&!h&&x&&0===g&&(b.unsubscribe(),b=void 0,T=void 0)})}}(f))}},13653:(bt,be,Y)=>{"use strict";Y.d(be,{T:()=>z});var ie=Y(77393);function z(d){return x=>x.lift(new O(d))}class O{constructor(x){this.total=x}call(x,f){return f.subscribe(new E(x,this.total))}}class E extends ie.L{constructor(x,f){super(x),this.total=f,this.count=0}_next(x){++this.count>this.total&&this.destination.next(x)}}},39761:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>O});var ie=Y(29923),z=Y(54869);function O(...E){const d=E[E.length-1];return(0,z.K)(d)?(E.pop(),x=>(0,ie.z)(E,x,d)):x=>(0,ie.z)(E,x)}},43190:(bt,be,Y)=>{"use strict";Y.d(be,{w:()=>E});var ie=Y(88002),z=Y(69412),O=Y(85345);function E(f,T){return"function"==typeof T?g=>g.pipe(E((b,l)=>(0,z.D)(f(b,l)).pipe((0,ie.U)((h,u)=>T(b,h,l,u))))):g=>g.lift(new d(f))}class d{constructor(T){this.project=T}call(T,g){return g.subscribe(new x(T,this.project))}}class x extends O.Ds{constructor(T,g){super(T),this.project=g,this.index=0}_next(T){let g;const b=this.index++;try{g=this.project(T,b)}catch(l){return void this.destination.error(l)}this._innerSub(g)}_innerSub(T){const g=this.innerSubscription;g&&g.unsubscribe();const b=new O.IY(this),l=this.destination;l.add(b),this.innerSubscription=(0,O.ft)(T,b),this.innerSubscription!==b&&l.add(this.innerSubscription)}_complete(){const{innerSubscription:T}=this;(!T||T.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(T){this.destination.next(T)}}},15257:(bt,be,Y)=>{"use strict";Y.d(be,{q:()=>E});var ie=Y(77393),z=Y(7108),O=Y(59193);function E(f){return T=>0===f?(0,O.c)():T.lift(new d(f))}class d{constructor(T){if(this.total=T,this.total<0)throw new z.W}call(T,g){return g.subscribe(new x(T,this.total))}}class x extends ie.L{constructor(T,g){super(T),this.total=g,this.count=0}_next(T){const g=this.total,b=++this.count;b<=g&&(this.destination.next(T),b===g&&(this.destination.complete(),this.unsubscribe()))}}},548:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>E});var ie=Y(77393),z=Y(7108),O=Y(59193);function E(f){return function(g){return 0===f?(0,O.c)():g.lift(new d(f))}}class d{constructor(T){if(this.total=T,this.total<0)throw new z.W}call(T,g){return g.subscribe(new x(T,this.total))}}class x extends ie.L{constructor(T,g){super(T),this.total=g,this.ring=new Array,this.count=0}_next(T){const g=this.ring,b=this.total,l=this.count++;g.length0){const b=this.count>=this.total?this.total:this.count,l=this.ring;for(let h=0;h{"use strict";Y.d(be,{R:()=>z});var ie=Y(85345);function z(d){return x=>x.lift(new O(d))}class O{constructor(x){this.notifier=x}call(x,f){const T=new E(x),g=(0,ie.ft)(this.notifier,new ie.IY(T));return g&&!T.seenValue?(T.add(g),f.subscribe(T)):T}}class E extends ie.Ds{constructor(x){super(x),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},68307:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>E});var ie=Y(77393),z=Y(98640),O=Y(69105);function E(f,T,g){return function(l){return l.lift(new d(f,T,g))}}class d{constructor(T,g,b){this.nextOrObserver=T,this.error=g,this.complete=b}call(T,g){return g.subscribe(new x(T,this.nextOrObserver,this.error,this.complete))}}class x extends ie.L{constructor(T,g,b,l){super(T),this._tapNext=z.Z,this._tapError=z.Z,this._tapComplete=z.Z,this._tapError=b||z.Z,this._tapComplete=l||z.Z,(0,O.m)(g)?(this._context=this,this._tapNext=g):g&&(this._context=g,this._tapNext=g.next||z.Z,this._tapError=g.error||z.Z,this._tapComplete=g.complete||z.Z)}_next(T){try{this._tapNext.call(this._context,T)}catch(g){return void this.destination.error(g)}this.destination.next(T)}_error(T){try{this._tapError.call(this._context,T)}catch(g){return void this.destination.error(g)}this.destination.error(T)}_complete(){try{this._tapComplete.call(this._context)}catch(T){return void this.destination.error(T)}return this.destination.complete()}}},44635:(bt,be,Y)=>{"use strict";Y.d(be,{T:()=>O});var ie=Y(13410),z=Y(77393);function O(f=x){return T=>T.lift(new E(f))}class E{constructor(T){this.errorFactory=T}call(T,g){return g.subscribe(new d(T,this.errorFactory))}}class d extends z.L{constructor(T,g){super(T),this.errorFactory=g,this.hasValue=!1}_next(T){this.hasValue=!0,this.destination.next(T)}_complete(){if(this.hasValue)return this.destination.complete();{let T;try{T=this.errorFactory()}catch(g){T=g}this.destination.error(T)}}}function x(){return new ie.K}},57057:(bt,be,Y)=>{"use strict";Y.d(be,{M:()=>O});var ie=Y(55197),z=Y(20509);function O(...x){return f=>{let T;return"function"==typeof x[x.length-1]&&(T=x.pop()),f.lift(new E(x,T))}}class E{constructor(f,T){this.observables=f,this.project=T}call(f,T){return T.subscribe(new d(f,this.observables,this.project))}}class d extends ie.L{constructor(f,T,g){super(f),this.observables=T,this.project=g,this.toRespond=[];const b=T.length;this.values=new Array(b);for(let l=0;l0){const l=b.indexOf(g);-1!==l&&b.splice(l,1)}}notifyComplete(){}_next(f){if(0===this.toRespond.length){const T=[f,...this.values];this.project?this._tryProject(T):this.destination.next(T)}}_tryProject(f){let T;try{T=this.project.apply(this,f)}catch(g){return void this.destination.error(g)}this.destination.next(T)}}},94087:(bt,be,Y)=>{"use strict";Y.d(be,{r:()=>O});var ie=Y(39897),z=Y(10826);function O(E,d){return new ie.y(x=>{const f=new z.w;let T=0;return f.add(d.schedule(function(){T!==E.length?(x.next(E[T++]),x.closed||f.add(this.schedule())):x.complete()})),f})}},91115:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>u});var ie=Y(39897),z=Y(10826),O=Y(16554),x=Y(94087),f=Y(20377),b=Y(44072),l=Y(69489);function u(m,_){if(null!=m){if(function(m){return m&&"function"==typeof m[O.L]}(m))return function(m,_){return new ie.y(w=>{const S=new z.w;return S.add(_.schedule(()=>{const I=m[O.L]();S.add(I.subscribe({next(P){S.add(_.schedule(()=>w.next(P)))},error(P){S.add(_.schedule(()=>w.error(P)))},complete(){S.add(_.schedule(()=>w.complete()))}}))})),S})}(m,_);if((0,b.t)(m))return function(m,_){return new ie.y(w=>{const S=new z.w;return S.add(_.schedule(()=>m.then(I=>{S.add(_.schedule(()=>{w.next(I),S.add(_.schedule(()=>w.complete()))}))},I=>{S.add(_.schedule(()=>w.error(I)))}))),S})}(m,_);if((0,l.z)(m))return(0,x.r)(m,_);if(function(m){return m&&"function"==typeof m[f.hZ]}(m)||"string"==typeof m)return function(m,_){if(!m)throw new Error("Iterable cannot be null");return new ie.y(w=>{const S=new z.w;let I;return S.add(()=>{I&&"function"==typeof I.return&&I.return()}),S.add(_.schedule(()=>{I=m[f.hZ](),S.add(_.schedule(function(){if(w.closed)return;let P,L;try{const V=I.next();P=V.value,L=V.done}catch(V){return void w.error(V)}L?w.complete():(w.next(P),this.schedule())}))})),S})}(m,_)}throw new TypeError((null!==m&&typeof m||m)+" is not observable")}},36465:(bt,be,Y)=>{"use strict";Y.d(be,{o:()=>O});var ie=Y(10826);class z extends ie.w{constructor(d,x){super()}schedule(d,x=0){return this}}class O extends z{constructor(d,x){super(d,x),this.scheduler=d,this.work=x,this.pending=!1}schedule(d,x=0){if(this.closed)return this;this.state=d;const f=this.id,T=this.scheduler;return null!=f&&(this.id=this.recycleAsyncId(T,f,x)),this.pending=!0,this.delay=x,this.id=this.id||this.requestAsyncId(T,this.id,x),this}requestAsyncId(d,x,f=0){return setInterval(d.flush.bind(d,this),f)}recycleAsyncId(d,x,f=0){if(null!==f&&this.delay===f&&!1===this.pending)return x;clearInterval(x)}execute(d,x){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const f=this._execute(d,x);if(f)return f;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(d,x){let T,f=!1;try{this.work(d)}catch(g){f=!0,T=!!g&&g||new Error(g)}if(f)return this.unsubscribe(),T}_unsubscribe(){const d=this.id,x=this.scheduler,f=x.actions,T=f.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==T&&f.splice(T,1),null!=d&&(this.id=this.recycleAsyncId(x,d,null)),this.delay=null}}},4548:(bt,be,Y)=>{"use strict";Y.d(be,{v:()=>z});var ie=Y(2217);class z extends ie.b{constructor(E,d=ie.b.now){super(E,()=>z.delegate&&z.delegate!==this?z.delegate.now():d()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(E,d=0,x){return z.delegate&&z.delegate!==this?z.delegate.schedule(E,d,x):super.schedule(E,d,x)}flush(E){const{actions:d}=this;if(this.active)return void d.push(E);let x;this.active=!0;do{if(x=E.execute(E.state,E.delay))break}while(E=d.shift());if(this.active=!1,x){for(;E=d.shift();)E.unsubscribe();throw x}}}},61927:(bt,be,Y)=>{"use strict";Y.d(be,{r:()=>x,Z:()=>d});var ie=Y(36465),O=Y(4548);const d=new class extends O.v{flush(T){this.active=!0,this.scheduled=void 0;const{actions:g}=this;let b,l=-1,h=g.length;T=T||g.shift();do{if(b=T.execute(T.state,T.delay))break}while(++l0?super.requestAsyncId(T,g,b):(T.actions.push(this),T.scheduled||(T.scheduled=requestAnimationFrame(()=>T.flush(null))))}recycleAsyncId(T,g,b=0){if(null!==b&&b>0||null===b&&this.delay>0)return super.recycleAsyncId(T,g,b);0===T.actions.length&&(cancelAnimationFrame(g),T.scheduled=void 0)}}),x=d},64581:(bt,be,Y)=>{"use strict";Y.d(be,{e:()=>h,E:()=>l});let ie=1;const z=Promise.resolve(),O={};function E(u){return u in O&&(delete O[u],!0)}const d={setImmediate(u){const m=ie++;return O[m]=!0,z.then(()=>E(m)&&u()),m},clearImmediate(u){E(u)}};var f=Y(36465),g=Y(4548);const l=new class extends g.v{flush(m){this.active=!0,this.scheduled=void 0;const{actions:_}=this;let w,S=-1,I=_.length;m=m||_.shift();do{if(w=m.execute(m.state,m.delay))break}while(++S0?super.requestAsyncId(m,_,w):(m.actions.push(this),m.scheduled||(m.scheduled=d.setImmediate(m.flush.bind(m,null))))}recycleAsyncId(m,_,w=0){if(null!==w&&w>0||null===w&&this.delay>0)return super.recycleAsyncId(m,_,w);0===m.actions.length&&(d.clearImmediate(_),m.scheduled=void 0)}}),h=l},33637:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>O,P:()=>E});var ie=Y(36465);const O=new(Y(4548).v)(ie.o),E=O},57771:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>x,N:()=>d});var ie=Y(36465),O=Y(4548);const d=new class extends O.v{}(class extends ie.o{constructor(T,g){super(T,g),this.scheduler=T,this.work=g}schedule(T,g=0){return g>0?super.schedule(T,g):(this.delay=g,this.state=T,this.scheduler.flush(this),this)}execute(T,g){return g>0||this.closed?super.execute(T,g):this._execute(T,g)}requestAsyncId(T,g,b=0){return null!==b&&b>0||null===b&&this.delay>0?super.requestAsyncId(T,g,b):T.flush(this)}}),x=d},20377:(bt,be,Y)=>{"use strict";Y.d(be,{hZ:()=>z});const z="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},16554:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>ie});const ie="function"==typeof Symbol&&Symbol.observable||"@@observable"},29181:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>ie});const ie="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},7108:(bt,be,Y)=>{"use strict";Y.d(be,{W:()=>z});const z=(()=>{function O(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return O.prototype=Object.create(Error.prototype),O})()},13410:(bt,be,Y)=>{"use strict";Y.d(be,{K:()=>z});const z=(()=>{function O(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return O.prototype=Object.create(Error.prototype),O})()},77971:(bt,be,Y)=>{"use strict";Y.d(be,{N:()=>z});const z=(()=>{function O(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return O.prototype=Object.create(Error.prototype),O})()},57744:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>z});const z=(()=>{function O(E){return Error.call(this),this.message=E?`${E.length} errors occurred during unsubscription:\n${E.map((d,x)=>`${x+1}) ${d.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=E,this}return O.prototype=Object.create(Error.prototype),O})()},13179:(bt,be,Y)=>{"use strict";Y.d(be,{_:()=>z});var ie=Y(77393);function z(O){for(;O;){const{closed:E,destination:d,isStopped:x}=O;if(E||x)return!1;O=d&&d instanceof ie.L?d:null}return!0}},54449:(bt,be,Y)=>{"use strict";function ie(z){setTimeout(()=>{throw z},0)}Y.d(be,{z:()=>ie})},54487:(bt,be,Y)=>{"use strict";function ie(z){return z}Y.d(be,{y:()=>ie})},59796:(bt,be,Y)=>{"use strict";Y.d(be,{k:()=>ie});const ie=Array.isArray||(z=>z&&"number"==typeof z.length)},69489:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>ie});const ie=z=>z&&"number"==typeof z.length&&"function"!=typeof z},39989:(bt,be,Y)=>{"use strict";function ie(z){return z instanceof Date&&!isNaN(+z)}Y.d(be,{J:()=>ie})},69105:(bt,be,Y)=>{"use strict";function ie(z){return"function"==typeof z}Y.d(be,{m:()=>ie})},26561:(bt,be,Y)=>{"use strict";Y.d(be,{k:()=>z});var ie=Y(59796);function z(O){return!(0,ie.k)(O)&&O-parseFloat(O)+1>=0}},81555:(bt,be,Y)=>{"use strict";function ie(z){return null!==z&&"object"==typeof z}Y.d(be,{K:()=>ie})},95639:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>z});var ie=Y(39897);function z(O){return!!O&&(O instanceof ie.y||"function"==typeof O.lift&&"function"==typeof O.subscribe)}},44072:(bt,be,Y)=>{"use strict";function ie(z){return!!z&&"function"!=typeof z.subscribe&&"function"==typeof z.then}Y.d(be,{t:()=>ie})},54869:(bt,be,Y)=>{"use strict";function ie(z){return z&&"function"==typeof z.schedule}Y.d(be,{K:()=>ie})},98640:(bt,be,Y)=>{"use strict";function ie(){}Y.d(be,{Z:()=>ie})},34022:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>z,U:()=>O});var ie=Y(54487);function z(...E){return O(E)}function O(E){return 0===E.length?ie.y:1===E.length?E[0]:function(x){return E.reduce((f,T)=>T(f),x)}}},87444:(bt,be,Y)=>{"use strict";Y.d(be,{s:()=>l});var ie=Y(55015),z=Y(54449),E=Y(20377),x=Y(16554),T=Y(69489),g=Y(44072),b=Y(81555);const l=h=>{if(h&&"function"==typeof h[x.L])return(h=>u=>{const m=h[x.L]();if("function"!=typeof m.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return m.subscribe(u)})(h);if((0,T.z)(h))return(0,ie.V)(h);if((0,g.t)(h))return(h=>u=>(h.then(m=>{u.closed||(u.next(m),u.complete())},m=>u.error(m)).then(null,z.z),u))(h);if(h&&"function"==typeof h[E.hZ])return(h=>u=>{const m=h[E.hZ]();for(;;){let _;try{_=m.next()}catch(w){return u.error(w),u}if(_.done){u.complete();break}if(u.next(_.value),u.closed)break}return"function"==typeof m.return&&u.add(()=>{m.return&&m.return()}),u})(h);{const m=`You provided ${(0,b.K)(h)?"an invalid object":`'${h}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(m)}}},55015:(bt,be,Y)=>{"use strict";Y.d(be,{V:()=>ie});const ie=z=>O=>{for(let E=0,d=z.length;E{"use strict";Y.d(be,{D:()=>d});var ie=Y(77393);class z extends ie.L{constructor(f,T,g){super(),this.parent=f,this.outerValue=T,this.outerIndex=g,this.index=0}_next(f){this.parent.notifyNext(this.outerValue,f,this.outerIndex,this.index++,this)}_error(f){this.parent.notifyError(f,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var O=Y(87444),E=Y(39897);function d(x,f,T,g,b=new z(x,T,g)){if(!b.closed)return f instanceof E.y?f.subscribe(b):(0,O.s)(f)(b)}},55859:(bt,be,Y)=>{var ie=Y(3875),z=ie.Buffer;function O(d,x){for(var f in d)x[f]=d[f]}function E(d,x,f){return z(d,x,f)}z.from&&z.alloc&&z.allocUnsafe&&z.allocUnsafeSlow?bt.exports=ie:(O(ie,be),be.Buffer=E),E.prototype=Object.create(z.prototype),O(z,E),E.from=function(d,x,f){if("number"==typeof d)throw new TypeError("Argument must not be a number");return z(d,x,f)},E.alloc=function(d,x,f){if("number"!=typeof d)throw new TypeError("Argument must be a number");var T=z(d);return void 0!==x?"string"==typeof f?T.fill(x,f):T.fill(x):T.fill(0),T},E.allocUnsafe=function(d){if("number"!=typeof d)throw new TypeError("Argument must be a number");return z(d)},E.allocUnsafeSlow=function(d){if("number"!=typeof d)throw new TypeError("Argument must be a number");return ie.SlowBuffer(d)}},28898:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.safeJsonParse=function(z){if("string"!=typeof z)throw new Error("Cannot safe json parse value of type "+typeof z);try{return JSON.parse(z)}catch{return z}},be.safeJsonStringify=function(z){return"string"==typeof z?z:JSON.stringify(z,(O,E)=>void 0===E?null:E)}},88114:(bt,be,Y)=>{"use strict";var E,ie=Y(3875),z=ie.Buffer,O={};for(E in ie)!ie.hasOwnProperty(E)||"SlowBuffer"===E||"Buffer"===E||(O[E]=ie[E]);var d=O.Buffer={};for(E in z)!z.hasOwnProperty(E)||"allocUnsafe"===E||"allocUnsafeSlow"===E||(d[E]=z[E]);if(O.Buffer.prototype=z.prototype,(!d.from||d.from===Uint8Array.from)&&(d.from=function(x,f,T){if("number"==typeof x)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof x);if(x&&void 0===x.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);return z(x,f,T)}),d.alloc||(d.alloc=function(x,f,T){if("number"!=typeof x)throw new TypeError('The "size" argument must be of type number. Received type '+typeof x);if(x<0||x>=2*(1<<30))throw new RangeError('The value "'+x+'" is invalid for option "size"');var g=z(x);return f&&0!==f.length?"string"==typeof T?g.fill(f,T):g.fill(f):g.fill(0),g}),!O.kStringMaxLength)try{O.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}O.constants||(O.constants={MAX_LENGTH:O.kMaxLength},O.kStringMaxLength&&(O.constants.MAX_STRING_LENGTH=O.kStringMaxLength)),bt.exports=O},21719:function(bt){"use strict";!function(be){const Y=2147483647;function ie(h){const 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]);let m=1779033703,_=3144134277,w=1013904242,S=2773480762,I=1359893119,P=2600822924,L=528734635,V=1541459225;const W=new Uint32Array(64);function G(M){let v=0,k=M.length;for(;k>=64;){let ue,we,ae,Te,le,D=m,N=_,C=w,a=S,B=I,Q=P,ee=L,ce=V;for(we=0;we<16;we++)ae=v+4*we,W[we]=(255&M[ae])<<24|(255&M[ae+1])<<16|(255&M[ae+2])<<8|255&M[ae+3];for(we=16;we<64;we++)ue=W[we-2],Te=(ue>>>17|ue<<15)^(ue>>>19|ue<<13)^ue>>>10,ue=W[we-15],le=(ue>>>7|ue<<25)^(ue>>>18|ue<<14)^ue>>>3,W[we]=(Te+W[we-7]|0)+(le+W[we-16]|0)|0;for(we=0;we<64;we++)Te=(((B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7))+(B&Q^~B&ee)|0)+(ce+(u[we]+W[we]|0)|0)|0,le=((D>>>2|D<<30)^(D>>>13|D<<19)^(D>>>22|D<<10))+(D&N^D&C^N&C)|0,ce=ee,ee=Q,Q=B,B=a+Te|0,a=C,C=N,N=D,D=Te+le|0;m=m+D|0,_=_+N|0,w=w+C|0,S=S+a|0,I=I+B|0,P=P+Q|0,L=L+ee|0,V=V+ce|0,v+=64,k-=64}}G(h);let H,j=h.length%64,K=h.length/536870912|0,R=h.length<<3,o=j<56?56:120,y=h.slice(h.length-j,h.length);for(y.push(128),H=j+1;H>>24&255),y.push(K>>>16&255),y.push(K>>>8&255),y.push(K>>>0&255),y.push(R>>>24&255),y.push(R>>>16&255),y.push(R>>>8&255),y.push(R>>>0&255),G(y),[m>>>24&255,m>>>16&255,m>>>8&255,m>>>0&255,_>>>24&255,_>>>16&255,_>>>8&255,_>>>0&255,w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,V>>>24&255,V>>>16&255,V>>>8&255,V>>>0&255]}function z(h,u,m){h=h.length<=64?h:ie(h);const _=64+u.length+4,w=new Array(_),S=new Array(64);let I,P=[];for(I=0;I<64;I++)w[I]=54;for(I=0;I=_-4;V--){if(w[V]++,w[V]<=255)return;w[V]=0}}for(;m>=32;)L(),P=P.concat(ie(S.concat(ie(w)))),m-=32;return m>0&&(L(),P=P.concat(ie(S.concat(ie(w))).slice(0,m))),P}function O(h,u,m,_,w){let S;for(f(h,16*(2*m-1),w,0,16),S=0;S<2*m;S++)x(h,16*S,w,16),d(w,_),f(w,0,h,u+16*S,16);for(S=0;S>>32-u}function d(h,u){f(h,0,u,0,16);for(let m=8;m>0;m-=2)u[4]^=E(u[0]+u[12],7),u[8]^=E(u[4]+u[0],9),u[12]^=E(u[8]+u[4],13),u[0]^=E(u[12]+u[8],18),u[9]^=E(u[5]+u[1],7),u[13]^=E(u[9]+u[5],9),u[1]^=E(u[13]+u[9],13),u[5]^=E(u[1]+u[13],18),u[14]^=E(u[10]+u[6],7),u[2]^=E(u[14]+u[10],9),u[6]^=E(u[2]+u[14],13),u[10]^=E(u[6]+u[2],18),u[3]^=E(u[15]+u[11],7),u[7]^=E(u[3]+u[15],9),u[11]^=E(u[7]+u[3],13),u[15]^=E(u[11]+u[7],18),u[1]^=E(u[0]+u[3],7),u[2]^=E(u[1]+u[0],9),u[3]^=E(u[2]+u[1],13),u[0]^=E(u[3]+u[2],18),u[6]^=E(u[5]+u[4],7),u[7]^=E(u[6]+u[5],9),u[4]^=E(u[7]+u[6],13),u[5]^=E(u[4]+u[7],18),u[11]^=E(u[10]+u[9],7),u[8]^=E(u[11]+u[10],9),u[9]^=E(u[8]+u[11],13),u[10]^=E(u[9]+u[8],18),u[12]^=E(u[15]+u[14],7),u[13]^=E(u[12]+u[15],9),u[14]^=E(u[13]+u[12],13),u[15]^=E(u[14]+u[13],18);for(let m=0;m<16;++m)h[m]+=u[m]}function x(h,u,m,_){for(let w=0;w<_;w++)m[w]^=h[u+w]}function f(h,u,m,_,w){for(;w--;)m[_++]=h[u++]}function T(h){if(!h||"number"!=typeof h.length)return!1;for(let u=0;u=256)return!1}return!0}function g(h,u){if("number"!=typeof h||h%1)throw new Error("invalid "+u);return h}function b(h,u,m,_,w,S,I){if(m=g(m,"N"),_=g(_,"r"),w=g(w,"p"),S=g(S,"dkLen"),0===m||0!=(m&m-1))throw new Error("N must be power of 2");if(m>Y/128/_)throw new Error("N too large");if(_>Y/128/w)throw new Error("r too large");if(!T(h))throw new Error("password must be an array or buffer");if(h=Array.prototype.slice.call(h),!T(u))throw new Error("salt must be an array or buffer");u=Array.prototype.slice.call(u);let P=z(h,u,128*w*_);const L=new Uint32Array(32*w*_);for(let B=0;BN&&(B=N);for(let ee=0;eeN&&(B=N);for(let ee=0;ee>0&255),P.push(L[ee]>>8&255),P.push(L[ee]>>16&255),P.push(L[ee]>>24&255);const Q=z(h,P,S);return I&&I(null,1,Q),Q}I&&C(a)};if(!I)for(;;){const B=a();if(null!=B)return B}a()}bt.exports={scrypt:function(h,u,m,_,w,S,I){return new Promise(function(P,L){let V=0;I&&I(0),b(h,u,m,_,w,S,function(W,G,H){if(W)L(W);else if(H)I&&1!==V&&I(1),P(new Uint8Array(H));else if(I&&G!==V)return V=G,I(G)})})},syncScrypt:function(h,u,m,_,w,S){return new Uint8Array(b(h,u,m,_,w,S))}}}()},93437:(bt,be,Y)=>{var ie=Y(55859).Buffer;function z(O,E){this._block=ie.alloc(O),this._finalSize=E,this._blockSize=O,this._len=0}z.prototype.update=function(O,E){"string"==typeof O&&(O=ie.from(O,E=E||"utf8"));for(var d=this._block,x=this._blockSize,f=O.length,T=this._len,g=0;g=this._finalSize&&(this._update(this._block),this._block.fill(0));var d=8*this._len;if(d<=4294967295)this._block.writeUInt32BE(d,this._blockSize-4);else{var x=(4294967295&d)>>>0;this._block.writeUInt32BE((d-x)/4294967296,this._blockSize-8),this._block.writeUInt32BE(x,this._blockSize-4)}this._update(this._block);var T=this._hash();return O?T.toString(O):T},z.prototype._update=function(){throw new Error("_update must be implemented by subclass")},bt.exports=z},45829:(bt,be,Y)=>{var ie=bt.exports=function(O){O=O.toLowerCase();var E=ie[O];if(!E)throw new Error(O+" is not supported (we accept pull requests)");return new E};ie.sha=Y(16356),ie.sha1=Y(37338),ie.sha224=Y(4280),ie.sha256=Y(80857),ie.sha384=Y(76203),ie.sha512=Y(65976)},16356:(bt,be,Y)=>{var ie=Y(59879),z=Y(93437),O=Y(55859).Buffer,E=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);function x(){this.init(),this._w=d,z.call(this,64,56)}function f(b){return b<<5|b>>>27}function T(b){return b<<30|b>>>2}function g(b,l,h,u){return 0===b?l&h|~l&u:2===b?l&h|l&u|h&u:l^h^u}ie(x,z),x.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},x.prototype._update=function(b){for(var l=this._w,h=0|this._a,u=0|this._b,m=0|this._c,_=0|this._d,w=0|this._e,S=0;S<16;++S)l[S]=b.readInt32BE(4*S);for(;S<80;++S)l[S]=l[S-3]^l[S-8]^l[S-14]^l[S-16];for(var I=0;I<80;++I){var P=~~(I/20),L=f(h)+g(P,u,m,_)+w+l[I]+E[P]|0;w=_,_=m,m=T(u),u=h,h=L}this._a=h+this._a|0,this._b=u+this._b|0,this._c=m+this._c|0,this._d=_+this._d|0,this._e=w+this._e|0},x.prototype._hash=function(){var b=O.allocUnsafe(20);return b.writeInt32BE(0|this._a,0),b.writeInt32BE(0|this._b,4),b.writeInt32BE(0|this._c,8),b.writeInt32BE(0|this._d,12),b.writeInt32BE(0|this._e,16),b},bt.exports=x},37338:(bt,be,Y)=>{var ie=Y(59879),z=Y(93437),O=Y(55859).Buffer,E=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);function x(){this.init(),this._w=d,z.call(this,64,56)}function f(l){return l<<1|l>>>31}function T(l){return l<<5|l>>>27}function g(l){return l<<30|l>>>2}function b(l,h,u,m){return 0===l?h&u|~h&m:2===l?h&u|h&m|u&m:h^u^m}ie(x,z),x.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},x.prototype._update=function(l){for(var h=this._w,u=0|this._a,m=0|this._b,_=0|this._c,w=0|this._d,S=0|this._e,I=0;I<16;++I)h[I]=l.readInt32BE(4*I);for(;I<80;++I)h[I]=f(h[I-3]^h[I-8]^h[I-14]^h[I-16]);for(var P=0;P<80;++P){var L=~~(P/20),V=T(u)+b(L,m,_,w)+S+h[P]+E[L]|0;S=w,w=_,_=g(m),m=u,u=V}this._a=u+this._a|0,this._b=m+this._b|0,this._c=_+this._c|0,this._d=w+this._d|0,this._e=S+this._e|0},x.prototype._hash=function(){var l=O.allocUnsafe(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},bt.exports=x},4280:(bt,be,Y)=>{var ie=Y(59879),z=Y(80857),O=Y(93437),E=Y(55859).Buffer,d=new Array(64);function x(){this.init(),this._w=d,O.call(this,64,56)}ie(x,z),x.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},x.prototype._hash=function(){var f=E.allocUnsafe(28);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f},bt.exports=x},80857:(bt,be,Y)=>{var ie=Y(59879),z=Y(93437),O=Y(55859).Buffer,E=[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],d=new Array(64);function x(){this.init(),this._w=d,z.call(this,64,56)}function f(u,m,_){return _^u&(m^_)}function T(u,m,_){return u&m|_&(u|m)}function g(u){return(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10)}function b(u){return(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7)}function l(u){return(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3}function h(u){return(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10}ie(x,z),x.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},x.prototype._update=function(u){for(var m=this._w,_=0|this._a,w=0|this._b,S=0|this._c,I=0|this._d,P=0|this._e,L=0|this._f,V=0|this._g,W=0|this._h,G=0;G<16;++G)m[G]=u.readInt32BE(4*G);for(;G<64;++G)m[G]=h(m[G-2])+m[G-7]+l(m[G-15])+m[G-16]|0;for(var H=0;H<64;++H){var j=W+b(P)+f(P,L,V)+E[H]+m[H]|0,K=g(_)+T(_,w,S)|0;W=V,V=L,L=P,P=I+j|0,I=S,S=w,w=_,_=j+K|0}this._a=_+this._a|0,this._b=w+this._b|0,this._c=S+this._c|0,this._d=I+this._d|0,this._e=P+this._e|0,this._f=L+this._f|0,this._g=V+this._g|0,this._h=W+this._h|0},x.prototype._hash=function(){var u=O.allocUnsafe(32);return u.writeInt32BE(this._a,0),u.writeInt32BE(this._b,4),u.writeInt32BE(this._c,8),u.writeInt32BE(this._d,12),u.writeInt32BE(this._e,16),u.writeInt32BE(this._f,20),u.writeInt32BE(this._g,24),u.writeInt32BE(this._h,28),u},bt.exports=x},76203:(bt,be,Y)=>{var ie=Y(59879),z=Y(65976),O=Y(93437),E=Y(55859).Buffer,d=new Array(160);function x(){this.init(),this._w=d,O.call(this,128,112)}ie(x,z),x.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},x.prototype._hash=function(){var f=E.allocUnsafe(48);function T(g,b,l){f.writeInt32BE(g,l),f.writeInt32BE(b,l+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),f},bt.exports=x},65976:(bt,be,Y)=>{var ie=Y(59879),z=Y(93437),O=Y(55859).Buffer,E=[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],d=new Array(160);function x(){this.init(),this._w=d,z.call(this,128,112)}function f(w,S,I){return I^w&(S^I)}function T(w,S,I){return w&S|I&(w|S)}function g(w,S){return(w>>>28|S<<4)^(S>>>2|w<<30)^(S>>>7|w<<25)}function b(w,S){return(w>>>14|S<<18)^(w>>>18|S<<14)^(S>>>9|w<<23)}function l(w,S){return(w>>>1|S<<31)^(w>>>8|S<<24)^w>>>7}function h(w,S){return(w>>>1|S<<31)^(w>>>8|S<<24)^(w>>>7|S<<25)}function u(w,S){return(w>>>19|S<<13)^(S>>>29|w<<3)^w>>>6}function m(w,S){return(w>>>19|S<<13)^(S>>>29|w<<3)^(w>>>6|S<<26)}function _(w,S){return w>>>0>>0?1:0}ie(x,z),x.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},x.prototype._update=function(w){for(var S=this._w,I=0|this._ah,P=0|this._bh,L=0|this._ch,V=0|this._dh,W=0|this._eh,G=0|this._fh,H=0|this._gh,j=0|this._hh,K=0|this._al,R=0|this._bl,o=0|this._cl,y=0|this._dl,M=0|this._el,v=0|this._fl,k=0|this._gl,D=0|this._hl,N=0;N<32;N+=2)S[N]=w.readInt32BE(4*N),S[N+1]=w.readInt32BE(4*N+4);for(;N<160;N+=2){var C=S[N-30],a=S[N-30+1],B=l(C,a),Q=h(a,C),ee=u(C=S[N-4],a=S[N-4+1]),ce=m(a,C),ae=S[N-32],Te=S[N-32+1],le=Q+S[N-14+1]|0,X=B+S[N-14]+_(le,Q)|0;X=(X=X+ee+_(le=le+ce|0,ce)|0)+ae+_(le=le+Te|0,Te)|0,S[N]=X,S[N+1]=le}for(var ne=0;ne<160;ne+=2){X=S[ne],le=S[ne+1];var pe=T(I,P,L),_e=T(K,R,o),xe=g(I,K),Ce=g(K,I),ke=b(W,M),me=b(M,W),Ee=E[ne],ze=E[ne+1],Ve=f(W,G,H),nt=f(M,v,k),tt=D+me|0,mt=j+ke+_(tt,D)|0;mt=(mt=(mt=mt+Ve+_(tt=tt+nt|0,nt)|0)+Ee+_(tt=tt+ze|0,ze)|0)+X+_(tt=tt+le|0,le)|0;var ht=Ce+_e|0,wt=xe+pe+_(ht,Ce)|0;j=H,D=k,H=G,k=v,G=W,v=M,W=V+mt+_(M=y+tt|0,y)|0,V=L,y=o,L=P,o=R,P=I,R=K,I=mt+wt+_(K=tt+ht|0,tt)|0}this._al=this._al+K|0,this._bl=this._bl+R|0,this._cl=this._cl+o|0,this._dl=this._dl+y|0,this._el=this._el+M|0,this._fl=this._fl+v|0,this._gl=this._gl+k|0,this._hl=this._hl+D|0,this._ah=this._ah+I+_(this._al,K)|0,this._bh=this._bh+P+_(this._bl,R)|0,this._ch=this._ch+L+_(this._cl,o)|0,this._dh=this._dh+V+_(this._dl,y)|0,this._eh=this._eh+W+_(this._el,M)|0,this._fh=this._fh+G+_(this._fl,v)|0,this._gh=this._gh+H+_(this._gl,k)|0,this._hh=this._hh+j+_(this._hl,D)|0},x.prototype._hash=function(){var w=O.allocUnsafe(64);function S(I,P,L){w.writeInt32BE(I,L),w.writeInt32BE(P,L+4)}return S(this._ah,this._al,0),S(this._bh,this._bl,8),S(this._ch,this._cl,16),S(this._dh,this._dl,24),S(this._eh,this._el,32),S(this._fh,this._fl,40),S(this._gh,this._gl,48),S(this._hh,this._hl,56),w},bt.exports=x},11144:(bt,be,Y)=>{"use strict";var ie=Y(18540),z=Y(19568),O=Y(81380),E=ie("%TypeError%"),d=ie("%WeakMap%",!0),x=ie("%Map%",!0),f=z("WeakMap.prototype.get",!0),T=z("WeakMap.prototype.set",!0),g=z("WeakMap.prototype.has",!0),b=z("Map.prototype.get",!0),l=z("Map.prototype.set",!0),h=z("Map.prototype.has",!0),u=function(S,I){for(var L,P=S;null!==(L=P.next);P=L)if(L.key===I)return P.next=L.next,L.next=S.next,S.next=L,L};bt.exports=function(){var I,P,L,V={assert:function(W){if(!V.has(W))throw new E("Side channel does not contain "+O(W))},get:function(W){if(d&&W&&("object"==typeof W||"function"==typeof W)){if(I)return f(I,W)}else if(x){if(P)return b(P,W)}else if(L)return function(S,I){var P=u(S,I);return P&&P.value}(L,W)},has:function(W){if(d&&W&&("object"==typeof W||"function"==typeof W)){if(I)return g(I,W)}else if(x){if(P)return h(P,W)}else if(L)return function(S,I){return!!u(S,I)}(L,W);return!1},set:function(W,G){d&&W&&("object"==typeof W||"function"==typeof W)?(I||(I=new d),T(I,W,G)):x?(P||(P=new x),l(P,W,G)):(L||(L={key:{},next:null}),function(S,I,P){var L=u(S,I);L?L.value=P:S.next={key:I,next:S.next,value:P}}(L,W,G))}};return V}},95967:bt=>{"use strict";bt.exports=(be,Y)=>{if("string"!=typeof be||"string"!=typeof Y)throw new TypeError("Expected the arguments to be of type `string`");if(""===Y)return[be];const ie=be.indexOf(Y);return-1===ie?[be]:[be.slice(0,ie),be.slice(ie+Y.length)]}},36917:(bt,be,Y)=>{bt.exports=O;var ie=Y(93105).EventEmitter;function O(){ie.call(this)}Y(59879)(O,ie),O.Readable=Y(32833),O.Writable=Y(37807),O.Duplex=Y(20942),O.Transform=Y(55431),O.PassThrough=Y(90619),O.finished=Y(6820),O.pipeline=Y(36076),O.Stream=O,O.prototype.pipe=function(E,d){var x=this;function f(m){E.writable&&!1===E.write(m)&&x.pause&&x.pause()}function T(){x.readable&&x.resume&&x.resume()}x.on("data",f),E.on("drain",T),!E._isStdio&&(!d||!1!==d.end)&&(x.on("end",b),x.on("close",l));var g=!1;function b(){g||(g=!0,E.end())}function l(){g||(g=!0,"function"==typeof E.destroy&&E.destroy())}function h(m){if(u(),0===ie.listenerCount(this,"error"))throw m}function u(){x.removeListener("data",f),E.removeListener("drain",T),x.removeListener("end",b),x.removeListener("close",l),x.removeListener("error",h),E.removeListener("error",h),x.removeListener("end",u),x.removeListener("close",u),E.removeListener("close",u)}return x.on("error",h),E.on("error",h),x.on("end",u),x.on("close",u),E.on("close",u),E.emit("pipe",x),E}},82915:bt=>{"use strict";bt.exports=be=>encodeURIComponent(be).replace(/[!'()*]/g,Y=>`%${Y.charCodeAt(0).toString(16).toUpperCase()}`)},32519:(bt,be,Y)=>{"use strict";var ie=Y(55859).Buffer,z=ie.isEncoding||function(I){switch((I=""+I)&&I.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 d(I){var P;switch(this.encoding=function(I){var P=function(I){if(!I)return"utf8";for(var P;;)switch(I){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 I;default:if(P)return;I=(""+I).toLowerCase(),P=!0}}(I);if("string"!=typeof P&&(ie.isEncoding===z||!z(I)))throw new Error("Unknown encoding: "+I);return P||I}(I),this.encoding){case"utf16le":this.text=h,this.end=u,P=4;break;case"utf8":this.fillLast=g,P=4;break;case"base64":this.text=m,this.end=_,P=3;break;default:return this.write=w,void(this.end=S)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ie.allocUnsafe(P)}function x(I){return I<=127?0:I>>5==6?2:I>>4==14?3:I>>3==30?4:I>>6==2?-1:-2}function g(I){var P=this.lastTotal-this.lastNeed,L=function(I,P,L){if(128!=(192&P[0]))return I.lastNeed=0,"\ufffd";if(I.lastNeed>1&&P.length>1){if(128!=(192&P[1]))return I.lastNeed=1,"\ufffd";if(I.lastNeed>2&&P.length>2&&128!=(192&P[2]))return I.lastNeed=2,"\ufffd"}}(this,I);return void 0!==L?L:this.lastNeed<=I.length?(I.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(I.copy(this.lastChar,P,0,I.length),void(this.lastNeed-=I.length))}function h(I,P){if((I.length-P)%2==0){var L=I.toString("utf16le",P);if(L){var V=L.charCodeAt(L.length-1);if(V>=55296&&V<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1],L.slice(0,-1)}return L}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=I[I.length-1],I.toString("utf16le",P,I.length-1)}function u(I){var P=I&&I.length?this.write(I):"";return this.lastNeed?P+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):P}function m(I,P){var L=(I.length-P)%3;return 0===L?I.toString("base64",P):(this.lastNeed=3-L,this.lastTotal=3,1===L?this.lastChar[0]=I[I.length-1]:(this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1]),I.toString("base64",P,I.length-L))}function _(I){var P=I&&I.length?this.write(I):"";return this.lastNeed?P+this.lastChar.toString("base64",0,3-this.lastNeed):P}function w(I){return I.toString(this.encoding)}function S(I){return I&&I.length?this.write(I):""}be.s=d,d.prototype.write=function(I){if(0===I.length)return"";var P,L;if(this.lastNeed){if(void 0===(P=this.fillLast(I)))return"";L=this.lastNeed,this.lastNeed=0}else L=0;return L=0?(W>0&&(I.lastNeed=W-1),W):--V=0?(W>0&&(I.lastNeed=W-2),W):--V=0?(W>0&&(2===W?W=0:I.lastNeed=W-3),W):0}(this,I,P);if(!this.lastNeed)return I.toString("utf8",P);this.lastTotal=L;var V=I.length-(L-this.lastNeed);return I.copy(this.lastChar,0,V),I.toString("utf8",P,V)},d.prototype.fillLast=function(I){if(this.lastNeed<=I.length)return I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,I.length),this.lastNeed-=I.length}},1238:(bt,be,Y)=>{"use strict";Y.d(be,{_:()=>ru,m6:()=>go,F5:()=>na,S1:()=>jo,SP:()=>ta});var ie=Y(92280),z=Y(89225),O=Y.n(z),E=Y(97582),d=(()=>{return(et=d||(d={}))[et.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",et[et.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",et[et.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",et[et.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",et[et.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",et[et.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",et[et.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",et[et.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",et[et.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",et[et.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",et[et.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",et[et.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",et[et.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",et[et.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",et[et.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",et[et.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",et[et.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",et[et.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",et[et.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",et[et.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",et[et.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",et[et.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",et[et.INVALID_TAG=23]="INVALID_TAG",et[et.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",et[et.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",et[et.UNCLOSED_TAG=27]="UNCLOSED_TAG",d;var et})(),x=(()=>{return(et=x||(x={}))[et.literal=0]="literal",et[et.argument=1]="argument",et[et.number=2]="number",et[et.date=3]="date",et[et.time=4]="time",et[et.select=5]="select",et[et.plural=6]="plural",et[et.pound=7]="pound",et[et.tag=8]="tag",x;var et})(),f=(()=>{return(et=f||(f={}))[et.number=0]="number",et[et.dateTime=1]="dateTime",f;var et})();function T(et){return et.type===x.literal}function g(et){return et.type===x.argument}function b(et){return et.type===x.number}function l(et){return et.type===x.date}function h(et){return et.type===x.time}function u(et){return et.type===x.select}function m(et){return et.type===x.plural}function _(et){return et.type===x.pound}function w(et){return et.type===x.tag}function S(et){return!(!et||"object"!=typeof et||et.type!==f.number)}function I(et){return!(!et||"object"!=typeof et||et.type!==f.dateTime)}var V=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,G=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function H(et){var zt={};return et.replace(G,function(gn){var kn=gn.length;switch(gn[0]){case"G":zt.era=4===kn?"long":5===kn?"narrow":"short";break;case"y":zt.year=2===kn?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":zt.month=["numeric","2-digit","short","long","narrow"][kn-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":zt.day=["numeric","2-digit"][kn-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":zt.weekday=4===kn?"short":5===kn?"narrow":"short";break;case"e":if(kn<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");zt.weekday=["short","long","narrow","short"][kn-4];break;case"c":if(kn<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");zt.weekday=["short","long","narrow","short"][kn-4];break;case"a":zt.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":zt.hourCycle="h12",zt.hour=["numeric","2-digit"][kn-1];break;case"H":zt.hourCycle="h23",zt.hour=["numeric","2-digit"][kn-1];break;case"K":zt.hourCycle="h11",zt.hour=["numeric","2-digit"][kn-1];break;case"k":zt.hourCycle="h24",zt.hour=["numeric","2-digit"][kn-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":zt.minute=["numeric","2-digit"][kn-1];break;case"s":zt.second=["numeric","2-digit"][kn-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":zt.timeZoneName=kn<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),zt}var j=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function R(et){return et.replace(/^(.*?)-/,"")}var o=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,y=/^(@+)?(\+|#+)?[rs]?$/g,M=/(\*)(0+)|(#+)(0+)|(0+)/g,v=/^(0+)$/;function k(et){var zt={};return"r"===et[et.length-1]?zt.roundingPriority="morePrecision":"s"===et[et.length-1]&&(zt.roundingPriority="lessPrecision"),et.replace(y,function(gn,kn,tr){return"string"!=typeof tr?(zt.minimumSignificantDigits=kn.length,zt.maximumSignificantDigits=kn.length):"+"===tr?zt.minimumSignificantDigits=kn.length:"#"===kn[0]?zt.maximumSignificantDigits=kn.length:(zt.minimumSignificantDigits=kn.length,zt.maximumSignificantDigits=kn.length+("string"==typeof tr?tr.length:0)),""}),zt}function D(et){switch(et){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function N(et){var zt;if("E"===et[0]&&"E"===et[1]?(zt={notation:"engineering"},et=et.slice(2)):"E"===et[0]&&(zt={notation:"scientific"},et=et.slice(1)),zt){var gn=et.slice(0,2);if("+!"===gn?(zt.signDisplay="always",et=et.slice(2)):"+?"===gn&&(zt.signDisplay="exceptZero",et=et.slice(2)),!v.test(et))throw new Error("Malformed concise eng/scientific notation");zt.minimumIntegerDigits=et.length}return zt}function C(et){return D(et)||{}}function a(et){for(var zt={},gn=0,kn=et;gn1)throw new RangeError("integer-width stems only accept a single optional option");tr.options[0].replace(M,function(Ws,As,Ni,Ji,lo,qs){if(As)zt.minimumIntegerDigits=Ni.length;else{if(Ji&&lo)throw new Error("We currently do not support maximum integer digits");if(qs)throw new Error("We currently do not support exact integer digits")}return""});continue}if(v.test(tr.stem))zt.minimumIntegerDigits=tr.stem.length;else if(o.test(tr.stem)){if(tr.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");tr.stem.replace(o,function(Ws,As,Ni,Ji,lo,qs){return"*"===Ni?zt.minimumFractionDigits=As.length:Ji&&"#"===Ji[0]?zt.maximumFractionDigits=Ji.length:lo&&qs?(zt.minimumFractionDigits=lo.length,zt.maximumFractionDigits=lo.length+qs.length):(zt.minimumFractionDigits=As.length,zt.maximumFractionDigits=As.length),""});var pi=tr.options[0];"w"===pi?zt=(0,E.__assign)((0,E.__assign)({},zt),{trailingZeroDisplay:"stripIfInteger"}):pi&&(zt=(0,E.__assign)((0,E.__assign)({},zt),k(pi)))}else if(y.test(tr.stem))zt=(0,E.__assign)((0,E.__assign)({},zt),k(tr.stem));else{var xi=D(tr.stem);xi&&(zt=(0,E.__assign)((0,E.__assign)({},zt),xi));var hs=N(tr.stem);hs&&(zt=(0,E.__assign)((0,E.__assign)({},zt),hs))}}return zt}var B={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ee(et){var zt=et.hourCycle;if(void 0===zt&&et.hourCycles&&et.hourCycles.length&&(zt=et.hourCycles[0]),zt)switch(zt){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var kn,gn=et.language;return"root"!==gn&&(kn=et.maximize().region),(B[kn||""]||B[gn||""]||B["".concat(gn,"-001")]||B["001"])[0]}var ce,ue=new RegExp("^".concat(V.source,"*")),we=new RegExp("".concat(V.source,"*$"));function ae(et,zt){return{start:et,end:zt}}var Te=!!String.prototype.startsWith,le=!!String.fromCodePoint,X=!!Object.fromEntries,ne=!!String.prototype.codePointAt,pe=!!String.prototype.trimStart,_e=!!String.prototype.trimEnd,Ce=Number.isSafeInteger?Number.isSafeInteger:function(et){return"number"==typeof et&&isFinite(et)&&Math.floor(et)===et&&Math.abs(et)<=9007199254740991},ke=!0;try{ke="a"===(null===(ce=ht("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===ce?void 0:ce[0])}catch{ke=!1}var wt,Ee=Te?function(zt,gn,kn){return zt.startsWith(gn,kn)}:function(zt,gn,kn){return zt.slice(kn,kn+gn.length)===gn},ze=le?String.fromCodePoint:function(){for(var zt=[],gn=0;gnpi;){if((xi=zt[pi++])>1114111)throw RangeError(xi+" is not a valid code point");kn+=xi<65536?String.fromCharCode(xi):String.fromCharCode(55296+((xi-=65536)>>10),xi%1024+56320)}return kn},Ve=X?Object.fromEntries:function(zt){for(var gn={},kn=0,tr=zt;kn=kn)){var pi,tr=zt.charCodeAt(gn);return tr<55296||tr>56319||gn+1===kn||(pi=zt.charCodeAt(gn+1))<56320||pi>57343?tr:pi-56320+(tr-55296<<10)+65536}},tt=pe?function(zt){return zt.trimStart()}:function(zt){return zt.replace(ue,"")},mt=_e?function(zt){return zt.trimEnd()}:function(zt){return zt.replace(we,"")};function ht(et,zt){return new RegExp(et,zt)}if(ke){var Pt=ht("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wt=function(zt,gn){var kn;return Pt.lastIndex=gn,null!==(kn=Pt.exec(zt)[1])&&void 0!==kn?kn:""}}else wt=function(zt,gn){for(var kn=[];;){var tr=nt(zt,gn);if(void 0===tr||Wt(tr)||(et=tr)>=33&&et<=35||36===et||et>=37&&et<=39||40===et||41===et||42===et||43===et||44===et||45===et||et>=46&&et<=47||et>=58&&et<=59||et>=60&&et<=62||et>=63&&et<=64||91===et||92===et||93===et||94===et||96===et||123===et||124===et||125===et||126===et||161===et||et>=162&&et<=165||166===et||167===et||169===et||171===et||172===et||174===et||176===et||177===et||182===et||187===et||191===et||215===et||247===et||et>=8208&&et<=8213||et>=8214&&et<=8215||8216===et||8217===et||8218===et||et>=8219&&et<=8220||8221===et||8222===et||8223===et||et>=8224&&et<=8231||et>=8240&&et<=8248||8249===et||8250===et||et>=8251&&et<=8254||et>=8257&&et<=8259||8260===et||8261===et||8262===et||et>=8263&&et<=8273||8274===et||8275===et||et>=8277&&et<=8286||et>=8592&&et<=8596||et>=8597&&et<=8601||et>=8602&&et<=8603||et>=8604&&et<=8607||8608===et||et>=8609&&et<=8610||8611===et||et>=8612&&et<=8613||8614===et||et>=8615&&et<=8621||8622===et||et>=8623&&et<=8653||et>=8654&&et<=8655||et>=8656&&et<=8657||8658===et||8659===et||8660===et||et>=8661&&et<=8691||et>=8692&&et<=8959||et>=8960&&et<=8967||8968===et||8969===et||8970===et||8971===et||et>=8972&&et<=8991||et>=8992&&et<=8993||et>=8994&&et<=9e3||9001===et||9002===et||et>=9003&&et<=9083||9084===et||et>=9085&&et<=9114||et>=9115&&et<=9139||et>=9140&&et<=9179||et>=9180&&et<=9185||et>=9186&&et<=9254||et>=9255&&et<=9279||et>=9280&&et<=9290||et>=9291&&et<=9311||et>=9472&&et<=9654||9655===et||et>=9656&&et<=9664||9665===et||et>=9666&&et<=9719||et>=9720&&et<=9727||et>=9728&&et<=9838||9839===et||et>=9840&&et<=10087||10088===et||10089===et||10090===et||10091===et||10092===et||10093===et||10094===et||10095===et||10096===et||10097===et||10098===et||10099===et||10100===et||10101===et||et>=10132&&et<=10175||et>=10176&&et<=10180||10181===et||10182===et||et>=10183&&et<=10213||10214===et||10215===et||10216===et||10217===et||10218===et||10219===et||10220===et||10221===et||10222===et||10223===et||et>=10224&&et<=10239||et>=10240&&et<=10495||et>=10496&&et<=10626||10627===et||10628===et||10629===et||10630===et||10631===et||10632===et||10633===et||10634===et||10635===et||10636===et||10637===et||10638===et||10639===et||10640===et||10641===et||10642===et||10643===et||10644===et||10645===et||10646===et||10647===et||10648===et||et>=10649&&et<=10711||10712===et||10713===et||10714===et||10715===et||et>=10716&&et<=10747||10748===et||10749===et||et>=10750&&et<=11007||et>=11008&&et<=11055||et>=11056&&et<=11076||et>=11077&&et<=11078||et>=11079&&et<=11084||et>=11085&&et<=11123||et>=11124&&et<=11125||et>=11126&&et<=11157||11158===et||et>=11159&&et<=11263||et>=11776&&et<=11777||11778===et||11779===et||11780===et||11781===et||et>=11782&&et<=11784||11785===et||11786===et||11787===et||11788===et||11789===et||et>=11790&&et<=11798||11799===et||et>=11800&&et<=11801||11802===et||11803===et||11804===et||11805===et||et>=11806&&et<=11807||11808===et||11809===et||11810===et||11811===et||11812===et||11813===et||11814===et||11815===et||11816===et||11817===et||et>=11818&&et<=11822||11823===et||et>=11824&&et<=11833||et>=11834&&et<=11835||et>=11836&&et<=11839||11840===et||11841===et||11842===et||et>=11843&&et<=11855||et>=11856&&et<=11857||11858===et||et>=11859&&et<=11903||et>=12289&&et<=12291||12296===et||12297===et||12298===et||12299===et||12300===et||12301===et||12302===et||12303===et||12304===et||12305===et||et>=12306&&et<=12307||12308===et||12309===et||12310===et||12311===et||12312===et||12313===et||12314===et||12315===et||12316===et||12317===et||et>=12318&&et<=12319||12320===et||12336===et||64830===et||64831===et||et>=65093&&et<=65094)break;kn.push(tr),gn+=tr>=65536?2:1}var et;return ze.apply(void 0,kn)};var st=function(){function et(zt,gn){void 0===gn&&(gn={}),this.message=zt,this.position={offset:0,line:1,column:1},this.ignoreTag=!!gn.ignoreTag,this.locale=gn.locale,this.requiresOtherClause=!!gn.requiresOtherClause,this.shouldParseSkeletons=!!gn.shouldParseSkeletons}return et.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},et.prototype.parseMessage=function(zt,gn,kn){for(var tr=[];!this.isEOF();){var pi=this.char();if(123===pi){if((xi=this.parseArgument(zt,kn)).err)return xi;tr.push(xi.val)}else{if(125===pi&&zt>0)break;if(35!==pi||"plural"!==gn&&"selectordinal"!==gn){if(60===pi&&!this.ignoreTag&&47===this.peek()){if(kn)break;return this.error(d.UNMATCHED_CLOSING_TAG,ae(this.clonePosition(),this.clonePosition()))}if(60===pi&&!this.ignoreTag&&Ye(this.peek()||0)){if((xi=this.parseTag(zt,gn)).err)return xi;tr.push(xi.val)}else{var xi;if((xi=this.parseLiteral(zt,gn)).err)return xi;tr.push(xi.val)}}else{var hs=this.clonePosition();this.bump(),tr.push({type:x.pound,location:ae(hs,this.clonePosition())})}}}return{val:tr,err:null}},et.prototype.parseTag=function(zt,gn){var kn=this.clonePosition();this.bump();var tr=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:x.literal,value:"<".concat(tr,"/>"),location:ae(kn,this.clonePosition())},err:null};if(this.bumpIf(">")){var pi=this.parseMessage(zt+1,gn,!0);if(pi.err)return pi;var xi=pi.val,hs=this.clonePosition();if(this.bumpIf("")?{val:{type:x.tag,value:tr,children:xi,location:ae(kn,this.clonePosition())},err:null}:this.error(d.INVALID_TAG,ae(hs,this.clonePosition())))}return this.error(d.UNCLOSED_TAG,ae(kn,this.clonePosition()))}return this.error(d.INVALID_TAG,ae(kn,this.clonePosition()))},et.prototype.parseTagName=function(){var zt=this.offset();for(this.bump();!this.isEOF()&&St(this.char());)this.bump();return this.message.slice(zt,this.offset())},et.prototype.parseLiteral=function(zt,gn){for(var kn=this.clonePosition(),tr="";;){var pi=this.tryParseQuote(gn);if(pi)tr+=pi;else{var xi=this.tryParseUnquoted(zt,gn);if(xi)tr+=xi;else{var hs=this.tryParseLeftAngleBracket();if(!hs)break;tr+=hs}}}var Ws=ae(kn,this.clonePosition());return{val:{type:x.literal,value:tr,location:Ws},err:null}},et.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&function(et){return Ye(et)||47===et}(this.peek()||0)?null:(this.bump(),"<")},et.prototype.tryParseQuote=function(zt){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===zt||"selectordinal"===zt)break;return null;default:return null}this.bump();var gn=[this.char()];for(this.bump();!this.isEOF();){var kn=this.char();if(39===kn){if(39!==this.peek()){this.bump();break}gn.push(39),this.bump()}else gn.push(kn);this.bump()}return ze.apply(void 0,gn)},et.prototype.tryParseUnquoted=function(zt,gn){if(this.isEOF())return null;var kn=this.char();return 60===kn||123===kn||35===kn&&("plural"===gn||"selectordinal"===gn)||125===kn&&zt>0?null:(this.bump(),ze(kn))},et.prototype.parseArgument=function(zt,gn){var kn=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(kn,this.clonePosition()));if(125===this.char())return this.bump(),this.error(d.EMPTY_ARGUMENT,ae(kn,this.clonePosition()));var tr=this.parseIdentifierIfPossible().value;if(!tr)return this.error(d.MALFORMED_ARGUMENT,ae(kn,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(kn,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:x.argument,value:tr,location:ae(kn,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(kn,this.clonePosition())):this.parseArgumentOptions(zt,gn,tr,kn);default:return this.error(d.MALFORMED_ARGUMENT,ae(kn,this.clonePosition()))}},et.prototype.parseIdentifierIfPossible=function(){var zt=this.clonePosition(),gn=this.offset(),kn=wt(this.message,gn);return this.bumpTo(gn+kn.length),{value:kn,location:ae(zt,this.clonePosition())}},et.prototype.parseArgumentOptions=function(zt,gn,kn,tr){var pi,xi=this.clonePosition(),hs=this.parseIdentifierIfPossible().value,Ws=this.clonePosition();switch(hs){case"":return this.error(d.EXPECT_ARGUMENT_TYPE,ae(xi,Ws));case"number":case"date":case"time":this.bumpSpace();var As=null;if(this.bumpIf(",")){this.bumpSpace();var Ni=this.clonePosition();if((Ji=this.parseSimpleArgStyleIfPossible()).err)return Ji;if(0===(lo=mt(Ji.val)).length)return this.error(d.EXPECT_ARGUMENT_STYLE,ae(this.clonePosition(),this.clonePosition()));As={style:lo,styleLocation:ae(Ni,this.clonePosition())}}if((Ka=this.tryParseArgumentClose(tr)).err)return Ka;var Ko=ae(tr,this.clonePosition());if(As&&Ee(null==As?void 0:As.style,"::",0)){var dl=tt(As.style.slice(2));if("number"===hs)return(Ji=this.parseNumberSkeletonFromString(dl,As.styleLocation)).err?Ji:{val:{type:x.number,value:kn,location:Ko,style:Ji.val},err:null};if(0===dl.length)return this.error(d.EXPECT_DATE_TIME_SKELETON,Ko);var Gc=dl;this.locale&&(Gc=function(et,zt){for(var gn="",kn=0;kn>1),As=ee(zt);for(("H"==As||"k"==As)&&(hs=0);hs-- >0;)gn+="a";for(;xi-- >0;)gn=As+gn}else gn+="J"===tr?"H":tr}return gn}(dl,this.locale));var lo={type:f.dateTime,pattern:Gc,location:As.styleLocation,parsedOptions:this.shouldParseSkeletons?H(Gc):{}};return{val:{type:"date"===hs?x.date:x.time,value:kn,location:Ko,style:lo},err:null}}return{val:{type:"number"===hs?x.number:"date"===hs?x.date:x.time,value:kn,location:Ko,style:null!==(pi=null==As?void 0:As.style)&&void 0!==pi?pi:null},err:null};case"plural":case"selectordinal":case"select":var Ki=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(d.EXPECT_SELECT_ARGUMENT_OPTIONS,ae(Ki,(0,E.__assign)({},Ki)));this.bumpSpace();var ga=this.parseIdentifierIfPossible(),Ur=0;if("select"!==hs&&"offset"===ga.value){if(!this.bumpIf(":"))return this.error(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ae(this.clonePosition(),this.clonePosition()));var Ji;if(this.bumpSpace(),(Ji=this.tryParseDecimalInteger(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,d.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return Ji;this.bumpSpace(),ga=this.parseIdentifierIfPossible(),Ur=Ji.val}var Ka,ca=this.tryParsePluralOrSelectOptions(zt,hs,gn,ga);if(ca.err)return ca;if((Ka=this.tryParseArgumentClose(tr)).err)return Ka;var wf=ae(tr,this.clonePosition());return"select"===hs?{val:{type:x.select,value:kn,options:Ve(ca.val),location:wf},err:null}:{val:{type:x.plural,value:kn,options:Ve(ca.val),offset:Ur,pluralType:"plural"===hs?"cardinal":"ordinal",location:wf},err:null};default:return this.error(d.INVALID_ARGUMENT_TYPE,ae(xi,Ws))}},et.prototype.tryParseArgumentClose=function(zt){return this.isEOF()||125!==this.char()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(zt,this.clonePosition())):(this.bump(),{val:!0,err:null})},et.prototype.parseSimpleArgStyleIfPossible=function(){for(var zt=0,gn=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var tr=this.clonePosition();if(!this.bumpUntil("'"))return this.error(d.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ae(tr,this.clonePosition()));this.bump();break;case 123:zt+=1,this.bump();break;case 125:if(!(zt>0))return{val:this.message.slice(gn.offset,this.offset()),err:null};zt-=1;break;default:this.bump()}return{val:this.message.slice(gn.offset,this.offset()),err:null}},et.prototype.parseNumberSkeletonFromString=function(zt,gn){var kn=[];try{kn=function(et){if(0===et.length)throw new Error("Number skeleton cannot be empty");for(var gn=[],kn=0,tr=et.split(j).filter(function(lo){return lo.length>0});kn=48&&hs<=57))break;pi=!0,xi=10*xi+(hs-48),this.bump()}var Ws=ae(tr,this.clonePosition());return pi?Ce(xi*=kn)?{val:xi,err:null}:this.error(gn,Ws):this.error(zt,Ws)},et.prototype.offset=function(){return this.position.offset},et.prototype.isEOF=function(){return this.offset()===this.message.length},et.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},et.prototype.char=function(){var zt=this.position.offset;if(zt>=this.message.length)throw Error("out of bound");var gn=nt(this.message,zt);if(void 0===gn)throw Error("Offset ".concat(zt," is at invalid UTF-16 code unit boundary"));return gn},et.prototype.error=function(zt,gn){return{val:null,err:{kind:zt,message:this.message,location:gn}}},et.prototype.bump=function(){if(!this.isEOF()){var zt=this.char();10===zt?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=zt<65536?1:2)}},et.prototype.bumpIf=function(zt){if(Ee(this.message,zt,this.offset())){for(var gn=0;gn=0?(this.bumpTo(kn),!0):(this.bumpTo(this.message.length),!1)},et.prototype.bumpTo=function(zt){if(this.offset()>zt)throw Error("targetOffset ".concat(zt," must be greater than or equal to the current offset ").concat(this.offset()));for(zt=Math.min(zt,this.message.length);;){var gn=this.offset();if(gn===zt)break;if(gn>zt)throw Error("targetOffset ".concat(zt," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},et.prototype.bumpSpace=function(){for(;!this.isEOF()&&Wt(this.char());)this.bump()},et.prototype.peek=function(){if(this.isEOF())return null;var zt=this.char(),gn=this.offset();return this.message.charCodeAt(gn+(zt>=65536?2:1))??null},et}();function Ye(et){return et>=97&&et<=122||et>=65&&et<=90}function St(et){return 45===et||46===et||et>=48&&et<=57||95===et||et>=97&&et<=122||et>=65&&et<=90||183==et||et>=192&&et<=214||et>=216&&et<=246||et>=248&&et<=893||et>=895&&et<=8191||et>=8204&&et<=8205||et>=8255&&et<=8256||et>=8304&&et<=8591||et>=11264&&et<=12271||et>=12289&&et<=55295||et>=63744&&et<=64975||et>=65008&&et<=65533||et>=65536&&et<=983039}function Wt(et){return et>=9&&et<=13||32===et||133===et||et>=8206&&et<=8207||8232===et||8233===et}function Nt(et){et.forEach(function(zt){if(delete zt.location,u(zt)||m(zt))for(var gn in zt.options)delete zt.options[gn].location,Nt(zt.options[gn].value);else b(zt)&&S(zt.style)||(l(zt)||h(zt))&&I(zt.style)?delete zt.style.location:w(zt)&&Nt(zt.children)})}function It(et,zt){void 0===zt&&(zt={}),zt=(0,E.__assign)({shouldParseSkeletons:!0,requiresOtherClause:!0},zt);var gn=new st(et,zt).parse();if(gn.err){var kn=SyntaxError(d[gn.err.kind]);throw kn.location=gn.err.location,kn.originalMessage=gn.err.message,kn}return(null==zt?void 0:zt.captureLocation)||Nt(gn.val),gn.val}function qt(et,zt){return(zt&&zt.strategy?zt.strategy:$n)(et,{cache:zt&&zt.cache?zt.cache:Gn,serializer:zt&&zt.serializer?zt.serializer:Bn})}function Yt(et,zt,gn,kn){var tr=function(et){return null==et||"number"==typeof et||"boolean"==typeof et}(kn)?kn:gn(kn),pi=zt.get(tr);return void 0===pi&&(pi=et.call(this,kn),zt.set(tr,pi)),pi}function Wn(et,zt,gn){var kn=Array.prototype.slice.call(arguments,3),tr=gn(kn),pi=zt.get(tr);return void 0===pi&&(pi=et.apply(this,kn),zt.set(tr,pi)),pi}function fn(et,zt,gn,kn,tr){return gn.bind(zt,et,kn,tr)}function $n(et,zt){return fn(et,this,1===et.length?Yt:Wn,zt.cache.create(),zt.serializer)}var Bn=function(){return JSON.stringify(arguments)};function $r(){this.cache=Object.create(null)}$r.prototype.get=function(et){return this.cache[et]},$r.prototype.set=function(et,zt){this.cache[et]=zt};var Gn={create:function(){return new $r}},bn={variadic:function(et,zt){return fn(et,this,Wn,zt.cache.create(),zt.serializer)},monadic:function(et,zt){return fn(et,this,Yt,zt.cache.create(),zt.serializer)}},Lr=(()=>{return(et=Lr||(Lr={})).MISSING_VALUE="MISSING_VALUE",et.INVALID_VALUE="INVALID_VALUE",et.MISSING_INTL_API="MISSING_INTL_API",Lr;var et})(),Kn=function(et){function zt(gn,kn,tr){var pi=et.call(this,gn)||this;return pi.code=kn,pi.originalMessage=tr,pi}return(0,E.__extends)(zt,et),zt.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},zt}(Error),sr=function(et){function zt(gn,kn,tr,pi){return et.call(this,'Invalid values for "'.concat(gn,'": "').concat(kn,'". Options are "').concat(Object.keys(tr).join('", "'),'"'),Lr.INVALID_VALUE,pi)||this}return(0,E.__extends)(zt,et),zt}(Kn),Ii=function(et){function zt(gn,kn,tr){return et.call(this,'Value for "'.concat(gn,'" must be of type ').concat(kn),Lr.INVALID_VALUE,tr)||this}return(0,E.__extends)(zt,et),zt}(Kn),Un=function(et){function zt(gn,kn){return et.call(this,'The intl string context variable "'.concat(gn,'" was not provided to the string "').concat(kn,'"'),Lr.MISSING_VALUE,kn)||this}return(0,E.__extends)(zt,et),zt}(Kn),ir=(()=>{return(et=ir||(ir={}))[et.literal=0]="literal",et[et.object=1]="object",ir;var et})();function Tn(et){return"function"==typeof et}function Qn(et,zt,gn,kn,tr,pi,xi){if(1===et.length&&T(et[0]))return[{type:ir.literal,value:et[0].value}];for(var hs=[],Ws=0,As=et;Ws0?new Intl.Locale(gn[0]):new Intl.Locale("string"==typeof zt?zt:zt[0])},et.__parse=It,et.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},et}();const Fr={},hi=(et,zt,gn)=>gn&&(zt in Fr||(Fr[zt]={}),et in Fr[zt]||(Fr[zt][et]=gn),gn),wi=(et,zt)=>{if(null==zt)return;if(zt in Fr&&et in Fr[zt])return Fr[zt][et];const gn=Qi(zt);for(let kn=0;kn0){const pi=gn.slice(tr,gn.length).join(".");if(pi in kn){kn=kn[pi];break}}kn=kn[gn[tr]]}else kn=void 0;return kn}(gn,zt)}function go(et,...zt){delete Fr[et],$i.update(gn=>(gn[et]=O().all([gn[et]||{},...zt]),gn))}(0,ie.nK)([$i],([et])=>Object.keys(et)),$i.subscribe(et=>cs=et);const so={};function Wi(et){return so[et]}function _s(et){return null!=et&&Qi(et).some(zt=>{var gn;return null==(gn=Wi(zt))?void 0:gn.size})}const zi={};function Ms(et){if(!_s(et))return et in zi?zi[et]:Promise.resolve();const zt=function(et){return Qi(et).map(zt=>{const gn=Wi(zt);return[zt,gn?[...gn]:[]]}).filter(([,zt])=>zt.length>0)}(et);return zi[et]=Promise.all(zt.map(([gn,kn])=>function(et,zt){return Promise.all(zt.map(kn=>(function(et,zt){so[et].delete(zt),0===so[et].size&&delete so[et]}(et,kn),kn().then(tr=>tr.default||tr)))).then(kn=>go(et,...kn))}(gn,kn))).then(()=>{if(_s(et))return Ms(et);delete zi[et]}),zi[et]}var Lu=Object.getOwnPropertySymbols,Qa=Object.prototype.hasOwnProperty,ja=Object.prototype.propertyIsEnumerable;function Na({locale:et,id:zt}){console.warn(`[svelte-i18n] The message "${zt}" was not found in "${Qi(et).join('", "')}".${_s(Vs())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`)}const Uu={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Eu(){return Uu}function jo(et){const zt=et,{formats:gn}=zt,kn=((et,zt)=>{var gn={};for(var kn in et)Qa.call(et,kn)&&zt.indexOf(kn)<0&&(gn[kn]=et[kn]);if(null!=et&&Lu)for(var kn of Lu(et))zt.indexOf(kn)<0&&ja.call(et,kn)&&(gn[kn]=et[kn]);return gn})(zt,["formats"]);let tr=et.fallbackLocale;if(et.initialLocale)try{ur.resolveLocale(et.initialLocale)&&(tr=et.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${et.initialLocale}" is not a valid locale.`)}return kn.warnOnMissingMessages&&(delete kn.warnOnMissingMessages,null==kn.handleMissingMessage?kn.handleMissingMessage=Na:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(Uu,kn,{initialLocale:tr}),gn&&("number"in gn&&Object.assign(Uu.formats.number,gn.number),"date"in gn&&Object.assign(Uu.formats.date,gn.date),"time"in gn&&Object.assign(Uu.formats.time,gn.time)),ta.set(tr)}const yo=(0,ie.fZ)(!1);var Vc=Object.defineProperty,El=Object.defineProperties,ec=Object.getOwnPropertyDescriptors,kc=Object.getOwnPropertySymbols,Cc=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,tu=(et,zt,gn)=>zt in et?Vc(et,zt,{enumerable:!0,configurable:!0,writable:!0,value:gn}):et[zt]=gn;let Jr;const Cr=(0,ie.fZ)(null);function Sr(et){return et.split("-").map((zt,gn,kn)=>kn.slice(0,gn+1).join("-")).reverse()}function Qi(et,zt=Eu().fallbackLocale){const gn=Sr(et);return zt?[...new Set([...gn,...Sr(zt)])]:gn}function Vs(){return Jr??void 0}Cr.subscribe(et=>{Jr=et??void 0,"undefined"!=typeof window&&null!=et&&document.documentElement.setAttribute("lang",et)});const ta=(et=((et,zt)=>{for(var gn in zt||(zt={}))Cc.call(zt,gn)&&tu(et,gn,zt[gn]);if(kc)for(var gn of kc(zt))eu.call(zt,gn)&&tu(et,gn,zt[gn]);return et})({},Cr),zt={set:et=>{if(et&&function(et){if(null==et)return;const zt=Qi(et);for(let gn=0;gnyo.set(!0),zt):yo.set(!0),Ms(et).then(()=>{Cr.set(et)}).finally(()=>{clearTimeout(gn),yo.set(!1)})}return Cr.set(et)}},El(et,ec(zt))),na=()=>"undefined"==typeof window?null:window.navigator.language||window.navigator.languages[0],ua=et=>{const zt=Object.create(null);return kn=>{const tr=JSON.stringify(kn);return tr in zt?zt[tr]:zt[tr]=et(kn)}};var et,zt,Pu=Object.defineProperty,oc=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable,rr=(et,zt,gn)=>zt in et?Pu(et,zt,{enumerable:!0,configurable:!0,writable:!0,value:gn}):et[zt]=gn,hn=(et,zt)=>{for(var gn in zt||(zt={}))po.call(zt,gn)&&rr(et,gn,zt[gn]);if(oc)for(var gn of oc(zt))Sn.call(zt,gn)&&rr(et,gn,zt[gn]);return et},Cn=(et,zt)=>{var gn={};for(var kn in et)po.call(et,kn)&&zt.indexOf(kn)<0&&(gn[kn]=et[kn]);if(null!=et&&oc)for(var kn of oc(et))zt.indexOf(kn)<0&&Sn.call(et,kn)&&(gn[kn]=et[kn]);return gn};const Ir=(et,zt)=>{const{formats:gn}=Eu();if(et in gn&&zt in gn[et])return gn[et][zt];throw new Error(`[svelte-i18n] Unknown "${zt}" ${et} format.`)},Ei=ua(et=>{var zt=et,{locale:gn,format:kn}=zt,tr=Cn(zt,["locale","format"]);if(null==gn)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return kn&&(tr=Ir("number",kn)),new Intl.NumberFormat(gn,tr)}),Os=ua(et=>{var zt=et,{locale:gn,format:kn}=zt,tr=Cn(zt,["locale","format"]);if(null==gn)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return kn?tr=Ir("date",kn):0===Object.keys(tr).length&&(tr=Ir("date","short")),new Intl.DateTimeFormat(gn,tr)}),Cs=ua(et=>{var zt=et,{locale:gn,format:kn}=zt,tr=Cn(zt,["locale","format"]);if(null==gn)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return kn?tr=Ir("time",kn):0===Object.keys(tr).length&&(tr=Ir("time","short")),new Intl.DateTimeFormat(gn,tr)}),Vo=ua((et,zt=Vs())=>new ur(et,zt,Eu().formats,{ignoreTag:Eu().ignoreTag})),sa=(et,zt={})=>{var gn,kn,tr,pi;let xi=zt;"object"==typeof et&&(xi=et,et=xi.id);const{values:hs,locale:Ws=Vs(),default:As}=xi;if(null==Ws)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let Ni=wi(et,Ws);if(Ni){if("string"!=typeof Ni)return console.warn(`[svelte-i18n] Message with id "${et}" must be of type "string", found: "${typeof Ni}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),Ni}else Ni=null!=(pi=null!=(tr=null==(kn=(gn=Eu()).handleMissingMessage)?void 0:kn.call(gn,{locale:Ws,id:et,defaultValue:As}))?tr:As)?pi:et;if(!hs)return Ni;let Ji=Ni;try{Ji=Vo(Ni,Ws).format(hs)}catch(lo){lo instanceof Error&&console.warn(`[svelte-i18n] Message "${et}" has syntax error:`,lo.message)}return Ji},nu=(et,zt)=>((et={})=>{var zt=et,{locale:gn=Vs()}=zt,kn=Cn(zt,["locale"]);return Cs(hn({locale:gn},kn))})(zt).format(et),Po=(et,zt)=>((et={})=>{var zt=et,{locale:gn=Vs()}=zt,kn=Cn(zt,["locale"]);return Os(hn({locale:gn},kn))})(zt).format(et),Hu=(et,zt)=>((et={})=>{var zt=et,{locale:gn=Vs()}=zt,kn=Cn(zt,["locale"]);return Ei(hn({locale:gn},kn))})(zt).format(et),Pc=(et,zt=Vs())=>wi(et,zt),ru=(0,ie.nK)([ta,$i],()=>sa);(0,ie.nK)([ta],()=>nu),(0,ie.nK)([ta],()=>Po),(0,ie.nK)([ta],()=>Hu),(0,ie.nK)([ta,$i],()=>Pc)},55892:bt=>{bt.exports&&(bt.exports=function(Y){"use strict";return Y.prototype.toFormat=function(z,O,E){if(!this.e&&0!==this.e)return this.toString();var d,x,f,T,g,b,l,h,u,m,_,w,S,I,P,L=this.format||{},V=this.constructor.format||{};if(z!=g?"object"==typeof z?(E=z,z=g):O!=g?"object"==typeof O?(E=O,O=g):"object"!=typeof E&&(E={}):E={}:E={},h=(d=this.toFixed(z,O).split("."))[0],u=d[1],b=(l=this.s<0?h.slice(1):h).length,(m=E.decimalSeparator)==g&&(m=L.decimalSeparator)==g&&(m=V.decimalSeparator)==g&&(m="."),(_=E.groupSeparator)==g&&(_=L.groupSeparator)==g&&(_=V.groupSeparator),_&&((w=E.groupSize)==g&&(w=L.groupSize)==g&&(w=V.groupSize)==g&&(w=0),(S=E.secondaryGroupSize)==g&&(S=L.secondaryGroupSize)==g&&(S=V.secondaryGroupSize)==g&&(S=0),S?(x=+S,b-=f=+w):(x=+w,f=+S),x>0&&b>0)){for(h=l.substr(0,T=b%x||x);T0&&(h+=_+l.slice(T)),this.s<0&&(h="-"+h)}return u?((I=E.fractionGroupSeparator)==g&&(I=L.fractionGroupSeparator)==g&&(I=V.fractionGroupSeparator),I&&((P=E.fractionGroupSize)==g&&(P=L.fractionGroupSize)==g&&(P=V.fractionGroupSize)==g&&(P=0),(P=+P)&&(u=u.replace(new RegExp("\\d{"+P+"}\\B","g"),"$&"+I))),h+m+u):h},Y.format={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0},Y})},15822:bt=>{function Y(ie){try{if(!global.localStorage)return!1}catch{return!1}var z=global.localStorage[ie];return null!=z&&"true"===String(z).toLowerCase()}bt.exports=function(ie,z){if(Y("noDeprecation"))return ie;var O=!1;return function(){if(!O){if(Y("throwDeprecation"))throw new Error(z);Y("traceDeprecation")?console.trace(z):console.warn(z),O=!0}return ie.apply(this,arguments)}}},53642:bt=>{self,bt.exports=(()=>(()=>{var be={81645:(z,O,E)=>{"use strict";var x=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(O,"__esModule",{value:!0}),O.chains=O._getInitializedChains=void 0;var f=x(E(87295)),T=x(E(31227)),g=x(E(40439)),b=x(E(37098)),l=x(E(17687));function h(u){var m,_,w={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli"},S={mainnet:f.default,ropsten:T.default,rinkeby:g.default,kovan:b.default,goerli:l.default};if(u)try{for(var I=function(u){var m="function"==typeof Symbol&&Symbol.iterator,_=m&&u[m],w=0;if(_)return _.call(u);if(u&&"number"==typeof u.length)return{next:function(){return u&&w>=u.length&&(u=void 0),{value:u&&u[w++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),P=I.next();!P.done;P=I.next()){var L=P.value,V=L.name;w[L.chainId.toString()]=V,S[V]=L}}catch(W){m={error:W}}finally{try{P&&!P.done&&(_=I.return)&&_.call(I)}finally{if(m)throw m.error}}return S.names=w,S}O._getInitializedChains=h,O.chains=h()},425:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.EIPs=void 0,O.EIPs={1559:E(77523),2315:E(83339),2537:E(26769),2565:E(17897),2718:E(62170),2929:E(88436),2930:E(96213),3198:E(25491),3529:E(20070),3541:E(21871),3554:E(47225),3675:E(98571)}},7002:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.hardforks=void 0,O.hardforks=[["chainstart",E(60114)],["homestead",E(62800)],["dao",E(7197)],["tangerineWhistle",E(22302)],["spuriousDragon",E(90716)],["byzantium",E(26985)],["constantinople",E(35993)],["petersburg",E(4064)],["istanbul",E(83166)],["muirGlacier",E(42946)],["berlin",E(20015)],["london",E(61250)],["shanghai",E(5553)],["merge",E(88648)]]},3863:(z,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=E(28847)(E(3355)),T=(d=function(G,H){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,K){j.__proto__=K}||function(j,K){for(var R in K)Object.prototype.hasOwnProperty.call(K,R)&&(j[R]=K[R])})(G,H)},function(G,H){if("function"!=typeof H&&null!==H)throw new TypeError("Class extends value "+String(H)+" is not a constructor or null");function j(){this.constructor=G}d(G,H),G.prototype=null===H?Object.create(H):(j.prototype=H.prototype,new j)}),g=function(){return g=Object.assign||function(G){for(var H,j=1,K=arguments.length;j=G.length&&(G=void 0),{value:G&&G[K++],done:!G}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(O,"__esModule",{value:!0}),O.ConsensusAlgorithm=O.ConsensusType=O.Hardfork=O.Chain=O.CustomChain=void 0;var l,h,u,m,_,G,w=E(38291),S=E(64628),I=E(33062),P=E(81645),L=E(7002),V=E(425);(G=l=O.CustomChain||(O.CustomChain={})).PolygonMainnet="polygon-mainnet",G.PolygonMumbai="polygon-mumbai",G.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",G.xDaiChain="x-dai-chain",(_=O.Chain||(O.Chain={}))[_.Mainnet=1]="Mainnet",_[_.Ropsten=3]="Ropsten",_[_.Rinkeby=4]="Rinkeby",_[_.Kovan=42]="Kovan",_[_.Goerli=5]="Goerli",function(G){G.Chainstart="chainstart",G.Homestead="homestead",G.Dao="dao",G.TangerineWhistle="tangerineWhistle",G.SpuriousDragon="spuriousDragon",G.Byzantium="byzantium",G.Constantinople="constantinople",G.Petersburg="petersburg",G.Istanbul="istanbul",G.MuirGlacier="muirGlacier",G.Berlin="berlin",G.London="london",G.Shanghai="shanghai",G.Merge="merge"}(h=O.Hardfork||(O.Hardfork={})),(m=O.ConsensusType||(O.ConsensusType={})).ProofOfStake="pos",m.ProofOfWork="pow",m.ProofOfAuthority="poa",(u=O.ConsensusAlgorithm||(O.ConsensusAlgorithm={})).Ethash="ethash",u.Clique="clique",u.Casper="casper";var W=function(G){function H(j){var K,R,o,y,M=G.call(this)||this;M._supportedHardforks=[],M._eips=[],M._customChains=null!==(o=j.customChains)&&void 0!==o?o:[],M._chainParams=M.setChain(j.chain),M.DEFAULT_HARDFORK=null!==(y=M._chainParams.defaultHardfork)&&void 0!==y?y:h.Istanbul;try{for(var v=b(M._chainParams.hardforks),k=v.next();!k.done;k=v.next()){var D=k.value;D.forkHash||(D.forkHash=M._calcForkHash(D.name))}}catch(N){K={error:N}}finally{try{k&&!k.done&&(R=v.return)&&R.call(v)}finally{if(K)throw K.error}}return M._hardfork=M.DEFAULT_HARDFORK,j.supportedHardforks&&(M._supportedHardforks=j.supportedHardforks),j.hardfork&&M.setHardfork(j.hardfork),j.eips&&M.setEIPs(j.eips),M}return T(H,G),H.custom=function(j,K){var R;void 0===K&&(K={});var o=null!==(R=K.baseChain)&&void 0!==R?R:"mainnet",y=g({},H._getChainParams(o));if(y.name="custom-chain","string"!=typeof j)return new H(g({chain:g(g({},y),j)},K));if(j===l.PolygonMainnet)return H.custom({name:l.PolygonMainnet,chainId:137,networkId:137});if(j===l.PolygonMumbai)return H.custom({name:l.PolygonMumbai,chainId:80001,networkId:80001});if(j===l.ArbitrumRinkebyTestnet)return H.custom({name:l.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(j===l.xDaiChain)return H.custom({name:l.xDaiChain,chainId:100,networkId:100});throw new Error("Custom chain "+j+" not supported")},H.forCustomChain=function(j,K,R,o){var y=H._getChainParams(j);return new H({chain:g(g({},y),K),hardfork:R,supportedHardforks:o})},H.isSupportedChainId=function(j){var K=(0,P._getInitializedChains)();return Boolean(K.names[j.toString()])},H._getChainParams=function(j,K){var R=(0,P._getInitializedChains)(K);if("number"==typeof j||I.BN.isBN(j)){if(j=j.toString(),R.names[j])return R[R.names[j]];throw new Error("Chain with ID "+j+" not supported")}if(R[j])return R[j];throw new Error("Chain with name "+j+" not supported")},H.prototype.setChain=function(j){var K,R;if("number"==typeof j||"string"==typeof j||I.BN.isBN(j)){var o;o=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map(function(k){return k[0]}):this._customChains,this._chainParams=H._getChainParams(j,o)}else{if("object"!==(0,f.default)(j))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var y=b(["networkId","genesis","hardforks","bootstrapNodes"]),M=y.next();!M.done;M=y.next()){var v=M.value;if(void 0===j[v])throw new Error("Missing required chain parameter: "+v)}}catch(k){K={error:k}}finally{try{M&&!M.done&&(R=y.return)&&R.call(y)}finally{if(K)throw K.error}}this._chainParams=j}return this._chainParams},H.prototype.setHardfork=function(j){var K,R;if(!this._isSupportedHardfork(j))throw new Error("Hardfork "+j+" not set as supported in supportedHardforks");var o=!1;try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next())M.value[0]===j&&(this._hardfork!==j&&(this._hardfork=j,this.emit("hardforkChanged",j)),o=!0)}catch(v){K={error:v}}finally{try{M&&!M.done&&(R=y.return)&&R.call(y)}finally{if(K)throw K.error}}if(!o)throw new Error("Hardfork with name "+j+" not supported")},H.prototype.getHardforkByBlockNumber=function(j,K){var R,o;j=(0,I.toType)(j,I.TypeOutput.BN),K=K?(0,I.toType)(K,I.TypeOutput.BN):void 0;var y,M,v,k=h.Chainstart;try{for(var D=b(this.hardforks()),N=D.next();!N.done;N=D.next()){var C=N.value;if(null!==C.block)j.gte(new I.BN(C.block))&&(k=C.name),K&&C.td&&(K.gten(C.td)?y=C.name:M=v),v=C.name;else if(K&&C.td&&K.gten(C.td))return C.name}}catch(Q){R={error:Q}}finally{try{N&&!N.done&&(o=D.return)&&o.call(D)}finally{if(R)throw R.error}}if(K){var a="block number: "+j+" (-> "+k+"), ";if(y&&!this.hardforkGteHardfork(k,y)){var B="HF determined by block number is lower than the minimum total difficulty HF";throw a+="total difficulty: "+K+" (-> "+y+")",new Error(B+": "+a)}if(M&&!this.hardforkGteHardfork(M,k))throw B="Maximum HF determined by total difficulty is lower than the block number HF",a+="total difficulty: "+K+" (-> "+M+")",new Error(B+": "+a)}return k},H.prototype.setHardforkByBlockNumber=function(j,K){var R=this.getHardforkByBlockNumber(j,K);return this.setHardfork(R),R},H.prototype._chooseHardfork=function(j,K){if(void 0===K&&(K=!0),j){if(K&&!this._isSupportedHardfork(j))throw new Error("Hardfork "+j+" not set as supported in supportedHardforks")}else j=this._hardfork;return j},H.prototype._getHardfork=function(j){var K,R,o=this.hardforks();try{for(var y=b(o),M=y.next();!M.done;M=y.next()){var v=M.value;if(v.name===j)return v}}catch(k){K={error:k}}finally{try{M&&!M.done&&(R=y.return)&&R.call(y)}finally{if(K)throw K.error}}throw new Error("Hardfork "+j+" not defined for chain "+this.chainName())},H.prototype._isSupportedHardfork=function(j){var K,R;if(!(this._supportedHardforks.length>0))return!0;try{for(var o=b(this._supportedHardforks),y=o.next();!y.done;y=o.next())if(j===y.value)return!0}catch(M){K={error:M}}finally{try{y&&!y.done&&(R=o.return)&&R.call(o)}finally{if(K)throw K.error}}return!1},H.prototype.setEIPs=function(j){var K,R,o=this;void 0===j&&(j=[]);var y=function(D){if(!(D in V.EIPs))throw new Error(D+" not supported");var N=M.gteHardfork(V.EIPs[D].minimumHardfork);if(!N)throw new Error(D+" cannot be activated on hardfork "+M.hardfork()+", minimumHardfork: "+N);V.EIPs[D].requiredEIPs&&V.EIPs[D].requiredEIPs.forEach(function(C){if(!j.includes(C)&&!o.isActivatedEIP(C))throw new Error(D+" requires EIP "+C+", but is not included in the EIP list")})},M=this;try{for(var v=b(j),k=v.next();!k.done;k=v.next())y(k.value)}catch(D){K={error:D}}finally{try{k&&!k.done&&(R=v.return)&&R.call(v)}finally{if(K)throw K.error}}this._eips=j},H.prototype.param=function(j,K){var R,o,y=null;try{for(var M=b(this._eips),v=M.next();!v.done;v=M.next())if(null!==(y=this.paramByEIP(j,K,v.value)))return y}catch(D){R={error:D}}finally{try{v&&!v.done&&(o=M.return)&&o.call(M)}finally{if(R)throw R.error}}return this.paramByHardfork(j,K,this._hardfork)},H.prototype.paramByHardfork=function(j,K,R){var o,y,M,v;R=this._chooseHardfork(R);var k=null;try{for(var D=b(L.hardforks),N=D.next();!N.done;N=D.next()){var C=N.value;if("eips"in C[1]){var a=C[1].eips;try{for(var B=(M=void 0,b(a)),Q=B.next();!Q.done;Q=B.next()){var ce=this.paramByEIP(j,K,Q.value);k=null!==ce?ce:k}}catch(ue){M={error:ue}}finally{try{Q&&!Q.done&&(v=B.return)&&v.call(B)}finally{if(M)throw M.error}}}else{if(!C[1][j])throw new Error("Topic "+j+" not defined");void 0!==C[1][j][K]&&(k=C[1][j][K].v)}if(C[0]===R)break}}catch(ue){o={error:ue}}finally{try{N&&!N.done&&(y=D.return)&&y.call(D)}finally{if(o)throw o.error}}return k},H.prototype.paramByEIP=function(j,K,R){if(!(R in V.EIPs))throw new Error(R+" not supported");var o=V.EIPs[R];if(!(j in o))throw new Error("Topic "+j+" not defined");return void 0===o[j][K]?null:o[j][K].v},H.prototype.paramByBlock=function(j,K,R){var o=this.activeHardforks(R);return this.paramByHardfork(j,K,o[o.length-1].name)},H.prototype.isActivatedEIP=function(j){var K,R;if(this.eips().includes(j))return!0;try{for(var o=b(L.hardforks),y=o.next();!y.done;y=o.next()){var M=y.value[1];if(this.gteHardfork(M.name)&&"eips"in M&&M.eips.includes(j))return!0}}catch(v){K={error:v}}finally{try{y&&!y.done&&(R=o.return)&&R.call(o)}finally{if(K)throw K.error}}return!1},H.prototype.hardforkIsActiveOnBlock=function(j,K,R){var o;void 0===R&&(R={}),K=(0,I.toType)(K,I.TypeOutput.BN);var y=null!==(o=R.onlySupported)&&void 0!==o&&o;j=this._chooseHardfork(j,y);var M=this.hardforkBlockBN(j);return!(!M||!K.gte(M))},H.prototype.activeOnBlock=function(j,K){return this.hardforkIsActiveOnBlock(null,j,K)},H.prototype.hardforkGteHardfork=function(j,K,R){var o,y;void 0===R&&(R={});var M,v=void 0!==R.onlyActive&&R.onlyActive;j=this._chooseHardfork(j,R.onlySupported),M=v?this.activeHardforks(null,R):this.hardforks();var k=-1,D=-1,N=0;try{for(var C=b(M),a=C.next();!a.done;a=C.next()){var B=a.value;B.name===j&&(k=N),B.name===K&&(D=N),N+=1}}catch(Q){o={error:Q}}finally{try{a&&!a.done&&(y=C.return)&&y.call(C)}finally{if(o)throw o.error}}return k>=D&&-1!==D},H.prototype.gteHardfork=function(j,K){return this.hardforkGteHardfork(null,j,K)},H.prototype.hardforkIsActiveOnChain=function(j,K){var R,o,y;void 0===K&&(K={});var M=null!==(y=K.onlySupported)&&void 0!==y&&y;j=this._chooseHardfork(j,M);try{for(var v=b(this.hardforks()),k=v.next();!k.done;k=v.next()){var D=k.value;if(D.name===j&&null!==D.block)return!0}}catch(N){R={error:N}}finally{try{k&&!k.done&&(o=v.return)&&o.call(v)}finally{if(R)throw R.error}}return!1},H.prototype.activeHardforks=function(j,K){var R,o;void 0===K&&(K={});var y=[],M=this.hardforks();try{for(var v=b(M),k=v.next();!k.done;k=v.next()){var D=k.value;if(null!==D.block){if(null!=j&&j0)return R[R.length-1].name;throw new Error("No (supported) active hardfork found")},H.prototype.hardforkBlock=function(j){var K=this.hardforkBlockBN(j);return K?(0,I.toType)(K,I.TypeOutput.Number):null},H.prototype.hardforkBlockBN=function(j){j=this._chooseHardfork(j,!1);var K=this._getHardfork(j).block;return null==K?null:new I.BN(K)},H.prototype.hardforkTD=function(j){j=this._chooseHardfork(j,!1);var K=this._getHardfork(j).td;return null==K?null:new I.BN(K)},H.prototype.isHardforkBlock=function(j,K){j=(0,I.toType)(j,I.TypeOutput.BN),K=this._chooseHardfork(K,!1);var R=this.hardforkBlockBN(K);return!!R&&R.eq(j)},H.prototype.nextHardforkBlock=function(j){var K=this.nextHardforkBlockBN(j);return null===K?null:(0,I.toType)(K,I.TypeOutput.Number)},H.prototype.nextHardforkBlockBN=function(j){j=this._chooseHardfork(j,!1);var K=this.hardforkBlockBN(j);return null===K?null:this.hardforks().reduce(function(R,o){var y=new I.BN(o.block);return y.gt(K)&&null===R?y:R},null)},H.prototype.isNextHardforkBlock=function(j,K){j=(0,I.toType)(j,I.TypeOutput.BN),K=this._chooseHardfork(K,!1);var R=this.nextHardforkBlockBN(K);return null!==R&&R.eq(j)},H.prototype._calcForkHash=function(j){var K,R,o=x.from(this.genesis().hash.substr(2),"hex"),y=x.alloc(0),M=0;try{for(var v=b(this.hardforks()),k=v.next();!k.done;k=v.next()){var D=k.value,N=D.block;if(0!==N&&null!==N&&N!==M){var C=x.from(N.toString(16).padStart(16,"0"),"hex");y=x.concat([y,C])}if(D.name===j)break;null!==N&&(M=N)}}catch(B){K={error:B}}finally{try{k&&!k.done&&(R=v.return)&&R.call(v)}finally{if(K)throw K.error}}var a=x.concat([o,y]);return"0x"+(0,I.intToBuffer)((0,S.buf)(a)>>>0).toString("hex")},H.prototype.forkHash=function(j){j=this._chooseHardfork(j,!1);var K=this._getHardfork(j);if(null===K.block)throw new Error("No fork hash calculation possible for non-applied or future hardfork");return void 0!==K.forkHash?K.forkHash:this._calcForkHash(j)},H.prototype.hardforkForForkHash=function(j){var K=this.hardforks().filter(function(R){return R.forkHash===j});return K.length>=1?K[K.length-1]:null},H.prototype.genesis=function(){return this._chainParams.genesis},H.prototype.genesisState=function(){var j,K;switch(this.chainName()){case"mainnet":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/mainnet.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"ropsten":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/ropsten.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"rinkeby":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/rinkeby.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"kovan":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/kovan.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"goerli":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/goerli.json'");throw M.code="MODULE_NOT_FOUND",M}()))}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var R=b(this._customChains),o=R.next();!o.done;o=R.next()){var y=o.value;if(y[0].name===this.chainName())return y[1]}}catch(M){j={error:M}}finally{try{o&&!o.done&&(K=R.return)&&K.call(R)}finally{if(j)throw j.error}}return{}},H.prototype.hardforks=function(){return this._chainParams.hardforks},H.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},H.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},H.prototype.hardfork=function(){return this._hardfork},H.prototype.chainId=function(){return(0,I.toType)(this.chainIdBN(),I.TypeOutput.Number)},H.prototype.chainIdBN=function(){return new I.BN(this._chainParams.chainId)},H.prototype.chainName=function(){return this._chainParams.name},H.prototype.networkId=function(){return(0,I.toType)(this.networkIdBN(),I.TypeOutput.Number)},H.prototype.networkIdBN=function(){return new I.BN(this._chainParams.networkId)},H.prototype.eips=function(){return this._eips},H.prototype.consensusType=function(){var j,K,R,o=this.hardfork();try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next()){var v=M.value;if("consensus"in v[1]&&(R=v[1].consensus.type),v[0]===o)break}}catch(k){j={error:k}}finally{try{M&&!M.done&&(K=y.return)&&K.call(y)}finally{if(j)throw j.error}}return R||this._chainParams.consensus.type},H.prototype.consensusAlgorithm=function(){var j,K,R,o=this.hardfork();try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next()){var v=M.value;if("consensus"in v[1]&&(R=v[1].consensus.algorithm),v[0]===o)break}}catch(k){j={error:k}}finally{try{M&&!M.done&&(K=y.return)&&K.call(y)}finally{if(j)throw j.error}}return R||this._chainParams.consensus.algorithm},H.prototype.consensusConfig=function(){var j,K,R,o=this.hardfork();try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next()){var v=M.value;if("consensus"in v[1]&&(R=v[1].consensus[v[1].consensus.algorithm]),v[0]===o)break}}catch(D){j={error:D}}finally{try{M&&!M.done&&(K=y.return)&&K.call(y)}finally{if(j)throw j.error}}if(R)return R;var k=this.consensusAlgorithm();return this._chainParams.consensus[k]},H.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},H}(w.EventEmitter);O.default=W},89658:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));function x(V){if(Array.isArray(V)){for(var W=[],G=0,H=0;HV.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return V.slice(W,G)}function T(V){if(0===V[0])throw new Error("invalid RLP: extra zeros");return m(u(V))}function g(V,W){if(V<56)return Uint8Array.from([V+W]);var G=I(V),H=I(W+55+G.length/2);return Uint8Array.from(_(H+G))}function b(V){var W=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==V||0===V.length)return Uint8Array.from([]);var G=l(L(V));if(W)return G;if(0!==G.remainder.length)throw new Error("invalid RLP: remainder must be zero");return G.data}function l(V){var W,G,H,j,K,R=[],o=V[0];if(o<=127)return{data:V.slice(0,1),remainder:V.slice(1)};if(o<=183){if(W=o-127,H=128===o?Uint8Array.from([]):f(V,1,W),2===W&&H[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:H,remainder:V.slice(W)}}if(o<=191){if(V.length-1<(G=o-182))throw new Error("invalid RLP: not enough bytes for string length");if((W=T(f(V,1,G)))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return{data:H=f(V,G,W+G),remainder:V.slice(W+G)}}if(o<=247){for(j=f(V,1,W=o-191);j.length;)K=l(j),R.push(K.data),j=K.remainder;return{data:R,remainder:V.slice(W)}}if((W=T(f(V,1,G=o-246)))<56)throw new Error("invalid RLP: encoded list too short");var y=G+W;if(y>V.length)throw new Error("invalid RLP: total length is larger than the data");for(j=f(V,G,y);j.length;)K=l(j),R.push(K.data),j=K.remainder;return{data:R,remainder:V.slice(y)}}Object.defineProperty(O,"__esModule",{value:!0}),O.RLP=O.utils=O.decode=O.encode=void 0,O.encode=x,O.decode=b;var h=Array.from({length:256},function(V,W){return W.toString(16).padStart(2,"0")});function u(V){for(var W="",G=0;G=2&&"0"===V[0]&&"x"===V[1]}function L(V){if(V instanceof Uint8Array)return V;if("string"==typeof V)return P(V)?_((W="string"!=typeof(G=V)?G:P(G)?G.slice(2):G).length%2?"0".concat(W):W):S(V);var W,G;if("number"==typeof V||"bigint"==typeof V)return V?_(I(V)):Uint8Array.from([]);if(null==V)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+(0,d.default)(V))}O.utils={bytesToHex:u,concatBytes:w,hexToBytes:_,utf8ToBytes:S},O.RLP={encode:x,decode:b}},75058:(z,O,E)=>{"use strict";var d=Object.create?function(h,u,m,_){void 0===_&&(_=m),Object.defineProperty(h,_,{enumerable:!0,get:function(){return u[m]}})}:function(h,u,m,_){void 0===_&&(_=m),h[_]=u[m]},x=Object.create?function(h,u){Object.defineProperty(h,"default",{enumerable:!0,value:u})}:function(h,u){h.default=u},f=function(h,u){var m="function"==typeof Symbol&&h[Symbol.iterator];if(!m)return h;var _,w,S=m.call(h),I=[];try{for(;(void 0===u||u-- >0)&&!(_=S.next()).done;)I.push(_.value)}catch(P){w={error:P}}finally{try{_&&!_.done&&(m=S.return)&&m.call(S)}finally{if(w)throw w.error}}return I};Object.defineProperty(O,"__esModule",{value:!0}),O.BaseTransaction=void 0;var T=function(h){if(h&&h.__esModule)return h;var u={};if(null!=h)for(var m in h)"default"!==m&&Object.prototype.hasOwnProperty.call(h,m)&&d(u,h,m);return x(u,h),u}(E(3863)),g=E(33062),b=E(87325),l=function(){function h(u){this.cache={hash:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=T.Chain.Mainnet,this.DEFAULT_HARDFORK=T.Hardfork.Istanbul;var m=u.nonce,_=u.gasLimit,w=u.to,S=u.value,I=u.data,P=u.v,L=u.r,V=u.s;this._type=new g.BN((0,g.toBuffer)(u.type)).toNumber();var G=(0,g.toBuffer)(""===w?"0x":w),H=(0,g.toBuffer)(""===P?"0x":P),j=(0,g.toBuffer)(""===L?"0x":L),K=(0,g.toBuffer)(""===V?"0x":V);this.nonce=new g.BN((0,g.toBuffer)(""===m?"0x":m)),this.gasLimit=new g.BN((0,g.toBuffer)(""===_?"0x":_)),this.to=G.length>0?new g.Address(G):void 0,this.value=new g.BN((0,g.toBuffer)(""===S?"0x":S)),this.data=(0,g.toBuffer)(""===I?"0x":I),this.v=H.length>0?new g.BN(H):void 0,this.r=j.length>0?new g.BN(j):void 0,this.s=K.length>0?new g.BN(K):void 0,this._validateCannotExceedMaxInteger({nonce:this.nonce,gasLimit:this.gasLimit,value:this.value,r:this.r,s:this.s})}return Object.defineProperty(h.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),h.prototype.supports=function(u){return this.activeCapabilities.includes(u)},h.prototype.validate=function(u){void 0===u&&(u=!1);var m=[];return this.getBaseFee().gt(this.gasLimit)&&m.push("gasLimit is too low. given "+this.gasLimit+", need at least "+this.getBaseFee()),this.isSigned()&&!this.verifySignature()&&m.push("Invalid Signature"),u?m:0===m.length},h.prototype.getBaseFee=function(){var u=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&u.iaddn(this.common.param("gasPrices","txCreation")),u},h.prototype.getDataFee=function(){for(var u=this.common.param("gasPrices","txDataZero"),m=this.common.param("gasPrices","txDataNonZero"),_=0,w=0;w-1&&this.activeCapabilities.splice(V,1)}return L},h.prototype._getCommon=function(u,m){var _;if(m){var w=new g.BN((0,g.toBuffer)(m));if(u){if(!u.chainIdBN().eq(w))throw new Error("The chain ID does not match the chain ID of Common");return u.copy()}return T.default.isSupportedChainId(w)?new T.default({chain:w,hardfork:this.DEFAULT_HARDFORK}):T.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:w,chainId:w},this.DEFAULT_HARDFORK)}return null!==(_=null==u?void 0:u.copy())&&void 0!==_?_:new T.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},h.prototype._validateCannotExceedMaxInteger=function(u,m){var _,w;void 0===m&&(m=53);try{for(var S=function(W){var G="function"==typeof Symbol&&Symbol.iterator,H=G&&W[G],j=0;if(H)return H.call(W);if(W&&"number"==typeof W.length)return{next:function(){return W&&j>=W.length&&(W=void 0),{value:W&&W[j++],done:!W}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(u)),I=S.next();!I.done;I=S.next()){var P=f(I.value,2),L=P[0],V=P[1];if(53===m){if(null==V?void 0:V.gt(g.MAX_INTEGER))throw new Error(L+" cannot exceed MAX_INTEGER, given "+V)}else{if(256!==m)throw new Error("unimplemented bits value");if(null==V?void 0:V.gte(g.TWO_POW256))throw new Error(L+" must be less than 2^256, given "+V)}}}catch(W){_={error:W}}finally{try{I&&!I.done&&(w=S.return)&&w.call(S)}finally{if(_)throw _.error}}},h}();O.BaseTransaction=l},660:(z,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=(d=function(_,w){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,I){S.__proto__=I}||function(S,I){for(var P in I)Object.prototype.hasOwnProperty.call(I,P)&&(S[P]=I[P])})(_,w)},function(_,w){if("function"!=typeof w&&null!==w)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function S(){this.constructor=_}d(_,w),_.prototype=null===w?Object.create(w):(S.prototype=w.prototype,new S)}),T=function(){return T=Object.assign||function(_){for(var w,S=1,I=arguments.length;S0)&&!(C=B.next()).done;)Q.push(C.value)}catch(ee){a={error:ee}}finally{try{C&&!C.done&&(N=B.return)&&N.call(B)}finally{if(a)throw a.error}}return Q}(S,12),V=P[1],W=P[2],G=P[3],H=P[4],j=P[5],K=P[6],R=P[7],o=P[8],y=P[9],M=P[10],v=P[11];return new w({chainId:new g.BN(P[0]),nonce:V,maxPriorityFeePerGas:W,maxFeePerGas:G,gasLimit:H,to:j,value:K,data:R,accessList:o??[],v:void 0!==y?new g.BN(y):void 0,r:M,s:v},I)},w.prototype.getDataFee=function(){var S=_.prototype.getDataFee.call(this);return S.iaddn(h.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),S},w.prototype.getUpfrontCost=function(S){void 0===S&&(S=new g.BN(0));var I=g.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(S)).add(S);return this.gasLimit.mul(I).add(this.value)},w.prototype.raw=function(){return[(0,g.bnToUnpaddedBuffer)(this.chainId),(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,g.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,g.bnToUnpaddedBuffer)(this.v):x.from([]),void 0!==this.r?(0,g.bnToUnpaddedBuffer)(this.r):x.from([]),void 0!==this.s?(0,g.bnToUnpaddedBuffer)(this.s):x.from([])]},w.prototype.serialize=function(){var S=this.raw();return x.concat([u,g.rlp.encode(S)])},w.prototype.getMessageToSign=function(S){void 0===S&&(S=!0);var I=this.raw().slice(0,9),P=x.concat([u,g.rlp.encode(I)]);return S?(0,g.keccak256)(P):P},w.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,g.keccak256)(this.serialize())),this.cache.hash):(0,g.keccak256)(this.serialize())},w.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},w.prototype.getSenderPublicKey=function(){var S;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var I=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(S=this.s)||void 0===S?void 0:S.gt(l.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var P=this,L=P.v,V=P.r,W=P.s;try{return(0,g.ecrecover)(I,L.addn(27),(0,g.bnToUnpaddedBuffer)(V),(0,g.bnToUnpaddedBuffer)(W))}catch{throw new Error("Invalid Signature")}},w.prototype._processSignature=function(S,I,P){var L={common:this.common};return w.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new g.BN(S-27),r:new g.BN(I),s:new g.BN(P)},L)},w.prototype.toJSON=function(){var S=h.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,g.bnToHex)(this.chainId),nonce:(0,g.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,g.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,g.bnToHex)(this.maxFeePerGas),gasLimit:(0,g.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,g.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:S,v:void 0!==this.v?(0,g.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,g.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,g.bnToHex)(this.s):void 0}},w}(b.BaseTransaction);O.default=m},97613:(z,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=(d=function(_,w){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,I){S.__proto__=I}||function(S,I){for(var P in I)Object.prototype.hasOwnProperty.call(I,P)&&(S[P]=I[P])})(_,w)},function(_,w){if("function"!=typeof w&&null!==w)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function S(){this.constructor=_}d(_,w),_.prototype=null===w?Object.create(w):(S.prototype=w.prototype,new S)}),T=function(){return T=Object.assign||function(_){for(var w,S=1,I=arguments.length;S0)&&!(N=a.next()).done;)B.push(N.value)}catch(Q){C={error:Q}}finally{try{N&&!N.done&&(D=a.return)&&D.call(a)}finally{if(C)throw C.error}}return B}(S,11),V=P[1],W=P[2],G=P[3],H=P[4],j=P[5],K=P[6],R=P[7],o=P[8],y=P[9],M=P[10];return new w({chainId:new g.BN(P[0]),nonce:V,gasPrice:W,gasLimit:G,to:H,value:j,data:K,accessList:R??[],v:void 0!==o?new g.BN(o):void 0,r:y,s:M},I)},w.prototype.getDataFee=function(){var S=_.prototype.getDataFee.call(this);return S.iaddn(h.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),S},w.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},w.prototype.raw=function(){return[(0,g.bnToUnpaddedBuffer)(this.chainId),(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.gasPrice),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,g.bnToUnpaddedBuffer)(this.v):x.from([]),void 0!==this.r?(0,g.bnToUnpaddedBuffer)(this.r):x.from([]),void 0!==this.s?(0,g.bnToUnpaddedBuffer)(this.s):x.from([])]},w.prototype.serialize=function(){var S=this.raw();return x.concat([u,g.rlp.encode(S)])},w.prototype.getMessageToSign=function(S){void 0===S&&(S=!0);var I=this.raw().slice(0,8),P=x.concat([u,g.rlp.encode(I)]);return S?(0,g.keccak256)(P):P},w.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,g.keccak256)(this.serialize())),this.cache.hash):(0,g.keccak256)(this.serialize())},w.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},w.prototype.getSenderPublicKey=function(){var S;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var I=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(S=this.s)||void 0===S?void 0:S.gt(l.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var P=this,L=P.yParity,V=P.r,W=P.s;try{return(0,g.ecrecover)(I,L.addn(27),(0,g.bnToUnpaddedBuffer)(V),(0,g.bnToUnpaddedBuffer)(W))}catch{throw new Error("Invalid Signature")}},w.prototype._processSignature=function(S,I,P){var L={common:this.common};return w.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new g.BN(S-27),r:new g.BN(I),s:new g.BN(P)},L)},w.prototype.toJSON=function(){var S=h.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,g.bnToHex)(this.chainId),nonce:(0,g.bnToHex)(this.nonce),gasPrice:(0,g.bnToHex)(this.gasPrice),gasLimit:(0,g.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,g.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:S,v:void 0!==this.v?(0,g.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,g.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,g.bnToHex)(this.s):void 0}},w}(b.BaseTransaction);O.default=m},42339:(z,O,E)=>{"use strict";var d=Object.create?function(l,h,u,m){void 0===m&&(m=u),Object.defineProperty(l,m,{enumerable:!0,get:function(){return h[u]}})}:function(l,h,u,m){void 0===m&&(m=u),l[m]=h[u]},x=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(O,"__esModule",{value:!0}),O.FeeMarketEIP1559Transaction=O.TransactionFactory=O.AccessListEIP2930Transaction=O.Transaction=void 0;var f=E(53088);Object.defineProperty(O,"Transaction",{enumerable:!0,get:function(){return x(f).default}});var T=E(97613);Object.defineProperty(O,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return x(T).default}});var g=E(89562);Object.defineProperty(O,"TransactionFactory",{enumerable:!0,get:function(){return x(g).default}});var b=E(660);Object.defineProperty(O,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return x(b).default}}),function(l,h){for(var u in l)"default"===u||Object.prototype.hasOwnProperty.call(h,u)||d(h,l,u)}(E(87325),O)},53088:(z,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=(d=function(h,u){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,_){m.__proto__=_}||function(m,_){for(var w in _)Object.prototype.hasOwnProperty.call(_,w)&&(m[w]=_[w])})(h,u)},function(h,u){if("function"!=typeof u&&null!==u)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function m(){this.constructor=h}d(h,u),h.prototype=null===u?Object.create(u):(m.prototype=u.prototype,new m)}),T=function(){return T=Object.assign||function(h){for(var u,m=1,_=arguments.length;m<_;m++)for(var w in u=arguments[m])Object.prototype.hasOwnProperty.call(u,w)&&(h[w]=u[w]);return h},T.apply(this,arguments)};Object.defineProperty(O,"__esModule",{value:!0});var g=E(33062),b=E(87325),l=function(h){function u(m,_){var w;void 0===_&&(_={});var S=h.call(this,T(T({},m),{type:0}))||this;if(S.common=S._validateTxV(S.v,_.common),S.gasPrice=new g.BN((0,g.toBuffer)(""===m.gasPrice?"0x":m.gasPrice)),S._validateCannotExceedMaxInteger({gasPrice:S.gasPrice}),S.common.gteHardfork("spuriousDragon"))if(S.isSigned()){var I=S.v,P=S.common.chainIdBN().muln(2);(I.eq(P.addn(35))||I.eq(P.addn(36)))&&S.activeCapabilities.push(b.Capability.EIP155ReplayProtection)}else S.activeCapabilities.push(b.Capability.EIP155ReplayProtection);return(null===(w=null==_?void 0:_.freeze)||void 0===w||w)&&Object.freeze(S),S}return f(u,h),u.fromTxData=function(m,_){return void 0===_&&(_={}),new u(m,_)},u.fromSerializedTx=function(m,_){void 0===_&&(_={});var w=g.rlp.decode(m);if(!Array.isArray(w))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(w,_)},u.fromRlpSerializedTx=function(m,_){return void 0===_&&(_={}),u.fromSerializedTx(m,_)},u.fromValuesArray=function(m,_){if(void 0===_&&(_={}),6!==m.length&&9!==m.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");var w=function(S,I){var P="function"==typeof Symbol&&S[Symbol.iterator];if(!P)return S;var L,V,W=P.call(S),G=[];try{for(;(void 0===I||I-- >0)&&!(L=W.next()).done;)G.push(L.value)}catch(H){V={error:H}}finally{try{L&&!L.done&&(P=W.return)&&P.call(W)}finally{if(V)throw V.error}}return G}(m,9);return new u({nonce:w[0],gasPrice:w[1],gasLimit:w[2],to:w[3],value:w[4],data:w[5],v:w[6],r:w[7],s:w[8]},_)},u.prototype.raw=function(){return[(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.gasPrice),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,g.bnToUnpaddedBuffer)(this.v):x.from([]),void 0!==this.r?(0,g.bnToUnpaddedBuffer)(this.r):x.from([]),void 0!==this.s?(0,g.bnToUnpaddedBuffer)(this.s):x.from([])]},u.prototype.serialize=function(){return g.rlp.encode(this.raw())},u.prototype._getMessageToSign=function(){var m=[(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.gasPrice),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(b.Capability.EIP155ReplayProtection)&&(m.push((0,g.toBuffer)(this.common.chainIdBN())),m.push((0,g.unpadBuffer)((0,g.toBuffer)(0))),m.push((0,g.unpadBuffer)((0,g.toBuffer)(0)))),m},u.prototype.getMessageToSign=function(m){void 0===m&&(m=!0);var _=this._getMessageToSign();return m?(0,g.rlphash)(_):_},u.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},u.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,g.rlphash)(this.raw())),this.cache.hash):(0,g.rlphash)(this.raw())},u.prototype.getMessageToVerifySignature=function(){if(!this.isSigned())throw Error("This transaction is not signed");var m=this._getMessageToSign();return(0,g.rlphash)(m)},u.prototype.getSenderPublicKey=function(){var m,_=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(m=this.s)||void 0===m?void 0:m.gt(b.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var w=this,S=w.v,I=w.r,P=w.s;try{return(0,g.ecrecover)(_,S,(0,g.bnToUnpaddedBuffer)(I),(0,g.bnToUnpaddedBuffer)(P),this.supports(b.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch{throw new Error("Invalid Signature")}},u.prototype._processSignature=function(m,_,w){var S=new g.BN(m);this.supports(b.Capability.EIP155ReplayProtection)&&S.iadd(this.common.chainIdBN().muln(2).addn(8));var I={common:this.common};return u.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:S,r:new g.BN(_),s:new g.BN(w)},I)},u.prototype.toJSON=function(){return{nonce:(0,g.bnToHex)(this.nonce),gasPrice:(0,g.bnToHex)(this.gasPrice),gasLimit:(0,g.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,g.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,g.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,g.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,g.bnToHex)(this.s):void 0}},u.prototype._validateTxV=function(m,_){var w;if(void 0!==m&&!m.eqn(0)&&(!_||_.gteHardfork("spuriousDragon"))&&!m.eqn(27)&&!m.eqn(28))if(_){var S=_.chainIdBN().muln(2);if(!m.eq(S.addn(35))&&!m.eq(S.addn(36)))throw new Error("Incompatible EIP155-based V "+m.toString()+" and chain id "+_.chainIdBN().toString()+". See the Common parameter of the Transaction constructor to set the chain id.")}else{var I;I=m.subn(35).isEven()?35:36,w=m.subn(I).divn(2)}return this._getCommon(_,w)},u.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},u.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned())throw Error("This transaction is not signed");var m=this.common.gteHardfork("spuriousDragon"),_=this.v,w=this.common.chainIdBN().muln(2);return(_.eq(w.addn(35))||_.eq(w.addn(36)))&&m},u}(E(75058).BaseTransaction);O.default=l},89562:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0});var x=E(33062),f=E(42339),T=function(){function g(){}return g.fromTxData=function(b,l){if(void 0===l&&(l={}),"type"in b&&void 0!==b.type){var h=new x.BN((0,x.toBuffer)(b.type)).toNumber();if(0===h)return f.Transaction.fromTxData(b,l);if(1===h)return f.AccessListEIP2930Transaction.fromTxData(b,l);if(2===h)return f.FeeMarketEIP1559Transaction.fromTxData(b,l);throw new Error("Tx instantiation with type "+h+" not supported")}return f.Transaction.fromTxData(b,l)},g.fromSerializedData=function(b,l){if(void 0===l&&(l={}),b[0]<=127){var h=void 0;switch(b[0]){case 1:h=2930;break;case 2:h=1559;break;default:throw new Error("TypedTransaction with ID "+b[0]+" unknown")}return 1559===h?f.FeeMarketEIP1559Transaction.fromSerializedTx(b,l):f.AccessListEIP2930Transaction.fromSerializedTx(b,l)}return f.Transaction.fromSerializedTx(b,l)},g.fromBlockBodyData=function(b,l){if(void 0===l&&(l={}),d.isBuffer(b))return this.fromSerializedData(b,l);if(Array.isArray(b))return f.Transaction.fromValuesArray(b,l);throw new Error("Cannot decode transaction: unknown type input")},g.getTransactionClass=function(b,l){if(void 0===b&&(b=0),0==b||b>=128&&b<=255)return f.Transaction;switch(b){case 1:return f.AccessListEIP2930Transaction;case 2:return f.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID "+b+" unknown")}},g}();O.default=T},87325:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.N_DIV_2=O.isAccessList=O.isAccessListBuffer=O.Capability=void 0;var d,x=E(33062);function f(T){return 0===T.length||!!Array.isArray(T[0])}(d=O.Capability||(O.Capability={}))[d.EIP155ReplayProtection=155]="EIP155ReplayProtection",d[d.EIP1559FeeMarket=1559]="EIP1559FeeMarket",d[d.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",d[d.EIP2930AccessLists=2930]="EIP2930AccessLists",O.isAccessListBuffer=f,O.isAccessList=function(T){return!f(T)},O.N_DIV_2=new x.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},53789:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.AccessLists=void 0;var d=E(33062),x=E(87325),f=function(){function T(){}return T.getAccessListData=function(g){var b,l;if(g&&(0,x.isAccessList)(g)){b=g;for(var h=[],u=0;u{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(74519)),T=x(E(69721)),g=x(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.accountBodyToRLP=O.accountBodyToSlim=O.accountBodyFromSlim=O.isZeroAddress=O.zeroAddress=O.importPublic=O.privateToAddress=O.privateToPublic=O.publicToAddress=O.pubToAddress=O.isValidPublic=O.isValidPrivate=O.generateAddress2=O.generateAddress=O.isValidChecksumAddress=O.toChecksumAddress=O.isValidAddress=O.Account=void 0;var b=E(89658),l=E(1243),h=E(86992),u=E(40890),m=E(55803),_=E(21449),w=E(99047),S=E(72560),I=BigInt(0),P=function(){function W(){var G=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,H=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I,j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.KECCAK256_RLP,K=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_.KECCAK256_NULL;(0,T.default)(this,W),this.nonce=G,this.balance=H,this.storageRoot=j,this.codeHash=K,this._validate()}return(0,g.default)(W,[{key:"_validate",value:function(){if(this.nonce=8?o+=H[y].toUpperCase():o+=H[y];return o},O.isValidChecksumAddress=function(W,G){return(0,O.isValidAddress)(W)&&(0,O.toChecksumAddress)(W,G)===W},O.generateAddress=function(W,G){return(0,w.assertIsBuffer)(W),(0,w.assertIsBuffer)(G),(0,m.bufferToBigInt)(G)===BigInt(0)?d.from((0,l.keccak256)(b.RLP.encode((0,m.bufArrToArr)([W,null])))).slice(-20):d.from((0,l.keccak256)(b.RLP.encode((0,m.bufArrToArr)([W,G])))).slice(-20)},O.generateAddress2=function(W,G,H){if((0,w.assertIsBuffer)(W),(0,w.assertIsBuffer)(G),(0,w.assertIsBuffer)(H),20!==W.length)throw new Error("Expected from to be of length 20");if(32!==G.length)throw new Error("Expected salt to be of length 32");var j=(0,l.keccak256)(d.concat([d.from("ff","hex"),W,G,(0,l.keccak256)(H)]));return(0,m.toBuffer)(j).slice(-20)},O.isValidPrivate=function(W){return h.secp256k1.utils.isValidPrivateKey(W)},O.isValidPublic=function(W){var G=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,w.assertIsBuffer)(W),64===W.length)try{return h.secp256k1.ProjectivePoint.fromHex(d.concat([d.from([4]),W])),!0}catch{return!1}if(!G)return!1;try{return h.secp256k1.ProjectivePoint.fromHex(W),!0}catch{return!1}},O.pubToAddress=function(W){var G=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,w.assertIsBuffer)(W),G&&64!==W.length&&(W=d.from(h.secp256k1.ProjectivePoint.fromHex(W).toRawBytes(!1).slice(1))),64!==W.length)throw new Error("Expected pubKey to be of length 64");return d.from((0,l.keccak256)(W)).slice(-20)},O.publicToAddress=O.pubToAddress,O.privateToPublic=function(W){return(0,w.assertIsBuffer)(W),d.from(h.secp256k1.ProjectivePoint.fromPrivateKey(W).toRawBytes(!1).slice(1))},O.privateToAddress=function(W){return(0,O.publicToAddress)((0,O.privateToPublic)(W))},O.importPublic=function(W){return(0,w.assertIsBuffer)(W),64!==W.length&&(W=d.from(h.secp256k1.ProjectivePoint.fromHex(W).toRawBytes(!1).slice(1))),W},O.zeroAddress=function(){var W=(0,m.zeros)(20);return(0,m.bufferToHex)(W)},O.isZeroAddress=function(W){try{(0,w.assertIsString)(W)}catch{return!1}return(0,O.zeroAddress)()===W},O.accountBodyFromSlim=L;var V=new Uint8Array(0);O.accountBodyToSlim=function(W){var G=(0,f.default)(W,4),K=G[2],R=G[3];return[G[0],G[1],(0,m.arrToBufArr)(K).equals(_.KECCAK256_RLP)?V:K,(0,m.arrToBufArr)(R).equals(_.KECCAK256_NULL)?V:R]},O.accountBodyToRLP=function(W){var G=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?W:L(W);return(0,m.arrToBufArr)(b.RLP.encode(G))}},78718:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(69721)),T=x(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.Address=void 0;var g=E(59786),b=E(55803),l=function(){function h(u){if((0,f.default)(this,h),20!==u.length)throw new Error("Invalid address length");this.buf=u}return(0,T.default)(h,[{key:"equals",value:function(u){return this.buf.equals(u.buf)}},{key:"isZero",value:function(){return this.equals(h.zero())}},{key:"isPrecompileOrSystemAddress",value:function(){var u=(0,b.bufferToBigInt)(this.buf),m=BigInt(0),_=BigInt("0xffff");return u>=m&&u<=_}},{key:"toString",value:function(){return"0x"+this.buf.toString("hex")}},{key:"toBuffer",value:function(){return d.from(this.buf)}}],[{key:"zero",value:function(){return new h((0,b.zeros)(20))}},{key:"fromString",value:function(u){if(!(0,g.isValidAddress)(u))throw new Error("Invalid address");return new h((0,b.toBuffer)(u))}},{key:"fromPublicKey",value:function(u){if(!d.isBuffer(u))throw new Error("Public key should be Buffer");return new h((0,g.pubToAddress)(u))}},{key:"fromPrivateKey",value:function(u){if(!d.isBuffer(u))throw new Error("Private key should be Buffer");return new h((0,g.privateToAddress)(u))}},{key:"generate",value:function(u,m){if("bigint"!=typeof m)throw new Error("Expected nonce to be a bigint");return new h((0,g.generateAddress)(u.buf,(0,b.bigIntToBuffer)(m)))}},{key:"generate2",value:function(u,m,_){if(!d.isBuffer(m))throw new Error("Expected salt to be a Buffer");if(!d.isBuffer(_))throw new Error("Expected initCode to be a Buffer");return new h((0,g.generateAddress2)(u.buf,m,_))}}]),h}();O.Address=l},77692:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(69721)),T=d(E(58985)),g=d(E(119)),b=d(E(15163)),l=d(E(34650)),h=d(E(21949)),u=d(E(94571));function m(I){var P,L,V,W=2;for("undefined"!=typeof Symbol&&(L=Symbol.asyncIterator,V=Symbol.iterator);W--;){if(L&&null!=(P=I[L]))return P.call(I);if(V&&null!=(P=I[V]))return new _(P.call(I));L="@@asyncIterator",V="@@iterator"}throw new TypeError("Object is not async iterable")}function _(I){function P(L){if(Object(L)!==L)return Promise.reject(new TypeError(L+" is not an object."));var V=L.done;return Promise.resolve(L.value).then(function(W){return{value:W,done:V}})}return(_=function(L){this.s=L,this.n=L.next}).prototype={s:null,n:null,next:function(){return P(this.n.apply(this.s,arguments))},return:function(L){var V=this.s.return;return void 0===V?Promise.resolve({value:L,done:!0}):P(V.apply(this.s,arguments))},throw:function(L){var V=this.s.return;return void 0===V?Promise.reject(L):P(V.apply(this.s,arguments))}},new _(I)}function w(){return(w=(0,u.default)(x.default.mark(function I(P,L,V){var W,G,H,j,K,R,o;return x.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:G=!1,H=!1,y.prev=2,K=x.default.mark(function M(){var v;return x.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(v=o.value,k.prev=1,!(v.length<2)){k.next=6;break}v.call(P,V),k.next=8;break;case 6:return k.next=8,new Promise(function(D,N){v.call(P,V,function(C){C?N(C):D()})});case 8:k.next=13;break;case 10:k.prev=10,k.t0=k.catch(1),W=k.t0;case 13:case"end":return k.stop()}},M,null,[[1,10]])}),R=m(L);case 5:return y.next=7,R.next();case 7:if(!(G=!(o=y.sent).done)){y.next=12;break}return y.delegateYield(K(),"t0",9);case 9:G=!1,y.next=5;break;case 12:y.next=18;break;case 14:y.prev=14,y.t1=y.catch(2),H=!0,j=y.t1;case 18:if(y.prev=18,y.prev=19,!G||null==R.return){y.next=23;break}return y.next=23,R.return();case 23:if(y.prev=23,!H){y.next=26;break}throw j;case 26:return y.finish(23);case 27:return y.finish(18);case 28:if(!W){y.next=30;break}throw W;case 30:case"end":return y.stop()}},I,null,[[2,14,18,28],[19,,23,27]])}))).apply(this,arguments)}Object.defineProperty(O,"__esModule",{value:!0}),O.AsyncEventEmitter=void 0;var S=function(I){(0,b.default)(W,I);var P,L,V=(P=W,L=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var G,H=(0,h.default)(P);if(L){var j=(0,h.default)(this).constructor;G=Reflect.construct(H,arguments,j)}else G=H.apply(this,arguments);return(0,l.default)(this,G)});function W(){return(0,f.default)(this,W),V.apply(this,arguments)}return(0,T.default)(W,[{key:"emit",value:function(G){for(var H,j=arguments.length,K=new Array(j>1?j-1:0),R=1;R0}},{key:"once",value:function(G,H){var j,K=this;if("function"!=typeof H)throw new TypeError("listener must be a function");return j=H.length>=2?function(R,o){K.removeListener(G,j),H(R,o)}:function(R){K.removeListener(G,j),H(R,j)},K.on(G,j),K}},{key:"first",value:function(G,H){var j,K=null!==(j=this._events[G])&&void 0!==j?j:[];if("function"!=typeof H)throw new TypeError("listener must be a function");return Array.isArray(K)||(this._events[G]=K=[K]),K.unshift(H),this}},{key:"before",value:function(G,H,j){return this.beforeOrAfter(G,H,j)}},{key:"after",value:function(G,H,j){return this.beforeOrAfter(G,H,j,"after")}},{key:"beforeOrAfter",value:function(G,H,j,K){var R,o,y,M=null!==(R=this._events[G])&&void 0!==R?R:[],v="after"===K?1:0;if("function"!=typeof j)throw new TypeError("listener must be a function");if("function"!=typeof H)throw new TypeError("target must be a function");for(Array.isArray(M)||(this._events[G]=M=[M]),y=M.length,o=M.length;o--;)if(M[o]===H){y=o+v;break}return M.splice(y,0,j),this}},{key:"on",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"on",this).call(this,G,H)}},{key:"addListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"addListener",this).call(this,G,H)}},{key:"prependListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"prependListener",this).call(this,G,H)}},{key:"prependOnceListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"prependOnceListener",this).call(this,G,H)}},{key:"removeAllListeners",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"removeAllListeners",this).call(this,G)}},{key:"removeListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"removeListener",this).call(this,G,H)}},{key:"eventNames",value:function(){return(0,g.default)((0,h.default)(W.prototype),"eventNames",this).call(this)}},{key:"listeners",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"listeners",this).call(this,G)}},{key:"listenerCount",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"listenerCount",this).call(this,G)}},{key:"getMaxListeners",value:function(){return(0,g.default)((0,h.default)(W.prototype),"getMaxListeners",this).call(this)}},{key:"setMaxListeners",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"setMaxListeners",this).call(this,G)}}]),W}(E(38291).EventEmitter);O.AsyncEventEmitter=S},55803:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(74519));Object.defineProperty(O,"__esModule",{value:!0}),O.intToUnpaddedBuffer=O.bigIntToUnpaddedBuffer=O.bigIntToHex=O.bufArrToArr=O.arrToBufArr=O.validateNoLeadingZeroes=O.baToJSON=O.toUtf8=O.short=O.addHexPrefix=O.toUnsigned=O.fromSigned=O.bufferToInt=O.bigIntToBuffer=O.bufferToBigInt=O.bufferToHex=O.toBuffer=O.unpadHexString=O.unpadArray=O.unpadBuffer=O.setLengthRight=O.setLengthLeft=O.zeros=O.intToBuffer=O.intToHex=void 0;var f=E(99047),T=E(72560);O.intToHex=function(u){if(!Number.isSafeInteger(u)||u<0)throw new Error("Received an invalid integer type: ".concat(u));return"0x".concat(u.toString(16))},O.intToBuffer=function(u){var m=(0,O.intToHex)(u);return d.from((0,T.padToEven)(m.slice(2)),"hex")},O.zeros=function(u){return d.allocUnsafe(u).fill(0)};var g=function(u,m,_){var w=(0,O.zeros)(m);return _?u.length0&&"0"===m.toString();)m=(u=u.slice(1))[0];return u};function l(u){var m=(0,O.bufferToHex)(u);return BigInt("0x"===m?0:m)}function h(u){return(0,O.toBuffer)("0x"+u.toString(16))}O.unpadBuffer=function(u){return(0,f.assertIsBuffer)(u),b(u)},O.unpadArray=function(u){return(0,f.assertIsArray)(u),b(u)},O.unpadHexString=function(u){return(0,f.assertIsHexString)(u),u=(0,T.stripHexPrefix)(u),"0x"+b(u)},O.toBuffer=function(u){if(null==u)return d.allocUnsafe(0);if(d.isBuffer(u)||Array.isArray(u)||u instanceof Uint8Array)return d.from(u);if("string"==typeof u){if(!(0,T.isHexString)(u))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(u));return d.from((0,T.padToEven)((0,T.stripHexPrefix)(u)),"hex")}if("number"==typeof u)return(0,O.intToBuffer)(u);if("bigint"==typeof u){if(u1&&void 0!==arguments[1]?arguments[1]:50,_=d.isBuffer(u)?u.toString("hex"):u;return _.length<=m?_:_.slice(0,m)+"\u2026"},O.toUtf8=function(u){if((u=(0,T.stripHexPrefix)(u)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return d.from(u.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},O.baToJSON=function(u){if(d.isBuffer(u))return"0x".concat(u.toString("hex"));if(u instanceof Array){for(var m=[],_=0;_0&&0===I[0])throw new Error("".concat(w[0]," cannot have leading zeroes, received: ").concat(I.toString("hex")))}},O.arrToBufArr=function u(m){return Array.isArray(m)?m.map(function(_){return u(_)}):d.from(m)},O.bufArrToArr=function u(m){return Array.isArray(m)?m.map(function(_){return u(_)}):Uint8Array.from(m??[])},O.bigIntToHex=function(u){return"0x"+u.toString(16)},O.bigIntToUnpaddedBuffer=function(u){return(0,O.unpadBuffer)(h(u))},O.intToUnpaddedBuffer=function(u){return(0,O.unpadBuffer)((0,O.intToBuffer)(u))}},21449:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.MAX_WITHDRAWALS_PER_PAYLOAD=O.RLP_EMPTY_STRING=O.KECCAK256_RLP=O.KECCAK256_RLP_S=O.KECCAK256_RLP_ARRAY=O.KECCAK256_RLP_ARRAY_S=O.KECCAK256_NULL=O.KECCAK256_NULL_S=O.TWO_POW256=O.SECP256K1_ORDER_DIV_2=O.SECP256K1_ORDER=O.MAX_INTEGER_BIGINT=O.MAX_INTEGER=O.MAX_UINT64=void 0;var d=E(29033),x=E(86992);O.MAX_UINT64=BigInt("0xffffffffffffffff"),O.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),O.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),O.SECP256K1_ORDER=x.secp256k1.CURVE.n,O.SECP256K1_ORDER_DIV_2=x.secp256k1.CURVE.n/BigInt(2),O.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),O.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",O.KECCAK256_NULL=d.Buffer.from(O.KECCAK256_NULL_S,"hex"),O.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",O.KECCAK256_RLP_ARRAY=d.Buffer.from(O.KECCAK256_RLP_ARRAY_S,"hex"),O.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",O.KECCAK256_RLP=d.Buffer.from(O.KECCAK256_RLP_S,"hex"),O.RLP_EMPTY_STRING=d.Buffer.from([128]),O.MAX_WITHDRAWALS_PER_PAYLOAD=16},89890:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.compactBytesToNibbles=O.bytesToNibbles=O.nibblesToCompactBytes=O.nibblesToBytes=O.hasTerminator=void 0,O.hasTerminator=function(E){return E.length>0&&16===E[E.length-1]},O.nibblesToBytes=function(E,d){for(var x=0,f=0;f{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.assertIsString=O.assertIsArray=O.assertIsBuffer=O.assertIsHexString=void 0;var x=E(72560);O.assertIsHexString=function(f){if(!(0,x.isHexString)(f)){var T="This method only supports 0x-prefixed hex strings but input was: ".concat(f);throw new Error(T)}},O.assertIsBuffer=function(f){if(!d.isBuffer(f)){var T="This method only supports Buffer but input was: ".concat(f);throw new Error(T)}},O.assertIsArray=function(f){if(!Array.isArray(f)){var T="This method only supports number arrays but input was: ".concat(f);throw new Error(T)}},O.assertIsString=function(f){if("string"!=typeof f){var T="This method only supports strings but input was: ".concat(f);throw new Error(T)}}},65907:(z,O,E)=>{"use strict";var d=Object.create?function(T,g,b,l){void 0===l&&(l=b);var h=Object.getOwnPropertyDescriptor(g,b);h&&!("get"in h?!g.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return g[b]}}),Object.defineProperty(T,l,h)}:function(T,g,b,l){void 0===l&&(l=b),T[l]=g[b]},x=function(T,g){for(var b in T)"default"===b||Object.prototype.hasOwnProperty.call(g,b)||d(g,T,b)};Object.defineProperty(O,"__esModule",{value:!0}),O.toAscii=O.stripHexPrefix=O.padToEven=O.isHexString=O.isHexPrefixed=O.getKeys=O.getBinarySize=O.fromUtf8=O.fromAscii=O.arrayContainsArray=void 0,x(E(21449),O),x(E(44205),O),x(E(59786),O),x(E(78718),O),x(E(1313),O),x(E(65404),O),x(E(55803),O),x(E(62198),O),x(E(89890),O),x(E(77692),O);var f=E(72560);Object.defineProperty(O,"arrayContainsArray",{enumerable:!0,get:function(){return f.arrayContainsArray}}),Object.defineProperty(O,"fromAscii",{enumerable:!0,get:function(){return f.fromAscii}}),Object.defineProperty(O,"fromUtf8",{enumerable:!0,get:function(){return f.fromUtf8}}),Object.defineProperty(O,"getBinarySize",{enumerable:!0,get:function(){return f.getBinarySize}}),Object.defineProperty(O,"getKeys",{enumerable:!0,get:function(){return f.getKeys}}),Object.defineProperty(O,"isHexPrefixed",{enumerable:!0,get:function(){return f.isHexPrefixed}}),Object.defineProperty(O,"isHexString",{enumerable:!0,get:function(){return f.isHexString}}),Object.defineProperty(O,"padToEven",{enumerable:!0,get:function(){return f.padToEven}}),Object.defineProperty(O,"stripHexPrefix",{enumerable:!0,get:function(){return f.stripHexPrefix}}),Object.defineProperty(O,"toAscii",{enumerable:!0,get:function(){return f.toAscii}}),x(E(35651),O),x(E(6449),O)},72560:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(3355));function f(g){if("string"!=typeof g)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,x.default)(g)));return"0"===g[0]&&"x"===g[1]}function T(g){var b=g;if("string"!=typeof b)throw new Error("[padToEven] value must be type 'string', received ".concat((0,x.default)(b)));return b.length%2&&(b="0".concat(b)),b}Object.defineProperty(O,"__esModule",{value:!0}),O.isHexString=O.getKeys=O.fromAscii=O.fromUtf8=O.toAscii=O.arrayContainsArray=O.getBinarySize=O.padToEven=O.stripHexPrefix=O.isHexPrefixed=void 0,O.isHexPrefixed=f,O.stripHexPrefix=function(g){if("string"!=typeof g)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,x.default)(g)));return f(g)?g.slice(2):g},O.padToEven=T,O.getBinarySize=function(g){if("string"!=typeof g)throw new Error("[getBinarySize] method requires input type 'string', received ".concat((0,x.default)(g)));return d.byteLength(g,"utf8")},O.arrayContainsArray=function(g,b,l){if(!0!==Array.isArray(g))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,x.default)(g),"'"));if(!0!==Array.isArray(b))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,x.default)(b),"'"));return b[!0===l?"some":"every"](function(h){return g.indexOf(h)>=0})},O.toAscii=function(g){var b="",l=0,h=g.length;for("0x"===g.substring(0,2)&&(l=2);l0&&g.length!==2+2*b)}},35651:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(94571)),T=d(E(69721)),g=d(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.Lock=void 0;var b=function(){function l(){(0,T.default)(this,l),this.permits=1,this.promiseResolverQueue=[]}var h;return(0,g.default)(l,[{key:"acquire",value:(h=(0,f.default)(x.default.mark(function u(){var m=this;return x.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!(this.permits>0)){_.next=3;break}return this.permits-=1,_.abrupt("return",Promise.resolve(!0));case 3:return _.abrupt("return",new Promise(function(w){return m.promiseResolverQueue.push(w)}));case 4:case"end":return _.stop()}},u,this)})),function(){return h.apply(this,arguments)})},{key:"release",value:function(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;var u=this.promiseResolverQueue.shift();u&&u(!0)}}}]),l}();O.Lock=b},6449:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(94571));Object.defineProperty(O,"__esModule",{value:!0}),O.getProvider=O.fetchFromProvider=void 0;var b,T=E(37441),g=(b=(0,f.default)(x.default.mark(function l(h,u){return x.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,(0,T.default)(h,{headers:{"content-type":"application/json"},type:"json",data:{method:u.method,params:u.params,jsonrpc:"2.0",id:1}});case 2:return _.abrupt("return",_.sent.result);case 4:case"end":return _.stop()}},l)})),function(l,h){return b.apply(this,arguments)});O.fetchFromProvider=g,O.getProvider=function(b){var l;if("string"==typeof b)return b;if(void 0!==(null==b||null===(l=b.connection)||void 0===l?void 0:l.url))return b.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},65404:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.hashPersonalMessage=O.isValidSignature=O.fromRpcSig=O.toCompactSig=O.toRpcSig=O.ecrecover=O.ecsign=void 0;var x=E(1243),f=E(86992),T=E(55803),g=E(21449),b=E(99047);function l(u,m){return u===BigInt(0)||u===BigInt(1)?u:void 0===m?u-BigInt(27):u-(m*BigInt(2)+BigInt(35))}function h(u){return u===BigInt(0)||u===BigInt(1)}O.ecsign=function(u,m,_){var w=f.secp256k1.sign(u,m),S=w.toCompactRawBytes();return{r:d.from(S.slice(0,32)),s:d.from(S.slice(32,64)),v:void 0===_?BigInt(w.recovery+27):BigInt(w.recovery+35)+BigInt(_)*BigInt(2)}},O.ecrecover=function(u,m,_,w,S){var I=d.concat([(0,T.setLengthLeft)(_,32),(0,T.setLengthLeft)(w,32)],64),P=l(m,S);if(!h(P))throw new Error("Invalid signature v value");var L=f.secp256k1.Signature.fromCompact(I).addRecoveryBit(Number(P)).recoverPublicKey(u);return d.from(L.toRawBytes(!1).slice(1))},O.toRpcSig=function(u,m,_,w){if(!h(l(u,w)))throw new Error("Invalid signature v value");return(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(m,32),(0,T.setLengthLeft)(_,32),(0,T.toBuffer)(u)]))},O.toCompactSig=function(u,m,_,w){if(!h(l(u,w)))throw new Error("Invalid signature v value");var S=_;return(u>BigInt(28)&&u%BigInt(2)===BigInt(1)||u===BigInt(1)||u===BigInt(28))&&((S=d.from(_))[0]|=128),(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(m,32),(0,T.setLengthLeft)(S,32)]))},O.fromRpcSig=function(u){var m,_,w,S=(0,T.toBuffer)(u);if(S.length>=65)m=S.slice(0,32),_=S.slice(32,64),w=(0,T.bufferToBigInt)(S.slice(64));else{if(64!==S.length)throw new Error("Invalid signature length");m=S.slice(0,32),_=S.slice(32,64),w=BigInt((0,T.bufferToInt)(S.slice(32,33))>>7),_[0]&=127}return w<27&&(w+=BigInt(27)),{v:w,r:m,s:_}},O.isValidSignature=function(u,m,_){var w=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],S=arguments.length>4?arguments[4]:void 0;if(32!==m.length||32!==_.length||!h(l(u,S)))return!1;var I=(0,T.bufferToBigInt)(m),P=(0,T.bufferToBigInt)(_);return!(I===BigInt(0)||I>=g.SECP256K1_ORDER||P===BigInt(0)||P>=g.SECP256K1_ORDER||w&&P>=g.SECP256K1_ORDER_DIV_2)},O.hashPersonalMessage=function(u){(0,b.assertIsBuffer)(u);var m=d.from("\x19Ethereum Signed Message:\n".concat(u.length),"utf-8");return d.from((0,x.keccak256)(d.concat([m,u])))}},62198:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.toType=O.TypeOutput=void 0;var d,T,x=E(55803),f=E(72560);(T=d=O.TypeOutput||(O.TypeOutput={}))[T.Number=0]="Number",T[T.BigInt=1]="BigInt",T[T.Buffer=2]="Buffer",T[T.PrefixedHexString=3]="PrefixedHexString",O.toType=function(T,g){if(null===T)return null;if(void 0!==T){if("string"==typeof T&&!(0,f.isHexString)(T))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(T));if("number"==typeof T&&!Number.isSafeInteger(T))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var b=(0,x.toBuffer)(T);switch(g){case d.Buffer:return b;case d.BigInt:return(0,x.bufferToBigInt)(b);case d.Number:var l=(0,x.bufferToBigInt)(b);if(l>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(l);case d.PrefixedHexString:return(0,x.bufferToHex)(b);default:throw new Error("unknown outputType")}}}},44205:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.GWEI_TO_WEI=void 0,O.GWEI_TO_WEI=BigInt(1e9)},1313:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(74519)),T=x(E(69721)),g=x(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.Withdrawal=void 0;var b=E(78718),l=E(55803),h=E(62198),u=function(){function m(_,w,S,I){(0,T.default)(this,m),this.index=_,this.validatorIndex=w,this.address=S,this.amount=I}return(0,g.default)(m,[{key:"raw",value:function(){return m.toBufferArray(this)}},{key:"toValue",value:function(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}},{key:"toJSON",value:function(){return{index:(0,l.bigIntToHex)(this.index),validatorIndex:(0,l.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,l.bigIntToHex)(this.amount)}}}],[{key:"fromWithdrawalData",value:function(_){var S=_.validatorIndex,I=_.address,P=_.amount;return new m((0,h.toType)(_.index,h.TypeOutput.BigInt),(0,h.toType)(S,h.TypeOutput.BigInt),new b.Address((0,h.toType)(I,h.TypeOutput.Buffer)),(0,h.toType)(P,h.TypeOutput.BigInt))}},{key:"fromValuesArray",value:function(_){if(4!==_.length)throw Error("Invalid withdrawalArray length expected=4 actual=".concat(_.length));var w=(0,f.default)(_,4);return m.fromWithdrawalData({index:w[0],validatorIndex:w[1],address:w[2],amount:w[3]})}},{key:"toBufferArray",value:function(_){var w=_.index,S=_.validatorIndex,I=_.address,P=_.amount;return[(0,h.toType)(w,h.TypeOutput.BigInt)===BigInt(0)?d.alloc(0):(0,h.toType)(w,h.TypeOutput.Buffer),(0,h.toType)(S,h.TypeOutput.BigInt)===BigInt(0)?d.alloc(0):(0,h.toType)(S,h.TypeOutput.Buffer),I instanceof b.Address?I.buf:(0,h.toType)(I,h.TypeOutput.Buffer),(0,h.toType)(P,h.TypeOutput.BigInt)===BigInt(0)?d.alloc(0):(0,h.toType)(P,h.TypeOutput.Buffer)]}}]),m}();O.Withdrawal=u},98067:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="abi/5.7.0"},44937:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.defaultAbiCoder=O.AbiCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=E(908),g=E(23694),b=E(64327),l=E(98067),h=E(17316),u=E(49146),m=E(4341),_=E(30024),w=E(53861),S=E(90028),I=E(4522),P=E(88287),L=E(48040),V=E(52010),W=E(60800),G=new b.Logger(l.version),H=new RegExp(/^bytes([0-9]*)$/),j=new RegExp(/^(u?int)([0-9]*)$/),K=function(){function o(y){(0,x.default)(this,o),(0,g.defineReadOnly)(this,"coerceFunc",y||null)}return(0,f.default)(o,[{key:"_getCoder",value:function(y){var M=this;switch(y.baseType){case"address":return new u.AddressCoder(y.name);case"bool":return new _.BooleanCoder(y.name);case"string":return new L.StringCoder(y.name);case"bytes":return new w.BytesCoder(y.name);case"array":return new m.ArrayCoder(this._getCoder(y.arrayChildren),y.arrayLength,y.name);case"tuple":return new V.TupleCoder((y.components||[]).map(function(N){return M._getCoder(N)}),y.name);case"":return new I.NullCoder(y.name)}var v=y.type.match(j);if(v){var k=parseInt(v[2]||"256");return(0===k||k>256||k%8!=0)&&G.throwArgumentError("invalid "+v[1]+" bit length","param",y),new P.NumberCoder(k/8,"int"===v[1],y.name)}if(v=y.type.match(H)){var D=parseInt(v[1]);return(0===D||D>32)&&G.throwArgumentError("invalid bytes length","param",y),new S.FixedBytesCoder(D,y.name)}return G.throwArgumentError("invalid type","type",y.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(y,M){return new h.Reader(y,this._getWordSize(),this.coerceFunc,M)}},{key:"_getWriter",value:function(){return new h.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(y){var M=this,v=y.map(function(k){return M._getCoder(W.ParamType.from(k))});return new V.TupleCoder(v,"_").defaultValue()}},{key:"encode",value:function(y,M){var v=this;y.length!==M.length&&G.throwError("types/values length mismatch",b.Logger.errors.INVALID_ARGUMENT,{count:{types:y.length,values:M.length},value:{types:y,values:M}});var k=y.map(function(C){return v._getCoder(W.ParamType.from(C))}),D=new V.TupleCoder(k,"_"),N=this._getWriter();return D.encode(N,M),N.data}},{key:"decode",value:function(y,M,v){var k=this,D=y.map(function(N){return k._getCoder(W.ParamType.from(N))});return new V.TupleCoder(D,"_").decode(this._getReader((0,T.arrayify)(M),v))}}]),o}();O.AbiCoder=K;var R=new K;O.defaultAbiCoder=R},17316:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.Writer=O.Reader=O.Coder=void 0,O.checkResultErrors=function(S){var I=[];return function P(L,V){if(Array.isArray(V))for(var W in V){var G=L.slice();G.push(W);try{P(G,V[W])}catch(H){I.push({path:G,error:H})}}}([],S),I};var x=d(E(69721)),f=d(E(58985)),T=E(908),g=E(34952),b=E(23694),l=E(64327),h=E(98067),u=new l.Logger(h.version),m=function(){function S(I,P,L,V){(0,x.default)(this,S),this.name=I,this.type=P,this.localName=L,this.dynamic=V}return(0,f.default)(S,[{key:"_throwError",value:function(I,P){u.throwArgumentError(I,this.localName,P)}}]),S}();O.Coder=m;var _=function(){function S(I){(0,x.default)(this,S),(0,b.defineReadOnly)(this,"wordSize",I||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(I)}return(0,f.default)(S,[{key:"data",get:function(){return(0,T.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(I){return this._data.push(I),this._dataLength+=I.length,I.length}},{key:"appendWriter",value:function(I){return this._writeData((0,T.concat)(I._data))}},{key:"writeBytes",value:function(I){var P=(0,T.arrayify)(I),L=P.length%this.wordSize;return L&&(P=(0,T.concat)([P,this._padding.slice(L)])),this._writeData(P)}},{key:"_getValue",value:function(I){var P=(0,T.arrayify)(g.BigNumber.from(I));return P.length>this.wordSize&&u.throwError("value out-of-bounds",l.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:P.length}),P.length%this.wordSize&&(P=(0,T.concat)([this._padding.slice(P.length%this.wordSize),P])),P}},{key:"writeValue",value:function(I){return this._writeData(this._getValue(I))}},{key:"writeUpdatableValue",value:function(){var I=this,P=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(L){I._data[P]=I._getValue(L)}}}]),S}();O.Writer=_;var w=function(){function S(I,P,L,V){(0,x.default)(this,S),(0,b.defineReadOnly)(this,"_data",(0,T.arrayify)(I)),(0,b.defineReadOnly)(this,"wordSize",P||32),(0,b.defineReadOnly)(this,"_coerceFunc",L),(0,b.defineReadOnly)(this,"allowLoose",V),this._offset=0}return(0,f.default)(S,[{key:"data",get:function(){return(0,T.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(I,P){return this._coerceFunc?this._coerceFunc(I,P):S.coerce(I,P)}},{key:"_peekBytes",value:function(I,P,L){var V=Math.ceil(P/this.wordSize)*this.wordSize;return this._offset+V>this._data.length&&(this.allowLoose&&L&&this._offset+P<=this._data.length?V=P:u.throwError("data out-of-bounds",l.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+V})),this._data.slice(this._offset,this._offset+V)}},{key:"subReader",value:function(I){return new S(this._data.slice(this._offset+I),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(I,P){var L=this._peekBytes(0,I,!!P);return this._offset+=L.length,L.slice(0,I)}},{key:"readValue",value:function(){return g.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(I,P){var L=I.match("^u?int([0-9]+)$");return L&&parseInt(L[1])<=48&&(P=P.toNumber()),P}}]),S}();O.Reader=w},49146:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.AddressCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(77921),h=E(908),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P){return(0,x.default)(this,I),S.call(this,"address","address",P,!1)}return(0,f.default)(I,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(P,L){try{L=(0,l.getAddress)(L)}catch(V){this._throwError(V.message,L)}return P.writeValue(L)}},{key:"decode",value:function(P){return(0,l.getAddress)((0,h.hexZeroPad)(P.readValue().toHexString(),20))}}]),I}(E(17316).Coder);O.AddressCoder=u},58090:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.AnonymousCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=function(h){(0,T.default)(w,h);var u,m,_=(u=w,m=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var S,I=(0,b.default)(u);if(m){var P=(0,b.default)(this).constructor;S=Reflect.construct(I,arguments,P)}else S=I.apply(this,arguments);return(0,g.default)(this,S)});function w(S){var I;return(0,x.default)(this,w),(I=_.call(this,S.name,S.type,void 0,S.dynamic)).coder=S,I}return(0,f.default)(w,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(S,I){return this.coder.encode(S,I)}},{key:"decode",value:function(S){return this.coder.decode(S)}}]),w}(E(17316).Coder);O.AnonymousCoder=l},4341:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.ArrayCoder=void 0,O.pack=S,O.unpack=I;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=d(E(3355)),h=E(64327),u=E(98067),m=E(17316),_=E(58090),w=new h.Logger(u.version);function S(L,V,W){var G=null;if(Array.isArray(W))G=W;else if(W&&"object"===(0,l.default)(W)){var H={};G=V.map(function(o){var y=o.localName;return y||w.throwError("cannot encode object for signature with missing names",h.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:o,value:W}),H[y]&&w.throwError("cannot encode object for signature with duplicate names",h.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:o,value:W}),H[y]=!0,W[y]})}else w.throwArgumentError("invalid tuple value","tuple",W);V.length!==G.length&&w.throwArgumentError("types/value length mismatch","tuple",W);var j=new m.Writer(L.wordSize),K=new m.Writer(L.wordSize),R=[];return V.forEach(function(o,y){var M=G[y];if(o.dynamic){var v=K.length;o.encode(K,M);var k=j.writeUpdatableValue();R.push(function(D){k(D+v)})}else o.encode(j,M)}),R.forEach(function(o){o(j.length)}),L.appendWriter(j)+L.appendWriter(K)}function I(L,V){var W=[],G=L.subReader(0);V.forEach(function(R){var o=null;if(R.dynamic){var y=L.readValue(),M=G.subReader(y.toNumber());try{o=R.decode(M)}catch(v){if(v.code===h.Logger.errors.BUFFER_OVERRUN)throw v;(o=v).baseType=R.name,o.name=R.localName,o.type=R.type}}else try{o=R.decode(L)}catch(v){if(v.code===h.Logger.errors.BUFFER_OVERRUN)throw v;(o=v).baseType=R.name,o.name=R.localName,o.type=R.type}null!=o&&W.push(o)});var H=V.reduce(function(R,o){var y=o.localName;return y&&(R[y]||(R[y]=0),R[y]++),R},{});V.forEach(function(R,o){var y=R.localName;if(y&&1===H[y]&&("length"===y&&(y="_length"),null==W[y])){var M=W[o];M instanceof Error?Object.defineProperty(W,y,{enumerable:!0,get:function(){throw M}}):W[y]=M}});for(var j=function(R){var o=W[R];o instanceof Error&&Object.defineProperty(W,R,{enumerable:!0,get:function(){throw o}})},K=0;K=0?K:"")+"]",R,-1===K||j.dynamic)).coder=j,o.length=K,o}return(0,f.default)(H,[{key:"defaultValue",value:function(){for(var j=this.coder.defaultValue(),K=[],R=0;Rj._data.length&&w.throwError("insufficient data length",h.Logger.errors.BUFFER_OVERRUN,{length:j._data.length,count:K});for(var R=[],o=0;o{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.BooleanCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=function(h){(0,T.default)(w,h);var u,m,_=(u=w,m=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var S,I=(0,b.default)(u);if(m){var P=(0,b.default)(this).constructor;S=Reflect.construct(I,arguments,P)}else S=I.apply(this,arguments);return(0,g.default)(this,S)});function w(S){return(0,x.default)(this,w),_.call(this,"bool","bool",S,!1)}return(0,f.default)(w,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(S,I){return S.writeValue(I?1:0)}},{key:"decode",value:function(S){return S.coerce(this.type,!S.readValue().isZero())}}]),w}(E(17316).Coder);O.BooleanCoder=l},53861:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.DynamicBytesCoder=O.BytesCoder=void 0;var x=d(E(119)),f=d(E(69721)),T=d(E(58985)),g=d(E(15163)),b=d(E(34650)),l=d(E(21949)),h=E(908);function u(w){var S=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var I,P=(0,l.default)(w);if(S){var L=(0,l.default)(this).constructor;I=Reflect.construct(P,arguments,L)}else I=P.apply(this,arguments);return(0,b.default)(this,I)}}var m=function(w){(0,g.default)(I,w);var S=u(I);function I(P,L){return(0,f.default)(this,I),S.call(this,P,P,L,!0)}return(0,T.default)(I,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(P,L){return L=(0,h.arrayify)(L),P.writeValue(L.length)+P.writeBytes(L)}},{key:"decode",value:function(P){return P.readBytes(P.readValue().toNumber(),!0)}}]),I}(E(17316).Coder);O.DynamicBytesCoder=m;var _=function(w){(0,g.default)(I,w);var S=u(I);function I(P){return(0,f.default)(this,I),S.call(this,"bytes",P)}return(0,T.default)(I,[{key:"decode",value:function(P){return P.coerce(this.name,(0,h.hexlify)((0,x.default)((0,l.default)(I.prototype),"decode",this).call(this,P)))}}]),I}(m);O.BytesCoder=_},90028:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.FixedBytesCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(908),h=function(u){(0,T.default)(S,u);var m,_,w=(m=S,_=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var I,P=(0,b.default)(m);if(_){var L=(0,b.default)(this).constructor;I=Reflect.construct(P,arguments,L)}else I=P.apply(this,arguments);return(0,g.default)(this,I)});function S(I,P){var L;(0,x.default)(this,S);var V="bytes"+String(I);return(L=w.call(this,V,V,P,!1)).size=I,L}return(0,f.default)(S,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(I,P){var L=(0,l.arrayify)(P);return L.length!==this.size&&this._throwError("incorrect data length",P),I.writeBytes(L)}},{key:"decode",value:function(I){return I.coerce(this.name,(0,l.hexlify)(I.readBytes(this.size)))}}]),S}(E(17316).Coder);O.FixedBytesCoder=h},4522:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.NullCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=function(h){(0,T.default)(w,h);var u,m,_=(u=w,m=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var S,I=(0,b.default)(u);if(m){var P=(0,b.default)(this).constructor;S=Reflect.construct(I,arguments,P)}else S=I.apply(this,arguments);return(0,g.default)(this,S)});function w(S){return(0,x.default)(this,w),_.call(this,"null","",S,!1)}return(0,f.default)(w,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(S,I){return null!=I&&this._throwError("not null",I),S.writeBytes([])}},{key:"decode",value:function(S){return S.readBytes(0),S.coerce(this.name,null)}}]),w}(E(17316).Coder);O.NullCoder=l},88287:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.NumberCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(34952),h=E(5465),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P,L,V){var W;(0,x.default)(this,I);var G=(L?"int":"uint")+8*P;return(W=S.call(this,G,G,V,!1)).size=P,W.signed=L,W}return(0,f.default)(I,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(P,L){var V=l.BigNumber.from(L),W=h.MaxUint256.mask(8*P.wordSize);if(this.signed){var G=W.mask(8*this.size-1);(V.gt(G)||V.lt(G.add(h.One).mul(h.NegativeOne)))&&this._throwError("value out-of-bounds",L)}else(V.lt(h.Zero)||V.gt(W.mask(8*this.size)))&&this._throwError("value out-of-bounds",L);return V=V.toTwos(8*this.size).mask(8*this.size),this.signed&&(V=V.fromTwos(8*this.size).toTwos(8*P.wordSize)),P.writeValue(V)}},{key:"decode",value:function(P){var L=P.readValue().mask(8*this.size);return this.signed&&(L=L.fromTwos(8*this.size)),P.coerce(this.name,L)}}]),I}(E(17316).Coder);O.NumberCoder=u},48040:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.StringCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(119)),g=d(E(15163)),b=d(E(34650)),l=d(E(21949)),h=E(78627),u=function(m){(0,g.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,l.default)(_);if(w){var V=(0,l.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,b.default)(this,P)});function I(P){return(0,x.default)(this,I),S.call(this,"string",P)}return(0,f.default)(I,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(P,L){return(0,T.default)((0,l.default)(I.prototype),"encode",this).call(this,P,(0,h.toUtf8Bytes)(L))}},{key:"decode",value:function(P){return(0,h.toUtf8String)((0,T.default)((0,l.default)(I.prototype),"decode",this).call(this,P))}}]),I}(E(53861).DynamicBytesCoder);O.StringCoder=u},52010:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.TupleCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(17316),h=E(4341),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P,L){var V;(0,x.default)(this,I);var W=!1,G=[];P.forEach(function(j){j.dynamic&&(W=!0),G.push(j.type)});var H="tuple("+G.join(",")+")";return(V=S.call(this,"tuple",H,L,W)).coders=P,V}return(0,f.default)(I,[{key:"defaultValue",value:function(){var P=[];this.coders.forEach(function(V){P.push(V.defaultValue())});var L=this.coders.reduce(function(V,W){var G=W.localName;return G&&(V[G]||(V[G]=0),V[G]++),V},{});return this.coders.forEach(function(V,W){var G=V.localName;G&&1===L[G]&&("length"===G&&(G="_length"),null==P[G]&&(P[G]=P[W]))}),Object.freeze(P)}},{key:"encode",value:function(P,L){return(0,h.pack)(P,this.coders,L)}},{key:"decode",value:function(P){return P.coerce(this.name,(0,h.unpack)(P,this.coders))}}]),I}(l.Coder);O.TupleCoder=u},60800:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.ParamType=O.FunctionFragment=O.Fragment=O.FormatTypes=O.EventFragment=O.ErrorFragment=O.ConstructorFragment=void 0;var x=d(E(15163)),f=d(E(34650)),T=d(E(21949)),g=d(E(69721)),b=d(E(58985)),l=E(34952),h=E(23694),u=E(64327),m=E(98067);function _(ee){var ce=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ue,we=(0,T.default)(ee);if(ce){var ae=(0,T.default)(this).constructor;ue=Reflect.construct(we,arguments,ae)}else ue=we.apply(this,arguments);return(0,f.default)(this,ue)}}var w=new u.Logger(m.version),S={},I={calldata:!0,memory:!0,storage:!0},P={calldata:!0,memory:!0};function L(ee,ce){if("bytes"===ee||"string"===ee){if(I[ce])return!0}else if("address"===ee){if("payable"===ce)return!0}else if((ee.indexOf("[")>=0||"tuple"===ee)&&P[ce])return!0;return(I[ce]||"payable"===ce)&&w.throwArgumentError("invalid modifier","name",ce),!1}function V(ee,ce){for(var ue in ce)(0,h.defineReadOnly)(ee,ue,ce[ue])}var W=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});O.FormatTypes=W;var G=new RegExp(/^(.*)\[([0-9]*)\]$/),H=function(){function ee(ce,ue){(0,g.default)(this,ee),ce!==S&&w.throwError("use fromString",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),V(this,ue);var we=this.type.match(G);V(this,we?{arrayLength:parseInt(we[2]||"-1"),arrayChildren:ee.fromObject({type:we[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,b.default)(ee,[{key:"format",value:function(ce){if(ce||(ce=W.sighash),W[ce]||w.throwArgumentError("invalid format type","format",ce),ce===W.json){var ue={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(ue.indexed=this.indexed),this.components&&(ue.components=this.components.map(function(ae){return JSON.parse(ae.format(ce))})),JSON.stringify(ue)}var we="";return"array"===this.baseType?(we+=this.arrayChildren.format(ce),we+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(ce!==W.sighash&&(we+=this.type),we+="("+this.components.map(function(ae){return ae.format(ce)}).join(ce===W.full?", ":",")+")"):we+=this.type,ce!==W.sighash&&(!0===this.indexed&&(we+=" indexed"),ce===W.full&&this.name&&(we+=" "+this.name)),we}}],[{key:"from",value:function(ce,ue){return"string"==typeof ce?ee.fromString(ce,ue):ee.fromObject(ce)}},{key:"fromObject",value:function(ce){return ee.isParamType(ce)?ce:new ee(S,{name:ce.name||null,type:C(ce.type),indexed:null==ce.indexed?null:!!ce.indexed,components:ce.components?ce.components.map(ee.fromObject):null})}},{key:"fromString",value:function(ce,ue){return we=function(ae,Te){var le=ae;function X(Ee){w.throwArgumentError("unexpected character at position ".concat(Ee),"param",ae)}function ne(Ee){var ze={type:"",name:"",parent:Ee,state:{allowType:!0}};return Te&&(ze.indexed=!1),ze}ae=ae.replace(/\s/g," ");for(var pe={type:"",name:"",state:{allowType:!0}},_e=pe,xe=0;xe2&&w.throwArgumentError("invalid human-readable ABI signature","value",ee),ue[1].match(/^[0-9]+$/)||w.throwArgumentError("invalid human-readable ABI signature gas","value",ee),ce.gas=l.BigNumber.from(ue[1]),ue[0]):ee}function y(ee,ce){ce.constant=!1,ce.payable=!1,ce.stateMutability="nonpayable",ee.split(" ").forEach(function(ue){switch(ue.trim()){case"constant":ce.constant=!0;break;case"payable":ce.payable=!0,ce.stateMutability="payable";break;case"nonpayable":ce.payable=!1,ce.stateMutability="nonpayable";break;case"pure":ce.constant=!0,ce.stateMutability="pure";break;case"view":ce.constant=!0,ce.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+ue)}})}function M(ee){var ce={constant:!1,payable:!0,stateMutability:"payable"};return null!=ee.stateMutability?(ce.stateMutability=ee.stateMutability,ce.constant="view"===ce.stateMutability||"pure"===ce.stateMutability,null!=ee.constant&&!!ee.constant!==ce.constant&&w.throwArgumentError("cannot have constant function with mutability "+ce.stateMutability,"value",ee),ce.payable="payable"===ce.stateMutability,null!=ee.payable&&!!ee.payable!==ce.payable&&w.throwArgumentError("cannot have payable function with mutability "+ce.stateMutability,"value",ee)):null!=ee.payable?(ce.payable=!!ee.payable,null!=ee.constant||ce.payable||"constructor"===ee.type||w.throwArgumentError("unable to determine stateMutability","value",ee),ce.constant=!!ee.constant,ce.stateMutability=ce.constant?"view":ce.payable?"payable":"nonpayable",ce.payable&&ce.constant&&w.throwArgumentError("cannot have constant payable function","value",ee)):null!=ee.constant?(ce.constant=!!ee.constant,ce.payable=!ce.constant,ce.stateMutability=ce.constant?"view":"payable"):"constructor"!==ee.type&&w.throwArgumentError("unable to determine stateMutability","value",ee),ce}O.EventFragment=R;var v=function(ee){(0,x.default)(ue,ee);var ce=_(ue);function ue(){return(0,g.default)(this,ue),ce.apply(this,arguments)}return(0,b.default)(ue,[{key:"format",value:function(we){if(we||(we=W.sighash),W[we]||w.throwArgumentError("invalid format type","format",we),we===W.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(function(Te){return JSON.parse(Te.format(we))})});we===W.sighash&&w.throwError("cannot format a constructor for sighash",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var ae="constructor("+this.inputs.map(function(Te){return Te.format(we)}).join(we===W.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(ae+=this.stateMutability+" "),ae.trim()}}],[{key:"from",value:function(we){return"string"==typeof we?ue.fromString(we):ue.fromObject(we)}},{key:"fromObject",value:function(we){if(ue.isConstructorFragment(we))return we;"constructor"!==we.type&&w.throwArgumentError("invalid constructor object","value",we);var ae=M(we);ae.constant&&w.throwArgumentError("constructor cannot be constant","value",we);var Te={name:null,type:we.type,inputs:we.inputs?we.inputs.map(H.fromObject):[],payable:ae.payable,stateMutability:ae.stateMutability,gas:we.gas?l.BigNumber.from(we.gas):null};return new ue(S,Te)}},{key:"fromString",value:function(we){var ae={type:"constructor"},Te=(we=o(we,ae)).match(Q);return Te&&"constructor"===Te[1].trim()||w.throwArgumentError("invalid constructor string","value",we),ae.inputs=j(Te[2].trim(),!1),y(Te[3].trim(),ae),ue.fromObject(ae)}},{key:"isConstructorFragment",value:function(we){return we&&we._isFragment&&"constructor"===we.type}}]),ue}(K);O.ConstructorFragment=v;var k=function(ee){(0,x.default)(ue,ee);var ce=_(ue);function ue(){return(0,g.default)(this,ue),ce.apply(this,arguments)}return(0,b.default)(ue,[{key:"format",value:function(we){if(we||(we=W.sighash),W[we]||w.throwArgumentError("invalid format type","format",we),we===W.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(function(Te){return JSON.parse(Te.format(we))}),outputs:this.outputs.map(function(Te){return JSON.parse(Te.format(we))})});var ae="";return we!==W.sighash&&(ae+="function "),ae+=this.name+"("+this.inputs.map(function(Te){return Te.format(we)}).join(we===W.full?", ":",")+") ",we!==W.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(ae+=this.stateMutability+" "):this.constant&&(ae+="view "),this.outputs&&this.outputs.length&&(ae+="returns ("+this.outputs.map(function(Te){return Te.format(we)}).join(", ")+") "),null!=this.gas&&(ae+="@"+this.gas.toString()+" ")),ae.trim()}}],[{key:"from",value:function(we){return"string"==typeof we?ue.fromString(we):ue.fromObject(we)}},{key:"fromObject",value:function(we){if(ue.isFunctionFragment(we))return we;"function"!==we.type&&w.throwArgumentError("invalid function object","value",we);var ae=M(we),Te={type:we.type,name:B(we.name),constant:ae.constant,inputs:we.inputs?we.inputs.map(H.fromObject):[],outputs:we.outputs?we.outputs.map(H.fromObject):[],payable:ae.payable,stateMutability:ae.stateMutability,gas:we.gas?l.BigNumber.from(we.gas):null};return new ue(S,Te)}},{key:"fromString",value:function(we){var ae={type:"function"},Te=(we=o(we,ae)).split(" returns ");Te.length>2&&w.throwArgumentError("invalid function string","value",we);var le=Te[0].match(Q);if(le||w.throwArgumentError("invalid function signature","value",we),ae.name=le[1].trim(),ae.name&&B(ae.name),ae.inputs=j(le[2],!1),y(le[3].trim(),ae),Te.length>1){var X=Te[1].match(Q);""==X[1].trim()&&""==X[3].trim()||w.throwArgumentError("unexpected tokens","value",we),ae.outputs=j(X[2],!1)}else ae.outputs=[];return ue.fromObject(ae)}},{key:"isFunctionFragment",value:function(we){return we&&we._isFragment&&"function"===we.type}}]),ue}(v);function D(ee){var ce=ee.format();return"Error(string)"!==ce&&"Panic(uint256)"!==ce||w.throwArgumentError("cannot specify user defined ".concat(ce," error"),"fragment",ee),ee}O.FunctionFragment=k;var N=function(ee){(0,x.default)(ue,ee);var ce=_(ue);function ue(){return(0,g.default)(this,ue),ce.apply(this,arguments)}return(0,b.default)(ue,[{key:"format",value:function(we){if(we||(we=W.sighash),W[we]||w.throwArgumentError("invalid format type","format",we),we===W.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(function(Te){return JSON.parse(Te.format(we))})});var ae="";return we!==W.sighash&&(ae+="error "),(ae+=this.name+"("+this.inputs.map(function(Te){return Te.format(we)}).join(we===W.full?", ":",")+") ").trim()}}],[{key:"from",value:function(we){return"string"==typeof we?ue.fromString(we):ue.fromObject(we)}},{key:"fromObject",value:function(we){if(ue.isErrorFragment(we))return we;"error"!==we.type&&w.throwArgumentError("invalid error object","value",we);var ae={type:we.type,name:B(we.name),inputs:we.inputs?we.inputs.map(H.fromObject):[]};return D(new ue(S,ae))}},{key:"fromString",value:function(we){var ae={type:"error"},Te=we.match(Q);return Te||w.throwArgumentError("invalid error signature","value",we),ae.name=Te[1].trim(),ae.name&&B(ae.name),ae.inputs=j(Te[2],!1),D(ue.fromObject(ae))}},{key:"isErrorFragment",value:function(we){return we&&we._isFragment&&"error"===we.type}}]),ue}(K);function C(ee){return ee.match(/^uint($|[^1-9])/)?ee="uint256"+ee.substring(4):ee.match(/^int($|[^1-9])/)&&(ee="int256"+ee.substring(3)),ee}O.ErrorFragment=N;var a=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function B(ee){return ee&&ee.match(a)||w.throwArgumentError('invalid identifier "'.concat(ee,'"'),"value",ee),ee}var Q=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},62914:(z,O,E)=>{"use strict";Object.defineProperty(O,"RQ",{enumerable:!0,get:function(){return x.AbiCoder}}),Object.defineProperty(O,"_R",{enumerable:!0,get:function(){return d.ParamType}});var d=E(60800),x=E(44937);E(69044)},69044:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.TransactionDescription=O.LogDescription=O.Interface=O.Indexed=O.ErrorDescription=void 0,Object.defineProperty(O,"checkResultErrors",{enumerable:!0,get:function(){return I.checkResultErrors}});var x=d(E(58985)),f=d(E(69721)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(77921),h=E(34952),u=E(908),m=E(37515),_=E(64642),w=E(23694),S=E(44937),I=E(17316),P=E(60800),L=E(64327),V=E(98067);function W(v){var k=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var D,N=(0,b.default)(v);if(k){var C=(0,b.default)(this).constructor;D=Reflect.construct(N,arguments,C)}else D=N.apply(this,arguments);return(0,g.default)(this,D)}}var G=new L.Logger(V.version),H=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D)}(w.Description);O.LogDescription=H;var j=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D)}(w.Description);O.TransactionDescription=j;var K=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D)}(w.Description);O.ErrorDescription=K;var R=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D,null,[{key:"isIndexed",value:function(N){return!(!N||!N._isIndexed)}}]),D}(w.Description);O.Indexed=R;var o={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function y(v,k){var D=new Error("deferred error during ABI decoding triggered accessing ".concat(v));return D.error=k,D}var M=function(){function v(k){var D=this;(0,f.default)(this,v);var N=[];N="string"==typeof k?JSON.parse(k):k,(0,w.defineReadOnly)(this,"fragments",N.map(function(C){return P.Fragment.from(C)}).filter(function(C){return null!=C})),(0,w.defineReadOnly)(this,"_abiCoder",(0,w.getStatic)(this instanceof v?this.constructor:void 0,"getAbiCoder")()),(0,w.defineReadOnly)(this,"functions",{}),(0,w.defineReadOnly)(this,"errors",{}),(0,w.defineReadOnly)(this,"events",{}),(0,w.defineReadOnly)(this,"structs",{}),this.fragments.forEach(function(C){var a=null;switch(C.type){case"constructor":return D.deploy?void G.warn("duplicate definition - constructor"):void(0,w.defineReadOnly)(D,"deploy",C);case"function":a=D.functions;break;case"event":a=D.events;break;case"error":a=D.errors;break;default:return}var B=C.format();a[B]?G.warn("duplicate definition - "+B):a[B]=C}),this.deploy||(0,w.defineReadOnly)(this,"deploy",P.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,w.defineReadOnly)(this,"_isInterface",!0)}return(0,x.default)(v,[{key:"format",value:function(k){k||(k=P.FormatTypes.full),k===P.FormatTypes.sighash&&G.throwArgumentError("interface does not support formatting sighash","format",k);var D=this.fragments.map(function(N){return N.format(k)});return k===P.FormatTypes.json?JSON.stringify(D.map(function(N){return JSON.parse(N)})):D}},{key:"getFunction",value:function(k){if((0,u.isHexString)(k)){for(var D in this.functions)if(k===this.getSighash(D))return this.functions[D];G.throwArgumentError("no matching function","sighash",k)}if(-1===k.indexOf("(")){var N=k.trim(),C=Object.keys(this.functions).filter(function(B){return B.split("(")[0]===N});return 0===C.length?G.throwArgumentError("no matching function","name",N):C.length>1&&G.throwArgumentError("multiple matching functions","name",N),this.functions[C[0]]}var a=this.functions[P.FunctionFragment.fromString(k).format()];return a||G.throwArgumentError("no matching function","signature",k),a}},{key:"getEvent",value:function(k){if((0,u.isHexString)(k)){var D=k.toLowerCase();for(var N in this.events)if(D===this.getEventTopic(N))return this.events[N];G.throwArgumentError("no matching event","topichash",D)}if(-1===k.indexOf("(")){var C=k.trim(),a=Object.keys(this.events).filter(function(Q){return Q.split("(")[0]===C});return 0===a.length?G.throwArgumentError("no matching event","name",C):a.length>1&&G.throwArgumentError("multiple matching events","name",C),this.events[a[0]]}var B=this.events[P.EventFragment.fromString(k).format()];return B||G.throwArgumentError("no matching event","signature",k),B}},{key:"getError",value:function(k){if((0,u.isHexString)(k)){var D=(0,w.getStatic)(this.constructor,"getSighash");for(var N in this.errors)if(k===D(this.errors[N]))return this.errors[N];G.throwArgumentError("no matching error","sighash",k)}if(-1===k.indexOf("(")){var C=k.trim(),a=Object.keys(this.errors).filter(function(Q){return Q.split("(")[0]===C});return 0===a.length?G.throwArgumentError("no matching error","name",C):a.length>1&&G.throwArgumentError("multiple matching errors","name",C),this.errors[a[0]]}var B=this.errors[P.FunctionFragment.fromString(k).format()];return B||G.throwArgumentError("no matching error","signature",k),B}},{key:"getSighash",value:function(k){if("string"==typeof k)try{k=this.getFunction(k)}catch(D){try{k=this.getError(k)}catch{throw D}}return(0,w.getStatic)(this.constructor,"getSighash")(k)}},{key:"getEventTopic",value:function(k){return"string"==typeof k&&(k=this.getEvent(k)),(0,w.getStatic)(this.constructor,"getEventTopic")(k)}},{key:"_decodeParams",value:function(k,D){return this._abiCoder.decode(k,D)}},{key:"_encodeParams",value:function(k,D){return this._abiCoder.encode(k,D)}},{key:"encodeDeploy",value:function(k){return this._encodeParams(this.deploy.inputs,k||[])}},{key:"decodeErrorResult",value:function(k,D){"string"==typeof k&&(k=this.getError(k));var N=(0,u.arrayify)(D);return(0,u.hexlify)(N.slice(0,4))!==this.getSighash(k)&&G.throwArgumentError("data signature does not match error ".concat(k.name,"."),"data",(0,u.hexlify)(N)),this._decodeParams(k.inputs,N.slice(4))}},{key:"encodeErrorResult",value:function(k,D){return"string"==typeof k&&(k=this.getError(k)),(0,u.hexlify)((0,u.concat)([this.getSighash(k),this._encodeParams(k.inputs,D||[])]))}},{key:"decodeFunctionData",value:function(k,D){"string"==typeof k&&(k=this.getFunction(k));var N=(0,u.arrayify)(D);return(0,u.hexlify)(N.slice(0,4))!==this.getSighash(k)&&G.throwArgumentError("data signature does not match function ".concat(k.name,"."),"data",(0,u.hexlify)(N)),this._decodeParams(k.inputs,N.slice(4))}},{key:"encodeFunctionData",value:function(k,D){return"string"==typeof k&&(k=this.getFunction(k)),(0,u.hexlify)((0,u.concat)([this.getSighash(k),this._encodeParams(k.inputs,D||[])]))}},{key:"decodeFunctionResult",value:function(k,D){"string"==typeof k&&(k=this.getFunction(k));var N=(0,u.arrayify)(D),C=null,a="",B=null,Q=null,ee=null;switch(N.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(k.outputs,N)}catch{}break;case 4:var ce=(0,u.hexlify)(N.slice(0,4)),ue=o[ce];if(ue)B=this._abiCoder.decode(ue.inputs,N.slice(4)),ee=ue.signature,ue.reason&&(C=B[0]),"Error"===(Q=ue.name)?a="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(B[0])):"Panic"===Q&&(a="; VM Exception while processing transaction: reverted with panic code ".concat(B[0]));else try{var we=this.getError(ce);B=this._abiCoder.decode(we.inputs,N.slice(4)),Q=we.name,ee=we.format()}catch{}}return G.throwError("call revert exception"+a,L.Logger.errors.CALL_EXCEPTION,{method:k.format(),data:(0,u.hexlify)(D),errorArgs:B,errorName:Q,errorSignature:ee,reason:C})}},{key:"encodeFunctionResult",value:function(k,D){return"string"==typeof k&&(k=this.getFunction(k)),(0,u.hexlify)(this._abiCoder.encode(k.outputs,D||[]))}},{key:"encodeFilterTopics",value:function(k,D){var N=this;"string"==typeof k&&(k=this.getEvent(k)),D.length>k.inputs.length&&G.throwError("too many arguments for "+k.format(),L.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:D});var C=[];k.anonymous||C.push(this.getEventTopic(k));var a=function(B,Q){return"string"===B.type?(0,m.id)(Q):"bytes"===B.type?(0,_.keccak256)((0,u.hexlify)(Q)):("bool"===B.type&&"boolean"==typeof Q&&(Q=Q?"0x01":"0x00"),B.type.match(/^u?int/)&&(Q=h.BigNumber.from(Q).toHexString()),"address"===B.type&&N._abiCoder.encode(["address"],[Q]),(0,u.hexZeroPad)((0,u.hexlify)(Q),32))};for(D.forEach(function(B,Q){var ee=k.inputs[Q];ee.indexed?null==B?C.push(null):"array"===ee.baseType||"tuple"===ee.baseType?G.throwArgumentError("filtering with tuples or arrays not supported","contract."+ee.name,B):Array.isArray(B)?C.push(B.map(function(ce){return a(ee,ce)})):C.push(a(ee,B)):null!=B&&G.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+ee.name,B)});C.length&&null===C[C.length-1];)C.pop();return C}},{key:"encodeEventLog",value:function(k,D){var N=this;"string"==typeof k&&(k=this.getEvent(k));var C=[],a=[],B=[];return k.anonymous||C.push(this.getEventTopic(k)),D.length!==k.inputs.length&&G.throwArgumentError("event arguments/values mismatch","values",D),k.inputs.forEach(function(Q,ee){var ce=D[ee];if(Q.indexed)if("string"===Q.type)C.push((0,m.id)(ce));else if("bytes"===Q.type)C.push((0,_.keccak256)(ce));else{if("tuple"===Q.baseType||"array"===Q.baseType)throw new Error("not implemented");C.push(N._abiCoder.encode([Q.type],[ce]))}else a.push(Q),B.push(ce)}),{data:this._abiCoder.encode(a,B),topics:C}}},{key:"decodeEventLog",value:function(k,D,N){if("string"==typeof k&&(k=this.getEvent(k)),null!=N&&!k.anonymous){var C=this.getEventTopic(k);(0,u.isHexString)(N[0],32)&&N[0].toLowerCase()===C||G.throwError("fragment/topic mismatch",L.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:N[0]}),N=N.slice(1)}var a=[],B=[],Q=[];k.inputs.forEach(function(X,ne){X.indexed?"string"===X.type||"bytes"===X.type||"tuple"===X.baseType||"array"===X.baseType?(a.push(P.ParamType.fromObject({type:"bytes32",name:X.name})),Q.push(!0)):(a.push(X),Q.push(!1)):(B.push(X),Q.push(!1))});var ee=null!=N?this._abiCoder.decode(a,(0,u.concat)(N)):null,ce=this._abiCoder.decode(B,D,!0),ue=[],we=0,ae=0;k.inputs.forEach(function(X,ne){if(X.indexed)if(null==ee)ue[ne]=new R({_isIndexed:!0,hash:null});else if(Q[ne])ue[ne]=new R({_isIndexed:!0,hash:ee[ae++]});else try{ue[ne]=ee[ae++]}catch(_e){ue[ne]=_e}else try{ue[ne]=ce[we++]}catch(_e){ue[ne]=_e}if(X.name&&null==ue[X.name]){var pe=ue[ne];pe instanceof Error?Object.defineProperty(ue,X.name,{enumerable:!0,get:function(){throw y("property ".concat(JSON.stringify(X.name)),pe)}}):ue[X.name]=pe}});for(var Te=function(X){var ne=ue[X];ne instanceof Error&&Object.defineProperty(ue,X,{enumerable:!0,get:function(){throw y("index ".concat(X),ne)}})},le=0;le{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="address/5.7.0"},77921:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.getAddress=P,O.getContractAddress=function(L){var V=null;try{V=P(L.from)}catch{l.throwArgumentError("missing from address","transaction",L)}var W=(0,d.stripZeros)((0,d.arrayify)(x.BigNumber.from(L.nonce).toHexString()));return P((0,d.hexDataSlice)((0,f.keccak256)((0,T.encode)([V,W])),12))},O.getCreate2Address=function(L,V,W){return 32!==(0,d.hexDataLength)(V)&&l.throwArgumentError("salt must be 32 bytes","salt",V),32!==(0,d.hexDataLength)(W)&&l.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",W),P((0,d.hexDataSlice)((0,f.keccak256)((0,d.concat)(["0xff",P(L),V,W])),12))},O.getIcapAddress=function(L){for(var V=(0,x._base16To36)(P(L).substring(2)).toUpperCase();V.length<30;)V="0"+V;return"XE"+I("XE00"+V)+V},O.isAddress=function(L){try{return P(L),!0}catch{}return!1};var d=E(908),x=E(34952),f=E(64642),T=E(55265),g=E(64327),b=E(88222),l=new g.Logger(b.version);function h(L){(0,d.isHexString)(L,20)||l.throwArgumentError("invalid address","address",L);for(var V=(L=L.toLowerCase()).substring(2).split(""),W=new Uint8Array(40),G=0;G<40;G++)W[G]=V[G].charCodeAt(0);for(var H=(0,d.arrayify)((0,f.keccak256)(W)),j=0;j<40;j+=2)H[j>>1]>>4>=8&&(V[j]=V[j].toUpperCase()),(15&H[j>>1])>=8&&(V[j+1]=V[j+1].toUpperCase());return"0x"+V.join("")}for(var u={},m=0;m<10;m++)u[String(m)]=String(m);for(var _=0;_<26;_++)u[String.fromCharCode(65+_)]=String(10+_);var w,S=Math.floor((w=9007199254740991,Math.log10?Math.log10(w):Math.log(w)/Math.LN10));function I(L){for(var V=(L=(L=L.toUpperCase()).substring(4)+L.substring(0,2)+"00").split("").map(function(H){return u[H]}).join("");V.length>=S;){var W=V.substring(0,S);V=parseInt(W,10)%97+V.substring(W.length)}for(var G=String(98-parseInt(V,10)%97);G.length<2;)G="0"+G;return G}function P(L){var V=null;if("string"!=typeof L&&l.throwArgumentError("invalid address","address",L),L.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==L.substring(0,2)&&(L="0x"+L),V=h(L),L.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&V!==L&&l.throwArgumentError("bad address checksum","address",L);else if(L.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(L.substring(2,4)!==I(L)&&l.throwArgumentError("bad icap checksum","address",L),V=(0,x._base36To16)(L.substring(4));V.length<40;)V="0"+V;V=h("0x"+V)}else l.throwArgumentError("invalid address","address",L);return V}},75798:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.decode=function(x){x=atob(x);for(var f=[],T=0;T{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"decode",{enumerable:!0,get:function(){return d.decode}}),Object.defineProperty(O,"encode",{enumerable:!0,get:function(){return d.encode}});var d=E(75798)},3042:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="bignumber/5.7.0"},1872:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.BigNumber=void 0,O._base16To36=function(W){return new h(W,16).toString(36)},O._base36To16=function(W){return new h(W,36).toString(16)},O.isBigNumberish=function(W){return null!=W&&(S.isBigNumber(W)||"number"==typeof W&&W%1==0||"string"==typeof W&&!!W.match(/^-?[0-9]+$/)||(0,g.isHexString)(W)||"bigint"==typeof W||(0,g.isBytes)(W))};var x=d(E(69721)),f=d(E(58985)),T=d(E(31734)),g=E(908),b=E(64327),l=E(3042),h=T.default.BN,u=new b.Logger(l.version),m={},_=9007199254740991,w=!1,S=function(){function W(G,H){(0,x.default)(this,W),G!==m&&u.throwError("cannot call constructor directly; use BigNumber.from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=H,this._isBigNumber=!0,Object.freeze(this)}return(0,f.default)(W,[{key:"fromTwos",value:function(G){return P(L(this).fromTwos(G))}},{key:"toTwos",value:function(G){return P(L(this).toTwos(G))}},{key:"abs",value:function(){return"-"===this._hex[0]?W.from(this._hex.substring(1)):this}},{key:"add",value:function(G){return P(L(this).add(L(G)))}},{key:"sub",value:function(G){return P(L(this).sub(L(G)))}},{key:"div",value:function(G){return W.from(G).isZero()&&V("division-by-zero","div"),P(L(this).div(L(G)))}},{key:"mul",value:function(G){return P(L(this).mul(L(G)))}},{key:"mod",value:function(G){var H=L(G);return H.isNeg()&&V("division-by-zero","mod"),P(L(this).umod(H))}},{key:"pow",value:function(G){var H=L(G);return H.isNeg()&&V("negative-power","pow"),P(L(this).pow(H))}},{key:"and",value:function(G){var H=L(G);return(this.isNegative()||H.isNeg())&&V("unbound-bitwise-result","and"),P(L(this).and(H))}},{key:"or",value:function(G){var H=L(G);return(this.isNegative()||H.isNeg())&&V("unbound-bitwise-result","or"),P(L(this).or(H))}},{key:"xor",value:function(G){var H=L(G);return(this.isNegative()||H.isNeg())&&V("unbound-bitwise-result","xor"),P(L(this).xor(H))}},{key:"mask",value:function(G){return(this.isNegative()||G<0)&&V("negative-width","mask"),P(L(this).maskn(G))}},{key:"shl",value:function(G){return(this.isNegative()||G<0)&&V("negative-width","shl"),P(L(this).shln(G))}},{key:"shr",value:function(G){return(this.isNegative()||G<0)&&V("negative-width","shr"),P(L(this).shrn(G))}},{key:"eq",value:function(G){return L(this).eq(L(G))}},{key:"lt",value:function(G){return L(this).lt(L(G))}},{key:"lte",value:function(G){return L(this).lte(L(G))}},{key:"gt",value:function(G){return L(this).gt(L(G))}},{key:"gte",value:function(G){return L(this).gte(L(G))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return L(this).isZero()}},{key:"toNumber",value:function(){try{return L(this).toNumber()}catch{V("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch{}return u.throwError("this platform does not support BigInt",b.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?w||(w=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):u.throwError(16===arguments[0]?"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()":"BigNumber.toString does not accept parameters",b.Logger.errors.UNEXPECTED_ARGUMENT,{})),L(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(G){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(G){if(G instanceof W)return G;if("string"==typeof G)return G.match(/^-?0x[0-9a-f]+$/i)?new W(m,I(G)):G.match(/^-?[0-9]+$/)?new W(m,I(new h(G))):u.throwArgumentError("invalid BigNumber string","value",G);if("number"==typeof G)return G%1&&V("underflow","BigNumber.from",G),(G>=_||G<=-_)&&V("overflow","BigNumber.from",G),W.from(String(G));var H=G;if("bigint"==typeof H)return W.from(H.toString());if((0,g.isBytes)(H))return W.from((0,g.hexlify)(H));if(H)if(H.toHexString){var j=H.toHexString();if("string"==typeof j)return W.from(j)}else{var K=H._hex;if(null==K&&"BigNumber"===H.type&&(K=H.hex),"string"==typeof K&&((0,g.isHexString)(K)||"-"===K[0]&&(0,g.isHexString)(K.substring(1))))return W.from(K)}return u.throwArgumentError("invalid BigNumber value","value",G)}},{key:"isBigNumber",value:function(G){return!(!G||!G._isBigNumber)}}]),W}();function I(W){if("string"!=typeof W)return I(W.toString(16));if("-"===W[0])return"-"===(W=W.substring(1))[0]&&u.throwArgumentError("invalid hex","value",W),"0x00"===(W=I(W))?W:"-"+W;if("0x"!==W.substring(0,2)&&(W="0x"+W),"0x"===W)return"0x00";for(W.length%2&&(W="0x0"+W.substring(2));W.length>4&&"0x00"===W.substring(0,4);)W="0x"+W.substring(4);return W}function P(W){return S.from(I(W))}function L(W){var G=S.from(W).toHexString();return new h("-"===G[0]?"-"+G.substring(3):G.substring(2),16)}function V(W,G,H){var j={fault:W,operation:G};return null!=H&&(j.value=H),u.throwError(W,b.Logger.errors.NUMERIC_FAULT,j)}O.BigNumber=S},68390:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.FixedNumber=O.FixedFormat=void 0,O.formatFixed=L,O.parseFixed=V;var x=d(E(3355)),f=d(E(69721)),T=d(E(58985)),g=E(908),b=E(64327),l=E(3042),h=E(1872),u=new b.Logger(l.version),m={},_=h.BigNumber.from(0),w=h.BigNumber.from(-1);function S(K,R,o,y){var M={fault:R,operation:o};return void 0!==y&&(M.value=y),u.throwError(K,b.Logger.errors.NUMERIC_FAULT,M)}for(var I="0";I.length<256;)I+=I;function P(K){if("number"!=typeof K)try{K=h.BigNumber.from(K).toNumber()}catch{}return"number"==typeof K&&K>=0&&K<=256&&!(K%1)?"1"+I.substring(0,K):u.throwArgumentError("invalid decimal size","decimals",K)}function L(K,R){null==R&&(R=0);var o=P(R),y=(K=h.BigNumber.from(K)).lt(_);y&&(K=K.mul(w));for(var M=K.mod(o).toString();M.length2&&u.throwArgumentError("too many decimal points","value",K);var v=M[0],k=M[1];for(v||(v="0"),k||(k="0");"0"===k[k.length-1];)k=k.substring(0,k.length-1);for(k.length>o.length-1&&S("fractional component exceeds decimals","underflow","parseFixed"),""===k&&(k="0");k.length80&&u.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",M),new K(m,o,y,M)}}]),K}();O.FixedFormat=W;var G=function(){function K(R,o,y,M){(0,f.default)(this,K),R!==m&&u.throwError("cannot use FixedNumber constructor; use FixedNumber.from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=M,this._hex=o,this._value=y,this._isFixedNumber=!0,Object.freeze(this)}return(0,T.default)(K,[{key:"_checkFormat",value:function(R){this.format.name!==R.format.name&&u.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",R)}},{key:"addUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.add(y),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.sub(y),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.mul(y).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.mul(this.format._multiplier).div(y),this.format.decimals,this.format)}},{key:"floor",value:function(){var R=this.toString().split(".");1===R.length&&R.push("0");var o=K.from(R[0],this.format),y=!R[1].match(/^(0*)$/);return this.isNegative()&&y&&(o=o.subUnsafe(H.toFormat(o.format))),o}},{key:"ceiling",value:function(){var R=this.toString().split(".");1===R.length&&R.push("0");var o=K.from(R[0],this.format),y=!R[1].match(/^(0*)$/);return!this.isNegative()&&y&&(o=o.addUnsafe(H.toFormat(o.format))),o}},{key:"round",value:function(R){null==R&&(R=0);var o=this.toString().split(".");if(1===o.length&&o.push("0"),(R<0||R>80||R%1)&&u.throwArgumentError("invalid decimal count","decimals",R),o[1].length<=R)return this;var y=K.from("1"+I.substring(0,R),this.format),M=j.toFormat(this.format);return this.mulUnsafe(y).addUnsafe(M).floor().divUnsafe(y)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(R){if(null==R)return this._hex;R%8&&u.throwArgumentError("invalid byte width","width",R);var o=h.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(R).toHexString();return(0,g.hexZeroPad)(o,R/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(R){return K.fromString(this._value,R)}}],[{key:"fromValue",value:function(R,o,y){return null!=y||null==o||(0,h.isBigNumberish)(o)||(y=o,o=null),null==o&&(o=0),null==y&&(y="fixed"),K.fromString(L(R,o),W.from(y))}},{key:"fromString",value:function(R,o){null==o&&(o="fixed");var y=W.from(o),M=V(R,y.decimals);!y.signed&&M.lt(_)&&S("unsigned value cannot be negative","overflow","value",R);var v=null;y.signed?v=M.toTwos(y.width).toHexString():(v=M.toHexString(),v=(0,g.hexZeroPad)(v,y.width/8));var k=L(M,y.decimals);return new K(m,v,k,y)}},{key:"fromBytes",value:function(R,o){null==o&&(o="fixed");var y=W.from(o);if((0,g.arrayify)(R).length>y.width/8)throw new Error("overflow");var M=h.BigNumber.from(R);y.signed&&(M=M.fromTwos(y.width));var v=M.toTwos((y.signed?0:1)+y.width).toHexString(),k=L(M,y.decimals);return new K(m,v,k,y)}},{key:"from",value:function(R,o){if("string"==typeof R)return K.fromString(R,o);if((0,g.isBytes)(R))return K.fromBytes(R,o);try{return K.fromValue(R,0,o)}catch(y){if(y.code!==b.Logger.errors.INVALID_ARGUMENT)throw y}return u.throwArgumentError("invalid FixedNumber value","value",R)}},{key:"isFixedNumber",value:function(R){return!(!R||!R._isFixedNumber)}}]),K}();O.FixedNumber=G;var H=G.from(1),j=G.from("0.5")},34952:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"BigNumber",{enumerable:!0,get:function(){return d.BigNumber}}),Object.defineProperty(O,"FixedFormat",{enumerable:!0,get:function(){return x.FixedFormat}}),Object.defineProperty(O,"FixedNumber",{enumerable:!0,get:function(){return x.FixedNumber}}),Object.defineProperty(O,"_base16To36",{enumerable:!0,get:function(){return d._base16To36}}),Object.defineProperty(O,"_base36To16",{enumerable:!0,get:function(){return d._base36To16}}),Object.defineProperty(O,"formatFixed",{enumerable:!0,get:function(){return x.formatFixed}}),Object.defineProperty(O,"parseFixed",{enumerable:!0,get:function(){return x.parseFixed}});var d=E(1872),x=E(68390)},8729:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="bytes/5.7.0"},908:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.arrayify=u,O.concat=m,O.hexConcat=function(W){var G="0x";return W.forEach(function(H){G+=I(H).substring(2)}),G},O.hexDataLength=function(W){if("string"!=typeof W)W=I(W);else if(!w(W)||W.length%2)return null;return(W.length-2)/2},O.hexDataSlice=function(W,G,H){return"string"!=typeof W?W=I(W):(!w(W)||W.length%2)&&f.throwArgumentError("invalid hexData","value",W),G=2+2*G,null!=H?"0x"+W.substring(G,2+2*H):"0x"+W.substring(G)},O.hexStripZeros=P,O.hexValue=function(W){var G=P(I(W,{hexPad:"left"}));return"0x"===G?"0x0":G},O.hexZeroPad=L,O.hexlify=I,O.isBytes=h,O.isBytesLike=b,O.isHexString=w,O.joinSignature=function(W){return I(m([(W=V(W)).r,W.s,W.recoveryParam?"0x1c":"0x1b"]))},O.splitSignature=V,O.stripZeros=function(W){var G=u(W);if(0===G.length)return G;for(var H=0;H=256)return!1}return!0}function u(W,G){if(G||(G={}),"number"==typeof W){f.checkSafeUint53(W,"invalid arrayify value");for(var H=[];W;)H.unshift(255&W),W=parseInt(String(W/256));return 0===H.length&&H.push(0),g(new Uint8Array(H))}if(G.allowMissingPrefix&&"string"==typeof W&&"0x"!==W.substring(0,2)&&(W="0x"+W),T(W)&&(W=W.toHexString()),w(W)){var j=W.substring(2);j.length%2&&("left"===G.hexPad?j="0"+j:"right"===G.hexPad?j+="0":f.throwArgumentError("hex data is odd-length","value",W));for(var K=[],R=0;RG&&f.throwArgumentError("value out of range","value",arguments[0]);var H=new Uint8Array(G);return H.set(W,G-W.length),g(H)}function w(W,G){return!("string"!=typeof W||!W.match(/^0x[0-9A-Fa-f]*$/)||G&&W.length!==2+2*G)}var S="0123456789abcdef";function I(W,G){if(G||(G={}),"number"==typeof W){f.checkSafeUint53(W,"invalid hexlify value");for(var H="";W;)H=S[15&W]+H,W=Math.floor(W/16);return H.length?(H.length%2&&(H="0"+H),"0x"+H):"0x00"}if("bigint"==typeof W)return(W=W.toString(16)).length%2?"0x0"+W:"0x"+W;if(G.allowMissingPrefix&&"string"==typeof W&&"0x"!==W.substring(0,2)&&(W="0x"+W),T(W))return W.toHexString();if(w(W))return W.length%2&&("left"===G.hexPad?W="0x0"+W.substring(2):"right"===G.hexPad?W+="0":f.throwArgumentError("hex data is odd-length","value",W)),W.toLowerCase();if(h(W)){for(var j="0x",K=0;K>4]+S[15&R]}return j}return f.throwArgumentError("invalid hexlify value","value",W)}function P(W){"string"!=typeof W&&(W=I(W)),w(W)||f.throwArgumentError("invalid hex string","value",W),W=W.substring(2);for(var G=0;G2*G+2&&f.throwArgumentError("value out of range","value",arguments[1]);W.length<2*G+2;)W="0x0"+W.substring(2);return W}function V(W){var G={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(b(W)){var H=u(W);64===H.length?(G.v=27+(H[32]>>7),H[32]&=127,G.r=I(H.slice(0,32)),G.s=I(H.slice(32,64))):65===H.length?(G.r=I(H.slice(0,32)),G.s=I(H.slice(32,64)),G.v=H[64]):f.throwArgumentError("invalid signature string","signature",W),G.v<27&&(0===G.v||1===G.v?G.v+=27:f.throwArgumentError("signature invalid v byte","signature",W)),G.recoveryParam=1-G.v%2,G.recoveryParam&&(H[32]|=128),G._vs=I(H.slice(32,64))}else{if(G.r=W.r,G.s=W.s,G.v=W.v,G.recoveryParam=W.recoveryParam,G._vs=W._vs,null!=G._vs){var j=_(u(G._vs),32);G._vs=I(j);var K=j[0]>=128?1:0;null==G.recoveryParam?G.recoveryParam=K:G.recoveryParam!==K&&f.throwArgumentError("signature recoveryParam mismatch _vs","signature",W),j[0]&=127;var R=I(j);null==G.s?G.s=R:G.s!==R&&f.throwArgumentError("signature v mismatch _vs","signature",W)}null==G.recoveryParam?null==G.v?f.throwArgumentError("signature missing v and recoveryParam","signature",W):G.recoveryParam=0===G.v||1===G.v?G.v:1-G.v%2:null==G.v?G.v=27+G.recoveryParam:G.recoveryParam!==(0===G.v||1===G.v?G.v:1-G.v%2)&&f.throwArgumentError("signature recoveryParam mismatch v","signature",W),null!=G.r&&w(G.r)?G.r=L(G.r,32):f.throwArgumentError("signature missing or invalid r","signature",W),null!=G.s&&w(G.s)?G.s=L(G.s,32):f.throwArgumentError("signature missing or invalid s","signature",W);var y=u(G.s);y[0]>=128&&f.throwArgumentError("signature s out of range","signature",W),G.recoveryParam&&(y[0]|=128);var M=I(y);G._vs&&(w(G._vs)||f.throwArgumentError("signature invalid _vs","signature",W),G._vs=L(G._vs,32)),null==G._vs?G._vs=M:G._vs!==M&&f.throwArgumentError("signature _vs mismatch v and s","signature",W)}return G.yParityAndS=G._vs,G.compact=G.r+G.yParityAndS.substring(2),G}},48721:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.AddressZero=void 0,O.AddressZero="0x0000000000000000000000000000000000000000"},22997:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.Zero=O.WeiPerEther=O.Two=O.One=O.NegativeOne=O.MinInt256=O.MaxUint256=O.MaxInt256=void 0;var d=E(34952),x=d.BigNumber.from(-1);O.NegativeOne=x;var f=d.BigNumber.from(0);O.Zero=f;var T=d.BigNumber.from(1);O.One=T;var g=d.BigNumber.from(2);O.Two=g;var b=d.BigNumber.from("1000000000000000000");O.WeiPerEther=b;var l=d.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");O.MaxUint256=l;var h=d.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");O.MinInt256=h;var u=d.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");O.MaxInt256=u},90396:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.HashZero=void 0,O.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},5465:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"AddressZero",{enumerable:!0,get:function(){return d.AddressZero}}),Object.defineProperty(O,"EtherSymbol",{enumerable:!0,get:function(){return T.EtherSymbol}}),Object.defineProperty(O,"HashZero",{enumerable:!0,get:function(){return f.HashZero}}),Object.defineProperty(O,"MaxInt256",{enumerable:!0,get:function(){return x.MaxInt256}}),Object.defineProperty(O,"MaxUint256",{enumerable:!0,get:function(){return x.MaxUint256}}),Object.defineProperty(O,"MinInt256",{enumerable:!0,get:function(){return x.MinInt256}}),Object.defineProperty(O,"NegativeOne",{enumerable:!0,get:function(){return x.NegativeOne}}),Object.defineProperty(O,"One",{enumerable:!0,get:function(){return x.One}}),Object.defineProperty(O,"Two",{enumerable:!0,get:function(){return x.Two}}),Object.defineProperty(O,"WeiPerEther",{enumerable:!0,get:function(){return x.WeiPerEther}}),Object.defineProperty(O,"Zero",{enumerable:!0,get:function(){return x.Zero}});var d=E(48721),x=E(22997),f=E(90396),T=E(68347)},68347:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.EtherSymbol=void 0,O.EtherSymbol="\u039e"},33989:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="hash/5.7.0"},33731:(z,O)=>{"use strict";function E(_,w){null==w&&(w=1);var S=[],I=S.forEach;return function P(L,V){I.call(L,function(W){V>0&&Array.isArray(W)?P(W,V-1):S.push(W)})}(_,w),S}function d(_){var w=0;function S(){return _[w++]<<8|_[w++]}for(var I=S(),P=1,L=[0,1],V=1;V>--H&1}for(var R=Math.pow(2,31),o=R>>>1,y=o>>1,M=R-1,v=0,k=0;k<31;k++)v=v<<1|K();for(var D=[],N=0,C=R;;){for(var a=Math.floor(((v-N+1)*P-1)/C),B=0,Q=I;Q-B>1;){var ee=B+Q>>>1;a>>1|K(),ce=ce<<1^o,ue=(ue^o)<<1|o|1;N=ce,C=1+ue-ce}var we=I-4;return D.map(function(ae){switch(ae-we){case 3:return we+65792+(_[G++]<<16|_[G++]<<8|_[G++]);case 2:return we+256+(_[G++]<<8|_[G++]);case 1:return we+_[G++];default:return ae-1}})}function x(_){var w=0;return function(){return _[w++]}}function f(_){return 1&_?~_>>1:_>>1}function T(_,w){for(var S=Array(_),I=0,P=-1;I<_;I++)S[I]=P+=1+w();return S}function g(_,w){for(var S=Array(_),I=0,P=0;I<_;I++)S[I]=P+=f(w());return S}function b(_,w){for(var S=T(_(),_),I=_(),P=T(I,_),L=function(G,H){for(var j=Array(G),K=0;K>=1),check:2==L}}()},O.read_mapped_map=function(_){for(var w=[];;){var S=_();if(0==S)break;w.push(u(S,_))}for(;;){var I=_()-1;if(I<0)break;w.push(m(I,_))}return function(P){for(var L={},V=0;V{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.getData=function(){return(0,x.read_compressed_payload)((0,d.decode)("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=="))};var d=E(80997),x=E(33731)},17032:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.ens_normalize=function(W){return L(function(G,H){for(var j=I(G).reverse(),K=[];j.length;){var R=V(j);if(R)K.push.apply(K,(0,x.default)(H(R)));else{var o=j.pop();if(h.has(o))K.push(o);else if(!u.has(o)){var y=m[o];if(!y)throw new Error("Disallowed codepoint: 0x".concat(o.toString(16).toUpperCase()));K.push.apply(K,(0,x.default)(y))}}}return L(String.fromCodePoint.apply(String,K).normalize("NFC"))}(W,P))},O.ens_normalize_post_check=L;var x=d(E(93106)),f=E(78627),T=E(63961),g=E(33731);function b(W,G){(null==G||G>W.length)&&(G=W.length);for(var H=0,j=new Array(G);H=o.length?{done:!0}:{done:!1,value:o[v++]}},e:function(a){throw a},f:k}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var D,N=!0,C=!1;return{s:function(){M=M.call(o)},n:function(){var a=M.next();return N=a.done,a},e:function(a){C=!0,D=a},f:function(){try{N||null==M.return||M.return()}finally{if(C)throw D}}}}(W.split("."));try{for(H.s();!(G=H.n()).done;){var j=G.value,K=I(j);try{for(var R=K.lastIndexOf(95)-1;R>=0;R--)if(95!==K[R])throw new Error("underscore only allowed at start");if(K.length>=4&&K.every(function(o){return o<128})&&45===K[2]&&45===K[3])throw new Error("invalid label extension")}catch(o){throw new Error('Invalid label "'.concat(j,'": ').concat(o.message))}}}catch(o){H.e(o)}finally{H.f()}return W}function V(W,G){var H,j,K,R=_,o=[],y=W.length;G&&(G.length=0);for(var M=function(){var v=W[--y];if(!(R=null===(H=R.branches.find(function(k){return k.set.has(v)}))||void 0===H?void 0:H.node))return"break";if(R.save)K=v;else if(R.check&&v===K)return"break";o.push(v),R.fe0f&&(o.push(65039),y>0&&65039==W[y-1]&&y--),R.valid&&(j=o.slice(),2==R.valid&&j.splice(1,1),G&&G.push.apply(G,(0,x.default)(W.slice(y).reverse())),W.length=y)};y&&"break"!==M(););return j}},57901:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.id=function(f){return(0,d.keccak256)((0,x.toUtf8Bytes)(f))};var d=E(64642),x=E(78627)},37515:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"_TypedDataEncoder",{enumerable:!0,get:function(){return T.TypedDataEncoder}}),Object.defineProperty(O,"dnsEncode",{enumerable:!0,get:function(){return x.dnsEncode}}),Object.defineProperty(O,"ensNormalize",{enumerable:!0,get:function(){return x.ensNormalize}}),Object.defineProperty(O,"hashMessage",{enumerable:!0,get:function(){return f.hashMessage}}),Object.defineProperty(O,"id",{enumerable:!0,get:function(){return d.id}}),Object.defineProperty(O,"isValidName",{enumerable:!0,get:function(){return x.isValidName}}),Object.defineProperty(O,"messagePrefix",{enumerable:!0,get:function(){return f.messagePrefix}}),Object.defineProperty(O,"namehash",{enumerable:!0,get:function(){return x.namehash}});var d=E(57901),x=E(84898),f=E(34443),T=E(12171)},34443:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.hashMessage=function(g){return"string"==typeof g&&(g=(0,f.toUtf8Bytes)(g)),(0,x.keccak256)((0,d.concat)([(0,f.toUtf8Bytes)(T),(0,f.toUtf8Bytes)(String(g.length)),g]))},O.messagePrefix=void 0;var d=E(908),x=E(64642),f=E(78627),T="\x19Ethereum Signed Message:\n";O.messagePrefix=T},84898:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.dnsEncode=function(_){return(0,d.hexlify)((0,d.concat)(m(_).map(function(w){if(w.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var S=new Uint8Array(w.length+1);return S.set(w,1),S[0]=S.length-1,S})))+"00"},O.ensNormalize=function(_){return m(_).map(function(w){return(0,x.toUtf8String)(w)}).join(".")},O.isValidName=function(_){try{return 0!==m(_).length}catch{}return!1},O.namehash=function(_){"string"!=typeof _&&l.throwArgumentError("invalid ENS name; not a string","name",_);for(var w=h,S=m(_);S.length;)w=(0,f.keccak256)((0,d.concat)([w,(0,f.keccak256)(S.pop())]));return(0,d.hexlify)(w)};var d=E(908),x=E(78627),f=E(64642),T=E(64327),g=E(33989),b=E(17032),l=new T.Logger(g.version),h=new Uint8Array(32);function u(_){if(0===_.length)throw new Error("invalid ENS name; empty component");return _}function m(_){var w=(0,x.toUtf8Bytes)((0,b.ens_normalize)(_)),S=[];if(0===_.length)return S;for(var I=0,P=0;P=w.length)throw new Error("invalid ENS name; empty component");return S.push(u(w.slice(I))),S}h.fill(0)},12171:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.TypedDataEncoder=void 0;var x=d(E(82247)),f=d(E(69721)),T=d(E(58985)),g=E(77921),b=E(34952),l=E(908),h=E(64642),u=E(23694),m=E(64327),_=E(33989),w=E(57901),S=new m.Logger(_.version),I=new Uint8Array(32);I.fill(0);var P=b.BigNumber.from(-1),L=b.BigNumber.from(0),V=b.BigNumber.from(1),W=b.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),G=(0,l.hexZeroPad)(V.toHexString(),32),H=(0,l.hexZeroPad)(L.toHexString(),32),j={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},K=["name","version","chainId","verifyingContract","salt"];function R(k){return function(D){return"string"!=typeof D&&S.throwArgumentError("invalid domain value for ".concat(JSON.stringify(k)),"domain.".concat(k),D),D}}var o={name:R("name"),version:R("version"),chainId:function(k){try{return b.BigNumber.from(k).toString()}catch{}return S.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",k)},verifyingContract:function(k){try{return(0,g.getAddress)(k).toLowerCase()}catch{}return S.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",k)},salt:function(k){try{var D=(0,l.arrayify)(k);if(32!==D.length)throw new Error("bad length");return(0,l.hexlify)(D)}catch{}return S.throwArgumentError('invalid domain value "salt"',"domain.salt",k)}};function y(k){var D=k.match(/^(u?)int(\d*)$/);if(D){var N=""===D[1],C=parseInt(D[2]||"256");(C%8!=0||C>256||D[2]&&D[2]!==String(C))&&S.throwArgumentError("invalid numeric width","type",k);var a=W.mask(N?C-1:C),B=N?a.add(V).mul(P):L;return function(ce){var ue=b.BigNumber.from(ce);return(ue.lt(B)||ue.gt(a))&&S.throwArgumentError("value out-of-bounds for ".concat(k),"value",ce),(0,l.hexZeroPad)(ue.toTwos(256).toHexString(),32)}}var Q=k.match(/^bytes(\d+)$/);if(Q){var ee=parseInt(Q[1]);return(0===ee||ee>32||Q[1]!==String(ee))&&S.throwArgumentError("invalid bytes width","type",k),function(ce){return(0,l.arrayify)(ce).length!==ee&&S.throwArgumentError("invalid length for ".concat(k),"value",ce),(ae=(we=(0,l.arrayify)(ce)).length%32)?(0,l.hexConcat)([we,I.slice(ae)]):(0,l.hexlify)(we);var we,ae}}switch(k){case"address":return function(ce){return(0,l.hexZeroPad)((0,g.getAddress)(ce),32)};case"bool":return function(ce){return ce?G:H};case"bytes":return function(ce){return(0,h.keccak256)(ce)};case"string":return function(ce){return(0,w.id)(ce)}}return null}function M(k,D){return"".concat(k,"(").concat(D.map(function(N){return N.type+" "+N.name}).join(","),")")}var v=function(){function k(D){(0,f.default)(this,k),(0,u.defineReadOnly)(this,"types",Object.freeze((0,u.deepCopy)(D))),(0,u.defineReadOnly)(this,"_encoderCache",{}),(0,u.defineReadOnly)(this,"_types",{});var N={},C={},a={};Object.keys(D).forEach(function(we){N[we]={},C[we]=[],a[we]={}});var B=function(we){var ae={};D[we].forEach(function(Te){ae[Te.name]&&S.throwArgumentError("duplicate variable name ".concat(JSON.stringify(Te.name)," in ").concat(JSON.stringify(we)),"types",D),ae[Te.name]=!0;var le=Te.type.match(/^([^\x5b]*)(\x5b|$)/)[1];le===we&&S.throwArgumentError("circular type reference to ".concat(JSON.stringify(le)),"types",D),y(le)||(C[le]||S.throwArgumentError("unknown type ".concat(JSON.stringify(le)),"types",D),C[le].push(we),N[we][le]=!0)})};for(var Q in D)B(Q);var ee=Object.keys(C).filter(function(we){return 0===C[we].length});for(var ce in 0===ee.length?S.throwArgumentError("missing primary type","types",D):ee.length>1&&S.throwArgumentError("ambiguous primary types or unused types: ".concat(ee.map(function(we){return JSON.stringify(we)}).join(", ")),"types",D),(0,u.defineReadOnly)(this,"primaryType",ee[0]),function we(ae,Te){Te[ae]&&S.throwArgumentError("circular type reference to ".concat(JSON.stringify(ae)),"types",D),Te[ae]=!0,Object.keys(N[ae]).forEach(function(le){C[le]&&(we(le,Te),Object.keys(Te).forEach(function(X){a[X][le]=!0}))}),delete Te[ae]}(this.primaryType,{}),a){var ue=Object.keys(a[ce]);ue.sort(),this._types[ce]=M(ce,D[ce])+ue.map(function(we){return M(we,D[we])}).join("")}}return(0,T.default)(k,[{key:"getEncoder",value:function(D){var N=this._encoderCache[D];return N||(N=this._encoderCache[D]=this._getEncoder(D)),N}},{key:"_getEncoder",value:function(D){var N=this,C=y(D);if(C)return C;var a=D.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){var B=a[1],Q=this.getEncoder(B),ee=parseInt(a[3]);return function(we){ee>=0&&we.length!==ee&&S.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",we);var ae=we.map(Q);return N._types[B]&&(ae=ae.map(h.keccak256)),(0,h.keccak256)((0,l.hexConcat)(ae))}}var ce=this.types[D];if(ce){var ue=(0,w.id)(this._types[D]);return function(we){var ae=ce.map(function(Te){var le=Te.name,X=Te.type,ne=N.getEncoder(X)(we[le]);return N._types[X]?(0,h.keccak256)(ne):ne});return ae.unshift(ue),(0,l.hexConcat)(ae)}}return S.throwArgumentError("unknown type: ".concat(D),"type",D)}},{key:"encodeType",value:function(D){var N=this._types[D];return N||S.throwArgumentError("unknown type: ".concat(JSON.stringify(D)),"name",D),N}},{key:"encodeData",value:function(D,N){return this.getEncoder(D)(N)}},{key:"hashStruct",value:function(D,N){return(0,h.keccak256)(this.encodeData(D,N))}},{key:"encode",value:function(D){return this.encodeData(this.primaryType,D)}},{key:"hash",value:function(D){return this.hashStruct(this.primaryType,D)}},{key:"_visit",value:function(D,N,C){var a=this;if(y(D))return C(D,N);var B=D.match(/^(.*)(\x5b(\d*)\x5d)$/);if(B){var Q=B[1],ee=parseInt(B[3]);return ee>=0&&N.length!==ee&&S.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",N),N.map(function(ue){return a._visit(Q,ue,C)})}var ce=this.types[D];return ce?ce.reduce(function(ue,we){var ae=we.name;return ue[ae]=a._visit(we.type,N[ae],C),ue},{}):S.throwArgumentError("unknown type: ".concat(D),"type",D)}},{key:"visit",value:function(D,N){return this._visit(this.primaryType,D,N)}}],[{key:"from",value:function(D){return new k(D)}},{key:"getPrimaryType",value:function(D){return k.from(D).primaryType}},{key:"hashStruct",value:function(D,N,C){return k.from(N).hashStruct(D,C)}},{key:"hashDomain",value:function(D){var N=[];for(var C in D){var a=j[C];a||S.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(C)),"domain",D),N.push({name:C,type:a})}return N.sort(function(B,Q){return K.indexOf(B.name)-K.indexOf(Q.name)}),k.hashStruct("EIP712Domain",{EIP712Domain:N},D)}},{key:"encode",value:function(D,N,C){return(0,l.hexConcat)(["0x1901",k.hashDomain(D),k.from(N).hash(C)])}},{key:"hash",value:function(D,N,C){return(0,h.keccak256)(k.encode(D,N,C))}},{key:"resolveNames",value:function(D,N,C,a){return B=this,ee=void 0,ce=x.default.mark(function ue(){var we,ae,Te;return x.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:D=(0,u.shallowCopy)(D),we={},D.verifyingContract&&!(0,l.isHexString)(D.verifyingContract,20)&&(we[D.verifyingContract]="0x"),(ae=k.from(N)).visit(C,function(X,ne){return"address"!==X||(0,l.isHexString)(ne,20)||(we[ne]="0x"),ne}),le.t0=x.default.keys(we);case 6:if((le.t1=le.t0()).done){le.next=13;break}return Te=le.t1.value,le.next=10,a(Te);case 10:we[Te]=le.sent,le.next=6;break;case 13:return D.verifyingContract&&we[D.verifyingContract]&&(D.verifyingContract=we[D.verifyingContract]),C=ae.visit(C,function(X,ne){return"address"===X&&we[ne]?we[ne]:ne}),le.abrupt("return",{domain:D,value:C});case 16:case"end":return le.stop()}},ue)}),new(ee||(ee=Promise))(function(ue,we){function ae(X){try{le(ce.next(X))}catch(ne){we(ne)}}function Te(X){try{le(ce.throw(X))}catch(ne){we(ne)}}function le(X){var ne;X.done?ue(X.value):(ne=X.value,ne instanceof ee?ne:new ee(function(pe){pe(ne)})).then(ae,Te)}le((ce=ce.apply(B,[])).next())});var B,ee,ce}},{key:"getPayload",value:function(D,N,C){k.hashDomain(D);var a={},B=[];K.forEach(function(ce){var ue=D[ce];null!=ue&&(a[ce]=o[ce](ue),B.push({name:ce,type:j[ce]}))});var Q=k.from(N),ee=(0,u.shallowCopy)(N);return ee.EIP712Domain?S.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",N):ee.EIP712Domain=B,Q.encode(C),{types:ee,domain:a,primaryType:Q.primaryType,message:Q.visit(C,function(ce,ue){if(ce.match(/^bytes(\d*)/))return(0,l.hexlify)((0,l.arrayify)(ue));if(ce.match(/^u?int/))return b.BigNumber.from(ue).toString();switch(ce){case"address":return ue.toLowerCase();case"bool":return!!ue;case"string":return"string"!=typeof ue&&S.throwArgumentError("invalid string","value",ue),ue}return S.throwArgumentError("unsupported type","type",ce)})}}}]),k}();O.TypedDataEncoder=v},64642:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.keccak256=function(T){return"0x"+x.default.keccak_256((0,f.arrayify)(T))};var x=d(E(95975)),f=E(908)},95975:(z,O,E)=>{"use strict";z=E.nmd(z);var d,x=E(19142),f=E(28847)(E(3355));!function(){var T="input is invalid type",g="object"===("undefined"==typeof window?"undefined":(0,f.default)(window)),b=g?window:{};b.JS_SHA3_NO_WINDOW&&(g=!1);var l=!g&&"object"===("undefined"==typeof self?"undefined":(0,f.default)(self));!b.JS_SHA3_NO_NODE_JS&&"object"===(void 0===x?"undefined":(0,f.default)(x))&&x.versions&&x.versions.node?b=E.g:l&&(b=self);var h=!b.JS_SHA3_NO_COMMON_JS&&"object"===(0,f.default)(z)&&z.exports,u=E.amdO,m=!b.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,_="0123456789abcdef".split(""),w=[4,1024,262144,67108864],S=[0,8,16,24],I=[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],P=[224,256,384,512],L=[128,256],V=["hex","buffer","arrayBuffer","array","digest"],W={128:168,256:136};!b.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(ue){return"[object Array]"===Object.prototype.toString.call(ue)}),!m||!b.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(ue){return"object"===(0,f.default)(ue)&&ue.buffer&&ue.buffer.constructor===ArrayBuffer});for(var G=function(ue,we,ae){return function(Te){return new Q(ue,we,ue).update(Te)[ae]()}},H=function(ue,we,ae){return function(Te,le){return new Q(ue,we,le).update(Te)[ae]()}},j=function(ue,we,ae){return function(Te,le,X,ne){return M["cshake"+ue].update(Te,le,X,ne)[ae]()}},K=function(ue,we,ae){return function(Te,le,X,ne){return M["kmac"+ue].update(Te,le,X,ne)[ae]()}},R=function(ue,we,ae,Te){for(var le=0;le>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(31&ae)>>3;for(var Te=0;Te<50;++Te)this.s[Te]=0}function ee(ue,we,ae){Q.call(this,ue,we,ae)}Q.prototype.update=function(ue){if(this.finalized)throw new Error("finalize already called");var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}for(var Te,le,X=this.blocks,ne=this.byteCount,pe=ue.length,_e=this.blockCount,xe=0,Ce=this.s;xe>2]|=ue[xe]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|63&le)<=57344?(X[Te>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<=ne){for(this.start=Te-ne,this.block=X[_e],Te=0;Te<_e;++Te)Ce[Te]^=X[Te];ce(Ce),this.reset=!0}else this.start=Te}return this},Q.prototype.encode=function(ue,we){var ae=255&ue,Te=1,le=[ae];for(ae=255&(ue>>=8);ae>0;)le.unshift(ae),ae=255&(ue>>=8),++Te;return we?le.push(Te):le.unshift(Te),this.update(le),le.length},Q.prototype.encodeString=function(ue){var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}var Te=0;if(we)Te=ue.length;else for(var X=0;X=57344?Te+=3:(ne=65536+((1023&ne)<<10|1023&ue.charCodeAt(++X)),Te+=4)}return Te+=this.encode(8*Te),this.update(ue),Te},Q.prototype.bytepad=function(ue,we){for(var ae=this.encode(we),Te=0;Te>2]|=this.padding[3&we],this.lastByteIndex===this.byteCount)for(ue[0]=ue[ae],we=1;we>4&15]+_[15&ue]+_[ue>>12&15]+_[ue>>8&15]+_[ue>>20&15]+_[ue>>16&15]+_[ue>>28&15]+_[ue>>24&15];ne%we==0&&(ce(ae),X=0)}return le&&(pe+=_[(ue=ae[X])>>4&15]+_[15&ue],le>1&&(pe+=_[ue>>12&15]+_[ue>>8&15]),le>2&&(pe+=_[ue>>20&15]+_[ue>>16&15])),pe},Q.prototype.buffer=Q.prototype.arrayBuffer=function(){this.finalize();var ue,we=this.blockCount,ae=this.s,Te=this.outputBlocks,le=this.extraBytes,X=0,ne=0,pe=this.outputBits>>3;ue=le?new ArrayBuffer(Te+1<<2):new ArrayBuffer(pe);for(var _e=new Uint32Array(ue);ne>8&255,_e[ue+2]=we>>16&255,_e[ue+3]=we>>24&255;pe%ae==0&&ce(Te)}return X&&(_e[ue=pe<<2]=255&(we=Te[ne]),X>1&&(_e[ue+1]=we>>8&255),X>2&&(_e[ue+2]=we>>16&255)),_e},(ee.prototype=new Q).finalize=function(){return this.encode(this.outputBits,!0),Q.prototype.finalize.call(this)};var ce=function(ue){var we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Yr,Ln,Bn,$r,Gn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn,Qn,Vi,ar,br,ki,ur,mr,Fr,hi,wi,cs,$i,rs,Xi;for(Te=0;Te<48;Te+=2)le=ue[0]^ue[10]^ue[20]^ue[30]^ue[40],X=ue[1]^ue[11]^ue[21]^ue[31]^ue[41],_e=ue[4]^ue[14]^ue[24]^ue[34]^ue[44],xe=ue[5]^ue[15]^ue[25]^ue[35]^ue[45],Ce=ue[6]^ue[16]^ue[26]^ue[36]^ue[46],ke=ue[7]^ue[17]^ue[27]^ue[37]^ue[47],we=(me=ue[8]^ue[18]^ue[28]^ue[38]^ue[48])^((ne=ue[2]^ue[12]^ue[22]^ue[32]^ue[42])<<1|(pe=ue[3]^ue[13]^ue[23]^ue[33]^ue[43])>>>31),ae=(Ee=ue[9]^ue[19]^ue[29]^ue[39]^ue[49])^(pe<<1|ne>>>31),ue[0]^=we,ue[1]^=ae,ue[10]^=we,ue[11]^=ae,ue[20]^=we,ue[21]^=ae,ue[30]^=we,ue[31]^=ae,ue[40]^=we,ue[41]^=ae,ae=X^(xe<<1|_e>>>31),ue[2]^=we=le^(_e<<1|xe>>>31),ue[3]^=ae,ue[12]^=we,ue[13]^=ae,ue[22]^=we,ue[23]^=ae,ue[32]^=we,ue[33]^=ae,ue[42]^=we,ue[43]^=ae,ae=pe^(ke<<1|Ce>>>31),ue[4]^=we=ne^(Ce<<1|ke>>>31),ue[5]^=ae,ue[14]^=we,ue[15]^=ae,ue[24]^=we,ue[25]^=ae,ue[34]^=we,ue[35]^=ae,ue[44]^=we,ue[45]^=ae,ae=xe^(Ee<<1|me>>>31),ue[6]^=we=_e^(me<<1|Ee>>>31),ue[7]^=ae,ue[16]^=we,ue[17]^=ae,ue[26]^=we,ue[27]^=ae,ue[36]^=we,ue[37]^=ae,ue[46]^=we,ue[47]^=ae,ae=ke^(X<<1|le>>>31),ue[8]^=we=Ce^(le<<1|X>>>31),ue[9]^=ae,ue[18]^=we,ue[19]^=ae,ue[28]^=we,ue[29]^=ae,ue[38]^=we,ue[39]^=ae,ue[48]^=we,ue[49]^=ae,Ve=ue[1],Un=ue[11]<<4|ue[10]>>>28,ir=ue[10]<<4|ue[11]>>>28,Nt=ue[20]<<3|ue[21]>>>29,It=ue[21]<<3|ue[20]>>>29,cs=ue[31]<<9|ue[30]>>>23,$i=ue[30]<<9|ue[31]>>>23,Lr=ue[40]<<18|ue[41]>>>14,Kn=ue[41]<<18|ue[40]>>>14,fn=ue[2]<<1|ue[3]>>>31,$n=ue[3]<<1|ue[2]>>>31,tt=ue[12]<<12|ue[13]>>>20,ts=ue[22]<<10|ue[23]>>>22,Tn=ue[23]<<10|ue[22]>>>22,qt=ue[33]<<13|ue[32]>>>19,jt=ue[32]<<13|ue[33]>>>19,rs=ue[42]<<2|ue[43]>>>30,Xi=ue[43]<<2|ue[42]>>>30,ki=ue[5]<<30|ue[4]>>>2,ur=ue[4]<<30|ue[5]>>>2,Yr=ue[14]<<6|ue[15]>>>26,Ln=ue[15]<<6|ue[14]>>>26,ht=ue[24]<<11|ue[25]>>>21,Qn=ue[34]<<15|ue[35]>>>17,Vi=ue[35]<<15|ue[34]>>>17,Yt=ue[45]<<29|ue[44]>>>3,Wn=ue[44]<<29|ue[45]>>>3,gt=ue[6]<<28|ue[7]>>>4,St=ue[7]<<28|ue[6]>>>4,mr=ue[17]<<23|ue[16]>>>9,Fr=ue[16]<<23|ue[17]>>>9,Bn=ue[26]<<25|ue[27]>>>7,$r=ue[27]<<25|ue[26]>>>7,wt=ue[36]<<21|ue[37]>>>11,Pt=ue[37]<<21|ue[36]>>>11,ar=ue[47]<<24|ue[46]>>>8,br=ue[46]<<24|ue[47]>>>8,sr=ue[8]<<27|ue[9]>>>5,Ii=ue[9]<<27|ue[8]>>>5,Wt=ue[18]<<20|ue[19]>>>12,dn=ue[19]<<20|ue[18]>>>12,hi=ue[29]<<7|ue[28]>>>25,wi=ue[28]<<7|ue[29]>>>25,Gn=ue[38]<<8|ue[39]>>>24,bn=ue[39]<<8|ue[38]>>>24,st=ue[48]<<14|ue[49]>>>18,Ye=ue[49]<<14|ue[48]>>>18,ue[0]=(ze=ue[0])^~(nt=ue[13]<<12|ue[12]>>>20)&(mt=ue[25]<<11|ue[24]>>>21),ue[1]=Ve^~tt&ht,ue[10]=gt^~Wt&Nt,ue[11]=St^~dn&It,ue[20]=fn^~Yr&Bn,ue[21]=$n^~Ln&$r,ue[30]=sr^~Un&ts,ue[31]=Ii^~ir&Tn,ue[40]=ki^~mr&hi,ue[41]=ur^~Fr&wi,ue[2]=nt^~mt&wt,ue[3]=tt^~ht&Pt,ue[12]=Wt^~Nt&qt,ue[13]=dn^~It&jt,ue[22]=Yr^~Bn&Gn,ue[23]=Ln^~$r&bn,ue[32]=Un^~ts&Qn,ue[33]=ir^~Tn&Vi,ue[42]=mr^~hi&cs,ue[43]=Fr^~wi&$i,ue[4]=mt^~wt&st,ue[5]=ht^~Pt&Ye,ue[14]=Nt^~qt&Yt,ue[15]=It^~jt&Wn,ue[24]=Bn^~Gn&Lr,ue[25]=$r^~bn&Kn,ue[34]=ts^~Qn&ar,ue[35]=Tn^~Vi&br,ue[44]=hi^~cs&rs,ue[45]=wi^~$i&Xi,ue[6]=wt^~st&ze,ue[7]=Pt^~Ye&Ve,ue[16]=qt^~Yt>,ue[17]=jt^~Wn&St,ue[26]=Gn^~Lr&fn,ue[27]=bn^~Kn&$n,ue[36]=Qn^~ar&sr,ue[37]=Vi^~br&Ii,ue[46]=cs^~rs&ki,ue[47]=$i^~Xi&ur,ue[8]=st^~ze&nt,ue[9]=Ye^~Ve&tt,ue[18]=Yt^~gt&Wt,ue[19]=Wn^~St&dn,ue[28]=Lr^~fn&Yr,ue[29]=Kn^~$n&Ln,ue[38]=ar^~sr&Un,ue[39]=br^~Ii&ir,ue[48]=rs^~ki&mr,ue[49]=Xi^~ur&Fr,ue[0]^=I[Te],ue[1]^=I[Te+1]};if(h)z.exports=M;else{for(k=0;k{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="logger/5.7.0"},64327:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.Logger=O.LogLevel=O.ErrorCode=void 0;var x,f,P,T=d(E(69721)),g=d(E(58985)),b=E(37252),l=!1,h=!1,u={debug:1,default:2,info:2,warning:3,error:4,off:5},m=u.default,_=null,w=function(){try{var P=[];if(["NFD","NFC","NFKD","NFKC"].forEach(function(L){try{if("test"!=="test".normalize(L))throw new Error("bad normalize")}catch{P.push(L)}}),P.length)throw new Error("missing "+P.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(L){return L.message}return null}();O.LogLevel=x,(P=x||(O.LogLevel=x={})).DEBUG="DEBUG",P.INFO="INFO",P.WARNING="WARNING",P.ERROR="ERROR",P.OFF="OFF",O.ErrorCode=f,function(P){P.UNKNOWN_ERROR="UNKNOWN_ERROR",P.NOT_IMPLEMENTED="NOT_IMPLEMENTED",P.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",P.NETWORK_ERROR="NETWORK_ERROR",P.SERVER_ERROR="SERVER_ERROR",P.TIMEOUT="TIMEOUT",P.BUFFER_OVERRUN="BUFFER_OVERRUN",P.NUMERIC_FAULT="NUMERIC_FAULT",P.MISSING_NEW="MISSING_NEW",P.INVALID_ARGUMENT="INVALID_ARGUMENT",P.MISSING_ARGUMENT="MISSING_ARGUMENT",P.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",P.CALL_EXCEPTION="CALL_EXCEPTION",P.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",P.NONCE_EXPIRED="NONCE_EXPIRED",P.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",P.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",P.TRANSACTION_REPLACED="TRANSACTION_REPLACED",P.ACTION_REJECTED="ACTION_REJECTED"}(f||(O.ErrorCode=f={}));var S="0123456789abcdef",I=function(){function P(L){(0,T.default)(this,P),Object.defineProperty(this,"version",{enumerable:!0,value:L,writable:!1})}return(0,g.default)(P,[{key:"_log",value:function(L,V){var W=L.toLowerCase();null==u[W]&&this.throwArgumentError("invalid log level name","logLevel",L),m>u[W]||console.log.apply(console,V)}},{key:"debug",value:function(){for(var L=arguments.length,V=new Array(L),W=0;W>4],M+=S[15&y[v]];G.push(o+"=Uint8Array(0x"+M+")")}else G.push(o+"="+JSON.stringify(y))}catch{G.push(o+"="+JSON.stringify(W[o].toString()))}}),G.push("code=".concat(V)),G.push("version=".concat(this.version));var H=L,j="";switch(V){case f.NUMERIC_FAULT:j="NUMERIC_FAULT";var K=L;switch(K){case"overflow":case"underflow":case"division-by-zero":j+="-"+K;break;case"negative-power":case"negative-width":j+="-unsupported";break;case"unbound-bitwise-result":j+="-unbound-result"}break;case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:j=V}j&&(L+=" [ See: https://links.ethers.org/v5-errors-"+j+" ]"),G.length&&(L+=" ("+G.join(", ")+")");var R=new Error(L);return R.reason=H,R.code=V,Object.keys(W).forEach(function(o){R[o]=W[o]}),R}},{key:"throwError",value:function(L,V,W){throw this.makeError(L,V,W)}},{key:"throwArgumentError",value:function(L,V,W){return this.throwError(L,P.errors.INVALID_ARGUMENT,{argument:V,value:W})}},{key:"assert",value:function(L,V,W,G){L||this.throwError(V,W,G)}},{key:"assertArgument",value:function(L,V,W,G){L||this.throwArgumentError(V,W,G)}},{key:"checkNormalize",value:function(L){null==L&&(L="platform missing String.prototype.normalize"),w&&this.throwError("platform missing String.prototype.normalize",P.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:w})}},{key:"checkSafeUint53",value:function(L,V){"number"==typeof L&&(null==V&&(V="value not safe"),(L<0||L>=9007199254740991)&&this.throwError(V,P.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:L}),L%1&&this.throwError(V,P.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:L}))}},{key:"checkArgumentCount",value:function(L,V,W){W=W?": "+W:"",LV&&this.throwError("too many arguments"+W,P.errors.UNEXPECTED_ARGUMENT,{count:L,expectedCount:V})}},{key:"checkNew",value:function(L,V){L!==Object&&null!=L||this.throwError("missing new",P.errors.MISSING_NEW,{name:V.name})}},{key:"checkAbstract",value:function(L,V){L===V?this.throwError("cannot instantiate abstract class "+JSON.stringify(V.name)+" directly; use a sub-class",P.errors.UNSUPPORTED_OPERATION,{name:L.name,operation:"new"}):L!==Object&&null!=L||this.throwError("missing new",P.errors.MISSING_NEW,{name:V.name})}}],[{key:"globalLogger",value:function(){return _||(_=new P(b.version)),_}},{key:"setCensorship",value:function(L,V){if(!L&&V&&this.globalLogger().throwError("cannot permanently disable censorship",P.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),l){if(!L)return;this.globalLogger().throwError("error censorship permanent",P.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}h=!!L,l=!!V}},{key:"setLogLevel",value:function(L){var V=u[L.toLowerCase()];null!=V?m=V:P.globalLogger().warn("invalid log level - "+L)}},{key:"from",value:function(L){return new P(L)}}]),P}();O.Logger=I,I.errors=f,I.levels=x},64071:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="properties/5.7.0"},23694:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.Description=void 0,O.checkProperties=function(L,V){L&&"object"===(0,g.default)(L)||u.throwArgumentError("invalid object","object",L),Object.keys(L).forEach(function(W){V[W]||u.throwArgumentError("invalid object key - "+W,"transaction:"+W,L)})},O.deepCopy=I,O.defineReadOnly=m,O.getStatic=function(L,V){for(var W=0;W<32;W++){if(L[V])return L[V];if(!L.prototype||"object"!==(0,g.default)(L.prototype))break;L=Object.getPrototypeOf(L.prototype).constructor}return null},O.resolveProperties=function(L){return h(this,void 0,void 0,x.default.mark(function V(){var W;return x.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return W=Object.keys(L).map(function(j){return Promise.resolve(L[j]).then(function(R){return{key:j,value:R}})}),H.next=3,Promise.all(W);case 3:return H.abrupt("return",H.sent.reduce(function(j,K){return j[K.key]=K.value,j},{}));case 5:case"end":return H.stop()}},V)}))},O.shallowCopy=function(L){var V={};for(var W in L)V[W]=L[W];return V};var x=d(E(82247)),f=d(E(58985)),T=d(E(69721)),g=d(E(3355)),b=E(64327),l=E(64071),h=function(L,V,W,G){return new(W||(W=Promise))(function(H,j){function K(y){try{o(G.next(y))}catch(M){j(M)}}function R(y){try{o(G.throw(y))}catch(M){j(M)}}function o(y){var M;y.done?H(y.value):(M=y.value,M instanceof W?M:new W(function(v){v(M)})).then(K,R)}o((G=G.apply(L,V||[])).next())})},u=new b.Logger(l.version);function m(L,V,W){Object.defineProperty(L,V,{enumerable:!0,value:W,writable:!1})}var _={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function w(L){if(null==L||_[(0,g.default)(L)])return!0;if(Array.isArray(L)||"object"===(0,g.default)(L)){if(!Object.isFrozen(L))return!1;for(var V=Object.keys(L),W=0;W{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="rlp/5.7.0"},55265:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.decode=function(m){var _=(0,d.arrayify)(m),w=u(_,0);return w.consumed!==_.length&&T.throwArgumentError("invalid rlp data","data",m),w.result},O.encode=function(m){return(0,d.hexlify)(l(m))};var d=E(908),x=E(64327),f=E(61466),T=new x.Logger(f.version);function g(m){for(var _=[];m;)_.unshift(255&m),m>>=8;return _}function b(m,_,w){for(var S=0,I=0;I_+1+S&&T.throwError("child data too short",x.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+S,result:I}}function u(m,_){if(0===m.length&&T.throwError("data too short",x.Logger.errors.BUFFER_OVERRUN,{}),m[_]>=248){var w=m[_]-247;_+1+w>m.length&&T.throwError("data short segment too short",x.Logger.errors.BUFFER_OVERRUN,{});var S=b(m,_+1,w);return _+1+w+S>m.length&&T.throwError("data long segment too short",x.Logger.errors.BUFFER_OVERRUN,{}),h(m,_,_+1+w,w+S)}if(m[_]>=192){var I=m[_]-192;return _+1+I>m.length&&T.throwError("data array too short",x.Logger.errors.BUFFER_OVERRUN,{}),h(m,_,_+1,I)}if(m[_]>=184){var P=m[_]-183;_+1+P>m.length&&T.throwError("data array too short",x.Logger.errors.BUFFER_OVERRUN,{});var L=b(m,_+1,P);return _+1+P+L>m.length&&T.throwError("data array too short",x.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+P+L,result:(0,d.hexlify)(m.slice(_+1+P,_+1+P+L))}}if(m[_]>=128){var V=m[_]-128;return _+1+V>m.length&&T.throwError("data too short",x.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+V,result:(0,d.hexlify)(m.slice(_+1,_+1+V))}}return{consumed:1,result:(0,d.hexlify)(m[_])}}},48100:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="signing-key/5.7.0"},36918:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.EC=void 0;var x=d(E(3355)),f=d(E(31734)),T=d(E(37198));function g(X,ne,pe){return X(pe={path:ne,exports:{},require:function(_e,xe){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},pe.exports),pe.exports}var b=l;function l(X,ne){if(!X)throw new Error(ne||"Assertion failed")}l.equal=function(X,ne,pe){if(X!=ne)throw new Error(pe||"Assertion failed: "+X+" != "+ne)};var h=g(function(X,ne){var pe=ne;function _e(Ce){return 1===Ce.length?"0"+Ce:Ce}function xe(Ce){for(var ke="",me=0;me>8,nt=255&ze;Ve?me.push(Ve,nt):me.push(nt)}return me},pe.zero2=_e,pe.toHex=xe,pe.encode=function(Ce,ke){return"hex"===ke?xe(Ce):Ce}}),u=g(function(X,ne){var pe=ne;pe.assert=b,pe.toArray=h.toArray,pe.zero2=h.zero2,pe.toHex=h.toHex,pe.encode=h.encode,pe.getNAF=function(_e,xe,Ce){var ke=new Array(Math.max(_e.bitLength(),Ce)+1);ke.fill(0);for(var me=1<(me>>1)-1?(me>>1)-nt:nt):Ve=0,ke[ze]=Ve,Ee.iushrn(1)}return ke},pe.getJSF=function(_e,xe){var Ce=[[],[]];_e=_e.clone(),xe=xe.clone();for(var ke,me=0,Ee=0;_e.cmpn(-me)>0||xe.cmpn(-Ee)>0;){var ze,Ve,nt=_e.andln(3)+me&3,tt=xe.andln(3)+Ee&3;3===nt&&(nt=-1),3===tt&&(tt=-1),ze=0==(1&nt)?0:3!=(ke=_e.andln(7)+me&7)&&5!==ke||2!==tt?nt:-nt,Ce[0].push(ze),Ve=0==(1&tt)?0:3!=(ke=xe.andln(7)+Ee&7)&&5!==ke||2!==nt?tt:-tt,Ce[1].push(Ve),2*me===ze+1&&(me=1-me),2*Ee===Ve+1&&(Ee=1-Ee),_e.iushrn(1),xe.iushrn(1)}return Ce},pe.cachedProperty=function(_e,xe,Ce){var ke="_"+xe;_e.prototype[xe]=function(){return void 0!==this[ke]?this[ke]:this[ke]=Ce.call(this)}},pe.parseBytes=function(_e){return"string"==typeof _e?pe.toArray(_e,"hex"):_e},pe.intFromLE=function(_e){return new f.default(_e,"hex","le")}}),m=u.getNAF,_=u.getJSF,w=u.assert;function S(X,ne){this.type=X,this.p=new f.default(ne.p,16),this.red=ne.prime?f.default.red(ne.prime):f.default.mont(this.p),this.zero=new f.default(0).toRed(this.red),this.one=new f.default(1).toRed(this.red),this.two=new f.default(2).toRed(this.red),this.n=ne.n&&new f.default(ne.n,16),this.g=ne.g&&this.pointFromJSON(ne.g,ne.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var pe=this.n&&this.p.div(this.n);!pe||pe.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var I=S;function P(X,ne){this.curve=X,this.type=ne,this.precomputed=null}S.prototype.point=function(){throw new Error("Not implemented")},S.prototype.validate=function(){throw new Error("Not implemented")},S.prototype._fixedNafMul=function(X,ne){w(X.precomputed);var pe=X._getDoubles(),_e=m(ne,1,this._bitLength),xe=(1<=Ce;Ee--)ke=(ke<<1)+_e[Ee];me.push(ke)}for(var ze=this.jpoint(null,null,null),Ve=this.jpoint(null,null,null),nt=xe;nt>0;nt--){for(Ce=0;Ce=0;me--){for(var Ee=0;me>=0&&0===Ce[me];me--)Ee++;if(me>=0&&Ee++,ke=ke.dblp(Ee),me<0)break;var ze=Ce[me];w(0!==ze),ke="affine"===X.type?ke.mixedAdd(ze>0?xe[ze-1>>1]:xe[-ze-1>>1].neg()):ke.add(ze>0?xe[ze-1>>1]:xe[-ze-1>>1].neg())}return"affine"===X.type?ke.toP():ke},S.prototype._wnafMulAdd=function(X,ne,pe,_e,xe){var Ce,ke,me,Ee=this._wnafT1,ze=this._wnafT2,Ve=this._wnafT3,nt=0;for(Ce=0;Ce<_e;Ce++){var tt=(me=ne[Ce])._getNAFPoints(X);Ee[Ce]=tt.wnd,ze[Ce]=tt.points}for(Ce=_e-1;Ce>=1;Ce-=2){var mt=Ce-1,ht=Ce;if(1===Ee[mt]&&1===Ee[ht]){var wt=[ne[mt],null,null,ne[ht]];0===ne[mt].y.cmp(ne[ht].y)?(wt[1]=ne[mt].add(ne[ht]),wt[2]=ne[mt].toJ().mixedAdd(ne[ht].neg())):0===ne[mt].y.cmp(ne[ht].y.redNeg())?(wt[1]=ne[mt].toJ().mixedAdd(ne[ht]),wt[2]=ne[mt].add(ne[ht].neg())):(wt[1]=ne[mt].toJ().mixedAdd(ne[ht]),wt[2]=ne[mt].toJ().mixedAdd(ne[ht].neg()));var Pt=[-3,-1,-5,-7,0,7,5,1,3],st=_(pe[mt],pe[ht]);for(nt=Math.max(st[0].length,nt),Ve[mt]=new Array(nt),Ve[ht]=new Array(nt),ke=0;ke=0;Ce--){for(var dn=0;Ce>=0;){var Nt=!0;for(ke=0;ke<_e;ke++)Wt[ke]=0|Ve[ke][Ce],0!==Wt[ke]&&(Nt=!1);if(!Nt)break;dn++,Ce--}if(Ce>=0&&dn++,St=St.dblp(dn),Ce<0)break;for(ke=0;ke<_e;ke++){var It=Wt[ke];0!==It&&(It>0?me=ze[ke][It-1>>1]:It<0&&(me=ze[ke][-It-1>>1].neg()),St="affine"===me.type?St.mixedAdd(me):St.add(me))}}for(Ce=0;Ce<_e;Ce++)ze[Ce]=null;return xe?St:St.toP()},S.BasePoint=P,P.prototype.eq=function(){throw new Error("Not implemented")},P.prototype.validate=function(){return this.curve.validate(this)},S.prototype.decodePoint=function(X,ne){X=u.toArray(X,ne);var pe=this.p.byteLength();if((4===X[0]||6===X[0]||7===X[0])&&X.length-1==2*pe)return 6===X[0]?w(X[X.length-1]%2==0):7===X[0]&&w(X[X.length-1]%2==1),this.point(X.slice(1,1+pe),X.slice(1+pe,1+2*pe));if((2===X[0]||3===X[0])&&X.length-1===pe)return this.pointFromX(X.slice(1,1+pe),3===X[0]);throw new Error("Unknown point format")},P.prototype.encodeCompressed=function(X){return this.encode(X,!0)},P.prototype._encode=function(X){var ne=this.curve.p.byteLength(),pe=this.getX().toArray("be",ne);return X?[this.getY().isEven()?2:3].concat(pe):[4].concat(pe,this.getY().toArray("be",ne))},P.prototype.encode=function(X,ne){return u.encode(this._encode(ne),X)},P.prototype.precompute=function(X){if(this.precomputed)return this;var ne={doubles:null,naf:null,beta:null};return ne.naf=this._getNAFPoints(8),ne.doubles=this._getDoubles(4,X),ne.beta=this._getBeta(),this.precomputed=ne,this},P.prototype._hasDoubles=function(X){if(!this.precomputed)return!1;var ne=this.precomputed.doubles;return!!ne&&ne.points.length>=Math.ceil((X.bitLength()+1)/ne.step)},P.prototype._getDoubles=function(X,ne){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var pe=[this],_e=this,xe=0;xe=0&&(Ce=ne,ke=pe),_e.negative&&(_e=_e.neg(),xe=xe.neg()),Ce.negative&&(Ce=Ce.neg(),ke=ke.neg()),[{a:_e,b:xe},{a:Ce,b:ke}]},W.prototype._endoSplit=function(X){var ne=this.endo.basis,pe=ne[0],_e=ne[1],xe=_e.b.mul(X).divRound(this.n),Ce=pe.b.neg().mul(X).divRound(this.n),ke=xe.mul(pe.a),me=Ce.mul(_e.a),Ee=xe.mul(pe.b),ze=Ce.mul(_e.b);return{k1:X.sub(ke).sub(me),k2:Ee.add(ze).neg()}},W.prototype.pointFromX=function(X,ne){(X=new f.default(X,16)).red||(X=X.toRed(this.red));var pe=X.redSqr().redMul(X).redIAdd(X.redMul(this.a)).redIAdd(this.b),_e=pe.redSqrt();if(0!==_e.redSqr().redSub(pe).cmp(this.zero))throw new Error("invalid point");var xe=_e.fromRed().isOdd();return(ne&&!xe||!ne&&xe)&&(_e=_e.redNeg()),this.point(X,_e)},W.prototype.validate=function(X){if(X.inf)return!0;var ne=X.x,pe=X.y,_e=this.a.redMul(ne),xe=ne.redSqr().redMul(ne).redIAdd(_e).redIAdd(this.b);return 0===pe.redSqr().redISub(xe).cmpn(0)},W.prototype._endoWnafMulAdd=function(X,ne,pe){for(var _e=this._endoWnafT1,xe=this._endoWnafT2,Ce=0;Ce":""},H.prototype.isInfinity=function(){return this.inf},H.prototype.add=function(X){if(this.inf)return X;if(X.inf)return this;if(this.eq(X))return this.dbl();if(this.neg().eq(X))return this.curve.point(null,null);if(0===this.x.cmp(X.x))return this.curve.point(null,null);var ne=this.y.redSub(X.y);0!==ne.cmpn(0)&&(ne=ne.redMul(this.x.redSub(X.x).redInvm()));var pe=ne.redSqr().redISub(this.x).redISub(X.x),_e=ne.redMul(this.x.redSub(pe)).redISub(this.y);return this.curve.point(pe,_e)},H.prototype.dbl=function(){if(this.inf)return this;var X=this.y.redAdd(this.y);if(0===X.cmpn(0))return this.curve.point(null,null);var ne=this.curve.a,pe=this.x.redSqr(),_e=X.redInvm(),xe=pe.redAdd(pe).redIAdd(pe).redIAdd(ne).redMul(_e),Ce=xe.redSqr().redISub(this.x.redAdd(this.x)),ke=xe.redMul(this.x.redSub(Ce)).redISub(this.y);return this.curve.point(Ce,ke)},H.prototype.getX=function(){return this.x.fromRed()},H.prototype.getY=function(){return this.y.fromRed()},H.prototype.mul=function(X){return X=new f.default(X,16),this.isInfinity()?this:this._hasDoubles(X)?this.curve._fixedNafMul(this,X):this.curve.endo?this.curve._endoWnafMulAdd([this],[X]):this.curve._wnafMul(this,X)},H.prototype.mulAdd=function(X,ne,pe){var _e=[this,ne],xe=[X,pe];return this.curve.endo?this.curve._endoWnafMulAdd(_e,xe):this.curve._wnafMulAdd(1,_e,xe,2)},H.prototype.jmulAdd=function(X,ne,pe){var _e=[this,ne],xe=[X,pe];return this.curve.endo?this.curve._endoWnafMulAdd(_e,xe,!0):this.curve._wnafMulAdd(1,_e,xe,2,!0)},H.prototype.eq=function(X){return this===X||this.inf===X.inf&&(this.inf||0===this.x.cmp(X.x)&&0===this.y.cmp(X.y))},H.prototype.neg=function(X){if(this.inf)return this;var ne=this.curve.point(this.x,this.y.redNeg());if(X&&this.precomputed){var pe=this.precomputed,_e=function(xe){return xe.neg()};ne.precomputed={naf:pe.naf&&{wnd:pe.naf.wnd,points:pe.naf.points.map(_e)},doubles:pe.doubles&&{step:pe.doubles.step,points:pe.doubles.points.map(_e)}}}return ne},H.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},L(j,I.BasePoint),W.prototype.jpoint=function(X,ne,pe){return new j(this,X,ne,pe)},j.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var X=this.z.redInvm(),ne=X.redSqr(),pe=this.x.redMul(ne),_e=this.y.redMul(ne).redMul(X);return this.curve.point(pe,_e)},j.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},j.prototype.add=function(X){if(this.isInfinity())return X;if(X.isInfinity())return this;var ne=X.z.redSqr(),pe=this.z.redSqr(),_e=this.x.redMul(ne),xe=X.x.redMul(pe),Ce=this.y.redMul(ne.redMul(X.z)),ke=X.y.redMul(pe.redMul(this.z)),me=_e.redSub(xe),Ee=Ce.redSub(ke);if(0===me.cmpn(0))return 0!==Ee.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ze=me.redSqr(),Ve=ze.redMul(me),nt=_e.redMul(ze),tt=Ee.redSqr().redIAdd(Ve).redISub(nt).redISub(nt),mt=Ee.redMul(nt.redISub(tt)).redISub(Ce.redMul(Ve)),ht=this.z.redMul(X.z).redMul(me);return this.curve.jpoint(tt,mt,ht)},j.prototype.mixedAdd=function(X){if(this.isInfinity())return X.toJ();if(X.isInfinity())return this;var ne=this.z.redSqr(),pe=this.x,_e=X.x.redMul(ne),xe=this.y,Ce=X.y.redMul(ne).redMul(this.z),ke=pe.redSub(_e),me=xe.redSub(Ce);if(0===ke.cmpn(0))return 0!==me.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var Ee=ke.redSqr(),ze=Ee.redMul(ke),Ve=pe.redMul(Ee),nt=me.redSqr().redIAdd(ze).redISub(Ve).redISub(Ve),tt=me.redMul(Ve.redISub(nt)).redISub(xe.redMul(ze)),mt=this.z.redMul(ke);return this.curve.jpoint(nt,tt,mt)},j.prototype.dblp=function(X){if(0===X)return this;if(this.isInfinity())return this;if(!X)return this.dbl();var ne;if(this.curve.zeroA||this.curve.threeA){var pe=this;for(ne=0;ne=0)return!1;if(pe.redIAdd(xe),0===this.x.cmp(pe))return!0}},j.prototype.inspect=function(){return this.isInfinity()?"":""},j.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var K=g(function(X,ne){var pe=ne;pe.base=I,pe.short=G,pe.mont=null,pe.edwards=null}),R=g(function(X,ne){var pe,_e=ne,xe=u.assert;function Ce(me){this.curve="short"===me.type?new K.short(me):"edwards"===me.type?new K.edwards(me):new K.mont(me),this.g=this.curve.g,this.n=this.curve.n,this.hash=me.hash,xe(this.g.validate(),"Invalid curve"),xe(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function ke(me,Ee){Object.defineProperty(_e,me,{configurable:!0,enumerable:!0,get:function(){var ze=new Ce(Ee);return Object.defineProperty(_e,me,{configurable:!0,enumerable:!0,value:ze}),ze}})}_e.PresetCurve=Ce,ke("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:T.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),ke("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:T.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),ke("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:T.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),ke("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:T.default.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"]}),ke("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:T.default.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"]}),ke("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:T.default.sha256,gRed:!1,g:["9"]}),ke("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:T.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pe=null.crash()}catch{pe=void 0}ke("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:T.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pe]})});function o(X){if(!(this instanceof o))return new o(X);this.hash=X.hash,this.predResist=!!X.predResist,this.outLen=this.hash.outSize,this.minEntropy=X.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var ne=h.toArray(X.entropy,X.entropyEnc||"hex"),pe=h.toArray(X.nonce,X.nonceEnc||"hex"),_e=h.toArray(X.pers,X.persEnc||"hex");b(ne.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(ne,pe,_e)}var y=o;o.prototype._init=function(X,ne,pe){var _e=X.concat(ne).concat(pe);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var xe=0;xe=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(X.concat(pe||[])),this._reseed=1},o.prototype.generate=function(X,ne,pe,_e){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof ne&&(_e=pe,pe=ne,ne=null),pe&&(pe=h.toArray(pe,_e||"hex"),this._update(pe));for(var xe=[];xe.length"};var D=u.assert;function N(X,ne){if(X instanceof N)return X;this._importDER(X,ne)||(D(X.r&&X.s,"Signature without r or s"),this.r=new f.default(X.r,16),this.s=new f.default(X.s,16),this.recoveryParam=void 0===X.recoveryParam?null:X.recoveryParam)}var C=N;function a(){this.place=0}function B(X,ne){var pe=X[ne.place++];if(!(128&pe))return pe;var _e=15&pe;if(0===_e||_e>4)return!1;for(var xe=0,Ce=0,ke=ne.place;Ce<_e;Ce++,ke++)xe<<=8,xe|=X[ke],xe>>>=0;return!(xe<=127)&&(ne.place=ke,xe)}function Q(X){for(var ne=0,pe=X.length-1;!X[ne]&&!(128&X[ne+1])&&ne>>3);for(X.push(128|pe);--pe;)X.push(ne>>>(pe<<3)&255);X.push(ne)}}N.prototype._importDER=function(X,ne){X=u.toArray(X,ne);var pe=new a;if(48!==X[pe.place++])return!1;var _e=B(X,pe);if(!1===_e||_e+pe.place!==X.length||2!==X[pe.place++])return!1;var xe=B(X,pe);if(!1===xe)return!1;var Ce=X.slice(pe.place,xe+pe.place);if(pe.place+=xe,2!==X[pe.place++])return!1;var ke=B(X,pe);if(!1===ke||X.length!==ke+pe.place)return!1;var me=X.slice(pe.place,ke+pe.place);if(0===Ce[0]){if(!(128&Ce[1]))return!1;Ce=Ce.slice(1)}if(0===me[0]){if(!(128&me[1]))return!1;me=me.slice(1)}return this.r=new f.default(Ce),this.s=new f.default(me),this.recoveryParam=null,!0},N.prototype.toDER=function(X){var ne=this.r.toArray(),pe=this.s.toArray();for(128&ne[0]&&(ne=[0].concat(ne)),128&pe[0]&&(pe=[0].concat(pe)),ne=Q(ne),pe=Q(pe);!(pe[0]||128&pe[1]);)pe=pe.slice(1);var _e=[2];ee(_e,ne.length),(_e=_e.concat(ne)).push(2),ee(_e,pe.length);var xe=_e.concat(pe),Ce=[48];return ee(Ce,xe.length),Ce=Ce.concat(xe),u.encode(Ce,X)};var ce=function(){throw new Error("unsupported")},ue=u.assert;function we(X){if(!(this instanceof we))return new we(X);"string"==typeof X&&(ue(Object.prototype.hasOwnProperty.call(R,X),"Unknown curve "+X),X=R[X]),X instanceof R.PresetCurve&&(X={curve:X}),this.curve=X.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=X.curve.g,this.g.precompute(X.curve.n.bitLength()+1),this.hash=X.hash||X.curve.hash}var ae=we;we.prototype.keyPair=function(X){return new k(this,X)},we.prototype.keyFromPrivate=function(X,ne){return k.fromPrivate(this,X,ne)},we.prototype.keyFromPublic=function(X,ne){return k.fromPublic(this,X,ne)},we.prototype.genKeyPair=function(X){X||(X={});for(var ne=new y({hash:this.hash,pers:X.pers,persEnc:X.persEnc||"utf8",entropy:X.entropy||ce(),entropyEnc:X.entropy&&X.entropyEnc||"utf8",nonce:this.n.toArray()}),pe=this.n.byteLength(),_e=this.n.sub(new f.default(2));;){var xe=new f.default(ne.generate(pe));if(!(xe.cmp(_e)>0))return xe.iaddn(1),this.keyFromPrivate(xe)}},we.prototype._truncateToN=function(X,ne){var pe=8*X.byteLength()-this.n.bitLength();return pe>0&&(X=X.ushrn(pe)),!ne&&X.cmp(this.n)>=0?X.sub(this.n):X},we.prototype.sign=function(X,ne,pe,_e){"object"===(0,x.default)(pe)&&(_e=pe,pe=null),_e||(_e={}),ne=this.keyFromPrivate(ne,pe),X=this._truncateToN(new f.default(X,16));for(var xe=this.n.byteLength(),Ce=ne.getPrivate().toArray("be",xe),ke=X.toArray("be",xe),me=new y({hash:this.hash,entropy:Ce,nonce:ke,pers:_e.pers,persEnc:_e.persEnc||"utf8"}),Ee=this.n.sub(new f.default(1)),ze=0;;ze++){var Ve=_e.k?_e.k(ze):new f.default(me.generate(this.n.byteLength()));if(!((Ve=this._truncateToN(Ve,!0)).cmpn(1)<=0||Ve.cmp(Ee)>=0)){var nt=this.g.mul(Ve);if(!nt.isInfinity()){var tt=nt.getX(),mt=tt.umod(this.n);if(0!==mt.cmpn(0)){var ht=Ve.invm(this.n).mul(mt.mul(ne.getPrivate()).iadd(X));if(0!==(ht=ht.umod(this.n)).cmpn(0)){var wt=(nt.getY().isOdd()?1:0)|(0!==tt.cmp(mt)?2:0);return _e.canonical&&ht.cmp(this.nh)>0&&(ht=this.n.sub(ht),wt^=1),new C({r:mt,s:ht,recoveryParam:wt})}}}}}},we.prototype.verify=function(X,ne,pe,_e){X=this._truncateToN(new f.default(X,16)),pe=this.keyFromPublic(pe,_e);var xe=(ne=new C(ne,"hex")).r,Ce=ne.s;if(xe.cmpn(1)<0||xe.cmp(this.n)>=0||Ce.cmpn(1)<0||Ce.cmp(this.n)>=0)return!1;var ke,me=Ce.invm(this.n),Ee=me.mul(X).umod(this.n),ze=me.mul(xe).umod(this.n);return this.curve._maxwellTrick?!(ke=this.g.jmulAdd(Ee,pe.getPublic(),ze)).isInfinity()&&ke.eqXToP(xe):!(ke=this.g.mulAdd(Ee,pe.getPublic(),ze)).isInfinity()&&0===ke.getX().umod(this.n).cmp(xe)},we.prototype.recoverPubKey=function(X,ne,pe,_e){ue((3&pe)===pe,"The recovery param is more than two bits"),ne=new C(ne,_e);var xe=this.n,Ce=new f.default(X),ke=ne.r,me=ne.s,Ee=1&pe,ze=pe>>1;if(ke.cmp(this.curve.p.umod(this.curve.n))>=0&&ze)throw new Error("Unable to find sencond key candinate");ke=this.curve.pointFromX(ze?ke.add(this.curve.n):ke,Ee);var Ve=ne.r.invm(xe),nt=xe.sub(Ce).mul(Ve).umod(xe),tt=me.mul(Ve).umod(xe);return this.g.mulAdd(nt,ke,tt)},we.prototype.getKeyRecoveryParam=function(X,ne,pe,_e){if(null!==(ne=new C(ne,_e)).recoveryParam)return ne.recoveryParam;for(var xe=0;xe<4;xe++){var Ce;try{Ce=this.recoverPubKey(X,ne,xe)}catch{continue}if(Ce.eq(pe))return xe}throw new Error("Unable to find valid recovery factor")};var Te=g(function(X,ne){var pe=ne;pe.version="6.5.4",pe.utils=u,pe.rand=function(){throw new Error("unsupported")},pe.curve=K,pe.curves=R,pe.ec=ae,pe.eddsa=null});O.EC=Te.ec},17612:(z,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.SigningKey=void 0,O.computePublicKey=S,O.recoverPublicKey=function(I,P){var L=(0,g.splitSignature)(P),V={r:(0,g.arrayify)(L.r),s:(0,g.arrayify)(L.s)};return"0x"+_().recoverPubKey((0,g.arrayify)(I),V,L.recoveryParam).encode("hex",!1)};var x=d(E(69721)),f=d(E(58985)),T=E(36918),g=E(908),b=E(23694),l=E(64327),h=E(48100),u=new l.Logger(h.version),m=null;function _(){return m||(m=new T.EC("secp256k1")),m}var w=function(){function I(P){(0,x.default)(this,I),(0,b.defineReadOnly)(this,"curve","secp256k1"),(0,b.defineReadOnly)(this,"privateKey",(0,g.hexlify)(P)),32!==(0,g.hexDataLength)(this.privateKey)&&u.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var L=_().keyFromPrivate((0,g.arrayify)(this.privateKey));(0,b.defineReadOnly)(this,"publicKey","0x"+L.getPublic(!1,"hex")),(0,b.defineReadOnly)(this,"compressedPublicKey","0x"+L.getPublic(!0,"hex")),(0,b.defineReadOnly)(this,"_isSigningKey",!0)}return(0,f.default)(I,[{key:"_addPoint",value:function(P){var L=_().keyFromPublic((0,g.arrayify)(this.publicKey)),V=_().keyFromPublic((0,g.arrayify)(P));return"0x"+L.pub.add(V.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(P){var L=_().keyFromPrivate((0,g.arrayify)(this.privateKey)),V=(0,g.arrayify)(P);32!==V.length&&u.throwArgumentError("bad digest length","digest",P);var W=L.sign(V,{canonical:!0});return(0,g.splitSignature)({recoveryParam:W.recoveryParam,r:(0,g.hexZeroPad)("0x"+W.r.toString(16),32),s:(0,g.hexZeroPad)("0x"+W.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(P){var L=_().keyFromPrivate((0,g.arrayify)(this.privateKey)),V=_().keyFromPublic((0,g.arrayify)(S(P)));return(0,g.hexZeroPad)("0x"+L.derive(V.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(P){return!(!P||!P._isSigningKey)}}]),I}();function S(I,P){var L=(0,g.arrayify)(I);if(32===L.length){var V=new w(L);return P?"0x"+_().keyFromPrivate(L).getPublic(!0,"hex"):V.publicKey}return 33===L.length?P?(0,g.hexlify)(L):"0x"+_().keyFromPublic(L).getPublic(!1,"hex"):65===L.length?P?"0x"+_().keyFromPublic(L).getPublic(!0,"hex"):(0,g.hexlify)(L):u.throwArgumentError("invalid public or private key","key","[REDACTED]")}O.SigningKey=w},56518:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="strings/5.7.0"},95856:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.formatBytes32String=function(T){var g=(0,f.toUtf8Bytes)(T);if(g.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,x.hexlify)((0,x.concat)([g,d.HashZero]).slice(0,32))},O.parseBytes32String=function(T){var g=(0,x.arrayify)(T);if(32!==g.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==g[31])throw new Error("invalid bytes32 string - no null terminator");for(var b=31;0===g[b-1];)b--;return(0,f.toUtf8String)(g.slice(0,b))};var d=E(5465),x=E(908),f=E(34997)},68645:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O._nameprepTableA1=w,O._nameprepTableB2=S,O._nameprepTableC=I,O.nameprep=function(P){if(P.match(/^[a-z0-9-]*$/i)&&P.length<=59)return P.toLowerCase();var L,V=(0,d.toUtf8CodePoints)(P);L=V.map(function(G){return b.indexOf(G)>=0||G>=65024&&G<=65039?[]:S(G)||[G]}),V=L.reduce(function(G,H){return H.forEach(function(j){G.push(j)}),G},[]),(V=(0,d.toUtf8CodePoints)((0,d._toUtf8String)(V),d.UnicodeNormalizationForm.NFKC)).forEach(function(G){if(I(G))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),V.forEach(function(G){if(w(G))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});var W=(0,d._toUtf8String)(V);if("-"===W.substring(0,1)||"--"===W.substring(2,4)||"-"===W.substring(W.length-1))throw new Error("invalid hyphen");return W};var d=E(34997);function x(P,L){L||(L=function(G){return[parseInt(G,16)]});var V=0,W={};return P.split(",").forEach(function(G){var H=G.split(":");V+=parseInt(H[0],16),W[V]=L(H[1])}),W}function f(P){var L=0;return P.split(",").map(function(V){var W=V.split("-");return 1===W.length?W[1]="0":""===W[1]&&(W[1]="1"),{l:L+parseInt(W[0],16),h:L=parseInt(W[1],16)}})}function T(P,L){for(var V=0,W=0;W=(V+=G.l)&&P<=V+G.h&&(P-V)%(G.d||1)==0){if(G.e&&-1!==G.e.indexOf(P-V))continue;return G}}return null}var g=f("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),b="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function(P){return parseInt(P,16)}),l=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],h=x("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),u=x("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),m=x("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function(P){if(P.length%4!=0)throw new Error("bad data");for(var L=[],V=0;V{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return f.UnicodeNormalizationForm}}),Object.defineProperty(O,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return f.Utf8ErrorFuncs}}),Object.defineProperty(O,"Utf8ErrorReason",{enumerable:!0,get:function(){return f.Utf8ErrorReason}}),Object.defineProperty(O,"_toEscapedUtf8String",{enumerable:!0,get:function(){return f._toEscapedUtf8String}}),Object.defineProperty(O,"formatBytes32String",{enumerable:!0,get:function(){return d.formatBytes32String}}),Object.defineProperty(O,"nameprep",{enumerable:!0,get:function(){return x.nameprep}}),Object.defineProperty(O,"parseBytes32String",{enumerable:!0,get:function(){return d.parseBytes32String}}),Object.defineProperty(O,"toUtf8Bytes",{enumerable:!0,get:function(){return f.toUtf8Bytes}}),Object.defineProperty(O,"toUtf8CodePoints",{enumerable:!0,get:function(){return f.toUtf8CodePoints}}),Object.defineProperty(O,"toUtf8String",{enumerable:!0,get:function(){return f.toUtf8String}});var d=E(95856),x=E(68645),f=E(34997)},34997:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.Utf8ErrorReason=O.Utf8ErrorFuncs=O.UnicodeNormalizationForm=void 0,O._toEscapedUtf8String=function(S,I){return'"'+u(S,I).map(function(P){if(P<256){switch(P){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(P>=32&&P<127)return String.fromCharCode(P)}return P<=65535?_(P):_(55296+((P-=65536)>>10&1023))+_(56320+(1023&P))}).join("")+'"'},O._toUtf8String=w,O.toUtf8Bytes=m,O.toUtf8CodePoints=function(S){return u(m(S,arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.current))},O.toUtf8String=function(S,I){return w(u(S,I))};var d,x,S,f=E(908),T=E(64327),g=E(56518),b=new T.Logger(g.version);function l(S,I,P,L,V){if(S===x.BAD_PREFIX||S===x.UNEXPECTED_CONTINUE){for(var W=0,G=I+1;G>6==2;G++)W++;return W}return S===x.OVERRUN?P.length-I-1:0}O.UnicodeNormalizationForm=d,(S=d||(O.UnicodeNormalizationForm=d={})).current="",S.NFC="NFC",S.NFD="NFD",S.NFKC="NFKC",S.NFKD="NFKD",O.Utf8ErrorReason=x,function(S){S.UNEXPECTED_CONTINUE="unexpected continuation byte",S.BAD_PREFIX="bad codepoint prefix",S.OVERRUN="string overrun",S.MISSING_CONTINUE="missing continuation byte",S.OUT_OF_RANGE="out of UTF-8 range",S.UTF16_SURROGATE="UTF-16 surrogate",S.OVERLONG="overlong representation"}(x||(O.Utf8ErrorReason=x={}));var h=Object.freeze({error:function(S,I,P,L,V){return b.throwArgumentError("invalid codepoint at offset ".concat(I,"; ").concat(S),"bytes",P)},ignore:l,replace:function(S,I,P,L,V){return S===x.OVERLONG?(L.push(V),0):(L.push(65533),l(S,I,P))}});function u(S,I){null==I&&(I=h.error),S=(0,f.arrayify)(S);for(var P=[],L=0;L>7!=0){var W=null,G=null;if(192==(224&V))W=1,G=127;else if(224==(240&V))W=2,G=2047;else{if(240!=(248&V)){L+=I(128==(192&V)?x.UNEXPECTED_CONTINUE:x.BAD_PREFIX,L-1,S,P);continue}W=3,G=65535}if(L-1+W>=S.length)L+=I(x.OVERRUN,L-1,S,P);else{for(var H=V&(1<<8-W-1)-1,j=0;j1114111?L+=I(x.OUT_OF_RANGE,L-1-W,S,P,H):H>=55296&&H<=57343?L+=I(x.UTF16_SURROGATE,L-1-W,S,P,H):H<=G?L+=I(x.OVERLONG,L-1-W,S,P,H):P.push(H))}}else P.push(V)}return P}function m(S){var I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.current;I!=d.current&&(b.checkNormalize(),S=S.normalize(I));for(var P=[],L=0;L>6|192),P.push(63&V|128);else if(55296==(64512&V)){L++;var W=S.charCodeAt(L);if(L>=S.length||56320!=(64512&W))throw new Error("invalid utf-8 string");var G=65536+((1023&V)<<10)+(1023&W);P.push(G>>18|240),P.push(G>>12&63|128),P.push(G>>6&63|128),P.push(63&G|128)}else P.push(V>>12|224),P.push(V>>6&63|128),P.push(63&V|128)}return(0,f.arrayify)(P)}function _(S){var I="0000"+S.toString(16);return"\\u"+I.substring(I.length-4)}function w(S){return S.map(function(I){return I<=65535?String.fromCharCode(I):(I-=65536,String.fromCharCode(55296+(I>>10&1023),56320+(1023&I)))}).join("")}O.Utf8ErrorFuncs=h},96783:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="transactions/5.7.0"},21936:(z,O,E)=>{"use strict";var d=E(3355);Object.defineProperty(O,"__esModule",{value:!0}),O.TransactionTypes=void 0,O.accessListify=R,O.computeAddress=G,O.parse=function(k){var D=(0,T.arrayify)(k);if(D[0]>127)return function(N){var C=h.decode(N);9!==C.length&&6!==C.length&&I.throwArgumentError("invalid raw transaction","rawTransaction",N);var a={nonce:L(C[0]).toNumber(),gasPrice:L(C[1]),gasLimit:L(C[2]),to:P(C[3]),value:L(C[4]),data:C[5],chainId:0};if(6===C.length)return a;try{a.v=f.BigNumber.from(C[6]).toNumber()}catch{return a}if(a.r=(0,T.hexZeroPad)(C[7],32),a.s=(0,T.hexZeroPad)(C[8],32),f.BigNumber.from(a.r).isZero()&&f.BigNumber.from(a.s).isZero())a.chainId=a.v,a.v=0;else{a.chainId=Math.floor((a.v-35)/2),a.chainId<0&&(a.chainId=0);var B=a.v-27,Q=C.slice(0,6);0!==a.chainId&&(Q.push((0,T.hexlify)(a.chainId)),Q.push("0x"),Q.push("0x"),B-=2*a.chainId+8);var ee=(0,b.keccak256)(h.encode(Q));try{a.from=H(ee,{r:(0,T.hexlify)(a.r),s:(0,T.hexlify)(a.s),recoveryParam:B})}catch{}a.hash=(0,b.keccak256)(N)}return a.type=null,a}(D);switch(D[0]){case 1:return function(N){var C=h.decode(N.slice(1));8!==C.length&&11!==C.length&&I.throwArgumentError("invalid component count for transaction type: 1","payload",(0,T.hexlify)(N));var a={type:1,chainId:L(C[0]).toNumber(),nonce:L(C[1]).toNumber(),gasPrice:L(C[2]),gasLimit:L(C[3]),to:P(C[4]),value:L(C[5]),data:C[6],accessList:R(C[7])};return 8===C.length||(a.hash=(0,b.keccak256)(N),v(a,C.slice(8),M)),a}(D);case 2:return function(N){var C=h.decode(N.slice(1));9!==C.length&&12!==C.length&&I.throwArgumentError("invalid component count for transaction type: 2","payload",(0,T.hexlify)(N));var a=L(C[2]),B=L(C[3]),Q={type:2,chainId:L(C[0]).toNumber(),nonce:L(C[1]).toNumber(),maxPriorityFeePerGas:a,maxFeePerGas:B,gasPrice:null,gasLimit:L(C[4]),to:P(C[5]),value:L(C[6]),data:C[7],accessList:R(C[8])};return 9===C.length||(Q.hash=(0,b.keccak256)(N),v(Q,C.slice(9),y)),Q}(D)}return I.throwError("unsupported transaction type: ".concat(D[0]),m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:D[0]})},O.recoverAddress=H,O.serialize=function(k,D){if(null==k.type||0===k.type)return null!=k.accessList&&I.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",k),function(N,C){(0,l.checkProperties)(N,W);var a=[];V.forEach(function(ce){var ue=N[ce.name]||[],we={};ce.numeric&&(we.hexPad="left"),ue=(0,T.arrayify)((0,T.hexlify)(ue,we)),ce.length&&ue.length!==ce.length&&ue.length>0&&I.throwArgumentError("invalid length for "+ce.name,"transaction:"+ce.name,ue),ce.maxLength&&(ue=(0,T.stripZeros)(ue)).length>ce.maxLength&&I.throwArgumentError("invalid length for "+ce.name,"transaction:"+ce.name,ue),a.push((0,T.hexlify)(ue))});var B=0;if(null!=N.chainId?"number"!=typeof(B=N.chainId)&&I.throwArgumentError("invalid transaction.chainId","transaction",N):C&&!(0,T.isBytesLike)(C)&&C.v>28&&(B=Math.floor((C.v-35)/2)),0!==B&&(a.push((0,T.hexlify)(B)),a.push("0x"),a.push("0x")),!C)return h.encode(a);var Q=(0,T.splitSignature)(C),ee=27+Q.recoveryParam;return 0!==B?(a.pop(),a.pop(),a.pop(),ee+=2*B+8,Q.v>28&&Q.v!==ee&&I.throwArgumentError("transaction.chainId/signature.v mismatch","signature",C)):Q.v!==ee&&I.throwArgumentError("transaction.chainId/signature.v mismatch","signature",C),a.push((0,T.hexlify)(ee)),a.push((0,T.stripZeros)((0,T.arrayify)(Q.r))),a.push((0,T.stripZeros)((0,T.arrayify)(Q.s))),h.encode(a)}(k,D);switch(k.type){case 1:return M(k,D);case 2:return y(k,D)}return I.throwError("unsupported transaction type: ".concat(k.type),m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:k.type})};var x=E(77921),f=E(34952),T=E(908),g=E(5465),b=E(64642),l=E(23694),h=function(k,D){if(k&&k.__esModule)return k;if(null===k||"object"!==d(k)&&"function"!=typeof k)return{default:k};var N=w(void 0);if(N&&N.has(k))return N.get(k);var C={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var B in k)if("default"!==B&&Object.prototype.hasOwnProperty.call(k,B)){var Q=a?Object.getOwnPropertyDescriptor(k,B):null;Q&&(Q.get||Q.set)?Object.defineProperty(C,B,Q):C[B]=k[B]}return C.default=k,N&&N.set(k,C),C}(E(55265)),u=E(17612),m=E(64327),_=E(96783);function w(k){if("function"!=typeof WeakMap)return null;var D=new WeakMap,N=new WeakMap;return(w=function(C){return C?N:D})(k)}var S,k,I=new m.Logger(_.version);function P(k){return"0x"===k?null:(0,x.getAddress)(k)}function L(k){return"0x"===k?g.Zero:f.BigNumber.from(k)}O.TransactionTypes=S,(k=S||(O.TransactionTypes=S={}))[k.legacy=0]="legacy",k[k.eip2930=1]="eip2930",k[k.eip1559=2]="eip1559";var V=[{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"}],W={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function G(k){var D=(0,u.computePublicKey)(k);return(0,x.getAddress)((0,T.hexDataSlice)((0,b.keccak256)((0,T.hexDataSlice)(D,1)),12))}function H(k,D){return G((0,u.recoverPublicKey)((0,T.arrayify)(k),D))}function j(k,D){var N=(0,T.stripZeros)(f.BigNumber.from(k).toHexString());return N.length>32&&I.throwArgumentError("invalid length for "+D,"transaction:"+D,k),N}function K(k,D){return{address:(0,x.getAddress)(k),storageKeys:(D||[]).map(function(N,C){return 32!==(0,T.hexDataLength)(N)&&I.throwArgumentError("invalid access list storageKey","accessList[".concat(k,":").concat(C,"]"),N),N.toLowerCase()})}}function R(k){if(Array.isArray(k))return k.map(function(N,C){return Array.isArray(N)?(N.length>2&&I.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(C,"]"),N),K(N[0],N[1])):K(N.address,N.storageKeys)});var D=Object.keys(k).map(function(N){var C=k[N].reduce(function(a,B){return a[B]=!0,a},{});return K(N,Object.keys(C).sort())});return D.sort(function(N,C){return N.address.localeCompare(C.address)}),D}function o(k){return R(k).map(function(D){return[D.address,D.storageKeys]})}function y(k,D){if(null!=k.gasPrice){var N=f.BigNumber.from(k.gasPrice),C=f.BigNumber.from(k.maxFeePerGas||0);N.eq(C)||I.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:N,maxFeePerGas:C})}var a=[j(k.chainId||0,"chainId"),j(k.nonce||0,"nonce"),j(k.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),j(k.maxFeePerGas||0,"maxFeePerGas"),j(k.gasLimit||0,"gasLimit"),null!=k.to?(0,x.getAddress)(k.to):"0x",j(k.value||0,"value"),k.data||"0x",o(k.accessList||[])];if(D){var B=(0,T.splitSignature)(D);a.push(j(B.recoveryParam,"recoveryParam")),a.push((0,T.stripZeros)(B.r)),a.push((0,T.stripZeros)(B.s))}return(0,T.hexConcat)(["0x02",h.encode(a)])}function M(k,D){var N=[j(k.chainId||0,"chainId"),j(k.nonce||0,"nonce"),j(k.gasPrice||0,"gasPrice"),j(k.gasLimit||0,"gasLimit"),null!=k.to?(0,x.getAddress)(k.to):"0x",j(k.value||0,"value"),k.data||"0x",o(k.accessList||[])];if(D){var C=(0,T.splitSignature)(D);N.push(j(C.recoveryParam,"recoveryParam")),N.push((0,T.stripZeros)(C.r)),N.push((0,T.stripZeros)(C.s))}return(0,T.hexConcat)(["0x01",h.encode(N)])}function v(k,D,N){try{var C=L(D[0]).toNumber();if(0!==C&&1!==C)throw new Error("bad recid");k.v=C}catch{I.throwArgumentError("invalid v for transaction type: 1","v",D[0])}k.r=(0,T.hexZeroPad)(D[1],32),k.s=(0,T.hexZeroPad)(D[2],32);try{var a=(0,b.keccak256)(N(k));k.from=H(a,{r:k.r,s:k.s,recoveryParam:k.v})}catch{}}},96546:(z,O,E)=>{"use strict";var d=E(28847)(E(90775));function x(h,u){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(h);u&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),m.push.apply(m,_)}return m}function f(h){for(var u=1;u1?m-1:0),w=1;w{"use strict";var d=E(28847)(E(90775));function x(h,u){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(h);u&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),m.push.apply(m,_)}return m}function f(h){for(var u=1;ub;)S&l&&(I=I.add(P)),P=P.double(),S>>=l;return I},precomputeWindow:function(w,S){for(var I=_(S),P=I.windows,L=I.windowSize,V=[],W=w,G=W,H=0;H>=K,y>V&&(y-=j,I+=l);var M=o,v=o+Math.abs(y)-1,D=y<0;0===y?G=G.add(m(R%2!=0,S[M])):W=W.add(m(D,S[v]))}return{p:W,f:G}},wNAFCached:function(w,S,I,P){var L=w._WINDOW_SIZE||1,V=S.get(w);return V||(V=this.precomputeWindow(w,L),1!==L&&S.set(w,P(V))),this.wNAF(L,V,I)}}},O.validateBasic=function(h){return(0,T.validateField)(h.Fp),(0,g.validateObject)(h,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(f(f(f({},(0,T.nLength)(h.n,h.nBitLength)),h),{p:h.Fp.ORDER}))}},19751:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(90775)),f=d(E(74519));function T(L,V){var W=Object.keys(L);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(L);V&&(G=G.filter(function(H){return Object.getOwnPropertyDescriptor(L,H).enumerable})),W.push.apply(W,G)}return W}function g(L){for(var V=1;V=1<<8*V)throw new Error("bad I2OSP call: value=".concat(L," length=").concat(V));for(var W=Array.from({length:V}).fill(0),G=V-1;G>=0;G--)W[G]=255&L,L>>>=8;return new Uint8Array(W)}function m(L,V){for(var W=new Uint8Array(L.length),G=0;G255&&(V=G((0,l.concatBytes)((0,l.utf8ToBytes)("H2C-OVERSIZE-DST-"),V)));var j=G.blockLen,K=Math.ceil(W/G.outputLen);if(K>255)throw new Error("Invalid xmd length");var R=(0,l.concatBytes)(V,u(V.length,1)),o=u(0,j),y=u(W,2),M=new Array(K),v=G((0,l.concatBytes)(o,L,y,u(0,1),R));M[0]=G((0,l.concatBytes)(v,u(1,1),R));for(var k=1;k<=K;k++){var D=[m(v,M[k-1]),u(k+1,1),R];M[k]=G(l.concatBytes.apply(void 0,D))}return l.concatBytes.apply(void 0,M).slice(0,W)}function I(L,V,W,G,H){if(_(L),_(V),w(W),V.length>255){var j=Math.ceil(2*G/8);V=H.create({dkLen:j}).update((0,l.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(V).digest()}if(W>65535||V.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return H.create({dkLen:W}).update(L).update(u(W,2)).update(V).update(u(V.length,1)).digest()}function P(L,V,W){(0,l.validateObject)(W,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});var G=W.p,H=W.k,j=W.m,K=W.hash,R=W.expand,o=W.DST;_(L),w(V);var y,M=function(ce){if(ce instanceof Uint8Array)return ce;if("string"==typeof ce)return(0,l.utf8ToBytes)(ce);throw new Error("DST must be Uint8Array or string")}(o),v=G.toString(2).length,k=Math.ceil((v+H)/8),D=V*j*k;if("xmd"===R)y=S(L,M,D,K);else if("xof"===R)y=I(L,M,D,H,K);else{if("_internal_pass"!==R)throw new Error('expand must be "xmd" or "xof"');y=L}for(var N=new Array(V),C=0;C{"use strict";var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.hashToPrivateScalar=O.FpSqrtEven=O.FpSqrtOdd=O.Field=O.nLength=O.FpIsSquare=O.FpDiv=O.FpInvertBatch=O.FpPow=O.validateField=O.isNegativeLE=O.FpSqrt=O.tonelliShanks=O.invert=O.pow2=O.pow=O.mod=void 0;var x=E(46928),f=BigInt(0),T=BigInt(1),g=BigInt(2),b=BigInt(3),l=BigInt(4),h=BigInt(5),u=BigInt(8);function m(G,H){var j=G%H;return j>=f?j:H+j}function _(G,H,j){if(j<=f||H 0");if(j===T)return f;for(var K=T;H>f;)H&T&&(K=K*G%j),G=G*G%j,H>>=T;return K}function w(G,H){if(G===f||H<=f)throw new Error("invert: expected positive integers, got n=".concat(G," mod=").concat(H));for(var j=m(G,H),K=H,R=f,o=T,y=T,M=f;j!==f;){var v=K/j,k=K%j,D=R-y*v,N=o-M*v;K=j,j=k,R=y,o=M,y=D,M=N}if(K!==T)throw new Error("invert: does not exist");return m(R,H)}function S(G){var H,j,K,R=(G-T)/g;for(H=G-T,j=0;H%g===f;H/=g,j++);for(K=g;Kf;)K*=K,K%=j;return K},O.invert=w,O.tonelliShanks=S,O.FpSqrt=I,O.isNegativeLE=function(G,H){return(m(G,H)&T)===T};var P=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function L(G,H,j){if(j 0");if(j===f)return G.ONE;if(j===T)return H;for(var K=G.ONE,R=H;j>f;)j&T&&(K=G.mul(K,R)),R=G.sqr(R),j>>=T;return K}function V(G,H){var j=new Array(H.length),K=H.reduce(function(o,y,M){return G.is0(y)?o:(j[M]=o,G.mul(o,y))},G.ONE),R=G.inv(K);return H.reduceRight(function(o,y,M){return G.is0(y)?o:(j[M]=G.mul(o,j[M]),G.mul(o,y))},R),j}function W(G,H){var j=void 0!==H?H:G.toString(2).length;return{nBitLength:j,nByteLength:Math.ceil(j/8)}}O.validateField=function(G){var H=P.reduce(function(j,K){return j[K]="function",j},{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,x.validateObject)(G,H)},O.FpPow=L,O.FpInvertBatch=V,O.FpDiv=function(G,H,j){return G.mul(H,"bigint"==typeof j?w(j,G.ORDER):G.inv(j))},O.FpIsSquare=function(G){var H=(G.ORDER-T)/g;return function(j){var K=G.pow(j,H);return G.eql(K,G.ZERO)||G.eql(K,G.ONE)}},O.nLength=W,O.Field=function(G,H){var j=arguments.length>2&&void 0!==arguments[2]&&arguments[2],K=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(G<=f)throw new Error("Expected Fp ORDER > 0, got ".concat(G));var R=W(G,H),o=R.nBitLength,y=R.nByteLength;if(y>2048)throw new Error("Field lengths over 2048 bytes are not supported");var M=I(G),v=Object.freeze({ORDER:G,BITS:o,BYTES:y,MASK:(0,x.bitMask)(o),ZERO:f,ONE:T,create:function(k){return m(k,G)},isValid:function(k){if("bigint"!=typeof k)throw new Error("Invalid field element: expected bigint, got ".concat((0,d.default)(k)));return f<=k&&k2&&void 0!==arguments[2]&&arguments[2],K=(G=(0,x.ensureBytes)("privateHash",G)).length,R=W(H).nByteLength+8;if(R<24||K1024)throw new Error("hashToPrivateScalar: expected ".concat(R,"-1024 bytes of input, got ").concat(K));return m(j?(0,x.bytesToNumberLE)(G):(0,x.bytesToNumberBE)(G),H-T)+T}},46928:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(74519)),f=d(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.validateObject=O.createHmacDrbg=O.bitMask=O.bitSet=O.bitGet=O.bitLen=O.utf8ToBytes=O.equalBytes=O.concatBytes=O.ensureBytes=O.numberToVarBytesBE=O.numberToBytesLE=O.numberToBytesBE=O.bytesToNumberLE=O.bytesToNumberBE=O.hexToBytes=O.hexToNumber=O.numberToHexUnpadded=O.bytesToHex=void 0;var T=BigInt(0),g=BigInt(1),b=BigInt(2),l=function(W){return W instanceof Uint8Array},h=Array.from({length:256},function(W,G){return G.toString(16).padStart(2,"0")});function u(W){if(!l(W))throw new Error("Uint8Array expected");for(var G="",H=0;HT;W>>=g,G+=1);return G},O.bitGet=function(W,G){return W>>BigInt(G)&g},O.bitSet=function(W,G,H){return W|(H?g:T)<0&&void 0!==arguments[0]?arguments[0]:P();K=y(L([0]),k),j=y(),0!==k.length&&(K=y(L([1]),k),j=y())},v=function(){if(R++>=1e3)throw new Error("drbg: tried 1000 values");for(var k=0,D=[];k2&&void 0!==arguments[2]?arguments[2]:{},j=function(k,D,N){var C=V[D];if("function"!=typeof C)throw new Error('Invalid validator "'.concat(D,'", expected function'));var a=W[k];if(!(N&&void 0===a||C(a,W)))throw new Error("Invalid param ".concat(String(k),"=").concat(a," (").concat((0,f.default)(a),"), expected ").concat(D))},K=0,R=Object.entries(G);K{"use strict";var d=E(28847),x=d(E(58985)),f=d(E(69721)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=d(E(22940)),h=d(E(90775)),u=d(E(3355));function m(y,M){var v=Object.keys(y);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(y);M&&(k=k.filter(function(D){return Object.getOwnPropertyDescriptor(y,D).enumerable})),v.push.apply(v,k)}return v}function _(y){for(var M=1;M0&&void 0!==arguments[0]?arguments[0]:"";return(0,f.default)(this,D),k.call(this,N)}return(0,x.default)(D)}((0,l.default)(Error)),_parseInt:function(y){var M=O.DER.Err;if(y.length<2||2!==y[0])throw new M("Invalid signature integer tag");var v=y[1],k=y.subarray(2,v+2);if(!v||k.length!==v)throw new M("Invalid signature integer: wrong length");if(128&k[0])throw new M("Invalid signature integer: negative");if(0===k[0]&&!(128&k[1]))throw new M("Invalid signature integer: unnecessary leading zero");return{d:L(k),l:y.subarray(v+2)}},toSig:function(y){var M=O.DER.Err,v="string"==typeof y?V(y):y;if(!(v instanceof Uint8Array))throw new Error("ui8a expected");var k=v.length;if(k<2||48!=v[0])throw new M("Invalid signature tag");if(v[1]!==k-2)throw new M("Invalid signature: incorrect length");var D=O.DER._parseInt(v.subarray(2)),N=D.d,a=O.DER._parseInt(D.l),B=a.d;if(a.l.length)throw new M("Invalid signature: left bytes after parsing");return{r:N,s:B}},hexFromSig:function(y){var M=function(Q){return 8&Number.parseInt(Q[0],16)?"00"+Q:Q},v=function(Q){var ee=Q.toString(16);return 1&ee.length?"0".concat(ee):ee},k=M(v(y.s)),D=M(v(y.r)),N=k.length/2,C=D.length/2,a=v(N),B=v(C);return"30".concat(v(C+N+4),"02").concat(B).concat(D,"02").concat(a).concat(k)}};var W=BigInt(0),G=BigInt(1),H=BigInt(2),j=BigInt(3),K=BigInt(4);function R(y){var M=function(ae){var Te=(0,P.validateBasic)(ae);S.validateObject(Te,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});var le=Te.endo,X=Te.Fp;if(le){if(!X.eql(Te.a,X.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==(0,u.default)(le)||"bigint"!=typeof le.beta||"function"!=typeof le.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(_({},Te))}(y),v=M.Fp,k=M.toBytes||function(ae,Te,le){var X=Te.toAffine();return S.concatBytes(Uint8Array.from([4]),v.toBytes(X.x),v.toBytes(X.y))},D=M.fromBytes||function(ae){var Te=ae.subarray(1);return{x:v.fromBytes(Te.subarray(0,v.BYTES)),y:v.fromBytes(Te.subarray(v.BYTES,2*v.BYTES))}};function N(ae){var Te=M.a,le=M.b,X=v.sqr(ae),ne=v.mul(X,ae);return v.add(v.add(ne,v.mul(ae,Te)),le)}if(!v.eql(v.sqr(M.Gy),N(M.Gx)))throw new Error("bad generator point: equation left != right");function C(ae){return"bigint"==typeof ae&&WW||Ce>W;)_e&G&&(ke=ke.add(Ee)),Ce&G&&(me=me.add(Ee)),Ee=Ee.double(),_e>>=G,Ce>>=G;return pe&&(ke=ke.negate()),xe&&(me=me.negate()),me=new ae(v.mul(me.px,X.beta),me.py,me.pz),ke.add(me)}},{key:"multiply",value:function(Te){a(Te);var le,X,ne=Te,pe=M.endo;if(pe){var _e=pe.splitScalar(ne),xe=_e.k1neg,ke=_e.k2neg,me=_e.k2,Ee=this.wNAF(_e.k1),ze=Ee.p,Ve=Ee.f,nt=this.wNAF(me),tt=nt.p,mt=nt.f;ze=we.constTimeNegate(xe,ze),tt=we.constTimeNegate(ke,tt),tt=new ae(v.mul(tt.px,pe.beta),tt.py,tt.pz),le=ze.add(tt),X=Ve.add(mt)}else{var ht=this.wNAF(ne);le=ht.p,X=ht.f}return ae.normalizeZ([le,X])[0]}},{key:"multiplyAndAddUnsafe",value:function(Te,le,X){var ne=ae.BASE,pe=function(xe,Ce){return Ce!==W&&Ce!==G&&xe.equals(ne)?xe.multiply(Ce):xe.multiplyUnsafe(Ce)},_e=pe(this,le).add(pe(Te,X));return _e.is0()?void 0:_e}},{key:"toAffine",value:function(Te){var le=this.px,X=this.py,ne=this.pz,pe=this.is0();null==Te&&(Te=pe?v.ONE:v.inv(ne));var _e=v.mul(le,Te),xe=v.mul(X,Te),Ce=v.mul(ne,Te);if(pe)return{x:v.ZERO,y:v.ZERO};if(!v.eql(Ce,v.ONE))throw new Error("invZ was invalid");return{x:_e,y:xe}}},{key:"isTorsionFree",value:function(){var le=M.isTorsionFree;if(M.h===G)return!0;if(le)return le(ae,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}},{key:"clearCofactor",value:function(){var le=M.clearCofactor;return M.h===G?this:le?le(ae,this):this.multiplyUnsafe(M.h)}},{key:"toRawBytes",value:function(){var Te=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),k(ae,this,Te)}},{key:"toHex",value:function(){var Te=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return S.bytesToHex(this.toRawBytes(Te))}}],[{key:"fromAffine",value:function(Te){var le=Te||{},X=le.x,ne=le.y;if(!Te||!v.isValid(X)||!v.isValid(ne))throw new Error("invalid affine point");if(Te instanceof ae)throw new Error("projective point not allowed");var pe=function(_e){return v.eql(_e,v.ZERO)};return pe(X)&&pe(ne)?ae.ZERO:new ae(X,ne,v.ONE)}},{key:"normalizeZ",value:function(Te){var le=v.invertBatch(Te.map(function(X){return X.pz}));return Te.map(function(X,ne){return X.toAffine(le[ne])}).map(ae.fromAffine)}},{key:"fromHex",value:function(Te){var le=ae.fromAffine(D((0,I.ensureBytes)("pointHex",Te)));return le.assertValidity(),le}},{key:"fromPrivateKey",value:function(Te){return ae.BASE.multiply(B(Te))}}]),ae}();ce.BASE=new ce(M.Gx,M.Gy,v.ONE),ce.ZERO=new ce(v.ZERO,v.ONE,v.ZERO);var ue=M.nBitLength,we=(0,P.wNAF)(ce,M.endo?Math.ceil(ue/2):ue);return{CURVE:M,ProjectivePoint:ce,normPrivateKeyToScalar:B,weierstrassEquation:N,isWithinCurveOrder:C}}function o(y,M){for(var v=y.ORDER,k=W,D=v-G;D%H===W;D/=H)k+=G;var N=k,C=H<G;Ee--){var ze=Ee-H,Ve=y.pow(ke,ze=H<N>>G}var X=function(Ve,nt,tt){return S.bytesToNumberBE(Ve.slice(nt,tt))},ne=function(){function Ve(nt,tt,mt){(0,f.default)(this,Ve),this.r=nt,this.s=tt,this.recovery=mt,this.assertValidity()}return(0,x.default)(Ve,[{key:"assertValidity",value:function(){if(!ae(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!ae(this.s))throw new Error("s must be 0 < s < CURVE.n")}},{key:"addRecoveryBit",value:function(nt){return new Ve(this.r,this.s,nt)}},{key:"recoverPublicKey",value:function(nt){var tt=this.r,mt=this.s,ht=this.recovery,wt=Ce((0,I.ensureBytes)("msgHash",nt));if(null==ht||![0,1,2,3].includes(ht))throw new Error("recovery id invalid");var Pt=2===ht||3===ht?tt+k.n:tt;if(Pt>=D.ORDER)throw new Error("recovery id 2 or 3 invalid");var Ye=ce.fromHex((0==(1&ht)?"02":"03")+Te(Pt)),gt=Q(Pt),St=B(-wt*gt),Wt=B(mt*gt),dn=ce.BASE.multiplyAndAddUnsafe(Ye,St,Wt);if(!dn)throw new Error("point at infinify");return dn.assertValidity(),dn}},{key:"hasHighS",value:function(){return le(this.s)}},{key:"normalizeS",value:function(){return this.hasHighS()?new Ve(this.r,B(-this.s),this.recovery):this}},{key:"toDERRawBytes",value:function(){return S.hexToBytes(this.toDERHex())}},{key:"toDERHex",value:function(){return O.DER.hexFromSig({r:this.r,s:this.s})}},{key:"toCompactRawBytes",value:function(){return S.hexToBytes(this.toCompactHex())}},{key:"toCompactHex",value:function(){return Te(this.r)+Te(this.s)}}],[{key:"fromCompact",value:function(nt){var tt=k.nByteLength;return nt=(0,I.ensureBytes)("compactSignature",nt,2*tt),new Ve(X(nt,0,tt),X(nt,tt,2*tt))}},{key:"fromDER",value:function(nt){var tt=O.DER.toSig((0,I.ensureBytes)("DER",nt));return new Ve(tt.r,tt.s)}}]),Ve}(),pe={isValidPrivateKey:function(Ve){try{return ue(Ve),!0}catch{return!1}},normPrivateKeyToScalar:ue,randomPrivateKey:function(){var Ve=k.randomBytes(D.BYTES+8),nt=w.hashToPrivateScalar(Ve,N);return S.numberToBytesBE(nt,k.nByteLength)},precompute:function(){var Ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,nt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce.BASE;return nt._setWindowSize(Ve),nt.multiply(BigInt(3)),nt}};function _e(Ve){var nt=Ve instanceof Uint8Array,tt="string"==typeof Ve,mt=(nt||tt)&&Ve.length;return nt?mt===C||mt===a:tt?mt===2*C||mt===2*a:Ve instanceof ce}var xe=k.bits2int||function(Ve){var nt=S.bytesToNumberBE(Ve),tt=8*Ve.length-k.nBitLength;return tt>0?nt>>BigInt(tt):nt},Ce=k.bits2int_modN||function(Ve){return B(xe(Ve))},ke=S.bitMask(k.nBitLength);function me(Ve){if("bigint"!=typeof Ve)throw new Error("bigint expected");if(!(W<=Ve&&Ve1&&void 0!==arguments[1])||arguments[1];return ce.fromPrivateKey(Ve).toRawBytes(nt)},getSharedSecret:function(Ve,nt){var tt=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(_e(Ve))throw new Error("first arg must be private key");if(!_e(nt))throw new Error("second arg must be public key");return ce.fromHex(nt).multiply(ue(Ve)).toRawBytes(tt)},sign:function(Ve,nt){var tt=function(Pt,st){var Ye=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee;if(["recovered","canonical"].some(function($n){return $n in Ye}))throw new Error("sign() legacy options not supported");var gt=k.hash,St=k.randomBytes,Wt=Ye.lowS,dn=Ye.prehash,Nt=Ye.extraEntropy;null==Wt&&(Wt=!0),Pt=(0,I.ensureBytes)("msgHash",Pt),dn&&(Pt=(0,I.ensureBytes)("prehashed msgHash",gt(Pt)));var It=Ce(Pt),qt=ue(st),jt=[me(qt),me(It)];if(null!=Nt){var Yt=!0===Nt?St(D.BYTES):Nt;jt.push((0,I.ensureBytes)("extraEntropy",Yt,D.BYTES))}var Wn=S.concatBytes.apply(S,jt),fn=It;return{seed:Wn,k2sig:function($n){var Kn,Yr=xe($n);if(ae(Yr)){var Ln=Q(Yr),Bn=ce.BASE.multiply(Yr).toAffine(),$r=B(Bn.x);if($r!==W){var Gn=B(Ln*B(fn+$r*qt));if(Gn!==W){var bn=(Bn.x===$r?0:2)|Number(Bn.y&G),Lr=Gn;return Wt&&le(Gn)&&(Lr=le(Kn=Gn)?B(-Kn):Kn,bn^=1),new ne($r,Lr,bn)}}}}}}(Ve,nt,arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee),mt=tt.seed,ht=tt.k2sig,wt=k;return S.createHmacDrbg(wt.hash.outputLen,wt.nByteLength,wt.hmac)(mt,ht)},verify:function(Ve,nt,tt){var mt,ht=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ze,wt=Ve;if(nt=(0,I.ensureBytes)("msgHash",nt),tt=(0,I.ensureBytes)("publicKey",tt),"strict"in ht)throw new Error("options.strict was renamed to lowS");var Pt,st=ht.lowS,Ye=ht.prehash,gt=void 0;try{if("string"==typeof wt||wt instanceof Uint8Array)try{gt=ne.fromDER(wt)}catch($n){if(!($n instanceof O.DER.Err))throw $n;gt=ne.fromCompact(wt)}else{if("object"!==(0,u.default)(wt)||"bigint"!=typeof wt.r||"bigint"!=typeof wt.s)throw new Error("PARSE");var St=wt.r,Wt=wt.s;gt=new ne(St,Wt)}Pt=ce.fromHex(tt)}catch($n){if("PARSE"===$n.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(st&>.hasHighS())return!1;Ye&&(nt=k.hash(nt));var dn=gt,Nt=dn.r,It=dn.s,qt=Ce(nt),jt=Q(It),Yt=B(qt*jt),Wn=B(Nt*jt),fn=null===(mt=ce.BASE.multiplyAndAddUnsafe(Pt,Yt,Wn))||void 0===mt?void 0:mt.toAffine();return!!fn&&B(fn.x)===Nt},ProjectivePoint:ce,Signature:ne,utils:pe}},O.SWUFpSqrtRatio=o,O.mapToCurveSimpleSWU=function(y,M){if(w.validateField(y),!y.isValid(M.A)||!y.isValid(M.B)||!y.isValid(M.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");var v=o(y,M.Z);if(!y.isOdd)throw new Error("Fp.isOdd is not implemented!");return function(k){var D,N,C,a,B,Q,ee,ce;D=y.sqr(k),D=y.mul(D,M.Z),N=y.sqr(D),N=y.add(N,D),C=y.add(N,y.ONE),C=y.mul(C,M.B),a=y.cmov(M.Z,y.neg(N),!y.eql(N,y.ZERO)),a=y.mul(a,M.A),N=y.sqr(C),Q=y.sqr(a),B=y.mul(Q,M.A),N=y.add(N,B),N=y.mul(N,C),Q=y.mul(Q,a),B=y.mul(Q,M.B),N=y.add(N,B),ee=y.mul(D,C);var ue=v(N,Q),we=ue.isValid,ae=ue.value;ce=y.mul(D,k),ce=y.mul(ce,ae),ee=y.cmov(ee,C,we),ce=y.cmov(ce,ae,we);var Te=y.isOdd(k)===y.isOdd(ce);return ce=y.cmov(y.neg(ce),ce,Te),{x:ee=y.div(ee,a),y:ce}}}},4158:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.encodeToCurve=O.hashToCurve=O.schnorr=O.secp256k1=void 0;var d=E(61241),x=E(72434),f=E(3970),T=E(16573),g=E(46928),b=E(19751),l=E(96546),h=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),u=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),m=BigInt(1),_=BigInt(2),w=function(B,Q){return(B+Q/_)/Q};function S(B){var Q=h,ee=BigInt(3),ce=BigInt(6),ue=BigInt(11),we=BigInt(22),ae=BigInt(23),Te=BigInt(44),le=BigInt(88),X=B*B*B%Q,ne=X*X*B%Q,pe=(0,f.pow2)(ne,ee,Q)*ne%Q,_e=(0,f.pow2)(pe,ee,Q)*ne%Q,xe=(0,f.pow2)(_e,_,Q)*X%Q,Ce=(0,f.pow2)(xe,ue,Q)*xe%Q,ke=(0,f.pow2)(Ce,we,Q)*Ce%Q,me=(0,f.pow2)(ke,Te,Q)*ke%Q,Ee=(0,f.pow2)(me,le,Q)*me%Q,ze=(0,f.pow2)(Ee,Te,Q)*ke%Q,Ve=(0,f.pow2)(ze,ee,Q)*ne%Q,nt=(0,f.pow2)(Ve,ae,Q)*Ce%Q,tt=(0,f.pow2)(nt,ce,Q)*X%Q,mt=(0,f.pow2)(tt,_,Q);if(!I.eql(I.sqr(mt),B))throw new Error("Cannot find square root");return mt}var I=(0,f.Field)(h,void 0,void 0,{sqrt:S});O.secp256k1=(0,l.createCurve)({a:BigInt(0),b:BigInt(7),Fp:I,n:u,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:function(B){var Q=u,ee=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),ce=-m*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),ue=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),we=ee,ae=BigInt("0x100000000000000000000000000000000"),Te=w(we*B,Q),le=w(-ce*B,Q),X=(0,f.mod)(B-Te*ee-le*ue,Q),ne=(0,f.mod)(-Te*ce-le*we,Q),pe=X>ae,_e=ne>ae;if(pe&&(X=Q-X),_e&&(ne=Q-ne),X>ae||ne>ae)throw new Error("splitScalar: Endomorphism failed, k="+B);return{k1neg:pe,k1:X,k2neg:_e,k2:ne}}}},d.sha256);var P=BigInt(0),L=function(B){return"bigint"==typeof B&&P1?ce-1:0),we=1;we2&&void 0!==arguments[2]?arguments[2]:(0,x.randomBytes)(32),ce=(0,g.ensureBytes)("message",B),ue=M(Q),we=ue.bytes,ae=ue.scalar,Te=(0,g.ensureBytes)("auxRand",ee,32),le=j(ae^(0,g.bytesToNumberBE)(G("BIP0340/aux",Te))),X=G("BIP0340/nonce",le,we,ce),ne=R((0,g.bytesToNumberBE)(X));if(ne===P)throw new Error("sign failed: k is zero");var pe=M(ne),_e=pe.bytes,xe=pe.scalar,Ce=k(_e,we,ce),ke=new Uint8Array(64);if(ke.set(_e,0),ke.set(j(R(xe+Ce*ae)),32),!D(ke,ce,we))throw new Error("sign: Invalid signature produced");return ke},verify:D,utils:{randomPrivateKey:O.secp256k1.utils.randomPrivateKey,lift_x:v,pointToBytes:H,numberToBytesBE:g.numberToBytesBE,bytesToNumberBE:g.bytesToNumberBE,taggedHash:G,mod:f.mod}};var N=(0,b.isogenyMap)(I,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(function(B){return B.map(function(Q){return BigInt(Q)})})),C=(0,T.mapToCurveSimpleSWU)(I,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:I.create(BigInt("-11"))}),a=(0,b.createHasher)(O.secp256k1.ProjectivePoint,function(B){var Q=C(I.create(B[0]));return N(Q.x,Q.y)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:I.ORDER,m:1,k:128,expand:"xmd",hash:d.sha256});O.hashToCurve=a.hashToCurve,O.encodeToCurve=a.encodeToCurve},96822:(z,O)=>{"use strict";function E(l){if(!Number.isSafeInteger(l)||l<0)throw new Error("Wrong positive integer: ".concat(l))}function d(l){if("boolean"!=typeof l)throw new Error("Expected boolean, not ".concat(l))}function x(l){if(!(l instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var h=arguments.length,u=new Array(h>1?h-1:0),m=1;m0&&!u.includes(l.length))throw new Error("Expected Uint8Array of length ".concat(u,", not of length=").concat(l.length))}function f(l){if("function"!=typeof l||"function"!=typeof l.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");E(l.outputLen),E(l.blockLen)}function T(l){var h=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(l.destroyed)throw new Error("Hash instance has been destroyed");if(h&&l.finished)throw new Error("Hash#digest() has already been called")}function g(l,h){x(l);var u=h.outputLen;if(l.length{"use strict";var d=E(28847),x=d(E(93106)),f=d(E(69721)),T=d(E(58985)),g=d(E(15163)),b=d(E(34650)),l=d(E(21949));Object.defineProperty(O,"__esModule",{value:!0}),O.SHA2=void 0;var h=E(96822),u=E(72434),m=function(_){(0,g.default)(P,_);var w,S,I=(w=P,S=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var L,V=(0,l.default)(w);if(S){var W=(0,l.default)(this).constructor;L=Reflect.construct(V,arguments,W)}else L=V.apply(this,arguments);return(0,b.default)(this,L)});function P(L,V,W,G){var H;return(0,f.default)(this,P),(H=I.call(this)).blockLen=L,H.outputLen=V,H.padOffset=W,H.isLE=G,H.finished=!1,H.length=0,H.pos=0,H.destroyed=!1,H.buffer=new Uint8Array(L),H.view=(0,u.createView)(H.buffer),H}return(0,T.default)(P,[{key:"update",value:function(L){h.default.exists(this);for(var V=this.view,W=this.buffer,G=this.blockLen,H=(L=(0,u.toBytes)(L)).length,j=0;jG-j&&(this.process(W,0),j=0);for(var K=j;K>a&B),ee=Number(N&B),ue=C?0:4;k.setUint32(D+(C?4:0),Q,C),k.setUint32(D+ue,ee,C)})(W,G-8,BigInt(8*this.length),H),this.process(W,0);var R=(0,u.createView)(L),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var y=o/4,M=this.get();if(y>M.length)throw new Error("_sha2: outputLen bigger than state");for(var v=0;v{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.add=O.toBig=O.split=O.fromBig=void 0;var E=BigInt(Math.pow(2,32)-1),d=BigInt(32);function x(b){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(b&E),l:Number(b>>d&E)}:{h:0|Number(b>>d&E),l:0|Number(b&E)}}function f(b){for(var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=new Uint32Array(b.length),u=new Uint32Array(b.length),m=0;m>>0)+(u>>>0);return{h:b+h+(m/Math.pow(2,32)|0)|0,l:0|m}}O.fromBig=x,O.split=f,O.toBig=function(b,l){return BigInt(b>>>0)<>>0)},O.add=T,O.default={fromBig:x,split:f,toBig:O.toBig,shrSH:function(b,l,h){return b>>>h},shrSL:function(b,l,h){return b<<32-h|l>>>h},rotrSH:function(b,l,h){return b>>>h|l<<32-h},rotrSL:function(b,l,h){return b<<32-h|l>>>h},rotrBH:function(b,l,h){return b<<64-h|l>>>h-32},rotrBL:function(b,l,h){return b>>>h-32|l<<64-h},rotr32H:function(b,l){return l},rotr32L:function(b,l){return b},rotlSH:function(b,l,h){return b<>>32-h},rotlSL:function(b,l,h){return l<>>32-h},rotlBH:function(b,l,h){return l<>>64-h},rotlBL:function(b,l,h){return b<>>64-h},add:T,add3L:function(b,l,h){return(b>>>0)+(l>>>0)+(h>>>0)},add3H:function(b,l,h,u){return l+h+u+(b/Math.pow(2,32)|0)|0},add4L:function(b,l,h,u){return(b>>>0)+(l>>>0)+(h>>>0)+(u>>>0)},add4H:function(b,l,h,u,m){return l+h+u+m+(b/Math.pow(2,32)|0)|0},add5H:function(b,l,h,u,m,_){return l+h+u+m+_+(b/Math.pow(2,32)|0)|0},add5L:function(b,l,h,u,m){return(b>>>0)+(l>>>0)+(h>>>0)+(u>>>0)+(m>>>0)}}},39712:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.crypto=void 0,O.crypto="object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))&&"crypto"in globalThis?globalThis.crypto:void 0},45896:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949));Object.defineProperty(O,"__esModule",{value:!0}),O.hmac=O.HMAC=void 0;var l=E(96822),h=E(72434),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P,L){var V;(0,x.default)(this,I),(V=S.call(this)).finished=!1,V.destroyed=!1,l.default.hash(P);var W=(0,h.toBytes)(L);if(V.iHash=P.create(),"function"!=typeof V.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");V.blockLen=V.iHash.blockLen,V.outputLen=V.iHash.outputLen;var G=V.blockLen,H=new Uint8Array(G);H.set(W.length>G?P.create().update(W).digest():W);for(var j=0;j{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949));function l(L){var V=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var W,G=(0,b.default)(L);if(V){var H=(0,b.default)(this).constructor;W=Reflect.construct(G,arguments,H)}else W=G.apply(this,arguments);return(0,g.default)(this,W)}}Object.defineProperty(O,"__esModule",{value:!0}),O.sha224=O.sha256=void 0;var h=E(20330),u=E(72434),m=function(L,V,W){return L&V^L&W^V&W},_=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]),w=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),S=new Uint32Array(64),I=function(L){(0,T.default)(W,L);var V=l(W);function W(){var G;return(0,x.default)(this,W),(G=V.call(this,64,32,8,!1)).A=0|w[0],G.B=0|w[1],G.C=0|w[2],G.D=0|w[3],G.E=0|w[4],G.F=0|w[5],G.G=0|w[6],G.H=0|w[7],G}return(0,f.default)(W,[{key:"get",value:function(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}},{key:"set",value:function(G,H,j,K,R,o,y,M){this.A=0|G,this.B=0|H,this.C=0|j,this.D=0|K,this.E=0|R,this.F=0|o,this.G=0|y,this.H=0|M}},{key:"process",value:function(G,H){for(var j=0;j<16;j++,H+=4)S[j]=G.getUint32(H,!1);for(var K=16;K<64;K++){var R=S[K-15],o=S[K-2],y=(0,u.rotr)(R,7)^(0,u.rotr)(R,18)^R>>>3,M=(0,u.rotr)(o,17)^(0,u.rotr)(o,19)^o>>>10;S[K]=M+S[K-7]+y+S[K-16]|0}var v,k=this.A,D=this.B,N=this.C,C=this.D,a=this.E,B=this.F,Q=this.G,ee=this.H;for(j=0;j<64;j++){var ce=ee+((0,u.rotr)(a,6)^(0,u.rotr)(a,11)^(0,u.rotr)(a,25))+((v=a)&B^~v&Q)+_[j]+S[j]|0,ue=((0,u.rotr)(k,2)^(0,u.rotr)(k,13)^(0,u.rotr)(k,22))+m(k,D,N)|0;ee=Q,Q=B,B=a,a=C+ce|0,C=N,N=D,D=k,k=ce+ue|0}this.set(k=k+this.A|0,D=D+this.B|0,N=N+this.C|0,C=C+this.D|0,a=a+this.E|0,B=B+this.F|0,Q=Q+this.G|0,ee=ee+this.H|0)}},{key:"roundClean",value:function(){S.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),W}(h.SHA2),P=function(L){(0,T.default)(W,L);var V=l(W);function W(){var G;return(0,x.default)(this,W),(G=V.call(this)).A=-1056596264,G.B=914150663,G.C=812702999,G.D=-150054599,G.E=-4191439,G.F=1750603025,G.G=1694076839,G.H=-1090891868,G.outputLen=28,G}return(0,f.default)(W)}(I);O.sha256=(0,u.wrapConstructor)(function(){return new I}),O.sha224=(0,u.wrapConstructor)(function(){return new P})},64376:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=d(E(74519));Object.defineProperty(O,"__esModule",{value:!0}),O.shake256=O.shake128=O.keccak_512=O.keccak_384=O.keccak_256=O.keccak_224=O.sha3_512=O.sha3_384=O.sha3_256=O.sha3_224=O.Keccak=O.keccakP=void 0;for(var h=E(96822),u=E(64356),m=E(72434),_=[],w=[],S=[],I=BigInt(0),P=BigInt(1),L=BigInt(2),V=BigInt(7),W=BigInt(256),G=BigInt(113),H=0,j=P,K=1,R=0;H<24;H++){var o=[R,(2*K+3*R)%5];_.push(2*(5*(R=o[1])+(K=o[0]))),w.push((H+1)*(H+2)/2%64);for(var y=I,M=0;M<7;M++)(j=(j<>V)*G)%W)&L&&(y^=P<<(P<32?u.default.rotlBH(ue,we,ae):u.default.rotlSH(ue,we,ae)},a=function(ue,we,ae){return ae>32?u.default.rotlBL(ue,we,ae):u.default.rotlSL(ue,we,ae)};function B(ue){for(var we=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,ae=new Uint32Array(10),Te=24-we;Te<24;Te++){for(var le=0;le<10;le++)ae[le]=ue[le]^ue[le+10]^ue[le+20]^ue[le+30]^ue[le+40];for(var X=0;X<10;X+=2)for(var ne=(X+8)%10,pe=(X+2)%10,_e=ae[pe],xe=ae[pe+1],Ce=C(_e,xe,1)^ae[ne],ke=a(_e,xe,1)^ae[ne+1],me=0;me<50;me+=10)ue[X+me]^=Ce,ue[X+me+1]^=ke;for(var Ee=ue[2],ze=ue[3],Ve=0;Ve<24;Ve++){var nt=w[Ve],tt=C(Ee,ze,nt),mt=a(Ee,ze,nt),ht=_[Ve];Ee=ue[ht],ze=ue[ht+1],ue[ht]=tt,ue[ht+1]=mt}for(var wt=0;wt<50;wt+=10){for(var Pt=0;Pt<10;Pt++)ae[Pt]=ue[wt+Pt];for(var st=0;st<10;st++)ue[wt+st]^=~ae[(st+2)%10]&ae[(st+4)%10]}ue[0]^=D[Te],ue[1]^=N[Te]}ae.fill(0)}O.keccakP=B;var Q=function(ue){(0,T.default)(le,ue);var we,ae,Te=(we=le,ae=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var X,ne=(0,b.default)(we);if(ae){var pe=(0,b.default)(this).constructor;X=Reflect.construct(ne,arguments,pe)}else X=ne.apply(this,arguments);return(0,g.default)(this,X)});function le(X,ne,pe){var _e,xe=arguments.length>3&&void 0!==arguments[3]&&arguments[3],Ce=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if((0,x.default)(this,le),(_e=Te.call(this)).blockLen=X,_e.suffix=ne,_e.outputLen=pe,_e.enableXOF=xe,_e.rounds=Ce,_e.pos=0,_e.posOut=0,_e.finished=!1,_e.destroyed=!1,h.default.number(pe),0>=_e.blockLen||_e.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return _e.state=new Uint8Array(200),_e.state32=(0,m.u32)(_e.state),_e}return(0,f.default)(le,[{key:"keccak",value:function(){B(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(X){h.default.exists(this);for(var ne=this.blockLen,pe=this.state,_e=(X=(0,m.toBytes)(X)).length,xe=0;xe<_e;){for(var Ce=Math.min(ne-this.pos,_e-xe),ke=0;ke=pe&&this.keccak();var Ce=Math.min(pe-this.posOut,xe-_e);X.set(ne.subarray(this.posOut,this.posOut+Ce),_e),this.posOut+=Ce,_e+=Ce}return X}},{key:"xofInto",value:function(X){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(X)}},{key:"xof",value:function(X){return h.default.number(X),this.xofInto(new Uint8Array(X))}},{key:"digestInto",value:function(X){if(h.default.output(X,this),this.finished)throw new Error("digest() was already called");return this.writeInto(X),this.destroy(),X}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(X){var pe=this.suffix,_e=this.outputLen,xe=this.rounds,Ce=this.enableXOF;return X||(X=new le(this.blockLen,pe,_e,Ce,xe)),X.state32.set(this.state32),X.pos=this.pos,X.posOut=this.posOut,X.finished=this.finished,X.rounds=xe,X.suffix=pe,X.outputLen=_e,X.enableXOF=Ce,X.destroyed=this.destroyed,X}}]),le}(m.Hash);O.Keccak=Q;var ee=function(ue,we,ae){return(0,m.wrapConstructor)(function(){return new Q(we,ue,ae)})};O.sha3_224=ee(6,144,28),O.sha3_256=ee(6,136,32),O.sha3_384=ee(6,104,48),O.sha3_512=ee(6,72,64),O.keccak_224=ee(1,144,28),O.keccak_256=ee(1,136,32),O.keccak_384=ee(1,104,48),O.keccak_512=ee(1,72,64);var ce=function(ue,we,ae){return(0,m.wrapXOFConstructorWithOpts)(function(){var Te=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Q(we,ue,void 0===Te.dkLen?ae:Te.dkLen,!0)})};O.shake128=ce(31,168,16),O.shake256=ce(31,136,32)},72434:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(69721)),T=d(E(58985)),g=d(E(94571)),b=d(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.randomBytes=O.wrapXOFConstructorWithOpts=O.wrapConstructorWithOpts=O.wrapConstructor=O.checkOpts=O.Hash=O.concatBytes=O.toBytes=O.utf8ToBytes=O.asyncLoop=O.nextTick=O.hexToBytes=O.bytesToHex=O.isLE=O.rotr=O.createView=O.u32=O.u8=void 0;var l=E(39712),h=function(P){return P instanceof Uint8Array};if(O.u8=function(P){return new Uint8Array(P.buffer,P.byteOffset,P.byteLength)},O.u32=function(P){return new Uint32Array(P.buffer,P.byteOffset,Math.floor(P.byteLength/4))},O.createView=function(P){return new DataView(P.buffer,P.byteOffset,P.byteLength)},O.rotr=function(P,L){return P<<32-L|P>>>L},O.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!O.isLE)throw new Error("Non little-endian hardware is not supported");var u=Array.from({length:256},function(P,L){return L.toString(16).padStart(2,"0")});O.bytesToHex=function(P){if(!h(P))throw new Error("Uint8Array expected");for(var L="",V=0;V=0&&j0&&void 0!==arguments[0]?arguments[0]:32;if(l.crypto&&"function"==typeof l.crypto.getRandomValues)return l.crypto.getRandomValues(new Uint8Array(P));throw new Error("crypto.getRandomValues must be defined")}},53368:(z,O,E)=>{"use strict";var d,x,f=E(28847)(E(3355));void 0===(x="function"==typeof(d=function(){function T(L,V){if(!(L instanceof V))throw new TypeError("Cannot call a class as a function")}function g(L,V){for(var W=0;W{"use strict";var d=O;d.bignum=E(31734),d.define=E(41568).define,d.base=E(12412),d.constants=E(79387),d.decoders=E(61500),d.encoders=E(47506)},41568:(z,O,E)=>{"use strict";var d=E(47506),x=E(61500),f=E(41736);function T(g,b){this.name=g,this.body=b,this.decoders={},this.encoders={}}O.define=function(g,b){return new T(g,b)},T.prototype._createNamed=function(g){var b=this.name;function l(h){this._initNamed(h,b)}return f(l,g),l.prototype._initNamed=function(h,u){g.call(this,h,u)},new l(this)},T.prototype._getDecoder=function(g){return this.decoders.hasOwnProperty(g=g||"der")||(this.decoders[g]=this._createNamed(x[g])),this.decoders[g]},T.prototype.decode=function(g,b,l){return this._getDecoder(b).decode(g,l)},T.prototype._getEncoder=function(g){return this.encoders.hasOwnProperty(g=g||"der")||(this.encoders[g]=this._createNamed(d[g])),this.encoders[g]},T.prototype.encode=function(g,b,l){return this._getEncoder(b).encode(g,l)}},90585:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(41736),f=E(32719).b,T=E(11755).Buffer;function g(l,h){f.call(this,h),T.isBuffer(l)?(this.base=l,this.offset=0,this.length=l.length):this.error("Input not Buffer")}function b(l,h){if(Array.isArray(l))this.length=0,this.value=l.map(function(u){return b.isEncoderBuffer(u)||(u=new b(u,h)),this.length+=u.length,u},this);else if("number"==typeof l){if(!(0<=l&&l<=255))return h.error("non-byte EncoderBuffer value");this.value=l,this.length=1}else if("string"==typeof l)this.value=l,this.length=T.byteLength(l);else{if(!T.isBuffer(l))return h.error("Unsupported type: "+(0,d.default)(l));this.value=l,this.length=l.length}}x(g,f),O.C=g,g.isDecoderBuffer=function(l){return l instanceof g||"object"===(0,d.default)(l)&&T.isBuffer(l.base)&&"DecoderBuffer"===l.constructor.name&&"number"==typeof l.offset&&"number"==typeof l.length&&"function"==typeof l.save&&"function"==typeof l.restore&&"function"==typeof l.isEmpty&&"function"==typeof l.readUInt8&&"function"==typeof l.skip&&"function"==typeof l.raw},g.prototype.save=function(){return{offset:this.offset,reporter:f.prototype.save.call(this)}},g.prototype.restore=function(l){var h=new g(this.base);return h.offset=l.offset,h.length=this.offset,this.offset=l.offset,f.prototype.restore.call(this,l.reporter),h},g.prototype.isEmpty=function(){return this.offset===this.length},g.prototype.readUInt8=function(l){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(l||"DecoderBuffer overrun")},g.prototype.skip=function(l,h){if(!(this.offset+l<=this.length))return this.error(h||"DecoderBuffer overrun");var u=new g(this.base);return u._reporterState=this._reporterState,u.offset=this.offset,u.length=this.offset+l,this.offset+=l,u},g.prototype.raw=function(l){return this.base.slice(l?l.offset:this.offset,this.length)},O.R=b,b.isEncoderBuffer=function(l){return l instanceof b||"object"===(0,d.default)(l)&&"EncoderBuffer"===l.constructor.name&&"number"==typeof l.length&&"function"==typeof l.join},b.prototype.join=function(l,h){return l||(l=T.alloc(this.length)),h||(h=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(u){u.join(l,h),h+=u.length}):("number"==typeof this.value?l[h]=this.value:"string"==typeof this.value?l.write(this.value,h):T.isBuffer(this.value)&&this.value.copy(l,h),h+=this.length)),l}},12412:(z,O,E)=>{"use strict";var d=O;d.Reporter=E(32719).b,d.DecoderBuffer=E(90585).C,d.EncoderBuffer=E(90585).R,d.Node=E(51371)},51371:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(32719).b,f=E(90585).R,T=E(90585).C,g=E(94504),b=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(b);function h(m,_,w){var S={};this._baseState=S,S.name=w,S.enc=m,S.parent=_||null,S.children=null,S.tag=null,S.args=null,S.reverseArgs=null,S.choice=null,S.optional=!1,S.any=!1,S.obj=!1,S.use=null,S.useDecoder=null,S.key=null,S.default=null,S.explicit=null,S.implicit=null,S.contains=null,S.parent||(S.children=[],this._wrap())}z.exports=h;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){var m=this._baseState,_={};u.forEach(function(S){_[S]=m[S]});var w=new this.constructor(_.parent);return w._baseState=_,w},h.prototype._wrap=function(){var m=this._baseState;l.forEach(function(_){this[_]=function(){var w=new this.constructor(this);return m.children.push(w),w[_].apply(w,arguments)}},this)},h.prototype._init=function(m){var _=this._baseState;g(null===_.parent),m.call(this),_.children=_.children.filter(function(w){return w._baseState.parent===this},this),g.equal(_.children.length,1,"Root node can have only one child")},h.prototype._useArgs=function(m){var _=this._baseState,w=m.filter(function(S){return S instanceof this.constructor},this);m=m.filter(function(S){return!(S instanceof this.constructor)},this),0!==w.length&&(g(null===_.children),_.children=w,w.forEach(function(S){S._baseState.parent=this},this)),0!==m.length&&(g(null===_.args),_.args=m,_.reverseArgs=m.map(function(S){if("object"!==(0,d.default)(S)||S.constructor!==Object)return S;var I={};return Object.keys(S).forEach(function(P){P==(0|P)&&(P|=0),I[S[P]]=P}),I}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(m){h.prototype[m]=function(){throw new Error(m+" not implemented for encoding: "+this._baseState.enc)}}),b.forEach(function(m){h.prototype[m]=function(){var _=this._baseState,w=Array.prototype.slice.call(arguments);return g(null===_.tag),_.tag=m,this._useArgs(w),this}}),h.prototype.use=function(m){g(m);var _=this._baseState;return g(null===_.use),_.use=m,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(m){var _=this._baseState;return g(null===_.default),_.default=m,_.optional=!0,this},h.prototype.explicit=function(m){var _=this._baseState;return g(null===_.explicit&&null===_.implicit),_.explicit=m,this},h.prototype.implicit=function(m){var _=this._baseState;return g(null===_.explicit&&null===_.implicit),_.implicit=m,this},h.prototype.obj=function(){var m=this._baseState,_=Array.prototype.slice.call(arguments);return m.obj=!0,0!==_.length&&this._useArgs(_),this},h.prototype.key=function(m){var _=this._baseState;return g(null===_.key),_.key=m,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(m){var _=this._baseState;return g(null===_.choice),_.choice=m,this._useArgs(Object.keys(m).map(function(w){return m[w]})),this},h.prototype.contains=function(m){var _=this._baseState;return g(null===_.use),_.contains=m,this},h.prototype._decode=function(m,_){var w=this._baseState;if(null===w.parent)return m.wrapResult(w.children[0]._decode(m,_));var S,I=w.default,P=!0,L=null;if(null!==w.key&&(L=m.enterKey(w.key)),w.optional){var V=null;if(null!==w.explicit?V=w.explicit:null!==w.implicit?V=w.implicit:null!==w.tag&&(V=w.tag),null!==V||w.any){if(P=this._peekTag(m,V,w.any),m.isError(P))return P}else{var W=m.save();try{null===w.choice?this._decodeGeneric(w.tag,m,_):this._decodeChoice(m,_),P=!0}catch{P=!1}m.restore(W)}}if(w.obj&&P&&(S=m.enterObject()),P){if(null!==w.explicit){var G=this._decodeTag(m,w.explicit);if(m.isError(G))return G;m=G}var H=m.offset;if(null===w.use&&null===w.choice){var j;w.any&&(j=m.save());var K=this._decodeTag(m,null!==w.implicit?w.implicit:w.tag,w.any);if(m.isError(K))return K;w.any?I=m.raw(j):m=K}if(_&&_.track&&null!==w.tag&&_.track(m.path(),H,m.length,"tagged"),_&&_.track&&null!==w.tag&&_.track(m.path(),m.offset,m.length,"content"),w.any||(I=null===w.choice?this._decodeGeneric(w.tag,m,_):this._decodeChoice(m,_)),m.isError(I))return I;if(w.any||null!==w.choice||null===w.children||w.children.forEach(function(o){o._decode(m,_)}),w.contains&&("octstr"===w.tag||"bitstr"===w.tag)){var R=new T(I);I=this._getUse(w.contains,m._reporterState.obj)._decode(R,_)}}return w.obj&&P&&(I=m.leaveObject(S)),null===w.key||null===I&&!0!==P?null!==L&&m.exitKey(L):m.leaveKey(L,w.key,I),I},h.prototype._decodeGeneric=function(m,_,w){var S=this._baseState;return"seq"===m||"set"===m?null:"seqof"===m||"setof"===m?this._decodeList(_,m,S.args[0],w):/str$/.test(m)?this._decodeStr(_,m,w):"objid"===m&&S.args?this._decodeObjid(_,S.args[0],S.args[1],w):"objid"===m?this._decodeObjid(_,null,null,w):"gentime"===m||"utctime"===m?this._decodeTime(_,m,w):"null_"===m?this._decodeNull(_,w):"bool"===m?this._decodeBool(_,w):"objDesc"===m?this._decodeStr(_,m,w):"int"===m||"enum"===m?this._decodeInt(_,S.args&&S.args[0],w):null!==S.use?this._getUse(S.use,_._reporterState.obj)._decode(_,w):_.error("unknown tag: "+m)},h.prototype._getUse=function(m,_){var w=this._baseState;return w.useDecoder=this._use(m,_),g(null===w.useDecoder._baseState.parent),w.useDecoder=w.useDecoder._baseState.children[0],w.implicit!==w.useDecoder._baseState.implicit&&(w.useDecoder=w.useDecoder.clone(),w.useDecoder._baseState.implicit=w.implicit),w.useDecoder},h.prototype._decodeChoice=function(m,_){var w=this._baseState,S=null,I=!1;return Object.keys(w.choice).some(function(P){var L=m.save(),V=w.choice[P];try{var W=V._decode(m,_);if(m.isError(W))return!1;S={type:P,value:W},I=!0}catch{return m.restore(L),!1}return!0},this),I?S:m.error("Choice not matched")},h.prototype._createEncoderBuffer=function(m){return new f(m,this.reporter)},h.prototype._encode=function(m,_,w){var S=this._baseState;if(null===S.default||S.default!==m){var I=this._encodeValue(m,_,w);if(void 0!==I&&!this._skipDefault(I,_,w))return I}},h.prototype._encodeValue=function(m,_,w){var S=this._baseState;if(null===S.parent)return S.children[0]._encode(m,_||new x);var I=null;if(this.reporter=_,S.optional&&void 0===m){if(null===S.default)return;m=S.default}var P=null,L=!1;if(S.any)I=this._createEncoderBuffer(m);else if(S.choice)I=this._encodeChoice(m,_);else if(S.contains)P=this._getUse(S.contains,w)._encode(m,_),L=!0;else if(S.children)P=S.children.map(function(H){if("null_"===H._baseState.tag)return H._encode(null,_,m);if(null===H._baseState.key)return _.error("Child should have a key");var j=_.enterKey(H._baseState.key);if("object"!==(0,d.default)(m))return _.error("Child expected, but input is not object");var K=H._encode(m[H._baseState.key],_,m);return _.leaveKey(j),K},this).filter(function(H){return H}),P=this._createEncoderBuffer(P);else if("seqof"===S.tag||"setof"===S.tag){if(!S.args||1!==S.args.length)return _.error("Too many args for : "+S.tag);if(!Array.isArray(m))return _.error("seqof/setof, but data is not Array");var V=this.clone();V._baseState.implicit=null,P=this._createEncoderBuffer(m.map(function(H){return this._getUse(this._baseState.args[0],m)._encode(H,_)},V))}else null!==S.use?I=this._getUse(S.use,w)._encode(m,_):(P=this._encodePrimitive(S.tag,m),L=!0);if(!S.any&&null===S.choice){var W=null!==S.implicit?S.implicit:S.tag,G=null===S.implicit?"universal":"context";null===W?null===S.use&&_.error("Tag could be omitted only for .use()"):null===S.use&&(I=this._encodeComposite(W,L,G,P))}return null!==S.explicit&&(I=this._encodeComposite(S.explicit,!1,"context",I)),I},h.prototype._encodeChoice=function(m,_){var w=this._baseState,S=w.choice[m.type];return S||g(!1,m.type+" not found in "+JSON.stringify(Object.keys(w.choice))),S._encode(m.value,_)},h.prototype._encodePrimitive=function(m,_){var w=this._baseState;if(/str$/.test(m))return this._encodeStr(_,m);if("objid"===m&&w.args)return this._encodeObjid(_,w.reverseArgs[0],w.args[1]);if("objid"===m)return this._encodeObjid(_,null,null);if("gentime"===m||"utctime"===m)return this._encodeTime(_,m);if("null_"===m)return this._encodeNull();if("int"===m||"enum"===m)return this._encodeInt(_,w.args&&w.reverseArgs[0]);if("bool"===m)return this._encodeBool(_);if("objDesc"===m)return this._encodeStr(_,m);throw new Error("Unsupported tag: "+m)},h.prototype._isNumstr=function(m){return/^[0-9 ]*$/.test(m)},h.prototype._isPrintstr=function(m){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(m)}},32719:(z,O,E)=>{"use strict";var d=E(41736);function x(T){this._reporterState={obj:null,path:[],options:T||{},errors:[]}}function f(T,g){this.path=T,this.rethrow(g)}O.b=x,x.prototype.isError=function(T){return T instanceof f},x.prototype.save=function(){var T=this._reporterState;return{obj:T.obj,pathLen:T.path.length}},x.prototype.restore=function(T){var g=this._reporterState;g.obj=T.obj,g.path=g.path.slice(0,T.pathLen)},x.prototype.enterKey=function(T){return this._reporterState.path.push(T)},x.prototype.exitKey=function(T){var g=this._reporterState;g.path=g.path.slice(0,T-1)},x.prototype.leaveKey=function(T,g,b){var l=this._reporterState;this.exitKey(T),null!==l.obj&&(l.obj[g]=b)},x.prototype.path=function(){return this._reporterState.path.join("/")},x.prototype.enterObject=function(){var T=this._reporterState,g=T.obj;return T.obj={},g},x.prototype.leaveObject=function(T){var g=this._reporterState,b=g.obj;return g.obj=T,b},x.prototype.error=function(T){var g,b=this._reporterState,l=T instanceof f;if(g=l?T:new f(b.path.map(function(h){return"["+JSON.stringify(h)+"]"}).join(""),T.message||T,T.stack),!b.options.partial)throw g;return l||b.errors.push(g),g},x.prototype.wrapResult=function(T){var g=this._reporterState;return g.options.partial?{result:this.isError(T)?null:T,errors:g.errors}:T},d(f,Error),f.prototype.rethrow=function(T){if(this.message=T+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,f),!this.stack)try{throw new Error(this.message)}catch(g){this.stack=g.stack}return this}},6520:(z,O)=>{"use strict";function E(d){var x={};return Object.keys(d).forEach(function(f){(0|f)==f&&(f|=0),x[d[f]]=f}),x}O.tagClass={0:"universal",1:"application",2:"context",3:"private"},O.tagClassByName=E(O.tagClass),O.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},O.tagByName=E(O.tag)},79387:(z,O,E)=>{"use strict";var d=O;d._reverse=function(x){var f={};return Object.keys(x).forEach(function(T){(0|T)==T&&(T|=0),f[x[T]]=T}),f},d.der=E(6520)},92387:(z,O,E)=>{"use strict";var d=E(41736),x=E(31734),f=E(90585).C,T=E(51371),g=E(6520);function b(m){this.enc="der",this.name=m.name,this.entity=m,this.tree=new l,this.tree._init(m.body)}function l(m){T.call(this,"der",m)}function h(m,_){var w=m.readUInt8(_);if(m.isError(w))return w;var S=g.tagClass[w>>6],I=0==(32&w);if(31==(31&w)){var P=w;for(w=0;128==(128&P);){if(P=m.readUInt8(_),m.isError(P))return P;w<<=7,w|=127&P}}else w&=31;return{cls:S,primitive:I,tag:w,tagStr:g.tag[w]}}function u(m,_,w){var S=m.readUInt8(w);if(m.isError(S))return S;if(!_&&128===S)return null;if(0==(128&S))return S;var I=127&S;if(I>4)return m.error("length octect is too long");S=0;for(var P=0;P{"use strict";var d=O;d.der=E(92387),d.pem=E(50529)},50529:(z,O,E)=>{"use strict";var d=E(41736),x=E(11755).Buffer,f=E(92387);function T(g){f.call(this,g),this.enc="pem"}d(T,f),z.exports=T,T.prototype.decode=function(g,b){for(var l=g.toString().split(/[\r\n]+/g),h=b.label.toUpperCase(),u=/^-----(BEGIN|END) ([^-]+)-----$/,m=-1,_=-1,w=0;w{"use strict";var d=E(41736),x=E(11755).Buffer,f=E(51371),T=E(6520);function g(h){this.enc="der",this.name=h.name,this.entity=h,this.tree=new b,this.tree._init(h.body)}function b(h){f.call(this,"der",h)}function l(h){return h<10?"0"+h:h}z.exports=g,g.prototype.encode=function(h,u){return this.tree._encode(h,u).join()},d(b,f),b.prototype._encodeComposite=function(h,u,m,_){var w=function(G,H,j,K){var R;if("seqof"===G?G="seq":"setof"===G&&(G="set"),T.tagByName.hasOwnProperty(G))R=T.tagByName[G];else{if("number"!=typeof G||(0|G)!==G)return K.error("Unknown tag: "+G);R=G}return R>=31?K.error("Multi-octet tag encoding unsupported"):(H||(R|=32),R|=T.tagClassByName[j||"universal"]<<6)}(h,u,m,this.reporter);if(_.length<128){var S=x.alloc(2);return S[0]=w,S[1]=_.length,this._createEncoderBuffer([S,_])}for(var I=1,P=_.length;P>=256;P>>=8)I++;var L=x.alloc(2+I);L[0]=w,L[1]=128|I;for(var V=1+I,W=_.length;W>0;V--,W>>=8)L[V]=255&W;return this._createEncoderBuffer([L,_])},b.prototype._encodeStr=function(h,u){if("bitstr"===u)return this._createEncoderBuffer([0|h.unused,h.data]);if("bmpstr"===u){for(var m=x.alloc(2*h.length),_=0;_=40)return this.reporter.error("Second objid identifier OOB");h.splice(0,2,40*h[0]+h[1])}for(var S=0,I=0;I=128;P>>=7)S++}for(var L=x.alloc(S),V=L.length-1,W=h.length-1;W>=0;W--){var G=h[W];for(L[V--]=127&G;(G>>=7)>0;)L[V--]=128|127&G}return this._createEncoderBuffer(L)},b.prototype._encodeTime=function(h,u){var m,_=new Date(h);return"gentime"===u?m=[l(_.getUTCFullYear()),l(_.getUTCMonth()+1),l(_.getUTCDate()),l(_.getUTCHours()),l(_.getUTCMinutes()),l(_.getUTCSeconds()),"Z"].join(""):"utctime"===u?m=[l(_.getUTCFullYear()%100),l(_.getUTCMonth()+1),l(_.getUTCDate()),l(_.getUTCHours()),l(_.getUTCMinutes()),l(_.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+u+" time is not supported yet"),this._encodeStr(m,"octstr")},b.prototype._encodeNull=function(){return this._createEncoderBuffer("")},b.prototype._encodeInt=function(h,u){if("string"==typeof h){if(!u)return this.reporter.error("String int or enum given, but no values map");if(!u.hasOwnProperty(h))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(h));h=u[h]}if("number"!=typeof h&&!x.isBuffer(h)){var m=h.toArray();!h.sign&&128&m[0]&&m.unshift(0),h=x.from(m)}if(x.isBuffer(h)){var _=h.length;0===h.length&&_++;var w=x.alloc(_);return h.copy(w),0===h.length&&(w[0]=0),this._createEncoderBuffer(w)}if(h<128)return this._createEncoderBuffer(h);if(h<256)return this._createEncoderBuffer([0,h]);for(var S=1,I=h;I>=256;I>>=8)S++;for(var P=new Array(S),L=P.length-1;L>=0;L--)P[L]=255&h,h>>=8;return 128&P[0]&&P.unshift(0),this._createEncoderBuffer(x.from(P))},b.prototype._encodeBool=function(h){return this._createEncoderBuffer(h?255:0)},b.prototype._use=function(h,u){return"function"==typeof h&&(h=h(u)),h._getEncoder("der").tree},b.prototype._skipDefault=function(h,u,m){var _,w=this._baseState;if(null===w.default)return!1;var S=h.join();if(void 0===w.defaultBuffer&&(w.defaultBuffer=this._encodeValue(w.default,u,m).join()),S.length!==w.defaultBuffer.length)return!1;for(_=0;_{"use strict";var d=O;d.der=E(11068),d.pem=E(38520)},38520:(z,O,E)=>{"use strict";var d=E(41736),x=E(11068);function f(T){x.call(this,T),this.enc="pem"}d(f,x),z.exports=f,f.prototype.encode=function(T,g){for(var b=x.prototype.encode.call(this,T).toString("base64"),l=["-----BEGIN "+g.label+"-----"],h=0;h{"use strict";var d=E(28847)(E(3355)),x=E(33103);function f(R,o){if(R===o)return 0;for(var y=R.length,M=o.length,v=0,k=Math.min(y,M);v=0;ee--)if(ce[ee]!==ue[ee])return!1;for(ee=ce.length-1;ee>=0;ee--)if(!W(k[Q=ce[ee]],D[Q],N,C))return!1;return!0}(R,o,y,M))}return y?R===o:R==o}function G(R){return"[object Arguments]"==Object.prototype.toString.call(R)}function H(R,o){if(!R||!o)return!1;if("[object RegExp]"==Object.prototype.toString.call(o))return o.test(R);try{if(R instanceof o)return!0}catch{}return!Error.isPrototypeOf(o)&&!0===o.call({},R)}function j(R,o,y,M){var v;if("function"!=typeof o)throw new TypeError('"block" argument must be a function');"string"==typeof y&&(M=y,y=null),v=function(N){var C;try{N()}catch(a){C=a}return C}(o),M=(y&&y.name?" ("+y.name+").":".")+(M?" "+M:"."),R&&!v&&L(v,y,"Missing expected exception"+M);var k="string"==typeof M,D=!R&&v&&!y;if((!R&&g.isError(v)&&k&&H(v,y)||D)&&L(v,y,"Got unwanted exception"+M),R&&v&&y&&!H(v,y)||!R&&v)throw v}_.AssertionError=function(R){this.name="AssertionError",this.actual=R.actual,this.expected=R.expected,this.operator=R.operator,R.message?(this.message=R.message,this.generatedMessage=!1):(this.message=I(P(this.actual),128)+" "+this.operator+" "+I(P(this.expected),128),this.generatedMessage=!0);var o=R.stackStartFunction||L;if(Error.captureStackTrace)Error.captureStackTrace(this,o);else{var y=new Error;if(y.stack){var M=y.stack,v=S(o),k=M.indexOf("\n"+v);if(k>=0){var D=M.indexOf("\n",k+1);M=M.substring(D+1)}this.stack=M}}},g.inherits(_.AssertionError,Error),_.fail=L,_.ok=V,_.equal=function(R,o,y){R!=o&&L(R,o,y,"==",_.equal)},_.notEqual=function(R,o,y){R==o&&L(R,o,y,"!=",_.notEqual)},_.deepEqual=function(R,o,y){W(R,o,!1)||L(R,o,y,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(R,o,y){W(R,o,!0)||L(R,o,y,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(R,o,y){W(R,o,!1)&&L(R,o,y,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function R(o,y,M){W(o,y,!0)&&L(o,y,M,"notDeepStrictEqual",R)},_.strictEqual=function(R,o,y){R!==o&&L(R,o,y,"===",_.strictEqual)},_.notStrictEqual=function(R,o,y){R===o&&L(R,o,y,"!==",_.notStrictEqual)},_.throws=function(R,o,y){j(!0,R,o,y)},_.doesNotThrow=function(R,o,y){j(!1,R,o,y)},_.ifError=function(R){if(R)throw R},_.strict=x(function R(o,y){o||L(o,!0,y,"==",R)},_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict;var K=Object.keys||function(R){var o=[];for(var y in R)b.call(R,y)&&o.push(y);return o}},94074:z=>{"use strict";z.exports="function"==typeof Object.create?function(O,E){O.super_=E,O.prototype=Object.create(E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}})}:function(O,E){O.super_=E;var d=function(){};d.prototype=E.prototype,O.prototype=new d,O.prototype.constructor=O}},86732:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));z.exports=function(x){return x&&"object"===(0,d.default)(x)&&"function"==typeof x.copy&&"function"==typeof x.fill&&"function"==typeof x.readUInt8}},69954:(z,O,E)=>{"use strict";var d=E(19142),x=E(28847)(E(3355)),f=/%[sdj%]/g;O.format=function(v){if(!L(v)){for(var k=[],D=0;D=C)return Q;switch(Q){case"%s":return String(N[D++]);case"%d":return Number(N[D++]);case"%j":try{return JSON.stringify(N[D++])}catch{return"[Circular]"}default:return Q}}),B=N[D];D=3&&(D.depth=arguments[2]),arguments.length>=4&&(D.colors=arguments[3]),S(k)?D.showHidden=k:k&&O._extend(D,k),V(D.showHidden)&&(D.showHidden=!1),V(D.depth)&&(D.depth=2),V(D.colors)&&(D.colors=!1),V(D.customInspect)&&(D.customInspect=!0),D.colors&&(D.stylize=l),u(D,v,D.depth)}function l(v,k){var D=b.styles[k];return D?"\x1b["+b.colors[D][0]+"m"+v+"\x1b["+b.colors[D][1]+"m":v}function h(v,k){return v}function u(v,k,D){if(v.customInspect&&k&&K(k.inspect)&&k.inspect!==O.inspect&&(!k.constructor||k.constructor.prototype!==k)){var N=k.inspect(D,v);return L(N)||(N=u(v,N,D)),N}var C=function(ae,Te){if(V(Te))return ae.stylize("undefined","undefined");if(L(Te)){var le="'"+JSON.stringify(Te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ae.stylize(le,"string")}return P(Te)?ae.stylize(""+Te,"number"):S(Te)?ae.stylize(""+Te,"boolean"):I(Te)?ae.stylize("null","null"):void 0}(v,k);if(C)return C;var Te,a=Object.keys(k),B=(Te={},a.forEach(function(le,X){Te[le]=!0}),Te);if(v.showHidden&&(a=Object.getOwnPropertyNames(k)),j(k)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return m(k);if(0===a.length){if(K(k))return v.stylize("[Function"+(k.name?": "+k.name:"")+"]","special");if(W(k))return v.stylize(RegExp.prototype.toString.call(k),"regexp");if(H(k))return v.stylize(Date.prototype.toString.call(k),"date");if(j(k))return m(k)}var ee,ce="",ue=!1,we=["{","}"];return w(k)&&(ue=!0,we=["[","]"]),K(k)&&(ce=" [Function"+(k.name?": "+k.name:"")+"]"),W(k)&&(ce=" "+RegExp.prototype.toString.call(k)),H(k)&&(ce=" "+Date.prototype.toUTCString.call(k)),j(k)&&(ce=" "+m(k)),0!==a.length||ue&&0!=k.length?D<0?W(k)?v.stylize(RegExp.prototype.toString.call(k),"regexp"):v.stylize("[Object]","special"):(v.seen.push(k),ee=ue?function(ae,Te,le,X,ne){for(var pe=[],_e=0,xe=Te.length;_e60?le[0]+(""===Te?"":Te+"\n ")+" "+ae.join(",\n ")+" "+le[1]:le[0]+Te+" "+ae.join(", ")+" "+le[1]}(ee,ce,we)):we[0]+ce+we[1]}function m(v){return"["+Error.prototype.toString.call(v)+"]"}function _(v,k,D,N,C,a){var B,Q,ee;if((ee=Object.getOwnPropertyDescriptor(k,C)||{value:k[C]}).get?Q=v.stylize(ee.set?"[Getter/Setter]":"[Getter]","special"):ee.set&&(Q=v.stylize("[Setter]","special")),M(N,C)||(B="["+C+"]"),Q||(v.seen.indexOf(ee.value)<0?(Q=I(D)?u(v,ee.value,null):u(v,ee.value,D-1)).indexOf("\n")>-1&&(Q=a?Q.split("\n").map(function(ce){return" "+ce}).join("\n").substr(2):"\n"+Q.split("\n").map(function(ce){return" "+ce}).join("\n")):Q=v.stylize("[Circular]","special")),V(B)){if(a&&C.match(/^\d+$/))return Q;(B=JSON.stringify(""+C)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.substr(1,B.length-2),B=v.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=v.stylize(B,"string"))}return B+": "+Q}function w(v){return Array.isArray(v)}function S(v){return"boolean"==typeof v}function I(v){return null===v}function P(v){return"number"==typeof v}function L(v){return"string"==typeof v}function V(v){return void 0===v}function W(v){return G(v)&&"[object RegExp]"===R(v)}function G(v){return"object"===(0,x.default)(v)&&null!==v}function H(v){return G(v)&&"[object Date]"===R(v)}function j(v){return G(v)&&("[object Error]"===R(v)||v instanceof Error)}function K(v){return"function"==typeof v}function R(v){return Object.prototype.toString.call(v)}function o(v){return v<10?"0"+v.toString(10):v.toString(10)}O.debuglog=function(v){if(V(T)&&(T=d.env.NODE_DEBUG||""),v=v.toUpperCase(),!g[v])if(new RegExp("\\b"+v+"\\b","i").test(T)){var k=d.pid;g[v]=function(){var D=O.format.apply(O,arguments);console.error("%s %d: %s",v,k,D)}}else g[v]=function(){};return g[v]},O.inspect=b,b.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]},b.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},O.isArray=w,O.isBoolean=S,O.isNull=I,O.isNullOrUndefined=function(v){return null==v},O.isNumber=P,O.isString=L,O.isSymbol=function(v){return"symbol"===(0,x.default)(v)},O.isUndefined=V,O.isRegExp=W,O.isObject=G,O.isDate=H,O.isError=j,O.isFunction=K,O.isPrimitive=function(v){return null===v||"boolean"==typeof v||"number"==typeof v||"string"==typeof v||"symbol"===(0,x.default)(v)||void 0===v},O.isBuffer=E(86732);var y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(v,k){return Object.prototype.hasOwnProperty.call(v,k)}O.log=function(){var v,k;console.log("%s - %s",(k=[o((v=new Date).getHours()),o(v.getMinutes()),o(v.getSeconds())].join(":"),[v.getDate(),y[v.getMonth()],k].join(" ")),O.format.apply(O,arguments))},O.inherits=E(94074),O._extend=function(v,k){if(!k||!G(k))return v;for(var D=Object.keys(k),N=D.length;N--;)v[D[N]]=k[D[N]];return v}},27548:(z,O,E)=>{"use strict";var d=E(48850).Buffer;z.exports=function(x){if(x.length>=255)throw new TypeError("Alphabet too long");for(var f=new Uint8Array(256),T=0;T>>0,W=new Uint8Array(V);S[I];){var G=f[S.charCodeAt(I)];if(255===G)return;for(var H=0,j=V-1;(0!==G||H>>0)%256>>>0,G=G/256>>>0;if(0!==G)throw new Error("Non-zero carry");L=H,I++}for(var K=V-L;K!==V&&0===W[K];)K++;var R=d.allocUnsafe(P+(V-K));R.fill(0,0,P);for(var o=P;K!==V;)R[o++]=W[K++];return R}return{encode:function(S){if((Array.isArray(S)||S instanceof Uint8Array)&&(S=d.from(S)),!d.isBuffer(S))throw new TypeError("Expected Buffer");if(0===S.length)return"";for(var I=0,P=0,L=0,V=S.length;L!==V&&0===S[L];)L++,I++;for(var W=(V-L)*_+1>>>0,G=new Uint8Array(W);L!==V;){for(var H=S[L],j=0,K=W-1;(0!==H||j>>0)%h>>>0,H=H/h>>>0;if(0!==H)throw new Error("Non-zero carry");P=j,L++}for(var R=W-P;R!==W&&0===G[R];)R++;for(var o=u.repeat(I);R{"use strict";O.byteLength=function(h){var u=b(h),_=u[1];return 3*(u[0]+_)/4-_},O.toByteArray=function(h){var u,m,G,_=b(h),w=_[0],S=_[1],I=new x(3*(w+(G=S))/4-G),P=0,L=S>0?w-4:w;for(m=0;m>16&255,I[P++]=u>>8&255,I[P++]=255&u;return 2===S&&(u=d[h.charCodeAt(m)]<<2|d[h.charCodeAt(m+1)]>>4,I[P++]=255&u),1===S&&(u=d[h.charCodeAt(m)]<<10|d[h.charCodeAt(m+1)]<<4|d[h.charCodeAt(m+2)]>>2,I[P++]=u>>8&255,I[P++]=255&u),I},O.fromByteArray=function(h){for(var u,m=h.length,_=m%3,w=[],S=16383,I=0,P=m-_;IP?P:I+S));return 1===_?w.push(E[(u=h[m-1])>>2]+E[u<<4&63]+"=="):2===_&&w.push(E[(u=(h[m-2]<<8)+h[m-1])>>10]+E[u>>4&63]+E[u<<2&63]+"="),w.join("")};for(var E=[],d=[],x="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=0,g=f.length;T0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");return-1===m&&(m=u),[m,m===u?0:4-m%4]}function l(h,u,m){for(var w,S=[],I=u;I>18&63]+E[w>>12&63]+E[w>>6&63]+E[63&w]);return S.join("")}d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63},31734:(z,O,E)=>{"use strict";z=E.nmd(z);var d=E(28847)(E(3355));!function(x,f){function T(D,N){if(!D)throw new Error(N||"Assertion failed")}function g(D,N){D.super_=N;var C=function(){};C.prototype=N.prototype,D.prototype=new C,D.prototype.constructor=D}function b(D,N,C){if(b.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,null!==D&&("le"!==N&&"be"!==N||(C=N,N=10),this._init(D||0,N||10,C||"be"))}var l;"object"===(0,d.default)(x)?x.exports=b:(void 0).BN=b,b.BN=b,b.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:E(29033).Buffer}catch{}function h(D,N){var C=D.charCodeAt(N);return C>=48&&C<=57?C-48:C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:void T(!1,"Invalid character in "+D)}function u(D,N,C){var a=h(D,C);return C-1>=N&&(a|=h(D,C-1)<<4),a}function m(D,N,C,a){for(var B=0,Q=0,ee=Math.min(D.length,C),ce=N;ce=49?ue-49+10:ue>=17?ue-17+10:ue,T(ue>=0&&Q0?D:N},b.min=function(D,N){return D.cmp(N)<0?D:N},b.prototype._init=function(D,N,C){if("number"==typeof D)return this._initNumber(D,N,C);if("object"===(0,d.default)(D))return this._initArray(D,N,C);"hex"===N&&(N=16),T(N===(0|N)&&N>=2&&N<=36);var a=0;"-"===(D=D.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)this.words[B]|=(Q=D[a]|D[a-1]<<8|D[a-2]<<16)<>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,B++);else if("le"===C)for(a=0,B=0;a>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,B++);return this._strip()},b.prototype._parseHex=function(D,N,C){this.length=Math.ceil((D.length-N)/6),this.words=new Array(this.length);for(var a=0;a=N;a-=2)B=u(D,N,a)<=18?(Q-=18,this.words[ee+=1]|=B>>>26):Q+=8;else for(a=(D.length-N)%2==0?N+1:N;a=18?(Q-=18,this.words[ee+=1]|=B>>>26):Q+=8;this._strip()},b.prototype._parseBase=function(D,N,C){this.words=[0],this.length=1;for(var a=0,B=1;B<=67108863;B*=N)a++;a--,B=B/N|0;for(var Q=D.length-C,ee=Q%a,ce=Math.min(Q,Q-ee)+C,ue=0,we=C;we1&&0===this.words[this.length-1];)this.length--;return this._normSign()},b.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{b.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{b.prototype.inspect=w}else b.prototype.inspect=w;function w(){return(this.red?""}var S=["","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"],I=[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 L(D,N,C){C.negative=N.negative^D.negative;var a=D.length+N.length|0;C.length=a,a=a-1|0;var B=0|D.words[0],Q=0|N.words[0],ee=B*Q,ue=ee/67108864|0;C.words[0]=67108863ⅇfor(var we=1;we>>26,Te=67108863&ue,le=Math.min(we,N.length-1),X=Math.max(0,we-D.length+1);X<=le;X++)ae+=(ee=(B=0|D.words[we-X|0])*(Q=0|N.words[X])+Te)/67108864|0,Te=67108863ⅇC.words[we]=0|Te,ue=0|ae}return 0!==ue?C.words[we]=0|ue:C.length--,C._strip()}b.prototype.toString=function(D,N){var C;if(N=0|N||1,16===(D=D||10)||"hex"===D){C="";for(var a=0,B=0,Q=0;Q>>24-a&16777215,(a+=2)>=26&&(a-=26,Q--),C=0!==B||Q!==this.length-1?S[6-ce.length]+ce+C:ce+C}for(0!==B&&(C=B.toString(16)+C);C.length%N!=0;)C="0"+C;return 0!==this.negative&&(C="-"+C),C}if(D===(0|D)&&D>=2&&D<=36){var ue=I[D],we=P[D];C="";var ae=this.clone();for(ae.negative=0;!ae.isZero();){var Te=ae.modrn(we).toString(D);C=(ae=ae.idivn(we)).isZero()?Te+C:S[ue-Te.length]+Te+C}for(this.isZero()&&(C="0"+C);C.length%N!=0;)C="0"+C;return 0!==this.negative&&(C="-"+C),C}T(!1,"Base should be between 2 and 36")},b.prototype.toNumber=function(){var D=this.words[0];return 2===this.length?D+=67108864*this.words[1]:3===this.length&&1===this.words[2]?D+=4503599627370496+67108864*this.words[1]:this.length>2&&T(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-D:D},b.prototype.toJSON=function(){return this.toString(16,2)},l&&(b.prototype.toBuffer=function(D,N){return this.toArrayLike(l,D,N)}),b.prototype.toArray=function(D,N){return this.toArrayLike(Array,D,N)},b.prototype.toArrayLike=function(D,N,C){this._strip();var a=this.byteLength(),B=C||Math.max(1,a);T(a<=B,"byte array longer than desired length"),T(B>0,"Requested array length <= 0");var ee,ce,Q=(ce=B,(ee=D).allocUnsafe?ee.allocUnsafe(ce):new ee(ce));return this["_toArrayLike"+("le"===N?"LE":"BE")](Q,a),Q},b.prototype._toArrayLikeLE=function(D,N){for(var C=0,a=0,B=0,Q=0;B>8&255),C>16&255),6===Q?(C>24&255),a=0,Q=0):(a=ee>>>24,Q+=2)}if(C=0&&(D[C--]=ee>>8&255),C>=0&&(D[C--]=ee>>16&255),6===Q?(C>=0&&(D[C--]=ee>>24&255),a=0,Q=0):(a=ee>>>24,Q+=2)}if(C>=0)for(D[C--]=a;C>=0;)D[C--]=0},b.prototype._countBits=Math.clz32?function(D){return 32-Math.clz32(D)}:function(D){var N=D,C=0;return N>=4096&&(C+=13,N>>>=13),N>=64&&(C+=7,N>>>=7),N>=8&&(C+=4,N>>>=4),N>=2&&(C+=2,N>>>=2),C+N},b.prototype._zeroBits=function(D){if(0===D)return 26;var N=D,C=0;return 0==(8191&N)&&(C+=13,N>>>=13),0==(127&N)&&(C+=7,N>>>=7),0==(15&N)&&(C+=4,N>>>=4),0==(3&N)&&(C+=2,N>>>=2),0==(1&N)&&C++,C},b.prototype.bitLength=function(){var N=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+N},b.prototype.zeroBits=function(){if(this.isZero())return 0;for(var D=0,N=0;ND.length?this.clone().ior(D):D.clone().ior(this)},b.prototype.uor=function(D){return this.length>D.length?this.clone().iuor(D):D.clone().iuor(this)},b.prototype.iuand=function(D){var N;N=this.length>D.length?D:this;for(var C=0;CD.length?this.clone().iand(D):D.clone().iand(this)},b.prototype.uand=function(D){return this.length>D.length?this.clone().iuand(D):D.clone().iuand(this)},b.prototype.iuxor=function(D){var N,C;this.length>D.length?(N=this,C=D):(N=D,C=this);for(var a=0;aD.length?this.clone().ixor(D):D.clone().ixor(this)},b.prototype.uxor=function(D){return this.length>D.length?this.clone().iuxor(D):D.clone().iuxor(this)},b.prototype.inotn=function(D){T("number"==typeof D&&D>=0);var N=0|Math.ceil(D/26),C=D%26;this._expand(N),C>0&&N--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-C),this._strip()},b.prototype.notn=function(D){return this.clone().inotn(D)},b.prototype.setn=function(D,N){T("number"==typeof D&&D>=0);var C=D/26|0,a=D%26;return this._expand(C+1),this.words[C]=N?this.words[C]|1<D.length?(C=this,a=D):(C=D,a=this);for(var B=0,Q=0;Q>>26;for(;0!==B&&Q>>26;if(this.length=C.length,0!==B)this.words[this.length]=B,this.length++;else if(C!==this)for(;QD.length?this.clone().iadd(D):D.clone().iadd(this)},b.prototype.isub=function(D){if(0!==D.negative){D.negative=0;var N=this.iadd(D);return D.negative=1,N._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(D),this.negative=1,this._normSign();var C,a,B=this.cmp(D);if(0===B)return this.negative=0,this.length=1,this.words[0]=0,this;B>0?(C=this,a=D):(C=D,a=this);for(var Q=0,ee=0;ee>26,this.words[ee]=67108863&N;for(;0!==Q&&ee>26,this.words[ee]=67108863&N;if(0===Q&&ee>>13,X=0|ee[1],ne=8191&X,pe=X>>>13,_e=0|ee[2],xe=8191&_e,Ce=_e>>>13,ke=0|ee[3],me=8191&ke,Ee=ke>>>13,ze=0|ee[4],Ve=8191&ze,nt=ze>>>13,tt=0|ee[5],mt=8191&tt,ht=tt>>>13,wt=0|ee[6],Pt=8191&wt,st=wt>>>13,Ye=0|ee[7],gt=8191&Ye,St=Ye>>>13,Wt=0|ee[8],dn=8191&Wt,Nt=Wt>>>13,It=0|ee[9],qt=8191&It,jt=It>>>13,Yt=0|ce[0],Wn=8191&Yt,fn=Yt>>>13,$n=0|ce[1],Yr=8191&$n,Ln=$n>>>13,Bn=0|ce[2],$r=8191&Bn,Gn=Bn>>>13,bn=0|ce[3],Lr=8191&bn,Kn=bn>>>13,sr=0|ce[4],Ii=8191&sr,Un=sr>>>13,ir=0|ce[5],ts=8191&ir,Tn=ir>>>13,Qn=0|ce[6],Vi=8191&Qn,ar=Qn>>>13,br=0|ce[7],ki=8191&br,ur=br>>>13,mr=0|ce[8],Fr=8191&mr,hi=mr>>>13,wi=0|ce[9],cs=8191&wi,$i=wi>>>13;C.negative=D.negative^N.negative,C.length=19;var rs=(we+(a=Math.imul(Te,Wn))|0)+((8191&(B=(B=Math.imul(Te,fn))+Math.imul(le,Wn)|0))<<13)|0;we=((Q=Math.imul(le,fn))+(B>>>13)|0)+(rs>>>26)|0,rs&=67108863,a=Math.imul(ne,Wn),B=(B=Math.imul(ne,fn))+Math.imul(pe,Wn)|0,Q=Math.imul(pe,fn);var Xi=(we+(a=a+Math.imul(Te,Yr)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Ln)|0)+Math.imul(le,Yr)|0))<<13)|0;we=((Q=Q+Math.imul(le,Ln)|0)+(B>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,a=Math.imul(xe,Wn),B=(B=Math.imul(xe,fn))+Math.imul(Ce,Wn)|0,Q=Math.imul(Ce,fn),a=a+Math.imul(ne,Yr)|0,B=(B=B+Math.imul(ne,Ln)|0)+Math.imul(pe,Yr)|0,Q=Q+Math.imul(pe,Ln)|0;var $s=(we+(a=a+Math.imul(Te,$r)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Gn)|0)+Math.imul(le,$r)|0))<<13)|0;we=((Q=Q+Math.imul(le,Gn)|0)+(B>>>13)|0)+($s>>>26)|0,$s&=67108863,a=Math.imul(me,Wn),B=(B=Math.imul(me,fn))+Math.imul(Ee,Wn)|0,Q=Math.imul(Ee,fn),a=a+Math.imul(xe,Yr)|0,B=(B=B+Math.imul(xe,Ln)|0)+Math.imul(Ce,Yr)|0,Q=Q+Math.imul(Ce,Ln)|0,a=a+Math.imul(ne,$r)|0,B=(B=B+Math.imul(ne,Gn)|0)+Math.imul(pe,$r)|0,Q=Q+Math.imul(pe,Gn)|0;var is=(we+(a=a+Math.imul(Te,Lr)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Kn)|0)+Math.imul(le,Lr)|0))<<13)|0;we=((Q=Q+Math.imul(le,Kn)|0)+(B>>>13)|0)+(is>>>26)|0,is&=67108863,a=Math.imul(Ve,Wn),B=(B=Math.imul(Ve,fn))+Math.imul(nt,Wn)|0,Q=Math.imul(nt,fn),a=a+Math.imul(me,Yr)|0,B=(B=B+Math.imul(me,Ln)|0)+Math.imul(Ee,Yr)|0,Q=Q+Math.imul(Ee,Ln)|0,a=a+Math.imul(xe,$r)|0,B=(B=B+Math.imul(xe,Gn)|0)+Math.imul(Ce,$r)|0,Q=Q+Math.imul(Ce,Gn)|0,a=a+Math.imul(ne,Lr)|0,B=(B=B+Math.imul(ne,Kn)|0)+Math.imul(pe,Lr)|0,Q=Q+Math.imul(pe,Kn)|0;var go=(we+(a=a+Math.imul(Te,Ii)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Un)|0)+Math.imul(le,Ii)|0))<<13)|0;we=((Q=Q+Math.imul(le,Un)|0)+(B>>>13)|0)+(go>>>26)|0,go&=67108863,a=Math.imul(mt,Wn),B=(B=Math.imul(mt,fn))+Math.imul(ht,Wn)|0,Q=Math.imul(ht,fn),a=a+Math.imul(Ve,Yr)|0,B=(B=B+Math.imul(Ve,Ln)|0)+Math.imul(nt,Yr)|0,Q=Q+Math.imul(nt,Ln)|0,a=a+Math.imul(me,$r)|0,B=(B=B+Math.imul(me,Gn)|0)+Math.imul(Ee,$r)|0,Q=Q+Math.imul(Ee,Gn)|0,a=a+Math.imul(xe,Lr)|0,B=(B=B+Math.imul(xe,Kn)|0)+Math.imul(Ce,Lr)|0,Q=Q+Math.imul(Ce,Kn)|0,a=a+Math.imul(ne,Ii)|0,B=(B=B+Math.imul(ne,Un)|0)+Math.imul(pe,Ii)|0,Q=Q+Math.imul(pe,Un)|0;var ji=(we+(a=a+Math.imul(Te,ts)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Tn)|0)+Math.imul(le,ts)|0))<<13)|0;we=((Q=Q+Math.imul(le,Tn)|0)+(B>>>13)|0)+(ji>>>26)|0,ji&=67108863,a=Math.imul(Pt,Wn),B=(B=Math.imul(Pt,fn))+Math.imul(st,Wn)|0,Q=Math.imul(st,fn),a=a+Math.imul(mt,Yr)|0,B=(B=B+Math.imul(mt,Ln)|0)+Math.imul(ht,Yr)|0,Q=Q+Math.imul(ht,Ln)|0,a=a+Math.imul(Ve,$r)|0,B=(B=B+Math.imul(Ve,Gn)|0)+Math.imul(nt,$r)|0,Q=Q+Math.imul(nt,Gn)|0,a=a+Math.imul(me,Lr)|0,B=(B=B+Math.imul(me,Kn)|0)+Math.imul(Ee,Lr)|0,Q=Q+Math.imul(Ee,Kn)|0,a=a+Math.imul(xe,Ii)|0,B=(B=B+Math.imul(xe,Un)|0)+Math.imul(Ce,Ii)|0,Q=Q+Math.imul(Ce,Un)|0,a=a+Math.imul(ne,ts)|0,B=(B=B+Math.imul(ne,Tn)|0)+Math.imul(pe,ts)|0,Q=Q+Math.imul(pe,Tn)|0;var so=(we+(a=a+Math.imul(Te,Vi)|0)|0)+((8191&(B=(B=B+Math.imul(Te,ar)|0)+Math.imul(le,Vi)|0))<<13)|0;we=((Q=Q+Math.imul(le,ar)|0)+(B>>>13)|0)+(so>>>26)|0,so&=67108863,a=Math.imul(gt,Wn),B=(B=Math.imul(gt,fn))+Math.imul(St,Wn)|0,Q=Math.imul(St,fn),a=a+Math.imul(Pt,Yr)|0,B=(B=B+Math.imul(Pt,Ln)|0)+Math.imul(st,Yr)|0,Q=Q+Math.imul(st,Ln)|0,a=a+Math.imul(mt,$r)|0,B=(B=B+Math.imul(mt,Gn)|0)+Math.imul(ht,$r)|0,Q=Q+Math.imul(ht,Gn)|0,a=a+Math.imul(Ve,Lr)|0,B=(B=B+Math.imul(Ve,Kn)|0)+Math.imul(nt,Lr)|0,Q=Q+Math.imul(nt,Kn)|0,a=a+Math.imul(me,Ii)|0,B=(B=B+Math.imul(me,Un)|0)+Math.imul(Ee,Ii)|0,Q=Q+Math.imul(Ee,Un)|0,a=a+Math.imul(xe,ts)|0,B=(B=B+Math.imul(xe,Tn)|0)+Math.imul(Ce,ts)|0,Q=Q+Math.imul(Ce,Tn)|0,a=a+Math.imul(ne,Vi)|0,B=(B=B+Math.imul(ne,ar)|0)+Math.imul(pe,Vi)|0,Q=Q+Math.imul(pe,ar)|0;var oo=(we+(a=a+Math.imul(Te,ki)|0)|0)+((8191&(B=(B=B+Math.imul(Te,ur)|0)+Math.imul(le,ki)|0))<<13)|0;we=((Q=Q+Math.imul(le,ur)|0)+(B>>>13)|0)+(oo>>>26)|0,oo&=67108863,a=Math.imul(dn,Wn),B=(B=Math.imul(dn,fn))+Math.imul(Nt,Wn)|0,Q=Math.imul(Nt,fn),a=a+Math.imul(gt,Yr)|0,B=(B=B+Math.imul(gt,Ln)|0)+Math.imul(St,Yr)|0,Q=Q+Math.imul(St,Ln)|0,a=a+Math.imul(Pt,$r)|0,B=(B=B+Math.imul(Pt,Gn)|0)+Math.imul(st,$r)|0,Q=Q+Math.imul(st,Gn)|0,a=a+Math.imul(mt,Lr)|0,B=(B=B+Math.imul(mt,Kn)|0)+Math.imul(ht,Lr)|0,Q=Q+Math.imul(ht,Kn)|0,a=a+Math.imul(Ve,Ii)|0,B=(B=B+Math.imul(Ve,Un)|0)+Math.imul(nt,Ii)|0,Q=Q+Math.imul(nt,Un)|0,a=a+Math.imul(me,ts)|0,B=(B=B+Math.imul(me,Tn)|0)+Math.imul(Ee,ts)|0,Q=Q+Math.imul(Ee,Tn)|0,a=a+Math.imul(xe,Vi)|0,B=(B=B+Math.imul(xe,ar)|0)+Math.imul(Ce,Vi)|0,Q=Q+Math.imul(Ce,ar)|0,a=a+Math.imul(ne,ki)|0,B=(B=B+Math.imul(ne,ur)|0)+Math.imul(pe,ki)|0,Q=Q+Math.imul(pe,ur)|0;var zo=(we+(a=a+Math.imul(Te,Fr)|0)|0)+((8191&(B=(B=B+Math.imul(Te,hi)|0)+Math.imul(le,Fr)|0))<<13)|0;we=((Q=Q+Math.imul(le,hi)|0)+(B>>>13)|0)+(zo>>>26)|0,zo&=67108863,a=Math.imul(qt,Wn),B=(B=Math.imul(qt,fn))+Math.imul(jt,Wn)|0,Q=Math.imul(jt,fn),a=a+Math.imul(dn,Yr)|0,B=(B=B+Math.imul(dn,Ln)|0)+Math.imul(Nt,Yr)|0,Q=Q+Math.imul(Nt,Ln)|0,a=a+Math.imul(gt,$r)|0,B=(B=B+Math.imul(gt,Gn)|0)+Math.imul(St,$r)|0,Q=Q+Math.imul(St,Gn)|0,a=a+Math.imul(Pt,Lr)|0,B=(B=B+Math.imul(Pt,Kn)|0)+Math.imul(st,Lr)|0,Q=Q+Math.imul(st,Kn)|0,a=a+Math.imul(mt,Ii)|0,B=(B=B+Math.imul(mt,Un)|0)+Math.imul(ht,Ii)|0,Q=Q+Math.imul(ht,Un)|0,a=a+Math.imul(Ve,ts)|0,B=(B=B+Math.imul(Ve,Tn)|0)+Math.imul(nt,ts)|0,Q=Q+Math.imul(nt,Tn)|0,a=a+Math.imul(me,Vi)|0,B=(B=B+Math.imul(me,ar)|0)+Math.imul(Ee,Vi)|0,Q=Q+Math.imul(Ee,ar)|0,a=a+Math.imul(xe,ki)|0,B=(B=B+Math.imul(xe,ur)|0)+Math.imul(Ce,ki)|0,Q=Q+Math.imul(Ce,ur)|0,a=a+Math.imul(ne,Fr)|0,B=(B=B+Math.imul(ne,hi)|0)+Math.imul(pe,Fr)|0,Q=Q+Math.imul(pe,hi)|0;var Wi=(we+(a=a+Math.imul(Te,cs)|0)|0)+((8191&(B=(B=B+Math.imul(Te,$i)|0)+Math.imul(le,cs)|0))<<13)|0;we=((Q=Q+Math.imul(le,$i)|0)+(B>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,a=Math.imul(qt,Yr),B=(B=Math.imul(qt,Ln))+Math.imul(jt,Yr)|0,Q=Math.imul(jt,Ln),a=a+Math.imul(dn,$r)|0,B=(B=B+Math.imul(dn,Gn)|0)+Math.imul(Nt,$r)|0,Q=Q+Math.imul(Nt,Gn)|0,a=a+Math.imul(gt,Lr)|0,B=(B=B+Math.imul(gt,Kn)|0)+Math.imul(St,Lr)|0,Q=Q+Math.imul(St,Kn)|0,a=a+Math.imul(Pt,Ii)|0,B=(B=B+Math.imul(Pt,Un)|0)+Math.imul(st,Ii)|0,Q=Q+Math.imul(st,Un)|0,a=a+Math.imul(mt,ts)|0,B=(B=B+Math.imul(mt,Tn)|0)+Math.imul(ht,ts)|0,Q=Q+Math.imul(ht,Tn)|0,a=a+Math.imul(Ve,Vi)|0,B=(B=B+Math.imul(Ve,ar)|0)+Math.imul(nt,Vi)|0,Q=Q+Math.imul(nt,ar)|0,a=a+Math.imul(me,ki)|0,B=(B=B+Math.imul(me,ur)|0)+Math.imul(Ee,ki)|0,Q=Q+Math.imul(Ee,ur)|0,a=a+Math.imul(xe,Fr)|0,B=(B=B+Math.imul(xe,hi)|0)+Math.imul(Ce,Fr)|0,Q=Q+Math.imul(Ce,hi)|0;var bo=(we+(a=a+Math.imul(ne,cs)|0)|0)+((8191&(B=(B=B+Math.imul(ne,$i)|0)+Math.imul(pe,cs)|0))<<13)|0;we=((Q=Q+Math.imul(pe,$i)|0)+(B>>>13)|0)+(bo>>>26)|0,bo&=67108863,a=Math.imul(qt,$r),B=(B=Math.imul(qt,Gn))+Math.imul(jt,$r)|0,Q=Math.imul(jt,Gn),a=a+Math.imul(dn,Lr)|0,B=(B=B+Math.imul(dn,Kn)|0)+Math.imul(Nt,Lr)|0,Q=Q+Math.imul(Nt,Kn)|0,a=a+Math.imul(gt,Ii)|0,B=(B=B+Math.imul(gt,Un)|0)+Math.imul(St,Ii)|0,Q=Q+Math.imul(St,Un)|0,a=a+Math.imul(Pt,ts)|0,B=(B=B+Math.imul(Pt,Tn)|0)+Math.imul(st,ts)|0,Q=Q+Math.imul(st,Tn)|0,a=a+Math.imul(mt,Vi)|0,B=(B=B+Math.imul(mt,ar)|0)+Math.imul(ht,Vi)|0,Q=Q+Math.imul(ht,ar)|0,a=a+Math.imul(Ve,ki)|0,B=(B=B+Math.imul(Ve,ur)|0)+Math.imul(nt,ki)|0,Q=Q+Math.imul(nt,ur)|0,a=a+Math.imul(me,Fr)|0,B=(B=B+Math.imul(me,hi)|0)+Math.imul(Ee,Fr)|0,Q=Q+Math.imul(Ee,hi)|0;var _s=(we+(a=a+Math.imul(xe,cs)|0)|0)+((8191&(B=(B=B+Math.imul(xe,$i)|0)+Math.imul(Ce,cs)|0))<<13)|0;we=((Q=Q+Math.imul(Ce,$i)|0)+(B>>>13)|0)+(_s>>>26)|0,_s&=67108863,a=Math.imul(qt,Lr),B=(B=Math.imul(qt,Kn))+Math.imul(jt,Lr)|0,Q=Math.imul(jt,Kn),a=a+Math.imul(dn,Ii)|0,B=(B=B+Math.imul(dn,Un)|0)+Math.imul(Nt,Ii)|0,Q=Q+Math.imul(Nt,Un)|0,a=a+Math.imul(gt,ts)|0,B=(B=B+Math.imul(gt,Tn)|0)+Math.imul(St,ts)|0,Q=Q+Math.imul(St,Tn)|0,a=a+Math.imul(Pt,Vi)|0,B=(B=B+Math.imul(Pt,ar)|0)+Math.imul(st,Vi)|0,Q=Q+Math.imul(st,ar)|0,a=a+Math.imul(mt,ki)|0,B=(B=B+Math.imul(mt,ur)|0)+Math.imul(ht,ki)|0,Q=Q+Math.imul(ht,ur)|0,a=a+Math.imul(Ve,Fr)|0,B=(B=B+Math.imul(Ve,hi)|0)+Math.imul(nt,Fr)|0,Q=Q+Math.imul(nt,hi)|0;var Ao=(we+(a=a+Math.imul(me,cs)|0)|0)+((8191&(B=(B=B+Math.imul(me,$i)|0)+Math.imul(Ee,cs)|0))<<13)|0;we=((Q=Q+Math.imul(Ee,$i)|0)+(B>>>13)|0)+(Ao>>>26)|0,Ao&=67108863,a=Math.imul(qt,Ii),B=(B=Math.imul(qt,Un))+Math.imul(jt,Ii)|0,Q=Math.imul(jt,Un),a=a+Math.imul(dn,ts)|0,B=(B=B+Math.imul(dn,Tn)|0)+Math.imul(Nt,ts)|0,Q=Q+Math.imul(Nt,Tn)|0,a=a+Math.imul(gt,Vi)|0,B=(B=B+Math.imul(gt,ar)|0)+Math.imul(St,Vi)|0,Q=Q+Math.imul(St,ar)|0,a=a+Math.imul(Pt,ki)|0,B=(B=B+Math.imul(Pt,ur)|0)+Math.imul(st,ki)|0,Q=Q+Math.imul(st,ur)|0,a=a+Math.imul(mt,Fr)|0,B=(B=B+Math.imul(mt,hi)|0)+Math.imul(ht,Fr)|0,Q=Q+Math.imul(ht,hi)|0;var zi=(we+(a=a+Math.imul(Ve,cs)|0)|0)+((8191&(B=(B=B+Math.imul(Ve,$i)|0)+Math.imul(nt,cs)|0))<<13)|0;we=((Q=Q+Math.imul(nt,$i)|0)+(B>>>13)|0)+(zi>>>26)|0,zi&=67108863,a=Math.imul(qt,ts),B=(B=Math.imul(qt,Tn))+Math.imul(jt,ts)|0,Q=Math.imul(jt,Tn),a=a+Math.imul(dn,Vi)|0,B=(B=B+Math.imul(dn,ar)|0)+Math.imul(Nt,Vi)|0,Q=Q+Math.imul(Nt,ar)|0,a=a+Math.imul(gt,ki)|0,B=(B=B+Math.imul(gt,ur)|0)+Math.imul(St,ki)|0,Q=Q+Math.imul(St,ur)|0,a=a+Math.imul(Pt,Fr)|0,B=(B=B+Math.imul(Pt,hi)|0)+Math.imul(st,Fr)|0,Q=Q+Math.imul(st,hi)|0;var Ms=(we+(a=a+Math.imul(mt,cs)|0)|0)+((8191&(B=(B=B+Math.imul(mt,$i)|0)+Math.imul(ht,cs)|0))<<13)|0;we=((Q=Q+Math.imul(ht,$i)|0)+(B>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,a=Math.imul(qt,Vi),B=(B=Math.imul(qt,ar))+Math.imul(jt,Vi)|0,Q=Math.imul(jt,ar),a=a+Math.imul(dn,ki)|0,B=(B=B+Math.imul(dn,ur)|0)+Math.imul(Nt,ki)|0,Q=Q+Math.imul(Nt,ur)|0,a=a+Math.imul(gt,Fr)|0,B=(B=B+Math.imul(gt,hi)|0)+Math.imul(St,Fr)|0,Q=Q+Math.imul(St,hi)|0;var Oi=(we+(a=a+Math.imul(Pt,cs)|0)|0)+((8191&(B=(B=B+Math.imul(Pt,$i)|0)+Math.imul(st,cs)|0))<<13)|0;we=((Q=Q+Math.imul(st,$i)|0)+(B>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,a=Math.imul(qt,ki),B=(B=Math.imul(qt,ur))+Math.imul(jt,ki)|0,Q=Math.imul(jt,ur),a=a+Math.imul(dn,Fr)|0,B=(B=B+Math.imul(dn,hi)|0)+Math.imul(Nt,Fr)|0,Q=Q+Math.imul(Nt,hi)|0;var Lu=(we+(a=a+Math.imul(gt,cs)|0)|0)+((8191&(B=(B=B+Math.imul(gt,$i)|0)+Math.imul(St,cs)|0))<<13)|0;we=((Q=Q+Math.imul(St,$i)|0)+(B>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,a=Math.imul(qt,Fr),B=(B=Math.imul(qt,hi))+Math.imul(jt,Fr)|0,Q=Math.imul(jt,hi);var Qa=(we+(a=a+Math.imul(dn,cs)|0)|0)+((8191&(B=(B=B+Math.imul(dn,$i)|0)+Math.imul(Nt,cs)|0))<<13)|0;we=((Q=Q+Math.imul(Nt,$i)|0)+(B>>>13)|0)+(Qa>>>26)|0,Qa&=67108863;var ja=(we+(a=Math.imul(qt,cs))|0)+((8191&(B=(B=Math.imul(qt,$i))+Math.imul(jt,cs)|0))<<13)|0;return we=((Q=Math.imul(jt,$i))+(B>>>13)|0)+(ja>>>26)|0,ja&=67108863,ue[0]=rs,ue[1]=Xi,ue[2]=$s,ue[3]=is,ue[4]=go,ue[5]=ji,ue[6]=so,ue[7]=oo,ue[8]=zo,ue[9]=Wi,ue[10]=bo,ue[11]=_s,ue[12]=Ao,ue[13]=zi,ue[14]=Ms,ue[15]=Oi,ue[16]=Lu,ue[17]=Qa,ue[18]=ja,0!==we&&(ue[19]=we,C.length++),C};function W(D,N,C){C.negative=N.negative^D.negative,C.length=D.length+N.length;for(var a=0,B=0,Q=0;Q>>26)|0)>>>26,ee&=67108863}C.words[Q]=ce,a=ee,ee=B}return 0!==a?C.words[Q]=a:C.length--,C._strip()}function G(D,N,C){return W(D,N,C)}function H(D,N){this.x=D,this.y=N}Math.imul||(V=L),b.prototype.mulTo=function(D,N){var C=this.length+D.length;return 10===this.length&&10===D.length?V(this,D,N):C<63?L(this,D,N):C<1024?W(this,D,N):G(this,D,N)},H.prototype.makeRBT=function(D){for(var N=new Array(D),C=b.prototype._countBits(D)-1,a=0;a>=1;return a},H.prototype.permute=function(D,N,C,a,B,Q){for(var ee=0;ee>>=1)B++;return 1<>>=13),B>>>=13;for(Q=2*N;Q>=26,C+=B/67108864|0,C+=Q>>>26,this.words[a]=67108863&Q}return 0!==C&&(this.words[a]=C,this.length++),N?this.ineg():this},b.prototype.muln=function(D){return this.clone().imuln(D)},b.prototype.sqr=function(){return this.mul(this)},b.prototype.isqr=function(){return this.imul(this.clone())},b.prototype.pow=function(D){var N=function(Q){for(var ee=new Array(Q.bitLength()),ce=0;ce>>ce%26&1;return ee}(D);if(0===N.length)return new b(1);for(var C=this,a=0;a=0);var N,C=D%26,a=(D-C)/26,B=67108863>>>26-C<<26-C;if(0!==C){var Q=0;for(N=0;N>>26-C}Q&&(this.words[N]=Q,this.length++)}if(0!==a){for(N=this.length-1;N>=0;N--)this.words[N+a]=this.words[N];for(N=0;N=0),a=N?(N-N%26)/26:0;var B=D%26,Q=Math.min((D-B)/26,this.length),ee=67108863^67108863>>>B<Q)for(this.length-=Q,ue=0;ue=0&&(0!==we||ue>=a);ue--){var ae=0|this.words[ue];this.words[ue]=we<<26-B|ae>>>B,we=ae&ee}return ce&&0!==we&&(ce.words[ce.length++]=we),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},b.prototype.ishrn=function(D,N,C){return T(0===this.negative),this.iushrn(D,N,C)},b.prototype.shln=function(D){return this.clone().ishln(D)},b.prototype.ushln=function(D){return this.clone().iushln(D)},b.prototype.shrn=function(D){return this.clone().ishrn(D)},b.prototype.ushrn=function(D){return this.clone().iushrn(D)},b.prototype.testn=function(D){T("number"==typeof D&&D>=0);var N=D%26,C=(D-N)/26;return!(this.length<=C||!(this.words[C]&1<=0);var N=D%26,C=(D-N)/26;return T(0===this.negative,"imaskn works only with positive numbers"),this.length<=C?this:(0!==N&&C++,this.length=Math.min(C,this.length),0!==N&&(this.words[this.length-1]&=67108863^67108863>>>N<=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},b.prototype.isubn=function(D){if(T("number"==typeof D),T(D<67108864),D<0)return this.iaddn(-D);if(0!==this.negative)return this.negative=0,this.iaddn(D),this.negative=1,this;if(this.words[0]-=D,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N>26)-(ce/67108864|0),this.words[a+C]=67108863&B}for(;a>26,this.words[a+C]=67108863&B;if(0===ee)return this._strip();for(T(-1===ee),ee=0,a=0;a>26,this.words[a]=67108863&B;return this.negative=1,this._strip()},b.prototype._wordDiv=function(D,N){var C,a=this.clone(),B=D,Q=0|B.words[B.length-1];0!=(C=26-this._countBits(Q))&&(B=B.ushln(C),a.iushln(C),Q=0|B.words[B.length-1]);var ee,ce=a.length-B.length;if("mod"!==N){(ee=new b(null)).length=ce+1,ee.words=new Array(ee.length);for(var ue=0;ue=0;ae--){var Te=67108864*(0|a.words[B.length+ae])+(0|a.words[B.length+ae-1]);for(Te=Math.min(Te/Q|0,67108863),a._ishlnsubmul(B,Te,ae);0!==a.negative;)Te--,a.negative=0,a._ishlnsubmul(B,1,ae),a.isZero()||(a.negative^=1);ee&&(ee.words[ae]=Te)}return ee&&ee._strip(),a._strip(),"div"!==N&&0!==C&&a.iushrn(C),{div:ee||null,mod:a}},b.prototype.divmod=function(D,N,C){return T(!D.isZero()),this.isZero()?{div:new b(0),mod:new b(0)}:0!==this.negative&&0===D.negative?(Q=this.neg().divmod(D,N),"mod"!==N&&(a=Q.div.neg()),"div"!==N&&(B=Q.mod.neg(),C&&0!==B.negative&&B.iadd(D)),{div:a,mod:B}):0===this.negative&&0!==D.negative?(Q=this.divmod(D.neg(),N),"mod"!==N&&(a=Q.div.neg()),{div:a,mod:Q.mod}):0!=(this.negative&D.negative)?(Q=this.neg().divmod(D.neg(),N),"div"!==N&&(B=Q.mod.neg(),C&&0!==B.negative&&B.isub(D)),{div:Q.div,mod:B}):D.length>this.length||this.cmp(D)<0?{div:new b(0),mod:this}:1===D.length?"div"===N?{div:this.divn(D.words[0]),mod:null}:"mod"===N?{div:null,mod:new b(this.modrn(D.words[0]))}:{div:this.divn(D.words[0]),mod:new b(this.modrn(D.words[0]))}:this._wordDiv(D,N);var a,B,Q},b.prototype.div=function(D){return this.divmod(D,"div",!1).div},b.prototype.mod=function(D){return this.divmod(D,"mod",!1).mod},b.prototype.umod=function(D){return this.divmod(D,"mod",!0).mod},b.prototype.divRound=function(D){var N=this.divmod(D);if(N.mod.isZero())return N.div;var C=0!==N.div.negative?N.mod.isub(D):N.mod,a=D.ushrn(1),B=D.andln(1),Q=C.cmp(a);return Q<0||1===B&&0===Q?N.div:0!==N.div.negative?N.div.isubn(1):N.div.iaddn(1)},b.prototype.modrn=function(D){var N=D<0;N&&(D=-D),T(D<=67108863);for(var C=(1<<26)%D,a=0,B=this.length-1;B>=0;B--)a=(C*a+(0|this.words[B]))%D;return N?-a:a},b.prototype.modn=function(D){return this.modrn(D)},b.prototype.idivn=function(D){var N=D<0;N&&(D=-D),T(D<=67108863);for(var C=0,a=this.length-1;a>=0;a--){var B=(0|this.words[a])+67108864*C;this.words[a]=B/D|0,C=B%D}return this._strip(),N?this.ineg():this},b.prototype.divn=function(D){return this.clone().idivn(D)},b.prototype.egcd=function(D){T(0===D.negative),T(!D.isZero());var N=this,C=D.clone();N=0!==N.negative?N.umod(D):N.clone();for(var a=new b(1),B=new b(0),Q=new b(0),ee=new b(1),ce=0;N.isEven()&&C.isEven();)N.iushrn(1),C.iushrn(1),++ce;for(var ue=C.clone(),we=N.clone();!N.isZero();){for(var ae=0,Te=1;0==(N.words[0]&Te)&&ae<26;++ae,Te<<=1);if(ae>0)for(N.iushrn(ae);ae-- >0;)(a.isOdd()||B.isOdd())&&(a.iadd(ue),B.isub(we)),a.iushrn(1),B.iushrn(1);for(var le=0,X=1;0==(C.words[0]&X)&&le<26;++le,X<<=1);if(le>0)for(C.iushrn(le);le-- >0;)(Q.isOdd()||ee.isOdd())&&(Q.iadd(ue),ee.isub(we)),Q.iushrn(1),ee.iushrn(1);N.cmp(C)>=0?(N.isub(C),a.isub(Q),B.isub(ee)):(C.isub(N),Q.isub(a),ee.isub(B))}return{a:Q,b:ee,gcd:C.iushln(ce)}},b.prototype._invmp=function(D){T(0===D.negative),T(!D.isZero());var N=this,C=D.clone();N=0!==N.negative?N.umod(D):N.clone();for(var a,B=new b(1),Q=new b(0),ee=C.clone();N.cmpn(1)>0&&C.cmpn(1)>0;){for(var ce=0,ue=1;0==(N.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(N.iushrn(ce);ce-- >0;)B.isOdd()&&B.iadd(ee),B.iushrn(1);for(var we=0,ae=1;0==(C.words[0]&ae)&&we<26;++we,ae<<=1);if(we>0)for(C.iushrn(we);we-- >0;)Q.isOdd()&&Q.iadd(ee),Q.iushrn(1);N.cmp(C)>=0?(N.isub(C),B.isub(Q)):(C.isub(N),Q.isub(B))}return(a=0===N.cmpn(1)?B:Q).cmpn(0)<0&&a.iadd(D),a},b.prototype.gcd=function(D){if(this.isZero())return D.abs();if(D.isZero())return this.abs();var N=this.clone(),C=D.clone();N.negative=0,C.negative=0;for(var a=0;N.isEven()&&C.isEven();a++)N.iushrn(1),C.iushrn(1);for(;;){for(;N.isEven();)N.iushrn(1);for(;C.isEven();)C.iushrn(1);var B=N.cmp(C);if(B<0){var Q=N;N=C,C=Q}else if(0===B||0===C.cmpn(1))break;N.isub(C)}return C.iushln(a)},b.prototype.invm=function(D){return this.egcd(D).a.umod(D)},b.prototype.isEven=function(){return 0==(1&this.words[0])},b.prototype.isOdd=function(){return 1==(1&this.words[0])},b.prototype.andln=function(D){return this.words[0]&D},b.prototype.bincn=function(D){T("number"==typeof D);var N=D%26,C=(D-N)/26,a=1<>>26,this.words[Q]=ee&=67108863}return 0!==B&&(this.words[Q]=B,this.length++),this},b.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},b.prototype.cmpn=function(D){var N,C=D<0;if(0!==this.negative&&!C)return-1;if(0===this.negative&&C)return 1;if(this._strip(),this.length>1)N=1;else{C&&(D=-D),T(D<=67108863,"Number is too big");var a=0|this.words[0];N=a===D?0:aD.length)return 1;if(this.length=0;C--){var a=0|this.words[C],B=0|D.words[C];if(a!==B){aB&&(N=1);break}}return N},b.prototype.gtn=function(D){return 1===this.cmpn(D)},b.prototype.gt=function(D){return 1===this.cmp(D)},b.prototype.gten=function(D){return this.cmpn(D)>=0},b.prototype.gte=function(D){return this.cmp(D)>=0},b.prototype.ltn=function(D){return-1===this.cmpn(D)},b.prototype.lt=function(D){return-1===this.cmp(D)},b.prototype.lten=function(D){return this.cmpn(D)<=0},b.prototype.lte=function(D){return this.cmp(D)<=0},b.prototype.eqn=function(D){return 0===this.cmpn(D)},b.prototype.eq=function(D){return 0===this.cmp(D)},b.red=function(D){return new v(D)},b.prototype.toRed=function(D){return T(!this.red,"Already a number in reduction context"),T(0===this.negative,"red works only with positives"),D.convertTo(this)._forceRed(D)},b.prototype.fromRed=function(){return T(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},b.prototype._forceRed=function(D){return this.red=D,this},b.prototype.forceRed=function(D){return T(!this.red,"Already a number in reduction context"),this._forceRed(D)},b.prototype.redAdd=function(D){return T(this.red,"redAdd works only with red numbers"),this.red.add(this,D)},b.prototype.redIAdd=function(D){return T(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,D)},b.prototype.redSub=function(D){return T(this.red,"redSub works only with red numbers"),this.red.sub(this,D)},b.prototype.redISub=function(D){return T(this.red,"redISub works only with red numbers"),this.red.isub(this,D)},b.prototype.redShl=function(D){return T(this.red,"redShl works only with red numbers"),this.red.shl(this,D)},b.prototype.redMul=function(D){return T(this.red,"redMul works only with red numbers"),this.red._verify2(this,D),this.red.mul(this,D)},b.prototype.redIMul=function(D){return T(this.red,"redMul works only with red numbers"),this.red._verify2(this,D),this.red.imul(this,D)},b.prototype.redSqr=function(){return T(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},b.prototype.redISqr=function(){return T(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},b.prototype.redSqrt=function(){return T(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},b.prototype.redInvm=function(){return T(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},b.prototype.redNeg=function(){return T(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},b.prototype.redPow=function(D){return T(this.red&&!D.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,D)};var j={k256:null,p224:null,p192:null,p25519:null};function K(D,N){this.name=D,this.p=new b(N,16),this.n=this.p.bitLength(),this.k=new b(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function R(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function o(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function y(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function v(D){if("string"==typeof D){var N=b._prime(D);this.m=N.p,this.prime=N}else T(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function k(D){v.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new b(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)}K.prototype._tmp=function(){var D=new b(null);return D.words=new Array(Math.ceil(this.n/13)),D},K.prototype.ireduce=function(D){var N,C=D;do{this.split(C,this.tmp),N=(C=(C=this.imulK(C)).iadd(this.tmp)).bitLength()}while(N>this.n);var a=N0?C.isub(this.p):void 0!==C.strip?C.strip():C._strip(),C},K.prototype.split=function(D,N){D.iushrn(this.n,0,N)},K.prototype.imulK=function(D){return D.imul(this.k)},g(R,K),R.prototype.split=function(D,N){for(var C=4194303,a=Math.min(D.length,9),B=0;B>>22,Q=ee}D.words[B-10]=Q>>>=22,D.length-=0===Q&&D.length>10?10:9},R.prototype.imulK=function(D){D.words[D.length]=0,D.words[D.length+1]=0,D.length+=2;for(var N=0,C=0;C>>=26,D.words[C]=B,N=a}return 0!==N&&(D.words[D.length++]=N),D},b._prime=function(D){if(j[D])return j[D];var N;if("k256"===D)N=new R;else if("p224"===D)N=new o;else if("p192"===D)N=new y;else{if("p25519"!==D)throw new Error("Unknown prime "+D);N=new M}return j[D]=N,N},v.prototype._verify1=function(D){T(0===D.negative,"red works only with positives"),T(D.red,"red works only with red numbers")},v.prototype._verify2=function(D,N){T(0==(D.negative|N.negative),"red works only with positives"),T(D.red&&D.red===N.red,"red works only with red numbers")},v.prototype.imod=function(D){return this.prime?this.prime.ireduce(D)._forceRed(this):(_(D,D.umod(this.m)._forceRed(this)),D)},v.prototype.neg=function(D){return D.isZero()?D.clone():this.m.sub(D)._forceRed(this)},v.prototype.add=function(D,N){this._verify2(D,N);var C=D.add(N);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},v.prototype.iadd=function(D,N){this._verify2(D,N);var C=D.iadd(N);return C.cmp(this.m)>=0&&C.isub(this.m),C},v.prototype.sub=function(D,N){this._verify2(D,N);var C=D.sub(N);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},v.prototype.isub=function(D,N){this._verify2(D,N);var C=D.isub(N);return C.cmpn(0)<0&&C.iadd(this.m),C},v.prototype.shl=function(D,N){return this._verify1(D),this.imod(D.ushln(N))},v.prototype.imul=function(D,N){return this._verify2(D,N),this.imod(D.imul(N))},v.prototype.mul=function(D,N){return this._verify2(D,N),this.imod(D.mul(N))},v.prototype.isqr=function(D){return this.imul(D,D.clone())},v.prototype.sqr=function(D){return this.mul(D,D)},v.prototype.sqrt=function(D){if(D.isZero())return D.clone();var N=this.m.andln(3);if(T(N%2==1),3===N){var C=this.m.add(new b(1)).iushrn(2);return this.pow(D,C)}for(var a=this.m.subn(1),B=0;!a.isZero()&&0===a.andln(1);)B++,a.iushrn(1);T(!a.isZero());var Q=new b(1).toRed(this),ee=Q.redNeg(),ce=this.m.subn(1).iushrn(1),ue=this.m.bitLength();for(ue=new b(2*ue*ue).toRed(this);0!==this.pow(ue,ce).cmp(ee);)ue.redIAdd(ee);for(var we=this.pow(ue,a),ae=this.pow(D,a.addn(1).iushrn(1)),Te=this.pow(D,a),le=B;0!==Te.cmp(Q);){for(var X=Te,ne=0;0!==X.cmp(Q);ne++)X=X.redSqr();T(ne=0;a--){for(var ue=N.words[a],we=ce-1;we>=0;we--){var ae=ue>>we&1;B!==C[0]&&(B=this.sqr(B)),0!==ae||0!==Q?(Q<<=1,Q|=ae,(4==++ee||0===a&&0===we)&&(B=this.mul(B,C[Q]),ee=0,Q=0)):ee=0}ce=26}return B},v.prototype.convertTo=function(D){var N=D.umod(this.m);return N===D?N.clone():N},v.prototype.convertFrom=function(D){var N=D.clone();return N.red=null,N},b.mont=function(D){return new k(D)},g(k,v),k.prototype.convertTo=function(D){return this.imod(D.ushln(this.shift))},k.prototype.convertFrom=function(D){var N=this.imod(D.mul(this.rinv));return N.red=null,N},k.prototype.imul=function(D,N){if(D.isZero()||N.isZero())return D.words[0]=0,D.length=1,D;var C=D.imul(N),a=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=C.isub(a).iushrn(this.shift),Q=B;return B.cmp(this.m)>=0?Q=B.isub(this.m):B.cmpn(0)<0&&(Q=B.iadd(this.m)),Q._forceRed(this)},k.prototype.mul=function(D,N){if(D.isZero()||N.isZero())return new b(0)._forceRed(this);var C=D.mul(N),a=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=C.isub(a).iushrn(this.shift),Q=B;return B.cmp(this.m)>=0?Q=B.isub(this.m):B.cmpn(0)<0&&(Q=B.iadd(this.m)),Q._forceRed(this)},k.prototype.invm=function(D){return this.imod(D._invmp(this.m).mul(this.r2))._forceRed(this)}}(z)},82202:(z,O,E)=>{"use strict";var d,x=E(28847)(E(3355));function f(g){this.rand=g}if(z.exports=function(g){return d||(d=new f(null)),d.generate(g)},z.exports.Rand=f,f.prototype.generate=function(g){return this._rand(g)},f.prototype._rand=function(g){if(this.rand.getBytes)return this.rand.getBytes(g);for(var b=new Uint8Array(g),l=0;l{"use strict";var d=E(48850).Buffer;function x(h){d.isBuffer(h)||(h=d.from(h));for(var u=h.length/4|0,m=new Array(u),_=0;_>>24]^W[K>>>16&255]^G[R>>>8&255]^H[255&o]^u[y++],I=V[K>>>24]^W[R>>>16&255]^G[o>>>8&255]^H[255&j]^u[y++],P=V[R>>>24]^W[o>>>16&255]^G[j>>>8&255]^H[255&K]^u[y++],L=V[o>>>24]^W[j>>>16&255]^G[K>>>8&255]^H[255&R]^u[y++],j=S,K=I,R=P,o=L;return S=(_[j>>>24]<<24|_[K>>>16&255]<<16|_[R>>>8&255]<<8|_[255&o])^u[y++],I=(_[K>>>24]<<24|_[R>>>16&255]<<16|_[o>>>8&255]<<8|_[255&j])^u[y++],P=(_[R>>>24]<<24|_[o>>>16&255]<<16|_[j>>>8&255]<<8|_[255&K])^u[y++],L=(_[o>>>24]<<24|_[j>>>16&255]<<16|_[K>>>8&255]<<8|_[255&R])^u[y++],[S>>>=0,I>>>=0,P>>>=0,L>>>=0]}var g=[0,1,2,4,8,16,32,64,128,27,54],b=function(){for(var h=new Array(256),u=0;u<256;u++)h[u]=u<128?u<<1:u<<1^283;for(var m=[],_=[],w=[[],[],[],[]],S=[[],[],[],[]],I=0,P=0,L=0;L<256;++L){var V=P^P<<1^P<<2^P<<3^P<<4;m[I]=V=V>>>8^255&V^99,_[V]=I;var W=h[I],G=h[W],H=h[G],j=257*h[V]^16843008*V;w[0][I]=j<<24|j>>>8,w[1][I]=j<<16|j>>>16,w[2][I]=j<<8|j>>>24,w[3][I]=j,S[0][V]=(j=16843009*H^65537*G^257*W^16843008*I)<<24|j>>>8,S[1][V]=j<<16|j>>>16,S[2][V]=j<<8|j>>>24,S[3][V]=j,0===I?I=P=1:(I=W^h[h[h[H^W]]],P^=h[h[P]])}return{SBOX:m,INV_SBOX:_,SUB_MIX:w,INV_SUB_MIX:S}}();function l(h){this._key=x(h),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var h=this._key,u=h.length,m=u+6,_=4*(m+1),w=[],S=0;S>>24)>>>24]<<24|b.SBOX[I>>>16&255]<<16|b.SBOX[I>>>8&255]<<8|b.SBOX[255&I],I^=g[S/u|0]<<24):u>6&&S%u==4&&(I=b.SBOX[I>>>24]<<24|b.SBOX[I>>>16&255]<<16|b.SBOX[I>>>8&255]<<8|b.SBOX[255&I]),w[S]=w[S-u]^I}for(var P=[],L=0;L<_;L++){var V=_-L,W=w[V-(L%4?0:4)];P[L]=L<4||V<=4?W:b.INV_SUB_MIX[0][b.SBOX[W>>>24]]^b.INV_SUB_MIX[1][b.SBOX[W>>>16&255]]^b.INV_SUB_MIX[2][b.SBOX[W>>>8&255]]^b.INV_SUB_MIX[3][b.SBOX[255&W]]}this._nRounds=m,this._keySchedule=w,this._invKeySchedule=P},l.prototype.encryptBlockRaw=function(h){return T(h=x(h),this._keySchedule,b.SUB_MIX,b.SBOX,this._nRounds)},l.prototype.encryptBlock=function(h){var u=this.encryptBlockRaw(h),m=d.allocUnsafe(16);return m.writeUInt32BE(u[0],0),m.writeUInt32BE(u[1],4),m.writeUInt32BE(u[2],8),m.writeUInt32BE(u[3],12),m},l.prototype.decryptBlock=function(h){var u=(h=x(h))[1];h[1]=h[3],h[3]=u;var m=T(h,this._invKeySchedule,b.INV_SUB_MIX,b.INV_SBOX,this._nRounds),_=d.allocUnsafe(16);return _.writeUInt32BE(m[0],0),_.writeUInt32BE(m[3],4),_.writeUInt32BE(m[2],8),_.writeUInt32BE(m[1],12),_},l.prototype.scrub=function(){f(this._keySchedule),f(this._invKeySchedule),f(this._key)},z.exports.AES=l},10426:(z,O,E)=>{"use strict";var d=E(37494),x=E(48850).Buffer,f=E(93013),T=E(41736),g=E(26626),b=E(96316),l=E(67557);function h(u,m,_,w){f.call(this);var S=x.alloc(4,0);this._cipher=new d.AES(m);var I=this._cipher.encryptBlock(S);this._ghash=new g(I),_=function(P,L,V){if(12===L.length)return P._finID=x.concat([L,x.from([0,0,0,1])]),x.concat([L,x.from([0,0,0,2])]);var W=new g(V),G=L.length,H=G%16;W.update(L),H&&W.update(x.alloc(H=16-H,0)),W.update(x.alloc(8,0));var j=8*G,K=x.alloc(8);K.writeUIntBE(j,0,8),W.update(K),P._finID=W.state;var R=x.from(P._finID);return l(R),R}(this,_,I),this._prev=x.from(_),this._cache=x.allocUnsafe(0),this._secCache=x.allocUnsafe(0),this._decrypt=w,this._alen=0,this._len=0,this._mode=u,this._authTag=null,this._called=!1}T(h,f),h.prototype._update=function(u){if(!this._called&&this._alen){var m=16-this._alen%16;m<16&&(m=x.alloc(m,0),this._ghash.update(m))}this._called=!0;var _=this._mode.encrypt(this,u);return this._ghash.update(this._decrypt?u:_),this._len+=u.length,_},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var u=b(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(m,_){var w=0;m.length!==_.length&&w++;for(var S=Math.min(m.length,_.length),I=0;I{"use strict";var d=E(85478),x=E(32184),f=E(44946);O.createCipher=O.Cipher=d.createCipher,O.createCipheriv=O.Cipheriv=d.createCipheriv,O.createDecipher=O.Decipher=x.createDecipher,O.createDecipheriv=O.Decipheriv=x.createDecipheriv,O.listCiphers=O.getCiphers=function(){return Object.keys(f)}},32184:(z,O,E)=>{"use strict";var d=E(10426),x=E(48850).Buffer,f=E(58408),T=E(21408),g=E(93013),b=E(37494),l=E(27085);function h(_,w,S){g.call(this),this._cache=new u,this._last=void 0,this._cipher=new b.AES(w),this._prev=x.from(S),this._mode=_,this._autopadding=!0}function u(){this.cache=x.allocUnsafe(0)}function m(_,w,S){var I=f[_.toLowerCase()];if(!I)throw new TypeError("invalid suite type");if("string"==typeof S&&(S=x.from(S)),"GCM"!==I.mode&&S.length!==I.iv)throw new TypeError("invalid iv length "+S.length);if("string"==typeof w&&(w=x.from(w)),w.length!==I.key/8)throw new TypeError("invalid key length "+w.length);return"stream"===I.type?new T(I.module,w,S,!0):"auth"===I.type?new d(I.module,w,S,!0):new h(I.module,w,S)}E(41736)(h,g),h.prototype._update=function(_){var w,S;this._cache.add(_);for(var I=[];w=this._cache.get(this._autopadding);)S=this._mode.decrypt(this,w),I.push(S);return x.concat(I)},h.prototype._final=function(){var _=this._cache.flush();if(this._autopadding)return function(w){var S=w[15];if(S<1||S>16)throw new Error("unable to decrypt data");for(var I=-1;++I16)return w=this.cache.slice(0,16),this.cache=this.cache.slice(16),w}else if(this.cache.length>=16)return w=this.cache.slice(0,16),this.cache=this.cache.slice(16),w;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache},O.createDecipher=function(_,w){var S=f[_.toLowerCase()];if(!S)throw new TypeError("invalid suite type");var I=l(w,!1,S.key,S.iv);return m(_,I.key,I.iv)},O.createDecipheriv=m},85478:(z,O,E)=>{"use strict";var d=E(58408),x=E(10426),f=E(48850).Buffer,T=E(21408),g=E(93013),b=E(37494),l=E(27085);function h(w,S,I){g.call(this),this._cache=new m,this._cipher=new b.AES(S),this._prev=f.from(I),this._mode=w,this._autopadding=!0}E(41736)(h,g),h.prototype._update=function(w){var S,I;this._cache.add(w);for(var P=[];S=this._cache.get();)I=this._mode.encrypt(this,S),P.push(I);return f.concat(P)};var u=f.alloc(16,16);function m(){this.cache=f.allocUnsafe(0)}function _(w,S,I){var P=d[w.toLowerCase()];if(!P)throw new TypeError("invalid suite type");if("string"==typeof S&&(S=f.from(S)),S.length!==P.key/8)throw new TypeError("invalid key length "+S.length);if("string"==typeof I&&(I=f.from(I)),"GCM"!==P.mode&&I.length!==P.iv)throw new TypeError("invalid iv length "+I.length);return"stream"===P.type?new T(P.module,S,I):"auth"===P.type?new x(P.module,S,I):new h(P.module,S,I)}h.prototype._final=function(){var w=this._cache.flush();if(this._autopadding)return w=this._mode.encrypt(this,w),this._cipher.scrub(),w;if(!w.equals(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(w){return this._autopadding=!!w,this},m.prototype.add=function(w){this.cache=f.concat([this.cache,w])},m.prototype.get=function(){if(this.cache.length>15){var w=this.cache.slice(0,16);return this.cache=this.cache.slice(16),w}return null},m.prototype.flush=function(){for(var w=16-this.cache.length,S=f.allocUnsafe(w),I=-1;++I{"use strict";var d=E(48850).Buffer,x=d.alloc(16,0);function f(g){var b=d.allocUnsafe(16);return b.writeUInt32BE(g[0]>>>0,0),b.writeUInt32BE(g[1]>>>0,4),b.writeUInt32BE(g[2]>>>0,8),b.writeUInt32BE(g[3]>>>0,12),b}function T(g){this.h=g,this.state=d.alloc(16,0),this.cache=d.allocUnsafe(0)}T.prototype.ghash=function(g){for(var b=-1;++b0;b--)h[b]=h[b]>>>1|(1&h[b-1])<<31;h[0]=h[0]>>>1,l&&(h[0]=h[0]^225<<24)}this.state=f(u)},T.prototype.update=function(g){var b;for(this.cache=d.concat([this.cache,g]);this.cache.length>=16;)b=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(b)},T.prototype.final=function(g,b){return this.cache.length&&this.ghash(d.concat([this.cache,x],16)),this.ghash(f([0,g,0,b])),this.state},z.exports=T},67557:z=>{"use strict";z.exports=function(O){for(var E,d=O.length;d--;){if(255!==(E=O.readUInt8(d))){E++,O.writeUInt8(E,d);break}O.writeUInt8(0,d)}}},77427:(z,O,E)=>{"use strict";var d=E(96316);O.encrypt=function(x,f){var T=d(f,x._prev);return x._prev=x._cipher.encryptBlock(T),x._prev},O.decrypt=function(x,f){var T=x._prev;x._prev=f;var g=x._cipher.decryptBlock(f);return d(g,T)}},44030:(z,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(96316);function f(T,g,b){var l=g.length,h=x(g,T._cache);return T._cache=T._cache.slice(l),T._prev=d.concat([T._prev,b?g:h]),h}O.encrypt=function(T,g,b){for(var l,h=d.allocUnsafe(0);g.length;){if(0===T._cache.length&&(T._cache=T._cipher.encryptBlock(T._prev),T._prev=d.allocUnsafe(0)),!(T._cache.length<=g.length)){h=d.concat([h,f(T,g,b)]);break}h=d.concat([h,f(T,g.slice(0,l=T._cache.length),b)]),g=g.slice(l)}return h}},13206:(z,O,E)=>{"use strict";var d=E(48850).Buffer;function x(T,g,b){for(var l,h,u=-1,m=0;++u<8;)l=g&1<<7-u?128:0,m+=(128&(h=T._cipher.encryptBlock(T._prev)[0]^l))>>u%8,T._prev=f(T._prev,b?l:h);return m}function f(T,g){var b=T.length,l=-1,h=d.allocUnsafe(T.length);for(T=d.concat([T,d.from([g])]);++l>7;return h}O.encrypt=function(T,g,b){for(var l=g.length,h=d.allocUnsafe(l),u=-1;++u{"use strict";var d=E(48850).Buffer;function x(f,T,g){var b=f._cipher.encryptBlock(f._prev)[0]^T;return f._prev=d.concat([f._prev.slice(1),d.from([g?T:b])]),b}O.encrypt=function(f,T,g){for(var b=T.length,l=d.allocUnsafe(b),h=-1;++h{"use strict";var d=E(96316),x=E(48850).Buffer,f=E(67557);function T(g){var b=g._cipher.encryptBlockRaw(g._prev);return f(g._prev),b}O.encrypt=function(g,b){var l=Math.ceil(b.length/16),h=g._cache.length;g._cache=x.concat([g._cache,x.allocUnsafe(16*l)]);for(var u=0;u{"use strict";O.encrypt=function(E,d){return E._cipher.encryptBlock(d)},O.decrypt=function(E,d){return E._cipher.decryptBlock(d)}},58408:(z,O,E)=>{"use strict";var d={ECB:E(59297),CBC:E(77427),CFB:E(44030),CFB8:E(14726),CFB1:E(13206),OFB:E(91962),CTR:E(32802),GCM:E(32802)},x=E(44946);for(var f in x)x[f].module=d[x[f].mode];z.exports=x},91962:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(96316);function f(T){return T._prev=T._cipher.encryptBlock(T._prev),T._prev}O.encrypt=function(T,g){for(;T._cache.length{"use strict";var d=E(37494),x=E(48850).Buffer,f=E(93013);function T(g,b,l,h){f.call(this),this._cipher=new d.AES(b),this._prev=x.from(l),this._cache=x.allocUnsafe(0),this._secCache=x.allocUnsafe(0),this._decrypt=h,this._mode=g}E(41736)(T,f),T.prototype._update=function(g){return this._mode.encrypt(this,g,this._decrypt)},T.prototype._final=function(){this._cipher.scrub()},z.exports=T},56805:(z,O,E)=>{"use strict";var d=E(19120),x=E(98073),f=E(58408),T=E(30867),g=E(27085);function b(h,u,m){if(h=h.toLowerCase(),f[h])return x.createCipheriv(h,u,m);if(T[h])return new d({key:u,iv:m,mode:h});throw new TypeError("invalid suite type")}function l(h,u,m){if(h=h.toLowerCase(),f[h])return x.createDecipheriv(h,u,m);if(T[h])return new d({key:u,iv:m,mode:h,decrypt:!0});throw new TypeError("invalid suite type")}O.createCipher=O.Cipher=function(h,u){var m,_;if(h=h.toLowerCase(),f[h])m=f[h].key,_=f[h].iv;else{if(!T[h])throw new TypeError("invalid suite type");m=8*T[h].key,_=T[h].iv}var w=g(u,!1,m,_);return b(h,w.key,w.iv)},O.createCipheriv=O.Cipheriv=b,O.createDecipher=O.Decipher=function(h,u){var m,_;if(h=h.toLowerCase(),f[h])m=f[h].key,_=f[h].iv;else{if(!T[h])throw new TypeError("invalid suite type");m=8*T[h].key,_=T[h].iv}var w=g(u,!1,m,_);return l(h,w.key,w.iv)},O.createDecipheriv=O.Decipheriv=l,O.listCiphers=O.getCiphers=function(){return Object.keys(T).concat(x.getCiphers())}},19120:(z,O,E)=>{"use strict";var d=E(93013),x=E(75626),f=E(41736),T=E(48850).Buffer,g={"des-ede3-cbc":x.CBC.instantiate(x.EDE),"des-ede3":x.EDE,"des-ede-cbc":x.CBC.instantiate(x.EDE),"des-ede":x.EDE,"des-cbc":x.CBC.instantiate(x.DES),"des-ecb":x.DES};function b(l){d.call(this);var h,u=l.mode.toLowerCase(),m=g[u];h=l.decrypt?"decrypt":"encrypt";var _=l.key;T.isBuffer(_)||(_=T.from(_)),"des-ede"!==u&&"des-ede-cbc"!==u||(_=T.concat([_,_.slice(0,8)]));var w=l.iv;T.isBuffer(w)||(w=T.from(w)),this._des=m.create({key:_,iv:w,type:h})}g.des=g["des-cbc"],g.des3=g["des-ede3-cbc"],z.exports=b,f(b,d),b.prototype._update=function(l){return T.from(this._des.update(l))},b.prototype._final=function(){return T.from(this._des.final())}},30867:(z,O)=>{"use strict";O["des-ecb"]={key:8,iv:0},O["des-cbc"]=O.des={key:8,iv:8},O["des-ede3-cbc"]=O.des3={key:24,iv:8},O["des-ede3"]={key:24,iv:0},O["des-ede-cbc"]={key:16,iv:8},O["des-ede"]={key:16,iv:0}},99782:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(31734),f=E(75010);function T(b){var l,h=b.modulus.byteLength();do{l=new x(f(h))}while(l.cmp(b.modulus)>=0||!l.umod(b.prime1)||!l.umod(b.prime2));return l}function g(b,l){var G,H,h={blinder:(H=T(G=l)).toRed(x.mont(G.modulus)).redPow(new x(G.publicExponent)).fromRed(),unblinder:H.invm(G.modulus)},u=l.modulus.byteLength(),m=new x(b).mul(h.blinder).umod(l.modulus),_=m.toRed(x.mont(l.prime1)),w=m.toRed(x.mont(l.prime2)),S=l.coefficient,I=l.prime1,P=l.prime2,L=_.redPow(l.exponent1).fromRed(),V=w.redPow(l.exponent2).fromRed(),W=L.isub(V).imul(S).umod(I).imul(P);return V.iadd(W).imul(h.unblinder).umod(l.modulus).toArrayLike(d,"be",u)}g.getr=T,z.exports=g},26561:(z,O,E)=>{"use strict";z.exports=E(75207)},79527:(z,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(35866),f=E(86505),T=E(41736),g=E(11628),b=E(15410),l=E(75207);function h(w){f.Writable.call(this);var S=l[w];if(!S)throw new Error("Unknown message digest");this._hashType=S.hash,this._hash=x(S.hash),this._tag=S.id,this._signType=S.sign}function u(w){f.Writable.call(this);var S=l[w];if(!S)throw new Error("Unknown message digest");this._hash=x(S.hash),this._tag=S.id,this._signType=S.sign}function m(w){return new h(w)}function _(w){return new u(w)}Object.keys(l).forEach(function(w){l[w].id=d.from(l[w].id,"hex"),l[w.toLowerCase()]=l[w]}),T(h,f.Writable),h.prototype._write=function(w,S,I){this._hash.update(w),I()},h.prototype.update=function(w,S){return"string"==typeof w&&(w=d.from(w,S)),this._hash.update(w),this},h.prototype.sign=function(w,S){this.end();var I=this._hash.digest(),P=g(I,w,this._hashType,this._signType,this._tag);return S?P.toString(S):P},T(u,f.Writable),u.prototype._write=function(w,S,I){this._hash.update(w),I()},u.prototype.update=function(w,S){return"string"==typeof w&&(w=d.from(w,S)),this._hash.update(w),this},u.prototype.verify=function(w,S,I){"string"==typeof S&&(S=d.from(S,I)),this.end();var P=this._hash.digest();return b(S,P,w,this._signType,this._tag)},z.exports={Sign:m,Verify:_,createSign:m,createVerify:_}},11628:(z,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(34424),f=E(99782),T=E(36597).ec,g=E(31734),b=E(27552),l=E(1308);function h(w,S,I,P){if((w=d.from(w.toArray())).length0&&I.ishrn(P),I}function m(w,S,I){var P,L;do{for(P=d.alloc(0);8*P.length{"use strict";var d=E(48850).Buffer,x=E(31734),f=E(36597).ec,T=E(27552),g=E(1308);function b(l,h){if(l.cmpn(0)<=0)throw new Error("invalid sig");if(l.cmp(h)>=h)throw new Error("invalid sig")}z.exports=function(l,h,u,m,_){var w=T(u);if("ec"===w.type){if("ecdsa"!==m&&"ecdsa/rsa"!==m)throw new Error("wrong public key type");return function(G,H,j){var K=g[j.data.algorithm.curve.join(".")];if(!K)throw new Error("unknown curve "+j.data.algorithm.curve.join("."));return new f(K).verify(H,G,j.data.subjectPrivateKey.data)}(l,h,w)}if("dsa"===w.type){if("dsa"!==m)throw new Error("wrong public key type");return function(G,H,j){var K=j.data.p,R=j.data.q,o=j.data.g,y=j.data.pub_key,M=T.signature.decode(G,"der"),v=M.s,k=M.r;b(v,R),b(k,R);var D=x.mont(K),N=v.invm(R);return 0===o.toRed(D).redPow(new x(H).mul(N).mod(R)).fromRed().mul(y.toRed(D).redPow(k.mul(N).mod(R)).fromRed()).mod(K).mod(R).cmp(k)}(l,h,w)}if("rsa"!==m&&"ecdsa/rsa"!==m)throw new Error("wrong public key type");h=d.concat([_,h]);for(var S=w.modulus.byteLength(),I=[1],P=0;h.length+I.length+2{"use strict";var d=E(29033).Buffer,x=E(19142),f=E(3894),T=E(47563),g=E(54151),b=E(63534),l=E(29806);for(var h in l)O[h]=l[h];function u(m){if("number"!=typeof m||mO.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=m,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}O.NONE=0,O.DEFLATE=1,O.INFLATE=2,O.GZIP=3,O.GUNZIP=4,O.DEFLATERAW=5,O.INFLATERAW=6,O.UNZIP=7,u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,f(this.init_done,"close before init"),f(this.mode<=O.UNZIP),this.mode===O.DEFLATE||this.mode===O.GZIP||this.mode===O.DEFLATERAW?g.deflateEnd(this.strm):this.mode!==O.INFLATE&&this.mode!==O.GUNZIP&&this.mode!==O.INFLATERAW&&this.mode!==O.UNZIP||b.inflateEnd(this.strm),this.mode=O.NONE,this.dictionary=null)},u.prototype.write=function(m,_,w,S,I,P,L){return this._write(!0,m,_,w,S,I,P,L)},u.prototype.writeSync=function(m,_,w,S,I,P,L){return this._write(!1,m,_,w,S,I,P,L)},u.prototype._write=function(m,_,w,S,I,P,L,V){if(f.equal(arguments.length,8),f(this.init_done,"write before init"),f(this.mode!==O.NONE,"already finalized"),f.equal(!1,this.write_in_progress,"write already in progress"),f.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,f.equal(!1,void 0===_,"must provide flush value"),this.write_in_progress=!0,_!==O.Z_NO_FLUSH&&_!==O.Z_PARTIAL_FLUSH&&_!==O.Z_SYNC_FLUSH&&_!==O.Z_FULL_FLUSH&&_!==O.Z_FINISH&&_!==O.Z_BLOCK)throw new Error("Invalid flush value");if(null==w&&(w=d.alloc(0),I=0,S=0),this.strm.avail_in=I,this.strm.input=w,this.strm.next_in=S,this.strm.avail_out=V,this.strm.output=P,this.strm.next_out=L,this.flush=_,!m)return this._process(),this._checkError()?this._afterSync():void 0;var W=this;return x.nextTick(function(){W._process(),W._after()}),this},u.prototype._afterSync=function(){var m=this.strm.avail_out,_=this.strm.avail_in;return this.write_in_progress=!1,[_,m]},u.prototype._process=function(){var m=null;switch(this.mode){case O.DEFLATE:case O.GZIP:case O.DEFLATERAW:this.err=g.deflate(this.strm,this.flush);break;case O.UNZIP:switch(this.strm.avail_in>0&&(m=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===m)break;if(31!==this.strm.input[m]){this.mode=O.INFLATE;break}if(this.gzip_id_bytes_read=1,m++,1===this.strm.avail_in)break;case 1:if(null===m)break;139===this.strm.input[m]?(this.gzip_id_bytes_read=2,this.mode=O.GUNZIP):this.mode=O.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case O.INFLATE:case O.GUNZIP:case O.INFLATERAW:for(this.err=b.inflate(this.strm,this.flush),this.err===O.Z_NEED_DICT&&this.dictionary&&(this.err=b.inflateSetDictionary(this.strm,this.dictionary),this.err===O.Z_OK?this.err=b.inflate(this.strm,this.flush):this.err===O.Z_DATA_ERROR&&(this.err=O.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===O.GUNZIP&&this.err===O.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=b.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case O.Z_OK:case O.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===O.Z_FINISH)return this._error("unexpected end of file"),!1;break;case O.Z_STREAM_END:break;case O.Z_NEED_DICT:return this._error(null==this.dictionary?"Missing dictionary":"Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var m=this.strm.avail_out,_=this.strm.avail_in;this.write_in_progress=!1,this.callback(_,m),this.pending_close&&this.close()}},u.prototype._error=function(m){this.strm.msg&&(m=this.strm.msg),this.onerror(m,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(m,_,w,S,I){f(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),f(m>=8&&m<=15,"invalid windowBits"),f(_>=-1&&_<=9,"invalid compression level"),f(w>=1&&w<=9,"invalid memlevel"),f(S===O.Z_FILTERED||S===O.Z_HUFFMAN_ONLY||S===O.Z_RLE||S===O.Z_FIXED||S===O.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(_,m,w,S,I),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(m,_,w,S,I){switch(this.level=m,this.windowBits=_,this.memLevel=w,this.strategy=S,this.flush=O.Z_NO_FLUSH,this.err=O.Z_OK,this.mode!==O.GZIP&&this.mode!==O.GUNZIP||(this.windowBits+=16),this.mode===O.UNZIP&&(this.windowBits+=32),this.mode!==O.DEFLATERAW&&this.mode!==O.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new T,this.mode){case O.DEFLATE:case O.GZIP:case O.DEFLATERAW:this.err=g.deflateInit2(this.strm,this.level,O.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case O.INFLATE:case O.GUNZIP:case O.INFLATERAW:case O.UNZIP:this.err=b.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==O.Z_OK&&this._error("Init error"),this.dictionary=I,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=O.Z_OK,this.mode){case O.DEFLATE:case O.DEFLATERAW:this.err=g.deflateSetDictionary(this.strm,this.dictionary)}this.err!==O.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=O.Z_OK,this.mode){case O.DEFLATE:case O.DEFLATERAW:case O.GZIP:this.err=g.deflateReset(this.strm);break;case O.INFLATE:case O.INFLATERAW:case O.GUNZIP:this.err=b.inflateReset(this.strm)}this.err!==O.Z_OK&&this._error("Failed to reset stream")},O.Zlib=u},77611:(z,O,E)=>{"use strict";var d=E(19142),x=E(29033).Buffer,f=E(57245).Transform,T=E(19626),g=E(45058),b=E(3894).ok,l=E(29033).kMaxLength,h="Cannot create final Buffer. It would be larger than 0x"+l.toString(16)+" bytes";T.Z_MIN_WINDOWBITS=8,T.Z_MAX_WINDOWBITS=15,T.Z_DEFAULT_WINDOWBITS=15,T.Z_MIN_CHUNK=64,T.Z_MAX_CHUNK=1/0,T.Z_DEFAULT_CHUNK=16384,T.Z_MIN_MEMLEVEL=1,T.Z_MAX_MEMLEVEL=9,T.Z_DEFAULT_MEMLEVEL=8,T.Z_MIN_LEVEL=-1,T.Z_MAX_LEVEL=9,T.Z_DEFAULT_LEVEL=T.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(T),m=0;m=l?ue=new RangeError(h):ce=x.concat(a,B),a=[],D.close(),C(ue,ce)}D.on("error",function(ce){D.removeListener("end",ee),D.removeListener("readable",Q),C(ce)}),D.on("end",ee),D.end(N),Q()}function V(D,N){if("string"==typeof N&&(N=x.from(N)),!x.isBuffer(N))throw new TypeError("Not a string or buffer");return D._processChunk(N,D._finishFlushFlag)}function W(D){if(!(this instanceof W))return new W(D);M.call(this,D,T.DEFLATE)}function G(D){if(!(this instanceof G))return new G(D);M.call(this,D,T.INFLATE)}function H(D){if(!(this instanceof H))return new H(D);M.call(this,D,T.GZIP)}function j(D){if(!(this instanceof j))return new j(D);M.call(this,D,T.GUNZIP)}function K(D){if(!(this instanceof K))return new K(D);M.call(this,D,T.DEFLATERAW)}function R(D){if(!(this instanceof R))return new R(D);M.call(this,D,T.INFLATERAW)}function o(D){if(!(this instanceof o))return new o(D);M.call(this,D,T.UNZIP)}function y(D){return D===T.Z_NO_FLUSH||D===T.Z_PARTIAL_FLUSH||D===T.Z_SYNC_FLUSH||D===T.Z_FULL_FLUSH||D===T.Z_FINISH||D===T.Z_BLOCK}function M(D,N){var C=this;if(this._opts=D=D||{},this._chunkSize=D.chunkSize||O.Z_DEFAULT_CHUNK,f.call(this,D),D.flush&&!y(D.flush))throw new Error("Invalid flush flag: "+D.flush);if(D.finishFlush&&!y(D.finishFlush))throw new Error("Invalid flush flag: "+D.finishFlush);if(this._flushFlag=D.flush||T.Z_NO_FLUSH,this._finishFlushFlag=void 0!==D.finishFlush?D.finishFlush:T.Z_FINISH,D.chunkSize&&(D.chunkSizeO.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+D.chunkSize);if(D.windowBits&&(D.windowBitsO.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+D.windowBits);if(D.level&&(D.levelO.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+D.level);if(D.memLevel&&(D.memLevelO.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+D.memLevel);if(D.strategy&&D.strategy!=O.Z_FILTERED&&D.strategy!=O.Z_HUFFMAN_ONLY&&D.strategy!=O.Z_RLE&&D.strategy!=O.Z_FIXED&&D.strategy!=O.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+D.strategy);if(D.dictionary&&!x.isBuffer(D.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new T.Zlib(N);var a=this;this._hadError=!1,this._handle.onerror=function(ee,ce){v(a),a._hadError=!0;var ue=new Error(ee);ue.errno=ce,ue.code=O.codes[ce],a.emit("error",ue)};var B=O.Z_DEFAULT_COMPRESSION;"number"==typeof D.level&&(B=D.level);var Q=O.Z_DEFAULT_STRATEGY;"number"==typeof D.strategy&&(Q=D.strategy),this._handle.init(D.windowBits||O.Z_DEFAULT_WINDOWBITS,B,D.memLevel||O.Z_DEFAULT_MEMLEVEL,Q,D.dictionary),this._buffer=x.allocUnsafe(this._chunkSize),this._offset=0,this._level=B,this._strategy=Q,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!C._handle},configurable:!0,enumerable:!0})}function v(D,N){N&&d.nextTick(N),D._handle&&(D._handle.close(),D._handle=null)}function k(D){D.emit("close")}Object.defineProperty(O,"codes",{enumerable:!0,value:Object.freeze(w),writable:!1}),O.Deflate=W,O.Inflate=G,O.Gzip=H,O.Gunzip=j,O.DeflateRaw=K,O.InflateRaw=R,O.Unzip=o,O.createDeflate=function(D){return new W(D)},O.createInflate=function(D){return new G(D)},O.createDeflateRaw=function(D){return new K(D)},O.createInflateRaw=function(D){return new R(D)},O.createGzip=function(D){return new H(D)},O.createGunzip=function(D){return new j(D)},O.createUnzip=function(D){return new o(D)},O.deflate=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new W(N),D,C)},O.deflateSync=function(D,N){return V(new W(N),D)},O.gzip=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new H(N),D,C)},O.gzipSync=function(D,N){return V(new H(N),D)},O.deflateRaw=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new K(N),D,C)},O.deflateRawSync=function(D,N){return V(new K(N),D)},O.unzip=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new o(N),D,C)},O.unzipSync=function(D,N){return V(new o(N),D)},O.inflate=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new G(N),D,C)},O.inflateSync=function(D,N){return V(new G(N),D)},O.gunzip=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new j(N),D,C)},O.gunzipSync=function(D,N){return V(new j(N),D)},O.inflateRaw=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new R(N),D,C)},O.inflateRawSync=function(D,N){return V(new R(N),D)},g.inherits(M,f),M.prototype.params=function(D,N,C){if(DO.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+D);if(N!=O.Z_FILTERED&&N!=O.Z_HUFFMAN_ONLY&&N!=O.Z_RLE&&N!=O.Z_FIXED&&N!=O.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+N);if(this._level!==D||this._strategy!==N){var a=this;this.flush(T.Z_SYNC_FLUSH,function(){b(a._handle,"zlib binding closed"),a._handle.params(D,N),a._hadError||(a._level=D,a._strategy=N,C&&C())})}else d.nextTick(C)},M.prototype.reset=function(){return b(this._handle,"zlib binding closed"),this._handle.reset()},M.prototype._flush=function(D){this._transform(x.alloc(0),"",D)},M.prototype.flush=function(D,N){var C=this,a=this._writableState;("function"==typeof D||void 0===D&&!N)&&(N=D,D=T.Z_FULL_FLUSH),a.ended?N&&d.nextTick(N):a.ending?N&&this.once("end",N):a.needDrain?N&&this.once("drain",function(){return C.flush(D,N)}):(this._flushFlag=D,this.write(x.alloc(0),"",N))},M.prototype.close=function(D){v(this,D),d.nextTick(k,this)},M.prototype._transform=function(D,N,C){var a,B=this._writableState,Q=(B.ending||B.ended)&&(!D||B.length===D.length);return null===D||x.isBuffer(D)?this._handle?(Q?a=this._finishFlushFlag:(a=this._flushFlag,D.length>=B.length&&(this._flushFlag=this._opts.flush||T.Z_NO_FLUSH)),void this._processChunk(D,a,C)):C(new Error("zlib binding closed")):C(new Error("invalid input"))},M.prototype._processChunk=function(D,N,C){var a=D&&D.length,B=this._chunkSize-this._offset,Q=0,ee=this,ce="function"==typeof C;if(!ce){var ue,we=[],ae=0;this.on("error",function(pe){ue=pe}),b(this._handle,"zlib binding closed");do{var Te=this._handle.writeSync(N,D,Q,a,this._buffer,this._offset,B)}while(!this._hadError&&ne(Te[0],Te[1]));if(this._hadError)throw ue;if(ae>=l)throw v(this),new RangeError(h);var le=x.concat(we,ae);return v(this),le}b(this._handle,"zlib binding closed");var X=this._handle.write(N,D,Q,a,this._buffer,this._offset,B);function ne(pe,_e){if(this&&(this.buffer=null,this.callback=null),!ee._hadError){var xe=B-_e;if(b(xe>=0,"have should not go down"),xe>0){var Ce=ee._buffer.slice(ee._offset,ee._offset+xe);ee._offset+=xe,ce?ee.push(Ce):(we.push(Ce),ae+=Ce.length)}if((0===_e||ee._offset>=ee._chunkSize)&&(B=ee._chunkSize,ee._offset=0,ee._buffer=x.allocUnsafe(ee._chunkSize)),0===_e){if(Q+=a-pe,a=pe,!ce)return!0;var ke=ee._handle.write(N,D,Q,a,ee._buffer,ee._offset,ee._chunkSize);return ke.callback=ne,void(ke.buffer=D)}if(!ce)return!1;C()}}X.buffer=D,X.callback=ne},g.inherits(W,M),g.inherits(G,M),g.inherits(H,M),g.inherits(j,M),g.inherits(K,M),g.inherits(R,M),g.inherits(o,M)},96316:(z,O,E)=>{"use strict";var d=E(29033).Buffer;z.exports=function(x,f){for(var T=Math.min(x.length,f.length),g=new d(T),b=0;b{"use strict";var d=E(34919),x=E(83226),f=E(39484);function T(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function g(le,X){if(T()=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return 0|le}function w(le,X){if(b.isBuffer(le))return le.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(le)||le instanceof ArrayBuffer))return le.byteLength;"string"!=typeof le&&(le=""+le);var ne=le.length;if(0===ne)return 0;for(var pe=!1;;)switch(X){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":case void 0:return we(le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ne;case"hex":return ne>>>1;case"base64":return ae(le).length;default:if(pe)return we(le).length;X=(""+X).toLowerCase(),pe=!0}}function S(le,X,ne){var pe=!1;if((void 0===X||X<0)&&(X=0),X>this.length||((void 0===ne||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0)<=(X>>>=0))return"";for(le||(le="utf8");;)switch(le){case"hex":return k(this,X,ne);case"utf8":case"utf-8":return o(this,X,ne);case"ascii":return M(this,X,ne);case"latin1":case"binary":return v(this,X,ne);case"base64":return R(this,X,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,X,ne);default:if(pe)throw new TypeError("Unknown encoding: "+le);le=(le+"").toLowerCase(),pe=!0}}function I(le,X,ne){var pe=le[X];le[X]=le[ne],le[ne]=pe}function P(le,X,ne,pe,_e){if(0===le.length)return-1;if("string"==typeof ne?(pe=ne,ne=0):ne>2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,isNaN(ne)&&(ne=_e?0:le.length-1),ne<0&&(ne=le.length+ne),ne>=le.length){if(_e)return-1;ne=le.length-1}else if(ne<0){if(!_e)return-1;ne=0}if("string"==typeof X&&(X=b.from(X,pe)),b.isBuffer(X))return 0===X.length?-1:L(le,X,ne,pe,_e);if("number"==typeof X)return X&=255,b.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?_e?Uint8Array.prototype.indexOf.call(le,X,ne):Uint8Array.prototype.lastIndexOf.call(le,X,ne):L(le,[X],ne,pe,_e);throw new TypeError("val must be string, number or Buffer")}function L(le,X,ne,pe,_e){var xe,Ce=1,ke=le.length,me=X.length;if(void 0!==pe&&("ucs2"===(pe=String(pe).toLowerCase())||"ucs-2"===pe||"utf16le"===pe||"utf-16le"===pe)){if(le.length<2||X.length<2)return-1;Ce=2,ke/=2,me/=2,ne/=2}function Ee(tt,mt){return 1===Ce?tt[mt]:tt.readUInt16BE(mt*Ce)}if(_e){var ze=-1;for(xe=ne;xeke&&(ne=ke-me),xe=ne;xe>=0;xe--){for(var Ve=!0,nt=0;nt_e&&(pe=_e):pe=_e;var xe=X.length;if(xe%2!=0)throw new TypeError("Invalid hex string");pe>xe/2&&(pe=xe/2);for(var Ce=0;Ce>8,Ee.push(Ce%256),Ee.push(ke);return Ee}(X,le.length-ne),le,ne,pe)}function R(le,X,ne){return d.fromByteArray(0===X&&ne===le.length?le:le.slice(X,ne))}function o(le,X,ne){ne=Math.min(le.length,ne);for(var pe=[],_e=X;_e239?4:Ee>223?3:Ee>191?2:1;if(_e+Ve<=ne)switch(Ve){case 1:Ee<128&&(ze=Ee);break;case 2:128==(192&(xe=le[_e+1]))&&(me=(31&Ee)<<6|63&xe)>127&&(ze=me);break;case 3:Ce=le[_e+2],128==(192&(xe=le[_e+1]))&&128==(192&Ce)&&(me=(15&Ee)<<12|(63&xe)<<6|63&Ce)>2047&&(me<55296||me>57343)&&(ze=me);break;case 4:Ce=le[_e+2],ke=le[_e+3],128==(192&(xe=le[_e+1]))&&128==(192&Ce)&&128==(192&ke)&&(me=(15&Ee)<<18|(63&xe)<<12|(63&Ce)<<6|63&ke)>65535&&me<1114112&&(ze=me)}null===ze?(ze=65533,Ve=1):ze>65535&&(pe.push((ze-=65536)>>>10&1023|55296),ze=56320|1023&ze),pe.push(ze),_e+=Ve}return function(nt){var tt=nt.length;if(tt<=y)return String.fromCharCode.apply(String,nt);for(var mt="",ht=0;ht0&&(le=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(le+=" ... ")),""},b.prototype.compare=function(le,X,ne,pe,_e){if(!b.isBuffer(le))throw new TypeError("Argument must be a Buffer");if(void 0===X&&(X=0),void 0===ne&&(ne=le?le.length:0),void 0===pe&&(pe=0),void 0===_e&&(_e=this.length),X<0||ne>le.length||pe<0||_e>this.length)throw new RangeError("out of range index");if(pe>=_e&&X>=ne)return 0;if(pe>=_e)return-1;if(X>=ne)return 1;if(this===le)return 0;for(var xe=(_e>>>=0)-(pe>>>=0),Ce=(ne>>>=0)-(X>>>=0),ke=Math.min(xe,Ce),me=this.slice(pe,_e),Ee=le.slice(X,ne),ze=0;ze_e)&&(ne=_e),le.length>0&&(ne<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");pe||(pe="utf8");for(var xe=!1;;)switch(pe){case"hex":return V(this,le,X,ne);case"utf8":case"utf-8":return W(this,le,X,ne);case"ascii":return G(this,le,X,ne);case"latin1":case"binary":return H(this,le,X,ne);case"base64":return j(this,le,X,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,le,X,ne);default:if(xe)throw new TypeError("Unknown encoding: "+pe);pe=(""+pe).toLowerCase(),xe=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var y=4096;function M(le,X,ne){var pe="";ne=Math.min(le.length,ne);for(var _e=X;_e_e)&&(ne=_e);for(var xe="",Ce=X;Cene)throw new RangeError("Trying to access beyond buffer length")}function C(le,X,ne,pe,_e,xe){if(!b.isBuffer(le))throw new TypeError('"buffer" argument must be a Buffer instance');if(X>_e||Xle.length)throw new RangeError("Index out of range")}function a(le,X,ne,pe){X<0&&(X=65535+X+1);for(var _e=0,xe=Math.min(le.length-ne,2);_e>>8*(pe?_e:1-_e)}function B(le,X,ne,pe){X<0&&(X=4294967295+X+1);for(var _e=0,xe=Math.min(le.length-ne,4);_e>>8*(pe?_e:3-_e)&255}function Q(le,X,ne,pe,_e,xe){if(ne+pe>le.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function ee(le,X,ne,pe,_e){return _e||Q(le,0,ne,4),x.write(le,X,ne,pe,23,4),ne+4}function ce(le,X,ne,pe,_e){return _e||Q(le,0,ne,8),x.write(le,X,ne,pe,52,8),ne+8}b.prototype.slice=function(le,X){var ne,pe=this.length;if((le=~~le)<0?(le+=pe)<0&&(le=0):le>pe&&(le=pe),(X=void 0===X?pe:~~X)<0?(X+=pe)<0&&(X=0):X>pe&&(X=pe),X0&&(_e*=256);)pe+=this[le+--X]*_e;return pe},b.prototype.readUInt8=function(le,X){return X||N(le,1,this.length),this[le]},b.prototype.readUInt16LE=function(le,X){return X||N(le,2,this.length),this[le]|this[le+1]<<8},b.prototype.readUInt16BE=function(le,X){return X||N(le,2,this.length),this[le]<<8|this[le+1]},b.prototype.readUInt32LE=function(le,X){return X||N(le,4,this.length),(this[le]|this[le+1]<<8|this[le+2]<<16)+16777216*this[le+3]},b.prototype.readUInt32BE=function(le,X){return X||N(le,4,this.length),16777216*this[le]+(this[le+1]<<16|this[le+2]<<8|this[le+3])},b.prototype.readIntLE=function(le,X,ne){le|=0,X|=0,ne||N(le,X,this.length);for(var pe=this[le],_e=1,xe=0;++xe=(_e*=128)&&(pe-=Math.pow(2,8*X)),pe},b.prototype.readIntBE=function(le,X,ne){le|=0,X|=0,ne||N(le,X,this.length);for(var pe=X,_e=1,xe=this[le+--pe];pe>0&&(_e*=256);)xe+=this[le+--pe]*_e;return xe>=(_e*=128)&&(xe-=Math.pow(2,8*X)),xe},b.prototype.readInt8=function(le,X){return X||N(le,1,this.length),128&this[le]?-1*(255-this[le]+1):this[le]},b.prototype.readInt16LE=function(le,X){X||N(le,2,this.length);var ne=this[le]|this[le+1]<<8;return 32768&ne?4294901760|ne:ne},b.prototype.readInt16BE=function(le,X){X||N(le,2,this.length);var ne=this[le+1]|this[le]<<8;return 32768&ne?4294901760|ne:ne},b.prototype.readInt32LE=function(le,X){return X||N(le,4,this.length),this[le]|this[le+1]<<8|this[le+2]<<16|this[le+3]<<24},b.prototype.readInt32BE=function(le,X){return X||N(le,4,this.length),this[le]<<24|this[le+1]<<16|this[le+2]<<8|this[le+3]},b.prototype.readFloatLE=function(le,X){return X||N(le,4,this.length),x.read(this,le,!0,23,4)},b.prototype.readFloatBE=function(le,X){return X||N(le,4,this.length),x.read(this,le,!1,23,4)},b.prototype.readDoubleLE=function(le,X){return X||N(le,8,this.length),x.read(this,le,!0,52,8)},b.prototype.readDoubleBE=function(le,X){return X||N(le,8,this.length),x.read(this,le,!1,52,8)},b.prototype.writeUIntLE=function(le,X,ne,pe){le=+le,X|=0,ne|=0,pe||C(this,le,X,ne,Math.pow(2,8*ne)-1,0);var _e=1,xe=0;for(this[X]=255≤++xe=0&&(xe*=256);)this[X+_e]=le/xe&255;return X+ne},b.prototype.writeUInt8=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,1,255,0),b.TYPED_ARRAY_SUPPORT||(le=Math.floor(le)),this[X]=255&le,X+1},b.prototype.writeUInt16LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[X]=255&le,this[X+1]=le>>>8):a(this,le,X,!0),X+2},b.prototype.writeUInt16BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>8,this[X+1]=255&le):a(this,le,X,!1),X+2},b.prototype.writeUInt32LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[X+3]=le>>>24,this[X+2]=le>>>16,this[X+1]=le>>>8,this[X]=255&le):B(this,le,X,!0),X+4},b.prototype.writeUInt32BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>24,this[X+1]=le>>>16,this[X+2]=le>>>8,this[X+3]=255&le):B(this,le,X,!1),X+4},b.prototype.writeIntLE=function(le,X,ne,pe){if(le=+le,X|=0,!pe){var _e=Math.pow(2,8*ne-1);C(this,le,X,ne,_e-1,-_e)}var xe=0,Ce=1,ke=0;for(this[X]=255≤++xe>0)-ke&255;return X+ne},b.prototype.writeIntBE=function(le,X,ne,pe){if(le=+le,X|=0,!pe){var _e=Math.pow(2,8*ne-1);C(this,le,X,ne,_e-1,-_e)}var xe=ne-1,Ce=1,ke=0;for(this[X+xe]=255≤--xe>=0&&(Ce*=256);)le<0&&0===ke&&0!==this[X+xe+1]&&(ke=1),this[X+xe]=(le/Ce>>0)-ke&255;return X+ne},b.prototype.writeInt8=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,1,127,-128),b.TYPED_ARRAY_SUPPORT||(le=Math.floor(le)),le<0&&(le=255+le+1),this[X]=255&le,X+1},b.prototype.writeInt16LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[X]=255&le,this[X+1]=le>>>8):a(this,le,X,!0),X+2},b.prototype.writeInt16BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>8,this[X+1]=255&le):a(this,le,X,!1),X+2},b.prototype.writeInt32LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[X]=255&le,this[X+1]=le>>>8,this[X+2]=le>>>16,this[X+3]=le>>>24):B(this,le,X,!0),X+4},b.prototype.writeInt32BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,2147483647,-2147483648),le<0&&(le=4294967295+le+1),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>24,this[X+1]=le>>>16,this[X+2]=le>>>8,this[X+3]=255&le):B(this,le,X,!1),X+4},b.prototype.writeFloatLE=function(le,X,ne){return ee(this,le,X,!0,ne)},b.prototype.writeFloatBE=function(le,X,ne){return ee(this,le,X,!1,ne)},b.prototype.writeDoubleLE=function(le,X,ne){return ce(this,le,X,!0,ne)},b.prototype.writeDoubleBE=function(le,X,ne){return ce(this,le,X,!1,ne)},b.prototype.copy=function(le,X,ne,pe){if(ne||(ne=0),pe||0===pe||(pe=this.length),X>=le.length&&(X=le.length),X||(X=0),pe>0&&pe=this.length)throw new RangeError("sourceStart out of bounds");if(pe<0)throw new RangeError("sourceEnd out of bounds");pe>this.length&&(pe=this.length),le.length-X=0;--_e)le[_e+X]=this[_e+ne];else if(xe<1e3||!b.TYPED_ARRAY_SUPPORT)for(_e=0;_e>>=0,ne=void 0===ne?this.length:ne>>>0,le||(le=0),"number"==typeof le)for(xe=X;xe55295&&ne<57344){if(!_e){if(ne>56319){(X-=3)>-1&&xe.push(239,191,189);continue}if(Ce+1===pe){(X-=3)>-1&&xe.push(239,191,189);continue}_e=ne;continue}if(ne<56320){(X-=3)>-1&&xe.push(239,191,189),_e=ne;continue}ne=65536+(_e-55296<<10|ne-56320)}else _e&&(X-=3)>-1&&xe.push(239,191,189);if(_e=null,ne<128){if((X-=1)<0)break;xe.push(ne)}else if(ne<2048){if((X-=2)<0)break;xe.push(ne>>6|192,63&ne|128)}else if(ne<65536){if((X-=3)<0)break;xe.push(ne>>12|224,ne>>6&63|128,63&ne|128)}else{if(!(ne<1114112))throw new Error("Invalid code point");if((X-=4)<0)break;xe.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,63&ne|128)}}return xe}function ae(le){return d.toByteArray(function(X){if((X=(ne=X,ne.trim?ne.trim():ne.replace(/^\s+|\s+$/g,"")).replace(ue,"")).length<2)return"";for(var ne;X.length%4!=0;)X+="=";return X}(le))}function Te(le,X,ne,pe){for(var _e=0;_e=X.length||_e>=le.length);++_e)X[_e+ne]=le[_e];return _e}},83675:z=>{"use strict";z.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},80593:(z,O,E)=>{"use strict";var d=E(57701),x=E(24373),f=x(d("String.prototype.indexOf"));z.exports=function(T,g){var b=d(T,!!g);return"function"==typeof b&&f(T,".prototype.")>-1?x(b):b}},24373:(z,O,E)=>{"use strict";var d=E(3767),x=E(57701),f=x("%Function.prototype.apply%"),T=x("%Function.prototype.call%"),g=x("%Reflect.apply%",!0)||d.call(T,f),b=x("%Object.getOwnPropertyDescriptor%",!0),l=x("%Object.defineProperty%",!0),h=x("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}z.exports=function(m){var _=g(d,T,arguments);return b&&l&&b(_,"length").configurable&&l(_,"length",{value:1+h(0,m.length-(arguments.length-1))}),_};var u=function(){return g(d,f,arguments)};l?l(z.exports,"apply",{value:u}):z.exports.apply=u},47759:(z,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(83630),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(29033).Buffer,x=E(26657),f=E(55262),T=E(71842),g=E(40779);(O=z.exports).addPrefix=function(l,h){var u;if(d.isBuffer(l))u=g.varintBufferEncode(l);else{if(!T[l])throw new Error("multicodec not recognized");u=T[l]}return d.concat([u,h])},O.rmPrefix=function(l){return x.decode(l),l.slice(x.decode.bytes)},O.getCodec=function(l){var h=x.decode(l),u=f.get(h);if(void 0===u)throw new Error("Code ".concat(h," not found"));return u},O.getName=function(l){return f.get(l)},O.getNumber=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return g.varintBufferDecode(h)[0]},O.getCode=function(l){return x.decode(l)},O.getCodeVarint=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return h},O.getVarint=function(l){return x.encode(l)};var b=E(47759);Object.assign(O,b),O.print=E(29268)},55262:(z,O,E)=>{"use strict";var d=E(83630),x=new Map;for(var f in d)x.set(d[f],f);z.exports=Object.freeze(x)},29268:(z,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(83630),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(26657),x=E(29033).Buffer;function f(g){return parseInt(g.toString("hex"),16)}function T(g){var b=g.toString(16);return b.length%2==1&&(b="0"+b),x.from(b,"hex")}z.exports={numberToBuffer:T,bufferToNumber:f,varintBufferEncode:function(g){return x.from(d.encode(f(g)))},varintBufferDecode:function(g){return T(d.decode(g))},varintEncode:function(g){return x.from(d.encode(g))}}},71842:(z,O,E)=>{"use strict";var d=E(83630),x=E(40779).varintEncode,f={};for(var T in d)f[T]=x(d[T]);z.exports=Object.freeze(f)},59976:(z,O,E)=>{"use strict";var d=E(77748),x=E(29033).Buffer;z.exports={checkCIDComponents:function(T){if(null==T)return"null values are not valid CIDs";if(0!==T.version&&1!==T.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof T.codec)return"codec must be string";if(0===T.version){if("dag-pb"!==T.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==T.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!x.isBuffer(T.multihash))return"multihash must be a Buffer";try{d.validate(T.multihash)}catch(b){var g=b.message;return g||(g="Multihash validation failed"),g}}}},72753:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=E(29033).Buffer,g=E(77748),b=E(6086),l=E(97223),h=E(83630),u=E(59976),m=E(83162)(function(_){function w(S,I,P,L){if((0,x.default)(this,w),m.isCID(S)){var V=S;return this.version=V.version,this.codec=V.codec,this.multihash=T.from(V.multihash),void(this.multibaseName=V.multibaseName||(0===V.version?"base58btc":"base32"))}if("string"==typeof S){var W=b.isEncoded(S);if(W){var G=b.decode(S);this.version=parseInt(G.slice(0,1).toString("hex"),16),this.codec=l.getCodec(G.slice(1)),this.multihash=l.rmPrefix(G.slice(1)),this.multibaseName=W}else this.version=0,this.codec="dag-pb",this.multihash=g.fromB58String(S),this.multibaseName="base58btc";return w.validateCID(this),void Object.defineProperty(this,"string",{value:S})}if(T.isBuffer(S)){var H=S.slice(0,1),j=parseInt(H.toString("hex"),16);if(1===j){var K=S;this.version=j,this.codec=l.getCodec(K.slice(1)),this.multihash=l.rmPrefix(K.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=S,this.multibaseName="base58btc";w.validateCID(this)}else this.version=S,this.codec=I,this.multihash=P,this.multibaseName=L||(0===S?"base58btc":"base32"),w.validateCID(this)}return(0,f.default)(w,[{key:"buffer",get:function(){var S=this._buffer;if(!S){if(0===this.version)S=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");S=T.concat([T.from("01","hex"),l.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:S})}return S}},{key:"prefix",get:function(){return T.concat([T.from("0".concat(this.version),"hex"),l.getCodeVarint(this.codec),g.prefix(this.multihash)])}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var S=g.decode(this.multihash),P=S.length;if("sha2-256"!==S.name)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==P)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new m(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new m(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(){var S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&S===this.multibaseName)return this.string;var I=null;if(0===this.version){if("base58btc"!==S)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");I=g.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");I=b.encode(S,this.buffer).toString()}return S===this.multibaseName&&Object.defineProperty(this,"string",{value:I}),I}},{key:_,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(S){return this.toBaseEncodedString(S)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(S){return this.codec===S.codec&&this.version===S.version&&this.multihash.equals(S.multihash)}}],[{key:"validateCID",value:function(S){var I=u.checkCIDComponents(S);if(I)throw new Error(I)}}]),w}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});m.codecs=h,z.exports=m},93013:(z,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(57245).Transform,f=E(23462).s;function T(g){x.call(this),this.hashMode="string"==typeof g,this.hashMode?this[g]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}E(41736)(T,x),T.prototype.update=function(g,b,l){"string"==typeof g&&(g=d.from(g,b));var h=this._update(g);return this.hashMode?this:(l&&(h=this._toString(h,l)),h)},T.prototype.setAutoPadding=function(){},T.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},T.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},T.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},T.prototype._transform=function(g,b,l){var h;try{this.hashMode?this._update(g):this.push(this._update(g))}catch(u){h=u}finally{l(h)}},T.prototype._flush=function(g){var b;try{this.push(this.__final())}catch(l){b=l}g(b)},T.prototype._finalOrDigest=function(g){var b=this.__final()||d.alloc(0);return g&&(b=this._toString(b,g,!0)),b},T.prototype._toString=function(g,b,l){if(this._decoder||(this._decoder=new f(b),this._encoding=b),this._encoding!==b)throw new Error("can't switch encodings");var h=this._decoder.write(g);return l&&(h+=this._decoder.end()),h},z.exports=T},83162:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(14727)),f=d(E(90775)),T=d(E(69721)),g=d(E(58985)),b=d(E(58975)),l=d(E(15163)),h=d(E(34650)),u=d(E(21949));z.exports=function(m,_){var w=_.className,I=Symbol.for(_.symbolName),P=(0,f.default)({},w,function(L,V){(0,l.default)(j,L);var W,G,H=(W=j,G=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var K,R=(0,u.default)(W);if(G){var o=(0,u.default)(this).constructor;K=Reflect.construct(R,arguments,o)}else K=R.apply(this,arguments);return(0,h.default)(this,K)});function j(){var K;(0,T.default)(this,j);for(var R=arguments.length,o=new Array(R),y=0;y{"use strict";var d=E(72753);O.cidV0ToV1Base32=function(x){var f=new d(x);return 0===f.version&&(f=f.toV1()),f.toString("base32")}},94308:(z,O,E)=>{"use strict";var d=E(69206),x=E(39512),f=x.hexStringToBuffer,T=x.profiles,g=E(36834).cidV0ToV1Base32;z.exports={helpers:{cidV0ToV1Base32:g},decode:function(b){var l=f(b),h=d.getCodec(l),u=d.rmPrefix(l),m=T[h];return m||(m=T.default),m.decode(u)},fromIpfs:function(b){return this.encode("ipfs-ns",b)},fromSwarm:function(b){return this.encode("swarm-ns",b)},encode:function(b,l){var h=T[b];h||(h=T.default);var u=h.encode(l);return d.addPrefix(b,u).toString("hex")},getCodec:function(b){var l=f(b);return d.getCodec(l)}}},39512:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(72753),f=E(77748),T=function(h){var m=h.slice(0,2),_=h.slice(2);return f.fromHexString("0x"===m?_:h)},g={swarm:function(h){var u=f.encode(T(h),"keccak-256");return new x(1,"swarm-manifest",u).buffer},ipfs:function(h){var u=f.fromB58String(h);return new x(1,"dag-pb",u).buffer},utf8:function(h){return d.from(h,"utf8")}},b={hexMultiHash:function(h){var u=new x(h);return f.decode(u.multihash).digest.toString("hex")},b58MultiHash:function(h){var u=new x(h);return f.toB58String(u.multihash)},utf8:function(h){return h.toString("utf8")}},l={"swarm-ns":{encode:g.swarm,decode:b.hexMultiHash},"ipfs-ns":{encode:g.ipfs,decode:b.b58MultiHash},"ipns-ns":{encode:g.ipfs,decode:b.b58MultiHash},default:{encode:g.utf8,decode:b.utf8}};O.hexStringToBuffer=T,O.profiles=l},64628:(z,O,E)=>{"use strict";var d,x,f=E(28847)(E(3355));x=function(T){T.version="1.2.2";var g=function(){for(var K=0,R=new Array(256),o=0;256!=o;++o)K=1&(K=1&(K=1&(K=1&(K=1&(K=1&(K=1&(K=1&(K=o)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1,R[o]=K;return"undefined"!=typeof Int32Array?new Int32Array(R):R}(),b=function(K){var R=0,o=0,y=0,M="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(y=0;256!=y;++y)M[y]=K[y];for(y=0;256!=y;++y)for(o=K[y],R=256+y;R<4096;R+=256)o=M[R]=o>>>8^K[255&o];var v=[];for(y=1;16!=y;++y)v[y-1]="undefined"!=typeof Int32Array?M.subarray(256*y,256*y+256):M.slice(256*y,256*y+256);return v}(g),l=b[0],h=b[1],u=b[2],m=b[3],_=b[4],w=b[5],S=b[6],I=b[7],P=b[8],L=b[9],V=b[10],W=b[11],G=b[12],H=b[13],j=b[14];T.table=g,T.bstr=function(K,R){for(var o=-1^R,y=0,M=K.length;y>>8^g[255&(o^K.charCodeAt(y++))];return~o},T.buf=function(K,R){for(var o=-1^R,y=K.length-15,M=0;M>8&255]^G[K[M++]^o>>16&255]^W[K[M++]^o>>>24]^V[K[M++]]^L[K[M++]]^P[K[M++]]^I[K[M++]]^S[K[M++]]^w[K[M++]]^_[K[M++]]^m[K[M++]]^u[K[M++]]^h[K[M++]]^l[K[M++]]^g[K[M++]];for(y+=15;M>>8^g[255&(o^K[M++])];return~o},T.str=function(K,R){for(var o=-1^R,y=0,M=K.length,v=0,k=0;y>>8^g[255&(o^v)]:v<2048?o=(o=o>>>8^g[255&(o^(192|v>>6&31))])>>>8^g[255&(o^(128|63&v))]:v>=55296&&v<57344?(v=64+(1023&v),k=1023&K.charCodeAt(y++),o=(o=(o=(o=o>>>8^g[255&(o^(240|v>>8&7))])>>>8^g[255&(o^(128|v>>2&63))])>>>8^g[255&(o^(128|k>>6&15|(3&v)<<4))])>>>8^g[255&(o^(128|63&k))]):o=(o=(o=o>>>8^g[255&(o^(224|v>>12&15))])>>>8^g[255&(o^(128|v>>6&63))])>>>8^g[255&(o^(128|63&v))];return~o}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,f.default)(O)?x(O):void 0===(d=function(){var T={};return x(T),T}.call(O,E,O,z))||(z.exports=d):x({})},75102:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(36597),f=E(31734);z.exports=function(l){return new g(l)};var T={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function g(l){this.curveType=T[l],this.curveType||(this.curveType={name:l}),this.curve=new x.ec(this.curveType.name),this.keys=void 0}function b(l,h,u){Array.isArray(l)||(l=l.toArray());var m=new d(l);if(u&&m.length{"use strict";var d=E(41736),x=E(50807),f=E(26707),T=E(51708),g=E(93013);function b(l){g.call(this,"digest"),this._hash=l}d(b,g),b.prototype._update=function(l){this._hash.update(l)},b.prototype._final=function(){return this._hash.digest()},z.exports=function(l){return"md5"===(l=l.toLowerCase())?new x:"rmd160"===l||"ripemd160"===l?new f:new b(T(l))}},55349:(z,O,E)=>{"use strict";var d=E(50807);z.exports=function(x){return(new d).update(x).digest()}},34424:(z,O,E)=>{"use strict";var d=E(41736),x=E(19956),f=E(93013),T=E(48850).Buffer,g=E(55349),b=E(26707),l=E(51708),h=T.alloc(128);function u(m,_){f.call(this,"digest"),"string"==typeof _&&(_=T.from(_));var w="sha512"===m||"sha384"===m?128:64;this._alg=m,this._key=_,_.length>w?_=("rmd160"===m?new b:l(m)).update(_).digest():_.length{"use strict";var d=E(41736),x=E(48850).Buffer,f=E(93013),T=x.alloc(128),g=64;function b(l,h){f.call(this,"digest"),"string"==typeof h&&(h=x.from(h)),this._alg=l,this._key=h,h.length>g?h=l(h):h.length{"use strict";var g,d=E(28847)(E(3355)),x="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==E.g&&E.g,f=function(){function g(){this.fetch=!1,this.DOMException=x.DOMException}return g.prototype=x,new g}();g=f,function(b){var l=void 0!==g&&g||"undefined"!=typeof self&&self||void 0!==l&&l,h_searchParams="URLSearchParams"in l,h_iterable="Symbol"in l&&"iterator"in Symbol,h_blob="FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),h_formData="FormData"in l,h_arrayBuffer="ArrayBuffer"in l;if(h_arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(M){return M&&u.indexOf(Object.prototype.toString.call(M))>-1};function _(M){if("string"!=typeof M&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(M)||""===M)throw new TypeError('Invalid character in header field name: "'+M+'"');return M.toLowerCase()}function w(M){return"string"!=typeof M&&(M=String(M)),M}function S(M){var v={next:function(){var k=M.shift();return{done:void 0===k,value:k}}};return h_iterable&&(v[Symbol.iterator]=function(){return v}),v}function I(M){this.map={},M instanceof I?M.forEach(function(v,k){this.append(k,v)},this):Array.isArray(M)?M.forEach(function(v){this.append(v[0],v[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(v){this.append(v,M[v])},this)}function P(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function L(M){return new Promise(function(v,k){M.onload=function(){v(M.result)},M.onerror=function(){k(M.error)}})}function V(M){var v=new FileReader,k=L(v);return v.readAsArrayBuffer(M),k}function W(M){if(M.slice)return M.slice(0);var v=new Uint8Array(M.byteLength);return v.set(new Uint8Array(M)),v.buffer}function G(){return this.bodyUsed=!1,this._initBody=function(M){var v;this.bodyUsed=this.bodyUsed,this._bodyInit=M,M?"string"==typeof M?this._bodyText=M:h_blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:h_formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:h_searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():h_arrayBuffer&&h_blob&&(v=M)&&DataView.prototype.isPrototypeOf(v)?(this._bodyArrayBuffer=W(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h_arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||m(M))?this._bodyArrayBuffer=W(M):this._bodyText=M=Object.prototype.toString.call(M):this._bodyText="",this.headers.get("content-type")||("string"==typeof M?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h_searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h_blob&&(this.blob=function(){var M=P(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?P(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(V)}),this.text=function(){var M,v,k,D=P(this);if(D)return D;if(this._bodyBlob)return M=this._bodyBlob,k=L(v=new FileReader),v.readAsText(M),k;if(this._bodyArrayBuffer)return Promise.resolve(function(N){for(var C=new Uint8Array(N),a=new Array(C.length),B=0;B-1?D:k),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&N)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(N),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==v.cache&&"no-cache"!==v.cache)){var C=/([?&])_=[^&]*/;C.test(this.url)?this.url=this.url.replace(C,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function K(M){var v=new FormData;return M.trim().split("&").forEach(function(k){if(k){var D=k.split("="),N=D.shift().replace(/\+/g," "),C=D.join("=").replace(/\+/g," ");v.append(decodeURIComponent(N),decodeURIComponent(C))}}),v}function R(M,v){if(!(this instanceof R))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');v||(v={}),this.type="default",this.status=void 0===v.status?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===v.statusText?"":""+v.statusText,this.headers=new I(v.headers),this.url=v.url||"",this._initBody(M)}j.prototype.clone=function(){return new j(this,{body:this._bodyInit})},G.call(j.prototype),G.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new I(this.headers),url:this.url})},R.error=function(){var M=new R(null,{status:0,statusText:""});return M.type="error",M};var o=[301,302,303,307,308];R.redirect=function(M,v){if(-1===o.indexOf(v))throw new RangeError("Invalid status code");return new R(null,{status:v,headers:{location:M}})},b.DOMException=l.DOMException;try{new b.DOMException}catch{b.DOMException=function(v,k){this.message=v,this.name=k;var D=Error(v);this.stack=D.stack},b.DOMException.prototype=Object.create(Error.prototype),b.DOMException.prototype.constructor=b.DOMException}function y(M,v){return new Promise(function(k,D){var N=new j(M,v);if(N.signal&&N.signal.aborted)return D(new b.DOMException("Aborted","AbortError"));var C=new XMLHttpRequest;function a(){C.abort()}C.onload=function(){var B,Q,ee={status:C.status,statusText:C.statusText,headers:(B=C.getAllResponseHeaders()||"",Q=new I,B.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(ue){return 0===ue.indexOf("\n")?ue.substr(1,ue.length):ue}).forEach(function(ue){var we=ue.split(":"),ae=we.shift().trim();if(ae){var Te=we.join(":").trim();Q.append(ae,Te)}}),Q)};ee.url="responseURL"in C?C.responseURL:ee.headers.get("X-Request-URL");var ce="response"in C?C.response:C.responseText;setTimeout(function(){k(new R(ce,ee))},0)},C.onerror=function(){setTimeout(function(){D(new TypeError("Network request failed"))},0)},C.ontimeout=function(){setTimeout(function(){D(new TypeError("Network request failed"))},0)},C.onabort=function(){setTimeout(function(){D(new b.DOMException("Aborted","AbortError"))},0)},C.open(N.method,function(B){try{return""===B&&l.location.href?l.location.href:B}catch{return B}}(N.url),!0),"include"===N.credentials?C.withCredentials=!0:"omit"===N.credentials&&(C.withCredentials=!1),"responseType"in C&&(h_blob?C.responseType="blob":h_arrayBuffer&&N.headers.get("Content-Type")&&-1!==N.headers.get("Content-Type").indexOf("application/octet-stream")&&(C.responseType="arraybuffer")),!v||"object"!==(0,d.default)(v.headers)||v.headers instanceof I?N.headers.forEach(function(B,Q){C.setRequestHeader(Q,B)}):Object.getOwnPropertyNames(v.headers).forEach(function(B){C.setRequestHeader(B,w(v.headers[B]))}),N.signal&&(N.signal.addEventListener("abort",a),C.onreadystatechange=function(){4===C.readyState&&N.signal.removeEventListener("abort",a)}),C.send(void 0===N._bodyInit?null:N._bodyInit)})}y.polyfill=!0,l.fetch||(l.fetch=y,l.Headers=I,l.Request=j,l.Response=R),b.Headers=I,b.Request=j,b.Response=R,b.fetch=y}({}),f.fetch.ponyfill=!0,delete f.fetch.polyfill;var T=x.fetch?x:f;(O=T.fetch).default=T.fetch,O.fetch=T.fetch,O.Headers=T.Headers,O.Request=T.Request,O.Response=T.Response,z.exports=O},24293:(z,O,E)=>{"use strict";O.randomBytes=O.rng=O.pseudoRandomBytes=O.prng=E(75010),O.createHash=O.Hash=E(35866),O.createHmac=O.Hmac=E(34424);var d=E(26561),x=Object.keys(d),f=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(x);O.getHashes=function(){return f};var T=E(54192);O.pbkdf2=T.pbkdf2,O.pbkdf2Sync=T.pbkdf2Sync;var g=E(56805);O.Cipher=g.Cipher,O.createCipher=g.createCipher,O.Cipheriv=g.Cipheriv,O.createCipheriv=g.createCipheriv,O.Decipher=g.Decipher,O.createDecipher=g.createDecipher,O.Decipheriv=g.Decipheriv,O.createDecipheriv=g.createDecipheriv,O.getCiphers=g.getCiphers,O.listCiphers=g.listCiphers;var b=E(28333);O.DiffieHellmanGroup=b.DiffieHellmanGroup,O.createDiffieHellmanGroup=b.createDiffieHellmanGroup,O.getDiffieHellman=b.getDiffieHellman,O.createDiffieHellman=b.createDiffieHellman,O.DiffieHellman=b.DiffieHellman;var l=E(79527);O.createSign=l.createSign,O.Sign=l.Sign,O.createVerify=l.createVerify,O.Verify=l.Verify,O.createECDH=E(75102);var h=E(86991);O.publicEncrypt=h.publicEncrypt,O.privateEncrypt=h.privateEncrypt,O.publicDecrypt=h.publicDecrypt,O.privateDecrypt=h.privateDecrypt;var u=E(36509);O.randomFill=u.randomFill,O.randomFillSync=u.randomFillSync,O.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},O.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},80034:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x="%[a-f0-9]{2}",f=new RegExp("("+x+")|([^%]+?)","gi"),T=new RegExp("("+x+")+","gi");function g(l,h){try{return[decodeURIComponent(l.join(""))]}catch{}if(1===l.length)return l;var u=l.slice(0,h=h||1),m=l.slice(h);return Array.prototype.concat.call([],g(u),g(m))}function b(l){try{return decodeURIComponent(l)}catch{for(var h=l.match(f)||[],u=1;u{"use strict";O.utils=E(43349),O.Cipher=E(19591),O.DES=E(63049),O.CBC=E(4375),O.EDE=E(9413)},4375:(z,O,E)=>{"use strict";var d=E(94504),x=E(41736),f={};function T(g){d.equal(g.length,8,"Invalid IV length"),this.iv=new Array(8);for(var b=0;b{"use strict";var d=E(94504);function x(f){this.options=f,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}z.exports=x,x.prototype._init=function(){},x.prototype.update=function(f){return 0===f.length?[]:"decrypt"===this.type?this._updateDecrypt(f):this._updateEncrypt(f)},x.prototype._buffer=function(f,T){for(var g=Math.min(this.buffer.length-this.bufferOff,f.length-T),b=0;b0;b--)T+=this._buffer(f,T),g+=this._flushBuffer(l,g);return T+=this._buffer(f,T),l},x.prototype.final=function(f){var T,g;return f&&(T=this.update(f)),g="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),T?T.concat(g):g},x.prototype._pad=function(f,T){if(0===T)return!1;for(;T{"use strict";var d=E(94504),x=E(41736),f=E(43349),T=E(19591);function g(){this.tmp=new Array(2),this.keys=null}function b(h){T.call(this,h);var u=new g;this._desState=u,this.deriveKeys(u,h.key)}x(b,T),z.exports=b,b.create=function(h){return new b(h)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];b.prototype.deriveKeys=function(h,u){h.keys=new Array(32),d.equal(u.length,this.blockSize,"Invalid key length");var m=f.readUInt32BE(u,0),_=f.readUInt32BE(u,4);f.pc1(m,_,h.tmp,0),m=h.tmp[0],_=h.tmp[1];for(var w=0;w>>1];m=f.r28shl(m,S),_=f.r28shl(_,S),f.pc2(m,_,h.keys,w)}},b.prototype._update=function(h,u,m,_){var w=this._desState,S=f.readUInt32BE(h,u),I=f.readUInt32BE(h,u+4);f.ip(S,I,w.tmp,0),S=w.tmp[0],I=w.tmp[1],"encrypt"===this.type?this._encrypt(w,S,I,w.tmp,0):this._decrypt(w,S,I,w.tmp,0),I=w.tmp[1],f.writeUInt32BE(m,S=w.tmp[0],_),f.writeUInt32BE(m,I,_+4)},b.prototype._pad=function(h,u){for(var m=h.length-u,_=u;_>>0,S=G}f.rip(I,S,_,w)},b.prototype._decrypt=function(h,u,m,_,w){for(var S=m,I=u,P=h.keys.length-2;P>=0;P-=2){var L=h.keys[P],V=h.keys[P+1];f.expand(S,h.tmp,0);var W=f.substitute(L^=h.tmp[0],V^=h.tmp[1]),G=S;S=(I^f.permute(W))>>>0,I=G}f.rip(S,I,_,w)}},9413:(z,O,E)=>{"use strict";var d=E(94504),x=E(41736),f=E(19591),T=E(63049);function g(l,h){d.equal(h.length,24,"Invalid key length");var u=h.slice(0,8),m=h.slice(8,16),_=h.slice(16,24);this.ciphers="encrypt"===l?[T.create({type:"encrypt",key:u}),T.create({type:"decrypt",key:m}),T.create({type:"encrypt",key:_})]:[T.create({type:"decrypt",key:_}),T.create({type:"encrypt",key:m}),T.create({type:"decrypt",key:u})]}function b(l){f.call(this,l);var h=new g(this.type,this.options.key);this._edeState=h}x(b,f),z.exports=b,b.create=function(l){return new b(l)},b.prototype._update=function(l,h,u,m){var _=this._edeState;_.ciphers[0]._update(l,h,u,m),_.ciphers[1]._update(u,m,u,m),_.ciphers[2]._update(u,m,u,m)},b.prototype._pad=T.prototype._pad,b.prototype._unpad=T.prototype._unpad},43349:(z,O)=>{"use strict";O.readUInt32BE=function(f,T){return(f[0+T]<<24|f[1+T]<<16|f[2+T]<<8|f[3+T])>>>0},O.writeUInt32BE=function(f,T,g){f[0+g]=T>>>24,f[1+g]=T>>>16&255,f[2+g]=T>>>8&255,f[3+g]=255&T},O.ip=function(f,T,g,b){for(var l=0,h=0,u=6;u>=0;u-=2){for(var m=0;m<=24;m+=8)l<<=1,l|=T>>>m+u&1;for(m=0;m<=24;m+=8)l<<=1,l|=f>>>m+u&1}for(u=6;u>=0;u-=2){for(m=1;m<=25;m+=8)h<<=1,h|=T>>>m+u&1;for(m=1;m<=25;m+=8)h<<=1,h|=f>>>m+u&1}g[b+0]=l>>>0,g[b+1]=h>>>0},O.rip=function(f,T,g,b){for(var l=0,h=0,u=0;u<4;u++)for(var m=24;m>=0;m-=8)l<<=1,l|=T>>>m+u&1,l<<=1,l|=f>>>m+u&1;for(u=4;u<8;u++)for(m=24;m>=0;m-=8)h<<=1,h|=T>>>m+u&1,h<<=1,h|=f>>>m+u&1;g[b+0]=l>>>0,g[b+1]=h>>>0},O.pc1=function(f,T,g,b){for(var l=0,h=0,u=7;u>=5;u--){for(var m=0;m<=24;m+=8)l<<=1,l|=T>>m+u&1;for(m=0;m<=24;m+=8)l<<=1,l|=f>>m+u&1}for(m=0;m<=24;m+=8)l<<=1,l|=T>>m+u&1;for(u=1;u<=3;u++){for(m=0;m<=24;m+=8)h<<=1,h|=T>>m+u&1;for(m=0;m<=24;m+=8)h<<=1,h|=f>>m+u&1}for(m=0;m<=24;m+=8)h<<=1,h|=f>>m+u&1;g[b+0]=l>>>0,g[b+1]=h>>>0},O.r28shl=function(f,T){return f<>>28-T};var E=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];O.pc2=function(f,T,g,b){for(var l=0,h=0,u=E.length>>>1,m=0;m>>E[m]&1;for(m=u;m>>E[m]&1;g[b+0]=l>>>0,g[b+1]=h>>>0},O.expand=function(f,T,g){var b=0,l=0;b=(1&f)<<5|f>>>27;for(var h=23;h>=15;h-=4)b<<=6,b|=f>>>h&63;for(h=11;h>=3;h-=4)l|=f>>>h&63,l<<=6;l|=(31&f)<<1|f>>>31,T[g+0]=b>>>0,T[g+1]=l>>>0};var d=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];O.substitute=function(f,T){for(var g=0,b=0;b<4;b++)g<<=4,g|=d[64*b+(f>>>18-6*b&63)];for(b=0;b<4;b++)g<<=4,g|=d[256+64*b+(T>>>18-6*b&63)];return g>>>0};var x=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];O.permute=function(f){for(var T=0,g=0;g>>x[g]&1;return T>>>0},O.padSplit=function(f,T,g){for(var b=f.toString(2);b.length{"use strict";var d=E(29033).Buffer,x=E(78557),f=E(29799),T=E(51592),g={binary:!0,hex:!0,base64:!0};O.DiffieHellmanGroup=O.createDiffieHellmanGroup=O.getDiffieHellman=function(b){var l=new d(f[b].prime,"hex"),h=new d(f[b].gen,"hex");return new T(l,h)},O.createDiffieHellman=O.DiffieHellman=function b(l,h,u,m){return d.isBuffer(h)||void 0===g[h]?b(l,"binary",h,u):(h=h||"binary",m=m||"binary",u=u||new d([2]),d.isBuffer(u)||(u=new d(u,m)),"number"==typeof l?new T(x(l,u),u,!0):(d.isBuffer(l)||(l=new d(l,h)),new T(l,u,!0)))}},51592:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(31734),f=new(E(31962)),T=new x(24),g=new x(11),b=new x(10),l=new x(3),h=new x(7),u=E(78557),m=E(75010);function _(L,V){return V=V||"utf8",d.isBuffer(L)||(L=new d(L,V)),this._pub=new x(L),this}function w(L,V){return V=V||"utf8",d.isBuffer(L)||(L=new d(L,V)),this._priv=new x(L),this}z.exports=I;var S={};function I(L,V,W){this.setGenerator(V),this.__prime=new x(L),this._prime=x.mont(this.__prime),this._primeLen=L.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,W?(this.setPublicKey=_,this.setPrivateKey=w):this._primeCode=8}function P(L,V){var W=new d(L.toArray());return V?W.toString(V):W}Object.defineProperty(I.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(L,V){var W=V.toString("hex"),G=[W,L.toString(16)].join("_");if(G in S)return S[G];var H,j=0;if(L.isEven()||!u.simpleSieve||!u.fermatTest(L)||!f.test(L))return j+=1,S[G]=j+="02"===W||"05"===W?8:4,j;switch(f.test(L.shrn(1))||(j+=2),W){case"02":L.mod(T).cmp(g)&&(j+=8);break;case"05":(H=L.mod(b)).cmp(l)&&H.cmp(h)&&(j+=8);break;default:j+=4}return S[G]=j,j}(this.__prime,this.__gen)),this._primeCode}}),I.prototype.generateKeys=function(){return this._priv||(this._priv=new x(m(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},I.prototype.computeSecret=function(L){var V=(L=(L=new x(L)).toRed(this._prime)).redPow(this._priv).fromRed(),W=new d(V.toArray()),G=this.getPrime();if(W.length{"use strict";var d=E(75010);z.exports=L,L.simpleSieve=I,L.fermatTest=P;var x=E(31734),f=new x(24),T=new(E(31962)),g=new x(1),b=new x(2),l=new x(5),h=(new x(16),new x(8),new x(10)),u=new x(3),m=(new x(7),new x(11)),_=new x(4),w=(new x(12),null);function I(V){for(var W=function(){if(null!==w)return w;var V=[];V[0]=2;for(var W=1,G=3;G<1048576;G+=2){for(var H=Math.ceil(Math.sqrt(G)),j=0;jV;)G.ishrn(1);if(G.isEven()&&G.iadd(g),G.testn(1)||G.iadd(b),W.cmp(b)){if(!W.cmp(l))for(;G.mod(h).cmp(u);)G.iadd(_)}else for(;G.mod(f).cmp(m);)G.iadd(_);if(I(H=G.shrn(1))&&I(G)&&P(H)&&P(G)&&T.test(H)&&T.test(G))return G}}},36597:(z,O,E)=>{"use strict";var d=O;d.version=E(18597).i8,d.utils=E(7528),d.rand=E(82202),d.curve=E(76063),d.curves=E(40506),d.ec=E(28320),d.eddsa=E(68027)},11249:(z,O,E)=>{"use strict";var d=E(31734),x=E(7528),f=x.getNAF,T=x.getJSF,g=x.assert;function b(h,u){this.type=h,this.p=new d(u.p,16),this.red=u.prime?d.red(u.prime):d.mont(this.p),this.zero=new d(0).toRed(this.red),this.one=new d(1).toRed(this.red),this.two=new d(2).toRed(this.red),this.n=u.n&&new d(u.n,16),this.g=u.g&&this.pointFromJSON(u.g,u.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var m=this.n&&this.p.div(this.n);!m||m.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(h,u){this.curve=h,this.type=u,this.precomputed=null}z.exports=b,b.prototype.point=function(){throw new Error("Not implemented")},b.prototype.validate=function(){throw new Error("Not implemented")},b.prototype._fixedNafMul=function(h,u){g(h.precomputed);var m=h._getDoubles(),_=f(u,1,this._bitLength),w=(1<=S;L--)I=(I<<1)+_[L];P.push(I)}for(var V=this.jpoint(null,null,null),W=this.jpoint(null,null,null),G=w;G>0;G--){for(S=0;S=0;P--){for(var L=0;P>=0&&0===S[P];P--)L++;if(P>=0&&L++,I=I.dblp(L),P<0)break;var V=S[P];g(0!==V),I="affine"===h.type?I.mixedAdd(V>0?w[V-1>>1]:w[-V-1>>1].neg()):I.add(V>0?w[V-1>>1]:w[-V-1>>1].neg())}return"affine"===h.type?I.toP():I},b.prototype._wnafMulAdd=function(h,u,m,_,w){var S,I,P,L=this._wnafT1,V=this._wnafT2,W=this._wnafT3,G=0;for(S=0;S<_;S++){var H=(P=u[S])._getNAFPoints(h);L[S]=H.wnd,V[S]=H.points}for(S=_-1;S>=1;S-=2){var j=S-1,K=S;if(1===L[j]&&1===L[K]){var R=[u[j],null,null,u[K]];0===u[j].y.cmp(u[K].y)?(R[1]=u[j].add(u[K]),R[2]=u[j].toJ().mixedAdd(u[K].neg())):0===u[j].y.cmp(u[K].y.redNeg())?(R[1]=u[j].toJ().mixedAdd(u[K]),R[2]=u[j].add(u[K].neg())):(R[1]=u[j].toJ().mixedAdd(u[K]),R[2]=u[j].toJ().mixedAdd(u[K].neg()));var o=[-3,-1,-5,-7,0,7,5,1,3],y=T(m[j],m[K]);for(G=Math.max(y[0].length,G),W[j]=new Array(G),W[K]=new Array(G),I=0;I=0;S--){for(var N=0;S>=0;){var C=!0;for(I=0;I<_;I++)D[I]=0|W[I][S],0!==D[I]&&(C=!1);if(!C)break;N++,S--}if(S>=0&&N++,k=k.dblp(N),S<0)break;for(I=0;I<_;I++){var a=D[I];0!==a&&(a>0?P=V[I][a-1>>1]:a<0&&(P=V[I][-a-1>>1].neg()),k="affine"===P.type?k.mixedAdd(P):k.add(P))}}for(S=0;S<_;S++)V[S]=null;return w?k:k.toP()},b.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},b.prototype.decodePoint=function(h,u){h=x.toArray(h,u);var m=this.p.byteLength();if((4===h[0]||6===h[0]||7===h[0])&&h.length-1==2*m)return 6===h[0]?g(h[h.length-1]%2==0):7===h[0]&&g(h[h.length-1]%2==1),this.point(h.slice(1,1+m),h.slice(1+m,1+2*m));if((2===h[0]||3===h[0])&&h.length-1===m)return this.pointFromX(h.slice(1,1+m),3===h[0]);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(h){return this.encode(h,!0)},l.prototype._encode=function(h){var u=this.curve.p.byteLength(),m=this.getX().toArray("be",u);return h?[this.getY().isEven()?2:3].concat(m):[4].concat(m,this.getY().toArray("be",u))},l.prototype.encode=function(h,u){return x.encode(this._encode(u),h)},l.prototype.precompute=function(h){if(this.precomputed)return this;var u={doubles:null,naf:null,beta:null};return u.naf=this._getNAFPoints(8),u.doubles=this._getDoubles(4,h),u.beta=this._getBeta(),this.precomputed=u,this},l.prototype._hasDoubles=function(h){if(!this.precomputed)return!1;var u=this.precomputed.doubles;return!!u&&u.points.length>=Math.ceil((h.bitLength()+1)/u.step)},l.prototype._getDoubles=function(h,u){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var m=[this],_=this,w=0;w{"use strict";var d=E(7528),x=E(31734),f=E(41736),T=E(11249),g=d.assert;function b(h){this.twisted=1!=(0|h.a),this.mOneA=this.twisted&&-1==(0|h.a),this.extended=this.mOneA,T.call(this,"edwards",h),this.a=new x(h.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new x(h.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new x(h.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),g(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|h.c)}function l(h,u,m,_,w){T.BasePoint.call(this,h,"projective"),null===u&&null===m&&null===_?(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 x(u,16),this.y=new x(m,16),this.z=_?new x(_,16):this.curve.one,this.t=w&&new x(w,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()))))}f(b,T),z.exports=b,b.prototype._mulA=function(h){return this.mOneA?h.redNeg():this.a.redMul(h)},b.prototype._mulC=function(h){return this.oneC?h:this.c.redMul(h)},b.prototype.jpoint=function(h,u,m,_){return this.point(h,u,m,_)},b.prototype.pointFromX=function(h,u){(h=new x(h,16)).red||(h=h.toRed(this.red));var m=h.redSqr(),_=this.c2.redSub(this.a.redMul(m)),w=this.one.redSub(this.c2.redMul(this.d).redMul(m)),S=_.redMul(w.redInvm()),I=S.redSqrt();if(0!==I.redSqr().redSub(S).cmp(this.zero))throw new Error("invalid point");var P=I.fromRed().isOdd();return(u&&!P||!u&&P)&&(I=I.redNeg()),this.point(h,I)},b.prototype.pointFromY=function(h,u){(h=new x(h,16)).red||(h=h.toRed(this.red));var m=h.redSqr(),_=m.redSub(this.c2),w=m.redMul(this.d).redMul(this.c2).redSub(this.a),S=_.redMul(w.redInvm());if(0===S.cmp(this.zero)){if(u)throw new Error("invalid point");return this.point(this.zero,h)}var I=S.redSqrt();if(0!==I.redSqr().redSub(S).cmp(this.zero))throw new Error("invalid point");return I.fromRed().isOdd()!==u&&(I=I.redNeg()),this.point(I,h)},b.prototype.validate=function(h){if(h.isInfinity())return!0;h.normalize();var u=h.x.redSqr(),m=h.y.redSqr(),_=u.redMul(this.a).redAdd(m),w=this.c2.redMul(this.one.redAdd(this.d.redMul(u).redMul(m)));return 0===_.cmp(w)},f(l,T.BasePoint),b.prototype.pointFromJSON=function(h){return l.fromJSON(this,h)},b.prototype.point=function(h,u,m,_){return new l(this,h,u,m,_)},l.fromJSON=function(h,u){return new l(h,u[0],u[1],u[2])},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},l.prototype._extDbl=function(){var h=this.x.redSqr(),u=this.y.redSqr(),m=this.z.redSqr();m=m.redIAdd(m);var _=this.curve._mulA(h),w=this.x.redAdd(this.y).redSqr().redISub(h).redISub(u),S=_.redAdd(u),I=S.redSub(m),P=_.redSub(u),L=w.redMul(I),V=S.redMul(P),W=w.redMul(P),G=I.redMul(S);return this.curve.point(L,V,G,W)},l.prototype._projDbl=function(){var h,u,m,_,w,S,I=this.x.redAdd(this.y).redSqr(),P=this.x.redSqr(),L=this.y.redSqr();if(this.curve.twisted){var V=(_=this.curve._mulA(P)).redAdd(L);this.zOne?(h=I.redSub(P).redSub(L).redMul(V.redSub(this.curve.two)),u=V.redMul(_.redSub(L)),m=V.redSqr().redSub(V).redSub(V)):(w=this.z.redSqr(),S=V.redSub(w).redISub(w),h=I.redSub(P).redISub(L).redMul(S),u=V.redMul(_.redSub(L)),m=V.redMul(S))}else _=P.redAdd(L),w=this.curve._mulC(this.z).redSqr(),S=_.redSub(w).redSub(w),h=this.curve._mulC(I.redISub(_)).redMul(S),u=this.curve._mulC(_).redMul(P.redISub(L)),m=_.redMul(S);return this.curve.point(h,u,m)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(h){var u=this.y.redSub(this.x).redMul(h.y.redSub(h.x)),m=this.y.redAdd(this.x).redMul(h.y.redAdd(h.x)),_=this.t.redMul(this.curve.dd).redMul(h.t),w=this.z.redMul(h.z.redAdd(h.z)),S=m.redSub(u),I=w.redSub(_),P=w.redAdd(_),L=m.redAdd(u),V=S.redMul(I),W=P.redMul(L),G=S.redMul(L),H=I.redMul(P);return this.curve.point(V,W,H,G)},l.prototype._projAdd=function(h){var u,m,_=this.z.redMul(h.z),w=_.redSqr(),S=this.x.redMul(h.x),I=this.y.redMul(h.y),P=this.curve.d.redMul(S).redMul(I),L=w.redSub(P),V=w.redAdd(P),W=this.x.redAdd(this.y).redMul(h.x.redAdd(h.y)).redISub(S).redISub(I),G=_.redMul(L).redMul(W);return this.curve.twisted?(u=_.redMul(V).redMul(I.redSub(this.curve._mulA(S))),m=L.redMul(V)):(u=_.redMul(V).redMul(I.redSub(S)),m=this.curve._mulC(L).redMul(V)),this.curve.point(G,u,m)},l.prototype.add=function(h){return this.isInfinity()?h:h.isInfinity()?this:this.curve.extended?this._extAdd(h):this._projAdd(h)},l.prototype.mul=function(h){return this._hasDoubles(h)?this.curve._fixedNafMul(this,h):this.curve._wnafMul(this,h)},l.prototype.mulAdd=function(h,u,m){return this.curve._wnafMulAdd(1,[this,u],[h,m],2,!1)},l.prototype.jmulAdd=function(h,u,m){return this.curve._wnafMulAdd(1,[this,u],[h,m],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var h=this.z.redInvm();return this.x=this.x.redMul(h),this.y=this.y.redMul(h),this.t&&(this.t=this.t.redMul(h)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(h){return this===h||0===this.getX().cmp(h.getX())&&0===this.getY().cmp(h.getY())},l.prototype.eqXToP=function(h){var u=h.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(u))return!0;for(var m=h.clone(),_=this.curve.redN.redMul(this.z);;){if(m.iadd(this.curve.n),m.cmp(this.curve.p)>=0)return!1;if(u.redIAdd(_),0===this.x.cmp(u))return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},76063:(z,O,E)=>{"use strict";var d=O;d.base=E(11249),d.short=E(53148),d.mont=E(51105),d.edwards=E(81123)},51105:(z,O,E)=>{"use strict";var d=E(31734),x=E(41736),f=E(11249),T=E(7528);function g(l){f.call(this,"mont",l),this.a=new d(l.a,16).toRed(this.red),this.b=new d(l.b,16).toRed(this.red),this.i4=new d(4).toRed(this.red).redInvm(),this.two=new d(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function b(l,h,u){f.BasePoint.call(this,l,"projective"),null===h&&null===u?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new d(h,16),this.z=new d(u,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}x(g,f),z.exports=g,g.prototype.validate=function(l){var h=l.normalize().x,u=h.redSqr(),m=u.redMul(h).redAdd(u.redMul(this.a)).redAdd(h);return 0===m.redSqrt().redSqr().cmp(m)},x(b,f.BasePoint),g.prototype.decodePoint=function(l,h){return this.point(T.toArray(l,h),1)},g.prototype.point=function(l,h){return new b(this,l,h)},g.prototype.pointFromJSON=function(l){return b.fromJSON(this,l)},b.prototype.precompute=function(){},b.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},b.fromJSON=function(l,h){return new b(l,h[0],h[1]||l.one)},b.prototype.inspect=function(){return this.isInfinity()?"":""},b.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},b.prototype.dbl=function(){var l=this.x.redAdd(this.z).redSqr(),h=this.x.redSub(this.z).redSqr(),u=l.redSub(h),m=l.redMul(h),_=u.redMul(h.redAdd(this.curve.a24.redMul(u)));return this.curve.point(m,_)},b.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},b.prototype.diffAdd=function(l,h){var u=this.x.redAdd(this.z),m=this.x.redSub(this.z),_=l.x.redAdd(l.z),w=l.x.redSub(l.z).redMul(u),S=_.redMul(m),I=h.z.redMul(w.redAdd(S).redSqr()),P=h.x.redMul(w.redISub(S).redSqr());return this.curve.point(I,P)},b.prototype.mul=function(l){for(var h=l.clone(),u=this,m=this.curve.point(null,null),_=[];0!==h.cmpn(0);h.iushrn(1))_.push(h.andln(1));for(var w=_.length-1;w>=0;w--)0===_[w]?(u=u.diffAdd(m,this),m=m.dbl()):(m=u.diffAdd(m,this),u=u.dbl());return m},b.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},b.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},b.prototype.eq=function(l){return 0===this.getX().cmp(l.getX())},b.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},b.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},53148:(z,O,E)=>{"use strict";var d=E(7528),x=E(31734),f=E(41736),T=E(11249),g=d.assert;function b(u){T.call(this,"short",u),this.a=new x(u.a,16).toRed(this.red),this.b=new x(u.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(u),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(u,m,_,w){T.BasePoint.call(this,u,"affine"),null===m&&null===_?(this.x=null,this.y=null,this.inf=!0):(this.x=new x(m,16),this.y=new x(_,16),w&&(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 h(u,m,_,w){T.BasePoint.call(this,u,"jacobian"),null===m&&null===_&&null===w?(this.x=this.curve.one,this.y=this.curve.one,this.z=new x(0)):(this.x=new x(m,16),this.y=new x(_,16),this.z=new x(w,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}f(b,T),z.exports=b,b.prototype._getEndomorphism=function(u){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var m,_;if(u.beta)m=new x(u.beta,16).toRed(this.red);else{var w=this._getEndoRoots(this.p);m=(m=w[0].cmp(w[1])<0?w[0]:w[1]).toRed(this.red)}if(u.lambda)_=new x(u.lambda,16);else{var S=this._getEndoRoots(this.n);0===this.g.mul(S[0]).x.cmp(this.g.x.redMul(m))?_=S[0]:g(0===this.g.mul(_=S[1]).x.cmp(this.g.x.redMul(m)))}return{beta:m,lambda:_,basis:u.basis?u.basis.map(function(I){return{a:new x(I.a,16),b:new x(I.b,16)}}):this._getEndoBasis(_)}}},b.prototype._getEndoRoots=function(u){var m=u===this.p?this.red:x.mont(u),_=new x(2).toRed(m).redInvm(),w=_.redNeg(),S=new x(3).toRed(m).redNeg().redSqrt().redMul(_);return[w.redAdd(S).fromRed(),w.redSub(S).fromRed()]},b.prototype._getEndoBasis=function(u){for(var m,_,w,S,I,P,L,V,W,G=this.n.ushrn(Math.floor(this.n.bitLength()/2)),H=u,j=this.n.clone(),K=new x(1),R=new x(0),o=new x(0),y=new x(1),M=0;0!==H.cmpn(0);){var v=j.div(H);V=j.sub(v.mul(H)),W=o.sub(v.mul(K));var k=y.sub(v.mul(R));if(!w&&V.cmp(G)<0)m=L.neg(),_=K,w=V.neg(),S=W;else if(w&&2==++M)break;L=V,j=H,H=V,o=K,K=W,y=R,R=k}I=V.neg(),P=W;var D=w.sqr().add(S.sqr());return I.sqr().add(P.sqr()).cmp(D)>=0&&(I=m,P=_),w.negative&&(w=w.neg(),S=S.neg()),I.negative&&(I=I.neg(),P=P.neg()),[{a:w,b:S},{a:I,b:P}]},b.prototype._endoSplit=function(u){var m=this.endo.basis,_=m[0],w=m[1],S=w.b.mul(u).divRound(this.n),I=_.b.neg().mul(u).divRound(this.n),P=S.mul(_.a),L=I.mul(w.a),V=S.mul(_.b),W=I.mul(w.b);return{k1:u.sub(P).sub(L),k2:V.add(W).neg()}},b.prototype.pointFromX=function(u,m){(u=new x(u,16)).red||(u=u.toRed(this.red));var _=u.redSqr().redMul(u).redIAdd(u.redMul(this.a)).redIAdd(this.b),w=_.redSqrt();if(0!==w.redSqr().redSub(_).cmp(this.zero))throw new Error("invalid point");var S=w.fromRed().isOdd();return(m&&!S||!m&&S)&&(w=w.redNeg()),this.point(u,w)},b.prototype.validate=function(u){if(u.inf)return!0;var m=u.x,_=u.y,w=this.a.redMul(m),S=m.redSqr().redMul(m).redIAdd(w).redIAdd(this.b);return 0===_.redSqr().redISub(S).cmpn(0)},b.prototype._endoWnafMulAdd=function(u,m,_){for(var w=this._endoWnafT1,S=this._endoWnafT2,I=0;I":""},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(u){if(this.inf)return u;if(u.inf)return this;if(this.eq(u))return this.dbl();if(this.neg().eq(u))return this.curve.point(null,null);if(0===this.x.cmp(u.x))return this.curve.point(null,null);var m=this.y.redSub(u.y);0!==m.cmpn(0)&&(m=m.redMul(this.x.redSub(u.x).redInvm()));var _=m.redSqr().redISub(this.x).redISub(u.x),w=m.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,w)},l.prototype.dbl=function(){if(this.inf)return this;var u=this.y.redAdd(this.y);if(0===u.cmpn(0))return this.curve.point(null,null);var m=this.curve.a,_=this.x.redSqr(),w=u.redInvm(),S=_.redAdd(_).redIAdd(_).redIAdd(m).redMul(w),I=S.redSqr().redISub(this.x.redAdd(this.x)),P=S.redMul(this.x.redSub(I)).redISub(this.y);return this.curve.point(I,P)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(u){return u=new x(u,16),this.isInfinity()?this:this._hasDoubles(u)?this.curve._fixedNafMul(this,u):this.curve.endo?this.curve._endoWnafMulAdd([this],[u]):this.curve._wnafMul(this,u)},l.prototype.mulAdd=function(u,m,_){var w=[this,m],S=[u,_];return this.curve.endo?this.curve._endoWnafMulAdd(w,S):this.curve._wnafMulAdd(1,w,S,2)},l.prototype.jmulAdd=function(u,m,_){var w=[this,m],S=[u,_];return this.curve.endo?this.curve._endoWnafMulAdd(w,S,!0):this.curve._wnafMulAdd(1,w,S,2,!0)},l.prototype.eq=function(u){return this===u||this.inf===u.inf&&(this.inf||0===this.x.cmp(u.x)&&0===this.y.cmp(u.y))},l.prototype.neg=function(u){if(this.inf)return this;var m=this.curve.point(this.x,this.y.redNeg());if(u&&this.precomputed){var _=this.precomputed,w=function(S){return S.neg()};m.precomputed={naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(w)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(w)}}}return m},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},f(h,T.BasePoint),b.prototype.jpoint=function(u,m,_){return new h(this,u,m,_)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var u=this.z.redInvm(),m=u.redSqr(),_=this.x.redMul(m),w=this.y.redMul(m).redMul(u);return this.curve.point(_,w)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(u){if(this.isInfinity())return u;if(u.isInfinity())return this;var m=u.z.redSqr(),_=this.z.redSqr(),w=this.x.redMul(m),S=u.x.redMul(_),I=this.y.redMul(m.redMul(u.z)),P=u.y.redMul(_.redMul(this.z)),L=w.redSub(S),V=I.redSub(P);if(0===L.cmpn(0))return 0!==V.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var W=L.redSqr(),G=W.redMul(L),H=w.redMul(W),j=V.redSqr().redIAdd(G).redISub(H).redISub(H),K=V.redMul(H.redISub(j)).redISub(I.redMul(G)),R=this.z.redMul(u.z).redMul(L);return this.curve.jpoint(j,K,R)},h.prototype.mixedAdd=function(u){if(this.isInfinity())return u.toJ();if(u.isInfinity())return this;var m=this.z.redSqr(),_=this.x,w=u.x.redMul(m),S=this.y,I=u.y.redMul(m).redMul(this.z),P=_.redSub(w),L=S.redSub(I);if(0===P.cmpn(0))return 0!==L.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var V=P.redSqr(),W=V.redMul(P),G=_.redMul(V),H=L.redSqr().redIAdd(W).redISub(G).redISub(G),j=L.redMul(G.redISub(H)).redISub(S.redMul(W)),K=this.z.redMul(P);return this.curve.jpoint(H,j,K)},h.prototype.dblp=function(u){if(0===u)return this;if(this.isInfinity())return this;if(!u)return this.dbl();var m;if(this.curve.zeroA||this.curve.threeA){var _=this;for(m=0;m=0)return!1;if(_.redIAdd(S),0===this.x.cmp(_))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},40506:(z,O,E)=>{"use strict";var d,x=O,f=E(37198),T=E(76063),g=E(7528).assert;function b(h){this.curve="short"===h.type?new T.short(h):"edwards"===h.type?new T.edwards(h):new T.mont(h),this.g=this.curve.g,this.n=this.curve.n,this.hash=h.hash,g(this.g.validate(),"Invalid curve"),g(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(h,u){Object.defineProperty(x,h,{configurable:!0,enumerable:!0,get:function(){var m=new b(u);return Object.defineProperty(x,h,{configurable:!0,enumerable:!0,value:m}),m}})}x.PresetCurve=b,l("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:f.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("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:f.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("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:f.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("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:f.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"]}),l("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:f.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"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f.sha256,gRed:!1,g:["9"]}),l("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:f.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{d=E(46401)}catch{d=void 0}l("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:f.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",d]})},28320:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(29410),T=E(7528),g=E(40506),b=E(82202),l=T.assert,h=E(37791),u=E(30488);function m(_){if(!(this instanceof m))return new m(_);"string"==typeof _&&(l(Object.prototype.hasOwnProperty.call(g,_),"Unknown curve "+_),_=g[_]),_ instanceof g.PresetCurve&&(_={curve:_}),this.curve=_.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=_.curve.g,this.g.precompute(_.curve.n.bitLength()+1),this.hash=_.hash||_.curve.hash}z.exports=m,m.prototype.keyPair=function(_){return new h(this,_)},m.prototype.keyFromPrivate=function(_,w){return h.fromPrivate(this,_,w)},m.prototype.keyFromPublic=function(_,w){return h.fromPublic(this,_,w)},m.prototype.genKeyPair=function(_){_||(_={});for(var w=new f({hash:this.hash,pers:_.pers,persEnc:_.persEnc||"utf8",entropy:_.entropy||b(this.hash.hmacStrength),entropyEnc:_.entropy&&_.entropyEnc||"utf8",nonce:this.n.toArray()}),S=this.n.byteLength(),I=this.n.sub(new x(2));;){var P=new x(w.generate(S));if(!(P.cmp(I)>0))return P.iaddn(1),this.keyFromPrivate(P)}},m.prototype._truncateToN=function(_,w){var S=8*_.byteLength()-this.n.bitLength();return S>0&&(_=_.ushrn(S)),!w&&_.cmp(this.n)>=0?_.sub(this.n):_},m.prototype.sign=function(_,w,S,I){"object"===(0,d.default)(S)&&(I=S,S=null),I||(I={}),w=this.keyFromPrivate(w,S),_=this._truncateToN(new x(_,16));for(var P=this.n.byteLength(),L=w.getPrivate().toArray("be",P),V=_.toArray("be",P),W=new f({hash:this.hash,entropy:L,nonce:V,pers:I.pers,persEnc:I.persEnc||"utf8"}),G=this.n.sub(new x(1)),H=0;;H++){var j=I.k?I.k(H):new x(W.generate(this.n.byteLength()));if(!((j=this._truncateToN(j,!0)).cmpn(1)<=0||j.cmp(G)>=0)){var K=this.g.mul(j);if(!K.isInfinity()){var R=K.getX(),o=R.umod(this.n);if(0!==o.cmpn(0)){var y=j.invm(this.n).mul(o.mul(w.getPrivate()).iadd(_));if(0!==(y=y.umod(this.n)).cmpn(0)){var M=(K.getY().isOdd()?1:0)|(0!==R.cmp(o)?2:0);return I.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),M^=1),new u({r:o,s:y,recoveryParam:M})}}}}}},m.prototype.verify=function(_,w,S,I){_=this._truncateToN(new x(_,16)),S=this.keyFromPublic(S,I);var P=(w=new u(w,"hex")).r,L=w.s;if(P.cmpn(1)<0||P.cmp(this.n)>=0||L.cmpn(1)<0||L.cmp(this.n)>=0)return!1;var V,W=L.invm(this.n),G=W.mul(_).umod(this.n),H=W.mul(P).umod(this.n);return this.curve._maxwellTrick?!(V=this.g.jmulAdd(G,S.getPublic(),H)).isInfinity()&&V.eqXToP(P):!(V=this.g.mulAdd(G,S.getPublic(),H)).isInfinity()&&0===V.getX().umod(this.n).cmp(P)},m.prototype.recoverPubKey=function(_,w,S,I){l((3&S)===S,"The recovery param is more than two bits"),w=new u(w,I);var P=this.n,L=new x(_),V=w.r,W=w.s,G=1&S,H=S>>1;if(V.cmp(this.curve.p.umod(this.curve.n))>=0&&H)throw new Error("Unable to find sencond key candinate");V=this.curve.pointFromX(H?V.add(this.curve.n):V,G);var j=w.r.invm(P),K=P.sub(L).mul(j).umod(P),R=W.mul(j).umod(P);return this.g.mulAdd(K,V,R)},m.prototype.getKeyRecoveryParam=function(_,w,S,I){if(null!==(w=new u(w,I)).recoveryParam)return w.recoveryParam;for(var P=0;P<4;P++){var L;try{L=this.recoverPubKey(_,w,P)}catch{continue}if(L.eq(S))return P}throw new Error("Unable to find valid recovery factor")}},37791:(z,O,E)=>{"use strict";var d=E(31734),x=E(7528).assert;function f(T,g){this.ec=T,this.priv=null,this.pub=null,g.priv&&this._importPrivate(g.priv,g.privEnc),g.pub&&this._importPublic(g.pub,g.pubEnc)}z.exports=f,f.fromPublic=function(T,g,b){return g instanceof f?g:new f(T,{pub:g,pubEnc:b})},f.fromPrivate=function(T,g,b){return g instanceof f?g:new f(T,{priv:g,privEnc:b})},f.prototype.validate=function(){var T=this.getPublic();return T.isInfinity()?{result:!1,reason:"Invalid public key"}:T.validate()?T.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"}},f.prototype.getPublic=function(T,g){return"string"==typeof T&&(g=T,T=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),g?this.pub.encode(g,T):this.pub},f.prototype.getPrivate=function(T){return"hex"===T?this.priv.toString(16,2):this.priv},f.prototype._importPrivate=function(T,g){this.priv=new d(T,g||16),this.priv=this.priv.umod(this.ec.curve.n)},f.prototype._importPublic=function(T,g){if(T.x||T.y)return"mont"===this.ec.curve.type?x(T.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||x(T.x&&T.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(T.x,T.y));this.pub=this.ec.curve.decodePoint(T,g)},f.prototype.derive=function(T){return T.validate()||x(T.validate(),"public point not validated"),T.mul(this.priv).getX()},f.prototype.sign=function(T,g,b){return this.ec.sign(T,this,g,b)},f.prototype.verify=function(T,g){return this.ec.verify(T,g,this)},f.prototype.inspect=function(){return""}},30488:(z,O,E)=>{"use strict";var d=E(31734),x=E(7528),f=x.assert;function T(u,m){if(u instanceof T)return u;this._importDER(u,m)||(f(u.r&&u.s,"Signature without r or s"),this.r=new d(u.r,16),this.s=new d(u.s,16),this.recoveryParam=void 0===u.recoveryParam?null:u.recoveryParam)}function g(){this.place=0}function b(u,m){var _=u[m.place++];if(!(128&_))return _;var w=15&_;if(0===w||w>4)return!1;for(var S=0,I=0,P=m.place;I>>=0;return!(S<=127)&&(m.place=P,S)}function l(u){for(var m=0,_=u.length-1;!u[m]&&!(128&u[m+1])&&m<_;)m++;return 0===m?u:u.slice(m)}function h(u,m){if(m<128)u.push(m);else{var _=1+(Math.log(m)/Math.LN2>>>3);for(u.push(128|_);--_;)u.push(m>>>(_<<3)&255);u.push(m)}}z.exports=T,T.prototype._importDER=function(u,m){u=x.toArray(u,m);var _=new g;if(48!==u[_.place++])return!1;var w=b(u,_);if(!1===w||w+_.place!==u.length||2!==u[_.place++])return!1;var S=b(u,_);if(!1===S)return!1;var I=u.slice(_.place,S+_.place);if(_.place+=S,2!==u[_.place++])return!1;var P=b(u,_);if(!1===P||u.length!==P+_.place)return!1;var L=u.slice(_.place,P+_.place);if(0===I[0]){if(!(128&I[1]))return!1;I=I.slice(1)}if(0===L[0]){if(!(128&L[1]))return!1;L=L.slice(1)}return this.r=new d(I),this.s=new d(L),this.recoveryParam=null,!0},T.prototype.toDER=function(u){var m=this.r.toArray(),_=this.s.toArray();for(128&m[0]&&(m=[0].concat(m)),128&_[0]&&(_=[0].concat(_)),m=l(m),_=l(_);!(_[0]||128&_[1]);)_=_.slice(1);var w=[2];h(w,m.length),(w=w.concat(m)).push(2),h(w,_.length);var S=w.concat(_),I=[48];return h(I,S.length),I=I.concat(S),x.encode(I,u)}},68027:(z,O,E)=>{"use strict";var d=E(37198),x=E(40506),f=E(7528),T=f.assert,g=f.parseBytes,b=E(27303),l=E(36646);function h(u){if(T("ed25519"===u,"only tested with ed25519 so far"),!(this instanceof h))return new h(u);this.curve=u=x[u].curve,this.g=u.g,this.g.precompute(u.n.bitLength()+1),this.pointClass=u.point().constructor,this.encodingLength=Math.ceil(u.n.bitLength()/8),this.hash=d.sha512}z.exports=h,h.prototype.sign=function(u,m){u=g(u);var _=this.keyFromSecret(m),w=this.hashInt(_.messagePrefix(),u),S=this.g.mul(w),I=this.encodePoint(S),P=this.hashInt(I,_.pubBytes(),u).mul(_.priv()),L=w.add(P).umod(this.curve.n);return this.makeSignature({R:S,S:L,Rencoded:I})},h.prototype.verify=function(u,m,_){u=g(u),m=this.makeSignature(m);var w=this.keyFromPublic(_),S=this.hashInt(m.Rencoded(),w.pubBytes(),u),I=this.g.mul(m.S());return m.R().add(w.pub().mul(S)).eq(I)},h.prototype.hashInt=function(){for(var u=this.hash(),m=0;m{"use strict";var d=E(7528),x=d.assert,f=d.parseBytes,T=d.cachedProperty;function g(b,l){this.eddsa=b,this._secret=f(l.secret),b.isPoint(l.pub)?this._pub=l.pub:this._pubBytes=f(l.pub)}g.fromPublic=function(b,l){return l instanceof g?l:new g(b,{pub:l})},g.fromSecret=function(b,l){return l instanceof g?l:new g(b,{secret:l})},g.prototype.secret=function(){return this._secret},T(g,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),T(g,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),T(g,"privBytes",function(){var b=this.eddsa,l=this.hash(),h=b.encodingLength-1,u=l.slice(0,b.encodingLength);return u[0]&=248,u[h]&=127,u[h]|=64,u}),T(g,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),T(g,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),T(g,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),g.prototype.sign=function(b){return x(this._secret,"KeyPair can only verify"),this.eddsa.sign(b,this)},g.prototype.verify=function(b,l){return this.eddsa.verify(b,l,this)},g.prototype.getSecret=function(b){return x(this._secret,"KeyPair is public only"),d.encode(this.secret(),b)},g.prototype.getPublic=function(b){return d.encode(this.pubBytes(),b)},z.exports=g},36646:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(7528),T=f.assert,g=f.cachedProperty,b=f.parseBytes;function l(h,u){this.eddsa=h,"object"!==(0,d.default)(u)&&(u=b(u)),Array.isArray(u)&&(u={R:u.slice(0,h.encodingLength),S:u.slice(h.encodingLength)}),T(u.R&&u.S,"Signature without R or S"),h.isPoint(u.R)&&(this._R=u.R),u.S instanceof x&&(this._S=u.S),this._Rencoded=Array.isArray(u.R)?u.R:u.Rencoded,this._Sencoded=Array.isArray(u.S)?u.S:u.Sencoded}g(l,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),g(l,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),g(l,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),g(l,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return f.encode(this.toBytes(),"hex").toUpperCase()},z.exports=l},46401:z=>{"use strict";z.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"]]}}},7528:(z,O,E)=>{"use strict";var d=O,x=E(31734),f=E(94504),T=E(96580);d.assert=f,d.toArray=T.toArray,d.zero2=T.zero2,d.toHex=T.toHex,d.encode=T.encode,d.getNAF=function(g,b,l){var h=new Array(Math.max(g.bitLength(),l)+1);h.fill(0);for(var u=1<(u>>1)-1?(u>>1)-S:S):w=0,h[_]=w,m.iushrn(1)}return h},d.getJSF=function(g,b){var l=[[],[]];g=g.clone(),b=b.clone();for(var h,u=0,m=0;g.cmpn(-u)>0||b.cmpn(-m)>0;){var _,w,S=g.andln(3)+u&3,I=b.andln(3)+m&3;3===S&&(S=-1),3===I&&(I=-1),_=0==(1&S)?0:3!=(h=g.andln(7)+u&7)&&5!==h||2!==I?S:-S,l[0].push(_),w=0==(1&I)?0:3!=(h=b.andln(7)+m&7)&&5!==h||2!==S?I:-I,l[1].push(w),2*u===_+1&&(u=1-u),2*m===w+1&&(m=1-m),g.iushrn(1),b.iushrn(1)}return l},d.cachedProperty=function(g,b,l){var h="_"+b;g.prototype[b]=function(){return void 0!==this[h]?this[h]:this[h]=l.call(this)}},d.parseBytes=function(g){return"string"==typeof g?d.toArray(g,"hex"):g},d.intFromLE=function(g){return new x(g,"hex","le")}},26464:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=function(){if("object"===("undefined"==typeof self?"undefined":(0,d.default)(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":(0,d.default)(window))&&window)return window;throw new Error("Unable to resolve global `this`")};z.exports=function(){if(this)return this;if("object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return x()}try{return __global__||x()}finally{delete Object.prototype.__global__}}()},54258:(z,O,E)=>{"use strict";var d,x,f,T=E(19142),g=E(28847)(E(3355));f=function(){function b(pe){return"function"==typeof pe}var l=Array.isArray?Array.isArray:function(pe){return"[object Array]"===Object.prototype.toString.call(pe)},h=0,u=void 0,m=void 0,_=function(pe,_e){W[h]=pe,W[h+1]=_e,2===(h+=2)&&(m?m(G):o())},w="undefined"!=typeof window?window:void 0,S=w||{},I=S.MutationObserver||S.WebKitMutationObserver,P="undefined"==typeof self&&void 0!==T&&"[object process]"==={}.toString.call(T),L="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function V(){var pe=setTimeout;return function(){return pe(G,1)}}var W=new Array(1e3);function G(){for(var pe=0;pe{"use strict";var d=E(29033).Buffer,x=E(24858).keccak_256,f=E(3956);function T(g){return g&&f.toUnicode(g,{useStd3ASCII:!0,transitional:!1})}O.hash=function(g){for(var b="",l=0;l<32;l++)b+="00";if(name=T(g),name){var h=name.split(".");for(l=h.length-1;l>=0;l--){var u=x(h[l]);b=x(new d(b+u,"hex"))}}return"0x"+b},O.normalize=T},53058:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(74519)),f=E(58320),T=E(88645),g=E(36597),b=(E(46740),new g.ec("secp256k1")),l=E(22922),h=l.keccak256,u=l.keccak256s,m=function(L){for(var V=u(L.slice(2)),W="0x",G=0;G<40;G++)W+=parseInt(V[G+2],16)>7?L[G+2].toUpperCase():L[G+2];return W},_=function(L){var V=new d(L.slice(2),"hex"),W="0x"+b.keyFromPrivate(V).getPublic(!1,"hex").slice(2),G=h(W);return{address:m("0x"+G.slice(-40)),privateKey:L}},w=function(L){var V=(0,x.default)(L,3);return f.flatten([V[1],V[2],V[0]])},S=function(L){return[f.slice(64,f.length(L),L),f.slice(0,32,L),f.slice(32,64,L)]},I=function(L){return function(V,W){var G=b.keyFromPrivate(new d(W.slice(2),"hex")).sign(new d(V.slice(2),"hex"),{canonical:!0});return w([T.fromString(f.fromNumber(L+G.recoveryParam)),f.pad(32,f.fromNat("0x"+G.r.toString(16))),f.pad(32,f.fromNat("0x"+G.s.toString(16)))])}},P=I(27);z.exports={create:function(L){var V=h(f.concat(f.random(32),L||f.random(32))),W=f.concat(f.concat(f.random(32),V),f.random(32)),G=h(W);return _(G)},toChecksum:m,fromPrivate:_,sign:P,makeSigner:I,recover:function(L,V){var W=S(V),G={v:f.toNumber(W[0]),r:W[1].slice(2),s:W[2].slice(2)},H="0x"+b.recoverPubKey(new d(L.slice(2),"hex"),G,G.v<2?G.v:1-G.v%2).encode("hex",!1).slice(2),j=h(H);return m("0x"+j.slice(-40))},encodeSignature:w,decodeSignature:S}},51376:z=>{"use strict";var O=function(E,d){for(var x=[],f=0;f{"use strict";E(51376);var d=function(g,b){return parseInt(g.slice(2*b+2,2*b+4),16)},x=function(g){return(g.length-2)/2},f=function(g){for(var b=[],l=2,h=g.length;l>6|192);else{if(u>55295&&u<56320){if(++h==g.length)return null;var m=g.charCodeAt(h);if(m<56320||m>57343)return null;l+=b((u=65536+((1023&u)<<10)+(1023&m))>>18|240),l+=b(u>>12&63|128)}else l+=b(u>>12|224);l+=b(u>>6&63|128)}l+=b(63&u|128)}}return l},toString:function(g){for(var b="",l=0,h=x(g);l127){if(u>191&&u<224){if(l>=h)return null;u=(31&u)<<6|63&d(g,l)}else if(u>223&&u<240){if(l+1>=h)return null;u=(15&u)<<12|(63&d(g,l))<<6|63&d(g,++l)}else{if(!(u>239&&u<248)||l+2>=h)return null;u=(7&u)<<18|(63&d(g,l))<<12|(63&d(g,++l))<<6|63&d(g,++l)}++l}if(u<=65535)b+=String.fromCharCode(u);else{if(!(u<=1114111))return null;u-=65536,b+=String.fromCharCode(u>>10|55296),b+=String.fromCharCode(1023&u|56320)}}return b},fromNumber:function(g){var b=g.toString(16);return b.length%2==0?"0x"+b:"0x0"+b},toNumber:function(g){return parseInt(g.slice(2),16)},fromNat:function(g){return"0x0"===g?"0x":g.length%2==0?g:"0x0"+g.slice(2)},toNat:function(g){return"0"===g[2]?"0x"+g.slice(3):g},fromArray:T,toArray:f,fromUint8Array:function(g){return T([].slice.call(g,0))},toUint8Array:function(g){return new Uint8Array(f(g))}}},22922:z=>{"use strict";var O="0123456789abcdef".split(""),E=[1,256,65536,16777216],d=[0,8,16,24],x=[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],f=function(g){var b,l,h,u,m,_,w,S,I,P,L,V,W,G,H,j,K,R,o,y,M,v,k,D,N,C,a,B,Q,ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt;for(h=0;h<48;h+=2)u=g[0]^g[10]^g[20]^g[30]^g[40],m=g[1]^g[11]^g[21]^g[31]^g[41],S=g[4]^g[14]^g[24]^g[34]^g[44],I=g[5]^g[15]^g[25]^g[35]^g[45],P=g[6]^g[16]^g[26]^g[36]^g[46],L=g[7]^g[17]^g[27]^g[37]^g[47],b=(V=g[8]^g[18]^g[28]^g[38]^g[48])^((_=g[2]^g[12]^g[22]^g[32]^g[42])<<1|(w=g[3]^g[13]^g[23]^g[33]^g[43])>>>31),l=(W=g[9]^g[19]^g[29]^g[39]^g[49])^(w<<1|_>>>31),g[0]^=b,g[1]^=l,g[10]^=b,g[11]^=l,g[20]^=b,g[21]^=l,g[30]^=b,g[31]^=l,g[40]^=b,g[41]^=l,l=m^(I<<1|S>>>31),g[2]^=b=u^(S<<1|I>>>31),g[3]^=l,g[12]^=b,g[13]^=l,g[22]^=b,g[23]^=l,g[32]^=b,g[33]^=l,g[42]^=b,g[43]^=l,l=w^(L<<1|P>>>31),g[4]^=b=_^(P<<1|L>>>31),g[5]^=l,g[14]^=b,g[15]^=l,g[24]^=b,g[25]^=l,g[34]^=b,g[35]^=l,g[44]^=b,g[45]^=l,l=I^(W<<1|V>>>31),g[6]^=b=S^(V<<1|W>>>31),g[7]^=l,g[16]^=b,g[17]^=l,g[26]^=b,g[27]^=l,g[36]^=b,g[37]^=l,g[46]^=b,g[47]^=l,l=L^(m<<1|u>>>31),g[8]^=b=P^(u<<1|m>>>31),g[9]^=l,g[18]^=b,g[19]^=l,g[28]^=b,g[29]^=l,g[38]^=b,g[39]^=l,g[48]^=b,g[49]^=l,H=g[1],ze=g[11]<<4|g[10]>>>28,Ve=g[10]<<4|g[11]>>>28,B=g[20]<<3|g[21]>>>29,Q=g[21]<<3|g[20]>>>29,Nt=g[31]<<9|g[30]>>>23,It=g[30]<<9|g[31]>>>23,Ce=g[40]<<18|g[41]>>>14,ke=g[41]<<18|g[40]>>>14,ae=g[2]<<1|g[3]>>>31,Te=g[3]<<1|g[2]>>>31,K=g[12]<<12|g[13]>>>20,nt=g[22]<<10|g[23]>>>22,tt=g[23]<<10|g[22]>>>22,ee=g[33]<<13|g[32]>>>19,ce=g[32]<<13|g[33]>>>19,qt=g[42]<<2|g[43]>>>30,jt=g[43]<<2|g[42]>>>30,st=g[5]<<30|g[4]>>>2,Ye=g[4]<<30|g[5]>>>2,le=g[14]<<6|g[15]>>>26,X=g[15]<<6|g[14]>>>26,o=g[24]<<11|g[25]>>>21,mt=g[34]<<15|g[35]>>>17,ht=g[35]<<15|g[34]>>>17,ue=g[45]<<29|g[44]>>>3,we=g[44]<<29|g[45]>>>3,D=g[6]<<28|g[7]>>>4,N=g[7]<<28|g[6]>>>4,gt=g[17]<<23|g[16]>>>9,St=g[16]<<23|g[17]>>>9,ne=g[26]<<25|g[27]>>>7,pe=g[27]<<25|g[26]>>>7,y=g[36]<<21|g[37]>>>11,M=g[37]<<21|g[36]>>>11,wt=g[47]<<24|g[46]>>>8,Pt=g[46]<<24|g[47]>>>8,me=g[8]<<27|g[9]>>>5,Ee=g[9]<<27|g[8]>>>5,C=g[18]<<20|g[19]>>>12,a=g[19]<<20|g[18]>>>12,Wt=g[29]<<7|g[28]>>>25,dn=g[28]<<7|g[29]>>>25,_e=g[38]<<8|g[39]>>>24,xe=g[39]<<8|g[38]>>>24,v=g[48]<<14|g[49]>>>18,k=g[49]<<14|g[48]>>>18,g[0]=(G=g[0])^~(j=g[13]<<12|g[12]>>>20)&(R=g[25]<<11|g[24]>>>21),g[1]=H^~K&o,g[10]=D^~C&B,g[11]=N^~a&Q,g[20]=ae^~le&ne,g[21]=Te^~X&pe,g[30]=me^~ze&nt,g[31]=Ee^~Ve&tt,g[40]=st^~gt&Wt,g[41]=Ye^~St&dn,g[2]=j^~R&y,g[3]=K^~o&M,g[12]=C^~B&ee,g[13]=a^~Q&ce,g[22]=le^~ne&_e,g[23]=X^~pe&xe,g[32]=ze^~nt&mt,g[33]=Ve^~tt&ht,g[42]=gt^~Wt&Nt,g[43]=St^~dn&It,g[4]=R^~y&v,g[5]=o^~M&k,g[14]=B^~ee&ue,g[15]=Q^~ce&we,g[24]=ne^~_e&Ce,g[25]=pe^~xe&ke,g[34]=nt^~mt&wt,g[35]=tt^~ht&Pt,g[44]=Wt^~Nt&qt,g[45]=dn^~It&jt,g[6]=y^~v&G,g[7]=M^~k&H,g[16]=ee^~ue&D,g[17]=ce^~we&N,g[26]=_e^~Ce&ae,g[27]=xe^~ke&Te,g[36]=mt^~wt&me,g[37]=ht^~Pt&Ee,g[46]=Nt^~qt&st,g[47]=It^~jt&Ye,g[8]=v^~G&j,g[9]=k^~H&K,g[18]=ue^~D&C,g[19]=we^~N&a,g[28]=Ce^~ae&le,g[29]=ke^~Te&X,g[38]=wt^~me&ze,g[39]=Pt^~Ee&Ve,g[48]=qt^~st>,g[49]=jt^~Ye&St,g[0]^=x[h],g[1]^=x[h+1]},T=function(g){return function(b){var l,m,_;if("0x"===b.slice(0,2)){l=[];for(var h=2,u=b.length;h>2]|=_[G]<>2]|=w<>2]|=(192|w>>6)<>2]|=(128|63&w)<=57344?(I[K>>2]|=(224|w>>12)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<>2]|=(240|w>>18)<>2]|=(128|w>>12&63)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<=P){for(m.start=K-P,m.block=I[L],K=0;K>2]|=E[3&K],m.lastByteIndex===P)for(I[0]=I[L],K=1;K>4&15]+O[15&H]+O[H>>12&15]+O[H>>8&15]+O[H>>20&15]+O[H>>16&15]+O[H>>28&15]+O[H>>24&15];R%L==0&&(f(W),K=0)}return"0x"+j}({blocks:[],reset:!0,block:0,start:0,blockCount:1600-((m=g)<<1)>>5,outputBlocks:m>>5,s:(_=[0,0,0,0,0,0,0,0,0,0],[].concat(_,_,_,_,_))},l)}};z.exports={keccak256:T(256),keccak512:T(512),keccak256s:T(256),keccak512s:T(512)}},88645:(z,O,E)=>{"use strict";var d=E(31734),x=E(58320),f=function(w){return new d(w.slice(2),16)},T=function(w){var S="0x"+("0x"===w.slice(0,2)?new d(w.slice(2),16):new d(w,10)).toString("hex");return"0x0"===S?"0x":S},g=function(w){return"string"==typeof w?/^0x/.test(w)?w:"0x"+w:"0x"+new d(w).toString("hex")},b=function(w){return f(w).toNumber()},l=function(w){return function(S,I){return"0x"+f(S)[w](f(I)).toString("hex")}},h=l("add"),u=l("mul"),m=l("div"),_=l("sub");z.exports={toString:function(w){return f(w).toString(10)},fromString:T,toNumber:b,fromNumber:g,toEther:function(w){return b(m(w,T("10000000000")))/1e8},fromEther:function(w){return u(g(Math.floor(1e8*w)),T("10000000000"))},toUint256:function(w){return x.pad(32,w)},add:h,mul:u,div:m,sub:_}},46740:z=>{"use strict";z.exports={encode:function(O){var E=function(x){return(f=x.toString(16)).length%2==0?f:"0"+f;var f},d=function(x,f){return x<56?E(f+x):E(f+E(x).length/2+55)+E(x)};return"0x"+function x(f){if("string"==typeof f){var T=f.slice(2);return(2!=T.length||T>="80"?d(T.length/2,128):"")+T}var g=f.map(x).join("");return d(g.length/2,192)+g}(O)},decode:function(O){var E=2,d=function(){if(E>=O.length)throw"";var g=O.slice(E,E+2);return g<"80"?(E+=2,"0x"+g):g<"c0"?f():T()},x=function(){var g=parseInt(O.slice(E,E+=2),16)%64;return g<56?g:parseInt(O.slice(E,E+=2*(g-55)),16)},f=function(){var g=x();return"0x"+O.slice(E,E+=2*g)},T=function(){for(var g=2*x()+E,b=[];E{"use strict";var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0});var x=E(78179);function f(h){return!("string"!=typeof h||!/^(0x)?[0-9a-f]{512}$/i.test(h)||!/^(0x)?[0-9a-f]{512}$/.test(h)&&!/^(0x)?[0-9A-F]{512}$/.test(h))}function T(h,u){"object"===(0,d.default)(u)&&u.constructor===Uint8Array&&(u=x.bytesToHex(u));for(var m=x.keccak256(u).replace("0x",""),_=0;_<12;_+=4){var w=(parseInt(m.substr(_,2),16)<<8)+parseInt(m.substr(_+2,2),16)&2047,S=1<=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;throw new Error("invalid bloom")}function b(h){return!("string"!=typeof h||!/^(0x)?[0-9a-f]{64}$/i.test(h)||!/^(0x)?[0-9a-f]{64}$/.test(h)&&!/^(0x)?[0-9A-F]{64}$/.test(h))}function l(h){return!("string"!=typeof h||!h.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!h.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}O.isBloom=f,O.isInBloom=T,O.isUserEthereumAddressInBloom=function(h,u){if(!f(h))throw new Error("Invalid bloom given");if(!l(u))throw new Error('Invalid ethereum address given: "'.concat(u,'"'));return T(h,x.padLeft(u,64))},O.isContractAddressInBloom=function(h,u){if(!f(h))throw new Error("Invalid bloom given");if(!l(u))throw new Error('Invalid contract address given: "'.concat(u,'"'));return T(h,u)},O.isTopicInBloom=function(h,u){if(!f(h))throw new Error("Invalid bloom given");if(!b(u))throw new Error("Invalid topic");return T(h,u)},O.isTopic=b,O.isAddress=l},78179:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(34477);function x(T){if(null==T)throw new Error("cannot convert null value to array");if("string"==typeof T){var g=T.match(/^(0x)?[0-9a-fA-F]*$/);if(!g)throw new Error("invalid hexidecimal string");if("0x"!==g[1])throw new Error("hex string must have 0x prefix");(T=T.substring(2)).length%2&&(T="0"+T);for(var b=[],l=0;l=256||parseInt(String(m))!=m)return!1}return!0}(T))return f(new Uint8Array(T));throw new Error("invalid arrayify value")}function f(T){var g=arguments;return void 0!==T.slice||(T.slice=function(){var b=Array.prototype.slice.call(g);return f(new Uint8Array(Array.prototype.slice.apply(T,b)))}),T}O.keccak256=function(T){return"0x"+d.keccak_256(x(T))},O.padLeft=function(T,g){var b=/^0x/i.test(T)||"number"==typeof T,l=g-(T=T.toString().replace(/^0x/i,"")).length+1>=0?g-T.length+1:0;return(b?"0x":"")+new Array(l).join("0")+T},O.bytesToHex=function(T){for(var g=[],b=0;b>>4).toString(16)),g.push((15&T[b]).toString(16));return"0x".concat(g.join("").replace(/^0+/,""))},O.toByteArray=x},34477:(z,O,E)=>{"use strict";z=E.nmd(z);var d,x=E(19142),f=E(28847)(E(3355));!function(){var T="input is invalid type",g="object"===("undefined"==typeof window?"undefined":(0,f.default)(window)),b=g?window:{};b.JS_SHA3_NO_WINDOW&&(g=!1);var l=!g&&"object"===("undefined"==typeof self?"undefined":(0,f.default)(self));!b.JS_SHA3_NO_NODE_JS&&"object"===(void 0===x?"undefined":(0,f.default)(x))&&x.versions&&x.versions.node?b=E.g:l&&(b=self);var h=!b.JS_SHA3_NO_COMMON_JS&&"object"===(0,f.default)(z)&&z.exports,u=E.amdO,m=!b.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,_="0123456789abcdef".split(""),w=[4,1024,262144,67108864],S=[0,8,16,24],I=[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],P=[224,256,384,512],L=[128,256],V=["hex","buffer","arrayBuffer","array","digest"],W={128:168,256:136};!b.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(ue){return"[object Array]"===Object.prototype.toString.call(ue)}),!m||!b.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(ue){return"object"===(0,f.default)(ue)&&ue.buffer&&ue.buffer.constructor===ArrayBuffer});for(var G=function(ue,we,ae){return function(Te){return new Q(ue,we,ue).update(Te)[ae]()}},H=function(ue,we,ae){return function(Te,le){return new Q(ue,we,le).update(Te)[ae]()}},j=function(ue,we,ae){return function(Te,le,X,ne){return M["cshake"+ue].update(Te,le,X,ne)[ae]()}},K=function(ue,we,ae){return function(Te,le,X,ne){return M["kmac"+ue].update(Te,le,X,ne)[ae]()}},R=function(ue,we,ae,Te){for(var le=0;le>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(31&ae)>>3;for(var Te=0;Te<50;++Te)this.s[Te]=0}function ee(ue,we,ae){Q.call(this,ue,we,ae)}Q.prototype.update=function(ue){if(this.finalized)throw new Error("finalize already called");var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}for(var Te,le,X=this.blocks,ne=this.byteCount,pe=ue.length,_e=this.blockCount,xe=0,Ce=this.s;xe>2]|=ue[xe]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|63&le)<=57344?(X[Te>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<=ne){for(this.start=Te-ne,this.block=X[_e],Te=0;Te<_e;++Te)Ce[Te]^=X[Te];ce(Ce),this.reset=!0}else this.start=Te}return this},Q.prototype.encode=function(ue,we){var ae=255&ue,Te=1,le=[ae];for(ae=255&(ue>>=8);ae>0;)le.unshift(ae),ae=255&(ue>>=8),++Te;return we?le.push(Te):le.unshift(Te),this.update(le),le.length},Q.prototype.encodeString=function(ue){var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}var Te=0;if(we)Te=ue.length;else for(var X=0;X=57344?Te+=3:(ne=65536+((1023&ne)<<10|1023&ue.charCodeAt(++X)),Te+=4)}return Te+=this.encode(8*Te),this.update(ue),Te},Q.prototype.bytepad=function(ue,we){for(var ae=this.encode(we),Te=0;Te>2]|=this.padding[3&we],this.lastByteIndex===this.byteCount)for(ue[0]=ue[ae],we=1;we>4&15]+_[15&ue]+_[ue>>12&15]+_[ue>>8&15]+_[ue>>20&15]+_[ue>>16&15]+_[ue>>28&15]+_[ue>>24&15];ne%we==0&&(ce(ae),X=0)}return le&&(pe+=_[(ue=ae[X])>>4&15]+_[15&ue],le>1&&(pe+=_[ue>>12&15]+_[ue>>8&15]),le>2&&(pe+=_[ue>>20&15]+_[ue>>16&15])),pe},Q.prototype.buffer=Q.prototype.arrayBuffer=function(){this.finalize();var ue,we=this.blockCount,ae=this.s,Te=this.outputBlocks,le=this.extraBytes,X=0,ne=0,pe=this.outputBits>>3;ue=le?new ArrayBuffer(Te+1<<2):new ArrayBuffer(pe);for(var _e=new Uint32Array(ue);ne>8&255,_e[ue+2]=we>>16&255,_e[ue+3]=we>>24&255;pe%ae==0&&ce(Te)}return X&&(_e[ue=pe<<2]=255&(we=Te[ne]),X>1&&(_e[ue+1]=we>>8&255),X>2&&(_e[ue+2]=we>>16&255)),_e},(ee.prototype=new Q).finalize=function(){return this.encode(this.outputBits,!0),Q.prototype.finalize.call(this)};var ce=function(ue){var we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Yr,Ln,Bn,$r,Gn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn,Qn,Vi,ar,br,ki,ur,mr,Fr,hi,wi,cs,$i,rs,Xi;for(Te=0;Te<48;Te+=2)le=ue[0]^ue[10]^ue[20]^ue[30]^ue[40],X=ue[1]^ue[11]^ue[21]^ue[31]^ue[41],_e=ue[4]^ue[14]^ue[24]^ue[34]^ue[44],xe=ue[5]^ue[15]^ue[25]^ue[35]^ue[45],Ce=ue[6]^ue[16]^ue[26]^ue[36]^ue[46],ke=ue[7]^ue[17]^ue[27]^ue[37]^ue[47],we=(me=ue[8]^ue[18]^ue[28]^ue[38]^ue[48])^((ne=ue[2]^ue[12]^ue[22]^ue[32]^ue[42])<<1|(pe=ue[3]^ue[13]^ue[23]^ue[33]^ue[43])>>>31),ae=(Ee=ue[9]^ue[19]^ue[29]^ue[39]^ue[49])^(pe<<1|ne>>>31),ue[0]^=we,ue[1]^=ae,ue[10]^=we,ue[11]^=ae,ue[20]^=we,ue[21]^=ae,ue[30]^=we,ue[31]^=ae,ue[40]^=we,ue[41]^=ae,ae=X^(xe<<1|_e>>>31),ue[2]^=we=le^(_e<<1|xe>>>31),ue[3]^=ae,ue[12]^=we,ue[13]^=ae,ue[22]^=we,ue[23]^=ae,ue[32]^=we,ue[33]^=ae,ue[42]^=we,ue[43]^=ae,ae=pe^(ke<<1|Ce>>>31),ue[4]^=we=ne^(Ce<<1|ke>>>31),ue[5]^=ae,ue[14]^=we,ue[15]^=ae,ue[24]^=we,ue[25]^=ae,ue[34]^=we,ue[35]^=ae,ue[44]^=we,ue[45]^=ae,ae=xe^(Ee<<1|me>>>31),ue[6]^=we=_e^(me<<1|Ee>>>31),ue[7]^=ae,ue[16]^=we,ue[17]^=ae,ue[26]^=we,ue[27]^=ae,ue[36]^=we,ue[37]^=ae,ue[46]^=we,ue[47]^=ae,ae=ke^(X<<1|le>>>31),ue[8]^=we=Ce^(le<<1|X>>>31),ue[9]^=ae,ue[18]^=we,ue[19]^=ae,ue[28]^=we,ue[29]^=ae,ue[38]^=we,ue[39]^=ae,ue[48]^=we,ue[49]^=ae,Ve=ue[1],Un=ue[11]<<4|ue[10]>>>28,ir=ue[10]<<4|ue[11]>>>28,Nt=ue[20]<<3|ue[21]>>>29,It=ue[21]<<3|ue[20]>>>29,cs=ue[31]<<9|ue[30]>>>23,$i=ue[30]<<9|ue[31]>>>23,Lr=ue[40]<<18|ue[41]>>>14,Kn=ue[41]<<18|ue[40]>>>14,fn=ue[2]<<1|ue[3]>>>31,$n=ue[3]<<1|ue[2]>>>31,tt=ue[12]<<12|ue[13]>>>20,ts=ue[22]<<10|ue[23]>>>22,Tn=ue[23]<<10|ue[22]>>>22,qt=ue[33]<<13|ue[32]>>>19,jt=ue[32]<<13|ue[33]>>>19,rs=ue[42]<<2|ue[43]>>>30,Xi=ue[43]<<2|ue[42]>>>30,ki=ue[5]<<30|ue[4]>>>2,ur=ue[4]<<30|ue[5]>>>2,Yr=ue[14]<<6|ue[15]>>>26,Ln=ue[15]<<6|ue[14]>>>26,ht=ue[24]<<11|ue[25]>>>21,Qn=ue[34]<<15|ue[35]>>>17,Vi=ue[35]<<15|ue[34]>>>17,Yt=ue[45]<<29|ue[44]>>>3,Wn=ue[44]<<29|ue[45]>>>3,gt=ue[6]<<28|ue[7]>>>4,St=ue[7]<<28|ue[6]>>>4,mr=ue[17]<<23|ue[16]>>>9,Fr=ue[16]<<23|ue[17]>>>9,Bn=ue[26]<<25|ue[27]>>>7,$r=ue[27]<<25|ue[26]>>>7,wt=ue[36]<<21|ue[37]>>>11,Pt=ue[37]<<21|ue[36]>>>11,ar=ue[47]<<24|ue[46]>>>8,br=ue[46]<<24|ue[47]>>>8,sr=ue[8]<<27|ue[9]>>>5,Ii=ue[9]<<27|ue[8]>>>5,Wt=ue[18]<<20|ue[19]>>>12,dn=ue[19]<<20|ue[18]>>>12,hi=ue[29]<<7|ue[28]>>>25,wi=ue[28]<<7|ue[29]>>>25,Gn=ue[38]<<8|ue[39]>>>24,bn=ue[39]<<8|ue[38]>>>24,st=ue[48]<<14|ue[49]>>>18,Ye=ue[49]<<14|ue[48]>>>18,ue[0]=(ze=ue[0])^~(nt=ue[13]<<12|ue[12]>>>20)&(mt=ue[25]<<11|ue[24]>>>21),ue[1]=Ve^~tt&ht,ue[10]=gt^~Wt&Nt,ue[11]=St^~dn&It,ue[20]=fn^~Yr&Bn,ue[21]=$n^~Ln&$r,ue[30]=sr^~Un&ts,ue[31]=Ii^~ir&Tn,ue[40]=ki^~mr&hi,ue[41]=ur^~Fr&wi,ue[2]=nt^~mt&wt,ue[3]=tt^~ht&Pt,ue[12]=Wt^~Nt&qt,ue[13]=dn^~It&jt,ue[22]=Yr^~Bn&Gn,ue[23]=Ln^~$r&bn,ue[32]=Un^~ts&Qn,ue[33]=ir^~Tn&Vi,ue[42]=mr^~hi&cs,ue[43]=Fr^~wi&$i,ue[4]=mt^~wt&st,ue[5]=ht^~Pt&Ye,ue[14]=Nt^~qt&Yt,ue[15]=It^~jt&Wn,ue[24]=Bn^~Gn&Lr,ue[25]=$r^~bn&Kn,ue[34]=ts^~Qn&ar,ue[35]=Tn^~Vi&br,ue[44]=hi^~cs&rs,ue[45]=wi^~$i&Xi,ue[6]=wt^~st&ze,ue[7]=Pt^~Ye&Ve,ue[16]=qt^~Yt>,ue[17]=jt^~Wn&St,ue[26]=Gn^~Lr&fn,ue[27]=bn^~Kn&$n,ue[36]=Qn^~ar&sr,ue[37]=Vi^~br&Ii,ue[46]=cs^~rs&ki,ue[47]=$i^~Xi&ur,ue[8]=st^~ze&nt,ue[9]=Ye^~Ve&tt,ue[18]=Yt^~gt&Wt,ue[19]=Wn^~St&dn,ue[28]=Lr^~fn&Yr,ue[29]=Kn^~$n&Ln,ue[38]=ar^~sr&Un,ue[39]=br^~Ii&ir,ue[48]=rs^~ki&mr,ue[49]=Xi^~ur&Fr,ue[0]^=I[Te],ue[1]^=I[Te+1]};if(h)z.exports=M;else{for(k=0;k{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.keccak512=O.keccak384=O.keccak256=O.keccak224=void 0;var d,x=E(64376),f=E(40890);O.keccak224=(0,f.wrapHash)(x.keccak_224),O.keccak256=((d=(0,f.wrapHash)(x.keccak_256)).create=x.keccak_256.create,d),O.keccak384=(0,f.wrapHash)(x.keccak_384),O.keccak512=(0,f.wrapHash)(x.keccak_512)},86992:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.secp256k1=void 0;var d=E(4158);Object.defineProperty(O,"secp256k1",{enumerable:!0,get:function(){return d.secp256k1}})},40890:(z,O,E)=>{"use strict";z=E.nmd(z);var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.crypto=O.wrapHash=O.equalsBytes=O.hexToBytes=O.bytesToUtf8=O.utf8ToBytes=O.createView=O.concatBytes=O.toHex=O.bytesToHex=O.assertBytes=O.assertBool=void 0;var x,f=(x=E(96822))&&x.__esModule?x:{default:x},T=E(72434);O.assertBool=f.default.bool,O.assertBytes=f.default.bytes;var l,h,u=E(72434);Object.defineProperty(O,"bytesToHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(O,"toHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(O,"concatBytes",{enumerable:!0,get:function(){return u.concatBytes}}),Object.defineProperty(O,"createView",{enumerable:!0,get:function(){return u.createView}}),Object.defineProperty(O,"utf8ToBytes",{enumerable:!0,get:function(){return u.utf8ToBytes}}),O.bytesToUtf8=function(m){if(!(m instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got ".concat((0,d.default)(m)));return(new TextDecoder).decode(m)},O.hexToBytes=function(m){var _=m.startsWith("0x")?m.substring(2):m;return(0,T.hexToBytes)(_)},O.equalsBytes=function(m,_){if(m.length!==_.length)return!1;for(var w=0;w{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.isZeroAddress=O.zeroAddress=O.importPublic=O.privateToAddress=O.privateToPublic=O.publicToAddress=O.pubToAddress=O.isValidPublic=O.isValidPrivate=O.generateAddress2=O.generateAddress=O.isValidChecksumAddress=O.toChecksumAddress=O.isValidAddress=O.Account=void 0;var x,f=(x=E(3894))&&x.__esModule?x:{default:x},T=E(49100),g=E(31439),b=E(23271),l=E(60986),h=E(13464),u=E(39808),m=E(5725),_=E(35513),w=function(){function S(I,P,L,V){void 0===I&&(I=new T.BN(0)),void 0===P&&(P=new T.BN(0)),void 0===L&&(L=l.KECCAK256_RLP),void 0===V&&(V=l.KECCAK256_NULL),this.nonce=I,this.balance=P,this.stateRoot=L,this.codeHash=V,this._validate()}return S.fromAccountData=function(I){var P=I.nonce,L=I.balance,V=I.stateRoot,W=I.codeHash;return new S(P?new T.BN((0,h.toBuffer)(P)):void 0,L?new T.BN((0,h.toBuffer)(L)):void 0,V?(0,h.toBuffer)(V):void 0,W?(0,h.toBuffer)(W):void 0)},S.fromRlpSerializedAccount=function(I){var P=T.rlp.decode(I);if(!Array.isArray(P))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(P)},S.fromValuesArray=function(I){var P=function(H,j){var K="function"==typeof Symbol&&H[Symbol.iterator];if(!K)return H;var R,o,y=K.call(H),M=[];try{for(;(void 0===j||j-- >0)&&!(R=y.next()).done;)M.push(R.value)}catch(v){o={error:v}}finally{try{R&&!R.done&&(K=y.return)&&K.call(y)}finally{if(o)throw o.error}}return M}(I,4),V=P[1],W=P[2],G=P[3];return new S(new T.BN(P[0]),new T.BN(V),W,G)},S.prototype._validate=function(){if(this.nonce.lt(new T.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new T.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},S.prototype.raw=function(){return[(0,_.bnToUnpaddedBuffer)(this.nonce),(0,_.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},S.prototype.serialize=function(){return T.rlp.encode(this.raw())},S.prototype.isContract=function(){return!this.codeHash.equals(l.KECCAK256_NULL)},S.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(l.KECCAK256_NULL)},S}();O.Account=w,O.isValidAddress=function(S){try{(0,m.assertIsString)(S)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(S)},O.toChecksumAddress=function(S,I){(0,m.assertIsHexString)(S);var P=(0,b.stripHexPrefix)(S).toLowerCase(),L="";I&&(L=(0,_.toType)(I,_.TypeOutput.BN).toString()+"0x");for(var V=(0,u.keccakFromString)(L+P).toString("hex"),W="0x",G=0;G=8?W+=P[G].toUpperCase():W+=P[G];return W},O.isValidChecksumAddress=function(S,I){return(0,O.isValidAddress)(S)&&(0,O.toChecksumAddress)(S,I)===S},O.generateAddress=function(S,I){(0,m.assertIsBuffer)(S),(0,m.assertIsBuffer)(I);var P=new T.BN(I);return P.isZero()?(0,u.rlphash)([S,null]).slice(-20):(0,u.rlphash)([S,d.from(P.toArray())]).slice(-20)},O.generateAddress2=function(S,I,P){return(0,m.assertIsBuffer)(S),(0,m.assertIsBuffer)(I),(0,m.assertIsBuffer)(P),(0,f.default)(20===S.length),(0,f.default)(32===I.length),(0,u.keccak256)(d.concat([d.from("ff","hex"),S,I,(0,u.keccak256)(P)])).slice(-20)},O.isValidPrivate=function(S){return(0,g.privateKeyVerify)(S)},O.isValidPublic=function(S,I){return void 0===I&&(I=!1),(0,m.assertIsBuffer)(S),64===S.length?(0,g.publicKeyVerify)(d.concat([d.from([4]),S])):!!I&&(0,g.publicKeyVerify)(S)},O.pubToAddress=function(S,I){return void 0===I&&(I=!1),(0,m.assertIsBuffer)(S),I&&64!==S.length&&(S=d.from((0,g.publicKeyConvert)(S,!1).slice(1))),(0,f.default)(64===S.length),(0,u.keccak)(S).slice(-20)},O.publicToAddress=O.pubToAddress,O.privateToPublic=function(S){return(0,m.assertIsBuffer)(S),d.from((0,g.publicKeyCreate)(S,!1)).slice(1)},O.privateToAddress=function(S){return(0,O.publicToAddress)((0,O.privateToPublic)(S))},O.importPublic=function(S){return(0,m.assertIsBuffer)(S),64!==S.length&&(S=d.from((0,g.publicKeyConvert)(S,!1).slice(1))),S},O.zeroAddress=function(){var S=(0,h.zeros)(20);return(0,h.bufferToHex)(S)},O.isZeroAddress=function(S){try{(0,m.assertIsString)(S)}catch{return!1}return(0,O.zeroAddress)()===S}},41984:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.Address=void 0;var x,f=(x=E(3894))&&x.__esModule?x:{default:x},T=E(49100),g=E(13464),b=E(21968),l=function(){function h(u){(0,f.default)(20===u.length,"Invalid address length"),this.buf=u}return h.zero=function(){return new h((0,g.zeros)(20))},h.fromString=function(u){return(0,f.default)((0,b.isValidAddress)(u),"Invalid address"),new h((0,g.toBuffer)(u))},h.fromPublicKey=function(u){return(0,f.default)(d.isBuffer(u),"Public key should be Buffer"),new h((0,b.pubToAddress)(u))},h.fromPrivateKey=function(u){return(0,f.default)(d.isBuffer(u),"Private key should be Buffer"),new h((0,b.privateToAddress)(u))},h.generate=function(u,m){return(0,f.default)(T.BN.isBN(m)),new h((0,b.generateAddress)(u.buf,m.toArrayLike(d)))},h.generate2=function(u,m,_){return(0,f.default)(d.isBuffer(m)),(0,f.default)(d.isBuffer(_)),new h((0,b.generateAddress2)(u.buf,m,_))},h.prototype.equals=function(u){return this.buf.equals(u.buf)},h.prototype.isZero=function(){return this.equals(h.zero())},h.prototype.isPrecompileOrSystemAddress=function(){var u=new T.BN(this.buf),m=new T.BN(0),_=new T.BN("ffff","hex");return u.gte(m)&&u.lte(_)},h.prototype.toString=function(){return"0x"+this.buf.toString("hex")},h.prototype.toBuffer=function(){return d.from(this.buf)},h}();O.Address=l},13464:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=function(h,u){var m="function"==typeof Symbol&&h[Symbol.iterator];if(!m)return h;var _,w,S=m.call(h),I=[];try{for(;(void 0===u||u-- >0)&&!(_=S.next()).done;)I.push(_.value)}catch(P){w={error:P}}finally{try{_&&!_.done&&(m=S.return)&&m.call(S)}finally{if(w)throw w.error}}return I};Object.defineProperty(O,"__esModule",{value:!0}),O.bufArrToArr=O.arrToBufArr=O.validateNoLeadingZeroes=O.baToJSON=O.toUtf8=O.addHexPrefix=O.toUnsigned=O.fromSigned=O.bufferToHex=O.bufferToInt=O.toBuffer=O.unpadHexString=O.unpadArray=O.unpadBuffer=O.setLengthRight=O.setLengthLeft=O.zeros=O.intToBuffer=O.intToHex=void 0;var f=E(49100),T=E(23271),g=E(5725);O.intToHex=function(h){if(!Number.isSafeInteger(h)||h<0)throw new Error("Received an invalid integer type: ".concat(h));return"0x".concat(h.toString(16))},O.intToBuffer=function(h){var u=(0,O.intToHex)(h);return d.from((0,T.padToEven)(u.slice(2)),"hex")},O.zeros=function(h){return d.allocUnsafe(h).fill(0)};var b=function(h,u,m){var _=(0,O.zeros)(u);return m?h.length0&&"0"===u.toString();)u=(h=h.slice(1))[0];return h};O.unpadBuffer=function(h){return(0,g.assertIsBuffer)(h),l(h)},O.unpadArray=function(h){return(0,g.assertIsArray)(h),l(h)},O.unpadHexString=function(h){return(0,g.assertIsHexString)(h),h=(0,T.stripHexPrefix)(h),l(h)},O.toBuffer=function(h){if(null==h)return d.allocUnsafe(0);if(d.isBuffer(h)||Array.isArray(h)||h instanceof Uint8Array)return d.from(h);if("string"==typeof h){if(!(0,T.isHexString)(h))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(h));return d.from((0,T.padToEven)((0,T.stripHexPrefix)(h)),"hex")}if("number"==typeof h)return(0,O.intToBuffer)(h);if(f.BN.isBN(h)){if(h.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(h));return h.toArrayLike(d)}if(h.toArray)return d.from(h.toArray());if(h.toBuffer)return d.from(h.toBuffer());throw new Error("invalid type")},O.bufferToInt=function(h){return new f.BN((0,O.toBuffer)(h)).toNumber()},O.bufferToHex=function(h){return"0x"+(h=(0,O.toBuffer)(h)).toString("hex")},O.fromSigned=function(h){return new f.BN(h).fromTwos(256)},O.toUnsigned=function(h){return d.from(h.toTwos(256).toArray())},O.addHexPrefix=function(h){return"string"!=typeof h||(0,T.isHexPrefixed)(h)?h:"0x"+h},O.toUtf8=function(h){if((h=(0,T.stripHexPrefix)(h)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return d.from(h.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},O.baToJSON=function(h){if(d.isBuffer(h))return"0x".concat(h.toString("hex"));if(h instanceof Array){for(var u=[],m=0;m=L.length&&(L=void 0),{value:L&&L[G++],done:!L}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(h)),w=_.next();!w.done;w=_.next()){var S=x(w.value,2),P=S[1];if(void 0!==P&&P.length>0&&0===P[0])throw new Error("".concat(S[0]," cannot have leading zeroes, received: ").concat(P.toString("hex")))}}catch(L){u={error:L}}finally{try{w&&!w.done&&(m=_.return)&&m.call(_)}finally{if(u)throw u.error}}},O.arrToBufArr=function h(u){return Array.isArray(u)?u.map(function(m){return h(m)}):d.from(u)},O.bufArrToArr=function h(u){return Array.isArray(u)?u.map(function(m){return h(m)}):Uint8Array.from(u??[])}},60986:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.KECCAK256_RLP=O.KECCAK256_RLP_S=O.KECCAK256_RLP_ARRAY=O.KECCAK256_RLP_ARRAY_S=O.KECCAK256_NULL=O.KECCAK256_NULL_S=O.TWO_POW256=O.MAX_INTEGER=O.MAX_UINT64=void 0;var d=E(29033),x=E(49100);O.MAX_UINT64=new x.BN("ffffffffffffffff",16),O.MAX_INTEGER=new x.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),O.TWO_POW256=new x.BN("10000000000000000000000000000000000000000000000000000000000000000",16),O.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",O.KECCAK256_NULL=d.Buffer.from(O.KECCAK256_NULL_S,"hex"),O.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",O.KECCAK256_RLP_ARRAY=d.Buffer.from(O.KECCAK256_RLP_ARRAY_S,"hex"),O.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",O.KECCAK256_RLP=d.Buffer.from(O.KECCAK256_RLP_S,"hex")},49100:(z,O,E)=>{"use strict";var d=Object.create?function(b,l,h,u){void 0===u&&(u=h);var m=Object.getOwnPropertyDescriptor(l,h);m&&!("get"in m?!l.__esModule:m.writable||m.configurable)||(m={enumerable:!0,get:function(){return l[h]}}),Object.defineProperty(b,u,m)}:function(b,l,h,u){void 0===u&&(u=h),b[u]=l[h]},x=Object.create?function(b,l){Object.defineProperty(b,"default",{enumerable:!0,value:l})}:function(b,l){b.default=l};Object.defineProperty(O,"__esModule",{value:!0}),O.rlp=O.BN=void 0;var f,T=(f=E(31734))&&f.__esModule?f:{default:f};O.BN=T.default;var g=function(b){if(b&&b.__esModule)return b;var l={};if(null!=b)for(var h in b)"default"!==h&&Object.prototype.hasOwnProperty.call(b,h)&&d(l,b,h);return x(l,b),l}(E(6905));O.rlp=g},39808:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.rlphash=O.ripemd160FromArray=O.ripemd160FromString=O.ripemd160=O.sha256FromArray=O.sha256FromString=O.sha256=O.keccakFromArray=O.keccakFromHexString=O.keccakFromString=O.keccak256=O.keccak=void 0;var x=E(8235),f=E(35866),T=E(49100),g=E(13464),b=E(5725);O.keccak=function(u,m){switch(void 0===m&&(m=256),(0,b.assertIsBuffer)(u),m){case 224:return(0,x.keccak224)(u);case 256:return(0,x.keccak256)(u);case 384:return(0,x.keccak384)(u);case 512:return(0,x.keccak512)(u);default:throw new Error("Invald algorithm: keccak".concat(m))}},O.keccak256=function(u){return(0,O.keccak)(u)},O.keccakFromString=function(u,m){void 0===m&&(m=256),(0,b.assertIsString)(u);var _=d.from(u,"utf8");return(0,O.keccak)(_,m)},O.keccakFromHexString=function(u,m){return void 0===m&&(m=256),(0,b.assertIsHexString)(u),(0,O.keccak)((0,g.toBuffer)(u),m)},O.keccakFromArray=function(u,m){return void 0===m&&(m=256),(0,b.assertIsArray)(u),(0,O.keccak)((0,g.toBuffer)(u),m)};var l=function(u){return u=(0,g.toBuffer)(u),f("sha256").update(u).digest()};O.sha256=function(u){return(0,b.assertIsBuffer)(u),l(u)},O.sha256FromString=function(u){return(0,b.assertIsString)(u),l(u)},O.sha256FromArray=function(u){return(0,b.assertIsArray)(u),l(u)};var h=function(u,m){u=(0,g.toBuffer)(u);var _=f("rmd160").update(u).digest();return!0===m?(0,g.setLengthLeft)(_,32):_};O.ripemd160=function(u,m){return(0,b.assertIsBuffer)(u),h(u,m)},O.ripemd160FromString=function(u,m){return(0,b.assertIsString)(u),h(u,m)},O.ripemd160FromArray=function(u,m){return(0,b.assertIsArray)(u),h(u,m)},O.rlphash=function(u){return(0,O.keccak)(T.rlp.encode(u))}},5725:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.assertIsString=O.assertIsArray=O.assertIsBuffer=O.assertIsHexString=void 0;var x=E(23271);O.assertIsHexString=function(f){if(!(0,x.isHexString)(f)){var T="This method only supports 0x-prefixed hex strings but input was: ".concat(f);throw new Error(T)}},O.assertIsBuffer=function(f){if(!d.isBuffer(f)){var T="This method only supports Buffer but input was: ".concat(f);throw new Error(T)}},O.assertIsArray=function(f){if(!Array.isArray(f)){var T="This method only supports number arrays but input was: ".concat(f);throw new Error(T)}},O.assertIsString=function(f){if("string"!=typeof f){var T="This method only supports strings but input was: ".concat(f);throw new Error(T)}}},33062:(z,O,E)=>{"use strict";var d=Object.create?function(T,g,b,l){void 0===l&&(l=b);var h=Object.getOwnPropertyDescriptor(g,b);h&&!("get"in h?!g.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return g[b]}}),Object.defineProperty(T,l,h)}:function(T,g,b,l){void 0===l&&(l=b),T[l]=g[b]},x=function(T,g){for(var b in T)"default"===b||Object.prototype.hasOwnProperty.call(g,b)||d(g,T,b)};Object.defineProperty(O,"__esModule",{value:!0}),O.isHexString=O.getKeys=O.fromAscii=O.fromUtf8=O.toAscii=O.arrayContainsArray=O.getBinarySize=O.padToEven=O.stripHexPrefix=O.isHexPrefixed=void 0,x(E(60986),O),x(E(21968),O),x(E(41984),O),x(E(39808),O),x(E(86081),O),x(E(13464),O),x(E(41677),O),x(E(49100),O),x(E(35513),O);var f=E(23271);Object.defineProperty(O,"isHexPrefixed",{enumerable:!0,get:function(){return f.isHexPrefixed}}),Object.defineProperty(O,"stripHexPrefix",{enumerable:!0,get:function(){return f.stripHexPrefix}}),Object.defineProperty(O,"padToEven",{enumerable:!0,get:function(){return f.padToEven}}),Object.defineProperty(O,"getBinarySize",{enumerable:!0,get:function(){return f.getBinarySize}}),Object.defineProperty(O,"arrayContainsArray",{enumerable:!0,get:function(){return f.arrayContainsArray}}),Object.defineProperty(O,"toAscii",{enumerable:!0,get:function(){return f.toAscii}}),Object.defineProperty(O,"fromUtf8",{enumerable:!0,get:function(){return f.fromUtf8}}),Object.defineProperty(O,"fromAscii",{enumerable:!0,get:function(){return f.fromAscii}}),Object.defineProperty(O,"getKeys",{enumerable:!0,get:function(){return f.getKeys}}),Object.defineProperty(O,"isHexString",{enumerable:!0,get:function(){return f.isHexString}})},23271:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(3355));function f(g){if("string"!=typeof g)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,x.default)(g)));return"0"===g[0]&&"x"===g[1]}function T(g){var b=g;if("string"!=typeof b)throw new Error("[padToEven] value must be type 'string', received ".concat((0,x.default)(b)));return b.length%2&&(b="0".concat(b)),b}Object.defineProperty(O,"__esModule",{value:!0}),O.isHexString=O.getKeys=O.fromAscii=O.fromUtf8=O.toAscii=O.arrayContainsArray=O.getBinarySize=O.padToEven=O.stripHexPrefix=O.isHexPrefixed=void 0,O.isHexPrefixed=f,O.stripHexPrefix=function(g){if("string"!=typeof g)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,x.default)(g)));return f(g)?g.slice(2):g},O.padToEven=T,O.getBinarySize=function(g){if("string"!=typeof g)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat((0,x.default)(g)));return d.byteLength(g,"utf8")},O.arrayContainsArray=function(g,b,l){if(!0!==Array.isArray(g))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,x.default)(g),"'"));if(!0!==Array.isArray(b))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,x.default)(b),"'"));return b[l?"some":"every"](function(h){return g.indexOf(h)>=0})},O.toAscii=function(g){var b="",l=0,h=g.length;for("0x"===g.substring(0,2)&&(l=2);l{"use strict";var d=E(29033).Buffer,x=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.defineProperties=void 0;var f,T=(f=E(3894))&&f.__esModule?f:{default:f},g=E(23271),b=E(49100),l=E(13464);O.defineProperties=function(h,u,m){if(h.raw=[],h._fields=[],h.toJSON=function(w){if(void 0===w&&(w=!1),w){var S={};return h._fields.forEach(function(I){S[I]="0x".concat(h[I].toString("hex"))}),S}return(0,l.baToJSON)(h.raw)},h.serialize=function(){return b.rlp.encode(h.raw)},u.forEach(function(w,S){function I(){return h.raw[S]}function P(L){"00"!==(L=(0,l.toBuffer)(L)).toString("hex")||w.allowZero||(L=d.allocUnsafe(0)),w.allowLess&&w.length?(L=(0,l.unpadBuffer)(L),(0,T.default)(w.length>=L.length,"The field ".concat(w.name," must not have more ").concat(w.length," bytes"))):w.allowZero&&0===L.length||!w.length||(0,T.default)(w.length===L.length,"The field ".concat(w.name," must have byte length of ").concat(w.length)),h.raw[S]=L}h._fields.push(w.name),Object.defineProperty(h,w.name,{enumerable:!0,configurable:!0,get:I,set:P}),w.default&&(h[w.name]=w.default),w.alias&&Object.defineProperty(h,w.alias,{enumerable:!1,configurable:!0,set:P,get:I})}),m)if("string"==typeof m&&(m=d.from((0,g.stripHexPrefix)(m),"hex")),d.isBuffer(m)&&(m=b.rlp.decode(m)),Array.isArray(m)){if(m.length>h._fields.length)throw new Error("wrong number of fields in data");m.forEach(function(w,S){h[h._fields[S]]=(0,l.toBuffer)(w)})}else{if("object"!==(0,x.default)(m))throw new Error("invalid data");var _=Object.keys(m);u.forEach(function(w){-1!==_.indexOf(w.name)&&(h[w.name]=m[w.name]),-1!==_.indexOf(w.alias)&&(h[w.alias]=m[w.alias])})}}},86081:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.hashPersonalMessage=O.isValidSignature=O.fromRpcSig=O.toCompactSig=O.toRpcSig=O.ecrecover=O.ecsign=void 0;var x=E(31439),f=E(49100),T=E(13464),g=E(39808),b=E(5725),l=E(35513);function h(m,_){var w=(0,l.toType)(m,l.TypeOutput.BN);if(w.eqn(0)||w.eqn(1))return(0,l.toType)(m,l.TypeOutput.BN);if(!_)return w.subn(27);var S=(0,l.toType)(_,l.TypeOutput.BN);return w.sub(S.muln(2).addn(35))}function u(m){var _=new f.BN(m);return _.eqn(0)||_.eqn(1)}O.ecsign=function(m,_,w){var S=(0,x.ecdsaSign)(m,_),I=S.signature,P=S.recid,L=d.from(I.slice(0,32)),V=d.from(I.slice(32,64));if(!w||"number"==typeof w){if(w&&!Number.isSafeInteger(w))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:L,s:V,v:w?P+(2*w+35):P+27}}return{r:L,s:V,v:(0,l.toType)(w,l.TypeOutput.BN).muln(2).addn(35).addn(P).toArrayLike(d)}},O.ecrecover=function(m,_,w,S,I){var P=d.concat([(0,T.setLengthLeft)(w,32),(0,T.setLengthLeft)(S,32)],64),L=h(_,I);if(!u(L))throw new Error("Invalid signature v value");var V=(0,x.ecdsaRecover)(P,L.toNumber(),m);return d.from((0,x.publicKeyConvert)(V,!1).slice(1))},O.toRpcSig=function(m,_,w,S){if(!u(h(m,S)))throw new Error("Invalid signature v value");return(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(_,32),(0,T.setLengthLeft)(w,32),(0,T.toBuffer)(m)]))},O.toCompactSig=function(m,_,w,S){if(!u(h(m,S)))throw new Error("Invalid signature v value");var I=(0,l.toType)(m,l.TypeOutput.Number),P=w;return(I>28&&I%2==1||1===I||28===I)&&((P=d.from(w))[0]|=128),(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(_,32),(0,T.setLengthLeft)(P,32)]))},O.fromRpcSig=function(m){var _,w,S,I=(0,T.toBuffer)(m);if(I.length>=65)_=I.slice(0,32),w=I.slice(32,64),S=(0,T.bufferToInt)(I.slice(64));else{if(64!==I.length)throw new Error("Invalid signature length");_=I.slice(0,32),w=I.slice(32,64),S=(0,T.bufferToInt)(I.slice(32,33))>>7,w[0]&=127}return S<27&&(S+=27),{v:S,r:_,s:w}},O.isValidSignature=function(m,_,w,S,I){void 0===S&&(S=!0);var P=new f.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),L=new f.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==_.length||32!==w.length||!u(h(m,I)))return!1;var V=new f.BN(_),W=new f.BN(w);return!(V.isZero()||V.gt(L)||W.isZero()||W.gt(L)||S&&1===W.cmp(P))},O.hashPersonalMessage=function(m){(0,b.assertIsBuffer)(m);var _=d.from("\x19Ethereum Signed Message:\n".concat(m.length),"utf-8");return(0,g.keccak)(d.concat([_,m]))}},35513:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.toType=O.TypeOutput=O.bnToRlp=O.bnToUnpaddedBuffer=O.bnToHex=void 0;var x,l,f=E(49100),T=E(23271),g=E(13464);function b(l){return(0,g.unpadBuffer)(l.toArrayLike(d))}O.bnToHex=function(l){return"0x".concat(l.toString(16))},O.bnToUnpaddedBuffer=b,O.bnToRlp=function(l){return b(l)},(l=x=O.TypeOutput||(O.TypeOutput={}))[l.Number=0]="Number",l[l.BN=1]="BN",l[l.Buffer=2]="Buffer",l[l.PrefixedHexString=3]="PrefixedHexString",O.toType=function(l,h){if(null===l)return null;if(void 0!==l){if("string"==typeof l&&!(0,T.isHexString)(l))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(l));if("number"==typeof l&&!Number.isSafeInteger(l))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var u=(0,g.toBuffer)(l);if(h===x.Buffer)return u;if(h===x.BN)return new f.BN(u);if(h===x.Number){var m=new f.BN(u),_=new f.BN(Number.MAX_SAFE_INTEGER.toString());if(m.gt(_))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return m.toNumber()}return"0x".concat(u.toString("hex"))}}},73303:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.createHashFunction=function(x){return function(f){var T=x();return T.update(f),d.from(T.digest())}}},8235:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(73303),x=E(93135);O.keccak224=d.createHashFunction(function(){return x("keccak224")}),O.keccak256=d.createHashFunction(function(){return x("keccak256")}),O.keccak384=d.createHashFunction(function(){return x("keccak384")}),O.keccak512=d.createHashFunction(function(){return x("keccak512")})},40739:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(75010);O.getRandomBytes=function(x){return new Promise(function(f,T){d(x,function(g,b){g?T(g):f(b)})})},O.getRandomBytesSync=function(x){return d(x)}},31439:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(57902),x=E(40739);O.createPrivateKey=function(){return f=this,b=function(){var l;return function(h,u){var m,_,w,S,I={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return S={next:P(0),throw:P(1),return:P(2)},"function"==typeof Symbol&&(S[Symbol.iterator]=function(){return this}),S;function P(L){return function(V){return function(W){if(m)throw new TypeError("Generator is already executing.");for(;I;)try{if(m=1,_&&(w=2&W[0]?_.return:W[0]?_.throw||((w=_.return)&&w.call(_),0):_.next)&&!(w=w.call(_,W[1])).done)return w;switch(_=0,w&&(W=[2&W[0],w.value]),W[0]){case 0:case 1:w=W;break;case 4:return I.label++,{value:W[1],done:!1};case 5:I.label++,_=W[1],W=[0];continue;case 7:W=I.ops.pop(),I.trys.pop();continue;default:if(!((w=(w=I.trys).length>0&&w[w.length-1])||6!==W[0]&&2!==W[0])){I=0;continue}if(3===W[0]&&(!w||W[1]>w[0]&&W[1]{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(77277),T=new x(0),g=new x(-1),b={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function l(u){var m=u?u.toLowerCase():"ether",_=b[m];if("string"!=typeof _)throw new Error("[ethjs-unit] the unit provided "+u+" doesn't exists, please use the one of the following units "+JSON.stringify(b,null,2));return new x(_,10)}function h(u){if("string"==typeof u){if(!u.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+u+"', should be a number matching (^-?[0-9.]+).");return u}if("number"==typeof u)return String(u);if("object"===(0,d.default)(u)&&u.toString&&(u.toTwos||u.dividedToIntegerBy))return u.toPrecision?String(u.toPrecision()):u.toString(10);throw new Error("while converting number to string, invalid number value '"+u+"' type "+(0,d.default)(u)+".")}z.exports={unitMap:b,numberToString:h,getValueOfUnit:l,fromWei:function(u,m,_){var w=f(u),S=w.lt(T),I=l(m),P=b[m].length-1||1,L=_||{};S&&(w=w.mul(g));for(var V=w.mod(I).toString(10);V.length2)throw new Error("[ethjs-unit] while converting number "+u+" to wei, too many decimal points");var L=P[0],V=P[1];if(L||(L="0"),V||(V="0"),V.length>S)throw new Error("[ethjs-unit] while converting number "+u+" to wei, too many decimal places");for(;V.length{"use strict";var O=Object.prototype.hasOwnProperty,E="~";function d(){}function x(b,l,h){this.fn=b,this.context=l,this.once=h||!1}function f(b,l,h,u,m){if("function"!=typeof h)throw new TypeError("The listener must be a function");var _=new x(h,u||b,m),w=E?E+l:l;return b._events[w]?b._events[w].fn?b._events[w]=[b._events[w],_]:b._events[w].push(_):(b._events[w]=_,b._eventsCount++),b}function T(b,l){0==--b._eventsCount?b._events=new d:delete b._events[l]}function g(){this._events=new d,this._eventsCount=0}Object.create&&(d.prototype=Object.create(null),(new d).__proto__||(E=!1)),g.prototype.eventNames=function(){var b,l,h=[];if(0===this._eventsCount)return h;for(l in b=this._events)O.call(b,l)&&h.push(E?l.slice(1):l);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(b)):h},g.prototype.listeners=function(b){var h=this._events[E?E+b:b];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,m=h.length,_=new Array(m);u{"use strict";var d=E(28847)(E(3355)),x=Object.create||function(L){var V=function(){};return V.prototype=L,new V},f=Object.keys||function(L){var V=[];for(var W in L)Object.prototype.hasOwnProperty.call(L,W)&&V.push(W);return W},T=Function.prototype.bind||function(L){var V=this;return function(){return V.apply(L,arguments)}};function g(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=x(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}z.exports=g,g.EventEmitter=g,g.prototype._events=void 0,g.prototype._maxListeners=void 0;var b,l=10;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),b=0===h.x}catch{b=!1}function u(L){return void 0===L._maxListeners?g.defaultMaxListeners:L._maxListeners}function m(L,V,W,G){var H,j,K;if("function"!=typeof W)throw new TypeError('"listener" argument must be a function');if((j=L._events)?(j.newListener&&(L.emit("newListener",V,W.listener?W.listener:W),j=L._events),K=j[V]):(j=L._events=x(null),L._eventsCount=0),K){if("function"==typeof K?K=j[V]=G?[W,K]:[K,W]:G?K.unshift(W):K.push(W),!K.warned&&(H=u(L))&&H>0&&K.length>H){K.warned=!0;var R=new Error("Possible EventEmitter memory leak detected. "+K.length+' "'+String(V)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');R.name="MaxListenersExceededWarning",R.emitter=L,R.type=V,R.count=K.length,"object"===("undefined"==typeof console?"undefined":(0,d.default)(console))&&console.warn&&console.warn("%s: %s",R.name,R.message)}}else K=j[V]=W,++L._eventsCount;return L}function _(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var L=new Array(arguments.length),V=0;V1&&(V=arguments[1]),V instanceof Error)throw V;var o=new Error('Unhandled "error" event. ('+V+")");throw o.context=V,o}if(!(W=K[L]))return!1;var y="function"==typeof W;switch(G=arguments.length){case 1:!function(M,v,k){if(v)M.call(k);else for(var D=M.length,N=P(M,D),C=0;C=0;j--)if(W[j]===V||W[j].listener===V){K=W[j].listener,H=j;break}if(H<0)return this;0===H?W.shift():function(R,o){for(var y=o,M=y+1,v=R.length;M=0;G--)this.removeListener(L,V[G]);return this},g.prototype.listeners=function(L){return S(this,L,!0)},g.prototype.rawListeners=function(L){return S(this,L,!1)},g.listenerCount=function(L,V){return"function"==typeof L.listenerCount?L.listenerCount(V):I.call(L,V)},g.prototype.listenerCount=I,g.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},27085:(z,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(50807);z.exports=function(f,T,g,b){if(d.isBuffer(f)||(f=d.from(f,"binary")),T&&(d.isBuffer(T)||(T=d.from(T,"binary")),8!==T.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var l=g/8,h=d.alloc(l),u=d.alloc(b||0),m=d.alloc(0);l>0||b>0;){var _=new x;_.update(m),_.update(f),T&&_.update(T),m=_.digest();var w=0;if(l>0){var S=h.length-l;w=Math.min(l,m.length),m.copy(h,S,0,w),l-=w}if(w0){var I=u.length-b,P=Math.min(b,m.length-w);m.copy(u,I,w,w+P),b-=P}}return m.fill(0),{key:h,iv:u}}},48184:(z,O,E)=>{"use strict";var d=E(41493),x=Object.prototype.toString,f=Object.prototype.hasOwnProperty;z.exports=function(T,g,b){if(!d(g))throw new TypeError("iterator must be a function");var l;arguments.length>=3&&(l=b),"[object Array]"===x.call(T)?function(h,u,m){for(var _=0,w=h.length;_{"use strict";var O=Array.prototype.slice,E=Object.prototype.toString;z.exports=function(d){var x=this;if("function"!=typeof x||"[object Function]"!==E.call(x))throw new TypeError("Function.prototype.bind called on incompatible "+x);for(var f,T=O.call(arguments,1),g=Math.max(0,x.length-T.length),b=[],l=0;l{"use strict";var d=E(83161);z.exports=Function.prototype.bind||d},57701:(z,O,E)=>{"use strict";var d,x=E(28847)(E(3355)),f=SyntaxError,T=Function,g=TypeError,b=function(v){try{return T('"use strict"; return ('+v+").constructor;")()}catch{}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch{l=null}var h=function(){throw new g},u=l?function(){try{return h}catch{try{return l(arguments,"callee").get}catch{return h}}}():h,m=E(58489)(),_=Object.getPrototypeOf||function(v){return v.__proto__},w={},S="undefined"==typeof Uint8Array?d:_(Uint8Array),I={"%AggregateError%":"undefined"==typeof AggregateError?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?d:ArrayBuffer,"%ArrayIteratorPrototype%":m?_([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":"undefined"==typeof Atomics?d:Atomics,"%BigInt%":"undefined"==typeof BigInt?d:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?d:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?d:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?d:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":w,"%Int8Array%":"undefined"==typeof Int8Array?d:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?d:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m?_(_([][Symbol.iterator]())):d,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":(0,x.default)(JSON))?JSON:d,"%Map%":"undefined"==typeof Map?d:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m?_((new Map)[Symbol.iterator]()):d,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?d:Promise,"%Proxy%":"undefined"==typeof Proxy?d:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?d:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?d:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m?_((new Set)[Symbol.iterator]()):d,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m?_(""[Symbol.iterator]()):d,"%Symbol%":m?Symbol:d,"%SyntaxError%":f,"%ThrowTypeError%":u,"%TypedArray%":S,"%TypeError%":g,"%Uint8Array%":"undefined"==typeof Uint8Array?d:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?d:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?d:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?d:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?d:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?d:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?d:WeakSet},P=function v(k){var D;if("%AsyncFunction%"===k)D=b("async function () {}");else if("%GeneratorFunction%"===k)D=b("function* () {}");else if("%AsyncGeneratorFunction%"===k)D=b("async function* () {}");else if("%AsyncGenerator%"===k){var N=v("%AsyncGeneratorFunction%");N&&(D=N.prototype)}else if("%AsyncIteratorPrototype%"===k){var C=v("%AsyncGenerator%");C&&(D=_(C.prototype))}return I[k]=D,D},L={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},V=E(3767),W=E(51888),G=V.call(Function.call,Array.prototype.concat),H=V.call(Function.apply,Array.prototype.splice),j=V.call(Function.call,String.prototype.replace),K=V.call(Function.call,String.prototype.slice),R=V.call(Function.call,RegExp.prototype.exec),o=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,y=/\\(\\)?/g,M=function(v,k){var D,N=v;if(W(L,N)&&(N="%"+(D=L[N])[0]+"%"),W(I,N)){var C=I[N];if(C===w&&(C=P(N)),void 0===C&&!k)throw new g("intrinsic "+v+" exists, but is not available. Please file an issue!");return{alias:D,name:N,value:C}}throw new f("intrinsic "+v+" does not exist!")};z.exports=function(v,k){if("string"!=typeof v||0===v.length)throw new g("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof k)throw new g('"allowMissing" argument must be a boolean');if(null===R(/^%?[^%]*%?$/,v))throw new f("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=function(X){var ne=K(X,0,1),pe=K(X,-1);if("%"===ne&&"%"!==pe)throw new f("invalid intrinsic syntax, expected closing `%`");if("%"===pe&&"%"!==ne)throw new f("invalid intrinsic syntax, expected opening `%`");var _e=[];return j(X,o,function(xe,Ce,ke,me){_e[_e.length]=ke?j(me,y,"$1"):Ce||xe}),_e}(v),N=D.length>0?D[0]:"",C=M("%"+N+"%",k),a=C.name,B=C.value,Q=!1,ee=C.alias;ee&&(N=ee[0],H(D,G([0,1],ee)));for(var ce=1,ue=!0;ce=D.length){var le=l(B,we);B=(ue=!!le)&&"get"in le&&!("originalValue"in le.get)?le.get:B[we]}else ue=W(B,we),B=B[we];ue&&!Q&&(I[a]=B)}}return B}},92948:(z,O,E)=>{"use strict";var d;d="undefined"!=typeof window?window:void 0!==E.g?E.g:"undefined"!=typeof self?self:{},z.exports=d},53820:(z,O,E)=>{"use strict";var d=E(57701)("%Object.getOwnPropertyDescriptor%",!0);if(d)try{d([],"length")}catch{d=null}z.exports=d},58489:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x="undefined"!=typeof Symbol&&Symbol,f=E(47027);z.exports=function(){return"function"==typeof x&&"function"==typeof Symbol&&"symbol"===(0,d.default)(x("foo"))&&"symbol"===(0,d.default)(Symbol("bar"))&&f()}},47027:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));z.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===(0,d.default)(Symbol.iterator))return!0;var x={},f=Symbol("test"),T=Object(f);if("string"==typeof f||"[object Symbol]"!==Object.prototype.toString.call(f)||"[object Symbol]"!==Object.prototype.toString.call(T))return!1;for(f in x[f]=42,x)return!1;if("function"==typeof Object.keys&&0!==Object.keys(x).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(x).length)return!1;var g=Object.getOwnPropertySymbols(x);if(1!==g.length||g[0]!==f||!Object.prototype.propertyIsEnumerable.call(x,f))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var b=Object.getOwnPropertyDescriptor(x,f);if(42!==b.value||!0!==b.enumerable)return!1}return!0}},11191:(z,O,E)=>{"use strict";var d=E(47027);z.exports=function(){return d()&&!!Symbol.toStringTag}},51888:(z,O,E)=>{"use strict";var d=E(3767);z.exports=d.call(Function.call,Object.prototype.hasOwnProperty)},22353:(z,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(86505).Transform;function f(T){x.call(this),this._block=d.allocUnsafe(T),this._blockSize=T,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}E(41736)(f,x),f.prototype._transform=function(T,g,b){var l=null;try{this.update(T,g)}catch(h){l=h}b(l)},f.prototype._flush=function(T){var g=null;try{this.push(this.digest())}catch(b){g=b}T(g)},f.prototype.update=function(T,g){if(function(_,w){if(!d.isBuffer(_)&&"string"!=typeof _)throw new TypeError("Data must be a string or a buffer")}(T),this._finalized)throw new Error("Digest already called");d.isBuffer(T)||(T=d.from(T,g));for(var b=this._block,l=0;this._blockOffset+T.length-l>=this._blockSize;){for(var h=this._blockOffset;h0;++u)this._length[u]+=m,(m=this._length[u]/4294967296|0)>0&&(this._length[u]-=4294967296*m);return this},f.prototype._update=function(){throw new Error("_update is not implemented")},f.prototype.digest=function(T){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var g=this._digest();void 0!==T&&(g=g.toString(T)),this._block.fill(0),this._blockOffset=0;for(var b=0;b<4;++b)this._length[b]=0;return g},f.prototype._digest=function(){throw new Error("_digest is not implemented")},z.exports=f},37198:(z,O,E)=>{"use strict";var d=O;d.utils=E(84268),d.common=E(64696),d.sha=E(39310),d.ripemd=E(69294),d.hmac=E(53201),d.sha1=d.sha.sha1,d.sha256=d.sha.sha256,d.sha224=d.sha.sha224,d.sha384=d.sha.sha384,d.sha512=d.sha.sha512,d.ripemd160=d.ripemd.ripemd160},64696:(z,O,E)=>{"use strict";var d=E(84268),x=E(94504);function f(){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}O.BlockHash=f,f.prototype.update=function(T,g){if(T=d.toArray(T,g),this.pending=this.pending?this.pending.concat(T):T,this.pendingTotal+=T.length,this.pending.length>=this._delta8){var b=(T=this.pending).length%this._delta8;this.pending=T.slice(T.length-b,T.length),0===this.pending.length&&(this.pending=null),T=d.join32(T,0,T.length-b,this.endian);for(var l=0;l>>24&255,l[h++]=T>>>16&255,l[h++]=T>>>8&255,l[h++]=255&T}else for(l[h++]=255&T,l[h++]=T>>>8&255,l[h++]=T>>>16&255,l[h++]=T>>>24&255,l[h++]=0,l[h++]=0,l[h++]=0,l[h++]=0,u=8;u{"use strict";var d=E(84268),x=E(94504);function f(T,g,b){if(!(this instanceof f))return new f(T,g,b);this.Hash=T,this.blockSize=T.blockSize/8,this.outSize=T.outSize/8,this.inner=null,this.outer=null,this._init(d.toArray(g,b))}z.exports=f,f.prototype._init=function(T){T.length>this.blockSize&&(T=(new this.Hash).update(T).digest()),x(T.length<=this.blockSize);for(var g=T.length;g{"use strict";var d=E(84268),x=E(64696),f=d.rotl32,T=d.sum32,g=d.sum32_3,b=d.sum32_4,l=x.BlockHash;function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function u(L,V,W,G){return L<=15?V^W^G:L<=31?V&W|~V&G:L<=47?(V|~W)^G:L<=63?V&G|W&~G:V^(W|~G)}function m(L){return L<=15?0:L<=31?1518500249:L<=47?1859775393:L<=63?2400959708:2840853838}function _(L){return L<=15?1352829926:L<=31?1548603684:L<=47?1836072691:L<=63?2053994217:0}d.inherits(h,l),O.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(L,V){for(var W=this.h[0],G=this.h[1],H=this.h[2],j=this.h[3],K=this.h[4],R=W,o=G,y=H,M=j,v=K,k=0;k<80;k++){var D=T(f(b(W,u(k,G,H,j),L[w[k]+V],m(k)),I[k]),K);W=K,K=j,j=f(H,10),H=G,G=D,D=T(f(b(R,u(79-k,o,y,M),L[S[k]+V],_(k)),P[k]),v),R=v,v=M,M=f(y,10),y=o,o=D}D=g(this.h[1],H,M),this.h[1]=g(this.h[2],j,v),this.h[2]=g(this.h[3],K,R),this.h[3]=g(this.h[4],W,o),this.h[4]=g(this.h[0],G,y),this.h[0]=D},h.prototype._digest=function(L){return"hex"===L?d.toHex32(this.h,"little"):d.split32(this.h,"little")};var w=[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],S=[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],I=[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],P=[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]},39310:(z,O,E)=>{"use strict";O.sha1=E(38142),O.sha224=E(14909),O.sha256=E(87682),O.sha384=E(74532),O.sha512=E(36515)},38142:(z,O,E)=>{"use strict";var d=E(84268),x=E(64696),f=E(90070),T=d.rotl32,g=d.sum32,b=d.sum32_5,l=f.ft_1,h=x.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function m(){if(!(this instanceof m))return new m;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}d.inherits(m,h),z.exports=m,m.blockSize=512,m.outSize=160,m.hmacStrength=80,m.padLength=64,m.prototype._update=function(_,w){for(var S=this.W,I=0;I<16;I++)S[I]=_[w+I];for(;I{"use strict";var d=E(84268),x=E(87682);function f(){if(!(this instanceof f))return new f;x.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}d.inherits(f,x),z.exports=f,f.blockSize=512,f.outSize=224,f.hmacStrength=192,f.padLength=64,f.prototype._digest=function(T){return"hex"===T?d.toHex32(this.h.slice(0,7),"big"):d.split32(this.h.slice(0,7),"big")}},87682:(z,O,E)=>{"use strict";var d=E(84268),x=E(64696),f=E(90070),T=E(94504),g=d.sum32,b=d.sum32_4,l=d.sum32_5,h=f.ch32,u=f.maj32,m=f.s0_256,_=f.s1_256,w=f.g0_256,S=f.g1_256,I=x.BlockHash,P=[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 L(){if(!(this instanceof L))return new L;I.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=P,this.W=new Array(64)}d.inherits(L,I),z.exports=L,L.blockSize=512,L.outSize=256,L.hmacStrength=192,L.padLength=64,L.prototype._update=function(V,W){for(var G=this.W,H=0;H<16;H++)G[H]=V[W+H];for(;H{"use strict";var d=E(84268),x=E(36515);function f(){if(!(this instanceof f))return new f;x.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}d.inherits(f,x),z.exports=f,f.blockSize=1024,f.outSize=384,f.hmacStrength=192,f.padLength=128,f.prototype._digest=function(T){return"hex"===T?d.toHex32(this.h.slice(0,12),"big"):d.split32(this.h.slice(0,12),"big")}},36515:(z,O,E)=>{"use strict";var d=E(84268),x=E(64696),f=E(94504),T=d.rotr64_hi,g=d.rotr64_lo,b=d.shr64_hi,l=d.shr64_lo,h=d.sum64,u=d.sum64_hi,m=d.sum64_lo,_=d.sum64_4_hi,w=d.sum64_4_lo,S=d.sum64_5_hi,I=d.sum64_5_lo,P=x.BlockHash,L=[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;P.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=L,this.W=new Array(160)}function W(k,D,N,C,a){var B=k&N^~k&a;return B<0&&(B+=4294967296),B}function G(k,D,N,C,a,B){var Q=D&C^~D&B;return Q<0&&(Q+=4294967296),Q}function H(k,D,N,C,a){var B=k&N^k&a^N&a;return B<0&&(B+=4294967296),B}function j(k,D,N,C,a,B){var Q=D&C^D&B^C&B;return Q<0&&(Q+=4294967296),Q}function K(k,D){var N=T(k,D,28)^T(D,k,2)^T(D,k,7);return N<0&&(N+=4294967296),N}function R(k,D){var N=g(k,D,28)^g(D,k,2)^g(D,k,7);return N<0&&(N+=4294967296),N}function o(k,D){var N=g(k,D,14)^g(k,D,18)^g(D,k,9);return N<0&&(N+=4294967296),N}function y(k,D){var N=T(k,D,1)^T(k,D,8)^b(k,D,7);return N<0&&(N+=4294967296),N}function M(k,D){var N=g(k,D,1)^g(k,D,8)^l(k,D,7);return N<0&&(N+=4294967296),N}function v(k,D){var N=g(k,D,19)^g(D,k,29)^l(k,D,6);return N<0&&(N+=4294967296),N}d.inherits(V,P),z.exports=V,V.blockSize=1024,V.outSize=512,V.hmacStrength=192,V.padLength=128,V.prototype._prepareBlock=function(k,D){for(var N=this.W,C=0;C<32;C++)N[C]=k[D+C];for(;C{"use strict";var d=E(84268).rotr32;function x(g,b,l){return g&b^~g&l}function f(g,b,l){return g&b^g&l^b&l}function T(g,b,l){return g^b^l}O.ft_1=function(g,b,l,h){return 0===g?x(b,l,h):1===g||3===g?T(b,l,h):2===g?f(b,l,h):void 0},O.ch32=x,O.maj32=f,O.p32=T,O.s0_256=function(g){return d(g,2)^d(g,13)^d(g,22)},O.s1_256=function(g){return d(g,6)^d(g,11)^d(g,25)},O.g0_256=function(g){return d(g,7)^d(g,18)^g>>>3},O.g1_256=function(g){return d(g,17)^d(g,19)^g>>>10}},84268:(z,O,E)=>{"use strict";var d=E(94504),x=E(41736);function f(l,h){return 55296==(64512&l.charCodeAt(h))&&!(h<0||h+1>=l.length)&&56320==(64512&l.charCodeAt(h+1))}function T(l){return(l>>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24)>>>0}function g(l){return 1===l.length?"0"+l:l}function b(l){return 7===l.length?"0"+l:6===l.length?"00"+l:5===l.length?"000"+l:4===l.length?"0000"+l:3===l.length?"00000"+l:2===l.length?"000000"+l:1===l.length?"0000000"+l:l}O.inherits=x,O.toArray=function(l,h){if(Array.isArray(l))return l.slice();if(!l)return[];var u=[];if("string"==typeof l)if(h){if("hex"===h)for((l=l.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(l="0"+l),_=0;_>6|192,u[m++]=63&w|128):f(l,_)?(w=65536+((1023&w)<<10)+(1023&l.charCodeAt(++_)),u[m++]=w>>18|240,u[m++]=w>>12&63|128,u[m++]=w>>6&63|128,u[m++]=63&w|128):(u[m++]=w>>12|224,u[m++]=w>>6&63|128,u[m++]=63&w|128)}else for(_=0;_>>0;return w},O.split32=function(l,h){for(var u=new Array(4*l.length),m=0,_=0;m>>24,u[_+1]=w>>>16&255,u[_+2]=w>>>8&255,u[_+3]=255&w):(u[_+3]=w>>>24,u[_+2]=w>>>16&255,u[_+1]=w>>>8&255,u[_]=255&w)}return u},O.rotr32=function(l,h){return l>>>h|l<<32-h},O.rotl32=function(l,h){return l<>>32-h},O.sum32=function(l,h){return l+h>>>0},O.sum32_3=function(l,h,u){return l+h+u>>>0},O.sum32_4=function(l,h,u,m){return l+h+u+m>>>0},O.sum32_5=function(l,h,u,m,_){return l+h+u+m+_>>>0},O.sum64=function(l,h,u,m){var w=m+l[h+1]>>>0;l[h]=(w>>0,l[h+1]=w},O.sum64_hi=function(l,h,u,m){return(h+m>>>0>>0},O.sum64_lo=function(l,h,u,m){return h+m>>>0},O.sum64_4_hi=function(l,h,u,m,_,w,S,I){var P=0,L=h;return P+=(L=L+m>>>0)>>0)>>0)>>0},O.sum64_4_lo=function(l,h,u,m,_,w,S,I){return h+m+w+I>>>0},O.sum64_5_hi=function(l,h,u,m,_,w,S,I,P,L){var V=0,W=h;return V+=(W=W+m>>>0)>>0)>>0)>>0)>>0},O.sum64_5_lo=function(l,h,u,m,_,w,S,I,P,L){return h+m+w+I+L>>>0},O.rotr64_hi=function(l,h,u){return(h<<32-u|l>>>u)>>>0},O.rotr64_lo=function(l,h,u){return(l<<32-u|h>>>u)>>>0},O.shr64_hi=function(l,h,u){return l>>>u},O.shr64_lo=function(l,h,u){return(l<<32-u|h>>>u)>>>0}},29410:(z,O,E)=>{"use strict";var d=E(37198),x=E(96580),f=E(94504);function T(g){if(!(this instanceof T))return new T(g);this.hash=g.hash,this.predResist=!!g.predResist,this.outLen=this.hash.outSize,this.minEntropy=g.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var b=x.toArray(g.entropy,g.entropyEnc||"hex"),l=x.toArray(g.nonce,g.nonceEnc||"hex"),h=x.toArray(g.pers,g.persEnc||"hex");f(b.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(b,l,h)}z.exports=T,T.prototype._init=function(g,b,l){var h=g.concat(b).concat(l);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var u=0;u=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(g.concat(l||[])),this._reseed=1},T.prototype.generate=function(g,b,l,h){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof b&&(h=l,l=b,b=null),l&&(l=x.toArray(l,h||"hex"),this._update(l));for(var u=[];u.length{"use strict";var d=E(29519),x=E(51143),f=z.exports;for(var T in d)d.hasOwnProperty(T)&&(f[T]=d[T]);function g(b){if("string"==typeof b&&(b=x.parse(b)),b.protocol||(b.protocol="https:"),"https:"!==b.protocol)throw new Error('Protocol "'+b.protocol+'" not supported. Expected "https:"');return b}f.request=function(b,l){return b=g(b),d.request.call(this,b,l)},f.get=function(b,l){return b=g(b),d.get.call(this,b,l)}},32996:(z,O,E)=>{"use strict";var d;E(28847)(E(3355)),void 0===(d=function(){return x=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],f=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]),{mapStr:"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645\u062c\u0644 \u062c\u0644\u0627\u0644\u0647\u30ad\u30ed\u30e1\u30fc\u30c8\u30ebrad\u2215s2\u30a8\u30b9\u30af\u30fc\u30c9\u30ad\u30ed\u30b0\u30e9\u30e0\u30ad\u30ed\u30ef\u30c3\u30c8\u30b0\u30e9\u30e0\u30c8\u30f3\u30af\u30eb\u30bc\u30a4\u30ed\u30b5\u30f3\u30c1\u30fc\u30e0\u30d1\u30fc\u30bb\u30f3\u30c8\u30d4\u30a2\u30b9\u30c8\u30eb\u30d5\u30a1\u30e9\u30c3\u30c9\u30d6\u30c3\u30b7\u30a7\u30eb\u30d8\u30af\u30bf\u30fc\u30eb\u30de\u30f3\u30b7\u30e7\u30f3\u30df\u30ea\u30d0\u30fc\u30eb\u30ec\u30f3\u30c8\u30b2\u30f3\u2032\u2032\u2032\u20321\u204410viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)\u222b\u222b\u222b\u222b(\uc624\uc804)(\uc624\ud6c4)\u30a2\u30d1\u30fc\u30c8\u30a2\u30eb\u30d5\u30a1\u30a2\u30f3\u30da\u30a2\u30a4\u30cb\u30f3\u30b0\u30a8\u30fc\u30ab\u30fc\u30ab\u30e9\u30c3\u30c8\u30ab\u30ed\u30ea\u30fc\u30ad\u30e5\u30ea\u30fc\u30ae\u30eb\u30c0\u30fc\u30af\u30ed\u30fc\u30cd\u30b5\u30a4\u30af\u30eb\u30b7\u30ea\u30f3\u30b0\u30d0\u30fc\u30ec\u30eb\u30d5\u30a3\u30fc\u30c8\u30dd\u30a4\u30f3\u30c8\u30de\u30a4\u30af\u30ed\u30df\u30af\u30ed\u30f3\u30e1\u30ac\u30c8\u30f3\u30ea\u30c3\u30c8\u30eb\u30eb\u30fc\u30d6\u30eb\u682a\u5f0f\u4f1a\u793ekcalm\u2215s2c\u2215kg\u0627\u0643\u0628\u0631\u0645\u062d\u0645\u062f\u0635\u0644\u0639\u0645\u0631\u0633\u0648\u0644\u0631\u06cc\u0627\u06441\u204441\u204423\u20444 \u0308\u0301\u0fb2\u0f71\u0f80\u0fb3\u0f71\u0f80 \u0308\u0342 \u0313\u0300 \u0313\u0301 \u0313\u0342 \u0314\u0300 \u0314\u0301 \u0314\u0342 \u0308\u0300\u2035\u2035\u2035a/ca/sc/oc/utelfax1\u204471\u204491\u204432\u204431\u204452\u204453\u204454\u204451\u204465\u204461\u204483\u204485\u204487\u20448xii0\u20443\u222e\u222e\u222e(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)::====(\u1100)(\u1102)(\u1103)(\u1105)(\u1106)(\u1107)(\u1109)(\u110b)(\u110c)(\u110e)(\u110f)(\u1110)(\u1111)(\u1112)(\uac00)(\ub098)(\ub2e4)(\ub77c)(\ub9c8)(\ubc14)(\uc0ac)(\uc544)(\uc790)(\ucc28)(\uce74)(\ud0c0)(\ud30c)(\ud558)(\uc8fc)(\u4e00)(\u4e8c)(\u4e09)(\u56db)(\u4e94)(\u516d)(\u4e03)(\u516b)(\u4e5d)(\u5341)(\u6708)(\u706b)(\u6c34)(\u6728)(\u91d1)(\u571f)(\u65e5)(\u682a)(\u6709)(\u793e)(\u540d)(\u7279)(\u8ca1)(\u795d)(\u52b4)(\u4ee3)(\u547c)(\u5b66)(\u76e3)(\u4f01)(\u8cc7)(\u5354)(\u796d)(\u4f11)(\u81ea)(\u81f3)pte10\u670811\u670812\u6708ergltd\u30a2\u30fc\u30eb\u30a4\u30f3\u30c1\u30a6\u30a9\u30f3\u30aa\u30f3\u30b9\u30aa\u30fc\u30e0\u30ab\u30a4\u30ea\u30ac\u30ed\u30f3\u30ac\u30f3\u30de\u30ae\u30cb\u30fc\u30b1\u30fc\u30b9\u30b3\u30eb\u30ca\u30b3\u30fc\u30dd\u30bb\u30f3\u30c1\u30c0\u30fc\u30b9\u30ce\u30c3\u30c8\u30cf\u30a4\u30c4\u30d1\u30fc\u30c4\u30d4\u30af\u30eb\u30d5\u30e9\u30f3\u30da\u30cb\u30d2\u30d8\u30eb\u30c4\u30da\u30f3\u30b9\u30da\u30fc\u30b8\u30d9\u30fc\u30bf\u30dc\u30eb\u30c8\u30dd\u30f3\u30c9\u30db\u30fc\u30eb\u30db\u30fc\u30f3\u30de\u30a4\u30eb\u30de\u30c3\u30cf\u30de\u30eb\u30af\u30e4\u30fc\u30c9\u30e4\u30fc\u30eb\u30e6\u30a2\u30f3\u30eb\u30d4\u30fc10\u70b911\u70b912\u70b913\u70b914\u70b915\u70b916\u70b917\u70b918\u70b919\u70b920\u70b921\u70b922\u70b923\u70b924\u70b9hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv\u2215ma\u2215m10\u65e511\u65e512\u65e513\u65e514\u65e515\u65e516\u65e517\u65e518\u65e519\u65e520\u65e521\u65e522\u65e523\u65e524\u65e525\u65e526\u65e527\u65e528\u65e529\u65e530\u65e531\u65e5galffiffl\u05e9\u05bc\u05c1\u05e9\u05bc\u05c2 \u064c\u0651 \u064d\u0651 \u064e\u0651 \u064f\u0651 \u0650\u0651 \u0651\u0670\u0640\u064e\u0651\u0640\u064f\u0651\u0640\u0650\u0651\u062a\u062c\u0645\u062a\u062d\u062c\u062a\u062d\u0645\u062a\u062e\u0645\u062a\u0645\u062c\u062a\u0645\u062d\u062a\u0645\u062e\u062c\u0645\u062d\u062d\u0645\u064a\u062d\u0645\u0649\u0633\u062d\u062c\u0633\u062c\u062d\u0633\u062c\u0649\u0633\u0645\u062d\u0633\u0645\u062c\u0633\u0645\u0645\u0635\u062d\u062d\u0635\u0645\u0645\u0634\u062d\u0645\u0634\u062c\u064a\u0634\u0645\u062e\u0634\u0645\u0645\u0636\u062d\u0649\u0636\u062e\u0645\u0637\u0645\u062d\u0637\u0645\u0645\u0637\u0645\u064a\u0639\u062c\u0645\u0639\u0645\u0645\u0639\u0645\u0649\u063a\u0645\u0645\u063a\u0645\u064a\u063a\u0645\u0649\u0641\u062e\u0645\u0642\u0645\u062d\u0642\u0645\u0645\u0644\u062d\u0645\u0644\u062d\u064a\u0644\u062d\u0649\u0644\u062c\u062c\u0644\u062e\u0645\u0644\u0645\u062d\u0645\u062d\u062c\u0645\u062d\u064a\u0645\u062c\u062d\u0645\u062c\u0645\u0645\u062e\u0645\u0645\u062c\u062e\u0647\u0645\u062c\u0647\u0645\u0645\u0646\u062d\u0645\u0646\u062d\u0649\u0646\u062c\u0645\u0646\u062c\u0649\u0646\u0645\u064a\u0646\u0645\u0649\u064a\u0645\u0645\u0628\u062e\u064a\u062a\u062c\u064a\u062a\u062c\u0649\u062a\u062e\u064a\u062a\u062e\u0649\u062a\u0645\u064a\u062a\u0645\u0649\u062c\u0645\u064a\u062c\u062d\u0649\u062c\u0645\u0649\u0633\u062e\u0649\u0635\u062d\u064a\u0634\u062d\u064a\u0636\u062d\u064a\u0644\u062c\u064a\u0644\u0645\u064a\u064a\u062d\u064a\u064a\u062c\u064a\u064a\u0645\u064a\u0645\u0645\u064a\u0642\u0645\u064a\u0646\u062d\u064a\u0639\u0645\u064a\u0643\u0645\u064a\u0646\u062c\u062d\u0645\u062e\u064a\u0644\u062c\u0645\u0643\u0645\u0645\u062c\u062d\u064a\u062d\u062c\u064a\u0645\u062c\u064a\u0641\u0645\u064a\u0628\u062d\u064a\u0633\u062e\u064a\u0646\u062c\u064a\u0635\u0644\u06d2\u0642\u0644\u06d2\u{1d158}\u{1d165}\u{1d16e}\u{1d158}\u{1d165}\u{1d16f}\u{1d158}\u{1d165}\u{1d170}\u{1d158}\u{1d165}\u{1d171}\u{1d158}\u{1d165}\u{1d172}\u{1d1b9}\u{1d165}\u{1d16e}\u{1d1ba}\u{1d165}\u{1d16e}\u{1d1b9}\u{1d165}\u{1d16f}\u{1d1ba}\u{1d165}\u{1d16f}\u3014s\u3015ppv\u3014\u672c\u3015\u3014\u4e09\u3015\u3014\u4e8c\u3015\u3014\u5b89\u3015\u3014\u70b9\u3015\u3014\u6253\u3015\u3014\u76d7\u3015\u3014\u52dd\u3015\u3014\u6557\u3015 \u0304 \u0301 \u0327ssi\u0307ijl\xb7\u02bcnd\u017eljnjdz \u0306 \u0307 \u030a \u0328 \u0303 \u030b \u03b9\u0565\u0582\u0627\u0674\u0648\u0674\u06c7\u0674\u064a\u0674\u0915\u093c\u0916\u093c\u0917\u093c\u091c\u093c\u0921\u093c\u0922\u093c\u092b\u093c\u092f\u093c\u09a1\u09bc\u09a2\u09bc\u09af\u09bc\u0a32\u0a3c\u0a38\u0a3c\u0a16\u0a3c\u0a17\u0a3c\u0a1c\u0a3c\u0a2b\u0a3c\u0b21\u0b3c\u0b22\u0b3c\u0e4d\u0e32\u0ecd\u0eb2\u0eab\u0e99\u0eab\u0ea1\u0f42\u0fb7\u0f4c\u0fb7\u0f51\u0fb7\u0f56\u0fb7\u0f5b\u0fb7\u0f40\u0fb5\u0f71\u0f72\u0f71\u0f74\u0fb2\u0f80\u0fb3\u0f80\u0f92\u0fb7\u0f9c\u0fb7\u0fa1\u0fb7\u0fa6\u0fb7\u0fab\u0fb7\u0f90\u0fb5a\u02be\u1f00\u03b9\u1f01\u03b9\u1f02\u03b9\u1f03\u03b9\u1f04\u03b9\u1f05\u03b9\u1f06\u03b9\u1f07\u03b9\u1f20\u03b9\u1f21\u03b9\u1f22\u03b9\u1f23\u03b9\u1f24\u03b9\u1f25\u03b9\u1f26\u03b9\u1f27\u03b9\u1f60\u03b9\u1f61\u03b9\u1f62\u03b9\u1f63\u03b9\u1f64\u03b9\u1f65\u03b9\u1f66\u03b9\u1f67\u03b9\u1f70\u03b9\u03b1\u03b9\u03ac\u03b9\u1fb6\u03b9 \u0342\u1f74\u03b9\u03b7\u03b9\u03ae\u03b9\u1fc6\u03b9\u1f7c\u03b9\u03c9\u03b9\u03ce\u03b9\u1ff6\u03b9 \u0333!! \u0305???!!?rs\xb0c\xb0fnosmtmivix\u2add\u0338 \u3099 \u309a\u3088\u308a\u30b3\u30c8333435\ucc38\uace0\uc8fc\uc758363738394042444546474849503\u67084\u67085\u67086\u67087\u67088\u67089\u6708hgev\u30ae\u30ac\u30c7\u30b7\u30c9\u30eb\u30ca\u30ce\u30d4\u30b3\u30d3\u30eb\u30da\u30bd\u30db\u30f3\u30ea\u30e9\u30ec\u30e0daauovpciu\u5e73\u6210\u662d\u548c\u5927\u6b63\u660e\u6cbbna\u03bcakakbmbgbpfnf\u03bcf\u03bcgmg\u03bclmldlklfmnm\u03bcmpsns\u03bcsmsnv\u03bcvkvpwnw\u03bcwmwkwk\u03c9m\u03c9bqcccddbgyhainkkktlnlxphprsrsvwbst\u0574\u0576\u0574\u0565\u0574\u056b\u057e\u0576\u0574\u056d\u05d9\u05b4\u05f2\u05b7\u05e9\u05c1\u05e9\u05c2\u05d0\u05b7\u05d0\u05b8\u05d0\u05bc\u05d1\u05bc\u05d2\u05bc\u05d3\u05bc\u05d4\u05bc\u05d5\u05bc\u05d6\u05bc\u05d8\u05bc\u05d9\u05bc\u05da\u05bc\u05db\u05bc\u05dc\u05bc\u05de\u05bc\u05e0\u05bc\u05e1\u05bc\u05e3\u05bc\u05e4\u05bc\u05e6\u05bc\u05e7\u05bc\u05e8\u05bc\u05ea\u05bc\u05d5\u05b9\u05d1\u05bf\u05db\u05bf\u05e4\u05bf\u05d0\u05dc\u0626\u0627\u0626\u06d5\u0626\u0648\u0626\u06c7\u0626\u06c6\u0626\u06c8\u0626\u06d0\u0626\u0649\u0626\u062c\u0626\u062d\u0626\u0645\u0626\u064a\u0628\u062c\u0628\u0645\u0628\u0649\u0628\u064a\u062a\u0649\u062a\u064a\u062b\u062c\u062b\u0645\u062b\u0649\u062b\u064a\u062e\u062d\u0636\u062c\u0636\u0645\u0637\u062d\u0638\u0645\u063a\u062c\u0641\u062c\u0641\u062d\u0641\u0649\u0641\u064a\u0642\u062d\u0642\u0649\u0642\u064a\u0643\u0627\u0643\u062c\u0643\u062d\u0643\u062e\u0643\u0644\u0643\u0649\u0643\u064a\u0646\u062e\u0646\u0649\u0646\u064a\u0647\u062c\u0647\u0649\u0647\u064a\u064a\u0649\u0630\u0670\u0631\u0670\u0649\u0670\u0626\u0631\u0626\u0632\u0626\u0646\u0628\u0632\u0628\u0646\u062a\u0631\u062a\u0632\u062a\u0646\u062b\u0631\u062b\u0632\u062b\u0646\u0645\u0627\u0646\u0631\u0646\u0632\u0646\u0646\u064a\u0631\u064a\u0632\u0626\u062e\u0626\u0647\u0628\u0647\u062a\u0647\u0635\u062e\u0646\u0647\u0647\u0670\u062b\u0647\u0633\u0647\u0634\u0647\u0637\u0649\u0637\u064a\u0639\u0649\u0639\u064a\u063a\u0649\u063a\u064a\u0633\u0649\u0633\u064a\u0634\u0649\u0634\u064a\u0635\u0649\u0635\u064a\u0636\u0649\u0636\u064a\u0634\u062e\u0634\u0631\u0633\u0631\u0635\u0631\u0636\u0631\u0627\u064b \u064b\u0640\u064b\u0640\u0651 \u0652\u0640\u0652\u0644\u0622\u0644\u0623\u0644\u0625\u{1d157}\u{1d165}0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddj\u307b\u304b\u30b3\u30b3\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0135\u0137\u013a\u013c\u013e\u0142\u0144\u0146\u0148\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\xff\u017a\u017c\u0253\u0183\u0185\u0254\u0188\u0256\u0257\u018c\u01dd\u0259\u025b\u0192\u0260\u0263\u0269\u0268\u0199\u026f\u0272\u0275\u01a1\u01a3\u01a5\u0280\u01a8\u0283\u01ad\u0288\u01b0\u028a\u028b\u01b4\u01b6\u0292\u01b9\u01bd\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f5\u0195\u01bf\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u019e\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233\u2c65\u023c\u019a\u2c66\u0242\u0180\u0289\u028c\u0247\u0249\u024b\u024d\u024f\u0266\u0279\u027b\u0281\u0295\u0371\u0373\u02b9\u0377;\u03f3\u03ad\u03af\u03cc\u03cd\u03b2\u03b3\u03b4\u03b5\u03b6\u03b8\u03ba\u03bb\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03ca\u03cb\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef\u03f8\u03fb\u037b\u037c\u037d\u0450\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\u045d\u045e\u045f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561\u0562\u0563\u0564\u0566\u0567\u0568\u0569\u056a\u056c\u056e\u056f\u0570\u0571\u0572\u0573\u0575\u0577\u0578\u0579\u057a\u057b\u057c\u057d\u057f\u0580\u0581\u0583\u0584\u0585\u0586\u0f0b\u2d27\u2d2d\u10dc\u13f0\u13f1\u13f2\u13f3\u13f4\u13f5\ua64b\u0250\u0251\u1d02\u025c\u1d16\u1d17\u1d1d\u1d25\u0252\u0255\u025f\u0261\u0265\u026a\u1d7b\u029d\u026d\u1d85\u029f\u0271\u0270\u0273\u0274\u0278\u0282\u01ab\u1d1c\u0290\u0291\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff\u1f10\u1f11\u1f12\u1f13\u1f14\u1f15\u1f30\u1f31\u1f32\u1f33\u1f34\u1f35\u1f36\u1f37\u1f40\u1f41\u1f42\u1f43\u1f44\u1f45\u1f51\u1f53\u1f55\u1f57\u1fb0\u1fb1\u1f72\u0390\u1fd0\u1fd1\u1f76\u03b0\u1fe0\u1fe1\u1f7a\u1fe5`\u1f78\u2010+\u2212\u2211\u3008\u3009\u2c30\u2c31\u2c32\u2c33\u2c34\u2c35\u2c36\u2c37\u2c38\u2c39\u2c3a\u2c3b\u2c3c\u2c3d\u2c3e\u2c3f\u2c40\u2c41\u2c42\u2c43\u2c44\u2c45\u2c46\u2c47\u2c48\u2c49\u2c4a\u2c4b\u2c4c\u2c4d\u2c4e\u2c4f\u2c50\u2c51\u2c52\u2c53\u2c54\u2c55\u2c56\u2c57\u2c58\u2c59\u2c5a\u2c5b\u2c5c\u2c5d\u2c5e\u2c61\u026b\u1d7d\u027d\u2c68\u2c6a\u2c6c\u2c73\u2c76\u023f\u0240\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2cec\u2cee\u2cf3\u2d61\u6bcd\u9f9f\u4e28\u4e36\u4e3f\u4e59\u4e85\u4ea0\u4eba\u513f\u5165\u5182\u5196\u51ab\u51e0\u51f5\u5200\u529b\u52f9\u5315\u531a\u5338\u535c\u5369\u5382\u53b6\u53c8\u53e3\u56d7\u58eb\u5902\u590a\u5915\u5973\u5b50\u5b80\u5bf8\u5c0f\u5c22\u5c38\u5c6e\u5c71\u5ddb\u5de5\u5df1\u5dfe\u5e72\u5e7a\u5e7f\u5ef4\u5efe\u5f0b\u5f13\u5f50\u5f61\u5f73\u5fc3\u6208\u6236\u624b\u652f\u6534\u6587\u6597\u65a4\u65b9\u65e0\u66f0\u6b20\u6b62\u6b79\u6bb3\u6bcb\u6bd4\u6bdb\u6c0f\u6c14\u722a\u7236\u723b\u723f\u7247\u7259\u725b\u72ac\u7384\u7389\u74dc\u74e6\u7518\u751f\u7528\u7530\u758b\u7592\u7676\u767d\u76ae\u76bf\u76ee\u77db\u77e2\u77f3\u793a\u79b8\u79be\u7a74\u7acb\u7af9\u7c73\u7cf8\u7f36\u7f51\u7f8a\u7fbd\u8001\u800c\u8012\u8033\u807f\u8089\u81e3\u81fc\u820c\u821b\u821f\u826e\u8272\u8278\u864d\u866b\u8840\u884c\u8863\u897e\u898b\u89d2\u8a00\u8c37\u8c46\u8c55\u8c78\u8c9d\u8d64\u8d70\u8db3\u8eab\u8eca\u8f9b\u8fb0\u8fb5\u9091\u9149\u91c6\u91cc\u9577\u9580\u961c\u96b6\u96b9\u96e8\u9751\u975e\u9762\u9769\u97cb\u97ed\u97f3\u9801\u98a8\u98db\u98df\u9996\u9999\u99ac\u9aa8\u9ad8\u9adf\u9b25\u9b2f\u9b32\u9b3c\u9b5a\u9ce5\u9e75\u9e7f\u9ea5\u9ebb\u9ec3\u9ecd\u9ed1\u9ef9\u9efd\u9f0e\u9f13\u9f20\u9f3b\u9f4a\u9f52\u9f8d\u9f9c\u9fa0.\u3012\u5344\u5345\u1101\u11aa\u11ac\u11ad\u1104\u11b0\u11b1\u11b2\u11b3\u11b4\u11b5\u111a\u1108\u1121\u110a\u110d\u1161\u1162\u1163\u1164\u1165\u1166\u1167\u1168\u1169\u116a\u116b\u116c\u116d\u116e\u116f\u1170\u1171\u1172\u1173\u1174\u1175\u1114\u1115\u11c7\u11c8\u11cc\u11ce\u11d3\u11d7\u11d9\u111c\u11dd\u11df\u111d\u111e\u1120\u1122\u1123\u1127\u1129\u112b\u112c\u112d\u112e\u112f\u1132\u1136\u1140\u1147\u114c\u11f1\u11f2\u1157\u1158\u1159\u1184\u1185\u1188\u1191\u1192\u1194\u119e\u11a1\u4e0a\u4e2d\u4e0b\u7532\u4e19\u4e01\u5929\u5730\u554f\u5e7c\u7b8f\uc6b0\u79d8\u7537\u9069\u512a\u5370\u6ce8\u9805\u5199\u5de6\u53f3\u533b\u5b97\u591c\u30c6\u30cc\u30e2\u30e8\u30f0\u30f1\u30f2\ua641\ua643\ua645\ua647\ua649\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua77a\ua77c\u1d79\ua77f\ua781\ua783\ua785\ua787\ua78c\ua791\ua793\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\u026c\u029e\u0287\uab53\ua7b5\ua7b7\uab37\uab52\u13a0\u13a1\u13a2\u13a3\u13a4\u13a5\u13a6\u13a7\u13a8\u13a9\u13aa\u13ab\u13ac\u13ad\u13ae\u13af\u13b0\u13b1\u13b2\u13b3\u13b4\u13b5\u13b6\u13b7\u13b8\u13b9\u13ba\u13bb\u13bc\u13bd\u13be\u13bf\u13c0\u13c1\u13c2\u13c3\u13c4\u13c5\u13c6\u13c7\u13c8\u13c9\u13ca\u13cb\u13cc\u13cd\u13ce\u13cf\u13d0\u13d1\u13d2\u13d3\u13d4\u13d5\u13d6\u13d7\u13d8\u13d9\u13da\u13db\u13dc\u13dd\u13de\u13df\u13e0\u13e1\u13e2\u13e3\u13e4\u13e5\u13e6\u13e7\u13e8\u13e9\u13ea\u13eb\u13ec\u13ed\u13ee\u13ef\u8c48\u66f4\u8cc8\u6ed1\u4e32\u53e5\u5951\u5587\u5948\u61f6\u7669\u7f85\u863f\u87ba\u88f8\u908f\u6a02\u6d1b\u70d9\u73de\u843d\u916a\u99f1\u4e82\u5375\u6b04\u721b\u862d\u9e1e\u5d50\u6feb\u85cd\u8964\u62c9\u81d8\u881f\u5eca\u6717\u6d6a\u72fc\u90ce\u4f86\u51b7\u52de\u64c4\u6ad3\u7210\u76e7\u8606\u865c\u8def\u9732\u9b6f\u9dfa\u788c\u797f\u7da0\u83c9\u9304\u8ad6\u58df\u5f04\u7c60\u807e\u7262\u78ca\u8cc2\u96f7\u58d8\u5c62\u6a13\u6dda\u6f0f\u7d2f\u7e37\u964b\u52d2\u808b\u51dc\u51cc\u7a1c\u7dbe\u83f1\u9675\u8b80\u62cf\u8afe\u4e39\u5be7\u6012\u7387\u7570\u5317\u78fb\u4fbf\u5fa9\u4e0d\u6ccc\u6578\u7d22\u53c3\u585e\u7701\u8449\u8aaa\u6bba\u6c88\u62fe\u82e5\u63a0\u7565\u4eae\u5169\u51c9\u6881\u7ce7\u826f\u8ad2\u91cf\u52f5\u5442\u5eec\u65c5\u6ffe\u792a\u95ad\u9a6a\u9e97\u9ece\u66c6\u6b77\u8f62\u5e74\u6190\u6200\u649a\u6f23\u7149\u7489\u79ca\u7df4\u806f\u8f26\u84ee\u9023\u934a\u5217\u52a3\u54bd\u70c8\u88c2\u5ec9\u5ff5\u637b\u6bae\u7c3e\u7375\u4ee4\u56f9\u5dba\u601c\u73b2\u7469\u7f9a\u8046\u9234\u96f6\u9748\u9818\u4f8b\u79ae\u91b4\u96b8\u60e1\u4e86\u50da\u5bee\u5c3f\u6599\u71ce\u7642\u84fc\u907c\u6688\u962e\u5289\u677b\u67f3\u6d41\u6e9c\u7409\u7559\u786b\u7d10\u985e\u622e\u9678\u502b\u5d19\u6dea\u8f2a\u5f8b\u6144\u6817\u9686\u5229\u540f\u5c65\u6613\u674e\u68a8\u6ce5\u7406\u75e2\u7f79\u88cf\u88e1\u96e2\u533f\u6eba\u541d\u71d0\u7498\u85fa\u96a3\u9c57\u9e9f\u6797\u6dcb\u81e8\u7b20\u7c92\u72c0\u7099\u8b58\u4ec0\u8336\u523a\u5207\u5ea6\u62d3\u7cd6\u5b85\u6d1e\u66b4\u8f3b\u964d\u5ed3\u5140\u55c0\u585a\u6674\u51de\u732a\u76ca\u793c\u795e\u7965\u798f\u9756\u7cbe\u8612\u8af8\u9038\u90fd\u98ef\u98fc\u9928\u9db4\u90de\u96b7\u4fae\u50e7\u514d\u52c9\u52e4\u5351\u559d\u5606\u5668\u5840\u58a8\u5c64\u6094\u6168\u618e\u61f2\u654f\u65e2\u6691\u6885\u6d77\u6e1a\u6f22\u716e\u722b\u7422\u7891\u7949\u7948\u7950\u7956\u798d\u798e\u7a40\u7a81\u7bc0\u7e09\u7e41\u7f72\u8005\u81ed\u8279\u8457\u8910\u8996\u8b01\u8b39\u8cd3\u8d08\u8fb6\u96e3\u97ff\u983b\u6075\u{242ee}\u8218\u4e26\u51b5\u5168\u4f80\u5145\u5180\u52c7\u52fa\u5555\u5599\u55e2\u58b3\u5944\u5954\u5a62\u5b28\u5ed2\u5ed9\u5f69\u5fad\u60d8\u614e\u6108\u6160\u6234\u63c4\u641c\u6452\u6556\u671b\u6756\u6edb\u6ecb\u701e\u77a7\u7235\u72af\u7471\u7506\u753b\u761d\u761f\u76db\u76f4\u774a\u7740\u78cc\u7ab1\u7c7b\u7d5b\u7f3e\u8352\u83ef\u8779\u8941\u8986\u8abf\u8acb\u8aed\u8b8a\u8f38\u9072\u9199\u9276\u967c\u97db\u980b\u9b12\u{2284a}\u{22844}\u{233d5}\u3b9d\u4018\u4039\u{25249}\u{25cd0}\u{27ed3}\u9f43\u9f8e\u05e2\u05dd\u0671\u067b\u067e\u0680\u067a\u067f\u0679\u06a4\u06a6\u0684\u0683\u0686\u0687\u068d\u068c\u068e\u0688\u0698\u0691\u06a9\u06af\u06b3\u06b1\u06ba\u06bb\u06c0\u06c1\u06be\u06d3\u06ad\u06cb\u06c5\u06c9\u3001\u3016\u3017\u2014\u2013_{}\u3010\u3011\u300a\u300b\u300c\u300d\u300e\u300f[]#&*-<>\\$%@\u0621\u0624\u0629\"'^|~\u2985\u2986\u30fb\u30a5\u30e3\xa2\xa3\xac\xa6\xa5\u20a9\u2502\u2190\u2191\u2192\u2193\u25a0\u25cb\u{10428}\u{10429}\u{1042a}\u{1042b}\u{1042c}\u{1042d}\u{1042e}\u{1042f}\u{10430}\u{10431}\u{10432}\u{10433}\u{10434}\u{10435}\u{10436}\u{10437}\u{10438}\u{10439}\u{1043a}\u{1043b}\u{1043c}\u{1043d}\u{1043e}\u{1043f}\u{10440}\u{10441}\u{10442}\u{10443}\u{10444}\u{10445}\u{10446}\u{10447}\u{10448}\u{10449}\u{1044a}\u{1044b}\u{1044c}\u{1044d}\u{1044e}\u{1044f}\u{104d8}\u{104d9}\u{104da}\u{104db}\u{104dc}\u{104dd}\u{104de}\u{104df}\u{104e0}\u{104e1}\u{104e2}\u{104e3}\u{104e4}\u{104e5}\u{104e6}\u{104e7}\u{104e8}\u{104e9}\u{104ea}\u{104eb}\u{104ec}\u{104ed}\u{104ee}\u{104ef}\u{104f0}\u{104f1}\u{104f2}\u{104f3}\u{104f4}\u{104f5}\u{104f6}\u{104f7}\u{104f8}\u{104f9}\u{104fa}\u{104fb}\u{10cc0}\u{10cc1}\u{10cc2}\u{10cc3}\u{10cc4}\u{10cc5}\u{10cc6}\u{10cc7}\u{10cc8}\u{10cc9}\u{10cca}\u{10ccb}\u{10ccc}\u{10ccd}\u{10cce}\u{10ccf}\u{10cd0}\u{10cd1}\u{10cd2}\u{10cd3}\u{10cd4}\u{10cd5}\u{10cd6}\u{10cd7}\u{10cd8}\u{10cd9}\u{10cda}\u{10cdb}\u{10cdc}\u{10cdd}\u{10cde}\u{10cdf}\u{10ce0}\u{10ce1}\u{10ce2}\u{10ce3}\u{10ce4}\u{10ce5}\u{10ce6}\u{10ce7}\u{10ce8}\u{10ce9}\u{10cea}\u{10ceb}\u{10cec}\u{10ced}\u{10cee}\u{10cef}\u{10cf0}\u{10cf1}\u{10cf2}\u{118c0}\u{118c1}\u{118c2}\u{118c3}\u{118c4}\u{118c5}\u{118c6}\u{118c7}\u{118c8}\u{118c9}\u{118ca}\u{118cb}\u{118cc}\u{118cd}\u{118ce}\u{118cf}\u{118d0}\u{118d1}\u{118d2}\u{118d3}\u{118d4}\u{118d5}\u{118d6}\u{118d7}\u{118d8}\u{118d9}\u{118da}\u{118db}\u{118dc}\u{118dd}\u{118de}\u{118df}\u0131\u0237\u2207\u2202\u{1e922}\u{1e923}\u{1e924}\u{1e925}\u{1e926}\u{1e927}\u{1e928}\u{1e929}\u{1e92a}\u{1e92b}\u{1e92c}\u{1e92d}\u{1e92e}\u{1e92f}\u{1e930}\u{1e931}\u{1e932}\u{1e933}\u{1e934}\u{1e935}\u{1e936}\u{1e937}\u{1e938}\u{1e939}\u{1e93a}\u{1e93b}\u{1e93c}\u{1e93d}\u{1e93e}\u{1e93f}\u{1e940}\u{1e941}\u{1e942}\u{1e943}\u066e\u06a1\u066f\u5b57\u53cc\u591a\u89e3\u4ea4\u6620\u7121\u524d\u5f8c\u518d\u65b0\u521d\u7d42\u8ca9\u58f0\u5439\u6f14\u6295\u6355\u904a\u6307\u7981\u7a7a\u5408\u6e80\u7533\u5272\u55b6\u914d\u5f97\u53ef\u4e3d\u4e38\u4e41\u{20122}\u4f60\u4fbb\u5002\u507a\u5099\u50cf\u349e\u{2063a}\u5154\u5164\u5177\u{2051c}\u34b9\u5167\u{2054b}\u5197\u51a4\u4ecc\u51ac\u{291df}\u5203\u34df\u523b\u5246\u5277\u3515\u5305\u5306\u5349\u535a\u5373\u537d\u537f\u{20a2c}\u7070\u53ca\u53df\u{20b63}\u53eb\u53f1\u5406\u549e\u5438\u5448\u5468\u54a2\u54f6\u5510\u5553\u5563\u5584\u55ab\u55b3\u55c2\u5716\u5717\u5651\u5674\u58ee\u57ce\u57f4\u580d\u578b\u5832\u5831\u58ac\u{214e4}\u58f2\u58f7\u5906\u5922\u5962\u{216a8}\u{216ea}\u59ec\u5a1b\u5a27\u59d8\u5a66\u36ee\u5b08\u5b3e\u{219c8}\u5bc3\u5bd8\u5bf3\u{21b18}\u5bff\u5c06\u3781\u5c60\u5cc0\u5c8d\u{21de4}\u5d43\u{21de6}\u5d6e\u5d6b\u5d7c\u5de1\u5de2\u382f\u5dfd\u5e28\u5e3d\u5e69\u3862\u{22183}\u387c\u5eb0\u5eb3\u5eb6\u{2a392}\u{22331}\u8201\u5f22\u38c7\u{232b8}\u{261da}\u5f62\u5f6b\u38e3\u5f9a\u5fcd\u5fd7\u5ff9\u6081\u393a\u391c\u{226d4}\u60c7\u6148\u614c\u617a\u61b2\u61a4\u61af\u61de\u621b\u625d\u62b1\u62d4\u6350\u{22b0c}\u633d\u62fc\u6368\u6383\u63e4\u{22bf1}\u6422\u63c5\u63a9\u3a2e\u6469\u647e\u649d\u6477\u3a6c\u656c\u{2300a}\u65e3\u66f8\u6649\u3b19\u3b08\u3ae4\u5192\u5195\u6700\u669c\u80ad\u43d9\u6721\u675e\u6753\u{233c3}\u3b49\u67fa\u6785\u6852\u{2346d}\u688e\u681f\u6914\u6942\u69a3\u69ea\u6aa8\u{236a3}\u6adb\u3c18\u6b21\u{238a7}\u6b54\u3c4e\u6b72\u6b9f\u6bbb\u{23a8d}\u{21d0b}\u{23afa}\u6c4e\u{23cbc}\u6cbf\u6ccd\u6c67\u6d16\u6d3e\u6d69\u6d78\u6d85\u{23d1e}\u6d34\u6e2f\u6e6e\u3d33\u6ec7\u{23ed1}\u6df9\u6f6e\u{23f5e}\u{23f8e}\u6fc6\u7039\u701b\u3d96\u704a\u707d\u7077\u70ad\u{20525}\u7145\u{24263}\u719c\u7228\u7250\u{24608}\u7280\u7295\u{24735}\u{24814}\u737a\u738b\u3eac\u73a5\u3eb8\u7447\u745c\u7485\u74ca\u3f1b\u7524\u{24c36}\u753e\u{24c92}\u{2219f}\u7610\u{24fa1}\u{24fb8}\u{25044}\u3ffc\u4008\u{250f3}\u{250f2}\u{25119}\u{25133}\u771e\u771f\u778b\u4046\u4096\u{2541d}\u784e\u40e3\u{25626}\u{2569a}\u{256c5}\u79eb\u412f\u7a4a\u7a4f\u{2597c}\u{25aa7}\u4202\u{25bab}\u7bc6\u7bc9\u4227\u{25c80}\u7cd2\u42a0\u7ce8\u7ce3\u7d00\u{25f86}\u7d63\u4301\u7dc7\u7e02\u7e45\u4334\u{26228}\u{26247}\u4359\u{262d9}\u7f7a\u{2633e}\u7f95\u7ffa\u{264da}\u{26523}\u8060\u{265a8}\u8070\u{2335f}\u43d5\u80b2\u8103\u440b\u813e\u5ab5\u{267a7}\u{267b5}\u{23393}\u{2339c}\u8204\u8f9e\u446b\u8291\u828b\u829d\u52b3\u82b1\u82b3\u82bd\u82e6\u{26b3c}\u831d\u8363\u83ad\u8323\u83bd\u83e7\u8353\u83ca\u83cc\u83dc\u{26c36}\u{26d6b}\u{26cd5}\u452b\u84f1\u84f3\u8516\u{273ca}\u8564\u{26f2c}\u455d\u4561\u{26fb1}\u{270d2}\u456b\u8650\u8667\u8669\u86a9\u8688\u870e\u86e2\u8728\u876b\u8786\u87e1\u8801\u45f9\u8860\u{27667}\u88d7\u88de\u4635\u88fa\u34bb\u{278ae}\u{27966}\u46be\u46c7\u8aa0\u{27ca8}\u8cab\u8cc1\u8d1b\u8d77\u{27f2f}\u{20804}\u8dcb\u8dbc\u8df0\u{208de}\u8ed4\u{285d2}\u{285ed}\u9094\u90f1\u9111\u{2872e}\u911b\u9238\u92d7\u92d8\u927c\u93f9\u9415\u{28bfa}\u958b\u4995\u95b7\u{28d77}\u49e6\u96c3\u5db2\u9723\u{29145}\u{2921a}\u4a6e\u4a76\u97e0\u{2940a}\u4ab2\u{29496}\u9829\u{295b6}\u98e2\u4b33\u9929\u99a7\u99c2\u99fe\u4bce\u{29b30}\u9c40\u9cfd\u4cce\u4ced\u9d67\u{2a0ce}\u4cf8\u{2a105}\u{2a20e}\u{2a291}\u4d56\u9efe\u9f05\u9f0f\u9f16\u{2a600}",mapChar:function(T){return T>=196608?T>=917760&&T<=917999?18874368:0:x[f[T>>4]][15&T]}};var x,f}.apply(O,[]))||(z.exports=d)},94489:(z,O,E)=>{"use strict";var d=E(28847)(E(93106));function x(H,j){var K="undefined"!=typeof Symbol&&H[Symbol.iterator]||H["@@iterator"];if(!K){if(Array.isArray(H)||(K=function(k,D){if(k){if("string"==typeof k)return f(k,D);var N=Object.prototype.toString.call(k).slice(8,-1);return"Object"===N&&k.constructor&&(N=k.constructor.name),"Map"===N||"Set"===N?Array.from(k):"Arguments"===N||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)?f(k,D):void 0}}(H))||j&&H&&"number"==typeof H.length){K&&(H=K);var R=0,o=function(){};return{s:o,n:function(){return R>=H.length?{done:!0}:{done:!1,value:H[R++]}},e:function(k){throw k},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y,M=!0,v=!1;return{s:function(){K=K.call(H)},n:function(){var k=K.next();return M=k.done,k},e:function(k){v=!0,y=k},f:function(){try{M||null==K.return||K.return()}finally{if(v)throw y}}}}function f(H,j){(null==j||j>H.length)&&(j=H.length);for(var K=0,R=new Array(j);K= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,_=String.fromCharCode;function w(H){throw new RangeError(u[H])}function S(H,j){var K=H.split("@"),R="";return K.length>1&&(R=K[0]+"@",H=K[1]),R+function(y,M){for(var v=[],k=y.length;k--;)v[k]=M(y[k]);return v}((H=H.replace(h,".")).split("."),j).join(".")}function I(H){for(var j=[],K=0,R=H.length;K=55296&&o<=56319&&K>1,H+=m(H/j);H>455;R+=g)H=m(H/35);return m(R+36*H/(H+38))},V=function(H){var j,K=[],R=H.length,o=0,y=128,M=72,v=H.lastIndexOf("-");v<0&&(v=0);for(var k=0;k=128&&w("not-basic"),K.push(H.charCodeAt(k));for(var D=v>0?v+1:0;D=R&&w("invalid-input");var B=(j=H.charCodeAt(D++))-48<10?j-22:j-65<26?j-65:j-97<26?j-97:g;(B>=g||B>m((T-o)/C))&&w("overflow"),o+=B*C;var Q=a<=M?1:a>=M+26?26:a-M;if(Bm(T/ee)&&w("overflow"),C*=ee}var ce=K.length+1;M=L(o-N,ce,0==N),m(o/ce)>T-y&&w("overflow"),y+=m(o/ce),o%=ce,K.splice(o++,0,y)}return String.fromCodePoint.apply(String,K)},W=function(H){var j,K=[],R=(H=I(H)).length,o=128,y=0,M=72,v=x(H);try{for(v.s();!(j=v.n()).done;){var k=j.value;k<128&&K.push(_(k))}}catch(pe){v.e(pe)}finally{v.f()}var D=K.length,N=D;for(D&&K.push("-");N=o&&Qm((T-y)/ee)&&w("overflow"),y+=(a-o)*ee,o=a;var ce,ue=x(H);try{for(ue.s();!(ce=ue.n()).done;){var we=ce.value;if(weT&&w("overflow"),we==o){for(var ae=y,Te=g;;Te+=g){var le=Te<=M?1:Te>=M+26?26:Te-M;if(ae{"use strict";var d,x;E(28847)(E(3355)),d=[E(94489),E(32996)],void 0===(x=function(f,T){return function(g,b){function l(m,_,w){for(var S=[],I=g.ucs2.decode(m),P=0;P>23,H=W>>21&3,R=b.mapStr.substr(W>>5&65535,31&W);if(0===H||_&&1&G)throw new Error("Illegal char "+V);1===H?S.push(R):2===H?S.push(w?R:V):3===H&&S.push(V)}return S.join("").normalize("NFC")}function h(m,_,w){void 0===w&&(w=!1);var S=l(m,w,_).split(".");return(S=S.map(function(I){return I.startsWith("xn--")?u(I=g.decode(I.substring(4)),w,!1):u(I,w,_),I})).join(".")}function u(m,_,w){if("-"===m[2]&&"-"===m[3])throw new Error("Failed to validate "+m);if(m.startsWith("-")||m.endsWith("-"))throw new Error("Failed to validate "+m);if(m.includes("."))throw new Error("Failed to validate "+m);if(l(m,_,w)!==m)throw new Error("Failed to validate "+m);var S=m.codePointAt(0);if(b.mapChar(S)&2<<23)throw new Error("Label contains illegal character: "+S)}return{toUnicode:function(m,_){return void 0===_&&(_={}),h(m,!1,"useStd3ASCII"in _&&_.useStd3ASCII)},toAscii:function(m,_){void 0===_&&(_={});var w,P="verifyDnsLength"in _&&_.verifyDnsLength,L=h(m,!("transitional"in _)||_.transitional,"useStd3ASCII"in _&&_.useStd3ASCII).split(".").map(g.toASCII),V=L.join(".");if(P){if(V.length<1||V.length>253)throw new Error("DNS name has wrong length: "+V);for(w=0;w63)throw new Error("DNS label has wrong length: "+W)}}return V}}}(f,T)}.apply(O,d))||(z.exports=x)},83226:(z,O)=>{"use strict";O.read=function(E,d,x,f,T){var g,b,l=8*T-f-1,h=(1<>1,m=-7,_=x?T-1:0,w=x?-1:1,S=E[d+_];for(_+=w,g=S&(1<<-m)-1,S>>=-m,m+=l;m>0;g=256*g+E[d+_],_+=w,m-=8);for(b=g&(1<<-m)-1,g>>=-m,m+=f;m>0;b=256*b+E[d+_],_+=w,m-=8);if(0===g)g=1-u;else{if(g===h)return b?NaN:1/0*(S?-1:1);b+=Math.pow(2,f),g-=u}return(S?-1:1)*b*Math.pow(2,g-f)},O.write=function(E,d,x,f,T,g){var b,l,h,u=8*g-T-1,m=(1<>1,w=23===T?Math.pow(2,-24)-Math.pow(2,-77):0,S=f?0:g-1,I=f?1:-1,P=d<0||0===d&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(l=isNaN(d)?1:0,b=m):(b=Math.floor(Math.log(d)/Math.LN2),d*(h=Math.pow(2,-b))<1&&(b--,h*=2),(d+=b+_>=1?w/h:w*Math.pow(2,1-_))*h>=2&&(b++,h/=2),b+_>=m?(l=0,b=m):b+_>=1?(l=(d*h-1)*Math.pow(2,T),b+=_):(l=d*Math.pow(2,_-1)*Math.pow(2,T),b=0));T>=8;E[x+S]=255&l,S+=I,l/=256,T-=8);for(b=b<0;E[x+S]=255&b,S+=I,b/=256,u-=8);E[x+S-I]|=128*P}},41736:z=>{"use strict";z.exports="function"==typeof Object.create?function(O,E){E&&(O.super_=E,O.prototype=Object.create(E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}))}:function(O,E){if(E){O.super_=E;var d=function(){};d.prototype=E.prototype,O.prototype=new d,O.prototype.constructor=O}}},69446:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(11191)(),f=E(80593)("Object.prototype.toString"),T=function(l){return!(x&&l&&"object"===(0,d.default)(l)&&Symbol.toStringTag in l)&&"[object Arguments]"===f(l)},g=function(l){return!!T(l)||null!==l&&"object"===(0,d.default)(l)&&"number"==typeof l.length&&l.length>=0&&"[object Array]"!==f(l)&&"[object Function]"===f(l.callee)},b=function(){return T(arguments)}();T.isLegacyArguments=g,z.exports=b?T:g},41493:(z,O,E)=>{"use strict";var d,x,f=E(28847)(E(3355)),T=Function.prototype.toString,g="object"===("undefined"==typeof Reflect?"undefined":(0,f.default)(Reflect))&&null!==Reflect&&Reflect.apply;if("function"==typeof g&&"function"==typeof Object.defineProperty)try{d=Object.defineProperty({},"length",{get:function(){throw x}}),x={},g(function(){throw 42},null,d)}catch(I){I!==x&&(g=null)}else g=null;var b=/^\s*class\b/,l=function(I){try{var P=T.call(I);return b.test(P)}catch{return!1}},h=function(I){try{return!l(I)&&(T.call(I),!0)}catch{return!1}},u=Object.prototype.toString,m="function"==typeof Symbol&&!!Symbol.toStringTag,_=!(0 in[,]),w=function(){return!1};if("object"===("undefined"==typeof document?"undefined":(0,f.default)(document))){var S=document.all;u.call(S)===u.call(document.all)&&(w=function(I){if((_||!I)&&(void 0===I||"object"===(0,f.default)(I)))try{var P=u.call(I);return("[object HTMLAllCollection]"===P||"[object HTML document.all class]"===P||"[object HTMLCollection]"===P||"[object Object]"===P)&&null==I("")}catch{}return!1})}z.exports=g?function(I){if(w(I))return!0;if(!I||"function"!=typeof I&&"object"!==(0,f.default)(I))return!1;try{g(I,null,d)}catch(P){if(P!==x)return!1}return!l(I)&&h(I)}:function(I){if(w(I))return!0;if(!I||"function"!=typeof I&&"object"!==(0,f.default)(I))return!1;if(m)return h(I);if(l(I))return!1;var P=u.call(I);return!("[object Function]"!==P&&"[object GeneratorFunction]"!==P&&!/^\[object HTML/.test(P))&&h(I)}},27277:z=>{"use strict";z.exports=function(E){if(!E)return!1;var d=O.call(E);return"[object Function]"===d||"function"==typeof E&&"[object RegExp]"!==d||"undefined"!=typeof window&&(E===window.setTimeout||E===window.alert||E===window.confirm||E===window.prompt)};var O=Object.prototype.toString},14477:(z,O,E)=>{"use strict";var d,x=Object.prototype.toString,f=Function.prototype.toString,T=/^\s*(?:function)?\*/,g=E(11191)(),b=Object.getPrototypeOf;z.exports=function(l){if("function"!=typeof l)return!1;if(T.test(f.call(l)))return!0;if(!g)return"[object GeneratorFunction]"===x.call(l);if(!b)return!1;if(void 0===d){var h=function(){if(!g)return!1;try{return Function("return function*() {}")()}catch{}}();d=!!h&&b(h)}return b(l)===d}},8619:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));z.exports=function(x){if("string"!=typeof x)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(0,d.default)(x)+", while checking isHexPrefixed.");return"0x"===x.slice(0,2)}},28915:(z,O,E)=>{"use strict";var d=E(72337);z.exports=function(x){return!!d(x)}},39484:z=>{"use strict";var O={}.toString;z.exports=Array.isArray||function(E){return"[object Array]"==O.call(E)}},24858:(z,O,E)=>{"use strict";z=E.nmd(z);var d=E(19142),x=E(28847)(E(3355));!function(){var f="object"===("undefined"==typeof window?"undefined":(0,x.default)(window))?window:{};!f.JS_SHA3_NO_NODE_JS&&"object"===(void 0===d?"undefined":(0,x.default)(d))&&d.versions&&d.versions.node&&(f=E.g);for(var T=!f.JS_SHA3_NO_COMMON_JS&&"object"===(0,x.default)(z)&&z.exports,g="0123456789abcdef".split(""),b=[0,8,16,24],l=[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],h=[224,256,384,512],u=["hex","buffer","arrayBuffer","array"],m=function(R,o,y){return function(M){return new j(R,o,R).update(M)[y]()}},_=function(R,o,y){return function(M,v){return new j(R,o,v).update(M)[y]()}},w=function(R,o){var y=m(R,o,"hex");y.create=function(){return new j(R,o,R)},y.update=function(k){return y.create().update(k)};for(var M=0;M>5,this.byteCount=this.blockCount<<2,this.outputBlocks=y>>5,this.extraBytes=(31&y)>>3;for(var M=0;M<50;++M)this.s[M]=0}j.prototype.update=function(R){var o="string"!=typeof R;o&&R.constructor===ArrayBuffer&&(R=new Uint8Array(R));for(var y,M,v=R.length,k=this.blocks,D=this.byteCount,N=this.blockCount,C=0,a=this.s;C>2]|=R[C]<>2]|=M<>2]|=(192|M>>6)<>2]|=(128|63&M)<=57344?(k[y>>2]|=(224|M>>12)<>2]|=(128|M>>6&63)<>2]|=(128|63&M)<>2]|=(240|M>>18)<>2]|=(128|M>>12&63)<>2]|=(128|M>>6&63)<>2]|=(128|63&M)<=D){for(this.start=y-D,this.block=k[N],y=0;y>2]|=this.padding[3&o],this.lastByteIndex===this.byteCount)for(R[0]=R[y],o=1;o>4&15]+g[15&R]+g[R>>12&15]+g[R>>8&15]+g[R>>20&15]+g[R>>16&15]+g[R>>28&15]+g[R>>24&15];D%o==0&&(K(y),k=0)}return v&&(R=y[k],v>0&&(N+=g[R>>4&15]+g[15&R]),v>1&&(N+=g[R>>12&15]+g[R>>8&15]),v>2&&(N+=g[R>>20&15]+g[R>>16&15])),N},j.prototype.buffer=j.prototype.arrayBuffer=function(){this.finalize();var R,o=this.blockCount,y=this.s,M=this.outputBlocks,v=this.extraBytes,k=0,D=0,N=this.outputBits>>3;R=v?new ArrayBuffer(M+1<<2):new ArrayBuffer(N);for(var C=new Uint32Array(R);D>8&255,C[R+2]=o>>16&255,C[R+3]=o>>24&255;N%y==0&&K(M)}return k&&(R=N<<2,o=M[D],k>0&&(C[R]=255&o),k>1&&(C[R+1]=o>>8&255),k>2&&(C[R+2]=o>>16&255)),C};var K=function(R){var o,y,M,v,k,D,N,C,a,B,Q,ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Yr,Ln,Bn,$r,Gn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn;for(M=0;M<48;M+=2)v=R[0]^R[10]^R[20]^R[30]^R[40],k=R[1]^R[11]^R[21]^R[31]^R[41],C=R[4]^R[14]^R[24]^R[34]^R[44],a=R[5]^R[15]^R[25]^R[35]^R[45],B=R[6]^R[16]^R[26]^R[36]^R[46],Q=R[7]^R[17]^R[27]^R[37]^R[47],o=(ee=R[8]^R[18]^R[28]^R[38]^R[48])^((D=R[2]^R[12]^R[22]^R[32]^R[42])<<1|(N=R[3]^R[13]^R[23]^R[33]^R[43])>>>31),y=(ce=R[9]^R[19]^R[29]^R[39]^R[49])^(N<<1|D>>>31),R[0]^=o,R[1]^=y,R[10]^=o,R[11]^=y,R[20]^=o,R[21]^=y,R[30]^=o,R[31]^=y,R[40]^=o,R[41]^=y,y=k^(a<<1|C>>>31),R[2]^=o=v^(C<<1|a>>>31),R[3]^=y,R[12]^=o,R[13]^=y,R[22]^=o,R[23]^=y,R[32]^=o,R[33]^=y,R[42]^=o,R[43]^=y,y=N^(Q<<1|B>>>31),R[4]^=o=D^(B<<1|Q>>>31),R[5]^=y,R[14]^=o,R[15]^=y,R[24]^=o,R[25]^=y,R[34]^=o,R[35]^=y,R[44]^=o,R[45]^=y,y=a^(ce<<1|ee>>>31),R[6]^=o=C^(ee<<1|ce>>>31),R[7]^=y,R[16]^=o,R[17]^=y,R[26]^=o,R[27]^=y,R[36]^=o,R[37]^=y,R[46]^=o,R[47]^=y,y=Q^(k<<1|v>>>31),R[8]^=o=B^(v<<1|k>>>31),R[9]^=y,R[18]^=o,R[19]^=y,R[28]^=o,R[29]^=y,R[38]^=o,R[39]^=y,R[48]^=o,R[49]^=y,we=R[1],Yt=R[11]<<4|R[10]>>>28,Wn=R[10]<<4|R[11]>>>28,ze=R[20]<<3|R[21]>>>29,Ve=R[21]<<3|R[20]>>>29,Un=R[31]<<9|R[30]>>>23,ir=R[30]<<9|R[31]>>>23,Nt=R[40]<<18|R[41]>>>14,It=R[41]<<18|R[40]>>>14,wt=R[2]<<1|R[3]>>>31,Pt=R[3]<<1|R[2]>>>31,Te=R[12]<<12|R[13]>>>20,fn=R[22]<<10|R[23]>>>22,$n=R[23]<<10|R[22]>>>22,nt=R[33]<<13|R[32]>>>19,tt=R[32]<<13|R[33]>>>19,ts=R[42]<<2|R[43]>>>30,Tn=R[43]<<2|R[42]>>>30,Gn=R[5]<<30|R[4]>>>2,bn=R[4]<<30|R[5]>>>2,st=R[14]<<6|R[15]>>>26,Ye=R[15]<<6|R[14]>>>26,X=R[24]<<11|R[25]>>>21,Yr=R[34]<<15|R[35]>>>17,Ln=R[35]<<15|R[34]>>>17,mt=R[45]<<29|R[44]>>>3,ht=R[44]<<29|R[45]>>>3,Ce=R[6]<<28|R[7]>>>4,ke=R[7]<<28|R[6]>>>4,Lr=R[17]<<23|R[16]>>>9,Kn=R[16]<<23|R[17]>>>9,gt=R[26]<<25|R[27]>>>7,St=R[27]<<25|R[26]>>>7,ne=R[36]<<21|R[37]>>>11,pe=R[37]<<21|R[36]>>>11,Bn=R[47]<<24|R[46]>>>8,$r=R[46]<<24|R[47]>>>8,qt=R[8]<<27|R[9]>>>5,jt=R[9]<<27|R[8]>>>5,me=R[18]<<20|R[19]>>>12,Ee=R[19]<<20|R[18]>>>12,sr=R[29]<<7|R[28]>>>25,Ii=R[28]<<7|R[29]>>>25,Wt=R[38]<<8|R[39]>>>24,dn=R[39]<<8|R[38]>>>24,_e=R[48]<<14|R[49]>>>18,xe=R[49]<<14|R[48]>>>18,R[0]=(ue=R[0])^~(ae=R[13]<<12|R[12]>>>20)&(le=R[25]<<11|R[24]>>>21),R[1]=we^~Te&X,R[10]=Ce^~me&ze,R[11]=ke^~Ee&Ve,R[20]=wt^~st>,R[21]=Pt^~Ye&St,R[30]=qt^~Yt&fn,R[31]=jt^~Wn&$n,R[40]=Gn^~Lr&sr,R[41]=bn^~Kn&Ii,R[2]=ae^~le&ne,R[3]=Te^~X&pe,R[12]=me^~ze&nt,R[13]=Ee^~Ve&tt,R[22]=st^~gt&Wt,R[23]=Ye^~St&dn,R[32]=Yt^~fn&Yr,R[33]=Wn^~$n&Ln,R[42]=Lr^~sr&Un,R[43]=Kn^~Ii&ir,R[4]=le^~ne&_e,R[5]=X^~pe&xe,R[14]=ze^~nt&mt,R[15]=Ve^~tt&ht,R[24]=gt^~Wt&Nt,R[25]=St^~dn&It,R[34]=fn^~Yr&Bn,R[35]=$n^~Ln&$r,R[44]=sr^~Un&ts,R[45]=Ii^~ir&Tn,R[6]=ne^~_e&ue,R[7]=pe^~xe&we,R[16]=nt^~mt&Ce,R[17]=tt^~ht&ke,R[26]=Wt^~Nt&wt,R[27]=dn^~It&Pt,R[36]=Yr^~Bn&qt,R[37]=Ln^~$r&jt,R[46]=Un^~ts&Gn,R[47]=ir^~Tn&bn,R[8]=_e^~ue&ae,R[9]=xe^~we&Te,R[18]=mt^~Ce&me,R[19]=ht^~ke&Ee,R[28]=Nt^~wt&st,R[29]=It^~Pt&Ye,R[38]=Bn^~qt&Yt,R[39]=$r^~jt&Wn,R[48]=ts^~Gn&Lr,R[49]=Tn^~bn&Kn,R[0]^=l[M],R[1]^=l[M+1]};if(T)z.exports=I;else for(L=0;L{"use strict";z.exports=E(22109)(E(80801))},22109:(z,O,E)=>{"use strict";var d=E(46543),x=E(40274);z.exports=function(f){var T=d(f),g=x(f);return function(b,l){switch("string"==typeof b?b.toLowerCase():b){case"keccak224":return new T(1152,448,null,224,l);case"keccak256":return new T(1088,512,null,256,l);case"keccak384":return new T(832,768,null,384,l);case"keccak512":return new T(576,1024,null,512,l);case"sha3-224":return new T(1152,448,6,224,l);case"sha3-256":return new T(1088,512,6,256,l);case"sha3-384":return new T(832,768,6,384,l);case"sha3-512":return new T(576,1024,6,512,l);case"shake128":return new g(1344,256,31,l);case"shake256":return new g(1088,512,31,l);default:throw new Error("Invald algorithm: "+b)}}}},46543:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(69721)),T=x(E(58985)),g=x(E(15163)),b=x(E(34650)),l=x(E(21949)),h=E(86505).Transform;z.exports=function(u){return function(m){(0,g.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,l.default)(_);if(w){var V=(0,l.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,b.default)(this,P)});function I(P,L,V,W,G){var H;return(0,f.default)(this,I),(H=S.call(this,G))._rate=P,H._capacity=L,H._delimitedSuffix=V,H._hashBitLength=W,H._options=G,H._state=new u,H._state.initialize(P,L),H._finalized=!1,H}return(0,T.default)(I,[{key:"_transform",value:function(P,L,V){var W=null;try{this.update(P,L)}catch(G){W=G}V(W)}},{key:"_flush",value:function(P){var L=null;try{this.push(this.digest())}catch(V){L=V}P(L)}},{key:"update",value:function(P,L){if(!d.isBuffer(P)&&"string"!=typeof P)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return d.isBuffer(P)||(P=d.from(P,L)),this._state.absorb(P),this}},{key:"digest",value:function(P){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var L=this._state.squeeze(this._hashBitLength/8);return void 0!==P&&(L=L.toString(P)),this._resetState(),L}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var P=new I(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(P._state),P._finalized=this._finalized,P}}]),I}(h)}},40274:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(69721)),T=x(E(58985)),g=x(E(15163)),b=x(E(34650)),l=x(E(21949)),h=E(86505).Transform;z.exports=function(u){return function(m){(0,g.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,l.default)(_);if(w){var V=(0,l.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,b.default)(this,P)});function I(P,L,V,W){var G;return(0,f.default)(this,I),(G=S.call(this,W))._rate=P,G._capacity=L,G._delimitedSuffix=V,G._options=W,G._state=new u,G._state.initialize(P,L),G._finalized=!1,G}return(0,T.default)(I,[{key:"_transform",value:function(P,L,V){var W=null;try{this.update(P,L)}catch(G){W=G}V(W)}},{key:"_flush",value:function(){}},{key:"_read",value:function(P){this.push(this.squeeze(P))}},{key:"update",value:function(P,L){if(!d.isBuffer(P)&&"string"!=typeof P)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return d.isBuffer(P)||(P=d.from(P,L)),this._state.absorb(P),this}},{key:"squeeze",value:function(P,L){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var V=this._state.squeeze(P);return void 0!==L&&(V=V.toString(L)),V}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var P=new I(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(P._state),P._finalized=this._finalized,P}}]),I}(h)}},25612:(z,O)=>{"use strict";var E=[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];O.p1600=function(d){for(var x=0;x<24;++x){var f=d[0]^d[10]^d[20]^d[30]^d[40],T=d[1]^d[11]^d[21]^d[31]^d[41],g=d[2]^d[12]^d[22]^d[32]^d[42],b=d[3]^d[13]^d[23]^d[33]^d[43],l=d[4]^d[14]^d[24]^d[34]^d[44],h=d[5]^d[15]^d[25]^d[35]^d[45],u=d[6]^d[16]^d[26]^d[36]^d[46],m=d[7]^d[17]^d[27]^d[37]^d[47],_=d[8]^d[18]^d[28]^d[38]^d[48],w=d[9]^d[19]^d[29]^d[39]^d[49],S=_^(g<<1|b>>>31),I=w^(b<<1|g>>>31),P=d[0]^S,L=d[1]^I,V=d[10]^S,W=d[11]^I,G=d[20]^S,H=d[21]^I,j=d[30]^S,K=d[31]^I,R=d[40]^S,o=d[41]^I,y=d[2]^(S=f^(l<<1|h>>>31)),M=d[3]^(I=T^(h<<1|l>>>31)),v=d[12]^S,k=d[13]^I,D=d[22]^S,N=d[23]^I,C=d[32]^S,a=d[33]^I,B=d[42]^S,Q=d[43]^I,ee=d[4]^(S=g^(u<<1|m>>>31)),ce=d[5]^(I=b^(m<<1|u>>>31)),ue=d[14]^S,we=d[15]^I,ae=d[24]^S,Te=d[25]^I,le=d[34]^S,X=d[35]^I,ne=d[44]^S,pe=d[45]^I,_e=d[6]^(S=l^(_<<1|w>>>31)),xe=d[7]^(I=h^(w<<1|_>>>31)),Ce=d[16]^S,ke=d[17]^I,me=d[26]^S,Ee=d[27]^I,ze=d[36]^S,Ve=d[37]^I,nt=d[46]^S,tt=d[47]^I,mt=d[8]^(S=u^(f<<1|T>>>31)),ht=d[9]^(I=m^(T<<1|f>>>31)),wt=d[18]^S,Pt=d[19]^I,st=d[28]^S,Ye=d[29]^I,gt=d[38]^S,St=d[39]^I,Wt=d[48]^S,dn=d[49]^I,Nt=P,It=L,qt=W<<4|V>>>28,jt=V<<4|W>>>28,Yt=G<<3|H>>>29,Wn=H<<3|G>>>29,fn=K<<9|j>>>23,$n=j<<9|K>>>23,Yr=R<<18|o>>>14,Ln=o<<18|R>>>14,Bn=y<<1|M>>>31,$r=M<<1|y>>>31,Gn=k<<12|v>>>20,bn=v<<12|k>>>20,Lr=D<<10|N>>>22,Kn=N<<10|D>>>22,sr=a<<13|C>>>19,Ii=C<<13|a>>>19,Un=B<<2|Q>>>30,ir=Q<<2|B>>>30,ts=ce<<30|ee>>>2,Tn=ee<<30|ce>>>2,Qn=ue<<6|we>>>26,Vi=we<<6|ue>>>26,ar=Te<<11|ae>>>21,br=ae<<11|Te>>>21,ki=le<<15|X>>>17,ur=X<<15|le>>>17,mr=pe<<29|ne>>>3,Fr=ne<<29|pe>>>3,hi=_e<<28|xe>>>4,wi=xe<<28|_e>>>4,cs=ke<<23|Ce>>>9,$i=Ce<<23|ke>>>9,rs=me<<25|Ee>>>7,Xi=Ee<<25|me>>>7,$s=ze<<21|Ve>>>11,is=Ve<<21|ze>>>11,go=tt<<24|nt>>>8,ji=nt<<24|tt>>>8,so=mt<<27|ht>>>5,oo=ht<<27|mt>>>5,zo=wt<<20|Pt>>>12,Wi=Pt<<20|wt>>>12,bo=Ye<<7|st>>>25,_s=st<<7|Ye>>>25,Ao=gt<<8|St>>>24,zi=St<<8|gt>>>24,Ms=Wt<<14|dn>>>18,Oi=dn<<14|Wt>>>18;d[0]=Nt^~Gn&ar,d[1]=It^~bn&br,d[10]=hi^~zo&Yt,d[11]=wi^~Wi&Wn,d[20]=Bn^~Qn&rs,d[21]=$r^~Vi&Xi,d[30]=so^~qt&Lr,d[31]=oo^~jt&Kn,d[40]=ts^~cs&bo,d[41]=Tn^~$i&_s,d[2]=Gn^~ar&$s,d[3]=bn^~br&is,d[12]=zo^~Yt&sr,d[13]=Wi^~Wn&Ii,d[22]=Qn^~rs&Ao,d[23]=Vi^~Xi&zi,d[32]=qt^~Lr&ki,d[33]=jt^~Kn&ur,d[42]=cs^~bo&fn,d[43]=$i^~_s&$n,d[4]=ar^~$s&Ms,d[5]=br^~is&Oi,d[14]=Yt^~sr&mr,d[15]=Wn^~Ii&Fr,d[24]=rs^~Ao&Yr,d[25]=Xi^~zi&Ln,d[34]=Lr^~ki&go,d[35]=Kn^~ur&ji,d[44]=bo^~fn&Un,d[45]=_s^~$n&ir,d[6]=$s^~Ms&Nt,d[7]=is^~Oi&It,d[16]=sr^~mr&hi,d[17]=Ii^~Fr&wi,d[26]=Ao^~Yr&Bn,d[27]=zi^~Ln&$r,d[36]=ki^~go&so,d[37]=ur^~ji&oo,d[46]=fn^~Un&ts,d[47]=$n^~ir&Tn,d[8]=Ms^~Nt&Gn,d[9]=Oi^~It&bn,d[18]=mr^~hi&zo,d[19]=Fr^~wi&Wi,d[28]=Yr^~Bn&Qn,d[29]=Ln^~$r&Vi,d[38]=go^~so&qt,d[39]=ji^~oo&jt,d[48]=Un^~ts&cs,d[49]=ir^~Tn&$i,d[0]^=E[2*x],d[1]^=E[2*x+1]}}},80801:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(25612);function f(){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}f.prototype.initialize=function(T,g){for(var b=0;b<50;++b)this.state[b]=0;this.blockSize=T/8,this.count=0,this.squeezing=!1},f.prototype.absorb=function(T){for(var g=0;g>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(x.p1600(this.state),this.count=0);return g},f.prototype.copy=function(T){for(var g=0;g<50;++g)T.state[g]=this.state[g];T.blockSize=this.blockSize,T.count=this.count,T.squeezing=this.squeezing},z.exports=f},50807:(z,O,E)=>{"use strict";var d=E(41736),x=E(22353),f=E(48850).Buffer,T=new Array(16);function g(){x.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function b(_,w){return _<>>32-w}function l(_,w,S,I,P,L,V){return b(_+(w&S|~w&I)+P+L|0,V)+w|0}function h(_,w,S,I,P,L,V){return b(_+(w&I|S&~I)+P+L|0,V)+w|0}function u(_,w,S,I,P,L,V){return b(_+(w^S^I)+P+L|0,V)+w|0}function m(_,w,S,I,P,L,V){return b(_+(S^(w|~I))+P+L|0,V)+w|0}d(g,x),g.prototype._update=function(){for(var _=T,w=0;w<16;++w)_[w]=this._block.readInt32LE(4*w);var S=this._a,I=this._b,P=this._c,L=this._d;S=l(S,I,P,L,_[0],3614090360,7),L=l(L,S,I,P,_[1],3905402710,12),P=l(P,L,S,I,_[2],606105819,17),I=l(I,P,L,S,_[3],3250441966,22),S=l(S,I,P,L,_[4],4118548399,7),L=l(L,S,I,P,_[5],1200080426,12),P=l(P,L,S,I,_[6],2821735955,17),I=l(I,P,L,S,_[7],4249261313,22),S=l(S,I,P,L,_[8],1770035416,7),L=l(L,S,I,P,_[9],2336552879,12),P=l(P,L,S,I,_[10],4294925233,17),I=l(I,P,L,S,_[11],2304563134,22),S=l(S,I,P,L,_[12],1804603682,7),L=l(L,S,I,P,_[13],4254626195,12),P=l(P,L,S,I,_[14],2792965006,17),S=h(S,I=l(I,P,L,S,_[15],1236535329,22),P,L,_[1],4129170786,5),L=h(L,S,I,P,_[6],3225465664,9),P=h(P,L,S,I,_[11],643717713,14),I=h(I,P,L,S,_[0],3921069994,20),S=h(S,I,P,L,_[5],3593408605,5),L=h(L,S,I,P,_[10],38016083,9),P=h(P,L,S,I,_[15],3634488961,14),I=h(I,P,L,S,_[4],3889429448,20),S=h(S,I,P,L,_[9],568446438,5),L=h(L,S,I,P,_[14],3275163606,9),P=h(P,L,S,I,_[3],4107603335,14),I=h(I,P,L,S,_[8],1163531501,20),S=h(S,I,P,L,_[13],2850285829,5),L=h(L,S,I,P,_[2],4243563512,9),P=h(P,L,S,I,_[7],1735328473,14),S=u(S,I=h(I,P,L,S,_[12],2368359562,20),P,L,_[5],4294588738,4),L=u(L,S,I,P,_[8],2272392833,11),P=u(P,L,S,I,_[11],1839030562,16),I=u(I,P,L,S,_[14],4259657740,23),S=u(S,I,P,L,_[1],2763975236,4),L=u(L,S,I,P,_[4],1272893353,11),P=u(P,L,S,I,_[7],4139469664,16),I=u(I,P,L,S,_[10],3200236656,23),S=u(S,I,P,L,_[13],681279174,4),L=u(L,S,I,P,_[0],3936430074,11),P=u(P,L,S,I,_[3],3572445317,16),I=u(I,P,L,S,_[6],76029189,23),S=u(S,I,P,L,_[9],3654602809,4),L=u(L,S,I,P,_[12],3873151461,11),P=u(P,L,S,I,_[15],530742520,16),S=m(S,I=u(I,P,L,S,_[2],3299628645,23),P,L,_[0],4096336452,6),L=m(L,S,I,P,_[7],1126891415,10),P=m(P,L,S,I,_[14],2878612391,15),I=m(I,P,L,S,_[5],4237533241,21),S=m(S,I,P,L,_[12],1700485571,6),L=m(L,S,I,P,_[3],2399980690,10),P=m(P,L,S,I,_[10],4293915773,15),I=m(I,P,L,S,_[1],2240044497,21),S=m(S,I,P,L,_[8],1873313359,6),L=m(L,S,I,P,_[15],4264355552,10),P=m(P,L,S,I,_[6],2734768916,15),I=m(I,P,L,S,_[13],1309151649,21),S=m(S,I,P,L,_[4],4149444226,6),L=m(L,S,I,P,_[11],3174756917,10),P=m(P,L,S,I,_[2],718787259,15),I=m(I,P,L,S,_[9],3951481745,21),this._a=this._a+S|0,this._b=this._b+I|0,this._c=this._c+P|0,this._d=this._d+L|0},g.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var _=f.allocUnsafe(16);return _.writeInt32LE(this._a,0),_.writeInt32LE(this._b,4),_.writeInt32LE(this._c,8),_.writeInt32LE(this._d,12),_},z.exports=g},37441:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(19142),f=E(28847),T=f(E(82247)),g=f(E(3355)),b=f(E(94571)),l=f(E(90775)),h=f(E(58985)),u=f(E(69721)),m=f(E(15163)),_=f(E(34650)),w=f(E(21949)),S=f(E(22940));function I(N,C){var a=Object.keys(N);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(N);C&&(B=B.filter(function(Q){return Object.getOwnPropertyDescriptor(N,Q).enumerable})),a.push.apply(a,B)}return a}function P(N){for(var C=1;C{"use strict";var d=E(31734),x=E(82202);function f(T){this.rand=T||new x.Rand}z.exports=f,f.create=function(T){return new f(T)},f.prototype._randbelow=function(T){var g=T.bitLength(),b=Math.ceil(g/8);do{var l=new d(this.rand.generate(b))}while(l.cmp(T)>=0);return l},f.prototype._randrange=function(T,g){var b=g.sub(T);return T.add(this._randbelow(b))},f.prototype.test=function(T,g,b){var l=T.bitLength(),h=d.mont(T),u=new d(1).toRed(h);g||(g=Math.max(1,l/48|0));for(var m=T.subn(1),_=0;!m.testn(_);_++);for(var w=T.shrn(_),S=m.toRed(h);g>0;g--){var I=this._randrange(new d(2),m);b&&b(I);var P=I.toRed(h).redPow(w);if(0!==P.cmp(u)&&0!==P.cmp(S)){for(var L=1;L<_;L++){if(0===(P=P.redSqr()).cmp(u))return!1;if(0===P.cmp(S))break}if(L===_)return!1}}return!0},f.prototype.getDivisor=function(T,g){var b=T.bitLength(),l=d.mont(T),h=new d(1).toRed(l);g||(g=Math.max(1,b/48|0));for(var u=T.subn(1),m=0;!u.testn(m);m++);for(var _=T.shrn(m),w=u.toRed(l);g>0;g--){var S=this._randrange(new d(2),u),I=T.gcd(S);if(0!==I.cmpn(1))return I;var P=S.toRed(l).redPow(_);if(0!==P.cmp(h)&&0!==P.cmp(w)){for(var L=1;L{"use strict";function O(E,d){if(!E)throw new Error(d||"Assertion failed")}z.exports=O,O.equal=function(E,d,x){if(E!=d)throw new Error(x||"Assertion failed: "+E+" != "+d)}},96580:(z,O)=>{"use strict";var E=O;function d(f){return 1===f.length?"0"+f:f}function x(f){for(var T="",g=0;g>8,u=255&l;h?g.push(h,u):g.push(u)}return g},E.zero2=d,E.toHex=x,E.encode=function(f,T){return"hex"===T?x(f):f}},36565:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=function(){function g(b,l,h,u){(0,x.default)(this,g),this.name=b,this.code=l,this.alphabet=u,h&&u&&(this.engine=h(u))}return(0,f.default)(g,[{key:"encode",value:function(b){return this.engine.encode(b)}},{key:"decode",value:function(b){return this.engine.decode(b)}},{key:"isImplemented",value:function(){return this.engine}}]),g}();z.exports=T},52642:(z,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g=h.length?{done:!0}:{done:!1,value:h[_++]}},e:function(L){throw L},f:w}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S,I=!0,P=!1;return{s:function(){m=m.call(h)},n:function(){var L=m.next();return I=L.done,L},e:function(L){P=!0,S=L},f:function(){try{I||null==m.return||m.return()}finally{if(P)throw S}}}}(T);try{for(b.s();!(g=b.n()).done;)if(f.indexOf(g.value)<0)throw new Error("invalid base16 character")}catch(h){b.e(h)}finally{b.f()}return x.from(T,"hex")}}}},96494:z=>{"use strict";function O(E,d){(null==d||d>E.length)&&(d=E.length);for(var x=0,f=new Array(d);x=5;)u+=f[h>>>l-5&31],l-=5;if(l>0&&(u+=f[h<<5-l&31]),b)for(;u.length%8!=0;)u+="=";return u}("string"==typeof d?Uint8Array.from(d):d,E)},decode:function(d){var x,f=function(g,b){var l="undefined"!=typeof Symbol&&g[Symbol.iterator]||g["@@iterator"];if(!l){if(Array.isArray(g)||(l=function(S,I){if(S){if("string"==typeof S)return O(S,I);var P=Object.prototype.toString.call(S).slice(8,-1);return"Object"===P&&S.constructor&&(P=S.constructor.name),"Map"===P||"Set"===P?Array.from(S):"Arguments"===P||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?O(S,I):void 0}}(g))){l&&(g=l);var h=0,u=function(){};return{s:u,n:function(){return h>=g.length?{done:!0}:{done:!1,value:g[h++]}},e:function(S){throw S},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var m,_=!0,w=!1;return{s:function(){l=l.call(g)},n:function(){var S=l.next();return _=S.done,S},e:function(S){w=!0,m=S},f:function(){try{_||null==l.return||l.return()}finally{if(w)throw m}}}}(d);try{for(f.s();!(x=f.n()).done;)if(E.indexOf(x.value)<0)throw new Error("invalid base32 character")}catch(g){f.e(g)}finally{f.f()}return function(g,b){for(var l=(g=g.replace(new RegExp("=","g"),"")).length,h=0,u=0,m=0,_=new Uint8Array(5*l/8|0),w=0;w=8&&(_[m++]=u>>>h-8&255,h-=8);return _.buffer}(d,E)}}}},76627:(z,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g-1,g=f.indexOf("-")>-1&&f.indexOf("_")>-1;return{encode:function(b){var l="";l="string"==typeof b?x.from(b).toString("base64"):b.toString("base64"),g&&(l=l.replace(/\+/g,"-").replace(/\//g,"_"));var h=l.indexOf("=");return h>0&&!T&&(l=l.substring(0,h)),l},decode:function(b){var l,h=function(m,_){var w="undefined"!=typeof Symbol&&m[Symbol.iterator]||m["@@iterator"];if(!w){if(Array.isArray(m)||(w=function(W,G){if(W){if("string"==typeof W)return d(W,G);var H=Object.prototype.toString.call(W).slice(8,-1);return"Object"===H&&W.constructor&&(H=W.constructor.name),"Map"===H||"Set"===H?Array.from(W):"Arguments"===H||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?d(W,G):void 0}}(m))){w&&(m=w);var S=0,I=function(){};return{s:I,n:function(){return S>=m.length?{done:!0}:{done:!1,value:m[S++]}},e:function(W){throw W},f:I}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P,L=!0,V=!1;return{s:function(){w=w.call(m)},n:function(){var W=w.next();return L=W.done,W},e:function(W){V=!0,P=W},f:function(){try{L||null==w.return||w.return()}finally{if(V)throw P}}}}(b);try{for(h.s();!(l=h.n()).done;)if(f.indexOf(l.value)<0)throw new Error("invalid base64 character")}catch(m){h.e(m)}finally{h.f()}return x.from(b,"base64")}}}},7905:(z,O,E)=>{"use strict";var d=E(36565),x=E(27548),f=E(52642),T=E(96494),g=E(76627),b=[["base1","1","","1"],["base2","0",x,"01"],["base8","7",x,"01234567"],["base10","9",x,"0123456789"],["base16","f",f,"0123456789abcdef"],["base32","b",T,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",T,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",T,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",T,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",T,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",x,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",x,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],l=b.reduce(function(u,m){return u[m[0]]=new d(m[0],m[1],m[2],m[3]),u},{}),h=b.reduce(function(u,m){return u[m[1]]=l[m[0]],u},{});z.exports={names:l,codes:h}},6086:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(7905);(O=z.exports=T).encode=function(b,l){var h=g(b);return T(h.name,d.from(h.encode(l)))},O.decode=function(b){d.isBuffer(b)&&(b=b.toString());var l=b.substring(0,1);"string"==typeof(b=b.substring(1,b.length))&&(b=d.from(b));var h=g(l);return d.from(h.decode(b.toString()))},O.isEncoded=function(b){if(d.isBuffer(b)&&(b=b.toString()),"[object String]"!==Object.prototype.toString.call(b))return!1;var l=b.substring(0,1);try{return g(l).name}catch{return!1}},O.names=Object.freeze(Object.keys(x.names)),O.codes=Object.freeze(Object.keys(x.codes));var f=new Error("Unsupported encoding");function T(b,l){if(!l)throw new Error("requires an encoded buffer");var _,h=g(b),u=d.from(h.code);return _=l,g(h.name).decode(_.toString()),d.concat([u,l])}function g(b){var l;if(x.names[b])l=x.names[b];else{if(!x.codes[b])throw f;l=x.codes[b]}if(!l.isImplemented())throw new Error("Base "+b+" is not implemented yet");return l}},54093:(z,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(24070),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(29033).Buffer,x=E(26657),f=E(7054),T=E(86002),g=E(55576);(O=z.exports).addPrefix=function(l,h){var u;if(d.isBuffer(l))u=g.varintBufferEncode(l);else{if(!T[l])throw new Error("multicodec not recognized");u=T[l]}return d.concat([u,h])},O.rmPrefix=function(l){return x.decode(l),l.slice(x.decode.bytes)},O.getCodec=function(l){var h=x.decode(l),u=f.get(h);if(void 0===u)throw new Error("Code ".concat(h," not found"));return u},O.getName=function(l){return f.get(l)},O.getNumber=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return g.varintBufferDecode(h)[0]},O.getCode=function(l){return x.decode(l)},O.getCodeVarint=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return h},O.getVarint=function(l){return x.encode(l)};var b=E(54093);Object.assign(O,b),O.print=E(11032)},7054:(z,O,E)=>{"use strict";var d=E(24070),x=new Map;for(var f in d)x.set(d[f],f);z.exports=Object.freeze(x)},11032:(z,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(24070),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(29033).Buffer,x=E(26657);function f(g){return parseInt(g.toString("hex"),16)}function T(g){var b=g.toString(16);return b.length%2==1&&(b="0"+b),d.from(b,"hex")}z.exports={numberToBuffer:T,bufferToNumber:f,varintBufferEncode:function(g){return d.from(x.encode(f(g)))},varintBufferDecode:function(g){return T(x.decode(g))},varintEncode:function(g){return d.from(x.encode(g))}}},86002:(z,O,E)=>{"use strict";var d=E(24070),x=E(55576).varintEncode,f={};for(var T in d)f[T]=x(d[T]);z.exports=Object.freeze(f)},71786:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=function(){function g(b,l,h,u){(0,x.default)(this,g),this.name=b,this.code=l,this.alphabet=u,h&&u&&(this.engine=h(u))}return(0,f.default)(g,[{key:"encode",value:function(b){return this.engine.encode(b)}},{key:"decode",value:function(b){return this.engine.decode(b)}},{key:"isImplemented",value:function(){return this.engine}}]),g}();z.exports=T},37739:(z,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g=h.length?{done:!0}:{done:!1,value:h[_++]}},e:function(L){throw L},f:w}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S,I=!0,P=!1;return{s:function(){m=m.call(h)},n:function(){var L=m.next();return I=L.done,L},e:function(L){P=!0,S=L},f:function(){try{I||null==m.return||m.return()}finally{if(P)throw S}}}}(T);try{for(b.s();!(g=b.n()).done;)if(f.indexOf(g.value)<0)throw new Error("invalid base16 character")}catch(h){b.e(h)}finally{b.f()}return x.from(T,"hex")}}}},70976:z=>{"use strict";function O(E,d){(null==d||d>E.length)&&(d=E.length);for(var x=0,f=new Array(d);x=5;)u+=f[h>>>l-5&31],l-=5;if(l>0&&(u+=f[h<<5-l&31]),b)for(;u.length%8!=0;)u+="=";return u}("string"==typeof d?Uint8Array.from(d):d,E)},decode:function(d){var x,f=function(g,b){var l="undefined"!=typeof Symbol&&g[Symbol.iterator]||g["@@iterator"];if(!l){if(Array.isArray(g)||(l=function(S,I){if(S){if("string"==typeof S)return O(S,I);var P=Object.prototype.toString.call(S).slice(8,-1);return"Object"===P&&S.constructor&&(P=S.constructor.name),"Map"===P||"Set"===P?Array.from(S):"Arguments"===P||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?O(S,I):void 0}}(g))){l&&(g=l);var h=0,u=function(){};return{s:u,n:function(){return h>=g.length?{done:!0}:{done:!1,value:g[h++]}},e:function(S){throw S},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var m,_=!0,w=!1;return{s:function(){l=l.call(g)},n:function(){var S=l.next();return _=S.done,S},e:function(S){w=!0,m=S},f:function(){try{_||null==l.return||l.return()}finally{if(w)throw m}}}}(d);try{for(f.s();!(x=f.n()).done;)if(E.indexOf(x.value)<0)throw new Error("invalid base32 character")}catch(g){f.e(g)}finally{f.f()}return function(g,b){for(var l=(g=g.replace(new RegExp("=","g"),"")).length,h=0,u=0,m=0,_=new Uint8Array(5*l/8|0),w=0;w=8&&(_[m++]=u>>>h-8&255,h-=8);return _.buffer}(d,E)}}}},88504:(z,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g-1,g=f.indexOf("-")>-1&&f.indexOf("_")>-1;return{encode:function(b){var l="";l="string"==typeof b?x.from(b).toString("base64"):b.toString("base64"),g&&(l=l.replace(/\+/g,"-").replace(/\//g,"_"));var h=l.indexOf("=");return h>0&&!T&&(l=l.substring(0,h)),l},decode:function(b){var l,h=function(m,_){var w="undefined"!=typeof Symbol&&m[Symbol.iterator]||m["@@iterator"];if(!w){if(Array.isArray(m)||(w=function(W,G){if(W){if("string"==typeof W)return d(W,G);var H=Object.prototype.toString.call(W).slice(8,-1);return"Object"===H&&W.constructor&&(H=W.constructor.name),"Map"===H||"Set"===H?Array.from(W):"Arguments"===H||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?d(W,G):void 0}}(m))){w&&(m=w);var S=0,I=function(){};return{s:I,n:function(){return S>=m.length?{done:!0}:{done:!1,value:m[S++]}},e:function(W){throw W},f:I}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P,L=!0,V=!1;return{s:function(){w=w.call(m)},n:function(){var W=w.next();return L=W.done,W},e:function(W){V=!0,P=W},f:function(){try{L||null==w.return||w.return()}finally{if(V)throw P}}}}(b);try{for(h.s();!(l=h.n()).done;)if(f.indexOf(l.value)<0)throw new Error("invalid base64 character")}catch(m){h.e(m)}finally{h.f()}return x.from(b,"base64")}}}},12263:(z,O,E)=>{"use strict";var d=E(71786),x=E(27548),f=E(37739),T=E(70976),g=E(88504),b=[["base1","1","","1"],["base2","0",x,"01"],["base8","7",x,"01234567"],["base10","9",x,"0123456789"],["base16","f",f,"0123456789abcdef"],["base32","b",T,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",T,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",T,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",T,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",T,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",x,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",x,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],l=b.reduce(function(u,m){return u[m[0]]=new d(m[0],m[1],m[2],m[3]),u},{}),h=b.reduce(function(u,m){return u[m[1]]=l[m[0]],u},{});z.exports={names:l,codes:h}},2592:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(12263);function f(g,b){if(!b)throw new Error("requires an encoded buffer");var m,l=T(g),h=d.from(l.code);return m=b,T(l.name).decode(m.toString()),d.concat([h,b])}function T(g){var b;if(x.names[g])b=x.names[g];else{if(!x.codes[g])throw new Error("Unsupported encoding");b=x.codes[g]}if(!b.isImplemented())throw new Error("Base "+g+" is not implemented yet");return b}(O=z.exports=f).encode=function(g,b){var l=T(g);return f(l.name,d.from(l.encode(b)))},O.decode=function(g){d.isBuffer(g)&&(g=g.toString());var b=g.substring(0,1);"string"==typeof(g=g.substring(1,g.length))&&(g=d.from(g));var l=T(b);return d.from(l.decode(g.toString()))},O.isEncoded=function(g){if(d.isBuffer(g)&&(g=g.toString()),"[object String]"!==Object.prototype.toString.call(g))return!1;var b=g.substring(0,1);try{return T(b).name}catch{return!1}},O.names=Object.freeze(Object.keys(x.names)),O.codes=Object.freeze(Object.keys(x.codes))},81269:(z,O)=>{"use strict";O.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),O.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),O.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},77748:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(2592),f=E(26657),T=E(81269);function g(b){O.decode(b)}O.names=T.names,O.codes=T.codes,O.defaultLengths=T.defaultLengths,O.toHexString=function(b){if(!d.isBuffer(b))throw new Error("must be passed a buffer");return b.toString("hex")},O.fromHexString=function(b){return d.from(b,"hex")},O.toB58String=function(b){if(!d.isBuffer(b))throw new Error("must be passed a buffer");return x.encode("base58btc",b).toString().slice(1)},O.fromB58String=function(b){var l=b;return d.isBuffer(b)&&(l=b.toString()),x.decode("z"+l)},O.decode=function(b){if(!d.isBuffer(b))throw new Error("multihash must be a Buffer");if(b.length<2)throw new Error("multihash too short. must be > 2 bytes.");var l=f.decode(b);if(!O.isValidCode(l))throw new Error("multihash unknown function code: 0x".concat(l.toString(16)));b=b.slice(f.decode.bytes);var h=f.decode(b);if(h<0)throw new Error("multihash invalid length: ".concat(h));if((b=b.slice(f.decode.bytes)).length!==h)throw new Error("multihash length inconsistent: 0x".concat(b.toString("hex")));return{code:l,name:T.codes[l],length:h,digest:b}},O.encode=function(b,l,h){if(!b||void 0===l)throw new Error("multihash encode requires at least two args: digest, code");var u=O.coerceCode(l);if(!d.isBuffer(b))throw new Error("digest should be a Buffer");if(null==h&&(h=b.length),h&&b.length!==h)throw new Error("digest length should be equal to specified length.");return d.concat([d.from(f.encode(u)),d.from(f.encode(h)),b])},O.coerceCode=function(b){var l=b;if("string"==typeof b){if(void 0===T.names[b])throw new Error("Unrecognized hash function named: ".concat(b));l=T.names[b]}if("number"!=typeof l)throw new Error("Hash function code should be a number. Got: ".concat(l));if(void 0===T.codes[l]&&!O.isAppCode(l))throw new Error("Unrecognized function code: ".concat(l));return l},O.isAppCode=function(b){return b>0&&b<16},O.isValidCode=function(b){return!!O.isAppCode(b)||!!T.codes[b]},O.validate=g,O.prefix=function(b){return g(b),b.slice(0,2)}},77277:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(36931);z.exports=function(T){if("string"==typeof T||"number"==typeof T){var g=new x(1),b=String(T).toLowerCase().trim(),l="0x"===b.substr(0,2)||"-0x"===b.substr(0,3),h=f(b);if("-"===h.substr(0,1)&&(h=f(h.slice(1)),g=new x(-1,10)),!(h=""===h?"0":h).match(/^-?[0-9]+$/)&&h.match(/^[0-9A-Fa-f]+$/)||h.match(/^[a-fA-F]+$/)||!0===l&&h.match(/^[0-9A-Fa-f]+$/))return new x(h,16).mul(g);if((h.match(/^-?[0-9]+$/)||""===h)&&!1===l)return new x(h,10).mul(g)}else if("object"===(0,d.default)(T)&&T.toString&&!T.pop&&!T.push&&T.toString(10).match(/^-?[0-9]+$/)&&(T.mul||T.dividedToIntegerBy))return new x(T.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(T)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},33103:z=>{"use strict";var O=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;z.exports=function(){try{if(!Object.assign)return!1;var x=new String("abc");if(x[5]="de","5"===Object.getOwnPropertyNames(x)[0])return!1;for(var f={},T=0;T<10;T++)f["_"+String.fromCharCode(T)]=T;if("0123456789"!==Object.getOwnPropertyNames(f).map(function(b){return f[b]}).join(""))return!1;var g={};return"abcdefghijklmnopqrst".split("").forEach(function(b){g[b]=b}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},g)).join("")}catch{return!1}}()?Object.assign:function(x,f){for(var T,g,b=function(m){if(null==m)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(m)}(x),l=1;l{"use strict";var d,f;z=E.nmd(z);var T,g=E(28847)(E(3355));T=function(){return function(b){var l={};function h(u){if(l[u])return l[u].exports;var m=l[u]={i:u,l:!1,exports:{}};return b[u].call(m.exports,m,m.exports,h),m.l=!0,m.exports}return h.m=b,h.c=l,h.d=function(u,m,_){h.o(u,m)||Object.defineProperty(u,m,{configurable:!1,enumerable:!0,get:_})},h.n=function(u){var m=u&&u.__esModule?function(){return u.default}:function(){return u};return h.d(m,"a",m),m},h.o=function(u,m){return Object.prototype.hasOwnProperty.call(u,m)},h.p="",h(h.s=7)}([function(b,l,h){h.d(l,"j",function(){return m}),h.d(l,"d",function(){return _}),h.d(l,"c",function(){return w}),h.d(l,"h",function(){return S}),h.d(l,"b",function(){return I}),h.d(l,"k",function(){return P}),h.d(l,"e",function(){return L}),h.d(l,"g",function(){return V}),h.d(l,"i",function(){return W}),h.d(l,"a",function(){return G}),h.d(l,"f",function(){return H});var u=h(1),m=P(function(j,K){var R=K.length;return P(function(o){for(var y=0;y0&&(I=S),S=wt[st++]);)switch(Ve++,"\n"===S?(tt++,nt=0):nt++,Ce){case R:if("{"===S)Ce=y;else if("["===S)Ce=v;else if(!ht(S))return mt("Non-whitespace before {[.");continue;case N:case y:if(ht(S))continue;if(Ce===N)ke.push(C);else{if("}"===S){V({}),W(),Ce=ke.pop()||o;continue}ke.push(M)}if('"'!==S)return mt('Malformed object key should start with " ');Ce=D;continue;case C:case M:if(ht(S))continue;if(":"===S)Ce===M?(ke.push(M),void 0!==P&&(V({}),L(P),P=void 0),ze++):void 0!==P&&(L(P),P=void 0),Ce=o;else if("}"===S)void 0!==P&&(V(P),W(),P=void 0),W(),ze--,Ce=ke.pop()||o;else{if(","!==S)return mt("Bad object");Ce===M&&ke.push(M),void 0!==P&&(V(P),W(),P=void 0),Ce=N}continue;case v:case o:if(ht(S))continue;if(Ce===v){if(V([]),ze++,Ce=o,"]"===S){W(),ze--,Ce=ke.pop()||o;continue}ke.push(k)}if('"'===S)Ce=D;else if("{"===S)Ce=y;else if("["===S)Ce=v;else if("t"===S)Ce=a;else if("f"===S)Ce=ee;else if("n"===S)Ce=ae;else if("-"===S)pe+=S;else if("0"===S)pe+=S,Ce=20;else{if(-1==="123456789".indexOf(S))return mt("Bad value");pe+=S,Ce=20}continue;case k:if(","===S)ke.push(k),void 0!==P&&(V(P),W(),P=void 0),Ce=o;else{if("]"!==S){if(ht(S))continue;return mt("Bad array")}void 0!==P&&(V(P),W(),P=void 0),W(),ze--,Ce=ke.pop()||o}continue;case D:void 0===P&&(P="");var Ye=st-1;e:for(;;){for(;Ee>0;)if(me+=S,S=wt.charAt(st++),4===Ee?(P+=String.fromCharCode(parseInt(me,16)),Ee=0,Ye=st-1):Ee++,!S)break e;if('"'===S&&!_e){Ce=ke.pop()||o,P+=wt.substring(Ye,st-1);break}if(!("\\"!==S||_e||(_e=!0,P+=wt.substring(Ye,st-1),S=wt.charAt(st++))))break;if(_e){if(_e=!1,"n"===S?P+="\n":"r"===S?P+="\r":"t"===S?P+="\t":"f"===S?P+="\f":"b"===S?P+="\b":"u"===S?(Ee=1,me=""):P+=S,S=wt.charAt(st++),Ye=st-1,S)continue;break}j.lastIndex=st;var gt=j.exec(wt);if(!gt){P+=wt.substring(Ye,(st=wt.length+1)-1);break}if(st=gt.index+1,!(S=wt.charAt(gt.index))){P+=wt.substring(Ye,st-1);break}}continue;case a:if(!S)continue;if("r"!==S)return mt("Invalid true started with t"+S);Ce=B;continue;case B:if(!S)continue;if("u"!==S)return mt("Invalid true started with tr"+S);Ce=Q;continue;case Q:if(!S)continue;if("e"!==S)return mt("Invalid true started with tru"+S);V(!0),W(),Ce=ke.pop()||o;continue;case ee:if(!S)continue;if("a"!==S)return mt("Invalid false started with f"+S);Ce=ce;continue;case ce:if(!S)continue;if("l"!==S)return mt("Invalid false started with fa"+S);Ce=ue;continue;case ue:if(!S)continue;if("s"!==S)return mt("Invalid false started with fal"+S);Ce=we;continue;case we:if(!S)continue;if("e"!==S)return mt("Invalid false started with fals"+S);V(!1),W(),Ce=ke.pop()||o;continue;case ae:if(!S)continue;if("u"!==S)return mt("Invalid null started with n"+S);Ce=Te;continue;case Te:if(!S)continue;if("l"!==S)return mt("Invalid null started with nu"+S);Ce=le;continue;case le:if(!S)continue;if("l"!==S)return mt("Invalid null started with nul"+S);V(null),W(),Ce=ke.pop()||o;continue;case X:if("."!==S)return mt("Leading zero not followed by .");pe+=S,Ce=20;continue;case 20:if(-1!=="0123456789".indexOf(S))pe+=S;else if("."===S){if(-1!==pe.indexOf("."))return mt("Invalid number has two dots");pe+=S}else if("e"===S||"E"===S){if(-1!==pe.indexOf("e")||-1!==pe.indexOf("E"))return mt("Invalid number has two exponential");pe+=S}else if("+"===S||"-"===S){if("e"!==I&&"E"!==I)return mt("Invalid symbol in number");pe+=S}else pe&&(V(parseFloat(pe)),W(),pe=""),st--,Ce=ke.pop()||o;continue;default:return mt("Unknown state: "+Ce)}Ve>=ne&&(Pt=0,void 0!==P&&P.length>H&&(mt("Max buffer length exceeded: textNode"),Pt=Math.max(Pt,P.length)),pe.length>H&&(mt("Max buffer length exceeded: numberNode"),Pt=Math.max(Pt,pe.length)),ne=H-Pt+Ve)}}),_(u.n).on(function(){if(Ce===R)return V({}),W(),void(xe=!0);Ce===o&&0===ze||mt("Unexpected end"),void 0!==P&&(V(P),W(),P=void 0),xe=!0})}},function(b,l,h){h.d(l,"a",function(){return I}),h.d(l,"b",function(){return P});var u=h(19),m=h(3),_=h(2),w=h(20),S=h(0);function I(){return new XMLHttpRequest}function P(L,V,W,G,H,j,K){var R=L(m.m).emit,o=L(m.b).emit,y=0,M=!0;function v(){if("2"===String(V.status)[0]){var N=V.responseText,C=(" "+N.substr(y)).substr(1);C&&R(C),y=Object(_.e)(N)}}function k(N){try{M&&L(m.c).emit(N.status,Object(w.a)(N.getAllResponseHeaders())),M=!1}catch{}}L(m.a).on(function(){V.onreadystatechange=null,V.abort()}),"onprogress"in V&&(V.onprogress=v),V.onreadystatechange=function(){switch(V.readyState){case 2:case 3:return k(V);case 4:k(V),"2"===String(V.status)[0]?(v(),L(m.n).emit()):o(Object(m.o)(V.status,V.responseText))}};try{for(var D in V.open(W,G,!0),j)V.setRequestHeader(D,j[D]);Object(u.a)(window.location,Object(u.b)(G))||V.setRequestHeader("X-Requested-With","XMLHttpRequest"),V.withCredentials=K,V.send(H)}catch(N){window.setTimeout(Object(S.j)(o,Object(m.o)(void 0,void 0,N)),0)}}},function(b,l,h){function u(_,w){function S(I){return String(I.port||{"http:":80,"https:":443}[I.protocol||_.protocol])}return!!(w.protocol&&w.protocol!==_.protocol||w.host&&w.host!==_.host||w.host&&S(w)!==S(_))}function m(_){var w=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(_)||[];return{protocol:w[1]||"",host:w[2]||"",port:w[3]||""}}h.d(l,"a",function(){return u}),h.d(l,"b",function(){return m})},function(b,l,h){function u(m){var _={};return m&&m.split("\r\n").forEach(function(w){var S=w.indexOf(": ");_[w.substring(0,S)]=w.substring(S+2)}),_}h.d(l,"a",function(){return u})}]).default},"object"===(0,g.default)(O)&&"object"===(0,g.default)(z)?z.exports=T():void 0===(f="function"==typeof(d=T)?d.apply(O,[]):d)||(z.exports=f)},21307:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function f(b,l){return Object.prototype.hasOwnProperty.call(b,l)}O.assign=function(b){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var h=l.shift();if(h){if("object"!==(0,d.default)(h))throw new TypeError(h+"must be non-object");for(var u in h)f(h,u)&&(b[u]=h[u])}}return b},O.shrinkBuf=function(b,l){return b.length===l?b:b.subarray?b.subarray(0,l):(b.length=l,b)};var T={arraySet:function(b,l,h,u,m){if(l.subarray&&b.subarray)b.set(l.subarray(h,h+u),m);else for(var _=0;_{"use strict";z.exports=function(O,E,d,x){for(var f=65535&O|0,T=O>>>16&65535|0,g=0;0!==d;){d-=g=d>2e3?2e3:d;do{T=T+(f=f+E[x++]|0)|0}while(--g);f%=65521,T%=65521}return f|T<<16|0}},29806:z=>{"use strict";z.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},28548:z=>{"use strict";var O=function(){for(var E,d=[],x=0;x<256;x++){E=x;for(var f=0;f<8;f++)E=1&E?3988292384^E>>>1:E>>>1;d[x]=E}return d}();z.exports=function(E,d,x,f){var T=O,g=f+x;E^=-1;for(var b=f;b>>8^T[255&(E^d[b])];return-1^E}},54151:(z,O,E)=>{"use strict";var d,x=E(21307),f=E(25280),T=E(57506),g=E(28548),b=E(78021),m=-2,R=258,o=262,M=103,v=113,k=666;function B(me,Ee){return me.msg=b[Ee],Ee}function Q(me){return(me<<1)-(me>4?9:0)}function ee(me){for(var Ee=me.length;--Ee>=0;)me[Ee]=0}function ce(me){var Ee=me.state,ze=Ee.pending;ze>me.avail_out&&(ze=me.avail_out),0!==ze&&(x.arraySet(me.output,Ee.pending_buf,Ee.pending_out,ze,me.next_out),me.next_out+=ze,Ee.pending_out+=ze,me.total_out+=ze,me.avail_out-=ze,Ee.pending-=ze,0===Ee.pending&&(Ee.pending_out=0))}function ue(me,Ee){f._tr_flush_block(me,me.block_start>=0?me.block_start:-1,me.strstart-me.block_start,Ee),me.block_start=me.strstart,ce(me.strm)}function we(me,Ee){me.pending_buf[me.pending++]=Ee}function ae(me,Ee){me.pending_buf[me.pending++]=Ee>>>8&255,me.pending_buf[me.pending++]=255&Ee}function Te(me,Ee){var ze,Ve,nt=me.max_chain_length,tt=me.strstart,mt=me.prev_length,ht=me.nice_match,wt=me.strstart>me.w_size-o?me.strstart-(me.w_size-o):0,Pt=me.window,st=me.w_mask,Ye=me.prev,gt=me.strstart+R,St=Pt[tt+mt-1],Wt=Pt[tt+mt];me.prev_length>=me.good_match&&(nt>>=2),ht>me.lookahead&&(ht=me.lookahead);do{if(Pt[(ze=Ee)+mt]===Wt&&Pt[ze+mt-1]===St&&Pt[ze]===Pt[tt]&&Pt[++ze]===Pt[tt+1]){tt+=2,ze++;do{}while(Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&ttmt){if(me.match_start=Ee,mt=Ve,Ve>=ht)break;St=Pt[tt+mt-1],Wt=Pt[tt+mt]}}}while((Ee=Ye[Ee&st])>wt&&0!=--nt);return mt<=me.lookahead?mt:me.lookahead}function le(me){var Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye=me.w_size;do{if(nt=me.window_size-me.lookahead-me.strstart,me.strstart>=Ye+(Ye-o)){x.arraySet(me.window,me.window,Ye,Ye,0),me.match_start-=Ye,me.strstart-=Ye,me.block_start-=Ye,Ee=ze=me.hash_size;do{Ve=me.head[--Ee],me.head[Ee]=Ve>=Ye?Ve-Ye:0}while(--ze);Ee=ze=Ye;do{Ve=me.prev[--Ee],me.prev[Ee]=Ve>=Ye?Ve-Ye:0}while(--ze);nt+=Ye}if(0===me.strm.avail_in)break;if(ht=me.window,wt=me.strstart+me.lookahead,st=void 0,(st=(mt=me.strm).avail_in)>(Pt=nt)&&(st=Pt),ze=0===st?0:(mt.avail_in-=st,x.arraySet(ht,mt.input,mt.next_in,st,wt),1===mt.state.wrap?mt.adler=T(mt.adler,ht,st,wt):2===mt.state.wrap&&(mt.adler=g(mt.adler,ht,st,wt)),mt.next_in+=st,mt.total_in+=st,st),me.lookahead+=ze,me.lookahead+me.insert>=3)for(me.ins_h=me.window[tt=me.strstart-me.insert],me.ins_h=(me.ins_h<=3&&(me.ins_h=(me.ins_h<=3)if(Ve=f._tr_tally(me,me.strstart-me.match_start,me.match_length-3),me.lookahead-=me.match_length,me.match_length<=me.max_lazy_match&&me.lookahead>=3){me.match_length--;do{me.strstart++,me.ins_h=(me.ins_h<=3&&(me.ins_h=(me.ins_h<4096)&&(me.match_length=2)),me.prev_length>=3&&me.match_length<=me.prev_length){nt=me.strstart+me.lookahead-3,Ve=f._tr_tally(me,me.strstart-1-me.prev_match,me.prev_length-3),me.lookahead-=me.prev_length-1,me.prev_length-=2;do{++me.strstart<=nt&&(me.ins_h=(me.ins_h<15&&(mt=2,Ve-=16),nt<1||nt>9||8!==ze||Ve<8||Ve>15||Ee<0||Ee>9||tt<0||tt>4)return B(me,m);8===Ve&&(Ve=9);var ht=new _e;return me.state=ht,ht.strm=me,ht.wrap=mt,ht.gzhead=null,ht.w_bits=Ve,ht.w_size=1<me.pending_buf_size-5&&(ze=me.pending_buf_size-5);;){if(me.lookahead<=1){if(le(me),0===me.lookahead&&0===Ee)return 1;if(0===me.lookahead)break}me.strstart+=me.lookahead,me.lookahead=0;var Ve=me.block_start+ze;if((0===me.strstart||me.strstart>=Ve)&&(me.lookahead=me.strstart-Ve,me.strstart=Ve,ue(me,!1),0===me.strm.avail_out)||me.strstart-me.block_start>=me.w_size-o&&(ue(me,!1),0===me.strm.avail_out))return 1}return me.insert=0,4===Ee?(ue(me,!0),0===me.strm.avail_out?3:4):(me.strstart>me.block_start&&ue(me,!1),1)}),new pe(4,4,8,4,X),new pe(4,5,16,8,X),new pe(4,6,32,32,X),new pe(4,4,16,16,ne),new pe(8,16,32,32,ne),new pe(8,16,128,128,ne),new pe(8,32,128,256,ne),new pe(32,128,258,1024,ne),new pe(32,258,258,4096,ne)],O.deflateInit=function(me,Ee){return ke(me,Ee,8,15,8,0)},O.deflateInit2=ke,O.deflateReset=Ce,O.deflateResetKeep=xe,O.deflateSetHeader=function(me,Ee){return me&&me.state?2!==me.state.wrap?m:(me.state.gzhead=Ee,0):m},O.deflate=function(me,Ee){var ze,Ve,nt,tt;if(!me||!me.state||Ee>5||Ee<0)return me?B(me,m):m;if(Ve=me.state,!me.output||!me.input&&0!==me.avail_in||Ve.status===k&&4!==Ee)return B(me,0===me.avail_out?-5:m);if(Ve.strm=me,ze=Ve.last_flush,Ve.last_flush=Ee,42===Ve.status)if(2===Ve.wrap)me.adler=0,we(Ve,31),we(Ve,139),we(Ve,8),Ve.gzhead?(we(Ve,(Ve.gzhead.text?1:0)+(Ve.gzhead.hcrc?2:0)+(Ve.gzhead.extra?4:0)+(Ve.gzhead.name?8:0)+(Ve.gzhead.comment?16:0)),we(Ve,255&Ve.gzhead.time),we(Ve,Ve.gzhead.time>>8&255),we(Ve,Ve.gzhead.time>>16&255),we(Ve,Ve.gzhead.time>>24&255),we(Ve,9===Ve.level?2:Ve.strategy>=2||Ve.level<2?4:0),we(Ve,255&Ve.gzhead.os),Ve.gzhead.extra&&Ve.gzhead.extra.length&&(we(Ve,255&Ve.gzhead.extra.length),we(Ve,Ve.gzhead.extra.length>>8&255)),Ve.gzhead.hcrc&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending,0)),Ve.gzindex=0,Ve.status=69):(we(Ve,0),we(Ve,0),we(Ve,0),we(Ve,0),we(Ve,0),we(Ve,9===Ve.level?2:Ve.strategy>=2||Ve.level<2?4:0),we(Ve,3),Ve.status=v);else{var mt=8+(Ve.w_bits-8<<4)<<8;mt|=(Ve.strategy>=2||Ve.level<2?0:Ve.level<6?1:6===Ve.level?2:3)<<6,0!==Ve.strstart&&(mt|=32),mt+=31-mt%31,Ve.status=v,ae(Ve,mt),0!==Ve.strstart&&(ae(Ve,me.adler>>>16),ae(Ve,65535&me.adler)),me.adler=1}if(69===Ve.status)if(Ve.gzhead.extra){for(nt=Ve.pending;Ve.gzindex<(65535&Ve.gzhead.extra.length)&&(Ve.pending!==Ve.pending_buf_size||(Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),ce(me),nt=Ve.pending,Ve.pending!==Ve.pending_buf_size));)we(Ve,255&Ve.gzhead.extra[Ve.gzindex]),Ve.gzindex++;Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),Ve.gzindex===Ve.gzhead.extra.length&&(Ve.gzindex=0,Ve.status=73)}else Ve.status=73;if(73===Ve.status)if(Ve.gzhead.name){nt=Ve.pending;do{if(Ve.pending===Ve.pending_buf_size&&(Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),ce(me),nt=Ve.pending,Ve.pending===Ve.pending_buf_size)){tt=1;break}tt=Ve.gzindexnt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),0===tt&&(Ve.gzindex=0,Ve.status=91)}else Ve.status=91;if(91===Ve.status)if(Ve.gzhead.comment){nt=Ve.pending;do{if(Ve.pending===Ve.pending_buf_size&&(Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),ce(me),nt=Ve.pending,Ve.pending===Ve.pending_buf_size)){tt=1;break}tt=Ve.gzindexnt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),0===tt&&(Ve.status=M)}else Ve.status=M;if(Ve.status===M&&(Ve.gzhead.hcrc?(Ve.pending+2>Ve.pending_buf_size&&ce(me),Ve.pending+2<=Ve.pending_buf_size&&(we(Ve,255&me.adler),we(Ve,me.adler>>8&255),me.adler=0,Ve.status=v)):Ve.status=v),0!==Ve.pending){if(ce(me),0===me.avail_out)return Ve.last_flush=-1,0}else if(0===me.avail_in&&Q(Ee)<=Q(ze)&&4!==Ee)return B(me,-5);if(Ve.status===k&&0!==me.avail_in)return B(me,-5);if(0!==me.avail_in||0!==Ve.lookahead||0!==Ee&&Ve.status!==k){var ht=2===Ve.strategy?function(wt,Pt){for(var st;;){if(0===wt.lookahead&&(le(wt),0===wt.lookahead)){if(0===Pt)return 1;break}if(wt.match_length=0,st=f._tr_tally(wt,0,wt.window[wt.strstart]),wt.lookahead--,wt.strstart++,st&&(ue(wt,!1),0===wt.strm.avail_out))return 1}return wt.insert=0,4===Pt?(ue(wt,!0),0===wt.strm.avail_out?3:4):wt.last_lit&&(ue(wt,!1),0===wt.strm.avail_out)?1:2}(Ve,Ee):3===Ve.strategy?function(wt,Pt){for(var st,Ye,gt,St,Wt=wt.window;;){if(wt.lookahead<=R){if(le(wt),wt.lookahead<=R&&0===Pt)return 1;if(0===wt.lookahead)break}if(wt.match_length=0,wt.lookahead>=3&&wt.strstart>0&&(Ye=Wt[gt=wt.strstart-1])===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]){St=wt.strstart+R;do{}while(Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&>wt.lookahead&&(wt.match_length=wt.lookahead)}if(wt.match_length>=3?(st=f._tr_tally(wt,1,wt.match_length-3),wt.lookahead-=wt.match_length,wt.strstart+=wt.match_length,wt.match_length=0):(st=f._tr_tally(wt,0,wt.window[wt.strstart]),wt.lookahead--,wt.strstart++),st&&(ue(wt,!1),0===wt.strm.avail_out))return 1}return wt.insert=0,4===Pt?(ue(wt,!0),0===wt.strm.avail_out?3:4):wt.last_lit&&(ue(wt,!1),0===wt.strm.avail_out)?1:2}(Ve,Ee):d[Ve.level].func(Ve,Ee);if(3!==ht&&4!==ht||(Ve.status=k),1===ht||3===ht)return 0===me.avail_out&&(Ve.last_flush=-1),0;if(2===ht&&(1===Ee?f._tr_align(Ve):5!==Ee&&(f._tr_stored_block(Ve,0,0,!1),3===Ee&&(ee(Ve.head),0===Ve.lookahead&&(Ve.strstart=0,Ve.block_start=0,Ve.insert=0))),ce(me),0===me.avail_out))return Ve.last_flush=-1,0}return 4!==Ee?0:Ve.wrap<=0?1:(2===Ve.wrap?(we(Ve,255&me.adler),we(Ve,me.adler>>8&255),we(Ve,me.adler>>16&255),we(Ve,me.adler>>24&255),we(Ve,255&me.total_in),we(Ve,me.total_in>>8&255),we(Ve,me.total_in>>16&255),we(Ve,me.total_in>>24&255)):(ae(Ve,me.adler>>>16),ae(Ve,65535&me.adler)),ce(me),Ve.wrap>0&&(Ve.wrap=-Ve.wrap),0!==Ve.pending?0:1)},O.deflateEnd=function(me){var Ee;return me&&me.state?42!==(Ee=me.state.status)&&69!==Ee&&73!==Ee&&91!==Ee&&Ee!==M&&Ee!==v&&Ee!==k?B(me,m):(me.state=null,Ee===v?B(me,-3):0):m},O.deflateSetDictionary=function(me,Ee){var ze,Ve,nt,tt,mt,ht,wt,Pt,st=Ee.length;if(!me||!me.state||2===(tt=(ze=me.state).wrap)||1===tt&&42!==ze.status||ze.lookahead)return m;for(1===tt&&(me.adler=T(me.adler,Ee,st,0)),ze.wrap=0,st>=ze.w_size&&(0===tt&&(ee(ze.head),ze.strstart=0,ze.block_start=0,ze.insert=0),Pt=new x.Buf8(ze.w_size),x.arraySet(Pt,Ee,st-ze.w_size,ze.w_size,0),Ee=Pt,st=ze.w_size),mt=me.avail_in,ht=me.next_in,wt=me.input,me.avail_in=st,me.next_in=0,me.input=Ee,le(ze);ze.lookahead>=3;){Ve=ze.strstart,nt=ze.lookahead-2;do{ze.ins_h=(ze.ins_h<{"use strict";z.exports=function(O,E){var d,x,f,T,g,b,l,h,u,m,_,w,S,I,P,L,V,W,G,H,j,K,R,o,y;o=O.input,f=(x=O.next_in)+(O.avail_in-5),y=O.output,g=(T=O.next_out)-(E-O.avail_out),b=T+(O.avail_out-257),l=(d=O.state).dmax,h=d.wsize,u=d.whave,m=d.wnext,_=d.window,w=d.hold,S=d.bits,I=d.lencode,P=d.distcode,L=(1<>>=G=W>>>24,S-=G,0==(G=W>>>16&255))y[T++]=65535&W;else{if(!(16&G)){if(0==(64&G)){W=I[(65535&W)+(w&(1<>>=G,S-=G),S<15&&(w+=o[x++]<>>=G=W>>>24,S-=G,!(16&(G=W>>>16&255))){if(0==(64&G)){W=P[(65535&W)+(w&(1<l){O.msg="invalid distance too far back",d.mode=30;break e}if(w>>>=G,S-=G,j>(G=T-g)){if((G=j-G)>u&&d.sane){O.msg="invalid distance too far back",d.mode=30;break e}if(K=0,R=_,0===m){if(K+=h-G,G2;)y[T++]=R[K++],y[T++]=R[K++],y[T++]=R[K++],H-=3;H&&(y[T++]=R[K++],H>1&&(y[T++]=R[K++]))}else{K=T-j;do{y[T++]=y[K++],y[T++]=y[K++],y[T++]=y[K++],H-=3}while(H>2);H&&(y[T++]=y[K++],H>1&&(y[T++]=y[K++]))}break}}break}}while(x>3,w&=(1<<(S-=H<<3))-1,O.next_in=x,O.next_out=T,O.avail_in=x{"use strict";var d=E(21307),x=E(57506),f=E(28548),T=E(52399),g=E(51721),u=-2,_=12,w=30;function P(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function L(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function V(M){var v;return M&&M.state?(M.total_in=M.total_out=(v=M.state).total=0,M.msg="",v.wrap&&(M.adler=1&v.wrap),v.mode=1,v.last=0,v.havedict=0,v.dmax=32768,v.head=null,v.hold=0,v.bits=0,v.lencode=v.lendyn=new d.Buf32(852),v.distcode=v.distdyn=new d.Buf32(592),v.sane=1,v.back=-1,0):u}function W(M){var v;return M&&M.state?((v=M.state).wsize=0,v.whave=0,v.wnext=0,V(M)):u}function G(M,v){var k,D;return M&&M.state?(D=M.state,v<0?(k=0,v=-v):(k=1+(v>>4),v<48&&(v&=15)),v&&(v<8||v>15)?u:(null!==D.window&&D.wbits!==v&&(D.window=null),D.wrap=k,D.wbits=v,W(M))):u}function H(M,v){var k,D;return M?(D=new L,M.state=D,D.window=null,0!==(k=G(M,v))&&(M.state=null),k):u}var j,K,R=!0;function o(M){if(R){var v;for(j=new d.Buf32(512),K=new d.Buf32(32),v=0;v<144;)M.lens[v++]=8;for(;v<256;)M.lens[v++]=9;for(;v<280;)M.lens[v++]=7;for(;v<288;)M.lens[v++]=8;for(g(1,M.lens,0,288,j,0,M.work,{bits:9}),v=0;v<32;)M.lens[v++]=5;g(2,M.lens,0,32,K,0,M.work,{bits:5}),R=!1}M.lencode=j,M.lenbits=9,M.distcode=K,M.distbits=5}function y(M,v,k,D){var N,C=M.state;return null===C.window&&(C.wsize=1<=C.wsize?(d.arraySet(C.window,v,k-C.wsize,C.wsize,0),C.wnext=0,C.whave=C.wsize):((N=C.wsize-C.wnext)>D&&(N=D),d.arraySet(C.window,v,k-D,N,C.wnext),(D-=N)?(d.arraySet(C.window,v,k-D,D,0),C.wnext=D,C.whave=C.wsize):(C.wnext+=N,C.wnext===C.wsize&&(C.wnext=0),C.whave>>8&255,k.check=f(k.check,nt,2,0),ee=0,ce=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&ee)<<8)+(ee>>8))%31){M.msg="incorrect header check",k.mode=w;break}if(8!=(15&ee)){M.msg="unknown compression method",k.mode=w;break}if(ce-=4,ke=8+(15&(ee>>>=4)),0===k.wbits)k.wbits=ke;else if(ke>k.wbits){M.msg="invalid window size",k.mode=w;break}k.dmax=1<>8&1),512&k.flags&&(nt[0]=255&ee,nt[1]=ee>>>8&255,k.check=f(k.check,nt,2,0)),ee=0,ce=0,k.mode=3;case 3:for(;ce<32;){if(0===B)break e;B--,ee+=D[C++]<>>8&255,nt[2]=ee>>>16&255,nt[3]=ee>>>24&255,k.check=f(k.check,nt,4,0)),ee=0,ce=0,k.mode=4;case 4:for(;ce<16;){if(0===B)break e;B--,ee+=D[C++]<>8),512&k.flags&&(nt[0]=255&ee,nt[1]=ee>>>8&255,k.check=f(k.check,nt,2,0)),ee=0,ce=0,k.mode=5;case 5:if(1024&k.flags){for(;ce<16;){if(0===B)break e;B--,ee+=D[C++]<>>8&255,k.check=f(k.check,nt,2,0)),ee=0,ce=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&((ae=k.length)>B&&(ae=B),ae&&(k.head&&(ke=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),d.arraySet(k.head.extra,D,C,ae,ke)),512&k.flags&&(k.check=f(k.check,D,ae,C)),B-=ae,C+=ae,k.length-=ae),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(0===B)break e;ae=0;do{ke=D[C+ae++],k.head&&ke&&k.length<65536&&(k.head.name+=String.fromCharCode(ke))}while(ke&&ae>9&1,k.head.done=!0),M.adler=k.check=0,k.mode=_;break;case 10:for(;ce<32;){if(0===B)break e;B--,ee+=D[C++]<>>=7&ce,ce-=7&ce,k.mode=27;break}for(;ce<3;){if(0===B)break e;B--,ee+=D[C++]<>>=1)){case 0:k.mode=14;break;case 1:if(o(k),k.mode=20,6===v){ee>>>=2,ce-=2;break e}break;case 2:k.mode=17;break;case 3:M.msg="invalid block type",k.mode=w}ee>>>=2,ce-=2;break;case 14:for(ee>>>=7&ce,ce-=7&ce;ce<32;){if(0===B)break e;B--,ee+=D[C++]<>>16^65535)){M.msg="invalid stored block lengths",k.mode=w;break}if(k.length=65535&ee,ee=0,ce=0,k.mode=15,6===v)break e;case 15:k.mode=16;case 16:if(ae=k.length){if(ae>B&&(ae=B),ae>Q&&(ae=Q),0===ae)break e;d.arraySet(N,D,C,ae,a),B-=ae,C+=ae,Q-=ae,a+=ae,k.length-=ae;break}k.mode=_;break;case 17:for(;ce<14;){if(0===B)break e;B--,ee+=D[C++]<>>=5)),ce-=5,k.ncode=4+(15&(ee>>>=5)),ee>>>=4,ce-=4,k.nlen>286||k.ndist>30){M.msg="too many length or distance symbols",k.mode=w;break}k.have=0,k.mode=18;case 18:for(;k.have>>=3,ce-=3}for(;k.have<19;)k.lens[tt[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,me=g(0,k.lens,0,19,k.lencode,0,k.work,Ee={bits:k.lenbits}),k.lenbits=Ee.bits,me){M.msg="invalid code lengths set",k.mode=w;break}k.have=0,k.mode=19;case 19:for(;k.have>>16&255,pe=65535&Ve,!((X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>>=X,ce-=X,k.lens[k.have++]=pe;else{if(16===pe){for(ze=X+2;ce>>=X,ce-=X,0===k.have){M.msg="invalid bit length repeat",k.mode=w;break}ke=k.lens[k.have-1],ae=3+(3&ee),ee>>>=2,ce-=2}else if(17===pe){for(ze=X+3;ce>>=X)),ee>>>=3,ce-=3}else{for(ze=X+7;ce>>=X)),ee>>>=7,ce-=7}if(k.have+ae>k.nlen+k.ndist){M.msg="invalid bit length repeat",k.mode=w;break}for(;ae--;)k.lens[k.have++]=ke}}if(k.mode===w)break;if(0===k.lens[256]){M.msg="invalid code -- missing end-of-block",k.mode=w;break}if(k.lenbits=9,me=g(1,k.lens,0,k.nlen,k.lencode,0,k.work,Ee={bits:k.lenbits}),k.lenbits=Ee.bits,me){M.msg="invalid literal/lengths set",k.mode=w;break}if(k.distbits=6,k.distcode=k.distdyn,me=g(2,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,Ee={bits:k.distbits}),k.distbits=Ee.bits,me){M.msg="invalid distances set",k.mode=w;break}if(k.mode=20,6===v)break e;case 20:k.mode=21;case 21:if(B>=6&&Q>=258){M.next_out=a,M.avail_out=Q,M.next_in=C,M.avail_in=B,k.hold=ee,k.bits=ce,T(M,we),a=M.next_out,N=M.output,Q=M.avail_out,C=M.next_in,D=M.input,B=M.avail_in,ee=k.hold,ce=k.bits,k.mode===_&&(k.back=-1);break}for(k.back=0;ne=(Ve=k.lencode[ee&(1<>>16&255,pe=65535&Ve,!((X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>_e)])>>>16&255,pe=65535&Ve,!(_e+(X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>>=_e,ce-=_e,k.back+=_e}if(ee>>>=X,ce-=X,k.back+=X,k.length=pe,0===ne){k.mode=26;break}if(32&ne){k.back=-1,k.mode=_;break}if(64&ne){M.msg="invalid literal/length code",k.mode=w;break}k.extra=15&ne,k.mode=22;case 22:if(k.extra){for(ze=k.extra;ce>>=k.extra,ce-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;ne=(Ve=k.distcode[ee&(1<>>16&255,pe=65535&Ve,!((X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>_e)])>>>16&255,pe=65535&Ve,!(_e+(X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>>=_e,ce-=_e,k.back+=_e}if(ee>>>=X,ce-=X,k.back+=X,64&ne){M.msg="invalid distance code",k.mode=w;break}k.offset=pe,k.extra=15&ne,k.mode=24;case 24:if(k.extra){for(ze=k.extra;ce>>=k.extra,ce-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){M.msg="invalid distance too far back",k.mode=w;break}k.mode=25;case 25:if(0===Q)break e;if(k.offset>(ae=we-Q)){if((ae=k.offset-ae)>k.whave&&k.sane){M.msg="invalid distance too far back",k.mode=w;break}Te=ae>k.wnext?k.wsize-(ae-=k.wnext):k.wnext-ae,ae>k.length&&(ae=k.length),le=k.window}else le=N,Te=a-k.offset,ae=k.length;ae>Q&&(ae=Q),Q-=ae,k.length-=ae;do{N[a++]=le[Te++]}while(--ae);0===k.length&&(k.mode=21);break;case 26:if(0===Q)break e;N[a++]=k.length,Q--,k.mode=21;break;case 27:if(k.wrap){for(;ce<32;){if(0===B)break e;B--,ee|=D[C++]<{"use strict";var d=E(21307),x=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],T=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];z.exports=function(b,l,h,u,m,_,w,S){var I,P,L,V,W,G,H,j,K,R=S.bits,o=0,y=0,M=0,v=0,k=0,D=0,N=0,C=0,a=0,B=0,Q=null,ee=0,ce=new d.Buf16(16),ue=new d.Buf16(16),we=null,ae=0;for(o=0;o<=15;o++)ce[o]=0;for(y=0;y=1&&0===ce[v];v--);if(k>v&&(k=v),0===v)return m[_++]=20971520,m[_++]=20971520,S.bits=1,0;for(M=1;M0&&(0===b||1!==v))return-1;for(ue[1]=0,o=1;o<15;o++)ue[o+1]=ue[o]+ce[o];for(y=0;y852||2===b&&a>592)return 1;for(;;){H=o-N,w[y]G?(j=we[ae+w[y]],K=Q[ee+w[y]]):(j=96,K=0),I=1<>N)+(P-=I)]=H<<24|j<<16|K|0}while(0!==P);for(I=1<>=1;if(0!==I?(B&=I-1,B+=I):B=0,y++,0==--ce[o]){if(o===v)break;o=l[h+w[y]]}if(o>k&&(B&V)!==L){for(0===N&&(N=k),W+=M,C=1<<(D=o-N);D+N852||2===b&&a>592)return 1;m[L=B&V]=k<<24|D<<16|W-_|0}}return 0!==B&&(m[W+B]=o-N<<24|64<<16|0),S.bits=k,0}},78021:z=>{"use strict";z.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},25280:(z,O,E)=>{"use strict";var d=E(21307);function x(xe){for(var Ce=xe.length;--Ce>=0;)xe[Ce]=0}var P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],V=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(576);x(G);var H=new Array(60);x(H);var j=new Array(512);x(j);var K=new Array(256);x(K);var R=new Array(29);x(R);var o,y,M,v=new Array(30);function k(xe,Ce,ke,me,Ee){this.static_tree=xe,this.extra_bits=Ce,this.extra_base=ke,this.elems=me,this.max_length=Ee,this.has_stree=xe&&xe.length}function D(xe,Ce){this.dyn_tree=xe,this.max_code=0,this.stat_desc=Ce}function N(xe){return xe<256?j[xe]:j[256+(xe>>>7)]}function C(xe,Ce){xe.pending_buf[xe.pending++]=255&Ce,xe.pending_buf[xe.pending++]=Ce>>>8&255}function a(xe,Ce,ke){xe.bi_valid>16-ke?(xe.bi_buf|=Ce<>16-xe.bi_valid,xe.bi_valid+=ke-16):(xe.bi_buf|=Ce<>>=1,ke<<=1}while(--Ce>0);return ke>>>1}function ee(xe,Ce,ke){var me,Ee,ze=new Array(16),Ve=0;for(me=1;me<=15;me++)ze[me]=Ve=Ve+ke[me-1]<<1;for(Ee=0;Ee<=Ce;Ee++){var nt=xe[2*Ee+1];0!==nt&&(xe[2*Ee]=Q(ze[nt]++,nt))}}function ce(xe){var Ce;for(Ce=0;Ce<286;Ce++)xe.dyn_ltree[2*Ce]=0;for(Ce=0;Ce<30;Ce++)xe.dyn_dtree[2*Ce]=0;for(Ce=0;Ce<19;Ce++)xe.bl_tree[2*Ce]=0;xe.dyn_ltree[512]=1,xe.opt_len=xe.static_len=0,xe.last_lit=xe.matches=0}function ue(xe){xe.bi_valid>8?C(xe,xe.bi_buf):xe.bi_valid>0&&(xe.pending_buf[xe.pending++]=xe.bi_buf),xe.bi_buf=0,xe.bi_valid=0}function we(xe,Ce,ke,me){var Ee=2*Ce,ze=2*ke;return xe[Ee]>1;ke>=1;ke--)ae(xe,ze,ke);Ee=tt;do{ke=xe.heap[1],xe.heap[1]=xe.heap[xe.heap_len--],ae(xe,ze,1),me=xe.heap[1],xe.heap[--xe.heap_max]=ke,xe.heap[--xe.heap_max]=me,ze[2*Ee]=ze[2*ke]+ze[2*me],xe.depth[Ee]=(xe.depth[ke]>=xe.depth[me]?xe.depth[ke]:xe.depth[me])+1,ze[2*ke+1]=ze[2*me+1]=Ee,xe.heap[1]=Ee++,ae(xe,ze,1)}while(xe.heap_len>=2);xe.heap[--xe.heap_max]=xe.heap[1],function(ht,wt){var Pt,st,Ye,gt,St,Wt,dn=wt.dyn_tree,Nt=wt.max_code,It=wt.stat_desc.static_tree,qt=wt.stat_desc.has_stree,jt=wt.stat_desc.extra_bits,Yt=wt.stat_desc.extra_base,Wn=wt.stat_desc.max_length,fn=0;for(gt=0;gt<=15;gt++)ht.bl_count[gt]=0;for(dn[2*ht.heap[ht.heap_max]+1]=0,Pt=ht.heap_max+1;Pt<573;Pt++)(gt=dn[2*dn[2*(st=ht.heap[Pt])+1]+1]+1)>Wn&&(gt=Wn,fn++),dn[2*st+1]=gt,st>Nt||(ht.bl_count[gt]++,St=0,st>=Yt&&(St=jt[st-Yt]),ht.opt_len+=(Wt=dn[2*st])*(gt+St),qt&&(ht.static_len+=Wt*(It[2*st+1]+St)));if(0!==fn){do{for(gt=Wn-1;0===ht.bl_count[gt];)gt--;ht.bl_count[gt]--,ht.bl_count[gt+1]+=2,ht.bl_count[Wn]--,fn-=2}while(fn>0);for(gt=Wn;0!==gt;gt--)for(st=ht.bl_count[gt];0!==st;)(Ye=ht.heap[--Pt])>Nt||(dn[2*Ye+1]!==gt&&(ht.opt_len+=(gt-dn[2*Ye+1])*dn[2*Ye],dn[2*Ye+1]=gt),st--)}}(xe,Ce),ee(ze,mt,xe.bl_count)}function X(xe,Ce,ke){var me,Ee,ze=-1,Ve=Ce[1],nt=0,tt=7,mt=4;for(0===Ve&&(tt=138,mt=3),Ce[2*(ke+1)+1]=65535,me=0;me<=ke;me++)Ee=Ve,Ve=Ce[2*(me+1)+1],++nt>=7;Ee<30;Ee++)for(v[Ee]=ze<<7,Ce=0;Ce<1<0?(2===xe.strm.data_type&&(xe.strm.data_type=function(nt){var tt,mt=4093624447;for(tt=0;tt<=31;tt++,mt>>>=1)if(1&mt&&0!==nt.dyn_ltree[2*tt])return 0;if(0!==nt.dyn_ltree[18]||0!==nt.dyn_ltree[20]||0!==nt.dyn_ltree[26])return 1;for(tt=32;tt<256;tt++)if(0!==nt.dyn_ltree[2*tt])return 1;return 0}(xe)),le(xe,xe.l_desc),le(xe,xe.d_desc),Ve=function(nt){var tt;for(X(nt,nt.dyn_ltree,nt.l_desc.max_code),X(nt,nt.dyn_dtree,nt.d_desc.max_code),le(nt,nt.bl_desc),tt=18;tt>=3&&0===nt.bl_tree[2*W[tt]+1];tt--);return nt.opt_len+=3*(tt+1)+5+5+4,tt}(xe),(ze=xe.static_len+3+7>>>3)<=(Ee=xe.opt_len+3+7>>>3)&&(Ee=ze)):Ee=ze=ke+5,ke+4<=Ee&&-1!==Ce?_e(xe,Ce,ke,me):4===xe.strategy||ze===Ee?(a(xe,2+(me?1:0),3),Te(xe,G,H)):(a(xe,4+(me?1:0),3),function(nt,tt,mt,ht){var wt;for(a(nt,tt-257,5),a(nt,mt-1,5),a(nt,ht-4,4),wt=0;wt>>8&255,xe.pending_buf[xe.d_buf+2*xe.last_lit+1]=255&Ce,xe.pending_buf[xe.l_buf+xe.last_lit]=255&ke,xe.last_lit++,0===Ce?xe.dyn_ltree[2*ke]++:(xe.matches++,Ce--,xe.dyn_ltree[2*(K[ke]+256+1)]++,xe.dyn_dtree[2*N(Ce)]++),xe.last_lit===xe.lit_bufsize-1},O._tr_align=function(xe){var Ce;a(xe,2,3),B(xe,256,G),16===(Ce=xe).bi_valid?(C(Ce,Ce.bi_buf),Ce.bi_buf=0,Ce.bi_valid=0):Ce.bi_valid>=8&&(Ce.pending_buf[Ce.pending++]=255&Ce.bi_buf,Ce.bi_buf>>=8,Ce.bi_valid-=8)}},47563:z=>{"use strict";z.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},81823:(z,O,E)=>{"use strict";var d=E(68357);O.certificate=E(41320);var x=d.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});O.RSAPrivateKey=x;var f=d.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});O.RSAPublicKey=f;var T=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(g),this.key("subjectPublicKey").bitstr())});O.PublicKey=T;var g=d.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),b=d.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(g),this.key("subjectPrivateKey").octstr())});O.PrivateKey=b;var l=d.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});O.EncryptedPrivateKey=l;var h=d.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});O.DSAPrivateKey=h,O.DSAparam=d.define("DSAparam",function(){this.int()});var u=d.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(m),this.key("publicKey").optional().explicit(1).bitstr())});O.ECPrivateKey=u;var m=d.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});O.signature=d.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},41320:(z,O,E)=>{"use strict";var d=E(68357),x=d.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),f=d.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),T=d.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),g=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(T),this.key("subjectPublicKey").bitstr())}),b=d.define("RelativeDistinguishedName",function(){this.setof(f)}),l=d.define("RDNSequence",function(){this.seqof(b)}),h=d.define("Name",function(){this.choice({rdnSequence:this.use(l)})}),u=d.define("Validity",function(){this.seq().obj(this.key("notBefore").use(x),this.key("notAfter").use(x))}),m=d.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),_=d.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(T),this.key("issuer").use(h),this.key("validity").use(u),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(g),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(m).optional())}),w=d.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(_),this.key("signatureAlgorithm").use(T),this.key("signatureValue").bitstr())});z.exports=w},64988:(z,O,E)=>{"use strict";var d=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,x=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,f=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,T=E(27085),g=E(98073),b=E(48850).Buffer;z.exports=function(l,h){var u,m=l.toString(),_=m.match(d);if(_){var w="aes"+_[1],S=b.from(_[2],"hex"),I=b.from(_[3].replace(/[\r\n]/g,""),"base64"),P=T(h,S.slice(0,8),parseInt(_[1],10)).key,L=[],V=g.createDecipheriv(w,P,S);L.push(V.update(I)),L.push(V.final()),u=b.concat(L)}else{var W=m.match(f);u=b.from(W[2].replace(/[\r\n]/g,""),"base64")}return{tag:m.match(x)[1],data:u}}},27552:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(81823),f=E(22562),T=E(64988),g=E(98073),b=E(54192),l=E(48850).Buffer;function h(u){var m;"object"!==(0,d.default)(u)||l.isBuffer(u)||(m=u.passphrase,u=u.key),"string"==typeof u&&(u=l.from(u));var _,w,L,V,W,G,H,j,K,R,o,y,M,S=T(u,m),I=S.tag,P=S.data;switch(I){case"CERTIFICATE":w=x.certificate.decode(P,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(w||(w=x.PublicKey.decode(P,"der")),_=w.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return x.RSAPublicKey.decode(w.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return w.subjectPrivateKey=w.subjectPublicKey,{type:"ec",data:w};case"1.2.840.10040.4.1":return w.algorithm.params.pub_key=x.DSAparam.decode(w.subjectPublicKey.data,"der"),{type:"dsa",data:w.algorithm.params};default:throw new Error("unknown key id "+_)}case"ENCRYPTED PRIVATE KEY":V=m,W=(L=P=x.EncryptedPrivateKey.decode(P,"der")).algorithm.decrypt.kde.kdeparams.salt,G=parseInt(L.algorithm.decrypt.kde.kdeparams.iters.toString(),10),H=f[L.algorithm.decrypt.cipher.algo.join(".")],j=L.algorithm.decrypt.cipher.iv,K=L.subjectPrivateKey,R=parseInt(H.split("-")[1],10)/8,o=b.pbkdf2Sync(V,W,G,R,"sha1"),y=g.createDecipheriv(H,o,j),(M=[]).push(y.update(K)),M.push(y.final()),P=l.concat(M);case"PRIVATE KEY":switch(_=(w=x.PrivateKey.decode(P,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return x.RSAPrivateKey.decode(w.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:w.algorithm.curve,privateKey:x.ECPrivateKey.decode(w.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return w.algorithm.params.priv_key=x.DSAparam.decode(w.subjectPrivateKey,"der"),{type:"dsa",params:w.algorithm.params};default:throw new Error("unknown key id "+_)}case"RSA PUBLIC KEY":return x.RSAPublicKey.decode(P,"der");case"RSA PRIVATE KEY":return x.RSAPrivateKey.decode(P,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:x.DSAPrivateKey.decode(P,"der")};case"EC PRIVATE KEY":return{curve:(P=x.ECPrivateKey.decode(P,"der")).parameters.value,privateKey:P.privateKey};default:throw new Error("unknown key type "+I)}}z.exports=h,h.signature=x.signature},48209:z=>{"use strict";var O=function(E){return E.replace(/^\s+|\s+$/g,"")};z.exports=function(E){if(!E)return{};for(var x={},f=O(E).split("\n"),T=0;T{"use strict";O.pbkdf2=E(1882),O.pbkdf2Sync=E(1658)},1882:(z,O,E)=>{"use strict";var d,x,f=E(48850).Buffer,T=E(63127),g=E(77401),b=E(1658),l=E(98398),h=E.g.crypto&&E.g.crypto.subtle,u={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function _(){return x||(x=E.g.process&&E.g.process.nextTick?E.g.process.nextTick:E.g.queueMicrotask?E.g.queueMicrotask:E.g.setImmediate?E.g.setImmediate:E.g.setTimeout)}function w(S,I,P,L,V){return h.importKey("raw",S,{name:"PBKDF2"},!1,["deriveBits"]).then(function(W){return h.deriveBits({name:"PBKDF2",salt:I,iterations:P,hash:{name:V}},W,L<<3)}).then(function(W){return f.from(W)})}z.exports=function(S,I,P,L,V,W){"function"==typeof V&&(W=V,V=void 0);var H,j,G=u[(V=V||"sha1").toLowerCase()];if(G&&"function"==typeof E.g.Promise){if(T(P,L),S=l(S,g,"Password"),I=l(I,g,"Salt"),"function"!=typeof W)throw new Error("No callback provided to pbkdf2");H=function(H){if(E.g.process&&!E.g.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(void 0!==m[H])return m[H];var j=w(d=d||f.alloc(8),d,10,128,H).then(function(){return!0}).catch(function(){return!1});return m[H]=j,j}(G).then(function(H){return H?w(S,I,P,L,G):b(S,I,P,L,V)}),j=W,H.then(function(K){_()(function(){j(null,K)})},function(K){_()(function(){j(K)})})}else _()(function(){var H;try{H=b(S,I,P,L,V)}catch(j){return W(j)}W(null,H)})}},77401:(z,O,E)=>{"use strict";var d,x=E(19142);d=E.g.process&&E.g.process.browser?"utf-8":E.g.process&&E.g.process.version?parseInt(x.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",z.exports=d},63127:z=>{"use strict";var O=Math.pow(2,30)-1;z.exports=function(E,d){if("number"!=typeof E)throw new TypeError("Iterations not a number");if(E<0)throw new TypeError("Bad iterations");if("number"!=typeof d)throw new TypeError("Key length not a number");if(d<0||d>O||d!=d)throw new TypeError("Bad key length")}},1658:(z,O,E)=>{"use strict";var d=E(55349),x=E(26707),f=E(51708),T=E(48850).Buffer,g=E(63127),b=E(77401),l=E(98398),h=T.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function m(_,w,S){var H,I="rmd160"===(H=_)||"ripemd160"===H?function(j){return(new x).update(j).digest()}:"md5"===H?d:function(j){return f(H).update(j).digest()},P="sha512"===_||"sha384"===_?128:64;w.length>P?w=I(w):w.length{"use strict";var d=E(48850).Buffer;z.exports=function(x,f,T){if(d.isBuffer(x))return x;if("string"==typeof x)return d.from(x,f);if(ArrayBuffer.isView(x))return d.from(x.buffer);throw new TypeError(T+" must be a string, a Buffer, a typed array or a DataView")}},19142:z=>{"use strict";var O,E,d=z.exports={};function x(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}function T(S){if(O===setTimeout)return setTimeout(S,0);if((O===x||!O)&&setTimeout)return O=setTimeout,setTimeout(S,0);try{return O(S,0)}catch{try{return O.call(null,S,0)}catch{return O.call(this,S,0)}}}!function(){try{O="function"==typeof setTimeout?setTimeout:x}catch{O=x}try{E="function"==typeof clearTimeout?clearTimeout:f}catch{E=f}}();var g,b=[],l=!1,h=-1;function u(){l&&g&&(l=!1,g.length?b=g.concat(b):h=-1,b.length&&m())}function m(){if(!l){var S=T(u);l=!0;for(var I=b.length;I;){for(g=b,b=[];++h1)for(var P=1;P{"use strict";O.publicEncrypt=E(82466),O.privateDecrypt=E(53144),O.privateEncrypt=function(d,x){return O.publicEncrypt(d,x,!0)},O.publicDecrypt=function(d,x){return O.privateDecrypt(d,x,!0)}},26873:(z,O,E)=>{"use strict";var d=E(35866),x=E(48850).Buffer;function f(T){var g=x.allocUnsafe(4);return g.writeUInt32BE(T,0),g}z.exports=function(T,g){for(var b,l=x.alloc(0),h=0;l.length{"use strict";var d=E(27552),x=E(26873),f=E(27223),T=E(31734),g=E(99782),b=E(35866),l=E(2561),h=E(48850).Buffer;z.exports=function(u,m,_){var w;w=u.padding?u.padding:_?1:4;var S,I=d(u),P=I.modulus.byteLength();if(m.length>P||new T(m).cmp(I.modulus)>=0)throw new Error("decryption error");S=_?l(new T(m),I):g(m,I);var L=h.alloc(P-S.length);if(S=h.concat([L,S],P),4===w)return function(V,W){var G=V.modulus.byteLength(),H=b("sha1").update(h.alloc(0)).digest(),j=H.length;if(0!==W[0])throw new Error("decryption error");var K=W.slice(1,j+1),R=W.slice(j+1),o=f(K,x(R,j)),y=f(R,x(o,G-j-1));if(function(v,k){v=h.from(v),k=h.from(k);var D=0,N=v.length;v.length!==k.length&&(D++,N=Math.min(v.length,k.length));for(var C=-1;++C=W.length){K++;break}var R=W.slice(2,j-1);if(("0002"!==H.toString("hex")&&!G||"0001"!==H.toString("hex")&&G)&&K++,R.length<8&&K++,K)throw new Error("decryption error");return W.slice(j)}(0,S,_);if(3===w)return S;throw new Error("unknown padding")}},82466:(z,O,E)=>{"use strict";var d=E(27552),x=E(75010),f=E(35866),T=E(26873),g=E(27223),b=E(31734),l=E(2561),h=E(99782),u=E(48850).Buffer;z.exports=function(m,_,w){var S;S=m.padding?m.padding:w?1:4;var I,P=d(m);if(4===S)I=function(L,V){var W=L.modulus.byteLength(),G=V.length,H=f("sha1").update(u.alloc(0)).digest(),j=H.length,K=2*j;if(G>W-K-2)throw new Error("message too long");var R=u.alloc(W-G-K-2),o=W-j-1,y=x(j),M=g(u.concat([H,R,u.alloc(1,1),V],o),T(y,o)),v=g(y,T(M,j));return new b(u.concat([u.alloc(1),v,M],W))}(P,_);else if(1===S)I=function(L,V,W){var G,H=V.length,j=L.modulus.byteLength();if(H>j-11)throw new Error("message too long");return G=W?u.alloc(j-H-3,255):function(K){for(var R,o=u.allocUnsafe(K),y=0,M=x(2*K),v=0;y=0)throw new Error("data too long for modulus")}return w?h(I,P):l(I,P)}},2561:(z,O,E)=>{"use strict";var d=E(31734),x=E(48850).Buffer;z.exports=function(f,T){return x.from(f.toRed(d.mont(T.modulus)).redPow(new d(T.publicExponent)).fromRed().toArray())}},27223:z=>{"use strict";z.exports=function(O,E){for(var d=O.length,x=-1;++x{"use strict";var d=E(28847)(E(3355)),x=E(22028),f=E(33103),T=E(80034);function g(u,m){return m.encode?m.strict?x(u):encodeURIComponent(u):u}function b(u){return Array.isArray(u)?u.sort():"object"===(0,d.default)(u)?b(Object.keys(u)).sort(function(m,_){return Number(m)-Number(_)}).map(function(m){return u[m]}):u}function l(u){var m=u.indexOf("?");return-1===m?"":u.slice(m+1)}function h(u,m){var _=function(S){var I;switch(S.arrayFormat){case"index":return function(P,L,V){I=/\[(\d*)\]$/.exec(P),P=P.replace(/\[\d*\]$/,""),I?(void 0===V[P]&&(V[P]={}),V[P][I[1]]=L):V[P]=L};case"bracket":return function(P,L,V){I=/(\[\])$/.exec(P),V[P=P.replace(/\[\]$/,"")]=I?void 0!==V[P]?[].concat(V[P],L):[L]:L};default:return function(P,L,V){V[P]=void 0!==V[P]?[].concat(V[P],L):L}}}(m=f({arrayFormat:"none"},m)),w=Object.create(null);return"string"!=typeof u?w:(u=u.trim().replace(/^[?#&]/,""))?(u.split("&").forEach(function(S){var I=S.replace(/\+/g," ").split("="),P=I.shift(),L=I.length>0?I.join("="):void 0;L=void 0===L?null:T(L),_(T(P),L,w)}),Object.keys(w).sort().reduce(function(S,I){var P=w[I];return S[I]=Boolean(P)&&"object"===(0,d.default)(P)&&!Array.isArray(P)?b(P):P,S},Object.create(null))):w}O.extract=l,O.parse=h,O.stringify=function(u,m){!1===(m=f({encode:!0,strict:!0,arrayFormat:"none"},m)).sort&&(m.sort=function(){});var _=function(w){switch(w.arrayFormat){case"index":return function(S,I,P){return null===I?[g(S,w),"[",P,"]"].join(""):[g(S,w),"[",g(P,w),"]=",g(I,w)].join("")};case"bracket":return function(S,I){return null===I?g(S,w):[g(S,w),"[]=",g(I,w)].join("")};default:return function(S,I){return null===I?g(S,w):[g(S,w),"=",g(I,w)].join("")}}}(m);return u?Object.keys(u).sort(m.sort).map(function(w){var S=u[w];if(void 0===S)return"";if(null===S)return g(w,m);if(Array.isArray(S)){var I=[];return S.slice().forEach(function(P){void 0!==P&&I.push(_(w,P,I.length))}),I.join("&")}return g(w,m)+"="+g(S,m)}).filter(function(w){return w.length>0}).join("&"):""},O.parseUrl=function(u,m){return{url:u.split("?")[0]||"",query:h(l(u),m)}}},75010:(z,O,E)=>{"use strict";var d=E(19142),x=65536,f=E(48850).Buffer,T=E.g.crypto||E.g.msCrypto;z.exports=T&&T.getRandomValues?function(g,b){if(g>4294967295)throw new RangeError("requested too many random bytes");var l=f.allocUnsafe(g);if(g>0)if(g>x)for(var h=0;h{"use strict";var d=E(19142);function x(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var f=E(48850),T=E(75010),g=f.Buffer,b=f.kMaxLength,l=E.g.crypto||E.g.msCrypto,h=Math.pow(2,32)-1;function u(w,S){if("number"!=typeof w||w!=w)throw new TypeError("offset must be a number");if(w>h||w<0)throw new TypeError("offset must be a uint32");if(w>b||w>S)throw new RangeError("offset out of range")}function m(w,S,I){if("number"!=typeof w||w!=w)throw new TypeError("size must be a number");if(w>h||w<0)throw new TypeError("size must be a uint32");if(w+S>I||w>b)throw new RangeError("buffer too small")}function _(w,S,I,P){if(d.browser){var V=new Uint8Array(w.buffer,S,I);return l.getRandomValues(V),P?void d.nextTick(function(){P(null,w)}):w}if(!P)return T(I).copy(w,S),w;T(I,function(W,G){if(W)return P(W);G.copy(w,S),P(null,w)})}l&&l.getRandomValues||!d.browser?(O.randomFill=function(w,S,I,P){if(!(g.isBuffer(w)||w instanceof E.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof S)P=S,S=0,I=w.length;else if("function"==typeof I)P=I,I=w.length-S;else if("function"!=typeof P)throw new TypeError('"cb" argument must be a function');return u(S,w.length),m(I,S,w.length),_(w,S,I,P)},O.randomFillSync=function(w,S,I){if(void 0===S&&(S=0),!(g.isBuffer(w)||w instanceof E.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return u(S,w.length),void 0===I&&(I=w.length-S),m(I,S,w.length),_(w,S,I)}):(O.randomFill=x,O.randomFillSync=x)},79024:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x={};function f(g,b,l){l||(l=Error);var h=function(u){var m,_;function w(S,I,P){return u.call(this,"string"==typeof b?b:b(S,I,P))||this}return _=u,(m=w).prototype=Object.create(_.prototype),m.prototype.constructor=m,m.__proto__=_,w}(l);h.prototype.name=l.name,h.prototype.code=g,x[g]=h}function T(g,b){if(Array.isArray(g)){var l=g.length;return g=g.map(function(h){return String(h)}),l>2?"one of ".concat(b," ").concat(g.slice(0,l-1).join(", "),", or ")+g[l-1]:2===l?"one of ".concat(b," ").concat(g[0]," or ").concat(g[1]):"of ".concat(b," ").concat(g[0])}return"of ".concat(b," ").concat(String(g))}f("ERR_INVALID_OPT_VALUE",function(g,b){return'The value "'+b+'" is invalid for option "'+g+'"'},TypeError),f("ERR_INVALID_ARG_TYPE",function(g,b,l){var h,m,_,w,I,L;if("string"==typeof b&&"not "===b.substr(0,"not ".length)?(h="must not be",b=b.replace(/^not /,"")):h="must be",I=g,(void 0===L||L>I.length)&&(L=I.length)," argument"===I.substring(L-" argument".length,L))m="The ".concat(g," ").concat(h," ").concat(T(b,"type"));else{var S=("number"!=typeof w&&(w=0),w+".".length>(_=g).length||-1===_.indexOf(".",w)?"argument":"property");m='The "'.concat(g,'" ').concat(S," ").concat(h," ").concat(T(b,"type"))}return m+". Received type ".concat((0,d.default)(l))},TypeError),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),f("ERR_METHOD_NOT_IMPLEMENTED",function(g){return"The "+g+" method is not implemented"}),f("ERR_STREAM_PREMATURE_CLOSE","Premature close"),f("ERR_STREAM_DESTROYED",function(g){return"Cannot call "+g+" after a stream was destroyed"}),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),f("ERR_STREAM_WRITE_AFTER_END","write after end"),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_UNKNOWN_ENCODING",function(g){return"Unknown encoding: "+g},TypeError),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),z.exports.q=x},76884:(z,O,E)=>{"use strict";var d=E(19142),x=Object.keys||function(_){var w=[];for(var S in _)w.push(S);return w};z.exports=h;var f=E(6297),T=E(71471);E(41736)(h,f);for(var g=x(T.prototype),b=0;b{"use strict";z.exports=x;var d=E(99154);function x(f){if(!(this instanceof x))return new x(f);d.call(this,f)}E(41736)(x,d),x.prototype._transform=function(f,T,g){g(null,f)}},6297:(z,O,E)=>{"use strict";var d,x=E(19142);z.exports=R,R.ReadableState=K,E(38291);var f,T=function(Te,le){return Te.listeners(le).length},g=E(37144),b=E(29033).Buffer,l=E.g.Uint8Array||function(){},h=E(94616);f=h&&h.debuglog?h.debuglog("stream"):function(){};var u,m,_,w=E(25392),S=E(57572),I=E(6756).getHighWaterMark,P=E(79024).q,L=P.ERR_INVALID_ARG_TYPE,V=P.ERR_STREAM_PUSH_AFTER_EOF,W=P.ERR_METHOD_NOT_IMPLEMENTED,G=P.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;E(41736)(R,g);var H=S.errorOrDestroy,j=["error","close","destroy","pause","resume"];function K(Te,le,X){d=d||E(76884),"boolean"!=typeof X&&(X=le instanceof d),this.objectMode=!!(Te=Te||{}).objectMode,X&&(this.objectMode=this.objectMode||!!Te.readableObjectMode),this.highWaterMark=I(this,Te,"readableHighWaterMark",X),this.buffer=new w,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!==Te.emitClose,this.autoDestroy=!!Te.autoDestroy,this.destroyed=!1,this.defaultEncoding=Te.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Te.encoding&&(u||(u=E(23462).s),this.decoder=new u(Te.encoding),this.encoding=Te.encoding)}function R(Te){if(d=d||E(76884),!(this instanceof R))return new R(Te);this._readableState=new K(Te,this,this instanceof d),this.readable=!0,Te&&("function"==typeof Te.read&&(this._read=Te.read),"function"==typeof Te.destroy&&(this._destroy=Te.destroy)),g.call(this)}function o(Te,le,X,ne,pe){f("readableAddChunk",le);var _e,Ce,ke,me,Ee,xe=Te._readableState;if(null===le)xe.reading=!1,function(Ce,ke){if(f("onEofChunk"),!ke.ended){if(ke.decoder){var me=ke.decoder.end();me&&me.length&&(ke.buffer.push(me),ke.length+=ke.objectMode?1:me.length)}ke.ended=!0,ke.sync?k(Ce):(ke.needReadable=!1,ke.emittedReadable||(ke.emittedReadable=!0,D(Ce)))}}(Te,xe);else if(pe||(Ce=xe,b.isBuffer(Ee=ke=le)||Ee instanceof l||"string"==typeof ke||void 0===ke||Ce.objectMode||(me=new L("chunk",["string","Buffer","Uint8Array"],ke)),_e=me),_e)H(Te,_e);else if(xe.objectMode||le&&le.length>0)if("string"==typeof le||xe.objectMode||Object.getPrototypeOf(le)===b.prototype||(le=function(Ce){return b.from(Ce)}(le)),ne)xe.endEmitted?H(Te,new G):y(Te,xe,le,!0);else if(xe.ended)H(Te,new V);else{if(xe.destroyed)return!1;xe.reading=!1,xe.decoder&&!X?(le=xe.decoder.write(le),xe.objectMode||0!==le.length?y(Te,xe,le,!1):N(Te,xe)):y(Te,xe,le,!1)}else ne||(xe.reading=!1,N(Te,xe));return!xe.ended&&(xe.lengthle.highWaterMark&&(le.highWaterMark=((X=Te)>=M?X=M:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X)),Te<=le.length?Te:le.ended?le.length:(le.needReadable=!0,0));var X}function k(Te){var le=Te._readableState;f("emitReadable",le.needReadable,le.emittedReadable),le.needReadable=!1,le.emittedReadable||(f("emitReadable",le.flowing),le.emittedReadable=!0,x.nextTick(D,Te))}function D(Te){var le=Te._readableState;f("emitReadable_",le.destroyed,le.length,le.ended),le.destroyed||!le.length&&!le.ended||(Te.emit("readable"),le.emittedReadable=!1),le.needReadable=!le.flowing&&!le.ended&&le.length<=le.highWaterMark,ee(Te)}function N(Te,le){le.readingMore||(le.readingMore=!0,x.nextTick(C,Te,le))}function C(Te,le){for(;!le.reading&&!le.ended&&(le.length0,le.resumeScheduled&&!le.paused?le.flowing=!0:Te.listenerCount("data")>0&&Te.resume()}function B(Te){f("readable nexttick read 0"),Te.read(0)}function Q(Te,le){f("resume",le.reading),le.reading||Te.read(0),le.resumeScheduled=!1,Te.emit("resume"),ee(Te),le.flowing&&!le.reading&&Te.read(0)}function ee(Te){var le=Te._readableState;for(f("flow",le.flowing);le.flowing&&null!==Te.read(););}function ce(Te,le){return 0===le.length?null:(le.objectMode?X=le.buffer.shift():!Te||Te>=le.length?(X=le.decoder?le.buffer.join(""):1===le.buffer.length?le.buffer.first():le.buffer.concat(le.length),le.buffer.clear()):X=le.buffer.consume(Te,le.decoder),X);var X}function ue(Te){var le=Te._readableState;f("endReadable",le.endEmitted),le.endEmitted||(le.ended=!0,x.nextTick(we,le,Te))}function we(Te,le){if(f("endReadableNT",Te.endEmitted,Te.length),!Te.endEmitted&&0===Te.length&&(Te.endEmitted=!0,le.readable=!1,le.emit("end"),Te.autoDestroy)){var X=le._writableState;(!X||X.autoDestroy&&X.finished)&&le.destroy()}}function ae(Te,le){for(var X=0,ne=Te.length;X=le.highWaterMark:le.length>0)||le.ended))return f("read: emitReadable",le.length,le.ended),0===le.length&&le.ended?ue(this):k(this),null;if(0===(Te=v(Te,le))&&le.ended)return 0===le.length&&ue(this),null;var ne,pe=le.needReadable;return f("need readable",pe),(0===le.length||le.length-Te0?ce(Te,le):null)?(le.needReadable=le.length<=le.highWaterMark,Te=0):(le.length-=Te,le.awaitDrain=0),0===le.length&&(le.ended||(le.needReadable=!0),X!==Te&&le.ended&&ue(this)),null!==ne&&this.emit("data",ne),ne},R.prototype._read=function(Te){H(this,new W("_read()"))},R.prototype.pipe=function(Te,le){var X=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=Te;break;case 1:ne.pipes=[ne.pipes,Te];break;default:ne.pipes.push(Te)}ne.pipesCount+=1,f("pipe count=%d opts=%j",ne.pipesCount,le);var pe=le&&!1===le.end||Te===x.stdout||Te===x.stderr?Ve:_e;function _e(){f("onend"),Te.end()}ne.endEmitted?x.nextTick(pe):X.once("end",pe),Te.on("unpipe",function nt(tt,mt){f("onunpipe"),tt===X&&mt&&!1===mt.hasUnpiped&&(mt.hasUnpiped=!0,f("cleanup"),Te.removeListener("close",Ee),Te.removeListener("finish",ze),Te.removeListener("drain",xe),Te.removeListener("error",me),Te.removeListener("unpipe",nt),X.removeListener("end",_e),X.removeListener("end",Ve),X.removeListener("data",ke),Ce=!0,!ne.awaitDrain||Te._writableState&&!Te._writableState.needDrain||xe())});var nt,xe=(nt=X,function(){var tt=nt._readableState;f("pipeOnDrain",tt.awaitDrain),tt.awaitDrain&&tt.awaitDrain--,0===tt.awaitDrain&&T(nt,"data")&&(tt.flowing=!0,ee(nt))});Te.on("drain",xe);var Ce=!1;function ke(nt){f("ondata");var tt=Te.write(nt);f("dest.write",tt),!1===tt&&((1===ne.pipesCount&&ne.pipes===Te||ne.pipesCount>1&&-1!==ae(ne.pipes,Te))&&!Ce&&(f("false write response, pause",ne.awaitDrain),ne.awaitDrain++),X.pause())}function me(nt){f("onerror",nt),Ve(),Te.removeListener("error",me),0===T(Te,"error")&&H(Te,nt)}function Ee(){Te.removeListener("finish",ze),Ve()}function ze(){f("onfinish"),Te.removeListener("close",Ee),Ve()}function Ve(){f("unpipe"),X.unpipe(Te)}return X.on("data",ke),function(nt,tt,mt){if("function"==typeof nt.prependListener)return nt.prependListener(tt,mt);nt._events&&nt._events[tt]?Array.isArray(nt._events[tt])?nt._events[tt].unshift(mt):nt._events[tt]=[mt,nt._events[tt]]:nt.on(tt,mt)}(Te,"error",me),Te.once("close",Ee),Te.once("finish",ze),Te.emit("pipe",X),ne.flowing||(f("pipe resume"),X.resume()),Te},R.prototype.unpipe=function(Te){var le=this._readableState,X={hasUnpiped:!1};if(0===le.pipesCount)return this;if(1===le.pipesCount)return Te&&Te!==le.pipes||(Te||(Te=le.pipes),le.pipes=null,le.pipesCount=0,le.flowing=!1,Te&&Te.emit("unpipe",this,X)),this;if(!Te){var ne=le.pipes,pe=le.pipesCount;le.pipes=null,le.pipesCount=0,le.flowing=!1;for(var _e=0;_e0,!1!==ne.flowing&&this.resume()):"readable"===Te&&(ne.endEmitted||ne.readableListening||(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,f("on readable",ne.length,ne.reading),ne.length?k(this):ne.reading||x.nextTick(B,this))),X},R.prototype.removeListener=function(Te,le){var X=g.prototype.removeListener.call(this,Te,le);return"readable"===Te&&x.nextTick(a,this),X},R.prototype.removeAllListeners=function(Te){var le=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==Te&&void 0!==Te||x.nextTick(a,this),le},R.prototype.resume=function(){var X,Te=this._readableState;return Te.flowing||(f("resume"),Te.flowing=!Te.readableListening,this,(X=Te).resumeScheduled||(X.resumeScheduled=!0,x.nextTick(Q,this,X))),Te.paused=!1,this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(Te){var le=this,X=this._readableState,ne=!1;for(var pe in Te.on("end",function(){if(f("wrapped end"),X.decoder&&!X.ended){var xe=X.decoder.end();xe&&xe.length&&le.push(xe)}le.push(null)}),Te.on("data",function(xe){f("wrapped data"),X.decoder&&(xe=X.decoder.write(xe)),X.objectMode&&null==xe||(X.objectMode||xe&&xe.length)&&(le.push(xe)||(ne=!0,Te.pause()))}),Te)void 0===this[pe]&&"function"==typeof Te[pe]&&(this[pe]=function(xe){return function(){return Te[xe].apply(Te,arguments)}}(pe));for(var _e=0;_e{"use strict";z.exports=h;var d=E(79024).q,x=d.ERR_METHOD_NOT_IMPLEMENTED,f=d.ERR_MULTIPLE_CALLBACK,T=d.ERR_TRANSFORM_ALREADY_TRANSFORMING,g=d.ERR_TRANSFORM_WITH_LENGTH_0,b=E(76884);function l(_,w){var S=this._transformState;S.transforming=!1;var I=S.writecb;if(null===I)return this.emit("error",new f);S.writechunk=null,S.writecb=null,null!=w&&this.push(w),I(_);var P=this._readableState;P.reading=!1,(P.needReadable||P.length{"use strict";var d,x=E(19142);function f(N){var C=this;this.next=null,this.entry=null,this.finish=function(){!function(a,B,Q){var ee=a.entry;for(a.entry=null;ee;){var ce=ee.callback;B.pendingcb--,ce(void 0),ee=ee.next}B.corkedRequestsFree.next=a}(C,N)}}z.exports=R,R.WritableState=K;var T,g={deprecate:E(96219)},b=E(37144),l=E(29033).Buffer,h=E.g.Uint8Array||function(){},u=E(57572),m=E(6756).getHighWaterMark,_=E(79024).q,w=_.ERR_INVALID_ARG_TYPE,S=_.ERR_METHOD_NOT_IMPLEMENTED,I=_.ERR_MULTIPLE_CALLBACK,P=_.ERR_STREAM_CANNOT_PIPE,L=_.ERR_STREAM_DESTROYED,V=_.ERR_STREAM_NULL_VALUES,W=_.ERR_STREAM_WRITE_AFTER_END,G=_.ERR_UNKNOWN_ENCODING,H=u.errorOrDestroy;function j(){}function K(N,C,a){d=d||E(76884),"boolean"!=typeof a&&(a=C instanceof d),this.objectMode=!!(N=N||{}).objectMode,a&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=m(this,N,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===N.decodeStrings),this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){!function(ee,ce){var le,ue=ee._writableState,we=ue.sync,ae=ue.writecb;if("function"!=typeof ae)throw new I;if((le=ue).writing=!1,le.writecb=null,le.length-=le.writelen,le.writelen=0,ce)!function(le,X,ne,pe,_e){--X.pendingcb,ne?(x.nextTick(_e,pe),x.nextTick(D,le,X),le._writableState.errorEmitted=!0,H(le,pe)):(_e(pe),le._writableState.errorEmitted=!0,H(le,pe),D(le,X))}(ee,ue,we,ce,ae);else{var Te=v(ue)||ee.destroyed;Te||ue.corked||ue.bufferProcessing||!ue.bufferedRequest||M(ee,ue),we?x.nextTick(y,ee,ue,Te,ae):y(ee,ue,Te,ae)}}(C,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==N.emitClose,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}function R(N){var C=this instanceof(d=d||E(76884));if(!C&&!T.call(R,this))return new R(N);this._writableState=new K(N,this,C),this.writable=!0,N&&("function"==typeof N.write&&(this._write=N.write),"function"==typeof N.writev&&(this._writev=N.writev),"function"==typeof N.destroy&&(this._destroy=N.destroy),"function"==typeof N.final&&(this._final=N.final)),b.call(this)}function o(N,C,a,B,Q,ee,ce){C.writelen=B,C.writecb=ce,C.writing=!0,C.sync=!0,C.destroyed?C.onwrite(new L("write")):a?N._writev(Q,C.onwrite):N._write(Q,ee,C.onwrite),C.sync=!1}function y(N,C,a,B){var Q,ee;a||(Q=N,0===(ee=C).length&&ee.needDrain&&(ee.needDrain=!1,Q.emit("drain"))),C.pendingcb--,B(),D(N,C)}function M(N,C){C.bufferProcessing=!0;var a=C.bufferedRequest;if(N._writev&&a&&a.next){var Q=new Array(C.bufferedRequestCount),ee=C.corkedRequestsFree;ee.entry=a;for(var ce=0,ue=!0;a;)Q[ce]=a,a.isBuf||(ue=!1),a=a.next,ce+=1;Q.allBuffers=ue,o(N,C,!0,C.length,Q,"",ee.finish),C.pendingcb++,C.lastBufferedRequest=null,ee.next?(C.corkedRequestsFree=ee.next,ee.next=null):C.corkedRequestsFree=new f(C),C.bufferedRequestCount=0}else{for(;a;){var we=a.chunk;if(o(N,C,!1,C.objectMode?1:we.length,we,a.encoding,a.callback),a=a.next,C.bufferedRequestCount--,C.writing)break}null===a&&(C.lastBufferedRequest=null)}C.bufferedRequest=a,C.bufferProcessing=!1}function v(N){return N.ending&&0===N.length&&null===N.bufferedRequest&&!N.finished&&!N.writing}function k(N,C){N._final(function(a){C.pendingcb--,a&&H(N,a),C.prefinished=!0,N.emit("prefinish"),D(N,C)})}function D(N,C){var Q,ee,a=v(C);if(a&&(Q=N,(ee=C).prefinished||ee.finalCalled||("function"!=typeof Q._final||ee.destroyed?(ee.prefinished=!0,Q.emit("prefinish")):(ee.pendingcb++,ee.finalCalled=!0,x.nextTick(k,Q,ee))),0===C.pendingcb&&(C.finished=!0,N.emit("finish"),C.autoDestroy))){var B=N._readableState;(!B||B.autoDestroy&&B.endEmitted)&&N.destroy()}return a}E(41736)(R,b),K.prototype.getBuffer=function(){for(var N=this.bufferedRequest,C=[];N;)C.push(N),N=N.next;return C},function(){try{Object.defineProperty(K.prototype,"buffer",{get:g.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(N){return!!T.call(this,N)||this===R&&N&&N._writableState instanceof K}})):T=function(N){return N instanceof this},R.prototype.pipe=function(){H(this,new P)},R.prototype.write=function(N,C,a){var B,ue,we,ae,Q=this._writableState,ee=!1,ce=!Q.objectMode&&(l.isBuffer(B=N)||B instanceof h);return ce&&!l.isBuffer(N)&&(N=l.from(N)),"function"==typeof C&&(a=C,C=null),ce?C="buffer":C||(C=Q.defaultEncoding),"function"!=typeof a&&(a=j),Q.ending?(ue=this,we=a,ae=new W,H(ue,ae),x.nextTick(we,ae)):(ce||function(ue,we,ae,Te){var le;return null===ae?le=new V:"string"==typeof ae||we.objectMode||(le=new w("chunk",["string","Buffer"],ae)),!le||(H(ue,le),x.nextTick(Te,le),!1)}(this,Q,N,a))&&(Q.pendingcb++,ee=function(ue,we,ae,Te,le,X){if(!ae){var ne=(ke=Te,(Ce=we).objectMode||!1===Ce.decodeStrings||"string"!=typeof ke||(ke=l.from(ke,le)),ke);Te!==ne&&(ae=!0,le="buffer",Te=ne)}var Ce,ke,pe=we.objectMode?1:Te.length;we.length+=pe;var _e=we.length-1))throw new G(N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(N,C,a){a(new S("_write()"))},R.prototype._writev=null,R.prototype.end=function(N,C,a){var Q,ee,ce,B=this._writableState;return"function"==typeof N?(a=N,N=null,C=null):"function"==typeof C&&(a=C,C=null),null!=N&&this.write(N,C),B.corked&&(B.corked=1,this.uncork()),B.ending||(Q=this,ce=a,(ee=B).ending=!0,D(Q,ee),ce&&(ee.finished?x.nextTick(ce):Q.once("finish",ce)),ee.ended=!0,Q.writable=!1),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),R.prototype.destroy=u.destroy,R.prototype._undestroy=u.undestroy,R.prototype._destroy=function(N,C){C(N)}},32317:(z,O,E)=>{"use strict";var d,x=E(19142);function f(V,W,G){return W in V?Object.defineProperty(V,W,{value:G,enumerable:!0,configurable:!0,writable:!0}):V[W]=G,V}var T=E(5831),g=Symbol("lastResolve"),b=Symbol("lastReject"),l=Symbol("error"),h=Symbol("ended"),u=Symbol("lastPromise"),m=Symbol("handlePromise"),_=Symbol("stream");function w(V,W){return{value:V,done:W}}function S(V){var W=V[g];if(null!==W){var G=V[_].read();null!==G&&(V[u]=null,V[g]=null,V[b]=null,W(w(G,!1)))}}function I(V){x.nextTick(S,V)}var P=Object.getPrototypeOf(function(){}),L=Object.setPrototypeOf((f(d={get stream(){return this[_]},next:function(){var V=this,W=this[l];if(null!==W)return Promise.reject(W);if(this[h])return Promise.resolve(w(void 0,!0));if(this[_].destroyed)return new Promise(function(K,R){x.nextTick(function(){V[l]?R(V[l]):K(w(void 0,!0))})});var G,K,R,H=this[u];if(H)G=new Promise((K=H,R=this,function(o,y){K.then(function(){R[h]?o(w(void 0,!0)):R[m](o,y)},y)}));else{var j=this[_].read();if(null!==j)return Promise.resolve(w(j,!1));G=new Promise(this[m])}return this[u]=G,G}},Symbol.asyncIterator,function(){return this}),f(d,"return",function(){var V=this;return new Promise(function(W,G){V[_].destroy(null,function(H){H?G(H):W(w(void 0,!0))})})}),d),P);z.exports=function(V){var W,G=Object.create(L,(f(W={},_,{value:V,writable:!0}),f(W,g,{value:null,writable:!0}),f(W,b,{value:null,writable:!0}),f(W,l,{value:null,writable:!0}),f(W,h,{value:V._readableState.endEmitted,writable:!0}),f(W,m,{value:function(H,j){var K=G[_].read();K?(G[u]=null,G[g]=null,G[b]=null,H(w(K,!1))):(G[g]=H,G[b]=j)},writable:!0}),W));return G[u]=null,T(V,function(H){if(H&&"ERR_STREAM_PREMATURE_CLOSE"!==H.code){var j=G[b];return null!==j&&(G[u]=null,G[g]=null,G[b]=null,j(H)),void(G[l]=H)}var K=G[g];null!==K&&(G[u]=null,G[g]=null,G[b]=null,K(w(void 0,!0))),G[h]=!0}),V.on("readable",I.bind(null,G)),G}},25392:(z,O,E)=>{"use strict";function d(l,h){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(l);h&&(m=m.filter(function(_){return Object.getOwnPropertyDescriptor(l,_).enumerable})),u.push.apply(u,m)}return u}function x(l,h,u){return h in l?Object.defineProperty(l,h,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[h]=u,l}var T=E(29033).Buffer,g=E(52361).inspect,b=g&&g.custom||"inspect";z.exports=function(){function l(){(function(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}var u;return u=[{key:"push",value:function(m){var _={data:m,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length}},{key:"unshift",value:function(m){var _={data:m,next:this.head};0===this.length&&(this.tail=_),this.head=_,++this.length}},{key:"shift",value:function(){if(0!==this.length){var m=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(0===this.length)return"";for(var _=this.head,w=""+_.data;_=_.next;)w+=m+_.data;return w}},{key:"concat",value:function(m){if(0===this.length)return T.alloc(0);for(var I=T.allocUnsafe(m>>>0),P=this.head,L=0;P;)T.prototype.copy.call(P.data,I,L),L+=P.data.length,P=P.next;return I}},{key:"consume",value:function(m,_){var w;return mI.length?I.length:m;if(S+=P===I.length?I:I.slice(0,m),0==(m-=P)){P===I.length?(++w,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=I.slice(P));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(m){var _=T.allocUnsafe(m),w=this.head,S=1;for(w.data.copy(_),m-=w.data.length;w=w.next;){var I=w.data,P=m>I.length?I.length:m;if(I.copy(_,_.length-m,0,P),0==(m-=P)){P===I.length?(++S,this.head=w.next?w.next:this.tail=null):(this.head=w,w.data=I.slice(P));break}++S}return this.length-=S,_}},{key:b,value:function(m,_){return g(this,function(w){for(var S=1;S{"use strict";var d=E(19142);function x(g,b){T(g,b),f(g)}function f(g){g._writableState&&!g._writableState.emitClose||g._readableState&&!g._readableState.emitClose||g.emit("close")}function T(g,b){g.emit("error",b)}z.exports={destroy:function(g,b){var l=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(b?b(g):g&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(T,this,g)):d.nextTick(T,this,g)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(m){!b&&m?l._writableState?l._writableState.errorEmitted?d.nextTick(f,l):(l._writableState.errorEmitted=!0,d.nextTick(x,l,m)):d.nextTick(x,l,m):b?(d.nextTick(f,l),b(m)):d.nextTick(f,l)}),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(g,b){var l=g._readableState,h=g._writableState;l&&l.autoDestroy||h&&h.autoDestroy?g.destroy(b):g.emit("error",b)}}},5831:(z,O,E)=>{"use strict";var d=E(79024).q.ERR_STREAM_PREMATURE_CLOSE;function x(){}z.exports=function f(T,g,b){if("function"==typeof g)return f(T,null,g);var V,W;g||(g={}),V=b||x,W=!1,b=function(){if(!W){W=!0;for(var G=arguments.length,H=new Array(G),j=0;j{"use strict";z.exports=function(){throw new Error("Readable.from is not available in the browser")}},60384:(z,O,E)=>{"use strict";var d,x=E(79024).q,f=x.ERR_MISSING_ARGS,T=x.ERR_STREAM_DESTROYED;function g(h){if(h)throw h}function b(h){h()}function l(h,u){return h.pipe(u)}z.exports=function(){for(var h=arguments.length,u=new Array(h),m=0;m0,function(V){_||(_=V),V&&S.forEach(b),L||(S.forEach(b),w(_))})});return u.reduce(l)}},6756:(z,O,E)=>{"use strict";var d=E(79024).q.ERR_INVALID_OPT_VALUE;z.exports={getHighWaterMark:function(x,f,T,g){var l,b=null!=(l=f).highWaterMark?l.highWaterMark:g?l[T]:null;if(null!=b){if(!isFinite(b)||Math.floor(b)!==b||b<0)throw new d(g?T:"highWaterMark",b);return Math.floor(b)}return x.objectMode?16:16384}}},37144:(z,O,E)=>{"use strict";z.exports=E(38291).EventEmitter},86505:(z,O,E)=>{"use strict";(O=z.exports=E(6297)).Stream=O,O.Readable=O,O.Writable=E(71471),O.Duplex=E(76884),O.Transform=E(99154),O.PassThrough=E(53582),O.finished=E(5831),O.pipeline=E(60384)},26707:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(41736),f=E(22353),T=new Array(16),g=[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],b=[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],l=[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],h=[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],u=[0,1518500249,1859775393,2400959708,2840853838],m=[1352829926,1548603684,1836072691,2053994217,0];function _(){f.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function w(W,G){return W<>>32-G}function S(W,G,H,j,K,R,o,y){return w(W+(G^H^j)+R+o|0,y)+K|0}function I(W,G,H,j,K,R,o,y){return w(W+(G&H|~G&j)+R+o|0,y)+K|0}function P(W,G,H,j,K,R,o,y){return w(W+((G|~H)^j)+R+o|0,y)+K|0}function L(W,G,H,j,K,R,o,y){return w(W+(G&j|H&~j)+R+o|0,y)+K|0}function V(W,G,H,j,K,R,o,y){return w(W+(G^(H|~j))+R+o|0,y)+K|0}x(_,f),_.prototype._update=function(){for(var W=T,G=0;G<16;++G)W[G]=this._block.readInt32LE(4*G);for(var H=0|this._a,j=0|this._b,K=0|this._c,R=0|this._d,o=0|this._e,y=0|this._a,M=0|this._b,v=0|this._c,k=0|this._d,D=0|this._e,N=0;N<80;N+=1){var C,a;N<16?(C=S(H,j,K,R,o,W[g[N]],u[0],l[N]),a=V(y,M,v,k,D,W[b[N]],m[0],h[N])):N<32?(C=I(H,j,K,R,o,W[g[N]],u[1],l[N]),a=L(y,M,v,k,D,W[b[N]],m[1],h[N])):N<48?(C=P(H,j,K,R,o,W[g[N]],u[2],l[N]),a=P(y,M,v,k,D,W[b[N]],m[2],h[N])):N<64?(C=L(H,j,K,R,o,W[g[N]],u[3],l[N]),a=I(y,M,v,k,D,W[b[N]],m[3],h[N])):(C=V(H,j,K,R,o,W[g[N]],u[4],l[N]),a=S(y,M,v,k,D,W[b[N]],m[4],h[N])),H=o,o=R,R=w(K,10),K=j,j=C,y=D,D=k,k=w(v,10),v=M,M=a}var B=this._b+K+k|0;this._b=this._c+R+D|0,this._c=this._d+o+y|0,this._d=this._e+H+M|0,this._e=this._a+j+v|0,this._a=B},_.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var W=d.alloc?d.alloc(20):new d(20);return W.writeInt32LE(this._a,0),W.writeInt32LE(this._b,4),W.writeInt32LE(this._c,8),W.writeInt32LE(this._d,12),W.writeInt32LE(this._e,16),W},z.exports=_},6905:(z,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.getLength=O.decode=O.encode=void 0;var x,f=(x=E(31734))&&x.__esModule?x:{default:x};function T(m,_){if("0"===m[0]&&"0"===m[1])throw new Error("invalid RLP: extra zeros");return parseInt(m,_)}function g(m,_){if(m<56)return d.from([m+_]);var w=h(m),S=h(_+55+w.length/2);return d.from(S+w,"hex")}function b(m){var _,w,S,I,P,L=[],V=m[0];if(V<=127)return{data:m.slice(0,1),remainder:m.slice(1)};if(V<=183){if(_=V-127,S=128===V?d.from([]):m.slice(1,_),2===_&&S[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:S,remainder:m.slice(_)}}if(V<=191){if(m.length-1<(w=V-182))throw new Error("invalid RLP: not enough bytes for string length");if((_=T(m.slice(1,w).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((S=m.slice(w,_+w)).length<_)throw new Error("invalid RLP: not enough bytes for string");return{data:S,remainder:m.slice(_+w)}}if(V<=247){for(I=m.slice(1,_=V-191);I.length;)P=b(I),L.push(P.data),I=P.remainder;return{data:L,remainder:m.slice(_)}}var W=(w=V-246)+(_=T(m.slice(1,w).toString("hex"),16));if(W>m.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(I=m.slice(w,W)).length)throw new Error("invalid rlp, List has a invalid length");for(;I.length;)P=b(I),L.push(P.data),I=P.remainder;return{data:L,remainder:m.slice(W)}}function l(m){return"0x"===m.slice(0,2)}function h(m){if(m<0)throw new Error("Invalid integer as argument, must be unsigned!");var _=m.toString(16);return _.length%2?"0"+_:_}function u(m){if(!d.isBuffer(m)){if("string"==typeof m)return l(m)?d.from((w="string"!=typeof(S=m)?S:l(S)?S.slice(2):S).length%2?"0"+w:w,"hex"):d.from(m);if("number"==typeof m||"bigint"==typeof m)return m?(_=h(m),d.from(_,"hex")):d.from([]);if(null==m)return d.from([]);if(m instanceof Uint8Array)return d.from(m);if(f.default.isBN(m))return d.from(m.toArray());throw new Error("invalid type")}var _,w,S;return m}O.encode=function m(_){if(Array.isArray(_)){for(var w=[],S=0;S<_.length;S++)w.push(m(_[S]));var I=d.concat(w);return d.concat([g(I.length,192),I])}var P=u(_);return 1===P.length&&P[0]<128?P:d.concat([g(P.length,128),P])},O.decode=function(m,_){if(void 0===_&&(_=!1),!m||0===m.length)return d.from([]);var w=b(u(m));if(_)return w;if(0!==w.remainder.length)throw new Error("invalid remainder");return w.data},O.getLength=function(m){if(!m||0===m.length)return d.from([]);var _=u(m),w=_[0];if(w<=127)return _.length;if(w<=183)return w-127;if(w<=191)return w-182;if(w<=247)return w-191;var S=w-246;return S+T(_.slice(1,S).toString("hex"),16)}},48850:(z,O,E)=>{"use strict";var d=E(29033),x=d.Buffer;function f(g,b){for(var l in g)b[l]=g[l]}function T(g,b,l){return x(g,b,l)}x.from&&x.alloc&&x.allocUnsafe&&x.allocUnsafeSlow?z.exports=d:(f(d,O),O.Buffer=T),T.prototype=Object.create(x.prototype),f(x,T),T.from=function(g,b,l){if("number"==typeof g)throw new TypeError("Argument must not be a number");return x(g,b,l)},T.alloc=function(g,b,l){if("number"!=typeof g)throw new TypeError("Argument must be a number");var h=x(g);return void 0!==b?"string"==typeof l?h.fill(b,l):h.fill(b):h.fill(0),h},T.allocUnsafe=function(g){if("number"!=typeof g)throw new TypeError("Argument must be a number");return x(g)},T.allocUnsafeSlow=function(g){if("number"!=typeof g)throw new TypeError("Argument must be a number");return d.SlowBuffer(g)}},11755:(z,O,E)=>{"use strict";var d,x=E(19142),f=E(28847)(E(3355)),T=E(29033),g=T.Buffer,b={};for(d in T)T.hasOwnProperty(d)&&"SlowBuffer"!==d&&"Buffer"!==d&&(b[d]=T[d]);var l=b.Buffer={};for(d in g)g.hasOwnProperty(d)&&"allocUnsafe"!==d&&"allocUnsafeSlow"!==d&&(l[d]=g[d]);if(b.Buffer.prototype=g.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(h,u,m){if("number"==typeof h)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,f.default)(h));if(h&&void 0===h.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,f.default)(h));return g(h,u,m)}),l.alloc||(l.alloc=function(h,u,m){if("number"!=typeof h)throw new TypeError('The "size" argument must be of type number. Received type '+(0,f.default)(h));if(h<0||h>=2*(1<<30))throw new RangeError('The value "'+h+'" is invalid for option "size"');var _=g(h);return u&&0!==u.length?"string"==typeof m?_.fill(u,m):_.fill(u):_.fill(0),_}),!b.kStringMaxLength)try{b.kStringMaxLength=x.binding("buffer").kStringMaxLength}catch{}b.constants||(b.constants={MAX_LENGTH:b.kMaxLength},b.kStringMaxLength&&(b.constants.MAX_STRING_LENGTH=b.kStringMaxLength)),z.exports=b},67799:z=>{"use strict";!function(O){var E=2147483647;function d(w){var 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]),I=1779033703,P=3144134277,L=1013904242,V=2773480762,W=1359893119,G=2600822924,H=528734635,j=1541459225,K=new Uint32Array(64);function R(N){for(var C=0,a=N.length;a>=64;){var B=I,Q=P,ee=L,ce=V,ue=W,we=G,ae=H,Te=j,le=void 0,X=void 0,ne=void 0,pe=void 0,_e=void 0;for(X=0;X<16;X++)K[X]=(255&N[ne=C+4*X])<<24|(255&N[ne+1])<<16|(255&N[ne+2])<<8|255&N[ne+3];for(X=16;X<64;X++)pe=((le=K[X-2])>>>17|le<<15)^(le>>>19|le<<13)^le>>>10,_e=((le=K[X-15])>>>7|le<<25)^(le>>>18|le<<14)^le>>>3,K[X]=(pe+K[X-7]|0)+(_e+K[X-16]|0)|0;for(X=0;X<64;X++)pe=(((ue>>>6|ue<<26)^(ue>>>11|ue<<21)^(ue>>>25|ue<<7))+(ue&we^~ue&ae)|0)+(Te+(S[X]+K[X]|0)|0)|0,_e=((B>>>2|B<<30)^(B>>>13|B<<19)^(B>>>22|B<<10))+(B&Q^B&ee^Q&ee)|0,Te=ae,ae=we,we=ue,ue=ce+pe|0,ce=ee,ee=Q,Q=B,B=pe+_e|0;I=I+B|0,P=P+Q|0,L=L+ee|0,V=V+ce|0,W=W+ue|0,G=G+we|0,H=H+ae|0,j=j+Te|0,C+=64,a-=64}}R(w);var o,y=w.length%64,M=w.length/536870912|0,v=w.length<<3,k=y<56?56:120,D=w.slice(w.length-y,w.length);for(D.push(128),o=y+1;o>>24&255),D.push(M>>>16&255),D.push(M>>>8&255),D.push(M>>>0&255),D.push(v>>>24&255),D.push(v>>>16&255),D.push(v>>>8&255),D.push(v>>>0&255),R(D),[I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,V>>>24&255,V>>>16&255,V>>>8&255,V>>>0&255,W>>>24&255,W>>>16&255,W>>>8&255,W>>>0&255,G>>>24&255,G>>>16&255,G>>>8&255,G>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255]}function x(w,S,I){w=w.length<=64?w:d(w);var P,L=64+S.length+4,V=new Array(L),W=new Array(64),G=[];for(P=0;P<64;P++)V[P]=54;for(P=0;P=L-4;j--){if(V[j]++,V[j]<=255)return;V[j]=0}}for(;I>=32;)H(),G=G.concat(d(W.concat(d(V)))),I-=32;return I>0&&(H(),G=G.concat(d(W.concat(d(V))).slice(0,I))),G}function f(w,S,I,P,L){var V;for(l(w,16*(2*I-1),L,0,16),V=0;V<2*I;V++)b(w,16*V,L,16),g(L,P),l(L,0,w,S+16*V,16);for(V=0;V>>32-S}function g(w,S){l(w,0,S,0,16);for(var I=8;I>0;I-=2)S[4]^=T(S[0]+S[12],7),S[8]^=T(S[4]+S[0],9),S[12]^=T(S[8]+S[4],13),S[0]^=T(S[12]+S[8],18),S[9]^=T(S[5]+S[1],7),S[13]^=T(S[9]+S[5],9),S[1]^=T(S[13]+S[9],13),S[5]^=T(S[1]+S[13],18),S[14]^=T(S[10]+S[6],7),S[2]^=T(S[14]+S[10],9),S[6]^=T(S[2]+S[14],13),S[10]^=T(S[6]+S[2],18),S[3]^=T(S[15]+S[11],7),S[7]^=T(S[3]+S[15],9),S[11]^=T(S[7]+S[3],13),S[15]^=T(S[11]+S[7],18),S[1]^=T(S[0]+S[3],7),S[2]^=T(S[1]+S[0],9),S[3]^=T(S[2]+S[1],13),S[0]^=T(S[3]+S[2],18),S[6]^=T(S[5]+S[4],7),S[7]^=T(S[6]+S[5],9),S[4]^=T(S[7]+S[6],13),S[5]^=T(S[4]+S[7],18),S[11]^=T(S[10]+S[9],7),S[8]^=T(S[11]+S[10],9),S[9]^=T(S[8]+S[11],13),S[10]^=T(S[9]+S[8],18),S[12]^=T(S[15]+S[14],7),S[13]^=T(S[12]+S[15],9),S[14]^=T(S[13]+S[12],13),S[15]^=T(S[14]+S[13],18);for(var P=0;P<16;++P)w[P]+=S[P]}function b(w,S,I,P){for(var L=0;L=256)return!1}return!0}function u(w,S){if("number"!=typeof w||w%1)throw new Error("invalid "+S);return w}function m(w,S,I,P,L,V,W){if(I=u(I,"N"),P=u(P,"r"),L=u(L,"p"),V=u(V,"dkLen"),0===I||0!=(I&I-1))throw new Error("N must be power of 2");if(I>E/128/P)throw new Error("N too large");if(P>E/128/L)throw new Error("r too large");if(!h(w))throw new Error("password must be an array or buffer");if(w=Array.prototype.slice.call(w),!h(S))throw new Error("salt must be an array or buffer");S=Array.prototype.slice.call(S);for(var G=x(w,S,128*L*P),H=new Uint32Array(32*L*P),j=0;jce&&(le=ce);for(var X=0;Xce&&(le=ce);for(var pe=0;pe>0&255),G.push(H[Ce]>>8&255),G.push(H[Ce]>>16&255),G.push(H[Ce]>>24&255);var ke=x(w,G,V);return W&&W(null,1,ke),ke}W&&ue(Te)};if(!W)for(;;){var ae=we();if(null!=ae)return ae}we()}z.exports={scrypt:function(w,S,I,P,L,V,W){return new Promise(function(G,H){var j=0;W&&W(0),m(w,S,I,P,L,V,function(K,R,o){if(K)H(K);else if(o)W&&1!==j&&W(1),G(new Uint8Array(o));else if(W&&R!==j)return j=R,W(R)})})},syncScrypt:function(w,S,I,P,L,V){return new Uint8Array(m(w,S,I,P,L,V))}}}()},57902:(z,O,E)=>{"use strict";z.exports=E(36922)(E(38123))},38123:(z,O,E)=>{"use strict";var d=new(E(36597).ec)("secp256k1"),x=d.curve,f=x.n.constructor;function T(b){var l=b[0];switch(l){case 2:case 3:return 33!==b.length?null:function(h,u){var m=new f(u);if(m.cmp(x.p)>=0)return null;var _=(m=m.toRed(x.red)).redSqr().redIMul(m).redIAdd(x.b).redSqrt();return 3===h!==_.isOdd()&&(_=_.redNeg()),d.keyPair({pub:{x:m,y:_}})}(l,b.subarray(1,33));case 4:case 6:case 7:return 65!==b.length?null:function(h,u,m){var _=new f(u),w=new f(m);if(_.cmp(x.p)>=0||w.cmp(x.p)>=0||(_=_.toRed(x.red),w=w.toRed(x.red),(6===h||7===h)&&w.isOdd()!==(7===h)))return null;var S=_.redSqr().redIMul(_);return w.redSqr().redISub(S.redIAdd(x.b)).isZero()?d.keyPair({pub:{x:_,y:w}}):null}(l,b.subarray(1,33),b.subarray(33,65));default:return null}}function g(b,l){for(var h=l.encode(null,33===b.length),u=0;u=0||(h.iadd(new f(b)),h.cmp(x.n)>=0&&h.isub(x.n),h.isZero()))return 1;var u=h.toArrayLike(Uint8Array,"be",32);return b.set(u),0},privateKeyTweakMul:function(b,l){var h=new f(l);if(h.cmp(x.n)>=0||h.isZero())return 1;h.imul(new f(b)),h.cmp(x.n)>=0&&(h=h.umod(x.n));var u=h.toArrayLike(Uint8Array,"be",32);return b.set(u),0},publicKeyVerify:function(b){return null===T(b)?1:0},publicKeyCreate:function(b,l){var h=new f(l);return h.cmp(x.n)>=0||h.isZero()?1:(g(b,d.keyFromPrivate(l).getPublic()),0)},publicKeyConvert:function(b,l){var h=T(l);return null===h?1:(g(b,h.getPublic()),0)},publicKeyNegate:function(b,l){var h=T(l);if(null===h)return 1;var u=h.getPublic();return u.y=u.y.redNeg(),g(b,u),0},publicKeyCombine:function(b,l){for(var h=new Array(l.length),u=0;u=0)return 2;var m=u.getPublic().add(x.g.mul(h));return m.isInfinity()?2:(g(b,m),0)},publicKeyTweakMul:function(b,l,h){var u=T(l);return null===u?1:(h=new f(h)).cmp(x.n)>=0||h.isZero()?2:(g(b,u.getPublic().mul(h)),0)},signatureNormalize:function(b){var l=new f(b.subarray(0,32)),h=new f(b.subarray(32,64));return l.cmp(x.n)>=0||h.cmp(x.n)>=0?1:(1===h.cmp(d.nh)&&b.set(x.n.sub(h).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(b,l){var h=l.subarray(0,32),u=l.subarray(32,64);if(new f(h).cmp(x.n)>=0||new f(u).cmp(x.n)>=0)return 1;var m=b.output,_=m.subarray(4,37);_[0]=0,_.set(h,1);for(var w=33,S=0;w>1&&0===_[S]&&!(128&_[S+1]);--w,++S);if(128&(_=_.subarray(S))[0]||w>1&&0===_[0]&&!(128&_[1]))return 1;var I=m.subarray(39,72);I[0]=0,I.set(u,1);for(var P=33,L=0;P>1&&0===I[L]&&!(128&I[L+1]);--P,++L);return 128&(I=I.subarray(L))[0]||P>1&&0===I[0]&&!(128&I[1])?1:(b.outputlen=6+w+P,m[0]=48,m[1]=b.outputlen-2,m[2]=2,m[3]=_.length,m.set(_,4),m[4+w]=2,m[5+w]=I.length,m.set(I,6+w),0)},signatureImport:function(b,l){if(l.length<8||l.length>72||48!==l[0]||l[1]!==l.length-2||2!==l[2])return 1;var h=l[3];if(0===h||5+h>=l.length||2!==l[4+h])return 1;var u=l[5+h];if(0===u||6+h+u!==l.length||128&l[4]||h>1&&0===l[4]&&!(128&l[5])||128&l[h+6]||u>1&&0===l[h+6]&&!(128&l[h+7]))return 1;var m=l.subarray(4,4+h);if(33===m.length&&0===m[0]&&(m=m.subarray(1)),m.length>32)return 1;var _=l.subarray(6+h);if(33===_.length&&0===_[0]&&(_=_.slice(1)),_.length>32)throw new Error("S length is too long");var w=new f(m);w.cmp(x.n)>=0&&(w=new f(0));var S=new f(l.subarray(6+h));return S.cmp(x.n)>=0&&(S=new f(0)),b.set(w.toArrayLike(Uint8Array,"be",32),0),b.set(S.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(b,l,h,u,m){if(m){var _=m;m=function(I){var P=_(l,h,null,u,I);if(!(P instanceof Uint8Array&&32===P.length))throw new Error("This is the way");return new f(P)}}var w,S=new f(h);if(S.cmp(x.n)>=0||S.isZero())return 1;try{w=d.sign(l,h,{canonical:!0,k:m,pers:u})}catch{return 1}return b.signature.set(w.r.toArrayLike(Uint8Array,"be",32),0),b.signature.set(w.s.toArrayLike(Uint8Array,"be",32),32),b.recid=w.recoveryParam,0},ecdsaVerify:function(b,l,h){var u={r:b.subarray(0,32),s:b.subarray(32,64)},m=new f(u.r),_=new f(u.s);if(m.cmp(x.n)>=0||_.cmp(x.n)>=0)return 1;if(1===_.cmp(d.nh)||m.isZero()||_.isZero())return 3;var w=T(h);if(null===w)return 2;var S=w.getPublic();return d.verify(l,u,S)?0:3},ecdsaRecover:function(b,l,h,u){var m,_={r:l.slice(0,32),s:l.slice(32,64)},w=new f(_.r),S=new f(_.s);if(w.cmp(x.n)>=0||S.cmp(x.n)>=0)return 1;if(w.isZero()||S.isZero())return 2;try{m=d.recoverPubKey(u,_,h)}catch{return 2}return g(b,m),0},ecdh:function(b,l,h,u,m,_,w){var S=T(l);if(null===S)return 1;var I=new f(h);if(I.cmp(x.n)>=0||I.isZero())return 2;var P=S.getPublic().mul(I);if(void 0===m)for(var L=P.encode(null,!0),V=d.hash().update(L).digest(),W=0;W<32;++W)b[W]=V[W];else{_||(_=new Uint8Array(32));for(var G=P.getX().toArray("be",32),H=0;H<32;++H)_[H]=G[H];w||(w=new Uint8Array(32));for(var j=P.getY().toArray("be",32),K=0;K<32;++K)w[K]=j[K];var R=m(_,w,u);if(!(R instanceof Uint8Array&&R.length===b.length))return 2;b.set(R)}return 0}}},36922:z=>{"use strict";function O(_,w){(null==w||w>_.length)&&(w=_.length);for(var S=0,I=new Array(w);S0&&void 0!==arguments[0]?arguments[0]:function(S){return new Uint8Array(S)},w=arguments.length>1?arguments[1]:void 0;return"function"==typeof _&&(_=_(w)),l("output",_,w),_}function m(_){return Object.prototype.toString.call(_).slice(8,-1)}z.exports=function(_){return{contextRandomize:function(w){if(b(null===w||w instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==w&&l("seed",w,32),1===_.contextRandomize(w))throw new Error("Unknow error on context randomization")},privateKeyVerify:function(w){return l("private key",w,32),0===_.privateKeyVerify(w)},privateKeyNegate:function(w){switch(l("private key",w,32),_.privateKeyNegate(w)){case 0:return w;case 1:throw new Error(E)}},privateKeyTweakAdd:function(w,S){switch(l("private key",w,32),l("tweak",S,32),_.privateKeyTweakAdd(w,S)){case 0:return w;case 1:throw new Error(d)}},privateKeyTweakMul:function(w,S){switch(l("private key",w,32),l("tweak",S,32),_.privateKeyTweakMul(w,S)){case 0:return w;case 1:throw new Error(x)}},publicKeyVerify:function(w){return l("public key",w,[33,65]),0===_.publicKeyVerify(w)},publicKeyCreate:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;switch(l("private key",w,32),h(S),I=u(I,S?33:65),_.publicKeyCreate(I,w)){case 0:return I;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(T)}},publicKeyConvert:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;switch(l("public key",w,[33,65]),h(S),I=u(I,S?33:65),_.publicKeyConvert(I,w)){case 0:return I;case 1:throw new Error(f);case 2:throw new Error(T)}},publicKeyNegate:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;switch(l("public key",w,[33,65]),h(S),I=u(I,S?33:65),_.publicKeyNegate(I,w)){case 0:return I;case 1:throw new Error(f);case 2:throw new Error(E);case 3:throw new Error(T)}},publicKeyCombine:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;b(Array.isArray(w),"Expected public keys to be an Array"),b(w.length>0,"Expected public keys array will have more than zero items");var P,L=function(V,W){var G="undefined"!=typeof Symbol&&V[Symbol.iterator]||V["@@iterator"];if(!G){if(Array.isArray(V)||(G=function(y,M){if(y){if("string"==typeof y)return O(y,M);var v=Object.prototype.toString.call(y).slice(8,-1);return"Object"===v&&y.constructor&&(v=y.constructor.name),"Map"===v||"Set"===v?Array.from(y):"Arguments"===v||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?O(y,M):void 0}}(V))){G&&(V=G);var H=0,j=function(){};return{s:j,n:function(){return H>=V.length?{done:!0}:{done:!1,value:V[H++]}},e:function(y){throw y},f:j}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var K,R=!0,o=!1;return{s:function(){G=G.call(V)},n:function(){var y=G.next();return R=y.done,y},e:function(y){o=!0,K=y},f:function(){try{R||null==G.return||G.return()}finally{if(o)throw K}}}}(w);try{for(L.s();!(P=L.n()).done;)l("public key",P.value,[33,65])}catch(V){L.e(V)}finally{L.f()}switch(h(S),I=u(I,S?33:65),_.publicKeyCombine(I,w)){case 0:return I;case 1:throw new Error(f);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(T)}},publicKeyTweakAdd:function(w,S){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],P=arguments.length>3?arguments[3]:void 0;switch(l("public key",w,[33,65]),l("tweak",S,32),h(I),P=u(P,I?33:65),_.publicKeyTweakAdd(P,w,S)){case 0:return P;case 1:throw new Error(f);case 2:throw new Error(d)}},publicKeyTweakMul:function(w,S){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],P=arguments.length>3?arguments[3]:void 0;switch(l("public key",w,[33,65]),l("tweak",S,32),h(I),P=u(P,I?33:65),_.publicKeyTweakMul(P,w,S)){case 0:return P;case 1:throw new Error(f);case 2:throw new Error(x)}},signatureNormalize:function(w){switch(l("signature",w,64),_.signatureNormalize(w)){case 0:return w;case 1:throw new Error(g)}},signatureExport:function(w,S){l("signature",w,64);var I={output:S=u(S,72),outputlen:72};switch(_.signatureExport(I,w)){case 0:return S.slice(0,I.outputlen);case 1:throw new Error(g);case 2:throw new Error(E)}},signatureImport:function(w,S){switch(l("signature",w),S=u(S,64),_.signatureImport(S,w)){case 0:return S;case 1:throw new Error(g);case 2:throw new Error(E)}},ecdsaSign:function(w,S){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},P=arguments.length>3?arguments[3]:void 0;l("message",w,32),l("private key",S,32),b("Object"===m(I),"Expected options to be an Object"),void 0!==I.data&&l("options.data",I.data),void 0!==I.noncefn&&b("Function"===m(I.noncefn),"Expected options.noncefn to be a Function");var L={signature:P=u(P,64),recid:null};switch(_.ecdsaSign(L,w,S,I.data,I.noncefn)){case 0:return L;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(E)}},ecdsaVerify:function(w,S,I){switch(l("signature",w,64),l("message",S,32),l("public key",I,[33,65]),_.ecdsaVerify(w,S,I)){case 0:return!0;case 3:return!1;case 1:throw new Error(g);case 2:throw new Error(f)}},ecdsaRecover:function(w,S,I){var P=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],L=arguments.length>4?arguments[4]:void 0;switch(l("signature",w,64),b("Number"===m(S)&&S>=0&&S<=3,"Expected recovery id to be a Number within interval [0, 3]"),l("message",I,32),h(P),L=u(L,P?33:65),_.ecdsaRecover(L,w,S,I)){case 0:return L;case 1:throw new Error(g);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(E)}},ecdh:function(w,S){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},P=arguments.length>3?arguments[3]:void 0;switch(l("public key",w,[33,65]),l("private key",S,32),b("Object"===m(I),"Expected options to be an Object"),void 0!==I.data&&l("options.data",I.data),void 0!==I.hashfn?(b("Function"===m(I.hashfn),"Expected options.hashfn to be a Function"),void 0!==I.xbuf&&l("options.xbuf",I.xbuf,32),void 0!==I.ybuf&&l("options.ybuf",I.ybuf,32),l("output",P)):P=u(P,32),_.ecdh(P,w,S,I.data,I.hashfn,I.xbuf,I.ybuf)){case 0:return P;case 1:throw new Error(f);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}}},76003:(z,O,E)=>{"use strict";var d=E(48850).Buffer;function x(f,T){this._block=d.alloc(f),this._finalSize=T,this._blockSize=f,this._len=0}x.prototype.update=function(f,T){"string"==typeof f&&(f=d.from(f,T=T||"utf8"));for(var g=this._block,b=this._blockSize,l=f.length,h=this._len,u=0;u=this._finalSize&&(this._update(this._block),this._block.fill(0));var g=8*this._len;if(g<=4294967295)this._block.writeUInt32BE(g,this._blockSize-4);else{var b=(4294967295&g)>>>0;this._block.writeUInt32BE((g-b)/4294967296,this._blockSize-8),this._block.writeUInt32BE(b,this._blockSize-4)}this._update(this._block);var h=this._hash();return f?h.toString(f):h},x.prototype._update=function(){throw new Error("_update must be implemented by subclass")},z.exports=x},51708:(z,O,E)=>{"use strict";var d=z.exports=function(x){x=x.toLowerCase();var f=d[x];if(!f)throw new Error(x+" is not supported (we accept pull requests)");return new f};d.sha=E(8210),d.sha1=E(10544),d.sha224=E(66288),d.sha256=E(34571),d.sha384=E(46959),d.sha512=E(14515)},8210:(z,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[1518500249,1859775393,-1894007588,-899497514],g=new Array(80);function b(){this.init(),this._w=g,x.call(this,64,56)}function l(u){return u<<30|u>>>2}function h(u,m,_,w){return 0===u?m&_|~m&w:2===u?m&_|m&w|_&w:m^_^w}d(b,x),b.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},b.prototype._update=function(u){for(var m,_=this._w,w=0|this._a,S=0|this._b,I=0|this._c,P=0|this._d,L=0|this._e,V=0;V<16;++V)_[V]=u.readInt32BE(4*V);for(;V<80;++V)_[V]=_[V-3]^_[V-8]^_[V-14]^_[V-16];for(var W=0;W<80;++W){var G=~~(W/20),H=0|((m=w)<<5|m>>>27)+h(G,S,I,P)+L+_[W]+T[G];L=P,P=I,I=l(S),S=w,w=H}this._a=w+this._a|0,this._b=S+this._b|0,this._c=I+this._c|0,this._d=P+this._d|0,this._e=L+this._e|0},b.prototype._hash=function(){var u=f.allocUnsafe(20);return u.writeInt32BE(0|this._a,0),u.writeInt32BE(0|this._b,4),u.writeInt32BE(0|this._c,8),u.writeInt32BE(0|this._d,12),u.writeInt32BE(0|this._e,16),u},z.exports=b},10544:(z,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[1518500249,1859775393,-1894007588,-899497514],g=new Array(80);function b(){this.init(),this._w=g,x.call(this,64,56)}function l(m){return m<<5|m>>>27}function h(m){return m<<30|m>>>2}function u(m,_,w,S){return 0===m?_&w|~_&S:2===m?_&w|_&S|w&S:_^w^S}d(b,x),b.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},b.prototype._update=function(m){for(var _,w=this._w,S=0|this._a,I=0|this._b,P=0|this._c,L=0|this._d,V=0|this._e,W=0;W<16;++W)w[W]=m.readInt32BE(4*W);for(;W<80;++W)w[W]=(_=w[W-3]^w[W-8]^w[W-14]^w[W-16])<<1|_>>>31;for(var G=0;G<80;++G){var H=~~(G/20),j=l(S)+u(H,I,P,L)+V+w[G]+T[H]|0;V=L,L=P,P=h(I),I=S,S=j}this._a=S+this._a|0,this._b=I+this._b|0,this._c=P+this._c|0,this._d=L+this._d|0,this._e=V+this._e|0},b.prototype._hash=function(){var m=f.allocUnsafe(20);return m.writeInt32BE(0|this._a,0),m.writeInt32BE(0|this._b,4),m.writeInt32BE(0|this._c,8),m.writeInt32BE(0|this._d,12),m.writeInt32BE(0|this._e,16),m},z.exports=b},66288:(z,O,E)=>{"use strict";var d=E(41736),x=E(34571),f=E(76003),T=E(48850).Buffer,g=new Array(64);function b(){this.init(),this._w=g,f.call(this,64,56)}d(b,x),b.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},b.prototype._hash=function(){var l=T.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},z.exports=b},34571:(z,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[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],g=new Array(64);function b(){this.init(),this._w=g,x.call(this,64,56)}function l(w,S,I){return I^w&(S^I)}function h(w,S,I){return w&S|I&(w|S)}function u(w){return(w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10)}function m(w){return(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7)}function _(w){return(w>>>7|w<<25)^(w>>>18|w<<14)^w>>>3}d(b,x),b.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},b.prototype._update=function(w){for(var S,I=this._w,P=0|this._a,L=0|this._b,V=0|this._c,W=0|this._d,G=0|this._e,H=0|this._f,j=0|this._g,K=0|this._h,R=0;R<16;++R)I[R]=w.readInt32BE(4*R);for(;R<64;++R)I[R]=0|(((S=I[R-2])>>>17|S<<15)^(S>>>19|S<<13)^S>>>10)+I[R-7]+_(I[R-15])+I[R-16];for(var o=0;o<64;++o){var y=K+m(G)+l(G,H,j)+T[o]+I[o]|0,M=u(P)+h(P,L,V)|0;K=j,j=H,H=G,G=W+y|0,W=V,V=L,L=P,P=y+M|0}this._a=P+this._a|0,this._b=L+this._b|0,this._c=V+this._c|0,this._d=W+this._d|0,this._e=G+this._e|0,this._f=H+this._f|0,this._g=j+this._g|0,this._h=K+this._h|0},b.prototype._hash=function(){var w=f.allocUnsafe(32);return w.writeInt32BE(this._a,0),w.writeInt32BE(this._b,4),w.writeInt32BE(this._c,8),w.writeInt32BE(this._d,12),w.writeInt32BE(this._e,16),w.writeInt32BE(this._f,20),w.writeInt32BE(this._g,24),w.writeInt32BE(this._h,28),w},z.exports=b},46959:(z,O,E)=>{"use strict";var d=E(41736),x=E(14515),f=E(76003),T=E(48850).Buffer,g=new Array(160);function b(){this.init(),this._w=g,f.call(this,128,112)}d(b,x),b.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},b.prototype._hash=function(){var l=T.allocUnsafe(48);function h(u,m,_){l.writeInt32BE(u,_),l.writeInt32BE(m,_+4)}return h(this._ah,this._al,0),h(this._bh,this._bl,8),h(this._ch,this._cl,16),h(this._dh,this._dl,24),h(this._eh,this._el,32),h(this._fh,this._fl,40),l},z.exports=b},14515:(z,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[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],g=new Array(160);function b(){this.init(),this._w=g,x.call(this,128,112)}function l(L,V,W){return W^L&(V^W)}function h(L,V,W){return L&V|W&(L|V)}function u(L,V){return(L>>>28|V<<4)^(V>>>2|L<<30)^(V>>>7|L<<25)}function m(L,V){return(L>>>14|V<<18)^(L>>>18|V<<14)^(V>>>9|L<<23)}function _(L,V){return(L>>>1|V<<31)^(L>>>8|V<<24)^L>>>7}function w(L,V){return(L>>>1|V<<31)^(L>>>8|V<<24)^(L>>>7|V<<25)}function S(L,V){return(L>>>19|V<<13)^(V>>>29|L<<3)^L>>>6}function I(L,V){return(L>>>19|V<<13)^(V>>>29|L<<3)^(L>>>6|V<<26)}function P(L,V){return L>>>0>>0?1:0}d(b,x),b.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},b.prototype._update=function(L){for(var V=this._w,W=0|this._ah,G=0|this._bh,H=0|this._ch,j=0|this._dh,K=0|this._eh,R=0|this._fh,o=0|this._gh,y=0|this._hh,M=0|this._al,v=0|this._bl,k=0|this._cl,D=0|this._dl,N=0|this._el,C=0|this._fl,a=0|this._gl,B=0|this._hl,Q=0;Q<32;Q+=2)V[Q]=L.readInt32BE(4*Q),V[Q+1]=L.readInt32BE(4*Q+4);for(;Q<160;Q+=2){var ee=V[Q-30],ce=V[Q-30+1],ue=_(ee,ce),we=w(ce,ee),ae=S(ee=V[Q-4],ce=V[Q-4+1]),Te=I(ce,ee),ne=V[Q-32],pe=V[Q-32+1],_e=we+V[Q-14+1]|0,xe=ue+V[Q-14]+P(_e,we)|0;xe=(xe=xe+ae+P(_e=_e+Te|0,Te)|0)+ne+P(_e=_e+pe|0,pe)|0,V[Q]=xe,V[Q+1]=_e}for(var Ce=0;Ce<160;Ce+=2){xe=V[Ce],_e=V[Ce+1];var ke=h(W,G,H),me=h(M,v,k),Ee=u(W,M),ze=u(M,W),Ve=m(K,N),nt=m(N,K),tt=T[Ce],mt=T[Ce+1],ht=l(K,R,o),wt=l(N,C,a),Pt=B+nt|0,st=y+Ve+P(Pt,B)|0;st=(st=(st=st+ht+P(Pt=Pt+wt|0,wt)|0)+tt+P(Pt=Pt+mt|0,mt)|0)+xe+P(Pt=Pt+_e|0,_e)|0;var Ye=ze+me|0,gt=Ee+ke+P(Ye,ze)|0;y=o,B=a,o=R,a=C,R=K,C=N,K=j+st+P(N=D+Pt|0,D)|0,j=H,D=k,H=G,k=v,G=W,v=M,W=st+gt+P(M=Pt+Ye|0,Pt)|0}this._al=this._al+M|0,this._bl=this._bl+v|0,this._cl=this._cl+k|0,this._dl=this._dl+D|0,this._el=this._el+N|0,this._fl=this._fl+C|0,this._gl=this._gl+a|0,this._hl=this._hl+B|0,this._ah=this._ah+W+P(this._al,M)|0,this._bh=this._bh+G+P(this._bl,v)|0,this._ch=this._ch+H+P(this._cl,k)|0,this._dh=this._dh+j+P(this._dl,D)|0,this._eh=this._eh+K+P(this._el,N)|0,this._fh=this._fh+R+P(this._fl,C)|0,this._gh=this._gh+o+P(this._gl,a)|0,this._hh=this._hh+y+P(this._hl,B)|0},b.prototype._hash=function(){var L=f.allocUnsafe(64);function V(W,G,H){L.writeInt32BE(W,H),L.writeInt32BE(G,H+4)}return V(this._ah,this._al,0),V(this._bh,this._bl,8),V(this._ch,this._cl,16),V(this._dh,this._dl,24),V(this._eh,this._el,32),V(this._fh,this._fl,40),V(this._gh,this._gl,48),V(this._hh,this._hl,56),L},z.exports=b},57245:(z,O,E)=>{"use strict";z.exports=x;var d=E(38291).EventEmitter;function x(){d.call(this)}E(41736)(x,d),x.Readable=E(6297),x.Writable=E(71471),x.Duplex=E(76884),x.Transform=E(99154),x.PassThrough=E(53582),x.finished=E(5831),x.pipeline=E(60384),x.Stream=x,x.prototype.pipe=function(f,T){var g=this;function b(S){f.writable&&!1===f.write(S)&&g.pause&&g.pause()}function l(){g.readable&&g.resume&&g.resume()}g.on("data",b),f.on("drain",l),f._isStdio||T&&!1===T.end||(g.on("end",u),g.on("close",m));var h=!1;function u(){h||(h=!0,f.end())}function m(){h||(h=!0,"function"==typeof f.destroy&&f.destroy())}function _(S){if(w(),0===d.listenerCount(this,"error"))throw S}function w(){g.removeListener("data",b),f.removeListener("drain",l),g.removeListener("end",u),g.removeListener("close",m),g.removeListener("error",_),f.removeListener("error",_),g.removeListener("end",w),g.removeListener("close",w),f.removeListener("close",w)}return g.on("error",_),f.on("error",_),g.on("end",w),g.on("close",w),f.on("close",w),f.emit("pipe",g),f}},29519:(z,O,E)=>{"use strict";var d=E(38844),x=E(53319),f=E(87705),T=E(83675),g=E(51143),b=O;b.request=function(l,h){l="string"==typeof l?g.parse(l):f(l);var u=-1===E.g.location.protocol.search(/^https?:$/)?"http:":"",m=l.protocol||u,_=l.hostname||l.host,w=l.port,S=l.path||"/";_&&-1!==_.indexOf(":")&&(_="["+_+"]"),l.url=(_?m+"//"+_:"")+(w?":"+w:"")+S,l.method=(l.method||"GET").toUpperCase(),l.headers=l.headers||{};var I=new d(l);return h&&I.on("response",h),I},b.get=function(l,h){var u=b.request(l,h);return u.end(),u},b.ClientRequest=d,b.IncomingMessage=x.IncomingMessage,b.Agent=function(){},b.Agent.defaultMaxSockets=4,b.globalAgent=new b.Agent,b.STATUS_CODES=T,b.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},23928:(z,O,E)=>{"use strict";var d;function x(){if(void 0!==d)return d;if(E.g.XMLHttpRequest){d=new E.g.XMLHttpRequest;try{d.open("GET",E.g.XDomainRequest?"/":"https://example.com")}catch{d=null}}else d=null;return d}function f(g){var b=x();if(!b)return!1;try{return b.responseType=g,b.responseType===g}catch{}return!1}function T(g){return"function"==typeof g}O.fetch=T(E.g.fetch)&&T(E.g.ReadableStream),O.writableStream=T(E.g.WritableStream),O.abortController=T(E.g.AbortController),O.arraybuffer=O.fetch||f("arraybuffer"),O.msstream=!O.fetch&&f("ms-stream"),O.mozchunkedarraybuffer=!O.fetch&&f("moz-chunked-arraybuffer"),O.overrideMimeType=O.fetch||!!x()&&T(x().overrideMimeType),d=null},38844:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(19142),f=E(23928),T=E(41736),g=E(53319),b=E(86505),l=g.IncomingMessage,h=g.readyStates,u=z.exports=function(_){var w,S=this;b.Writable.call(S),S._opts=_,S._body=[],S._headers={},_.auth&&S.setHeader("Authorization","Basic "+d.from(_.auth).toString("base64")),Object.keys(_.headers).forEach(function(P){S.setHeader(P,_.headers[P])});var I=!0;if("disable-fetch"===_.mode||"requestTimeout"in _&&!f.abortController)I=!1,w=!0;else if("prefer-streaming"===_.mode)w=!1;else if("allow-wrong-content-type"===_.mode)w=!f.overrideMimeType;else{if(_.mode&&"default"!==_.mode&&"prefer-fast"!==_.mode)throw new Error("Invalid value for opts.mode");w=!0}S._mode=f.fetch&&I?"fetch":f.mozchunkedarraybuffer?"moz-chunked-arraybuffer":f.msstream?"ms-stream":f.arraybuffer&&w?"arraybuffer":"text",S._fetchTimer=null,S._socketTimeout=null,S._socketTimer=null,S.on("finish",function(){S._onFinish()})};T(u,b.Writable),u.prototype.setHeader=function(_,w){var S=_.toLowerCase();-1===m.indexOf(S)&&(this._headers[S]={name:_,value:w})},u.prototype.getHeader=function(_){var w=this._headers[_.toLowerCase()];return w?w.value:null},u.prototype.removeHeader=function(_){delete this._headers[_.toLowerCase()]},u.prototype._onFinish=function(){var _=this;if(!_._destroyed){var w=_._opts;"timeout"in w&&0!==w.timeout&&_.setTimeout(w.timeout);var S=_._headers,I=null;"GET"!==w.method&&"HEAD"!==w.method&&(I=new Blob(_._body,{type:(S["content-type"]||{}).value||""}));var P=[];if(Object.keys(S).forEach(function(G){var H=S[G].name,j=S[G].value;Array.isArray(j)?j.forEach(function(K){P.push([H,K])}):P.push([H,j])}),"fetch"===_._mode){var L=null;if(f.abortController){var V=new AbortController;L=V.signal,_._fetchAbortController=V,"requestTimeout"in w&&0!==w.requestTimeout&&(_._fetchTimer=E.g.setTimeout(function(){_.emit("requestTimeout"),_._fetchAbortController&&_._fetchAbortController.abort()},w.requestTimeout))}E.g.fetch(_._opts.url,{method:_._opts.method,headers:P,body:I||void 0,mode:"cors",credentials:w.withCredentials?"include":"same-origin",signal:L}).then(function(G){_._fetchResponse=G,_._resetTimers(!1),_._connect()},function(G){_._resetTimers(!0),_._destroyed||_.emit("error",G)})}else{var W=_._xhr=new E.g.XMLHttpRequest;try{W.open(_._opts.method,_._opts.url,!0)}catch(G){return void x.nextTick(function(){_.emit("error",G)})}"responseType"in W&&(W.responseType=_._mode),"withCredentials"in W&&(W.withCredentials=!!w.withCredentials),"text"===_._mode&&"overrideMimeType"in W&&W.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in w&&(W.timeout=w.requestTimeout,W.ontimeout=function(){_.emit("requestTimeout")}),P.forEach(function(G){W.setRequestHeader(G[0],G[1])}),_._response=null,W.onreadystatechange=function(){switch(W.readyState){case h.LOADING:case h.DONE:_._onXHRProgress()}},"moz-chunked-arraybuffer"===_._mode&&(W.onprogress=function(){_._onXHRProgress()}),W.onerror=function(){_._destroyed||(_._resetTimers(!0),_.emit("error",new Error("XHR error")))};try{W.send(I)}catch(G){return void x.nextTick(function(){_.emit("error",G)})}}}},u.prototype._onXHRProgress=function(){var _=this;_._resetTimers(!1),function(w){try{var S=w.status;return null!==S&&0!==S}catch{return!1}}(_._xhr)&&!_._destroyed&&(_._response||_._connect(),_._response._onXHRProgress(_._resetTimers.bind(_)))},u.prototype._connect=function(){var _=this;_._destroyed||(_._response=new l(_._xhr,_._fetchResponse,_._mode,_._resetTimers.bind(_)),_._response.on("error",function(w){_.emit("error",w)}),_.emit("response",_._response))},u.prototype._write=function(_,w,S){this._body.push(_),S()},u.prototype._resetTimers=function(_){var w=this;E.g.clearTimeout(w._socketTimer),w._socketTimer=null,_?(E.g.clearTimeout(w._fetchTimer),w._fetchTimer=null):w._socketTimeout&&(w._socketTimer=E.g.setTimeout(function(){w.emit("timeout")},w._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(_){var w=this;w._destroyed=!0,w._resetTimers(!0),w._response&&(w._response._destroyed=!0),w._xhr?w._xhr.abort():w._fetchAbortController&&w._fetchAbortController.abort(),_&&w.emit("error",_)},u.prototype.end=function(_,w,S){"function"==typeof _&&(S=_,_=void 0),b.Writable.prototype.end.call(this,_,w,S)},u.prototype.setTimeout=function(_,w){var S=this;w&&S.once("timeout",w),S._socketTimeout=_,S._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},53319:(z,O,E)=>{"use strict";var d=E(19142),x=E(29033).Buffer,f=E(23928),T=E(41736),g=E(86505),b=O.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=O.IncomingMessage=function(h,u,m,_){var w=this;if(g.Readable.call(w),w._mode=m,w.headers={},w.rawHeaders=[],w.trailers={},w.rawTrailers=[],w.on("end",function(){d.nextTick(function(){w.emit("close")})}),"fetch"===m){if(w._fetchResponse=u,w.url=u.url,w.statusCode=u.status,w.statusMessage=u.statusText,u.headers.forEach(function(V,W){w.headers[W.toLowerCase()]=V,w.rawHeaders.push(W,V)}),f.writableStream){var S=new WritableStream({write:function(V){return _(!1),new Promise(function(W,G){w._destroyed?G():w.push(x.from(V))?W():w._resumeFetch=W})},close:function(){_(!0),w._destroyed||w.push(null)},abort:function(V){_(!0),w._destroyed||w.emit("error",V)}});try{return void u.body.pipeTo(S).catch(function(V){_(!0),w._destroyed||w.emit("error",V)})}catch{}}var I=u.body.getReader();!function V(){I.read().then(function(W){w._destroyed||(_(W.done),W.done?w.push(null):(w.push(x.from(W.value)),V()))}).catch(function(W){_(!0),w._destroyed||w.emit("error",W)})}()}else if(w._xhr=h,w._pos=0,w.url=h.responseURL,w.statusCode=h.status,w.statusMessage=h.statusText,h.getAllResponseHeaders().split(/\r?\n/).forEach(function(V){var W=V.match(/^([^:]+):\s*(.*)/);if(W){var G=W[1].toLowerCase();"set-cookie"===G?(void 0===w.headers[G]&&(w.headers[G]=[]),w.headers[G].push(W[2])):void 0!==w.headers[G]?w.headers[G]+=", "+W[2]:w.headers[G]=W[2],w.rawHeaders.push(W[1],W[2])}}),w._charset="x-user-defined",!f.overrideMimeType){var P=w.rawHeaders["mime-type"];if(P){var L=P.match(/;\s*charset=([^;])(;|$)/);L&&(w._charset=L[1].toLowerCase())}w._charset||(w._charset="utf-8")}};T(l,g.Readable),l.prototype._read=function(){var h=this._resumeFetch;h&&(this._resumeFetch=null,h())},l.prototype._onXHRProgress=function(h){var u=this,m=u._xhr,_=null;switch(u._mode){case"text":if((_=m.responseText).length>u._pos){var w=_.substr(u._pos);if("x-user-defined"===u._charset){for(var S=x.alloc(w.length),I=0;Iu._pos&&(u.push(x.from(new Uint8Array(P.result.slice(u._pos)))),u._pos=P.result.byteLength)},P.onload=function(){h(!0),u.push(null)},P.readAsArrayBuffer(_)}u._xhr.readyState===b.DONE&&"ms-stream"!==u._mode&&(h(!0),u.push(null))}},22028:z=>{"use strict";z.exports=function(O){return encodeURIComponent(O).replace(/[!'()*]/g,function(E){return"%"+E.charCodeAt(0).toString(16).toUpperCase()})}},23462:(z,O,E)=>{"use strict";var d=E(48850).Buffer,x=d.isEncoding||function(w){switch((w=""+w)&&w.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 f(w){var S;switch(this.encoding=function(I){var P=function(L){if(!L)return"utf8";for(var V;;)switch(L){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 L;default:if(V)return;L=(""+L).toLowerCase(),V=!0}}(I);if("string"!=typeof P&&(d.isEncoding===x||!x(I)))throw new Error("Unknown encoding: "+I);return P||I}(w),this.encoding){case"utf16le":this.text=b,this.end=l,S=4;break;case"utf8":this.fillLast=g,S=4;break;case"base64":this.text=h,this.end=u,S=3;break;default:return this.write=m,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=d.allocUnsafe(S)}function T(w){return w<=127?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function g(w){var S=this.lastTotal-this.lastNeed,I=function(P,L,V){if(128!=(192&L[0]))return P.lastNeed=0,"\ufffd";if(P.lastNeed>1&&L.length>1){if(128!=(192&L[1]))return P.lastNeed=1,"\ufffd";if(P.lastNeed>2&&L.length>2&&128!=(192&L[2]))return P.lastNeed=2,"\ufffd"}}(this,w);return void 0!==I?I:this.lastNeed<=w.length?(w.copy(this.lastChar,S,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,S,0,w.length),void(this.lastNeed-=w.length))}function b(w,S){if((w.length-S)%2==0){var I=w.toString("utf16le",S);if(I){var P=I.charCodeAt(I.length-1);if(P>=55296&&P<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",S,w.length-1)}function l(w){var S=w&&w.length?this.write(w):"";return this.lastNeed?S+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):S}function h(w,S){var I=(w.length-S)%3;return 0===I?w.toString("base64",S):(this.lastNeed=3-I,this.lastTotal=3,1===I?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",S,w.length-I))}function u(w){var S=w&&w.length?this.write(w):"";return this.lastNeed?S+this.lastChar.toString("base64",0,3-this.lastNeed):S}function m(w){return w.toString(this.encoding)}function _(w){return w&&w.length?this.write(w):""}O.s=f,f.prototype.write=function(w){if(0===w.length)return"";var S,I;if(this.lastNeed){if(void 0===(S=this.fillLast(w)))return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I=0?(H>0&&(L.lastNeed=H-1),H):--G=0?(H>0&&(L.lastNeed=H-2),H):--G=0?(H>0&&(2===H?H=0:L.lastNeed=H-3),H):0}(this,w,S);if(!this.lastNeed)return w.toString("utf8",S);this.lastTotal=I;var P=w.length-(I-this.lastNeed);return w.copy(this.lastChar,0,P),w.toString("utf8",S,P)},f.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length}},36931:(z,O,E)=>{"use strict";var d=E(8619);z.exports=function(x){return"string"!=typeof x?x:d(x)?x.slice(2):x}},26427:(z,O,E)=>{"use strict";var d=function(){throw"This swarm.js function isn't available on the browser."},x={readFile:d},f={download:d,safeDownloadArchived:d,directoryTree:d},T={platform:d,arch:d},g={join:d,slice:d},b={spawn:d},l={lookup:d},h=E(31357),u=E(40631),m=E(42733),_=E(52510),w=E(13094);z.exports=w({fs:x,files:f,os:T,path:g,child_process:b,defaultArchives:{},mimetype:l,request:h,downloadUrl:null,bytes:u,hash:m,pick:_})},52510:z=>{"use strict";var O=function(E){return function(){return new Promise(function(d,x){var f,T=function(b){var l={},h=b.target.files.length,u=0;[].map.call(b.target.files,function(m){var _=new FileReader;_.onload=function(w){var S=new Uint8Array(w.target.result);if("directory"===E){var I=m.webkitRelativePath;l[I.slice(I.indexOf("/")+1)]={type:"text/plain",data:S},++u===h&&d(l)}else d("file"===E?{type:mimetype.lookup(m.webkitRelativePath),data:S}:S)},_.readAsArrayBuffer(m)})};"directory"===E?((f=document.createElement("input")).addEventListener("change",T),f.type="file",f.webkitdirectory=!0,f.mozdirectory=!0,f.msdirectory=!0,f.odirectory=!0,f.directory=!0):((f=document.createElement("input")).addEventListener("change",T),f.type="file");var g=document.createEvent("MouseEvents");g.initEvent("click",!0,!1),f.dispatchEvent(g)})}};z.exports={data:O("data"),file:O("file"),directory:O("directory")}},42733:(z,O,E)=>{"use strict";var d=E(49574).keccak256,x=E(40631),f=function(T,g){var b=x.reverse(x.pad(6,x.fromNumber(T))),l=x.flatten([b,"0x0000",g]);return d(l).slice(2)};z.exports=function T(g){"string"==typeof g&&"0x"!==g.slice(0,2)?g=x.fromString(g):"string"!=typeof g&&void 0!==g.length&&(g=x.fromUint8Array(g));var b=x.length(g);if(b<=4096)return f(b,g);for(var l=4096;128*l{"use strict";z.exports=function(O){var E=O.fs,d=O.files,x=O.os,f=O.path,T=O.child_process,g=O.mimetype,b=O.defaultArchives,l=O.request,h=O.downloadUrl,u=O.bytes,m=O.hash,_=O.pick,w=function(we){return function(ae){for(var Te={},le=0,X=we.length;le=400?le(new Error("Error ".concat(pe.statusCode,"."))):Te(new Uint8Array(ne))})})}},P=function(we){return function(ae){return function Te(le){return function(X){return function(ne){var pe=function(_e){return void 0===_e.path?Promise.resolve():"application/bzz-manifest+json"===_e.contentType?Te(_e.hash)(X+_e.path)(ne):Promise.resolve((xe=X+_e.path,function(Ce){return function(ke){return ke[xe]=Ce,ke}})({type:(Ce=_e).contentType,hash:Ce.hash})(ne));var Ce,xe};return I(we)(le).then(function(_e){return JSON.parse(ee(_e)).entries}).then(function(_e){return Promise.all(_e.map(pe))}).then(function(){return ne})}}}(ae)("")({})}},L=function(we){return function(ae){return P(we)(ae).then(function(Te){return w(Object.keys(Te))(Object.keys(Te).map(function(le){return Te[le].hash}))})}},V=function(we){return function(ae){return P(we)(ae).then(function(Te){var le=Object.keys(Te),X=le.map(function(_e){return Te[_e].hash}),ne=le.map(function(_e){return Te[_e].type}),pe=X.map(I(we));return Promise.all(pe).then(function(_e){return w(le)(_e.map(function(Ce,ke){return{type:ne[ke],data:Ce}}))})})}},W=function(we){return function(ae){return function(Te){return d.download(S(we)(ae))(Te)}}},G=function(we){return function(ae){return function(Te){return L(we)(ae).then(function(le){var X=[];for(var ne in le)if(ne.length>0){var pe=f.join(Te,ne);X.push(W(we)(le[ne])(pe))}return Promise.all(X).then(function(){return Te})})}}},H=function(we){return function(ae){return new Promise(function(Te,le){var X={body:"string"==typeof ae?ce(ae):ae,method:"POST"};l("".concat(we,"/bzz-raw:/"),X,function(ne,pe){return ne?le(ne):Te(pe)})})}},j=function(we){return function(ae){return function(Te){return function(le){return function X(ne){var pe="/"===Te[0]?Te:"/"+Te,_e="".concat(we,"/bzz:/").concat(ae).concat(pe),xe={method:"PUT",headers:{"Content-Type":le.type},body:le.data};return new Promise(function(Ce,ke){l(_e,xe,function(me,Ee){return me?ke(me):-1!==Ee.indexOf("error")?ke(Ee):Ce(Ee)})}).catch(function(Ce){return ne>0&&X(ne-1)})}(3)}}}},K=function(we){return function(ae){return o(we)({"":ae})}},R=function(we){return function(ae){return E.readFile(ae).then(function(Te){return K(we)({type:g.lookup(ae),data:Te})})}},o=function(we){return function(ae){return H(we)("{}").then(function(Te){return Object.keys(ae).reduce(function(le,X){return le.then((ne=X,function(pe){return j(we)(pe)(ne)(ae[ne])}));var ne},Promise.resolve(Te))})}},y=function(we){return function(ae){return E.readFile(ae).then(H(we))}},M=function(we){return function(ae){return function(Te){return d.directoryTree(Te).then(function(le){return Promise.all(le.map(function(X){return E.readFile(X)})).then(function(X){var ne=le.map(function(_e){return _e.slice(Te.length)}),pe=le.map(function(_e){return g.lookup(_e)||"text/plain"});return w(ne)(X.map(function(_e,xe){return{type:pe[xe],data:_e}}))})}).then(function(le){return(X=ae?{"":le[ae]}:{},function(ne){var pe={};for(var _e in X)pe[_e]=X[_e];for(var xe in ne)pe[xe]=ne[xe];return pe})(le);var X}).then(o(we))}}},v=function(we){return function(ae){if("data"===ae.pick)return _.data().then(H(we));if("file"===ae.pick)return _.file().then(K(we));if("directory"===ae.pick)return _.directory().then(o(we));if(ae.path)switch(ae.kind){case"data":return y(we)(ae.path);case"file":return R(we)(ae.path);case"directory":return M(we)(ae.defaultFile)(ae.path)}else{if(ae.length||"string"==typeof ae)return H(we)(ae);if(ae instanceof Object)return o(we)(ae)}return Promise.reject(new Error("Bad arguments"))}},k=function(we){return function(ae){return function(Te){return B(we)(ae).then(function(le){return le?Te?G(we)(ae)(Te):V(we)(ae):Te?W(we)(ae)(Te):I(we)(ae)})}}},D=function(we,ae){var Te=x.platform().replace("win32","windows")+"-"+("x64"===x.arch()?"amd64":"386"),le=(ae||b)[Te],ne=le.archiveMD5,pe=le.binaryMD5;return d.safeDownloadArchived(h+le.archive+".tar.gz")(ne)(pe)(we)},N=function(we){return new Promise(function(ae,Te){var X=function(Ve){return function(nt){return-1!==(""+nt).indexOf(Ve)}},pe=we.password,ke=0,me=(0,T.spawn)(we.binPath,["--bzzaccount",we.account||we.privateKey,"--datadir",we.dataDir,"--ens-api",we.ensApi]),Ee=function(Ve){0===ke&&X("Passphrase")(Ve)?setTimeout(function(){ke=1,me.stdin.write(pe+"\n")},500):X("Swarm http proxy started")(Ve)&&(ke=2,clearTimeout(ze),ae(me))};me.stdout.on("data",Ee),me.stderr.on("data",Ee);var ze=setTimeout(function(){return Te(new Error("Couldn't start swarm process."))},2e4)})},C=function(we){return new Promise(function(ae,Te){we.stderr.removeAllListeners("data"),we.stdout.removeAllListeners("data"),we.stdin.removeAllListeners("error"),we.removeAllListeners("error"),we.removeAllListeners("exit"),we.kill("SIGINT");var le=setTimeout(function(){return we.kill("SIGKILL")},8e3);we.once("close",function(){clearTimeout(le),ae()})})},a=function(we){return H(we)("test").then(function(ae){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===ae}).catch(function(){return!1})},B=function(we){return function(ae){return I(we)(ae).then(function(Te){try{return!!JSON.parse(ee(Te)).entries}catch{return!1}})}},Q=function(we){return function(ae,Te,le,X,ne){var pe;return void 0!==ae&&(pe=we(ae)),void 0!==Te&&(pe=we(Te)),void 0!==le&&(pe=we(le)),void 0!==X&&(pe=we(X)),void 0!==ne&&(pe=we(ne)),pe}},ee=function(we){return u.toString(u.fromUint8Array(we))},ce=function(we){return u.toUint8Array(u.fromString(we))},ue=function(we){return{download:function(ae,Te){return k(we)(ae)(Te)},downloadData:Q(I(we)),downloadDataToDisk:Q(W(we)),downloadDirectory:Q(V(we)),downloadDirectoryToDisk:Q(G(we)),downloadEntries:Q(P(we)),downloadRoutes:Q(L(we)),isAvailable:function(){return a(we)},upload:function(ae){return v(we)(ae)},uploadData:Q(H(we)),uploadFile:Q(K(we)),uploadFileFromDisk:Q(K(we)),uploadDataFromDisk:Q(y(we)),uploadDirectory:Q(o(we)),uploadDirectoryFromDisk:Q(M(we)),uploadToManifest:Q(j(we)),pick:_,hash:m,fromString:ce,toString:ee}};return{at:ue,local:function(we){return function(ae){return a("http://localhost:8500").then(function(Te){return Te?ae(ue("http://localhost:8500")).then(function(){}):D(we.binPath,we.archives).onData(function(le){return(we.onProgress||function(){})(le.length)}).then(function(){return N(we)}).then(function(le){return ae(ue("http://localhost:8500")).then(function(){return le})}).then(C)})}},download:k,downloadBinary:D,downloadData:I,downloadDataToDisk:W,downloadDirectory:V,downloadDirectoryToDisk:G,downloadEntries:P,downloadRoutes:L,isAvailable:a,startProcess:N,stopProcess:C,upload:v,uploadData:H,uploadDataFromDisk:y,uploadFile:K,uploadFileFromDisk:R,uploadDirectory:o,uploadDirectoryFromDisk:M,uploadToManifest:j,pick:_,hash:m,fromString:ce,toString:ee}}},16873:z=>{"use strict";var O=function(E,d){for(var x=[],f=0;f{"use strict";E(16873);var d=function(g,b){return parseInt(g.slice(2*b+2,2*b+4),16)},x=function(g){return(g.length-2)/2},f=function(g){for(var b=[],l=2,h=g.length;l>6|192);else{if(u>55295&&u<56320){if(++h==g.length)return null;var m=g.charCodeAt(h);if(m<56320||m>57343)return null;l+=b((u=65536+((1023&u)<<10)+(1023&m))>>18|240),l+=b(u>>12&63|128)}else l+=b(u>>12|224);l+=b(u>>6&63|128)}l+=b(63&u|128)}}return l},toString:function(g){for(var b="",l=0,h=x(g);l127){if(u>191&&u<224){if(l>=h)return null;u=(31&u)<<6|63&d(g,l)}else if(u>223&&u<240){if(l+1>=h)return null;u=(15&u)<<12|(63&d(g,l))<<6|63&d(g,++l)}else{if(!(u>239&&u<248)||l+2>=h)return null;u=(7&u)<<18|(63&d(g,l))<<12|(63&d(g,++l))<<6|63&d(g,++l)}++l}if(u<=65535)b+=String.fromCharCode(u);else{if(!(u<=1114111))return null;u-=65536,b+=String.fromCharCode(u>>10|55296),b+=String.fromCharCode(1023&u|56320)}}return b},fromNumber:function(g){var b=g.toString(16);return b.length%2==0?"0x"+b:"0x0"+b},toNumber:function(g){return parseInt(g.slice(2),16)},fromNat:function(g){return"0x0"===g?"0x":g.length%2==0?g:"0x0"+g.slice(2)},toNat:function(g){return"0"===g[2]?"0x"+g.slice(3):g},fromArray:T,toArray:f,fromUint8Array:function(g){return T([].slice.call(g,0))},toUint8Array:function(g){return new Uint8Array(f(g))}}},49574:z=>{"use strict";var O="0123456789abcdef".split(""),E=[1,256,65536,16777216],d=[0,8,16,24],x=[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],f=function(g){var b,l,h,u,m,_,w,S,I,P,L,V,W,G,H,j,K,R,o,y,M,v,k,D,N,C,a,B,Q,ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt;for(h=0;h<48;h+=2)u=g[0]^g[10]^g[20]^g[30]^g[40],m=g[1]^g[11]^g[21]^g[31]^g[41],S=g[4]^g[14]^g[24]^g[34]^g[44],I=g[5]^g[15]^g[25]^g[35]^g[45],P=g[6]^g[16]^g[26]^g[36]^g[46],L=g[7]^g[17]^g[27]^g[37]^g[47],b=(V=g[8]^g[18]^g[28]^g[38]^g[48])^((_=g[2]^g[12]^g[22]^g[32]^g[42])<<1|(w=g[3]^g[13]^g[23]^g[33]^g[43])>>>31),l=(W=g[9]^g[19]^g[29]^g[39]^g[49])^(w<<1|_>>>31),g[0]^=b,g[1]^=l,g[10]^=b,g[11]^=l,g[20]^=b,g[21]^=l,g[30]^=b,g[31]^=l,g[40]^=b,g[41]^=l,l=m^(I<<1|S>>>31),g[2]^=b=u^(S<<1|I>>>31),g[3]^=l,g[12]^=b,g[13]^=l,g[22]^=b,g[23]^=l,g[32]^=b,g[33]^=l,g[42]^=b,g[43]^=l,l=w^(L<<1|P>>>31),g[4]^=b=_^(P<<1|L>>>31),g[5]^=l,g[14]^=b,g[15]^=l,g[24]^=b,g[25]^=l,g[34]^=b,g[35]^=l,g[44]^=b,g[45]^=l,l=I^(W<<1|V>>>31),g[6]^=b=S^(V<<1|W>>>31),g[7]^=l,g[16]^=b,g[17]^=l,g[26]^=b,g[27]^=l,g[36]^=b,g[37]^=l,g[46]^=b,g[47]^=l,l=L^(m<<1|u>>>31),g[8]^=b=P^(u<<1|m>>>31),g[9]^=l,g[18]^=b,g[19]^=l,g[28]^=b,g[29]^=l,g[38]^=b,g[39]^=l,g[48]^=b,g[49]^=l,H=g[1],ze=g[11]<<4|g[10]>>>28,Ve=g[10]<<4|g[11]>>>28,B=g[20]<<3|g[21]>>>29,Q=g[21]<<3|g[20]>>>29,Nt=g[31]<<9|g[30]>>>23,It=g[30]<<9|g[31]>>>23,Ce=g[40]<<18|g[41]>>>14,ke=g[41]<<18|g[40]>>>14,ae=g[2]<<1|g[3]>>>31,Te=g[3]<<1|g[2]>>>31,K=g[12]<<12|g[13]>>>20,nt=g[22]<<10|g[23]>>>22,tt=g[23]<<10|g[22]>>>22,ee=g[33]<<13|g[32]>>>19,ce=g[32]<<13|g[33]>>>19,qt=g[42]<<2|g[43]>>>30,jt=g[43]<<2|g[42]>>>30,st=g[5]<<30|g[4]>>>2,Ye=g[4]<<30|g[5]>>>2,le=g[14]<<6|g[15]>>>26,X=g[15]<<6|g[14]>>>26,o=g[24]<<11|g[25]>>>21,mt=g[34]<<15|g[35]>>>17,ht=g[35]<<15|g[34]>>>17,ue=g[45]<<29|g[44]>>>3,we=g[44]<<29|g[45]>>>3,D=g[6]<<28|g[7]>>>4,N=g[7]<<28|g[6]>>>4,gt=g[17]<<23|g[16]>>>9,St=g[16]<<23|g[17]>>>9,ne=g[26]<<25|g[27]>>>7,pe=g[27]<<25|g[26]>>>7,y=g[36]<<21|g[37]>>>11,M=g[37]<<21|g[36]>>>11,wt=g[47]<<24|g[46]>>>8,Pt=g[46]<<24|g[47]>>>8,me=g[8]<<27|g[9]>>>5,Ee=g[9]<<27|g[8]>>>5,C=g[18]<<20|g[19]>>>12,a=g[19]<<20|g[18]>>>12,Wt=g[29]<<7|g[28]>>>25,dn=g[28]<<7|g[29]>>>25,_e=g[38]<<8|g[39]>>>24,xe=g[39]<<8|g[38]>>>24,v=g[48]<<14|g[49]>>>18,k=g[49]<<14|g[48]>>>18,g[0]=(G=g[0])^~(j=g[13]<<12|g[12]>>>20)&(R=g[25]<<11|g[24]>>>21),g[1]=H^~K&o,g[10]=D^~C&B,g[11]=N^~a&Q,g[20]=ae^~le&ne,g[21]=Te^~X&pe,g[30]=me^~ze&nt,g[31]=Ee^~Ve&tt,g[40]=st^~gt&Wt,g[41]=Ye^~St&dn,g[2]=j^~R&y,g[3]=K^~o&M,g[12]=C^~B&ee,g[13]=a^~Q&ce,g[22]=le^~ne&_e,g[23]=X^~pe&xe,g[32]=ze^~nt&mt,g[33]=Ve^~tt&ht,g[42]=gt^~Wt&Nt,g[43]=St^~dn&It,g[4]=R^~y&v,g[5]=o^~M&k,g[14]=B^~ee&ue,g[15]=Q^~ce&we,g[24]=ne^~_e&Ce,g[25]=pe^~xe&ke,g[34]=nt^~mt&wt,g[35]=tt^~ht&Pt,g[44]=Wt^~Nt&qt,g[45]=dn^~It&jt,g[6]=y^~v&G,g[7]=M^~k&H,g[16]=ee^~ue&D,g[17]=ce^~we&N,g[26]=_e^~Ce&ae,g[27]=xe^~ke&Te,g[36]=mt^~wt&me,g[37]=ht^~Pt&Ee,g[46]=Nt^~qt&st,g[47]=It^~jt&Ye,g[8]=v^~G&j,g[9]=k^~H&K,g[18]=ue^~D&C,g[19]=we^~N&a,g[28]=Ce^~ae&le,g[29]=ke^~Te&X,g[38]=wt^~me&ze,g[39]=Pt^~Ee&Ve,g[48]=qt^~st>,g[49]=jt^~Ye&St,g[0]^=x[h],g[1]^=x[h+1]},T=function(g){return function(b){var l,m,_;if("0x"===b.slice(0,2)){l=[];for(var h=2,u=b.length;h>2]|=_[G]<>2]|=w<>2]|=(192|w>>6)<>2]|=(128|63&w)<=57344?(I[K>>2]|=(224|w>>12)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<>2]|=(240|w>>18)<>2]|=(128|w>>12&63)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<=P){for(m.start=K-P,m.block=I[L],K=0;K>2]|=E[3&K],m.lastByteIndex===P)for(I[0]=I[L],K=1;K>4&15]+O[15&H]+O[H>>12&15]+O[H>>8&15]+O[H>>20&15]+O[H>>16&15]+O[H>>28&15]+O[H>>24&15];R%L==0&&(f(W),K=0)}return"0x"+j}({blocks:[],reset:!0,block:0,start:0,blockCount:1600-((m=g)<<1)>>5,outputBlocks:m>>5,s:(_=[0,0,0,0,0,0,0,0,0,0],[].concat(_,_,_,_,_))},l)}};z.exports={keccak256:T(256),keccak512:T(512),keccak256s:T(256),keccak512s:T(512)}},68419:z=>{"use strict";z.exports=function(O,E){if(E){E=(E=E.trim().replace(/^(\?|#|&)/,""))?"?"+E:E;var d=O.split(/[\?\#]/)[0];E&&/\:\/\/[^\/]*$/.test(d)&&(d+="/");var x=O.match(/(\#.*)$/);O=d+E,x&&(O+=x[0])}return O}},78677:(z,O,E)=>{"use strict";var d;z=E.nmd(z);var x=E(28847)(E(3355));!function(f){var T="object"==(0,x.default)(O)&&O&&!O.nodeType&&O,g="object"==(0,x.default)(z)&&z&&!z.nodeType&&z,b="object"==(void 0===E.g?"undefined":(0,x.default)(E.g))&&E.g;b.global!==b&&b.window!==b&&b.self!==b||(f=b);var l,h,u=2147483647,m=36,W=/^xn--/,G=/[^\x20-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=Math.floor,o=String.fromCharCode;function y(Q){throw RangeError(j[Q])}function M(Q,ee){for(var ce=Q.length,ue=[];ce--;)ue[ce]=ee(Q[ce]);return ue}function v(Q,ee){var ce=Q.split("@"),ue="";return ce.length>1&&(ue=ce[0]+"@",Q=ce[1]),ue+M((Q=Q.replace(H,".")).split("."),ee).join(".")}function k(Q){for(var ee,ce,ue=[],we=0,ae=Q.length;we=55296&&ee<=56319&&we65535&&(ce+=o((ee-=65536)>>>10&1023|55296),ee=56320|1023&ee),ce+o(ee)}).join("")}function N(Q,ee){return Q+22+75*(Q<26)-((0!=ee)<<5)}function C(Q,ee,ce){var ue=0;for(Q=ce?R(Q/700):Q>>1,Q+=R(Q/ee);Q>455;ue+=m)Q=R(Q/35);return R(ue+36*Q/(Q+38))}function a(Q){var ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe=[],Ce=Q.length,ke=0,me=128,Ee=72;for((ce=Q.lastIndexOf("-"))<0&&(ce=0),ue=0;ue=128&&y("not-basic"),xe.push(Q.charCodeAt(ue));for(we=ce>0?ce+1:0;we=Ce&&y("invalid-input"),((X=(_e=Q.charCodeAt(we++))-48<10?_e-22:_e-65<26?_e-65:_e-97<26?_e-97:m)>=m||X>R((u-ke)/Te))&&y("overflow"),ke+=X*Te,!(X<(ne=le<=Ee?1:le>=Ee+26?26:le-Ee));le+=m)Te>R(u/(pe=m-ne))&&y("overflow"),Te*=pe;Ee=C(ke-ae,ee=xe.length+1,0==ae),R(ke/ee)>u-me&&y("overflow"),me+=R(ke/ee),ke%=ee,xe.splice(ke++,0,me)}return D(xe)}function B(Q){var ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee=[];for(xe=(Q=k(Q)).length,ee=128,ce=0,ae=72,Te=0;Te=ee&&_eR((u-ce)/(Ce=ue+1))&&y("overflow"),ce+=(le-ee)*Ce,ee=le,Te=0;Teu&&y("overflow"),_e==ee){for(X=ce,ne=m;!(X<(pe=ne<=ae?1:ne>=ae+26?26:ne-ae));ne+=m)Ee.push(o(N(pe+(me=X-pe)%(ke=m-pe),0))),X=R(me/ke);Ee.push(o(N(X,0))),ae=C(ce,Ce,ue==we),ce=0,++ue}++ce,++ee}return Ee.join("")}if(l={version:"1.3.2",ucs2:{decode:k,encode:D},decode:a,encode:B,toASCII:function(Q){return v(Q,function(ee){return G.test(ee)?"xn--"+B(ee):ee})},toUnicode:function(Q){return v(Q,function(ee){return W.test(ee)?a(ee.slice(4).toLowerCase()):ee})}},"object"==(0,x.default)(E.amdO)&&E.amdO)void 0===(d=function(){return l}.call(O,E,O,z))||(z.exports=d);else if(T&&g)if(z.exports==T)g.exports=l;else for(h in l)l.hasOwnProperty(h)&&(T[h]=l[h]);else f.punycode=l}(void 0)},98983:z=>{"use strict";function O(E,d){return Object.prototype.hasOwnProperty.call(E,d)}z.exports=function(E,d,x,f){x=x||"=";var T={};if("string"!=typeof E||0===E.length)return T;var g=/\+/g;E=E.split(d=d||"&");var b=1e3;f&&"number"==typeof f.maxKeys&&(b=f.maxKeys);var l=E.length;b>0&&l>b&&(l=b);for(var h=0;h=0?(u=S.substr(0,I),m=S.substr(I+1)):(u=S,m=""),_=decodeURIComponent(u),w=decodeURIComponent(m),O(T,_)?Array.isArray(T[_])?T[_].push(w):T[_]=[T[_],w]:T[_]=w}return T}},84031:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=function(f){switch((0,d.default)(f)){case"string":return f;case"boolean":return f?"true":"false";case"number":return isFinite(f)?f:"";default:return""}};z.exports=function(f,T,g,b){return T=T||"&",g=g||"=",null===f&&(f=void 0),"object"===(0,d.default)(f)?Object.keys(f).map(function(l){var h=encodeURIComponent(x(l))+g;return Array.isArray(f[l])?f[l].map(function(u){return h+encodeURIComponent(x(u))}).join(T):h+encodeURIComponent(x(f[l]))}).join(T):b?encodeURIComponent(x(b))+g+encodeURIComponent(x(f)):""}},845:(z,O,E)=>{"use strict";O.decode=O.parse=E(98983),O.encode=O.stringify=E(84031)},51143:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(78677),f=E(95751);function T(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}O.parse=W,O.resolve=function(G,H){return W(G,!1,!0).resolve(H)},O.resolveObject=function(G,H){return G?W(G,!1,!0).resolveObject(H):H},O.format=function(G){return f.isString(G)&&(G=W(G)),G instanceof T?G.format():T.prototype.format.call(G)},O.Url=T;var g=/^([a-z0-9.+-]+:)/i,b=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(h),m=["%","/","?",";","#"].concat(u),_=["/","?","#"],w=/^[+a-z0-9A-Z_-]{0,63}$/,S=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,I={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},L={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},V=E(845);function W(G,H,j){if(G&&f.isObject(G)&&G instanceof T)return G;var K=new T;return K.parse(G,H,j),K}T.prototype.parse=function(G,H,j){if(!f.isString(G))throw new TypeError("Parameter 'url' must be a string, not "+(0,d.default)(G));var K=G.indexOf("?"),R=-1!==K&&K127?ae+="x":ae+=we[Te];if(!ae.match(w)){var X=ce.slice(0,B),ne=ce.slice(B+1),pe=we.match(S);pe&&(X.push(pe[1]),ne.unshift(pe[2])),ne.length&&(y="/"+ne.join(".")+y),this.hostname=X.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),ee||(this.hostname=x.toASCII(this.hostname));var _e=this.port?":"+this.port:"";this.host=(this.hostname||"")+_e,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!I[k])for(B=0,ue=u.length;B0)&&j.host.split("@"))&&(j.auth=pe.shift(),j.host=j.hostname=pe.shift())),j.search=G.search,j.query=G.query,f.isNull(j.pathname)&&f.isNull(j.search)||(j.path=(j.pathname?j.pathname:"")+(j.search?j.search:"")),j.href=j.format(),j;if(!we.length)return j.pathname=null,j.path=j.search?"/"+j.search:null,j.href=j.format(),j;for(var Te=we.slice(-1)[0],le=(j.host||G.host||we.length>1)&&("."===Te||".."===Te)||""===Te,X=0,ne=we.length;ne>=0;ne--)"."===(Te=we[ne])?we.splice(ne,1):".."===Te?(we.splice(ne,1),X++):X&&(we.splice(ne,1),X--);if(!ce&&!ue)for(;X--;X)we.unshift("..");!ce||""===we[0]||we[0]&&"/"===we[0].charAt(0)||we.unshift(""),le&&"/"!==we.join("/").substr(-1)&&we.push("");var pe,_e=""===we[0]||we[0]&&"/"===we[0].charAt(0);return ae&&(j.hostname=j.host=_e?"":we.length?we.shift():"",(pe=!!(j.host&&j.host.indexOf("@")>0)&&j.host.split("@"))&&(j.auth=pe.shift(),j.host=j.hostname=pe.shift())),(ce=ce||j.host&&we.length)&&!_e&&we.unshift(""),we.length?j.pathname=we.join("/"):(j.pathname=null,j.path=null),f.isNull(j.pathname)&&f.isNull(j.search)||(j.path=(j.pathname?j.pathname:"")+(j.search?j.search:"")),j.auth=G.auth||j.auth,j.slashes=j.slashes||G.slashes,j.href=j.format(),j},T.prototype.parseHost=function(){var G=this.host,H=b.exec(G);H&&(":"!==(H=H[0])&&(this.port=H.substr(1)),G=G.substr(0,G.length-H.length)),G&&(this.hostname=G)}},95751:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));z.exports={isString:function(x){return"string"==typeof x},isObject:function(x){return"object"===(0,d.default)(x)&&null!==x},isNull:function(x){return null===x},isNullOrUndefined:function(x){return null==x}}},88632:(z,O)=>{"use strict";!function(E){var d,x,f,T=String.fromCharCode;function g(_){for(var w,S,I=[],P=0,L=_.length;P=55296&&w<=56319&&P=55296&&_<=57343)throw Error("Lone surrogate U+"+_.toString(16).toUpperCase()+" is not a scalar value")}function l(_,w){return T(_>>w&63|128)}function h(_){if(0==(4294967168&_))return T(_);var w="";return 0==(4294965248&_)?w=T(_>>6&31|192):0==(4294901760&_)?(b(_),w=T(_>>12&15|224),w+=l(_,6)):0==(4292870144&_)&&(w=T(_>>18&7|240),w+=l(_,12),w+=l(_,6)),w+T(63&_|128)}function u(){if(f>=x)throw Error("Invalid byte index");var _=255&d[f];if(f++,128==(192&_))return 63&_;throw Error("Invalid continuation byte")}function m(){var _,w;if(f>x)throw Error("Invalid byte index");if(f==x)return!1;if(_=255&d[f],f++,0==(128&_))return _;if(192==(224&_)){if((w=(31&_)<<6|u())>=128)return w;throw Error("Invalid continuation byte")}if(224==(240&_)){if((w=(15&_)<<12|u()<<6|u())>=2048)return b(w),w;throw Error("Invalid continuation byte")}if(240==(248&_)&&(w=(7&_)<<18|u()<<12|u()<<6|u())>=65536&&w<=1114111)return w;throw Error("Invalid UTF-8 detected")}E.version="3.0.0",E.encode=function(_){for(var w=g(_),S=w.length,I=-1,P="";++I65535&&(W+=T((P-=65536)>>>10&1023|55296),P=56320|1023&P),W+=T(P);return W}(S)}}(O)},96219:(z,O,E)=>{"use strict";function d(x){try{if(!E.g.localStorage)return!1}catch{return!1}var f=E.g.localStorage[x];return null!=f&&"true"===String(f).toLowerCase()}z.exports=function(x,f){if(d("noDeprecation"))return x;var T=!1;return function(){if(!T){if(d("throwDeprecation"))throw new Error(f);d("traceDeprecation")?console.trace(f):console.warn(f),T=!0}return x.apply(this,arguments)}}},16248:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));z.exports=function(x){return x&&"object"===(0,d.default)(x)&&"function"==typeof x.copy&&"function"==typeof x.fill&&"function"==typeof x.readUInt8}},17092:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(69446),f=E(14477),T=E(72337),g=E(28915);function b(a){return a.call.bind(a)}var l="undefined"!=typeof BigInt,h="undefined"!=typeof Symbol,u=b(Object.prototype.toString),m=b(Number.prototype.valueOf),_=b(String.prototype.valueOf),w=b(Boolean.prototype.valueOf);if(l)var S=b(BigInt.prototype.valueOf);if(h)var I=b(Symbol.prototype.valueOf);function P(a,B){if("object"!==(0,d.default)(a))return!1;try{return B(a),!0}catch{return!1}}function L(a){return"[object Map]"===u(a)}function V(a){return"[object Set]"===u(a)}function W(a){return"[object WeakMap]"===u(a)}function G(a){return"[object WeakSet]"===u(a)}function H(a){return"[object ArrayBuffer]"===u(a)}function j(a){return"undefined"!=typeof ArrayBuffer&&(H.working?H(a):a instanceof ArrayBuffer)}function K(a){return"[object DataView]"===u(a)}function R(a){return"undefined"!=typeof DataView&&(K.working?K(a):a instanceof DataView)}O.isArgumentsObject=x,O.isGeneratorFunction=f,O.isTypedArray=g,O.isPromise=function(a){return"undefined"!=typeof Promise&&a instanceof Promise||null!==a&&"object"===(0,d.default)(a)&&"function"==typeof a.then&&"function"==typeof a.catch},O.isArrayBufferView=function(a){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(a):g(a)||R(a)},O.isUint8Array=function(a){return"Uint8Array"===T(a)},O.isUint8ClampedArray=function(a){return"Uint8ClampedArray"===T(a)},O.isUint16Array=function(a){return"Uint16Array"===T(a)},O.isUint32Array=function(a){return"Uint32Array"===T(a)},O.isInt8Array=function(a){return"Int8Array"===T(a)},O.isInt16Array=function(a){return"Int16Array"===T(a)},O.isInt32Array=function(a){return"Int32Array"===T(a)},O.isFloat32Array=function(a){return"Float32Array"===T(a)},O.isFloat64Array=function(a){return"Float64Array"===T(a)},O.isBigInt64Array=function(a){return"BigInt64Array"===T(a)},O.isBigUint64Array=function(a){return"BigUint64Array"===T(a)},L.working="undefined"!=typeof Map&&L(new Map),O.isMap=function(a){return"undefined"!=typeof Map&&(L.working?L(a):a instanceof Map)},V.working="undefined"!=typeof Set&&V(new Set),O.isSet=function(a){return"undefined"!=typeof Set&&(V.working?V(a):a instanceof Set)},W.working="undefined"!=typeof WeakMap&&W(new WeakMap),O.isWeakMap=function(a){return"undefined"!=typeof WeakMap&&(W.working?W(a):a instanceof WeakMap)},G.working="undefined"!=typeof WeakSet&&G(new WeakSet),O.isWeakSet=function(a){return G(a)},H.working="undefined"!=typeof ArrayBuffer&&H(new ArrayBuffer),O.isArrayBuffer=j,K.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&K(new DataView(new ArrayBuffer(1),0,1)),O.isDataView=R;var o="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function y(a){return"[object SharedArrayBuffer]"===u(a)}function M(a){return void 0!==o&&(void 0===y.working&&(y.working=y(new o)),y.working?y(a):a instanceof o)}function v(a){return P(a,m)}function k(a){return P(a,_)}function D(a){return P(a,w)}function N(a){return l&&P(a,S)}function C(a){return h&&P(a,I)}O.isSharedArrayBuffer=M,O.isAsyncFunction=function(a){return"[object AsyncFunction]"===u(a)},O.isMapIterator=function(a){return"[object Map Iterator]"===u(a)},O.isSetIterator=function(a){return"[object Set Iterator]"===u(a)},O.isGeneratorObject=function(a){return"[object Generator]"===u(a)},O.isWebAssemblyCompiledModule=function(a){return"[object WebAssembly.Module]"===u(a)},O.isNumberObject=v,O.isStringObject=k,O.isBooleanObject=D,O.isBigIntObject=N,O.isSymbolObject=C,O.isBoxedPrimitive=function(a){return v(a)||k(a)||D(a)||N(a)||C(a)},O.isAnyArrayBuffer=function(a){return"undefined"!=typeof Uint8Array&&(j(a)||M(a))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(a){Object.defineProperty(O,a,{enumerable:!1,value:function(){throw new Error(a+" is not supported in userland")}})})},45058:(z,O,E)=>{"use strict";var d=E(19142),x=E(28847)(E(3355)),f=Object.getOwnPropertyDescriptors||function(C){for(var a=Object.keys(C),B={},Q=0;Q=ee)return we;switch(we){case"%s":return String(Q[B++]);case"%d":return Number(Q[B++]);case"%j":try{return JSON.stringify(Q[B++])}catch{return"[Circular]"}default:return we}}),ue=Q[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),P(a)?B.showHidden=a:a&&O._extend(B,a),G(B.showHidden)&&(B.showHidden=!1),G(B.depth)&&(B.depth=2),G(B.colors)&&(B.colors=!1),G(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=u),_(B,C,B.depth)}function u(C,a){var B=h.styles[a];return B?"\x1b["+h.colors[B][0]+"m"+C+"\x1b["+h.colors[B][1]+"m":C}function m(C,a){return C}function _(C,a,B){if(C.customInspect&&a&&o(a.inspect)&&a.inspect!==O.inspect&&(!a.constructor||a.constructor.prototype!==a)){var Q=a.inspect(B,C);return W(Q)||(Q=_(C,Q,B)),Q}var ee=function(ne,pe){if(G(pe))return ne.stylize("undefined","undefined");if(W(pe)){var _e="'"+JSON.stringify(pe).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ne.stylize(_e,"string")}return V(pe)?ne.stylize(""+pe,"number"):P(pe)?ne.stylize(""+pe,"boolean"):L(pe)?ne.stylize("null","null"):void 0}(C,a);if(ee)return ee;var pe,ce=Object.keys(a),ue=(pe={},ce.forEach(function(_e,xe){pe[_e]=!0}),pe);if(C.showHidden&&(ce=Object.getOwnPropertyNames(a)),R(a)&&(ce.indexOf("message")>=0||ce.indexOf("description")>=0))return w(a);if(0===ce.length){if(o(a))return C.stylize("[Function"+(a.name?": "+a.name:"")+"]","special");if(H(a))return C.stylize(RegExp.prototype.toString.call(a),"regexp");if(K(a))return C.stylize(Date.prototype.toString.call(a),"date");if(R(a))return w(a)}var ae,Te="",le=!1,X=["{","}"];return I(a)&&(le=!0,X=["[","]"]),o(a)&&(Te=" [Function"+(a.name?": "+a.name:"")+"]"),H(a)&&(Te=" "+RegExp.prototype.toString.call(a)),K(a)&&(Te=" "+Date.prototype.toUTCString.call(a)),R(a)&&(Te=" "+w(a)),0!==ce.length||le&&0!=a.length?B<0?H(a)?C.stylize(RegExp.prototype.toString.call(a),"regexp"):C.stylize("[Object]","special"):(C.seen.push(a),ae=le?function(ne,pe,_e,xe,Ce){for(var ke=[],me=0,Ee=pe.length;me60?_e[0]+(""===pe?"":pe+"\n ")+" "+ne.join(",\n ")+" "+_e[1]:_e[0]+pe+" "+ne.join(", ")+" "+_e[1]}(ae,Te,X)):X[0]+Te+X[1]}function w(C){return"["+Error.prototype.toString.call(C)+"]"}function S(C,a,B,Q,ee,ce){var ue,we,ae;if((ae=Object.getOwnPropertyDescriptor(a,ee)||{value:a[ee]}).get?we=C.stylize(ae.set?"[Getter/Setter]":"[Getter]","special"):ae.set&&(we=C.stylize("[Setter]","special")),k(Q,ee)||(ue="["+ee+"]"),we||(C.seen.indexOf(ae.value)<0?(we=L(B)?_(C,ae.value,null):_(C,ae.value,B-1)).indexOf("\n")>-1&&(we=ce?we.split("\n").map(function(Te){return" "+Te}).join("\n").slice(2):"\n"+we.split("\n").map(function(Te){return" "+Te}).join("\n")):we=C.stylize("[Circular]","special")),G(ue)){if(ce&&ee.match(/^\d+$/))return we;(ue=JSON.stringify(""+ee)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ue=ue.slice(1,-1),ue=C.stylize(ue,"name")):(ue=ue.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ue=C.stylize(ue,"string"))}return ue+": "+we}function I(C){return Array.isArray(C)}function P(C){return"boolean"==typeof C}function L(C){return null===C}function V(C){return"number"==typeof C}function W(C){return"string"==typeof C}function G(C){return void 0===C}function H(C){return j(C)&&"[object RegExp]"===y(C)}function j(C){return"object"===(0,x.default)(C)&&null!==C}function K(C){return j(C)&&"[object Date]"===y(C)}function R(C){return j(C)&&("[object Error]"===y(C)||C instanceof Error)}function o(C){return"function"==typeof C}function y(C){return Object.prototype.toString.call(C)}function M(C){return C<10?"0"+C.toString(10):C.toString(10)}O.debuglog=function(C){if(C=C.toUpperCase(),!g[C])if(b.test(C)){var a=d.pid;g[C]=function(){var B=O.format.apply(O,arguments);console.error("%s %d: %s",C,a,B)}}else g[C]=function(){};return g[C]},O.inspect=h,h.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]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},O.types=E(17092),O.isArray=I,O.isBoolean=P,O.isNull=L,O.isNullOrUndefined=function(C){return null==C},O.isNumber=V,O.isString=W,O.isSymbol=function(C){return"symbol"===(0,x.default)(C)},O.isUndefined=G,O.isRegExp=H,O.types.isRegExp=H,O.isObject=j,O.isDate=K,O.types.isDate=K,O.isError=R,O.types.isNativeError=R,O.isFunction=o,O.isPrimitive=function(C){return null===C||"boolean"==typeof C||"number"==typeof C||"string"==typeof C||"symbol"===(0,x.default)(C)||void 0===C},O.isBuffer=E(16248);var v=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(C,a){return Object.prototype.hasOwnProperty.call(C,a)}O.log=function(){var C,a;console.log("%s - %s",(a=[M((C=new Date).getHours()),M(C.getMinutes()),M(C.getSeconds())].join(":"),[C.getDate(),v[C.getMonth()],a].join(" ")),O.format.apply(O,arguments))},O.inherits=E(41736),O._extend=function(C,a){if(!a||!j(a))return C;for(var B=Object.keys(a),Q=B.length;Q--;)C[B[Q]]=a[B[Q]];return C};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(C,a){if(!C){var B=new Error("Promise was rejected with a falsy value");B.reason=C,C=B}return a(C)}O.promisify=function(C){if("function"!=typeof C)throw new TypeError('The "original" argument must be of type Function');if(D&&C[D]){var a;if("function"!=typeof(a=C[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(a,D,{value:a,enumerable:!1,writable:!1,configurable:!0}),a}function a(){for(var B,Q,ee=new Promise(function(we,ae){B=we,Q=ae}),ce=[],ue=0;ue{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"NIL",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(O,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(O,"stringify",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(O,"v1",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(O,"v3",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(O,"v4",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(O,"v5",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(O,"validate",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(O,"version",{enumerable:!0,get:function(){return b.default}});var d=m(E(55999)),x=m(E(28231)),f=m(E(78647)),T=m(E(65025)),g=m(E(55996)),b=m(E(8928)),l=m(E(76163)),h=m(E(22982)),u=m(E(91729));function m(_){return _&&_.__esModule?_:{default:_}}},86792:(z,O)=>{"use strict";function E(l){return 14+(l+64>>>9<<4)+1}function d(l,h){var u=(65535&l)+(65535&h);return(l>>16)+(h>>16)+(u>>16)<<16|65535&u}function x(l,h,u,m,_,w){return d((S=d(d(h,l),d(m,w)))<<(I=_)|S>>>32-I,u);var S,I}function f(l,h,u,m,_,w,S){return x(h&u|~h&m,l,h,_,w,S)}function T(l,h,u,m,_,w,S){return x(h&m|u&~m,l,h,_,w,S)}function g(l,h,u,m,_,w,S){return x(h^u^m,l,h,_,w,S)}function b(l,h,u,m,_,w,S){return x(u^(h|~m),l,h,_,w,S)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default=function(l){if("string"==typeof l){var h=unescape(encodeURIComponent(l));l=new Uint8Array(h.length);for(var u=0;u>5]>>>I%32&255,L=parseInt(S.charAt(P>>>4&15)+S.charAt(15&P),16);_.push(L)}return _}(function(m,_){m[_>>5]|=128<<_%32,m[E(_)-1]=_;for(var w=1732584193,S=-271733879,I=-1732584194,P=271733878,L=0;L>5]|=(255&m[S/8])<{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var E={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};O.default=E},55996:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default="00000000-0000-0000-0000-000000000000"},91729:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x=(d=E(76163))&&d.__esModule?d:{default:d};O.default=function(f){if(!(0,x.default)(f))throw TypeError("Invalid UUID");var T,g=new Uint8Array(16);return g[0]=(T=parseInt(f.slice(0,8),16))>>>24,g[1]=T>>>16&255,g[2]=T>>>8&255,g[3]=255&T,g[4]=(T=parseInt(f.slice(9,13),16))>>>8,g[5]=255&T,g[6]=(T=parseInt(f.slice(14,18),16))>>>8,g[7]=255&T,g[8]=(T=parseInt(f.slice(19,23),16))>>>8,g[9]=255&T,g[10]=(T=parseInt(f.slice(24,36),16))/1099511627776&255,g[11]=T/4294967296&255,g[12]=T>>>24&255,g[13]=T>>>16&255,g[14]=T>>>8&255,g[15]=255&T,g}},77300:(z,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},14402:(z,O)=>{"use strict";var E;Object.defineProperty(O,"__esModule",{value:!0}),O.default=function(){if(!E&&!(E="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(d)};var d=new Uint8Array(16)},42702:(z,O)=>{"use strict";function E(x,f,T,g){switch(x){case 0:return f&T^~f&g;case 1:case 3:return f^T^g;case 2:return f&T^f&g^T&g}}function d(x,f){return x<>>32-f}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default=function(x){var f=[1518500249,1859775393,2400959708,3395469782],T=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof x){var g=unescape(encodeURIComponent(x));x=[];for(var b=0;b>>0;j=H,H=G,G=d(W,30)>>>0,W=V,V=o}T[0]=T[0]+V>>>0,T[1]=T[1]+W>>>0,T[2]=T[2]+G>>>0,T[3]=T[3]+H>>>0,T[4]=T[4]+j>>>0}return[T[0]>>24&255,T[0]>>16&255,T[0]>>8&255,255&T[0],T[1]>>24&255,T[1]>>16&255,T[1]>>8&255,255&T[1],T[2]>>24&255,T[2]>>16&255,T[2]>>8&255,255&T[2],T[3]>>24&255,T[3]>>16&255,T[3]>>8&255,255&T[3],T[4]>>24&255,T[4]>>16&255,T[4]>>8&255,255&T[4]]}},22982:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.unsafeStringify=g;for(var d,x=(d=E(76163))&&d.__esModule?d:{default:d},f=[],T=0;T<256;++T)f.push((T+256).toString(16).slice(1));function g(b){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(f[b[l+0]]+f[b[l+1]]+f[b[l+2]]+f[b[l+3]]+"-"+f[b[l+4]]+f[b[l+5]]+"-"+f[b[l+6]]+f[b[l+7]]+"-"+f[b[l+8]]+f[b[l+9]]+"-"+f[b[l+10]]+f[b[l+11]]+f[b[l+12]]+f[b[l+13]]+f[b[l+14]]+f[b[l+15]]).toLowerCase()}O.default=function(b){var l=g(b,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,x.default)(l))throw TypeError("Stringified UUID is invalid");return l}},55999:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x,f,T=(d=E(14402))&&d.__esModule?d:{default:d},g=E(22982),b=0,l=0;O.default=function(h,u,m){var _=u&&m||0,w=u||new Array(16),S=(h=h||{}).node||x,I=void 0!==h.clockseq?h.clockseq:f;if(null==S||null==I){var P=h.random||(h.rng||T.default)();null==S&&(S=x=[1|P[0],P[1],P[2],P[3],P[4],P[5]]),null==I&&(I=f=16383&(P[6]<<8|P[7]))}var L=void 0!==h.msecs?h.msecs:Date.now(),V=void 0!==h.nsecs?h.nsecs:l+1,W=L-b+(V-l)/1e4;if(W<0&&void 0===h.clockseq&&(I=I+1&16383),(W<0||L>b)&&void 0===h.nsecs&&(V=0),V>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");b=L,l=V,f=I;var G=(1e4*(268435455&(L+=122192928e5))+V)%4294967296;w[_++]=G>>>24&255,w[_++]=G>>>16&255,w[_++]=G>>>8&255,w[_++]=255&G;var H=L/4294967296*1e4&268435455;w[_++]=H>>>8&255,w[_++]=255&H,w[_++]=H>>>24&15|16,w[_++]=H>>>16&255,w[_++]=I>>>8|128,w[_++]=255&I;for(var j=0;j<6;++j)w[_+j]=S[j];return u||(0,g.unsafeStringify)(w)}},28231:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=f(E(36125)),x=f(E(86792));function f(g){return g&&g.__esModule?g:{default:g}}var T=(0,d.default)("v3",48,x.default);O.default=T},36125:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.URL=O.DNS=void 0,O.default=function(b,l,h){function u(m,_,w,S){var I;if("string"==typeof m&&(m=function(V){V=unescape(encodeURIComponent(V));for(var W=[],G=0;G{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=T(E(11788)),x=T(E(14402)),f=E(22982);function T(g){return g&&g.__esModule?g:{default:g}}O.default=function(g,b,l){if(d.default.randomUUID&&!b&&!g)return d.default.randomUUID();var h=(g=g||{}).random||(g.rng||x.default)();if(h[6]=15&h[6]|64,h[8]=63&h[8]|128,b){l=l||0;for(var u=0;u<16;++u)b[l+u]=h[u];return b}return(0,f.unsafeStringify)(h)}},65025:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=f(E(36125)),x=f(E(42702));function f(g){return g&&g.__esModule?g:{default:g}}var T=(0,d.default)("v5",80,x.default);O.default=T},76163:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x=(d=E(77300))&&d.__esModule?d:{default:d};O.default=function(f){return"string"==typeof f&&x.default.test(f)}},8928:(z,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x=(d=E(76163))&&d.__esModule?d:{default:d};O.default=function(f){if(!(0,x.default)(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}},38325:z=>{"use strict";z.exports=function d(x,f){var T,g=0,b=0,l=f=f||0,h=x.length;do{if(l>=h)throw d.bytes=0,new RangeError("Could not decode varint");T=x[l++],g+=b<28?(T&E)<=O);return d.bytes=l-f,g};var O=128,E=127},92699:z=>{"use strict";z.exports=function x(f,T,g){T=T||[];for(var b=g=g||0;f>=d;)T[g++]=255&f|O,f/=128;for(;f&E;)T[g++]=255&f|O,f>>>=7;return T[g]=0|f,x.bytes=g-b+1,T};var O=128,E=-128,d=Math.pow(2,31)},26657:(z,O,E)=>{"use strict";z.exports={encode:E(92699),decode:E(38325),encodingLength:E(57490)}},57490:z=>{"use strict";var O=Math.pow(2,7),E=Math.pow(2,14),d=Math.pow(2,21),x=Math.pow(2,28),f=Math.pow(2,35),T=Math.pow(2,42),g=Math.pow(2,49),b=Math.pow(2,56),l=Math.pow(2,63);z.exports=function(h){return h{"use strict";var d,x=E(28847)(E(3355));if("object"===("undefined"==typeof globalThis?"undefined":(0,x.default)(globalThis)))d=globalThis;else try{d=E(26464)}catch{}finally{if(d||"undefined"==typeof window||(d=window),!d)throw new Error("Could not determine global this")}var f=d.WebSocket||d.MozWebSocket,T=E(75735);function g(b,l){return l?new f(b,l):new f(b)}f&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(b){Object.defineProperty(g,b,{get:function(){return f[b]}})}),z.exports={w3cwebsocket:f?g:null,version:T}},75735:(z,O,E)=>{"use strict";z.exports=E(19794).version},72337:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(48184),f=E(43604),T=E(24373),g=E(80593),b=E(53820),l=g("Object.prototype.toString"),h=E(11191)(),u="undefined"==typeof globalThis?E.g:globalThis,m=f(),_=g("String.prototype.slice"),w=Object.getPrototypeOf,S=g("Array.prototype.indexOf",!0)||function(P,L){for(var V=0;V-1?L:"Object"===L&&(V=P,W=!1,x(I,function(G,H){if(!W)try{G(V),W=_(H,1)}catch{}}),W)}var V,W;return b?function(V){var W=!1;return x(I,function(G,H){if(!W)try{"$"+G(V)===H&&(W=_(H,1))}catch{}}),W}(P):null}},31357:(z,O,E)=>{"use strict";var d=E(31296),x=E(68419),f=E(33103),T=E(39122),g=E(17321),b="application/json",l=function(){};z.exports=function(h,u,m){if(!h||"string"!=typeof h)throw new TypeError("must specify a URL");if("function"==typeof u&&(m=u,u={}),m&&"function"!=typeof m)throw new TypeError("expected cb to be undefined or a function");m=m||l;var _=(u=u||{}).json?"json":"text",w=(u=f({responseType:_},u)).headers||{},S=(u.method||"GET").toUpperCase(),I=u.query;return I&&("string"!=typeof I&&(I=d.stringify(I)),h=x(h,I)),"json"===u.responseType&&T(w,"Accept",b),u.json&&"GET"!==S&&"HEAD"!==S&&(T(w,"Content-Type",b),u.body=JSON.stringify(u.body)),u.method=S,u.url=h,u.headers=w,delete u.query,delete u.json,g(u,m)}},39122:z=>{"use strict";z.exports=function(O,E,d){var x=E.toLowerCase();O[E]||O[x]||(O[E]=d)}},49800:z=>{"use strict";z.exports=function(O,E){return E?{statusCode:E.statusCode,headers:E.headers,method:O.method,url:O.url,rawRequest:E.rawRequest?E.rawRequest:E}:null}},17321:(z,O,E)=>{"use strict";var d=E(30346),x=E(49800),f=function(){};z.exports=function(T,g){delete T.uri;var b=!1;"json"===T.responseType&&(T.responseType="text",b=!0);var l=d(T,function(u,m,_){if(b&&!u)try{_=JSON.parse(m.rawRequest.responseText)}catch(S){u=S}m=x(T,m),g(u,u?null:_,m),g=f}),h=l.onabort;return l.onabort=function(){var u=h.apply(l,Array.prototype.slice.call(arguments));return g(new Error("XHR Aborted")),g=f,u},l}},30346:(z,O,E)=>{"use strict";var d=E(92948),x=E(27277),f=E(48209),T=E(87705);function g(h,u,m){var _=h;return x(u)?(m=u,"string"==typeof h&&(_={uri:h})):_=T(u,{uri:h}),_.callback=m,_}function b(h,u,m){return l(u=g(h,u,m))}function l(h){if(void 0===h.callback)throw new Error("callback argument missing");var u=!1,m=function(y,M,v){u||(u=!0,h.callback(y,M,v))};function _(){var y=void 0;if(y=L.response?L.response:L.responseText||function(M){try{if("document"===M.responseType)return M.responseXML;if(""===M.responseType&&(!M.responseXML||"parsererror"!==M.responseXML.documentElement.nodeName))return M.responseXML}catch{}return null}(L),R)try{y=JSON.parse(y)}catch{}return y}function w(y){return clearTimeout(V),y instanceof Error||(y=new Error(""+(y||"Unknown XMLHttpRequest Error"))),y.statusCode=0,m(y,o)}function S(){if(!P){var y;clearTimeout(V);var M=o,v=null;return 0!==(y=h.useXDR&&void 0===L.status?200:1223===L.status?204:L.status)?(M={body:_(),statusCode:y,method:G,headers:{},url:W,rawRequest:L},L.getAllResponseHeaders&&(M.headers=f(L.getAllResponseHeaders()))):v=new Error("Internal XMLHttpRequest Error"),m(v,M,M.body)}}var I,P,L=h.xhr||null;L||(L=h.cors||h.useXDR?new b.XDomainRequest:new b.XMLHttpRequest);var V,W=L.url=h.uri||h.url,G=L.method=h.method||"GET",H=h.body||h.data,j=L.headers=h.headers||{},K=!!h.sync,R=!1,o={body:void 0,headers:{},statusCode:0,method:G,url:W,rawRequest:L};if("json"in h&&!1!==h.json&&(R=!0,j.accept||j.Accept||(j.Accept="application/json"),"GET"!==G&&"HEAD"!==G&&(j["content-type"]||j["Content-Type"]||(j["Content-Type"]="application/json"),H=JSON.stringify(!0===h.json?H:h.json))),L.onreadystatechange=function(){4===L.readyState&&setTimeout(S,0)},L.onload=S,L.onerror=w,L.onprogress=function(){},L.onabort=function(){P=!0},L.ontimeout=w,L.open(G,W,!K,h.username,h.password),K||(L.withCredentials=!!h.withCredentials),!K&&h.timeout>0&&(V=setTimeout(function(){if(!P){P=!0,L.abort("timeout");var y=new Error("XMLHttpRequest timeout");y.code="ETIMEDOUT",w(y)}},h.timeout)),L.setRequestHeader)for(I in j)j.hasOwnProperty(I)&&L.setRequestHeader(I,j[I]);else if(h.headers&&!function(y){for(var M in y)if(y.hasOwnProperty(M))return!1;return!0}(h.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in h&&(L.responseType=h.responseType),"beforeSend"in h&&"function"==typeof h.beforeSend&&h.beforeSend(L),L.send(H||null),L}z.exports=b,z.exports.default=b,b.XMLHttpRequest=d.XMLHttpRequest||function(){},b.XDomainRequest="withCredentials"in new b.XMLHttpRequest?b.XMLHttpRequest:d.XDomainRequest,function(h,u){for(var m=0;m{"use strict";z.exports=function(){for(var E={},d=0;d{"use strict";var d=E(28847)(E(3355)),x=E(26427),f=function T(g){this.givenProvider=T.givenProvider,g&&g._requestManager&&(g=g.currentProvider),"undefined"!=typeof document&&(this.pick=x.pick),this.setProvider(g)};f.givenProvider=null,"undefined"!=typeof ethereum&ðereum.bzz&&(f.givenProvider=ethereum.bzz),f.prototype.setProvider=function(T){if(T&&"object"===(0,d.default)(T)&&"string"==typeof T.bzz&&(T=T.bzz),"string"!=typeof T){this.currentProvider=null;var g=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw g},!1}return this.currentProvider=T,this.download=x.at(T).download,this.upload=x.at(T).upload,this.isAvailable=x.at(T).isAvailable,!0},z.exports=f},94246:(z,O,E)=>{"use strict";var d=E(28847)(E(3355));z.exports={ErrorResponse:function(x){var f=x&&x.error&&x.error.message?x.error.message:JSON.stringify(x),T=x.error&&x.error.data?x.error.data:null,g=new Error("Returned error: "+f);return g.data=T,g},InvalidNumberOfParams:function(x,f,T){return new Error('Invalid number of parameters for "'+T+'". Got '+x+" expected "+f+"!")},InvalidConnection:function(x,f){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+x+".",f)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(x){var f=x&&x.error&&x.error.message?x.error.message:"Invalid JSON RPC response: "+JSON.stringify(x);return new Error(f)},ConnectionTimeout:function(x){return new Error("CONNECTION TIMEOUT: timeout of "+x+" ms achived")},ConnectionNotOpenError:function(x){return this.ConnectionError("connection not open on send()",x)},ConnectionCloseError:function(x){return"object"===(0,d.default)(x)&&x.code&&x.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+x.code+"` and the following reason string `"+x.reason+"`",x):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(x,f){var T=new Error(x);return f&&(T.code=f.code,T.reason=f.reason,f.description&&(T.description=f.description)),T},RevertInstructionError:function(x,f){var T=new Error("Your request got reverted with the following reason string: "+x);return T.reason=x,T.signature=f,T},TransactionRevertInstructionError:function(x,f,T){var g=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(T,null,2));return g.reason=x,g.signature=f,g.receipt=T,g},TransactionError:function(x,f){var T=new Error(x);return T.receipt=f,T},NoContractAddressFoundError:function(x){return this.TransactionError("The transaction receipt didn't contain a contract address.",x)},ContractCodeNotStoredError:function(x){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",x)},TransactionRevertedWithoutReasonError:function(x){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(x,null,2),x)},TransactionOutOfGasError:function(x){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(x,null,2),x)},ResolverMethodMissingError:function(x,f){return new Error("The resolver at "+x+'does not implement requested method: "'+f+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(x){return new Error('Event "'+x+"\" doesn't exist in this contract.")},ContractReservedEventError:function(x){return new Error('The event "'+x+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},32084:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(90775)),f=d(E(3355));function T(I,P){var L=Object.keys(I);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(I);P&&(V=V.filter(function(W){return Object.getOwnPropertyDescriptor(I,W).enumerable})),L.push.apply(L,V)}return L}function g(I){for(var P=1;P{"use strict";var d=E(94246),x=E(32084);z.exports={errors:d,formatters:x}},53349:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(74519)),T=d(E(90775)),g=d(E(94571)),b=d(E(3355));function l(V,W){var G=Object.keys(V);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(V);W&&(H=H.filter(function(j){return Object.getOwnPropertyDescriptor(V,j).enumerable})),G.push.apply(G,H)}return G}function h(V){for(var W=1;W1?(V[G[0]]=V[G[0]]||{},V[G[0]][G[1]]=W):V[G[0]]=W},P.prototype.getCall=function(V){return"function"==typeof this.call?this.call(V):this.call},P.prototype.extractCallback=function(V){if("function"==typeof V[V.length-1])return V.pop()},P.prototype.validateArgs=function(V){if(V.length!==this.params)throw u.InvalidNumberOfParams(V.length,this.params,this.name)},P.prototype.formatInput=function(V){var W=this;return this.inputFormatter?this.inputFormatter.map(function(G,H){return G?G.call(W,V[H]):V[H]}):V},P.prototype.formatOutput=function(V){var W=this;return Array.isArray(V)?V.map(function(G){return W.outputFormatter&&G?W.outputFormatter(G,null==this?void 0:this.hexFormat):G}):this.outputFormatter&&V?this.outputFormatter(V,null==this?void 0:this.hexFormat):V},P.prototype.toPayload=function(V){var W=this.getCall(V),G=this.extractCallback(V),H=this.formatInput(V);this.validateArgs(H);var j={method:W,params:H,callback:G};return this.transformPayload&&(j=this.transformPayload(j)),j},P.prototype._confirmTransaction=function(V,W,G){var H=this,j=!1,K=!0,R=0,o=0,y=null,M=null,v=null,k=G.params[0]&&"object"===(0,b.default)(G.params[0])&&G.params[0].gas?G.params[0].gas:null,D=!!G.params[0]&&"object"===(0,b.default)(G.params[0])&&G.params[0].data&&G.params[0].from&&!G.params[0].to,N=D&&G.params[0].data.length>2,C=[new P({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[m.inputBlockNumberFormatter,function(ee){return!!ee}],outputFormatter:m.outputBlockFormatter}),new P({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new P({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new P({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new S({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter}}})],a={};C.forEach(function(ee){ee.attachToObject(a),ee.requestManager=H.requestManager});var B=function(ee,ce,ue,we,ae){if(!ue)return ae||(ae={unsubscribe:function(){clearInterval(y),clearTimeout(M)}}),(ee?w.resolve(ee):a.getTransactionReceipt(W)).catch(function(Te){ae.unsubscribe(),j=!0,_._fireError({message:"Failed to check for transaction receipt:",data:Te},V.eventEmitter,V.reject)}).then((Te=(0,g.default)(x.default.mark(function le(X){var ne,pe,_e;return x.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(X&&X.blockHash){xe.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(H.extraFormatters&&H.extraFormatters.receiptFormatter&&(X=H.extraFormatters.receiptFormatter(X)),!(V.eventEmitter.listeners("confirmation").length>0)){xe.next=28;break}if(void 0!==ee&&0===o){xe.next=25;break}return xe.next=7,a.getBlockByNumber("latest");case 7:if(_e=(pe=xe.sent)?pe.hash:null,!ce){xe.next=24;break}if(!v){xe.next=17;break}return xe.next=13,a.getBlockByNumber(v.number+1);case 13:(ne=xe.sent)&&(v=ne,V.eventEmitter.emit("confirmation",o,X,_e)),xe.next=22;break;case 17:return xe.next=19,a.getBlockByNumber(X.blockNumber);case 19:v=ne=xe.sent,V.eventEmitter.emit("confirmation",o,X,_e);case 22:xe.next=25;break;case 24:V.eventEmitter.emit("confirmation",o,X,_e);case 25:(ce&&ne||!ce)&&o++,K=!1,o===H.transactionConfirmationBlocks+1&&(ae.unsubscribe(),V.eventEmitter.removeAllListeners());case 28:return xe.abrupt("return",X);case 29:case"end":return xe.stop()}},le)})),function(le){return Te.apply(this,arguments)})).then(function(){var Te=(0,g.default)(x.default.mark(function le(X){var ne;return x.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(!D||j){pe.next=19;break}if(X.contractAddress){pe.next=5;break}return K&&(ae.unsubscribe(),j=!0),_._fireError(u.NoContractAddressFoundError(X),V.eventEmitter,V.reject,null,X),pe.abrupt("return");case 5:return pe.prev=5,pe.next=8,a.getCode(X.contractAddress);case 8:ne=pe.sent,pe.next=13;break;case 11:pe.prev=11,pe.t0=pe.catch(5);case 13:if(ne){pe.next=15;break}return pe.abrupt("return");case 15:!0===X.status&&N||ne.length>2?(V.eventEmitter.emit("receipt",X),V.resolve(H.extraFormatters&&H.extraFormatters.contractDeployFormatter?H.extraFormatters.contractDeployFormatter(X):X),K&&V.eventEmitter.removeAllListeners()):_._fireError(u.ContractCodeNotStoredError(X),V.eventEmitter,V.reject,null,X),K&&ae.unsubscribe(),j=!0;case 19:return pe.abrupt("return",X);case 20:case"end":return pe.stop()}},le,null,[[5,11]])}));return function(le){return Te.apply(this,arguments)}}()).then(function(){var Te=(0,g.default)(x.default.mark(function le(X){var ne,pe,xe;return x.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(D||j){Ce.next=35;break}if(X.outOfGas||k&&k===X.gasUsed||!0!==X.status&&"0x1"!==X.status&&void 0!==X.status){Ce.next=7;break}V.eventEmitter.emit("receipt",X),V.resolve(X),K&&V.eventEmitter.removeAllListeners(),Ce.next=33;break;case 7:if(JSON.stringify(X,null,2),!1!==X.status&&"0x0"!==X.status){Ce.next=32;break}if(Ce.prev=9,ne=null,!H.handleRevert||"eth_sendTransaction"!==H.call&&"eth_sendRawTransaction"!==H.call){Ce.next=24;break}return pe=G.params[0],"eth_sendRawTransaction"===H.call&&(xe=I.parse(G.params[0]),pe=m.inputTransactionFormatter({data:xe.data,to:xe.to,from:xe.from,gas:xe.gasLimit.toHexString(),gasPrice:xe.gasPrice?xe.gasPrice.toHexString():void 0,value:xe.value.toHexString()})),Ce.next=16,H.getRevertReason(pe,X.blockNumber);case 16:if(!(ne=Ce.sent)){Ce.next=21;break}_._fireError(u.TransactionRevertInstructionError(ne.reason,ne.signature,X),V.eventEmitter,V.reject,null,X),Ce.next=22;break;case 21:throw!1;case 22:Ce.next=25;break;case 24:throw!1;case 25:Ce.next=30;break;case 27:Ce.prev=27,Ce.t0=Ce.catch(9),_._fireError(u.TransactionRevertedWithoutReasonError(X),V.eventEmitter,V.reject,null,X);case 30:Ce.next=33;break;case 32:_._fireError(u.TransactionOutOfGasError(X),V.eventEmitter,V.reject,null,X);case 33:K&&ae.unsubscribe(),j=!0;case 35:case"end":return Ce.stop()}},le,null,[[9,27]])}));return function(le){return Te.apply(this,arguments)}}()).catch(function(){R++,ce?R-1>=H.transactionPollingTimeout&&(ae.unsubscribe(),j=!0,_._fireError(u.TransactionError("Transaction was not mined within "+H.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),V.eventEmitter,V.reject)):R-1>=H.transactionBlockTimeout&&(ae.unsubscribe(),j=!0,_._fireError(u.TransactionError("Transaction was not mined within "+H.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),V.eventEmitter,V.reject))});var Te;ae.unsubscribe(),j=!0,_._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:ue},V.eventEmitter,V.reject)},Q=function(ee){var ce=!1,ue=function(){y=setInterval(B.bind(null,ee,!0),H.transactionPollingInterval)};if(!this.requestManager.provider.on)return ue();a.subscribe("newBlockHeaders",function(we,ae,Te){if(ce=!0,we||!ae)return ue();B(ee,!1,we,0,Te)}),M=setTimeout(function(){ce||ue()},1e3*this.blockHeaderTimeout)}.bind(this);a.getTransactionReceipt(W).then(function(ee){ee&&ee.blockHash?(V.eventEmitter.listeners("confirmation").length>0&&Q(ee),B(ee,!1)):j||Q()}).catch(function(){j||Q()})};var L=function(V,W){return"number"==typeof V?W.wallet[V]:V&&"object"===(0,b.default)(V)&&V.address&&V.privateKey?V:W.wallet[V.toLowerCase()]};P.prototype.buildCall=function(){var V=this,W="eth_sendTransaction"===V.call||"eth_sendRawTransaction"===V.call,G="eth_call"===V.call,H=function(){var j=Array.prototype.slice.call(arguments),K=w(!W),R=V.toPayload(j);V.hexFormat=!1,"eth_getTransactionReceipt"!==V.call&&"eth_getTransactionByHash"!==V.call&&"getBlock"!==V.name||(V.hexFormat=R.params.length{"use strict";var d=E(98008),x=function(f){var T,g,b=new Promise(function(){T=arguments[0],g=arguments[1]});if(f)return{resolve:T,reject:g,eventEmitter:b};var l=new d;return b._events=l._events,b.emit=l.emit,b.on=l.on,b.once=l.once,b.off=l.off,b.listeners=l.listeners,b.addListener=l.addListener,b.removeListener=l.removeListener,b.removeAllListeners=l.removeAllListeners,{resolve:T,reject:g,eventEmitter:b}};x.resolve=function(f){var T=x(!0);return T.resolve(f),T.eventEmitter},z.exports=x},35229:(z,O,E)=>{"use strict";var d=E(48155),x=E(11314).errors,f=function(T){this.requestManager=T,this.requests=[]};f.prototype.add=function(T){this.requests.push(T)},f.prototype.execute=function(){var T=this.requests,g=this._sortResponses.bind(this);this.requestManager.sendBatch(T,function(b,l){l=g(l),T.map(function(h,u){return l[u]||{}}).forEach(function(h,u){if(T[u].callback){if(h&&h.error)return T[u].callback(x.ErrorResponse(h));if(!d.isValidResponse(h))return T[u].callback(x.InvalidResponse(h));try{T[u].callback(null,T[u].format?T[u].format(h.result):h.result)}catch(m){T[u].callback(m)}}})})},f.prototype._sortResponses=function(T){return(T||[]).sort(function(g,b){return g.id-b.id})},z.exports=f},99764:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=null,f="object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))?globalThis:void 0;if(!f)try{f=Function("return this")()}catch{f=self}void 0!==f.ethereum?x=f.ethereum:void 0!==f.web3&&f.web3.currentProvider&&(f.web3.currentProvider.sendAsync&&(f.web3.currentProvider.send=f.web3.currentProvider.sendAsync,delete f.web3.currentProvider.sendAsync),!f.web3.currentProvider.on&&f.web3.currentProvider.connection&&"ipcProviderWrapper"===f.web3.currentProvider.connection.constructor.name&&(f.web3.currentProvider.on=function(T,g){if("function"!=typeof g)throw new Error("The second parameter callback must be a function.");"data"===T?this.connection.on("data",function(b){var l="";b=b.toString();try{l=JSON.parse(b)}catch{return g(new Error("Couldn't parse response data"+b))}l.id||-1===l.method.indexOf("_subscription")||g(null,l)}):this.connection.on(T,g)}),x=f.web3.currentProvider),z.exports=x},92033:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(45058).callbackify,f=E(11314).errors,T=E(48155),g=E(35229),b=E(99764),l=function h(u,m){this.provider=null,this.providers=h.providers,this.setProvider(u,m),this.subscriptions=new Map};l.givenProvider=b,l.providers={WebsocketProvider:E(77651),HttpProvider:E(14565),IpcProvider:E(52683)},l.prototype.setProvider=function(h,u){var m=this;if(h&&"string"==typeof h&&this.providers)if(/^http(s)?:\/\//i.test(h))h=new this.providers.HttpProvider(h);else if(/^ws(s)?:\/\//i.test(h))h=new this.providers.WebsocketProvider(h);else if(h&&"object"===(0,d.default)(u)&&"function"==typeof u.connect)h=new this.providers.IpcProvider(h,u);else if(h)throw new Error("Can't autodetect provider for \""+h+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=h||null,this.provider&&this.provider.on&&("function"==typeof h.request?this.provider.on("message",function(_){if(_&&"eth_subscription"===_.type&&_.data){var w=_.data;w.subscription&&m.subscriptions.has(w.subscription)&&m.subscriptions.get(w.subscription).callback(null,w.result)}}):this.provider.on("data",function(_,w){(_=_||w).method&&_.params&&_.params.subscription&&m.subscriptions.has(_.params.subscription)&&m.subscriptions.get(_.params.subscription).callback(null,_.params.result)}),this.provider.on("connect",function(){m.subscriptions.forEach(function(_){_.subscription.resubscribe()})}),this.provider.on("error",function(_){m.subscriptions.forEach(function(w){w.callback(_)})}),this.provider.on("disconnect",function(_){m._isCleanCloseEvent(_)&&!m._isIpcCloseError(_)||(m.subscriptions.forEach(function(w){w.callback(f.ConnectionCloseError(_)),m.subscriptions.delete(w.subscription.id)}),m.provider&&m.provider.emit&&m.provider.emit("error",f.ConnectionCloseError(_))),m.provider&&m.provider.emit&&m.provider.emit("end",_)}))},l.prototype.send=function(h,u){if(u=u||function(){},!this.provider)return u(f.InvalidProvider());var m=h.method,_=h.params,w=T.toPayload(m,_),S=this._jsonrpcResultCallback(u,w);if(this.provider.request)x(this.provider.request.bind(this.provider))({method:m,params:_},u);else if(this.provider.sendAsync)this.provider.sendAsync(w,S);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(w,S)}},l.prototype.sendBatch=function(h,u){if(!this.provider)return u(f.InvalidProvider());var m=T.toBatchPayload(h);this.provider[this.provider.sendAsync?"sendAsync":"send"](m,function(_,w){return _?u(_):Array.isArray(w)?void u(null,w):u(f.InvalidResponse(w))})},l.prototype.addSubscription=function(h,u){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(h.id,{callback:u,subscription:h})},l.prototype.removeSubscription=function(h,u){if(this.subscriptions.has(h)){var m=this.subscriptions.get(h).subscription.options.type;return this.subscriptions.delete(h),void this.send({method:m+"_unsubscribe",params:[h]},u)}"function"==typeof u&&u(null)},l.prototype.clearSubscriptions=function(h){try{var u=this;return this.subscriptions.size>0&&this.subscriptions.forEach(function(m,_){h&&"syncing"===m.name||u.removeSubscription(_)}),this.provider.reset&&this.provider.reset(),!0}catch(m){throw new Error("Error while clearing subscriptions: ".concat(m))}},l.prototype._isCleanCloseEvent=function(h){return"object"===(0,d.default)(h)&&([1e3].includes(h.code)||!0===h.wasClean)},l.prototype._isIpcCloseError=function(h){return"boolean"==typeof h&&h},l.prototype._jsonrpcResultCallback=function(h,u){return function(m,_){return _&&_.id&&u.id!==_.id?h(new Error("Wrong response id ".concat(_.id," (expected: ").concat(u.id,") in ").concat(JSON.stringify(u)))):m?h(m):_&&_.error?h(f.ErrorResponse(_)):T.isValidResponse(_)?void h(null,_.result):h(f.InvalidResponse(_))}},z.exports={Manager:l,BatchManager:g}},48155:z=>{"use strict";var O={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(E,d){if(!E)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(d)+'"!');return O.messageId===Number.MAX_SAFE_INTEGER?O.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):O.messageId++,{jsonrpc:"2.0",id:O.messageId,method:E,params:d||[]}},isValidResponse:function(E){return Array.isArray(E)?E.every(d):d(E);function d(x){return!(!x||x.error||"2.0"!==x.jsonrpc||"number"!=typeof x.id&&"string"!=typeof x.id||void 0===x.result)}},toBatchPayload:function(E){return E.map(function(d){return O.toPayload(d.method,d.params)})}};z.exports=O},34178:(z,O,E)=>{"use strict";var d=E(42929),x=function(f){this.name=f.name,this.type=f.type,this.subscriptions=f.subscriptions||{},this.requestManager=null};x.prototype.setRequestManager=function(f){this.requestManager=f},x.prototype.attachToObject=function(f){var T=this.buildCall(),g=this.name.split(".");g.length>1?(f[g[0]]=f[g[0]]||{},f[g[0]][g[1]]=T):f[g[0]]=T},x.prototype.buildCall=function(){var f=this;return function(){f.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var T=new d({subscription:f.subscriptions[arguments[0]]||{},requestManager:f.requestManager,type:f.type});return T.subscribe.apply(T,arguments)}},z.exports={subscriptions:x,subscription:d}},42929:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(11314).errors,f=E(98008),T=E(11314).formatters;function g(l){return l}function b(l){f.call(this),this.id=null,this.callback=g,this.arguments=null,this.lastBlock=null,this.options={subscription:l.subscription,type:l.type,requestManager:l.requestManager}}(b.prototype=Object.create(f.prototype)).constructor=b,b.prototype._extractCallback=function(l){if("function"==typeof l[l.length-1])return l.pop()},b.prototype._validateArgs=function(l){var h=this.options.subscription;if(h||(h={}),h.params||(h.params=0),l.length!==h.params)throw x.InvalidNumberOfParams(l.length,h.params,h.subscriptionName)},b.prototype._formatInput=function(l){var h=this.options.subscription;return h&&h.inputFormatter?h.inputFormatter.map(function(u,m){return u?u(l[m]):l[m]}):l},b.prototype._formatOutput=function(l){var h=this.options.subscription;return h&&h.outputFormatter&&l?h.outputFormatter(l):l},b.prototype._toPayload=function(l){var h=[];if(this.callback=this._extractCallback(l)||g,this.subscriptionMethod||(this.subscriptionMethod=l.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(l),this._validateArgs(this.arguments),l=[]),h.push(this.subscriptionMethod),h=h.concat(this.arguments),l.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:h}},b.prototype.unsubscribe=function(l){this.options.requestManager.removeSubscription(this.id,l),this.id=null,this.lastBlock=null,this.removeAllListeners()},b.prototype.subscribe=function(){var l=this,h=Array.prototype.slice.call(arguments),u=this._toPayload(h);if(!u)return this;if(!this.options.requestManager.provider)return setTimeout(function(){var _=new Error("No provider set.");l.callback(_,null,l),l.emit("error",_)},0),this;if(!this.options.requestManager.provider.on)return setTimeout(function(){var _=new Error("The current provider doesn't support subscriptions: "+l.options.requestManager.provider.constructor.name);l.callback(_,null,l),l.emit("error",_)},0),this;if(this.lastBlock&&this.options.params&&"object"===(0,d.default)(this.options.params)&&(u.params[1]=this.options.params,u.params[1].fromBlock=T.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=u.params[1],"logs"===u.params[0]&&u.params[1]&&"object"===(0,d.default)(u.params[1])&&u.params[1].hasOwnProperty("fromBlock")&&isFinite(u.params[1].fromBlock)){var m=Object.assign({},u.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[m]},function(_,w){_?setTimeout(function(){l.callback(_,null,l),l.emit("error",_)},0):w.forEach(function(S){var I=l._formatOutput(S);l.callback(null,I,l),l.emit("data",I)})})}return"object"===(0,d.default)(u.params[1])&&delete u.params[1].fromBlock,this.options.requestManager.send(u,function(_,w){!_&&w?(l.id=w,l.method=u.params[0],l.options.requestManager.addSubscription(l,function(S,I){S?(l.callback(S,!1,l),l.emit("error",S)):(Array.isArray(I)||(I=[I]),I.forEach(function(P){var L=l._formatOutput(P);if(l.lastBlock=L&&"object"===(0,d.default)(L)?L.blockNumber:null,"function"==typeof l.options.subscription.subscriptionHandler)return l.options.subscription.subscriptionHandler.call(l,L);l.emit("data",L),l.callback(null,L,l)}))}),l.emit("connected",w)):setTimeout(function(){l.callback(_,!1,l),l.emit("error",_)},0)}),this},b.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},z.exports=b},1949:(z,O,E)=>{"use strict";var d=E(11314).formatters,x=E(53349),f=E(48161);z.exports=function(T){var g=function(b){var l;return b.property?(T[b.property]||(T[b.property]={}),l=T[b.property]):l=T,b.methods&&b.methods.forEach(function(h){h instanceof x||(h=new x(h)),h.attachToObject(l),h.setRequestManager(T._requestManager)}),T};return g.formatters=d,g.utils=f,g.Method=x,g}},80606:(z,O,E)=>{"use strict";var d=E(92033),x=E(1949);z.exports={packageInit:function(f,T){if(T=Array.prototype.slice.call(T),!f)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(f,"currentProvider",{get:function(){return f._provider},set:function(g){return f.setProvider(g)},enumerable:!0,configurable:!0}),f._requestManager=T[0]&&T[0]._requestManager?T[0]._requestManager:new d.Manager(T[0],T[1]),f.givenProvider=d.Manager.givenProvider,f.providers=d.Manager.providers,f._provider=f._requestManager.provider,f.setProvider||(f.setProvider=function(g,b){return f._requestManager.setProvider(g,b),f._provider=f._requestManager.provider,!0}),f.setRequestManager=function(g){f._requestManager=g,f._provider=g.provider},f.BatchRequest=d.BatchManager.bind(null,f._requestManager),f.extend=x(f)},addProviders:function(f){f.givenProvider=d.Manager.givenProvider,f.providers=d.Manager.providers}}},79901:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(29033).Buffer,f=E(48161),T=E(62914).RQ,g=E(62914)._R,b=new T(function(m,_){return!m.match(/^u?int/)||Array.isArray(_)||_&&"object"===(0,d.default)(_)&&"BN"===_.constructor.name?_:_.toString()});function l(){}var h=function(){};h.prototype.encodeFunctionSignature=function(m){return("function"==typeof m||"object"===(0,d.default)(m)&&m)&&(m=f._jsonInterfaceMethodToString(m)),f.sha3(m).slice(0,10)},h.prototype.encodeEventSignature=function(m){return("function"==typeof m||"object"===(0,d.default)(m)&&m)&&(m=f._jsonInterfaceMethodToString(m)),f.sha3(m)},h.prototype.encodeParameter=function(m,_){return this.encodeParameters([m],[_])},h.prototype.encodeParameters=function(m,_){var w=this;return m=w.mapTypes(m),_=_.map(function(S,I){var P=m[I];return"object"===(0,d.default)(P)&&P.type&&(P=P.type),S=w.formatParam(P,S),"string"==typeof P&&P.includes("tuple")&&function L(V,W){if("array"===V.name){if(!V.type.match(/\[(\d+)\]/))return W.map(function(H){return L(b._getCoder(g.from(V.type.replace("[]",""))),H)});var G=parseInt(V.type.match(/\[(\d+)\]/)[1]);if(W.length!==G)throw new Error("Array length does not matches with the given input");return W.map(function(H){return L(b._getCoder(g.from(V.type.replace(/\[\d+\]/,""))),H)})}V.coders.forEach(function(H,j){"tuple"===H.name?L(H,W[j]):W[j]=w.formatParam(H.name,W[j])})}(b._getCoder(g.from(P)),S),S}),b.encode(m,_)},h.prototype.mapTypes=function(m){var _=this,w=[];return m.forEach(function(S){if("object"===(0,d.default)(S)&&"function"===S.type&&(S=Object.assign({},S,{type:"bytes24"})),_.isSimplifiedStructFormat(S)){var I=Object.keys(S)[0];w.push(Object.assign(_.mapStructNameAndType(I),{components:_.mapStructToCoderFormat(S[I])}))}else w.push(S)}),w},h.prototype.isSimplifiedStructFormat=function(m){return"object"===(0,d.default)(m)&&void 0===m.components&&void 0===m.name},h.prototype.mapStructNameAndType=function(m){var _="tuple";return m.indexOf("[]")>-1&&(_="tuple[]",m=m.slice(0,-2)),{type:_,name:m}},h.prototype.mapStructToCoderFormat=function(m){var _=this,w=[];return Object.keys(m).forEach(function(S){"object"!==(0,d.default)(m[S])?w.push({name:S,type:m[S]}):w.push(Object.assign(_.mapStructNameAndType(S),{components:_.mapStructToCoderFormat(m[S])}))}),w},h.prototype.formatParam=function(m,_){var w=this,S=new RegExp(/^bytes([0-9]*)$/),I=new RegExp(/^bytes([0-9]*)\[\]$/),P=new RegExp(/^(u?int)([0-9]*)$/),L=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(f.isBN(_)||f.isBigNumber(_))return _.toString(10);if(m.match(I)||m.match(L))return _.map(function(j){return w.formatParam(m.replace("[]",""),j)});var V=m.match(P);if(V){var W=parseInt(V[2]||"256");W/8<_.length&&(_=_.startsWith("-")?"-".concat(f.leftPad(_.substring(1),W)):f.leftPad(_,W))}if(V=m.match(S)){x.isBuffer(_)&&(_=f.toHex(_));var G=parseInt(V[1]);if(G){var H=2*G;"0x"===_.substring(0,2)&&(H+=2),_.length0&&(!_||"0x"===_||"0X"===_))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var S=b.decode(this.mapTypes(m),"0x"+_.replace(/0x/i,""),w),I=new l;return I.__length__=0,m.forEach(function(P,L){var V=S[I.__length__],W="object"===(0,d.default)(P)&&P.type&&"string"===P.type;I[L]=V="0x"!==V||W||"string"==typeof P&&"string"===P?V:null,("function"==typeof P||P&&"object"===(0,d.default)(P))&&P.name&&(I[P.name]=V),I.__length__++}),I},h.prototype.decodeLog=function(m,_,w){var S=this;w=Array.isArray(w)?w:[w],_=_||"";var I=[],P=[],L=0;m.forEach(function(H,j){H.indexed?(P[j]=["bool","int","uint","address","fixed","ufixed"].find(function(K){return-1!==H.type.indexOf(K)})?S.decodeParameter(H.type,w[L]):w[L],L++):I[j]=H});var W=_?this.decodeParametersWith(I,_,!0):[],G=new l;return G.__length__=0,m.forEach(function(H,j){G[j]="string"===H.type?"":null,void 0!==W[j]&&(G[j]=W[j]),void 0!==P[j]&&(G[j]=P[j]),H.name&&(G[H.name]=G[j]),G.__length__++}),G};var u=new h;z.exports=u},99819:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(93106)),T=x(E(3355)),g=x(E(90775)),b=x(E(74519));function l(v,k){var D=Object.keys(v);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(v);k&&(N=N.filter(function(C){return Object.getOwnPropertyDescriptor(v,C).enumerable})),D.push.apply(D,N)}return D}function h(v){for(var k=1;kv.length)&&(k=v.length);for(var D=0,N=new Array(k);D0){var Te,le="Signer Error: ",X=function(Ce,ke){var me="undefined"!=typeof Symbol&&Ce[Symbol.iterator]||Ce["@@iterator"];if(!me){if(Array.isArray(Ce)||(me=function(mt,ht){if(mt){if("string"==typeof mt)return u(mt,void 0);var wt=Object.prototype.toString.call(mt).slice(8,-1);return"Object"===wt&&mt.constructor&&(wt=mt.constructor.name),"Map"===wt||"Set"===wt?Array.from(mt):"Arguments"===wt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wt)?u(mt,void 0):void 0}}(Ce))){me&&(Ce=me);var Ee=0,ze=function(){};return{s:ze,n:function(){return Ee>=Ce.length?{done:!0}:{done:!1,value:Ce[Ee++]}},e:function(mt){throw mt},f:ze}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ve,nt=!0,tt=!1;return{s:function(){me=me.call(Ce)},n:function(){var mt=me.next();return nt=mt.done,mt},e:function(mt){tt=!0,Ve=mt},f:function(){try{nt||null==me.return||me.return()}finally{if(tt)throw Ve}}}}(ae);try{for(X.s();!(Te=X.n()).done;){var ne=Te.value;le+="".concat(le," ").concat(ne,".")}}catch(Ce){X.e(Ce)}finally{X.f()}throw new Error(le)}var pe="0x"+we.serialize().toString("hex"),_e=L.keccak256(pe),xe={messageHash:"0x"+d.from(we.getMessageToSign(!0)).toString("hex"),v:"0x"+we.v.toString("hex"),r:"0x"+we.r.toString("hex"),s:"0x"+we.s.toString("hex"),rawTransaction:pe,transactionHash:_e};return D(null,xe),xe}catch(Ce){return D(Ce),Promise.reject(Ce)}}return v.type=function(ee){var ce,ue=void 0!==ee.maxFeePerGas||void 0!==ee.maxPriorityFeePerGas;if(void 0!==ee.type?ce=L.toHex(ee.type):void 0===ee.type&&ue&&(ce="0x2"),void 0!==ee.gasPrice&&("0x2"===ce||ue))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===ce||"0x0"===ce)&&ue)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");return ue||ee.common&&ee.common.hardfork&&ee.common.hardfork.toLowerCase()===H.London||ee.hardfork&&ee.hardfork.toLowerCase()===H.London?ce="0x2":(ee.accessList||ee.common&&ee.common.hardfork&&ee.common.hardfork.toLowerCase()===H.Berlin||ee.hardfork&&ee.hardfork.toLowerCase()===H.Berlin)&&(ce="0x1"),ce}(v),void 0!==v.nonce&&void 0!==v.chainId&&(void 0!==v.gasPrice||void 0!==v.maxFeePerGas&&void 0!==v.maxPriorityFeePerGas)&&B?Promise.resolve(Q(v)):Promise.all([K(v.common)||K(v.common.customChain.chainId)?K(v.chainId)?N._ethereumCall.getChainId():v.chainId:void 0,K(v.nonce)?N._ethereumCall.getTransactionCount(N.privateKeyToAccount(k).address):v.nonce,K(B)?N._ethereumCall.getNetworkId():1,y(N,v)]).then(function(ee){var ce=(0,b.default)(ee,4),ue=ce[0],we=ce[1],ae=ce[2],Te=ce[3];if(K(ue)&&K(v.common)&&K(v.common.customChain.chainId)||K(we)||K(ae)||K(Te))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(ee));return Q(h(h(h({},v),K(v.common)||K(v.common.customChain.chainId)?{chainId:ue}:{}),{},{nonce:we,networkId:ae},Te))})},o.prototype.recoverTransaction=function(v){var k=d.from(v.slice(2),"hex"),D=W.fromSerializedData(k);return L.toChecksumAddress(D.getSenderAddress().toString("hex"))},o.prototype.hashMessage=function(v){var k=L.isHexStrict(v)?v:L.utf8ToHex(v),D=L.hexToBytes(k),N=d.from(D),a=d.from("\x19Ethereum Signed Message:\n"+D.length),B=d.concat([a,N]);return j.bufferToHex(L.keccak256(B))},o.prototype.sign=function(v,k){if(k.startsWith("0x")||(k="0x"+k),66!==k.length)throw new Error("Private key must be 32 bytes long");var D=this.hashMessage(v),N=w.sign(D,k),C=w.decodeSignature(N);return{message:v,messageHash:D,v:C[0],r:C[1],s:C[2],signature:N}},o.prototype.recover=function(v,k,D){var N=[].slice.apply(arguments);return v&&"object"===(0,T.default)(v)?this.recover(v.messageHash,w.encodeSignature([v.v,v.r,v.s]),!0):(D||(v=this.hashMessage(v)),N.length>=4?(D="boolean"==typeof(D=N.slice(-1)[0])&&!!D,this.recover(v,w.encodeSignature(N.slice(1,4)),D)):w.recover(v,k))},o.prototype.decrypt=function(v,k,D){if("string"!=typeof k)throw new Error("No password given.");var N,C,a=v&&"object"===(0,T.default)(v)?v:JSON.parse(D?v.toLowerCase():v);if(3!==a.version)throw new Error("Not a valid V3 wallet");if("scrypt"===a.crypto.kdf)C=a.crypto.kdfparams,N=I.syncScrypt(d.from(k),d.from(C.salt,"hex"),C.n,C.r,C.p,C.dklen);else{if("pbkdf2"!==a.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(C=a.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");N=S.pbkdf2Sync(d.from(k),d.from(C.salt,"hex"),C.c,C.dklen,"sha256")}var B=d.from(a.crypto.ciphertext,"hex");if(L.sha3(d.from([].concat((0,f.default)(N.slice(16,32)),(0,f.default)(B)))).replace("0x","")!==a.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var Q=S.createDecipheriv(a.crypto.cipher,N.slice(0,16),d.from(a.crypto.cipherparams.iv,"hex")),ee="0x"+d.from([].concat((0,f.default)(Q.update(B)),(0,f.default)(Q.final()))).toString("hex");return this.privateKeyToAccount(ee,!0)},o.prototype.encrypt=function(v,k,D){var N,C=this.privateKeyToAccount(v,!0),a=(D=D||{}).salt||S.randomBytes(32),B=D.iv||S.randomBytes(16),Q=D.kdf||"scrypt",ee={dklen:D.dklen||32,salt:a.toString("hex")};if("pbkdf2"===Q)ee.c=D.c||262144,ee.prf="hmac-sha256",N=S.pbkdf2Sync(d.from(k),d.from(ee.salt,"hex"),ee.c,ee.dklen,"sha256");else{if("scrypt"!==Q)throw new Error("Unsupported kdf");ee.n=D.n||8192,ee.r=D.r||8,ee.p=D.p||1,N=I.syncScrypt(d.from(k),d.from(ee.salt,"hex"),ee.n,ee.r,ee.p,ee.dklen)}var ce=S.createCipheriv(D.cipher||"aes-128-ctr",N.slice(0,16),B);if(!ce)throw new Error("Unsupported cipher");var ue=d.from([].concat((0,f.default)(ce.update(d.from(C.privateKey.replace("0x",""),"hex"))),(0,f.default)(ce.final()))),we=L.sha3(d.from([].concat((0,f.default)(N.slice(16,32)),(0,f.default)(ue)))).replace("0x","");return{version:3,id:P.v4({random:D.uuid||S.randomBytes(16)}),address:C.address.toLowerCase().replace("0x",""),crypto:{ciphertext:ue.toString("hex"),cipherparams:{iv:B.toString("hex")},cipher:D.cipher||"aes-128-ctr",kdf:Q,kdfparams:ee,mac:we.toString("hex")}}},M.prototype._findSafeIndex=function(v){return this.hasOwnProperty(v=v||0)?this._findSafeIndex(v+1):v},M.prototype._currentIndexes=function(){return Object.keys(this).map(function(v){return parseInt(v)}).filter(function(v){return v<9e20})},M.prototype.create=function(v,k){for(var D=0;D{"use strict";var d=E(28847),x=d(E(93106)),f=d(E(90775)),T=d(E(3355));function g(W,G){(null==G||G>W.length)&&(G=W.length);for(var H=0,j=new Array(G);H=M.length?{done:!0}:{done:!1,value:M[D++]}},e:function(Q){throw Q},f:N}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var C,a=!0,B=!1;return{s:function(){k=k.call(M)},n:function(){var Q=k.next();return a=Q.done,Q},e:function(Q){B=!0,C=Q},f:function(){try{a||null==k.return||k.return()}finally{if(B)throw C}}}}(W.inputs);try{var y=function(){var M=R.value;if(!M.indexed)return"continue";var v=H[M.name];if(!v)return K.push(null),"continue";Array.isArray(v)?K.push(v.map(function(k){return P.encodeParameter(M.type,k)})):K.push(P.encodeParameter(M.type,v))};for(o.s();!(R=o.n()).done;)y()}catch(M){o.e(M)}finally{o.f()}}return K.length&&(j.topics=K),this.options.address&&(j.address=this.options.address.toLowerCase()),j},L.prototype._decodeEventABI=function(W){var G=this;W.data=W.data||"",W.topics=W.topics||[];var H=w.outputLogFormatter(W);if("ALLEVENTS"===G.name&&(G=G.jsonInterface.find(function(R){return R.signature===W.topics[0]})||{anonymous:!0}),G.inputs=G.inputs||[],!G.anonymous){var j=0;G.inputs.forEach(function(R){return R.indexed?j++:null}),j>0&&W.topics.length!==j+1&&(G={anonymous:!0,inputs:[]})}var K=G.anonymous?W.topics:W.topics.slice(1);return H.returnValues=P.decodeLog(G.inputs,W.data,K),delete H.returnValues.__length__,H.event=G.name,H.signature=G.anonymous||!W.topics[0]?null:W.topics[0],H.raw={data:H.data,topics:H.topics},delete H.data,delete H.topics,H},L.prototype._encodeMethodABI=function(){var W=this._method.signature,G=this.arguments||[],H=!1,j=this._parent.options.jsonInterface.filter(function(R){return"constructor"===W&&R.type===W||(R.signature===W||R.signature===W.replace("0x","")||R.name===W)&&"function"===R.type}).map(function(R){var o=Array.isArray(R.inputs)?R.inputs.length:0;if(o!==G.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+o+" arguments.");return"function"===R.type&&(H=R.signature),Array.isArray(R.inputs)?R.inputs:[]}).map(function(R){return P.encodeParameters(R,G).replace("0x","")})[0]||"";if("constructor"===W){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+j}var K=H?H+j:j;if(!K)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return K},L.prototype._decodeMethodReturn=function(W,G){if(!G)return null;G=G.length>=2?G.slice(2):G;var H=P.decodeParameters(W,G);return 1===H.__length__?H[0]:(delete H.__length__,H)},L.prototype.deploy=function(W,G){if((W=W||{}).arguments=W.arguments||[],!(W=this._getOrSetDefaultOptions(W)).data){if("function"==typeof G)return G(S.ContractMissingDeployDataError());throw S.ContractMissingDeployDataError()}var H=this.options.jsonInterface.find(function(j){return"constructor"===j.type})||{};return H.signature="constructor",this._createTxObject.apply({method:H,parent:this,deployData:W.data,_ethAccounts:this.constructor._ethAccounts},W.arguments)},L.prototype._generateEventOptions=function(){var W=Array.prototype.slice.call(arguments),G=this._getCallback(W),H="object"===(!!W[W.length-1]&&(0,T.default)(W[W.length-1]))?W.pop():{},j="string"==typeof W[0]?W[0]:"allevents",K="allevents"===j.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(R){return"event"===R.type&&(R.name===j||R.signature==="0x"+j.replace("0x",""))});if(!K)throw S.ContractEventDoesNotExistError(j);if(!m.isAddress(this.options.address))throw S.ContractNoAddressDefinedError();return{params:this._encodeEventABI(K,H),event:K,filter:H.filter||{},callback:G}},L.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},L.prototype.once=function(W,G,H){var j=Array.prototype.slice.call(arguments);if(!(H=this._getCallback(j)))throw S.ContractOnceRequiresCallbackError();G&&delete G.fromBlock,this._on(W,G,function(K,R,o){o.unsubscribe(),"function"==typeof H&&H(K,R,o)})},L.prototype._on=function(){var W=this._generateEventOptions.apply(this,arguments);W.params&&W.params.toBlock&&(delete W.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",W.event.name),this._checkListener("removeListener",W.event.name);var G=new _({subscription:{params:1,inputFormatter:[w.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(W.event),subscriptionHandler:function(H){this.emit(H.removed?"changed":"data",H),"function"==typeof this.callback&&this.callback(null,H,this)}},type:"eth",requestManager:this._requestManager});return G.subscribe("logs",W.params,W.callback||function(){}),G};var V=function(W,G){if(W.event&&"ALLEVENTS"===W.event.name&&Array.isArray(G)){var H=W.filter||{},j=Object.keys(H);return j.length>0?G.filter(function(K){return"string"==typeof K||j.every(function(R){return Array.isArray(H[R])?H[R].some(function(o){return String(K.returnValues[R]).toUpperCase()===String(o).toUpperCase()}):String(K.returnValues[R]).toUpperCase()===String(H[R]).toUpperCase()})}):G}return G};L.prototype.getPastEvents=function(){var W=this._generateEventOptions.apply(this,arguments),G=new u({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[w.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(W.event)});G.setRequestManager(this._requestManager);var H=G.buildCall();return G=null,H(W.params,function(j,K){"function"==typeof W.callback&&W.callback(j,V(W,K))}).then(V.bind(this,W))},L.prototype._createTxObject=function(){var W=Array.prototype.slice.call(arguments),G={};if("function"===this.method.type&&(G.call=this.parent._executeMethod.bind(G,"call"),G.call.request=this.parent._executeMethod.bind(G,"call",!0)),G.send=this.parent._executeMethod.bind(G,"send"),G.send.request=this.parent._executeMethod.bind(G,"send",!0),G.encodeABI=this.parent._encodeMethodABI.bind(G),G.estimateGas=this.parent._executeMethod.bind(G,"estimate"),G.createAccessList=this.parent._executeMethod.bind(G,"createAccessList"),W&&this.method.inputs&&W.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,W);throw S.InvalidNumberOfParams(W.length,this.method.inputs.length,this.method.name)}return G.arguments=W||[],G._method=this.method,G._parent=this.parent,G._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(G._deployData=this.deployData),G},L.prototype._processExecuteArguments=function(W,G){var H={};if(H.type=W.shift(),H.callback=this._parent._getCallback(W),"call"!==H.type||!0===W[W.length-1]||"string"!=typeof W[W.length-1]&&!isFinite(W[W.length-1])||(H.defaultBlock=W.pop()),H.options="object"===(!!W[W.length-1]&&(0,T.default)(W[W.length-1]))?W.pop():{},H.generateRequest=!0===W[W.length-1]&&W.pop(),H.options=this._parent._getOrSetDefaultOptions(H.options),H.options.data=this.encodeABI(),!this._deployData&&!m.isAddress(this._parent.options.address))throw S.ContractNoAddressDefinedError();return this._deployData||(H.options.to=this._parent.options.address),H.options.data?H:m._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),G.eventEmitter,G.reject,H.callback)},L.prototype._executeMethod=function(){var W=this,G=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),H),H=I("send"!==G.type),j=W.constructor._ethAccounts||W._ethAccounts;if(G.generateRequest){var K={params:[w.inputCallFormatter.call(this._parent,G.options)],callback:G.callback};return"call"===G.type?(K.params.push(w.inputDefaultBlockNumberFormatter.call(this._parent,G.defaultBlock)),K.method="eth_call",K.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):K.method="eth_sendTransaction",K}switch(G.type){case"createAccessList":return m.isAddress(G.options.from)?new u({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[w.inputTransactionFormatter,w.inputDefaultBlockNumberFormatter],requestManager:W._parent._requestManager,accounts:j,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock}).createFunction()(G.options,G.callback):m._fireError(S.ContractNoFromAddressDefinedError(),H.eventEmitter,H.reject,G.callback);case"estimate":return new u({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[w.inputCallFormatter],outputFormatter:m.hexToNumber,requestManager:W._parent._requestManager,accounts:j,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock}).createFunction()(G.options,G.callback);case"call":return new u({name:"call",call:"eth_call",params:2,inputFormatter:[w.inputCallFormatter,w.inputDefaultBlockNumberFormatter],outputFormatter:function(o){return W._parent._decodeMethodReturn(W._method.outputs,o)},requestManager:W._parent._requestManager,accounts:j,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock,handleRevert:W._parent.handleRevert,abiCoder:P}).createFunction()(G.options,G.defaultBlock,G.callback);case"send":if(!m.isAddress(G.options.from))return m._fireError(S.ContractNoFromAddressDefinedError(),H.eventEmitter,H.reject,G.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&G.options.value&&G.options.value>0)return m._fireError(new Error("Can not send value to non-payable contract method or constructor"),H.eventEmitter,H.reject,G.callback);var R={receiptFormatter:function(o){if(Array.isArray(o.logs)){var y=o.logs.map(function(v){return W._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:W._parent.options.jsonInterface},v)});o.events={};var M=0;y.forEach(function(v){v.event?o.events[v.event]?Array.isArray(o.events[v.event])?o.events[v.event].push(v):o.events[v.event]=[o.events[v.event],v]:o.events[v.event]=v:(o.events[M]=v,M++)}),delete o.logs}return o},contractDeployFormatter:function(o){var y=W._parent.clone();return y.options.address=o.contractAddress,y}};return new u({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[w.inputTransactionFormatter],requestManager:W._parent._requestManager,accounts:W.constructor._ethAccounts||W._ethAccounts,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock,transactionBlockTimeout:W._parent.transactionBlockTimeout,transactionConfirmationBlocks:W._parent.transactionConfirmationBlocks,transactionPollingTimeout:W._parent.transactionPollingTimeout,transactionPollingInterval:W._parent.transactionPollingInterval,defaultCommon:W._parent.defaultCommon,defaultChain:W._parent.defaultChain,defaultHardfork:W._parent.defaultHardfork,handleRevert:W._parent.handleRevert,extraFormatters:R,abiCoder:P}).createFunction()(G.options,G.callback);default:throw new Error('Method "'+G.type+'" not implemented.')}},z.exports=L},46764:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(94571)),T=E(55160),g=E(11314).formatters,b=E(48161),l=E(11841),h=E(62867),u=E(22689);function m(_){this.eth=_;var w=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new l(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new h(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return w},set:function(S){w=null!==S?g.inputAddressFormatter(S):S},enumerable:!0})}m.prototype.supportsInterface=function(_,w,S){return this.getResolver(_).then(function(I){return b.isHexStrict(w)||(w=b.sha3(w).slice(0,10)),I.methods.supportsInterface(w).call(S)}).catch(function(I){if("function"!=typeof S)throw I;S(I,null)})},m.prototype.resolver=function(_,w){return this.registry.resolver(_,w)},m.prototype.getResolver=function(_,w){return this.registry.getResolver(_,w)},m.prototype.setResolver=function(_,w,S,I){return this.registry.setResolver(_,w,S,I)},m.prototype.setRecord=function(_,w,S,I,P,L){return this.registry.setRecord(_,w,S,I,P,L)},m.prototype.setSubnodeRecord=function(_,w,S,I,P,L,V){return this.registry.setSubnodeRecord(_,w,S,I,P,L,V)},m.prototype.setApprovalForAll=function(_,w,S,I){return this.registry.setApprovalForAll(_,w,S,I)},m.prototype.isApprovedForAll=function(_,w,S){return this.registry.isApprovedForAll(_,w,S)},m.prototype.recordExists=function(_,w){return this.registry.recordExists(_,w)},m.prototype.setSubnodeOwner=function(_,w,S,I,P){return this.registry.setSubnodeOwner(_,w,S,I,P)},m.prototype.getTTL=function(_,w){return this.registry.getTTL(_,w)},m.prototype.setTTL=function(_,w,S,I){return this.registry.setTTL(_,w,S,I)},m.prototype.getOwner=function(_,w){return this.registry.getOwner(_,w)},m.prototype.setOwner=function(_,w,S,I){return this.registry.setOwner(_,w,S,I)},m.prototype.getAddress=function(_,w){return this.resolverMethodHandler.method(_,"addr",[]).call(w)},m.prototype.setAddress=function(_,w,S,I){return this.resolverMethodHandler.method(_,"setAddr",[w]).send(S,I)},m.prototype.getPubkey=function(_,w){return this.resolverMethodHandler.method(_,"pubkey",[],null,w).call(w)},m.prototype.setPubkey=function(_,w,S,I,P){return this.resolverMethodHandler.method(_,"setPubkey",[w,S]).send(I,P)},m.prototype.getContent=function(_,w){return this.resolverMethodHandler.method(_,"content",[]).call(w)},m.prototype.setContent=function(_,w,S,I){return this.resolverMethodHandler.method(_,"setContent",[w]).send(S,I)},m.prototype.getContenthash=function(_,w){return this.resolverMethodHandler.method(_,"contenthash",[],u.decode).call(w)},m.prototype.setContenthash=function(_,w,S,I){var P;try{P=u.encode(w)}catch{var L=new Error("Could not encode "+w+". See docs for supported hash protocols.");if("function"==typeof I)return void I(L,null);throw L}return this.resolverMethodHandler.method(_,"setContenthash",[P]).send(S,I)},m.prototype.getMultihash=function(_,w){return this.resolverMethodHandler.method(_,"multihash",[]).call(w)},m.prototype.setMultihash=function(_,w,S,I){return this.resolverMethodHandler.method(_,"multihash",[w]).send(S,I)},m.prototype.checkNetwork=(0,f.default)(x.default.mark(function _(){var w,I,P,L;return x.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(w=new Date/1e3,this._lastSyncCheck&&!(w-this._lastSyncCheck>3600)){V.next=9;break}return V.next=4,this.eth.getBlock("latest");case 4:if(!((I=w-V.sent.timestamp)>3600)){V.next=8;break}throw new Error("Network not synced; last block was "+I+" seconds ago");case 8:this._lastSyncCheck=w;case 9:if(!this.registryAddress){V.next=11;break}return V.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){V.next=20;break}return V.next=14,this.eth.net.getNetworkType();case 14:if(void 0!==(L=T.addresses[P=V.sent])){V.next=18;break}throw new Error("ENS is not supported on network "+P);case 18:return this._detectedAddress=L,V.abrupt("return",this._detectedAddress);case 20:return V.abrupt("return",this._detectedAddress);case 21:case"end":return V.stop()}},_,this)})),z.exports=m},55160:z=>{"use strict";z.exports={addresses:{main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",ropsten:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",rinkeby:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},interfaceIds:{addr:"0x3b3b57de",setAddr:"0x3b3b57de",pubkey:"0xc8690233",setPubkey:"0xc8690233",contenthash:"0xbc1c58d1",setContenthash:"0xbc1c58d1",content:"0xd8389dc5",setContent:"0xd8389dc5"}}},11841:(z,O,E)=>{"use strict";var d=E(58164),x=E(21006),f=E(90282),T=E(11314).formatters,g=E(48161),b=E(43205),l=E(48384);function h(u){var m=this;this.ens=u,this.contract=u.checkNetwork().then(function(_){var w=new d(b,_);return w.setProvider(m.ens.eth.currentProvider),w})}h.prototype.owner=function(u,m){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(u,m)},h.prototype.getOwner=function(u,m){var _=new f(!0);return this.contract.then(function(w){return w.methods.owner(x.hash(u)).call()}).then(function(w){"function"!=typeof m?_.resolve(w):m(w,w)}).catch(function(w){"function"!=typeof m?_.reject(w):m(w,null)}),_.eventEmitter},h.prototype.setOwner=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setOwner(x.hash(u),T.inputAddressFormatter(m)).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},h.prototype.getTTL=function(u,m){var _=new f(!0);return this.contract.then(function(w){return w.methods.ttl(x.hash(u)).call()}).then(function(w){"function"!=typeof m?_.resolve(w):m(w,w)}).catch(function(w){"function"!=typeof m?_.reject(w):m(w,null)}),_.eventEmitter},h.prototype.setTTL=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setTTL(x.hash(u),m).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},h.prototype.setSubnodeOwner=function(u,m,_,w,S){var I=new f(!0);return g.isHexStrict(m)||(m=g.sha3(m)),this.contract.then(function(P){return P.methods.setSubnodeOwner(x.hash(u),m,T.inputAddressFormatter(_)).send(w)}).then(function(P){"function"!=typeof S?I.resolve(P):S(P,P)}).catch(function(P){"function"!=typeof S?I.reject(P):S(P,null)}),I.eventEmitter},h.prototype.setRecord=function(u,m,_,w,S,I){var P=new f(!0);return this.contract.then(function(L){return L.methods.setRecord(x.hash(u),T.inputAddressFormatter(m),T.inputAddressFormatter(_),w).send(S)}).then(function(L){"function"!=typeof I?P.resolve(L):I(L,L)}).catch(function(L){"function"!=typeof I?P.reject(L):I(L,null)}),P.eventEmitter},h.prototype.setSubnodeRecord=function(u,m,_,w,S,I,P){var L=new f(!0);return g.isHexStrict(m)||(m=g.sha3(m)),this.contract.then(function(V){return V.methods.setSubnodeRecord(x.hash(u),m,T.inputAddressFormatter(_),T.inputAddressFormatter(w),S).send(I)}).then(function(V){"function"!=typeof P?L.resolve(V):P(V,V)}).catch(function(V){"function"!=typeof P?L.reject(V):P(V,null)}),L.eventEmitter},h.prototype.setApprovalForAll=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setApprovalForAll(T.inputAddressFormatter(u),m).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},h.prototype.isApprovedForAll=function(u,m,_){var w=new f(!0);return this.contract.then(function(S){return S.methods.isApprovedForAll(T.inputAddressFormatter(u),T.inputAddressFormatter(m)).call()}).then(function(S){"function"!=typeof _?w.resolve(S):_(S,S)}).catch(function(S){"function"!=typeof _?w.reject(S):_(S,null)}),w.eventEmitter},h.prototype.recordExists=function(u,m){var _=new f(!0);return this.contract.then(function(w){return w.methods.recordExists(x.hash(u)).call()}).then(function(w){"function"!=typeof m?_.resolve(w):m(w,w)}).catch(function(w){"function"!=typeof m?_.reject(w):m(w,null)}),_.eventEmitter},h.prototype.resolver=function(u,m){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(u,m)},h.prototype.getResolver=function(u,m){var _=this;return this.contract.then(function(w){return w.methods.resolver(x.hash(u)).call()}).then(function(w){var S=new d(l,w);if(S.setProvider(_.ens.eth.currentProvider),"function"!=typeof m)return S;m(S,S)}).catch(function(w){if("function"!=typeof m)throw w;m(w,null)})},h.prototype.setResolver=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setResolver(x.hash(u),T.inputAddressFormatter(m)).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},z.exports=h},30715:(z,O,E)=>{"use strict";var d=E(46764);z.exports=d},62867:(z,O,E)=>{"use strict";var u,d=E(28847),x=d(E(82247)),f=d(E(94571)),T=E(90282),g=E(21006),b=E(11314).errors,l=E(55160).interfaceIds;function h(u){this.registry=u}h.prototype.method=function(u,m,_,w,S){return{call:this.call.bind({ensName:u,methodName:m,methodArguments:_,callback:S,parent:this,outputFormatter:w}),send:this.send.bind({ensName:u,methodName:m,methodArguments:_,callback:S,parent:this})}},h.prototype.call=function(u){var I,m=this,_=new T,w=this.parent.prepareArguments(this.ensName,this.methodArguments),S=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then((I=(0,f.default)(x.default.mark(function P(L){return x.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,m.parent.checkInterfaceSupport(L,m.methodName);case 2:m.parent.handleCall(_,L.methods[m.methodName],w,S,u);case 3:case"end":return V.stop()}},P)})),function(P){return I.apply(this,arguments)})).catch(function(I){"function"!=typeof u?_.reject(I):u(I,null)}),_.eventEmitter},h.prototype.send=function(u,m){var I,_=this,w=new T,S=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then((I=(0,f.default)(x.default.mark(function P(L){return x.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,_.parent.checkInterfaceSupport(L,_.methodName);case 2:_.parent.handleSend(w,L.methods[_.methodName],S,u,m);case 3:case"end":return V.stop()}},P)})),function(P){return I.apply(this,arguments)})).catch(function(I){"function"!=typeof m?w.reject(I):m(I,null)}),w.eventEmitter},h.prototype.handleCall=function(u,m,_,w,S){return m.apply(this,_).call().then(function(I){w&&(I=w(I)),"function"!=typeof S?u.resolve(I):S(I,I)}).catch(function(I){"function"!=typeof S?u.reject(I):S(I,null)}),u},h.prototype.handleSend=function(u,m,_,w,S){return m.apply(this,_).send(w).on("sending",function(){u.eventEmitter.emit("sending")}).on("sent",function(){u.eventEmitter.emit("sent")}).on("transactionHash",function(I){u.eventEmitter.emit("transactionHash",I)}).on("confirmation",function(I,P){u.eventEmitter.emit("confirmation",I,P)}).on("receipt",function(I){u.eventEmitter.emit("receipt",I),u.resolve(I),"function"==typeof S&&S(I,I)}).on("error",function(I){u.eventEmitter.emit("error",I),"function"!=typeof S?u.reject(I):S(I,null)}),u},h.prototype.prepareArguments=function(u,m){var _=g.hash(u);return m.length>0?(m.unshift(_),m):[_]},h.prototype.checkInterfaceSupport=(u=(0,f.default)(x.default.mark(function m(_,w){var S;return x.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(l[w]){I.next=2;break}return I.abrupt("return");case 2:return S=!1,I.prev=3,I.next=6,_.methods.supportsInterface(l[w]).call();case 6:S=I.sent,I.next=12;break;case 9:I.prev=9,I.t0=I.catch(3),console.warn('Could not verify interface of resolver contract at "'+_.options.address+'". ');case 12:if(S){I.next=14;break}throw b.ResolverMethodMissingError(_.options.address,w);case 14:case"end":return I.stop()}},m,null,[[3,9]])})),function(m,_){return u.apply(this,arguments)}),z.exports=h},22689:(z,O,E)=>{"use strict";var d=E(94308);z.exports={decode:function(x){var f=null,T=null,g=null;if(x&&x.error)return{protocolType:null,decoded:x.error};if(x)try{f=d.decode(x);var b=d.getCodec(x);"ipfs-ns"===b?T="ipfs":"swarm-ns"===b?T="bzz":"onion"===b?T="onion":"onion3"===b?T="onion3":f=x}catch(l){g=l.message}return{protocolType:T,decoded:f,error:g}},encode:function(x){var f,T,g=!1;if(x){var b=x.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||x.match(/\/(ipfs)\/(.*)/);b&&(T=b[1],f=b[2]);try{if("ipfs"===T)f.length>=4&&(g="0x"+d.fromIpfs(f));else if("bzz"===T)f.length>=4&&(g="0x"+d.fromSwarm(f));else if("onion"===T)16===f.length&&(g="0x"+d.encode("onion",f));else{if("onion3"!==T)throw new Error("Could not encode content hash: unsupported content type");56===f.length&&(g="0x"+d.encode("onion3",f))}}catch(l){throw l}}return g}}},43205:z=>{"use strict";z.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},48384:z=>{"use strict";z.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},30006:(z,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=E(48161),g=E(31734),b=function(u){var m="A".charCodeAt(0),_="Z".charCodeAt(0);return(u=(u=u.toUpperCase()).slice(4)+u.slice(0,4)).split("").map(function(w){var S=w.charCodeAt(0);return S>=m&&S<=_?S-m+10:w}).join("")},l=function(u){for(var m,_=u;_.length>2;)m=_.slice(0,9),_=parseInt(m,10)%97+_.slice(m.length);return parseInt(_,10)%97},h=function(){function u(m){(0,x.default)(this,u),this._iban=m}return(0,f.default)(u,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===l(b(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var m=this._iban.slice(4),_=new g(m,36);return T.toChecksumAddress(_.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(m){if(!(m=new u(m)).isDirect())throw new Error("IBAN is indirect and can't be converted");return m.toAddress()}},{key:"toIban",value:function(m){return u.fromAddress(m).toString()}},{key:"fromAddress",value:function(m){if(!T.isAddress(m))throw new Error("Provided address is not a valid address: "+m);m=m.replace("0x","").replace("0X","");var _=function(w,S){for(var I=w;I.length<30;)I="0"+I;return I}(new g(m,16).toString(36));return u.fromBban(_.toUpperCase())}},{key:"fromBban",value:function(m){return new u("XE"+("0"+(98-l(b("XE00"+m)))).slice(-2)+m)}},{key:"createIndirect",value:function(m){return u.fromBban("ETH"+m.institution+m.identifier)}},{key:"isValid",value:function(m){return new u(m).isValid()}}]),u}();z.exports=h},96306:(z,O,E)=>{"use strict";var d=E(80606),x=E(53349),f=E(48161),T=E(473),g=E(11314).formatters,b=function(){var l=this;d.packageInit(this,arguments),this.net=new T(this);var h=null,u="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return h},set:function(_){return _&&(h=f.toChecksumAddress(g.inputAddressFormatter(_))),m.forEach(function(w){w.defaultAccount=h}),_},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return u},set:function(_){return u=_,m.forEach(function(w){w.defaultBlock=u}),_},enumerable:!0});var m=[new x({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:f.toChecksumAddress}),new x({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:f.toChecksumAddress}),new x({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[g.inputAddressFormatter,null,null]}),new x({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[g.inputAddressFormatter]}),new x({name:"importRawKey",call:"personal_importRawKey",params:2}),new x({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[g.inputTransactionFormatter,null]}),new x({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[g.inputTransactionFormatter,null]}),new x({name:"sign",call:"personal_sign",params:3,inputFormatter:[g.inputSignFormatter,g.inputAddressFormatter,null]}),new x({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[g.inputSignFormatter,null]})];m.forEach(function(_){_.attachToObject(l),_.setRequestManager(l._requestManager),_.defaultBlock=l.defaultBlock,_.defaultAccount=l.defaultAccount})};d.addProviders(b),z.exports=b},28130:z=>{"use strict";z.exports=function(O){var E,d=this;return this.net.getId().then(function(x){return E=x,d.getBlock(0)}).then(function(x){var f="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===x.hash&&1===E&&(f="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===x.hash&&3===E&&(f="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===x.hash&&4===E&&(f="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===x.hash&&5===E&&(f="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===x.hash&&42===E&&(f="kovan"),"function"==typeof O&&O(null,f),f}).catch(function(x){if("function"!=typeof O)throw x;O(x)})}},66748:(z,O,E)=>{"use strict";var d=E(80606),x=E(11314),f=E(34178).subscriptions,T=E(53349),g=E(48161),b=E(473),l=E(30715),h=E(96306),u=E(58164),m=E(30006),_=E(99819),w=E(79901),S=E(28130),I=x.formatters,P=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},L=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},V=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},W=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},G=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},H=function(){var j=this;d.packageInit(this,arguments);var K=this.setRequestManager;this.setRequestManager=function(ae){return K(ae),j.net.setRequestManager(ae),j.personal.setRequestManager(ae),j.accounts.setRequestManager(ae),j.Contract._requestManager=j._requestManager,j.Contract.currentProvider=j._provider,!0};var R=this.setProvider;this.setProvider=function(){R.apply(j,arguments),j.setRequestManager(j._requestManager),j.ens._detectedAddress=null,j.ens._lastSyncCheck=null};var o,y,M,v=!1,k=null,D="latest",N=50,C=24,a=750,B=1e3,Q=10,ee=100;Object.defineProperty(this,"handleRevert",{get:function(){return v},set:function(ae){j.Contract.handleRevert=v=ae,we.forEach(function(Te){Te.handleRevert=v})},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return M},set:function(ae){j.Contract.defaultCommon=M=ae,we.forEach(function(Te){Te.defaultCommon=M})},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return y},set:function(ae){j.Contract.defaultHardfork=y=ae,we.forEach(function(Te){Te.defaultHardfork=y})},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return o},set:function(ae){j.Contract.defaultChain=o=ae,we.forEach(function(Te){Te.defaultChain=o})},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return a},set:function(ae){j.Contract.transactionPollingTimeout=a=ae,we.forEach(function(Te){Te.transactionPollingTimeout=a})},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return B},set:function(ae){j.Contract.transactionPollingInterval=B=ae,we.forEach(function(Te){Te.transactionPollingInterval=B})},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return C},set:function(ae){j.Contract.transactionConfirmationBlocks=C=ae,we.forEach(function(Te){Te.transactionConfirmationBlocks=C})},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return N},set:function(ae){j.Contract.transactionBlockTimeout=N=ae,we.forEach(function(Te){Te.transactionBlockTimeout=N})},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return Q},set:function(ae){j.Contract.blockHeaderTimeout=Q=ae,we.forEach(function(Te){Te.blockHeaderTimeout=Q})},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return k},set:function(ae){return ae&&(k=g.toChecksumAddress(I.inputAddressFormatter(ae))),j.Contract.defaultAccount=k,j.personal.defaultAccount=k,we.forEach(function(Te){Te.defaultAccount=k}),ae},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return D},set:function(ae){return j.Contract.defaultBlock=D=ae,j.personal.defaultBlock=D,we.forEach(function(Te){Te.defaultBlock=D}),ae},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return ee},set:function(ae){j.currentProvider&&j.currentProvider.setMaxListeners&&(ee=ae,j.currentProvider.setMaxListeners(ae))},enumerable:!0}),this.clearSubscriptions=j._requestManager.clearSubscriptions.bind(j._requestManager),this.removeSubscriptionById=j._requestManager.removeSubscription.bind(j._requestManager),this.net=new b(this),this.net.getNetworkType=S.bind(this),this.accounts=new _(this),this.personal=new h(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=ee;var ce=this,ue=function(){u.apply(this,arguments);var ae=this,Te=ce.setProvider;ce.setProvider=function(){Te.apply(ce,arguments),d.packageInit(ae,[ce])}};ue.setProvider=function(){u.setProvider.apply(this,arguments)},(ue.prototype=Object.create(u.prototype)).constructor=ue,this.Contract=ue,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=m,this.abi=w,this.ens=new l(this);var we=[new T({name:"getNodeInfo",call:"web3_clientVersion"}),new T({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new T({name:"getCoinbase",call:"eth_coinbase",params:0}),new T({name:"isMining",call:"eth_mining",params:0}),new T({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:g.hexToNumber}),new T({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:I.outputSyncingFormatter}),new T({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:I.outputBigNumberFormatter}),new T({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[g.numberToHex,I.inputBlockNumberFormatter,null]}),new T({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:g.toChecksumAddress}),new T({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:g.hexToNumber}),new T({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[I.inputAddressFormatter,I.inputDefaultBlockNumberFormatter],outputFormatter:I.outputBigNumberFormatter}),new T({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[I.inputAddressFormatter,g.numberToHex,I.inputDefaultBlockNumberFormatter]}),new T({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[I.inputAddressFormatter,I.inputDefaultBlockNumberFormatter]}),new T({name:"getBlock",call:P,params:2,inputFormatter:[I.inputBlockNumberFormatter,function(ae){return!!ae}],outputFormatter:I.outputBlockFormatter}),new T({name:"getUncle",call:V,params:2,inputFormatter:[I.inputBlockNumberFormatter,g.numberToHex],outputFormatter:I.outputBlockFormatter}),new T({name:"getBlockTransactionCount",call:W,params:1,inputFormatter:[I.inputBlockNumberFormatter],outputFormatter:g.hexToNumber}),new T({name:"getBlockUncleCount",call:G,params:1,inputFormatter:[I.inputBlockNumberFormatter],outputFormatter:g.hexToNumber}),new T({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:I.outputTransactionFormatter}),new T({name:"getTransactionFromBlock",call:L,params:2,inputFormatter:[I.inputBlockNumberFormatter,g.numberToHex],outputFormatter:I.outputTransactionFormatter}),new T({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:I.outputTransactionReceiptFormatter}),new T({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[I.inputAddressFormatter,I.inputDefaultBlockNumberFormatter],outputFormatter:g.hexToNumber}),new T({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:w}),new T({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[I.inputTransactionFormatter]}),new T({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[I.inputTransactionFormatter],abiCoder:w}),new T({name:"sign",call:"eth_sign",params:2,inputFormatter:[I.inputSignFormatter,I.inputAddressFormatter],transformPayload:function(ae){return ae.params.reverse(),ae}}),new T({name:"call",call:"eth_call",params:2,inputFormatter:[I.inputCallFormatter,I.inputDefaultBlockNumberFormatter],abiCoder:w}),new T({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[I.inputCallFormatter],outputFormatter:g.hexToNumber}),new T({name:"submitWork",call:"eth_submitWork",params:3}),new T({name:"getWork",call:"eth_getWork",params:0}),new T({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[I.inputLogFormatter],outputFormatter:I.outputLogFormatter}),new T({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:g.hexToNumber}),new T({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:g.toChecksumAddress}),new T({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[I.inputAddressFormatter,I.inputStorageKeysFormatter,I.inputDefaultBlockNumberFormatter],outputFormatter:I.outputProofFormatter}),new T({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:I.outputTransactionFormatter}),new T({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[I.inputTransactionFormatter,I.inputDefaultBlockNumberFormatter]}),new f({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:I.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[I.inputLogFormatter],outputFormatter:I.outputLogFormatter,subscriptionHandler:function(ae){this.emit(ae.removed?"changed":"data",ae),"function"==typeof this.callback&&this.callback(null,ae,this)}},syncing:{params:0,outputFormatter:I.outputSyncingFormatter,subscriptionHandler:function(ae){var Te=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",Te._isSyncing),"function"==typeof this.callback&&this.callback(null,Te._isSyncing,this),setTimeout(function(){Te.emit("data",ae),"function"==typeof Te.callback&&Te.callback(null,ae,Te)},0)):(this.emit("data",ae),"function"==typeof Te.callback&&this.callback(null,ae,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){ae.currentBlock>ae.highestBlock-200&&(Te._isSyncing=!1,Te.emit("changed",Te._isSyncing),"function"==typeof Te.callback&&Te.callback(null,Te._isSyncing,Te))},500))}}}})];we.forEach(function(ae){ae.attachToObject(j),ae.setRequestManager(j._requestManager,j.accounts),ae.defaultBlock=j.defaultBlock,ae.defaultAccount=j.defaultAccount,ae.transactionBlockTimeout=j.transactionBlockTimeout,ae.transactionConfirmationBlocks=j.transactionConfirmationBlocks,ae.transactionPollingTimeout=j.transactionPollingTimeout,ae.transactionPollingInterval=j.transactionPollingInterval,ae.handleRevert=j.handleRevert})};d.addProviders(H),z.exports=H},473:(z,O,E)=>{"use strict";var d=E(80606),x=E(53349),f=E(48161),T=function(){var g=this;d.packageInit(this,arguments),[new x({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new x({name:"isListening",call:"net_listening",params:0}),new x({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:f.hexToNumber})].forEach(function(b){b.attachToObject(g),b.setRequestManager(g._requestManager)})};d.addProviders(T),z.exports=T},14565:(z,O,E)=>{"use strict";var d=E(11314).errors,x=E(33768),f=E(29519),T=E(90912);E(54258).polyfill(),void 0===E.g||E.g.AbortController||E(53368);var g=function(b,l){this.withCredentials=(l=l||{}).withCredentials,this.timeout=l.timeout||0,this.headers=l.headers,this.agent=l.agent,this.forceGlobalFetch=l.forceGlobalFetch||!1,this.connected=!1;var h=!1!==l.keepAlive;this.host=b||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new T.Agent({keepAlive:h}):this.httpAgent=new f.Agent({keepAlive:h}))};g.prototype.send=function(b,l){var h,u={method:"POST",body:JSON.stringify(b)},m={},_=this.forceGlobalFetch?globalThis.fetch:x;if("undefined"!=typeof AbortController?h=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(h=new window.AbortController),void 0!==h&&(u.signal=h.signal),"undefined"==typeof XMLHttpRequest){var w={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(w.httpsAgent=this.agent.https,w.httpAgent=this.agent.http),u.agent="https"===this.host.substring(0,5)?w.httpsAgent:w.httpAgent}this.headers&&this.headers.forEach(function(S){m[S.name]=S.value}),m["Content-Type"]||(m["Content-Type"]="application/json"),u.credentials=this.withCredentials?"include":"omit",u.headers=m,this.timeout>0&&void 0!==h&&(this.timeoutId=setTimeout(function(){h.abort()},this.timeout)),_(this.host,u).then(function(S){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),S.json().then(function(I){l(null,I)},function(){S.text().then(function(I){l(d.InvalidResponse(I))},function(){l(d.InvalidResponse(""))})})}.bind(this),function(S){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),l("AbortError"!==S.name?d.InvalidConnection(this.host,S):d.ConnectionTimeout(this.timeout))}.bind(this))},g.prototype.disconnect=function(){},g.prototype.supportsSubscriptions=function(){return!1},z.exports=g},52683:(z,O,E)=>{"use strict";var d=E(11314).errors,x=E(83150),f=function(T,g){var b=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=T,this.connected=!1,this.connection=g.connect({path:this.path}),this.addDefaultEvents();var l=function(h){var u=null;Array.isArray(h)?h.forEach(function(m){b.responseCallbacks[m.id]&&(u=m.id)}):u=h.id,u||-1===h.method.indexOf("_subscription")?b.responseCallbacks[u]&&(b.responseCallbacks[u](null,h),delete b.responseCallbacks[u]):b.notificationCallbacks.forEach(function(m){"function"==typeof m&&m(h)})};"Socket"===g.constructor.name?x(this.connection).done(l):this.connection.on("data",function(h){b._parseResponse(h.toString()).forEach(l)})};f.prototype.addDefaultEvents=function(){var T=this;this.connection.on("connect",function(){T.connected=!0}),this.connection.on("close",function(){T.connected=!1}),this.connection.on("error",function(){T._timeout()}),this.connection.on("end",function(){T._timeout()}),this.connection.on("timeout",function(){T._timeout()})},f.prototype._parseResponse=function(T){var g=this,b=[];return T.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(l){g.lastChunk&&(l=g.lastChunk+l);var h=null;try{h=JSON.parse(l)}catch{return g.lastChunk=l,clearTimeout(g.lastChunkTimeout),void(g.lastChunkTimeout=setTimeout(function(){throw g._timeout(),d.InvalidResponse(l)},15e3))}clearTimeout(g.lastChunkTimeout),g.lastChunk=null,h&&b.push(h)}),b},f.prototype._addResponseCallback=function(T,g){var b=T.id||T[0].id,l=T.method||T[0].method;this.responseCallbacks[b]=g,this.responseCallbacks[b].method=l},f.prototype._timeout=function(){for(var T in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(T)&&(this.responseCallbacks[T](d.InvalidConnection("on IPC")),delete this.responseCallbacks[T])},f.prototype.reconnect=function(){this.connection.connect({path:this.path})},f.prototype.send=function(T,g){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(T)),this._addResponseCallback(T,g)},f.prototype.on=function(T,g){if("function"!=typeof g)throw new Error("The second parameter callback must be a function.");"data"===T?this.notificationCallbacks.push(g):this.connection.on(T,g)},f.prototype.once=function(T,g){if("function"!=typeof g)throw new Error("The second parameter callback must be a function.");this.connection.once(T,g)},f.prototype.removeListener=function(T,g){var b=this;"data"===T?this.notificationCallbacks.forEach(function(l,h){l===g&&b.notificationCallbacks.splice(h,1)}):this.connection.removeListener(T,g)},f.prototype.removeAllListeners=function(T){"data"===T?this.notificationCallbacks=[]:this.connection.removeAllListeners(T)},f.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},f.prototype.supportsSubscriptions=function(){return!0},z.exports=f},40360:(z,O,E)=>{"use strict";var d=E(19142),x=E(29033).Buffer,f=E(28847)(E(3355)),T="[object process]"===Object.prototype.toString.call(void 0!==d?d:0),g="undefined"!=typeof navigator&&"ReactNative"===navigator.product,b=null,l=null;if(T||g){b=function(m){return x.from(m).toString("base64")};var h=E(51143);if(h.URL){var u=h.URL;l=function(m){return new u(m)}}else l=E(51143).parse}else b=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,f.default)(globalThis))?globalThis:self),l=function(m){return new URL(m)};z.exports={parseURL:l,btoa:b}},77651:(z,O,E)=>{"use strict";var d=E(98008),x=E(40360),f=E(11314).errors,T=E(1158).w3cwebsocket,g=function(b,l){d.call(this),l=l||{},this.url=b,this._customTimeout=l.timeout||15e3,this.headers=l.headers||{},this.protocol=l.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},l.reconnect),this.clientConfig=l.clientConfig||void 0,this.requestOptions=l.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1,this.connectFailedDescription=null;var h=x.parseURL(b);h.username&&h.password&&(this.headers.authorization="Basic "+x.btoa(h.username+":"+h.password)),h.auth&&(this.headers.authorization="Basic "+x.btoa(h.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(g.prototype=Object.create(d.prototype)).constructor=g,g.prototype.connect=function(){this.connection=new T(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},g.prototype._onMessage=function(b){var l=this;this._parseResponse("string"==typeof b.data?b.data:"").forEach(function(h){if(h.method&&-1!==h.method.indexOf("_subscription"))l.emit(l.DATA,h);else{var u=h.id;Array.isArray(h)&&(u=h[0].id),l.responseQueue.has(u)&&(void 0!==l.responseQueue.get(u).callback&&l.responseQueue.get(u).callback(!1,h),l.responseQueue.delete(u))}})},g.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var b=this;this.requestQueue.forEach(function(l,h){b.send(l.payload,l.callback),b.requestQueue.delete(h)})}},g.prototype._onConnectFailed=function(b){this.connectFailedDescription=b.toString().split("\n")[0];var l=this;this.connectFailedDescription&&(b.description=this.connectFailedDescription,this.connectFailedDescription=null),b.code=1006,b.reason="connection failed",!this.reconnectOptions.auto||[1e3,1001].includes(b.code)&&!1!==b.wasClean?(this.emit(this.ERROR,b),this.requestQueue.size>0&&this.requestQueue.forEach(function(h,u){h.callback(f.ConnectionNotOpenError(b)),l.requestQueue.delete(u)}),this.responseQueue.size>0&&this.responseQueue.forEach(function(h,u){h.callback(f.InvalidConnection("on WS",b)),l.responseQueue.delete(u)}),this.connection._connection&&this.connection._connection.removeAllListeners(),this.connection._client.removeAllListeners(),this.connection._readyState=3,this.emit(this.CLOSE,b)):this.reconnect()},g.prototype._onClose=function(b){var l=this;!this.reconnectOptions.auto||[1e3,1001].includes(b.code)&&!1!==b.wasClean?(this.emit(this.CLOSE,b),this.requestQueue.size>0&&this.requestQueue.forEach(function(h,u){h.callback(f.ConnectionNotOpenError(b)),l.requestQueue.delete(u)}),this.responseQueue.size>0&&this.responseQueue.forEach(function(h,u){h.callback(f.InvalidConnection("on WS",b)),l.responseQueue.delete(u)}),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},g.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this)),this.connection._client&&(this.connection._client.removeAllListeners("connectFailed"),this.connection._client.on("connectFailed",this._onConnectFailed.bind(this)))},g.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose),this.connection._connection&&this.connection._client.removeListener("connectFailed",this._onConnectFailed)},g.prototype._parseResponse=function(b){var l=this,h=[];return b.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(u){l.lastChunk&&(u=l.lastChunk+u);var m=null;try{m=JSON.parse(u)}catch{return l.lastChunk=u,clearTimeout(l.lastChunkTimeout),void(l.lastChunkTimeout=setTimeout(function(){l.reconnectOptions.auto&&l.reconnectOptions.onTimeout?l.reconnect():(l.emit(l.ERROR,f.ConnectionTimeout(l._customTimeout)),l.requestQueue.size>0&&l.requestQueue.forEach(function(w,S){w.callback(f.ConnectionTimeout(l._customTimeout)),l.requestQueue.delete(S)}))},l._customTimeout))}clearTimeout(l.lastChunkTimeout),l.lastChunk=null,m&&h.push(m)}),h},g.prototype.send=function(b,l){var h=b.id,u={payload:b,callback:l};if(Array.isArray(b)&&(h=b[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(h,u);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(h),this.emit(this.ERROR,f.ConnectionNotOpenError()),void u.callback(f.ConnectionNotOpenError());this.responseQueue.set(h,u),this.requestQueue.delete(h);try{this.connection.send(JSON.stringify(u.payload))}catch(m){u.callback(m),this.responseQueue.delete(h)}}},g.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},g.prototype.disconnect=function(b,l){this._removeSocketListeners(),this.connection.close(b||1e3,l)},g.prototype.supportsSubscriptions=function(){return!0},g.prototype.reconnect=function(){var b=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach(function(l,h){try{b.responseQueue.delete(h),l.callback(f.PendingRequestsOnReconnectingError())}catch(u){console.error("Error encountered in reconnect: ",u)}}),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach(function(l,h){l.callback(f.MaxAttemptsReachedOnReconnectingError()),b.requestQueue.delete(h)}))},z.exports=g},92565:(z,O,E)=>{"use strict";var d=E(80606),x=E(34178).subscriptions,f=E(53349),T=E(473),g=function(){var b=this;d.packageInit(this,arguments);var l=this.setRequestManager;this.setRequestManager=function(u){return l(u),b.net.setRequestManager(u),!0};var h=this.setProvider;this.setProvider=function(){h.apply(b,arguments),b.setRequestManager(b._requestManager)},this.net=new T(this),[new x({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new f({name:"getVersion",call:"shh_version",params:0}),new f({name:"getInfo",call:"shh_info",params:0}),new f({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new f({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new f({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new f({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new f({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new f({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new f({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new f({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new f({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new f({name:"newSymKey",call:"shh_newSymKey",params:0}),new f({name:"addSymKey",call:"shh_addSymKey",params:1}),new f({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new f({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new f({name:"getSymKey",call:"shh_getSymKey",params:1}),new f({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new f({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new f({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new f({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new f({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new f({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach(function(u){u.attachToObject(b),u.setRequestManager(b._requestManager)})};g.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},d.addProviders(g),z.exports=g},48161:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(17130),f=E(90323),T=E(747),g=E(75010),b=E(31734),l=function _(w,S){var I=[];return S.forEach(function(P){if("object"===(0,d.default)(P.components)){if("tuple"!==P.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var L="",V=P.type.indexOf("[");V>=0&&(L=P.type.substring(V));var W=_(w,P.components);Array.isArray(W)&&w?I.push("tuple("+W.join(",")+")"+L):I.push(w?"("+W+")":"("+W.join(",")+")"+L)}else I.push(P.type)}),I},h=function(_){if(!f.isHexStrict(_))throw new Error("The parameter must be a valid HEX string.");var w="",S=0,I=_.length;for("0x"===_.substring(0,2)&&(S=2);S7?S+=_[I].toUpperCase():S+=_[I];return S},toHex:f.toHex,toBN:f.toBN,bytesToHex:f.bytesToHex,hexToBytes:f.hexToBytes,hexToNumberString:f.hexToNumberString,hexToNumber:f.hexToNumber,toDecimal:f.hexToNumber,numberToHex:f.numberToHex,fromDecimal:f.numberToHex,hexToUtf8:f.hexToUtf8,hexToString:f.hexToUtf8,toUtf8:f.hexToUtf8,stripHexPrefix:f.stripHexPrefix,utf8ToHex:f.utf8ToHex,stringToHex:f.utf8ToHex,fromUtf8:f.utf8ToHex,hexToAscii:h,toAscii:h,asciiToHex:u,fromAscii:u,unitMap:x.unitMap,toWei:function(_,w){if(w=m(w),!f.isBN(_)&&"string"!=typeof _)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return f.isBN(_)?x.toWei(_,w):x.toWei(_,w).toString(10)},fromWei:function(_,w){if(w=m(w),!f.isBN(_)&&"string"!=typeof _)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return f.isBN(_)?x.fromWei(_,w):x.fromWei(_,w).toString(10)},padLeft:f.leftPad,leftPad:f.leftPad,padRight:f.rightPad,rightPad:f.rightPad,toTwosComplement:f.toTwosComplement,isBloom:f.isBloom,isUserEthereumAddressInBloom:f.isUserEthereumAddressInBloom,isContractAddressInBloom:f.isContractAddressInBloom,isTopic:f.isTopic,isTopicInBloom:f.isTopicInBloom,isInBloom:f.isInBloom,compareBlockNumbers:function(_,w){if(_===w)return 0;if("genesis"!==_&&"earliest"!==_&&0!==_||"genesis"!==w&&"earliest"!==w&&0!==w){if("genesis"===_||"earliest"===_||0===_)return-1;if("genesis"===w||"earliest"===w||0===w)return 1;if("latest"===_||"finalized"===_)return"pending"===w?-1:1;if("latest"===w||"finalized"===w)return"pending"===_?1:-1;if("pending"===_)return 1;if("pending"===w)return-1;if("safe"===_||"safe"===w)return;var S=new b(_),I=new b(w);return S.lt(I)?-1:S.eq(I)?0:1}return 0},toNumber:f.toNumber}},747:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(90323),T=function(l){var h=(0,d.default)(l);if("string"===h)return f.isHexStrict(l)?new x(l.replace(/0x/i,""),16):new x(l,10);if("number"===h)return new x(l);if(f.isBigNumber(l))return new x(l.toString(10));if(f.isBN(l))return l;throw new Error(l+" is not a number")},g=function(l,h,u){var m,_,w;if("bytes"===(l=(w=l).startsWith("int[")?"int256"+w.slice(3):"int"===w?"int256":w.startsWith("uint[")?"uint256"+w.slice(4):"uint"===w?"uint256":w.startsWith("fixed[")?"fixed128x128"+w.slice(5):"fixed"===w?"fixed128x128":w.startsWith("ufixed[")?"ufixed128x128"+w.slice(6):"ufixed"===w?"ufixed128x128":w)){if(h.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+h.length);return h}if("string"===l)return f.utf8ToHex(h);if("bool"===l)return h?"01":"00";if(l.startsWith("address")){if(m=u?64:40,!f.isAddress(h))throw new Error(h+" is not a valid address, or the checksum is invalid.");return f.leftPad(h.toLowerCase(),m)}if(m=function(w){var S=/^\D+(\d+).*$/.exec(w);return S?parseInt(S[1],10):null}(l),l.startsWith("bytes")){if(!m)throw new Error("bytes[] not yet supported in solidity");if(u&&(m=32),m<1||m>32||m256)throw new Error("Invalid uint"+m+" size");if((_=T(h)).bitLength()>m)throw new Error("Supplied uint exceeds width: "+m+" vs "+_.bitLength());if(_.lt(new x(0)))throw new Error("Supplied uint "+_.toString()+" is negative");return m?f.leftPad(_.toString("hex"),m/8*2):_}if(l.startsWith("int")){if(m%8||m<8||m>256)throw new Error("Invalid int"+m+" size");if((_=T(h)).bitLength()>m)throw new Error("Supplied int exceeds width: "+m+" vs "+_.bitLength());return _.lt(new x(0))?_.toTwos(m).toString("hex"):m?f.leftPad(_.toString("hex"),m/8*2):_}throw new Error("Unsupported or invalid type: "+l)},b=function(l){if(Array.isArray(l))throw new Error("Autodetection of array types is not supported.");var h,u,w,m="";if(l&&"object"===(0,d.default)(l)&&(l.hasOwnProperty("v")||l.hasOwnProperty("t")||l.hasOwnProperty("value")||l.hasOwnProperty("type"))?(h=l.hasOwnProperty("t")?l.t:l.type,m=l.hasOwnProperty("v")?l.v:l.value):(h=f.toHex(l,!0),m=f.toHex(l),h.startsWith("int")||h.startsWith("uint")||(h="bytes")),!h.startsWith("int")&&!h.startsWith("uint")||"string"!=typeof m||/^(-)?0x/i.test(m)||(m=new x(m)),Array.isArray(m)){if(w=/^\D+\d*\[(\d+)\]$/.exec(h),(u=w?parseInt(w[1],10):null)&&m.length!==u)throw new Error(h+" is not matching the given array "+JSON.stringify(m));u=m.length}return Array.isArray(m)?m.map(function(_){return g(h,_,u).toString("hex").replace("0x","")}).join(""):g(h,m,u).toString("hex").replace("0x","")};z.exports={soliditySha3:function(){var l=Array.prototype.slice.call(arguments).map(b);return f.sha3("0x"+l.join(""))},soliditySha3Raw:function(){return f.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(b).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(b).join("").toLowerCase()}}},90323:(z,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(74519)),T=x(E(3355)),g=E(31734),b=E(77277),l=E(88632),h=E(65907),u=E(19313),m=E(1243).keccak256,_=function(y){return g.isBN(y)},w=function(y){return y&&y.constructor&&"BigNumber"===y.constructor.name},S=function(y){try{return b.apply(null,arguments)}catch(M){throw new Error(M+' Given value: "'+y+'"')}},I=function(y){return!!/^(0x)?[0-9a-f]{40}$/i.test(y)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(y)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(y))||P(y))},P=function(y){y=y.replace(/^0x/i,"");for(var M=R(y.toLowerCase()).replace(/^0x/i,""),v=0;v<40;v++)if(parseInt(M[v],16)>7&&y[v].toUpperCase()!==y[v]||parseInt(M[v],16)<=7&&y[v].toLowerCase()!==y[v])return!1;return!0},L=function(y){var M="";y=(y=(y=(y=(y=l.encode(y)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var v=0;v1&&void 0!==arguments[1]&&arguments[1];if(!y)return y;if("string"==typeof y&&!H(y))throw new Error('Given value "'+y+'" is not a valid hex string.');var v=S(y);return M&&(v>Number.MAX_SAFE_INTEGER||v>>4).toString(16)),M.push((15&y[v]).toString(16));return"0x"+M.join("")},isHex:j,isHexStrict:H,stripHexPrefix:function(y){return 0!==y&&j(y)?y.replace(/^(-)?0x/i,"$1"):y},leftPad:function(y,M,v){var k=/^0x/i.test(y)||"number"==typeof y,D=M-(y=y.toString(16).replace(/^0x/i,"")).length+1>=0?M-y.length+1:0;return(k?"0x":"")+new Array(D).join(v||"0")+y},rightPad:function(y,M,v){var k=/^0x/i.test(y)||"number"==typeof y,D=M-(y=y.toString(16).replace(/^0x/i,"")).length+1>=0?M-y.length+1:0;return(k?"0x":"")+y+new Array(D).join(v||"0")},toTwosComplement:function(y){return"0x"+S(y).toTwos(256).toString(16,64)},sha3:R,sha3Raw:function(y){return null===(y=R(y))?K:y},toNumber:function(y){var M=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"==typeof y?y:V(G(y),M)}}},17001:(z,O,E)=>{"use strict";var d=E(78920).i8,x=E(80606),f=E(66748),T=E(473),g=E(96306),b=E(92565),l=E(42463),h=E(48161),u=function(){var m=this;x.packageInit(this,arguments),this.version=d,this.utils=h,this.eth=new f(this),this.shh=new b(this),this.bzz=new l(this);var _=this.setProvider;this.setProvider=function(w,S){return _.apply(m,arguments),m.eth.setRequestManager(m._requestManager),m.shh.setRequestManager(m._requestManager),m.bzz.setProvider(w),!0}};u.version=d,u.utils=h,u.modules={Eth:f,Net:T,Personal:g,Shh:b,Bzz:l},x.addProviders(u),z.exports=u},89214:()=>{},52361:()=>{},94616:()=>{},38768:z=>{"use strict";z.exports=function(O,E){(null==E||E>O.length)&&(E=O.length);for(var d=0,x=new Array(E);d{"use strict";z.exports=function(O){if(Array.isArray(O))return O},z.exports.__esModule=!0,z.exports.default=z.exports},77907:(z,O,E)=>{"use strict";var d=E(38768);z.exports=function(x){if(Array.isArray(x))return d(x)},z.exports.__esModule=!0,z.exports.default=z.exports},58975:z=>{"use strict";z.exports=function(O){if(void 0===O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O},z.exports.__esModule=!0,z.exports.default=z.exports},94571:z=>{"use strict";function O(E,d,x,f,T,g,b){try{var l=E[g](b),h=l.value}catch(u){return void x(u)}l.done?d(h):Promise.resolve(h).then(f,T)}z.exports=function(E){return function(){var d=this,x=arguments;return new Promise(function(f,T){var g=E.apply(d,x);function b(h){O(g,f,T,b,l,"next",h)}function l(h){O(g,f,T,b,l,"throw",h)}b(void 0)})}},z.exports.__esModule=!0,z.exports.default=z.exports},69721:z=>{"use strict";z.exports=function(O,E){if(!(O instanceof E))throw new TypeError("Cannot call a class as a function")},z.exports.__esModule=!0,z.exports.default=z.exports},14727:(z,O,E)=>{"use strict";var d=E(38746),x=E(36923);function f(T,g,b){return x()?(z.exports=f=Reflect.construct.bind(),z.exports.__esModule=!0,z.exports.default=z.exports):(z.exports=f=function(l,h,u){var m=[null];m.push.apply(m,h);var _=new(Function.bind.apply(l,m));return u&&d(_,u.prototype),_},z.exports.__esModule=!0,z.exports.default=z.exports),f.apply(null,arguments)}z.exports=f,z.exports.__esModule=!0,z.exports.default=z.exports},58985:(z,O,E)=>{"use strict";var d=E(32310);function x(f,T){for(var g=0;g{"use strict";var d=E(32310);z.exports=function(x,f,T){return(f=d(f))in x?Object.defineProperty(x,f,{value:T,enumerable:!0,configurable:!0,writable:!0}):x[f]=T,x},z.exports.__esModule=!0,z.exports.default=z.exports},119:(z,O,E)=>{"use strict";var d=E(47460);function x(){return"undefined"!=typeof Reflect&&Reflect.get?(z.exports=x=Reflect.get.bind(),z.exports.__esModule=!0,z.exports.default=z.exports):(z.exports=x=function(f,T,g){var b=d(f,T);if(b){var l=Object.getOwnPropertyDescriptor(b,T);return l.get?l.get.call(arguments.length<3?f:g):l.value}},z.exports.__esModule=!0,z.exports.default=z.exports),x.apply(this,arguments)}z.exports=x,z.exports.__esModule=!0,z.exports.default=z.exports},21949:z=>{"use strict";function O(E){return z.exports=O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},z.exports.__esModule=!0,z.exports.default=z.exports,O(E)}z.exports=O,z.exports.__esModule=!0,z.exports.default=z.exports},15163:(z,O,E)=>{"use strict";var d=E(38746);z.exports=function(x,f){if("function"!=typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(f&&f.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),Object.defineProperty(x,"prototype",{writable:!1}),f&&d(x,f)},z.exports.__esModule=!0,z.exports.default=z.exports},28847:z=>{"use strict";z.exports=function(O){return O&&O.__esModule?O:{default:O}},z.exports.__esModule=!0,z.exports.default=z.exports},78958:z=>{"use strict";z.exports=function(O){return-1!==Function.toString.call(O).indexOf("[native code]")},z.exports.__esModule=!0,z.exports.default=z.exports},36923:z=>{"use strict";z.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}},z.exports.__esModule=!0,z.exports.default=z.exports},41642:z=>{"use strict";z.exports=function(O){if("undefined"!=typeof Symbol&&null!=O[Symbol.iterator]||null!=O["@@iterator"])return Array.from(O)},z.exports.__esModule=!0,z.exports.default=z.exports},91436:z=>{"use strict";z.exports=function(O,E){var d=null==O?null:"undefined"!=typeof Symbol&&O[Symbol.iterator]||O["@@iterator"];if(null!=d){var x,f,T,g,b=[],l=!0,h=!1;try{if(T=(d=d.call(O)).next,0===E){if(Object(d)!==d)return;l=!1}else for(;!(l=(x=T.call(d)).done)&&(b.push(x.value),b.length!==E);l=!0);}catch(u){h=!0,f=u}finally{try{if(!l&&null!=d.return&&(g=d.return(),Object(g)!==g))return}finally{if(h)throw f}}return b}},z.exports.__esModule=!0,z.exports.default=z.exports},82966:z=>{"use strict";z.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},z.exports.__esModule=!0,z.exports.default=z.exports},22344:z=>{"use strict";z.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},z.exports.__esModule=!0,z.exports.default=z.exports},34650:(z,O,E)=>{"use strict";var d=E(3355).default,x=E(58975);z.exports=function(f,T){if(T&&("object"===d(T)||"function"==typeof T))return T;if(void 0!==T)throw new TypeError("Derived constructors may only return object or undefined");return x(f)},z.exports.__esModule=!0,z.exports.default=z.exports},82028:(z,O,E)=>{"use strict";var d=E(3355).default;function x(){z.exports=x=function(){return f},z.exports.__esModule=!0,z.exports.default=z.exports;var f={},T=Object.prototype,g=T.hasOwnProperty,b=Object.defineProperty||function(C,a,B){C[a]=B.value},l="function"==typeof Symbol?Symbol:{},h=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",m=l.toStringTag||"@@toStringTag";function _(C,a,B){return Object.defineProperty(C,a,{value:B,enumerable:!0,configurable:!0,writable:!0}),C[a]}try{_({},"")}catch{_=function(a,B,Q){return a[B]=Q}}function w(C,a,B,Q){var ce=Object.create((a&&a.prototype instanceof P?a:P).prototype),ue=new k(Q||[]);return b(ce,"_invoke",{value:o(C,B,ue)}),ce}function S(C,a,B){try{return{type:"normal",arg:C.call(a,B)}}catch(Q){return{type:"throw",arg:Q}}}f.wrap=w;var I={};function P(){}function L(){}function V(){}var W={};_(W,h,function(){return this});var G=Object.getPrototypeOf,H=G&&G(G(D([])));H&&H!==T&&g.call(H,h)&&(W=H);var j=V.prototype=P.prototype=Object.create(W);function K(C){["next","throw","return"].forEach(function(a){_(C,a,function(B){return this._invoke(a,B)})})}function R(C,a){function B(ee,ce,ue,we){var ae=S(C[ee],C,ce);if("throw"!==ae.type){var Te=ae.arg,le=Te.value;return le&&"object"==d(le)&&g.call(le,"__await")?a.resolve(le.__await).then(function(X){B("next",X,ue,we)},function(X){B("throw",X,ue,we)}):a.resolve(le).then(function(X){Te.value=X,ue(Te)},function(X){return B("throw",X,ue,we)})}we(ae.arg)}var Q;b(this,"_invoke",{value:function(ee,ce){function ue(){return new a(function(we,ae){B(ee,ce,we,ae)})}return Q=Q?Q.then(ue,ue):ue()}})}function o(C,a,B){var Q="suspendedStart";return function(ee,ce){if("executing"===Q)throw new Error("Generator is already running");if("completed"===Q){if("throw"===ee)throw ce;return{value:void 0,done:!0}}for(B.method=ee,B.arg=ce;;){var ue=B.delegate;if(ue){var we=y(ue,B);if(we){if(we===I)continue;return we}}if("next"===B.method)B.sent=B._sent=B.arg;else if("throw"===B.method){if("suspendedStart"===Q)throw Q="completed",B.arg;B.dispatchException(B.arg)}else"return"===B.method&&B.abrupt("return",B.arg);Q="executing";var ae=S(C,a,B);if("normal"===ae.type){if(Q=B.done?"completed":"suspendedYield",ae.arg===I)continue;return{value:ae.arg,done:B.done}}"throw"===ae.type&&(Q="completed",B.method="throw",B.arg=ae.arg)}}}function y(C,a){var B=a.method,Q=C.iterator[B];if(void 0===Q)return a.delegate=null,"throw"===B&&C.iterator.return&&(a.method="return",a.arg=void 0,y(C,a),"throw"===a.method)||"return"!==B&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+B+"' method")),I;var ee=S(Q,C.iterator,a.arg);if("throw"===ee.type)return a.method="throw",a.arg=ee.arg,a.delegate=null,I;var ce=ee.arg;return ce?ce.done?(a[C.resultName]=ce.value,a.next=C.nextLoc,"return"!==a.method&&(a.method="next",a.arg=void 0),a.delegate=null,I):ce:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,I)}function M(C){var a={tryLoc:C[0]};1 in C&&(a.catchLoc=C[1]),2 in C&&(a.finallyLoc=C[2],a.afterLoc=C[3]),this.tryEntries.push(a)}function v(C){var a=C.completion||{};a.type="normal",delete a.arg,C.completion=a}function k(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(M,this),this.reset(!0)}function D(C){if(C){var a=C[h];if(a)return a.call(C);if("function"==typeof C.next)return C;if(!isNaN(C.length)){var B=-1,Q=function ee(){for(;++B=0;--Q){var ee=this.tryEntries[Q],ce=ee.completion;if("root"===ee.tryLoc)return B("end");if(ee.tryLoc<=this.prev){var ue=g.call(ee,"catchLoc"),we=g.call(ee,"finallyLoc");if(ue&&we){if(this.prev=0;--B){var Q=this.tryEntries[B];if(Q.tryLoc<=this.prev&&g.call(Q,"finallyLoc")&&this.prev=0;--a){var B=this.tryEntries[a];if(B.finallyLoc===C)return this.complete(B.completion,B.afterLoc),v(B),I}},catch:function(C){for(var a=this.tryEntries.length-1;a>=0;--a){var B=this.tryEntries[a];if(B.tryLoc===C){var Q=B.completion;if("throw"===Q.type){var ee=Q.arg;v(B)}return ee}}throw new Error("illegal catch attempt")},delegateYield:function(C,a,B){return this.delegate={iterator:D(C),resultName:a,nextLoc:B},"next"===this.method&&(this.arg=void 0),I}},f}z.exports=x,z.exports.__esModule=!0,z.exports.default=z.exports},38746:z=>{"use strict";function O(E,d){return z.exports=O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,f){return x.__proto__=f,x},z.exports.__esModule=!0,z.exports.default=z.exports,O(E,d)}z.exports=O,z.exports.__esModule=!0,z.exports.default=z.exports},74519:(z,O,E)=>{"use strict";var d=E(12338),x=E(91436),f=E(46906),T=E(82966);z.exports=function(g,b){return d(g)||x(g,b)||f(g,b)||T()},z.exports.__esModule=!0,z.exports.default=z.exports},47460:(z,O,E)=>{"use strict";var d=E(21949);z.exports=function(x,f){for(;!Object.prototype.hasOwnProperty.call(x,f)&&null!==(x=d(x)););return x},z.exports.__esModule=!0,z.exports.default=z.exports},93106:(z,O,E)=>{"use strict";var d=E(77907),x=E(41642),f=E(46906),T=E(22344);z.exports=function(g){return d(g)||x(g)||f(g)||T()},z.exports.__esModule=!0,z.exports.default=z.exports},79662:(z,O,E)=>{"use strict";var d=E(3355).default;z.exports=function(x,f){if("object"!==d(x)||null===x)return x;var T=x[Symbol.toPrimitive];if(void 0!==T){var g=T.call(x,f||"default");if("object"!==d(g))return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===f?String:Number)(x)},z.exports.__esModule=!0,z.exports.default=z.exports},32310:(z,O,E)=>{"use strict";var d=E(3355).default,x=E(79662);z.exports=function(f){var T=x(f,"string");return"symbol"===d(T)?T:String(T)},z.exports.__esModule=!0,z.exports.default=z.exports},3355:z=>{"use strict";function O(E){return z.exports=O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},z.exports.__esModule=!0,z.exports.default=z.exports,O(E)}z.exports=O,z.exports.__esModule=!0,z.exports.default=z.exports},46906:(z,O,E)=>{"use strict";var d=E(38768);z.exports=function(x,f){if(x){if("string"==typeof x)return d(x,f);var T=Object.prototype.toString.call(x).slice(8,-1);return"Object"===T&&x.constructor&&(T=x.constructor.name),"Map"===T||"Set"===T?Array.from(x):"Arguments"===T||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?d(x,f):void 0}},z.exports.__esModule=!0,z.exports.default=z.exports},22940:(z,O,E)=>{"use strict";var d=E(21949),x=E(38746),f=E(78958),T=E(14727);function g(b){var l="function"==typeof Map?new Map:void 0;return z.exports=g=function(h){if(null===h||!f(h))return h;if("function"!=typeof h)throw new TypeError("Super expression must either be null or a function");if(void 0!==l){if(l.has(h))return l.get(h);l.set(h,u)}function u(){return T(h,arguments,d(this).constructor)}return u.prototype=Object.create(h.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),x(u,h)},z.exports.__esModule=!0,z.exports.default=z.exports,g(b)}z.exports=g,z.exports.__esModule=!0,z.exports.default=z.exports},82247:(z,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(82028)();z.exports=x;try{regeneratorRuntime=x}catch{"object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))?globalThis.regeneratorRuntime=x:Function("r","regeneratorRuntime = r")(x)}},43604:(z,O,E)=>{"use strict";var d=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],x="undefined"==typeof globalThis?E.g:globalThis;z.exports=function(){for(var f=[],T=0;T{"use strict";z.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"hash":"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a","timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xa3f5ab08"},{"name":"homestead","block":0,"forkHash":"0xa3f5ab08"},{"name":"tangerineWhistle","block":0,"forkHash":"0xa3f5ab08"},{"name":"spuriousDragon","block":0,"forkHash":"0xa3f5ab08"},{"name":"byzantium","block":0,"forkHash":"0xa3f5ab08"},{"name":"constantinople","block":0,"forkHash":"0xa3f5ab08"},{"name":"petersburg","block":0,"forkHash":"0xa3f5ab08"},{"name":"istanbul","block":1561651,"forkHash":"0xc25efa5c"},{"name":"berlin","block":4460644,"forkHash":"0x757a1c47"},{"name":"london","block":5062605,"forkHash":"0xb8c6299d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"51.141.78.53","port":30303,"id":"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a","location":"","comment":"Upstream bootnode 1"},{"ip":"13.93.54.137","port":30303,"id":"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b","location":"","comment":"Upstream bootnode 2"},{"ip":"94.237.54.114","port":30313,"id":"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291","location":"","comment":"Upstream bootnode 3"},{"ip":"18.218.250.66","port":30313,"id":"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949","location":"","comment":"Upstream bootnode 4"},{"ip":"3.11.147.67","port":30303,"id":"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91","location":"","comment":"Ethereum Foundation bootnode"},{"ip":"51.15.116.226","port":30303,"id":"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":30303,"id":"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":40303,"id":"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd","location":"","comment":"Goerli Initiative bootnode"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}')},37098:z=>{"use strict";z.exports=JSON.parse('{"name":"kovan","chainId":42,"networkId":42,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"aura","aura":{}},"comment":"Parity PoA test network","url":"https://kovan-testnet.github.io/website/","genesis":{"hash":"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9","timestamp":null,"gasLimit":6000000,"difficulty":131072,"nonce":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","extraData":"0x","stateRoot":"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x010ffe56"},{"name":"homestead","block":0,"forkHash":"0x010ffe56"},{"name":"tangerineWhistle","block":0,"forkHash":"0x010ffe56"},{"name":"spuriousDragon","block":0,"forkHash":"0x010ffe56"},{"name":"byzantium","block":5067000,"forkHash":"0x7f83c620"},{"name":"constantinople","block":9200000,"forkHash":"0xa94e3dc4"},{"name":"petersburg","block":10255201,"forkHash":"0x186874aa"},{"name":"istanbul","block":14111141,"forkHash":"0x7f6599a6"},{"name":"berlin","block":null,"forkHash":null},{"name":"london","block":null,"forkHash":null},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"116.203.116.241","port":30303,"id":"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45","location":"","comment":"1"},{"ip":"3.217.96.11","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"2"},{"ip":"108.61.170.124","port":30303,"id":"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c","location":"","comment":"3"},{"ip":"157.230.31.163","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"4"}]}')},87295:z=>{"use strict";z.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","timestamp":null,"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","stateRoot":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfc64ec04"},{"name":"homestead","block":1150000,"forkHash":"0x97c2c34c"},{"name":"dao","block":1920000,"forkHash":"0x91d1f948"},{"name":"tangerineWhistle","block":2463000,"forkHash":"0x7a64da13"},{"name":"spuriousDragon","block":2675000,"forkHash":"0x3edd5b10"},{"name":"byzantium","block":4370000,"forkHash":"0xa00bc324"},{"name":"constantinople","block":7280000,"forkHash":"0x668db0af"},{"name":"petersburg","block":7280000,"forkHash":"0x668db0af"},{"name":"istanbul","block":9069000,"forkHash":"0x879d6e30"},{"name":"muirGlacier","block":9200000,"forkHash":"0xe029e991"},{"name":"berlin","block":12244000,"forkHash":"0x0eb440f6"},{"name":"london","block":12965000,"forkHash":"0xb715077d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"18.138.108.67","port":30303,"id":"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666","location":"ap-southeast-1-001","comment":"bootnode-aws-ap-southeast-1-001"},{"ip":"3.209.45.79","port":30303,"id":"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de","location":"us-east-1-001","comment":"bootnode-aws-us-east-1-001"},{"ip":"34.255.23.113","port":30303,"id":"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758","location":"eu-west-1-001","comment":"bootnode-aws-eu-west-1-001"},{"ip":"35.158.244.151","port":30303,"id":"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8","location":"eu-central-1-001","comment":"bootnode-aws-eu-central-1-001"},{"ip":"52.187.207.27","port":30303,"id":"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a","location":"australiaeast-001","comment":"bootnode-azure-australiaeast-001"},{"ip":"191.234.162.198","port":30303,"id":"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1","location":"brazilsouth-001","comment":"bootnode-azure-brazilsouth-001"},{"ip":"52.231.165.108","port":30303,"id":"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8","location":"koreasouth-001","comment":"bootnode-azure-koreasouth-001"},{"ip":"104.42.217.25","port":30303,"id":"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f","location":"westus-001","comment":"bootnode-azure-westus-001"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}')},40439:z=>{"use strict";z.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"hash":"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177","timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x3b8e0691"},{"name":"homestead","block":1,"forkHash":"0x60949295"},{"name":"tangerineWhistle","block":2,"forkHash":"0x8bde40dd"},{"name":"spuriousDragon","block":3,"forkHash":"0xcb3a64bb"},{"name":"byzantium","block":1035301,"forkHash":"0x8d748b57"},{"name":"constantinople","block":3660663,"forkHash":"0xe49cab14"},{"name":"petersburg","block":4321234,"forkHash":"0xafec6b27"},{"name":"istanbul","block":5435345,"forkHash":"0xcbdb8838"},{"name":"berlin","block":8290928,"forkHash":"0x6910c8bd"},{"name":"london","block":8897988,"forkHash":"0x8e29f2f3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.169.42.101","port":30303,"id":"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf","location":"","comment":"IE"},{"ip":"52.3.158.184","port":30303,"id":"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8","location":"","comment":"INFURA"},{"ip":"159.89.28.211","port":30303,"id":"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6","location":"","comment":"AKASHA"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}')},31227:z=>{"use strict";z.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"hash":"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d","timestamp":null,"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535","stateRoot":"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x30c7ddbc"},{"name":"homestead","block":0,"forkHash":"0x30c7ddbc"},{"name":"tangerineWhistle","block":0,"forkHash":"0x30c7ddbc"},{"name":"spuriousDragon","block":10,"forkHash":"0x63760190"},{"name":"byzantium","block":1700000,"forkHash":"0x3ea159c7"},{"name":"constantinople","block":4230000,"forkHash":"0x97b544f3"},{"name":"petersburg","block":4939394,"forkHash":"0xd6e2149b"},{"name":"istanbul","block":6485846,"forkHash":"0x4bc66396"},{"name":"muirGlacier","block":7117117,"forkHash":"0x6727ef90"},{"name":"berlin","block":9812189,"forkHash":"0xa157d377"},{"name":"london","block":10499401,"forkHash":"0x7119b6b3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.176.7.10","port":30303,"id":"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606","location":"","comment":"US-Azure geth"},{"ip":"52.176.100.77","port":30303,"id":"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c","location":"","comment":"US-Azure parity"},{"ip":"52.232.243.152","port":30303,"id":"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f","location":"","comment":"Parity"},{"ip":"192.81.208.223","port":30303,"id":"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09","location":"","comment":"@gpip"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}')},77523:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-1559","number":1559,"comment":"Fee market change for ETH 1.0 chain","url":"https://eips.ethereum.org/EIPS/eip-1559","status":"Review","minimumHardfork":"berlin","requiredEIPs":[2930],"gasConfig":{"baseFeeMaxChangeDenominator":{"v":8,"d":"Maximum base fee change denominator"},"elasticityMultiplier":{"v":2,"d":"Maximum block gas target elasticity"},"initialBaseFee":{"v":1000000000,"d":"Initial base fee on first EIP1559 block"}},"gasPrices":{},"vm":{},"pow":{}}')},83339:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-2315","number":2315,"comment":"Simple subroutines for the EVM","url":"https://eips.ethereum.org/EIPS/eip-2315","status":"Draft","minimumHardfork":"istanbul","gasConfig":{},"gasPrices":{"beginsub":{"v":2,"d":"Base fee of the BEGINSUB opcode"},"returnsub":{"v":5,"d":"Base fee of the RETURNSUB opcode"},"jumpsub":{"v":10,"d":"Base fee of the JUMPSUB opcode"}},"vm":{},"pow":{}}')},26769:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-2537","number":2537,"comment":"BLS12-381 precompiles","url":"https://eips.ethereum.org/EIPS/eip-2537","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"Bls12381G1AddGas":{"v":600,"d":"Gas cost of a single BLS12-381 G1 addition precompile-call"},"Bls12381G1MulGas":{"v":12000,"d":"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},"Bls12381G2AddGas":{"v":4500,"d":"Gas cost of a single BLS12-381 G2 addition precompile-call"},"Bls12381G2MulGas":{"v":55000,"d":"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},"Bls12381PairingBaseGas":{"v":115000,"d":"Base gas cost of BLS12-381 pairing check"},"Bls12381PairingPerPairGas":{"v":23000,"d":"Per-pair gas cost of BLS12-381 pairing check"},"Bls12381MapG1Gas":{"v":5500,"d":"Gas cost of BLS12-381 map field element to G1"},"Bls12381MapG2Gas":{"v":110000,"d":"Gas cost of BLS12-381 map field element to G2"},"Bls12381MultiExpGasDiscount":{"v":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],"d":"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},"vm":{},"pow":{}}')},17897:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Last call","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},62170:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},88436:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"coldsload":{"v":2100,"d":"Gas cost of the first read of storage from a given location (per transaction)"},"coldaccountaccess":{"v":2600,"d":"Gas cost of the first read of a given address (per transaction)"},"warmstorageread":{"v":100,"d":"Gas cost of reading storage locations which have already loaded \'cold\'"},"sstoreCleanGasEIP2200":{"v":2900,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreNoopGasEIP2200":{"v":100,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":100,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitRefundEIP2200":{"v":19900,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanRefundEIP2200":{"v":4900,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"call":{"v":0,"d":"Base fee of the CALL opcode"},"callcode":{"v":0,"d":"Base fee of the CALLCODE opcode"},"delegatecall":{"v":0,"d":"Base fee of the DELEGATECALL opcode"},"staticcall":{"v":0,"d":"Base fee of the STATICCALL opcode"},"balance":{"v":0,"d":"Base fee of the BALANCE opcode"},"extcodesize":{"v":0,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":0,"d":"Base fee of the EXTCODECOPY opcode"},"extcodehash":{"v":0,"d":"Base fee of the EXTCODEHASH opcode"},"sload":{"v":0,"d":"Base fee of the SLOAD opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"}},"vm":{},"pow":{}}')},96213:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Draft","minimumHardfork":"istanbul","requiredEIPs":[2718,2929],"gasConfig":{},"gasPrices":{"accessListStorageKeyCost":{"v":1900,"d":"Gas cost per storage key in an Access List transaction"},"accessListAddressCost":{"v":2400,"d":"Gas cost per storage key in an Access List transaction"}},"vm":{},"pow":{}}')},25491:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Review","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},20070:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[2929],"gasConfig":{"maxRefundQuotient":{"v":5,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"selfdestructRefund":{"v":0,"d":"Refunded following a selfdestruct operation"},"sstoreClearRefundEIP2200":{"v":4800,"d":"Once per SSTORE operation for clearing an originally existing storage slot"}},"vm":{},"pow":{}}')},21871:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},47225:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Draft","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},98571:z=>{"use strict";z.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},20015:z=>{"use strict";z.exports=JSON.parse('{"name":"berlin","comment":"HF targeted for July 2020 following the Muir Glacier HF","url":"https://eips.ethereum.org/EIPS/eip-2070","status":"Draft","eips":[2565,2929,2718,2930]}')},26985:z=>{"use strict";z.exports=JSON.parse('{"name":"byzantium","comment":"Hardfork with new precompiles, instructions and other protocol changes","url":"https://eips.ethereum.org/EIPS/eip-609","status":"Final","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":20,"d":"Gquaddivisor from modexp precompile for gas calculation"},"ecAdd":{"v":500,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":40000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":100000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":80000,"d":"Gas costs regarding curve pairing precompile input length"},"revert":{"v":0,"d":"Base fee of the REVERT opcode"},"staticcall":{"v":700,"d":"Base fee of the STATICCALL opcode"},"returndatasize":{"v":2,"d":"Base fee of the RETURNDATASIZE opcode"},"returndatacopy":{"v":3,"d":"Base fee of the RETURNDATACOPY opcode"}},"vm":{},"pow":{"minerReward":{"v":"3000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":3000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},60114:z=>{"use strict";z.exports=JSON.parse('{"name":"chainstart","comment":"Start of the Ethereum main chain","url":"","status":"","gasConfig":{"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be"},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations"},"maxRefundQuotient":{"v":2,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"base":{"v":2,"d":"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},"tierStep":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them"},"exp":{"v":10,"d":"Base fee of the EXP opcode"},"expByte":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction"},"sha3":{"v":30,"d":"Base fee of the SHA3 opcode"},"sha3Word":{"v":6,"d":"Once per word of the SHA3 operation\'s data"},"sload":{"v":50,"d":"Base fee of the SLOAD opcode"},"sstoreSet":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero"},"sstoreReset":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero"},"sstoreRefund":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero"},"jumpdest":{"v":1,"d":"Base fee of the JUMPDEST opcode"},"log":{"v":375,"d":"Base fee of the LOG opcode"},"logData":{"v":8,"d":"Per byte in a LOG* operation\'s data"},"logTopic":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},"create":{"v":32000,"d":"Base fee of the CREATE opcode"},"call":{"v":40,"d":"Base fee of the CALL opcode"},"callStipend":{"v":2300,"d":"Free gas given at beginning of call"},"callValueTransfer":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero"},"callNewAccount":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior"},"selfdestructRefund":{"v":24000,"d":"Refunded following a selfdestruct operation"},"memory":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation"},"createData":{"v":200,"d":""},"tx":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions"},"txCreation":{"v":32000,"d":"The cost of creating a contract via tx"},"txDataZero":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},"txDataNonZero":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"copy":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},"ecRecover":{"v":3000,"d":""},"sha256":{"v":60,"d":""},"sha256Word":{"v":12,"d":""},"ripemd160":{"v":600,"d":""},"ripemd160Word":{"v":120,"d":""},"identity":{"v":15,"d":""},"identityWord":{"v":3,"d":""},"stop":{"v":0,"d":"Base fee of the STOP opcode"},"add":{"v":3,"d":"Base fee of the ADD opcode"},"mul":{"v":5,"d":"Base fee of the MUL opcode"},"sub":{"v":3,"d":"Base fee of the SUB opcode"},"div":{"v":5,"d":"Base fee of the DIV opcode"},"sdiv":{"v":5,"d":"Base fee of the SDIV opcode"},"mod":{"v":5,"d":"Base fee of the MOD opcode"},"smod":{"v":5,"d":"Base fee of the SMOD opcode"},"addmod":{"v":8,"d":"Base fee of the ADDMOD opcode"},"mulmod":{"v":8,"d":"Base fee of the MULMOD opcode"},"signextend":{"v":5,"d":"Base fee of the SIGNEXTEND opcode"},"lt":{"v":3,"d":"Base fee of the LT opcode"},"gt":{"v":3,"d":"Base fee of the GT opcode"},"slt":{"v":3,"d":"Base fee of the SLT opcode"},"sgt":{"v":3,"d":"Base fee of the SGT opcode"},"eq":{"v":3,"d":"Base fee of the EQ opcode"},"iszero":{"v":3,"d":"Base fee of the ISZERO opcode"},"and":{"v":3,"d":"Base fee of the AND opcode"},"or":{"v":3,"d":"Base fee of the OR opcode"},"xor":{"v":3,"d":"Base fee of the XOR opcode"},"not":{"v":3,"d":"Base fee of the NOT opcode"},"byte":{"v":3,"d":"Base fee of the BYTE opcode"},"address":{"v":2,"d":"Base fee of the ADDRESS opcode"},"balance":{"v":20,"d":"Base fee of the BALANCE opcode"},"origin":{"v":2,"d":"Base fee of the ORIGIN opcode"},"caller":{"v":2,"d":"Base fee of the CALLER opcode"},"callvalue":{"v":2,"d":"Base fee of the CALLVALUE opcode"},"calldataload":{"v":3,"d":"Base fee of the CALLDATALOAD opcode"},"calldatasize":{"v":2,"d":"Base fee of the CALLDATASIZE opcode"},"calldatacopy":{"v":3,"d":"Base fee of the CALLDATACOPY opcode"},"codesize":{"v":2,"d":"Base fee of the CODESIZE opcode"},"codecopy":{"v":3,"d":"Base fee of the CODECOPY opcode"},"gasprice":{"v":2,"d":"Base fee of the GASPRICE opcode"},"extcodesize":{"v":20,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":20,"d":"Base fee of the EXTCODECOPY opcode"},"blockhash":{"v":20,"d":"Base fee of the BLOCKHASH opcode"},"coinbase":{"v":2,"d":"Base fee of the COINBASE opcode"},"timestamp":{"v":2,"d":"Base fee of the TIMESTAMP opcode"},"number":{"v":2,"d":"Base fee of the NUMBER opcode"},"difficulty":{"v":2,"d":"Base fee of the DIFFICULTY opcode"},"gaslimit":{"v":2,"d":"Base fee of the GASLIMIT opcode"},"pop":{"v":2,"d":"Base fee of the POP opcode"},"mload":{"v":3,"d":"Base fee of the MLOAD opcode"},"mstore":{"v":3,"d":"Base fee of the MSTORE opcode"},"mstore8":{"v":3,"d":"Base fee of the MSTORE8 opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"},"jump":{"v":8,"d":"Base fee of the JUMP opcode"},"jumpi":{"v":10,"d":"Base fee of the JUMPI opcode"},"pc":{"v":2,"d":"Base fee of the PC opcode"},"msize":{"v":2,"d":"Base fee of the MSIZE opcode"},"gas":{"v":2,"d":"Base fee of the GAS opcode"},"push":{"v":3,"d":"Base fee of the PUSH opcode"},"dup":{"v":3,"d":"Base fee of the DUP opcode"},"swap":{"v":3,"d":"Base fee of the SWAP opcode"},"callcode":{"v":40,"d":"Base fee of the CALLCODE opcode"},"return":{"v":0,"d":"Base fee of the RETURN opcode"},"invalid":{"v":0,"d":"Base fee of the INVALID opcode"},"selfdestruct":{"v":0,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed"},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack"},"maxExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis"}},"pow":{"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be"},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations"},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":0,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},35993:z=>{"use strict";z.exports=JSON.parse('{"name":"constantinople","comment":"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)","url":"https://eips.ethereum.org/EIPS/eip-1013","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":200,"d":"Once per SSTORE operation if the value doesn\'t change"},"netSstoreInitGas":{"v":20000,"d":"Once per SSTORE operation from clean zero"},"netSstoreCleanGas":{"v":5000,"d":"Once per SSTORE operation from clean non-zero"},"netSstoreDirtyGas":{"v":200,"d":"Once per SSTORE operation from dirty"},"netSstoreClearRefund":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"netSstoreResetRefund":{"v":4800,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"netSstoreResetClearRefund":{"v":19800,"d":"Once per SSTORE operation for resetting to the original zero value"},"shl":{"v":3,"d":"Base fee of the SHL opcode"},"shr":{"v":3,"d":"Base fee of the SHR opcode"},"sar":{"v":3,"d":"Base fee of the SAR opcode"},"extcodehash":{"v":400,"d":"Base fee of the EXTCODEHASH opcode"},"create2":{"v":32000,"d":"Base fee of the CREATE2 opcode"}},"vm":{},"pow":{"minerReward":{"v":"2000000000000000000","d":"The amount a miner gets rewarded for mining a block"},"difficultyBombDelay":{"v":5000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},7197:z=>{"use strict";z.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},62800:z=>{"use strict";z.exports=JSON.parse('{"name":"homestead","comment":"Homestead hardfork with protocol and network changes","url":"https://eips.ethereum.org/EIPS/eip-606","status":"Final","gasConfig":{},"gasPrices":{"delegatecall":{"v":40,"d":"Base fee of the DELEGATECALL opcode"}},"vm":{},"pow":{}}')},83166:z=>{"use strict";z.exports=JSON.parse('{"name":"istanbul","comment":"HF targeted for December 2019 following the Constantinople/Petersburg HF","url":"https://eips.ethereum.org/EIPS/eip-1679","status":"Draft","gasConfig":{},"gasPrices":{"blake2Round":{"v":1,"d":"Gas cost per round for the Blake2 F precompile"},"ecAdd":{"v":150,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":6000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":45000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":34000,"d":"Gas costs regarding curve pairing precompile input length"},"txDataNonZero":{"v":16,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"sstoreSentryGasEIP2200":{"v":2300,"d":"Minimum gas required to be present for an SSTORE call, not consumed"},"sstoreNoopGasEIP2200":{"v":800,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":800,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitGasEIP2200":{"v":20000,"d":"Once per SSTORE operation from clean zero to non-zero"},"sstoreInitRefundEIP2200":{"v":19200,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanGasEIP2200":{"v":5000,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreCleanRefundEIP2200":{"v":4200,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"sstoreClearRefundEIP2200":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"balance":{"v":700,"d":"Base fee of the BALANCE opcode"},"extcodehash":{"v":700,"d":"Base fee of the EXTCODEHASH opcode"},"chainid":{"v":2,"d":"Base fee of the CHAINID opcode"},"selfbalance":{"v":5,"d":"Base fee of the SELFBALANCE opcode"},"sload":{"v":800,"d":"Base fee of the SLOAD opcode"}},"vm":{},"pow":{}}')},61250:z=>{"use strict";z.exports=JSON.parse('{"name":"london","comment":"HF targeted for July 2021 following the Berlin fork","url":"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md","status":"Draft","eips":[1559,3198,3529,3541]}')},88648:z=>{"use strict";z.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/pm/issues/361","status":"pre-Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675]}')},42946:z=>{"use strict";z.exports=JSON.parse('{"name":"muirGlacier","comment":"HF to delay the difficulty bomb","url":"https://eips.ethereum.org/EIPS/eip-2384","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},4064:z=>{"use strict";z.exports=JSON.parse('{"name":"petersburg","comment":"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople","url":"https://eips.ethereum.org/EIPS/eip-1716","status":"Draft","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreInitGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreCleanGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreDirtyGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreClearRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetClearRefund":{"v":null,"d":"Removed along EIP-1283"}},"vm":{},"pow":{}}')},5553:z=>{"use strict";z.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the London HF","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},90716:z=>{"use strict";z.exports=JSON.parse('{"name":"spuriousDragon","comment":"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit","url":"https://eips.ethereum.org/EIPS/eip-607","status":"Final","gasConfig":{},"gasPrices":{"expByte":{"v":50,"d":"Times ceil(log256(exponent)) for the EXP instruction"}},"vm":{"maxCodeSize":{"v":24576,"d":"Maximum length of contract code"}},"pow":{}}')},22302:z=>{"use strict";z.exports=JSON.parse('{"name":"tangerineWhistle","comment":"Hardfork with gas cost changes for IO-heavy operations","url":"https://eips.ethereum.org/EIPS/eip-608","status":"Final","gasConfig":{},"gasPrices":{"sload":{"v":200,"d":"Once per SLOAD operation"},"call":{"v":700,"d":"Once per CALL operation & message call transaction"},"extcodesize":{"v":700,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":700,"d":"Base fee of the EXTCODECOPY opcode"},"balance":{"v":400,"d":"Base fee of the BALANCE opcode"},"delegatecall":{"v":700,"d":"Base fee of the DELEGATECALL opcode"},"callcode":{"v":700,"d":"Base fee of the CALLCODE opcode"},"selfdestruct":{"v":5000,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{},"pow":{}}')},44946:z=>{"use strict";z.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:z=>{"use strict";z.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:z=>{"use strict";z.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},83630:z=>{"use strict";z.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"blake3":30,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,"x11":4352,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},29799:z=>{"use strict";z.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:z=>{"use strict";z.exports={i8:"6.5.4"}},24070:z=>{"use strict";z.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},22562:z=>{"use strict";z.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},19794:z=>{"use strict";z.exports={version:"1.0.34"}},78920:z=>{"use strict";z.exports={i8:"1.10.2"}}},Y={};function ie(z){var O=Y[z];if(void 0!==O)return O.exports;var E=Y[z]={id:z,loaded:!1,exports:{}};return be[z](E,E.exports,ie),E.loaded=!0,E.exports}return ie.amdO={},ie.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),ie.nmd=z=>(z.paths=[],z.children||(z.children=[]),z),ie(17001)})())()},47709:(bt,be,Y)=>{"use strict";var ie=Y(79765),z=Y(10826),O=Y(39897),E=Y(66682),d=Y(78345);function x(n){for(let t in n)if(n[t]===x)return t;throw Error("Could not find renamed property on target object.")}function f(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function T(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(T).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function g(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const b=x({__forward_ref__:x});function l(n){return n.__forward_ref__=l,n.toString=function(){return T(this())},n}function h(n){return u(n)?n():n}function u(n){return"function"==typeof n&&n.hasOwnProperty(b)&&n.__forward_ref__===l}class _ extends Error{constructor(t,e){super(function(n,t){return`${n?`NG0${n}: `:""}${t}`}(t,e)),this.code=t}}function I(n){return"string"==typeof n?n:null==n?"":String(n)}function P(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():I(n)}function G(n,t){const e=t?` in ${t}`:"";throw new _("201",`No provider for ${P(n)} found${e}`)}function B(n,t){null==n&&function(n,t,e,r){throw new Error(`ASSERTION ERROR: ${n}`+(null==r?"":` [Expected=> ${e} ${r} ${t} <=Actual]`))}(t,n,null,"!=")}function we(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Te(n){return{providers:n.providers||[],imports:n.imports||[]}}function le(n){return X(n,xe)||X(n,ke)}function X(n,t){return n.hasOwnProperty(t)?n[t]:null}function _e(n){return n&&(n.hasOwnProperty(Ce)||n.hasOwnProperty(me))?n[Ce]:null}const xe=x({\u0275prov:x}),Ce=x({\u0275inj:x}),ke=x({ngInjectableDef:x}),me=x({ngInjectorDef:x});var Ee=(()=>((Ee=Ee||{})[Ee.Default=0]="Default",Ee[Ee.Host=1]="Host",Ee[Ee.Self=2]="Self",Ee[Ee.SkipSelf=4]="SkipSelf",Ee[Ee.Optional=8]="Optional",Ee))();let ze;function nt(n){const t=ze;return ze=n,t}function tt(n,t,e){const r=le(n);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:e&Ee.Optional?null:void 0!==t?t:void G(T(n),"Injector")}function ht(n){return{toString:n}.toString()}var wt=(()=>((wt=wt||{})[wt.OnPush=0]="OnPush",wt[wt.Default=1]="Default",wt))(),Ye=(()=>((Ye=Ye||{})[Ye.Emulated=0]="Emulated",Ye[Ye.None=2]="None",Ye[Ye.ShadowDom=3]="ShadowDom",Ye))();const gt="undefined"!=typeof globalThis&&globalThis,St="undefined"!=typeof window&&window,Wt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Nt=gt||"undefined"!=typeof global&&global||St||Wt,jt={},Yt=[],Wn=x({\u0275cmp:x}),fn=x({\u0275dir:x}),$n=x({\u0275pipe:x}),Yr=x({\u0275mod:x}),Ln=x({\u0275loc:x}),Bn=x({\u0275fac:x}),$r=x({__NG_ELEMENT_ID__:x});let Gn=0;function bn(n){return ht(()=>{const e={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===wt.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||Yt,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Ye.Emulated,id:"c",styles:n.styles||Yt,_:null,setInput:null,schemas:n.schemas||null,tView:null},s=n.directives,p=n.features,F=n.pipes;return r.id+=Gn++,r.inputs=ts(n.inputs,e),r.outputs=ts(n.outputs),p&&p.forEach(q=>q(r)),r.directiveDefs=s?()=>("function"==typeof s?s():s).map(Kn):null,r.pipeDefs=F?()=>("function"==typeof F?F():F).map(sr):null,r})}function Kn(n){return Vi(n)||function(n){return n[fn]||null}(n)}function sr(n){return function(n){return n[$n]||null}(n)}const Ii={};function Un(n){return ht(()=>{const t={type:n.type,bootstrap:n.bootstrap||Yt,declarations:n.declarations||Yt,imports:n.imports||Yt,exports:n.exports||Yt,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Ii[n.id]=n.type),t})}function ts(n,t){if(null==n)return jt;const e={};for(const r in n)if(n.hasOwnProperty(r)){let s=n[r],p=s;Array.isArray(s)&&(p=s[1],s=s[0]),e[s]=r,t&&(t[s]=p)}return e}const Tn=bn;function Qn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,onDestroy:n.type.prototype.ngOnDestroy||null}}function Vi(n){return n[Wn]||null}function ki(n,t){const e=n[Yr]||null;if(!e&&!0===t)throw new Error(`Type ${T(n)} does not have '\u0275mod' property.`);return e}function Eu(n){return Array.isArray(n)&&"object"==typeof n[1]}function jo(n){return Array.isArray(n)&&!0===n[1]}function yo(n){return 0!=(8&n.flags)}function Vc(n){return 2==(2&n.flags)}function El(n){return 1==(1&n.flags)}function ec(n){return null!==n.template}function kc(n){return 0!=(512&n[2])}function po(n,t){return n.hasOwnProperty(Bn)?n[Bn]:null}class Sn{constructor(t,e,r){this.previousValue=t,this.currentValue=e,this.firstChange=r}isFirstChange(){return this.firstChange}}function rr(){return hn}function hn(n){return n.type.prototype.ngOnChanges&&(n.setInput=Ir),Cn}function Cn(){const n=Os(this),t=null==n?void 0:n.current;if(t){const e=n.previous;if(e===jt)n.previous=t;else for(let r in t)e[r]=t[r];n.current=null,this.ngOnChanges(t)}}function Ir(n,t,e,r){const s=Os(n)||function(n,t){return n[Ei]=t}(n,{previous:jt,current:null}),p=s.current||(s.current={}),F=s.previous,q=this.declaredInputs[e],te=F[q];p[q]=new Sn(te&&te.currentValue,t,F===jt),n[r]=t}rr.ngInherit=!0;const Ei="__ngSimpleChanges__";function Os(n){return n[Ei]||null}const Vo="http://www.w3.org/2000/svg";let nu;function Hu(){return void 0!==nu?nu:"undefined"!=typeof document?document:void 0}function ru(n){return!!n.listen}const Wc={createRenderer:(n,t)=>Hu()};function Ea(n){for(;Array.isArray(n);)n=n[0];return n}function xn(n,t){return Ea(t[n])}function et(n,t){return Ea(t[n.index])}function gn(n,t){return n.data[t]}function kn(n,t){return n[t]}function tr(n,t){const e=t[n];return Eu(e)?e:e[0]}function pi(n){return 4==(4&n[2])}function xi(n){return 128==(128&n[2])}function Ws(n,t){return null==t?null:n[t]}function As(n){n[18]=0}function Ni(n,t){n[5]+=t;let e=n,r=n[3];for(;null!==r&&(1===t&&1===e[5]||-1===t&&0===e[5]);)r[5]+=t,e=r,r=r[3]}const Ji={lFrame:gh(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function dl(){return Ji.bindingsEnabled}function Ki(){return Ji.lFrame.lView}function ga(){return Ji.lFrame.tView}function Ur(n){return Ji.lFrame.contextLView=n,n[8]}function ca(){let n=wf();for(;null!==n&&64===n.type;)n=n.parent;return n}function wf(){return Ji.lFrame.currentTNode}function du(n,t){const e=Ji.lFrame;e.currentTNode=n,e.isParent=t}function ka(){return Ji.lFrame.isParent}function Dr(){Ji.lFrame.isParent=!1}function Ho(){return Ji.isInCheckNoChangesMode}function $o(n){Ji.isInCheckNoChangesMode=n}function oa(){const n=Ji.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function Bo(){return Ji.lFrame.bindingIndex}function la(){return Ji.lFrame.bindingIndex++}function tc(n){const t=Ji.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function rd(n,t){const e=Ji.lFrame;e.bindingIndex=e.bindingRootIndex=n,Nc(t)}function Nc(n){Ji.lFrame.currentDirectiveIndex=n}function Kd(n){const t=Ji.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function Fh(){return Ji.lFrame.currentQueryIndex}function hl(n){Ji.lFrame.currentQueryIndex=n}function mh(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function dd(n,t,e){if(e&Ee.SkipSelf){let s=t,p=n;for(;!(s=s.parent,null!==s||e&Ee.Host||(s=mh(p),null===s||(p=p[15],10&s.type))););if(null===s)return!1;t=s,n=p}const r=Ji.lFrame=Ff();return r.currentTNode=t,r.lView=n,!0}function Tl(n){const t=Ff(),e=n[1];Ji.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ff(){const n=Ji.lFrame,t=null===n?null:n.child;return null===t?gh(n):t}function gh(n){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function Lh(){const n=Ji.lFrame;return Ji.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Uh=Lh;function Hc(){const n=Lh();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Or(){return Ji.lFrame.selectedIndex}function Ti(n){Ji.lFrame.selectedIndex=n}function ii(){const n=Ji.lFrame;return gn(n.tView,n.selectedIndex)}function to(){Ji.lFrame.currentNamespace=Vo}function iu(){Ji.lFrame.currentNamespace=null}function Lt(n,t){for(let e=t.directiveStart,r=t.directiveEnd;e=r)break}else t[te]<0&&(n[18]+=65536),(q>11>16&&(3&n[2])===t){n[2]+=2048;try{p.call(q)}finally{}}}else try{p.call(q)}finally{}}class gi{constructor(t,e,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=r}}function bu(n,t,e){const r=ru(n);let s=0;for(;st){F=p-1;break}}}for(;p>16}(n),r=t;for(;e>0;)r=r[15],e--;return r}let Yu=!0;function hu(n){const t=Yu;return Yu=n,t}let Ad=0;function j0(n,t){const e=bh(n,t);if(-1!==e)return e;const r=t[1];r.firstCreatePass&&(n.injectorIndex=t.length,lf(r.data,n),lf(t,null),lf(r.blueprint,null));const s=Hh(n,t),p=n.injectorIndex;if(Lf(s)){const F=Uf(s),q=Mc(s,t),te=q[1].data;for(let fe=0;fe<8;fe++)t[p+fe]=q[F+fe]|te[F+fe]}return t[p+8]=s,p}function lf(n,t){n.push(0,0,0,0,0,0,0,0,t)}function bh(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Hh(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,r=null,s=t;for(;null!==s;){const p=s[1],F=p.type;if(r=2===F?p.declTNode:1===F?s[6]:null,null===r)return-1;if(e++,s=s[15],-1!==r.injectorIndex)return r.injectorIndex|e<<16}return-1}function nc(n,t,e){!function(n,t,e){let r;"string"==typeof e?r=e.charCodeAt(0)||0:e.hasOwnProperty($r)&&(r=e[$r]),null==r&&(r=e[$r]=Ad++);const s=255&r;t.data[n+(s>>5)]|=1<=0?255&t:Qs:t}(e);if("function"==typeof p){if(!dd(t,n,r))return r&Ee.Host?V0(s,e,r):v1(t,e,r,s);try{const F=p(r);if(null!=F||r&Ee.Optional)return F;G(e)}finally{Uh()}}else if("number"==typeof p){let F=null,q=bh(n,t),te=-1,fe=r&Ee.Host?t[16][6]:null;for((-1===q||r&Ee.SkipSelf)&&(te=-1===q?Hh(n,t):t[q+8],-1!==te&&ac(r,!1)?(F=t[1],q=Uf(te),t=Mc(te,t)):q=-1);-1!==q;){const Re=t[1];if(H0(p,q,Re.data)){const $e=t0(q,t,e,F,r,fe);if($e!==Zd)return $e}te=t[q+8],-1!==te&&ac(r,t[1].data[q+8]===fe)&&H0(p,q,t)?(F=Re,q=Uf(te),t=Mc(te,t)):q=-1}}}return v1(t,e,r,s)}const Zd={};function Qs(){return new Id(ca(),Ki())}function t0(n,t,e,r,s,p){const F=t[1],q=F.data[n+8],Re=jf(q,F,e,null==r?Vc(q)&&Yu:r!=F&&0!=(3&q.type),s&Ee.Host&&p===q);return null!==Re?hc(t,F,Re,q):Zd}function jf(n,t,e,r,s){const p=n.providerIndexes,F=t.data,q=1048575&p,te=n.directiveStart,Re=p>>20,rt=s?q+Re:n.directiveEnd;for(let ft=r?q:q+Re;ft=te&&Tt.type===e)return ft}if(s){const ft=F[te];if(ft&&ec(ft)&&ft.type===e)return te}return null}function hc(n,t,e,r){let s=n[e];const p=t.data;if(function(n){return n instanceof gi}(s)){const F=s;F.resolving&&function(n,t){throw new _("200",`Circular dependency in DI detected for ${n}`)}(P(p[e]));const q=hu(F.canSeeViewProviders);F.resolving=!0;const te=F.injectImpl?nt(F.injectImpl):null;dd(n,r,Ee.Default);try{s=n[e]=F.factory(void 0,p,n,r),t.firstCreatePass&&e>=r.directiveStart&&function(n,t,e){const{ngOnChanges:r,ngOnInit:s,ngDoCheck:p}=t.type.prototype;if(r){const F=hn(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,F),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,F)}s&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,s),p&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,p),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,p))}(e,p[e],t)}finally{null!==te&&nt(te),hu(q),F.resolving=!1,Uh()}}return s}function H0(n,t,e){return!!(e[t+(n>>5)]&1<{const t=n.prototype.constructor,e=t[Bn]||x0(t),r=Object.prototype;let s=Object.getPrototypeOf(n.prototype).constructor;for(;s&&s!==r;){const p=s[Bn]||x0(s);if(p&&p!==e)return p;s=Object.getPrototypeOf(s)}return p=>new p})}function x0(n){return u(n)?()=>{const t=x0(h(n));return t&&t()}:po(n)}function Sd(n){return function(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;const e=n.attrs;if(e){const r=e.length;let s=0;for(;s{const r=function(n){return function(...e){if(n){const r=n(...e);for(const s in r)this[s]=r[s]}}}(t);function s(...p){if(this instanceof s)return r.apply(this,p),this;const F=new s(...p);return q.annotation=F,q;function q(te,fe,Re){const $e=te.hasOwnProperty(Yd)?te[Yd]:Object.defineProperty(te,Yd,{value:[]})[Yd];for(;$e.length<=Re;)$e.push(null);return($e[Re]=$e[Re]||[]).push(F),te}}return e&&(s.prototype=Object.create(e.prototype)),s.prototype.ngMetadataName=n,s.annotationCls=s,s})}class fo{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=we({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const ff=new fo("AnalyzeForEntryComponents"),Tf=Function;function Od(n,t){void 0===t&&(t=n);for(let e=0;eArray.isArray(e)?ol(e,t):t(e))}function vh(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function mf(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function pl(n,t){const e=[];for(let r=0;r=0?n[1|r]=e:(r=~r,function(n,t,e,r){let s=n.length;if(s==t)n.push(e,r);else if(1===s)n.push(r,n[0]),n[0]=e;else{for(s--,n.push(n[s-1],n[s]);s>t;)n[s]=n[s-2],s--;n[t]=e,n[t+1]=r}}(n,r,t,e)),r}function Wh(n,t){const e=Nl(n,t);if(e>=0)return n[1|e]}function Nl(n,t){return function(n,t,e){let r=0,s=n.length>>e;for(;s!==r;){const p=r+(s-r>>1),F=n[p<t?s=p:r=p+1}return~(s< ");else if("object"==typeof t){let p=[];for(let F in t)if(t.hasOwnProperty(F)){let q=t[F];p.push(F+":"+("string"==typeof q?JSON.stringify(q):T(q)))}s=`{${p.join(", ")}}`}return`${e}${r?"("+r+")":""}[${s}]: ${n.replace(vp,"\n ")}`}("\n"+n.message,s,e,r),n.ngTokenPath=s,n[gd]=null,n}const l0=bd(mn("Inject",n=>({token:n})),-1),Bl=bd(mn("Optional"),8),qc=bd(mn("SkipSelf"),4);var Bd=(()=>((Bd=Bd||{})[Bd.Important=1]="Important",Bd[Bd.DashCase=2]="DashCase",Bd))();const K0="__ngContext__";function Fl(n,t){n[K0]=t}function Ja(n){const t=function(n){return n[K0]||null}(n);return t?Array.isArray(t)?t:t.lView:null}function xt(n,t){return undefined(n,t)}function In(n){const t=n[3];return jo(t)?t[3]:t}function jr(n){return Fi(n[13])}function ni(n){return Fi(n[4])}function Fi(n){for(;null!==n&&!jo(n);)n=n[4];return n}function Ci(n,t,e,r,s){if(null!=r){let p,F=!1;jo(r)?p=r:Eu(r)&&(F=!0,r=r[0]);const q=Ea(r);0===n&&null!==e?null==s?pn(t,e,q):un(t,e,q,s||null,!0):1===n&&null!==e?un(t,e,q,s||null,!0):2===n?function(n,t,e){const r=fr(n,t);r&&function(n,t,e,r){ru(n)?n.removeChild(t,e,r):t.removeChild(e)}(n,r,t,e)}(t,q,F):3===n&&t.destroyNode(q),null!=p&&function(n,t,e,r,s){const p=e[7];p!==Ea(e)&&Ci(t,n,r,p,s);for(let q=10;q0&&(n[e-1][4]=r[4]);const p=mf(n,10+t);!function(n,t){Xs(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(r[1],r);const F=p[19];null!==F&&F.detachView(p[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function Ne(n,t){if(!(256&t[2])){const e=t[11];ru(e)&&e.destroyNode&&Xs(n,t,e,3,null,null),function(n){let t=n[13];if(!t)return Ke(n[1],n);for(;t;){let e=null;if(Eu(t))e=t[13];else{const r=t[10];r&&(e=r)}if(!e){for(;t&&!t[4]&&t!==n;)Eu(t)&&Ke(t[1],t),t=t[3];null===t&&(t=n),Eu(t)&&Ke(t[1],t),e=t&&t[4]}t=e}}(t)}}function Ke(n,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let r=0;r=0?r[s=fe]():r[s=-fe].unsubscribe(),p+=2}else{const F=r[s=e[p+1]];e[p].call(F)}if(null!==r){for(let p=s+1;pn,createScript:n=>n,createScriptURL:n=>n})}catch{}return vd}())||void 0===t?void 0:t.createHTML(n))||n}function Se(n){var t;return(null===(t=function(){if(void 0===Ll&&(Ll=null,Nt.trustedTypes))try{Ll=Nt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Ll}())||void 0===t?void 0:t.createHTML(n))||n}class Qe{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class ut extends Qe{getTypeName(){return"HTML"}}class At extends Qe{getTypeName(){return"Style"}}class Zt extends Qe{getTypeName(){return"Script"}}class Jt extends Qe{getTypeName(){return"URL"}}class on extends Qe{getTypeName(){return"ResourceURL"}}function Pn(n){return n instanceof Qe?n.changingThisBreaksApplicationSecurity:n}function Xn(n,t){const e=or(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===t}function or(n){return n instanceof Qe&&n.getTypeName()||null}class vo{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Fd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class Za{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const r=this.inertDocument.createElement("body");e.appendChild(r)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Fd(t),e;const r=this.inertDocument.createElement("body");return r.innerHTML=Fd(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(r),r}stripCustomNsAttrs(t){const e=t.attributes;for(let s=e.length-1;0Kc(t.trim())).join(", ")}function Yl(n){const t={};for(const e of n.split(","))t[e]=!0;return t}function Jl(...n){const t={};for(const e of n)for(const r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}const Is=Yl("area,br,col,hr,img,wbr"),_u=Yl("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),al=Yl("rp,rt"),p0=Jl(Is,Jl(_u,Yl("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Jl(al,Yl("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Jl(al,_u)),fi=Yl("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),gl=Yl("srcset"),qf=Jl(fi,gl,Yl("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Yl("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),ys=Yl("script,style,template");class bs{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,r=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?r=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,r&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let s=this.checkClobberedElement(e,e.nextSibling);if(s){e=s;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!p0.hasOwnProperty(e))return this.sanitizedSomething=!0,!ys.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const r=t.attributes;for(let s=0;s"),!0}endElement(t){const e=t.nodeName.toLowerCase();p0.hasOwnProperty(e)&&!Is.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(n1(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const C0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Hi=/([^\#-~ |!])/g;function n1(n){return n.replace(/&/g,"&").replace(C0,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Hi,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let _a;function ro(n,t){let e=null;try{_a=_a||function(n){const t=new Za(n);return function(){try{return!!(new window.DOMParser).parseFromString(Fd(""),"text/html")}catch{return!1}}()?new vo(t):t}(n);let r=t?String(t):"";e=_a.getInertBodyElement(r);let s=5,p=r;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,r=p,p=e.innerHTML,e=_a.getInertBodyElement(r)}while(r!==p);return Fd((new bs).sanitizeChildren(cc(e)||e))}finally{if(e){const r=cc(e)||e;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function cc(n){return"content"in n&&function(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ui=(()=>((Ui=Ui||{})[Ui.NONE=0]="NONE",Ui[Ui.HTML=1]="HTML",Ui[Ui.STYLE=2]="STYLE",Ui[Ui.SCRIPT=3]="SCRIPT",Ui[Ui.URL=4]="URL",Ui[Ui.RESOURCE_URL=5]="RESOURCE_URL",Ui))();function vr(n){const t=vt();return t?Se(t.sanitize(Ui.HTML,n)||""):Xn(n,"HTML")?Se(Pn(n)):ro(Hu(),I(n))}function Pi(n){const t=vt();return t?t.sanitize(Ui.URL,n)||"":Xn(n,"URL")?Pn(n):Kc(I(n))}function vt(){const n=Ki();return n&&n[12]}function Oo(n){return n.ngOriginalError}function uo(n,...t){n.error(...t)}class Jo{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),r=this._findContext(t),s=(n=t)&&n.ngErrorLogger||uo;var n;s(this._console,"ERROR",t),e&&s(this._console,"ORIGINAL ERROR",e),r&&s(this._console,"ERROR CONTEXT",r)}_findContext(t){return t?function(n){return n.ngDebugContext}(t)||this._findContext(Oo(t)):null}_findOriginalError(t){let e=t&&Oo(t);for(;e&&Oo(e);)e=Oo(e);return e||null}}const _d=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Nt))();function J0(n){return n instanceof Function?n():n}function ko(n,t,e){let r=n.length;for(;;){const s=n.indexOf(t,e);if(-1===s)return s;if(0===s||n.charCodeAt(s-1)<=32){const p=t.length;if(s+p===r||n.charCodeAt(s+p)<=32)return s}e=s+1}}const yl="ng-template";function Cl(n,t,e){let r=0;for(;rp?"":s[$e+1].toLowerCase();const ft=8&r?rt:null;if(ft&&-1!==ko(ft,fe,0)||2&r&&fe!==rt){if(Gi(r))return!1;F=!0}}}}else{if(!F&&!Gi(r)&&!Gi(te))return!1;if(F&&Gi(te))continue;F=!1,r=te|1&r}}return Gi(r)||F}function Gi(n){return 0==(1&n)}function Ls(n,t,e,r){if(null===t)return-1;let s=0;if(r||!e){let p=!1;for(;s-1)for(e++;e0?'="'+q+'"':"")+"]"}else 8&r?s+="."+F:4&r&&(s+=" "+F);else""!==s&&!Gi(F)&&(t+=kp(p,s),s=""),r=F,p=p||!Gi(r);e++}return""!==s&&(t+=kp(p,s)),t}const pu={};function dt(n){ju(ga(),Ki(),Or()+n,Ho())}function ju(n,t,e,r){if(!r)if(3==(3&t[2])){const p=n.preOrderCheckHooks;null!==p&&en(t,p,e)}else{const p=n.preOrderHooks;null!==p&&Dn(t,p,0,e)}Ti(e)}function Su(n,t){return n<<17|t<<2}function Ta(n){return n>>17&32767}function Ul(n){return 2|n}function Cp(n){return(131068&n)>>2}function I1(n,t){return-131069&n|t<<2}function Xh(n){return 1|n}function rg(n,t){const e=n.contentQueries;if(null!==e)for(let r=0;r20&&ju(n,t,20,Ho()),e(r,s)}finally{Ti(p)}}function zy(n,t,e){if(yo(t)){const s=t.directiveEnd;for(let p=t.directiveStart;p0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(q)!=te&&q.push(te),q.push(r,s,F)}}function ad(n,t){null!==n.hostBindings&&n.hostBindings(1,t)}function a6(n,t){t.flags|=2,(n.components||(n.components=[])).push(t.index)}function Dv(n,t,e){if(e){if(t.exportAs)for(let r=0;r0&&og(e)}}function og(n){for(let r=jr(n);null!==r;r=ni(r))for(let s=10;s0&&og(p)}const e=n[1].components;if(null!==e)for(let r=0;r0&&og(s)}}function Rv(n,t){const e=tr(t,n),r=e[1];(function(n,t){for(let e=t.length;ePromise.resolve(null))();function Um(n){return n[7]||(n[7]=[])}function Qy(n){return n.cleanup||(n.cleanup=[])}function eh(n,t){const e=n[9],r=e?e.get(Jo,null):null;r&&r.handleError(t)}function ry(n,t,e,r,s){for(let p=0;pthis.processProvider(q,t,e)),ol([t],q=>this.processInjectorType(q,[],p)),this.records.set(a1,Hm(void 0,this));const F=this.records.get(Sh);this.scope=null!=F?F.value:null,this.source=s||("object"==typeof t?null:T(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Pd,r=Ee.Default){this.assertNotDestroyed();const s=Wf(this),p=nt(void 0);try{if(!(r&Ee.SkipSelf)){let q=this.records.get(t);if(void 0===q){const te=("function"==typeof(n=t)||"object"==typeof n&&n instanceof fo)&&le(t);q=te&&this.injectableDefInScope(te)?Hm(Hl(t),jm):null,this.records.set(t,q)}if(null!=q)return this.hydrate(t,q)}return(r&Ee.Self?Vm():this.parent).get(t,e=r&Ee.Optional&&e===Pd?null:e)}catch(F){if("NullInjectorError"===F.name){if((F[gd]=F[gd]||[]).unshift(T(t)),s)throw F;return A0(F,t,"R3InjectorError",this.source)}throw F}finally{nt(p),Wf(s)}var n}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((r,s)=>t.push(T(s))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,r){if(!(t=h(t)))return!1;let s=_e(t);const p=null==s&&t.ngModule||void 0,F=void 0===p?t:p,q=-1!==r.indexOf(F);if(void 0!==p&&(s=_e(p)),null==s)return!1;if(null!=s.imports&&!q){let Re;r.push(F);try{ol(s.imports,$e=>{this.processInjectorType($e,e,r)&&(void 0===Re&&(Re=[]),Re.push($e))})}finally{}if(void 0!==Re)for(let $e=0;$ethis.processProvider(Tt,rt,ft||Yt))}}this.injectorDefTypes.add(F);const te=po(F)||(()=>new F);this.records.set(F,Hm(te,jm));const fe=s.providers;if(null!=fe&&!q){const Re=t;ol(fe,$e=>this.processProvider($e,Re,fe))}return void 0!==p&&void 0!==t.providers}processProvider(t,e,r){let s=w2(t=h(t))?t:h(t&&t.provide);const p=function(n,t,e){return lg(n)?Hm(void 0,n.useValue):Hm(cg(n),jm)}(t);if(w2(t)||!0!==t.multi)this.records.get(s);else{let F=this.records.get(s);F||(F=Hm(void 0,jm,!0),F.factory=()=>yd(F.multi),this.records.set(s,F)),s=t,F.multi.push(t)}this.records.set(s,p)}hydrate(t,e){return e.value===jm&&(e.value=_2,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value;var n}injectableDefInScope(t){if(!t.providedIn)return!1;const e=h(t.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function Hl(n){const t=le(n),e=null!==t?t.factory:po(n);if(null!==e)return e;if(n instanceof fo)throw new Error(`Token ${T(n)} is missing a \u0275prov definition.`);if(n instanceof Function)return function(n){const t=n.length;if(t>0){const r=pl(t,"?");throw new Error(`Can't resolve all parameters for ${T(n)}: (${r.join(", ")}).`)}const e=function(n){const t=n&&(n[xe]||n[ke]);if(t){const e=function(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new Error("unreachable")}function cg(n,t,e){let r;if(w2(n)){const s=h(n);return po(s)||Hl(s)}if(lg(n))r=()=>h(n.useValue);else if(function(n){return!(!n||!n.useFactory)}(n))r=()=>n.useFactory(...yd(n.deps||[]));else if(function(n){return!(!n||!n.useExisting)}(n))r=()=>Yn(h(n.useExisting));else{const s=h(n&&(n.useClass||n.provide));if(!function(n){return!!n.deps}(n))return po(s)||Hl(s);r=()=>new s(...yd(n.deps))}return r}function Hm(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function lg(n){return null!==n&&"object"==typeof n&&_p in n}function w2(n){return"function"==typeof n}const E2=function(n,t,e){return function(n,t=null,e=null,r){const s=l6(n,t,e,r);return s._resolveInjectorDefTypes(),s}({name:e},t,n,e)};let sc=(()=>{class n{static create(e,r){return Array.isArray(e)?E2(e,r,""):E2(e.providers,e.parent,e.name||"")}}return n.THROW_IF_NOT_FOUND=Pd,n.NULL=new Vl,n.\u0275prov=we({token:n,providedIn:"any",factory:()=>Yn(a1)}),n.__NG_ELEMENT_ID__=-1,n})();function g6(n,t){Lt(Ja(n)[1],ca())}function ya(n){let t=function(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),e=!0;const r=[n];for(;t;){let s;if(ec(n))s=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");s=t.\u0275dir}if(s){if(e){r.push(s);const F=n;F.inputs=A2(n.inputs),F.declaredInputs=A2(n.declaredInputs),F.outputs=A2(n.outputs);const q=s.hostBindings;q&&bg(n,q);const te=s.viewQuery,fe=s.contentQueries;if(te&&hm(n,te),fe&&ly(n,fe),f(n.inputs,s.inputs),f(n.declaredInputs,s.declaredInputs),f(n.outputs,s.outputs),ec(s)&&s.data.animation){const Re=n.data;Re.animation=(Re.animation||[]).concat(s.data.animation)}}const p=s.features;if(p)for(let F=0;F=0;r--){const s=n[r];s.hostVars=t+=s.hostVars,s.hostAttrs=sl(s.hostAttrs,e=sl(e,s.hostAttrs))}}(r)}function A2(n){return n===jt?{}:n===Yt?[]:n}function hm(n,t){const e=n.viewQuery;n.viewQuery=e?(r,s)=>{t(r,s),e(r,s)}:t}function ly(n,t){const e=n.contentQueries;n.contentQueries=e?(r,s,p)=>{t(r,s,p),e(r,s,p)}:t}function bg(n,t){const e=n.hostBindings;n.hostBindings=e?(r,s)=>{t(r,s),e(r,s)}:t}let $m=null;function Wm(){if(!$m){const n=Nt.Symbol;if(n&&n.iterator)$m=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;eq(Ea(_r[r.index])):r.index;if(ru(e)){let _r=null;if(!q&&te&&(_r=function(n,t,e,r){const s=n.cleanup;if(null!=s)for(let p=0;pte?q[te]:null}"string"==typeof F&&(p+=2)}return null}(n,t,s,r.index)),null!==_r)(_r.__ngLastListenerFn__||_r).__ngNextListenerFn__=p,_r.__ngLastListenerFn__=p,ft=!1;else{p=Xv(r,t,$e,p,!1);const pr=e.listen(wn,s,p);rt.push(p,pr),Re&&Re.push(s,gr,An,An+1)}}else p=Xv(r,t,$e,p,!0),wn.addEventListener(s,p,F),rt.push(p),Re&&Re.push(s,gr,An,F)}else p=Xv(r,t,$e,p,!1);const Tt=r.outputs;let Ft;if(ft&&null!==Tt&&(Ft=Tt[s])){const Qt=Ft.length;if(Qt)for(let wn=0;wn0;)t=t[15],n--;return t}(n,Ji.lFrame.contextLView))[8]}(n)}function gy(n,t){let e=null;const r=function(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(n);for(let s=0;s=0}const Ze={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Et(n){return n.substring(Ze.key,Ze.keyEnd)}function tn(n,t){const e=Ze.textEnd;return e===t?-1:(t=Ze.keyEnd=function(n,t,e){for(;t32;)t++;return t}(n,Ze.key=t,e),Mn(n,t,e))}function Mn(n,t,e){for(;t=0;e=tn(t,e))Il(n,Et(t),!0)}function nf(n,t,e,r){const s=Ki(),p=ga(),F=tc(2);p.firstUpdatePass&&x6(p,n,F,r),t!==pu&&gf(s,F,t)&&Eg(p,p.data[Or()],s,s[11],n,s[F+1]=function(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=T(Pn(n)))),n}(t,e),r,F)}function yy(n,t){return t>=n.expandoStartIndex}function x6(n,t,e,r){const s=n.data;if(null===s[e+1]){const p=s[Or()],F=yy(n,e);n3(p,r)&&null===t&&!F&&(t=!1),t=function(n,t,e,r){const s=Kd(n);let p=r?t.residualClasses:t.residualStyles;if(null===s)0===(r?t.classBindings:t.styleBindings)&&(e=Np(e=Rp(null,n,t,e,r),t.attrs,r),p=null);else{const F=t.directiveStylingLast;if(-1===F||n[F]!==s)if(e=Rp(s,n,t,e,r),null===p){let te=function(n,t,e){const r=e?t.classBindings:t.styleBindings;if(0!==Cp(r))return n[Ta(r)]}(n,t,r);void 0!==te&&Array.isArray(te)&&(te=Rp(null,n,t,te[1],r),te=Np(te,t.attrs,r),function(n,t,e,r){n[Ta(e?t.classBindings:t.styleBindings)]=r}(n,t,r,te))}else p=function(n,t,e){let r;const s=t.directiveEnd;for(let p=1+t.directiveStylingLast;p0)&&(fe=!0)}else Re=e;if(s)if(0!==te){const rt=Ta(n[q+1]);n[r+1]=Su(rt,q),0!==rt&&(n[rt+1]=I1(n[rt+1],r)),n[q+1]=function(n,t){return 131071&n|t<<17}(n[q+1],r)}else n[r+1]=Su(q,0),0!==q&&(n[q+1]=I1(n[q+1],r)),q=r;else n[r+1]=Su(te,0),0===q?q=r:n[te+1]=I1(n[te+1],r),te=r;fe&&(n[r+1]=Ul(n[r+1])),Oe(n,Re,r,!0),Oe(n,Re,r,!1),function(n,t,e,r,s){const p=s?n.residualClasses:n.residualStyles;null!=p&&"string"==typeof t&&Nl(p,t)>=0&&(e[r+1]=Xh(e[r+1]))}(t,Re,n,r,p),F=Su(q,te),p?t.classBindings=F:t.styleBindings=F}(s,p,t,e,F,r)}}function Rp(n,t,e,r,s){let p=null;const F=e.directiveEnd;let q=e.directiveStylingLast;for(-1===q?q=e.directiveStart:q++;q0;){const te=n[s],fe=Array.isArray(te),Re=fe?te[1]:te,$e=null===Re;let rt=e[s+1];rt===pu&&(rt=$e?Yt:void 0);let ft=$e?Wh(rt,r):Re===r?rt:void 0;if(fe&&!E6(ft)&&(ft=Wh(te,r)),E6(ft)&&(q=ft,F))return q;const Tt=n[s+1];s=F?Ta(Tt):Cp(Tt)}if(null!==t){let te=p?t.residualClasses:t.residualStyles;null!=te&&(q=Wh(te,r))}return q}function E6(n){return void 0!==n}function n3(n,t){return 0!=(n.flags&(t?16:32))}function kt(n,t=""){const e=Ki(),r=ga(),s=n+20,p=r.firstCreatePass?Fm(r,s,1,t,null):r.data[s],F=e[s]=function(n,t){return ru(n)?n.createText(t):n.createTextNode(t)}(e[11],t);es(r,e,F,p),du(p,!1)}function bc(n){return Pr("",n,""),bc}function Pr(n,t,e){const r=Ki(),s=Vd(r,n,t,e);return s!==pu&&ef(r,Or(),s),Pr}function cu(n,t,e,r,s){const p=Ki(),F=S2(p,n,t,e,r,s);return F!==pu&&ef(p,Or(),F),cu}function Lc(n,t,e,r,s,p,F){const q=Ki(),te=function(n,t,e,r,s,p,F,q){const fe=_g(n,Bo(),e,s,F);return tc(3),fe?t+I(e)+r+I(s)+p+I(F)+q:pu}(q,n,t,e,r,s,p,F);return te!==pu&&ef(q,Or(),te),Lc}function $l(n,t,e,r,s,p,F,q,te){const fe=Ki(),Re=function(n,t,e,r,s,p,F,q,te,fe){const $e=Ch(n,Bo(),e,s,F,te);return tc(4),$e?t+I(e)+r+I(s)+p+I(F)+q+I(te)+fe:pu}(fe,n,t,e,r,s,p,F,q,te);return Re!==pu&&ef(fe,Or(),Re),$l}function ip(n,t,e){const r=Ki();return gf(r,la(),t)&&X0(ga(),ii(),r,n,t,r[11],e,!0),ip}function F8(n,t,e){const r=Ki();if(gf(r,la(),t)){const p=ga(),F=ii();X0(p,F,r,n,t,function(n,t,e){return(null===n||ec(n))&&(e=function(n){for(;Array.isArray(n);){if("object"==typeof n[1])return n;n=n[0]}return null}(e[t.index])),e[11]}(Kd(p.data),F,r),e,!0)}return F8}const _b=void 0;var HI=["en",[["a","p"],["AM","PM"],_b],[["AM","PM"],_b,_b],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],_b,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],_b,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",_b,"{1} 'at' {0}",_b],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(n){const t=Math.floor(Math.abs(n)),e=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===e?1:5}];let I6={};function u3(n){return n in I6||(I6[n]=Nt.ng&&Nt.ng.common&&Nt.ng.common.locales&&Nt.ng.common.locales[n]),I6[n]}var ps=(()=>((ps=ps||{})[ps.LocaleId=0]="LocaleId",ps[ps.DayPeriodsFormat=1]="DayPeriodsFormat",ps[ps.DayPeriodsStandalone=2]="DayPeriodsStandalone",ps[ps.DaysFormat=3]="DaysFormat",ps[ps.DaysStandalone=4]="DaysStandalone",ps[ps.MonthsFormat=5]="MonthsFormat",ps[ps.MonthsStandalone=6]="MonthsStandalone",ps[ps.Eras=7]="Eras",ps[ps.FirstDayOfWeek=8]="FirstDayOfWeek",ps[ps.WeekendRange=9]="WeekendRange",ps[ps.DateFormat=10]="DateFormat",ps[ps.TimeFormat=11]="TimeFormat",ps[ps.DateTimeFormat=12]="DateTimeFormat",ps[ps.NumberSymbols=13]="NumberSymbols",ps[ps.NumberFormats=14]="NumberFormats",ps[ps.CurrencyCode=15]="CurrencyCode",ps[ps.CurrencySymbol=16]="CurrencySymbol",ps[ps.CurrencyName=17]="CurrencyName",ps[ps.Currencies=18]="Currencies",ps[ps.Directionality=19]="Directionality",ps[ps.PluralCase=20]="PluralCase",ps[ps.ExtraData=21]="ExtraData",ps))();const j8="en-US";let y4=j8;function b4(n){B(n,"Expected localeId to be defined"),"string"==typeof n&&(y4=n.toLowerCase().replace(/_/g,"-"))}function k4(n,t,e,r,s){if(n=h(n),Array.isArray(n))for(let p=0;p>20;if(w2(n)||!n.multi){const ft=new gi(te,s,Xt),Tt=M4(q,t,s?Re:Re+rt,$e);-1===Tt?(nc(j0(fe,F),p,q),C4(p,n,t.length),t.push(q),fe.directiveStart++,fe.directiveEnd++,s&&(fe.providerIndexes+=1048576),e.push(ft),F.push(ft)):(e[Tt]=ft,F[Tt]=ft)}else{const ft=M4(q,t,Re+rt,$e),Tt=M4(q,t,Re,Re+rt),Ft=ft>=0&&e[ft],Qt=Tt>=0&&e[Tt];if(s&&!Qt||!s&&!Ft){nc(j0(fe,F),p,q);const wn=function(n,t,e,r,s){const p=new gi(n,e,Xt);return p.multi=[],p.index=t,p.componentProviders=0,ox(p,s,r&&!e),p}(s?_S:vS,e.length,s,r,te);!s&&Qt&&(e[Tt].providerFactory=wn),C4(p,n,t.length,0),t.push(q),fe.directiveStart++,fe.directiveEnd++,s&&(fe.providerIndexes+=1048576),e.push(wn),F.push(wn)}else C4(p,n,ft>-1?ft:Tt,ox(e[s?Tt:ft],te,!s&&r));!s&&r&&Qt&&e[Tt].componentProviders++}}}function C4(n,t,e,r){const s=w2(t);if(s||function(n){return!!n.useClass}(t)){const F=(t.useClass||t).prototype.ngOnDestroy;if(F){const q=n.destroyHooks||(n.destroyHooks=[]);if(!s&&t.multi){const te=q.indexOf(e);-1===te?q.push(e,[r,F]):q[te+1].push(r,F)}else q.push(e,F)}}}function ox(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function M4(n,t,e,r){for(let s=e;s{e.providersResolver=(r,s)=>function(n,t,e){const r=ga();if(r.firstCreatePass){const s=ec(n);k4(e,r.data,r.blueprint,s,!0),k4(t,r.data,r.blueprint,s,!1)}}(r,s?s(n):n,t)}}class ux{}const lx="ngComponent";class xS{resolveComponentFactory(t){throw function(n){const t=Error(`No component factory found for ${T(n)}. Did you add it to @NgModule.entryComponents?`);return t[lx]=n,t}(t)}}let l1=(()=>{class n{}return n.NULL=new xS,n})();function Eb(...n){}function D6(n,t){return new wa(et(n,t))}const IS=function(){return D6(ca(),Ki())};let wa=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=IS,n})();function dx(n){return n instanceof wa?n.nativeElement:n}class Ig{}let sh=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>kS(),n})();const kS=function(){const n=Ki(),e=tr(ca().index,n);return function(n){return n[11]}(Eu(e)?e:n)};let D4=(()=>{class n{}return n.\u0275prov=we({token:n,providedIn:"root",factory:()=>null}),n})();class Sg{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const P4=new Sg("12.2.17");class fx{constructor(){}supports(t){return pm(t)}create(t){return new DS(t)}}const OS=(n,t)=>t;class DS{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||OS}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,r=this._removalsHead,s=0,p=null;for(;e||r;){const F=!r||e&&e.currentIndex{F=this._trackByFn(s,q),null!==e&&Object.is(e.trackById,F)?(r&&(e=this._verifyReinsertion(e,q,F,s)),Object.is(e.item,q)||this._addIdentityChange(e,q)):(e=this._mismatch(e,q,F,s),r=!0),e=e._next,s++}),this.length=s;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,r,s){let p;return null===t?p=this._itTail:(p=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,p,s)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(r,s))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,p,s)):t=this._addAfter(new W8(e,r),p,s),t}_verifyReinsertion(t,e,r,s){let p=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==p?t=this._reinsertAfter(p,t._prev,s):t.currentIndex!=s&&(t.currentIndex=s,this._addToMoves(t,s)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const s=t._prevRemoved,p=t._nextRemoved;return null===s?this._removalsHead=p:s._nextRemoved=p,null===p?this._removalsTail=s:p._prevRemoved=s,this._insertAfter(t,e,r),this._addToMoves(t,r),t}_moveAfter(t,e,r){return this._unlink(t),this._insertAfter(t,e,r),this._addToMoves(t,r),t}_addAfter(t,e,r){return this._insertAfter(t,e,r),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,r){const s=null===e?this._itHead:e._next;return t._next=s,t._prev=e,null===s?this._itTail=t:s._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new hx),this._linkedRecords.put(t),t.currentIndex=r,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,r=t._next;return null===e?this._itHead=r:e._next=r,null===r?this._itTail=e:r._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new hx),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class W8{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class PS{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===e||e<=r.currentIndex)&&Object.is(r.trackById,t))return r;return null}remove(t){const e=t._prevDup,r=t._nextDup;return null===e?this._head=r:e._nextDup=r,null===r?this._tail=e:r._prevDup=e,null===this._head}}class hx{constructor(){this.map=new Map}put(t){const e=t.trackById;let r=this.map.get(e);r||(r=new PS,this.map.set(e,r)),r.add(t)}get(t,e){const s=this.map.get(t);return s?s.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function px(n,t,e){const r=n.previousIndex;if(null===r)return r;let s=0;return e&&r{if(e&&e.key===s)this._maybeAddToChanges(e,r),this._appendAfter=e,e=e._next;else{const p=this._getOrCreateRecordForKey(s,r);e=this._insertBeforeOrAppend(e,p)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let r=e;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const r=t._prev;return e._next=t,e._prev=r,t._prev=e,r&&(r._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const s=this._records.get(t);this._maybeAddToChanges(s,e);const p=s._prev,F=s._next;return p&&(p._next=F),F&&(F._prev=p),s._next=null,s._prev=null,s}const r=new NS(t);return this._records.set(t,r),r.currentValue=e,this._addToAdditions(r),r}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(r=>e(t[r],r))}}class NS{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function gx(){return new Zm([new fx])}let Zm=(()=>{class n{constructor(e){this.factories=e}static create(e,r){if(null!=r){const s=r.factories.slice();e=e.concat(s)}return new n(e)}static extend(e){return{provide:n,useFactory:r=>n.create(e,r||gx()),deps:[[n,new qc,new Bl]]}}find(e){const r=this.factories.find(s=>s.supports(e));if(null!=r)return r;throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(n){return n.name||typeof n}(e)}'`)}}return n.\u0275prov=we({token:n,providedIn:"root",factory:gx}),n})();function yx(){return new P6([new mx])}let P6=(()=>{class n{constructor(e){this.factories=e}static create(e,r){if(r){const s=r.factories.slice();e=e.concat(s)}return new n(e)}static extend(e){return{provide:n,useFactory:r=>n.create(e,r||yx()),deps:[[n,new qc,new Bl]]}}find(e){const r=this.factories.find(s=>s.supports(e));if(r)return r;throw new Error(`Cannot find a differ supporting object '${e}'`)}}return n.\u0275prov=we({token:n,providedIn:"root",factory:yx}),n})();function Tb(n,t,e,r,s=!1){for(;null!==e;){const p=t[e.index];if(null!==p&&r.push(Ea(p)),jo(p))for(let q=10;q-1&&(ge(t,r),mf(e,r))}this._attachedToViewContainer=!1}Ne(this._lView[1],this._lView)}onDestroy(t){um(this._lView[1],this._lView,null,t)}markForCheck(){ty(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){s1(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(n,t,e){$o(!0);try{s1(n,t,e)}finally{$o(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,Xs(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class bx extends y3{constructor(t){super(t),this._view=t}detectChanges(){g0(this._view)}checkNoChanges(){!function(n){$o(!0);try{g0(n)}finally{$o(!1)}}(this._view)}get context(){return null}}const wx=function(n){return function(n,t,e){if(Vc(n)&&!e){const r=tr(n.index,t);return new y3(r,r)}return 47&n.type?new y3(t[16],t):null}(ca(),Ki(),16==(16&n))};let yf=(()=>{class n{}return n.__NG_ELEMENT_ID__=wx,n})();const FS=[new mx],US=new Zm([new fx]),G8=new P6(FS),jS=function(){return q8(ca(),Ki())};let Ac=(()=>{class n{}return n.__NG_ELEMENT_ID__=jS,n})();const Tx=Ac,VS=class extends Tx{constructor(t,e,r){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=r}createEmbeddedView(t){const e=this._declarationTContainer.tViews,r=Bm(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const p=this._declarationLView[19];return null!==p&&(r[19]=p.createEmbeddedView(e)),d2(e,r,t),new y3(r)}};function q8(n,t){return 4&n.type?new VS(t,n,D6(n,t)):null}class F2{}class Ax{}const WS=function(){return Sx(ca(),Ki())};let Zf=(()=>{class n{}return n.__NG_ELEMENT_ID__=WS,n})();const zS=Zf,Ix=class extends zS{constructor(t,e,r){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=r}get element(){return D6(this._hostTNode,this._hostLView)}get injector(){return new Id(this._hostTNode,this._hostLView)}get parentInjector(){const t=Hh(this._hostTNode,this._hostLView);if(Lf(t)){const e=Mc(t,this._hostLView),r=Uf(t);return new Id(e[1].data[r+8],e)}return new Id(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=_m(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,r){const s=t.createEmbeddedView(e||{});return this.insert(s,r),s}createComponent(t,e,r,s,p){const F=r||this.parentInjector;if(!p&&null==t.ngModule&&F){const te=F.get(F2,null);te&&(p=te)}const q=t.create(F,s,void 0,p);return this.insert(q.hostView,e),q}insert(t,e){const r=t._lView,s=r[1];if(jo(r[3])){const Re=this.indexOf(t);if(-1!==Re)this.detach(Re);else{const $e=r[3],rt=new Ix($e,$e[6],$e[3]);rt.detach(rt.indexOf(t))}}const p=this._adjustIndex(e),F=this._lContainer;!function(n,t,e,r){const s=10+r,p=e.length;r>0&&(e[s-1][4]=t),r_d});class Kx extends ux{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(Jb).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return z4(this.componentDef.inputs)}get outputs(){return z4(this.componentDef.outputs)}create(t,e,r,s){const p=(s=s||this.ngModule)?function(n,t){return{get:(e,r,s)=>{const p=n.get(e,F6,s);return p!==F6||r===F6?p:t.get(e,r,s)}}}(t,s.injector):t,F=p.get(Ig,Wc),q=p.get(D4,null),te=F.createRenderer(null,this.componentDef),fe=this.componentDef.selectors[0][0]||"div",Re=r?function(n,t,e){if(ru(n))return n.selectRootElement(t,e===Ye.ShadowDom);let r="string"==typeof t?n.querySelector(t):t;return r.textContent="",r}(te,r,this.componentDef.encapsulation):Ba(F.createRenderer(null,this.componentDef),fe,function(n){const t=n.toLowerCase();return"svg"===t?Vo:"math"===t?"http://www.w3.org/1998/MathML/":null}(fe)),$e=this.componentDef.onPush?576:528,rt=function(n,t){return{components:[],scheduler:n||_d,clean:ug,playerHandler:t||null,flags:0}}(),ft=h2(0,null,null,1,0,null,null,null,null,null),Tt=Bm(null,ft,rt,$e,null,null,F,te,q,p);let Ft,Qt;Tl(Tt);try{const wn=function(n,t,e,r,s,p){const F=e[1];e[20]=n;const te=Fm(F,20,2,"#host",null),fe=te.mergedAttrs=t.hostAttrs;null!==fe&&(b2(te,fe,!0),null!==n&&(bu(s,n,fe),null!==te.classes&&h0(s,n,te.classes),null!==te.styles&&sm(s,n,te.styles)));const Re=r.createRenderer(n,t),$e=Bm(e,qy(t),null,t.onPush?64:16,e[20],te,r,Re,p||null,null);return F.firstCreatePass&&(nc(j0(te,e),F,t.type),a6(F,te),c6(te,e.length,1)),ag(e,$e),e[20]=$e}(Re,this.componentDef,Tt,F,te);if(Re)if(r)bu(te,Re,["ng-version",P4.full]);else{const{attrs:An,classes:gr}=function(n){const t=[],e=[];let r=1,s=2;for(;r0&&h0(te,Re,gr.join(" "))}if(Qt=gn(ft,20),void 0!==e){const An=Qt.projection=[];for(let gr=0;grte(F,t)),t.contentQueries){const te=ca();t.contentQueries(1,F,te.directiveStart)}const q=ca();return!p.firstCreatePass||null===t.hostBindings&&null===t.hostAttrs||(Ti(q.index),Dp(e[1],q,0,q.directiveStart,q.directiveEnd,t),ad(t,F)),F}(wn,this.componentDef,Tt,rt,[g6]),d2(ft,Tt,null)}finally{Hc()}return new Mk(this.componentType,Ft,D6(Qt,Tt),Tt,Qt)}}class Mk extends class{}{constructor(t,e,r,s,p){super(),this.location=r,this._rootLView=s,this._tNode=p,this.instance=e,this.hostView=this.changeDetectorRef=new bx(s),this.componentType=t}get injector(){return new Id(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}const F0=new Map;class K4 extends F2{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new J8(this);const r=ki(t),s=t[Ln]||null;s&&b4(s),this._bootstrapComponents=J0(r.bootstrap),this._r3Injector=l6(t,e,[{provide:F2,useValue:this},{provide:l1,useValue:this.componentFactoryResolver}],T(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=sc.THROW_IF_NOT_FOUND,r=Ee.Default){return t===sc||t===F2||t===a1?this:this._r3Injector.get(t,e,r)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Z4 extends Ax{constructor(t){super(),this.moduleType=t,null!==ki(t)&&function(n){const t=new Set;!function e(r){const s=ki(r,!0),p=s.id;null!==p&&(function(n,t,e){if(t&&t!==e)throw new Error(`Duplicate module registered for ${n} - ${T(t)} vs ${T(t.name)}`)}(p,F0.get(p),r),F0.set(p,r));const F=J0(s.imports);for(const q of F)t.has(q)||(t.add(q),e(q))}(n)}(t)}create(t){return new K4(this.moduleType,t)}}function sf(n,t,e){const r=oa()+n,s=Ki();return s[r]===pu?D0(s,r,e?t.call(e):t()):mm(s,r)}function Ic(n,t,e,r){return Xx(Ki(),oa(),n,t,e,r)}function vc(n,t,e,r,s){return function(n,t,e,r,s,p,F){const q=t+e;return gm(n,q,s,p)?D0(n,q+2,F?r.call(F,s,p):r(s,p)):Sb(n,q+2)}(Ki(),oa(),n,t,e,r,s)}function Sb(n,t){const e=n[t];return e===pu?void 0:e}function Xx(n,t,e,r,s,p){const F=t+e;return gf(n,F,s)?D0(n,F+1,p?r.call(p,s):r(s)):Sb(n,F+1)}function L6(n,t){const e=ga();let r;const s=n+20;e.firstCreatePass?(r=function(n,t){if(t)for(let e=t.length-1;e>=0;e--){const r=t[e];if(n===r.name)return r}throw new _("302",`The pipe '${n}' could not be found!`)}(t,e.pipeRegistry),e.data[s]=r,r.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(s,r.onDestroy)):r=e.data[s];const p=r.factory||(r.factory=po(r.type)),F=nt(Xt);try{const q=hu(!1),te=p();return hu(q),function(n,t,e,r){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=r}(e,Ki(),s,te),te}finally{nt(F)}}function Q8(n,t,e,r,s){const p=n+20,F=Ki(),q=kn(F,p);return I3(F,A3(F,p)?function(n,t,e,r,s,p,F,q){const te=t+e;return _g(n,te,s,p,F)?D0(n,te+3,q?r.call(q,s,p,F):r(s,p,F)):Sb(n,te+3)}(F,oa(),t,q.transform,e,r,s,q):q.transform(e,r,s))}function A3(n,t){return n[1].data[t].pure}function I3(n,t){return Df.isWrapped(t)&&(t=Df.unwrap(t),n[Bo()]=pu),t}function Q4(n){return t=>{setTimeout(n,void 0,t)}}const mo=class extends ie.xQ{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,r){var s,p,F;let q=t,te=e||(()=>null),fe=r;if(t&&"object"==typeof t){const $e=t;q=null===(s=$e.next)||void 0===s?void 0:s.bind($e),te=null===(p=$e.error)||void 0===p?void 0:p.bind($e),fe=null===(F=$e.complete)||void 0===F?void 0:F.bind($e)}this.__isAsync&&(te=Q4(te),q&&(q=Q4(q)),fe&&(fe=Q4(fe)));const Re=super.subscribe({next:q,error:te,complete:fe});return t instanceof z.w&&t.add(Re),Re}};function Hk(){return this._results[Wm()]()}class e5{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Wm(),r=e5.prototype;r[e]||(r[e]=Hk)}get changes(){return this._changes||(this._changes=new mo)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const r=this;r.dirty=!1;const s=Od(t);(this._changesDetected=!function(n,t,e){if(n.length!==t.length)return!1;for(let r=0;r0)r.push(F[q/2]);else{const fe=p[q+1],Re=t[-te];for(let $e=10;$e{class n{constructor(e){this.appInits=e,this.resolve=Eb,this.reject=Eb,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,s)=>{this.resolve=r,this.reject=s})}runInitializers(){if(this.initialized)return;const e=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let s=0;s{p.subscribe({complete:q,error:te})});e.push(F)}}Promise.all(e).then(()=>{r()}).catch(s=>{this.reject(s)}),0===e.length&&r(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(Yn(t_,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const n_=new fo("AppId"),uG={provide:n_,useFactory:function(){return`${Yk()}${Yk()}${Yk()}`},deps:[]};function Yk(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const iR=new fo("Platform Initializer"),n5=new fo("Platform ID"),sR=new fo("appBootstrapListener");let o7=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const Qm=new fo("LocaleId"),oR=new fo("DefaultCurrencyCode");class lG{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Jk=function(n){return new Z4(n)},dG=Jk,fG=function(n){return Promise.resolve(Jk(n))},aR=function(n){const t=Jk(n),r=J0(ki(n).declarations).reduce((s,p)=>{const F=Vi(p);return F&&s.push(new Kx(F)),s},[]);return new lG(t,r)},hG=aR,pG=function(n){return Promise.resolve(aR(n))};let S3=(()=>{class n{constructor(){this.compileModuleSync=dG,this.compileModuleAsync=fG,this.compileModuleAndAllComponentsSync=hG,this.compileModuleAndAllComponentsAsync=pG}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const yG=(()=>Promise.resolve(0))();function Xk(n){"undefined"==typeof Zone?yG.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class pa{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new mo(!1),this.onMicrotaskEmpty=new mo(!1),this.onStable=new mo(!1),this.onError=new mo(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&e,s.shouldCoalesceRunChangeDetection=r,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function(){let n=Nt.requestAnimationFrame,t=Nt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function(n){const t=()=>{!function(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(Nt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,eC(n),n.isCheckStableRunning=!0,Qk(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),eC(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,r,s,p,F,q)=>{try{return uR(n),e.invokeTask(s,p,F,q)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===p.type||n.shouldCoalesceRunChangeDetection)&&t(),cR(n)}},onInvoke:(e,r,s,p,F,q,te)=>{try{return uR(n),e.invoke(s,p,F,q,te)}finally{n.shouldCoalesceRunChangeDetection&&t(),cR(n)}},onHasTask:(e,r,s,p)=>{e.hasTask(s,p),r===s&&("microTask"==p.change?(n._hasPendingMicrotasks=p.microTask,eC(n),Qk(n)):"macroTask"==p.change&&(n.hasPendingMacrotasks=p.macroTask))},onHandleError:(e,r,s,p)=>(e.handleError(s,p),n.runOutsideAngular(()=>n.onError.emit(p)),!1)})}(s)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!pa.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(pa.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,r){return this._inner.run(t,e,r)}runTask(t,e,r,s){const p=this._inner,F=p.scheduleEventTask("NgZoneEvent: "+s,t,vG,Eb,Eb);try{return p.runTask(F,e,r)}finally{p.cancelTask(F)}}runGuarded(t,e,r){return this._inner.runGuarded(t,e,r)}runOutsideAngular(t){return this._outer.run(t)}}const vG={};function Qk(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function eC(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function uR(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function cR(n){n._nesting--,Qk(n)}class xG{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new mo,this.onMicrotaskEmpty=new mo,this.onStable=new mo,this.onError=new mo}run(t,e,r){return t.apply(e,r)}runGuarded(t,e,r){return t.apply(e,r)}runOutsideAngular(t){return t()}runTask(t,e,r,s){return t.apply(e,r)}}let tC=(()=>{class n{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{pa.assertNotInAngularZone(),Xk(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Xk(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(e)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,r,s){let p=-1;r&&r>0&&(p=setTimeout(()=>{this._callbacks=this._callbacks.filter(F=>F.timeoutId!==p),e(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:e,timeoutId:p,updateCb:s})}whenStable(e,r,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,r,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,r,s){return[]}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),lR=(()=>{class n{constructor(){this._applications=new Map,nC.addToWindow(this)}registerApplication(e,r){this._applications.set(e,r)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,r=!0){return nC.findTestabilityInTree(this,e,r)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class EG{addToWindow(t){}findTestabilityInTree(t,e,r){return null}}let nC=new EG,dR=!0,fR=!1;function rC(){return fR=!0,dR}let kg;const hR=new fo("AllowMultipleToken");class iC{constructor(t,e){this.name=t,this.token=e}}function pR(n,t,e=[]){const r=`Platform: ${t}`,s=new fo(r);return(p=[])=>{let F=mR();if(!F||F.injector.get(hR,!1))if(n)n(e.concat(p).concat({provide:s,useValue:!0}));else{const q=e.concat(p).concat({provide:s,useValue:!0},{provide:Sh,useValue:"platform"});!function(n){if(kg&&!kg.destroyed&&!kg.injector.get(hR,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");kg=n.get(gR);const t=n.get(iR,null);t&&t.forEach(e=>e())}(sc.create({providers:q,name:r}))}return function(n){const t=mR();if(!t)throw new Error("No platform exists!");if(!t.injector.get(n,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(s)}}function mR(){return kg&&!kg.destroyed?kg:null}let gR=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,r){const q=function(n,t){let e;return e="noop"===n?new xG:("zone.js"===n?void 0:n)||new pa({enableLongStackTrace:rC(),shouldCoalesceEventChangeDetection:!!(null==t?void 0:t.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==t?void 0:t.ngZoneRunCoalescing)}),e}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),te=[{provide:pa,useValue:q}];return q.run(()=>{const fe=sc.create({providers:te,parent:this.injector,name:e.moduleType.name}),Re=e.create(fe),$e=Re.injector.get(Jo,null);if(!$e)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return q.runOutsideAngular(()=>{const rt=q.onError.subscribe({next:ft=>{$e.handleError(ft)}});Re.onDestroy(()=>{sC(this._modules,Re),rt.unsubscribe()})}),function(n,t,e){try{const r=e();return j1(r)?r.catch(s=>{throw t.runOutsideAngular(()=>n.handleError(s)),s}):r}catch(r){throw t.runOutsideAngular(()=>n.handleError(r)),r}}($e,q,()=>{const rt=Re.injector.get(t5);return rt.runInitializers(),rt.donePromise.then(()=>(b4(Re.injector.get(Qm,j8)||j8),this._moduleDoBootstrap(Re),Re))})})}bootstrapModule(e,r=[]){const s=yR({},r);return function(n,t,e){const r=new Z4(e);return Promise.resolve(r)}(0,0,e).then(p=>this.bootstrapModuleFactory(p,s))}_moduleDoBootstrap(e){const r=e.injector.get(e2);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(s=>r.bootstrap(s));else{if(!e.instance.ngDoBootstrap)throw new Error(`The module ${T(e.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);e.instance.ngDoBootstrap(r)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(Yn(sc))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function yR(n,t){return Array.isArray(t)?t.reduce(yR,n):Object.assign(Object.assign({},n),t)}let e2=(()=>{class n{constructor(e,r,s,p,F){this._zone=e,this._injector=r,this._exceptionHandler=s,this._componentFactoryResolver=p,this._initStatus=F,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const q=new O.y(fe=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{fe.next(this._stable),fe.complete()})}),te=new O.y(fe=>{let Re;this._zone.runOutsideAngular(()=>{Re=this._zone.onStable.subscribe(()=>{pa.assertNotInAngularZone(),Xk(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,fe.next(!0))})})});const $e=this._zone.onUnstable.subscribe(()=>{pa.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{fe.next(!1)}))});return()=>{Re.unsubscribe(),$e.unsubscribe()}});this.isStable=(0,E.T)(q,te.pipe((0,d.B)()))}bootstrap(e,r){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let s;s=e instanceof ux?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(s.componentType);const p=function(n){return n.isBoundToModule}(s)?void 0:this._injector.get(F2),q=s.create(sc.NULL,[],r||s.selector,p),te=q.location.nativeElement,fe=q.injector.get(tC,null),Re=fe&&q.injector.get(lR);return fe&&Re&&Re.registerApplication(te,fe),q.onDestroy(()=>{this.detachView(q.hostView),sC(this.components,q),Re&&Re.unregisterApplication(te)}),this._loadComponent(q),q}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const r=e;this._views.push(r),r.attachToAppRef(this)}detachView(e){const r=e;sC(this._views,r),r.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(sR,[]).concat(this._bootstrapListeners).forEach(s=>s(e))}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa),Yn(sc),Yn(Jo),Yn(l1),Yn(t5))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function sC(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}class u7{}class LG{}const UG={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let jG=(()=>{class n{constructor(e,r){this._compiler=e,this._config=r||UG}load(e){return this.loadAndCompile(e)}loadAndCompile(e){let[r,s]=e.split("#");return void 0===s&&(s="default"),Y(98255)(r).then(p=>p[s]).then(p=>wR(p,r,s)).then(p=>this._compiler.compileModuleAsync(p))}loadFactory(e){let[r,s]=e.split("#"),p="NgFactory";return void 0===s&&(s="default",p=""),Y(98255)(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(F=>F[s+p]).then(F=>wR(F,r,s))}}return n.\u0275fac=function(e){return new(e||n)(Yn(S3),Yn(LG,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function wR(n,t,e){if(!n)throw new Error(`Cannot find '${e}' in '${t}'`);return n}const YG=pR(null,"core",[{provide:n5,useValue:"unknown"},{provide:gR,deps:[sc]},{provide:lR,deps:[]},{provide:o7,deps:[]}]),tz=[{provide:e2,useClass:e2,deps:[pa,sc,Jo,l1,t5]},{provide:kk,deps:[pa],useFactory:function(n){let t=[];return n.onStable.subscribe(()=>{for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:t5,useClass:t5,deps:[[new Bl,t_]]},{provide:S3,useClass:S3,deps:[]},uG,{provide:Zm,useFactory:function(){return US},deps:[]},{provide:P6,useFactory:function(){return G8},deps:[]},{provide:Qm,useFactory:function(n){return b4(n=n||"undefined"!=typeof $localize&&$localize.locale||j8),n},deps:[[new l0(Qm),new Bl,new qc]]},{provide:oR,useValue:"USD"}];let rz=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(Yn(e2))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:tz}),n})(),b7=null;function Ty(){return b7}const qa=new fo("DocumentToken");let M3=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:nq,token:n,providedIn:"platform"}),n})();function nq(){return Yn(GR)}const rq=new fo("Location Initialized");let GR=(()=>{class n extends M3{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ty().getBaseHref(this._doc)}onPopState(e){const r=Ty().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",e,!1),()=>r.removeEventListener("popstate",e)}onHashChange(e){const r=Ty().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",e,!1),()=>r.removeEventListener("hashchange",e)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,r,s){zR()?this._history.pushState(e,r,s):this.location.hash=s}replaceState(e,r,s){zR()?this._history.replaceState(e,r,s):this.location.hash=s}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:iq,token:n,providedIn:"platform"}),n})();function zR(){return!!window.history.pushState}function iq(){return new GR(Yn(qa))}function _C(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function qR(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function Cb(n){return n&&"?"!==n[0]?"?"+n:n}let s5=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:sq,token:n,providedIn:"root"}),n})();function sq(n){const t=Yn(qa).location;return new KR(Yn(M3),t&&t.origin||"")}const wC=new fo("appBaseHref");let KR=(()=>{class n extends s5{constructor(e,r){if(super(),this._platformLocation=e,this._removeListenerFns=[],null==r&&(r=this._platformLocation.getBaseHrefFromDOM()),null==r)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return _C(this._baseHref,e)}path(e=!1){const r=this._platformLocation.pathname+Cb(this._platformLocation.search),s=this._platformLocation.hash;return s&&e?`${r}${s}`:r}pushState(e,r,s,p){const F=this.prepareExternalUrl(s+Cb(p));this._platformLocation.pushState(e,r,F)}replaceState(e,r,s,p){const F=this.prepareExternalUrl(s+Cb(p));this._platformLocation.replaceState(e,r,F)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var r,s;null===(s=(r=this._platformLocation).historyGo)||void 0===s||s.call(r,e)}}return n.\u0275fac=function(e){return new(e||n)(Yn(M3),Yn(wC,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),oq=(()=>{class n extends s5{constructor(e,r){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(e){const r=_C(this._baseHref,e);return r.length>0?"#"+r:r}pushState(e,r,s,p){let F=this.prepareExternalUrl(s+Cb(p));0==F.length&&(F=this._platformLocation.pathname),this._platformLocation.pushState(e,r,F)}replaceState(e,r,s,p){let F=this.prepareExternalUrl(s+Cb(p));0==F.length&&(F=this._platformLocation.pathname),this._platformLocation.replaceState(e,r,F)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var r,s;null===(s=(r=this._platformLocation).historyGo)||void 0===s||s.call(r,e)}}return n.\u0275fac=function(e){return new(e||n)(Yn(M3),Yn(wC,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),v7=(()=>{class n{constructor(e,r){this._subject=new mo,this._urlChangeListeners=[],this._platformStrategy=e;const s=this._platformStrategy.getBaseHref();this._platformLocation=r,this._baseHref=qR(ZR(s)),this._platformStrategy.onPopState(p=>{this._subject.emit({url:this.path(!0),pop:!0,state:p.state,type:p.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+Cb(r))}normalize(e){return n.stripTrailingSlash(function(n,t){return n&&t.startsWith(n)?t.substring(n.length):t}(this._baseHref,ZR(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,r="",s=null){this._platformStrategy.pushState(s,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Cb(r)),s)}replaceState(e,r="",s=null){this._platformStrategy.replaceState(s,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Cb(r)),s)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(e=0){var r,s;null===(s=(r=this._platformStrategy).historyGo)||void 0===s||s.call(r,e)}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}))}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(s=>s(e,r))}subscribe(e,r,s){return this._subject.subscribe({next:e,error:r,complete:s})}}return n.\u0275fac=function(e){return new(e||n)(Yn(s5),Yn(M3))},n.normalizeQueryParams=Cb,n.joinWithSlash=_C,n.stripTrailingSlash=qR,n.\u0275prov=we({factory:aq,token:n,providedIn:"root"}),n})();function aq(){return new v7(Yn(s5),Yn(M3))}function ZR(n){return n.replace(/\/index.html$/,"")}var ch=(()=>((ch=ch||{})[ch.Zero=0]="Zero",ch[ch.One=1]="One",ch[ch.Two=2]="Two",ch[ch.Few=3]="Few",ch[ch.Many=4]="Many",ch[ch.Other=5]="Other",ch))();const fq=function(n){return function(n){const t=function(n){return n.toLowerCase().replace(/_/g,"-")}(n);let e=u3(t);if(e)return e;const r=t.split("-")[0];if(e=u3(r),e)return e;if("en"===r)return HI;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[ps.PluralCase]};class C7{}let jq=(()=>{class n extends C7{constructor(e){super(),this.locale=e}getPluralCategory(e,r){switch(fq(r||this.locale)(e)){case ch.Zero:return"zero";case ch.One:return"one";case ch.Two:return"two";case ch.Few:return"few";case ch.Many:return"many";default:return"other"}}}return n.\u0275fac=function(e){return new(e||n)(Yn(Qm))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),dh=(()=>{class n{constructor(e,r,s,p){this._iterableDiffers=e,this._keyValueDiffers=r,this._ngEl=s,this._renderer=p,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(pm(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(r=>this._toggleClass(r.key,r.currentValue)),e.forEachChangedItem(r=>this._toggleClass(r.key,r.currentValue)),e.forEachRemovedItem(r=>{r.previousValue&&this._toggleClass(r.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(r=>{if("string"!=typeof r.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${T(r.item)}`);this._toggleClass(r.item,!0)}),e.forEachRemovedItem(r=>this._toggleClass(r.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(r=>this._toggleClass(r,!0)):Object.keys(e).forEach(r=>this._toggleClass(r,!!e[r])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(r=>this._toggleClass(r,!1)):Object.keys(e).forEach(r=>this._toggleClass(r,!1)))}_toggleClass(e,r){(e=e.trim())&&e.split(/\s+/g).forEach(s=>{r?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zm),Xt(P6),Xt(wa),Xt(sh))},n.\u0275dir=Tn({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class $q{constructor(t,e,r,s){this.$implicit=t,this.ngForOf=e,this.index=r,this.count=s}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let L0=(()=>{class n{constructor(e,r,s){this._viewContainer=e,this._template=r,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch{throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(n){return n.name||typeof n}(e)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const r=[];e.forEachOperation((s,p,F)=>{if(null==s.previousIndex){const q=this._viewContainer.createEmbeddedView(this._template,new $q(null,this._ngForOf,-1,-1),null===F?void 0:F),te=new aN(s,q);r.push(te)}else if(null==F)this._viewContainer.remove(null===p?void 0:p);else if(null!==p){const q=this._viewContainer.get(p);this._viewContainer.move(q,F);const te=new aN(s,q);r.push(te)}});for(let s=0;s{this._viewContainer.get(s.currentIndex).context.$implicit=s.item})}_perViewChange(e,r){e.context.$implicit=r.item}static ngTemplateContextGuard(e,r){return!0}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(Ac),Xt(Zm))},n.\u0275dir=Tn({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();class aN{constructor(t,e){this.record=t,this.view=e}}let La=(()=>{class n{constructor(e,r){this._viewContainer=e,this._context=new Gq,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){uN("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){uN("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,r){return!0}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class Gq{constructor(){this.$implicit=null,this.ngIf=null}}function uN(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${T(t)}'.`)}let Dg=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(e.ngTemplateOutlet){const r=this._viewContainerRef;this._viewRef&&r.remove(r.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?r.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf))},n.\u0275dir=Tn({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[rr]}),n})(),lN=(()=>{class n{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dN}transform(e,r=dN){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const s=this.differ.diff(e),p=r!==this.compareFn;return s&&(this.keyValues=[],s.forEachItem(F=>{this.keyValues.push(function(n,t){return{key:n,value:t}}(F.key,F.currentValue))})),(s||p)&&(this.keyValues.sort(r),this.compareFn=r),this.keyValues}}return n.\u0275fac=function(e){return new(e||n)(Xt(P6,16))},n.\u0275pipe=Qn({name:"keyvalue",type:n,pure:!1}),n})();function dN(n,t){const e=n.key,r=t.key;if(e===r)return 0;if(void 0===e)return 1;if(void 0===r)return-1;if(null===e)return 1;if(null===r)return-1;if("string"==typeof e&&"string"==typeof r)return e{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:[{provide:C7,useClass:jq}]}),n})();const hN="browser";let mN=(()=>{class n{}return n.\u0275prov=we({token:n,providedIn:"root",factory:()=>new yK(Yn(qa),window)}),n})();class yK{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let s=r.currentNode;for(;s;){const p=s.shadowRoot;if(p){const F=p.getElementById(t)||p.querySelector(`[name="${t}"]`);if(F)return F}s=r.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),this.attemptFocus(e))}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),r=e.left+this.window.pageXOffset,s=e.top+this.window.pageYOffset,p=this.offset();this.window.scrollTo(r-p[0],s-p[1])}attemptFocus(t){return t.focus(),this.document.activeElement===t}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=gN(this.window.history)||gN(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function gN(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class NC extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){var n;n=new NC,b7||(b7=n)}onAndCancel(t,e,r){return t.addEventListener(e,r,!1),()=>{t.removeEventListener(e,r,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=(c_=c_||document.querySelector("base"),c_?c_.getAttribute("href"):null);return null==e?null:function(n){M7=M7||document.createElement("a"),M7.setAttribute("href",n);const t=M7.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){c_=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const r=e.indexOf("="),[s,p]=-1==r?[e,""]:[e.slice(0,r),e.slice(r+1)];if(s.trim()===t)return decodeURIComponent(p)}return null}(document.cookie,t)}}let M7,c_=null;const yN=new fo("TRANSITION_ID"),TK=[{provide:t_,useFactory:function(n,t,e){return()=>{e.get(t5).donePromise.then(()=>{const r=Ty(),s=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let p=0;p{const p=t.findTestabilityInTree(r,s);if(null==p)throw new Error("Could not find testability for element.");return p},Nt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Nt.getAllAngularRootElements=()=>t.getAllRootElements(),Nt.frameworkStabilizers||(Nt.frameworkStabilizers=[]),Nt.frameworkStabilizers.push(r=>{const s=Nt.getAllAngularTestabilities();let p=s.length,F=!1;const q=function(te){F=F||te,p--,0==p&&r(F)};s.forEach(function(te){te.whenStable(q)})})}findTestabilityInTree(t,e,r){return null==e?null:t.getTestability(e)??(r?Ty().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}}let AK=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const l_=new fo("EventManagerPlugins");let D7=(()=>{class n{constructor(e,r){this._zone=r,this._eventNameToPlugin=new Map,e.forEach(s=>s.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,r,s){return this._findPluginFor(r).addEventListener(e,r,s)}addGlobalEventListener(e,r,s){return this._findPluginFor(r).addGlobalEventListener(e,r,s)}getZone(){return this._zone}_findPluginFor(e){const r=this._eventNameToPlugin.get(e);if(r)return r;const s=this._plugins;for(let p=0;p{class n{constructor(){this._stylesSet=new Set}addStyles(e){const r=new Set;e.forEach(s=>{this._stylesSet.has(s)||(this._stylesSet.add(s),r.add(s))}),this.onStylesAdded(r)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),d_=(()=>{class n extends vN{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,r,s){e.forEach(p=>{const F=this._doc.createElement("style");F.textContent=p,s.push(r.appendChild(F))})}addHost(e){const r=[];this._addStylesToHost(this._stylesSet,e,r),this._hostNodes.set(e,r)}removeHost(e){const r=this._hostNodes.get(e);r&&r.forEach(_N),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((r,s)=>{this._addStylesToHost(e,s,r)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(_N))}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function _N(n){Ty().remove(n)}const LC={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},UC=/%COMP%/g;function P7(n,t,e){for(let r=0;r{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let R7=(()=>{class n{constructor(e,r,s){this.eventManager=e,this.sharedStylesHost=r,this.appId=s,this.rendererByCompId=new Map,this.defaultRenderer=new jC(e)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;switch(r.encapsulation){case Ye.Emulated:{let s=this.rendererByCompId.get(r.id);return s||(s=new jK(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,s)),s.applyToHost(e),s}case 1:case Ye.ShadowDom:return new VK(this.eventManager,this.sharedStylesHost,e,r);default:if(!this.rendererByCompId.has(r.id)){const s=P7(r.id,r.styles,[]);this.sharedStylesHost.addStyles(s),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(Yn(D7),Yn(d_),Yn(n_))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class jC{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(LC[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,r){t&&t.insertBefore(e,r)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let r="string"==typeof t?document.querySelector(t):t;if(!r)throw new Error(`The selector "${t}" did not match any elements`);return e||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,r,s){if(s){e=s+":"+e;const p=LC[s];p?t.setAttributeNS(p,e,r):t.setAttribute(e,r)}else t.setAttribute(e,r)}removeAttribute(t,e,r){if(r){const s=LC[r];s?t.removeAttributeNS(s,e):t.removeAttribute(`${r}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,r,s){s&(Bd.DashCase|Bd.Important)?t.style.setProperty(e,r,s&Bd.Important?"important":""):t.style[e]=r}removeStyle(t,e,r){r&Bd.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,r){t[e]=r}setValue(t,e){t.nodeValue=e}listen(t,e,r){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,EN(r)):this.eventManager.addEventListener(t,e,EN(r))}}class jK extends jC{constructor(t,e,r,s){super(t),this.component=r;const p=P7(s+"-"+r.id,r.styles,[]);e.addStyles(p),this.contentAttr="_ngcontent-%COMP%".replace(UC,s+"-"+r.id),this.hostAttr=function(n){return"_nghost-%COMP%".replace(UC,n)}(s+"-"+r.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const r=super.createElement(t,e);return super.setAttribute(r,this.contentAttr,""),r}}class VK extends jC{constructor(t,e,r,s){super(t),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const p=P7(s.id,s.styles,[]);for(let F=0;F{class n extends FC{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,s){return e.addEventListener(r,s,!1),()=>this.removeEventListener(e,r,s)}removeEventListener(e,r,s){return e.removeEventListener(r,s)}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const IN=["alt","control","meta","shift"],ZK={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},SN={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},YK={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let JK=(()=>{class n extends FC{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,r,s){const p=n.parseEventName(r),F=n.eventCallback(p.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ty().onAndCancel(e,p.domEventName,F))}static parseEventName(e){const r=e.toLowerCase().split("."),s=r.shift();if(0===r.length||"keydown"!==s&&"keyup"!==s)return null;const p=n._normalizeKey(r.pop());let F="";if(IN.forEach(te=>{const fe=r.indexOf(te);fe>-1&&(r.splice(fe,1),F+=te+".")}),F+=p,0!=r.length||0===p.length)return null;const q={};return q.domEventName=s,q.fullKey=F,q}static getEventFullKey(e){let r="",s=function(n){let t=n.key;if(null==t){if(t=n.keyIdentifier,null==t)return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===n.location&&SN.hasOwnProperty(t)&&(t=SN[t]))}return ZK[t]||t}(e);return s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),IN.forEach(p=>{p!=s&&YK[p](e)&&(r+=p+".")}),r+=s,r}static eventCallback(e,r,s){return p=>{n.getEventFullKey(p)===e&&s.runGuarded(()=>r(p))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),N7=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:function(){return Yn(HC)},token:n,providedIn:"root"}),n})(),HC=(()=>{class n extends N7{constructor(e){super(),this._doc=e}sanitize(e,r){if(null==r)return null;switch(e){case Ui.NONE:return r;case Ui.HTML:return Xn(r,"HTML")?Pn(r):ro(this._doc,String(r)).toString();case Ui.STYLE:return Xn(r,"Style")?Pn(r):r;case Ui.SCRIPT:if(Xn(r,"Script"))return Pn(r);throw new Error("unsafe value used in a script context");case Ui.URL:return or(r),Xn(r,"URL")?Pn(r):Kc(String(r));case Ui.RESOURCE_URL:if(Xn(r,"ResourceURL"))return Pn(r);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${e} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(e){return function(n){return new ut(n)}(e)}bypassSecurityTrustStyle(e){return function(n){return new At(n)}(e)}bypassSecurityTrustScript(e){return function(n){return new Zt(n)}(e)}bypassSecurityTrustUrl(e){return function(n){return new Jt(n)}(e)}bypassSecurityTrustResourceUrl(e){return function(n){return new on(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return function(n){return new HC(n.get(qa))}(Yn(a1))},token:n,providedIn:"root"}),n})();const rZ=[{provide:n5,useValue:hN},{provide:iR,useValue:function(){NC.makeCurrent(),BC.init()},multi:!0},{provide:qa,useFactory:function(){return n=document,nu=n,document;var n},deps:[]}],sZ=pR(YG,"browser",rZ),oZ=[[],{provide:Sh,useValue:"root"},{provide:Jo,useFactory:function(){return new Jo},deps:[]},{provide:l_,useClass:HK,multi:!0,deps:[qa,pa,n5]},{provide:l_,useClass:JK,multi:!0,deps:[qa]},[],{provide:R7,useClass:R7,deps:[D7,d_,n_]},{provide:Ig,useExisting:R7},{provide:vN,useExisting:d_},{provide:d_,useClass:d_,deps:[qa]},{provide:tC,useClass:tC,deps:[pa]},{provide:D7,useClass:D7,deps:[l_,pa]},{provide:class{},useClass:AK,deps:[]},[]];let $C=(()=>{class n{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:n,providers:[{provide:n_,useValue:e.appId},{provide:yN,useExisting:n_},TK]}}}return n.\u0275fac=function(e){return new(e||n)(Yn(n,12))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:oZ,imports:[h1,rz]}),n})();"undefined"!=typeof window&&window;class pZ{constructor(t,e){this._document=e;const r=this._textarea=this._document.createElement("textarea"),s=r.style;s.position="fixed",s.top=s.opacity="0",s.left="-999em",r.setAttribute("aria-hidden","true"),r.value=t,this._document.body.appendChild(r)}copy(){const t=this._textarea;let e=!1;try{if(t){const r=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),e=this._document.execCommand("copy"),r&&r.focus()}}catch{}return e}destroy(){const t=this._textarea;t&&(t.parentNode&&t.parentNode.removeChild(t),this._textarea=void 0)}}let mZ=(()=>{class n{constructor(e){this._document=e}copy(e){const r=this.beginCopy(e),s=r.copy();return r.destroy(),s}beginCopy(e){return new pZ(e,this._document)}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(qa))},token:n,providedIn:"root"}),n})();const gZ=new fo("CDK_COPY_TO_CLIPBOARD_CONFIG");let CN=(()=>{class n{constructor(e,r,s){this._clipboard=e,this._ngZone=r,this.text="",this.attempts=1,this.copied=new mo,this._pending=new Set,s&&null!=s.attempts&&(this.attempts=s.attempts)}copy(e=this.attempts){if(e>1){let r=e;const s=this._clipboard.beginCopy(this.text);this._pending.add(s);const p=()=>{const F=s.copy();F||!--r||this._destroyed?(this._currentTimeout=null,this._pending.delete(s),s.destroy(),this.copied.emit(F)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(p,1))};p()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(e=>e.destroy()),this._pending.clear(),this._destroyed=!0}}return n.\u0275fac=function(e){return new(e||n)(Xt(mZ),Xt(pa),Xt(gZ,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(e,r){1&e&&dr("click",function(){return r.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),n})(),yZ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();var o5=Y(59193),yu=Y(25917),cp=Y(22759),MN=Y(46797),ON=Y(98085),xd=Y(26215),GC=Y(9112),B7=(Y(17757),Y(21571)),vZ=Y(86804),ed=Y(46782),lp=Y(45435),p1=Y(15257),ll=Y(88002),a5=Y(39761),f_=Y(87519),Rg=Y(43190),Vp=Y(68307),zC=Y(57057),DN=Y(65792),z1=Y(19773),PN=Y(13653),Tm=Y(69412);Y(35758);let mB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),RB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[mB]]}),n})(),fY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[RB]}),n})();const c5=["*"],eJ=["dialog"],tJ=["ngbNavOutlet",""];function nJ(n,t){}const rJ=function(n){return{$implicit:n}};function iJ(n,t){if(1&n&&(Ae(0,"div",2),it(1,nJ,0,0,"ng-template",3),Ie()),2&n){const e=an().$implicit,r=an();Mt("item",e)("nav",r.nav)("role",r.paneRole),dt(1),Mt("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",Ic(5,rJ,e.active||r.isPanelTransitioning(e)))}}function sJ(n,t){if(1&n&&it(0,iJ,2,7,"div",1),2&n){const e=t.$implicit,r=an();Mt("ngIf",e.isPanelInDom()||r.isPanelTransitioning(e))}}function G6(n){return null!=n}function d5(n){return(n||document.body).getBoundingClientRect()}"undefined"!=typeof Element&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(n){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(n))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});const FB={animation:!0,transitionTimerDelayMs:5};let dp=(()=>{class n{constructor(){this.animation=FB.animation}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:function(){return new n},token:n,providedIn:"root"}),n})();const fX=()=>{},{transitionTimerDelayMs:hX}=FB,b_=new Map,Ph=(n,t,e,r)=>{let s=r.context||{};const p=b_.get(t);if(p)switch(r.runningTransition){case"continue":return o5.E;case"stop":n.run(()=>p.transition$.complete()),s=Object.assign(p.context,s),b_.delete(t)}const F=e(t,r.animation,s)||fX;if(!r.animation||"none"===window.getComputedStyle(t).transitionProperty)return n.run(()=>F()),(0,yu.of)(void 0).pipe(function(n){return t=>new O.y(e=>t.subscribe(F=>n.run(()=>e.next(F)),F=>n.run(()=>e.error(F)),()=>n.run(()=>e.complete())))}(n));const q=new ie.xQ,te=new ie.xQ,fe=q.pipe((0,vZ.l)(!0));b_.set(t,{transition$:q,complete:()=>{te.next(),te.complete()},context:s});const Re=function(n){const{transitionDelay:t,transitionDuration:e}=window.getComputedStyle(n);return 1e3*(parseFloat(t)+parseFloat(e))}(t);return n.runOutsideAngular(()=>{const $e=(0,cp.R)(t,"transitionend").pipe((0,ed.R)(fe),(0,lp.h)(({target:ft})=>ft===t)),rt=(0,MN.H)(Re+hX).pipe((0,ed.R)(fe));(0,ON.S3)(rt,$e,te).pipe((0,ed.R)(fe)).subscribe(()=>{b_.delete(t),n.run(()=>{F(),q.next(),q.complete()})})}),q.asObservable()};let HB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),$B=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),GB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),KB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),ZB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();var Dc=(()=>{return(n=Dc||(Dc={}))[n.Tab=9]="Tab",n[n.Enter=13]="Enter",n[n.Escape=27]="Escape",n[n.Space=32]="Space",n[n.PageUp=33]="PageUp",n[n.PageDown=34]="PageDown",n[n.End=35]="End",n[n.Home=36]="Home",n[n.ArrowLeft=37]="ArrowLeft",n[n.ArrowUp=38]="ArrowUp",n[n.ArrowRight=39]="ArrowRight",n[n.ArrowDown=40]="ArrowDown",Dc;var n})();const X7=(n,t)=>!!t&&t.some(e=>e.contains(n)),QB=(n,t)=>!t||null!=function(n,t){return t&&void 0!==n.closest?n.closest(t):null}(n,t),qX="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const eF=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function tF(n){const t=Array.from(n.querySelectorAll(eF)).filter(e=>-1!==e.tabIndex);return[t[0],t[t.length-1]]}const YX=/\s+/,rF=new class{getAllStyles(t){return window.getComputedStyle(t)}getStyle(t,e){return this.getAllStyles(t)[e]}isStaticPositioned(t){return"static"===(this.getStyle(t,"position")||"static")}offsetParent(t){let e=t.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(t,e=!0){let r,s={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(t,"position"))r=t.getBoundingClientRect(),r={top:r.top,bottom:r.bottom,left:r.left,right:r.right,height:r.height,width:r.width};else{const p=this.offsetParent(t);r=this.offset(t,!1),p!==document.documentElement&&(s=this.offset(p,!1)),s.top+=p.clientTop,s.left+=p.clientLeft}return r.top-=s.top,r.bottom-=s.top,r.left-=s.left,r.right-=s.left,e&&(r.top=Math.round(r.top),r.bottom=Math.round(r.bottom),r.left=Math.round(r.left),r.right=Math.round(r.right)),r}offset(t,e=!0){const r=t.getBoundingClientRect(),s_top=window.pageYOffset-document.documentElement.clientTop,s_left=window.pageXOffset-document.documentElement.clientLeft;let p={height:r.height||t.offsetHeight,width:r.width||t.offsetWidth,top:r.top+s_top,bottom:r.bottom+s_top,left:r.left+s_left,right:r.right+s_left};return e&&(p.height=Math.round(p.height),p.width=Math.round(p.width),p.top=Math.round(p.top),p.bottom=Math.round(p.bottom),p.left=Math.round(p.left),p.right=Math.round(p.right)),p}positionElements(t,e,r,s){const[p="top",F="center"]=r.split("-"),q=s?this.offset(t,!1):this.position(t,!1),te=this.getAllStyles(e),fe=parseFloat(te.marginTop),Re=parseFloat(te.marginBottom),$e=parseFloat(te.marginLeft),rt=parseFloat(te.marginRight);let ft=0,Tt=0;switch(p){case"top":ft=q.top-(e.offsetHeight+fe+Re);break;case"bottom":ft=q.top+q.height;break;case"left":Tt=q.left-(e.offsetWidth+$e+rt);break;case"right":Tt=q.left+q.width}switch(F){case"top":ft=q.top;break;case"bottom":ft=q.top+q.height-e.offsetHeight;break;case"left":Tt=q.left;break;case"right":Tt=q.left+q.width-e.offsetWidth;break;case"center":"top"===p||"bottom"===p?Tt=q.left+q.width/2-e.offsetWidth/2:ft=q.top+q.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(Tt)}px, ${Math.round(ft)}px)`;const Ft=e.getBoundingClientRect(),Qt=document.documentElement,wn=window.innerHeight||Qt.clientHeight,An=window.innerWidth||Qt.clientWidth;return Ft.left>=0&&Ft.top>=0&&Ft.right<=An&&Ft.bottom<=wn}};new Date(1882,10,12),new Date(2174,10,25);let dF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1,fY]]}),n})(),SM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Tn({type:n,selectors:[["",8,"navbar"]]}),n})(),pF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),mF=(()=>{class n{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(dp))},n.\u0275prov=we({factory:function(){return new n(Yn(dp))},token:n,providedIn:"root"}),n})();class B3{constructor(t,e,r){this.nodes=t,this.viewRef=e,this.componentRef=r}}class kM{constructor(t,e,r,s,p,F,q){this._type=t,this._injector=e,this._viewContainerRef=r,this._renderer=s,this._ngZone=p,this._componentFactoryResolver=F,this._applicationRef=q,this._windowRef=null,this._contentRef=null}open(t,e,r=!1){this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes));const{nativeElement:s}=this._windowRef.location,p=this._ngZone.onStable.pipe((0,p1.q)(1),(0,z1.zg)(()=>Ph(this._ngZone,s,({classList:F})=>F.add("show"),{animation:r,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:p}}close(t=!1){return this._windowRef?Ph(this._ngZone,this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:t,runningTransition:"stop"}).pipe((0,Vp.b)(()=>{var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),(null===(e=this._contentRef)||void 0===e?void 0:e.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):(0,yu.of)(void 0)}_getContentRef(t,e){if(t){if(t instanceof Ac){const r=t.createEmbeddedView(e);return this._applicationRef.attachView(r),new B3([r.rootNodes],r)}return new B3([[this._renderer.createText(`${t}`)]])}return new B3([])}}const lQ=()=>{};let gF=(()=>{class n{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):lQ}_adjustBody(e){const r=this._document.body,s=r.style.paddingRight,p=parseFloat(window.getComputedStyle(r)["padding-right"]);return r.style["padding-right"]=`${p+e}px`,()=>r.style["padding-right"]=s}_isPresent(e){const r=this._document.body.getBoundingClientRect();return window.innerWidth-(r.left+r.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const r=this._document.body;r.appendChild(e);const s=e.getBoundingClientRect().width-e.clientWidth;return r.removeChild(e),s}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(qa))},token:n,providedIn:"root"}),n})(),dQ=(()=>{class n{constructor(e,r){this._el=e,this._zone=r}ngOnInit(){this._zone.onStable.asObservable().pipe((0,p1.q)(1)).subscribe(()=>{Ph(this._zone,this._el.nativeElement,(e,r)=>{r&&d5(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Ph(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return n.\u0275fac=function(e){return new(e||n)(Xt(wa),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,r){2&e&&(Ss("modal-backdrop"+(r.backdropClass?" "+r.backdropClass:"")),ks("show",!r.animation)("fade",r.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,r){},encapsulation:2}),n})();class Ob{close(t){}dismiss(t){}}class fQ{constructor(t,e,r,s){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=r,this._beforeDismiss=s,this._closed=new ie.xQ,this._dismissed=new ie.xQ,this._hidden=new ie.xQ,t.instance.dismissEvent.subscribe(p=>{this.dismiss(p)}),this.result=new Promise((p,F)=>{this._resolve=p,this._reject=F}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,ed.R)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,ed.R)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(r=>{!1!==r&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,yu.of)(void 0);t.subscribe(()=>{const{nativeElement:r}=this._windowCmptRef.location;r.parentNode.removeChild(r),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:r}=this._backdropCmptRef.location;r.parentNode.removeChild(r),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,B7.$R)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var T_=(()=>{return(n=T_||(T_={}))[n.BACKDROP_CLICK=0]="BACKDROP_CLICK",n[n.ESC=1]="ESC",T_;var n})();let hQ=(()=>{class n{constructor(e,r,s){this._document=e,this._elRef=r,this._zone=s,this._closed$=new ie.xQ,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new mo,this.shown=new ie.xQ,this.hidden=new ie.xQ}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,p1.q)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,r={animation:this.animation,runningTransition:"stop"},s=Ph(this._zone,e,()=>e.classList.remove("show"),r),p=Ph(this._zone,this._dialogEl.nativeElement,()=>{},r),F=(0,B7.$R)(s,p);return F.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),F}_show(){const e={animation:this.animation,runningTransition:"continue"},r=Ph(this._zone,this._elRef.nativeElement,(p,F)=>{F&&d5(p),p.classList.add("show")},e),s=Ph(this._zone,this._dialogEl.nativeElement,()=>{},e);(0,B7.$R)(r,s).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{(0,cp.R)(e,"keydown").pipe((0,ed.R)(this._closed$),(0,lp.h)(s=>s.which===Dc.Escape)).subscribe(s=>{this.keyboard?requestAnimationFrame(()=>{s.defaultPrevented||this._zone.run(()=>this.dismiss(T_.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let r=!1;(0,cp.R)(this._dialogEl.nativeElement,"mousedown").pipe((0,ed.R)(this._closed$),(0,Vp.b)(()=>r=!1),(0,Rg.w)(()=>(0,cp.R)(e,"mouseup").pipe((0,ed.R)(this._closed$),(0,p1.q)(1))),(0,lp.h)(({target:s})=>e===s)).subscribe(()=>{r=!0}),(0,cp.R)(e,"click").pipe((0,ed.R)(this._closed$)).subscribe(({target:s})=>{e===s&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!r&&this._zone.run(()=>this.dismiss(T_.BACKDROP_CLICK))),r=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const r=e.querySelector("[ngbAutofocus]"),s=tF(e)[0];(r||s||e).focus()}}_restoreFocus(){const e=this._document.body,r=this._elWithFocus;let s;s=r&&r.focus&&e.contains(r)?r:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>s.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Ph(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return n.\u0275fac=function(e){return new(e||n)(Xt(qa),Xt(wa),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["ngb-modal-window"]],viewQuery:function(e,r){if(1&e&&Ro(eJ,7),2&e){let s;gs(s=ho())&&(r._dialogEl=s.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,r){2&e&&(Cu("aria-modal",!0)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy),Ss("modal d-block"+(r.windowClass?" "+r.windowClass:"")),ks("fade",r.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:c5,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,r){1&e&&(Pp(),Ae(0,"div",0,1),Ae(2,"div",2),ih(3),Ie(),Ie()),2&e&&Ss("modal-dialog"+(r.size?" modal-"+r.size:"")+(r.centered?" modal-dialog-centered":"")+(r.scrollable?" modal-dialog-scrollable":"")+(r.modalDialogClass?" "+r.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),n})(),yF=(()=>{class n{constructor(e,r,s,p,F,q){this._applicationRef=e,this._injector=r,this._document=s,this._scrollBar=p,this._rendererFactory=F,this._ngZone=q,this._activeWindowCmptHasChanged=new ie.xQ,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass","modalDialogClass"],this._windowCmpts=[],this._activeInstances=new mo,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const te=this._windowCmpts[this._windowCmpts.length-1];((n,t,e,r=!1)=>{n.runOutsideAngular(()=>{const s=(0,cp.R)(t,"focusin").pipe((0,ed.R)(e),(0,ll.U)(p=>p.target));(0,cp.R)(t,"keydown").pipe((0,ed.R)(e),(0,lp.h)(p=>p.which===Dc.Tab),(0,zC.M)(s)).subscribe(([p,F])=>{const[q,te]=tF(t);(F===q||F===t)&&p.shiftKey&&(te.focus(),p.preventDefault()),F===te&&!p.shiftKey&&(q.focus(),p.preventDefault())}),r&&(0,cp.R)(t,"click").pipe((0,ed.R)(e),(0,zC.M)(s),(0,ll.U)(p=>p[1])).subscribe(p=>p.focus())})})(this._ngZone,te.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(te.location.nativeElement)}})}open(e,r,s,p){const F=p.container instanceof HTMLElement?p.container:G6(p.container)?this._document.querySelector(p.container):this._document.body,q=this._rendererFactory.createRenderer(null,null),te=this._scrollBar.compensate(),fe=()=>{this._modalRefs.length||(q.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!F)throw new Error(`The specified modal container "${p.container||"body"}" was not found in the DOM.`);const Re=new Ob,$e=this._getContentRef(e,p.injector||r,s,Re,p);let rt=!1!==p.backdrop?this._attachBackdrop(e,F):void 0,ft=this._attachWindowComponent(e,F,$e),Tt=new fQ(ft,$e,rt,p.beforeDismiss);return this._registerModalRef(Tt),this._registerWindowCmpt(ft),Tt.result.then(te,te),Tt.result.then(fe,fe),Re.close=Ft=>{Tt.close(Ft)},Re.dismiss=Ft=>{Tt.dismiss(Ft)},this._applyWindowOptions(ft.instance,p),1===this._modalRefs.length&&q.addClass(this._document.body,"modal-open"),rt&&rt.instance&&(this._applyBackdropOptions(rt.instance,p),rt.changeDetectorRef.detectChanges()),ft.changeDetectorRef.detectChanges(),Tt}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(r=>r.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,r){let p=e.resolveComponentFactory(dQ).create(this._injector);return this._applicationRef.attachView(p.hostView),r.appendChild(p.location.nativeElement),p}_attachWindowComponent(e,r,s){let F=e.resolveComponentFactory(hQ).create(this._injector,s.nodes);return this._applicationRef.attachView(F.hostView),r.appendChild(F.location.nativeElement),F}_applyWindowOptions(e,r){this._windowAttributes.forEach(s=>{G6(r[s])&&(e[s]=r[s])})}_applyBackdropOptions(e,r){this._backdropAttributes.forEach(s=>{G6(r[s])&&(e[s]=r[s])})}_getContentRef(e,r,s,p,F){return s?s instanceof Ac?this._createFromTemplateRef(s,p):function(n){return"string"==typeof n}(s)?this._createFromString(s):this._createFromComponent(e,r,s,p,F):new B3([])}_createFromTemplateRef(e,r){const p=e.createEmbeddedView({$implicit:r,close(F){r.close(F)},dismiss(F){r.dismiss(F)}});return this._applicationRef.attachView(p),new B3([p.rootNodes],p)}_createFromString(e){const r=this._document.createTextNode(`${e}`);return new B3([[r]])}_createFromComponent(e,r,s,p,F){const q=e.resolveComponentFactory(s),te=sc.create({providers:[{provide:Ob,useValue:p}],parent:r}),fe=q.create(te),Re=fe.location.nativeElement;return F.scrollable&&Re.classList.add("component-host-scrollable"),this._applicationRef.attachView(fe.hostView),new B3([[Re]],fe.hostView,fe)}_setAriaHidden(e){const r=e.parentElement;r&&e!==this._document.body&&(Array.from(r.children).forEach(s=>{s!==e&&"SCRIPT"!==s.nodeName&&(this._ariaHiddenValues.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}),this._setAriaHidden(r))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,r)=>{e?r.setAttribute("aria-hidden",e):r.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const r=()=>{const s=this._modalRefs.indexOf(e);s>-1&&(this._modalRefs.splice(s,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(r,r)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const r=this._windowCmpts.indexOf(e);r>-1&&(this._windowCmpts.splice(r,1),this._activeWindowCmptHasChanged.next())})}}return n.\u0275fac=function(e){return new(e||n)(Yn(e2),Yn(sc),Yn(qa),Yn(gF),Yn(Ig),Yn(pa))},n.\u0275prov=we({factory:function(){return new n(Yn(e2),Yn(a1),Yn(qa),Yn(gF),Yn(Ig),Yn(pa))},token:n,providedIn:"root"}),n})(),Nf=(()=>{class n{constructor(e,r,s,p){this._moduleCFR=e,this._injector=r,this._modalStack=s,this._config=p}open(e,r={}){const s=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),r);return this._modalStack.open(this._moduleCFR,this._injector,e,s)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return n.\u0275fac=function(e){return new(e||n)(Yn(l1),Yn(sc),Yn(yF),Yn(mF))},n.\u0275prov=we({factory:function(){return new n(Yn(l1),Yn(a1),Yn(yF),Yn(mF))},token:n,providedIn:"root"}),n})(),bF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:[Nf]}),n})(),pQ=(()=>{class n{constructor(e){this._ngbConfig=e,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(dp))},n.\u0275prov=we({factory:function(){return new n(Yn(dp))},token:n,providedIn:"root"}),n})();const vF=n=>G6(n)&&""!==n;let mQ=0,iE=(()=>{class n{constructor(e){this.templateRef=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["ng-template","ngbNavContent",""]]}),n})(),A_=(()=>{class n{constructor(e,r){this.elementRef=r,this.disabled=!1,this.shown=new mo,this.hidden=new mo,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){G6(this.domId)||(this.domId="ngb-nav-"+mQ++)}get active(){return this._nav.activeId===this.id}get id(){return vF(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(G6(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return n.\u0275fac=function(e){return new(e||n)(Xt(l(()=>I_)),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","ngbNavItem",""]],contentQueries:function(e,r,s){if(1&e&&wo(s,iE,4),2&e){let p;gs(p=ho())&&(r.contentTpls=p)}},hostVars:2,hostBindings:function(e,r){2&e&&ks("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]}),n})(),I_=(()=>{class n{constructor(e,r,s,p){this.role=e,this._cd=s,this._document=p,this.activeIdChange=new mo,this.shown=new mo,this.hidden=new mo,this.destroy$=new ie.xQ,this.navItemChange$=new ie.xQ,this.navChange=new mo,this.animation=r.animation,this.destroyOnHide=r.destroyOnHide,this.orientation=r.orientation,this.roles=r.roles,this.keyboard=r.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const r=e.which,s=this.links.filter(q=>!q.navItem.disabled),{length:p}=s;let F=-1;if(s.forEach((q,te)=>{q.elRef.nativeElement===this._document.activeElement&&(F=te)}),p){switch(r){case Dc.ArrowLeft:if("vertical"===this.orientation)return;F=(F-1+p)%p;break;case Dc.ArrowRight:if("vertical"===this.orientation)return;F=(F+1)%p;break;case Dc.ArrowDown:if("horizontal"===this.orientation)return;F=(F+1)%p;break;case Dc.ArrowUp:if("horizontal"===this.orientation)return;F=(F-1+p)%p;break;case Dc.Home:F=0;break;case Dc.End:F=p-1}"changeWithArrows"===this.keyboard&&this.select(s[F].navItem.id),s[F].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!G6(this.activeId)){const e=this.items.first?this.items.first.id:null;vF(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe((0,ed.R)(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,r=!0){if(this.activeId!==e){let s=!1;r&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{s=!0}}),s||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(r=>r.id===e)||null}}return n.\u0275fac=function(e){return new(e||n)(Sd("role"),Xt(pQ),Xt(yf),Xt(qa))},n.\u0275dir=Tn({type:n,selectors:[["","ngbNav",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,A_,4),wo(s,sE,5)),2&e){let p;gs(p=ho())&&(r.items=p),gs(p=ho())&&(r.links=p)}},hostVars:6,hostBindings:function(e,r){1&e&&dr("keydown.arrowLeft",function(p){return r.onKeyDown(p)})("keydown.arrowRight",function(p){return r.onKeyDown(p)})("keydown.arrowDown",function(p){return r.onKeyDown(p)})("keydown.arrowUp",function(p){return r.onKeyDown(p)})("keydown.Home",function(p){return r.onKeyDown(p)})("keydown.End",function(p){return r.onKeyDown(p)}),2&e&&(Cu("aria-orientation","vertical"===r.orientation&&"tablist"===r.roles?"vertical":void 0)("role",r.role?r.role:r.roles?"tablist":void 0),ks("nav",!0)("flex-column","vertical"===r.orientation))},inputs:{animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[rr]}),n})(),sE=(()=>{class n{constructor(e,r,s,p){this.role=e,this.navItem=r,this.nav=s,this.elRef=p}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(Sd("role"),Xt(A_),Xt(I_),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,r){1&e&&dr("click",function(p){return r.nav.click(r.navItem),p.preventDefault()}),2&e&&(ip("id",r.navItem.domId),Cu("role",r.role?r.role:r.nav.roles?"tab":void 0)("tabindex",r.navItem.disabled?-1:void 0)("aria-controls",r.navItem.isPanelInDom()?r.navItem.panelDomId:null)("aria-selected",r.navItem.active)("aria-disabled",r.navItem.disabled),ks("nav-link",!0)("nav-item",r.hasNavItemClass())("active",r.navItem.active)("disabled",r.navItem.disabled))}}),n})();const gQ=({classList:n})=>(n.remove("show"),()=>n.remove("active")),yQ=(n,t)=>{t&&d5(n),n.classList.add("show")};let CM=(()=>{class n{constructor(e){this.elRef=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(e,r){2&e&&(ip("id",r.item.panelDomId),Cu("role",r.role?r.role:r.nav.roles?"tabpanel":void 0)("aria-labelledby",r.item.domId),ks("fade",r.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"}}),n})(),MM=(()=>{class n{constructor(e,r){this._cd=e,this._ngZone=r,this._activePane=null}isPanelTransitioning(e){var r;return(null===(r=this._activePane)||void 0===r?void 0:r.item)===e}ngAfterViewInit(){var e;this._updateActivePane(),this.nav.navItemChange$.pipe((0,ed.R)(this.nav.destroy$),(0,a5.O)((null===(e=this._activePane)||void 0===e?void 0:e.item)||null),(0,f_.x)(),(0,PN.T)(1)).subscribe(r=>{const s={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Ph(this._ngZone,this._activePane.elRef.nativeElement,gQ,s).subscribe(()=>{var p;const F=null===(p=this._activePane)||void 0===p?void 0:p.item;this._activePane=this._getPaneForItem(r),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),Ph(this._ngZone,this._activePane.elRef.nativeElement,yQ,s).subscribe(()=>{r&&(r.shown.emit(),this.nav.shown.emit(r.id))})),F&&(F.hidden.emit(),this.nav.hidden.emit(F.id))}):this._updateActivePane()})}_updateActivePane(){var e,r;this._activePane=this._getActivePane(),null===(e=this._activePane)||void 0===e||e.elRef.nativeElement.classList.add("show"),null===(r=this._activePane)||void 0===r||r.elRef.nativeElement.classList.add("active")}_getPaneForItem(e){return this._panes&&this._panes.find(r=>r.item===e)||null}_getActivePane(){return this._panes&&this._panes.find(e=>e.item.active)||null}}return n.\u0275fac=function(e){return new(e||n)(Xt(yf),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["","ngbNavOutlet",""]],viewQuery:function(e,r){if(1&e&&Ro(CM,5),2&e){let s;gs(s=ho())&&(r._panes=s)}},hostVars:2,hostBindings:function(e,r){2&e&&ks("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},attrs:tJ,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["ngbNavPane","",3,"item","nav","role",4,"ngIf"],["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,r){1&e&&it(0,sJ,1,1,"ng-template",0),2&e&&Mt("ngForOf",r.nav.items)},directives:[L0,La,CM,Dg],encapsulation:2,changeDetection:0}),n})(),_F=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),kF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})();class _Q{constructor(t,e){this.open=t,this.close=e,e||(this.close=t)}isManual(){return"manual"===this.open||"manual"===this.close}}const wQ={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},CF=n=>n>0?(0,DN.g)(n):t=>t;let OF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),DF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),PF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),FF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),LF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),jQ=(()=>{class n{constructor(e){this._ngbConfig=e,this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(dp))},n.\u0275prov=we({factory:function(){return new n(Yn(dp))},token:n,providedIn:"root"}),n})(),VQ=0,HQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,r){2&e&&(ip("id",r.id),Ss("tooltip"+(r.tooltipClass?" "+r.tooltipClass:"")),ks("fade",r.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:c5,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,r){1&e&&(Pp(),qn(0,"div",0),Ae(1,"div",1),ih(2),Ie())},styles:["ngb-tooltip-window{pointer-events:none}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{top:auto;bottom:.4rem}"],encapsulation:2,changeDetection:0}),n})(),OM=(()=>{class n{constructor(e,r,s,p,F,q,te,fe,Re,$e){this._elementRef=e,this._renderer=r,this._ngZone=te,this._document=fe,this._changeDetector=Re,this.shown=new mo,this.hidden=new mo,this._ngbTooltipWindowId="ngb-tooltip-"+VQ++,this._windowRef=null,this.animation=q.animation,this.autoClose=q.autoClose,this.placement=q.placement,this.triggers=q.triggers,this.container=q.container,this.disableTooltip=q.disableTooltip,this.tooltipClass=q.tooltipClass,this.openDelay=q.openDelay,this.closeDelay=q.closeDelay,this._popupService=new kM(HQ,s,F,r,this._ngZone,p,$e),this._zoneSubscription=te.onStable.subscribe(()=>{this._windowRef&&function(n,t,e,r,s){let p=Array.isArray(e)?e:e.split(YX);const F=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],q=t.classList,te=ft=>{const[Tt,Ft]=ft.split("-"),Qt=[];return s&&(Qt.push(`${s}-${Tt}`),Ft&&Qt.push(`${s}-${Tt}-${Ft}`),Qt.forEach(wn=>{q.add(wn)})),Qt};s&&F.forEach(ft=>{q.remove(`${s}-${ft}`)});let fe=p.findIndex(ft=>"auto"===ft);fe>=0&&F.forEach(function(ft){null==p.find(Tt=>-1!==Tt.search("^"+ft))&&p.splice(fe++,1,ft)});const Re=t.style;Re.position="absolute",Re.top="0",Re.left="0",Re["will-change"]="transform";let $e=null,rt=!1;for($e of p){let ft=te($e);if(rF.positionElements(n,t,$e,r)){rt=!0;break}s&&ft.forEach(Tt=>{q.remove(Tt)})}rt||($e=p[0],te($e),rF.positionElements(n,t,$e,r))}(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:r,transition$:s}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=r,this._windowRef.instance.animation=this.animation,this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),function(n,t,e,r,s,p,F,q){e&&n.runOutsideAngular((n=>qX?()=>setTimeout(()=>n(),100):n)(()=>{const fe=(0,cp.R)(t,"keydown").pipe((0,ed.R)(s),(0,lp.h)(rt=>rt.which===Dc.Escape),(0,Vp.b)(rt=>rt.preventDefault())),Re=(0,cp.R)(t,"mousedown").pipe((0,ll.U)(rt=>{const ft=rt.target;return 2!==rt.button&&!X7(ft,F)&&("inside"===e?X7(ft,p)&&QB(ft,q):"outside"===e?!X7(ft,p):QB(ft,q)||!X7(ft,p))}),(0,ed.R)(s)),$e=(0,cp.R)(t,"mouseup").pipe((0,zC.M)(Re),(0,lp.h)(([rt,ft])=>ft),(0,DN.g)(0),(0,ed.R)(s));(0,ON.S3)([fe.pipe((0,ll.U)(rt=>0)),$e.pipe((0,ll.U)(rt=>1))]).subscribe(rt=>n.run(()=>r(rt)))}))}(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),s.subscribe(()=>this.shown.emit())}}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(this.animation).subscribe(()=>{this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function(n,t,e,r,s,p,F=0,q=0){const te=function(n,t=wQ){const e=(n||"").trim();if(0===e.length)return[];const r=e.split(/\s+/).map(p=>p.split(":")).map(p=>{let F=t[p[0]]||p;return new _Q(F[0],F[1])}),s=r.filter(p=>p.isManual());if(s.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===s.length&&r.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return r}(e);if(1===te.length&&te[0].isManual())return()=>{};const fe=function(n,t,e,r){return new O.y(s=>{const p=[],F=()=>s.next(!0),q=()=>s.next(!1),te=()=>s.next(!r());return e.forEach(fe=>{fe.open===fe.close?p.push(n.listen(t,fe.open,te)):p.push(n.listen(t,fe.open,F),n.listen(t,fe.close,q))}),()=>{p.forEach(fe=>fe())}})}(n,t,te,r).pipe(function(n,t,e){return r=>{let s=null;const p=r.pipe((0,ll.U)(te=>({open:te})),(0,lp.h)(te=>{const fe=e();return fe===te.open||s&&s.open!==fe?(s&&s.open!==te.open&&(s=null),!1):(s=te,!0)}),(0,d.B)()),F=p.pipe((0,lp.h)(te=>te.open),CF(n)),q=p.pipe((0,lp.h)(te=>!te.open),CF(t));return(0,E.T)(F,q).pipe((0,lp.h)(te=>te===s&&(s=null,te.open!==e())),(0,ll.U)(te=>te.open))}}(F,q,r)).subscribe(Re=>Re?s():p());return()=>fe.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(Xt(wa),Xt(sh),Xt(sc),Xt(l1),Xt(Zf),Xt(jQ),Xt(pa),Xt(qa),Xt(yf),Xt(e2))},n.\u0275dir=Tn({type:n,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[rr]}),n})(),UF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();new fo("live announcer delay",{providedIn:"root",factory:function(){return 100}});let HF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})();const ZQ=[HB,$B,GB,KB,ZB,dF,pF,bF,_F,kF,OF,DF,PF,FF,LF,UF,HF];let YQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[ZQ,HB,$B,GB,KB,ZB,dF,pF,bF,_F,kF,OF,DF,PF,FF,LF,UF,HF]}),n})();class $F{}const Db="*";function F3(n,t){return{type:7,name:n,definitions:t,options:{}}}function Bg(n,t=null){return{type:4,styles:t,timings:n}}function WF(n,t=null){return{type:2,steps:n,options:t}}function vf(n){return{type:6,styles:n,offset:null}}function K1(n,t,e){return{type:0,name:n,styles:t,options:e}}function oE(n){return{type:5,steps:n}}function V2(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function XQ(n=null){return{type:9,options:n}}function QQ(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function GF(n){Promise.resolve(null).then(n)}class m5{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){GF(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}}class zF{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,r=0,s=0;const p=this.players.length;0==p?GF(()=>this._onFinish()):this.players.forEach(F=>{F.onDone(()=>{++e==p&&this._onFinish()}),F.onDestroy(()=>{++r==p&&this._onDestroy()}),F.onStart(()=>{++s==p&&this._onStart()})}),this.totalTime=this.players.reduce((F,q)=>Math.max(F,q.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(r=>{const s=r.totalTime?Math.min(1,e/r.totalTime):1;r.setPosition(s)})}getPosition(){const t=this.players.reduce((e,r)=>null===e||r.totalTime>e.totalTime?r:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}}function qF(){return"undefined"!=typeof window&&void 0!==window.document}function PM(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function q6(n){switch(n.length){case 0:return new m5;case 1:return n[0];default:return new zF(n)}}function KF(n,t,e,r,s={},p={}){const F=[],q=[];let te=-1,fe=null;if(r.forEach(Re=>{const $e=Re.offset,rt=$e==te,ft=rt&&fe||{};Object.keys(Re).forEach(Tt=>{let Ft=Tt,Qt=Re[Tt];if("offset"!==Tt)switch(Ft=t.normalizePropertyName(Ft,F),Qt){case"!":Qt=s[Tt];break;case Db:Qt=p[Tt];break;default:Qt=t.normalizeStyleValue(Tt,Ft,Qt,F)}ft[Ft]=Qt}),rt||q.push(ft),fe=ft,te=$e}),F.length){const Re="\n - ";throw new Error(`Unable to animate due to the following errors:${Re}${F.join(Re)}`)}return q}function RM(n,t,e,r){switch(t){case"start":n.onStart(()=>r(e&&NM(e,"start",n)));break;case"done":n.onDone(()=>r(e&&NM(e,"done",n)));break;case"destroy":n.onDestroy(()=>r(e&&NM(e,"destroy",n)))}}function NM(n,t,e){const p=BM(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),F=n._data;return null!=F&&(p._data=F),p}function BM(n,t,e,r,s="",p=0,F){return{element:n,triggerName:t,fromState:e,toState:r,phaseName:s,totalTime:p,disabled:!!F}}function t2(n,t,e){let r;return n instanceof Map?(r=n.get(t),r||n.set(t,r=e)):(r=n[t],r||(r=n[t]=e)),r}function ZF(n){const t=n.indexOf(":");return[n.substring(1,t),n.substr(t+1)]}let FM=(n,t)=>!1,LM=(n,t)=>!1,YF=(n,t,e)=>[];const JF=PM();(JF||"undefined"!=typeof Element)&&(FM=qF()?(n,t)=>{for(;t&&t!==document.documentElement;){if(t===n)return!0;t=t.parentNode||t.host}return!1}:(n,t)=>n.contains(t),LM=(()=>{if(JF||Element.prototype.matches)return(n,t)=>n.matches(t);{const n=Element.prototype,t=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector;return t?(e,r)=>t.apply(e,[r]):LM}})(),YF=(n,t,e)=>{let r=[];if(e){const s=n.querySelectorAll(t);for(let p=0;p{const r=e.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=n[e]}),t}let eL=(()=>{class n{validateStyleProperty(e){return UM(e)}matchesElement(e,r){return jM(e,r)}containsElement(e,r){return VM(e,r)}query(e,r,s){return HM(e,r,s)}computeStyle(e,r,s){return s||""}animate(e,r,s,p,F,q=[],te){return new m5(s,p)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),$M=(()=>{class n{}return n.NOOP=new eL,n})();const WM="ng-enter",aE="ng-leave",uE="ng-trigger",cE=".ng-trigger",nL="ng-animating",GM=".ng-animating";function U3(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:zM(parseFloat(t[1]),t[2])}function zM(n,t){return"s"===t?1e3*n:n}function lE(n,t,e){return n.hasOwnProperty("duration")?n:function(n,t,e){let s,p=0,F="";if("string"==typeof n){const q=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===q)return t.push(`The provided timing value "${n}" is invalid.`),{duration:0,delay:0,easing:""};s=zM(parseFloat(q[1]),q[2]);const te=q[3];null!=te&&(p=zM(parseFloat(te),q[4]));const fe=q[5];fe&&(F=fe)}else s=n;if(!e){let q=!1,te=t.length;s<0&&(t.push("Duration values below 0 are not allowed for this animation step."),q=!0),p<0&&(t.push("Delay values below 0 are not allowed for this animation step."),q=!0),q&&t.splice(te,0,`The provided timing value "${n}" is invalid.`)}return{duration:s,delay:p,easing:F}}(n,t,e)}function g5(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function K6(n,t,e={}){if(t)for(let r in n)e[r]=n[r];else g5(n,e);return e}function iL(n,t,e){return e?t+":"+e+";":""}function sL(n){let t="";for(let e=0;e{const s=KM(r);e&&!e.hasOwnProperty(r)&&(e[r]=n.style[s]),n.style[s]=t[r]}),PM()&&sL(n))}function j3(n,t){n.style&&(Object.keys(t).forEach(e=>{const r=KM(e);n.style[r]=""}),PM()&&sL(n))}function S_(n){return Array.isArray(n)?1==n.length?n[0]:WF(n):n}const qM=new RegExp("{{\\s*(.+?)\\s*}}","g");function oL(n){let t=[];if("string"==typeof n){let e;for(;e=qM.exec(n);)t.push(e[1]);qM.lastIndex=0}return t}function dE(n,t,e){const r=n.toString(),s=r.replace(qM,(p,F)=>{let q=t[F];return t.hasOwnProperty(F)||(e.push(`Please provide a value for the animation param ${F}`),q=""),q.toString()});return s==r?n:s}function fE(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const oee=/-+([a-z0-9])/g;function KM(n){return n.replace(oee,(...t)=>t[1].toUpperCase())}function aee(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function aL(n,t){return 0===n||0===t}function uL(n,t,e){const r=Object.keys(e);if(r.length&&t.length){let p=t[0],F=[];if(r.forEach(q=>{p.hasOwnProperty(q)||F.push(q),p[q]=e[q]}),F.length)for(var s=1;sfunction(n,t,e){if(":"==n[0]){const te=function(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,r)=>parseFloat(r)>parseFloat(e);case":decrement":return(e,r)=>parseFloat(r) *"}}(n,e);if("function"==typeof te)return void t.push(te);n=te}const r=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return e.push(`The provided transition expression "${n}" is not supported`),t;const s=r[1],p=r[2],F=r[3];t.push(cL(s,F));"<"==p[0]&&!("*"==s&&"*"==F)&&t.push(cL(F,s))}(r,e,t)):e.push(n),e}const pE=new Set(["true","1"]),mE=new Set(["false","0"]);function cL(n,t){const e=pE.has(n)||mE.has(n),r=pE.has(t)||mE.has(t);return(s,p)=>{let F="*"==n||n==s,q="*"==t||t==p;return!F&&e&&"boolean"==typeof s&&(F=s?pE.has(n):mE.has(n)),!q&&r&&"boolean"==typeof p&&(q=p?pE.has(t):mE.has(t)),F&&q}}const dee=new RegExp("s*:selfs*,?","g");function YM(n,t,e){return new fee(n).build(t,e)}class fee{constructor(t){this._driver=t}build(t,e){const r=new mee(e);return this._resetContextStyleTimingState(r),n2(this,S_(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let r=e.queryCount=0,s=e.depCount=0;const p=[],F=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(q=>{if(this._resetContextStyleTimingState(e),0==q.type){const te=q,fe=te.name;fe.toString().split(/\s*,\s*/).forEach(Re=>{te.name=Re,p.push(this.visitState(te,e))}),te.name=fe}else if(1==q.type){const te=this.visitTransition(q,e);r+=te.queryCount,s+=te.depCount,F.push(te)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:p,transitions:F,queryCount:r,depCount:s,options:null}}visitState(t,e){const r=this.visitStyle(t.styles,e),s=t.options&&t.options.params||null;if(r.containsDynamicStyles){const p=new Set,F=s||{};if(r.styles.forEach(q=>{if(gE(q)){const te=q;Object.keys(te).forEach(fe=>{oL(te[fe]).forEach(Re=>{F.hasOwnProperty(Re)||p.add(Re)})})}}),p.size){const q=fE(p.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${q.join(", ")}`)}}return{type:0,name:t.name,style:r,options:s?{params:s}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const r=n2(this,S_(t.animation),e);return{type:1,matchers:uee(t.expr,e.errors),animation:r,queryCount:e.queryCount,depCount:e.depCount,options:V3(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(r=>n2(this,r,e)),options:V3(t.options)}}visitGroup(t,e){const r=e.currentTime;let s=0;const p=t.steps.map(F=>{e.currentTime=r;const q=n2(this,F,e);return s=Math.max(s,e.currentTime),q});return e.currentTime=s,{type:3,steps:p,options:V3(t.options)}}visitAnimate(t,e){const r=function(n,t){let e=null;if(n.hasOwnProperty("duration"))e=n;else if("number"==typeof n)return JM(lE(n,t).duration,0,"");const r=n;if(r.split(/\s+/).some(p=>"{"==p.charAt(0)&&"{"==p.charAt(1))){const p=JM(0,0,"");return p.dynamic=!0,p.strValue=r,p}return e=e||lE(r,t),JM(e.duration,e.delay,e.easing)}(t.timings,e.errors);e.currentAnimateTimings=r;let s,p=t.styles?t.styles:vf({});if(5==p.type)s=this.visitKeyframes(p,e);else{let F=t.styles,q=!1;if(!F){q=!0;const fe={};r.easing&&(fe.easing=r.easing),F=vf(fe)}e.currentTime+=r.duration+r.delay;const te=this.visitStyle(F,e);te.isEmptyStep=q,s=te}return e.currentAnimateTimings=null,{type:4,timings:r,style:s,options:null}}visitStyle(t,e){const r=this._makeStyleAst(t,e);return this._validateStyleAst(r,e),r}_makeStyleAst(t,e){const r=[];Array.isArray(t.styles)?t.styles.forEach(F=>{"string"==typeof F?F==Db?r.push(F):e.errors.push(`The provided style string value ${F} is not allowed.`):r.push(F)}):r.push(t.styles);let s=!1,p=null;return r.forEach(F=>{if(gE(F)){const q=F,te=q.easing;if(te&&(p=te,delete q.easing),!s)for(let fe in q)if(q[fe].toString().indexOf("{{")>=0){s=!0;break}}}),{type:6,styles:r,easing:p,offset:t.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(t,e){const r=e.currentAnimateTimings;let s=e.currentTime,p=e.currentTime;r&&p>0&&(p-=r.duration+r.delay),t.styles.forEach(F=>{"string"!=typeof F&&Object.keys(F).forEach(q=>{if(!this._driver.validateStyleProperty(q))return void e.errors.push(`The provided animation property "${q}" is not a supported CSS property for animations`);const te=e.collectedStyles[e.currentQuerySelector],fe=te[q];let Re=!0;fe&&(p!=s&&p>=fe.startTime&&s<=fe.endTime&&(e.errors.push(`The CSS property "${q}" that exists between the times of "${fe.startTime}ms" and "${fe.endTime}ms" is also being animated in a parallel animation between the times of "${p}ms" and "${s}ms"`),Re=!1),p=fe.startTime),Re&&(te[q]={startTime:p,endTime:s}),e.options&&function(n,t,e){const r=t.params||{},s=oL(n);s.length&&s.forEach(p=>{r.hasOwnProperty(p)||e.push(`Unable to resolve the local animation param ${p} in the given list of values`)})}(F[q],e.options,e.errors)})})}visitKeyframes(t,e){const r={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),r;let p=0;const F=[];let q=!1,te=!1,fe=0;const Re=t.steps.map(wn=>{const An=this._makeStyleAst(wn,e);let gr=null!=An.offset?An.offset:function(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(gE(e)&&e.hasOwnProperty("offset")){const r=e;t=parseFloat(r.offset),delete r.offset}});else if(gE(n)&&n.hasOwnProperty("offset")){const e=n;t=parseFloat(e.offset),delete e.offset}return t}(An.styles),_r=0;return null!=gr&&(p++,_r=An.offset=gr),te=te||_r<0||_r>1,q=q||_r0&&p<$e?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==p&&(rt=1/($e-1));const ft=$e-1,Tt=e.currentTime,Ft=e.currentAnimateTimings,Qt=Ft.duration;return Re.forEach((wn,An)=>{const gr=rt>0?An==ft?1:rt*An:F[An],_r=gr*Qt;e.currentTime=Tt+Ft.delay+_r,Ft.duration=_r,this._validateStyleAst(wn,e),wn.offset=gr,r.styles.push(wn)}),r}visitReference(t,e){return{type:8,animation:n2(this,S_(t.animation),e),options:V3(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:V3(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:V3(t.options)}}visitQuery(t,e){const r=e.currentQuerySelector,s=t.options||{};e.queryCount++,e.currentQuery=t;const[p,F]=function(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(dee,"")),n=n.replace(/@\*/g,cE).replace(/@\w+/g,e=>cE+"-"+e.substr(1)).replace(/:animating/g,GM),[n,t]}(t.selector);e.currentQuerySelector=r.length?r+" "+p:p,t2(e.collectedStyles,e.currentQuerySelector,{});const q=n2(this,S_(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=r,{type:11,selector:p,limit:s.limit||0,optional:!!s.optional,includeSelf:F,animation:q,originalSelector:t.selector,options:V3(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const r="full"===t.timings?{duration:0,delay:0,easing:"full"}:lE(t.timings,e.errors,!0);return{type:12,animation:n2(this,S_(t.animation),e),timings:r,options:null}}}class mee{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function gE(n){return!Array.isArray(n)&&"object"==typeof n}function V3(n){return n?(n=g5(n)).params&&(n.params=function(n){return n?g5(n):null}(n.params)):n={},n}function JM(n,t,e){return{duration:n,delay:t,easing:e}}function XM(n,t,e,r,s,p,F=null,q=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:r,duration:s,delay:p,totalTime:s+p,easing:F,subTimeline:q}}class yE{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let r=this._map.get(t);r||this._map.set(t,r=[]),r.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const _ee=new RegExp(":enter","g"),xee=new RegExp(":leave","g");function QM(n,t,e,r,s,p={},F={},q,te,fe=[]){return(new Eee).buildKeyframes(n,t,e,r,s,p,F,q,te,fe)}class Eee{buildKeyframes(t,e,r,s,p,F,q,te,fe,Re=[]){fe=fe||new yE;const $e=new eO(t,e,fe,s,p,Re,[]);$e.options=te,$e.currentTimeline.setStyles([F],null,$e.errors,te),n2(this,r,$e);const rt=$e.timelines.filter(ft=>ft.containsAnimation());if(rt.length&&Object.keys(q).length){const ft=rt[rt.length-1];ft.allowOnlyTimelineStyles()||ft.setStyles([q],null,$e.errors,te)}return rt.length?rt.map(ft=>ft.buildKeyframes()):[XM(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const r=e.subInstructions.consume(e.element);if(r){const s=e.createSubContext(t.options),p=e.currentTimeline.currentTime,F=this._visitSubInstructions(r,s,s.options);p!=F&&e.transformIntoNewTimeline(F)}e.previousNode=t}visitAnimateRef(t,e){const r=e.createSubContext(t.options);r.transformIntoNewTimeline(),this.visitReference(t.animation,r),e.transformIntoNewTimeline(r.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,r){let p=e.currentTimeline.currentTime;const F=null!=r.duration?U3(r.duration):null,q=null!=r.delay?U3(r.delay):null;return 0!==F&&t.forEach(te=>{const fe=e.appendInstructionToTimeline(te,F,q);p=Math.max(p,fe.duration+fe.delay)}),p}visitReference(t,e){e.updateOptions(t.options,!0),n2(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const r=e.subContextCount;let s=e;const p=t.options;if(p&&(p.params||p.delay)&&(s=e.createSubContext(p),s.transformIntoNewTimeline(),null!=p.delay)){6==s.previousNode.type&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=bE);const F=U3(p.delay);s.delayNextStep(F)}t.steps.length&&(t.steps.forEach(F=>n2(this,F,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>r&&s.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const r=[];let s=e.currentTimeline.currentTime;const p=t.options&&t.options.delay?U3(t.options.delay):0;t.steps.forEach(F=>{const q=e.createSubContext(t.options);p&&q.delayNextStep(p),n2(this,F,q),s=Math.max(s,q.currentTimeline.currentTime),r.push(q.currentTimeline)}),r.forEach(F=>e.currentTimeline.mergeTimelineCollectedStyles(F)),e.transformIntoNewTimeline(s),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const r=t.strValue;return lE(e.params?dE(r,e.params,e.errors):r,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const r=e.currentAnimateTimings=this._visitTiming(t.timings,e),s=e.currentTimeline;r.delay&&(e.incrementTime(r.delay),s.snapshotCurrentStyles());const p=t.style;5==p.type?this.visitKeyframes(p,e):(e.incrementTime(r.duration),this.visitStyle(p,e),s.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const r=e.currentTimeline,s=e.currentAnimateTimings;!s&&r.getCurrentStyleProperties().length&&r.forwardFrame();const p=s&&s.easing||t.easing;t.isEmptyStep?r.applyEmptyStep(p):r.setStyles(t.styles,p,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const r=e.currentAnimateTimings,s=e.currentTimeline.duration,p=r.duration,q=e.createSubContext().currentTimeline;q.easing=r.easing,t.styles.forEach(te=>{q.forwardTime((te.offset||0)*p),q.setStyles(te.styles,te.easing,e.errors,e.options),q.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(q),e.transformIntoNewTimeline(s+p),e.previousNode=t}visitQuery(t,e){const r=e.currentTimeline.currentTime,s=t.options||{},p=s.delay?U3(s.delay):0;p&&(6===e.previousNode.type||0==r&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=bE);let F=r;const q=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!s.optional,e.errors);e.currentQueryTotal=q.length;let te=null;q.forEach((fe,Re)=>{e.currentQueryIndex=Re;const $e=e.createSubContext(t.options,fe);p&&$e.delayNextStep(p),fe===e.element&&(te=$e.currentTimeline),n2(this,t.animation,$e),$e.currentTimeline.applyStylesToKeyframe(),F=Math.max(F,$e.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(F),te&&(e.currentTimeline.mergeTimelineCollectedStyles(te),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const r=e.parentContext,s=e.currentTimeline,p=t.timings,F=Math.abs(p.duration),q=F*(e.currentQueryTotal-1);let te=F*e.currentQueryIndex;switch(p.duration<0?"reverse":p.easing){case"reverse":te=q-te;break;case"full":te=r.currentStaggerTime}const Re=e.currentTimeline;te&&Re.delayNextStep(te);const $e=Re.currentTime;n2(this,t.animation,e),e.previousNode=t,r.currentStaggerTime=s.currentTime-$e+(s.startTime-r.currentTimeline.startTime)}}const bE={};class eO{constructor(t,e,r,s,p,F,q,te){this._driver=t,this.element=e,this.subInstructions=r,this._enterClassName=s,this._leaveClassName=p,this.errors=F,this.timelines=q,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=bE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=te||new vE(this._driver,e,0),q.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const r=t;let s=this.options;null!=r.duration&&(s.duration=U3(r.duration)),null!=r.delay&&(s.delay=U3(r.delay));const p=r.params;if(p){let F=s.params;F||(F=this.options.params={}),Object.keys(p).forEach(q=>{(!e||!F.hasOwnProperty(q))&&(F[q]=dE(p[q],F,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const r=t.params={};Object.keys(e).forEach(s=>{r[s]=e[s]})}}return t}createSubContext(t=null,e,r){const s=e||this.element,p=new eO(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,r||0));return p.previousNode=this.previousNode,p.currentAnimateTimings=this.currentAnimateTimings,p.options=this._copyOptions(),p.updateOptions(t),p.currentQueryIndex=this.currentQueryIndex,p.currentQueryTotal=this.currentQueryTotal,p.parentContext=this,this.subContextCount++,p}transformIntoNewTimeline(t){return this.previousNode=bE,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,r){const s={duration:e??t.duration,delay:this.currentTimeline.currentTime+(r??0)+t.delay,easing:""},p=new Tee(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,s,t.stretchStartingKeyframe);return this.timelines.push(p),s}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,r,s,p,F){let q=[];if(s&&q.push(this.element),t.length>0){t=(t=t.replace(_ee,"."+this._enterClassName)).replace(xee,"."+this._leaveClassName);let fe=this._driver.query(this.element,t,1!=r);0!==r&&(fe=r<0?fe.slice(fe.length+r,fe.length):fe.slice(0,r)),q.push(...fe)}return!p&&0==q.length&&F.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),q}}class vE{constructor(t,e,r,s){this._driver=t,this.element=e,this.startTime=r,this._elementTimelineStylesLookup=s,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new vE(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(e=>{this._backFill[e]=this._globalTimelineStyles[e]||Db,this._currentKeyframe[e]=Db}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,r,s){e&&(this._previousKeyframe.easing=e);const p=s&&s.params||{},F=function(n,t){const e={};let r;return n.forEach(s=>{"*"===s?(r=r||Object.keys(t),r.forEach(p=>{e[p]=Db})):K6(s,!1,e)}),e}(t,this._globalTimelineStyles);Object.keys(F).forEach(q=>{const te=dE(F[q],p,r);this._pendingStyles[q]=te,this._localTimelineStyles.hasOwnProperty(q)||(this._backFill[q]=this._globalTimelineStyles.hasOwnProperty(q)?this._globalTimelineStyles[q]:Db),this._updateStyle(q,te)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(r=>{this._currentKeyframe[r]=t[r]}),Object.keys(this._localTimelineStyles).forEach(r=>{this._currentKeyframe.hasOwnProperty(r)||(this._currentKeyframe[r]=this._localTimelineStyles[r])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const r=this._styleSummary[e],s=t._styleSummary[e];(!r||s.time>r.time)&&this._updateStyle(e,s.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,r=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((q,te)=>{const fe=K6(q,!0);Object.keys(fe).forEach(Re=>{const $e=fe[Re];"!"==$e?t.add(Re):$e==Db&&e.add(Re)}),r||(fe.offset=te/this.duration),s.push(fe)});const p=t.size?fE(t.values()):[],F=e.size?fE(e.values()):[];if(r){const q=s[0],te=g5(q);q.offset=0,te.offset=1,s=[q,te]}return XM(this.element,s,p,F,this.duration,this.startTime,this.easing,!1)}}class Tee extends vE{constructor(t,e,r,s,p,F,q=!1){super(t,e,F.delay),this.keyframes=r,this.preStyleProps=s,this.postStyleProps=p,this._stretchStartingKeyframe=q,this.timings={duration:F.duration,delay:F.delay,easing:F.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:r,easing:s}=this.timings;if(this._stretchStartingKeyframe&&e){const p=[],F=r+e,q=e/F,te=K6(t[0],!1);te.offset=0,p.push(te);const fe=K6(t[0],!1);fe.offset=fL(q),p.push(fe);const Re=t.length-1;for(let $e=1;$e<=Re;$e++){let rt=K6(t[$e],!1);rt.offset=fL((e+rt.offset*r)/F),p.push(rt)}r=F,e=0,s="",t=p}return XM(this.element,t,this.preStyleProps,this.postStyleProps,r,e,s,!0)}}function fL(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class tO{}class Iee extends tO{normalizePropertyName(t,e){return KM(t)}normalizeStyleValue(t,e,r,s){let p="";const F=r.toString().trim();if(See[e]&&0!==r&&"0"!==r)if("number"==typeof r)p="px";else{const q=r.match(/^[+-]?[\d\.]+([a-z]*)$/);q&&0==q[1].length&&s.push(`Please provide a CSS unit value for ${t}:${r}`)}return F+p}}const See=(()=>function(n){const t={};return n.forEach(e=>t[e]=!0),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function hL(n,t,e,r,s,p,F,q,te,fe,Re,$e,rt){return{type:0,element:n,triggerName:t,isRemovalTransition:s,fromState:e,fromStyles:p,toState:r,toStyles:F,timelines:q,queriedElements:te,preStyleProps:fe,postStyleProps:Re,totalTime:$e,errors:rt}}const nO={};class pL{constructor(t,e,r){this._triggerName=t,this.ast=e,this._stateStyles=r}match(t,e,r,s){return function(n,t,e,r,s){return n.some(p=>p(t,e,r,s))}(this.ast.matchers,t,e,r,s)}buildStyles(t,e,r){const s=this._stateStyles["*"],p=this._stateStyles[t],F=s?s.buildStyles(e,r):{};return p?p.buildStyles(e,r):F}build(t,e,r,s,p,F,q,te,fe,Re){const $e=[],rt=this.ast.options&&this.ast.options.params||nO,Tt=this.buildStyles(r,q&&q.params||nO,$e),Ft=te&&te.params||nO,Qt=this.buildStyles(s,Ft,$e),wn=new Set,An=new Map,gr=new Map,_r="void"===s,pr={params:Object.assign(Object.assign({},rt),Ft)},ti=Re?[]:QM(t,e,this.ast.animation,p,F,Tt,Qt,pr,fe,$e);let qr=0;if(ti.forEach(as=>{qr=Math.max(as.duration+as.delay,qr)}),$e.length)return hL(e,this._triggerName,r,s,_r,Tt,Qt,[],[],An,gr,qr,$e);ti.forEach(as=>{const Li=as.element,vs=t2(An,Li,{});as.preStyleProps.forEach(no=>vs[no]=!0);const Yi=t2(gr,Li,{});as.postStyleProps.forEach(no=>Yi[no]=!0),Li!==e&&wn.add(Li)});const yi=fE(wn.values());return hL(e,this._triggerName,r,s,_r,Tt,Qt,ti,yi,An,gr,qr)}}class Mee{constructor(t,e,r){this.styles=t,this.defaultParams=e,this.normalizer=r}buildStyles(t,e){const r={},s=g5(this.defaultParams);return Object.keys(t).forEach(p=>{const F=t[p];null!=F&&(s[p]=F)}),this.styles.styles.forEach(p=>{if("string"!=typeof p){const F=p;Object.keys(F).forEach(q=>{let te=F[q];te.length>1&&(te=dE(te,s,e));const fe=this.normalizer.normalizePropertyName(q,e);te=this.normalizer.normalizeStyleValue(q,fe,te,e),r[fe]=te})}}),r}}class Dee{constructor(t,e,r){this.name=t,this.ast=e,this._normalizer=r,this.transitionFactories=[],this.states={},e.states.forEach(s=>{this.states[s.name]=new Mee(s.style,s.options&&s.options.params||{},r)}),mL(this.states,"true","1"),mL(this.states,"false","0"),e.transitions.forEach(s=>{this.transitionFactories.push(new pL(t,s,this.states))}),this.fallbackTransition=function(n,t,e){return new pL(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(F,q)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,r,s){return this.transitionFactories.find(F=>F.match(t,e,r,s))||null}matchStyles(t,e,r){return this.fallbackTransition.buildStyles(t,e,r)}}function mL(n,t,e){n.hasOwnProperty(t)?n.hasOwnProperty(e)||(n[e]=n[t]):n.hasOwnProperty(e)&&(n[t]=n[e])}const Ree=new yE;class Nee{constructor(t,e,r){this.bodyNode=t,this._driver=e,this._normalizer=r,this._animations={},this._playersById={},this.players=[]}register(t,e){const r=[],s=YM(this._driver,e,r);if(r.length)throw new Error(`Unable to build the animation due to the following errors: ${r.join("\n")}`);this._animations[t]=s}_buildPlayer(t,e,r){const s=t.element,p=KF(0,this._normalizer,0,t.keyframes,e,r);return this._driver.animate(s,p,t.duration,t.delay,t.easing,[],!0)}create(t,e,r={}){const s=[],p=this._animations[t];let F;const q=new Map;if(p?(F=QM(this._driver,e,p,WM,aE,{},{},r,Ree,s),F.forEach(Re=>{const $e=t2(q,Re.element,{});Re.postStyleProps.forEach(rt=>$e[rt]=null)})):(s.push("The requested animation doesn't exist or has already been destroyed"),F=[]),s.length)throw new Error(`Unable to create the animation due to the following errors: ${s.join("\n")}`);q.forEach((Re,$e)=>{Object.keys(Re).forEach(rt=>{Re[rt]=this._driver.computeStyle($e,rt,Db)})});const fe=q6(F.map(Re=>{const $e=q.get(Re.element);return this._buildPlayer(Re,{},$e)}));return this._playersById[t]=fe,fe.onDestroy(()=>this.destroy(t)),this.players.push(fe),fe}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const r=this.players.indexOf(e);r>=0&&this.players.splice(r,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,r,s){const p=BM(e,"","","");return RM(this._getPlayer(t),r,p,s),()=>{}}command(t,e,r,s){if("register"==r)return void this.register(t,s[0]);if("create"==r)return void this.create(t,e,s[0]||{});const p=this._getPlayer(t);switch(r){case"play":p.play();break;case"pause":p.pause();break;case"reset":p.reset();break;case"restart":p.restart();break;case"finish":p.finish();break;case"init":p.init();break;case"setPosition":p.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(t)}}}const gL="ng-animate-queued",yL="ng-animate-disabled",bL=".ng-animate-disabled",Uee=[],vL={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},jee={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},H2="__ng_removed";class rO{constructor(t,e=""){this.namespaceId=e;const r=t&&t.hasOwnProperty("value");if(this.value=(r?t.value:t)??null,r){const p=g5(t);delete p.value,this.options=p}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const r=this.options.params;Object.keys(e).forEach(s=>{null==r[s]&&(r[s]=e[s])})}}}const k_="void",iO=new rO(k_);class Vee{constructor(t,e,r){this.id=t,this.hostElement=e,this._engine=r,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,$2(e,this._hostClassName)}listen(t,e,r,s){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${r}" because the animation trigger "${e}" doesn't exist!`);if(null==r||0==r.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(n=r)&&"done"!=n)throw new Error(`The provided animation trigger event "${r}" for the animation trigger "${e}" is not supported!`);var n;const p=t2(this._elementListeners,t,[]),F={name:e,phase:r,callback:s};p.push(F);const q=t2(this._engine.statesByElement,t,{});return q.hasOwnProperty(e)||($2(t,uE),$2(t,uE+"-"+e),q[e]=iO),()=>{this._engine.afterFlush(()=>{const te=p.indexOf(F);te>=0&&p.splice(te,1),this._triggers[e]||delete q[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,r,s=!0){const p=this._getTrigger(e),F=new sO(this.id,e,t);let q=this._engine.statesByElement.get(t);q||($2(t,uE),$2(t,uE+"-"+e),this._engine.statesByElement.set(t,q={}));let te=q[e];const fe=new rO(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&te&&fe.absorbOptions(te.options),q[e]=fe,te||(te=iO),fe.value!==k_&&te.value===fe.value){if(!function(n,t){const e=Object.keys(n),r=Object.keys(t);if(e.length!=r.length)return!1;for(let s=0;s{j3(t,Qt),Ay(t,wn)})}return}const rt=t2(this._engine.playersByElement,t,[]);rt.forEach(Ft=>{Ft.namespaceId==this.id&&Ft.triggerName==e&&Ft.queued&&Ft.destroy()});let ft=p.matchTransition(te.value,fe.value,t,fe.params),Tt=!1;if(!ft){if(!s)return;ft=p.fallbackTransition,Tt=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:ft,fromState:te,toState:fe,player:F,isFallbackTransition:Tt}),Tt||($2(t,gL),F.onStart(()=>{y5(t,gL)})),F.onDone(()=>{let Ft=this.players.indexOf(F);Ft>=0&&this.players.splice(Ft,1);const Qt=this._engine.playersByElement.get(t);if(Qt){let wn=Qt.indexOf(F);wn>=0&&Qt.splice(wn,1)}}),this.players.push(F),rt.push(F),F}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,r)=>{delete e[t]}),this._elementListeners.forEach((e,r)=>{this._elementListeners.set(r,e.filter(s=>s.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(r=>r.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const r=this._engine.driver.query(t,cE,!0);r.forEach(s=>{if(s[H2])return;const p=this._engine.fetchNamespacesByElement(s);p.size?p.forEach(F=>F.triggerLeaveAnimation(s,e,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(t,e,r,s){const p=this._engine.statesByElement.get(t);if(p){const F=[];if(Object.keys(p).forEach(q=>{if(this._triggers[q]){const te=this.trigger(t,q,k_,s);te&&F.push(te)}}),F.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),r&&q6(F).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),r=this._engine.statesByElement.get(t);if(e&&r){const s=new Set;e.forEach(p=>{const F=p.name;if(s.has(F))return;s.add(F);const te=this._triggers[F].fallbackTransition,fe=r[F]||iO,Re=new rO(k_),$e=new sO(this.id,F,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:F,transition:te,fromState:fe,toState:Re,player:$e,isFallbackTransition:!0})})}}removeNode(t,e){const r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let s=!1;if(r.totalAnimations){const p=r.players.length?r.playersByQueriedElement.get(t):[];if(p&&p.length)s=!0;else{let F=t;for(;F=F.parentNode;)if(r.statesByElement.get(F)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(t),s)r.markElementAsRemoved(this.id,t,!1,e);else{const p=t[H2];(!p||p===vL)&&(r.afterFlush(()=>this.clearElementCache(t)),r.destroyInnerAnimations(t),r._onRemovalComplete(t,e))}}insertNode(t,e){$2(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(r=>{const s=r.player;if(s.destroyed)return;const p=r.element,F=this._elementListeners.get(p);F&&F.forEach(q=>{if(q.name==r.triggerName){const te=BM(p,r.triggerName,r.fromState.value,r.toState.value);te._data=t,RM(r.player,q.phase,te,q.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):e.push(r)}),this._queue=[],e.sort((r,s)=>{const p=r.transition.ast.depCount,F=s.transition.ast.depCount;return 0==p||0==F?p-F:this._engine.driver.containsElement(r.element,s.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(r=>r.element===t)||e,e}}class Hee{constructor(t,e,r){this.bodyNode=t,this.driver=e,this._normalizer=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,p)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(r=>{r.queued&&t.push(r)})}),t}createNamespace(t,e){const r=new Vee(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(r,e):(this.newHostElements.set(e,r),this.collectEnterElement(e)),this._namespaceLookup[t]=r}_balanceNamespaceList(t,e){const r=this._namespaceList.length-1;if(r>=0){let s=!1;for(let p=r;p>=0;p--)if(this.driver.containsElement(this._namespaceList[p].hostElement,e)){this._namespaceList.splice(p+1,0,t),s=!0;break}s||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let r=this._namespaceLookup[t];return r||(r=this.createNamespace(t,e)),r}registerTrigger(t,e,r){let s=this._namespaceLookup[t];s&&s.register(e,r)&&this.totalAnimations++}destroy(t,e){if(!t)return;const r=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(r.hostElement),delete this._namespaceLookup[t];const s=this._namespaceList.indexOf(r);s>=0&&this._namespaceList.splice(s,1)}),this.afterFlushAnimationsDone(()=>r.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,r=this.statesByElement.get(t);if(r){const s=Object.keys(r);for(let p=0;p=0&&this.collectedLeaveElements.splice(F,1)}if(t){const F=this._fetchNamespace(t);F&&F.insertNode(e,r)}s&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),$2(t,yL)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),y5(t,yL))}removeNode(t,e,r,s){if(_E(e)){const p=t?this._fetchNamespace(t):null;if(p?p.removeNode(e,s):this.markElementAsRemoved(t,e,!1,s),r){const F=this.namespacesByHostElement.get(e);F&&F.id!==t&&F.removeNode(e,s)}}else this._onRemovalComplete(e,s)}markElementAsRemoved(t,e,r,s){this.collectedLeaveElements.push(e),e[H2]={namespaceId:t,setForRemoval:s,hasAnimation:r,removedBeforeQueried:!1}}listen(t,e,r,s,p){return _E(e)?this._fetchNamespace(t).listen(e,r,s,p):()=>{}}_buildInstruction(t,e,r,s,p){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,r,s,t.fromState.options,t.toState.options,e,p)}destroyInnerAnimations(t){let e=this.driver.query(t,cE,!0);e.forEach(r=>this.destroyActiveAnimationsForElement(r)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,GM,!0),e.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return q6(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[H2];if(e&&e.setForRemoval){if(t[H2]=vL,e.namespaceId){this.destroyInnerAnimations(t);const r=this._fetchNamespace(e.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,bL)&&this.markElementAsDisabled(t,!1),this.driver.query(t,bL,!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,s)=>this._balanceNamespaceList(r,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){const r=this._whenQuietFns;this._whenQuietFns=[],e.length?q6(e).onDone(()=>{r.forEach(s=>s())}):r.forEach(s=>s())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const r=new yE,s=[],p=new Map,F=[],q=new Map,te=new Map,fe=new Map,Re=new Set;this.disabledNodes.forEach(us=>{Re.add(us);const ds=this.driver.query(us,".ng-animate-queued",!0);for(let kr=0;kr{const kr=WM+Ft++;Tt.set(ds,kr),us.forEach(wr=>$2(wr,kr))});const Qt=[],wn=new Set,An=new Set;for(let us=0;uswn.add(wr)):An.add(ds))}const gr=new Map,_r=xL(rt,Array.from(wn));_r.forEach((us,ds)=>{const kr=aE+Ft++;gr.set(ds,kr),us.forEach(wr=>$2(wr,kr))}),t.push(()=>{ft.forEach((us,ds)=>{const kr=Tt.get(ds);us.forEach(wr=>y5(wr,kr))}),_r.forEach((us,ds)=>{const kr=gr.get(ds);us.forEach(wr=>y5(wr,kr))}),Qt.forEach(us=>{this.processLeaveNode(us)})});const pr=[],ti=[];for(let us=this._namespaceList.length-1;us>=0;us--)this._namespaceList[us].drainQueuedTransitions(e).forEach(kr=>{const wr=kr.player,mi=kr.element;if(pr.push(wr),this.collectedEnterElements.length){const Pa=mi[H2];if(Pa&&Pa.setForMove)return void wr.destroy()}const Ys=!$e||!this.driver.containsElement($e,mi),Js=gr.get(mi),va=Tt.get(mi),Qo=this._buildInstruction(kr,r,va,Js,Ys);if(Qo.errors&&Qo.errors.length)ti.push(Qo);else{if(Ys)return wr.onStart(()=>j3(mi,Qo.fromStyles)),wr.onDestroy(()=>Ay(mi,Qo.toStyles)),void s.push(wr);if(kr.isFallbackTransition)return wr.onStart(()=>j3(mi,Qo.fromStyles)),wr.onDestroy(()=>Ay(mi,Qo.toStyles)),void s.push(wr);Qo.timelines.forEach(Pa=>Pa.stretchStartingKeyframe=!0),r.append(mi,Qo.timelines),F.push({instruction:Qo,player:wr,element:mi}),Qo.queriedElements.forEach(Pa=>t2(q,Pa,[]).push(wr)),Qo.preStyleProps.forEach((Pa,Ou)=>{const td=Object.keys(Pa);if(td.length){let Td=te.get(Ou);Td||te.set(Ou,Td=new Set),td.forEach(To=>Td.add(To))}}),Qo.postStyleProps.forEach((Pa,Ou)=>{const td=Object.keys(Pa);let Td=fe.get(Ou);Td||fe.set(Ou,Td=new Set),td.forEach(To=>Td.add(To))})}});if(ti.length){const us=[];ti.forEach(ds=>{us.push(`@${ds.triggerName} has failed due to:\n`),ds.errors.forEach(kr=>us.push(`- ${kr}\n`))}),pr.forEach(ds=>ds.destroy()),this.reportError(us)}const qr=new Map,yi=new Map;F.forEach(us=>{const ds=us.element;r.has(ds)&&(yi.set(ds,ds),this._beforeAnimationBuild(us.player.namespaceId,us.instruction,qr))}),s.forEach(us=>{const ds=us.element;this._getPreviousPlayers(ds,!1,us.namespaceId,us.triggerName,null).forEach(wr=>{t2(qr,ds,[]).push(wr),wr.destroy()})});const as=Qt.filter(us=>TL(us,te,fe)),Li=new Map;wL(Li,this.driver,An,fe,Db).forEach(us=>{TL(us,te,fe)&&as.push(us)});const Yi=new Map;ft.forEach((us,ds)=>{wL(Yi,this.driver,new Set(us),te,"!")}),as.forEach(us=>{const ds=Li.get(us),kr=Yi.get(us);Li.set(us,Object.assign(Object.assign({},ds),kr))});const no=[],Gs=[],Ts={};F.forEach(us=>{const{element:ds,player:kr,instruction:wr}=us;if(r.has(ds)){if(Re.has(ds))return kr.onDestroy(()=>Ay(ds,wr.toStyles)),kr.disabled=!0,kr.overrideTotalTime(wr.totalTime),void s.push(kr);let mi=Ts;if(yi.size>1){let Js=ds;const va=[];for(;Js=Js.parentNode;){const Qo=yi.get(Js);if(Qo){mi=Qo;break}va.push(Js)}va.forEach(Qo=>yi.set(Qo,mi))}const Ys=this._buildAnimation(kr.namespaceId,wr,qr,p,Yi,Li);if(kr.setRealPlayer(Ys),mi===Ts)no.push(kr);else{const Js=this.playersByElement.get(mi);Js&&Js.length&&(kr.parentPlayer=q6(Js)),s.push(kr)}}else j3(ds,wr.fromStyles),kr.onDestroy(()=>Ay(ds,wr.toStyles)),Gs.push(kr),Re.has(ds)&&s.push(kr)}),Gs.forEach(us=>{const ds=p.get(us.element);if(ds&&ds.length){const kr=q6(ds);us.setRealPlayer(kr)}}),s.forEach(us=>{us.parentPlayer?us.syncPlayerEvents(us.parentPlayer):us.destroy()});for(let us=0;us!Ys.destroyed);mi.length?zee(this,ds,mi):this.processLeaveNode(ds)}return Qt.length=0,no.forEach(us=>{this.players.push(us),us.onDone(()=>{us.destroy();const ds=this.players.indexOf(us);this.players.splice(ds,1)}),us.play()}),no}elementContainsData(t,e){let r=!1;const s=e[H2];return s&&s.setForRemoval&&(r=!0),this.playersByElement.has(e)&&(r=!0),this.playersByQueriedElement.has(e)&&(r=!0),this.statesByElement.has(e)&&(r=!0),this._fetchNamespace(t).elementContainsData(e)||r}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,r,s,p){let F=[];if(e){const q=this.playersByQueriedElement.get(t);q&&(F=q)}else{const q=this.playersByElement.get(t);if(q){const te=!p||p==k_;q.forEach(fe=>{fe.queued||!te&&fe.triggerName!=s||F.push(fe)})}}return(r||s)&&(F=F.filter(q=>!(r&&r!=q.namespaceId||s&&s!=q.triggerName))),F}_beforeAnimationBuild(t,e,r){const p=e.element,F=e.isRemovalTransition?void 0:t,q=e.isRemovalTransition?void 0:e.triggerName;for(const te of e.timelines){const fe=te.element,Re=fe!==p,$e=t2(r,fe,[]);this._getPreviousPlayers(fe,Re,F,q,e.toState).forEach(ft=>{const Tt=ft.getRealPlayer();Tt.beforeDestroy&&Tt.beforeDestroy(),ft.destroy(),$e.push(ft)})}j3(p,e.fromStyles)}_buildAnimation(t,e,r,s,p,F){const q=e.triggerName,te=e.element,fe=[],Re=new Set,$e=new Set,rt=e.timelines.map(Tt=>{const Ft=Tt.element;Re.add(Ft);const Qt=Ft[H2];if(Qt&&Qt.removedBeforeQueried)return new m5(Tt.duration,Tt.delay);const wn=Ft!==te,An=function(n){const t=[];return EL(n,t),t}((r.get(Ft)||Uee).map(qr=>qr.getRealPlayer())).filter(qr=>!!qr.element&&qr.element===Ft),gr=p.get(Ft),_r=F.get(Ft),pr=KF(0,this._normalizer,0,Tt.keyframes,gr,_r),ti=this._buildPlayer(Tt,pr,An);if(Tt.subTimeline&&s&&$e.add(Ft),wn){const qr=new sO(t,q,Ft);qr.setRealPlayer(ti),fe.push(qr)}return ti});fe.forEach(Tt=>{t2(this.playersByQueriedElement,Tt.element,[]).push(Tt),Tt.onDone(()=>function(n,t,e){let r;if(n instanceof Map){if(r=n.get(t),r){if(r.length){const s=r.indexOf(e);r.splice(s,1)}0==r.length&&n.delete(t)}}else if(r=n[t],r){if(r.length){const s=r.indexOf(e);r.splice(s,1)}0==r.length&&delete n[t]}return r}(this.playersByQueriedElement,Tt.element,Tt))}),Re.forEach(Tt=>$2(Tt,nL));const ft=q6(rt);return ft.onDestroy(()=>{Re.forEach(Tt=>y5(Tt,nL)),Ay(te,e.toStyles)}),$e.forEach(Tt=>{t2(s,Tt,[]).push(ft)}),ft}_buildPlayer(t,e,r){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,r):new m5(t.duration,t.delay)}}class sO{constructor(t,e,r){this.namespaceId=t,this.triggerName=e,this.element=r,this._player=new m5,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(r=>RM(t,e,void 0,r))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){t2(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function _E(n){return n&&1===n.nodeType}function _L(n,t){const e=n.style.display;return n.style.display=t??"none",e}function wL(n,t,e,r,s){const p=[];e.forEach(te=>p.push(_L(te)));const F=[];r.forEach((te,fe)=>{const Re={};te.forEach($e=>{const rt=Re[$e]=t.computeStyle(fe,$e,s);(!rt||0==rt.length)&&(fe[H2]=jee,F.push(fe))}),n.set(fe,Re)});let q=0;return e.forEach(te=>_L(te,p[q++])),F}function xL(n,t){const e=new Map;if(n.forEach(q=>e.set(q,[])),0==t.length)return e;const s=new Set(t),p=new Map;function F(q){if(!q)return 1;let te=p.get(q);if(te)return te;const fe=q.parentNode;return te=e.has(fe)?fe:s.has(fe)?1:F(fe),p.set(q,te),te}return t.forEach(q=>{const te=F(q);1!==te&&e.get(te).push(q)}),e}const wE="$$classes";function $2(n,t){if(n.classList)n.classList.add(t);else{let e=n[wE];e||(e=n[wE]={}),e[t]=!0}}function y5(n,t){if(n.classList)n.classList.remove(t);else{let e=n[wE];e&&delete e[t]}}function zee(n,t,e){q6(e).onDone(()=>n.processLeaveNode(t))}function EL(n,t){for(let e=0;es.add(p)):t.set(n,r),e.delete(n),!0}class xE{constructor(t,e,r){this.bodyNode=t,this._driver=e,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(s,p)=>{},this._transitionEngine=new Hee(t,e,r),this._timelineEngine=new Nee(t,e,r),this._transitionEngine.onRemovalComplete=(s,p)=>this.onRemovalComplete(s,p)}registerTrigger(t,e,r,s,p){const F=t+"-"+s;let q=this._triggerCache[F];if(!q){const te=[],fe=YM(this._driver,p,te);if(te.length)throw new Error(`The animation trigger "${s}" has failed to build due to the following errors:\n - ${te.join("\n - ")}`);q=function(n,t,e){return new Dee(n,t,e)}(s,fe,this._normalizer),this._triggerCache[F]=q}this._transitionEngine.registerTrigger(e,s,q)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,r,s){this._transitionEngine.insertNode(t,e,r,s)}onRemove(t,e,r,s){this._transitionEngine.removeNode(t,e,s||!1,r)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,r,s){if("@"==r.charAt(0)){const[p,F]=ZF(r);this._timelineEngine.command(p,e,F,s)}else this._transitionEngine.trigger(t,e,r,s)}listen(t,e,r,s,p){if("@"==r.charAt(0)){const[F,q]=ZF(r);return this._timelineEngine.listen(F,e,q,p)}return this._transitionEngine.listen(t,e,r,s,p)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function AL(n,t){let e=null,r=null;return Array.isArray(t)&&t.length?(e=oO(t[0]),t.length>1&&(r=oO(t[t.length-1]))):t&&(e=oO(t)),e||r?new Zee(n,e,r):null}let Zee=(()=>{class n{constructor(e,r,s){this._element=e,this._startStyles=r,this._endStyles=s,this._state=0;let p=n.initialStylesByElement.get(e);p||n.initialStylesByElement.set(e,p={}),this._initialStyles=p}start(){this._state<1&&(this._startStyles&&Ay(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Ay(this._element,this._initialStyles),this._endStyles&&(Ay(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(j3(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(j3(this._element,this._endStyles),this._endStyles=null),Ay(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function oO(n){let t=null;const e=Object.keys(n);for(let r=0;rthis._handleCallback(te)}apply(){(function(n,t){const e=uO(n,"").trim();let r=0;e.length&&(function(n,t){let e=0;for(let r=0;r=this._delay&&r>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),ML(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(n,t){const r=uO(n,"").split(","),s=aO(r,t);s>=0&&(r.splice(s,1),EE(n,"",r.join(",")))}(this._element,this._name))}}function kL(n,t,e){EE(n,"PlayState",e,CL(n,t))}function CL(n,t){const e=uO(n,"");return e.indexOf(",")>0?aO(e.split(","),t):aO([e],t)}function aO(n,t){for(let e=0;e=0)return e;return-1}function ML(n,t,e){e?n.removeEventListener(SL,t):n.addEventListener(SL,t)}function EE(n,t,e,r){const s=IL+t;if(null!=r){const p=n.style[s];if(p.length){const F=p.split(",");F[r]=e,e=F.join(",")}}n.style[s]=e}function uO(n,t){return n.style[IL+t]||""}class OL{constructor(t,e,r,s,p,F,q,te){this.element=t,this.keyframes=e,this.animationName=r,this._duration=s,this._delay=p,this._finalStyles=q,this._specialStyles=te,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=F||"linear",this.totalTime=s+p,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),!(this._state>=4)&&(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),!(this._state>=3)&&(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Qee(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(r=>{"offset"!=r&&(t[r]=e?this._finalStyles[r]:ZM(this.element,r))})}this.currentSnapshot=t}}class ste extends m5{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=QF(e)}init(){this.__initialized||!this._startingStyles||(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){!this._startingStyles||(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){!this._startingStyles||(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class PL{constructor(){this._count=0}validateStyleProperty(t){return UM(t)}matchesElement(t,e){return jM(t,e)}containsElement(t,e){return VM(t,e)}query(t,e,r){return HM(t,e,r)}computeStyle(t,e,r){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,r){r=r.map(q=>QF(q));let s=`@keyframes ${e} {\n`,p="";r.forEach(q=>{p=" ";const te=parseFloat(q.offset);s+=`${p}${100*te}% {\n`,p+=" ",Object.keys(q).forEach(fe=>{const Re=q[fe];switch(fe){case"offset":return;case"easing":return void(Re&&(s+=`${p}animation-timing-function: ${Re};\n`));default:return void(s+=`${p}${fe}: ${Re};\n`)}}),s+=`${p}}\n`}),s+="}\n";const F=document.createElement("style");return F.textContent=s,F}animate(t,e,r,s,p,F=[],q){const te=F.filter(Qt=>Qt instanceof OL),fe={};aL(r,s)&&te.forEach(Qt=>{let wn=Qt.currentSnapshot;Object.keys(wn).forEach(An=>fe[An]=wn[An])});const Re=function(n){let t={};return n&&(Array.isArray(n)?n:[n]).forEach(r=>{Object.keys(r).forEach(s=>{"offset"==s||"easing"==s||(t[s]=r[s])})}),t}(e=uL(t,e,fe));if(0==r)return new ste(t,Re);const $e="gen_css_kf_"+this._count++,rt=this.buildKeyframeElement(t,$e,e);(function(n){var t;const e=null===(t=n.getRootNode)||void 0===t?void 0:t.call(n);return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot?e:document.head})(t).appendChild(rt);const Tt=AL(t,e),Ft=new OL(t,e,$e,r,s,p,Re,Tt);return Ft.onDestroy(()=>{var n;(n=rt).parentNode.removeChild(n)}),Ft}}class NL{constructor(t,e,r,s){this.element=t,this.keyframes=e,this.options=r,this._specialStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,r){return t.animate(e,r)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:ZM(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}}class lte{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(BL().toString()),this._cssKeyframesDriver=new PL}validateStyleProperty(t){return UM(t)}matchesElement(t,e){return jM(t,e)}containsElement(t,e){return VM(t,e)}query(t,e,r){return HM(t,e,r)}computeStyle(t,e,r){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,r,s,p,F=[],q){if(!q&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,r,s,p,F);const Re={duration:r,delay:s,fill:0==s?"both":"forwards"};p&&(Re.easing=p);const $e={},rt=F.filter(Tt=>Tt instanceof NL);aL(r,s)&&rt.forEach(Tt=>{let Ft=Tt.currentSnapshot;Object.keys(Ft).forEach(Qt=>$e[Qt]=Ft[Qt])});const ft=AL(t,e=uL(t,e=e.map(Tt=>K6(Tt,!1)),$e));return new NL(t,e,Re,ft)}}function BL(){return qF()&&Element.prototype.animate||{}}let fte=(()=>{class n extends $F{constructor(e,r){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(r.body,{id:"0",encapsulation:Ye.None,styles:[],data:{animation:[]}})}build(e){const r=this._nextAnimationId.toString();this._nextAnimationId++;const s=Array.isArray(e)?WF(e):e;return FL(this._renderer,null,r,"register",[s]),new hte(r,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(Yn(Ig),Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class hte extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new pte(this._id,t,e||{},this._renderer)}}class pte{constructor(t,e,r,s){this.id=t,this.element=e,this._renderer=s,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",r)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return FL(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function FL(n,t,e,r,s){return n.setProperty(t,`@@${e}:${r}`,s)}const LL="@.disabled";let mte=(()=>{class n{constructor(e,r,s){this.delegate=e,this.engine=r,this._zone=s,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),r.onRemovalComplete=(p,F)=>{F&&F.parentNode(p)&&F.removeChild(p.parentNode,p)}}createRenderer(e,r){const p=this.delegate.createRenderer(e,r);if(!(e&&r&&r.data&&r.data.animation)){let Re=this._rendererCache.get(p);return Re||(Re=new UL("",p,this.engine),this._rendererCache.set(p,Re)),Re}const F=r.id,q=r.id+"-"+this._currentId;this._currentId++,this.engine.register(q,e);const te=Re=>{Array.isArray(Re)?Re.forEach(te):this.engine.registerTrigger(F,q,e,Re.name,Re)};return r.data.animation.forEach(te),new gte(this,q,p,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,r,s){e>=0&&er(s)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(p=>{const[F,q]=p;F(q)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([r,s]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(Yn(Ig),Yn(xE),Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class UL{constructor(t,e,r){this.namespaceId=t,this.delegate=e,this.engine=r,this.destroyNode=this.delegate.destroyNode?s=>e.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,r,s=!0){this.delegate.insertBefore(t,e,r),this.engine.onInsert(this.namespaceId,e,t,s)}removeChild(t,e,r){this.engine.onRemove(this.namespaceId,e,this.delegate,r)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,r,s){this.delegate.setAttribute(t,e,r,s)}removeAttribute(t,e,r){this.delegate.removeAttribute(t,e,r)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,r,s){this.delegate.setStyle(t,e,r,s)}removeStyle(t,e,r){this.delegate.removeStyle(t,e,r)}setProperty(t,e,r){"@"==e.charAt(0)&&e==LL?this.disableAnimations(t,!!r):this.delegate.setProperty(t,e,r)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,r){return this.delegate.listen(t,e,r)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class gte extends UL{constructor(t,e,r,s){super(e,r,s),this.factory=t,this.namespaceId=e}setProperty(t,e,r){"@"==e.charAt(0)?"."==e.charAt(1)&&e==LL?this.disableAnimations(t,r=void 0===r||!!r):this.engine.process(this.namespaceId,t,e.substr(1),r):this.delegate.setProperty(t,e,r)}listen(t,e,r){if("@"==e.charAt(0)){const s=function(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let p=e.substr(1),F="";return"@"!=p.charAt(0)&&([p,F]=function(n){const t=n.indexOf(".");return[n.substring(0,t),n.substr(t+1)]}(p)),this.engine.listen(this.namespaceId,s,p,F,q=>{this.factory.scheduleListenerCallback(q._data||-1,r,q)})}return this.delegate.listen(t,e,r)}}let vte=(()=>{class n extends xE{constructor(e,r,s){super(e.body,r,s)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa),Yn($M),Yn(tO))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const AE=new fo("AnimationModuleType"),jL=[{provide:$F,useClass:fte},{provide:tO,useFactory:function(){return new Iee}},{provide:xE,useClass:vte},{provide:Ig,useFactory:function(n,t,e){return new mte(n,t,e)},deps:[R7,xE,pa]}],VL=[{provide:$M,useFactory:function(){return"function"==typeof BL()?new lte:new PL}},{provide:AE,useValue:"BrowserAnimations"},...jL],HL=[{provide:$M,useClass:eL},{provide:AE,useValue:"NoopAnimations"},...jL];let Ete=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?HL:VL}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:VL,imports:[$C]}),n})();var Tte=Y(13410),Ate=Y(29923),$L=Y(41439),Ite=Y(52441),WL=Y(42145),H3=Y(5304),C_=Y(94612),Ste=Y(12627),b5=Y(28049),GL=Y(548),kte=Y(51307),Cte=Y(68939),cO=Y(63282);class Pb{constructor(t,e){this.id=t,this.url=e}}class lO extends Pb{constructor(t,e,r="imperative",s=null){super(t,e),this.navigationTrigger=r,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class M_ extends Pb{constructor(t,e,r){super(t,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class zL extends Pb{constructor(t,e,r){super(t,e),this.reason=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Mte extends Pb{constructor(t,e,r){super(t,e),this.error=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Ote extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Dte extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Pte extends Pb{constructor(t,e,r,s,p){super(t,e),this.urlAfterRedirects=r,this.state=s,this.shouldActivate=p}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Rte extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Nte extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class qL{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class KL{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Bte{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fte{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lte{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ute{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ZL{constructor(t,e,r){this.routerEvent=t,this.position=e,this.anchor=r}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const jc="primary";class jte{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function v5(n){return new jte(n)}const YL="ngNavigationCancelingError";function dO(n){const t=Error("NavigationCancelingError: "+n);return t[YL]=!0,t}function Hte(n,t,e){const r=e.path.split("/");if(r.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||r.lengthr[p]===s)}return n===t}function XL(n){return Array.prototype.concat.apply([],n)}function QL(n){return n.length>0?n[n.length-1]:null}function Gp(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function Sy(n){return y0(n)?n:j1(n)?(0,Tm.D)(Promise.resolve(n)):(0,yu.of)(n)}const Gte={exact:function nU(n,t,e){if(!W3(n.segments,t.segments)||!IE(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const r in t.children)if(!n.children[r]||!nU(n.children[r],t.children[r],e))return!1;return!0},subset:rU},eU={exact:function(n,t){return Iy(n,t)},subset:function(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>JL(n[e],t[e]))},ignored:()=>!0};function tU(n,t,e){return Gte[e.paths](n.root,t.root,e.matrixParams)&&eU[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function rU(n,t,e){return iU(n,t,t.segments,e)}function iU(n,t,e,r){if(n.segments.length>e.length){const s=n.segments.slice(0,e.length);return!(!W3(s,e)||t.hasChildren()||!IE(s,e,r))}if(n.segments.length===e.length){if(!W3(n.segments,e)||!IE(n.segments,e,r))return!1;for(const s in t.children)if(!n.children[s]||!rU(n.children[s],t.children[s],r))return!1;return!0}{const s=e.slice(0,n.segments.length),p=e.slice(n.segments.length);return!!(W3(n.segments,s)&&IE(n.segments,s,r)&&n.children[jc])&&iU(n.children[jc],t,p,r)}}function IE(n,t,e){return t.every((r,s)=>eU[e](n[s].parameters,r.parameters))}class $3{constructor(t,e,r){this.root=t,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=v5(this.queryParams)),this._queryParamMap}toString(){return Yte.serialize(this)}}class Qc{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Gp(e,(r,s)=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return SE(this)}}class O_{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=v5(this.parameters)),this._parameterMap}toString(){return uU(this)}}function W3(n,t){return n.length===t.length&&n.every((e,r)=>e.path===t[r].path)}class fO{}class sU{parse(t){const e=new sne(t);return new $3(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${D_(t.root,!0)}`,r=function(n){const t=Object.keys(n).map(e=>{const r=n[e];return Array.isArray(r)?r.map(s=>`${kE(e)}=${kE(s)}`).join("&"):`${kE(e)}=${kE(r)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);var n;return`${e}${r}${"string"==typeof t.fragment?`#${n=t.fragment,encodeURI(n)}`:""}`}}const Yte=new sU;function SE(n){return n.segments.map(t=>uU(t)).join("/")}function D_(n,t){if(!n.hasChildren())return SE(n);if(t){const e=n.children[jc]?D_(n.children[jc],!1):"",r=[];return Gp(n.children,(s,p)=>{p!==jc&&r.push(`${p}:${D_(s,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}{const e=function(n,t){let e=[];return Gp(n.children,(r,s)=>{s===jc&&(e=e.concat(t(r,s)))}),Gp(n.children,(r,s)=>{s!==jc&&(e=e.concat(t(r,s)))}),e}(n,(r,s)=>s===jc?[D_(n.children[jc],!1)]:[`${s}:${D_(r,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[jc]?`${SE(n)}/${e[0]}`:`${SE(n)}/(${e.join("//")})`}}function oU(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function kE(n){return oU(n).replace(/%3B/gi,";")}function hO(n){return oU(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function CE(n){return decodeURIComponent(n)}function aU(n){return CE(n.replace(/\+/g,"%20"))}function uU(n){return`${hO(n.path)}${function(n){return Object.keys(n).map(t=>`;${hO(t)}=${hO(n[t])}`).join("")}(n.parameters)}`}const ene=/^[^\/()?;=#]+/;function ME(n){const t=n.match(ene);return t?t[0]:""}const tne=/^[^=?&#]+/,rne=/^[^?&#]+/;class sne{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Qc([],{}):new Qc([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r[jc]=new Qc(t,e)),r}parseSegment(){const t=ME(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new O_(CE(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=ME(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){const s=ME(this.remaining);s&&(r=s,this.capture(r))}t[CE(e)]=CE(r)}parseQueryParam(t){const e=function(n){const t=n.match(tne);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){const F=function(n){const t=n.match(rne);return t?t[0]:""}(this.remaining);F&&(r=F,this.capture(r))}const s=aU(e),p=aU(r);if(t.hasOwnProperty(s)){let F=t[s];Array.isArray(F)||(F=[F],t[s]=F),F.push(p)}else t[s]=p}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=ME(this.remaining),s=this.remaining[r.length];if("/"!==s&&")"!==s&&";"!==s)throw new Error(`Cannot parse url '${this.url}'`);let p;r.indexOf(":")>-1?(p=r.substr(0,r.indexOf(":")),this.capture(p),this.capture(":")):t&&(p=jc);const F=this.parseChildren();e[p]=1===Object.keys(F).length?F[jc]:new Qc([],F),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class cU{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=pO(t,this._root);return e?e.children.map(r=>r.value):[]}firstChild(t){const e=pO(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=mO(t,this._root);return e.length<2?[]:e[e.length-2].children.map(s=>s.value).filter(s=>s!==t)}pathFromRoot(t){return mO(t,this._root).map(e=>e.value)}}function pO(n,t){if(n===t.value)return t;for(const e of t.children){const r=pO(n,e);if(r)return r}return null}function mO(n,t){if(n===t.value)return[t];for(const e of t.children){const r=mO(n,e);if(r.length)return r.unshift(t),r}return[]}class Rb{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function P_(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class lU extends cU{constructor(t,e){super(t),this.snapshot=e,gO(this,t)}toString(){return this.snapshot.toString()}}function dU(n,t){const e=function(n,t){const F=new OE([],{},{},"",{},jc,t,null,n.root,-1,{});return new hU("",new Rb(F,[]))}(n,t),r=new xd.X([new O_("",{})]),s=new xd.X({}),p=new xd.X({}),F=new xd.X({}),q=new xd.X(""),te=new ky(r,s,F,q,p,jc,t,e.root);return te.snapshot=e.root,new lU(new Rb(te,[]),e)}class ky{constructor(t,e,r,s,p,F,q,te){this.url=t,this.params=e,this.queryParams=r,this.fragment=s,this.data=p,this.outlet=F,this.component=q,this._futureSnapshot=te}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,ll.U)(t=>v5(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,ll.U)(t=>v5(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function fU(n,t="emptyOnly"){const e=n.pathFromRoot;let r=0;if("always"!==t)for(r=e.length-1;r>=1;){const s=e[r],p=e[r-1];if(s.routeConfig&&""===s.routeConfig.path)r--;else{if(p.component)break;r--}}return function(n){return n.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(e.slice(r))}class OE{constructor(t,e,r,s,p,F,q,te,fe,Re,$e){this.url=t,this.params=e,this.queryParams=r,this.fragment=s,this.data=p,this.outlet=F,this.component=q,this.routeConfig=te,this._urlSegment=fe,this._lastPathIndex=Re,this._resolve=$e}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=v5(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=v5(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class hU extends cU{constructor(t,e){super(e),this.url=t,gO(this,e)}toString(){return pU(this._root)}}function gO(n,t){t.value._routerState=n,t.children.forEach(e=>gO(n,e))}function pU(n){const t=n.children.length>0?` { ${n.children.map(pU).join(", ")} } `:"";return`${n.value}${t}`}function yO(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Iy(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Iy(t.params,e.params)||n.params.next(e.params),function(n,t){if(n.length!==t.length)return!1;for(let e=0;eIy(e.parameters,t[r].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||bO(n.parent,t.parent))}function DE(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const r=e.value;r._futureSnapshot=t.value;const s=function(n,t,e){return t.children.map(r=>{for(const s of e.children)if(n.shouldReuseRoute(r.value,s.value.snapshot))return DE(n,r,s);return DE(n,r)})}(n,t,e);return new Rb(r,s)}{if(n.shouldAttach(t.value)){const p=n.retrieve(t.value);if(null!==p){const F=p.route;return mU(t,F),F}}const r=function(n){return new ky(new xd.X(n.url),new xd.X(n.params),new xd.X(n.queryParams),new xd.X(n.fragment),new xd.X(n.data),n.outlet,n.component,n)}(t.value),s=t.children.map(p=>DE(n,p));return new Rb(r,s)}}function mU(n,t){if(n.value.routeConfig!==t.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(n.children.length!==t.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");t.value._futureSnapshot=n.value;for(let e=0;e{p[q]=Array.isArray(F)?F.map(te=>`${te}`):`${F}`}),new $3(e.root===n?t:gU(e.root,n,t),p,s)}function gU(n,t,e){const r={};return Gp(n.children,(s,p)=>{r[p]=s===t?e:gU(s,t,e)}),new Qc(n.segments,r)}class yU{constructor(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&PE(r[0]))throw new Error("Root segment cannot have matrix parameters");const s=r.find(R_);if(s&&s!==QL(r))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class _O{constructor(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r}}function bU(n,t,e){if(n||(n=new Qc([],{})),0===n.segments.length&&n.hasChildren())return RE(n,t,e);const r=function(n,t,e){let r=0,s=t;const p={match:!1,pathIndex:0,commandIndex:0};for(;s=e.length)return p;const F=n.segments[s],q=e[r];if(R_(q))break;const te=`${q}`,fe=r0&&void 0===te)break;if(te&&fe&&"object"==typeof fe&&void 0===fe.outlets){if(!_U(te,fe,F))return p;r+=2}else{if(!_U(te,{},F))return p;r++}s++}return{match:!0,pathIndex:s,commandIndex:r}}(n,t,e),s=e.slice(r.commandIndex);if(r.match&&r.pathIndex{"string"==typeof p&&(p=[p]),null!==p&&(s[F]=bU(n.children[F],t,p))}),Gp(n.children,(p,F)=>{void 0===r[F]&&(s[F]=p)}),new Qc(n.segments,s)}}function wO(n,t,e){const r=n.segments.slice(0,t);let s=0;for(;s{"string"==typeof e&&(e=[e]),null!==e&&(t[r]=wO(new Qc([],{}),0,e))}),t}function vU(n){const t={};return Gp(n,(e,r)=>t[r]=`${e}`),t}function _U(n,t,e){return n==e.path&&Iy(t,e.parameters)}class vne{constructor(t,e,r,s){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=s}activate(t){const e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),yO(this.futureState.root),this.activateChildRoutes(e,r,t)}deactivateChildRoutes(t,e,r){const s=P_(e);t.children.forEach(p=>{const F=p.value.outlet;this.deactivateRoutes(p,s[F],r),delete s[F]}),Gp(s,(p,F)=>{this.deactivateRouteAndItsChildren(p,r)})}deactivateRoutes(t,e,r){const s=t.value,p=e?e.value:null;if(s===p)if(s.component){const F=r.getContext(s.outlet);F&&this.deactivateChildRoutes(t,e,F.children)}else this.deactivateChildRoutes(t,e,r);else p&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const r=e.getContext(t.value.outlet);if(r&&r.outlet){const s=r.outlet.detach(),p=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:p})}}deactivateRouteAndOutlet(t,e){const r=e.getContext(t.value.outlet),s=r&&t.value.component?r.children:e,p=P_(t);for(const F of Object.keys(p))this.deactivateRouteAndItsChildren(p[F],s);r&&r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated(),r.attachRef=null,r.resolver=null,r.route=null)}activateChildRoutes(t,e,r){const s=P_(e);t.children.forEach(p=>{this.activateRoutes(p,s[p.value.outlet],r),this.forwardEvent(new Ute(p.value.snapshot))}),t.children.length&&this.forwardEvent(new Fte(t.value.snapshot))}activateRoutes(t,e,r){const s=t.value,p=e?e.value:null;if(yO(s),s===p)if(s.component){const F=r.getOrCreateContext(s.outlet);this.activateChildRoutes(t,e,F.children)}else this.activateChildRoutes(t,e,r);else if(s.component){const F=r.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const q=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),F.children.onOutletReAttached(q.contexts),F.attachRef=q.componentRef,F.route=q.route.value,F.outlet&&F.outlet.attach(q.componentRef,q.route.value),wU(q.route)}else{const q=function(n){for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(s.snapshot),te=q?q.module.componentFactoryResolver:null;F.attachRef=null,F.route=s,F.resolver=te,F.outlet&&F.outlet.activateWith(s,te),this.activateChildRoutes(t,null,F.children)}}else this.activateChildRoutes(t,null,r)}}function wU(n){yO(n.value),n.children.forEach(wU)}class xO{constructor(t,e){this.routes=t,this.module=e}}function Z6(n){return"function"==typeof n}function G3(n){return n instanceof $3}const N_=Symbol("INITIAL_VALUE");function B_(){return(0,Rg.w)(n=>(0,GC.aj)(n.map(t=>t.pipe((0,p1.q)(1),(0,a5.O)(N_)))).pipe((0,WL.R)((t,e)=>{let r=!1;return e.reduce((s,p,F)=>s!==N_?s:(p===N_&&(r=!0),r||!1!==p&&F!==e.length-1&&!G3(p)?s:p),t)},N_),(0,lp.h)(t=>t!==N_),(0,ll.U)(t=>G3(t)?t:!0===t),(0,p1.q)(1)))}let xU=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,r){1&e&&qn(0,"router-outlet")},directives:function(){return[SO]},encapsulation:2}),n})();function EU(n,t=""){for(let e=0;eW2(r)===t);return e.push(...n.filter(r=>W2(r)!==t)),e}const AU={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function NE(n,t,e){var r;if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?Object.assign({},AU):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const p=(t.matcher||Hte)(e,n,t);if(!p)return Object.assign({},AU);const F={};Gp(p.posParams,(te,fe)=>{F[fe]=te.path});const q=p.consumed.length>0?Object.assign(Object.assign({},F),p.consumed[p.consumed.length-1].parameters):F;return{matched:!0,consumedSegments:p.consumed,lastChild:p.consumed.length,parameters:q,positionalParamSegments:null!==(r=p.posParams)&&void 0!==r?r:{}}}function BE(n,t,e,r,s="corrected"){if(e.length>0&&function(n,t,e){return e.some(r=>FE(n,t,r)&&W2(r)!==jc)}(n,e,r)){const F=new Qc(t,function(n,t,e,r){const s={};s[jc]=r,r._sourceSegment=n,r._segmentIndexShift=t.length;for(const p of e)if(""===p.path&&W2(p)!==jc){const F=new Qc([],{});F._sourceSegment=n,F._segmentIndexShift=t.length,s[W2(p)]=F}return s}(n,t,r,new Qc(e,n.children)));return F._sourceSegment=n,F._segmentIndexShift=t.length,{segmentGroup:F,slicedSegments:[]}}if(0===e.length&&function(n,t,e){return e.some(r=>FE(n,t,r))}(n,e,r)){const F=new Qc(n.segments,function(n,t,e,r,s,p){const F={};for(const q of r)if(FE(n,e,q)&&!s[W2(q)]){const te=new Qc([],{});te._sourceSegment=n,te._segmentIndexShift="legacy"===p?n.segments.length:t.length,F[W2(q)]=te}return Object.assign(Object.assign({},s),F)}(n,t,e,r,n.children,s));return F._sourceSegment=n,F._segmentIndexShift=t.length,{segmentGroup:F,slicedSegments:e}}const p=new Qc(n.segments,n.children);return p._sourceSegment=n,p._segmentIndexShift=t.length,{segmentGroup:p,slicedSegments:e}}function FE(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function IU(n,t,e,r){return!!(W2(n)===r||r!==jc&&FE(t,e,n))&&("**"===n.path||NE(t,n,e).matched)}function SU(n,t,e){return 0===t.length&&!n.children[e]}class F_{constructor(t){this.segmentGroup=t||null}}class kU{constructor(t){this.urlTree=t}}function LE(n){return new O.y(t=>t.error(new F_(n)))}function CU(n){return new O.y(t=>t.error(new kU(n)))}function Dne(n){return new O.y(t=>t.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${n}'`)))}class Nne{constructor(t,e,r,s,p){this.configLoader=e,this.urlSerializer=r,this.urlTree=s,this.config=p,this.allowRedirects=!0,this.ngModule=t.get(F2)}apply(){const t=BE(this.urlTree.root,[],[],this.config).segmentGroup,e=new Qc(t.segments,t.children);return this.expandSegmentGroup(this.ngModule,this.config,e,jc).pipe((0,ll.U)(p=>this.createUrlTree(TO(p),this.urlTree.queryParams,this.urlTree.fragment))).pipe((0,H3.K)(p=>{if(p instanceof kU)return this.allowRedirects=!1,this.match(p.urlTree);throw p instanceof F_?this.noMatchError(p):p}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,jc).pipe((0,ll.U)(s=>this.createUrlTree(TO(s),t.queryParams,t.fragment))).pipe((0,H3.K)(s=>{throw s instanceof F_?this.noMatchError(s):s}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,r){const s=t.segments.length>0?new Qc([],{[jc]:t}):t;return new $3(s,e,r)}expandSegmentGroup(t,e,r,s){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(t,e,r).pipe((0,ll.U)(p=>new Qc([],p))):this.expandSegment(t,r,e,r.segments,s,!0)}expandChildren(t,e,r){const s=[];for(const p of Object.keys(r.children))"primary"===p?s.unshift(p):s.push(p);return(0,Tm.D)(s).pipe((0,C_.b)(p=>{const F=r.children[p],q=TU(e,p);return this.expandSegmentGroup(t,q,F,p).pipe((0,ll.U)(te=>({segment:te,outlet:p})))}),(0,WL.R)((p,F)=>(p[F.outlet]=F.segment,p),{}),(0,Ste.Z)())}expandSegment(t,e,r,s,p,F){return(0,Tm.D)(r).pipe((0,C_.b)(q=>this.expandSegmentAgainstRoute(t,e,r,q,s,p,F).pipe((0,H3.K)(fe=>{if(fe instanceof F_)return(0,yu.of)(null);throw fe}))),(0,b5.P)(q=>!!q),(0,H3.K)((q,te)=>{if(q instanceof Tte.K||"EmptyError"===q.name){if(SU(e,s,p))return(0,yu.of)(new Qc([],{}));throw new F_(e)}throw q}))}expandSegmentAgainstRoute(t,e,r,s,p,F,q){return IU(s,e,p,F)?void 0===s.redirectTo?this.matchSegmentAgainstRoute(t,e,s,p,F):q&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F):LE(e):LE(e)}expandSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F){return"**"===s.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,r,s,F):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,r,s){const p=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?CU(p):this.lineralizeSegments(r,p).pipe((0,z1.zg)(F=>{const q=new Qc(F,{});return this.expandSegment(t,q,e,F,s,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F){const{matched:q,consumedSegments:te,lastChild:fe,positionalParamSegments:Re}=NE(e,s,p);if(!q)return LE(e);const $e=this.applyRedirectCommands(te,s.redirectTo,Re);return s.redirectTo.startsWith("/")?CU($e):this.lineralizeSegments(s,$e).pipe((0,z1.zg)(rt=>this.expandSegment(t,e,r,rt.concat(p.slice(fe)),F,!1)))}matchSegmentAgainstRoute(t,e,r,s,p){if("**"===r.path)return r.loadChildren?(r._loadedConfig?(0,yu.of)(r._loadedConfig):this.configLoader.load(t.injector,r)).pipe((0,ll.U)(rt=>(r._loadedConfig=rt,new Qc(s,{})))):(0,yu.of)(new Qc(s,{}));const{matched:F,consumedSegments:q,lastChild:te}=NE(e,r,s);if(!F)return LE(e);const fe=s.slice(te);return this.getChildConfig(t,r,s).pipe((0,z1.zg)($e=>{const rt=$e.module,ft=$e.routes,{segmentGroup:Tt,slicedSegments:Ft}=BE(e,q,fe,ft),Qt=new Qc(Tt.segments,Tt.children);if(0===Ft.length&&Qt.hasChildren())return this.expandChildren(rt,ft,Qt).pipe((0,ll.U)(_r=>new Qc(q,_r)));if(0===ft.length&&0===Ft.length)return(0,yu.of)(new Qc(q,{}));const wn=W2(r)===p;return this.expandSegment(rt,Qt,ft,Ft,wn?jc:p,!0).pipe((0,ll.U)(gr=>new Qc(q.concat(gr.segments),gr.children)))}))}getChildConfig(t,e,r){return e.children?(0,yu.of)(new xO(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?(0,yu.of)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,r).pipe((0,z1.zg)(s=>{return s?this.configLoader.load(t.injector,e).pipe((0,ll.U)(p=>(e._loadedConfig=p,p))):(n=e,new O.y(t=>t.error(dO(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`))));var n})):(0,yu.of)(new xO([],t))}runCanLoadGuards(t,e,r){const s=e.canLoad;if(!s||0===s.length)return(0,yu.of)(!0);const p=s.map(F=>{const q=t.get(F);let te;if((n=q)&&Z6(n.canLoad))te=q.canLoad(e,r);else{if(!Z6(q))throw new Error("Invalid CanLoad guard");te=q(e,r)}var n;return Sy(te)});return(0,yu.of)(p).pipe(B_(),(0,Vp.b)(F=>{if(!G3(F))return;const q=dO(`Redirecting to "${this.urlSerializer.serialize(F)}"`);throw q.url=F,q}),(0,ll.U)(F=>!0===F))}lineralizeSegments(t,e){let r=[],s=e.root;for(;;){if(r=r.concat(s.segments),0===s.numberOfChildren)return(0,yu.of)(r);if(s.numberOfChildren>1||!s.children[jc])return Dne(t.redirectTo);s=s.children[jc]}}applyRedirectCommands(t,e,r){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,r)}applyRedirectCreatreUrlTree(t,e,r,s){const p=this.createSegmentGroup(t,e.root,r,s);return new $3(p,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const r={};return Gp(t,(s,p)=>{if("string"==typeof s&&s.startsWith(":")){const q=s.substring(1);r[p]=e[q]}else r[p]=s}),r}createSegmentGroup(t,e,r,s){const p=this.createSegments(t,e.segments,r,s);let F={};return Gp(e.children,(q,te)=>{F[te]=this.createSegmentGroup(t,q,r,s)}),new Qc(p,F)}createSegments(t,e,r,s){return e.map(p=>p.path.startsWith(":")?this.findPosParam(t,p,s):this.findOrReturn(p,r))}findPosParam(t,e,r){const s=r[e.path.substring(1)];if(!s)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return s}findOrReturn(t,e){let r=0;for(const s of e){if(s.path===t.path)return e.splice(r),s;r++}return t}}function TO(n){const t={};for(const r of Object.keys(n.children)){const p=TO(n.children[r]);(p.segments.length>0||p.hasChildren())&&(t[r]=p)}return function(n){if(1===n.numberOfChildren&&n.children[jc]){const t=n.children[jc];return new Qc(n.segments.concat(t.segments),t.children)}return n}(new Qc(n.segments,t))}class MU{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class UE{constructor(t,e){this.component=t,this.route=e}}function Lne(n,t,e){const r=n._root;return L_(r,t?t._root:null,e,[r.value])}function jE(n,t,e){const r=function(n){if(!n)return null;for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(t);return(r?r.module.injector:e).get(n)}function L_(n,t,e,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const p=P_(t);return n.children.forEach(F=>{(function(n,t,e,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const p=n.value,F=t?t.value:null,q=e?e.getContext(n.value.outlet):null;if(F&&p.routeConfig===F.routeConfig){const te=function(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!W3(n.url,t.url);case"pathParamsOrQueryParamsChange":return!W3(n.url,t.url)||!Iy(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!bO(n,t)||!Iy(n.queryParams,t.queryParams);default:return!bO(n,t)}}(F,p,p.routeConfig.runGuardsAndResolvers);te?s.canActivateChecks.push(new MU(r)):(p.data=F.data,p._resolvedData=F._resolvedData),L_(n,t,p.component?q?q.children:null:e,r,s),te&&q&&q.outlet&&q.outlet.isActivated&&s.canDeactivateChecks.push(new UE(q.outlet.component,F))}else F&&U_(t,q,s),s.canActivateChecks.push(new MU(r)),L_(n,null,p.component?q?q.children:null:e,r,s)})(F,p[F.value.outlet],e,r.concat([F.value]),s),delete p[F.value.outlet]}),Gp(p,(F,q)=>U_(F,e.getContext(q),s)),s}function U_(n,t,e){const r=P_(n),s=n.value;Gp(r,(p,F)=>{U_(p,s.component?t?t.children.getContext(F):null:t,e)}),e.canDeactivateChecks.push(new UE(s.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,s))}class Jne{}function OU(n){return new O.y(t=>t.error(n))}class Qne{constructor(t,e,r,s,p,F){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=s,this.paramsInheritanceStrategy=p,this.relativeLinkResolution=F}recognize(){const t=BE(this.urlTree.root,[],[],this.config.filter(F=>void 0===F.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,jc);if(null===e)return null;const r=new OE([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},jc,this.rootComponentType,null,this.urlTree.root,-1,{}),s=new Rb(r,e),p=new hU(this.url,s);return this.inheritParamsAndData(p._root),p}inheritParamsAndData(t){const e=t.value,r=fU(e,this.paramsInheritanceStrategy);e.params=Object.freeze(r.params),e.data=Object.freeze(r.data),t.children.forEach(s=>this.inheritParamsAndData(s))}processSegmentGroup(t,e,r){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,r)}processChildren(t,e){const r=[];for(const p of Object.keys(e.children)){const F=e.children[p],q=TU(t,p),te=this.processSegmentGroup(q,F,p);if(null===te)return null;r.push(...te)}const s=DU(r);return s.sort((t,e)=>t.value.outlet===jc?-1:e.value.outlet===jc?1:t.value.outlet.localeCompare(e.value.outlet)),s}processSegment(t,e,r,s){for(const p of t){const F=this.processSegmentAgainstRoute(p,e,r,s);if(null!==F)return F}return SU(e,r,s)?[]:null}processSegmentAgainstRoute(t,e,r,s){if(t.redirectTo||!IU(t,e,r,s))return null;let p,F=[],q=[];if("**"===t.path){const ft=r.length>0?QL(r).parameters:{};p=new OE(r,ft,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,NU(t),W2(t),t.component,t,PU(e),RU(e)+r.length,BU(t))}else{const ft=NE(e,t,r);if(!ft.matched)return null;F=ft.consumedSegments,q=r.slice(ft.lastChild),p=new OE(F,ft.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,NU(t),W2(t),t.component,t,PU(e),RU(e)+F.length,BU(t))}const te=(n=t).children?n.children:n.loadChildren?n._loadedConfig.routes:[],{segmentGroup:fe,slicedSegments:Re}=BE(e,F,q,te.filter(ft=>void 0===ft.redirectTo),this.relativeLinkResolution);var n;if(0===Re.length&&fe.hasChildren()){const ft=this.processChildren(te,fe);return null===ft?null:[new Rb(p,ft)]}if(0===te.length&&0===Re.length)return[new Rb(p,[])];const $e=W2(t)===s,rt=this.processSegment(te,fe,Re,$e?jc:s);return null===rt?null:[new Rb(p,rt)]}}function nre(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function DU(n){const t=[],e=new Set;for(const r of n){if(!nre(r)){t.push(r);continue}const s=t.find(p=>r.value.routeConfig===p.value.routeConfig);void 0!==s?(s.children.push(...r.children),e.add(s)):t.push(r)}for(const r of e){const s=DU(r.children);t.push(new Rb(r.value,s))}return t.filter(r=>!e.has(r))}function PU(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function RU(n){let t=n,e=t._segmentIndexShift?t._segmentIndexShift:0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift?t._segmentIndexShift:0;return e-1}function NU(n){return n.data||{}}function BU(n){return n.resolve||{}}function AO(n){return(0,Rg.w)(t=>{const e=n(t);return e?(0,Tm.D)(e).pipe((0,ll.U)(()=>t)):(0,yu.of)(t)})}class lre extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const IO=new fo("ROUTES");class FU{constructor(t,e,r,s){this.loader=t,this.compiler=e,this.onLoadStartListener=r,this.onLoadEndListener=s}load(t,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const s=this.loadModuleFactory(e.loadChildren).pipe((0,ll.U)(p=>{this.onLoadEndListener&&this.onLoadEndListener(e);const F=p.create(t);return new xO(XL(F.injector.get(IO,void 0,Ee.Self|Ee.Optional)).map(EO),F)}),(0,H3.K)(p=>{throw e._loader$=void 0,p}));return e._loader$=new Ite.c(s,()=>new ie.xQ).pipe((0,kte.x)()),e._loader$}loadModuleFactory(t){return"string"==typeof t?(0,Tm.D)(this.loader.load(t)):Sy(t()).pipe((0,z1.zg)(e=>e instanceof Ax?(0,yu.of)(e):(0,Tm.D)(this.compiler.compileModuleAsync(e))))}}class dre{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new _5,this.attachRef=null}}class _5{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const r=this.getOrCreateContext(t);r.outlet=e,this.contexts.set(t,r)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new dre,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class hre{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function pre(n){throw n}function mre(n,t,e){return t.parse("/")}function LU(n,t){return(0,yu.of)(null)}const gre={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},yre={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let _0=(()=>{class n{constructor(e,r,s,p,F,q,te,fe){this.rootComponentType=e,this.urlSerializer=r,this.rootContexts=s,this.location=p,this.config=fe,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new ie.xQ,this.errorHandler=pre,this.malformedUriErrorHandler=mre,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:LU,afterPreactivation:LU},this.urlHandlingStrategy=new hre,this.routeReuseStrategy=new lre,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=F.get(F2),this.console=F.get(o7);const rt=F.get(pa);this.isNgZoneEnabled=rt instanceof pa&&pa.isInAngularZone(),this.resetConfig(fe),this.currentUrlTree=new $3(new Qc([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new FU(q,te,ft=>this.triggerEvent(new qL(ft)),ft=>this.triggerEvent(new KL(ft))),this.routerState=dU(this.currentUrlTree,this.rootComponentType),this.transitions=new xd.X({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var e;return null===(e=this.location.getState())||void 0===e?void 0:e.\u0275routerPageId}setupNavigations(e){const r=this.events;return e.pipe((0,lp.h)(s=>0!==s.id),(0,ll.U)(s=>Object.assign(Object.assign({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),(0,Rg.w)(s=>{let p=!1,F=!1;return(0,yu.of)(s).pipe((0,Vp.b)(q=>{this.currentNavigation={id:q.id,initialUrl:q.currentRawUrl,extractedUrl:q.extractedUrl,trigger:q.source,extras:q.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),(0,Rg.w)(q=>{const te=this.browserUrlTree.toString(),fe=!this.navigated||q.extractedUrl.toString()!==te||te!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||fe)&&this.urlHandlingStrategy.shouldProcessUrl(q.rawUrl))return VE(q.source)&&(this.browserUrlTree=q.extractedUrl),(0,yu.of)(q).pipe((0,Rg.w)($e=>{const rt=this.transitions.getValue();return r.next(new lO($e.id,this.serializeUrl($e.extractedUrl),$e.source,$e.restoredState)),rt!==this.transitions.getValue()?o5.E:Promise.resolve($e)}),function(n,t,e,r){return(0,Rg.w)(s=>function(n,t,e,r,s){return new Nne(n,t,e,r,s).apply()}(n,t,e,s.extractedUrl,r).pipe((0,ll.U)(p=>Object.assign(Object.assign({},s),{urlAfterRedirects:p}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),(0,Vp.b)($e=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:$e.urlAfterRedirects})}),function(n,t,e,r,s){return(0,z1.zg)(p=>function(n,t,e,r,s="emptyOnly",p="legacy"){try{const F=new Qne(n,t,e,r,s,p).recognize();return null===F?OU(new Jne):(0,yu.of)(F)}catch(F){return OU(F)}}(n,t,p.urlAfterRedirects,e(p.urlAfterRedirects),r,s).pipe((0,ll.U)(F=>Object.assign(Object.assign({},p),{targetSnapshot:F}))))}(this.rootComponentType,this.config,$e=>this.serializeUrl($e),this.paramsInheritanceStrategy,this.relativeLinkResolution),(0,Vp.b)($e=>{"eager"===this.urlUpdateStrategy&&($e.extras.skipLocationChange||this.setBrowserUrl($e.urlAfterRedirects,$e),this.browserUrlTree=$e.urlAfterRedirects);const rt=new Ote($e.id,this.serializeUrl($e.extractedUrl),this.serializeUrl($e.urlAfterRedirects),$e.targetSnapshot);r.next(rt)}));if(fe&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:rt,extractedUrl:ft,source:Tt,restoredState:Ft,extras:Qt}=q,wn=new lO(rt,this.serializeUrl(ft),Tt,Ft);r.next(wn);const An=dU(ft,this.rootComponentType).snapshot;return(0,yu.of)(Object.assign(Object.assign({},q),{targetSnapshot:An,urlAfterRedirects:ft,extras:Object.assign(Object.assign({},Qt),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=q.rawUrl,this.browserUrlTree=q.urlAfterRedirects,q.resolve(null),o5.E}),AO(q=>{const{targetSnapshot:te,id:fe,extractedUrl:Re,rawUrl:$e,extras:{skipLocationChange:rt,replaceUrl:ft}}=q;return this.hooks.beforePreactivation(te,{navigationId:fe,appliedUrlTree:Re,rawUrlTree:$e,skipLocationChange:!!rt,replaceUrl:!!ft})}),(0,Vp.b)(q=>{const te=new Dte(q.id,this.serializeUrl(q.extractedUrl),this.serializeUrl(q.urlAfterRedirects),q.targetSnapshot);this.triggerEvent(te)}),(0,ll.U)(q=>Object.assign(Object.assign({},q),{guards:Lne(q.targetSnapshot,q.currentSnapshot,this.rootContexts)})),function(n,t){return(0,z1.zg)(e=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:p,canDeactivateChecks:F}}=e;return 0===F.length&&0===p.length?(0,yu.of)(Object.assign(Object.assign({},e),{guardsResult:!0})):function(n,t,e,r){return(0,Tm.D)(n).pipe((0,z1.zg)(s=>function(n,t,e,r,s){const p=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!p||0===p.length)return(0,yu.of)(!0);const F=p.map(q=>{const te=jE(q,t,s);let fe;if(function(n){return n&&Z6(n.canDeactivate)}(te))fe=Sy(te.canDeactivate(n,t,e,r));else{if(!Z6(te))throw new Error("Invalid CanDeactivate guard");fe=Sy(te(n,t,e,r))}return fe.pipe((0,b5.P)())});return(0,yu.of)(F).pipe(B_())}(s.component,s.route,e,t,r)),(0,b5.P)(s=>!0!==s,!0))}(F,r,s,n).pipe((0,z1.zg)(q=>q&&function(n){return"boolean"==typeof n}(q)?function(n,t,e,r){return(0,Tm.D)(t).pipe((0,C_.b)(s=>(0,Ate.z)(function(n,t){return null!==n&&t&&t(new Bte(n)),(0,yu.of)(!0)}(s.route.parent,r),function(n,t){return null!==n&&t&&t(new Lte(n)),(0,yu.of)(!0)}(s.route,r),function(n,t,e){const r=t[t.length-1],p=t.slice(0,t.length-1).reverse().map(F=>function(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(F)).filter(F=>null!==F).map(F=>(0,$L.P)(()=>{const q=F.guards.map(te=>{const fe=jE(te,F.node,e);let Re;if(function(n){return n&&Z6(n.canActivateChild)}(fe))Re=Sy(fe.canActivateChild(r,n));else{if(!Z6(fe))throw new Error("Invalid CanActivateChild guard");Re=Sy(fe(r,n))}return Re.pipe((0,b5.P)())});return(0,yu.of)(q).pipe(B_())}));return(0,yu.of)(p).pipe(B_())}(n,s.path,e),function(n,t,e){const r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||0===r.length)return(0,yu.of)(!0);const s=r.map(p=>(0,$L.P)(()=>{const F=jE(p,t,e);let q;if(function(n){return n&&Z6(n.canActivate)}(F))q=Sy(F.canActivate(t,n));else{if(!Z6(F))throw new Error("Invalid CanActivate guard");q=Sy(F(t,n))}return q.pipe((0,b5.P)())}));return(0,yu.of)(s).pipe(B_())}(n,s.route,e))),(0,b5.P)(s=>!0!==s,!0))}(r,p,n,t):(0,yu.of)(q)),(0,ll.U)(q=>Object.assign(Object.assign({},e),{guardsResult:q})))})}(this.ngModule.injector,q=>this.triggerEvent(q)),(0,Vp.b)(q=>{if(G3(q.guardsResult)){const fe=dO(`Redirecting to "${this.serializeUrl(q.guardsResult)}"`);throw fe.url=q.guardsResult,fe}const te=new Pte(q.id,this.serializeUrl(q.extractedUrl),this.serializeUrl(q.urlAfterRedirects),q.targetSnapshot,!!q.guardsResult);this.triggerEvent(te)}),(0,lp.h)(q=>!!q.guardsResult||(this.restoreHistory(q),this.cancelNavigationTransition(q,""),!1)),AO(q=>{if(q.guards.canActivateChecks.length)return(0,yu.of)(q).pipe((0,Vp.b)(te=>{const fe=new Rte(te.id,this.serializeUrl(te.extractedUrl),this.serializeUrl(te.urlAfterRedirects),te.targetSnapshot);this.triggerEvent(fe)}),(0,Rg.w)(te=>{let fe=!1;return(0,yu.of)(te).pipe(function(n,t){return(0,z1.zg)(e=>{const{targetSnapshot:r,guards:{canActivateChecks:s}}=e;if(!s.length)return(0,yu.of)(e);let p=0;return(0,Tm.D)(s).pipe((0,C_.b)(F=>function(n,t,e,r){return function(n,t,e,r){const s=Object.keys(n);if(0===s.length)return(0,yu.of)({});const p={};return(0,Tm.D)(s).pipe((0,z1.zg)(F=>function(n,t,e,r){const s=jE(n,t,r);return Sy(s.resolve?s.resolve(t,e):s(t,e))}(n[F],t,e,r).pipe((0,Vp.b)(q=>{p[F]=q}))),(0,GL.h)(1),(0,z1.zg)(()=>Object.keys(p).length===s.length?(0,yu.of)(p):o5.E))}(n._resolve,n,t,r).pipe((0,ll.U)(p=>(n._resolvedData=p,n.data=Object.assign(Object.assign({},n.data),fU(n,e).resolve),null)))}(F.route,r,n,t)),(0,Vp.b)(()=>p++),(0,GL.h)(1),(0,z1.zg)(F=>p===s.length?(0,yu.of)(e):o5.E))})}(this.paramsInheritanceStrategy,this.ngModule.injector),(0,Vp.b)({next:()=>fe=!0,complete:()=>{fe||(this.restoreHistory(te),this.cancelNavigationTransition(te,"At least one route resolver didn't emit any value."))}}))}),(0,Vp.b)(te=>{const fe=new Nte(te.id,this.serializeUrl(te.extractedUrl),this.serializeUrl(te.urlAfterRedirects),te.targetSnapshot);this.triggerEvent(fe)}))}),AO(q=>{const{targetSnapshot:te,id:fe,extractedUrl:Re,rawUrl:$e,extras:{skipLocationChange:rt,replaceUrl:ft}}=q;return this.hooks.afterPreactivation(te,{navigationId:fe,appliedUrlTree:Re,rawUrlTree:$e,skipLocationChange:!!rt,replaceUrl:!!ft})}),(0,ll.U)(q=>{const te=function(n,t,e){const r=DE(n,t._root,e?e._root:void 0);return new lU(r,t)}(this.routeReuseStrategy,q.targetSnapshot,q.currentRouterState);return Object.assign(Object.assign({},q),{targetRouterState:te})}),(0,Vp.b)(q=>{this.currentUrlTree=q.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(q.urlAfterRedirects,q.rawUrl),this.routerState=q.targetRouterState,"deferred"===this.urlUpdateStrategy&&(q.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,q),this.browserUrlTree=q.urlAfterRedirects)}),((n,t,e)=>(0,ll.U)(r=>(new vne(t,r.targetRouterState,r.currentRouterState,e).activate(n),r)))(this.rootContexts,this.routeReuseStrategy,q=>this.triggerEvent(q)),(0,Vp.b)({next(){p=!0},complete(){p=!0}}),(0,Cte.x)(()=>{var q;if(!p&&!F){const te=`Navigation ID ${s.id} is not equal to the current navigation id ${this.navigationId}`;"replace"===this.canceledNavigationResolution?(this.restoreHistory(s),this.cancelNavigationTransition(s,te)):this.cancelNavigationTransition(s,te)}(null===(q=this.currentNavigation)||void 0===q?void 0:q.id)===s.id&&(this.currentNavigation=null)}),(0,H3.K)(q=>{if(F=!0,function(n){return n&&n[YL]}(q)){const te=G3(q.url);te||(this.navigated=!0,this.restoreHistory(s,!0));const fe=new zL(s.id,this.serializeUrl(s.extractedUrl),q.message);r.next(fe),te?setTimeout(()=>{const Re=this.urlHandlingStrategy.merge(q.url,this.rawUrlTree),$e={skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||VE(s.source)};this.scheduleNavigation(Re,"imperative",null,$e,{resolve:s.resolve,reject:s.reject,promise:s.promise})},0):s.resolve(!1)}else{this.restoreHistory(s,!0);const te=new Mte(s.id,this.serializeUrl(s.extractedUrl),q);r.next(te);try{s.resolve(this.errorHandler(q))}catch(fe){s.reject(fe)}}return o5.E}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}getTransition(){const e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const r=this.extractLocationChangeInfoFromEvent(e);this.shouldScheduleNavigation(this.lastLocationChangeInfo,r)&&setTimeout(()=>{const{source:s,state:p,urlTree:F}=r,q={replaceUrl:!0};if(p){const te=Object.assign({},p);delete te.navigationId,delete te.\u0275routerPageId,0!==Object.keys(te).length&&(q.state=te)}this.scheduleNavigation(F,s,p,q)},0),this.lastLocationChangeInfo=r}))}extractLocationChangeInfoFromEvent(e){var r;return{source:"popstate"===e.type?"popstate":"hashchange",urlTree:this.parseUrl(e.url),state:(null===(r=e.state)||void 0===r?void 0:r.navigationId)?e.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(e,r){if(!e)return!0;const s=r.urlTree.toString()===e.urlTree.toString();return r.transitionId!==e.transitionId||!s||!("hashchange"===r.source&&"popstate"===e.source||"popstate"===r.source&&"hashchange"===e.source)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){EU(e),this.config=e.map(EO),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,r={}){const{relativeTo:s,queryParams:p,fragment:F,queryParamsHandling:q,preserveFragment:te}=r,fe=s||this.routerState.root,Re=te?this.currentUrlTree.fragment:F;let $e=null;switch(q){case"merge":$e=Object.assign(Object.assign({},this.currentUrlTree.queryParams),p);break;case"preserve":$e=this.currentUrlTree.queryParams;break;default:$e=p||null}return null!==$e&&($e=this.removeEmptyProps($e)),function(n,t,e,r,s){if(0===e.length)return vO(t.root,t.root,t,r,s);const p=function(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new yU(!0,0,n);let t=0,e=!1;const r=n.reduce((s,p,F)=>{if("object"==typeof p&&null!=p){if(p.outlets){const q={};return Gp(p.outlets,(te,fe)=>{q[fe]="string"==typeof te?te.split("/"):te}),[...s,{outlets:q}]}if(p.segmentPath)return[...s,p.segmentPath]}return"string"!=typeof p?[...s,p]:0===F?(p.split("/").forEach((q,te)=>{0==te&&"."===q||(0==te&&""===q?e=!0:".."===q?t++:""!=q&&s.push(q))}),s):[...s,p]},[]);return new yU(e,t,r)}(e);if(p.toRoot())return vO(t.root,new Qc([],{}),t,r,s);const F=function(n,t,e){if(n.isAbsolute)return new _O(t.root,!0,0);if(-1===e.snapshot._lastPathIndex){const p=e.snapshot._urlSegment;return new _O(p,p===t.root,0)}const r=PE(n.commands[0])?0:1;return function(n,t,e){let r=n,s=t,p=e;for(;p>s;){if(p-=s,r=r.parent,!r)throw new Error("Invalid number of '../'");s=r.segments.length}return new _O(r,!1,s-p)}(e.snapshot._urlSegment,e.snapshot._lastPathIndex+r,n.numberOfDoubleDots)}(p,t,n),q=F.processChildren?RE(F.segmentGroup,F.index,p.commands):bU(F.segmentGroup,F.index,p.commands);return vO(F.segmentGroup,q,t,r,s)}(fe,this.currentUrlTree,e,$e,Re??null)}navigateByUrl(e,r={skipLocationChange:!1}){const s=G3(e)?e:this.parseUrl(e),p=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(p,"imperative",null,r)}navigate(e,r={skipLocationChange:!1}){return function(n){for(let t=0;t{const p=e[s];return null!=p&&(r[s]=p),r},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new M_(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,r,s,p,F){var q,te;if(this.disposed)return Promise.resolve(!1);const fe=this.getTransition(),Re=VE(r)&&fe&&!VE(fe.source),ft=(this.lastSuccessfulId===fe.id||this.currentNavigation?fe.rawUrl:fe.urlAfterRedirects).toString()===e.toString();if(Re&&ft)return Promise.resolve(!0);let Tt,Ft,Qt;F?(Tt=F.resolve,Ft=F.reject,Qt=F.promise):Qt=new Promise((gr,_r)=>{Tt=gr,Ft=_r});const wn=++this.navigationId;let An;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(s=this.location.getState()),An=s&&s.\u0275routerPageId?s.\u0275routerPageId:p.replaceUrl||p.skipLocationChange?null!==(q=this.browserPageId)&&void 0!==q?q:0:(null!==(te=this.browserPageId)&&void 0!==te?te:0)+1):An=0,this.setTransition({id:wn,targetPageId:An,source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:p,resolve:Tt,reject:Ft,promise:Qt,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),Qt.catch(gr=>Promise.reject(gr))}setBrowserUrl(e,r){const s=this.urlSerializer.serialize(e),p=Object.assign(Object.assign({},r.extras.state),this.generateNgRouterState(r.id,r.targetPageId));this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl?this.location.replaceState(s,"",p):this.location.go(s,"",p)}restoreHistory(e,r=!1){var s,p;if("computed"===this.canceledNavigationResolution){const F=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(s=this.currentNavigation)||void 0===s?void 0:s.finalUrl)||0===F?this.currentUrlTree===(null===(p=this.currentNavigation)||void 0===p?void 0:p.finalUrl)&&0===F&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(F)}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(e,r){const s=new zL(e.id,this.serializeUrl(e.extractedUrl),r);this.triggerEvent(s),e.resolve(!1)}generateNgRouterState(e,r){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}}return n.\u0275fac=function(e){return new(e||n)(Yn(Tf),Yn(fO),Yn(_5),Yn(v7),Yn(sc),Yn(u7),Yn(S3),Yn(void 0))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function VE(n){return"imperative"!==n}let HE=(()=>{class n{constructor(e,r,s,p,F){this.router=e,this.route=r,this.commands=[],this.onChanges=new ie.xQ,null==s&&p.setAttribute(F.nativeElement,"tabindex","0")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}onClick(){const e={skipLocationChange:w5(this.skipLocationChange),replaceUrl:w5(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:w5(this.preserveFragment)})}}return n.\u0275fac=function(e){return new(e||n)(Xt(_0),Xt(ky),Sd("tabindex"),Xt(sh),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,r){1&e&&dr("click",function(){return r.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[rr]}),n})(),Y6=(()=>{class n{constructor(e,r,s){this.router=e,this.route=r,this.locationStrategy=s,this.commands=[],this.onChanges=new ie.xQ,this.subscription=e.events.subscribe(p=>{p instanceof M_&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,r,s,p,F){if(0!==e||r||s||p||F||"string"==typeof this.target&&"_self"!=this.target)return!0;const q={skipLocationChange:w5(this.skipLocationChange),replaceUrl:w5(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,q),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:w5(this.preserveFragment)})}}return n.\u0275fac=function(e){return new(e||n)(Xt(_0),Xt(ky),Xt(s5))},n.\u0275dir=Tn({type:n,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,r){1&e&&dr("click",function(p){return r.onClick(p.button,p.ctrlKey,p.shiftKey,p.altKey,p.metaKey)}),2&e&&(ip("href",r.href,Pi),Cu("target",r.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[rr]}),n})();function w5(n){return""===n||!!n}let UU=(()=>{class n{constructor(e,r,s,p,F,q){this.router=e,this.element=r,this.renderer=s,this.cdr=p,this.link=F,this.linkWithHref=q,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=e.events.subscribe(te=>{te instanceof M_&&this.update()})}ngAfterContentInit(){(0,yu.of)(this.links.changes,this.linksWithHrefs.changes,(0,yu.of)(null)).pipe((0,cO.J)()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var e;null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe();const r=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(s=>!!s).map(s=>s.onChanges);this.linkInputChangesSubscription=(0,Tm.D)(r).pipe((0,cO.J)()).subscribe(s=>{this.isActive!==this.isLinkActive(this.router)(s)&&this.update()})}set routerLinkActive(e){const r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(s=>!!s)}ngOnChanges(e){this.update()}ngOnDestroy(){var e;this.routerEventsSubscription.unsubscribe(),null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe()}update(){!this.links||!this.linksWithHrefs||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this.isActive!==e&&(this.isActive=e,this.cdr.markForCheck(),this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}))})}isLinkActive(e){const r=function(n){return!!n.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return s=>e.isActive(s.urlTree,r)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.linkWithHref&&e(this.linkWithHref)||this.links.some(e)||this.linksWithHrefs.some(e)}}return n.\u0275fac=function(e){return new(e||n)(Xt(_0),Xt(wa),Xt(sh),Xt(yf),Xt(HE,8),Xt(Y6,8))},n.\u0275dir=Tn({type:n,selectors:[["","routerLinkActive",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,HE,5),wo(s,Y6,5)),2&e){let p;gs(p=ho())&&(r.links=p),gs(p=ho())&&(r.linksWithHrefs=p)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[rr]}),n})(),SO=(()=>{class n{constructor(e,r,s,p,F){this.parentContexts=e,this.location=r,this.resolver=s,this.changeDetector=F,this.activated=null,this._activatedRoute=null,this.activateEvents=new mo,this.deactivateEvents=new mo,this.name=p||jc,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const F=(r=r||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),q=this.parentContexts.getOrCreateContext(this.name).children,te=new _re(e,q,this.location.injector);this.activated=this.location.createComponent(F,this.location.length,te),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(e){return new(e||n)(Xt(_5),Xt(Zf),Xt(l1),Sd("name"),Xt(yf))},n.\u0275dir=Tn({type:n,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),n})();class _re{constructor(t,e,r){this.route=t,this.childContexts=e,this.parent=r}get(t,e){return t===ky?this.route:t===_5?this.childContexts:this.parent.get(t,e)}}class jU{}class VU{preload(t,e){return(0,yu.of)(null)}}let HU=(()=>{class n{constructor(e,r,s,p,F){this.router=e,this.injector=p,this.preloadingStrategy=F,this.loader=new FU(r,s,fe=>e.triggerEvent(new qL(fe)),fe=>e.triggerEvent(new KL(fe)))}setUpPreloading(){this.subscription=this.router.events.pipe((0,lp.h)(e=>e instanceof M_),(0,C_.b)(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(F2);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){const s=[];for(const p of r)if(p.loadChildren&&!p.canLoad&&p._loadedConfig){const F=p._loadedConfig;s.push(this.processRoutes(F.module,F.routes))}else p.loadChildren&&!p.canLoad?s.push(this.preloadConfig(e,p)):p.children&&s.push(this.processRoutes(e,p.children));return(0,Tm.D)(s).pipe((0,cO.J)(),(0,ll.U)(p=>{}))}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>(r._loadedConfig?(0,yu.of)(r._loadedConfig):this.loader.load(e.injector,r)).pipe((0,z1.zg)(p=>(r._loadedConfig=p,this.processRoutes(p.module,p.routes)))))}}return n.\u0275fac=function(e){return new(e||n)(Yn(_0),Yn(u7),Yn(S3),Yn(sc),Yn(jU))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),kO=(()=>{class n{constructor(e,r,s={}){this.router=e,this.viewportScroller=r,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof lO?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof M_&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof ZL&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,r){this.router.triggerEvent(new ZL(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(Yn(_0),Yn(mN),Yn(void 0))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const z3=new fo("ROUTER_CONFIGURATION"),$U=new fo("ROUTER_FORROOT_GUARD"),xre=[v7,{provide:fO,useClass:sU},{provide:_0,useFactory:function(n,t,e,r,s,p,F,q={},te,fe){const Re=new _0(null,n,t,e,r,s,p,XL(F));return te&&(Re.urlHandlingStrategy=te),fe&&(Re.routeReuseStrategy=fe),function(n,t){n.errorHandler&&(t.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(t.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(t.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(t.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(t.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(t.urlUpdateStrategy=n.urlUpdateStrategy)}(q,Re),q.enableTracing&&Re.events.subscribe($e=>{var rt,ft;null===(rt=console.group)||void 0===rt||rt.call(console,`Router Event: ${$e.constructor.name}`),console.log($e.toString()),console.log($e),null===(ft=console.groupEnd)||void 0===ft||ft.call(console)}),Re},deps:[fO,_5,v7,sc,u7,S3,IO,z3,[class{},new Bl],[class{},new Bl]]},_5,{provide:ky,useFactory:function(n){return n.routerState.root},deps:[_0]},{provide:u7,useClass:jG},HU,VU,class{preload(t,e){return e().pipe((0,H3.K)(()=>(0,yu.of)(null)))}},{provide:z3,useValue:{enableTracing:!1}}];function Ere(){return new iC("Router",_0)}let WU=(()=>{class n{constructor(e,r){}static forRoot(e,r){return{ngModule:n,providers:[xre,GU(e),{provide:$U,useFactory:Ire,deps:[[_0,new Bl,new qc]]},{provide:z3,useValue:r||{}},{provide:s5,useFactory:Are,deps:[M3,[new l0(wC),new Bl],z3]},{provide:kO,useFactory:Tre,deps:[_0,mN,z3]},{provide:jU,useExisting:r&&r.preloadingStrategy?r.preloadingStrategy:VU},{provide:iC,multi:!0,useFactory:Ere},[CO,{provide:t_,multi:!0,useFactory:Mre,deps:[CO]},{provide:zU,useFactory:Ore,deps:[CO]},{provide:sR,multi:!0,useExisting:zU}]]}}static forChild(e){return{ngModule:n,providers:[GU(e)]}}}return n.\u0275fac=function(e){return new(e||n)(Yn($U,8),Yn(_0,8))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();function Tre(n,t,e){return e.scrollOffset&&t.setOffset(e.scrollOffset),new kO(n,t,e)}function Are(n,t,e={}){return e.useHash?new oq(n,t):new KR(n,t)}function Ire(n){return"guarded"}function GU(n){return[{provide:ff,multi:!0,useValue:n},{provide:IO,multi:!0,useValue:n}]}let CO=(()=>{class n{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new ie.xQ}appInitializer(){return this.injector.get(rq,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let r=null;const s=new Promise(q=>r=q),p=this.injector.get(_0),F=this.injector.get(z3);return"disabled"===F.initialNavigation?(p.setUpLocationChangeListener(),r(!0)):"enabled"===F.initialNavigation||"enabledBlocking"===F.initialNavigation?(p.hooks.afterPreactivation=()=>this.initNavigation?(0,yu.of)(null):(this.initNavigation=!0,r(!0),this.resultOfPreactivationDone),p.initialNavigation()):r(!0),s})}bootstrapListener(e){const r=this.injector.get(z3),s=this.injector.get(HU),p=this.injector.get(kO),F=this.injector.get(_0),q=this.injector.get(e2);e===q.components[0]&&(("enabledNonBlocking"===r.initialNavigation||void 0===r.initialNavigation)&&F.initialNavigation(),s.setUpPreloading(),p.init(),F.resetRootComponentType(q.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(e){return new(e||n)(Yn(sc))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function Mre(n){return n.appInitializer.bind(n)}function Ore(n){return n.bootstrapListener.bind(n)}const zU=new fo("Router Initializer"),qi={ETHEREUM:1,GOERLI:5,OPTIMISM:10,POLYGON:137,ARBITRUM:42161},$E={[qi.ETHEREUM]:{chainId:"0x1",chainName:"Ethereum",displayName:"Ethereum",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"ETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://mainnet.infura.io/v3"],blockExplorerUrls:["https://etherscan.io"],iconPath:"assets/img/chains/ethereum-icon.png",uniswapFeeTier100:!0,useAccessList:!0},[qi.GOERLI]:{chainId:"0x5",chainName:"Goerli",displayName:"Goerli",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"ETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://goerli.infura.io/v3"],blockExplorerUrls:["https://goerli.etherscan.io"],iconPath:"assets/img/chains/ethereum-icon.png",uniswapFeeTier100:!1,useAccessList:!0},[qi.OPTIMISM]:{chainId:"0xa",chainName:"Optimism",displayName:"Optimism",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"ETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"],iconPath:"assets/img/chains/optimism-icon.svg",uniswapFeeTier100:!0,useAccessList:!1},[qi.POLYGON]:{chainId:"0x89",chainName:"Polygon Mainnet",displayName:"Polygon",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Matic Token",symbol:"MATIC",decimals:18,iconPath:"assets/img/tokens/matic.png"},rpcUrls:["https://polygon-rpc.com"],blockExplorerUrls:["https://polygonscan.com"],iconPath:"assets/img/chains/polygon-icon.png",uniswapFeeTier100:!0,useAccessList:!1},[qi.ARBITRUM]:{chainId:"0xa4b1",chainName:"Arbitrum One",displayName:"Arbitrum",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"AETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://arb1.arbitrum.io/rpc"],blockExplorerUrls:["https://arbiscan.io"],iconPath:"assets/img/chains/arbitrum-icon.svg",uniswapFeeTier100:!1,useAccessList:!1}},x5="0xb5087F95643A9a4069471A28d32C569D9bd57fE4".toLowerCase(),Pre="0xb73F303472C4fD4FF3B9f59ce0F9b13E47fbfD19".toLowerCase(),Rre="0xdf841e93c94cE3b777271FE5E130bf54Ae63C2c9".toLowerCase(),Nre="0x1F98431c8aD98523631AE4a59f267346ea31F984".toLowerCase(),Bre="0xC36442b4a4522E871399CD717aBDD847Ab11FE88".toLowerCase(),MO={[qi.ETHEREUM]:"0x9232a548dd9e81bac65500b5e0d918f8ba93675c000200000000000000000423".toLowerCase(),[qi.GOERLI]:"0xf3a605da753e9de545841de10ea8bffbd1da9c750002000000000000000002c7".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},J6={[qi.ETHEREUM]:"0x9232a548DD9E81BaC65500b5e0d918F8Ba93675C".toLowerCase(),[qi.GOERLI]:"0xF3a605DA753e9dE545841de10EA8bFfBd1Da9C75".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Am={[qi.ETHEREUM]:"0xf17d23136B4FeAd139f54fB766c8795faae09660".toLowerCase(),[qi.GOERLI]:"0xdcEBc9195fE9b8867fd017440ab9516406f475d6".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Cy={[qi.ETHEREUM]:"0x901c8aA6A61f74aC95E7f397E22A0Ac7c1242218".toLowerCase(),[qi.GOERLI]:"0xFe16CC67B62b10119BC03E7E7Bf2983f868f8CE5".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Fre={[qi.ETHEREUM]:"0xF087521Ffca0Fa8A43F5C445773aB37C5f574DA0".toLowerCase(),[qi.GOERLI]:"0x323a2Ace3038C503EccF3e6B612541F0a44fa022".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},qU=("0x4cc39AF0d46b0F66Fd33778C6629A696bDC310a0".toLowerCase(),"0x0Cb53d2dc899464a81d0e58b7B82838Ab264E0A1".toLowerCase(),"".toLowerCase(),"".toLowerCase(),"".toLowerCase(),{[qi.ETHEREUM]:"0x822E5828Cb9C0e2aD2DC5035577E6d63B672D0e2".toLowerCase(),[qi.GOERLI]:"0x8fd0Bc47CaE3358Bafa7DADd1A423D9bF877fe35".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()}),My={[qi.ETHEREUM]:"".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0xe4666F0937B62d64C10316DB0b7061549F87e95F".toLowerCase()},j_={[qi.ETHEREUM]:"0xe4666F0937B62d64C10316DB0b7061549F87e95F".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Lre={[qi.ETHEREUM]:"0x557692FDDCfa46D6E29959F73Fb14ae608680034".toLowerCase(),[qi.GOERLI]:"0x557692FDDCfa46D6E29959F73Fb14ae608680034".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x557692FDDCfa46D6E29959F73Fb14ae608680034".toLowerCase()},fp={[qi.ETHEREUM]:"0x541a2378589e280fdfdde6e53fb5ecf98a853fc2".toLowerCase(),[qi.GOERLI]:"0x0B5dC80CE93a2537c6dbeB4797B77077e1556804".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x541a2378589E280FDfDde6e53Fb5ECf98a853fC2".toLowerCase()},OO={[qi.ETHEREUM]:"0x951f99350d816c0E160A2C71DEfE828BdfC17f12".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Ure={[qi.ETHEREUM]:"0x9DDb2da7Dd76612e0df237B89AF2CF4413733212".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},KU={[qi.ETHEREUM]:"0x892b62134F51034CB256A040ca15769Ab26Af2E0".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},DO={[qi.ETHEREUM]:"".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x093E035e9c2885b1b77B5632F92Fa7593f88E9B3".toLowerCase()},jre={[qi.ETHEREUM]:"https://gateway-arbitrum.network.thegraph.com/api/03ec489384944a6bb41fc11060876152/subgraphs/id/6EcVGBGhW8U6B9nd9uT1n5iDRMtH2evoJeaY5BXBCniM",[qi.GOERLI]:"https://api.thegraph.com/subgraphs/name/bunniapp/bunni-goerli-development",[qi.OPTIMISM]:"https://api.thegraph.com/subgraphs/name/bunniapp/bunni-optimism-development",[qi.POLYGON]:"https://api.thegraph.com/subgraphs/name/bunniapp/bunni-polygon-development",[qi.ARBITRUM]:"https://gateway-arbitrum.network.thegraph.com/api/03ec489384944a6bb41fc11060876152/subgraphs/id/i2zLpRQUj9TKGkAr2dpkf1iW1vx8THkXfDa7QMVx3N1"},Vre={[qi.ETHEREUM]:"https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks",[qi.GOERLI]:"https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks",[qi.OPTIMISM]:"https://api.thegraph.com/subgraphs/name/kybernetwork/optimism-blocks",[qi.POLYGON]:"https://api.thegraph.com/subgraphs/name/kybernetwork/polygon-blocks",[qi.ARBITRUM]:"https://api.thegraph.com/subgraphs/name/sushiswap/arbitrum-blocks"},ZU={[qi.ETHEREUM]:"https://eth-mainnet.alchemyapi.io/v2/Whqjb5i87dMAyACOf3S1Ajv89RabbZUc",[qi.GOERLI]:"https://eth-goerli.g.alchemy.com/v2/N5lNCz2WLC0yFrCc46qXcZThSXVGQyGV",[qi.OPTIMISM]:"https://opt-mainnet.g.alchemy.com/v2/B7MM2DSlWzEQ1O2F7WPDxI199rngkRpC",[qi.POLYGON]:"https://polygon-rpc.com",[qi.ARBITRUM]:"https://arb1.arbitrum.io/rpc"},Hre={[qi.ETHEREUM]:"https://api.0x.org",[qi.GOERLI]:"https://goerli.api.0x.org",[qi.OPTIMISM]:"https://optimism.api.0x.org",[qi.POLYGON]:"https://polygon.api.0x.org",[qi.ARBITRUM]:"https://arbitrum.api.0x.org"},Yw=class{constructor(){}get id(){return qi}get rpc(){return ZU}get metadata(){return $E}isL1(t){return this.isTestnet(t)||this.isMainnet(t)}isTestnet(t){return t===qi.GOERLI}isMainnet(t){return t===qi.ETHEREUM}isSupported(t){return!!$E[t]}zapSupported(t){return!!fp[t]}gaugeSupported(t){return!!Cy[t]||!!My[t]}idToSlug(t){return this.metadata[t].displayName.toLowerCase()}slugToId(t){return this.id[t.toUpperCase()]}};let dc=Yw;yt(dc,"\u0275fac",function(e){return new(e||Yw)}),yt(dc,"\u0275prov",we({token:Yw,factory:Yw.\u0275fac,providedIn:"root"}));const Jw=class{constructor(t,e){yt(this,"chain"),yt(this,"router"),this.chain=t,this.router=e}resolve(t){const e=t.paramMap.get("chainSlug");if(!e||Object.values(this.chain.metadata).find(r=>r.displayName.toLowerCase()===e))return null;this.router.navigate([""])}};let X6=Jw;yt(X6,"\u0275fac",function(e){return new(e||Jw)(Yn(dc),Yn(_0))}),yt(X6,"\u0275prov",we({token:Jw,factory:Jw.\u0275fac,providedIn:"root"}));var Br=Y(34553);const Oy="0x0000000000000000000000000000000000000000".toLowerCase(),WE="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLowerCase(),Q6={[qi.ETHEREUM]:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".toLowerCase(),[qi.GOERLI]:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6".toLowerCase(),[qi.OPTIMISM]:"0x4200000000000000000000000000000000000006".toLowerCase(),[qi.POLYGON]:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270".toLowerCase(),[qi.ARBITRUM]:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1".toLowerCase()},E5={[qi.ETHEREUM]:"0xfd0205066521550D7d7AB19DA8F72bb004b4C341".toLowerCase(),[qi.GOERLI]:"0xf5bE16a558e7756b770d14528Df5419f982E52bF".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Z1={[qi.ETHEREUM]:"0x627fee87d0D9D2c55098A06ac805Db8F98B158Aa".toLowerCase(),[qi.GOERLI]:"0x63390fB9257AaBF54fbB9aCCDE3b927Edd2fB4a2".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x0ffB33812FA5cd8bCE181Db3FD76E11935105B12".toLowerCase()},$re={BAL:"0xba100000625a3754423978a60c9317c58a424e3D".toLowerCase(),DAI:"0x6B175474E89094C44Da98b954EedeAC495271d0F".toLowerCase(),USDC:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48".toLowerCase(),USDT:"0xdAC17F958D2ee523a2206206994597C13D831ec7".toLowerCase(),WBTC:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599".toLowerCase(),WETH:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".toLowerCase(),STETH:"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84".toLowerCase(),SWETH:"0xf951E335afb289353dc249e82926178EaC7DEd78".toLowerCase(),WSTETH:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0".toLowerCase()},Wre={WETH:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6".toLowerCase()},Gre={DAI:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1".toLowerCase(),USDC:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607".toLowerCase(),USDT:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58".toLowerCase(),WBTC:"0x68f180fcCe6836688e9084f035309E29Bf0A2095".toLowerCase(),WETH:"0x4200000000000000000000000000000000000006".toLowerCase()},zre={DAI:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063".toLowerCase(),USDC:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174".toLowerCase(),USDT:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F".toLowerCase(),WBTC:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6".toLowerCase(),WETH:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619".toLowerCase()},qre={DAI:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1".toLowerCase(),USDC:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8".toLowerCase(),USDT:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9".toLowerCase(),WBTC:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f".toLowerCase(),WETH:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1".toLowerCase()},hp={[qi.ETHEREUM]:$re,[qi.GOERLI]:Wre,[qi.OPTIMISM]:Gre,[qi.POLYGON]:zre,[qi.ARBITRUM]:qre};var Kre=Y(53642),V_=Y.n(Kre);function Zre(n,t){1&n&&qn(0,"span",9)}function Yre(n,t){1&n&&(Ae(0,"div",10),Ae(1,"span",11),kt(2,"Loading..."),Ie(),Ie())}function Jre(n,t){1&n&&(Ae(0,"strong",12),kt(1,"Transaction pending"),Ie())}function Xre(n,t){1&n&&(Ae(0,"strong",12),kt(1,"Transaction confirmed"),Ie())}const $A=class{constructor(t){yt(this,"chain"),yt(this,"hash"),yt(this,"hidden"),yt(this,"chainId"),yt(this,"timeout"),yt(this,"txConfirmed"),yt(this,"explorerLink"),yt(this,"toastrInstance"),this.chain=t}ngOnInit(){this.explorerLink=this.getExplorerLink()}getExplorerLink(){return this.chain.metadata[this.chainId].blockExplorerUrls[0]+"/tx/"+this.hash}closeToastr(){this.toastrInstance.toastRef.close()}};let GE=$A;yt(GE,"\u0275fac",function(e){return new(e||$A)(Xt(dc))}),yt(GE,"\u0275cmp",bn({type:$A,selectors:[["app-transaction-alert-modal"]],decls:11,vars:5,consts:[["role","alert","aria-live","assertive","aria-atomic","true",1,"toast","show","mt-2"],[1,"toast-header"],["class","fe fe-check-circle text-success me-2",4,"ngIf"],["class","spinner-grow spinner-grow-sm me-2","role","status",4,"ngIf"],["class","me-auto",4,"ngIf"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"toast-body"],["target","_blank",3,"href"],[1,"fe","fe-external-link"],[1,"fe","fe-check-circle","text-success","me-2"],["role","status",1,"spinner-grow","spinner-grow-sm","me-2"],[1,"visually-hidden"],[1,"me-auto"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),it(2,Zre,1,0,"span",2),it(3,Yre,3,0,"div",3),it(4,Jre,2,0,"strong",4),it(5,Xre,2,0,"strong",4),Ae(6,"button",5),dr("click",function(){return r.closeToastr()}),Ie(),Ie(),Ae(7,"div",6),Ae(8,"a",7),kt(9," View on Explorer "),qn(10,"i",8),Ie(),Ie(),Ie()),2&e&&(dt(2),Mt("ngIf",r.txConfirmed),dt(1),Mt("ngIf",!r.txConfirmed),dt(1),Mt("ngIf",!r.txConfirmed),dt(1),Mt("ngIf",r.txConfirmed),dt(3),qu("href",r.explorerLink,Pi))},directives:[La],styles:[""]}));const WA=class{constructor(){yt(this,"error")}ngOnInit(){}};let zE=WA;yt(zE,"\u0275fac",function(e){return new(e||WA)}),yt(zE,"\u0275cmp",bn({type:WA,selectors:[["app-error-alert-modal"]],decls:8,vars:1,consts:[["role","alert","aria-live","assertive","aria-atomic","true",1,"toast","show","mt-2"],[1,"toast-header"],[1,"fe","fe-x-circle","text-danger","me-2"],[1,"me-auto","text-danger"],["type","button","data-bs-dismiss","toast","aria-label","Close",1,"btn-close"],[1,"toast-body"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),qn(2,"span",2),Ae(3,"strong",3),kt(4,"Transaction error"),Ie(),qn(5,"button",4),Ie(),Ae(6,"div",5),kt(7),Ie(),Ie()),2&e&&(dt(7),Pr(" ",r.error.message," "))},styles:[""]}));var sn=Y(50404),Qre=Y(61488),PO=Y(61522),iie=Y(39144),Zu=(Y(23845),Y(1238),Y(18560)),Wl=Y(79696);Y(92280),Y(17522),Y(41413),Y(42624);const oie=function({darkMode:n=!1}={}){return()=>{return{label:"Coinbase Wallet",getIcon:(t=(0,Br.Z)(function*(){return(yield Y.e(1405).then(Y.bind(Y,31405))).default}),function(){return t.apply(this,arguments)}),getInterface:function(){var t=(0,Br.Z)(function*({chains:e,appMetadata:r}){const[s]=e,{name:p,icon:F}=r||{},{default:q}=yield Promise.all([Y.e(1865),Y.e(9938)]).then(Y.t.bind(Y,27235,19)),$e=new(q.default?q.default:q)({appName:p||"",appLogoUrl:`data:image/svg+xml;base64,${window.btoa(F||"")}`,darkMode:n}),rt=$e.makeWeb3Provider(s.rpcUrl,parseInt(s.id)),ft=rt.on.bind(rt);return rt.on=(Tt,Ft)=>(ft(Tt,Qt=>{Ft("chainChanged"!==Tt?Qt:`0x${Qt.toString(16)}`)}),rt),{provider:rt,instance:$e}});return function(r){return t.apply(this,arguments)}}()};var t}},uie=function(n){const{apiKey:t}=n;return()=>{return{label:"Fortmatic",getIcon:(e=(0,Br.Z)(function*(){return(yield Y.e(209).then(Y.bind(Y,50209))).default}),function(){return e.apply(this,arguments)}),getInterface:function(){var e=(0,Br.Z)(function*({EventEmitter:r,BigNumber:s,chains:p}){const{default:F}=yield Y.e(2071).then(Y.t.bind(Y,52071,19)),{createEIP1193Provider:q,ProviderRpcErrorCode:te,ProviderRpcError:fe}=yield Promise.resolve().then(Y.bind(Y,79696)),Re=new r;let ft,$e=new F(t,{chainId:parseInt(p[0].id),rpcUrl:p[0].rpcUrl||""}),rt=$e.getProvider();return ft=function Tt(){const Ft=q(rt,{eth_requestAccounts:(Qt=(0,Br.Z)(function*(){try{return yield $e.user.login()}catch(wn){const{code:An}=wn;if(-32603===An)throw new fe({code:te.ACCOUNT_ACCESS_REJECTED,message:"Account access rejected"});return[]}}),function(){return Qt.apply(this,arguments)}),eth_selectAccounts:null,eth_getBalance:function(){var Qt=(0,Br.Z)(function*(){const[wn]=yield $e.user.getBalances();return wn?s.from(wn.crypto_amount).mul("1000000000000000000").toString():"0"});return function(){return Qt.apply(this,arguments)}}(),wallet_switchEthereumChain:function(){var Qt=(0,Br.Z)(function*({params:wn}){const An=p.find(({id:gr})=>gr===wn[0].chainId);if(!An)throw new Error("chain must be set before switching");return $e=new F(t,{chainId:parseInt(An.id),rpcUrl:An.rpcUrl||""}),rt=$e.getProvider(),Re.emit("chainChanged",An.id),Tt(),null});return function(An){return Qt.apply(this,arguments)}}()});var Qt;return ft?(ft.request=Ft.request.bind(Ft),ft.send=Ft.send.bind(Ft),ft.sendAsync=Ft.sendAsync.bind(Ft),ft):(Ft.on=Re.on.bind(Re),Ft.disconnect=()=>()=>$e.user.logout(),Ft)}(),{provider:ft,instance:$e}});return function(s){return e.apply(this,arguments)}}()};var e}},fie=function(n){const{whitelistedDomains:t=[/^https:\/\/app\.safe\.global$/,/^https:\/\/safe\.global$/]}=n||{};return()=>{return window.self!==window.top?{label:"Safe",getIcon:(r=(0,Br.Z)(function*(){return(yield Y.e(7869).then(Y.bind(Y,17869))).default}),function(){return r.apply(this,arguments)}),getInterface:function(){var r=(0,Br.Z)(function*(){const{default:s}=yield Y.e(3605).then(Y.t.bind(Y,13605,19)),{SafeAppProvider:p}=yield Y.e(8369).then(Y.t.bind(Y,78369,19)),{createEIP1193Provider:F}=yield Promise.resolve().then(Y.bind(Y,79696)),fe=new(s.default||s)({whitelistedDomains:t}),Re=yield Promise.race([fe.safe.getInfo(),new Promise(ft=>setTimeout(ft,200))]);if(!Re)throw new Error('App must be loaded in a Safe App context, head to the Safe and open this website as an app.');return{provider:F(new p(Re,fe),{eth_requestAccounts:()=>Promise.resolve([Re.safeAddress])}),instance:fe}});return function(){return r.apply(this,arguments)}}()}:[];var r}};var hie=Y(21930),Xo=(()=>{return(n=Xo||(Xo={})).AlphaWallet="isAlphaWallet",n.ApexWallet="isApexWallet",n.AToken="isAToken",n.BifrostWallet="isBifrost",n.Binance="bbcSignTx",n.Bitpie="isBitpie",n.BlockWallet="isBlockWallet",n.Coinbase="isToshi",n.CoinbaseExtension="isCoinbaseWallet",n.Detected="request",n.Dcent="isDcentWallet",n.Exodus="isExodus",n.Frontier="isFrontier",n.Frame="isFrame",n.HuobiWallet="isHbWallet",n.HyperPay="isHyperPay",n.ImToken="isImToken",n.InfinityWallet="isInfinityWallet",n.Liquality="isLiquality",n.MeetOne="wallet",n.MetaMask="isMetaMask",n.MyKey="isMYKEY",n.OwnBit="isOwnbit",n.Status="isStatus",n.Trust="isTrust",n.TokenPocket="isTokenPocket",n.TP="isTp",n.WalletIo="isWalletIO",n.XDEFI="isXDEFI",n.OneInch="isOneInchIOSWallet",n.Tokenary="isTokenary",n.Tally="isTally",n.BraveWallet="isBraveWallet",n.Rabby="isRabby",n.MathWallet="isMathWallet",n.GameStop="isGamestop",n.BitKeep="isBitKeep",n.Sequence="isSequence",n.Core="isAvalanche",n.Opera="isOpera",n.Bitski="isBitski",n.Enkrypt="isEnkrypt",n.Phantom="isPhantom",n.OKXWallet="isOkxWallet",n.Zeal="isZeal",n.Zerion="isZerion",n.Rainbow="isRainbow",n.SafePal="isSafePal",n.DeFiWallet="isDeficonnectProvider",n.Safeheron="isSafeheron",n.Talisman="isTalisman",n.OneKey="isOneKey",n.Fordefi="isFordefi",n.Coin98Wallet="isCoin98",n.SubWallet="isSubWallet",n.Kayros="isKayros",Xo;var n})(),Y1=(()=>{return(n=Y1||(Y1={})).Binance="https://www.bnbchain.org/ru/blog/binance-extension-wallet/",n.BitKeep="https://bitkeep.com/en/download?type=0",n.Coinbase="https://www.coinbase.com/wallet/downloads",n.MetaMask="https://metamask.io/download/",n.OKXWallet="https://okx.com/download",n.Phantom="https://phantom.app/download",n.Talisman="https://www.talisman.xyz/",n.Trust="https://trustwallet.com/download/",n.OneKey="https://onekey.so/download/",n.RoninWallet="https://wallet.skymavis.com/",n.Coin98Wallet="https://coin98.com/wallet/",n.SubWallet="https://www.subwallet.app/",n.Kayros="https://www.kayros.games/wallet/",Y1;var n})(),Ua=(()=>{return(n=Ua||(Ua={})).AlphaWallet="AlphaWallet",n.ApexWallet="Apex Wallet",n.AToken="AToken",n.BifrostWallet="Bifrost Wallet",n.Binance="Binance Smart Wallet",n.Bitpie="Bitpie",n.Bitski="Bitski",n.BlockWallet="BlockWallet",n.Brave="Brave Wallet",n.Coinbase="Coinbase Wallet",n.Dcent="D'CENT",n.Detected="Detected Wallet",n.Exodus="Exodus",n.Frame="Frame",n.Frontier="Frontier",n.HuobiWallet="Huobi Wallet",n.HyperPay="HyperPay",n.ImToken="imToken",n.InfinityWallet="Infinity Wallet",n.Liquality="Liquality",n.MeetOne="MeetOne",n.MetaMask="MetaMask",n.MyKey="MyKey",n.Opera="Opera Wallet",n.OwnBit="OwnBit",n.Status="Status Wallet",n.Trust="Trust Wallet",n.TokenPocket="TokenPocket",n.TP="TP Wallet",n.WalletIo="Wallet.io",n.XDEFI="XDEFI Wallet",n.OneInch="1inch Wallet",n.Tokenary="Tokenary Wallet",n.Tally="Taho",n.Rabby="Rabby Wallet",n.MathWallet="MathWallet",n.GameStop="GameStop Wallet",n.BitKeep="BitKeep",n.Sequence="Sequence",n.Core="Core",n.Enkrypt="Enkrypt",n.Zeal="Zeal",n.Phantom="Phantom",n.OKXWallet="OKX Wallet",n.Zerion="Zerion",n.Rainbow="Rainbow",n.SafePal="SafePal",n.DeFiWallet="DeFi Wallet",n.Safeheron="Safeheron",n.Talisman="Talisman",n.OneKey="OneKey",n.Fordefi="Fordefi",n.RoninWallet="Ronin Wallet",n.Coin98Wallet="Coin98 Wallet",n.SubWallet="SubWallet",n.Kayros="Kayros",Ua;var n})(),fa=(()=>{return(n=fa||(fa={})).Ethereum="ethereum",n.Binance="BinanceChain",n.Tally="tally",n.Web3="web3",n.Arbitrum="arbitrum",n.XFI="xfi",n.GameStop="gamestop",n.BitKeep="bitkeep",n.Avalanche="avalanche",n.Bitski="Bitski",n.Enkrypt="enkrypt",n.Zeal="zeal",n.Phantom="phantom",n.OKXWallet="okxwallet",n.Trust="trustwallet",n.Frontier="frontier",n.DeFiConnectProvider="deficonnectProvider",n.Safeheron="safeheron",n.Talisman="talismanEth",n.OneKey="$onekey",n.RoninWallet="ronin",n.Coin98Wallet="coin98",n.SubWallet="SubWallet",n.Kayros="kayros",fa;var n})();const fh=null;function G2(n,t){return(0,Br.Z)(function*(){return{provider:window.ethereum.providers&&Array.isArray(window.ethereum.providers)?pie(n,t):window.ethereum}})}function pie(n,t){return window.ethereum.providers.find(e=>t?!!e[n]&&!YU(n,e):!!e[n])}function YU(n,t){return Object.values(Xo).filter(r=>r!==n&&r!==Xo.Detected).some(r=>!!t[r])}const mie={label:Ua.MetaMask,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.MetaMask]&&!YU(Xo.MetaMask,n),getIcon:(n=(0,Br.Z)(function*(){return(yield Y.e(674).then(Y.bind(Y,10674))).default}),function(){return n.apply(this,arguments)}),getInterface:G2(Xo.MetaMask,!0),platforms:["all"],externalUrl:Y1.MetaMask},gie={label:Ua.InfinityWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.InfinityWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9814).then(Y.bind(Y,89814))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.InfinityWallet),platforms:["desktop"]},yie={label:Ua.Exodus,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Exodus],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5484).then(Y.bind(Y,35484))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Exodus),platforms:["all"]},bie={label:Ua.Frontier,injectedNamespace:fa.Frontier,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum&&!!n.ethereum[Xo.Frontier],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1129).then(Y.bind(Y,91129))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.frontier.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},vie={label:Ua.Brave,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.BraveWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5588).then(Y.bind(Y,25588))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.BraveWallet),platforms:["all"]},_ie={label:Ua.Binance,injectedNamespace:fa.Binance,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Binance],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(4807).then(Y.bind(Y,64807))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){let t={...window.BinanceChain};window.BinanceChain=t;const e=window.BinanceChain.on.bind(window.BinanceChain);window.BinanceChain.on=(s,p)=>{e(s,"chainChanged"===s?F=>{p(`0x${parseInt(F).toString(16)}`)}:p)};const r=(0,Wl.createEIP1193Provider)(window.BinanceChain,{eth_chainId:({baseRequest:s})=>s({method:"eth_chainId"}).then(p=>`0x${parseInt(p).toString(16)}`),eth_selectAccounts:fh,wallet_switchEthereumChain:fh});return r.removeListener=(s,p)=>{},{provider:r}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"],externalUrl:Y1.Binance},wie={label:Ua.Coinbase,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Coinbase]||!!n&&!!n[Xo.CoinbaseExtension],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5051).then(Y.bind(Y,95051))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const{provider:t}=yield G2(Xo.CoinbaseExtension)(),e=t.on.bind(t);return t.on=(r,s)=>{e(r,"chainChanged"===r?p=>{s(`0x${parseInt(p).toString(16)}`)}:s)},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Coinbase},xie={label:Ua.Detected,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Detected],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8031).then(Y.bind(Y,8031))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Eie={label:Ua.Trust,injectedNamespace:fa.Trust,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Trust],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7957).then(Y.bind(Y,27957))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){let e;return e=window.hasOwnProperty(fa.Ethereum)&&window[fa.Ethereum].isTrust?window[fa.Ethereum]:window[fa.Trust],{provider:e}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Trust},Tie={label:Ua.Opera,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Opera],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3510).then(Y.bind(Y,13510))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{eth_requestAccounts:(t=(0,Br.Z)(function*({baseRequest:e}){return e({method:"eth_accounts"})}),function(r){return t.apply(this,arguments)}),eth_selectAccounts:fh})};var t});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Aie={label:Ua.Status,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Status],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1577).then(Y.bind(Y,91577))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Iie={label:Ua.AlphaWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.AlphaWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(49).then(Y.bind(Y,90049))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Sie={label:Ua.ApexWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.ApexWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6004).then(Y.bind(Y,76004))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},kie={label:Ua.AToken,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.AToken],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5733).then(Y.bind(Y,55733))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Cie={label:Ua.BifrostWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.BifrostWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(4909).then(Y.bind(Y,94909))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.BifrostWallet),platforms:["all"]},Mie={label:Ua.Bitpie,injectedNamespace:fa.Ethereum,checkProviderIdentity:()=>!!window.Bitpie,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8563).then(Y.bind(Y,8563))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Oie={label:Ua.BlockWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.BlockWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1830).then(Y.bind(Y,81830))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.BlockWallet),platforms:["desktop"]},Die={label:Ua.Frame,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Frame],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6146).then(Y.bind(Y,6146))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=window.ethereum;if(!t||!t.connected)throw new Error("Frame App must be open with a hot wallet connected. If not installed first download the Frame App.");return{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Pie={label:Ua.HuobiWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.HuobiWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3601).then(Y.bind(Y,73601))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Rie={label:Ua.HyperPay,injectedNamespace:fa.Ethereum,checkProviderIdentity:()=>!!window.hiWallet,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(187).then(Y.bind(Y,187))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Nie={label:Ua.ImToken,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.ImToken],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5239).then(Y.bind(Y,95239))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Bie={label:Ua.Liquality,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Liquality],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(853).then(Y.bind(Y,10853))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh});return t.removeListener=(e,r)=>{},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Fie={label:Ua.MeetOne,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&"MEETONE"===n[Xo.MeetOne],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6176).then(Y.bind(Y,96176))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Lie={label:Ua.MyKey,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.MyKey],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(4539).then(Y.bind(Y,54539))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Uie={label:Ua.OwnBit,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.OwnBit],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(2419).then(Y.bind(Y,2419))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=(0,Wl.createEIP1193Provider)(window.ethereum,{eth_chainId:({baseRequest:e})=>e({method:"eth_chainId"}).then(r=>`0x${parseInt(r).toString(16)}`),wallet_switchEthereumChain:fh,eth_selectAccounts:fh});return t.removeListener=(e,r)=>{},t.on=(e,r)=>{},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},jie={label:Ua.TokenPocket,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.TokenPocket]&&!n[Xo.TP],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7765).then(Y.bind(Y,67765))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.TokenPocket),platforms:["all"]},Vie={label:Ua.TP,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.TP],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7903).then(Y.bind(Y,37903))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Hie={label:Ua.XDEFI,injectedNamespace:fa.XFI,checkProviderIdentity:({provider:n})=>n&&n.ethereum&&n.ethereum[Xo.XDEFI],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8944).then(Y.bind(Y,18944))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.xfi&&window.xfi.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},$ie={label:Ua.OneInch,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.OneInch],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7117).then(Y.bind(Y,27117))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Wie={label:Ua.Tokenary,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Tokenary],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5895).then(Y.bind(Y,85895))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Gie={label:Ua.Tally,injectedNamespace:fa.Tally,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Tally],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6516).then(Y.bind(Y,56516))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.tally)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},zie={label:Ua.Zeal,injectedNamespace:fa.Zeal,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Zeal],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1032).then(Y.bind(Y,81032))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.zeal)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},qie={label:Ua.Rabby,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Rabby],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7167).then(Y.bind(Y,87167))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Kie={label:Ua.MathWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.MathWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3897).then(Y.bind(Y,23897))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.MathWallet),platforms:["all"]},Zie={label:Ua.GameStop,injectedNamespace:fa.GameStop,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.GameStop],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7599).then(Y.bind(Y,77599))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=(0,Wl.createEIP1193Provider)(window.gamestop,{eth_chainId:({baseRequest:e})=>e({method:"eth_chainId"}).then(r=>`0x${parseInt(r).toString(16)}`),wallet_switchEthereumChain:fh});return t.removeListener=(e,r)=>{},t.on=(e,r)=>{},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Yie={label:Ua.BitKeep,injectedNamespace:fa.BitKeep,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum[Xo.BitKeep],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9969).then(Y.bind(Y,59969))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.bitkeep&&window.bitkeep.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.BitKeep},Jie={label:Ua.Sequence,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Sequence],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6030).then(Y.bind(Y,86030))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Xie={label:Ua.Core,injectedNamespace:fa.Avalanche,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Core],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7736).then(Y.bind(Y,57736))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Core),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},Qie={label:Ua.Bitski,injectedNamespace:fa.Bitski,checkProviderIdentity:({provider:n})=>!!n&&!!n.getProvider&&!!n.getProvider().isBitski,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9672).then(Y.bind(Y,49672))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.Bitski&&window.Bitski.getProvider&&window.Bitski.getProvider()}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},ese={label:Ua.Zerion,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Zerion],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1917).then(Y.bind(Y,1917))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},tse={label:Ua.Enkrypt,injectedNamespace:fa.Enkrypt,checkProviderIdentity:({provider:n})=>!!n&&!!n.providers&&!!n.providers.ethereum,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(827).then(Y.bind(Y,50827))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=window.enkrypt.providers.ethereum.on.bind(window.enkrypt.providers.ethereum);window.enkrypt.providers.ethereum.on=(r,s)=>{t(r,"chainChanged"===r?p=>{s(`0x${parseInt(p).toString(16)}`)}:s)};const e=(0,Wl.createEIP1193Provider)(window.enkrypt.providers.ethereum,{eth_chainId:({baseRequest:r})=>r({method:"eth_chainId"}).then(s=>`0x${parseInt(s).toString(16)}`)});return e.removeListener=(r,s)=>{},{provider:e}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},nse={label:Ua.Phantom,injectedNamespace:fa.Phantom,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum&&!!n.ethereum[Xo.Phantom],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(290).then(Y.bind(Y,50290))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.phantom.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Phantom},rse={label:Ua.SafePal,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.SafePal],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1623).then(Y.bind(Y,11623))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},ise={label:Ua.Rainbow,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Rainbow],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1480).then(Y.bind(Y,1480))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Rainbow),platforms:["all"]},sse={label:Ua.OKXWallet,injectedNamespace:fa.OKXWallet,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.OKXWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8972).then(Y.bind(Y,58972))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.okxwallet)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.OKXWallet},ose={label:Ua.DeFiWallet,injectedNamespace:fa.DeFiConnectProvider,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.DeFiWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9618).then(Y.bind(Y,29618))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.deficonnectProvider)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},ase={label:Ua.Safeheron,injectedNamespace:fa.Safeheron,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Safeheron],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9223).then(Y.bind(Y,29223))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.safeheron)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},use={label:Ua.Talisman,injectedNamespace:fa.Talisman,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Talisman],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1386).then(Y.bind(Y,41386))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.talismanEth)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"],externalUrl:Y1.Talisman},cse={label:Ua.RoninWallet,injectedNamespace:fa.RoninWallet,checkProviderIdentity:({provider:n})=>!!n,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1925).then(Y.bind(Y,41925))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ronin.provider)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.RoninWallet},lse={label:Ua.OneKey,injectedNamespace:fa.OneKey,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum&&!!n.ethereum[Xo.OneKey],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7513).then(Y.bind(Y,87513))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.$onekey.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.OneKey},dse={label:Ua.Fordefi,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Fordefi],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(46).then(Y.bind(Y,20046))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Fordefi,!0),platforms:["desktop"]},fse={label:Ua.Coin98Wallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Coin98Wallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5931).then(Y.bind(Y,35931))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){let e;return e=window.hasOwnProperty(fa.Ethereum)&&window[fa.Ethereum].isCoin98?window[fa.Ethereum]:window[fa.Coin98Wallet].provider,{provider:e}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Coin98Wallet},hse={label:Ua.SubWallet,injectedNamespace:fa.SubWallet,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.SubWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1548).then(Y.bind(Y,61548))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.SubWallet)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.SubWallet},pse={label:Ua.Kayros,injectedNamespace:fa.Kayros,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Kayros],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(747).then(Y.bind(Y,30747))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.kayros)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},mse=[zie,yie,bie,mie,Cie,_ie,wie,xie,Eie,Tie,Aie,Iie,Sie,kie,Mie,Oie,vie,Die,Pie,Rie,Nie,Bie,Fie,Lie,Uie,jie,Vie,Hie,$ie,Wie,Gie,qie,Kie,Zie,Yie,Jie,Xie,Qie,tse,nse,sse,ese,ise,rse,ose,gie,ase,use,lse,dse,cse,fse,hse,pse],gse=Zu.object({label:Zu.string().required(),getIcon:Zu.function().arity(0).required(),getInterface:Zu.function().maxArity(1).required(),injectedNamespace:Zu.string().required(),checkProviderIdentity:Zu.function().arity(1).required(),platforms:Zu.array().items(Zu.string()),externalUrl:Zu.string()}),yse=Zu.array().items(gse),bse=Zu.object().pattern(/\w+/,Zu.any().allow(Zu.boolean(),Zu.array().items(Zu.string()))),vse=Zu.object({custom:yse,filter:bse,displayUnavailable:[Zu.boolean(),Zu.array().items(Zu.string())],walletUnavailableMessage:Zu.function(),sort:Zu.function(),externalUrl:Zu.string()});var n;Error;const Tse=function(n){if("undefined"==typeof window)return()=>null;if(n){const t=(n=>(0,Wl.validate)(vse,n))(n);if(t&&t.error)throw t.error}return t=>{const{device:e}=t,{custom:r=[],filter:s={},displayUnavailable:p,sort:F,walletUnavailableMessage:q}=n||{},fe=hie([...r,...mse],({label:Re})=>Re).reduce((Re,$e)=>{const{label:rt,platforms:ft,injectedNamespace:Tt,checkProviderIdentity:Ft}=$e,Qt=s[rt],wn=!1===Qt,gr=((n,t,e)=>{var r;return!(!n||!t({provider:n,device:e})&&!(null===(r=n.providers)||void 0===r?void 0:r.some(s=>t({provider:s,device:e}))))})(window[Tt],Ft,e);let _r=!1;Array.isArray(Qt)&&(Qt.includes(e.type)||Qt.includes(e.os.name))&&(_r=!0),"unavailable"===Qt&&!gr&&(_r=!0);const pr=!ft.includes("all")&&!ft.includes(e.type)&&!ft.includes(e.os.name);return!wn&&!_r&&!pr&&(gr||!0===p||Array.isArray(p)&&p.length&&p.includes($e.label))&&Re.push((!0===p||Array.isArray(p)&&p.length&&p.includes($e.label))&&!gr?{...$e,getInterface:(qr=(0,Br.Z)(function*(){throw new Error(q?q($e):(({label:n,externalUrl:t})=>t?`Please install or enable ${n} to continue`:`Please install or enable ${n} to continue`)($e))}),function(){return qr.apply(this,arguments)})}:$e),Re;var qr},[]);if(fe.length){const Re=fe.length>1,$e=fe.filter(rt=>{const{label:ft}=rt;return!(ft===Ua.Detected&&Re)}).map(({label:rt,getIcon:ft,getInterface:Tt})=>({label:rt,getIcon:ft,getInterface:Tt})).sort((rt,ft)=>rt.labelft.label?1:0);return F?F($e):$e}return[]}},JU=["eth_sendTransaction","eth_signTransaction","personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4"],ev=n=>!("string"!=typeof n||!n.match(/^0x[0-9A-Fa-f]*$/)),Mse=function(n){return 1===((null==n?void 0:n.walletConnectVersion)||2)?function(n={walletConnectVersion:1}){return()=>{return{label:"Ledger",getIcon:(t=(0,Br.Z)(function*(){return(yield Y.e(8403).then(Y.bind(Y,28403))).default}),function(){return t.apply(this,arguments)}),getInterface:function(){var t=(0,Br.Z)(function*({chains:e,EventEmitter:r}){const{loadConnectKit:s,SupportedProviders:p,SupportedProviderImplementations:F}=yield Y.e(2306).then(Y.bind(Y,82306)),q=yield s();n.enableDebugLogs&&q.enableDebugLogs();const te=q.checkSupport({providerType:p.Ethereum,chainId:null==n?void 0:n.chainId,infuraId:null==n?void 0:n.infuraId,rpc:null==n?void 0:n.rpc}),fe=yield q.getProvider();if(te.providerImplementation===F.LedgerConnect)return{provider:fe};const{StaticJsonRpcProvider:Re}=yield Y.e(8197).then(Y.bind(Y,98197)),{ProviderRpcError:$e,ProviderRpcErrorCode:rt}=yield Promise.resolve().then(Y.bind(Y,79696)),{Subject:Tt,fromEvent:Ft}=(yield Promise.all([Y.e(8592),Y.e(4843)]).then(Y.bind(Y,14843)),yield Promise.all([Y.e(754),Y.e(1361)]).then(Y.bind(Y,61361))),{takeUntil:Qt,take:wn}=yield Promise.all([Y.e(754),Y.e(3337)]).then(Y.bind(Y,13337)),An=fe.connector,gr=new r;return{provider:new class{constructor({connector:ti,chains:qr}){var yi=this;let as;this.emit=gr.emit.bind(gr),this.on=gr.on.bind(gr),this.removeListener=gr.removeListener.bind(gr),this.connector=ti,this.chains=qr,this.disconnected$=new Tt,this.providers={},Ft(this.connector,"session_update",(Li,vs)=>{if(Li)throw Li;return vs}).pipe(Qt(this.disconnected$)).subscribe({next:({params:Li})=>{const[{accounts:vs,chainId:Yi}]=Li,no=vs.map(Ts=>Ts.toLowerCase());this.emit("accountsChanged",no);const Gs=ev(Yi)?Yi:`0x${Yi.toString(16)}`;(!as||as!==Gs)&&(this.emit("chainChanged",Gs),as=Gs)},error:console.warn}),Ft(this.connector,"disconnect",(Li,vs)=>{if(Li)throw Li;return vs}).pipe(Qt(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>this.connector.killSession(),this.request=function(){var Li=(0,Br.Z)(function*({method:vs,params:Yi}){if("eth_chainId"===vs)return ev(yi.connector.chainId)?yi.connector.chainId:`0x${yi.connector.chainId.toString(16)}`;if("eth_requestAccounts"===vs)return new Promise((Gs,Ts)=>{if(Ft(yi.connector,"connect",(us,ds)=>{if(us)throw us;return ds}).pipe(wn(1)).subscribe({next:({params:us})=>{const[{accounts:ds,chainId:kr}]=us,wr=ds.map(Ys=>Ys.toLowerCase());yi.emit("accountsChanged",wr);const mi=ev(kr)?kr:`0x${kr.toString(16)}`;as||(as=mi),yi.emit("chainChanged",mi),Gs(wr)},error:Ts}),yi.connector.connected){const{accounts:us,chainId:ds}=yi.connector.session,kr=ev(ds)?ds:`0x${ds.toString(16)}`;yi.emit("chainChanged",kr),as||(as=kr);const wr=us.map(mi=>mi.toLowerCase());return Gs(wr)}Gs(fe.request({method:vs,params:Yi}))});if("eth_selectAccounts"===vs)throw new $e({code:rt.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${vs}`});if("wallet_switchEthereumChain"==vs){if(!Yi)throw new $e({code:rt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Gs=Yi[0];if(!Gs.hasOwnProperty("chainId")||void 0===Gs.chainId)throw new $e({code:rt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return yi.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:Gs.chainId}]})}if("eth_sendTransaction"===vs)return yi.connector.sendTransaction(Yi[0]);if("eth_signTransaction"===vs)return yi.connector.signTransaction(Yi[0]);if("personal_sign"===vs)return yi.connector.signPersonalMessage(Yi);if("eth_sign"===vs)return yi.connector.signMessage(Yi);if(vs.includes("eth_signTypedData"))return yi.connector.signTypedData(Yi);if("eth_accounts"===vs)return yi.connector.sendCustomRequest({id:1337,jsonrpc:"2.0",method:vs,params:Yi});const no=yield yi.request({method:"eth_chainId"});if(!yi.providers[no]){const Gs=qr.find(({id:Ts})=>Ts===no);if(!Gs)throw new $e({code:rt.CHAIN_NOT_ADDED,message:`The Provider does not have a rpcUrl to make a request for the requested method: ${vs}`});yi.providers[no]=new Re(Gs.rpcUrl)}return yi.providers[no].send(vs,Yi)});return function(vs){return Li.apply(this,arguments)}}()}}({chains:e,connector:An})}});return function(r){return t.apply(this,arguments)}}()};var t}}(n):function(n){if(!(null==n?void 0:n.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");return()=>{return{label:"Ledger",getIcon:(t=(0,Br.Z)(function*(){return(yield Y.e(8403).then(Y.bind(Y,28403))).default}),function(){return t.apply(this,arguments)}),getInterface:function(){var t=(0,Br.Z)(function*({chains:e,EventEmitter:r}){var s;const{loadConnectKit:p,SupportedProviders:F,SupportedProviderImplementations:q}=yield Y.e(2306).then(Y.bind(Y,82306)),te=yield p();(null==n?void 0:n.enableDebugLogs)&&te.enableDebugLogs();const fe=null===(s=null==n?void 0:n.requiredChains)||void 0===s?void 0:s.map(qr=>"string"==typeof qr&&ev(qr)?parseInt(qr,16):qr),Re=n.optionalMethods&&Array.isArray(n.optionalMethods)?[...n.optionalMethods,...JU]:JU,$e=te.checkSupport({providerType:F.Ethereum,walletConnectVersion:2,projectId:null==n?void 0:n.projectId,chains:fe,optionalChains:e.map(({id:qr})=>parseInt(qr,16)),methods:null==n?void 0:n.requiredMethods,optionalMethods:Re,events:null==n?void 0:n.requiredEvents,optionalEvents:null==n?void 0:n.optionalEvents,rpcMap:e.map(({id:qr,rpcUrl:yi})=>({id:qr,rpcUrl:yi})).reduce((qr,{id:yi,rpcUrl:as})=>(qr[parseInt(yi,16)]=as||"",qr),{})}),rt=yield te.getProvider();if($e.providerImplementation===q.LedgerConnect)return{provider:rt};const{ProviderRpcError:ft,ProviderRpcErrorCode:Tt}=yield Promise.resolve().then(Y.bind(Y,79696)),{Subject:Qt,fromEvent:wn}=(yield Y.e(359).then(Y.bind(Y,50359)),yield Promise.all([Y.e(754),Y.e(1361)]).then(Y.bind(Y,61361))),{takeUntil:An,take:gr}=yield Promise.all([Y.e(754),Y.e(3337)]).then(Y.bind(Y,13337)),_r=rt,pr=new r;return{provider:new class{constructor({connector:yi,chains:as}){var Li=this;this.emit=pr.emit.bind(pr),this.on=pr.on.bind(pr),this.removeListener=pr.removeListener.bind(pr),this.connector=yi,this.chains=as,this.disconnected$=new Qt,wn(this.connector,"accountsChanged",Yi=>Yi).pipe(An(this.disconnected$)).subscribe({next:Yi=>{this.emit("accountsChanged",Yi)},error:console.warn}),wn(this.connector,"chainChanged",Yi=>Yi).pipe(An(this.disconnected$)).subscribe({next:Yi=>{const no=ev(Yi)?Yi:`0x${Yi.toString(16)}`;this.emit("chainChanged",no)},error:console.warn}),wn(this.connector,"session_delete",Yi=>Yi).pipe(An(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>{this.connector.session&&this.connector.disconnect()},(()=>{this.connector.session&&(this.emit("accountsChanged",this.connector.accounts),this.emit("chainChanged",this.connector.chainId))})(),this.request=function(){var Yi=(0,Br.Z)(function*({method:no,params:Gs}){if("eth_chainId"===no)return ev(Li.connector.chainId)?Li.connector.chainId:`0x${Li.connector.chainId.toString(16)}`;if("eth_requestAccounts"===no)return new Promise(function(){var Ts=(0,Br.Z)(function*(us,ds){if(wn(Li.connector,"connect",kr=>kr).pipe(gr(1)).subscribe({next:({chainId:kr})=>{Li.emit("accountsChanged",Li.connector.accounts);const wr=ev(kr)?kr:`0x${kr.toString(16)}`;Li.emit("chainChanged",wr),us(Li.connector.accounts)},error:ds}),Li.connector.session){const kr=Li.connector.accounts,mi=`0x${Li.connector.chainId.toString(16)}`;return Li.emit("chainChanged",mi),us(kr)}yield rt.request({method:no}).catch(kr=>{console.error("err creating new session: ",kr),ds(new ft({code:4001,message:"User rejected the request."}))})});return function(us,ds){return Ts.apply(this,arguments)}}());if("eth_selectAccounts"===no)throw new ft({code:Tt.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${no}`});if("wallet_switchEthereumChain"==no){if(!Gs)throw new ft({code:Tt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Ts=Gs[0];if(!Ts.hasOwnProperty("chainId")||void 0===Ts.chainId)throw new ft({code:Tt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return Li.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:Ts.chainId}]})}return Li.connector.request({method:no,params:Gs})});return function(no){return Yi.apply(this,arguments)}}()}}({chains:e,connector:_r})}});return function(r){return t.apply(this,arguments)}}()};var t}}(n)},Rse=function(n){const{apiKey:t}=n;return()=>{return{label:"Portis",getIcon:(e=(0,Br.Z)(function*(){return(yield Y.e(8593).then(Y.bind(Y,38593))).default}),function(){return e.apply(this,arguments)}),getInterface:function(){var e=(0,Br.Z)(function*({chains:r}){const{default:s}=yield Y.e(8044).then(Y.t.bind(Y,38044,19)),{createEIP1193Provider:p}=yield Promise.resolve().then(Y.bind(Y,79696)),F=new s(t,{nodeUrl:r[0].rpcUrl||"",chainId:r[0].id}),q=F.provider,te=p(q,{eth_requestAccounts:q.enable,eth_selectAccounts:null,wallet_switchEthereumChain:(fe=(0,Br.Z)(function*({params:Re}){const $e=r.find(({id:rt})=>rt===Re[0].chainId);if(!$e)throw new Error("chain must be set before switching");return F.changeNetwork({nodeUrl:$e.rpcUrl||"",chainId:$e.id}),te.emit("chainChanged",$e.id),null}),function($e){return fe.apply(this,arguments)})});var fe;return{provider:te,instance:F}});return function(s){return e.apply(this,arguments)}}()};var e}},Bse=function(n){const{buttonPosition:t,modalZIndex:e,apiKey:r,buildEnv:s,enableLogging:p,loginConfig:F,showTorusButton:q,integrity:te,whiteLabel:fe,skipTKey:Re}=n||{};return()=>{return{label:"Torus",getIcon:($e=(0,Br.Z)(function*(){return(yield Y.e(6880).then(Y.bind(Y,6880))).default}),function(){return $e.apply(this,arguments)}),getInterface:function(){var $e=(0,Br.Z)(function*({chains:rt}){const{default:ft}=yield Promise.all([Y.e(1865),Y.e(7183)]).then(Y.bind(Y,37183)),{createEIP1193Provider:Tt,ProviderRpcErrorCode:Ft,ProviderRpcError:Qt}=yield Promise.resolve().then(Y.bind(Y,79696)),[wn]=rt;let An=new ft({buttonPosition:t,modalZIndex:e,apiKey:r});yield An.init({buildEnv:s,enableLogging:p,network:{host:wn.rpcUrl||"",chainId:parseInt(wn.id),networkName:wn.label},showTorusButton:q,loginConfig:F,integrity:te,whiteLabel:fe,skipTKey:Re});const _r=Tt(An.provider,{eth_requestAccounts:(pr=(0,Br.Z)(function*(){try{return yield An.login()}catch{throw new Qt({code:Ft.ACCOUNT_ACCESS_REJECTED,message:"Account access rejected"})}}),function(){return pr.apply(this,arguments)}),eth_selectAccounts:null,wallet_switchEthereumChain:function(){var pr=(0,Br.Z)(function*({params:ti}){const qr=rt.find(({id:yi})=>yi===ti[0].chainId);if(!qr)throw new Error("chain must be set before switching");return yield An.setProvider({host:qr.rpcUrl||"",chainId:parseInt(qr.id),networkName:qr.label}),null});return function(qr){return pr.apply(this,arguments)}}(),eth_chainId:function(){var pr=(0,Br.Z)(function*({baseRequest:ti}){const qr=yield ti({method:"eth_chainId"});return`0x${parseInt(qr).toString(16)}`});return function(qr){return pr.apply(this,arguments)}}()});var pr;return _r.disconnect=()=>An.cleanUp(),{provider:_r,instance:An}});return function(ft){return $e.apply(this,arguments)}}()};var $e}};var XU=Y(69337);const QU="m/44'/60'/0'/0",Fse=[{label:"ETH"}],Lse=[{label:"Ethereum Mainnet",value:QU}],Use=function(){var n=(0,Br.Z)(function*({publicKey:t,chainCode:e,path:r},s,p,F){const{default:q}=yield Promise.all([Y.e(3945),Y.e(2330)]).then(Y.t.bind(Y,92330,19)),te=yield Promise.all([Y.e(3945),Y.e(5510),Y.e(3345)]).then(Y.t.bind(Y,93345,19)),{publicToAddress:fe,toChecksumAddress:Re}=te.default||te,$e=new q;$e.publicKey=XU.Buffer.from(t,"hex"),$e.chainCode=XU.Buffer.from(e,"hex");const ft=Re(`0x${fe($e.deriveChild(p).publicKey,!0).toString("hex")}`);return{derivationPath:`${r}/${p}`,address:ft,balance:{asset:s.label,value:yield F.getBalance(ft)}}});return function(e,r,s,p){return n.apply(this,arguments)}}(),jse=function(){var n=(0,Br.Z)(function*(t,e,r,s){const p=[];let F=0,q=0;for(;q{const{email:r,appUrl:s,customNetwork:p,filter:F,containerElement:q,consecutiveEmptyAccountThreshold:te}=n||{};if(!r||!s)throw new Error("Email and AppUrl required in Trezor options for Trezor Wallet Connection");const fe=te||5;if(Array.isArray(F)&&(F.includes(e.type)||F.includes(e.os.name)))return null;let $e;return{label:"Trezor",getIcon:t,getInterface:(rt=(0,Br.Z)(function*({EventEmitter:ft,chains:Tt}){const{default:Ft}=yield Y.e(5782).then(Y.t.bind(Y,75782,19)),{Transaction:Qt,FeeMarketEIP1559Transaction:wn}=yield Promise.all([Y.e(3945),Y.e(5510),Y.e(470)]).then(Y.t.bind(Y,50470,19)),{createEIP1193Provider:An,ProviderRpcError:gr}=yield Promise.resolve().then(Y.bind(Y,79696)),{accountSelect:_r}=yield Y.e(2560).then(Y.bind(Y,92560)),{getCommon:pr,bigNumberFieldsToStrings:ti,getHardwareWalletProvider:qr}=yield Y.e(2560).then(Y.bind(Y,92560)),yi=yield Promise.all([Y.e(3945),Y.e(5510),Y.e(3345)]).then(Y.t.bind(Y,93345,19)),{compress:as}=(yield Promise.all([Y.e(3945),Y.e(5510),Y.e(470),Y.e(7470)]).then(Y.bind(Y,17470))).publicKey,{StaticJsonRpcProvider:Li}=yield Promise.resolve().then(Y.bind(Y,80831)),vs=Ft.default||Ft;vs.manifest({email:r,appUrl:s});const Yi=new ft;let Gs,Ts,no=Tt[0];const us=function(){var To=(0,Br.Z)(function*({derivationPath:Ra,chainId:Gl,asset:Om}){no=Tt.find(({id:ph})=>ph===Gl)||no,Ts=new Li(no.rpcUrl);const{publicKey:Yb,chainCode:Rl,path:hh}=yield function(To){return Ys.apply(this,arguments)}(Ra);if(Ra!==QU){const ph=yield function(To){return wr.apply(this,arguments)}(hh);return[{derivationPath:Ra,address:ph,balance:{asset:Om.label,value:yield Ts.getBalance(ph.toLowerCase())}}]}return jse({publicKey:as(Yb),chainCode:Rl||"",path:Ra},Om,Ts,fe)});return function(Gl){return To.apply(this,arguments)}}(),ds=function(){var To=(0,Br.Z)(function*(){return $e=yield _r({basePaths:Lse,assets:Fse,chains:Tt,scanAccounts:us,containerElement:q}),Array.isArray($e)&&$e.length&&$e[0].hasOwnProperty("address")&&Yi.emit("accountsChanged",[$e[0].address]),$e});return function(){return To.apply(this,arguments)}}();function wr(){return(wr=(0,Br.Z)(function*(To){const Ra=`Unable to derive address from path ${To}`;try{const Gl=yield vs.ethereumGetAddress({path:To,showOnTrezor:!0});if(!Gl.success)throw new Error(Ra);return Gl.payload.address}catch(Gl){throw console.error(Gl),new Error(Ra)}})).apply(this,arguments)}function Ys(){return(Ys=(0,Br.Z)(function*(To){if(!To)throw new Error("a derivation path is needed to get the public key");try{const Ra=yield vs.getPublicKey({path:To,coin:"ETH"});if(!Ra.success)throw new Error(Ra.payload.error);return Gs={publicKey:Ra.payload.publicKey,chainCode:Ra.payload.chainCode,path:Ra.payload.serializedPath},Gs}catch(Ra){throw new Error(`There was an error accessing your Trezor accounts - Error: ${Ra}`)}})).apply(this,arguments)}function Js(To){if(!To||!To.hasOwnProperty("gasLimit")&&!To.hasOwnProperty("gas"))throw new Error("There was no Transaction Object or both the gasLimit and gas property are missing");const Ra=To.gasLimit||To.gas;return To.maxFeePerGas||To.maxPriorityFeePerGas?{to:To.to,value:To.value||"",gasLimit:Ra,maxFeePerGas:To.maxFeePerGas,maxPriorityFeePerGas:To.maxPriorityFeePerGas,nonce:To.nonce,chainId:Number(no.id),data:To.hasOwnProperty("data")?To.data:""}:{to:To.to,value:To.value||"",gasPrice:To.gasPrice,gasLimit:Ra,nonce:To.nonce,chainId:Number(no.id),data:To.hasOwnProperty("data")?To.data:""}}function va(To,Ra){try{return vs.ethereumSignTransaction({path:To,transaction:Ra})}catch(Gl){throw new Error(`There was an error signing transaction - Error: ${Gl}`)}}function Do(){return(Do=(0,Br.Z)(function*(To){if(!Array.isArray($e)||!$e.length)throw new Error("No account selected. Must call eth_requestAccounts first.");let Ra;To.hasOwnProperty("from")&&(Ra=$e.find(ld=>ld.address===To.from)),Ra=Ra||$e[0];const{derivationPath:Gl,address:Om}=Ra;To.gasLimit=To.gas||To.gasLimit,delete To.gas;const Rl=yield Ts.getSigner(Om).populateTransaction(To);Rl.hasOwnProperty("nonce")&&"number"==typeof Rl.nonce&&(Rl.nonce=Rl.nonce.toString(16)),Rl.hasOwnProperty("nonce")&&"string"==typeof Rl.nonce&&(Rl.nonce=yi.addHexPrefix(Rl.nonce));const ph=Js(ti(Rl));ph.from=Om;const NI=no.hasOwnProperty("id")?Number(no.id):1,w9=yield pr({customNetwork:p,chainId:NI}),b8=yield va(Gl,ph);if(!b8.success)throw new Error("Unknown message"===b8.payload.error?"This type of transactions is not supported on this device":b8.payload.error);let e4;return e4=ph.maxFeePerGas||ph.maxPriorityFeePerGas?wn.fromTxData({...ph,...b8.payload},{common:w9}):Qt.fromTxData({...ph,...b8.payload},{common:w9}),e4?`0x${e4.serialize().toString("hex")}`:""})).apply(this,arguments)}function Pa(To,Ra){return Ou.apply(this,arguments)}function Ou(){return(Ou=(0,Br.Z)(function*(To,Ra){if(!Array.isArray($e)||!$e.length)throw new Error("No account selected. Must call eth_requestAccounts first.");const Gl=$e.find(Om=>Om.address===To)||$e[0];return new Promise((Om,Yb)=>{vs.ethereumSignMessage({path:Gl.derivationPath,message:yi.stripHexPrefix(Ra.data),hex:!0}).then(Rl=>{Rl.success?(Rl.payload.address!==yi.toChecksumAddress(To)&&Yb(new Error("signature doesnt match the right address")),Om(`0x${Rl.payload.signature}`)):Yb(new Error(Rl.payload&&Rl.payload.error||"There was an error signing a message"))})})})).apply(this,arguments)}const Td=An(qr(()=>no.rpcUrl||""),{eth_requestAccounts:(To=(0,Br.Z)(function*(){const Ra=yield ds();if(!Array.isArray(Ra))throw new Error("No account selected. Must call eth_requestAccounts first.");if(0===Ra.length)throw new gr({code:4001,message:"User rejected the request."});if(!Ra[0].hasOwnProperty("address"))throw new Error("No address property associated with the selected account");return[Ra[0].address]}),function(){return To.apply(this,arguments)}),eth_selectAccounts:function(){var To=(0,Br.Z)(function*(){return(yield ds()).map(({address:Gl})=>Gl)});return function(){return To.apply(this,arguments)}}(),eth_accounts:function(){var To=(0,Br.Z)(function*(){return Array.isArray($e)&&$e.length&&$e[0].hasOwnProperty("address")?[$e[0].address]:[]});return function(){return To.apply(this,arguments)}}(),eth_chainId:function(){var To=(0,Br.Z)(function*(){return no.hasOwnProperty("id")?no.id:""});return function(){return To.apply(this,arguments)}}(),eth_signTransaction:function(){var To=(0,Br.Z)(function*({params:[Ra]}){return function(To){return Do.apply(this,arguments)}(Ra)});return function(Gl){return To.apply(this,arguments)}}(),eth_sendTransaction:function(){var To=(0,Br.Z)(function*({baseRequest:Ra,params:Gl}){const Om=yield Td.request({method:"eth_signTransaction",params:Gl});return yield Ra({method:"eth_sendRawTransaction",params:[Om]})});return function(Gl){return To.apply(this,arguments)}}(),eth_sign:function(){var To=(0,Br.Z)(function*({params:[Ra,Gl]}){return Pa(Ra,{data:Gl})});return function(Gl){return To.apply(this,arguments)}}(),personal_sign:function(){var To=(0,Br.Z)(function*({params:[Ra,Gl]}){return Pa(Gl,{data:Ra})});return function(Gl){return To.apply(this,arguments)}}(),wallet_switchEthereumChain:function(){var To=(0,Br.Z)(function*({params:[{chainId:Ra}]}){if(no=Tt.find(({id:Gl})=>Gl===Ra)||no,!no)throw new Error("chain must be set before switching");return Yi.emit("chainChanged",no.id),null});return function(Gl){return To.apply(this,arguments)}}(),eth_signTypedData:null,wallet_addEthereumChain:null});var To;return Td.on=Yi.on.bind(Yi),{provider:Td}}),function(Tt){return rt.apply(this,arguments)})};var rt}};var ej=Y(98983);const tj=["eth_sendTransaction","eth_signTransaction","personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4"],qse=Zu.object({handleUri:Zu.func().optional(),version:Zu.number().valid(1,2).optional(),bridge:Zu.string().when("version",{is:1,then:Zu.required(),otherwise:Zu.forbidden()}).messages({"any.required":"A bridge URL is a required when version is 1 of WalletConnect as the WC team has removed support for their default bridge."}),connectFirstChainId:Zu.boolean().optional(),qrcodeModalOptions:Zu.object({mobileLinks:Zu.array().items(Zu.string()).optional()}).optional(),projectId:Zu.string().when("version",{is:2,then:Zu.required(),otherwise:Zu.optional()}).messages({"any.required":"WalletConnect version 2 requires a projectId. Please visit https://cloud.walletconnect.com to get one."}),dappUrl:Zu.string().optional(),requiredChains:Zu.array().items(Zu.number()).optional(),optionalChains:Zu.array().items(Zu.number()).optional(),qrModalOptions:Zu.object().optional(),additionalRequiredMethods:Zu.array().items(Zu.string()).optional(),additionalOptionalMethods:Zu.array().items(Zu.string()).optional()}),q3=n=>!("string"!=typeof n||!n.match(/^0x[0-9A-Fa-f]*$/)),Jse=function(n){if(!n)throw new Error("WalletConnect requires an initialization object to be passed - see the official docs for an example: https://onboard.blocknative.com/docs/wallets/walletconnect");if(n){const t=(n=>((n,t)=>{const e=n.validate(t);return e.error?e:null})(qse,n))(n);if(t)throw t}return n.version=n.version||2,2===n.version?function(n){if(2!==n.version||!n.projectId)throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");const{projectId:t,handleUri:e,requiredChains:r,optionalChains:s,qrModalOptions:p,additionalRequiredMethods:F,additionalOptionalMethods:q,dappUrl:te}=n;let fe;return()=>{return{label:"WalletConnect",getIcon:(Re=(0,Br.Z)(function*(){return(yield Y.e(1111).then(Y.bind(Y,31111))).default}),function(){return Re.apply(this,arguments)}),getInterface:function(){var Re=(0,Br.Z)(function*({chains:$e,EventEmitter:rt,appMetadata:ft}){const{ProviderRpcError:Tt,ProviderRpcErrorCode:Ft}=yield Promise.resolve().then(Y.bind(Y,79696)),{default:Qt}=yield Promise.resolve().then(Y.bind(Y,98983)),{Subject:wn,fromEvent:An}=yield Promise.all([Y.e(9639),Y.e(7657)]).then(Y.bind(Y,7657)),{takeUntil:gr,take:_r}=yield Promise.all([Y.e(9639),Y.e(5354)]).then(Y.bind(Y,45354)),ti=Array.isArray(r)&&r.length&&r.every(Gs=>!isNaN(Gs))?r.map(Gs=>parseInt(Gs)):[],qr=Array.isArray(s)&&s.length&&s.every(Gs=>!isNaN(Gs))?s.map(Gs=>parseInt(Gs)):$e.map(({id:Gs})=>parseInt(Gs,16)),yi=new Set(F&&Array.isArray(F)?[...F,...ej.REQUIRED_METHODS]:ej.REQUIRED_METHODS),as=Array.from(yi),Li=q&&Array.isArray(q)?[...q,...tj]:tj,vs=yield Qt.init({projectId:t,chains:ti,methods:as,optionalChains:qr,optionalMethods:Li,showQrModal:!0,rpcMap:$e.map(({id:Gs,rpcUrl:Ts})=>({id:Gs,rpcUrl:Ts})).reduce((Gs,{id:Ts,rpcUrl:us})=>(Gs[parseInt(Ts,16)]=us||"",Gs),{}),metadata:(()=>{if(!ft)return;const Gs=te||ft.explore||"";!Gs&&!Gs.length&&console.warn("It is strongly recommended to supply a dappUrl as it is required by some wallets (i.e. MetaMask) to allow connection.");const Ts={name:ft.name,description:ft.description||"",url:Gs,icons:[]};return void 0!==ft.icon&&ft.icon.length&&(Ts.icons=[ft.icon]),void 0!==ft.logo&&ft.logo.length&&(Ts.icons=Ts.icons.length?[...Ts.icons,ft.logo]:[ft.logo]),Ts})(),qrModalOptions:p}),Yi=new rt;return{provider:new class{constructor({connector:Ts,chains:us}){var ds=this;this.emit=Yi.emit.bind(Yi),this.on=Yi.on.bind(Yi),this.removeListener=Yi.removeListener.bind(Yi),this.connector=Ts,this.chains=us,this.disconnected$=new wn,An(this.connector,"accountsChanged",wr=>wr).pipe(gr(this.disconnected$)).subscribe({next:wr=>{const mi=Array.isArray(wr)?wr:[wr];this.emit("accountsChanged",mi)},error:console.warn}),An(this.connector,"chainChanged",wr=>wr).pipe(gr(this.disconnected$)).subscribe({next:wr=>{const mi=q3(wr)?wr:`0x${wr.toString(16)}`;this.emit("chainChanged",mi)},error:console.warn}),An(this.connector,"session_delete",wr=>wr).pipe(gr(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>{this.connector.session&&(this.connector.disconnect(),fe=null)},n&&e&&An(this.connector,"display_uri",wr=>wr).pipe(gr(this.disconnected$)).subscribe(function(){var wr=(0,Br.Z)(function*(mi){try{e&&(yield e(mi))}catch(Ys){throw`An error occurred when handling the URI. Error: ${Ys}`}});return function(mi){return wr.apply(this,arguments)}}()),(()=>{const wr=this.connector.session;fe=wr,wr&&(this.emit("accountsChanged",this.connector.accounts),this.emit("chainChanged",this.connector.chainId))})(),this.request=function(){var wr=(0,Br.Z)(function*({method:mi,params:Ys}){if("eth_chainId"===mi)return q3(ds.connector.chainId)?ds.connector.chainId:`0x${ds.connector.chainId.toString(16)}`;if("eth_requestAccounts"===mi)return new Promise(function(){var Js=(0,Br.Z)(function*(va,Qo){if(An(ds.connector,"connect",Do=>Do).pipe(_r(1)).subscribe({next:({chainId:Do})=>{ds.emit("accountsChanged",ds.connector.accounts);const Pa=q3(Do)?Do:`0x${Do.toString(16)}`;ds.emit("chainChanged",Pa),va(ds.connector.accounts)},error:Qo}),ds.connector.session){const Do=ds.connector.accounts;fe=ds.connector.session;const Ou=`0x${ds.connector.chainId.toString(16)}`;return ds.emit("chainChanged",Ou),va(Do)}yield ds.connector.connect().catch(Do=>{console.error("err creating new session: ",Do),Qo(new Tt({code:4001,message:"User rejected the request."}))})});return function(va,Qo){return Js.apply(this,arguments)}}());if("eth_selectAccounts"===mi)throw new Tt({code:Ft.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${mi}`});if("wallet_switchEthereumChain"==mi){if(!Ys)throw new Tt({code:Ft.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Js=Ys[0];if(!Js.hasOwnProperty("chainId")||void 0===Js.chainId)throw new Tt({code:Ft.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return ds.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:Js.chainId}]})}return ds.connector.request({method:mi,params:Ys})});return function(mi){return wr.apply(this,arguments)}}()}}({chains:$e,connector:vs}),instance:fe}});return function(rt){return Re.apply(this,arguments)}}()};var Re}}(n):function(n){if(1!==n.version)throw"WalletConnect version must be set to 1 to initialize - note version 1 has been deprecated by the WalletConnect team";const{bridge:t,qrcodeModalOptions:e,connectFirstChainId:r,handleUri:s}=n||{};if(console.warn("Wallet Connect version 1 support has been deprecated by the WalletConnect team. Please consider using version 2. See docs for more details."),!t)throw"WalletConnect version 1 requires a bridge to be passed in. The WalletConnect team has remove support for the bridge. Please upgrade to version 2 of WalletConnect or pass in a custom bridge URL.";return()=>{return{label:"WalletConnect",getIcon:(p=(0,Br.Z)(function*(){return(yield Y.e(1111).then(Y.bind(Y,31111))).default}),function(){return p.apply(this,arguments)}),getInterface:function(){var p=(0,Br.Z)(function*({chains:F,EventEmitter:q}){const{StaticJsonRpcProvider:te}=yield Y.e(832).then(Y.bind(Y,90832)),{ProviderRpcError:fe,ProviderRpcErrorCode:Re}=yield Promise.resolve().then(Y.bind(Y,79696)),{default:$e}=yield Promise.all([Y.e(8592),Y.e(4843)]).then(Y.bind(Y,14843));let rt=yield Promise.all([Y.e(8592),Y.e(5475)]).then(Y.t.bind(Y,25475,19));rt=rt.default||rt;const{Subject:ft,fromEvent:Tt}=yield Promise.all([Y.e(9639),Y.e(7657)]).then(Y.bind(Y,7657)),{takeUntil:Ft,take:Qt}=yield Promise.all([Y.e(9639),Y.e(5354)]).then(Y.bind(Y,45354)),wn=new $e({bridge:t});if(s)try{yield s(wn.uri||"")}catch(_r){throw`An error occurred when handling the URI. Error: ${_r}`}const An=new q;return{provider:new class{constructor({connector:pr,chains:ti}){var qr=this;let yi;this.emit=An.emit.bind(An),this.on=An.on.bind(An),this.removeListener=An.removeListener.bind(An),this.connector=pr,this.chains=ti,this.disconnected$=new ft,this.providers={},Tt(this.connector,"session_update",(as,Li)=>{if(as)throw as;return Li}).pipe(Ft(this.disconnected$)).subscribe({next:({params:as})=>{const[{accounts:Li,chainId:vs}]=as,Yi=Li.map(Gs=>Gs.toLowerCase());this.emit("accountsChanged",Yi);const no=q3(vs)?vs:`0x${vs.toString(16)}`;(!yi||yi!==no)&&(this.emit("chainChanged",no),yi=no)},error:console.warn}),Tt(this.connector,"disconnect",(as,Li)=>{if(as)throw as;return Li}).pipe(Ft(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>this.connector.killSession(),this.request=function(){var as=(0,Br.Z)(function*({method:Li,params:vs}){if("eth_chainId"===Li)return q3(qr.connector.chainId)?qr.connector.chainId:`0x${qr.connector.chainId.toString(16)}`;if("eth_requestAccounts"===Li)return new Promise((no,Gs)=>{if(Tt(qr.connector,"connect",(Ts,us)=>{if(Ts)throw Ts;return us}).pipe(Qt(1)).subscribe({next:({params:Ts})=>{const[{accounts:us,chainId:ds}]=Ts,kr=us.map(mi=>mi.toLowerCase());qr.emit("accountsChanged",kr);const wr=q3(ds)?ds:`0x${ds.toString(16)}`;yi||(yi=wr),qr.emit("chainChanged",wr),rt.close(),no(kr)},error:Gs}),qr.connector.connected){const{accounts:Ts,chainId:us}=qr.connector.session,ds=q3(us)?us:`0x${us.toString(16)}`;qr.emit("chainChanged",ds),yi||(yi=ds);const kr=Ts.map(wr=>wr.toLowerCase());return no(kr)}qr.connector.createSession(r?{chainId:parseInt(ti[0].id,16)}:void 0).then(()=>{rt.open(qr.connector.uri,()=>Gs(new fe({code:4001,message:"User rejected the request."})),e)})});if("eth_selectAccounts"===Li)throw new fe({code:Re.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${Li}`});if("wallet_switchEthereumChain"==Li){if(!vs)throw new fe({code:Re.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const no=vs[0];if(!no.hasOwnProperty("chainId")||void 0===no.chainId)throw new fe({code:Re.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return qr.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:no.chainId}]})}if("eth_sendTransaction"===Li)return qr.connector.sendTransaction(vs[0]);if("eth_signTransaction"===Li)return qr.connector.signTransaction(vs[0]);if("personal_sign"===Li)return qr.connector.signPersonalMessage(vs);if("eth_sign"===Li)return qr.connector.signMessage(vs);if(Li.includes("eth_signTypedData"))return qr.connector.signTypedData(vs);if("eth_accounts"===Li)return qr.connector.sendCustomRequest({id:1337,jsonrpc:"2.0",method:Li,params:vs});const Yi=yield qr.request({method:"eth_chainId"});if(!qr.providers[Yi]){const no=ti.find(({id:Gs})=>Gs===Yi);if(!no)throw new fe({code:Re.CHAIN_NOT_ADDED,message:`The Provider does not have a rpcUrl to make a request for the requested method: ${Li}`});qr.providers[Yi]=new te(no.rpcUrl)}return qr.providers[Yi].send(Li,vs)});return function(Li){return as.apply(this,arguments)}}()}}({chains:F,connector:wn})}});return function(q){return p.apply(this,arguments)}}()};var p}}(n)},nj=["toast-component",""];function Qse(n,t){if(1&n){const e=Di();Ae(0,"button",5),dr("click",function(){return Ur(e),an().remove()}),Ae(1,"span",6),kt(2,"\xd7"),Ie(),Ie()}}function eoe(n,t){if(1&n&&(Qr(0),kt(1),Wr()),2&n){const e=an(2);dt(1),Pr("[",e.duplicatesCount+1,"]")}}function toe(n,t){if(1&n&&(Ae(0,"div"),kt(1),it(2,eoe,2,1,"ng-container",4),Ie()),2&n){const e=an();Ss(e.options.titleClass),Cu("aria-label",e.title),dt(1),Pr(" ",e.title," "),dt(1),Mt("ngIf",e.duplicatesCount)}}function noe(n,t){if(1&n&&qn(0,"div",7),2&n){const e=an();Ss(e.options.messageClass),Mt("innerHTML",e.message,vr)}}function roe(n,t){if(1&n&&(Ae(0,"div",8),kt(1),Ie()),2&n){const e=an();Ss(e.options.messageClass),Cu("aria-label",e.message),dt(1),Pr(" ",e.message," ")}}function ioe(n,t){if(1&n&&(Ae(0,"div"),qn(1,"div",9),Ie()),2&n){const e=an();dt(1),Hs("width",e.width+"%")}}function soe(n,t){if(1&n){const e=Di();Ae(0,"button",5),dr("click",function(){return Ur(e),an().remove()}),Ae(1,"span",6),kt(2,"\xd7"),Ie(),Ie()}}function ooe(n,t){if(1&n&&(Qr(0),kt(1),Wr()),2&n){const e=an(2);dt(1),Pr("[",e.duplicatesCount+1,"]")}}function aoe(n,t){if(1&n&&(Ae(0,"div"),kt(1),it(2,ooe,2,1,"ng-container",4),Ie()),2&n){const e=an();Ss(e.options.titleClass),Cu("aria-label",e.title),dt(1),Pr(" ",e.title," "),dt(1),Mt("ngIf",e.duplicatesCount)}}function uoe(n,t){if(1&n&&qn(0,"div",7),2&n){const e=an();Ss(e.options.messageClass),Mt("innerHTML",e.message,vr)}}function coe(n,t){if(1&n&&(Ae(0,"div",8),kt(1),Ie()),2&n){const e=an();Ss(e.options.messageClass),Cu("aria-label",e.message),dt(1),Pr(" ",e.message," ")}}function loe(n,t){if(1&n&&(Ae(0,"div"),qn(1,"div",9),Ie()),2&n){const e=an();dt(1),Hs("width",e.width+"%")}}class doe{constructor(t,e){this.component=t,this.injector=e}attach(t,e){return this._attachedHost=t,t.attach(this,e)}detach(){const t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class qE{constructor(t,e,r,s,p,F){this.toastId=t,this.config=e,this.message=r,this.title=s,this.toastType=p,this.toastRef=F,this._onTap=new ie.xQ,this._onAction=new ie.xQ,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(t){this._onAction.next(t)}onAction(){return this._onAction.asObservable()}}const rj={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing",payload:null},ij=new fo("ToastConfig");class hoe{constructor(t){this._overlayRef=t,this.duplicatesCount=0,this._afterClosed=new ie.xQ,this._activate=new ie.xQ,this._manualClose=new ie.xQ,this._resetTimeout=new ie.xQ,this._countDuplicate=new ie.xQ}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(t,e){t&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}}class poe{constructor(t,e){this._toastPackage=t,this._parentInjector=e}get(t,e,r){return t===qE?this._toastPackage:this._parentInjector.get(t,e,r)}}class moe extends class{attach(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(t){this._disposeFn=t}}{constructor(t,e,r){super(),this._hostDomElement=t,this._componentFactoryResolver=e,this._appRef=r}attachComponentPortal(t,e){const r=this._componentFactoryResolver.resolveComponentFactory(t.component);let s;return s=r.create(t.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}class goe{constructor(t){this._portalHost=t}attach(t,e=!0){return this._portalHost.attach(t,e)}detach(){return this._portalHost.detach()}}let yoe=(()=>{class n{constructor(e){this._document=e}ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),boe=(()=>{class n{constructor(e,r,s,p){this._overlayContainer=e,this._componentFactoryResolver=r,this._appRef=s,this._document=p,this._paneElements=new Map}create(e,r){return this._createOverlayRef(this.getPaneElement(e,r))}getPaneElement(e="",r){return this._paneElements.get(r)||this._paneElements.set(r,{}),this._paneElements.get(r)[e]||(this._paneElements.get(r)[e]=this._createPaneElement(e,r)),this._paneElements.get(r)[e]}_createPaneElement(e,r){const s=this._document.createElement("div");return s.id="toast-container",s.classList.add(e),s.classList.add("toast-container"),r?r.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(e){return new moe(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new goe(this._createPortalHost(e))}}return n.\u0275fac=function(e){return new(e||n)(Yn(yoe),Yn(l1),Yn(e2),Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),RO=(()=>{class n{constructor(e,r,s,p,F){this.overlay=r,this._injector=s,this.sanitizer=p,this.ngZone=F,this.currentlyActive=0,this.toasts=[],this.index=0,this.toastrConfig=Object.assign(Object.assign({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=Object.assign(Object.assign({},e.default.iconClasses),e.config.iconClasses))}show(e,r,s={},p=""){return this._preBuildNotification(p,e,r,this.applyConfig(s))}success(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.success||"",e,r,this.applyConfig(s))}error(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.error||"",e,r,this.applyConfig(s))}info(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.info||"",e,r,this.applyConfig(s))}warning(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.warning||"",e,r,this.applyConfig(s))}clear(e){for(const r of this.toasts)if(void 0!==e){if(r.toastId===e)return void r.toastRef.manualClose()}else r.toastRef.manualClose()}remove(e){const r=this._findToast(e);if(!r||(r.activeToast.toastRef.close(),this.toasts.splice(r.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActivethis._buildNotification(e,r,s,p)):this._buildNotification(e,r,s,p)}_buildNotification(e,r,s,p){if(!p.toastComponent)throw new Error("toastComponent required");const F=this.findDuplicate(s,r,this.toastrConfig.resetTimeoutOnDuplicate&&p.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||r)&&this.toastrConfig.preventDuplicates&&null!==F)return F;this.previousToastMessage=r;let q=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(q=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));const te=this.overlay.create(p.positionClass,this.overlayContainer);this.index=this.index+1;let fe=r;r&&p.enableHtml&&(fe=this.sanitizer.sanitize(Ui.HTML,r));const Re=new hoe(te),$e=new qE(this.index,p,fe,s,e,Re),rt=new poe($e,this._injector),ft=new doe(p.toastComponent,rt),Tt=te.attach(ft,this.toastrConfig.newestOnTop);Re.componentInstance=Tt.instance;const Ft={toastId:this.index,title:s||"",message:r||"",toastRef:Re,onShown:Re.afterActivate(),onHidden:Re.afterClosed(),onTap:$e.onTap(),onAction:$e.onAction(),portal:Tt};return q||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{Ft.toastRef.activate()})),this.toasts.push(Ft),Ft}}return n.\u0275fac=function(e){return new(e||n)(Yn(ij),Yn(boe),Yn(sc),Yn(N7),Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),voe=(()=>{class n{constructor(e,r,s){this.toastrService=e,this.toastPackage=r,this.ngZone=s,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=r.message,this.title=r.title,this.options=r.config,this.originalTimeout=r.config.timeOut,this.toastClasses=`${r.toastType} ${r.config.toastClass}`,this.sub=r.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=r.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=r.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=r.toastRef.countDuplicate().subscribe(p=>{this.duplicatesCount=p})}get displayStyle(){if("inactive"===this.state.value)return"none"}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=Object.assign(Object.assign({},this.state),{value:"active"}),!0!==this.options.disableTimeOut&&"timeOut"!==this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(0===this.width||100===this.width||!this.options.timeOut)return;const e=(new Date).getTime();this.width=(this.hideTime-e)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Object.assign(Object.assign({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=Object.assign(Object.assign({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){!0===this.options.disableTimeOut||"extendedTimeOut"===this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state.value||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,r){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),r)):this.timeout=setTimeout(()=>e(),r)}outsideInterval(e,r){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),r)):this.intervalId=setInterval(()=>e(),r)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}}return n.\u0275fac=function(e){return new(e||n)(Xt(RO),Xt(qE),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,r){1&e&&dr("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),2&e&&(F8("@flyInOut",r.state),Ss(r.toastClasses),Hs("display",r.displayStyle))},attrs:nj,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,r){1&e&&(it(0,Qse,3,0,"button",0),it(1,toe,3,5,"div",1),it(2,noe,1,3,"div",2),it(3,roe,2,4,"div",3),it(4,ioe,2,2,"div",4)),2&e&&(Mt("ngIf",r.options.closeButton),dt(1),Mt("ngIf",r.title),dt(1),Mt("ngIf",r.message&&r.options.enableHtml),dt(1),Mt("ngIf",r.message&&!r.options.enableHtml),dt(1),Mt("ngIf",r.options.progressBar))},directives:[La],encapsulation:2,data:{animation:[F3("flyInOut",[K1("inactive",vf({opacity:0})),K1("active",vf({opacity:1})),K1("removed",vf({opacity:0})),V2("inactive => active",Bg("{{ easeTime }}ms {{ easing }}")),V2("active => removed",Bg("{{ easeTime }}ms {{ easing }}"))])]}}),n})();const _oe=Object.assign(Object.assign({},rj),{toastComponent:voe});let woe=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[{provide:ij,useValue:{default:_oe,config:e}}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),xoe=(()=>{class n{constructor(e,r,s){this.toastrService=e,this.toastPackage=r,this.appRef=s,this.width=-1,this.toastClasses="",this.state="inactive",this.message=r.message,this.title=r.title,this.options=r.config,this.originalTimeout=r.config.timeOut,this.toastClasses=`${r.toastType} ${r.config.toastClass}`,this.sub=r.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=r.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=r.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=r.toastRef.countDuplicate().subscribe(p=>{this.duplicatesCount=p})}get displayStyle(){if("inactive"===this.state)return"none"}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(!0===this.options.disableTimeOut||"timeOut"===this.options.disableTimeOut)&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(0===this.width||100===this.width||!this.options.timeOut)return;const e=(new Date).getTime();this.width=(this.hideTime-e)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=(new Date).getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){"removed"!==this.state&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){"removed"!==this.state&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){!0===this.options.disableTimeOut||"extendedTimeOut"===this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}}return n.\u0275fac=function(e){return new(e||n)(Xt(RO),Xt(qE),Xt(e2))},n.\u0275cmp=bn({type:n,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,r){1&e&&dr("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),2&e&&(Ss(r.toastClasses),Hs("display",r.displayStyle))},attrs:nj,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,r){1&e&&(it(0,soe,3,0,"button",0),it(1,aoe,3,5,"div",1),it(2,uoe,1,3,"div",2),it(3,coe,2,4,"div",3),it(4,loe,2,2,"div",4)),2&e&&(Mt("ngIf",r.options.closeButton),dt(1),Mt("ngIf",r.title),dt(1),Mt("ngIf",r.message&&r.options.enableHtml),dt(1),Mt("ngIf",r.message&&!r.options.enableHtml),dt(1),Mt("ngIf",r.options.progressBar))},directives:[La],encapsulation:2}),n})();Object.assign(Object.assign({},rj),{toastComponent:xoe});const Xw=class extends class{constructor(t,e,r){yt(this,"web3"),yt(this,"chain"),yt(this,"toastrService"),yt(this,"connectedEvent"),yt(this,"disconnectedEvent"),yt(this,"accountChangedEvent"),yt(this,"chainChangedEvent"),yt(this,"onboard",null),yt(this,"provider"),yt(this,"providerName"),yt(this,"name",""),yt(this,"address",""),yt(this,"chainId",1),yt(this,"gasLimitMultiplier",1),yt(this,"safeTxBatch",[]),this.web3=t,this.chain=e,this.toastrService=r,this.initOnboard(),this.connectedEvent=new mo,this.disconnectedEvent=new mo,this.accountChangedEvent=new mo,this.chainChangedEvent=new mo}initOnboard(){this.onboard=(0,iie.aB)({wallets:[fie(),Tse(),Mse({walletConnectVersion:2,projectId:"bd887c824dd0d5799a0bd58191363e2f"}),Hse({email:"hello@timelessfi.com",appUrl:"https://bunni.pro"}),oie(),"undefined"==typeof window?()=>null:()=>({label:"Phantom",getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3818).then(Y.bind(Y,43818))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){if("phantom"in window){const t=window;if("phantom"in t&&"ethereum"in t.phantom&&t.phantom.ethereum.isPhantom)return{provider:(0,Wl.createEIP1193Provider)(t.phantom.ethereum)}}throw window.open("https://phantom.app/download","_blank"),new Error("Please install Phantom before proceeding")});return function(){return n.apply(this,arguments)}}(),platforms:["all"]}),Jse({projectId:"bd887c824dd0d5799a0bd58191363e2f"}),uie({apiKey:"pk_live_937F9430B2CB3407"}),Rse({apiKey:"61885cb4-8889-4e99-8186-27f853a1ff12"}),Bse(),"undefined"==typeof window?()=>null:()=>{return{label:"Frontier",getIcon:(n=(0,Br.Z)(function*(){return(yield Y.e(5890).then(Y.bind(Y,15890))).default}),function(){return n.apply(this,arguments)}),getInterface:function(){var n=(0,Br.Z)(function*(){const{createEIP1193Provider:t}=yield Promise.resolve().then(Y.bind(Y,79696));let r;if(window.hasOwnProperty("ethereum")&&window.ethereum.isFrontier)r=t(window.ethereum);else{if(!window.frontier)throw window.open("https://frontier.xyz/browser-extension","_blank"),new Error("Please Install Frontier to use this wallet");r=t(window.frontier.ethereum)}return{provider:r}});return function(){return n.apply(this,arguments)}}()};var n}],chains:Object.values(this.chain.id).map(t=>({id:this.chain.metadata[t].chainId,token:this.chain.metadata[t].nativeCurrency.symbol,label:this.chain.metadata[t].displayName,rpcUrl:this.chain.rpc[t],publicRpcUrl:this.chain.metadata[t].rpcUrls[0],blockExplorerUrl:this.chain.metadata[t].blockExplorerUrls[0]})),accountCenter:{desktop:{enabled:!1},mobile:{enabled:!1}},connect:{autoConnectLastWallet:!0,showSidebar:!1,disableUDResolution:!0},appMetadata:{name:"Bunni",icon:"assets/img/bunni-logo.png",description:"Liquidity engine for Uniswap."},theme:"dark"}),this.onboard.state.select("wallets").subscribe(t=>{if(t.length){this.web3=new(V_())(t[0].provider),this.provider=t[0].provider;const e=t[0].accounts[0].address,r=Number(t[0].chains[0].id);e!==this.address&&(this.address?(this.address=e,this.accountChangedEvent.emit()):(this.address=e,this.connectedEvent.emit())),r!==this.chainId&&(this.chainId=r,this.chainChangedEvent.emit(this.chainId))}else this.address&&(this.address="",this.chainId=1,this.provider=null,this.disconnectedEvent.emit())})}connect(){var t=this;return(0,Br.Z)(function*(){yield t.onboard.connectWallet()})()}connectToGnosisSafeIfPossible(){var t=this;return(0,Br.Z)(function*(){const e=window.location.ancestorOrigins;(e?.contains("https://gnosis-safe.io")||e?.contains("https://app.safe.global"))&&(yield t.onboard.connectWallet({autoSelect:{label:"Safe"}}))})()}disconnect(){var t=this;return(0,Br.Z)(function*(){const[e]=t.onboard.state.get().wallets;yield t.onboard.disconnectWallet({label:e.label})})()}changeChain(t){var e=this;return(0,Br.Z)(function*(){return e.web3.currentProvider?yield e.onboard.setChain({chainId:t}):(e.chainId=Number(t),e.chainChangedEvent.emit(Number(t)),!0)})()}httpsWeb3(t){return t?new(V_())(this.chain.rpc[t]):new(V_())(this.chain.rpc[this.chainId])}ethersProvider(t){return new PO.r(t?this.chain.rpc[t]:this.chain.rpc[this.chainId])}sendTx(t,e,r,s,p,F=0){var q=this;return(0,Br.Z)(function*(){if(q.provider.safe)q.safeTxBatch=[...q.safeTxBatch,{func:t,value:F}],q.sendSafeTx(q.safeTxBatch,e,r,s,p,F);else{let te=yield q.estimateGas(t,F,p);if(!isNaN(te)){let fe,Re,$e;return q.chain.metadata[q.chainId].useAccessList&&(fe=yield q.httpsWeb3().eth.createAccessList({from:q.address,to:t._parent._address,gas:te,data:t.encodeABI(),value:F}),Re=Number(fe.gasUsed)),te=Re&&Re>te?Math.ceil(Re*q.gasLimitMultiplier):Math.ceil(te*q.gasLimitMultiplier),t.send({from:q.address,gas:te,maxFeePerGas:null,maxPriorityFeePerGas:null,accessList:Re&&Re{e(rt),$e=q.openTxModal(rt,!1)}).on("receipt",rt=>{r(rt)}).once("confirmation",(rt,ft)=>{s(ft),$e.toastRef.componentInstance.hidden?$e=q.openTxModal(ft.transactionHash,!0):($e.toastRef.componentInstance.txConfirmed=!0,clearTimeout($e.toastRef.componentInstance.timeout),$e.toastRef.componentInstance.timeout=setTimeout(()=>{$e.toastRef.close()},3e4))}).on("error",rt=>{p(rt)})}}})()}sendSafeTx(t,e,r,s,p,F){var q=this;return(0,Br.Z)(function*(){let te=[];t.map($e=>{te=[...te,{to:$e.func._parent._address,value:$e.val?$e.val:0,data:$e.func.encodeABI()}]});yield q.provider.sdk.txs.send({txs:te,params:{safeTxGas:1e6}}).then(()=>{q.safeTxBatch=[]}).catch(()=>{q.safeTxBatch.pop()})})()}approveToken(t,e,r,s,p,F,q){var te=this;return(0,Br.Z)(function*(){const fe=new sn.Z(2).pow(256).minus(1).integerValue().toFixed();if(new sn.Z(yield t.methods.allowance(te.address,e).call()).gte(r))return void p();const $e=t.methods.approve(e,fe);if(!te.provider.safe)return te.sendTx($e,s,p,F,q);te.safeTxBatch=[...te.safeTxBatch,{func:$e,value:0}],F()})()}sign(t){var e=this;return(0,Br.Z)(function*(){const[r,s,p]=yield e.web3.currentProvider.send("eth_signTypedData_v4",[e.address,t]).then(F=>{const q=(0,Qre.splitSignature)(F.result?F.result:F);return[q.v,q.r,q.s]});return[r,s,p]})()}estimateGas(t,e,r){var s=this;return(0,Br.Z)(function*(){return Math.floor(1.1*(yield t.estimateGas({from:s.address,value:e}).catch(r)))})()}estimateSafeGas(t,e,r){var s=this;return(0,Br.Z)(function*(){const p={from:s.address,to:t._parent._address,data:t.encodeABI(),...e>0&&{value:e}};return Math.floor(yield s.provider.sdk.eth.getEstimateGas(p).catch(r))})()}openTxModal(t,e){const r=this.toastrService.show(null,null,{toastComponent:GE,positionClass:"toast-bottom-right"});return r.toastRef.componentInstance.hash=t,r.toastRef.componentInstance.hidden=!1,r.toastRef.componentInstance.chainId=this.chainId,r.toastRef.componentInstance.txConfirmed=e,r.toastRef.componentInstance.toastrInstance=r,r.toastRef.componentInstance.timeout=setTimeout(()=>{r.toastRef.close()},3e4),r.toastRef.afterClosed().subscribe(()=>{r.toastRef.componentInstance.hidden=!0}),r}openErrorModal(t){const e=this.toastrService.show(null,null,{toastComponent:zE,positionClass:"toast-bottom-right"});return e.toastRef.componentInstance.error=t,setTimeout(()=>{e.toastRef.close()},3e4),e}}{constructor(t,e,r){super(t,e,r),yt(this,"web3"),yt(this,"chain"),yt(this,"toastrService"),this.web3=t,this.chain=e,this.toastrService=r,this.connectedEvent.subscribe(()=>{this.reverseENSLookup(this.address).then(s=>this.name=s)}),this.disconnectedEvent.subscribe(()=>{this.name=""}),this.accountChangedEvent.subscribe(s=>{this.reverseENSLookup(this.address).then(p=>this.name=p)})}get ens(){return this.name}get user(){return this.address}get connected(){return!!this.address}get rewards(){return!!Cy[this.chainId]||!!My[this.chainId]}get usingGnosisSafe(){return this.provider.safe}get connectedToEthereum(){return this.chainId===qi.ETHEREUM}reverseENSLookup(t){return(0,Br.Z)(function*(){return null})()}};let Xa=Xw;yt(Xa,"\u0275fac",function(e){return new(e||Xw)(Yn(V_()),Yn(dc),Yn(RO))}),yt(Xa,"\u0275prov",we({token:Xw,factory:Xw.\u0275fac,providedIn:"root"}));const Qw=class{constructor(t){yt(this,"wallet"),this.wallet=t}getABI(t){return Y(77193)(`./${t}.json`)}getContract(t,e,r){const s=Y(77193)(`./${e}.json`);return new r.eth.Contract(s,t)}getERC20(t,e){return this.getContract(t,"ERC20",e)}getBunniHub(t){return this.getContract(x5,"BunniHub",t)}getBunniLens(t){return this.getContract(Pre,"BunniLens",t)}getBunniMigrator(t){return this.getContract(Rre,"BunniMigrator",t)}getUniswapFactory(t){return this.getContract(Nre,"UniswapV3Factory",t)}getNonfungiblePositionManager(t){return this.getContract(Bre,"NonfungiblePositionManager",t)}getBPT(t,e){return this.getContract(J6[e],"BPT",t)}getVotingEscrow(t,e){return this.getContract(Am[e],"VotingEscrow",t)}getGaugeController(t,e){return this.getContract(Cy[e],"GaugeController",t)}getMinter(t,e){return this.getContract(Fre[e],"Minter",t)}getLiquidityGauge(t,e){return this.getContract(t,"LiquidityGauge",e)}getChildGauge(t,e){return this.getContract(t,"ChildGauge",e)}getOptionsToken(t,e){return this.getContract(Z1[e],"OptionsToken",t)}getGaugeFactory(t,e){return this.getContract(qU[e],"TimelessLiquidityGaugeFactory",t)}getChildGaugeFactory(t,e){return this.getContract(My[e],"ChildGaugeFactory",t)}getRootGaugeFactory(t,e){return this.getContract(j_[e],"RootGaugeFactory",t)}getPoorOracle(t,e){return this.getContract(Lre[e],"UniswapPoorOracle",t)}getLpZapIn(t,e){return this.getContract(fp[e],"BunniLpZapIn",t)}getFeeDistributor(t,e){return this.getContract(OO[e],"FeeDistributor",t)}getVeBeacon(t,e){return this.getContract(KU[e],"VeBeacon",t)}getBridger(t,e){let r;switch(e){case 10:r=this.getContract(DO[e],"OptimismBridger",t);break;case 137:r=this.getContract(DO[e],"PolygonBridger",t);break;case 42161:r=this.getContract(DO[e],"ArbitrumBridger",t);break;default:r=null}return r}};let ud=Qw;yt(ud,"\u0275fac",function(e){return new(e||Qw)(Yn(Xa))}),yt(ud,"\u0275prov",we({token:Qw,factory:Qw.\u0275fac,providedIn:"root"}));class T5{constructor(){yt(this,"id",""),yt(this,"address",""),yt(this,"chainId",0),yt(this,"decimals",0),yt(this,"iconPath","assets/img/tokens/unknown.svg"),yt(this,"name",""),yt(this,"precision",0),yt(this,"price",new sn.Z(0)),yt(this,"symbol",""),yt(this,"totalSupply",new sn.Z(0)),yt(this,"userBalance",new sn.Z(0)),yt(this,"userBalanceUSD",new sn.Z(0)),yt(this,"userAllowances",Object.create({})),yt(this,"pools",[])}updateUSDValues(){this.userBalanceUSD=this.userBalance.times(this.price),this.pools.forEach(t=>{t.updateUSDValues(),t.bunniTokens.forEach(e=>{e.updateUSDValues(),e.gauge&&e.gauge.updateUSDValues()})})}resetUser(){this.userBalance=new sn.Z(0),this.userBalanceUSD=new sn.Z(0),this.userAllowances=Object.create({})}}class KE extends T5{constructor(){super(...arguments),yt(this,"decimals",18),yt(this,"iconPath","assets/img/tokens/bunni.png"),yt(this,"precision",Math.pow(10,18)),yt(this,"symbol","BUNNI-LP"),yt(this,"liquidity",new sn.Z(0)),yt(this,"tickLower",0),yt(this,"tickUpper",0),yt(this,"liquidityPerShare",new sn.Z(0)),yt(this,"amount0PerShare",new sn.Z(0)),yt(this,"amount1PerShare",new sn.Z(0)),yt(this,"reserve",new sn.Z(0)),yt(this,"reserve0",new sn.Z(0)),yt(this,"reserve1",new sn.Z(0)),yt(this,"volume",new sn.Z(0)),yt(this,"volume0",new sn.Z(0)),yt(this,"volume1",new sn.Z(0)),yt(this,"fees",new sn.Z(0)),yt(this,"fees0",new sn.Z(0)),yt(this,"fees1",new sn.Z(0)),yt(this,"minPrice",new sn.Z(0)),yt(this,"maxPrice",new sn.Z(0)),yt(this,"swapAPR",new sn.Z(0)),yt(this,"stakingAPR",new sn.Z(0)),yt(this,"rewardTokenAPR",new sn.Z(0)),yt(this,"thisPeriodMinRewardAPR",new sn.Z(0)),yt(this,"thisPeriodMaxRewardAPR",new sn.Z(0)),yt(this,"nextPeriodMinRewardAPR",new sn.Z(0)),yt(this,"nextPeriodMaxRewardAPR",new sn.Z(0)),yt(this,"userRewardAPR",new sn.Z(0)),yt(this,"userDeposit",new sn.Z(0)),yt(this,"userDepositUSD",new sn.Z(0)),yt(this,"userCostBasisPerShareUSD",new sn.Z(0)),yt(this,"userCompoundedPerShareUSD",new sn.Z(0)),yt(this,"userClaimedRewardPerShareUSD",new sn.Z(0)),yt(this,"token0CostBasisPerShare",new sn.Z(0)),yt(this,"token1CostBasisPerShare",new sn.Z(0)),yt(this,"token0CompoundedPerShare",new sn.Z(0)),yt(this,"token1CompoundedPerShare",new sn.Z(0)),yt(this,"claimedRewardsPerShare",new sn.Z(0)),yt(this,"pool",null),yt(this,"gauge",null)}updateUSDValues(){const t=this.pool?this.pool.token0.price:new sn.Z(0),e=this.pool?this.pool.token1.price:new sn.Z(0);this.price=this.amount0PerShare.times(t).plus(this.amount1PerShare.times(e)),this.reserve=this.reserve0.times(t).plus(this.reserve1.times(e)),this.volume=sn.Z.min(this.volume0.times(t),this.volume1.times(t)),this.fees=sn.Z.min(this.fees0.times(t),this.fees1.times(e)),this.userCostBasisPerShareUSD=this.token0CostBasisPerShare.times(t).plus(this.token1CostBasisPerShare.times(e)),this.userCompoundedPerShareUSD=this.token0CompoundedPerShare.times(t).plus(this.token1CompoundedPerShare.times(e)),this.gauge&&this.gauge.oLIT&&(this.userClaimedRewardPerShareUSD=this.claimedRewardsPerShare.times(this.gauge.oLIT.price)),this.userBalanceUSD=this.userBalance.times(this.price),this.userDepositUSD=this.userDeposit.times(this.price)}resetUser(){this.userBalance=new sn.Z(0),this.userBalanceUSD=new sn.Z(0),this.userDeposit=new sn.Z(0),this.userDepositUSD=new sn.Z(0),this.userCostBasisPerShareUSD=new sn.Z(0),this.userCompoundedPerShareUSD=new sn.Z(0),this.userClaimedRewardPerShareUSD=new sn.Z(0),this.token0CostBasisPerShare=new sn.Z(0),this.token1CostBasisPerShare=new sn.Z(0),this.token0CompoundedPerShare=new sn.Z(0),this.token1CompoundedPerShare=new sn.Z(0),this.claimedRewardsPerShare=new sn.Z(0)}}class Eoe{constructor(){yt(this,"BPT",null),yt(this,"veLIT",null),yt(this,"BAL",null),yt(this,"WETH",null),yt(this,"supply",new sn.Z(0)),yt(this,"totalSupply",new sn.Z(0)),yt(this,"supplyLastPeriod",new sn.Z(0)),yt(this,"balRewardLastPeriod",new sn.Z(0)),yt(this,"wethRewardLastPeriod",new sn.Z(0)),yt(this,"averagePrice",new sn.Z(0)),yt(this,"balAPR",new sn.Z(0)),yt(this,"wethAPR",new sn.Z(0)),yt(this,"end",0),yt(this,"balance",new sn.Z(0)),yt(this,"balClaimable",new sn.Z(0)),yt(this,"balClaimableUSD",new sn.Z(0)),yt(this,"wethClaimable",new sn.Z(0)),yt(this,"wethClaimableUSD",new sn.Z(0)),yt(this,"votePowerUsed",new sn.Z(0)),yt(this,"votePowerUnused",new sn.Z(0))}updateUSDValues(){this.balClaimableUSD=this.BAL?this.balClaimable.times(this.BAL.price):new sn.Z(0),this.wethClaimableUSD=this.WETH?this.wethClaimable.times(this.WETH.price):new sn.Z(0),this.averagePrice=this.BPT&&this.totalSupply.gt(0)?this.supply.div(this.totalSupply).times(this.BPT.price):new sn.Z(0)}resetUser(){this.end=0,this.balance=new sn.Z(0),this.balClaimable=new sn.Z(0),this.balClaimableUSD=new sn.Z(0),this.wethClaimable=new sn.Z(0),this.wethClaimableUSD=new sn.Z(0),this.votePowerUsed=new sn.Z(0),this.votePowerUnused=new sn.Z(0)}}class Toe{constructor(){yt(this,"token",null),yt(this,"amount",new sn.Z(0)),yt(this,"maxRewardPerVote",new sn.Z(0))}}class Aoe{constructor(){yt(this,"token",null),yt(this,"amount",new sn.Z(0)),yt(this,"maxTokensPerVote",new sn.Z(0))}}class Ioe{constructor(){yt(this,"token",null),yt(this,"amount",new sn.Z(0)),yt(this,"rewardPerVote",new sn.Z(0)),yt(this,"objectiveVotes",new sn.Z(0))}}class Soe extends T5{constructor(){super(...arguments),yt(this,"distributor",""),yt(this,"claimableReward",new sn.Z(0)),yt(this,"rewardRate",new sn.Z(0)),yt(this,"rewardAPR",new sn.Z(0))}}class sj extends T5{constructor(){super(...arguments),yt(this,"decimals",18),yt(this,"iconPath","assets/img/tokens/unknown.svg"),yt(this,"name","Timeless BUNNI-LP Gauge Deposit"),yt(this,"precision",Math.pow(10,18)),yt(this,"symbol","BUNNI-LP-gauge"),yt(this,"votesThisPeriod",new sn.Z(0)),yt(this,"votesNextPeriod",new sn.Z(0)),yt(this,"weightThisPeriod",new sn.Z(0)),yt(this,"weightNextPeriod",new sn.Z(0)),yt(this,"relativeWeightCap",new sn.Z(0)),yt(this,"relativeInflationRate",new sn.Z(0)),yt(this,"tokenlessProduction",new sn.Z(0)),yt(this,"workingSupply",new sn.Z(0)),yt(this,"oLIT",null),yt(this,"weeklyEmissionsThisPeriod",new sn.Z(0)),yt(this,"weeklyEmissionsNextPeriod",new sn.Z(0)),yt(this,"exists",!1),yt(this,"killed",!1),yt(this,"rootGaugeDeployed",!1),yt(this,"childGaugeDeployed",!1),yt(this,"userTime",0),yt(this,"userTimeCountdown",null),yt(this,"userWeight",new sn.Z(0)),yt(this,"workingBalance",new sn.Z(0)),yt(this,"claimableReward",new sn.Z(0)),yt(this,"bunniToken",null),yt(this,"bounties",[]),yt(this,"bribes",[]),yt(this,"quests",[]),yt(this,"votes",[]),yt(this,"rewardTokens",[])}updateUSDValues(){this.price=this.bunniToken?this.bunniToken.price:new sn.Z(0),this.userBalanceUSD=this.userBalance.times(this.price)}resetUser(){this.userBalance=new sn.Z(0),this.userBalanceUSD=new sn.Z(0),this.userAllowances=Object.create({}),this.userTime=0,this.userTimeCountdown=null,this.userWeight=new sn.Z(0),this.workingBalance=new sn.Z(0),this.claimableReward=new sn.Z(0)}}class koe{constructor(){yt(this,"id",""),yt(this,"address",""),yt(this,"chainId",0),yt(this,"fee",0),yt(this,"liquidity",new sn.Z(0)),yt(this,"sqrtPriceX96",new sn.Z(0)),yt(this,"tick",0),yt(this,"token0",null),yt(this,"token1",null),yt(this,"token0Price",new sn.Z(0)),yt(this,"token1Price",new sn.Z(0)),yt(this,"reserve",new sn.Z(0)),yt(this,"reserve0",new sn.Z(0)),yt(this,"reserve1",new sn.Z(0)),yt(this,"volume",new sn.Z(0)),yt(this,"volume0",new sn.Z(0)),yt(this,"volume1",new sn.Z(0)),yt(this,"totalVolume",new sn.Z(0)),yt(this,"totalVolume0",new sn.Z(0)),yt(this,"totalVolume1",new sn.Z(0)),yt(this,"fees",new sn.Z(0)),yt(this,"fees0",new sn.Z(0)),yt(this,"fees1",new sn.Z(0)),yt(this,"totalFees",new sn.Z(0)),yt(this,"totalFees0",new sn.Z(0)),yt(this,"totalFees1",new sn.Z(0)),yt(this,"bunniTokens",[]),yt(this,"protocol",null)}updateUSDValues(){this.protocol.reserve=this.protocol.reserve.minus(this.reserve),this.protocol.dailyVolume=this.protocol.dailyVolume.minus(this.volume),this.protocol.dailyFees=this.protocol.dailyFees.minus(this.fees),this.protocol.totalVolume=this.protocol.totalVolume.minus(this.totalVolume),this.protocol.totalFees=this.protocol.totalFees.minus(this.totalFees),this.reserve=this.reserve0.times(this.token0.price).plus(this.reserve1.times(this.token1.price)),this.volume=sn.Z.min(this.volume0.times(this.token0.price),this.volume1.times(this.token1.price)),this.fees=sn.Z.min(this.fees0.times(this.token0.price),this.fees1.times(this.token1.price)),this.totalVolume=sn.Z.min(this.totalVolume0.times(this.token0.price),this.totalVolume1.times(this.token1.price)),this.totalFees=sn.Z.min(this.totalFees0.times(this.token0.price),this.totalFees1.times(this.token1.price)),this.protocol.reserve=this.protocol.reserve.plus(this.reserve),this.protocol.dailyVolume=this.protocol.dailyVolume.plus(this.volume),this.protocol.dailyFees=this.protocol.dailyFees.plus(this.fees),this.protocol.totalVolume=this.protocol.totalVolume.plus(this.totalVolume),this.protocol.totalFees=this.protocol.totalFees.plus(this.totalFees)}resetUser(){}}class Coe{constructor(){yt(this,"chain",0),yt(this,"fee",new sn.Z(0)),yt(this,"inflationRate",new sn.Z(0)),yt(this,"optionsMultiplier",new sn.Z(0)),yt(this,"reserve",new sn.Z(0)),yt(this,"totalVolume",new sn.Z(0)),yt(this,"dailyVolume",new sn.Z(0)),yt(this,"totalFees",new sn.Z(0)),yt(this,"dailyFees",new sn.Z(0))}}class ZE{constructor(t,e){yt(this,"target"),yt(this,"countDirection"),yt(this,"days"),yt(this,"hours"),yt(this,"minutes"),yt(this,"seconds"),yt(this,"running"),yt(this,"timeIntervalRef"),this.target=t,this.countDirection=e,this.days="--",this.hours="--",this.minutes="--",this.seconds="--",this.running=!1}start(){this.running=!0,this.timeIntervalRef=setInterval(()=>{this.update()},1e3)}stop(){this.running=!1,clearInterval(this.timeIntervalRef)}update(){if("down"===this.countDirection&&Date.now()/1e3>this.target||"up"===this.countDirection&&Date.now()/1e3(function(n){n[n.MAINNET=1]="MAINNET",n[n.GOERLI=5]="GOERLI",n[n.SEPOLIA=11155111]="SEPOLIA",n[n.OPTIMISM=10]="OPTIMISM",n[n.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",n[n.ARBITRUM_ONE=42161]="ARBITRUM_ONE",n[n.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",n[n.POLYGON=137]="POLYGON",n[n.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",n[n.CELO=42220]="CELO",n[n.CELO_ALFAJORES=44787]="CELO_ALFAJORES",n[n.GNOSIS=100]="GNOSIS",n[n.MOONBEAM=1284]="MOONBEAM",n[n.BNB=56]="BNB",n[n.AVALANCHE=43114]="AVALANCHE",n[n.BASE_GOERLI=84531]="BASE_GOERLI",n[n.BASE=8453]="BASE"}(Gu||(Gu={})),Gu))(),$_={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},joe=z2({},$_,{v1MixedRouteQuoterAddress:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E"}),Voe=z2({},$_,{v1MixedRouteQuoterAddress:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),Hoe=$_,$oe=z2({},$_,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573"}),lj=$_,dj={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"},Fg=((zp={})[Gu.MAINNET]=joe,zp[Gu.OPTIMISM]=Hoe,zp[Gu.ARBITRUM_ONE]=$oe,zp[Gu.POLYGON]=lj,zp[Gu.POLYGON_MUMBAI]=lj,zp[Gu.GOERLI]=Voe,zp[Gu.CELO]=dj,zp[Gu.CELO_ALFAJORES]=dj,zp[Gu.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2"},zp[Gu.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},zp[Gu.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},zp[Gu.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad07"},zp[Gu.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE"},zp[Gu.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapRouter02Address:"0x2626664c2603336E57B271c5C0b26F421741e481"},zp[Gu.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},{}[Gu.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",{}[Gu.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",{}[Gu.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",{}[Gu.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",{}[Gu.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",(()=>(function(n){n[n.EXACT_INPUT=0]="EXACT_INPUT",n[n.EXACT_OUTPUT=1]="EXACT_OUTPUT"}(Fg||(Fg={})),Fg))()),r2=(()=>(function(n){n[n.ROUND_DOWN=0]="ROUND_DOWN",n[n.ROUND_HALF_UP=1]="ROUND_HALF_UP",n[n.ROUND_UP=2]="ROUND_UP"}(r2||(r2={})),r2))(),Z3=er().BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),z_=BO()(Boe()),HO=BO()(oj()),Joe=((W_={})[r2.ROUND_DOWN]=z_.ROUND_DOWN,W_[r2.ROUND_HALF_UP]=z_.ROUND_HALF_UP,W_[r2.ROUND_UP]=z_.ROUND_UP,W_),Xoe=((G_={})[r2.ROUND_DOWN]=0,G_[r2.ROUND_HALF_UP]=1,G_[r2.ROUND_UP]=3,G_),q_=function(){function n(e,r){void 0===r&&(r=er().BigInt(1)),this.numerator=er().BigInt(e),this.denominator=er().BigInt(r)}n.tryParseFraction=function(r){if(r instanceof er()||"number"==typeof r||"string"==typeof r)return new n(r);if("numerator"in r&&"denominator"in r)return r;throw new Error("Could not parse fraction")};var t=n.prototype;return t.invert=function(){return new n(this.denominator,this.numerator)},t.add=function(r){var s=n.tryParseFraction(r);return er().equal(this.denominator,s.denominator)?new n(er().add(this.numerator,s.numerator),this.denominator):new n(er().add(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator)),er().multiply(this.denominator,s.denominator))},t.subtract=function(r){var s=n.tryParseFraction(r);return er().equal(this.denominator,s.denominator)?new n(er().subtract(this.numerator,s.numerator),this.denominator):new n(er().subtract(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator)),er().multiply(this.denominator,s.denominator))},t.lessThan=function(r){var s=n.tryParseFraction(r);return er().lessThan(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator))},t.equalTo=function(r){var s=n.tryParseFraction(r);return er().equal(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator))},t.greaterThan=function(r){var s=n.tryParseFraction(r);return er().greaterThan(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator))},t.multiply=function(r){var s=n.tryParseFraction(r);return new n(er().multiply(this.numerator,s.numerator),er().multiply(this.denominator,s.denominator))},t.divide=function(r){var s=n.tryParseFraction(r);return new n(er().multiply(this.numerator,s.denominator),er().multiply(this.denominator,s.numerator))},t.toSignificant=function(r,s,p){void 0===s&&(s={groupSeparator:""}),void 0===p&&(p=r2.ROUND_HALF_UP),Number.isInteger(r)||ma(!1),r>0||ma(!1),z_.set({precision:r+1,rounding:Joe[p]});var F=new z_(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(r);return F.toFormat(F.decimalPlaces(),s)},t.toFixed=function(r,s,p){return void 0===s&&(s={groupSeparator:""}),void 0===p&&(p=r2.ROUND_HALF_UP),Number.isInteger(r)||ma(!1),r>=0||ma(!1),HO.DP=r,HO.RM=Xoe[p],new HO(this.numerator.toString()).div(this.denominator.toString()).toFormat(r,s)},H_(n,[{key:"quotient",get:function(){return er().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new n(er().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new n(this.numerator,this.denominator)}}]),n}(),fj=BO()(oj()),s2=function(n){function t(r,s,p){var F;return F=n.call(this,s,p)||this,er().lessThanOrEqual(F.quotient,Z3)||ma(!1),F.currency=r,F.decimalScale=er().exponentiate(er().BigInt(10),er().BigInt(r.decimals)),F}A5(t,n),t.fromRawAmount=function(s,p){return new t(s,p)},t.fromFractionalAmount=function(s,p,F){return new t(s,p,F)};var e=t.prototype;return e.add=function(s){this.currency.equals(s.currency)||ma(!1);var p=n.prototype.add.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.subtract=function(s){this.currency.equals(s.currency)||ma(!1);var p=n.prototype.subtract.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.multiply=function(s){var p=n.prototype.multiply.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.divide=function(s){var p=n.prototype.divide.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.toSignificant=function(s,p,F){return void 0===s&&(s=6),void 0===F&&(F=r2.ROUND_DOWN),n.prototype.divide.call(this,this.decimalScale).toSignificant(s,p,F)},e.toFixed=function(s,p,F){return void 0===s&&(s=this.currency.decimals),void 0===F&&(F=r2.ROUND_DOWN),s<=this.currency.decimals||ma(!1),n.prototype.divide.call(this,this.decimalScale).toFixed(s,p,F)},e.toExact=function(s){return void 0===s&&(s={groupSeparator:""}),fj.DP=this.currency.decimals,new fj(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(s)},H_(t,[{key:"wrapped",get:function(){return this.currency.isToken?this:t.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}]),t}(q_),hj=new q_(er().BigInt(100));function JE(n){return new Y3(n.numerator,n.denominator)}var Y3=function(n){function t(){var r;return(r=n.apply(this,arguments)||this).isPercent=!0,r}A5(t,n);var e=t.prototype;return e.add=function(s){return JE(n.prototype.add.call(this,s))},e.subtract=function(s){return JE(n.prototype.subtract.call(this,s))},e.multiply=function(s){return JE(n.prototype.multiply.call(this,s))},e.divide=function(s){return JE(n.prototype.divide.call(this,s))},e.toSignificant=function(s,p,F){return void 0===s&&(s=5),n.prototype.multiply.call(this,hj).toSignificant(s,p,F)},e.toFixed=function(s,p,F){return void 0===s&&(s=2),n.prototype.multiply.call(this,hj).toFixed(s,p,F)},t}(q_),I5=function(n){function t(){for(var r,s,p,F,q,te=arguments.length,fe=new Array(te),Re=0;Re=0&&e<255&&Number.isInteger(e)||ma(!1),this.chainId=t,this.decimals=e,this.symbol=r,this.name=s},Qoe=function(n){function t(){var e;return(e=n.apply(this,arguments)||this).isNative=!0,e.isToken=!1,e}return A5(t,n),t}(pj);function Im(n){try{return(0,aj.getAddress)(n)}catch{throw new Error(n+" is not a valid address.")}}var Lg,eae=/^0x[0-9a-fA-F]{40}$/,zd=function(n){function t(r,s,p,F,q,te,fe,Re){var $e;return($e=n.call(this,r,p,F,q)||this).isNative=!1,$e.isToken=!0,$e.address=te?function(n){if(eae.test(n))return n;throw new Error(n+" is not a valid address.")}(s):Im(s),fe&&(fe.gte(YE.O$.from(0))||ma(!1)),Re&&(Re.gte(YE.O$.from(0))||ma(!1)),$e.buyFeeBps=fe,$e.sellFeeBps=Re,$e}A5(t,n);var e=t.prototype;return e.equals=function(s){return s.isToken&&this.chainId===s.chainId&&this.address.toLowerCase()===s.address.toLowerCase()},e.sortsBefore=function(s){return this.chainId!==s.chainId&&ma(!1),this.address.toLowerCase()===s.address.toLowerCase()&&ma(!1),this.address.toLowerCase()n.length)&&(t=n.length);for(var e=0,r=new Array(t);e=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=n[Symbol.iterator]()).next.bind(e)}var S5,t,Sm=(function(n){var t=function(e){var p,r=Object.prototype,s=r.hasOwnProperty,F="function"==typeof Symbol?Symbol:{},q=F.iterator||"@@iterator",te=F.asyncIterator||"@@asyncIterator",fe=F.toStringTag||"@@toStringTag";function Re(kr,wr,mi){return Object.defineProperty(kr,wr,{value:mi,enumerable:!0,configurable:!0,writable:!0}),kr[wr]}try{Re({},"")}catch{Re=function(wr,mi,Ys){return wr[mi]=Ys}}function $e(kr,wr,mi,Ys){var va=Object.create((wr&&wr.prototype instanceof An?wr:An).prototype),Qo=new Ts(Ys||[]);return va._invoke=function(kr,wr,mi){var Ys=ft;return function(va,Qo){if(Ys===Ft)throw new Error("Generator is already running");if(Ys===Qt){if("throw"===va)throw Qo;return ds()}for(mi.method=va,mi.arg=Qo;;){var Do=mi.delegate;if(Do){var Pa=Yi(Do,mi);if(Pa){if(Pa===wn)continue;return Pa}}if("next"===mi.method)mi.sent=mi._sent=mi.arg;else if("throw"===mi.method){if(Ys===ft)throw Ys=Qt,mi.arg;mi.dispatchException(mi.arg)}else"return"===mi.method&&mi.abrupt("return",mi.arg);Ys=Ft;var Ou=rt(kr,wr,mi);if("normal"===Ou.type){if(Ys=mi.done?Qt:Tt,Ou.arg===wn)continue;return{value:Ou.arg,done:mi.done}}"throw"===Ou.type&&(Ys=Qt,mi.method="throw",mi.arg=Ou.arg)}}}(kr,mi,Qo),va}function rt(kr,wr,mi){try{return{type:"normal",arg:kr.call(wr,mi)}}catch(Ys){return{type:"throw",arg:Ys}}}e.wrap=$e;var ft="suspendedStart",Tt="suspendedYield",Ft="executing",Qt="completed",wn={};function An(){}function gr(){}function _r(){}var pr={};pr[q]=function(){return this};var ti=Object.getPrototypeOf,qr=ti&&ti(ti(us([])));qr&&qr!==r&&s.call(qr,q)&&(pr=qr);var yi=_r.prototype=An.prototype=Object.create(pr);function as(kr){["next","throw","return"].forEach(function(wr){Re(kr,wr,function(mi){return this._invoke(wr,mi)})})}function Li(kr,wr){function mi(va,Qo,Do,Pa){var Ou=rt(kr[va],kr,Qo);if("throw"!==Ou.type){var td=Ou.arg,Td=td.value;return Td&&"object"==typeof Td&&s.call(Td,"__await")?wr.resolve(Td.__await).then(function(To){mi("next",To,Do,Pa)},function(To){mi("throw",To,Do,Pa)}):wr.resolve(Td).then(function(To){td.value=To,Do(td)},function(To){return mi("throw",To,Do,Pa)})}Pa(Ou.arg)}var Ys;this._invoke=function(va,Qo){function Do(){return new wr(function(Pa,Ou){mi(va,Qo,Pa,Ou)})}return Ys=Ys?Ys.then(Do,Do):Do()}}function Yi(kr,wr){var mi=kr.iterator[wr.method];if(mi===p){if(wr.delegate=null,"throw"===wr.method){if(kr.iterator.return&&(wr.method="return",wr.arg=p,Yi(kr,wr),"throw"===wr.method))return wn;wr.method="throw",wr.arg=new TypeError("The iterator does not provide a 'throw' method")}return wn}var Ys=rt(mi,kr.iterator,wr.arg);if("throw"===Ys.type)return wr.method="throw",wr.arg=Ys.arg,wr.delegate=null,wn;var Js=Ys.arg;return Js?Js.done?(wr[kr.resultName]=Js.value,wr.next=kr.nextLoc,"return"!==wr.method&&(wr.method="next",wr.arg=p),wr.delegate=null,wn):Js:(wr.method="throw",wr.arg=new TypeError("iterator result is not an object"),wr.delegate=null,wn)}function no(kr){var wr={tryLoc:kr[0]};1 in kr&&(wr.catchLoc=kr[1]),2 in kr&&(wr.finallyLoc=kr[2],wr.afterLoc=kr[3]),this.tryEntries.push(wr)}function Gs(kr){var wr=kr.completion||{};wr.type="normal",delete wr.arg,kr.completion=wr}function Ts(kr){this.tryEntries=[{tryLoc:"root"}],kr.forEach(no,this),this.reset(!0)}function us(kr){if(kr){var wr=kr[q];if(wr)return wr.call(kr);if("function"==typeof kr.next)return kr;if(!isNaN(kr.length)){var mi=-1,Ys=function Js(){for(;++mi=0;--Ys){var Js=this.tryEntries[Ys],va=Js.completion;if("root"===Js.tryLoc)return mi("end");if(Js.tryLoc<=this.prev){var Qo=s.call(Js,"catchLoc"),Do=s.call(Js,"finallyLoc");if(Qo&&Do){if(this.prev=0;--mi){var Ys=this.tryEntries[mi];if(Ys.tryLoc<=this.prev&&s.call(Ys,"finallyLoc")&&this.prev=0;--wr){var mi=this.tryEntries[wr];if(mi.finallyLoc===kr)return this.complete(mi.completion,mi.afterLoc),Gs(mi),wn}},catch:function(kr){for(var wr=this.tryEntries.length-1;wr>=0;--wr){var mi=this.tryEntries[wr];if(mi.tryLoc===kr){var Ys=mi.completion;if("throw"===Ys.type){var Js=Ys.arg;Gs(mi)}return Js}}throw new Error("illegal catch attempt")},delegateYield:function(kr,wr,mi){return this.delegate={iterator:us(kr),resultName:wr,nextLoc:mi},"next"===this.method&&(this.arg=p),wn}},e}(n.exports);try{regeneratorRuntime=t}catch{Function("r","regeneratorRuntime = r")(t)}}(t={exports:{}}),t.exports),Z_="0x0000000000000000000000000000000000000000",X3=(()=>(function(n){n[n.LOWEST=100]="LOWEST",n[n.LOW=500]="LOW",n[n.MEDIUM=3e3]="MEDIUM",n[n.HIGH=1e4]="HIGH"}(X3||(X3={})),X3))(),Bb=((S5={})[X3.LOWEST]=1,S5[X3.LOW]=10,S5[X3.MEDIUM]=60,S5[X3.HIGH]=200,S5),nv=er().BigInt(-1),Qf=er().BigInt(0),rv=er().BigInt(1),iv=er().exponentiate(er().BigInt(2),er().BigInt(96)),XE=er().exponentiate(iv,er().BigInt(2)),xae=function(){function n(){}return n.addDelta=function(e,r){return er().lessThan(r,Qf)?er().subtract(e,er().multiply(r,nv)):er().add(e,r)},n}(),sv=function(){function n(){}return n.mulDivRoundingUp=function(e,r,s){var p=er().multiply(e,r),F=er().divide(p,s);return er().notEqual(er().remainder(p,s),Qf)&&(F=er().add(F,rv)),F},n}(),Eae=er().subtract(er().exponentiate(er().BigInt(2),er().BigInt(160)),rv);function _j(n,t){var e=er().multiply(n,t);return er().bitwiseAnd(e,Z3)}var pp=function(){function n(){}return n.getAmount0Delta=function(e,r,s,p){if(er().greaterThan(e,r)){var F=[r,e];e=F[0],r=F[1]}var q=er().leftShift(s,er().BigInt(96)),te=er().subtract(r,e);return p?sv.mulDivRoundingUp(sv.mulDivRoundingUp(q,te,r),rv,e):er().divide(er().divide(er().multiply(q,te),r),e)},n.getAmount1Delta=function(e,r,s,p){if(er().greaterThan(e,r)){var F=[r,e];e=F[0],r=F[1]}return p?sv.mulDivRoundingUp(s,er().subtract(r,e),iv):er().divide(er().multiply(s,er().subtract(r,e)),iv)},n.getNextSqrtPriceFromInput=function(e,r,s,p){return er().greaterThan(e,Qf)||ma(!1),er().greaterThan(r,Qf)||ma(!1),p?this.getNextSqrtPriceFromAmount0RoundingUp(e,r,s,!0):this.getNextSqrtPriceFromAmount1RoundingDown(e,r,s,!0)},n.getNextSqrtPriceFromOutput=function(e,r,s,p){return er().greaterThan(e,Qf)||ma(!1),er().greaterThan(r,Qf)||ma(!1),p?this.getNextSqrtPriceFromAmount1RoundingDown(e,r,s,!1):this.getNextSqrtPriceFromAmount0RoundingUp(e,r,s,!1)},n.getNextSqrtPriceFromAmount0RoundingUp=function(e,r,s,p){if(er().equal(s,Qf))return e;var F=er().leftShift(r,er().BigInt(96));if(p){var q=_j(s,e);if(er().equal(er().divide(q,s),e)){var te=function(n,t){var e=er().add(n,t);return er().bitwiseAnd(e,Z3)}(F,q);if(er().greaterThanOrEqual(te,F))return sv.mulDivRoundingUp(F,e,te)}return sv.mulDivRoundingUp(F,rv,er().add(er().divide(F,e),s))}var fe=_j(s,e);er().equal(er().divide(fe,s),e)||ma(!1),er().greaterThan(F,fe)||ma(!1);var Re=er().subtract(F,fe);return sv.mulDivRoundingUp(F,e,Re)},n.getNextSqrtPriceFromAmount1RoundingDown=function(e,r,s,p){if(p){var F=er().lessThanOrEqual(s,Eae)?er().divide(er().leftShift(s,er().BigInt(96)),r):er().divide(er().multiply(s,iv),r);return er().add(e,F)}var q=sv.mulDivRoundingUp(s,iv,r);return er().greaterThan(e,q)||ma(!1),er().subtract(e,q)},n}(),zO=er().exponentiate(er().BigInt(10),er().BigInt(6)),Aae=function(){function n(){}return n.computeSwapStep=function(e,r,s,p,F){var q={},te=er().greaterThanOrEqual(e,r),fe=er().greaterThanOrEqual(p,Qf);if(fe){var Re=er().divide(er().multiply(p,er().subtract(zO,er().BigInt(F))),zO);q.amountIn=te?pp.getAmount0Delta(r,e,s,!0):pp.getAmount1Delta(e,r,s,!0),q.sqrtRatioNextX96=er().greaterThanOrEqual(Re,q.amountIn)?r:pp.getNextSqrtPriceFromInput(e,s,Re,te)}else q.amountOut=te?pp.getAmount1Delta(r,e,s,!1):pp.getAmount0Delta(e,r,s,!1),q.sqrtRatioNextX96=er().greaterThanOrEqual(er().multiply(p,nv),q.amountOut)?r:pp.getNextSqrtPriceFromOutput(e,s,er().multiply(p,nv),te);var $e=er().equal(r,q.sqrtRatioNextX96);return te?(q.amountIn=$e&&fe?q.amountIn:pp.getAmount0Delta(q.sqrtRatioNextX96,e,s,!0),q.amountOut=$e&&!fe?q.amountOut:pp.getAmount1Delta(q.sqrtRatioNextX96,e,s,!1)):(q.amountIn=$e&&fe?q.amountIn:pp.getAmount1Delta(e,q.sqrtRatioNextX96,s,!0),q.amountOut=$e&&!fe?q.amountOut:pp.getAmount0Delta(e,q.sqrtRatioNextX96,s,!1)),!fe&&er().greaterThan(q.amountOut,er().multiply(p,nv))&&(q.amountOut=er().multiply(p,nv)),q.feeAmount=fe&&er().notEqual(q.sqrtRatioNextX96,r)?er().subtract(p,q.amountIn):sv.mulDivRoundingUp(q.amountIn,er().BigInt(F),er().subtract(zO,er().BigInt(F))),[q.sqrtRatioNextX96,q.amountIn,q.amountOut,q.feeAmount]},n}(),Iae=er().BigInt(2),Sae=[128,64,32,16,8,4,2,1].map(function(n){return[n,er().exponentiate(Iae,er().BigInt(n))]});function Nh(n,t){return er().signedRightShift(er().multiply(n,er().BigInt(t)),er().BigInt(128))}var qO=er().exponentiate(er().BigInt(2),er().BigInt(32)),ba=function(){function n(){}return n.getSqrtRatioAtTick=function(e){e>=n.MIN_TICK&&e<=n.MAX_TICK&&Number.isInteger(e)||ma(!1);var r=e<0?-1*e:e,s=0!=(1&r)?er().BigInt("0xfffcb933bd6fad37aa2d162d1a594001"):er().BigInt("0x100000000000000000000000000000000");return 0!=(2&r)&&(s=Nh(s,"0xfff97272373d413259a46990580e213a")),0!=(4&r)&&(s=Nh(s,"0xfff2e50f5f656932ef12357cf3c7fdcc")),0!=(8&r)&&(s=Nh(s,"0xffe5caca7e10e4e61c3624eaa0941cd0")),0!=(16&r)&&(s=Nh(s,"0xffcb9843d60f6159c9db58835c926644")),0!=(32&r)&&(s=Nh(s,"0xff973b41fa98c081472e6896dfb254c0")),0!=(64&r)&&(s=Nh(s,"0xff2ea16466c96a3843ec78b326b52861")),0!=(128&r)&&(s=Nh(s,"0xfe5dee046a99a2a811c461f1969c3053")),0!=(256&r)&&(s=Nh(s,"0xfcbe86c7900a88aedcffc83b479aa3a4")),0!=(512&r)&&(s=Nh(s,"0xf987a7253ac413176f2b074cf7815e54")),0!=(1024&r)&&(s=Nh(s,"0xf3392b0822b70005940c7a398e4b70f3")),0!=(2048&r)&&(s=Nh(s,"0xe7159475a2c29b7443b29c7fa6e889d9")),0!=(4096&r)&&(s=Nh(s,"0xd097f3bdfd2022b8845ad8f792aa5825")),0!=(8192&r)&&(s=Nh(s,"0xa9f746462d870fdf8a65dc1f90e061e5")),0!=(16384&r)&&(s=Nh(s,"0x70d869a156d2a1b890bb3df62baf32f7")),0!=(32768&r)&&(s=Nh(s,"0x31be135f97d08fd981231505542fcfa6")),0!=(65536&r)&&(s=Nh(s,"0x9aa508b5b7a84e1c677de54f3e99bc9")),0!=(131072&r)&&(s=Nh(s,"0x5d6af8dedb81196699c329225ee604")),0!=(262144&r)&&(s=Nh(s,"0x2216e584f5fa1ea926041bedfe98")),0!=(524288&r)&&(s=Nh(s,"0x48a170391f7dc42444e8fa2")),e>0&&(s=er().divide(Z3,s)),er().greaterThan(er().remainder(s,qO),Qf)?er().add(er().divide(s,qO),rv):er().divide(s,qO)},n.getTickAtSqrtRatio=function(e){er().greaterThanOrEqual(e,n.MIN_SQRT_RATIO)&&er().lessThan(e,n.MAX_SQRT_RATIO)||ma(!1);var p,r=er().leftShift(e,er().BigInt(32)),s=function(n){er().greaterThan(n,Qf)||ma(!1),er().lessThanOrEqual(n,Z3)||ma(!1);for(var r,t=0,e=GO(Sae);!(r=e()).done;){var s=r.value,p=s[0],F=s[1];er().greaterThanOrEqual(n,F)&&(n=er().signedRightShift(n,er().BigInt(p)),t+=p)}return t}(r);p=er().greaterThanOrEqual(er().BigInt(s),er().BigInt(128))?er().signedRightShift(r,er().BigInt(s-127)):er().leftShift(r,er().BigInt(127-s));for(var F=er().leftShift(er().subtract(er().BigInt(s),er().BigInt(128)),er().BigInt(64)),q=0;q<14;q++){p=er().signedRightShift(er().multiply(p,p),er().BigInt(127));var te=er().signedRightShift(p,er().BigInt(128));F=er().bitwiseOr(F,er().leftShift(te,er().BigInt(63-q))),p=er().signedRightShift(p,te)}var fe=er().multiply(F,er().BigInt("255738958999603826347141")),Re=er().toNumber(er().signedRightShift(er().subtract(fe,er().BigInt("3402992956809132418596140100660247210")),er().BigInt(128))),$e=er().toNumber(er().signedRightShift(er().add(fe,er().BigInt("291339464771989622907027621153398088495")),er().BigInt(128)));return Re===$e?Re:er().lessThanOrEqual(n.getSqrtRatioAtTick($e),e)?$e:Re},n}();ba.MIN_TICK=-887272,ba.MAX_TICK=-ba.MIN_TICK,ba.MIN_SQRT_RATIO=er().BigInt("4295128739"),ba.MAX_SQRT_RATIO=er().BigInt("1461446703485210103287273052203988822378723970342");var wj=function(){function n(){}var t=n.prototype;return t.getTick=function(){var e=J3(Sm.mark(function s(p){return Sm.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:throw new Error(n.ERROR_MESSAGE);case 1:case"end":return q.stop()}},s)}));return function(s){return e.apply(this,arguments)}}(),t.nextInitializedTickWithinOneWord=function(){var e=J3(Sm.mark(function s(p,F,q){return Sm.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:throw new Error(n.ERROR_MESSAGE);case 1:case"end":return fe.stop()}},s)}));return function(s,p,F){return e.apply(this,arguments)}}(),n}();function Mae(n,t){return n.index-t.index}wj.ERROR_MESSAGE="No tick data provider was given";var KO=function(){function n(){}return n.validateList=function(e,r){r>0||ma(!1),e.every(function(s){return s.index%r==0})||ma(!1),er().equal(e.reduce(function(s,p){var F=p.liquidityNet;return er().add(s,F)},Qf),Qf)||ma(!1),function(n,t){for(var e=0;e0)return!1;return!0}(e,Mae)||ma(!1)},n.isBelowSmallest=function(e,r){return e.length>0||ma(!1),r0||ma(!1),r>=e[e.length-1].index},n.getTick=function(e,r){var s=e[this.binarySearch(e,r)];return s.index!==r&&ma(!1),s},n.binarySearch=function(e,r){this.isBelowSmallest(e,r)&&ma(!1);for(var F,s=0,p=e.length-1;;){if(e[F=Math.floor((s+p)/2)].index<=r&&(F===e.length-1||e[F+1].index>r))return F;e[F].index>8<<8)*p;if(n.isBelowSmallest(e,r))return[te,!1];var fe=n.nextInitializedTick(e,r,s).index,Re=Math.max(te,fe);return[Re,Re===fe]}var rt=((1+(F+1>>8)<<8)-1)*p;if(this.isAtOrAboveLargest(e,r))return[rt,!1];var ft=this.nextInitializedTick(e,r,s).index,Tt=Math.min(rt,ft);return[Tt,Tt===ft]},n}();function su(n){var e=er().BigInt(n).toString(16);return e.length%2!=0&&(e="0"+e),"0x"+e}function xj(n,t){var r=n.pools.reduce(function(F,q,te){var fe=F.inputToken,Re=F.path,$e=F.types,rt=q.token0.equals(fe)?q.token1:q.token0;return 0===te?{inputToken:rt,types:["address","uint24","address"],path:[fe.address,q.fee,rt.address]}:{inputToken:rt,types:[].concat($e,["uint24","address"]),path:[].concat(Re,[q.fee,rt.address])}},{inputToken:n.input.wrapped,path:[],types:[]}),s=r.path,p=r.types;return t?(0,WO.pack)(p.reverse(),s.reverse()):(0,WO.pack)(p,s)}function QE(n,t){var e=er().leftShift(er().BigInt(n),er().BigInt(192)),r=er().BigInt(t);return function(n){if(er().greaterThanOrEqual(n,sae)||ma(!1),er().lessThan(n,iae))return er().BigInt(Math.floor(Math.sqrt(er().toNumber(n))));var t,e;for(t=n,e=er().add(er().divide(n,mj),oae);er().lessThan(e,t);)t=e,e=er().divide(er().add(er().divide(n,e),e),mj);return t}(er().divide(e,r))}function Oae(n,t,e){if(er().greaterThan(n,t)){var r=[t,n];n=r[0],t=r[1]}var s=er().divide(er().multiply(n,t),iv);return er().divide(er().multiply(er().BigInt(e),s),er().subtract(t,n))}function Dae(n,t,e){if(er().greaterThan(n,t)){var r=[t,n];n=r[0],t=r[1]}var s=er().multiply(er().multiply(er().BigInt(e),n),t),p=er().multiply(iv,er().subtract(t,n));return er().divide(s,p)}function Ej(n,t,e){if(er().greaterThan(n,t)){var r=[t,n];n=r[0],t=r[1]}return er().divide(er().multiply(er().BigInt(e),iv),er().subtract(t,n))}function ZO(n,t,e,r,s,p){if(er().greaterThan(t,e)){var F=[e,t];t=F[0],e=F[1]}var q=p?Dae:Oae;if(er().lessThanOrEqual(n,t))return q(t,e,r);if(er().lessThan(n,e)){var te=q(n,e,r),fe=Ej(t,n,s);return er().lessThan(te,fe)?te:fe}return Ej(t,e,s)}function k5(n,t){Number.isInteger(n)&&Number.isInteger(t)||ma(!1),t>0||ma(!1),n>=ba.MIN_TICK&&n<=ba.MAX_TICK||ma(!1);var e=Math.round(n/t)*t;return eba.MAX_TICK?e-t:e}function Q3(n,t,e){var r=ba.getSqrtRatioAtTick(e),s=er().multiply(r,r);return n.sortsBefore(t)?new I5(n,t,XE,s):new I5(n,t,s,XE)}function Tj(n){var t=n.baseCurrency.sortsBefore(n.quoteCurrency),e=t?QE(n.numerator,n.denominator):QE(n.denominator,n.numerator),r=ba.getTickAtSqrtRatio(e),s=Q3(n.baseCurrency,n.quoteCurrency,r+1);return t?n.lessThan(s)||r++:n.greaterThan(s)||r++,r}var Aj=function(t){var e=t.index,r=t.liquidityGross,s=t.liquidityNet;e>=ba.MIN_TICK&&e<=ba.MAX_TICK||ma(!1),this.index=e,this.liquidityGross=er().BigInt(r),this.liquidityNet=er().BigInt(s)},Rae=function(){function n(e,r){var s=e.map(function(p){return p instanceof Aj?p:new Aj(p)});KO.validateList(s,r),this.ticks=s}var t=n.prototype;return t.getTick=function(){var e=J3(Sm.mark(function s(p){return Sm.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.abrupt("return",KO.getTick(this.ticks,p));case 1:case"end":return q.stop()}},s,this)}));return function(s){return e.apply(this,arguments)}}(),t.nextInitializedTickWithinOneWord=function(){var e=J3(Sm.mark(function s(p,F,q){return Sm.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return fe.abrupt("return",KO.nextInitializedTickWithinOneWord(this.ticks,p,F,q));case 1:case"end":return fe.stop()}},s,this)}));return function(s,p,F){return e.apply(this,arguments)}}(),n}(),Nae=new wj,Ug=function(){function n(e,r,s,p,F,q,te){void 0===te&&(te=Nae),Number.isInteger(s)&&s<1e6||ma(!1);var fe=ba.getSqrtRatioAtTick(q),Re=ba.getSqrtRatioAtTick(q+1);er().greaterThanOrEqual(er().BigInt(p),fe)&&er().lessThanOrEqual(er().BigInt(p),Re)||ma(!1);var $e=e.sortsBefore(r)?[e,r]:[r,e];this.token0=$e[0],this.token1=$e[1],this.fee=s,this.sqrtRatioX96=er().BigInt(p),this.liquidity=er().BigInt(F),this.tickCurrent=q,this.tickDataProvider=Array.isArray(te)?new Rae(te,Bb[s]):te}n.getAddress=function(r,s,p,F,q){return function(n){var t=n.factoryAddress,e=n.tokenA,r=n.tokenB,s=n.fee,p=n.initCodeHashManualOverride,F=e.sortsBefore(r)?[e,r]:[r,e];return(0,aj.getCreate2Address)(t,(0,WO.keccak256)(["bytes"],[$O.$.encode(["address","address","uint24"],[F[0].address,F[1].address,s])]),p??"0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54")}({factoryAddress:q??"0x1F98431c8aD98523631AE4a59f267346ea31F984",fee:p,tokenA:r,tokenB:s,initCodeHashManualOverride:F})};var t=n.prototype;return t.involvesToken=function(r){return r.equals(this.token0)||r.equals(this.token1)},t.priceOf=function(r){return this.involvesToken(r)||ma(!1),r.equals(this.token0)?this.token0Price:this.token1Price},t.getOutputAmount=function(){var e=J3(Sm.mark(function s(p,F){var q,te,fe,Re,$e,rt;return Sm.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return this.involvesToken(p.currency)||ma(!1),q=p.currency.equals(this.token0),Ft.next=4,this.swap(q,p.quotient,F);case 4:return fe=(te=Ft.sent).amountCalculated,Re=te.sqrtRatioX96,$e=te.liquidity,rt=te.tickCurrent,Ft.abrupt("return",[s2.fromRawAmount(q?this.token1:this.token0,er().multiply(fe,nv)),new n(this.token0,this.token1,this.fee,Re,$e,rt,this.tickDataProvider)]);case 11:case"end":return Ft.stop()}},s,this)}));return function(s,p){return e.apply(this,arguments)}}(),t.getInputAmount=function(){var e=J3(Sm.mark(function s(p,F){var q,te,Re,$e,rt;return Sm.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return p.currency.isToken&&this.involvesToken(p.currency)||ma(!1),q=p.currency.equals(this.token1),Ft.next=4,this.swap(q,er().multiply(p.quotient,nv),F);case 4:return Re=(te=Ft.sent).sqrtRatioX96,$e=te.liquidity,rt=te.tickCurrent,Ft.abrupt("return",[s2.fromRawAmount(q?this.token0:this.token1,te.amountCalculated),new n(this.token0,this.token1,this.fee,Re,$e,rt,this.tickDataProvider)]);case 11:case"end":return Ft.stop()}},s,this)}));return function(s,p){return e.apply(this,arguments)}}(),t.swap=function(){var e=J3(Sm.mark(function s(p,F,q){var te,fe,Re,$e,rt,ft;return Sm.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:q||(q=p?er().add(ba.MIN_SQRT_RATIO,rv):er().subtract(ba.MAX_SQRT_RATIO,rv)),p?(er().greaterThan(q,ba.MIN_SQRT_RATIO)||ma(!1),er().lessThan(q,this.sqrtRatioX96)||ma(!1)):(er().lessThan(q,ba.MAX_SQRT_RATIO)||ma(!1),er().greaterThan(q,this.sqrtRatioX96)||ma(!1)),te=er().greaterThanOrEqual(F,Qf),fe={amountSpecifiedRemaining:F,amountCalculated:Qf,sqrtPriceX96:this.sqrtRatioX96,tick:this.tickCurrent,liquidity:this.liquidity};case 4:if(!er().notEqual(fe.amountSpecifiedRemaining,Qf)||fe.sqrtPriceX96==q){Ft.next=35;break}return(Re={}).sqrtPriceStartX96=fe.sqrtPriceX96,Ft.next=9,this.tickDataProvider.nextInitializedTickWithinOneWord(fe.tick,p,this.tickSpacing);case 9:if(Re.tickNext=($e=Ft.sent)[0],Re.initialized=$e[1],Re.tickNextba.MAX_TICK&&(Re.tickNext=ba.MAX_TICK),Re.sqrtPriceNextX96=ba.getSqrtRatioAtTick(Re.tickNext),rt=Aae.computeSwapStep(fe.sqrtPriceX96,(p?er().lessThan(Re.sqrtPriceNextX96,q):er().greaterThan(Re.sqrtPriceNextX96,q))?q:Re.sqrtPriceNextX96,fe.liquidity,fe.amountSpecifiedRemaining,this.fee),fe.sqrtPriceX96=rt[0],Re.amountIn=rt[1],Re.amountOut=rt[2],Re.feeAmount=rt[3],te?(fe.amountSpecifiedRemaining=er().subtract(fe.amountSpecifiedRemaining,er().add(Re.amountIn,Re.feeAmount)),fe.amountCalculated=er().subtract(fe.amountCalculated,Re.amountOut)):(fe.amountSpecifiedRemaining=er().add(fe.amountSpecifiedRemaining,Re.amountOut),fe.amountCalculated=er().add(fe.amountCalculated,er().add(Re.amountIn,Re.feeAmount))),!er().equal(fe.sqrtPriceX96,Re.sqrtPriceNextX96)){Ft.next=32;break}if(!Re.initialized){Ft.next=29;break}return Ft.t0=er(),Ft.next=25,this.tickDataProvider.getTick(Re.tickNext);case 25:Ft.t1=Ft.sent.liquidityNet,ft=Ft.t0.BigInt.call(Ft.t0,Ft.t1),p&&(ft=er().multiply(ft,nv)),fe.liquidity=xae.addDelta(fe.liquidity,ft);case 29:fe.tick=p?Re.tickNext-1:Re.tickNext,Ft.next=33;break;case 32:er().notEqual(fe.sqrtPriceX96,Re.sqrtPriceStartX96)&&(fe.tick=ba.getTickAtSqrtRatio(fe.sqrtPriceX96));case 33:Ft.next=4;break;case 35:return Ft.abrupt("return",{amountCalculated:fe.amountCalculated,sqrtRatioX96:fe.sqrtPriceX96,liquidity:fe.liquidity,tickCurrent:fe.tick});case 36:case"end":return Ft.stop()}},s,this)}));return function(s,p,F){return e.apply(this,arguments)}}(),bj(n,[{key:"token0Price",get:function(){var r;return null!=(r=this._token0Price)?r:this._token0Price=new I5(this.token0,this.token1,XE,er().multiply(this.sqrtRatioX96,this.sqrtRatioX96))}},{key:"token1Price",get:function(){var r;return null!=(r=this._token1Price)?r:this._token1Price=new I5(this.token1,this.token0,er().multiply(this.sqrtRatioX96,this.sqrtRatioX96),XE)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"tickSpacing",get:function(){return Bb[this.fee]}}]),n}(),eT=function(){function n(e){var r=e.pool,s=e.liquidity,p=e.tickLower,F=e.tickUpper;this._token0Amount=null,this._token1Amount=null,this._mintAmounts=null,p=ba.MIN_TICK&&p%r.tickSpacing==0||ma(!1),F<=ba.MAX_TICK&&F%r.tickSpacing==0||ma(!1),this.pool=r,this.tickLower=p,this.tickUpper=F,this.liquidity=er().BigInt(s)}var t=n.prototype;return t.ratiosAfterSlippage=function(r){var s=this.pool.token0Price.asFraction.multiply(new Y3(1).subtract(r)),p=this.pool.token0Price.asFraction.multiply(r.add(1)),F=QE(s.numerator,s.denominator);er().lessThanOrEqual(F,ba.MIN_SQRT_RATIO)&&(F=er().add(ba.MIN_SQRT_RATIO,er().BigInt(1)));var q=QE(p.numerator,p.denominator);return er().greaterThanOrEqual(q,ba.MAX_SQRT_RATIO)&&(q=er().subtract(ba.MAX_SQRT_RATIO,er().BigInt(1))),{sqrtRatioX96Lower:F,sqrtRatioX96Upper:q}},t.mintAmountsWithSlippage=function(r){var s=this.ratiosAfterSlippage(r),p=s.sqrtRatioX96Upper,F=s.sqrtRatioX96Lower,q=new Ug(this.pool.token0,this.pool.token1,this.pool.fee,F,0,ba.getTickAtSqrtRatio(F)),te=new Ug(this.pool.token0,this.pool.token1,this.pool.fee,p,0,ba.getTickAtSqrtRatio(p)),fe=n.fromAmounts(K_({pool:this.pool,tickLower:this.tickLower,tickUpper:this.tickUpper},this.mintAmounts,{useFullPrecision:!1}));return{amount0:new n({pool:te,liquidity:fe.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount0,amount1:new n({pool:q,liquidity:fe.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount1}},t.burnAmountsWithSlippage=function(r){var s=this.ratiosAfterSlippage(r),p=s.sqrtRatioX96Upper,F=s.sqrtRatioX96Lower,q=new Ug(this.pool.token0,this.pool.token1,this.pool.fee,F,0,ba.getTickAtSqrtRatio(F)),fe=new n({pool:new Ug(this.pool.token0,this.pool.token1,this.pool.fee,p,0,ba.getTickAtSqrtRatio(p)),liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount0,Re=new n({pool:q,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount1;return{amount0:fe.quotient,amount1:Re.quotient}},n.fromAmounts=function(r){var s=r.pool,p=r.tickLower,F=r.tickUpper,q=r.amount0,te=r.amount1,fe=r.useFullPrecision,Re=ba.getSqrtRatioAtTick(p),$e=ba.getSqrtRatioAtTick(F);return new n({pool:s,tickLower:p,tickUpper:F,liquidity:ZO(s.sqrtRatioX96,Re,$e,q,te,fe)})},n.fromAmount0=function(r){return n.fromAmounts({pool:r.pool,tickLower:r.tickLower,tickUpper:r.tickUpper,amount0:r.amount0,amount1:Z3,useFullPrecision:r.useFullPrecision})},n.fromAmount1=function(r){return n.fromAmounts({pool:r.pool,tickLower:r.tickLower,tickUpper:r.tickUpper,amount0:Z3,amount1:r.amount1,useFullPrecision:!0})},bj(n,[{key:"token0PriceLower",get:function(){return Q3(this.pool.token0,this.pool.token1,this.tickLower)}},{key:"token0PriceUpper",get:function(){return Q3(this.pool.token0,this.pool.token1,this.tickUpper)}},{key:"amount0",get:function(){return null===this._token0Amount&&(this._token0Amount=s2.fromRawAmount(this.pool.token0,this.pool.tickCurrent=0)&&(e[s]=n[s]);return e}($e,["expectedCurrencyOwed0","expectedCurrencyOwed1"]);return s.push.apply(s,n.encodeCollect(K_({tokenId:su(r.tokenId),expectedCurrencyOwed0:rt.add(s2.fromRawAmount(rt.currency,fe)),expectedCurrencyOwed1:ft.add(s2.fromRawAmount(ft.currency,Re))},Tt))),r.liquidityPercentage.equalTo(rv)?r.burnToken&&s.push(n.INTERFACE.encodeFunctionData("burn",[F])):!0===r.burnToken&&ma(!1),{calldata:e8.encodeMulticall(s),value:su(0)}},n.safeTransferFromParameters=function(e){var r=Im(e.recipient),s=Im(e.sender);return{calldata:e.data?n.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256,bytes)",[s,r,su(e.tokenId),e.data]):n.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256)",[s,r,su(e.tokenId)]),value:su(0)}},n}();Fae.INTERFACE=new Nb.vU(cae.Mt);var kj=function(){function n(){}return n.quoteCallParameters=function(e,r,s,p){void 0===p&&(p={});var te,F=1===e.pools.length,q=su(r.quotient),fe=p.useQuoterV2?this.V2INTERFACE:this.V1INTERFACE;if(F){var Re,$e,rt={tokenIn:e.tokenPath[0].address,tokenOut:e.tokenPath[1].address,fee:e.pools[0].fee,sqrtPriceLimitX96:su(null!=(Re=null==($e=p)?void 0:$e.sqrtPriceLimitX96)?Re:0)},ft=K_({},rt,s==Fg.EXACT_INPUT?{amountIn:q}:{amount:q});te=fe.encodeFunctionData(s===Fg.EXACT_INPUT?"quoteExactInputSingle":"quoteExactOutputSingle",p.useQuoterV2?[ft]:[rt.tokenIn,rt.tokenOut,rt.fee,q,rt.sqrtPriceLimitX96])}else{var Qt;void 0!==(null==(Qt=p)?void 0:Qt.sqrtPriceLimitX96)&&ma(!1);var wn=xj(e,s===Fg.EXACT_OUTPUT);te=fe.encodeFunctionData(s===Fg.EXACT_INPUT?"quoteExactInput":"quoteExactOutput",[wn,q])}return{calldata:te,value:su(0)}},n}();kj.V1INTERFACE=new Nb.vU(fae.Mt),kj.V2INTERFACE=new Nb.vU(hae.Mt);var Cj=function(){function n(){}return n.encodeClaim=function(e,r){var s,p=[];p.push(n.INTERFACE.encodeFunctionData("unstakeToken",[this._encodeIncentiveKey(e),su(r.tokenId)]));var F=Im(r.recipient),q=null!=(s=r.amount)?s:0;return p.push(n.INTERFACE.encodeFunctionData("claimReward",[e.rewardToken.address,F,su(q)])),p},n.collectRewards=function(e,r){e=Array.isArray(e)?e:[e];for(var s=[],p=0;p1){for(var s=[],p=0;ps?p[e].gt(F[e])?1:p[e].lt(F[e])?-1:0:p[e]>F[e]?1:p[e]s?F[e].gt(p[e])?1:F[e].lt(p[e])?-1:0:F[e]>p[e]?1:F[e]!sn.Z.isBigNumber(t[0][s]))?t:t.sort((s,p)=>{let[F,q]=[new sn.Z(0),new sn.Z(0)];return e.forEach(te=>{F=F.plus(s[te]),q=q.plus(p[te])}),r?F.gt(q)?1:F.lt(q)?-1:0:q.gt(F)?1:q.lt(F)?-1:0})}};let $c=e9;yt($c,"\u0275fac",function(e){return new(e||e9)(Yn(Xa))}),yt($c,"\u0275prov",we({token:e9,factory:e9.\u0275fac,providedIn:"root"}));const t9=class{constructor(t){yt(this,"util"),yt(this,"status",Object.create({})),yt(this,"userStatus",Object.create({})),yt(this,"bunniTokens",Object.create({})),yt(this,"escrow",Object.create({})),yt(this,"gauges",Object.create({})),yt(this,"pools",Object.create({})),yt(this,"protocol",Object.create({})),yt(this,"tokens",Object.create({})),yt(this,"vaults",Object.create({})),yt(this,"bunniTokens_observable",new xd.X([this.bunniTokens,void 0])),yt(this,"escrow_observable",new xd.X(this.escrow)),yt(this,"gauges_observable",new xd.X(this.gauges)),yt(this,"pools_observable",new xd.X(this.pools)),yt(this,"protocol_observable",new xd.X(this.protocol)),yt(this,"tokens_observable",new xd.X(this.tokens)),yt(this,"vaults_observable",new xd.X(this.vaults)),this.util=t}updateStatus(t,e){this.status[e]=t}updateUserStatus(t,e){this.userStatus[e]=t}updateBunniToken(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.bunniTokens[t]??this.initializeBunniToken(t);return e.forEach((F,q)=>F in p?p[F]=r[q]:console.error(`property '${F}' does not exist on class BunniToken`)),s&&p.updateUSDValues(),p}updateEscrow(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.escrow[t]??this.initializeEscrow(t);return e.forEach((F,q)=>F in p?p[F]=r[q]:console.error(`property '${F}' does not exist on class Escrow`)),s&&p.updateUSDValues(),p}updateGauge(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.gauges[t]??this.initializeGauge(t);return e.forEach((F,q)=>F in p?p[F]=r[q]:console.error(`property '${F}' does not exist on class Gauge`)),s&&p.updateUSDValues(),p}updatePool(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.pools[t]??this.initializePool(t);return e.forEach((F,q)=>F in p?p[F]=r[q]:console.error(`property '${F}' does not exist on class Pool`)),s&&p.updateUSDValues(),p}updateProtocol(t,e,r){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const s=this.protocol[t]??this.initializeProtocol(t);return e.forEach((p,F)=>p in s?s[p]=r[F]:console.error(`property '${p}' does not exist on class Protocol`)),s}updateToken(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.tokens[t]??this.initializeToken(t);return e.forEach((F,q)=>F in p?p[F]=r[q]:console.error(`property '${F}' does not exist on class Token`)),s&&p.updateUSDValues(),p}updateVault(t,e,r){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const s=this.vaults[t]??this.initializeVault(t);return e.forEach((p,F)=>p in s?s[p]=r[F]:console.error(`property '${p}' does not exist on class Vault`)),s}initializeBunniToken(t){return this.bunniTokens[t]=new KE,this.bunniTokens[t]}initializeEscrow(t){return this.escrow[t]=new Eoe,this.escrow[t]}initializeGauge(t){return this.gauges[t]=new sj,this.gauges[t]}initializePool(t){return this.pools[t]=new koe,this.pools[t]}initializeProtocol(t){return this.protocol[t]=new Coe,this.protocol[t]}initializeToken(t){return this.tokens[t]=new T5,this.tokens[t]}initializeVault(t){return this.vaults[t]=new Moe,this.vaults[t]}getStatus(t){return this.status[t]}getUserStatus(t){return this.userStatus[t]}getBunniToken(t){return this.bunniTokens[t]}getBunniTokens(t){return Object.values(this.bunniTokens).filter(e=>t?e.chainId===t:e)}getEscrow(t){return this.escrow[t]}getEscrows(){return Object.values(this.escrow)}getGauge(t){return this.gauges[t]}getGauges(t){return Object.values(this.gauges).filter(e=>t?e.chainId===t:e)}getPool(t){return this.pools[t]}getPools(t){return Object.values(this.pools).filter(e=>t?e.chainId===t:e)}getProtocol(t){return this.protocol[t]}getProtocols(){return Object.values(this.protocol)}getToken(t){return this.tokens[t]}getTokens(t){return Object.values(this.tokens).filter(e=>t?e.chainId===t:e)}getVault(t){return this.vaults[t]}getVaults(t){return Object.values(this.vaults).filter(e=>t?e.chainId===t:e)}getNative(t){return this.getToken(this.util.id(WE.toLowerCase(),t))}getWrappedNative(t){return this.getToken(this.util.id(Q6[t].toLowerCase(),t))}observeBunniTokens(t){this.bunniTokens_observable.next([this.bunniTokens,t])}observeEscrow(){this.escrow_observable.next(this.escrow)}observeGauges(){this.gauges_observable.next(this.gauges)}observePools(){this.pools_observable.next(this.pools)}observeProtocol(){this.protocol_observable.next(this.protocol)}observeTokens(){this.tokens_observable.next(this.tokens)}};let el=t9;yt(el,"\u0275fac",function(e){return new(e||t9)(Yn($c))}),yt(el,"\u0275prov",we({token:t9,factory:t9.\u0275fac,providedIn:"root"}));const n9=class{constructor(t){yt(this,"store"),this.store=t}setStakingAPR(t){var e=this;return(0,Br.Z)(function*(){const[r,s,p,F]=yield Promise.all([e.isLst(t.token0),e.isLst(t.token1),e.getApr(t.token0),e.getApr(t.token1)]);t.bunniTokens.forEach(q=>{if(r&&s){const te=q.reserve0,fe=q.reserve1.times(t.token1Price),Re=te.plus(fe),$e=q.reserve1,rt=q.reserve0.times(t.token0Price),ft=$e.plus(rt);if(Re.eq(0)||ft.eq(0))return;const Tt=p.times(te).div(Re),Ft=F.times($e).div(ft);e.store.updateBunniToken(q.id,["stakingAPR"],[Tt.plus(Ft)])}else if(r){const te=q.reserve0,fe=q.reserve1.times(t.token1Price),Re=te.plus(fe);Re.gt(0)&&e.store.updateBunniToken(q.id,["stakingAPR"],[p.times(te).div(Re)])}else if(s){const te=q.reserve1,fe=q.reserve0.times(t.token0Price),Re=te.plus(fe);Re.gt(0)&&e.store.updateBunniToken(q.id,["stakingAPR"],[F.times(te).div(Re)])}})})()}getApr(t){var e=this;return(0,Br.Z)(function*(){switch(t.address){case hp[t.chainId].STETH:return yield e.stethApr();case hp[t.chainId].SWETH:return yield e.swethApr();case hp[t.chainId].WSTETH:return yield e.stethApr();default:return new sn.Z(0)}})()}swethApr(){return(0,Br.Z)(function*(){const t=yield fetch("https://v3.svc.swellnetwork.io/api/tokens/sweth/apr");if(t.ok){const e=yield t.json();return new sn.Z(e)}return console.error("Swell Network API"),new sn.Z(0)})()}stethApr(){return(0,Br.Z)(function*(){const t=yield fetch("https://eth-api.lido.fi/v1/protocol/steth/apr/sma");if(t.ok){const e=yield t.json();return new sn.Z(e.data.smaApr)}return console.error("Lido API"),new sn.Z(0)})()}isLst(t){switch(t.address){case hp[t.chainId].STETH:case hp[t.chainId].SWETH:case hp[t.chainId].WSTETH:return!0;default:return!1}}};let C5=n9;yt(C5,"\u0275fac",function(e){return new(e||n9)(Yn(el))}),yt(C5,"\u0275prov",we({token:n9,factory:n9.\u0275fac,providedIn:"root"}));var Mj=Y(36776),Uae=Y(80831),jae=Y(51528),Vae=Y(92673),Fb=(()=>(function(n){n.web3="web3",n.ethers="ethers",n.customHttp="custom"}(Fb||(Fb={})),Fb))(),$a=(()=>(function(n){n[n.mainnet=1]="mainnet",n[n.ropsten=3]="ropsten",n[n.rinkeby=4]="rinkeby",n[n.goerli=5]="goerli",n[n.optimism=10]="optimism",n[n.kovan=42]="kovan",n[n.matic=137]="matic",n[n.kovanOptimism=69]="kovanOptimism",n[n.xdai=100]="xdai",n[n.goerliOptimism=420]="goerliOptimism",n[n.arbitrum=42161]="arbitrum",n[n.rinkebyArbitrum=421611]="rinkebyArbitrum",n[n.goerliArbitrum=421613]="goerliArbitrum",n[n.mumbai=80001]="mumbai",n[n.sepolia=11155111]="sepolia",n[n.avalancheMainnet=43114]="avalancheMainnet",n[n.avalancheFuji=43113]="avalancheFuji",n[n.fantomTestnet=4002]="fantomTestnet",n[n.fantom=250]="fantom",n[n.bsc=56]="bsc",n[n.bsc_testnet=97]="bsc_testnet",n[n.moonbeam=1284]="moonbeam",n[n.moonriver=1285]="moonriver",n[n.moonbaseAlphaTestnet=1287]="moonbaseAlphaTestnet",n[n.harmony=16666e5]="harmony",n[n.cronos=25]="cronos",n[n.fuse=122]="fuse",n[n.songbirdCanaryNetwork=19]="songbirdCanaryNetwork",n[n.costonTestnet=16]="costonTestnet",n[n.boba=288]="boba",n[n.aurora=1313161554]="aurora",n[n.astar=592]="astar",n[n.okc=66]="okc",n[n.heco=128]="heco",n[n.metis=1088]="metis",n[n.rsk=30]="rsk",n[n.rskTestnet=31]="rskTestnet",n[n.evmos=9001]="evmos",n[n.evmosTestnet=9e3]="evmosTestnet",n[n.thundercore=108]="thundercore",n[n.thundercoreTestnet=18]="thundercoreTestnet",n[n.oasis=26863]="oasis",n[n.celo=42220]="celo",n[n.godwoken=71402]="godwoken",n[n.godwokentestnet=71401]="godwokentestnet",n[n.klatyn=8217]="klatyn",n[n.milkomeda=2001]="milkomeda",n[n.kcc=321]="kcc",n[n.etherlite=111]="etherlite",n[n.lineaTestnet=59140]="lineaTestnet",n[n.linea=59144]="linea",n[n.scroll=534352]="scroll",n[n.zkSyncEra=324]="zkSyncEra",n[n.zkSyncEraTestnet=280]="zkSyncEraTestnet"}($a||($a={})),$a))(),t8=function(){function n(){}return n.deepClone=function(t){return JSON.parse(JSON.stringify(t))},n}(),nT=function(){return nT=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0&&p[p.length-1])&&(6===fe[0]||2===fe[0])){e=0;continue}if(3===fe[0]&&(!p||fe[1]>p[0]&&fe[1]0)try{ft=Vae.defaultAbiCoder.decode(rt,this.getReturnDataFromResult(Re.result)),te.callsReturnContext.push(t8.deepClone({returnValues:this.formatReturnValues(ft),decoded:!0,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!0}))}catch(Ft){if(!this._options.tryAggregate)throw Ft;te.callsReturnContext.push(t8.deepClone({returnValues:[],decoded:!1,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!1}))}else te.callsReturnContext.push(t8.deepClone({returnValues:this.getReturnDataFromResult(Re.result),decoded:!1,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!0}));else te.callsReturnContext.push(t8.deepClone({returnValues:[],decoded:!1,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!1}));s.results[te.originalContractCallContext.reference]=te}return[2,s]}})})},n.prototype.getReturnDataFromResult=function(t){return this._options.tryAggregate?t.returnData:t},n.prototype.formatReturnValues=function(t){var e=t;return 1===t.length&&(e=t[0]),Array.isArray(e)?e:[e]},n.prototype.buildAggregateCallContext=function(t){for(var e=[],r=0;r({reference:`ALLOWANCE: ${s}`,contractAddress:s,abi:Y(97615),calls:e.map(p=>({reference:p,methodName:"allowance",methodParameters:[t,p]}))})):[]}};let M5=r9;yt(M5,"\u0275fac",function(e){return new(e||r9)}),yt(M5,"\u0275prov",we({token:r9,factory:r9.\u0275fac,providedIn:"root"}));const i9=class{constructor(){}context(t,e){return t?e.map(r=>({reference:`BALANCE: ${r}`,contractAddress:r,abi:Y(97615),calls:[{reference:r,methodName:"balanceOf",methodParameters:[t]}]})):[]}};let O5=i9;yt(O5,"\u0275fac",function(e){return new(e||i9)}),yt(O5,"\u0275prov",we({token:i9,factory:i9.\u0275fac,providedIn:"root"}));var Hae=Y(29813);const s9=class{constructor(t){yt(this,"wallet"),this.wallet=t}get poolURL(){const t=this.wallet.chainId===qi.GOERLI?qi.GOERLI:qi.ETHEREUM;return`https://app.balancer.fi/#/${$E[t].displayName.toLowerCase()}/pool/${MO[t]}`}getSpotPrice(t){return(0,Br.Z)(function*(){if(!E5[t])return new sn.Z(0);if(!MO[t])return new sn.Z(0);if(!hp[t].WETH)return new sn.Z(0);const r=yield new Hae.BalancerSDK({network:t,rpcUrl:ZU[t]}).pools.find(MO[t]);if(!r)return new sn.Z(0);const s=r.calcSpotPrice(hp[t].WETH,E5[t]);return new sn.Z(s)})()}};let D5=s9;yt(D5,"\u0275fac",function(e){return new(e||s9)(Yn(Xa))}),yt(D5,"\u0275prov",we({token:s9,factory:s9.\u0275fac,providedIn:"root"}));const o9=class{constructor(t,e,r){yt(this,"balancer"),yt(this,"contract"),yt(this,"wallet"),this.balancer=t,this.contract=e,this.wallet=r}getPrice(t){var e=this;return(0,Br.Z)(function*(){const[r,s]=yield Promise.all([e.balancer.getSpotPrice(t),e.getStrikePrice(t)]);return r.minus(s)})()}getStrikePrice(t){var e=this;return(0,Br.Z)(function*(){const r=e.wallet.httpsWeb3(t),p=yield e.contract.getOptionsToken(r,t).methods.oracle().call(),F=e.contract.getContract(p,"OptionsOracle",r),q=yield F.methods.getPrice().call().catch((0,Br.Z)(function*(){return yield F.methods.minPrice().call()}));return new sn.Z(q).div(1e18)})()}};let Y_=o9;yt(Y_,"\u0275fac",function(e){return new(e||o9)(Yn(D5),Yn(ud),Yn(Xa))}),yt(Y_,"\u0275prov",we({token:o9,factory:o9.\u0275fac,providedIn:"root"}));const a9=class{constructor(t){yt(this,"store"),this.store=t}get(t,e){const r=this.getNyt(t,e);if(r)return r;const s=this.getPyt(t,e);return s||(this.getXpyt(t,e)||null)}getNyt(t,e){return this.store.getVaults(e).find(r=>r.nyt.address.toLowerCase()===t.toLowerCase())}getPyt(t,e){return this.store.getVaults(e).find(r=>r.pyt.address.toLowerCase()===t.toLowerCase())}getXpyt(t,e){return this.store.getVaults(e).find(r=>r.xpyt.find(s=>s.address.toLowerCase()===t.toLowerCase()))}};let J_=a9;yt(J_,"\u0275fac",function(e){return new(e||a9)(Yn(el))}),yt(J_,"\u0275prov",we({token:a9,factory:a9.\u0275fac,providedIn:"root"}));const u9=class{constructor(t,e,r,s){yt(this,"option"),yt(this,"timeless"),yt(this,"store"),yt(this,"wallet"),this.option=t,this.timeless=e,this.store=r,this.wallet=s}fetch(t,e,r=!1){var s=this;return(0,Br.Z)(function*(){const p=s.getPlatformId(e);if(!p)return;let F=[];t.forEach(rt=>{const ft=s.timeless.get(rt,e);F.push(ft?ft.underlying.address:rt)}),F=[...new Set(F)];const q="https://coins.llama.fi/prices/current/";let fe={},Re=q,$e=[];for(let rt of F){const ft=`${p}:${rt},`;Re.concat(ft).length>2e3&&($e=$e.concat(Re),Re=q),Re=Re.concat(ft)}return $e=$e.concat(Re),yield Promise.all($e.map(rt=>s.httpsGet(rt).then(ft=>fe={...fe,...ft.coins}))),r&&s.store.getVaults(e).forEach(rt=>{const ft=fe[`${av[e]}:${rt.underlying.address.toLowerCase()}`]?new sn.Z(fe[`${av[e]}:${rt.underlying.address.toLowerCase()}`].price):new sn.Z(0);if(rt.xpyt.length){const Tt=rt.xpyt[0].conversionRate,Ft=rt.xpyt[0].spotPrice,Qt={price:Ft.div(Tt.plus(Ft)).times(ft)},wn={price:Tt.div(Tt.plus(Ft)).times(ft)};fe[`${av[e]}:${rt.nyt.address.toLowerCase()}`]=Qt,fe[`${av[e]}:${rt.pyt.address.toLowerCase()}`]=wn,rt.xpyt.forEach(An=>{const gr={price:new sn.Z(1).div(An.conversionRate.plus(An.spotPrice)).times(ft)};fe[`${av[e]}:${An.address.toLowerCase()}`]=gr})}else{const Tt={price:ft.times(.5)},Ft={price:ft.times(.5)};fe[`${av[e]}:${rt.nyt.address.toLowerCase()}`]=Tt,fe[`${av[e]}:${rt.pyt.address.toLowerCase()}`]=Ft}}),fe})()}httpsGet(t){return(0,Br.Z)(function*(){return yield(yield fetch(t)).json()})()}getPlatformId(t){return av[t]}};let X_=u9;yt(X_,"\u0275fac",function(e){return new(e||u9)(Yn(Y_),Yn(J_),Yn(el),Yn(Xa))}),yt(X_,"\u0275prov",we({token:u9,factory:u9.\u0275fac,providedIn:"root"}));const av={[qi.ETHEREUM]:"ethereum",[qi.GOERLI]:null,[qi.OPTIMISM]:"optimism",[qi.POLYGON]:"polygon",[qi.ARBITRUM]:"arbitrum"},c9=class{constructor(t,e,r,s,p,F,q){yt(this,"allowance"),yt(this,"balance"),yt(this,"chain"),yt(this,"price"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),this.allowance=t,this.balance=e,this.chain=r,this.price=s,this.store=p,this.util=F,this.wallet=q}isZero(t){return t.address.toLowerCase()===Oy.toLowerCase()}isNative(t){return t.address.toLowerCase()===WE.toLowerCase()}isWrappedNative(t,e){return t.address.toLowerCase()===Q6[e].toLowerCase()}list(t){return Y(91845)(`./${$E[t].displayName.toLowerCase()}.json`)}context(t){return t.map(e=>({reference:`ERC20: ${e}`,contractAddress:e,abi:Y(97615),calls:[{reference:`${e} Name`,methodName:"name",methodParameters:[]},{reference:`${e} Symbol`,methodName:"symbol",methodParameters:[]},{reference:`${e} Decimals`,methodName:"decimals",methodParameters:[]}]}))}fetchToken(t,e){var r=this;return(0,Br.Z)(function*(){const s=r.wallet.httpsWeb3(e),p=new sT({web3Instance:s,tryAggregate:!0}),F=r.chain.metadata[e].displayName.toLowerCase(),q=r.context([t.toLowerCase()]);let te=[],fe=[];r.wallet.connected&&(te=r.balance.context(r.wallet.user,[t.toLowerCase()]),fe=r.allowance.context(r.wallet.user,[x5,...fp[e]?[fp[e]]:[]],[t]));const[Re,$e]=yield Promise.all([p.call([...q,...te,...fe]),r.price.fetch([t.toLowerCase()],e)]);console.log($e);const rt=Re.results[`ERC20: ${t.toLowerCase()}`],ft=Re.results[`BALANCE: ${t.toLowerCase()}`],Tt=Re.results[`ALLOWANCE: ${t.toLowerCase()}`];let[Ft,Qt]=[[],[]];Ft.push("id")&&Qt.push(r.util.id(t.toLowerCase(),e)),Ft.push("address")&&Qt.push(t.toLowerCase()),Ft.push("chainId")&&Qt.push(e),Ft.push("name")&&Qt.push(rt.callsReturnContext[0].returnValues[0]),Ft.push("symbol")&&Qt.push(rt.callsReturnContext[1].returnValues[0]),Ft.push("decimals")&&Qt.push(rt.callsReturnContext[2].returnValues[0]),Ft.push("precision")&&Qt.push(Math.pow(10,rt.callsReturnContext[2].returnValues[0]));const wn=ft&&new sn.Z(ft.callsReturnContext[0].returnValues[0].hex);ft&&Ft.push("userBalance")&&Qt.push(wn.div(Math.pow(10,rt.callsReturnContext[2].returnValues[0])));const An=Object.create({});Tt&&Tt.callsReturnContext.map(pr=>{An[pr.reference]=pr.returnValues[0]?new sn.Z(pr.returnValues[0].hex).div(Math.pow(10,rt.callsReturnContext[2].returnValues[0])):new sn.Z(0)}),Tt&&Ft.push("userAllowances")&&Qt.push(An);const gr=r.list(e).find(pr=>pr.address.toLowerCase()===t.toLowerCase());if(gr&&gr.logoURI){const pr=gr.logoURI.includes("ipfs://")?`https://ipfs.io/ipfs/${gr.logoURI.substring(7)}`:gr.logoURI;pr&&Ft.push("iconPath")&&Qt.push(pr)}const _r=$e&&new sn.Z($e[`${F}:${t.toLowerCase()}`]?.price);return $e&&Ft.push("price")&&Qt.push(_r),r.store.updateToken(r.util.id(t.toLowerCase(),e),Ft,Qt,!0)})()}};let uv=c9;yt(uv,"\u0275fac",function(e){return new(e||c9)(Yn(M5),Yn(O5),Yn(dc),Yn(X_),Yn(el),Yn($c),Yn(Xa))}),yt(uv,"\u0275prov",we({token:c9,factory:c9.\u0275fac,providedIn:"root"}));const l9=class{constructor(t,e,r,s){yt(this,"store"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),this.store=t,this.token=e,this.util=r,this.wallet=s}uniswap(t,e){var r=this;return(0,Br.Z)(function*(){const s=r.wallet.httpsWeb3(e),p=new sT({web3Instance:s,tryAggregate:!0}),F={reference:t,contractAddress:t,abi:Y(92892),calls:[{reference:"slot0",methodName:"slot0",methodParameters:[]},{reference:"fee",methodName:"fee",methodParameters:[]},{reference:"liquidity",methodName:"liquidity",methodParameters:[]},{reference:"token0",methodName:"token0",methodParameters:[]},{reference:"token1",methodName:"token1",methodParameters:[]}]},te=(yield p.call(F)).results[t].callsReturnContext;if(te.find(Qt=>!Qt.success))return null;const fe=r.util.sqrtPriceX96ToTokenPrices(new sn.Z(te[0].returnValues[0].hex)),Re=te[3].returnValues[0].toLowerCase(),$e=r.store.getToken(r.util.id(Re,e))||(yield r.token.fetchToken(Re,e)),rt=te[4].returnValues[0].toLowerCase(),ft=r.store.getToken(r.util.id(rt,e))||(yield r.token.fetchToken(rt,e));let[Tt,Ft]=[[],[]];return Tt.push("id")&&Ft.push(r.util.id(t.toLowerCase(),e)),Tt.push("address")&&Ft.push(t.toLowerCase()),Tt.push("chainId")&&Ft.push(e),Tt.push("fee")&&Ft.push(te[1].returnValues[0]),Tt.push("tick")&&Ft.push(te[0].returnValues[1]),Tt.push("liquidity")&&Ft.push(new sn.Z(te[2].returnValues[0].hex)),Tt.push("sqrtPriceX96")&&Ft.push(new sn.Z(te[0].returnValues[0].hex)),Tt.push("token0")&&Ft.push($e),Tt.push("token1")&&Ft.push(ft),Tt.push("token0Price")&&Ft.push(fe[0].times(Math.pow(10,ft.decimals)).div(Math.pow(10,$e.decimals))),Tt.push("token1Price")&&Ft.push(fe[1].times(Math.pow(10,$e.decimals)).div(Math.pow(10,ft.decimals))),r.store.updatePool(r.util.id(t.toLowerCase(),e),Tt,Ft)})()}};let Q_=l9;function q2(n){return null!=n&&"false"!=`${n}`}function n8(n){return n instanceof wa?n.nativeElement:n}yt(Q_,"\u0275fac",function(e){return new(e||l9)(Yn(el),Yn(uv),Yn($c),Yn(Xa))}),yt(Q_,"\u0275prov",we({token:l9,factory:l9.\u0275fac,providedIn:"root"}));var YO=Y(95639);function oT(n){return n&&"function"==typeof n.connect}class Oj{applyChanges(t,e,r,s,p){t.forEachOperation((F,q,te)=>{let fe,Re;if(null==F.previousIndex){const $e=r(F,q,te);fe=e.createEmbeddedView($e.templateRef,$e.context,$e.index),Re=1}else null==te?(e.remove(q),Re=3):(fe=e.get(q),e.move(fe,te),Re=2);p&&p({context:null==fe?void 0:fe.context,operation:Re,record:F})})}detach(){}}const r8=new fo("_ViewRepeater"),Dj=new fo("cdk-dir-doc",{providedIn:"root",factory:function(){return Mo(qa)}});let XO,aT=(()=>{class n{constructor(e){if(this.value="ltr",this.change=new mo,e){const s=e.documentElement?e.documentElement.dir:null,p=(e.body?e.body.dir:null)||s;this.value="ltr"===p||"rtl"===p?p:"ltr"}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(Yn(Dj,8))},n.\u0275prov=we({factory:function(){return new n(Yn(Dj,8))},token:n,providedIn:"root"}),n})(),uT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();try{XO="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch{XO=!1}let tw,eD,J1=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function(n){return n===hN}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!XO)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(Yn(n5))},n.\u0275prov=we({factory:function(){return new n(Yn(n5))},token:n,providedIn:"root"}),n})(),cT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();function QO(n){return function(){if(null==tw&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>tw=!0}))}finally{tw=tw||!1}return tw}()?n:!!n.capture}function rw(n){return n.composedPath?n.composedPath()[0]:n.target}Y(61927),Y(64581);var tD=Y(45697);Y(59328),Y(47349);let Fj=(()=>{class n{constructor(e,r,s){this._platform=e,this._change=new ie.xQ,this._changeListener=p=>{this._change.next(p)},this._document=s,r.runOutsideAngular(()=>{if(e.isBrowser){const p=this._getWindow();p.addEventListener("resize",this._changeListener),p.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:r,height:s}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+s,right:e.left+r,height:s,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,r=this._getWindow(),s=e.documentElement,p=s.getBoundingClientRect();return{top:-p.top||e.body.scrollTop||r.scrollY||s.scrollTop||0,left:-p.left||e.body.scrollLeft||r.scrollX||s.scrollLeft||0}}change(e=20){return e>0?this._change.pipe((0,tD.e)(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(Yn(J1),Yn(pa),Yn(qa,8))},n.\u0275prov=we({factory:function(){return new n(Yn(J1),Yn(pa),Yn(qa,8))},token:n,providedIn:"root"}),n})(),Uj=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),fue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[uT,cT,Uj],uT,Uj]}),n})();const hue=[[["caption"]],[["colgroup"],["col"]]],pue=["caption","colgroup, col"];function nD(n){return class extends n{constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=q2(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}}}const R5=new fo("CDK_TABLE");let N5=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","cdkCellDef",""]]}),n})(),B5=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","cdkHeaderCellDef",""]]}),n})(),dT=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","cdkFooterCellDef",""]]}),n})();class bue{}const vue=nD(bue);let Lb=(()=>{class n extends vue{constructor(e){super(),this._table=e,this._stickyEnd=!1}get name(){return this._name}set name(e){this._setNameInput(e)}get stickyEnd(){return this._stickyEnd}set stickyEnd(e){const r=this._stickyEnd;this._stickyEnd=q2(e),this._hasStickyChanged=r!==this._stickyEnd}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return n.\u0275fac=function(e){return new(e||n)(Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,N5,5),wo(s,B5,5),wo(s,dT,5)),2&e){let p;gs(p=ho())&&(r.cell=p.first),gs(p=ho())&&(r.headerCell=p.first),gs(p=ho())&&(r.footerCell=p.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[Ya([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ya]}),n})();class rD{constructor(t,e){const r=e.nativeElement.classList;for(const s of t._columnCssClassName)r.add(s)}}let iD=(()=>{class n extends rD{constructor(e,r){super(e,r)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Lb),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[ya]}),n})(),jj=(()=>{class n extends rD{constructor(e,r){var s;if(super(e,r),1===(null===(s=e._table)||void 0===s?void 0:s._elementRef.nativeElement.nodeType)){const p=e._table._elementRef.nativeElement.getAttribute("role");r.nativeElement.setAttribute("role","grid"===p||"treegrid"===p?"gridcell":"cell")}}}return n.\u0275fac=function(e){return new(e||n)(Xt(Lb),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:[1,"cdk-footer-cell"],features:[ya]}),n})(),sD=(()=>{class n extends rD{constructor(e,r){var s;if(super(e,r),1===(null===(s=e._table)||void 0===s?void 0:s._elementRef.nativeElement.nodeType)){const p=e._table._elementRef.nativeElement.getAttribute("role");r.nativeElement.setAttribute("role","grid"===p||"treegrid"===p?"gridcell":"cell")}}}return n.\u0275fac=function(e){return new(e||n)(Xt(Lb),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[ya]}),n})();class Vj{constructor(){this.tasks=[],this.endTasks=[]}}const oD=new fo("_COALESCED_STYLE_SCHEDULER");let Hj=(()=>{class n{constructor(e){this._ngZone=e,this._currentSchedule=null,this._destroyed=new ie.xQ}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new Vj,this._getScheduleObservable().pipe((0,ed.R)(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const e=this._currentSchedule;this._currentSchedule=new Vj;for(const r of e.tasks)r();for(const r of e.endTasks)r()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?(0,Tm.D)(Promise.resolve(void 0)):this._ngZone.onStable.pipe((0,p1.q)(1))}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),aD=(()=>{class n{constructor(e,r){this.template=e,this._differs=r}ngOnChanges(e){if(!this._columnsDiffer){const r=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(r).create(),this._columnsDiffer.diff(r)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof iw?e.headerCell.template:this instanceof sw?e.footerCell.template:e.cell.template}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm))},n.\u0275dir=Tn({type:n,features:[rr]}),n})();class _ue extends aD{}const wue=nD(_ue);let iw=(()=>{class n extends wue{constructor(e,r,s){super(e,r),this._table=s}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm),Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[ya,rr]}),n})();class xue extends aD{}const Eue=nD(xue);let sw=(()=>{class n extends Eue{constructor(e,r,s){super(e,r),this._table=s}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm),Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[ya,rr]}),n})(),fT=(()=>{class n extends aD{constructor(e,r,s){super(e,r),this._table=s}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm),Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[ya]}),n})(),Ub=(()=>{class n{constructor(e){this._viewContainer=e,n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf))},n.\u0275dir=Tn({type:n,selectors:[["","cdkCellOutlet",""]]}),n.mostRecentCellOutlet=null,n})(),uD=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),lD=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),hT=(()=>{class n{constructor(e){this.templateRef=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["ng-template","cdkNoDataRow",""]]}),n})();const $j=["top","bottom","left","right"];class Tue{constructor(t,e,r,s,p=!0,F=!0,q){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=r,this._coalescedStyleScheduler=s,this._isBrowser=p,this._needsPositionStickyOnElement=F,this._positionListener=q,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(t,e){const r=[];for(const s of t)if(s.nodeType===s.ELEMENT_NODE){r.push(s);for(let p=0;p{for(const s of r)this._removeStickyStyle(s,e)})}updateStickyColumns(t,e,r,s=!0){if(!t.length||!this._isBrowser||!e.some(rt=>rt)&&!r.some(rt=>rt))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const p=t[0],F=p.children.length,q=this._getCellWidths(p,s),te=this._getStickyStartColumnPositions(q,e),fe=this._getStickyEndColumnPositions(q,r),Re=e.lastIndexOf(!0),$e=r.indexOf(!0);this._coalescedStyleScheduler.schedule(()=>{const rt="rtl"===this.direction,ft=rt?"right":"left",Tt=rt?"left":"right";for(const Ft of t)for(let Qt=0;Qte[Qt]?Ft:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===$e?[]:q.slice($e).map((Ft,Qt)=>r[Qt+$e]?Ft:null).reverse()}))})}stickRows(t,e,r){if(!this._isBrowser)return;const s="bottom"===r?t.slice().reverse():t,p="bottom"===r?e.slice().reverse():e,F=[],q=[],te=[];for(let Re=0,$e=0;Re{var Re,$e;for(let rt=0;rt{e.some(s=>!s)?this._removeStickyStyle(r,["bottom"]):this._addStickyStyle(r,"bottom",0,!1)})}_removeStickyStyle(t,e){for(const s of e)t.style[s]="",t.classList.remove(this._borderCellCss[s]);$j.some(s=>-1===e.indexOf(s)&&t.style[s])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,r,s){t.classList.add(this._stickCellCss),s&&t.classList.add(this._borderCellCss[e]),t.style[e]=`${r}px`,t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let r=0;for(const s of $j)t.style[s]&&(r+=e[s]);return r?`${r}`:""}_getCellWidths(t,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;const r=[],s=t.children;for(let p=0;p0;p--)e[p]&&(r[p]=s,s+=t[p]);return r}}const dD=new fo("CDK_SPL");let pT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","rowOutlet",""]]}),n})(),mT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","headerRowOutlet",""]]}),n})(),gT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","footerRowOutlet",""]]}),n})(),yT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","noDataRowOutlet",""]]}),n})(),bT=(()=>{class n{constructor(e,r,s,p,F,q,te,fe,Re,$e,rt){this._differs=e,this._changeDetectorRef=r,this._elementRef=s,this._dir=F,this._platform=te,this._viewRepeater=fe,this._coalescedStyleScheduler=Re,this._viewportRuler=$e,this._stickyPositioningListener=rt,this._onDestroy=new ie.xQ,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new mo,this.viewChange=new xd.X({start:0,end:Number.MAX_VALUE}),p||this._elementRef.nativeElement.setAttribute("role","table"),this._document=q,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=q2(e),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=q2(e),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((e,r)=>this.trackBy?this.trackBy(r.dataIndex,r.data):r),this._viewportRuler.change().pipe((0,ed.R)(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const r=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||r,this._forceRecalculateCellWidths=r,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),oT(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const e=this._dataDiffer.diff(this._renderRows);if(!e)return this._updateNoDataRow(),void this.contentChanged.next();const r=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,r,(s,p,F)=>this._getEmbeddedViewArgs(s.item,F),s=>s.item.data,s=>{1===s.operation&&s.context&&this._renderCellTemplateForItem(s.record.item.rowDef,s.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(s=>{r.get(s.currentIndex).context.$implicit=s.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){const e=this._getRenderedRows(this._headerRowOutlet),s=this._elementRef.nativeElement.querySelector("thead");s&&(s.style.display=e.length?"":"none");const p=this._headerRowDefs.map(F=>F.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,p,"top"),this._headerRowDefs.forEach(F=>F.resetStickyChanged())}updateStickyFooterRowStyles(){const e=this._getRenderedRows(this._footerRowOutlet),s=this._elementRef.nativeElement.querySelector("tfoot");s&&(s.style.display=e.length?"":"none");const p=this._footerRowDefs.map(F=>F.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,p,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,p),this._footerRowDefs.forEach(F=>F.resetStickyChanged())}updateStickyColumnStyles(){const e=this._getRenderedRows(this._headerRowOutlet),r=this._getRenderedRows(this._rowOutlet),s=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...r,...s],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((p,F)=>{this._addStickyColumnStyles([p],this._headerRowDefs[F])}),this._rowDefs.forEach(p=>{const F=[];for(let q=0;q{this._addStickyColumnStyles([p],this._footerRowDefs[F])}),Array.from(this._columnDefsByName.values()).forEach(p=>p.resetStickyChanged())}_getAllRenderRows(){const e=[],r=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let s=0;s{const q=s&&s.has(F)?s.get(F):[];if(q.length){const te=q.shift();return te.dataIndex=r,te}return{data:e,rowDef:F,dataIndex:r}})}_cacheColumnDefs(){this._columnDefsByName.clear(),vT(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(r=>{this._columnDefsByName.has(r.name),this._columnDefsByName.set(r.name,r)})}_cacheRowDefs(){this._headerRowDefs=vT(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=vT(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=vT(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const e=this._rowDefs.filter(r=>!r.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){const e=(F,q)=>F||!!q.getColumnsDiff(),r=this._rowDefs.reduce(e,!1);r&&this._forceRenderDataRows();const s=this._headerRowDefs.reduce(e,!1);s&&this._forceRenderHeaderRows();const p=this._footerRowDefs.reduce(e,!1);return p&&this._forceRenderFooterRows(),r||s||p}_switchDataSource(e){this._data=[],oT(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;oT(this.dataSource)?e=this.dataSource.connect(this):(0,YO.b)(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=(0,yu.of)(this.dataSource)),this._renderChangeSubscription=e.pipe((0,ed.R)(this._onDestroy)).subscribe(r=>{this._data=r||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,r)=>this._renderRow(this._headerRowOutlet,e,r)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,r)=>this._renderRow(this._footerRowOutlet,e,r)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,r){const s=Array.from(r.columns||[]).map(q=>this._columnDefsByName.get(q)),p=s.map(q=>q.sticky),F=s.map(q=>q.stickyEnd);this._stickyStyler.updateStickyColumns(e,p,F,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){const r=[];for(let s=0;s!p.when||p.when(r,e));else{let p=this._rowDefs.find(F=>F.when&&F.when(r,e))||this._defaultRowDef;p&&s.push(p)}return s}_getEmbeddedViewArgs(e,r){return{templateRef:e.rowDef.template,context:{$implicit:e.data},index:r}}_renderRow(e,r,s,p={}){const F=e.viewContainer.createEmbeddedView(r.template,p,s);return this._renderCellTemplateForItem(r,p),F}_renderCellTemplateForItem(e,r){for(let s of this._getCellTemplates(e))Ub.mostRecentCellOutlet&&Ub.mostRecentCellOutlet._viewContainer.createEmbeddedView(s,r);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const e=this._rowOutlet.viewContainer;for(let r=0,s=e.length;r{const s=this._columnDefsByName.get(r);return e.extractCellTemplate(s)}):[]}_applyNativeTableSections(){const e=this._document.createDocumentFragment(),r=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const s of r){const p=this._document.createElement(s.tag);p.setAttribute("role","rowgroup");for(const F of s.outlets)p.appendChild(F.elementRef.nativeElement);e.appendChild(p)}this._elementRef.nativeElement.appendChild(e)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const e=(r,s)=>r||s.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new Tue(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:(0,yu.of)()).pipe((0,ed.R)(this._onDestroy)).subscribe(r=>{this._stickyStyler.direction=r,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(r=>!r._table||r._table===this)}_updateNoDataRow(){const e=this._customNoDataRow||this._noDataRow;if(e){const r=0===this._rowOutlet.viewContainer.length;if(r!==this._isShowingNoDataRow){const s=this._noDataRowOutlet.viewContainer;r?s.createEmbeddedView(e.templateRef):s.clear(),this._isShowingNoDataRow=r}}}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zm),Xt(yf),Xt(wa),Sd("role"),Xt(aT,8),Xt(qa),Xt(J1),Xt(r8),Xt(oD),Xt(Fj),Xt(dD,12))},n.\u0275cmp=bn({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,hT,5),wo(s,Lb,5),wo(s,fT,5),wo(s,iw,5),wo(s,sw,5)),2&e){let p;gs(p=ho())&&(r._noDataRow=p.first),gs(p=ho())&&(r._contentColumnDefs=p),gs(p=ho())&&(r._contentRowDefs=p),gs(p=ho())&&(r._contentHeaderRowDefs=p),gs(p=ho())&&(r._contentFooterRowDefs=p)}},viewQuery:function(e,r){if(1&e&&(Ro(pT,7),Ro(mT,7),Ro(gT,7),Ro(yT,7)),2&e){let s;gs(s=ho())&&(r._rowOutlet=s.first),gs(s=ho())&&(r._headerRowOutlet=s.first),gs(s=ho())&&(r._footerRowOutlet=s.first),gs(s=ho())&&(r._noDataRowOutlet=s.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(e,r){2&e&&ks("cdk-table-fixed-layout",r.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Ya([{provide:R5,useExisting:n},{provide:r8,useClass:Oj},{provide:oD,useClass:Hj},{provide:dD,useValue:null}])],ngContentSelectors:pue,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,r){1&e&&(Pp(hue),ih(0),ih(1,1),R0(2,0),R0(3,1),R0(4,2),R0(5,3))},directives:[mT,pT,yT,gT],styles:[".cdk-table-fixed-layout{table-layout:fixed}\n"],encapsulation:2}),n})();function vT(n,t){return n.concat(Array.from(t))}let Iue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[fue]]}),n})();function _T(n,t){return(n.getAttribute(t)||"").match(/\S+/g)||[]}Y(54395);const Zj="cdk-describedby-message-container",Yj="cdk-describedby-message",wT="cdk-describedby-host";let Fue=0;const Dy=new Map;let qp=null,Lue=(()=>{class n{constructor(e){this._document=e}describe(e,r,s){if(!this._canBeDescribed(e,r))return;const p=hD(r,s);"string"!=typeof r?(Jj(r),Dy.set(p,{messageElement:r,referenceCount:0})):Dy.has(p)||this._createMessageElement(r,s),this._isElementDescribedByMessage(e,p)||this._addMessageReference(e,p)}removeDescription(e,r,s){if(!r||!this._isElementNode(e))return;const p=hD(r,s);if(this._isElementDescribedByMessage(e,p)&&this._removeMessageReference(e,p),"string"==typeof r){const F=Dy.get(p);F&&0===F.referenceCount&&this._deleteMessageElement(p)}qp&&0===qp.childNodes.length&&this._deleteMessagesContainer()}ngOnDestroy(){const e=this._document.querySelectorAll(`[${wT}]`);for(let r=0;r0!=s.indexOf(Yj));e.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(e,r){const s=Dy.get(r);(function(n,t,e){const r=_T(n,t);r.some(s=>s.trim()==e.trim())||(r.push(e.trim()),n.setAttribute(t,r.join(" ")))})(e,"aria-describedby",s.messageElement.id),e.setAttribute(wT,""),s.referenceCount++}_removeMessageReference(e,r){const s=Dy.get(r);s.referenceCount--,function(n,t,e){const s=_T(n,t).filter(p=>p!=e.trim());s.length?n.setAttribute(t,s.join(" ")):n.removeAttribute(t)}(e,"aria-describedby",s.messageElement.id),e.removeAttribute(wT)}_isElementDescribedByMessage(e,r){const s=_T(e,"aria-describedby"),p=Dy.get(r),F=p&&p.messageElement.id;return!!F&&-1!=s.indexOf(F)}_canBeDescribed(e,r){if(!this._isElementNode(e))return!1;if(r&&"object"==typeof r)return!0;const s=null==r?"":`${r}`.trim(),p=e.getAttribute("aria-label");return!(!s||p&&p.trim()===s)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(qa))},token:n,providedIn:"root"}),n})();function hD(n,t){return"string"==typeof n?`${t||""}/${n}`:n}function Jj(n){n.id||(n.id=`${Yj}-${Fue++}`)}"undefined"!=typeof Element&∈const rV=new fo("cdk-input-modality-detector-options"),tce={ignoreKeys:[18,17,224,91,16]},F5=QO({passive:!0,capture:!0});let sV=(()=>{class n{constructor(e,r,s,p){this._platform=e,this._mostRecentTarget=null,this._modality=new xd.X(null),this._lastTouchMs=0,this._onKeydown=F=>{var q,te;(null===(te=null===(q=this._options)||void 0===q?void 0:q.ignoreKeys)||void 0===te?void 0:te.some(fe=>fe===F.keyCode))||(this._modality.next("keyboard"),this._mostRecentTarget=rw(F))},this._onMousedown=F=>{Date.now()-this._lastTouchMs<650||(this._modality.next(function(n){return 0===n.offsetX&&0===n.offsetY}(F)?"keyboard":"mouse"),this._mostRecentTarget=rw(F))},this._onTouchstart=F=>{!function(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}(F)?(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=rw(F)):this._modality.next("keyboard")},this._options=Object.assign(Object.assign({},tce),p),this.modalityDetected=this._modality.pipe((0,PN.T)(1)),this.modalityChanged=this.modalityDetected.pipe((0,f_.x)()),e.isBrowser&&r.runOutsideAngular(()=>{s.addEventListener("keydown",this._onKeydown,F5),s.addEventListener("mousedown",this._onMousedown,F5),s.addEventListener("touchstart",this._onTouchstart,F5)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,F5),document.removeEventListener("mousedown",this._onMousedown,F5),document.removeEventListener("touchstart",this._onTouchstart,F5))}}return n.\u0275fac=function(e){return new(e||n)(Yn(J1),Yn(pa),Yn(qa),Yn(rV,8))},n.\u0275prov=we({factory:function(){return new n(Yn(J1),Yn(pa),Yn(qa),Yn(rV,8))},token:n,providedIn:"root"}),n})();const uV=new fo("cdk-focus-monitor-default-options"),xT=QO({passive:!0,capture:!0});let cV=(()=>{class n{constructor(e,r,s,p,F){this._ngZone=e,this._platform=r,this._inputModalityDetector=s,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new ie.xQ,this._rootNodeFocusAndBlurListener=q=>{const te=rw(q),fe="focus"===q.type?this._onFocus:this._onBlur;for(let Re=te;Re;Re=Re.parentElement)fe.call(this,q,Re)},this._document=p,this._detectionMode=(null==F?void 0:F.detectionMode)||0}monitor(e,r=!1){const s=n8(e);if(!this._platform.isBrowser||1!==s.nodeType)return(0,yu.of)(null);const p=function(n){if(function(){if(null==eD){const n="undefined"!=typeof document?document.head:null;eD=!(!n||!n.createShadowRoot&&!n.attachShadow)}return eD}()){const t=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(s)||this._getDocument(),F=this._elementInfo.get(s);if(F)return r&&(F.checkChildren=!0),F.subject;const q={checkChildren:r,subject:new ie.xQ,rootNode:p};return this._elementInfo.set(s,q),this._registerGlobalListeners(q),q.subject}stopMonitoring(e){const r=n8(e),s=this._elementInfo.get(r);s&&(s.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(s))}focusVia(e,r,s){const p=n8(e);p===this._getDocument().activeElement?this._getClosestElementsInfo(p).forEach(([q,te])=>this._originChanged(q,r,te)):(this._setOrigin(r),"function"==typeof p.focus&&p.focus(s))}ngOnDestroy(){this._elementInfo.forEach((e,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_toggleClass(e,r,s){s?e.classList.add(r):e.classList.remove(r)}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!!(null==e?void 0:e.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(e,r){this._toggleClass(e,"cdk-focused",!!r),this._toggleClass(e,"cdk-touch-focused","touch"===r),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===r),this._toggleClass(e,"cdk-mouse-focused","mouse"===r),this._toggleClass(e,"cdk-program-focused","program"===r)}_setOrigin(e,r=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&r,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,r){const s=this._elementInfo.get(r),p=rw(e);!s||!s.checkChildren&&r!==p||this._originChanged(r,this._getFocusOrigin(p),s)}_onBlur(e,r){const s=this._elementInfo.get(r);!s||s.checkChildren&&e.relatedTarget instanceof Node&&r.contains(e.relatedTarget)||(this._setClasses(r),this._emitOrigin(s.subject,null))}_emitOrigin(e,r){this._ngZone.run(()=>e.next(r))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const r=e.rootNode,s=this._rootNodeFocusListenerCount.get(r)||0;s||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,xT),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,xT)}),this._rootNodeFocusListenerCount.set(r,s+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,ed.R)(this._stopInputModalityDetector)).subscribe(p=>{this._setOrigin(p,!0)}))}_removeGlobalListeners(e){const r=e.rootNode;if(this._rootNodeFocusListenerCount.has(r)){const s=this._rootNodeFocusListenerCount.get(r);s>1?this._rootNodeFocusListenerCount.set(r,s-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,xT),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,xT),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,r,s){this._setClasses(e,r),this._emitOrigin(s.subject,r),this._lastFocusOrigin=r}_getClosestElementsInfo(e){const r=[];return this._elementInfo.forEach((s,p)=>{(p===e||s.checkChildren&&p.contains(e))&&r.push([p,s])}),r}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa),Yn(J1),Yn(sV),Yn(qa,8),Yn(uV,8))},n.\u0275prov=we({factory:function(){return new n(Yn(pa),Yn(J1),Yn(sV),Yn(qa,8),Yn(uV,8))},token:n,providedIn:"root"}),n})();const lV="cdk-high-contrast-black-on-white",dV="cdk-high-contrast-white-on-black",pD="cdk-high-contrast-active";let fV=(()=>{class n{constructor(e,r){this._platform=e,this._document=r}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const r=this._document.defaultView||window,s=r&&r.getComputedStyle?r.getComputedStyle(e):null,p=(s&&s.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(e),p){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const e=this._document.body.classList;e.remove(pD),e.remove(lV),e.remove(dV),this._hasCheckedHighContrastMode=!0;const r=this.getHighContrastMode();1===r?(e.add(pD),e.add(lV)):2===r&&(e.add(pD),e.add(dV))}}}return n.\u0275fac=function(e){return new(e||n)(Yn(J1),Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(J1),Yn(qa))},token:n,providedIn:"root"}),n})();const hV=new Sg("12.2.13");let cce=(()=>{class n{}return n.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",n.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",n.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",n.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",n})(),lce=(()=>{class n{}return n.COMPLEX="375ms",n.ENTERING="225ms",n.EXITING="195ms",n})();const pV=new Sg("12.2.13"),fce=new fo("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});let s8,jb=(()=>{class n{constructor(e,r,s){this._hasDoneGlobalChecks=!1,this._document=s,e._applyBodyHighContrastModeCssClasses(),this._sanityChecks=r,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!(!rC()||"undefined"!=typeof __karma__&&__karma__||"undefined"!=typeof jasmine&&jasmine||"undefined"!=typeof jest&&jest||"undefined"!=typeof Mocha&&Mocha)&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}_checkDoctypeIsDefined(){this._checkIsEnabled("doctype")&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(!this._checkIsEnabled("theme")||!this._document.body||"function"!=typeof getComputedStyle)return;const e=this._document.createElement("div");e.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(e);const r=getComputedStyle(e);r&&"none"!==r.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(e)}_checkCdkVersionMatch(){this._checkIsEnabled("version")&&pV.full!==hV.full&&console.warn("The Angular Material version ("+pV.full+") does not match the Angular CDK version ("+hV.full+").\nPlease ensure the versions of these two packages exactly match.")}}return n.\u0275fac=function(e){return new(e||n)(Yn(fV),Yn(fce,8),Yn(qa))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[uT],uT]}),n})();function mD(n){return class extends n{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=q2(t)}}}function hce(n){return class extends n{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new O.y(e=>{this._isInitialized?this._notifySubscriber(e):this._pendingSubscribers.push(e)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}try{s8="undefined"!=typeof Intl}catch{s8=!1}const jce=[[["caption"]],[["colgroup"],["col"]]],Vce=["caption","colgroup, col"];let cv=(()=>{class n extends bT{constructor(){super(...arguments),this.stickyCssClass="mat-table-sticky",this.needsPositionStickyOnElement=!1}}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275cmp=bn({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],hostVars:2,hostBindings:function(e,r){2&e&&ks("mat-table-fixed-layout",r.fixedLayout)},exportAs:["matTable"],features:[Ya([{provide:r8,useClass:Oj},{provide:bT,useExisting:n},{provide:R5,useExisting:n},{provide:oD,useClass:Hj},{provide:dD,useValue:null}]),ya],ngContentSelectors:Vce,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,r){1&e&&(Pp(jce),ih(0),ih(1,1),R0(2,0),R0(3,1),R0(4,2),R0(5,3))},directives:[mT,pT,yT,gT],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky !important;position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\n'],encapsulation:2}),n})(),Vb=(()=>{class n extends N5{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matCellDef",""]],features:[Ya([{provide:N5,useExisting:n}]),ya]}),n})(),lv=(()=>{class n extends B5{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matHeaderCellDef",""]],features:[Ya([{provide:B5,useExisting:n}]),ya]}),n})(),xV=(()=>{class n extends dT{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matFooterCellDef",""]],features:[Ya([{provide:dT,useExisting:n}]),ya]}),n})(),Hb=(()=>{class n extends Lb{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[Ya([{provide:Lb,useExisting:n},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ya]}),n})(),dv=(()=>{class n extends iD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[ya]}),n})(),EV=(()=>{class n extends jj{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["mat-footer-cell"],["td","mat-footer-cell",""]],hostAttrs:["role","gridcell",1,"mat-footer-cell"],features:[ya]}),n})(),fv=(()=>{class n extends sD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[ya]}),n})(),L5=(()=>{class n extends iw{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[Ya([{provide:iw,useExisting:n}]),ya]}),n})(),hv=(()=>{class n extends fT{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[Ya([{provide:fT,useExisting:n}]),ya]}),n})(),U5=(()=>{class n extends uD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275cmp=bn({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[Ya([{provide:uD,useExisting:n}]),ya],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),pv=(()=>{class n extends lD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275cmp=bn({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[Ya([{provide:lD,useExisting:n}]),ya],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),aw=(()=>{class n extends hT{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["ng-template","matNoDataRow",""]],features:[Ya([{provide:hT,useExisting:n}]),ya]}),n})(),Kce=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[Iue,jb],jb]}),n})();function Yce(n,t){if(1&n&&(Qr(0),kt(1),Wr()),2&n){const e=an(2);dt(1),cu(" ",e.wallet.user.slice(0,6)," ... ",e.wallet.user.slice(38,42)," ")}}function Jce(n,t){if(1&n&&(Qr(0),kt(1),Wr()),2&n){const e=an(2);dt(1),Pr(" ",e.wallet.ens," ")}}function Xce(n,t){if(1&n){const e=Di();Ae(0,"div",1),Ae(1,"div",2),Ae(2,"div",3),Ae(3,"h3"),kt(4," Account "),Ie(),Ae(5,"h2",4),dr("click",function(){return Ur(e),an().activeModal.dismiss()}),Ie(),Ie(),Ae(6,"div",5),Ae(7,"div",6),Ae(8,"p",7),kt(9),Ie(),Ae(10,"button",8),dr("click",function(){return Ur(e),an().disconnectWallet()}),kt(11," Disconnect "),Ie(),Ie(),Ae(12,"div",9),qn(13,"img",10),Ae(14,"h3",7),it(15,Yce,2,2,"ng-container",11),it(16,Jce,2,1,"ng-container",11),Ie(),Ie(),Ae(17,"small",12),Ae(18,"a",13),qn(19,"i",14),kt(20," View on explorer "),Ie(),Ae(21,"p",15),kt(22,"Copy Address"),Ie(),Ie(),Ie(),Ie(),Ie()}if(2&n){const e=an();dt(9),Pr("Connected with ",e.wallet.providerName,""),dt(4),qu("src",e.chain.metadata[e.wallet.chainId].iconPath,Pi),dt(2),Mt("ngIf",!e.wallet.ens),dt(1),Mt("ngIf",e.wallet.ens),dt(2),qu("href",e.explorerURL,Pi),dt(3),Mt("cdkCopyToClipboard",e.wallet.user)}}const GA=class{constructor(t,e,r){yt(this,"activeModal"),yt(this,"chain"),yt(this,"wallet"),yt(this,"explorerURL"),this.activeModal=t,this.chain=e,this.wallet=r}ngOnInit(){this.resetData(),this.loadData()}resetData(){this.explorerURL=""}loadData(){var t=this;return(0,Br.Z)(function*(){!t.wallet.connected||t.setExplorerURL()})()}setExplorerURL(){this.explorerURL=this.chain.metadata[this.wallet.chainId].blockExplorerUrls[0]+"/address/"+this.wallet.user}disconnectWallet(){this.activeModal.dismiss(),this.wallet.disconnect()}};let mp=GA;yt(mp,"\u0275fac",function(e){return new(e||GA)(Xt(Ob),Xt(dc),Xt(Xa))}),yt(mp,"\u0275cmp",bn({type:GA,selectors:[["app-wallet-connect-modal"]],decls:1,vars:1,consts:[["class","wallet-connect ",4,"ngIf"],[1,"wallet-connect"],[1,"wallet-connect__content"],[1,"wallet-connect__header"],["aria-label","Close",1,"btn-close","modal-close",3,"click"],[1,"account-details"],[1,"account-details__header"],[1,"m-0"],["type","button","name","button-disconnect",1,"account-disconnect",3,"click"],[1,"d-flex","align-items-center","justify-content-left","gap-3"],["width","35","height","35","alt","User Icon",1,"",3,"src"],[4,"ngIf"],[1,"account-details__footer","gap-3"],["target","_blank",1,"text-decoration-none",3,"href"],[1,"fe","fe-external-link"],[3,"cdkCopyToClipboard"]],template:function(e,r){1&e&&it(0,Xce,23,6,"div",0),2&e&&Mt("ngIf",r.wallet.address)},directives:[La,CN],styles:[".account-details[_ngcontent-%COMP%]{margin-top:1rem;border:1px double #3a3a3a;border-radius:1rem;padding:1rem;color:gray}.account-details__header[_ngcontent-%COMP%]{margin-bottom:15px;display:flex;align-items:center;justify-content:space-between;color:gray}.account-details__footer[_ngcontent-%COMP%]{margin-top:1rem;display:flex;align-items:center;justify-content:left}.account-details__footer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;cursor:pointer}.account-disconnect[_ngcontent-%COMP%]{border:1px double #3a3a3a;border-radius:1rem;background-color:transparent;padding:2px 10px;color:gray}.account-disconnect[_ngcontent-%COMP%]:hover{border-color:#06e7cc}.wallet-connect[_ngcontent-%COMP%]{border-radius:1rem}.wallet-connect__content[_ngcontent-%COMP%]{padding:20px}.wallet-connect__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;color:gray}.wallet-connect__header[_ngcontent-%COMP%] .btn-close[_ngcontent-%COMP%]{color:gray;cursor:pointer}.wallet-connect__body[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;height:auto}.wallet-connect__provider[_ngcontent-%COMP%]{height:50px;width:calc(50% - 10px);border:1px double #3a3a3a;border-radius:1rem;margin:10px 0;display:flex;align-items:center;justify-content:space-between;padding:0 1rem;color:gray;background-color:transparent;cursor:pointer}.wallet-connect__provider[_ngcontent-%COMP%]:hover{border-color:#06e7cc}.wallet-connect__provider[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:35px;width:35px}.wallet-connect__footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-top:10px}.wallet-connect__footer[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}"]}));const TV={[qi.ETHEREUM]:{},[qi.GOERLI]:{},[qi.OPTIMISM]:{},[qi.POLYGON]:{},[qi.ARBITRUM]:{}},ile=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],sle=[{name:"name",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],ole=[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}],ale=[{name:"holder",type:"address"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"expiry",type:"uint256"},{name:"allowed",type:"bool"}],d9=class{constructor(t,e,r,s){yt(this,"chain"),yt(this,"contract"),yt(this,"util"),yt(this,"wallet"),yt(this,"signature"),this.chain=t,this.contract=e,this.util=r,this.wallet=s}permit(t,e,r,s){var p=this;return(0,Br.Z)(function*(){if(p.wallet.usingGnosisSafe)throw"permit.service: Signing with Gnosis Safe not supported.";if(!t.symbol.includes("\u221e")&&!TV[p.wallet.chainId][t.symbol])throw`permit.service: ${t.symbol} not supported.`;const F=p.wallet.web3,q=p.util.processWeb3Number(r.times(t.precision)),fe=yield p.contract.getERC20(t.address,F).methods.nonces(p.wallet.user).call(),Re=TV[p.wallet.chainId][t.symbol],$e=Re?Re.type:1,rt=Re?Re.version:"1",ft=p.getDomain(t,rt),Tt=p.getMessage(e,q,fe,s,$e),Ft=JSON.stringify({domain:ft,message:Tt,primaryType:"Permit",types:{EIP712Domain:rt?ile:sle,Permit:2==$e?ale:ole}}),[Qt,wn,An]=yield p.wallet.sign(Ft),gr={v:Qt,r:wn,s:An,owner:p.wallet.user,spender:e,tokenAddress:t.address,nonce:fe,deadline:s,...1==$e&&{amount:q},...2==$e&&{allowed:!0}};return p.signature=gr,gr})()}getDomain(t,e){return{name:t.name,...e&&{version:e},chainId:this.wallet.chainId.toString(),verifyingContract:t.address}}getMessage(t,e,r,s,p){return{...1==p&&{owner:this.wallet.user},...2==p&&{holder:this.wallet.user},spender:t,...1==p&&{value:e},nonce:r,...1==p&&{deadline:s},...2==p&&{expiry:s},...2==p&&{allowed:!0}}}isSignatureValid(t,e,r,s){const p=this.util.processWeb3Number(s.times(e.precision));return t&&t.owner===this.wallet.user&&t.spender===r&&t.tokenAddress===e.address&&t.deadline>=Math.floor(Date.now()/1e3)&&(t.allowed||t.amount===p)}};let o8=d9;yt(o8,"\u0275fac",function(e){return new(e||d9)(Yn(dc),Yn(ud),Yn($c),Yn(Xa))}),yt(o8,"\u0275prov",we({token:d9,factory:d9.\u0275fac,providedIn:"root"}));const f9=class{constructor(t){yt(this,"permit_service"),this.permit_service=t}canApprove(t,e){return t.gt(0)&&e.gte(t)}isTokenApproved(t,e){return t&&e&&e.gte(t)}isTokenPermitted(t,e,r,s){return this.permit_service.isSignatureValid(t,e,r,s)}};let jg=f9;yt(jg,"\u0275fac",function(e){return new(e||f9)(Yn(o8))}),yt(jg,"\u0275prov",we({token:f9,factory:f9.\u0275fac,providedIn:"root"}));const h9=class{constructor(t,e,r,s){yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"MULTIPLIER",new sn.Z(2)),yt(this,"gasTokenPrice",new sn.Z(0)),this.contract=t,this.store=e,this.util=r,this.wallet=s,this.store.tokens_observable.subscribe(p=>{const F=p[this.util.id(Q6[this.wallet.chainId],this.wallet.chainId)];this.gasTokenPrice=F?F.price:new sn.Z(0)})}shouldCompound(t,e,r){var s=this;return(0,Br.Z)(function*(){if(e.totalSupply.eq(0))return!1;const p=s.wallet.httpsWeb3(),F=s.contract.getBunniHub(p),q={pool:t.address,tickLower:e.tickLower,tickUpper:e.tickUpper},te=F.methods.compound(q),fe=yield s.wallet.estimateGas(te,0,()=>{}),Re=parseInt(yield p.eth.getGasPrice())/1e18,$e=s.gasTokenPrice.times(fe).times(Re),rt=yield F.methods.compound(q).call().catch(An=>null);if(!rt)return!1;const ft=new sn.Z(rt.addedLiquidity),Tt=new sn.Z(rt.amount0).div(t.token0.precision),Ft=new sn.Z(rt.amount1).div(t.token1.precision),Qt=Tt.times(t.token0.price).plus(Ft.times(t.token1.price)),wn=Qt.times(r).div(e.totalSupply);return!!(ft.gt(0)&&t.token0.price.eq(0)&&t.token1.price.eq(0)||r.eq(0)&&Qt.gt($e.times(s.MULTIPLIER)))||!(!r.gt(0)||!wn.gt($e.times(s.MULTIPLIER)))})()}};let j5=h9;yt(j5,"\u0275fac",function(e){return new(e||h9)(Yn(ud),Yn(el),Yn($c),Yn(Xa))}),yt(j5,"\u0275prov",we({token:h9,factory:h9.\u0275fac,providedIn:"root"}));const p9=class{constructor(t,e,r){yt(this,"chain"),yt(this,"util"),yt(this,"wallet"),this.chain=t,this.util=e,this.wallet=r}quote_0x(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){const q={sellToken:t.address,buyToken:e.address,sellAmount:F.util.processWeb3Number(r.times(t.precision)),slippagePercentage:s/1e4},te=Y(59009),fe=F.chain.isTestnet(p)?{}:{"0x-api-key":"eae5202f-33b0-4a88-98f3-4232035abbe1"},Re=yield fetch(`${Hre[p]}/swap/v1/quote?${te.stringify(q)}`,{headers:fe}),$e=yield Re.json();return Re.ok?{tokenAmountIn:r,tokenAmountOut:r.times($e.price),minAmountOut:r.times($e.guaranteedPrice),uniswapV3Route:!!$e.sources.find(rt=>"Uniswap_V3"===rt.name&&new sn.Z(rt.proportion).gt(0)),data:$e.data}:(F.wallet.openErrorModal(new Error(`0x API: ${$e.message}`)),null)})()}quote_1inch(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){const q={src:t.address,dst:e.address,amount:F.util.processWeb3Number(r.times(t.precision)),from:F.wallet.user,slippage:s/1e4,disableEstimate:!0,allowPartialFill:!1,includeProtocols:!0},te=Y(59009),Re=yield fetch(`/api/swap/v5.2/${p}/swap?${te.stringify(q)}`,{headers:{Authorization:"Bearer ",accept:"application/json"}}),$e=yield Re.json();return Re.ok?{tokenAmountIn:r,tokenAmountOut:new sn.Z($e.toAmount).div(e.precision),minAmountOut:new sn.Z($e.toAmount).div(e.precision),uniswapV3Route:!!$e.protocols.find(rt=>"UNISWAP_V3"===rt[0][0].name&&new sn.Z(rt[0][0].part).gt(0)),data:$e.tx.data}:(F.wallet.openErrorModal(new Error(`1inch API: ${$e.message}`)),null)})()}};let TT=p9;function ule(n,t){1&n&&(Ae(0,"p",19),kt(1," No results found "),Ie())}function cle(n,t){1&n&&qn(0,"th",20)}yt(TT,"\u0275fac",function(e){return new(e||p9)(Yn(dc),Yn($c),Yn(Xa))}),yt(TT,"\u0275prov",we({token:p9,factory:p9.\u0275fac,providedIn:"root"}));const lle=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function dle(n,t){if(1&n&&(Ae(0,"td"),Ae(1,"div",21),Ae(2,"div",22),qn(3,"img",23),Ie(),Ae(4,"div",24),Ae(5,"h4",25),kt(6),Ie(),Ae(7,"small",26),kt(8),Ae(9,"a",27),dr("click",function(r){return r.stopPropagation()}),Ie(),Ie(),Ie(),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(3),qu("src",e.iconPath,Pi),_l("alt","",e.symbol," Icon"),Mt("ngClass",vc(9,lle,e.symbol.includes("PYT"),e.symbol.includes("NYT"))),dt(3),Pr(" ",e.symbol," "),dt(2),Lc(" ",e.name," (",e.address.slice(0,5),"...",e.address.slice(38,42),") "),dt(1),V1("href","",r.chain.metadata[r.wallet.chainId].blockExplorerUrls[0],"/address/",e.address,"",Pi)}}function fle(n,t){1&n&&qn(0,"td",28)}function hle(n,t){if(1&n&&(Ae(0,"small",26),kt(1),Ie()),2&n){const e=an().$implicit;dt(1),Pr(" $",e.userBalance.times(e.price).toFormat(2)," ")}}function ple(n,t){if(1&n&&(Ae(0,"td",29),Ae(1,"div",30),Ae(2,"h4",25),kt(3),Ie(),it(4,hle,2,1,"small",31),Ie(),Ie()),2&n){const e=t.$implicit;dt(3),Pr(" ",e.userBalance.toFormat(4)," "),dt(1),Mt("ngIf",!0)}}function mle(n,t){1&n&&qn(0,"td",28)}function gle(n,t){if(1&n){const e=Di();Ae(0,"tr",32),dr("click",function(){const p=Ur(e).$implicit,F=an();return F.canSelect(p)&&F.selectToken(p)}),Ie()}if(2&n){const e=t.$implicit;Mt("ngClass",an().canSelect(e)?"token-select":"token-select__selected")}}const yle=function(){return["token","balance"]},zA=class{constructor(t,e,r,s,p,F){yt(this,"activeModal"),yt(this,"chain"),yt(this,"store"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),yt(this,"tokenA"),yt(this,"tokenB"),yt(this,"allowedTokens"),yt(this,"hiddenTokens"),yt(this,"selectTokenEvent",new mo),yt(this,"tokens",[]),yt(this,"filteredTokens",[]),this.activeModal=t,this.chain=e,this.store=r,this.token=s,this.util=p,this.wallet=F}ngOnInit(){this.store.tokens_observable.subscribe(t=>{let e=Object.values(t).filter(r=>(!this.allowedTokens||this.allowedTokens.find(s=>s.address===r.address))&&(!this.hiddenTokens||!this.hiddenTokens.find(s=>s.address===r.address))&&r.address!==Am[this.wallet.chainId]&&r.address!==J6[this.wallet.chainId]&&r.chainId===this.wallet.chainId);e=this.util.sortByProp(e,"symbol",!0),e=this.util.sortByProp(e,"userBalance",!1),e=this.util.sortByProp(e,"userBalanceUSD",!1),this.tokens=e,this.filteredTokens=e})}selectToken(t){var e=this;return(0,Br.Z)(function*(){e.selectTokenEvent.emit(t),e.activeModal.dismiss()})()}canSelect(t){return!(this.tokenA&&t.address===this.tokenA.address||this.tokenB&&t.address===this.tokenB.address)}filterTokens(t){var e=this;return(0,Br.Z)(function*(){if(t){const r=t.toLowerCase().trim().split(" "),s=e.tokens.filter(p=>{for(let F of r)if(!p.name.toLowerCase().match(F)&&!p.symbol.toLowerCase().match(F)&&!p.address.toLowerCase().match(F))return!1;return!0});if(0===s.length&&1===r.length&&e.util.validateAddress(r[0],e.wallet.chainId)){const p=e.util.checksumAddress(r[0]),F=yield e.token.fetchToken(p.toLowerCase(),e.wallet.chainId);e.tokens.push(F),s.push(F)}e.filteredTokens=s}else e.filteredTokens=e.tokens})()}};let uw=zA;yt(uw,"\u0275fac",function(e){return new(e||zA)(Xt(Ob),Xt(dc),Xt(el),Xt(uv),Xt($c),Xt(Xa))}),yt(uw,"\u0275cmp",bn({type:zA,selectors:[["app-token-select-modal"]],inputs:{tokenA:"tokenA",tokenB:"tokenB",allowedTokens:"allowedTokens",hiddenTokens:"hiddenTokens"},outputs:{selectTokenEvent:"selectTokenEvent"},decls:23,vars:4,consts:[[1,"modal-card","card"],[1,"card-header","border-bottom","border-dark"],[1,"input-group","input-group-flush","input-group-merge","input-group-reverse"],["type","search","placeholder","Search by name, symbol or address",1,"form-control","list-search",3,"input"],[1,"input-group-text"],[1,"fe","fe-search"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"card-body","p-0"],["class","text-center py-4 fw-bold mb-0",4,"ngIf"],[1,"mb-0"],["mat-table","",1,"table","table-sm","table-hover","card-table",3,"dataSource"],["mat-header-cell","",4,"matHeaderCellDef"],[1,"list"],["matColumnDef","token"],[4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],["matColumnDef","balance"],["class","text-end",4,"matCellDef"],["mat-row","",3,"ngClass","click",4,"matRowDef","matRowDefColumns"],[1,"text-center","py-4","fw-bold","mb-0"],["mat-header-cell",""],[1,"d-flex","align-items-center"],[1,"avatar"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","me-3",3,"src","alt","ngClass"],[1,"ms-3"],[1,"fw-normal","mb-1"],[1,"text-muted"],["target","_blank",1,"fe","fe-external-link","text-muted",3,"href","click"],["mat-footer-cell",""],[1,"text-end"],[1,""],["class","text-muted",4,"ngIf"],["mat-row","",3,"ngClass","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"form"),Ae(3,"div",2),Ae(4,"input",3),dr("input",function(p){return r.filterTokens(p.target.value)}),Ie(),Ae(5,"div",4),qn(6,"span",5),Ie(),Ie(),Ie(),Ae(7,"button",6),dr("click",function(){return r.activeModal.dismiss()}),Ie(),Ie(),Ae(8,"div",7),it(9,ule,2,0,"p",8),Ae(10,"div",9),Ae(11,"table",10),Ae(12,"thead"),Ae(13,"tr"),it(14,cle,1,0,"th",11),Ie(),Ie(),Ae(15,"tbody",12),Qr(16,13),it(17,dle,10,12,"td",14),it(18,fle,1,0,"td",15),Wr(),Qr(19,16),it(20,ple,5,2,"td",17),it(21,mle,1,0,"td",15),Wr(),it(22,gle,1,1,"tr",18),Ie(),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(9),Mt("ngIf",0===r.filteredTokens.length),dt(2),Mt("dataSource",r.filteredTokens),dt(11),Mt("matRowDefColumns",sf(3,yle)))},directives:[La,cv,lv,Hb,Vb,xV,hv,dv,dh,EV,pv],styles:[""]}));const ble=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function vle(n,t){if(1&n&&(Qr(0),Ae(1,"div",17),qn(2,"img",18),Ie(),Ae(3,"h2",19),kt(4),Ie(),Wr()),2&n){const e=an(3);dt(2),qu("src",e.token.iconPath,Pi),_l("alt","",e.token.symbol," Icon"),Mt("ngClass",vc(4,ble,e.token.symbol.includes("PYT"),e.token.symbol.includes("NYT"))),dt(2),Pr(" ",e.token.symbol," ")}}function _le(n,t){1&n&&(Ae(0,"h2",19),kt(1,"Select Token"),Ie())}function wle(n,t){1&n&&qn(0,"span",20)}function xle(n,t){1&n&&(Ae(0,"small",21),kt(1," \xa0 "),Ie())}function Ele(n,t){if(1&n&&(Ae(0,"small",22),kt(1),Ie()),2&n){const e=an(3);dt(1),Pr(" $",e.amount.times(e.token.price).toFormat(2)," ")}}function Tle(n,t){1&n&&(Qr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),Wr())}function Ale(n,t){if(1&n){const e=Di();Ae(0,"small",25),dr("click",function(){Ur(e);const s=an(4);return s.setAmount(s.token.userBalance)}),kt(1," Max "),Ie()}}function Ile(n,t){if(1&n&&(Qr(0),Ae(1,"small",23),kt(2),Ie(),it(3,Ale,2,0,"small",24),Wr()),2&n){const e=an(3);dt(2),Pr("Balance: ",e.token.userBalance.toFormat(4),""),dt(1),Mt("ngIf",e.token.userBalance.gt(0))}}function Sle(n,t){if(1&n&&(Ae(0,"div",26),Ae(1,"small",27),kt(2),Ie(),Ie()),2&n){const e=an(3);dt(2),bc(e.errorMessage())}}const kle=function(n){return{clickable:n}};function Cle(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",5),Ae(2,"div",6),Ae(3,"input",7),dr("input",function(s){return Ur(e),an(2).setAmount(s.target.value)}),Ie(),Ie(),Ae(4,"div",8),dr("click",function(){return Ur(e),an(2).openTokenSelectModal()}),it(5,vle,5,7,"ng-container",4),it(6,_le,2,0,"h2",9),it(7,wle,1,0,"span",10),Ie(),Ie(),Ae(8,"div",11),Ae(9,"div",12),it(10,xle,2,0,"small",13),it(11,Ele,2,1,"small",14),Ie(),Ae(12,"div",15),it(13,Tle,3,0,"ng-container",4),it(14,Ile,4,2,"ng-container",4),Ie(),Ie(),it(15,Sle,3,1,"div",16),Wr()}if(2&n){const e=an(2);dt(3),Mt("value",null==e.amount?null:e.amount.toFixed()),dt(1),Mt("ngClass",Ic(10,kle,!e.disableSelect)),dt(1),Mt("ngIf",e.token),dt(1),Mt("ngIf",!e.token),dt(1),Mt("ngIf",!e.disableSelect),dt(3),Mt("ngIf",!(e.amount&&e.token&&e.amount.gt(0)&&e.token.price.gt(0))),dt(1),Mt("ngIf",e.amount&&e.token&&e.amount.gt(0)&&e.token.price.gt(0)),dt(2),Mt("ngIf",!e.wallet.connected||!e.token),dt(1),Mt("ngIf",e.wallet.connected&&e.token),dt(1),Mt("ngIf",e.error())}}function Mle(n,t){1&n&&(Qr(0),Ae(1,"div",28),qn(2,"h1",29),Ie(),Ae(3,"small",28),kt(4," The market price is outside the specified range. Single-asset deposit only. "),Ie(),Wr())}const Ole=function(n){return{"border border-danger":n}};function Dle(n,t){if(1&n&&(Ae(0,"div",2),Ae(1,"div",3),it(2,Cle,16,12,"ng-container",4),it(3,Mle,5,0,"ng-container",4),Ie(),Ie()),2&n){const e=an();Mt("ngClass",Ic(3,Ole,e.error())),dt(2),Mt("ngIf",!e.rangeError),dt(1),Mt("ngIf",e.rangeError)}}function Ple(n,t){1&n&&(Ae(0,"div",12),Ae(1,"h1",30),qn(2,"span",31),Ie(),Ie())}const qA=class{constructor(t,e){yt(this,"modalService"),yt(this,"wallet"),yt(this,"token"),yt(this,"amount",new sn.Z(0)),yt(this,"allowedTokens"),yt(this,"restrictedToken"),yt(this,"disableSelect"),yt(this,"rangeError"),yt(this,"tokenChange",new mo),yt(this,"amountChange",new mo),this.modalService=t,this.wallet=e}ngOnInit(){}error(){return this.token&&this.amount.gt(this.token.userBalance)}errorMessage(){return this.token&&this.amount.gt(this.token.userBalance)?"Amount exceeds wallet balance":null}setAmount(t){this.amount=new sn.Z(t),this.amount.isNaN()&&(this.amount=new sn.Z(0)),this.amountChange.emit(this.amount)}openTokenSelectModal(){if(!this.disableSelect){const t=this.modalService.open(uw,{windowClass:"windowed",centered:!0,size:"md"});t.componentInstance.tokenA=this.token,t.componentInstance.tokenB=this.restrictedToken,t.componentInstance.allowedTokens=this.allowedTokens,t.componentInstance.selectTokenEvent.subscribe(e=>{this.token=e,this.tokenChange.emit(this.token)})}}};let cw=qA;function Rle(n,t){1&n&&(Ae(0,"small",16),kt(1," \xa0 "),Ie())}function Nle(n,t){if(1&n&&(Ae(0,"small",17),kt(1),Ie()),2&n){const e=an(2);dt(1),Pr(" $",e.amount.times(e.token.price).toFormat(2)," ")}}function Ble(n,t){1&n&&(Qr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),Wr())}function Fle(n,t){if(1&n&&(Qr(0),Ae(1,"small",18),kt(2),Ie(),Wr()),2&n){const e=an(2);dt(2),Pr("Balance: ",e.token.userBalance.toFormat(4),"")}}yt(cw,"\u0275fac",function(e){return new(e||qA)(Xt(Nf),Xt(Xa))}),yt(cw,"\u0275cmp",bn({type:qA,selectors:[["app-token-select-input-panel"]],inputs:{token:"token",amount:"amount",allowedTokens:"allowedTokens",restrictedToken:"restrictedToken",disableSelect:"disableSelect",rangeError:"rangeError"},outputs:{tokenChange:"tokenChange",amountChange:"amountChange"},decls:2,vars:2,consts:[["class","card card-inner-shadow mb-0",3,"ngClass",4,"ngIf"],["class","",4,"ngIf"],[1,"card","card-inner-shadow","mb-0",3,"ngClass"],[1,"card-body","p-3"],[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"col","me-4"],["type","text","name","poolTokenAmount","id","poolTokenAmount","aria-describedby","helpId","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-lg","text-start","p-0","text-truncate","w-100",3,"value","input"],[1,"col-auto","d-flex","align-items-center","justify-content-between","bg-gray-200","rounded-1","p-2",3,"ngClass","click"],["class","mx-2 my-0 fw-normal",4,"ngIf"],["class","m-0 fw-bold fe fe-chevron-down",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between"],[1,""],["class","col-auto",4,"ngIf"],["class","col-auto text-white",4,"ngIf"],[1,"col","d-flex","align-items-center","justify-content-end"],["class","d-flex align-items-center justify-content-start",4,"ngIf"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","position-absolute",3,"src","alt","ngClass"],[1,"mx-2","my-0","fw-normal"],[1,"m-0","fw-bold","fe","fe-chevron-down"],[1,"col-auto"],[1,"col-auto","text-white"],[1,"text-white"],["class","bg-white rounded-pill ms-2 px-2 text-dark fw-bold clickable",3,"click",4,"ngIf"],[1,"bg-white","rounded-pill","ms-2","px-2","text-dark","fw-bold","clickable",3,"click"],[1,"d-flex","align-items-center","justify-content-start"],[1,"text-danger"],[1,"d-flex","align-items-center","justify-content-center"],[1,"fe","fe-lock","mb-2"],[1,"placeholder-wave","py-0","m-0",2,"height","90.5px"],[1,"placeholder","w-100","h-100","placeholder-lg","border","rounded-1","text-transparent","bg-gray-400","rounded-1"]],template:function(e,r){1&e&&(it(0,Dle,4,5,"div",0),it(1,Ple,3,0,"div",1)),2&e&&(Mt("ngIf",!r.disableSelect||r.token),dt(1),Mt("ngIf",r.disableSelect&&!r.token))},directives:[La,dh],styles:[""]}));const Lle=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function Ule(n,t){if(1&n&&(Ae(0,"div",2),Ae(1,"div",3),Ae(2,"div",4),Ae(3,"div",5),kt(4),Ie(),Ae(5,"div",6),Ae(6,"div",7),qn(7,"img",8),Ie(),Ae(8,"h2",9),kt(9),Ie(),Ie(),Ie(),Ae(10,"div",10),Ae(11,"div",11),it(12,Rle,2,0,"small",12),it(13,Nle,2,1,"small",13),Ie(),Ae(14,"div",14),it(15,Ble,3,0,"ng-container",15),it(16,Fle,3,1,"ng-container",15),Ie(),Ie(),Ie(),Ie()),2&n){const e=an();dt(4),Pr(" ",e.amount?e.amount.dp(e.token.decimals).toPrecision():0," "),dt(3),qu("src",e.token.iconPath,Pi),_l("alt","",e.token.symbol," Icon"),Mt("ngClass",vc(9,Lle,e.token.symbol.includes("PYT"),e.token.symbol.includes("NYT"))),dt(2),Pr(" ",e.token.symbol," "),dt(3),Mt("ngIf",!e.amount||!e.amount.gt(0)||!e.token.price.gt(0)),dt(1),Mt("ngIf",e.amount&&e.amount.gt(0)&&e.token.price.gt(0)),dt(2),Mt("ngIf",!e.wallet.connected),dt(1),Mt("ngIf",e.wallet.connected)}}function jle(n,t){1&n&&(Ae(0,"div",11),Ae(1,"h1",19),qn(2,"span",20),Ie(),Ie())}const KA=class{constructor(t){yt(this,"wallet"),yt(this,"token"),yt(this,"amount"),this.wallet=t}ngOnInit(){}};let o2=KA;function Vle(n,t){if(1&n){const e=Di();Ae(0,"button",2),dr("click",function(){return Ur(e),an().approve()}),kt(1),Ie()}if(2&n){const e=an();Mt("disabled",!e.canApprove()),dt(1),Pr(" Approve ",e.token.symbol," ")}}function Hle(n,t){if(1&n&&(Ae(0,"button",3),kt(1),Ie()),2&n){const e=an();Mt("disabled",!0),dt(1),Pr(" ",e.token.symbol," Approved ")}}yt(o2,"\u0275fac",function(e){return new(e||KA)(Xt(Xa))}),yt(o2,"\u0275cmp",bn({type:KA,selectors:[["app-token-output-panel"]],inputs:{token:"token",amount:"amount"},decls:2,vars:2,consts:[["class","card card-inner-shadow",4,"ngIf"],["class","",4,"ngIf"],[1,"card","card-inner-shadow"],[1,"card-body","p-3"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"col","me-4","form-control","form-control-flush","form-control-lg","p-0","text-truncate"],[1,"col-auto","d-flex","align-items-center","justify-content-between","bg-gray-200","rounded-1","p-2"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","position-absolute",3,"src","alt","ngClass"],[1,"mx-2","my-0","fw-normal"],[1,"d-flex","align-items-center","justify-content-between"],[1,""],["class","col-auto",4,"ngIf"],["class","col-auto text-white",4,"ngIf"],[1,"col","d-flex","align-items-center","justify-content-end","me-1"],[4,"ngIf"],[1,"col-auto"],[1,"col-auto","text-white"],[1,"text-white"],[1,"placeholder-wave","py-0","m-0",2,"height","90.5px"],[1,"placeholder","w-100","h-100","placeholder-lg","border","rounded-1","text-transparent","bg-gray-400","rounded-1"]],template:function(e,r){1&e&&(it(0,Ule,17,12,"div",0),it(1,jle,3,0,"div",1)),2&e&&(Mt("ngIf",r.token),dt(1),Mt("ngIf",!r.token))},directives:[La,dh],styles:[""]}));const ZA=class{constructor(t,e,r,s,p,F,q){yt(this,"allowance_service"),yt(this,"approval_service"),yt(this,"contract_service"),yt(this,"permit_service"),yt(this,"store_service"),yt(this,"util_service"),yt(this,"wallet_service"),yt(this,"token"),yt(this,"amount"),yt(this,"spender"),yt(this,"deadline"),yt(this,"signature"),yt(this,"spenderAllowance"),yt(this,"allowanceChange",new mo),yt(this,"signatureChange",new mo),this.allowance_service=t,this.approval_service=e,this.contract_service=r,this.permit_service=s,this.store_service=p,this.util_service=F,this.wallet_service=q}ngOnInit(){}approve(){const t=Math.floor(Date.now()/1e3)+this.deadline;this.permit_service.permit(this.token,this.spender,this.amount,t).then(e=>{this.signature=e,this.signatureChange.emit(this.signature)}).catch(e=>{if(4001===e.code)return void this.wallet_service.openErrorModal(e);const s=this.contract_service.getERC20(this.token.address,this.wallet_service.web3);this.wallet_service.approveToken(s,this.spender,this.amount.times(this.token.precision),()=>{},()=>{},p=>{if(this.wallet_service.usingGnosisSafe)this.token.userAllowances[this.spender]=this.amount,this.allowanceChange.emit(this.amount);else{const F=p.events.Approval,q=F&&new sn.Z(F.returnValues[2]).div(this.token.precision);q&&(this.token.userAllowances[this.spender]=q),q&&this.allowanceChange.emit(q)}},()=>{}).catch(p=>{console.error(p),this.wallet_service.openErrorModal(p)})})}approved(){return this.approval_service.isTokenApproved(this.amount,this.spenderAllowance)||this.approval_service.isTokenPermitted(this.signature,this.token,this.spender,this.amount)}canApprove(){return this.approval_service.canApprove(this.amount,this.token.userBalance)&&!this.approved()}};let Py=ZA;yt(Py,"\u0275fac",function(e){return new(e||ZA)(Xt(M5),Xt(jg),Xt(ud),Xt(o8),Xt(el),Xt($c),Xt(Xa))}),yt(Py,"\u0275cmp",bn({type:ZA,selectors:[["app-token-approval-button"]],inputs:{token:"token",amount:"amount",spender:"spender",deadline:"deadline",signature:"signature",spenderAllowance:"spenderAllowance"},outputs:{allowanceChange:"allowanceChange",signatureChange:"signatureChange"},decls:3,vars:2,consts:[["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-lg btn-success fw-bold text-truncate w-100",3,"disabled",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-success","fw-bold","text-truncate","w-100",3,"disabled"]],template:function(e,r){1&e&&(Qr(0),it(1,Vle,2,2,"button",0),it(2,Hle,2,2,"button",1),Wr()),2&e&&(dt(1),Mt("ngIf",!r.approved()),dt(1),Mt("ngIf",r.approved()))},directives:[La],styles:[""]}));const $le=function(n,t,e,r,s){return[n,t,e,r,s]};function Wle(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",6),Ae(2,"app-token-select-input-panel",7),dr("amountChange",function(s){const F=Ur(e).index;return an().setAmount(s,F)})("tokenChange",function(s){const F=Ur(e).index;return an().selectToken(s,F)}),Ie(),Ie(),Wr()}if(2&n){const e=t.$implicit,r=an();dt(1),Mt("ngClass",r.tokens[0].amount.gt(0)&&r.approved()?"mb-2":"mb-3"),dt(1),Mt("token",e)("amount",e.amount)("allowedTokens",function(n,t,e,r,s,p,F,q){const te=oa()+n,fe=Ki(),Re=Ch(fe,te,e,r,s,p);return gf(fe,te+4,F)||Re?D0(fe,te+5,q?t.call(q,e,r,s,p,F):t(e,r,s,p,F)):mm(fe,te+5)}(4,$le,r.pool.token0,r.pool.token1,r.pool.token0===r.store.getWrappedNative(r.pool.chainId)&&r.store.getNative(r.pool.chainId),r.pool.token1===r.store.getWrappedNative(r.pool.chainId)&&r.store.getNative(r.pool.chainId),!!r.vault&&r.vault.underlying))}}function Gle(n,t){if(1&n&&(Qr(0),Ae(1,"div",8),qn(2,"h3",9),Ie(),Ae(3,"div",10),qn(4,"app-token-output-panel",11),Ie(),Wr()),2&n){const e=an();dt(4),Mt("token",e.bunniToken)("amount",e.gaugeAmount)}}function zle(n,t){if(1&n&&(Ae(0,"div",12),Ae(1,"small",13),kt(2," Price impact warning "),Ie(),Ae(3,"small",14),kt(4),Ie(),Ie()),2&n){const e=an();dt(4),Pr(" ",e.getPriceImpact().toFixed(2),"% ")}}function qle(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",19),dr("allowanceChange",function(s){return Ur(e),an(2).setAllowanceOrSignature(s,null)})("signatureChange",function(s){return Ur(e),an(2).setAllowanceOrSignature(null,s)}),Ie()}if(2&n){const e=an(2);Mt("token",e.tokens[0])("amount",e.tokens[0].amount)("spender",e.spender)("deadline",e.deadline)("signature",e.tokens[0].signature)("spenderAllowance",e.tokens[0].userAllowances[e.spender])}}function Kle(n,t){1&n&&qn(0,"div",22)}function Zle(n,t){if(1&n){const e=Di();Ae(0,"button",20),dr("click",function(){return Ur(e),an(2).zapIn(!1,!1,!1)}),it(1,Kle,1,0,"div",21),kt(2),Ie()}if(2&n){const e=an(2);Mt("disabled",!e.canZap()),dt(1),Mt("ngIf",e.loading),dt(1),Pr(" ",e.message()," ")}}function Yle(n,t){if(1&n){const e=Di();Ae(0,"button",23),dr("click",function(){return Ur(e),an(2).zapIn(!1,!1,!0)}),kt(1," Zap In & Stake "),Ie()}2&n&&Mt("disabled",!an(2).canZap())}function Jle(n,t){if(1&n&&(Qr(0),it(1,qle,1,6,"app-token-approval-button",15),Ae(2,"div",16),it(3,Zle,3,3,"button",17),it(4,Yle,2,1,"button",18),Ie(),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.canApprove()&&!e.approved()),dt(2),Mt("ngIf",!e.canApprove()||e.approved()),dt(1),Mt("ngIf",e.canZap()&&e.bunniToken.gauge&&(!e.canApprove()||e.approved()))}}function Xle(n,t){if(1&n){const e=Di();Ae(0,"button",24),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}const YA=class{constructor(t,e,r,s,p,F,q,te,fe,Re,$e,rt){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"compound"),yt(this,"contract"),yt(this,"permit"),yt(this,"store"),yt(this,"swap"),yt(this,"timeless"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),yt(this,"pool"),yt(this,"token0"),yt(this,"token1"),yt(this,"slippage"),yt(this,"deadline"),yt(this,"bunniToken"),yt(this,"zap"),yt(this,"tokens",[]),yt(this,"vault"),yt(this,"spender"),yt(this,"position"),yt(this,"gaugeAmount"),yt(this,"timeout"),yt(this,"loading"),this.modalService=t,this.approval=e,this.chain=r,this.compound=s,this.contract=p,this.permit=F,this.store=q,this.swap=te,this.timeless=fe,this.token=Re,this.util=$e,this.wallet=rt}ngOnInit(){this.reset(!0,!0)}ngOnChanges(t){t.bunniToken&&!t.bunniToken.firstChange&&this.reset(!0,!0)}reset(t,e){t&&this.tokens&&this.tokens.forEach(r=>r.signature=null),e&&(this.setVault(this.token0,this.token1),this.spender=fp[this.wallet.chainId],this.gaugeAmount=new sn.Z(0),this.tokens[0]=this.vault?Object.assign(new yD,this.vault.underlying,{amount:new sn.Z(0),signature:null}):Object.assign(new yD,this.pool.token0))}selectToken(t,e){this.tokens[e]=Object.assign(new yD,t),this.gaugeAmount=new sn.Z(0)}isToken0(t){return t&&t.address===this.pool.token0.address}isToken1(t){return t&&t.address===this.pool.token1.address}isUnderlying(t){return t&&this.vault&&t.address===this.vault.underlying.address}isXpyt(t){return t&&this.vault&&!!this.vault.xpyt.find(e=>e.address===t.address)}setVault(t,e){const r=this.timeless.get(t.address,t.chainId),s=this.timeless.get(e.address,e.chainId);this.vault=r&&s&&r.nyt===s.nyt?r:null}setAmount(t,e){this.tokens[e].amount=t,this.loading=!0,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.gaugeAmount=new sn.Z(0),this.getOutputAmount().then(r=>this.gaugeAmount=r)},500)}setAllowanceOrSignature(t,e){t&&(this.tokens[0].userAllowances[this.spender]=t),e&&(this.tokens[0].signature=e),this.getOutputAmount().then(r=>this.gaugeAmount=r)}getPosition(t,e,r,s,p){const F=r||this.pool.tick,q=this.bunniToken.tickLower,te=this.bunniToken.tickUpper;let fe=null;const Re=ba.getSqrtRatioAtTick(q),$e=ba.getSqrtRatioAtTick(te),rt=er().BigInt(p?p.toNumber():this.pool.liquidity.toNumber()),ft=this.pool.fee,Tt=new zd(this.wallet.chainId,this.pool.token0.address,this.pool.token0.decimals),Ft=new zd(this.wallet.chainId,this.pool.token1.address,this.pool.token1.decimals);let Qt=null;try{fe=er().BigInt(s?s.toNumber():this.pool.sqrtPriceX96.toNumber()),Qt=new Ug(Tt,Ft,ft,fe,rt,F)}catch{fe=ba.getSqrtRatioAtTick(F),Qt=new Ug(Tt,Ft,ft,fe,rt,F)}const wn=Math.pow(2,256)-1,_r=ZO(fe,Re,$e,this.util.processWeb3Number(t?t.times(this.token0.precision):wn),this.util.processWeb3Number(e?e.times(this.token1.precision):wn),!0);return new eT({pool:Qt,liquidity:_r,tickLower:q,tickUpper:te})}binarySearch(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){let Re,te=0,$e=0;for(;te<10;){const ft=$e+1e3-Date.now();ft>0&&(yield new Promise(Ft=>setTimeout(Ft,ft)));const Tt=yield F.swap.quote_0x(F.isToken0(t)?F.pool.token0:F.pool.token1,F.isToken0(t)?F.pool.token1:F.pool.token0,e,F.slippage,F.wallet.chainId);if($e=Date.now(),!Tt.uniswapV3Route){Re=[Tt,F.pool.tick,F.pool.sqrtPriceX96,F.pool.liquidity];break}{F.zap={amount0:null,amount1:null,minAmount0:null,minAmount1:null,tokenIn:F.isToken0(t)?F.pool.token0:F.pool.token1,tokenOut:F.isToken0(t)?F.pool.token1:F.pool.token0,tokenAmountIn:Tt.tokenAmountIn,minAmountOut:Tt.minAmountOut,uniswapV3Route:Tt.uniswapV3Route,swapData:Tt.data};const Ft=yield F.zapIn(!0);if(e.eq(s)||e.eq(p)){Re=[Tt,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity];break}const Qt=F.getPosition(F.isToken0(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,F.isToken1(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity),wn=new sn.Z(F.isToken0(t)?Qt.mintAmounts.amount1.toString():Qt.mintAmounts.amount0.toString()).div(F.isToken0(t)?F.pool.token1.precision:F.pool.token0.precision);if(Ft.swapAmountOut.minus(wn).abs().lt(.001)){Re=[Tt,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity];break}Ft.swapAmountOut.lt(wn)?s=e:Ft.swapAmountOut.gt(wn)&&(p=e),e=s.plus(p).div(2).dp(F.tokens[0].decimals,sn.Z.ROUND_DOWN),Re=[Tt,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity]}te++}return Re})()}sgdWithMomentum(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){let ft,$e=new sn.Z(0),rt=0,Tt=0;for(;rt<20;){const Qt=Tt+1e3-Date.now();Qt>0&&(yield new Promise(An=>setTimeout(An,Qt)));const wn=yield F.swap.quote_0x(F.isToken0(t)?F.pool.token0:F.pool.token1,F.isToken0(t)?F.pool.token1:F.pool.token0,e,F.slippage,F.wallet.chainId);if(Tt=Date.now(),!wn.uniswapV3Route){ft=[wn,F.pool.tick,F.pool.sqrtPriceX96,F.pool.liquidity];break}{F.zap={amount0:null,amount1:null,minAmount0:null,minAmount1:null,tokenIn:F.isToken0(t)?F.pool.token0:F.pool.token1,tokenOut:F.isToken0(t)?F.pool.token1:F.pool.token0,tokenAmountIn:wn.tokenAmountIn,minAmountOut:wn.minAmountOut,uniswapV3Route:wn.uniswapV3Route,swapData:wn.data};const An=yield F.zapIn(!0),gr=F.getPosition(F.isToken0(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,F.isToken1(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,An.tick,An.sqrtPriceX96,An.liquidity),_r=new sn.Z(F.isToken0(t)?gr.mintAmounts.amount1.toString():gr.mintAmounts.amount0.toString()).div(F.isToken0(t)?F.pool.token1.precision:F.pool.token0.precision),pr=An.swapAmountOut.minus(_r);if(pr.abs().div(_r.isZero()?1:_r).lt(.001)){ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity];break}$e=$e.times(.5).minus(pr.times(.03)),(e=e.plus($e)).lt(s)?e=s:e.gt(p)&&(e=p),ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity]}rt++}return ft})()}adagradOptimizer(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){let ft,$e=new sn.Z(0),rt=0,Tt=0;for(;rt<20;){const Qt=Tt+1e3-Date.now();Qt>0&&(yield new Promise(An=>setTimeout(An,Qt)));const wn=yield F.swap.quote_0x(F.isToken0(t)?F.pool.token0:F.pool.token1,F.isToken0(t)?F.pool.token1:F.pool.token0,e,F.slippage,F.wallet.chainId);if(Tt=Date.now(),!wn.uniswapV3Route){ft=[wn,F.pool.tick,F.pool.sqrtPriceX96,F.pool.liquidity];break}{F.zap={amount0:null,amount1:null,minAmount0:null,minAmount1:null,tokenIn:F.isToken0(t)?F.pool.token0:F.pool.token1,tokenOut:F.isToken0(t)?F.pool.token1:F.pool.token0,tokenAmountIn:wn.tokenAmountIn,minAmountOut:wn.minAmountOut,uniswapV3Route:wn.uniswapV3Route,swapData:wn.data};const An=yield F.zapIn(!0),gr=F.getPosition(F.isToken0(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,F.isToken1(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,An.tick,An.sqrtPriceX96,An.liquidity),_r=new sn.Z(F.isToken0(t)?gr.mintAmounts.amount1.toString():gr.mintAmounts.amount0.toString()).div(F.isToken0(t)?F.pool.token1.precision:F.pool.token0.precision),pr=An.swapAmountOut.minus(_r);if(pr.abs().div(_r.isZero()?1:_r).lt(.001)){ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity];break}$e=$e.plus(pr.pow(2));const ti=new sn.Z(.3).div($e.plus(1e-8).sqrt());(e=e.minus(pr.times(ti))).lt(s)?e=s:e.gt(p)&&(e=p),ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity]}rt++}return ft})()}getOutputAmount(){var t=this;return(0,Br.Z)(function*(){if(t.zap=null,t.loading=!0,!t.approved()||!t.tokens.find($e=>$e.amount.gt(0)))return t.loading=!1,new sn.Z(0);let e=t.tokens[0];if(t.token.isNative(t.tokens[0])&&(e=t.store.getWrappedNative(t.pool.chainId)),t.isUnderlying(t.tokens[0])){const $e=t.getPosition(new sn.Z(1),new sn.Z(1)),rt=new sn.Z($e.mintAmounts.amount0.toString()).div(t.pool.token0.precision),ft=new sn.Z($e.mintAmounts.amount1.toString()).div(t.pool.token1.precision);e=rt.lt(ft)?t.pool.token0:t.pool.token1}const r=t.getPosition(t.isToken0(e)?new sn.Z(1):null,t.isToken1(e)?new sn.Z(1):null),s=t.util.sqrtPriceX96ToTokenPrices(t.pool.sqrtPriceX96),p=t.isToken0(e)?s[1].times(t.pool.token0.precision).div(t.pool.token1.precision).dp(t.pool.token1.decimals,sn.Z.ROUND_DOWN):s[0].times(t.pool.token1.precision).div(t.pool.token0.precision).dp(t.pool.token0.decimals,sn.Z.ROUND_DOWN),F=t.isToken0(e)?new sn.Z(r.mintAmounts.amount1.toString()).div(t.pool.token1.precision):new sn.Z(r.mintAmounts.amount0.toString()).div(t.pool.token0.precision);let q=new sn.Z(0),te=new sn.Z(0);if(t.isUnderlying(t.tokens[0])){const $e=t.vault.xpyt.find(rt=>rt.address===t.pool.token0.address||rt.address===t.pool.token1.address);q=t.isXpyt(t.isToken0(e)?t.pool.token0:t.pool.token1)?t.tokens[0].amount.times($e.conversionRate).dp(t.tokens[0].decimals,sn.Z.ROUND_DOWN):t.tokens[0].amount,te=t.isXpyt(t.isToken0(e)?t.pool.token1:t.pool.token0)?t.tokens[0].amount.times($e.conversionRate).dp(t.tokens[0].decimals,sn.Z.ROUND_DOWN):t.tokens[0].amount}const fe=F.times(q.gt(0)?q:t.tokens[0].amount).div(F.plus(p)).dp(e.decimals,sn.Z.ROUND_DOWN);if(fe.gt(0)){const[$e,rt,ft,Tt]=yield t.binarySearch(e,fe,q,fe.div(10),q.gt(0)?q:t.tokens[0].amount),Ft=t.getPosition(t.isToken0(e)?(q.gt(0)?q:t.tokens[0].amount).minus($e.tokenAmountIn):$e.minAmountOut.plus(te),t.isToken0(e)?$e.minAmountOut.plus(te):(q.gt(0)?q:t.tokens[0].amount).minus($e.tokenAmountIn),rt,ft,Tt),Qt=new Y3(t.slippage,1e4);t.zap={amount0:t.isToken0(e)?(q.gt(0)?q:t.tokens[0].amount).minus($e.tokenAmountIn):$e.tokenAmountOut.plus(te).dp(t.pool.token0.decimals,sn.Z.ROUND_DOWN),amount1:t.isToken0(e)?$e.tokenAmountOut.plus(te).dp(t.pool.token1.decimals,sn.Z.ROUND_DOWN):(q.gt(0)?q:t.tokens[0].amount).minus($e.tokenAmountIn),minAmount0:new sn.Z(Ft.mintAmountsWithSlippage(Qt).amount0.toString()).div(t.pool.token0.precision),minAmount1:new sn.Z(Ft.mintAmountsWithSlippage(Qt).amount1.toString()).div(t.pool.token1.precision),tokenIn:t.isToken0(e)?t.pool.token0:t.pool.token1,tokenOut:t.isToken0(e)?t.pool.token1:t.pool.token0,tokenAmountIn:$e.tokenAmountIn,minAmountOut:$e.minAmountOut,uniswapV3Route:$e.uniswapV3Route,swapData:$e.data}}else{const $e=t.getPosition(t.isToken0(e)?q.gt(0)?q:t.tokens[0].amount:null,t.isToken1(e)?q.gt(0)?q:t.tokens[0].amount:null),rt=new Y3(t.slippage,1e4),ft=new sn.Z($e.mintAmountsWithSlippage(rt).amount0.toString()).div(t.pool.token0.precision),Tt=new sn.Z($e.mintAmountsWithSlippage(rt).amount1.toString()).div(t.pool.token1.precision);t.zap={amount0:t.isToken0(e)?q.gt(0)?q:t.tokens[0].amount:new sn.Z(0),amount1:t.isToken1(e)?q.gt(0)?q:t.tokens[0].amount:new sn.Z(0),minAmount0:t.isToken0(e)?ft:new sn.Z(0),minAmount1:t.isToken1(e)?Tt:new sn.Z(0),tokenIn:null,tokenOut:null,tokenAmountIn:new sn.Z(0),minAmountOut:new sn.Z(0),uniswapV3Route:!1,swapData:null}}const Re=yield t.zapIn(!1,!0);return t.loading=!1,Re.outputAmount})()}message(){return this.tokens[0].amount.eq(0)?"Enter an Amount":this.tokens[0].amount.gt(this.tokens[0].userBalance)?`Insufficient ${this.tokens[0].symbol} Balance`:this.loading?"Optimizing Your Zap...":"Zap In"}approved(){const t=this.tokens[0],e=t.amount,r=t.userAllowances[this.spender],s=t.signature;return this.token.isNative(t)||this.approval.isTokenApproved(e,r)||this.approval.isTokenPermitted(s,t,this.spender,e)}canApprove(){return this.tokens[0].amount.gt(0)&&this.tokens[0].userBalance.gte(this.tokens[0].amount)}canZap(){return this.canApprove()&&this.approved()&&this.zap&&!this.loading&&this.gaugeAmount.gt(0)}zapIn(t=!1,e=!1,r=!1){var s=this;return(0,Br.Z)(function*(){let p=[];const F=s.wallet.web3,q=s.contract.getLpZapIn(F,s.wallet.chainId);if(s.permit.isSignatureValid(s.tokens[0].signature,s.tokens[0],fp[s.wallet.chainId],s.tokens[0].amount)){const te=q.methods.selfPermitIfNecessary(s.tokens[0].signature.tokenAddress,s.tokens[0].signature.amount,s.tokens[0].signature.deadline,s.tokens[0].signature.v,s.tokens[0].signature.r,s.tokens[0].signature.s);p=[...p,te.encodeABI()]}if(s.token.isNative(s.tokens[0])){const te=q.methods.wrapEthInput();p=[...p,te.encodeABI()]}if(s.isUnderlying(s.tokens[0])){const te=q.methods.enterWithUnderlying(s.vault.gate,fp[s.wallet.chainId],fp[s.wallet.chainId],s.vault.share.address,s.isXpyt(s.token0)?s.token0.address:s.isXpyt(s.token1)?s.token1.address:Oy,s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)),!1);p=[...p,te.encodeABI()]}if(s.zap.swapData){const te=q.methods.doZeroExSwap(s.zap.tokenIn.address,s.util.processWeb3Number(s.zap.tokenAmountIn.times(s.zap.tokenIn.precision)),s.zap.tokenOut.address,s.util.processWeb3Number(s.zap.minAmountOut.times(s.zap.tokenOut.precision)),fp[s.wallet.chainId],s.token.isNative(s.tokens[0])||s.isUnderlying(s.tokens[0])?fp[s.wallet.chainId]:s.wallet.user,!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])),Math.floor(Date.now()/1e3)+s.deadline,s.zap.swapData);p=[...p,te.encodeABI()]}if(t){const te=q.methods.uniswapV3PoolState(s.pool.address);p=[...p,te.encodeABI()];const fe=yield q.methods.multicall(p).call({from:s.wallet.user,value:s.token.isNative(s.tokens[0])?+s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)):0}),Re=F.eth.abi.decodeParameters(["uint256"],fe[p.length-2]),$e=F.eth.abi.decodeParameters(["uint160","int24","uint128"],fe[p.length-1]);return{swapAmountOut:new sn.Z(Re[0]).div(s.zap.tokenOut.precision),sqrtPriceX96:new sn.Z($e[0]),tick:parseInt($e[1]),liquidity:new sn.Z($e[2])}}{const fe={key:{pool:s.pool.address,tickLower:s.bunniToken.tickLower,tickUpper:s.bunniToken.tickUpper},amount0Desired:s.util.processWeb3Number(s.zap.amount0.times(s.pool.token0.precision)),amount1Desired:s.util.processWeb3Number(s.zap.amount1.times(s.pool.token1.precision)),amount0Min:s.util.processWeb3Number(s.zap.minAmount0.times(s.pool.token0.precision)),amount1Min:s.util.processWeb3Number(s.zap.minAmount1.times(s.pool.token1.precision)),deadline:Math.floor(Date.now()/1e3)+s.deadline,recipient:s.wallet.user},Re=r?q.methods.zapIn(fe,s.bunniToken.gauge.address,s.pool.token0.address,s.pool.token1.address,s.wallet.user,e?"0":s.util.processWeb3Number(s.gaugeAmount.times(1e18).times(.99)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken0(s.zap.tokenOut)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken1(s.zap.tokenOut)),yield s.compound.shouldCompound(s.pool,s.bunniToken,new sn.Z(0))):q.methods.zapInNoStake(fe,s.pool.token0.address,s.pool.token1.address,s.wallet.user,e?"0":s.util.processWeb3Number(s.gaugeAmount.times(1e18).times(.99)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken0(s.zap.tokenOut)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken1(s.zap.tokenOut)),yield s.compound.shouldCompound(s.pool,s.bunniToken,new sn.Z(0)));if(p=[...p,Re.encodeABI()],e){const rt=yield q.methods.multicall(p).call({from:s.wallet.user,value:s.token.isNative(s.tokens[0])?+s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)):0}).catch(ft=>{s.wallet.openErrorModal(ft),console.error(ft)});return{outputAmount:rt?new sn.Z(F.eth.abi.decodeParameters(["uint256","uint128","uint256","uint256"],rt[p.length-1])[0]).div(1e18):new sn.Z(0)}}const $e=q.methods.multicall(p);s.wallet.sendTx($e,()=>{},()=>{},rt=>{let[ft,Tt]=[[],[]];ft.push("userBalance")&&Tt.push(s.tokens[0].userBalance.minus(s.tokens[0].amount)),s.store.updateToken(s.tokens[0].id,ft,Tt,!0),s.zap=null,s.position=null,s.gaugeAmount=new sn.Z(0),s.tokens.forEach(Ft=>{Ft.amount=new sn.Z(0),Ft.signature=null});try{const Ft=F.eth.abi.encodeEventSignature(s.contract.getABI("BunniHub").find(Yi=>"Deposit"===Yi.name&&"event"===Yi.type)),Qt=Ft&&Object.values(rt.events).find(Yi=>Yi.raw.topics[0]===Ft),wn=Qt&&F.eth.abi.decodeParameters(["uint128","uint256","uint256","uint256"],Qt.raw.data),An=s.contract.getABI(s.chain.isL1(s.wallet.chainId)?"LiquidityGauge":"ChildGauge"),gr=F.eth.abi.encodeEventSignature(An.find(Yi=>"UpdateLiquidityLimit"===Yi.name&&"event"===Yi.type)),_r=Object.values(rt.events).find(Yi=>Yi.raw.topics[0]===gr),pr=_r&&F.eth.abi.decodeParameters(["uint256"],_r.raw.data),ti=new sn.Z(wn[0]),qr=new sn.Z(wn[1]).div(s.token0.precision),yi=new sn.Z(wn[2]).div(s.token1.precision),as=new sn.Z(wn[3]).div(s.bunniToken.precision),Li=new sn.Z(pr[3]).div(s.bunniToken.gauge.precision),vs=new sn.Z(pr[4]).div(s.bunniToken.gauge.precision);[ft,Tt]=[[],[]],ft.push("totalSupply")&&Tt.push(s.bunniToken.totalSupply.plus(as)),ft.push("userDeposit")&&Tt.push(s.bunniToken.userBalance.plus(as)),ft.push("liquidity")&&Tt.push(s.bunniToken.liquidity.plus(ti)),ft.push("reserve0")&&Tt.push(s.bunniToken.reserve0.plus(qr)),ft.push("reserve1")&&Tt.push(s.bunniToken.reserve1.plus(yi)),s.store.updateBunniToken(s.bunniToken.id,ft,Tt,!0),[ft,Tt]=[[],[]],ft.push("reserve0")&&Tt.push(s.pool.reserve0.plus(qr)),ft.push("reserve1")&&Tt.push(s.pool.reserve1.plus(yi)),s.store.updatePool(s.pool.id,ft,Tt,!0),[ft,Tt]=[[],[]],ft.push("totalSupply")&&Tt.push(s.bunniToken.gauge.totalSupply.plus(as)),ft.push("userBalance")&&Tt.push(s.bunniToken.gauge.userBalance.plus(as)),ft.push("workingBalance")&&Tt.push(Li),ft.push("workingSupply")&&Tt.push(vs),s.store.updateGauge(s.bunniToken.gauge.id,ft,Tt,!0)}catch(Ft){console.error(Ft)}},()=>{},s.token.isNative(s.tokens[0])?+s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)):0).catch(rt=>{console.error(rt),s.wallet.openErrorModal(rt)})}})()}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}getPriceImpact(){const t=this.tokens[0].amount.times(this.tokens[0].price);return this.gaugeAmount.times(this.bunniToken.gauge.price).minus(t).div(t).times(100)}displayPriceImpactWarning(){const t=this.tokens[0].amount.times(this.tokens[0].price),e=this.gaugeAmount.times(this.bunniToken.gauge.price);return!(!this.zap||!e.lt(t.times(.9)))}};let lw=YA;yt(lw,"\u0275fac",function(e){return new(e||YA)(Xt(Nf),Xt(jg),Xt(dc),Xt(j5),Xt(ud),Xt(o8),Xt(el),Xt(TT),Xt(J_),Xt(uv),Xt($c),Xt(Xa))}),yt(lw,"\u0275cmp",bn({type:YA,selectors:[["app-zap-in"]],inputs:{pool:"pool",token0:"token0",token1:"token1",slippage:"slippage",deadline:"deadline",bunniToken:"bunniToken"},features:[rr],decls:7,vars:5,consts:[[1,"container","p-0"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","d-flex align-items-center justify-content-between border border-danger rounded-1 p-3 mb-3",4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],[1,"mb-2",3,"ngClass"],[3,"token","amount","allowedTokens","amountChange","tokenChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[1,"d-flex","align-items-center","justify-content-between","border","border-danger","rounded-1","p-3","mb-3"],[1,"p-0","m-0"],[1,"p-0","m-0","text-danger"],["class","d-grid mb-2",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange",4,"ngIf"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["type","button","class","btn btn-lg btn-white fw-bold w-100",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100",3,"disabled","click",4,"ngIf"],[1,"d-grid","mb-2",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange"],["type","button",1,"btn","btn-lg","btn-white","fw-bold","w-100",3,"disabled","click"],["class","spinner-border spinner-border-sm me-1","role","status",4,"ngIf"],["role","status",1,"spinner-border","spinner-border-sm","me-1"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),it(1,Wle,3,10,"ng-container",1),it(2,Gle,5,2,"ng-container",2),it(3,zle,5,1,"div",3),it(4,Jle,5,3,"ng-container",2),Ae(5,"div",4),it(6,Xle,2,0,"button",5),Ie(),Ie()),2&e&&(dt(1),Mt("ngForOf",r.tokens),dt(1),Mt("ngIf",r.tokens[0].amount.gt(0)&&r.tokens[0].userBalance.gt(0)&&r.approved()),dt(1),Mt("ngIf",!r.loading&&r.displayPriceImpactWarning()),dt(1),Mt("ngIf",r.wallet.connected),dt(2),Mt("ngIf",!r.wallet.connected))},directives:[L0,La,dh,cw,o2,Py],styles:[""]}));class yD extends T5{constructor(){super(...arguments),yt(this,"amount",new sn.Z(0)),yt(this,"signature",null)}}function Qle(n,t){1&n&&(Ae(0,"div",1),Ae(1,"div",11),Ae(2,"div",12),qn(3,"i",13),Ae(4,"small",14),kt(5," Your position will not earn fees or be used in trades until the market price moves back into the specified range. "),Ae(6,"a",15),kt(7," Learn more. "),Ie(),Ie(),Ie(),Ie(),Ie())}function ede(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",9),Ae(2,"button",16),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.pool.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(2);dt(3),Pr(" Switch to ",e.chain.metadata[e.pool.chainId].displayName," ")}}function tde(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",23),dr("allowanceChange",function(s){Ur(e);const p=an(4);return p.token0.userAllowances[p.spender]=s})("signatureChange",function(s){return Ur(e),an(4).token0Signature=s}),Ie()}if(2&n){const e=an(4);Mt("token",e.token0)("amount",e.token0Amount)("spender",e.spender)("deadline",e.deadline)("signature",e.token0Signature)("spenderAllowance",e.token0.userAllowances[e.spender])}}function nde(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",23),dr("allowanceChange",function(s){Ur(e);const p=an(4);return p.token1.userAllowances[p.spender]=s})("signatureChange",function(s){return Ur(e),an(4).token1Signature=s}),Ie()}if(2&n){const e=an(4);Mt("token",e.token1)("amount",e.token1Amount)("spender",e.spender)("deadline",e.deadline)("signature",e.token1Signature)("spenderAllowance",e.token1.userAllowances[e.spender])}}function rde(n,t){if(1&n&&(Ae(0,"div",21),it(1,tde,1,6,"app-token-approval-button",22),it(2,nde,1,6,"app-token-approval-button",22),Ie()),2&n){const e=an(3);dt(1),Mt("ngIf",!e.approved(!0)),dt(1),Mt("ngIf",!e.approved(!1))}}function ide(n,t){if(1&n){const e=Di();Ae(0,"button",24),dr("click",function(){return Ur(e),an(3).deposit(!1)}),kt(1),Ie()}if(2&n){const e=an(3);Mt("disabled",!e.canDeposit()),dt(1),Pr(" ",e.message()," ")}}function sde(n,t){if(1&n){const e=Di();Ae(0,"button",25),dr("click",function(){return Ur(e),an(3).deposit(!0)}),kt(1," Deposit & Stake "),Ie()}}function ode(n,t){if(1&n&&(Ae(0,"div"),it(1,rde,3,2,"div",17),Ae(2,"div",18),it(3,ide,2,2,"button",19),it(4,sde,2,0,"button",20),Ie(),Ie()),2&n){const e=an(2);dt(1),Mt("ngIf",e.canApprove()),dt(2),Mt("ngIf",!e.canApprove()||e.approved(!0)&&e.approved(!1)),dt(1),Mt("ngIf",e.canDeposit()&&e.bunniToken.gauge)}}function ade(n,t){if(1&n&&(Qr(0),it(1,ede,4,1,"div",8),it(2,ode,5,3,"div",8),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.pool.chainId!==e.wallet.chainId),dt(1),Mt("ngIf",e.pool.chainId===e.wallet.chainId)}}function ude(n,t){if(1&n){const e=Di();Ae(0,"button",16),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}const AV=function(n,t){return[n,t]},JA=class{constructor(t,e,r,s,p,F,q,te,fe,Re){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"compound"),yt(this,"contract"),yt(this,"permit"),yt(this,"store"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),yt(this,"pool"),yt(this,"token0"),yt(this,"token1"),yt(this,"slippage"),yt(this,"deadline"),yt(this,"bunniToken"),yt(this,"set0"),yt(this,"spender"),yt(this,"position"),yt(this,"token0Amount"),yt(this,"token0Signature"),yt(this,"token1Amount"),yt(this,"token1Signature"),yt(this,"bunniPool"),yt(this,"bunniAmount"),this.modalService=t,this.approval=e,this.chain=r,this.compound=s,this.contract=p,this.permit=F,this.store=q,this.token=te,this.util=fe,this.wallet=Re}ngOnInit(){this.resetData(!0,!0),this.spender=this.bunniToken.address!==Oy&&fp[this.wallet.chainId]?fp[this.wallet.chainId]:x5}ngOnChanges(t){t.bunniToken&&!t.bunniToken.firstChange&&(this.spender=this.bunniToken.address!==Oy&&fp[this.wallet.chainId]?fp[this.wallet.chainId]:x5,this.setAmount(this.set0?this.token0Amount:this.token1Amount,this.set0))}resetData(t,e){t&&(this.token0Signature=null,this.token1Signature=null),e&&(this.set0=!1,this.spender=null,this.token0Amount=new sn.Z(0),this.token1Amount=new sn.Z(0),this.bunniAmount=new sn.Z(0))}setToken(t,e){e?(this.token0=t,this.token0Signature=null):(this.token1=t,this.token1Signature=null)}setAmount(t,e){if(t.eq(0))return this.token0Amount=new sn.Z(0),this.token1Amount=new sn.Z(0),void(this.bunniAmount=new sn.Z(0));e?(this.token0Amount=t,this.token1Amount=this.getAmount(e),this.bunniAmount=this.getOutputAmount()):(this.token1Amount=t,this.token0Amount=this.getAmount(e),this.bunniAmount=this.getOutputAmount()),this.set0=e}getAmount(t){const e=this.pool.tick,r=this.bunniToken.tickLower,s=this.bunniToken.tickUpper;let p=null;const F=ba.getSqrtRatioAtTick(r),q=ba.getSqrtRatioAtTick(s),te=this.pool.liquidity,fe=this.pool.fee,Re=new zd(this.wallet.chainId,this.pool.token0.address,this.pool.token0.decimals),$e=new zd(this.wallet.chainId,this.pool.token1.address,this.pool.token1.decimals);let rt=null;try{p=er().BigInt(this.pool.sqrtPriceX96.toNumber()),rt=new Ug(Re,$e,fe,p,+te,e)}catch{p=ba.getSqrtRatioAtTick(e),rt=new Ug(Re,$e,fe,p,+te,e)}const ft=Math.pow(2,256)-1,Qt=ZO(p,F,q,this.util.processWeb3Number(t?this.token0Amount.times(this.pool.token0.precision):ft),this.util.processWeb3Number(t?ft:this.token1Amount.times(this.pool.token1.precision)),!0),wn=new eT({pool:rt,liquidity:Qt,tickLower:r,tickUpper:s}),An=new sn.Z(wn.mintAmounts.amount0.toString()).div(this.pool.token0.precision),gr=new sn.Z(wn.mintAmounts.amount1.toString()).div(this.pool.token1.precision);return this.position=wn,t?gr:An}getOutputAmount(){return this.bunniToken.totalSupply.eq(0)?new sn.Z(this.position.liquidity.toString()).div(1e18):this.bunniToken.totalSupply.times(this.position.liquidity.toString()).div(this.bunniToken.liquidity)}message(){return this.token0Amount.eq(0)&&this.token1Amount.eq(0)?"Enter an Amount":this.token0Amount.gt(this.token0.userBalance)?`Insufficient ${this.token0.symbol} Balance`:this.token1Amount.gt(this.token1.userBalance)?`Insufficient ${this.token1.symbol} Balance`:"Deposit"}approved(t){const e=t?this.token0:this.token1;if(this.token.isNative(e))return!0;const r=t?this.token0Amount:this.token1Amount,p=t?this.token0Signature:this.token1Signature;return this.approval.isTokenApproved(r,t?this.token0.userAllowances[this.spender]:this.token1.userAllowances[this.spender])||this.approval.isTokenPermitted(p,e,this.spender,r)}canApprove(){return(this.token0Amount.gt(0)||this.token1Amount.gt(0))&&this.token0.userBalance.gte(this.token0Amount)&&this.token1.userBalance.gte(this.token1Amount)}canDeposit(){return this.canApprove()&&this.approved(!0)&&this.approved(!1)}deposit(t){var e=this;return(0,Br.Z)(function*(){let r=[];const s=e.wallet.web3,p=e.bunniToken.address!==Oy&&fp[e.wallet.chainId]?e.contract.getLpZapIn(s,e.wallet.chainId):e.contract.getBunniHub(s),F={pool:e.bunniToken.pool.address,tickLower:e.bunniToken.tickLower,tickUpper:e.bunniToken.tickUpper};if(e.bunniToken.address===Oy){const ft=p.methods.deployBunniToken(F);r=[...r,ft.encodeABI()]}if(e.permit.isSignatureValid(e.token0Signature,e.token0,e.spender,e.token0Amount)){const ft=p.methods.selfPermitIfNecessary(e.token0Signature.tokenAddress,e.token0Signature.amount,e.token0Signature.deadline,e.token0Signature.v,e.token0Signature.r,e.token0Signature.s);r=[...r,ft.encodeABI()]}if(e.permit.isSignatureValid(e.token1Signature,e.token1,e.spender,e.token1Amount)){const ft=p.methods.selfPermitIfNecessary(e.token1Signature.tokenAddress,e.token1Signature.amount,e.token1Signature.deadline,e.token1Signature.v,e.token1Signature.r,e.token1Signature.s);r=[...r,ft.encodeABI()]}if(e.token.isNative(e.token0)||e.token.isNative(e.token1)){const ft=p.methods.wrapEthInput();r=[...r,ft.encodeABI()]}const q=new Y3(e.slippage,1e5),te=e.position.mintAmountsWithSlippage(q),fe=new sn.Z(te.amount0.toString()),Re=new sn.Z(te.amount1.toString()),$e={key:F,amount0Desired:e.util.processWeb3Number(e.token0Amount.times(e.token0.precision)),amount1Desired:e.util.processWeb3Number(e.token1Amount.times(e.token1.precision)),amount0Min:e.util.processWeb3Number(fe),amount1Min:e.util.processWeb3Number(Re),deadline:Math.floor(Date.now()/1e3)+e.deadline,recipient:e.wallet.user};if(e.bunniToken.address!==Oy&&fp[e.wallet.chainId]){const ft=yield e.compound.shouldCompound(e.pool,e.bunniToken,new sn.Z(0));if(t){const Tt=p.methods.zapIn($e,e.bunniToken.gauge.address,e.pool.token0.address,e.pool.token1.address,e.wallet.user,e.util.processWeb3Number(e.bunniAmount.times(1e18).times(.99)),e.token.isNative(e.token0),e.token.isNative(e.token1),ft);r=[...r,Tt.encodeABI()]}else{const Tt=p.methods.zapInNoStake($e,e.pool.token0.address,e.pool.token1.address,e.wallet.user,e.util.processWeb3Number(e.bunniAmount.times(1e18).times(.99)),e.token.isNative(e.token0),e.token.isNative(e.token1),ft);r=[...r,Tt.encodeABI()]}}else{const ft=p.methods.deposit($e);r=[...r,ft.encodeABI()]}let rt=0;e.token.isNative(e.token0)?rt=e.token0Amount.times(e.token0.precision).toNumber():e.token.isNative(e.token1)&&(rt=e.token1Amount.times(e.token1.precision).toNumber()),e.wallet.sendTx(p.methods.multicall(r),()=>{},()=>{},ft=>{e.position=null,e.token0Signature=null,e.token1Signature=null,e.token0Amount=new sn.Z(0),e.token1Amount=new sn.Z(0),e.bunniAmount=new sn.Z(0);try{const Tt=s.eth.abi.encodeEventSignature(e.contract.getABI("BunniHub").find(qr=>"Deposit"===qr.name&&"event"===qr.type)),Ft=Tt&&Object.values(ft.events).find(qr=>qr.raw.topics[0]===Tt),Qt=Ft&&s.eth.abi.decodeParameters(["uint128","uint256","uint256","uint256"],Ft.raw.data),wn=new sn.Z(Qt[0]),An=new sn.Z(Qt[1]).div(e.token0.precision),gr=new sn.Z(Qt[2]).div(e.token1.precision),_r=new sn.Z(Qt[3]).div(e.bunniToken.precision);let[pr,ti]=[[],[]];if(pr.push("userBalance")&&ti.push(e.token0.userBalance.minus(An)),e.store.updateToken(e.token0.id,pr,ti,!0),[pr,ti]=[[],[]],pr.push("userBalance")&&ti.push(e.token1.userBalance.minus(gr)),e.store.updateToken(e.token1.id,pr,ti,!0),[pr,ti]=[[],[]],pr.push("totalSupply")&&ti.push(e.bunniToken.totalSupply.plus(_r)),!t&&pr.push("userBalance")&&ti.push(e.bunniToken.userBalance.plus(_r)),pr.push("userDeposit")&&ti.push(e.bunniToken.userBalance.plus(_r)),pr.push("liquidity")&&ti.push(e.bunniToken.liquidity.plus(wn)),pr.push("reserve0")&&ti.push(e.bunniToken.reserve0.plus(An)),pr.push("reserve1")&&ti.push(e.bunniToken.reserve1.plus(gr)),e.store.updateBunniToken(e.bunniToken.id,pr,ti,!0),[pr,ti]=[[],[]],pr.push("reserve0")&&ti.push(e.pool.reserve0.plus(An)),pr.push("reserve1")&&ti.push(e.pool.reserve1.plus(gr)),e.store.updatePool(e.pool.id,pr,ti,!0),t){const qr=e.contract.getABI(e.chain.isL1(e.wallet.chainId)?"LiquidityGauge":"ChildGauge"),yi=s.eth.abi.encodeEventSignature(qr.find(Ts=>"UpdateLiquidityLimit"===Ts.name&&"event"===Ts.type)),as=Object.values(ft.events).find(Ts=>Ts.raw.topics[0]===yi),Li=as&&s.eth.abi.decodeParameters(["uint256"],as.raw.data),vs=new sn.Z(Li[3]).div(e.bunniToken.gauge.precision),Yi=new sn.Z(Li[4]).div(e.bunniToken.gauge.precision);let[no,Gs]=[[],[]];no.push("totalSupply")&&Gs.push(e.bunniToken.gauge.totalSupply.plus(_r)),no.push("userBalance")&&Gs.push(e.bunniToken.gauge.userBalance.plus(_r)),no.push("workingBalance")&&Gs.push(vs),no.push("workingSupply")&&Gs.push(Yi),e.store.updateGauge(e.bunniToken.gauge.id,no,Gs,!0)}}catch(Tt){console.error(Tt),e.wallet.openErrorModal(Tt)}},()=>{},rt).catch(ft=>{console.error(ft),e.wallet.openErrorModal(ft)})})()}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let V5=JA;function cde(n,t){1&n&&(Ae(0,"small",18),kt(1," \xa0 "),Ie())}function lde(n,t){if(1&n&&(Ae(0,"small",19),kt(1),Ie()),2&n){const e=an(3);dt(1),Pr(" $",e.amount.times(e.token.price).toFormat(2)," ")}}function dde(n,t){1&n&&(Qr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),Wr())}function fde(n,t){if(1&n){const e=Di();Ae(0,"small",22),dr("click",function(){Ur(e);const s=an(4);return s.setAmount(s.token.userBalance)}),kt(1," Max "),Ie()}}function hde(n,t){if(1&n&&(Qr(0),Ae(1,"small",20),kt(2),Ie(),it(3,fde,2,0,"small",21),Wr()),2&n){const e=an(3);dt(2),Pr("Balance: ",e.token.userBalance.toFormat(4),""),dt(1),Mt("ngIf",e.token.userBalance.gt(0))}}function pde(n,t){if(1&n&&(Ae(0,"div",23),Ae(1,"small",24),kt(2),Ie(),Ie()),2&n){const e=an(3);dt(2),bc(e.errorMessage())}}yt(V5,"\u0275fac",function(e){return new(e||JA)(Xt(Nf),Xt(jg),Xt(dc),Xt(j5),Xt(ud),Xt(o8),Xt(el),Xt(uv),Xt($c),Xt(Xa))}),yt(V5,"\u0275cmp",bn({type:JA,selectors:[["app-add-liquidity"]],inputs:{pool:"pool",token0:"token0",token1:"token1",slippage:"slippage",deadline:"deadline",bunniToken:"bunniToken"},features:[rr],decls:13,vars:21,consts:[[1,"container","p-0"],[1,"mb-3"],[3,"token","amount","allowedTokens","disableSelect","rangeError","tokenChange","amountChange"],[1,"mb-2"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[3,"token","amount"],["class","mb-3",4,"ngIf"],[4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],[1,"container","py-3","px-3","border","border-warning","rounded-1","text-warning"],[1,"d-flex","align-items-center","justify-content-center"],[1,"fe","fe-alert-triangle","me-3"],[1,""],["href","https://docs.uniswap.org/protocol/concepts/V3-overview/concentrated-liquidity","target","_blank"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["class","d-grid d-flex gap-3",4,"ngIf"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["type","button","class","btn btn-lg btn-white fw-bold w-100",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100",3,"click",4,"ngIf"],[1,"d-grid","d-flex","gap-3"],["class","col",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange",4,"ngIf"],[1,"col",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange"],["type","button",1,"btn","btn-lg","btn-white","fw-bold","w-100",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-select-input-panel",2),dr("tokenChange",function(p){return r.setToken(p,!0)})("amountChange",function(p){return r.setAmount(p,!0)}),Ie(),Ie(),Ae(3,"div",3),Ae(4,"app-token-select-input-panel",2),dr("tokenChange",function(p){return r.setToken(p,!1)})("amountChange",function(p){return r.setAmount(p,!1)}),Ie(),Ie(),Ae(5,"div",4),qn(6,"h3",5),Ie(),Ae(7,"div",1),qn(8,"app-token-output-panel",6),Ie(),it(9,Qle,8,0,"div",7),it(10,ade,3,2,"ng-container",8),Ae(11,"div",9),it(12,ude,2,0,"button",10),Ie(),Ie()),2&e&&(dt(2),Mt("token",r.token0)("amount",r.token0Amount)("allowedTokens",vc(15,AV,r.store.getNative(r.wallet.chainId),r.store.getWrappedNative(r.wallet.chainId)))("disableSelect",r.token.isZero(r.bunniToken)||!r.chain.zapSupported(r.wallet.chainId)||!r.token.isWrappedNative(r.token0,r.wallet.chainId)&&!r.token.isNative(r.token0))("rangeError",r.bunniToken.tickUpper{},()=>{},pr=>{t.token0Amount=new sn.Z(0),t.token1Amount=new sn.Z(0),t.bunniAmount=new sn.Z(0);try{const ti=pr.events.Withdraw,qr=ti&&new sn.Z(ti.returnValues[3]),yi=ti&&new sn.Z(ti.returnValues[4]).div(t.token0.precision),as=ti&&new sn.Z(ti.returnValues[5]).div(t.token1.precision),Li=ti&&new sn.Z(ti.returnValues[6]).div(t.bunniToken.precision);let[vs,Yi]=[[],[]];vs.push("userBalance")&&Yi.push(t.token0.userBalance.plus(yi)),t.store.updateToken(t.token0.id,vs,Yi,!0),[vs,Yi]=[[],[]],vs.push("userBalance")&&Yi.push(t.token1.userBalance.plus(as)),t.store.updateToken(t.token1.id,vs,Yi,!0),[vs,Yi]=[[],[]],vs.push("totalSupply")&&Yi.push(t.bunniToken.totalSupply.minus(Li)),vs.push("userBalance")&&Yi.push(t.bunniToken.userBalance.minus(Li)),vs.push("userDeposit")&&Yi.push(t.bunniToken.userBalance.minus(Li)),vs.push("liquidity")&&Yi.push(t.bunniToken.liquidity.minus(qr)),vs.push("reserve0")&&Yi.push(t.bunniToken.reserve0.minus(yi)),vs.push("reserve1")&&Yi.push(t.bunniToken.reserve1.minus(as)),t.store.updateBunniToken(t.bunniToken.id,vs,Yi,!0),[vs,Yi]=[[],[]],vs.push("reserve0")&&Yi.push(t.pool.reserve0.minus(yi)),vs.push("reserve1")&&Yi.push(t.pool.reserve1.minus(as)),t.store.updatePool(t.pool.id,vs,Yi,!0)}catch(ti){console.error(ti)}},()=>{}).catch(pr=>{console.error(pr),t.wallet.openErrorModal(pr)})})()}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let dw=QA;function Ade(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",8),Ae(2,"button",10),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.bunniToken.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(2);dt(3),Pr(" Switch to ",e.chain.metadata[e.bunniToken.chainId].displayName," ")}}function Ide(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",13),dr("allowanceChange",function(s){Ur(e);const p=an(3);return p.bunniToken.userAllowances[p.bunniToken.gauge.address]=s}),Ie()}if(2&n){const e=an(3);Mt("token",e.bunniToken)("amount",e.bunniAmount)("spender",e.bunniToken.gauge.address)("spenderAllowance",e.bunniToken.userAllowances[e.bunniToken.gauge.address])}}function Sde(n,t){if(1&n){const e=Di();Ae(0,"button",14),dr("click",function(){return Ur(e),an(3).stake(!1)}),kt(1),Ie()}if(2&n){const e=an(3);Mt("disabled",!e.canStake()),dt(1),Pr(" ",e.message()," ")}}function kde(n,t){if(1&n&&(Ae(0,"div"),it(1,Ide,1,4,"app-token-approval-button",11),Ae(2,"div",8),it(3,Sde,2,2,"button",12),Ie(),Ie()),2&n){const e=an(2);dt(1),Mt("ngIf",e.canApprove()&&!e.approved()),dt(2),Mt("ngIf",!e.canApprove()||e.approved())}}function Cde(n,t){if(1&n&&(Qr(0),it(1,Ade,4,1,"div",7),it(2,kde,4,2,"div",7),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.bunniToken.chainId!==e.wallet.chainId),dt(1),Mt("ngIf",e.bunniToken.chainId===e.wallet.chainId)}}function Mde(n,t){if(1&n){const e=Di();Ae(0,"button",10),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(dw,"\u0275fac",function(e){return new(e||QA)(Xt(Nf),Xt(dc),Xt(j5),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(dw,"\u0275cmp",bn({type:QA,selectors:[["app-remove-liquidity"]],inputs:{pool:"pool",token0:"token0",token1:"token1",slippage:"slippage",deadline:"deadline",bunniToken:"bunniToken"},features:[rr],decls:12,vars:8,consts:[[1,"container","p-0"],[1,"mb-2"],[3,"token","amount","amountChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[1,"d-grid","gap-2"],[4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["class","d-grid",4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),qn(4,"h3",4),Ie(),Ae(5,"div",5),qn(6,"app-token-output-panel",6),Ie(),Ae(7,"div",5),qn(8,"app-token-output-panel",6),Ie(),Ae(9,"div",7),it(10,Ede,3,2,"div",8),it(11,Tde,2,0,"button",9),Ie(),Ie()),2&e&&(dt(2),Mt("token",r.bunniToken)("amount",r.bunniAmount),dt(4),Mt("token",r.token0)("amount",r.token0Amount),dt(2),Mt("token",r.token1)("amount",r.token1Amount),dt(2),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[Ry,o2,La],styles:[""]}));const eI=class{constructor(t,e,r,s,p,F,q){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniToken"),yt(this,"gaugeToken"),yt(this,"bunniAmount"),yt(this,"gaugeAmount"),this.modalService=t,this.approval=e,this.chain=r,this.contract=s,this.store=p,this.util=F,this.wallet=q}ngOnInit(){this.resetData()}resetData(){this.bunniAmount=new sn.Z(0),this.gaugeAmount=new sn.Z(0)}setAmount(t){this.bunniAmount=t,this.gaugeAmount=t}approved(){return this.approval.isTokenApproved(this.bunniAmount,this.bunniToken.userAllowances[this.bunniToken.gauge.address])}canApprove(){return this.approval.canApprove(this.bunniAmount,this.bunniToken.userBalance)}canStake(){return this.canApprove()&&this.approved()}message(){return this.bunniAmount.eq(0)?"Enter an Amount":this.bunniAmount.gt(this.bunniToken.userBalance)?`Insufficient ${this.bunniToken.symbol} Balance`:"Stake in Gauge"}stake(t){const e=this.wallet.web3,r=this.util.processWeb3Number(this.bunniAmount.times(this.bunniToken.precision)),p=(this.chain.isMainnet(this.wallet.chainId)||this.chain.isTestnet(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,e):this.contract.getChildGauge(this.bunniToken.gauge.address,e)).methods.deposit(r,this.wallet.user,t);this.wallet.sendTx(p,()=>{},()=>{},F=>{this.bunniAmount=new sn.Z(0),this.gaugeAmount=new sn.Z(0);try{const q=F.events.Deposit,te=F.events.UpdateLiquidityLimit,fe=q&&new sn.Z(q.returnValues[1]).div(this.bunniToken.precision),Re=te&&new sn.Z(te.returnValues[3]).div(1e18),$e=te&&new sn.Z(te.returnValues[4]).div(1e18);let[rt,ft]=[[],[]];rt.push("totalSupply")&&ft.push(this.bunniToken.totalSupply.minus(fe)),rt.push("userBalance")&&ft.push(this.bunniToken.userBalance.minus(fe)),this.store.updateBunniToken(this.bunniToken.id,rt,ft,!0),[rt,ft]=[[],[]],rt.push("totalSupply")&&ft.push(this.bunniToken.gauge.totalSupply.plus(fe)),rt.push("userBalance")&&ft.push(this.bunniToken.gauge.userBalance.plus(fe)),rt.push("workingBalance")&&ft.push(Re),rt.push("workingSupply")&&ft.push($e),this.store.updateGauge(this.bunniToken.gauge.id,rt,ft,!0)}catch(q){console.error(q)}},()=>{}).catch(F=>{console.error(F),this.wallet.openErrorModal(F)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let fw=eI;function Ode(n,t){if(1&n){const e=Di();Ae(0,"div",11),Ae(1,"button",12),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.bunniToken.chainId].chainId)}),kt(2),Ie(),Ie()}if(2&n){const e=an(2);dt(2),Pr(" Switch to ",e.chain.metadata[e.bunniToken.chainId].displayName," ")}}function Dde(n,t){if(1&n){const e=Di();Ae(0,"div",11),Ae(1,"button",13),dr("click",function(){return Ur(e),an(2).unstake(!1)}),kt(2),Ie(),Ie()}if(2&n){const e=an(2);dt(1),Mt("disabled",!e.canUnstake()),dt(1),Pr(" ",e.message()," ")}}function Pde(n,t){if(1&n&&(Ae(0,"div"),it(1,Ode,3,1,"div",10),it(2,Dde,3,2,"div",10),Ie()),2&n){const e=an();dt(1),Mt("ngIf",e.bunniToken.chainId!==e.wallet.chainId),dt(1),Mt("ngIf",e.bunniToken.chainId===e.wallet.chainId)}}function Rde(n,t){if(1&n){const e=Di();Ae(0,"button",12),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(fw,"\u0275fac",function(e){return new(e||eI)(Xt(Nf),Xt(jg),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(fw,"\u0275cmp",bn({type:eI,selectors:[["app-stake"]],inputs:{bunniToken:"bunniToken",gaugeToken:"gaugeToken"},decls:10,vars:6,consts:[[1,"container","p-0"],[1,"mb-2"],[3,"token","amount","amountChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["class","d-grid",3,"token","amount","spender","spenderAllowance","allowanceChange",4,"ngIf"],["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold",3,"disabled","click",4,"ngIf"],[1,"d-grid",3,"token","amount","spender","spenderAllowance","allowanceChange"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),qn(4,"h3",4),Ie(),Ae(5,"div",5),qn(6,"app-token-output-panel",6),Ie(),it(7,Cde,3,2,"ng-container",7),Ae(8,"div",8),it(9,Mde,2,0,"button",9),Ie(),Ie()),2&e&&(dt(2),Mt("token",r.bunniToken)("amount",r.bunniAmount),dt(4),Mt("token",r.gaugeToken)("amount",r.gaugeAmount),dt(1),Mt("ngIf",r.wallet.connected),dt(2),Mt("ngIf",!r.wallet.connected))},directives:[Ry,o2,La,Py],styles:[""]}));const tI=class{constructor(t,e,r,s,p,F,q){yt(this,"modalService"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"zone"),yt(this,"bunniToken"),yt(this,"gaugeToken"),yt(this,"bunniAmount",new sn.Z(0)),yt(this,"gaugeAmount",new sn.Z(0)),this.modalService=t,this.chain=e,this.contract=r,this.store=s,this.util=p,this.wallet=F,this.zone=q}ngOnInit(){}setAmount(t){this.gaugeAmount=t,this.bunniAmount=t}canUnstake(){return this.gaugeAmount.gt(0)&&this.gaugeAmount.lte(this.gaugeToken.userBalance)}message(){return this.gaugeAmount.eq(0)?"Enter an Amount":this.gaugeAmount.gt(this.gaugeToken.userBalance)?`Insufficient ${this.gaugeToken.symbol} Balance`:"Unstake from Gauge"}unstake(t){const e=this.wallet.web3,r=this.util.processWeb3Number(this.gaugeAmount.times(this.gaugeToken.precision));let s;s=this.chain.isMainnet(this.wallet.chainId)||this.chain.isTestnet(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,e).methods.withdraw(r,t):this.contract.getChildGauge(this.bunniToken.gauge.address,e).methods.withdraw(r,this.wallet.user,t),this.wallet.sendTx(s,()=>{},()=>{},p=>{this.bunniAmount=new sn.Z(0),this.gaugeAmount=new sn.Z(0);try{const q=p.events.UpdateLiquidityLimit,te=new sn.Z(p.events.Withdraw.returnValues[1]).div(this.bunniToken.precision),fe=new sn.Z(q.returnValues[3]).div(1e18),Re=new sn.Z(q.returnValues[4]).div(1e18);let[$e,rt]=[[],[]];$e.push("totalSupply")&&rt.push(this.bunniToken.totalSupply.plus(te)),$e.push("userBalance")&&rt.push(this.bunniToken.userBalance.plus(te)),this.store.updateBunniToken(this.bunniToken.id,$e,rt,!0),[$e,rt]=[[],[]],$e.push("totalSupply")&&rt.push(this.bunniToken.gauge.totalSupply.minus(te)),$e.push("userBalance")&&rt.push(this.bunniToken.gauge.userBalance.minus(te)),$e.push("workingBalance")&&rt.push(fe),$e.push("workingSupply")&&rt.push(Re),this.store.updateGauge(this.bunniToken.gauge.id,$e,rt,!0)}catch(F){console.error(F)}},()=>{}).catch(p=>{console.error(p),this.wallet.openErrorModal(p)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let hw=tI;function Nde(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",10),dr("allowanceChange",function(s){Ur(e);const p=an(2);return p.rewardToken.userAllowances[p.bunniToken.gauge.address]=s}),Ie()}if(2&n){const e=an(2);Mt("token",e.rewardToken)("amount",e.rewardAmount)("spender",e.bunniToken.gauge.address)("spenderAllowance",e.rewardToken.userAllowances[e.bunniToken.gauge.address])}}function Bde(n,t){if(1&n){const e=Di();Ae(0,"button",11),dr("click",function(){return Ur(e),an(2).deposit_reward()}),kt(1),Ie()}if(2&n){const e=an(2);Mt("disabled",!e.canAddReward()),dt(1),Pr(" ",e.message()," ")}}function Fde(n,t){if(1&n&&(Qr(0),it(1,Nde,1,4,"app-token-approval-button",8),it(2,Bde,2,2,"button",9),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.canApprove()&&!e.approved()),dt(1),Mt("ngIf",!e.canApprove()||e.approved())}}function Lde(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"button",12),dr("click",function(){return Ur(e),an().wallet.connect()}),kt(2," Connect a Wallet "),Ie(),Wr()}}yt(hw,"\u0275fac",function(e){return new(e||tI)(Xt(Nf),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa),Xt(pa))}),yt(hw,"\u0275cmp",bn({type:tI,selectors:[["app-unstake"]],inputs:{bunniToken:"bunniToken",gaugeToken:"gaugeToken"},decls:10,vars:6,consts:[[1,"container","p-0"],[1,"mb-2"],[3,"token","amount","amountChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[1,"d-grid","gap-2"],[4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["class","d-grid",4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),qn(4,"h3",4),Ie(),Ae(5,"div",5),qn(6,"app-token-output-panel",6),Ie(),Ae(7,"div",7),it(8,Pde,3,2,"div",8),it(9,Rde,2,0,"button",9),Ie(),Ie()),2&e&&(dt(2),Mt("token",r.gaugeToken)("amount",r.gaugeAmount),dt(4),Mt("token",r.bunniToken)("amount",r.bunniAmount),dt(2),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[Ry,o2,La],styles:[""]}));const nI=class{constructor(t,e,r,s,p,F,q,te){yt(this,"activeModal"),yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniToken"),yt(this,"rewardToken"),yt(this,"rewardAmount",new sn.Z(0)),this.activeModal=t,this.modalService=e,this.approval=r,this.chain=s,this.contract=p,this.store=F,this.util=q,this.wallet=te}ngOnInit(){}setAmount(t){this.rewardAmount=t}approved(){return this.approval.isTokenApproved(this.rewardAmount,this.rewardToken.userAllowances[this.bunniToken.gauge.address])}canApprove(){return this.rewardAmount.gt(0)&&this.rewardToken.userBalance.gte(this.rewardAmount)}canAddReward(){return this.rewardAmount.gt(0)&&this.approved()&&this.rewardAmount.lte(this.rewardToken.userBalance)&&this.rewardToken.distributor===this.wallet.user.toLowerCase()}message(){return this.rewardAmount.eq(0)?"Enter an Amount":this.rewardAmount.gt(this.rewardToken.userBalance)?`Insufficient ${this.rewardToken.symbol} Balance`:this.rewardToken.distributor!==this.wallet.user.toLowerCase()?"Unauthorized Distributor":"Deposit Reward"}deposit_reward(){const t=this.wallet.web3,r=(this.chain.isL1(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,t):this.contract.getChildGauge(this.bunniToken.gauge.address,t)).methods.deposit_reward_token(this.rewardToken.address,this.util.processWeb3Number(this.rewardAmount.times(this.rewardToken.precision)));this.wallet.sendTx(r,()=>{},()=>{},()=>{this.deposit_reward_callback()},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}deposit_reward_callback(){this.rewardAmount=new sn.Z(0),this.rewardToken.userBalance=this.rewardToken.userBalance.minus(this.rewardAmount),this.rewardToken.userBalanceUSD=this.rewardToken.userBalance.times(this.rewardToken.price),this.store.updateToken(this.rewardToken.id,["userBalance"],[this.rewardToken.userBalance],!0)}};let AT=nI;function Ude(n,t){if(1&n){const e=Di();Ae(0,"button",8),dr("click",function(){Ur(e);const s=an().$implicit;return an().openAddRewardModal(s)}),kt(1," Add Reward "),Ie()}}function jde(n,t){if(1&n&&(Qr(0),Ae(1,"div",1),it(2,Ude,2,0,"button",7),qn(3,"app-token-output-panel",2),Ie(),Wr()),2&n){const e=t.$implicit,r=an();dt(2),Mt("ngIf",r.wallet.connected&&r.wallet.user.toLowerCase()===e.distributor),dt(1),Mt("token",e)("amount",e.claimableReward)}}function Vde(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",10),Ae(2,"button",11),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.bunniToken.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(2);dt(3),Pr(" Switch to ",e.chain.metadata[e.bunniToken.chainId].displayName," ")}}function Hde(n,t){if(1&n){const e=Di();Ae(0,"button",15),dr("click",function(){return Ur(e),an(3).claim()}),kt(1," Claim oLIT "),Ie()}}function $de(n,t){if(1&n){const e=Di();Ae(0,"button",15),dr("click",function(){return Ur(e),an(3).claim_rewards()}),kt(1," Claim Rewards "),Ie()}}function Wde(n,t){1&n&&(Ae(0,"button",16),kt(1," Nothing to Claim "),Ie())}function Gde(n,t){if(1&n&&(Ae(0,"div",12),it(1,Hde,2,0,"button",13),it(2,$de,2,0,"button",13),it(3,Wde,2,0,"button",14),Ie()),2&n){const e=an(2);dt(1),Mt("ngIf",e.canClaim(!0)),dt(1),Mt("ngIf",e.canClaim(!1)),dt(1),Mt("ngIf",!e.canClaim(!0)&&!e.canClaim(!1))}}function zde(n,t){if(1&n&&(Ae(0,"div"),it(1,Vde,4,1,"div",5),it(2,Gde,4,3,"div",9),Ie()),2&n){const e=an();dt(1),Mt("ngIf",e.bunniToken.chainId!==e.wallet.chainId),dt(1),Mt("ngIf",e.bunniToken.chainId===e.wallet.chainId)}}function qde(n,t){if(1&n){const e=Di();Ae(0,"button",11),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(AT,"\u0275fac",function(e){return new(e||nI)(Xt(Ob),Xt(Nf),Xt(jg),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(AT,"\u0275cmp",bn({type:nI,selectors:[["app-add-reward"]],inputs:{bunniToken:"bunniToken",rewardToken:"rewardToken"},decls:10,vars:5,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close","h2","m-0",3,"click"],[1,"modal-body"],[1,"mb-3"],[3,"token","amount","amountChange"],[1,"d-grid","mb-3"],[4,"ngIf"],["class","d-grid mb-2",3,"token","amount","spender","spenderAllowance","allowanceChange",4,"ngIf"],["type","button","class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold",3,"disabled","click",4,"ngIf"],[1,"d-grid","mb-2",3,"token","amount","spender","spenderAllowance","allowanceChange"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"h2",1),kt(2),Ie(),Ae(3,"button",2),dr("click",function(){return r.activeModal.dismiss()}),Ie(),Ie(),Ae(4,"div",3),Ae(5,"div",4),Ae(6,"app-token-input-panel",5),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(7,"div",6),it(8,Fde,3,2,"ng-container",7),it(9,Lde,3,0,"ng-container",7),Ie(),Ie()),2&e&&(dt(2),Pr("Add ",r.rewardToken.symbol," Reward"),dt(4),Mt("token",r.rewardToken)("amount",r.rewardAmount),dt(2),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[Ry,La,Py],styles:[""]}));const rI=class{constructor(t,e,r,s,p,F,q){yt(this,"modalService"),yt(this,"balance"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniToken"),this.modalService=t,this.balance=e,this.chain=r,this.contract=s,this.store=p,this.util=F,this.wallet=q}ngOnInit(){}canClaim(t){return t?this.bunniToken.gauge.claimableReward.gt(0):!!this.bunniToken.gauge.rewardTokens.find(e=>e.claimableReward.gt(0))}claim(){const t=this.wallet.web3,r=(this.chain.isL1(this.wallet.chainId)?this.contract.getMinter(t,this.wallet.chainId):this.contract.getChildGaugeFactory(t,this.wallet.chainId)).methods.mint(this.bunniToken.gauge.address);this.wallet.sendTx(r,()=>{},()=>{},s=>{this.claim_callback(s)},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}claim_rewards(){const t=this.wallet.web3,r=(this.chain.isL1(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,t):this.contract.getChildGauge(this.bunniToken.gauge.address,t)).methods.claim_rewards(this.wallet.user);this.wallet.sendTx(r,()=>{},()=>{},()=>{this.claim_rewards_callback()},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}claim_callback(t){const e=this.wallet.httpsWeb3(this.wallet.chainId);try{const r=e.eth.abi.encodeEventSignature(this.contract.getABI("ERC20").find(Ft=>"Transfer"===Ft.name&&"event"===Ft.type)),s=r&&Object.values(t.events).find(Ft=>Ft.raw.topics[0]===r),p=s&&e.eth.abi.decodeParameters(["uint256"],s.raw.data),F=this.contract.getABI(this.chain.isL1(this.wallet.chainId)?"LiquidityGauge":"ChildGauge"),q=e.eth.abi.encodeEventSignature(F.find(Ft=>"UpdateLiquidityLimit"===Ft.name&&"event"===Ft.type)),te=Object.values(t.events).find(Ft=>Ft.raw.topics[0]===q),fe=te&&e.eth.abi.decodeParameters(["uint256"],te.raw.data),Re=new sn.Z(p[0]).div(this.bunniToken.gauge.oLIT.precision),$e=new sn.Z(fe[3]).div(this.bunniToken.gauge.precision),rt=new sn.Z(fe[4]).div(this.bunniToken.gauge.precision);let[ft,Tt]=[[],[]];ft.push("userBalance")&&Tt.push(this.bunniToken.gauge.oLIT.userBalance.plus(Re)),this.store.updateToken(this.bunniToken.gauge.oLIT.id,ft,Tt,!0),[ft,Tt]=[[],[]],ft.push("claimableReward")&&Tt.push(new sn.Z(0)),ft.push("workingBalance")&&Tt.push($e),ft.push("workingSupply")&&Tt.push(rt),this.store.updateGauge(this.bunniToken.gauge.id,ft,Tt)}catch(r){console.error(r)}}claim_rewards_callback(){const t=this.wallet.httpsWeb3(this.wallet.chainId),e=new sT({web3Instance:t,tryAggregate:!0}),r=this.balance.context(this.wallet.user,this.bunniToken.gauge.rewardTokens.map(s=>s.address));e.call(r).then(s=>{this.bunniToken.gauge.rewardTokens.forEach(p=>{const q=new sn.Z(s[`BALANCE: ${p.address}`].callsReturnContext[0].returnValues[0].hex).div(p.precision);p.claimableReward=new sn.Z(0),p.userBalance=q,p.userBalanceUSD=q.times(p.price),this.store.updateToken(p.id,["userBalance"],[q],!0)})})}openAddRewardModal(t){const e=this.modalService.open(AT,{windowClass:"windowed",centered:!0,size:"md"});e.componentInstance.bunniToken=this.bunniToken,e.componentInstance.rewardToken=t}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let pw=rI;yt(pw,"\u0275fac",function(e){return new(e||rI)(Xt(Nf),Xt(O5),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(pw,"\u0275cmp",bn({type:rI,selectors:[["app-claim"]],inputs:{bunniToken:"bunniToken"},decls:7,vars:5,consts:[[1,"container","p-0"],[1,"mb-3"],[3,"token","amount"],[4,"ngFor","ngForOf"],[1,"d-grid","gap-2"],[4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-white fw-bold text-dark mb-2",3,"click",4,"ngIf"],["type","button",1,"btn","btn-sm","btn-white","fw-bold","text-dark","mb-2",3,"click"],["class","d-grid gap-3 d-md-flex mx-auto justify-content-md-center",4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100","type","button",3,"click",4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100","type","button","disabled","",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"click"],["type","button","disabled","",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),qn(2,"app-token-output-panel",2),Ie(),it(3,jde,4,3,"ng-container",3),Ae(4,"div",4),it(5,zde,3,2,"div",5),it(6,qde,2,0,"button",6),Ie(),Ie()),2&e&&(dt(2),Mt("token",r.bunniToken.gauge.oLIT)("amount",r.bunniToken.gauge.claimableReward),dt(1),Mt("ngForOf",r.bunniToken.gauge.rewardTokens),dt(2),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[o2,L0,La],styles:[""]}));var IT=Y(10431);const Xde=(n,t)=>`gauge {\n address\n chain\n tokenlessProduction\n totalSupply\n workingSupply\n ${Qde()}\n ${n?"exists":""}\n ${n?"relativeWeightCap":""}\n ${n?kV(t):""}\n ${n?CV(t):""}\n ${n?MV(t):""}\n ${n?SV(t):""}\n }`,SV=n=>`votes (\n where: {\n power_gt: 0,\n end_gt: ${n}\n }\n ) {\n power\n weight\n decay\n timestamp\n user {\n address\n }\n }`,kV=n=>`bribes (\n where: { \n deadline: ${n}\n }\n ) {\n token {\n address\n decimals\n name\n symbol\n }\n amount\n maxTokensPerVote\n }`,CV=n=>`quests (\n where: {\n startPeriod_lte: ${Math.floor(Date.now()/1e3)},\n deadline_gte: ${n}\n }\n ) {\n rewardToken {\n address\n decimals\n name\n symbol\n }\n objectiveVotes\n rewardPerVote\n duration\n }`,MV=n=>`bounties (\n where: {\n startPeriod_lte: ${Math.floor(Date.now()/1e3)},\n endPeriod_gte: ${n}\n }\n ) {\n rewardToken {\n address\n decimals\n name\n symbol\n }\n rewardPerPeriod\n maxRewardPerVote\n }`,Qde=()=>"rewardTokens {\n distributor\n token {\n address\n decimals\n name\n symbol\n }\n }",m9=class{constructor(){}query(t,e){return(0,Br.Z)(function*(){return yield(0,IT.request)(jre[e],t)})()}queryBlocks(t,e){return(0,Br.Z)(function*(){return yield(0,IT.request)(Vre[e],t)})()}};let mw=m9;yt(mw,"\u0275fac",function(e){return new(e||m9)}),yt(mw,"\u0275prov",we({token:m9,factory:m9.\u0275fac,providedIn:"root"}));const g9=class{constructor(t){yt(this,"subgraph"),this.subgraph=t}get now(){return Math.floor(Date.now()/1e3)}get day(){return 86400}get week(){return 604800}get month(){return 2592e3}get year(){return 31536e3}get thisPeriodTimestamp(){const t=1e3*this.week;return Math.floor(Date.now()/t)*t/1e3}get nextPeriodTimestamp(){const t=1e3*this.week;return Math.floor((Date.now()+t)/t)*t/1e3}getBlock(t,e){var r=this;return(0,Br.Z)(function*(){return(yield r.subgraph.queryBlocks((n=>IT.gql` + `,Bs=(qe,ge,Ne)=>qe();function Ns(qe){return Ff(new S.GraphQLClient(qe))}function ha(qe){return function(ge,Ne=Bs){return{GaugeShare:(Ke,ot)=>Ne(Mt=>ge.request(cr,Ke,{...ot,...Mt}),"GaugeShare","query"),GaugeShares:(Ke,ot)=>Ne(Mt=>ge.request(Gr,Ke,{...ot,...Mt}),"GaugeShares","query"),LiquidityGauges:(Ke,ot)=>Ne(Mt=>ge.request(Bi,Ke,{...ot,...Mt}),"LiquidityGauges","query"),Pools:(Ke,ot)=>Ne(Mt=>ge.request(Ai,Ke,{...ot,...Mt}),"Pools","query"),PoolGauges:(Ke,ot)=>Ne(Mt=>ge.request(gi,Ke,{...ot,...Mt}),"PoolGauges","query")}}(new S.GraphQLClient(qe))}const Fo=["function aggregate(tuple[](address target, bytes callData) memory calls) public view returns (uint256 blockNumber, bytes[] memory returnData)"],Sa=(qe,ge)=>new g.Contract(qe,Fo,ge);class Zo{constructor(ge,Ne,Ke,ot={}){this.options={},this.calls=[],this.paths=[],this.multiAddress=ge,this.provider=Ne,this.interface=new d.Interface(Ke),this.options=ot}call(ge,Ne,Ke,ot){return this.calls.push([Ne,Ke,ot]),this.paths.push(ge),this}execute(ge={}){var Ne=this;return ie(function*(){const Ke=ge;return(yield Ne.executeMulticall()).forEach((ot,Mt)=>u.set(Ke,Ne.paths[Mt],ot.length>1?ot:ot[0])),Ne.calls=[],Ne.paths=[],Ke})()}executeMulticall(){var ge=this;return ie(function*(){const Ne=Sa(ge.multiAddress,ge.provider),[,Ke]=yield Ne.aggregate(ge.calls.map(([ot,Mt,Vt])=>[ot,ge.interface.encodeFunctionData(Mt,Vt)]),ge.options);return Ke.map((ot,Mt)=>ge.interface.decodeFunctionResult(ge.calls[Mt][1],ot))})()}}var Ma=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],$u=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vu=[{inputs:[{internalType:"contract IERC20",name:"_underlying",type:"address"},{internalType:"contract IERC20",name:"_bond",type:"address"},{internalType:"uint256",name:"_expiration",type:"uint256"},{internalType:"uint256",name:"_unitSeconds",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_percentFee",type:"uint256"},{internalType:"uint256",name:"_percentFeeGov",type:"uint256"},{internalType:"address",name:"_governance",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"collectedBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"collectedBond",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBond",type:"uint256"}],name:"FeeCollection",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"FEE_BOUND",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"bond",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"bondDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesBond",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesUnderlying",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"currentBalanceTokenIn",type:"uint256"},{internalType:"uint256",name:"currentBalanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"percentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"percentFeeGov",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"reserveX",type:"uint256"},{internalType:"uint256",name:"reserveY",type:"uint256"},{internalType:"bool",name:"out",type:"bool"}],name:"solveTradeInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"underlying",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"underlyingDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"unitSeconds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],au=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],zl=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ComposableStablePool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"TokenRateCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!0,internalType:"contract IRateProvider",name:"provider",type:"address"},{indexed:!1,internalType:"uint256",name:"cacheDuration",type:"uint256"}],name:"TokenRateProviderSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastJoinExitData",outputs:[{internalType:"uint256",name:"lastJoinExitAmplification",type:"uint256"},{internalType:"uint256",name:"lastPostJoinExitInvariant",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumBpt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRateCache",outputs:[{internalType:"uint256",name:"rate",type:"uint256"},{internalType:"uint256",name:"oldRate",type:"uint256"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"uint256",name:"expires",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isTokenExemptFromYieldProtocolFee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"setTokenRateCacheDuration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"updateTokenRateCache",outputs:[],stateMutability:"nonpayable",type:"function"}];function sl(qe,ge,Ne,Ke){return id.apply(this,arguments)}function id(){return id=ie(function*(qe,ge,Ne,Ke){if(0===qe.length)return qe;const ot=Object.values(Object.fromEntries([..._.Vault__factory.abi,...Te,...Ma,...$u,...vu,...au,...zl].map(yn=>[yn.name,yn]))),Mt=new Zo(ge,Ke,ot),Vt=Object.values(m.PoolFilter),Ht=[];qe.forEach(yn=>{Vt.includes(yn.poolType)?(Ht.push(yn),Mt.call(`${yn.id}.poolTokens`,Ne,"getPoolTokens",[yn.id]),Mt.call(`${yn.id}.totalSupply`,yn.address,"totalSupply"),(yn.poolType.includes("Linear")||"StablePhantom"===yn.poolType)&&Mt.call(`${yn.id}.virtualSupply`,yn.address,"getVirtualSupply"),"ComposableStable"===yn.poolType&&Mt.call(`${yn.id}.actualSupply`,yn.address,"getActualSupply"),"Weighted"===yn.poolType||"LiquidityBootstrapping"===yn.poolType||"Investment"===yn.poolType?(Mt.call(`${yn.id}.weights`,yn.address,"getNormalizedWeights"),Mt.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage")):"Stable"===yn.poolType||"MetaStable"===yn.poolType||"StablePhantom"===yn.poolType||"ComposableStable"===yn.poolType?(Mt.call(`${yn.id}.amp`,yn.address,"getAmplificationParameter"),Mt.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage")):"Element"===yn.poolType?Mt.call(`${yn.id}.swapFee`,yn.address,"percentFee"):yn.poolType.toString().includes("Linear")?(Mt.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage"),Mt.call(`${yn.id}.targets`,yn.address,"getTargets"),Mt.call(`${yn.id}.rate`,yn.address,"getWrappedTokenRate")):yn.poolType.toString().includes("Gyro")&&Mt.call(`${yn.id}.swapFee`,yn.address,"getSwapFeePercentage")):console.error(`Unknown pool type: ${yn.poolType} ${yn.id}`)});let un={};try{un=yield Mt.execute()}catch{throw"Issue with multicall execution."}const pn=[];return Object.entries(un).forEach(([yn,Zn],fr)=>{try{const{poolTokens:zr,swapFee:ci,weights:ai,totalSupply:li,virtualSupply:bi,actualSupply:os}=Zn;if("Stable"===Ht[fr].poolType||"MetaStable"===Ht[fr].poolType||"StablePhantom"===Ht[fr].poolType||"ComposableStable"===Ht[fr].poolType){if(!Zn.amp)return void console.error(`Stable Pool Missing Amp: ${yn}`);Ht[fr].amp=f.formatFixed(Zn.amp[0],3)}if(Ht[fr].poolType.includes("Linear")){if(!Zn.targets)return void console.error(`Linear Pool Missing Targets: ${yn}`);Ht[fr].lowerTarget=f.formatFixed(Zn.targets[0],18),Ht[fr].upperTarget=f.formatFixed(Zn.targets[1],18);const es=Ht[fr].wrappedIndex;if(void 0===es||void 0===Zn.rate)return void console.error(`Linear Pool Missing WrappedIndex or PriceRate: ${yn}`);Ht[fr].tokens[es].priceRate=f.formatFixed(Zn.rate,18)}if(Ht[fr].swapFee=f.formatFixed(ci,18),zr.tokens.forEach((es,Ds)=>{const ws=Ht[fr].tokens.find(Zs=>rs(Zs.address,es));if(!ws)throw`Pool Missing Expected Token: ${yn} ${es}`;ws.balance=f.formatFixed(zr.balances[Ds],ws.decimals),ai&&(ws.weight=f.formatFixed(ai[Ds],18))}),Ht[fr].poolType.includes("Linear")||"StablePhantom"===Ht[fr].poolType){if(void 0===bi)return void console.error(`Pool with pre-minted BPT missing Virtual Supply: ${yn}`);Ht[fr].totalShares=f.formatFixed(bi,18)}else if("ComposableStable"===Ht[fr].poolType){if(void 0===os)return void console.error(`ComposableStable missing Actual Supply: ${yn}`);Ht[fr].totalShares=f.formatFixed(os,18)}else Ht[fr].totalShares=f.formatFixed(li,18);pn.push(Ht[fr])}catch(zr){throw`Issue with pool onchain data: ${zr}`}}),pn}),id.apply(this,arguments)}class Lf{constructor(ge,Ne,Ke,ot){this.client=ge,this.provider=Ne,this.network=Ke,this.sorConfig=ot}getPools(){var ge=this;return ie(function*(){const Ne=(yield ge.getSubgraphPools()).filter(Ke=>!ge.network.poolsToIgnore||-1===ge.network.poolsToIgnore.findIndex(ot=>rs(ot,Ke.address))).map(ot=>({...ot,poolType:ot.poolType||"",tokens:(ot.tokens||[]).map(Mt=>({...Mt,weight:Mt.weight||null})),totalWeight:ot.totalWeight||void 0,amp:ot.amp||void 0,expiryTime:ot.expiryTime?u.parseInt(ot.expiryTime):void 0,unitSeconds:ot.unitSeconds?u.parseInt(ot.unitSeconds):void 0,principalToken:ot.principalToken||void 0,baseToken:ot.baseToken||void 0}));return!1===ge.sorConfig.fetchOnChainBalances?Ne:sl(Ne,ge.network.addresses.contracts.multicall,ge.network.addresses.contracts.vault,ge.provider)})()}getSubgraphPools(){var ge=this;return ie(function*(){const{pool0:Ne,pool1000:Ke,pool2000:ot}=yield ge.client.AllPools({where:{swapEnabled:!0,totalShares_gt:"0.000000000001"},orderBy:lo.TotalLiquidity,orderDirection:xi.Desc});return[...Ne,...Ke,...ot]})()}}class Uf{constructor(ge){this.chainId=ge}getNativeAssetPriceInToken(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.getTokenPriceInNativeAsset(ge);return""+1/parseFloat(Ke)})()}getTokenPriceInNativeAsset(ge){var Ne=this;return ie(function*(){const Ke=`https://api.coingecko.com/api/v3/simple/token_price/${Ne.platformId}?contract_addresses=${ge}&vs_currencies=${Ne.nativeAssetId}`,{data:ot}=yield R.default.get(Ke,{headers:{Accept:"application/json","Content-Type":"application/json"}});if(void 0===ot[ge.toLowerCase()][Ne.nativeAssetId])throw Error("No price returned from Coingecko");return ot[ge.toLowerCase()][Ne.nativeAssetId]})()}get platformId(){switch(this.chainId){case 1:case 42:return"ethereum";case 137:return"polygon-pos";case 42161:return"arbitrum-one";case 100:return"xdai"}return"2"}get nativeAssetId(){switch(this.chainId){case 1:case 42:case 42161:return"eth";case 137:return"";case 100:return"xdai"}return""}}class zc{constructor(ge,Ne){this.client=ge,this.weth=Ne.toLowerCase()}getNativeAssetPriceInToken(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.getLatestPriceInEthFromSubgraph(ge);if(!Ke)throw Error("No price found in the subgraph");return""+1/Ke})()}getLatestPriceInEthFromSubgraph(ge){var Ne=this;return ie(function*(){ge=ge.toLowerCase();const{latestPrices:Ke}=yield Ne.client.TokenLatestPrices({where:{asset_in:[ge,Ne.weth]}}),ot=u.keyBy(Ke,"id");if(ot[`${ge}-${Ne.weth}`])return parseFloat(ot[`${ge}-${Ne.weth}`].price);const Mt=Ke.filter(Vt=>Vt.asset===ge);for(const Vt of Mt){const Ht=ot[`${Vt.pricingAsset}-${Ne.weth}`];if(Ht)return parseFloat(Vt.price)*parseFloat(Ht.price)}return null})()}}function Mc(qe){var ge,Ne;if("number"==typeof qe.network){const Ke=Ao[qe.network];return{...Ke,urls:{...Ke.urls,subgraph:null!==(ge=qe.customSubgraphUrl)&&void 0!==ge?ge:Ke.urls.subgraph},tenderly:qe.tenderly}}return{...qe.network,urls:{...qe.network.urls,subgraph:null!==(Ne=qe.customSubgraphUrl)&&void 0!==Ne?Ne:qe.network.urls.subgraph},tenderly:qe.network.tenderly}}class Yu extends m.SOR{constructor(ge){const Ne=Mc(ge),Ke=Yu.getSorConfig(ge),ot=Yu.getSorNetworkConfig(Ne),Mt=new w.JsonRpcProvider(ge.rpcUrl,ge.network),Vt=Ns(Ne.urls.subgraph);super(Mt,ot,Yu.getPoolDataService(Ne,Ke,Mt,Vt),Yu.getTokenPriceService(Ne,Ke,Vt))}static getSorConfig(ge){return{tokenPriceService:"coingecko",poolDataService:"subgraph",fetchOnChainBalances:!0,...ge.sor}}static getSorNetworkConfig(ge){var Ne;return{...ge,vault:ge.addresses.contracts.vault,weth:ge.addresses.tokens.wrappedNativeAsset,lbpRaisingTokens:null===(Ne=ge.addresses.tokens)||void 0===Ne?void 0:Ne.lbpRaisingTokens,wETHwstETH:ge.pools.wETHwstETH,connectingTokens:ge.sorConnectingTokens}}static getPoolDataService(ge,Ne,Ke,ot){return"object"==typeof Ne.poolDataService?Ne.poolDataService:new Lf(ot,Ke,ge,Ne)}static getTokenPriceService(ge,Ne,Ke){return"object"==typeof Ne.tokenPriceService?Ne.tokenPriceService:("subgraph"===Ne.tokenPriceService&&new zc(Ke,ge.addresses.tokens.wrappedNativeAsset),new Uf(ge.chainId))}}function pu(qe){if(qe.poolIds.length>2)throw new Error("Simple flash swap only supports a maximum of two pools");if(qe.assets.length>2)throw new Error("Simple flash swap only supports a maximum of to two assets (tokens)")}function b1(qe,ge){return[{poolId:qe[0],assetInIndex:0,assetOutIndex:1,amount:ge,userData:"0x"},{poolId:qe[1],assetInIndex:1,assetOutIndex:0,amount:"0",userData:"0x"}]}function yh(qe){return-1*Number(qe)}function hd(qe){return u.sum(qe)}var Ad=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"wstETH",type:"address"},{internalType:"contract IBalancerMinter",name:"minter",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"exitPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge[]",name:"gauges",type:"address[]"}],name:"gaugeClaimRewards",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeDeposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"gaugeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"gaugeSetMinterApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeWithdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getEntrypoint",outputs:[{internalType:"contract IBalancerRelayer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"},{internalType:"uint256",name:"value",type:"uint256"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"ref",type:"uint256"}],name:"peekChainedReferenceValue",outputs:[{internalType:"uint256",name:"value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"},{internalType:"bytes",name:"authorisation",type:"bytes"}],name:"setRelayerApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETHAndWrap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapWstETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20Permit",name:"token",type:"address"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20PermitDAI",name:"token",type:"address"},{internalType:"address",name:"holder",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"bool",name:"allowed",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermitDAI",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapStETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"uAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"}];const Vh={"0xae7ab96520de3a18e5e111b5eaab095312d7fe84":"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0","0xd46ba6d942050d489dbd938a2c909a5d5039a161":"0xedb171c18ce90b633db442f2a6f72874093b49ef","0x1e6bb68acec8fefbd87d192be09bb274170a0548":"0xF03387d8d0FF326ab586A58E0ab4121d106147DF"};function j0(qe){let ge=qe;return Vh.hasOwnProperty(qe)&&(ge=Vh[qe]),ge}var lf;function bh(qe,ge,Ne){const{tokens:Ke,contracts:ot}=zi(Ne);let Mt={id:lf.vault,address:ot.vault};return Ke.stETH&&ot.lidoRelayer&&[qe,ge].includes(Ke.stETH)&&(Mt={id:lf.lido,address:ot.lidoRelayer}),Mt}function Hh(qe){let ge=_.Vault__factory.abi;return qe.id===lf.lido&&(ge=Ad),ge.filter(Ne=>Ne.name&&["swap","batchSwap"].includes(Ne.name))}function nc(qe){return{amount:qe,max:ge=>qe.mul(1e3+ge).div(1e3),min:ge=>qe.mul(1e3-ge).div(1e3)}}function Al(qe,ge){const Ne=ge===E.SwapType.SwapExactIn?qe.swapAmount:qe.returnAmount,Ke=ge===E.SwapType.SwapExactIn?qe.returnAmount:qe.swapAmount,ot=ge===E.SwapType.SwapExactIn?qe.swapAmountForSwaps||qe.swapAmount:qe.returnAmountFromSwaps||qe.returnAmount,Mt=ge===E.SwapType.SwapExactIn?qe.returnAmountFromSwaps||qe.returnAmount:qe.swapAmountForSwaps||qe.swapAmount,Vt=j0(qe.tokenIn),Ht=j0(qe.tokenOut);return{...qe,amountIn:Ne,amountOut:Ke,amountInForLimits:nc(ot),amountOutForLimits:nc(Mt),tokenInForSwaps:Vt,tokenOutFromSwaps:Ht}}!function(qe){qe[qe.vault=1]="vault",qe[qe.lido=2]="lido"}(lf||(lf={}));class V0{constructor(ge,Ne,Ke){this.kind=Ne,this.chainId=Ke,this.functionName="swap",this.swapInfo=Al(ge,Ne),this.relayer=bh(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(ge,Ne){this.funds={sender:ge,recipient:Ne||ge,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(ge){this.deadline=ge.toString()}get amount(){return this.kind===E.SwapType.SwapExactOut?this.swapInfo.amountOutForLimits.amount:this.swapInfo.amountInForLimits.amount}setLimits(ge){this.limit=this.kind===E.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(ge).toString():this.swapInfo.amountInForLimits.max(ge).toString()}get singleSwap(){return{poolId:this.swapInfo.swaps[0].poolId,kind:this.kind,assetIn:this.swapInfo.tokenInForSwaps,assetOut:this.swapInfo.tokenOutFromSwaps,amount:this.amount.toString(),userData:"0x"}}attributes(){var ge;if(!this.funds||!this.limit||!this.deadline)throw new Error("Uninitialized arguments");let Ne={request:this.singleSwap,funds:this.funds,limit:this.limit,deadline:this.deadline};const Ke=this.fragment();return Ke[0].inputs&&(null===(ge=Ke[0].inputs)||void 0===ge?void 0:ge.length)>4&&(Ne={...Ne,value:"0",outputReference:"0"}),Ne}data(){return new d.Interface(this.fragment()).encodeFunctionData("swap",Object.values(this.attributes()))}value(ge){let Ne=f.BigNumber.from(0);return this.swapInfo.tokenIn===x.AddressZero&&(Ne=this.kind===E.SwapType.SwapExactIn?this.swapInfo.amountIn:this.swapInfo.amountInForLimits.max(ge)),Ne}to(){return this.relayer.address}fragment(){return Hh(this.relayer).filter(ge=>ge.name===this.functionName)}}class v1{constructor(ge,Ne,Ke){this.kind=Ne,this.chainId=Ke,this.functionName="batchSwap",this.swapInfo=Al(ge,Ne),this.relayer=bh(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(ge,Ne){this.funds={sender:ge,recipient:Ne||ge,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(ge){this.deadline=ge}minAmountOut(ge){return this.kind===E.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(ge):this.swapInfo.amountOutForLimits.amount}maxAmountIn(ge){return this.kind===E.SwapType.SwapExactOut?this.swapInfo.amountInForLimits.max(ge):this.swapInfo.amountInForLimits.amount}setLimits(ge){this.limits=this.swapInfo.tokenAddresses.map(Ne=>{let Ke=f.BigNumber.from(0);return Ne===this.swapInfo.tokenInForSwaps&&(Ke=this.maxAmountIn(ge)),Ne===this.swapInfo.tokenOutFromSwaps&&(Ke=this.minAmountOut(ge).mul(-1)),Ke}).map(Ne=>Ne.toString().split(".")[0])}attributes(){var ge;if(!this.funds||!this.limits||!this.deadline)throw new Error("Uninitialized arguments");let Ne={kind:this.kind,swaps:this.swapInfo.swaps,assets:this.swapInfo.tokenAddresses,funds:this.funds,limits:this.limits,deadline:this.deadline};const Ke=this.fragment();return Ke[0].inputs&&(null===(ge=Ke[0].inputs)||void 0===ge?void 0:ge.length)>6&&(Ne={...Ne,value:"0",outputReferences:[]}),Ne}data(){return new d.Interface(this.fragment()).encodeFunctionData("batchSwap",Object.values(this.attributes()))}value(ge){let Ne=f.BigNumber.from(0);return this.swapInfo.tokenIn===x.AddressZero&&(Ne=this.maxAmountIn(ge)),Ne}to(){return this.relayer.address}fragment(){return Hh(this.relayer).filter(ge=>ge.name===this.functionName)}}class df{constructor(ge){ge instanceof m.SOR?(this.sor=ge,this.chainId=this.sor.provider._network.chainId):(this.sor=new Yu(ge),this.chainId=ge.network),this.vaultContract=_.Vault__factory.connect(_s,this.sor.provider)}static getLimitsForSlippage(ge,Ne,Ke,ot,Mt,Vt){return so(ge,Ne,Ke,ot,Mt,Vt).map(Ht=>Ht.toString())}findRouteGivenIn({tokenIn:ge,tokenOut:Ne,amount:Ke,gasPrice:ot,maxPools:Mt=4}){var Vt=this;return ie(function*(){return Vt.sor.getSwaps(ge,Ne,m.SwapTypes.SwapExactIn,Ke,{gasPrice:ot,maxPools:Mt})})()}findRouteGivenOut({tokenIn:ge,tokenOut:Ne,amount:Ke,gasPrice:ot,maxPools:Mt}){var Vt=this;return ie(function*(){return Vt.sor.getSwaps(ge,Ne,m.SwapTypes.SwapExactOut,Ke,{gasPrice:ot,maxPools:Mt})})()}buildSwap({userAddress:ge,recipient:Ne,swapInfo:Ke,kind:ot,deadline:Mt,maxSlippage:Vt}){if(!this.chainId)throw"Missing network configuration";const Ht=Ke.swaps.length>1?new v1(Ke,ot,this.chainId):new V0(Ke,ot,this.chainId);Ht.setFunds(ge,Ne),Ht.setDeadline(Mt),Ht.setLimits(Vt);const un=Ht.to(),{functionName:pn}=Ht;return{to:un,functionName:pn,attributes:Ht.attributes(),data:Ht.data(),value:Ht.value(Vt)}}static encodeBatchSwap(ge){return _.Vault__factory.createInterface().encodeFunctionData("batchSwap",[ge.kind,ge.swaps,ge.assets,ge.funds,ge.limits,ge.deadline])}static encodeSimpleFlashSwap(ge){return this.encodeBatchSwap(function({poolIds:Ne,assets:Ke,flashLoanAmount:ot,walletAddress:Mt}){pu({poolIds:Ne,assets:Ke});const Vt=b1(Ne,ot);return{kind:E.SwapType.SwapExactIn,swaps:Vt,assets:Ke,funds:{sender:Mt,fromInternalBalance:!1,recipient:Mt,toInternalBalance:!1},limits:["0","0"],deadline:"999999999999999999"}}(ge))}fetchPools(){var ge=this;return ie(function*(){return ge.sor.fetchPools()})()}getPools(){return this.sor.getPools()}queryBatchSwap(ge){var Ne=this;return ie(function*(){return yield rr(Ne.vaultContract,ge.kind,ge.swaps,ge.assets)})()}queryBatchSwapWithSor(ge){var Ne=this;return ie(function*(){return yield function(qe,ge,Ne){return Ir.apply(this,arguments)}(Ne.sor,Ne.vaultContract,ge)})()}querySimpleFlashSwap(ge){var Ne=this;return ie(function*(){return yield(Ke=ie(function*(ot){pu(ot);const[Mt,Vt]=ot.assets;try{const Ht=yield rr(ot.vaultContract,E.SwapType.SwapExactIn,b1(ot.poolIds,ot.flashLoanAmount),ot.assets),un={[Mt]:yh(Ht[0]).toString(),[Vt]:yh(Ht[1]).toString()};return{profits:un,isProfitable:hd([un[Mt],un[Vt]])>0}}catch(Ht){throw`Failed to querySimpleFlashSwap: ${Ht}`}}),function(ot){return Ke.apply(this,arguments)})({...ge,vaultContract:Ne.vaultContract});var Ke})()}getSorSwap(ge){var Ne=this;return ie(function*(){return yield Ei(ge.tokenIn,ge.tokenOut,ge.swapType,ge.amount,Ne.sor)})()}}const Zd=new d.Interface(Ad);class Qs{constructor(ge){this.swaps=ge instanceof df?ge:new df(ge)}static isChainedReference(ge){const Ne=f.BigNumber.from(ge),Ke=f.BigNumber.from("0xfff0000000000000000000000000000000000000000000000000000000000000"),ot=Ne.toBigInt()&Ke.toBigInt();return"0xba10000000000000000000000000000000000000000000000000000000000000"===f.BigNumber.from(ot)._hex.toString()}static encodeApproveVault(ge,Ne){return Zd.encodeFunctionData("approveVault",[ge,Ne])}static encodeSetRelayerApproval(ge,Ne,Ke){return Zd.encodeFunctionData("setRelayerApproval",[ge,Ne,Ke])}static encodeGaugeWithdraw(ge,Ne,Ke,ot){return Zd.encodeFunctionData("gaugeWithdraw",[ge,Ne,Ke,ot])}static encodeGaugeDeposit(ge,Ne,Ke,ot){return Zd.encodeFunctionData("gaugeDeposit",[ge,Ne,Ke,ot])}static encodeBatchSwap(ge){return Zd.encodeFunctionData("batchSwap",[ge.swapType,ge.swaps,ge.assets,ge.funds,ge.limits,ge.deadline,ge.value,ge.outputReferences])}static encodeExitPool(ge){return Zd.encodeFunctionData("exitPool",[ge.poolId,ge.poolKind,ge.sender,ge.recipient,ge.exitPoolRequest,ge.outputReferences])}static encodeJoinPool(ge){return Zd.encodeFunctionData("joinPool",[ge.poolId,ge.kind,ge.sender,ge.recipient,ge.joinPoolRequest,ge.value,ge.outputReference])}static encodeWrapAaveDynamicToken(ge){return Zd.encodeFunctionData("wrapAaveDynamicToken",[ge.staticToken,ge.sender,ge.recipient,ge.amount,ge.fromUnderlying,ge.outputReference])}static encodeUnwrapAaveStaticToken(ge){return Zd.encodeFunctionData("unwrapAaveStaticToken",[ge.staticToken,ge.sender,ge.recipient,ge.amount,ge.toUnderlying,ge.outputReferences])}static encodePeekChainedReferenceValue(ge){return Zd.encodeFunctionData("peekChainedReferenceValue",[ge])}static toChainedReference(ge,Ne=!0){const Ke=Ne?Qs.CHAINED_REFERENCE_TEMP_PREFIX:Qs.CHAINED_REFERENCE_READONLY_PREFIX,ot=`0x${Ke}${"0".repeat(64-Ke.length)}`;return f.BigNumber.from(ot).add(ge)}static fromChainedReference(ge,Ne=!0){const Ke=Ne?Qs.CHAINED_REFERENCE_TEMP_PREFIX:Qs.CHAINED_REFERENCE_READONLY_PREFIX,ot=`0x${Ke}${"0".repeat(64-Ke.length)}`;return f.BigNumber.from(ge).sub(f.BigNumber.from(ot))}static constructExitCall(ge){const{assets:Ne,minAmountsOut:Ke,userData:ot,toInternalBalance:Mt,poolId:Vt,poolKind:Ht,sender:un,recipient:pn,outputReferences:yn}=ge;return Qs.encodeExitPool({poolId:Vt,poolKind:Ht,sender:un,recipient:pn,outputReferences:yn,exitPoolRequest:{assets:Ne,minAmountsOut:Ke,userData:ot,toInternalBalance:Mt}})}static constructJoinCall(ge){const{assets:Ne,maxAmountsIn:Ke,userData:ot,fromInternalBalance:Mt,poolId:Vt,kind:Ht,sender:un,recipient:pn,value:yn,outputReference:Zn}=ge;return Qs.encodeJoinPool({poolId:Vt,kind:Ht,sender:un,recipient:pn,value:yn,outputReference:Zn,joinPoolRequest:{assets:Ne,maxAmountsIn:Ke,userData:ot,fromInternalBalance:Mt}})}fetchPools(){var ge=this;return ie(function*(){return ge.swaps.fetchPools()})()}getPools(){return this.swaps.getPools()}exitPoolAndBatchSwap(ge){var Ne=this;return ie(function*(){const Ke=x.WeiPerEther.sub(f.BigNumber.from(ge.slippage)),ot=ge.expectedAmountsOut.map(Zn=>f.BigNumber.from(Zn).mul(Ke).div(x.WeiPerEther).toString()),Mt=[];ge.exitTokens.forEach((Zn,fr)=>{const zr=Qs.toChainedReference(fr);Mt.push({index:fr,key:zr})});const Vt=Qs.constructExitCall({assets:ge.exitTokens,minAmountsOut:ot,userData:ge.userData,toInternalBalance:!0,poolId:ge.poolId,poolKind:0,sender:ge.exiter,recipient:ge.exiter,outputReferences:Mt,exitPoolRequest:{}}),Ht=yield Ne.swaps.queryBatchSwapWithSor({tokensIn:ge.exitTokens,tokensOut:ge.finalTokensOut,swapType:E.SwapType.SwapExactIn,amounts:ot,fetchPools:ge.fetchPools});if(Ht.returnAmounts.includes("0"))throw new Oi(E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT);Ht.swaps.forEach(Zn=>{const zr=ge.exitTokens.indexOf(Ht.assets[Zn.assetInIndex]);-1!==zr&&(Zn.amount=Mt[zr].key.toString())});const un=x.WeiPerEther.add(ge.slippage);ge.exitTokens.forEach((Zn,fr)=>{const zr=Ht.assets.map(ci=>ci.toLowerCase()).indexOf(Zn.toLowerCase());-1!==zr&&(Ht.deltas[zr]=f.BigNumber.from(ge.expectedAmountsOut[fr]).mul(un).div(x.WeiPerEther).toString())});const pn=df.getLimitsForSlippage(ge.exitTokens,ge.finalTokensOut,E.SwapType.SwapExactIn,Ht.deltas,Ht.assets,"0");return{function:"multicall",params:[Vt,Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Ht.swaps,assets:Ht.assets,funds:{sender:ge.exiter,recipient:ge.swapRecipient,fromInternalBalance:!0,toInternalBalance:!1},limits:pn.map(Zn=>Zn.toString()),deadline:x.MaxUint256,value:"0",outputReferences:[]})],outputs:{amountsOut:Ht.returnAmounts}}})()}swapUnwrapAaveStaticExactIn(ge,Ne,Ke,ot,Mt,Vt,Ht={fetchPools:!0,fetchOnChain:!1}){var un=this;return ie(function*(){const pn=yield un.swaps.queryBatchSwapWithSor({tokensIn:ge,tokensOut:Ne,swapType:E.SwapType.SwapExactIn,amounts:Ke,fetchPools:Ht});if(pn.returnAmounts.includes("0"))throw new Oi(E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT);const yn=df.getLimitsForSlippage(ge,Ne,E.SwapType.SwapExactIn,pn.deltas,pn.assets,Vt);return{function:"multicall",params:un.encodeSwapUnwrap(Ne,E.SwapType.SwapExactIn,pn.swaps,pn.assets,Mt,yn),outputs:{amountsOut:pn.returnAmounts.map((Zn,fr)=>{const zr=f.BigNumber.from(Zn).abs().mul(ot[fr]).div(x.WeiPerEther);if(!zr.gt(x.Zero))throw new Oi(E.BalancerErrorCode.UNWRAP_ZERO_AMOUNT);return zr.toString()})}}})()}swapUnwrapAaveStaticExactOut(ge,Ne,Ke,ot,Mt,Vt,Ht={fetchPools:!0,fetchOnChain:!1}){var un=this;return ie(function*(){const pn=Ke.map((fr,zr)=>{const ci=f.BigNumber.from(fr).mul(x.WeiPerEther).div(ot[zr]);if(!ci.gt(x.Zero))throw new Oi(E.BalancerErrorCode.WRAP_ZERO_AMOUNT);return ci.toString()}),yn=yield un.swaps.queryBatchSwapWithSor({tokensIn:ge,tokensOut:Ne,swapType:E.SwapType.SwapExactOut,amounts:pn,fetchPools:Ht});if(yn.returnAmounts.includes("0"))throw new Oi(E.BalancerErrorCode.SWAP_ZERO_RETURN_AMOUNT);const Zn=df.getLimitsForSlippage(ge,Ne,E.SwapType.SwapExactOut,yn.deltas,yn.assets,Vt);return{function:"multicall",params:un.encodeSwapUnwrap(Ne,E.SwapType.SwapExactOut,yn.swaps,yn.assets,Mt,Zn),outputs:{amountsIn:yn.returnAmounts.map(fr=>fr.toString())}}})()}encodeSwapUnwrap(ge,Ne,Ke,ot,Mt,Vt){const Ht=[],un=[];return ge.forEach((pn,yn)=>{const Zn=ot.findIndex(ci=>ci.toLowerCase()===pn.toLowerCase());if(-1===Zn)return;const fr=Qs.toChainedReference(yn);Ht.push({index:Zn,key:fr});const zr=Qs.encodeUnwrapAaveStaticToken({staticToken:pn,sender:Mt.recipient,recipient:Mt.sender,amount:fr,toUnderlying:!0,outputReferences:0});un.push(zr)}),[Qs.encodeBatchSwap({swapType:Ne,swaps:Ke,assets:ot,funds:Mt,limits:Vt.map(pn=>pn.toString()),deadline:x.MaxUint256,value:"0",outputReferences:Ht}),...un]}}Qs.CHAINED_REFERENCE_TEMP_PREFIX="ba10",Qs.CHAINED_REFERENCE_READONLY_PREFIX="ba11",Qs.signRelayerApproval=function(){var qe=ie(function*(ge,Ne,Ke,ot){const Mt=ot.interface.encodeFunctionData("setRelayerApproval",[Ne,ge,!0]),Vt=yield ke.signSetRelayerApprovalAuthorization(ot,Ke,ge,Mt);return ke.encodeCalldataAuthorization("0x",x.MaxUint256,Vt)});return function(ge,Ne,Ke,ot){return qe.apply(this,arguments)}}();class t0{constructor(ge){this.url=Mc(ge).urls.subgraph,this.client=this.initClient()}initClient(){return Ff(new S.GraphQLClient(this.url))}}class jf{constructor(ge,Ne){this.swaps=Ne||new df(ge)}fetchPools(){var ge=this;return ie(function*(){return ge.swaps.fetchPools()})()}getPools(){return this.swaps.getPools()}getSpotPrice(ge,Ne,Ke=[]){var ot=this;return ie(function*(){0===Ke.length&&(yield ot.fetchPools(),Ke=ot.getPools());const Mt=m.parseToPoolsDict(Ke,0),Vt=ot.swaps.sor.routeProposer.getCandidatePathsFromDict(ge,Ne,0,Mt,4);if(0===Vt.length)throw new Oi(E.BalancerErrorCode.UNSUPPORTED_PAIR);return m.getSpotPriceAfterSwapForPath(Vt[0],0,m.ZERO).toString()})()}}var hc=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];function n0(qe){return Math.round(Date.now()/1e3)-qe<86400}var H0=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"locktime",type:"uint256",indexed:!0},{name:"type",type:"int128",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Supply",inputs:[{name:"prevSupply",type:"uint256",indexed:!1},{name:"supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"token_addr",type:"address"},{name:"_name",type:"string"},{name:"_symbol",type:"string"},{name:"_authorizer_adaptor",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"admin",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"nonpayable",type:"function",name:"commit_smart_wallet_checker",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"apply_smart_wallet_checker",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"get_last_user_slope",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"user_point_history__ts",inputs:[{name:"_addr",type:"address"},{name:"_idx",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked__end",inputs:[{name:"_addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"checkpoint",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_for",inputs:[{name:"_addr",type:"address"},{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"create_lock",inputs:[{name:"_value",type:"uint256"},{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_amount",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_unlock_time",inputs:[{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"},{name:"_t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOfAt",inputs:[{name:"addr",type:"address"},{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[{name:"t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupplyAt",inputs:[{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"amount",type:"int128"},{name:"end",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"epoch",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"point_history",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_history",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_epoch",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"slope_changes",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"future_smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]}];class ac{constructor(ge,Ne){this.addresses=ge,this.provider=Ne}getLockInfo(ge){var Ne=this;return ie(function*(){if(!Ne.addresses.veBal)throw new Error("veBal address must be defined");const Ke=new Zo(Ne.addresses.multicall,Ne.provider,H0);Ke.call("locked",Ne.addresses.veBal,"locked",[ge]),Ke.call("epoch",Ne.addresses.veBal,"epoch"),Ke.call("totalSupply",Ne.addresses.veBal,"totalSupply()");const ot=yield Ke.execute();return Ne.formatLockInfo(ot)})()}formatLockInfo(ge){const[Ne,Ke]=ge.locked,ot=Ne.gt(0),Mt=1e3*Ke.toNumber(),Vt=ot&&Date.now()>Mt;return{lockedEndDate:Mt,lockedAmount:Ii(Ne),totalSupply:Ii(ge.totalSupply),epoch:Ii(ge.epoch,0),hasExistingLock:ot,isExpired:Vt}}}var Id=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"votingEscrow",type:"address"},{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newImplementation",type:"address"}],name:"DelegationImplementationUpdated",type:"event"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjustedBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjusted_balance_of",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDelegationImplementation",outputs:[{internalType:"contract IVeDelegation",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVotingEscrow",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"killDelegation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],name:"setDelegation",outputs:[],stateMutability:"nonpayable",type:"function"}];class Au{constructor(ge,Ne){if(!ge.veBalProxy)throw new Error("veBalProxy address must be defined");this.instance=new g.Contract(ge.veBalProxy,Id,Ne)}getAdjustedBalance(ge){var Ne=this;return ie(function*(){return Ii(yield Ne.instance.adjustedBalanceOf(ge))})()}}var x0=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Sd=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];const r0=(qe,ge,Ne)=>{switch(Ne){case 3:return new g.Contract(qe,Sd,ge);case 4:return new g.Contract(qe,x0,ge);default:throw new Error("relayer not supported")}};var Yd=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"UpdateLiquidityLimit",inputs:[{name:"user",type:"address",indexed:!0},{name:"original_balance",type:"uint256",indexed:!1},{name:"original_supply",type:"uint256",indexed:!1},{name:"working_balance",type:"uint256",indexed:!1},{name:"working_supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Transfer",inputs:[{name:"_from",type:"address",indexed:!0},{name:"_to",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Approval",inputs:[{name:"_owner",type:"address",indexed:!0},{name:"_spender",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"minter",type:"address"},{name:"veBoostProxy",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"},{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"transferFrom",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"transfer",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"approve",inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"permit",inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"},{name:"_value",type:"uint256"},{name:"_deadline",type:"uint256"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"increaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_added_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"decreaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_subtracted_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"user_checkpoint",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"set_rewards_receiver",inputs:[{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"kick",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_reward_token",inputs:[{name:"_reward_token",type:"address"},{name:"_amount",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"add_reward",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_reward_distributor",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_killed",inputs:[{name:"_is_killed",type:"bool"}],outputs:[]},{stateMutability:"view",type:"function",name:"claimed_reward",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward",inputs:[{name:"_user",type:"address"},{name:"_reward_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward_write",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_tokens",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"future_epoch_time",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"inflation_rate",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"version",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"allowance",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"initialize",inputs:[{name:"_lp_token",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32"}]},{stateMutability:"view",type:"function",name:"nonces",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"factory",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"lp_token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"is_killed",inputs:[],outputs:[{name:"",type:"bool"}]},{stateMutability:"view",type:"function",name:"reward_count",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"reward_data",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"token",type:"address"},{name:"distributor",type:"address"},{name:"period_finish",type:"uint256"},{name:"rate",type:"uint256"},{name:"last_update",type:"uint256"},{name:"integral",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"rewards_receiver",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"reward_integral_for",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_balances",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_fraction",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"period",inputs:[],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"reward_tokens",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"period_timestamp",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]}];class kd{constructor(ge,Ne){this.contractAddresses="number"==typeof ge?Ao[ge].addresses.contracts:ge,this.vault=_.Vault__factory.connect(this.contractAddresses.vault,Ne),this.balancerHelpers=_.BalancerHelpers__factory.connect(this.contractAddresses.balancerHelpers,Ne),this.contractAddresses.lidoRelayer&&(this.lidoRelayer=_.LidoRelayer__factory.connect(this.contractAddresses.lidoRelayer,Ne)),this.multicall=Sa(this.contractAddresses.multicall,Ne),this.contractAddresses.relayerV3&&(this.relayerV3=r0(this.contractAddresses.relayerV3,Ne,3)),this.contractAddresses.relayerV4&&(this.relayerV4=r0(this.contractAddresses.relayerV4,Ne,4)),this.contractAddresses.veBal&&(this.veBal=new ac(this.contractAddresses,Ne)),this.contractAddresses.veBalProxy&&(this.veBalProxy=new Au(this.contractAddresses,Ne))}get contracts(){return{vault:this.vault,balancerHelpers:this.balancerHelpers,lidoRelayer:this.lidoRelayer,multicall:this.multicall,relayerV3:this.relayerV3,relayerV4:this.relayerV4,veBal:this.veBal,veBalProxy:this.veBalProxy,ERC20:this.getErc20,liquidityGauge:this.getLiquidityGauge}}getErc20(ge,Ne){return new g.Contract(ge,hc,Ne)}getLiquidityGauge(ge,Ne){return new g.Contract(ge,Yd,Ne)}}const ql={1:{relayer:"0x886A3Ec7bcC508B8795990B60Fa21f85F9dB7948",staBal3:{id:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",address:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42",gauge:"0x34f33cdaed8ba0e1ceece80e5f4a73bcf234cfac",assetOrder:["DAI","USDC","USDT"]},bbausd1:{id:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe",address:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2",gauge:"0x68d019f64a7aa97e2d4e7363aee42251d08124fb",assetOrder:["bb-a-USDT","bb-a-DAI","bb-a-USDC"]},bbausd2:{id:"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d",address:"0xa13a9247ea42d743238089903570127dda72fe44",gauge:"0xa6325e799d266632d347e41265a69af111b05403"},linearUsdc1:{id:"0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc",address:"0x9210F1204b5a24742Eba12f710636D76240dF3d0"},linearDai1:{id:"0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb",address:"0x804CdB9116a10bB78768D3252355a1b18067bF8f"},linearUsdt1:{id:"0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd",address:"0x2BBf681cC4eb09218BEe85EA2a5d3D13Fa40fC0C"},linearUsdc2:{id:"0x82698AECC9E28E9BB27608BD52CF57F704BD1B83000000000000000000000336",address:"0x82698aeCc9E28e9Bb27608Bd52cF57f704BD1B83"},linearDai2:{id:"0xAE37D54AE477268B9997D4161B96B8200755935C000000000000000000000337",address:"0xae37D54Ae477268B9997d4161B96b8200755935c"},linearUsdt2:{id:"0x2F4EB100552EF93840D5ADC30560E5513DFFFACB000000000000000000000334",address:"0x2F4eb100552ef93840d5aDC30560E5513DFfFACb"},maiusd:{id:"",address:"",gauge:"",assetOrder:["USDT","miMATIC","DAI","USDC"]},maibbausd:{id:"",address:"",gauge:"",assetOrder:["bb-a-USD","miMATIC"]},DAI:"0x6b175474e89094c44da98b954eedeac495271d0f",USDC:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",USDT:"0xdAC17F958D2ee523a2206206994597C13D831ec7",waDAI:"0x02d60b84491589974263d922d9cc7a3152618ef6",waUSDC:"0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de",waUSDT:"0xf8fd466f12e236f4c96f7cce6c79eadb819abf58",miMATIC:""},5:{relayer:"0x7b9B6f094DC2Bd1c12024b0D9CC63d6993Be1888",staBal3:{id:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062",address:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2",gauge:"0xfd364cda96bb7db06b65706182c448a73f0a5f9a",assetOrder:["USDT","DAI","USDC"]},staBal3_2:{id:"0xff9d677474d4344379924e10b68c8fea67e03294000000000000000000000072",address:"0xff9d677474d4344379924e10b68c8fea67e03294",gauge:"0x4e4ebf2aa90e41174d716a5168895357762d68af",assetOrder:["USDT","DAI","USDC"]},staBal3_3:{id:"0x3bfc8a0509f1a68aefd446f6c19bf37b3c75a8fc0000000000000000000000a5",address:"0x3bfc8a0509f1a68aefd446f6c19bf37b3c75a8fc",gauge:"0x7776e1008d7c20ab54aa57a7c44fc7de602de29a",assetOrder:["USDT","DAI","USDC"]},bbausd1:{id:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",address:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd",gauge:"0xa2d0ea81a47d68598922cd54c59249ff58c2a3ff",assetOrder:["bb-a-USDC","bb-a-DAI","bb-a-USDT"]},bbausd2:{id:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",address:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd",gauge:"0xa2d0ea81a47d68598922cd54c59249ff58c2a3ff"},linearUsdc1:{id:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc8668100000000000000000000005c",address:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc86681"},linearDai1:{id:"0x5cea6a84ed13590ed14903925fa1a73c36297d9900000000000000000000005d",address:"0x5cea6a84ed13590ed14903925fa1a73c36297d99"},linearUsdt1:{id:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f00000000000000000000005e",address:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f"},linearUsdc2:{id:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc8668100000000000000000000005c",address:"0x0595d1df64279ddb51f1bdc405fe2d0b4cc86681"},linearDai2:{id:"0x5cea6a84ed13590ed14903925fa1a73c36297d9900000000000000000000005d",address:"0x5cea6a84ed13590ed14903925fa1a73c36297d99"},linearUsdt2:{id:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f00000000000000000000005e",address:"0xefd681a82970ac5d980b9b2d40499735e7bf3f1f"},maiusd:{id:"0x6a8f9ab364b85725973d2a33cb9aae2dac43b5e30000000000000000000000a6",address:"0x6a8f9ab364b85725973d2a33cb9aae2dac43b5e3",gauge:"0x58141bdcecb7fbae006964f4131cf6f65c948357",assetOrder:["USDT","miMATIC","DAI","USDC"]},maibbausd:{id:"0xb04b03b78cf79788a1931545bd2744161029648f0000000000000000000000a8",address:"0xb04b03b78cf79788a1931545bd2744161029648f",gauge:"0xdc3f6fc8898830e53c777543fe252b14f22680d4",assetOrder:["bb-a-USD","miMATIC","MAI BSP"]},USDT:"0x1f1f156e0317167c11aa412e3d1435ea29dc3cce",DAI:"0x8c9e6c40d3402480ace624730524facc5482798c",USDC:"0xe0c9275e44ea80ef17579d33c55136b7da269aeb",waDAI:"0x89534a24450081aa267c79b07411e9617d984052",waUSDC:"0x811151066392fd641fe74a9b55a712670572d161",waUSDT:"0x4cb1892fddf14f772b2e39e299f44b2e5da90d04",miMATIC:"0x398106564948feeb1fedea0709ae7d969d62a391"},137:{relayer:"0xcf6a66E32dCa0e26AcC3426b851FD8aCbF12Dac7",staBal3:{id:"",address:"",gauge:"",assetOrder:["USDT","DAI","USDC"]},bbausd1:{id:"",address:"",gauge:"",assetOrder:["bb-a-USDC","bb-a-DAI","bb-a-USDT"]},bbausd2:{id:"0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b",address:"0x48e6b98ef6329f8f0a30ebb8c7c960330d648085",gauge:""},linearUsdc1:{id:"",address:""},linearDai1:{id:"",address:""},linearUsdt1:{id:"",address:""},linearUsdc2:{id:"0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759",address:"0xf93579002dbe8046c43fefe86ec78b1112247bb8"},linearDai2:{id:"0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758",address:"0x178e029173417b1f9c8bc16dcec6f697bc323746"},linearUsdt2:{id:"0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a",address:"0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea6"},maiusd:{id:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012",address:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42",gauge:"0x72843281394e68de5d55bcf7072bb9b2ebc24150",assetOrder:["USDC","DAI","miMATIC","USDT"]},maibbausd:{id:"0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e",address:"0xb54b2125b711cd183edd3dd09433439d53961652",gauge:"0x9a105ef22a59484aa2731c357049f6a13d0891f5",assetOrder:["bb-a-USD","miMATIC"]},USDT:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",DAI:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",USDC:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",waDAI:"0xEE029120c72b0607344f35B17cdD90025e647B00",waUSDC:"0x221836a597948Dce8F3568E044fF123108aCc42A",waUSDT:"0x19C60a251e525fa88Cd6f3768416a8024e98fC19",miMATIC:"0xa3fa99a148fa48d14ed51d610c367c61876997f1"}},Ef=new d.Interface(Sd),mn=Qs.toChainedReference("21"),$0=Qs.toChainedReference("22"),Cd=Qs.toChainedReference("23"),sd=Qs.toChainedReference("24");class _u{constructor(ge){this.addresses=ql[ge]}calldata(ge,Ne,Ke,ot,Mt){if(f.BigNumber.from(Ne).lte(0))throw new Oi(E.BalancerErrorCode.INPUT_ZERO_NOT_ALLOWED);const Vt=this.addresses.relayer;let Ht=[];return Mt&&(Ht=[this.buildSetRelayerApproval(Mt)]),Ht=ot?[...Ht,this.buildWithdraw(ge,Ne),this.buildExit(Vt,Ne),this.buildSwap(Ke,Vt),this.buildDeposit(ge)]:[...Ht,this.buildExit(ge,Ne),this.buildSwap(Ke,ge)],{to:Vt,data:Ef.encodeFunctionData("multicall",[Ht])}}buildExit(ge,Ne){const{assetOrder:Ke}=this.addresses.staBal3,ot=Ke.map(Ht=>this.addresses[Ht]),Mt=y.exitExactBPTInForTokensOut(Ne),Vt=[{index:Ke.indexOf("DAI"),key:mn},{index:Ke.indexOf("USDC"),key:$0},{index:Ke.indexOf("USDT"),key:Cd}];return Qs.constructExitCall({assets:ot,minAmountsOut:["0","0","0"],userData:Mt,toInternalBalance:!0,poolId:this.addresses.staBal3.id,poolKind:0,sender:ge,recipient:this.addresses.relayer,outputReferences:Vt,exitPoolRequest:{}})}buildSwap(ge,Ne){const Ke=[this.addresses.bbausd2.address,this.addresses.DAI,this.addresses.linearDai2.address,this.addresses.USDC,this.addresses.linearUsdc2.address,this.addresses.USDT,this.addresses.linearUsdt2.address],ot=[{index:0,key:sd}],Mt=[{poolId:this.addresses.linearDai2.id,assetInIndex:1,assetOutIndex:2,amount:mn.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:2,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdc2.id,assetInIndex:3,assetOutIndex:4,amount:$0.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:4,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdt2.id,assetInIndex:5,assetOutIndex:6,amount:Cd.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:6,assetOutIndex:0,amount:"0",userData:"0x"}],Vt=[f.BigNumber.from(ge).mul(-1).toString(),x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0"];return Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Mt,assets:Ke,funds:{sender:this.addresses.relayer,recipient:Ne,fromInternalBalance:!0,toInternalBalance:!1},limits:Vt,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:ot})}buildWithdraw(ge,Ne){return Qs.encodeGaugeWithdraw(this.addresses.staBal3.gauge,ge,this.addresses.relayer,Ne)}buildDeposit(ge){return Qs.encodeGaugeDeposit(this.addresses.bbausd2.gauge,this.addresses.relayer,ge,sd.toString())}buildSetRelayerApproval(ge){return Qs.encodeSetRelayerApproval(this.addresses.relayer,!0,ge)}}const pd=new d.Interface(Sd),fo=Qs.toChainedReference("24");class ff{constructor(ge){this.addresses=ql[ge]}calldata(ge,Ne,Ke,ot,Mt,Vt){if(f.BigNumber.from(Ne).lte(0))throw new Oi(E.BalancerErrorCode.INPUT_ZERO_NOT_ALLOWED);const Ht=this.addresses.relayer;let un=[];Vt&&(un=[this.buildSetRelayerApproval(Vt)]),un=ot?[...un,this.buildWithdraw(ge,Ne),this.buildSwap(Ne,Ke,Ht,Ht,Mt),this.buildDeposit(ge)]:[...un,this.buildSwap(Ne,Ke,ge,ge,Mt)];const pn=pd.encodeFunctionData("multicall",[un]);return{to:this.addresses.relayer,data:pn}}buildSwap(ge,Ne,Ke,ot,Mt){const Vt=[this.addresses.bbausd2.address,this.addresses.waDAI,this.addresses.linearDai1.address,this.addresses.linearDai2.address,this.addresses.waUSDC,this.addresses.linearUsdc1.address,this.addresses.linearUsdc2.address,this.addresses.waUSDT,this.addresses.linearUsdt1.address,this.addresses.linearUsdt2.address,this.addresses.bbausd1.address],Ht=[{index:0,key:fo}],un=Mt.reduce((li,bi)=>li.add(f.BigNumber.from(bi)),x.Zero),{assetOrder:pn}=this.addresses.bbausd1,yn=f.BigNumber.from(ge).mul(Mt[pn.indexOf("bb-a-USDC")]).div(un).toString(),Zn=f.BigNumber.from(ge).mul(Mt[pn.indexOf("bb-a-DAI")]).div(un).toString(),fr=f.BigNumber.from(ge).sub(yn).sub(Zn).toString(),zr=[{poolId:this.addresses.bbausd1.id,assetInIndex:10,assetOutIndex:2,amount:Zn,userData:"0x"},{poolId:this.addresses.linearDai1.id,assetInIndex:2,assetOutIndex:1,amount:"0",userData:"0x"},{poolId:this.addresses.linearDai2.id,assetInIndex:1,assetOutIndex:3,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:3,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd1.id,assetInIndex:10,assetOutIndex:5,amount:yn,userData:"0x"},{poolId:this.addresses.linearUsdc1.id,assetInIndex:5,assetOutIndex:4,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdc2.id,assetInIndex:4,assetOutIndex:6,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:6,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd1.id,assetInIndex:10,assetOutIndex:8,amount:fr,userData:"0x"},{poolId:this.addresses.linearUsdt1.id,assetInIndex:8,assetOutIndex:7,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdt2.id,assetInIndex:7,assetOutIndex:9,amount:"0",userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:9,assetOutIndex:0,amount:"0",userData:"0x"}],ci=[f.BigNumber.from(Ne).mul(-1).toString(),"0","0","0","0","0","0","0","0","0",ge];return Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:zr,assets:Vt,funds:{sender:Ke,recipient:ot,fromInternalBalance:!1,toInternalBalance:!1},limits:ci,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:Ht})}buildWithdraw(ge,Ne){return Qs.encodeGaugeWithdraw(this.addresses.bbausd1.gauge,ge,this.addresses.relayer,Ne)}buildDeposit(ge){return Qs.encodeGaugeDeposit(this.addresses.bbausd2.gauge,this.addresses.relayer,ge,fo.toString())}buildSetRelayerApproval(ge){return Qs.encodeSetRelayerApproval(this.addresses.relayer,!0,ge)}}const s0=new d.Interface(Sd),_1=Qs.toChainedReference("0"),yp=[];class $h{constructor(ge){this.addresses=ql[ge]}calldata(ge,Ne,Ke,ot,Mt,Vt,Ht,un){if(Vt&&(null==Ne.gauge||null==Ke.gauge))throw new Error("Staked flow migration requires gauge addresses to be provided");const pn=this.addresses.relayer;let yn=[];un&&(yn=[this.buildSetRelayerApproval(un)]),yn=Vt?[...yn,this.buildWithdraw(ge,ot,Ne.gauge),this.buildExit(Ne.id,pn,ot,Ht),this.buildSwap(Mt,pn,Ke.id,Ke.address,Ht),this.buildDeposit(ge,Ke.gauge)]:[...yn,this.buildExit(Ne.id,ge,ot,Ht),this.buildSwap(Mt,ge,Ke.id,Ke.address,Ht)];const Zn=s0.encodeFunctionData("multicall",[yn]);return{to:this.addresses.relayer,data:Zn}}buildExit(ge,Ne,Ke,ot){const Mt=y.exitExactBPTInForTokensOut(Ke),Vt=[];for(let un=0;unthis.addresses[un]),Mt=y.exitExactBPTInForTokensOut(Ne),Vt=[{index:Ke.indexOf("miMATIC"),key:hf},{index:Ke.indexOf("DAI"),key:pf},{index:Ke.indexOf("USDC"),key:Md},{index:Ke.indexOf("USDT"),key:tm}],Ht=Array(ot.length).fill("0");return Qs.constructExitCall({assets:ot,minAmountsOut:Ht,userData:Mt,toInternalBalance:!0,poolId:this.addresses.maiusd.id,poolKind:0,sender:ge,recipient:this.addresses.relayer,outputReferences:Vt,exitPoolRequest:{}})}buildSwap(ge,Ne){const Ke=[this.addresses.bbausd2.address,this.addresses.DAI,this.addresses.linearDai2.address,this.addresses.USDC,this.addresses.linearUsdc2.address,this.addresses.USDT,this.addresses.linearUsdt2.address,this.addresses.miMATIC,this.addresses.maibbausd.address],ot=[{index:8,key:Kp}],Mt=[{poolId:this.addresses.linearDai2.id,assetInIndex:1,assetOutIndex:2,amount:pf.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:2,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:0,assetOutIndex:8,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdc2.id,assetInIndex:3,assetOutIndex:4,amount:Md.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:4,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:0,assetOutIndex:8,amount:"0",userData:"0x"},{poolId:this.addresses.linearUsdt2.id,assetInIndex:5,assetOutIndex:6,amount:tm.toString(),userData:"0x"},{poolId:this.addresses.bbausd2.id,assetInIndex:6,assetOutIndex:0,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:0,assetOutIndex:8,amount:"0",userData:"0x"},{poolId:this.addresses.maibbausd.id,assetInIndex:7,assetOutIndex:8,amount:hf.toString(),userData:"0x"}],Vt=["0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),"0",x.MaxInt256.toString(),f.BigNumber.from(Ne).mul(-1).toString()];return Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Mt,assets:Ke,funds:{sender:this.addresses.relayer,recipient:ge,fromInternalBalance:!0,toInternalBalance:!1},limits:Vt,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:ot})}buildWithdraw(ge,Ne){return Qs.encodeGaugeWithdraw(this.addresses.maiusd.gauge,ge,this.addresses.relayer,Ne)}buildDeposit(ge){return Qs.encodeGaugeDeposit(this.addresses.maibbausd.gauge,this.addresses.relayer,ge,Kp.toString())}buildSetRelayerApproval(ge){return Qs.encodeSetRelayerApproval(this.addresses.relayer,!0,ge)}}class Zp{constructor(ge){this.network=ge}stabal3(ge,Ne,Ke,ot,Mt){const Vt=new _u(this.network).calldata(ge,Ne,Ke,ot,Mt);return{to:Vt.to,data:Vt.data,decode:(Ht,un)=>{let pn=un?2:1;Mt&&(pn+=1);const yn=d.defaultAbiCoder.decode(["bytes[]"],Ht);return d.defaultAbiCoder.decode(["int256[]"],yn[0][pn])[0][0].abs().toString()}}}bbaUsd(ge,Ne,Ke,ot,Mt,Vt){const Ht=new ff(this.network).calldata(ge,Ne,Ke,ot,Mt,Vt);return{to:Ht.to,data:Ht.data,decode:(un,pn)=>{let yn=pn?1:0;Vt&&(yn+=1);const Zn=d.defaultAbiCoder.decode(["bytes[]"],un);return d.defaultAbiCoder.decode(["int256[]"],Zn[0][yn])[0][0].abs().toString()}}}stables(ge,Ne,Ke,ot,Mt,Vt,Ht,un){const pn=new $h(this.network).calldata(ge,Ne,Ke,ot,Mt,Vt,Ht,un);return{to:pn.to,data:pn.data,decode:(yn,Zn)=>{let fr=Zn?2:1;un&&(fr+=1);const zr=d.defaultAbiCoder.decode(["bytes[]"],yn);return d.defaultAbiCoder.decode(["int256[]"],zr[0][fr])[0][0].abs().toString()}}}maiusd(ge,Ne,Ke,ot,Mt){const Vt=new o0(this.network).calldata(ge,Ne,Ke,ot,Mt);return{to:Vt.to,data:Vt.data,decode:(Ht,un)=>{let pn=un?2:1;Mt&&(pn+=1);const yn=d.defaultAbiCoder.decode(["bytes[]"],Ht);return d.defaultAbiCoder.decode(["int256[]"],yn[0][pn])[0][8].abs().toString()}}}}class Iu{constructor(ge){this.network=ge,this.migrations=new Zp(ge)}}class Tf{constructor(ge,Ne){this.tokenPrices=ge,this.tokenHistoricalPrices=Ne}calcImpLoss(ge,Ne){var Ke=this;return ie(function*(){if(1e3*ge>=Date.now())throw console.error(`[ImpermanentLossService][calcImpLoss]Error: ${Oi.getMessage(E.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE)}`),new Oi(E.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE);const ot=yield Ke.prepareData(ge,Ne),Mt=Ke.getPoolValueDelta(ot),Vt=Ke.getHoldValueDelta(ot);return Ke.calculateImpermanentLoss(Mt,Vt)})()}calculateImpermanentLoss(ge,Ne){return Math.floor(100*Math.abs(ge/Ne-1)*100)/100}getPoolValueDelta(ge){return ge.reduce((Ne,Ke)=>Ne*Math.pow(Math.abs(Ke.priceDelta+1),Ke.weight),1)}getHoldValueDelta(ge){return ge.reduce((Ne,Ke)=>Ne+Math.abs(Ke.priceDelta+1)*Ke.weight,0)}prepareData(ge,Ne){var Ke=this;return ie(function*(){const ot=Ne.tokens.filter(pn=>pn.address!==Ne.address),Mt=Ke.getWeights(ot),Vt=ot.map(pn=>pn.address),Ht=yield Ke.getEntryPrices(ge,Vt),un=yield Ke.getExitPrices(ot);return Ke.getAssets(ot,un,Ht,Mt)})()}getAssets(ge,Ne,Ke,ot){return ge.map((Mt,Vt)=>({priceDelta:this.getDelta(Ke[Mt.address],Ne[Mt.address]),weight:ot[Vt]}))}getDelta(ge,Ne){if(0===ge)throw console.error(`[ImpermanentLossService][getDelta]Error: ${Oi.getMessage(E.BalancerErrorCode.ILLEGAL_PARAMETER)}: entry price is 0`),new Oi(E.BalancerErrorCode.ILLEGAL_PARAMETER);return(Ne-ge)/ge}getWeights(ge){const Ne=ge.every(Mt=>!Mt.weight),Ke=Math.round(1/ge.length*100)/100,ot=ge.map(Ne?()=>Ke:Mt=>{var Vt;return Number(null!==(Vt=Mt.weight)&&void 0!==Vt?Vt:0)});if(ot.some(Mt=>0===Mt))throw console.error(`[ImpermanentLossService][getWeights]Error: ${Oi.getMessage(E.BalancerErrorCode.MISSING_WEIGHT)}`),new Oi(E.BalancerErrorCode.MISSING_WEIGHT);return ot}getExitPrices(ge){var Ne=this;return ie(function*(){var Ke;const ot=yield Promise.all(ge.map(Ht=>Ne.tokenPrices.find(Ht.address))).catch(()=>[]);if(!ot.length||ot.some(Ht=>void 0===(null==Ht?void 0:Ht.usd)))throw console.error(`[ImpermanentLossService][getExitPrices]Error: ${Oi.getMessage(E.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);const Mt=ge.map((Ht,un)=>({...Ht,price:ot[un]})),Vt={};for(const Ht of Mt)(null===(Ke=Ht.price)||void 0===Ke?void 0:Ke.usd)&&(Vt[Ht.address]=+Ht.price.usd);return Vt})()}getEntryPrices(ge,Ne){var Ke=this;return ie(function*(){const ot={};for(const Mt of Ne){const Vt=yield Ke.tokenHistoricalPrices.findBy(Mt,ge).catch(Ht=>{console.error(`[ImpermanentLossService][getEntryPrices]Error: ${Ht.message}`)});if(!(null==Vt?void 0:Vt.usd))throw console.error(`[ImpermanentLossService][getEntryPrices]Error: ${Oi.getMessage(E.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Oi(E.BalancerErrorCode.MISSING_PRICE_RATE);ot[Mt]=+Vt.usd}return ot})()}}const E0=145e3,W0=1648465251,Af=31536e3,Od=2**(1/4),ol=(qe=Math.round((new Date).getTime()/1e3))=>{const ge=Math.floor((qe-W0)/Af);return E0*Od**-ge},vh=qe=>E0*Od**-qe/7*365;var mf=Object.freeze({__proto__:null,INITIAL_RATE:E0,START_EPOCH_TIME:W0,weekly:ol,total:vh,between:(qe,ge)=>{if(qeun.address!==ge.address),Mt=yield Promise.all(ot.map(function(){var un=ie(function*(pn){let yn=0;const Zn=yield Ne.tokenYields.find(pn.address);if(Zn)yn="MetaStable"===ge.poolType?Zn*(1-(yield Ne.protocolSwapFeePercentage(ge))):"ComposableStable"===ge.poolType||"Weighted"===ge.poolType&&2===ge.poolTypeVersion?pn.isExemptFromYieldProtocolFee?Zn:Zn*(1-parseFloat(ge.protocolYieldFeeCache||"0.5")):Zn;else{const fr=yield Ne.pools.findBy("address",pn.address);if(fr){const zr=yield Ne.swapFees(fr);let ci=(yield Ne.tokenAprs(fr)).total;("ComposableStable"===ge.poolType||"Weighted"===ge.poolType&&2===ge.poolTypeVersion)&&(pn.isExemptFromYieldProtocolFee||(ci*=1-parseFloat(ge.protocolYieldFeeCache||"0.5"))),yn=zr+ci}}return yn});return function(pn){return un.apply(this,arguments)}}())),Vt=function(){var un=ie(function*(pn){var yn,Zn,fr,zr,ci;let ai;if(pn.weight)return parseFloat(pn.weight);if(null===(Zn=null===(yn=pn.token)||void 0===yn?void 0:yn.pool)||void 0===Zn?void 0:Zn.poolType){const li=yield Ne.pools.findBy("address",pn.address);li&&(ai=(yield Ne.bptPrice(li)).toString())}else ai=(null===(fr=pn.price)||void 0===fr?void 0:fr.usd)||(null===(zr=yield Ne.tokenPrices.find(pn.address))||void 0===zr?void 0:zr.usd)||(null===(ci=pn.token)||void 0===ci?void 0:ci.latestUSDPrice);if(ai)return parseFloat(pn.balance)*parseFloat(ai)/parseFloat(Ke);throw`No price for ${pn.address}`});return function(yn){return un.apply(this,arguments)}}(),Ht=yield Promise.all(ot.map(function(){var un=ie(function*(pn,yn){if(0===Mt[yn])return 0;const Zn=yield Vt(pn);return Math.round(Mt[yn]*Zn)});return function(pn,yn){return un.apply(this,arguments)}}()));return{total:Ht.reduce((un,pn)=>un+pn,0),breakdown:u.pickBy(u.zipObject(ot.map(un=>un.address),Ht),u.identity)}})()}stakingApr(ge,Ne=1){var Ke=this;return ie(function*(){if(!Ke.liquidityGauges)return 0;const ot=yield Ke.liquidityGauges.findBy("poolId",ge.id);if(!ot||1==ge.chainId&&0==ot.workingSupply||ge.chainId>1&&0==ot.totalSupply)return 0;const Mt=Ao[ge.chainId].addresses.tokens.bal;if(!Mt)return 0;const[Vt,Ht]=yield Promise.all([Ke.tokenPrices.find(Mt),Ke.bptPrice(ge)]);if(!(null==Vt?void 0:Vt.usd))throw"Missing BAL price";const un=parseFloat(Vt.usd);if(ge.chainId>1){if(!ot.rewardTokens)return 0;const fr=Mt&&ot.rewardTokens[Mt];if(fr){const zr=yield Ke.rewardTokenApr(Mt,fr);return Math.round(zr.value/(ot.totalSupply*Ht)*1e4)}return 0}const pn=Math.round((new Date).getTime()/1e3),yn=ol(pn)/7*365*ot.relativeWeight*un;return Math.round(1e4*Ne*yn/((ot.workingSupply+.4)/.4*Ht))})()}rewardAprs(ge){var Ne=this;return ie(function*(){if(!Ne.liquidityGauges)return{total:0,breakdown:{}};const Ke=yield Ne.liquidityGauges.findBy("poolId",ge.id);if(!Ke||!Ke.rewardTokens||Object.keys(Ke.rewardTokens).length<1)return{total:0,breakdown:{}};const ot=Ao[ge.chainId].addresses.tokens.bal,Mt=Object.keys(Ke.rewardTokens).filter(li=>li!=ot).map(function(){var li=ie(function*(bi){return Ne.rewardTokenApr(bi,Ke.rewardTokens[bi])});return function(bi){return li.apply(this,arguments)}}()),Vt=yield Ne.bptPrice(ge),Ht=Ke.totalSupply*Vt;if(0==Ht)return{total:0,breakdown:{}};const un={};let pn=0;var fr,yn=!0,Zn=!1;try{for(var ci,ai,zr=function(E){var d,x,f,T=2;for("undefined"!=typeof Symbol&&(x=Symbol.asyncIterator,f=Symbol.iterator);T--;){if(x&&null!=(d=E[x]))return d.call(E);if(f&&null!=(d=E[f]))return new O(d.call(E));x="@@asyncIterator",f="@@iterator"}throw new TypeError("Object is not async iterable")}(Object.values(Mt));yn=(ci=yield zr.next()).done,ai=yield ci.value,!yn;yn=!0){const li=ai,os=Math.round(li.value/Ht*1e4);pn+=os,un[li.address]=os}}catch(li){Zn=!0,fr=li}finally{try{!yn&&null!=zr.return&&(yield zr.return())}finally{if(Zn)throw fr}}return{total:pn,breakdown:un}})()}protocolApr(ge){var Ne=this;return ie(function*(){if("0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"!=ge.id||!Ne.feeDistributor)return 0;const Ke=new pl(Ne.feeDistributor,Ne.tokenPrices),{lastWeekBalRevenue:ot,lastWeekBBAUsdRevenue:Mt,veBalSupply:Vt}=yield Ke.data(),Ht=yield Ne.bptPrice(ge);if(!Ht)throw"bptPrice for veBal pool missing";return Math.round((ot+Mt)/7*365*1e4/(Ht*Vt))})()}apr(ge){var Ne=this;return ie(function*(){const[Ke,ot,Mt,Vt,Ht,un]=yield Promise.all([Ne.swapFees(ge),Ne.tokenAprs(ge),Ne.stakingApr(ge),Ne.stakingApr(ge,2.5),Ne.rewardAprs(ge),Ne.protocolApr(ge)]);return{swapFees:Ke,tokenAprs:ot,stakingApr:{min:Mt,max:Vt},rewardAprs:Ht,protocolApr:un,min:Ke+ot.total+Ht.total+Mt,max:Ke+ot.total+Ht.total+un+Vt}})()}last24hFees(ge){var Ne=this;return ie(function*(){return new Yp(Ne.yesterdaysPools).last24h(ge)})()}totalLiquidity(ge){var Ne=this;return ie(function*(){try{return yield new Sn(Ne.pools,Ne.tokenPrices).getLiquidity(ge)}catch{return console.error("Liquidity calculcation failed, falling back to subgraph"),ge.totalLiquidity}})()}bptPrice(ge){var Ne=this;return ie(function*(){return parseFloat(yield Ne.totalLiquidity(ge))/parseFloat(ge.totalShares)})()}protocolSwapFeePercentage(ge){var Ne=this;return ie(function*(){let Ke=0;return Ke="ComposableStable"==ge.poolType||"Weighted"==ge.poolType&&2==ge.poolTypeVersion?0:ge.protocolSwapFeeCache?parseFloat(ge.protocolSwapFeeCache):(yield Ne.feeCollector.find(""))||0,Ke})()}rewardTokenApr(ge,Ne){var Ke=this;return ie(function*(){if(Ne.period_finish.toNumber(){class qe{constructor(Ne){this.pools=Ne}buildGraphFromRootPool(Ne,Ke){var ot=this;return ie(function*(){const Mt=yield ot.pools.find(Ne);if(!Mt)throw new Oi(E.BalancerErrorCode.POOL_DOESNT_EXIST);return(yield ot.buildGraphFromPool(Mt.address,0,void 0,x.WeiPerEther,Ke))[0]})()}getTokenTotal(Ne){const Ke=Ne.tokensList.indexOf(Ne.address);let ot=x.Zero;const{parsedBalances:Mt}=st(Ne);return Mt.forEach((Vt,Ht)=>{Ke!==Ht&&(ot=ot.add(Vt))}),ot}buildGraphFromPool(Ne,Ke,ot,Mt,Vt){var Ht=this;return ie(function*(){var un;const pn=yield Ht.pools.findBy("address",Ne);if(!pn){if(ot){const bi=yield Ht.pools.findBy("address",ot.address),os=null!==(un=bi.tokens[bi.tokensList.indexOf(Ne)].decimals)&&void 0!==un?un:18;return qe.createInputTokenNode(Ke,Ne,os,ot,Mt)}throw new Oi(E.BalancerErrorCode.POOL_DOESNT_EXIST)}const yn=md.get(pn.poolType),Zn=If.get(pn.poolType);if(!yn||!Zn)throw new Oi(E.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);const fr=Ht.getTokenTotal(pn),{spotPriceCalculator:zr}=po.from(pn.poolType),ci={};let ai=18;pn.tokens.forEach(bi=>{if(rs(bi.address,pn.address))return void(ai=bi.decimals?bi.decimals:18);const os=zr.calcPoolSpotPrice(bi.address,pn.address,pn);ci[bi.address]=os});let li={address:pn.address,id:pn.id,type:pn.poolType,joinAction:yn,exitAction:Zn,children:[],marked:!1,index:Ke.toString(),parent:ot,proportionOfParent:Mt,isLeaf:!1,spotPrices:ci,decimals:ai};if(Ke++,pn.poolType.toString().includes("Linear"))[li,Ke]=Ht.createLinearNodeChildren(li,Ke,pn,Vt);else{const{parsedBalances:bi}=st(pn);for(let os=0;os0;){const Mt=Ke.shift();Mt&&ot.push(Mt),null==Mt||Mt.children.forEach(Vt=>{Vt.marked||(Vt.marked=!0,Ke.push(Vt))})}return ot}static getLeafAddresses(Ne){return Ne.filter(Ke=>Ke.isLeaf).map(Ke=>Ke.address)}}return qe.getGraphNodes=function(){var ge=ie(function*(Ne,Ke,ot,Mt){if(!(yield ot.find(Ke)))throw new Oi(E.BalancerErrorCode.POOL_DOESNT_EXIST);const Vt=new qe(ot),Ht=yield Vt.buildGraphFromRootPool(Ke,Mt);if(Ht.id!==Ke)throw new Error("Error creating graph nodes");return Ne?qe.orderByBfs(Ht).reverse():qe.orderByBfs(Ht)});return function(Ne,Ke,ot,Mt){return ge.apply(this,arguments)}}(),qe})();class Jp{constructor(ge,Ne){var Ke=this;this.chainId=ge,this.simulateMulticall=function(){var Mt=ie(function*(Vt,Ht,un,pn){const yn={...yield Ke.encodeBalanceAndAllowanceOverrides(un,pn),...yield Ke.encodeRelayerApprovalOverride(un,Vt)};return Ke.simulateTransaction(Vt,Ht,un,yn)});return function(Vt,Ht,un,pn){return Mt.apply(this,arguments)}}(),this.simulateTransaction=function(){var Mt=ie(function*(Vt,Ht,un,pn){const yn=Object.fromEntries(Object.keys(pn).map(zr=>[zr,{storage:pn[zr].value}])),Zn={network_id:Ke.chainId.toString(),block_number:Ke.blockNumber,from:un,to:Vt,input:Ht,save_if_fails:!0,simulation_type:"quick",state_objects:yn},fr=Ke.tenderlyUrl+"simulate";return(yield R.default.post(fr,Zn,Ke.opts)).data.transaction.transaction_info.call_trace.output});return function(Vt,Ht,un,pn){return Mt.apply(this,arguments)}}(),this.encodeRelayerApprovalOverride=function(){var Mt=ie(function*(Vt,Ht){const un={[`${Ke.vaultAddress}`]:{value:{[`_approvedRelayers[${Vt}][${Ht}]`]:(!0).toString()}}};return yield Ke.requestStateOverrides(un)});return function(Vt,Ht){return Mt.apply(this,arguments)}}(),this.encodeBalanceAndAllowanceOverrides=function(){var Mt=ie(function*(Vt,Ht){if(0===Ht.length)return{};let un={};Ht.forEach(yn=>un={...un,[`${yn}`]:{value:{[`_balances[${Vt}]`]:x.MaxInt256.toString(),[`_allowances[${Vt}][${Ke.vaultAddress}]`]:x.MaxInt256.toString(),[`balanceOf[${Vt}]`]:x.MaxInt256.toString(),[`allowance[${Vt}][${Ke.vaultAddress}]`]:x.MaxInt256.toString(),[`balances[${Vt}]`]:x.MaxInt256.toString(),[`allowed[${Vt}][${Ke.vaultAddress}]`]:x.MaxInt256.toString()}}});const pn=yield Ke.requestStateOverrides(un);if(Object.keys(pn).some(yn=>2!==Object.keys(pn[yn].value).length))throw new Error("Couldn't encode state overrides - states should match the ones in the contracts");return pn});return function(Vt,Ht){return Mt.apply(this,arguments)}}(),this.requestStateOverrides=function(){var Mt=ie(function*(Vt){const Ht=Ke.tenderlyUrl+"contracts/encode-states",un={networkID:Ke.chainId.toString(),stateOverrides:Vt},pn=(yield R.default.post(Ht,un,Ke.opts)).data.stateOverrides;if(!pn||Object.keys(pn).length!==Object.keys(Vt).length)throw new Error("Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly");return pn});return function(Vt){return Mt.apply(this,arguments)}}();const{contracts:ot}=zi(this.chainId);this.vaultAddress=ot.vault,this.tenderlyUrl=(null==Ne?void 0:Ne.user)&&(null==Ne?void 0:Ne.project)?`https://api.tenderly.co/api/v1/account/${Ne.user}/project/${Ne.project}/`:"https://api.balancer.fi/tenderly/",(null==Ne?void 0:Ne.accessKey)&&(this.opts={headers:{"X-Access-Key":Ne.accessKey}}),this.blockNumber=null==Ne?void 0:Ne.blockNumber}}var Il;const Wh=new d.Interface(x0);class Nl{constructor(ge,Ne){var Ke=this;this.pools=ge,this.createCalls=function(){var Vt=ie(function*(Ht,un,pn,yn){const{calls:Zn,outputIndexes:fr,deltas:zr}=Ke.createActionCalls(Ht,un,pn);return yn&&Zn.unshift(Ke.createSetRelayerApproval(yn)),{callData:Wh.encodeFunctionData("multicall",[Zn]),outputIndexes:yn?fr.map(ci=>ci+1):fr,deltas:zr}});return function(Ht,un,pn,yn){return Vt.apply(this,arguments)}}(),this.amountsOutByJoinPath=function(){var Vt=ie(function*(Ht,un,pn,yn){const Zn=[],fr=yield Ke.tenderlyHelper.simulateMulticall(Ke.relayer,un,Ht,pn),zr=d.defaultAbiCoder.decode(["bytes[]"],fr)[0];let ci=f.BigNumber.from("0");return yn.forEach(ai=>{const li=d.defaultAbiCoder.decode(["uint256"],zr[ai]);Zn.push(li.toString()),ci=ci.add(li.toString())}),{amountsOut:Zn,totalAmountOut:ci.toString()}});return function(Ht,un,pn,yn){return Vt.apply(this,arguments)}}(),this.minAmountsOutByJoinPath=(Vt,Ht,un)=>({minAmountsOut:Ht.map(pn=>Wi(f.BigNumber.from(pn),f.BigNumber.from(Vt)).toString()),totalMinAmountOut:Wi(f.BigNumber.from(un),f.BigNumber.from(Vt)).toString()}),this.createActionCalls=(Vt,Ht,un)=>{const pn=[],yn=[],Zn=!un,fr={};return Vt.forEach((zr,ci)=>{const ai=zr[0].isLeaf;if(zr.forEach((li,bi)=>{let os;if(os=ai?zr.filter(Us=>{var io;return li.children.map(Xs=>Xs.address).includes(Us.address)&&li.index===(null===(io=Us.parent)||void 0===io?void 0:io.index)}):bi>0?[zr[bi-1]]:[],os.length>0&&0===os.filter(Us=>"0"!==Us.index).length)return void(li.index="0");os.some(Us=>"input"===Us.joinAction||"wrapAaveDynamicToken"===Us.joinAction);const es=Ht,ws=Ht,Zs=bi===zr.length-1&&un?un[ci]:"0";switch(li.joinAction){case"wrapAaveDynamicToken":pn.push(this.createAaveWrap(li,os,ci,es,Ht));break;case"batchSwap":{const[Us,io,Xs]=this.createBatchSwap(li,os,ci,Zs,es,ws);pn.push(Us),this.updateDeltas(fr,io,Xs);break}case"joinPool":{const[Us,io,Xs,ao]=this.createJoinPool(li,os,ci,Zs,es,ws);pn.push(Us),this.updateDeltas(fr,[li.address,...io],[ao,...Xs]);break}}}),Zn){const bi=Qs.encodePeekChainedReferenceValue(Qs.toChainedReference(100*ci,!1));pn.push(bi),yn.push(pn.indexOf(bi))}}),{calls:pn,outputIndexes:yn,deltas:fr}},this.createSetRelayerApproval=Vt=>Qs.encodeSetRelayerApproval(this.relayer,!0,Vt),this.createAaveWrap=(Vt,Ht,un,pn,yn)=>{if(1!==Ht.length)throw new Error("aaveWrap nodes should always have a single child node");return Qs.encodeWrapAaveDynamicToken({staticToken:Vt.address,sender:pn,recipient:yn,amount:Ht[0].index,fromUnderlying:!0,outputReference:this.getOutputRefValue(un,Vt).value})},this.createBatchSwap=(Vt,Ht,un,pn,yn,Zn)=>{if(1!==Ht.length)throw new Error("Unsupported batchswap");const fr=Ht[0].address,zr=this.getOutputRefValue(un,Ht[0]),ci=[Vt.address,fr],ai=[f.BigNumber.from(pn).mul(-1).toString(),zr.isRef?x.MaxInt256.toString():zr.value],li=[{poolId:Vt.id,assetInIndex:1,assetOutIndex:0,amount:zr.value,userData:"0x"}],bi={sender:yn,recipient:Zn,fromInternalBalance:yn===this.relayer,toInternalBalance:Zn===this.relayer},os=[{index:ci.map(ws=>ws.toLowerCase()).indexOf(Vt.address.toLowerCase()),key:f.BigNumber.from(this.getOutputRefValue(un,Vt).value)}];return[Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:li,assets:ci,funds:bi,limits:ai,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:os}),ci,[Zn===this.relayer?"0":ai[0],yn===this.relayer?"0":ai[1]]]},this.createJoinPool=(Vt,Ht,un,pn,yn,Zn)=>{const fr=[],zr=[];Vt.children.forEach(Xs=>{fr.push(Xs.address);const ao=Ht.find(ia=>rs(ia.address,Xs.address));zr.push(ao?this.getOutputRefValue(un,ao).value:"0")}),Vt.type===E.PoolType.ComposableStable&&(fr.push(Vt.address),zr.push("0"));const ci=new X(this.wrappedNativeAsset),[ai,li]=ci.sortTokens(fr,zr);let bi=[];const os=ai.map(Xs=>Xs.toLowerCase()).indexOf(Vt.address.toLowerCase());let es;bi=-1===os?li:[...li.slice(0,os),...li.slice(os+1)],es=Vt.type===E.PoolType.Weighted?M.joinExactTokensInForBPTOut(bi,pn):y.joinExactTokensInForBPTOut(bi,pn);const Ds=ai.indexOf(x.AddressZero),Zs=Qs.constructJoinCall({poolId:Vt.id,kind:0,sender:yn,recipient:Zn,value:-1===Ds?"0":li[Ds],outputReference:this.getOutputRefValue(un,Vt).value,joinPoolRequest:{},assets:ai,maxAmountsIn:li,userData:es,fromInternalBalance:yn===this.relayer}),Us=li.map(Xs=>Qs.isChainedReference(Xs)?"0":Xs),io=Qs.isChainedReference(pn)?"0":pn;return[Zs,yn===this.relayer?[]:ai,yn===this.relayer?[]:Us,Zn===this.relayer?x.Zero.toString():x.Zero.sub(io).toString()]},this.getOutputRefValue=(Vt,Ht)=>"input"===Ht.joinAction?{value:Ht.index,isRef:!1}:"0"===Ht.index&&Ht.parent?{value:"0",isRef:!0}:{value:Qs.toChainedReference(f.BigNumber.from(Ht.index).add(100*Vt)).toString(),isRef:!0};const{tokens:ot,contracts:Mt}=zi(Ne.chainId);this.relayer=Mt.relayerV4,this.wrappedNativeAsset=ot.wrappedNativeAsset,this.tenderlyHelper=new Jp(Ne.chainId,Ne.tenderly)}joinPool(ge,Ne,Ke,ot,Mt,Vt,Ht){var un=this;return ie(function*(){if(Ne.length!=Ke.length)throw new Oi(E.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const pn=yield bp.getGraphNodes(!0,ge,un.pools,Mt),yn=Nl.getJoinPaths(pn,Ne,Ke),Zn=Nl.totalBptZeroPriceImpact(yn),{callData:fr,outputIndexes:zr}=yield un.createCalls(yn,ot,void 0,Ht),{amountsOut:ci,totalAmountOut:ai}=yield un.amountsOutByJoinPath(ot,fr,Ne,zr),{minAmountsOut:li,totalMinAmountOut:bi}=un.minAmountsOutByJoinPath(Vt,ci,ai),os=Du(BigInt(ai),Zn.toBigInt(),!0).toString(),{callData:es,deltas:Ds}=yield un.createCalls(yn,ot,li,Ht);return un.assertDeltas(ge,Ds,Ne,Ke,bi),{to:un.relayer,callData:es,expectedOut:ai,minOut:bi,priceImpact:os}})()}assertDeltas(ge,Ne,Ke,ot,Mt){var Vt;const Ht=Q(ge);if(Ne[Ht.toLowerCase()].add(Mt).abs().gt(3))throw console.error("join assertDeltas, bptOut: ",Ht,Mt,null===(Vt=Ne[Ht.toLowerCase()])||void 0===Vt?void 0:Vt.toString()),new Oi(E.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete Ne[Ht.toLowerCase()],Ke.forEach((un,pn)=>{var yn,Zn;if(!f.BigNumber.from(ot[pn]).eq(0)&&(null===(yn=Ne[un.toLowerCase()])||void 0===yn?void 0:yn.toString())!==ot[pn])throw console.error("join assertDeltas, tokenIn: ",un,ot[pn],null===(Zn=Ne[un.toLowerCase()])||void 0===Zn?void 0:Zn.toString()),new Oi(E.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete Ne[un.toLowerCase()]});for(const un in Ne)if("0"!==Ne[un].toString())throw console.error("join assertDeltas, non-input token should be 0: ",un,Ne[un].toString()),new Oi(E.BalancerErrorCode.JOIN_DELTA_AMOUNTS)}updateDeltas(ge,Ne,Ke){return Ne.forEach((ot,Mt)=>{const Vt=ot.toLowerCase();ge[Vt]||(ge[Vt]=x.Zero),ge[Vt]=ge[Vt].add(Ke[Mt])}),ge}}Il=Nl,Nl.getJoinPaths=(qe,ge,Ne)=>{const Ke=[],ot=qe.filter(Vt=>ge.filter((Ht,un)=>f.BigNumber.from(Ne[un]).gt(0)).map(Ht=>Ht.toLowerCase()).includes(Vt.address.toLowerCase()));ot.some(Vt=>Vt.isLeaf)&&Ke.push(qe);const Mt=ot.filter(Vt=>!Vt.isLeaf);return Mt.forEach(Vt=>{const Ht=Ne.find((zr,ci)=>rs(ge[ci],Vt.address)),un=Mt.filter(zr=>rs(zr.address,Vt.address)).reduce((zr,ci)=>zr.add(ci.proportionOfParent),f.BigNumber.from(0)),pn=f.BigNumber.from(Ht).mul(Vt.proportionOfParent).div(un).toString(),[yn]=bp.createInputTokenNode(0,Vt.address,Vt.decimals,Vt.parent,x.WeiPerEther);yn.index=pn,yn.isLeaf=!1;const Zn=[yn];let fr=Vt.parent;for(;fr;)Zn.push(u.cloneDeep(fr)),fr=fr.parent;Ke.push(Zn)}),Il.updateInputAmounts(Ke,ge,Ne),Ke},Nl.updateInputAmounts=(qe,ge,Ne)=>{const Ke=(Vt,Ht)=>{if(Vt.length>1){const un=Vt.reduce((yn,Zn)=>yn.add(Zn.index),f.BigNumber.from(0)),pn=f.BigNumber.from(Ht).sub(un);Vt[0].index=pn.add(Vt[0].index).toString()}},ot=qe.find(Vt=>Vt[0].isLeaf);if(ot){const Vt=Il.updateTotalProportions(ot);ot.forEach(Ht=>{"input"===Ht.joinAction&&(Ht=Il.updateNodeAmount(Ht,ge,Ne,Vt))}),ge.forEach((Ht,un)=>{const pn=ot.filter(yn=>yn.isLeaf&&rs(yn.address,Ht));Ke(pn,Ne[un])})}const Mt=qe.filter(Vt=>!Vt[0].isLeaf);Mt.length>1&&ge.forEach((Vt,Ht)=>{const un=Mt.map(pn=>pn[0]).filter(pn=>rs(pn.address,Vt));Ke(un,Ne[Ht])})},Nl.totalBptZeroPriceImpact=qe=>{let ge=f.BigNumber.from("0");return qe.forEach(Ne=>{if(Ne[0].isLeaf)Ne.filter(Ke=>Ke.isLeaf).forEach(Ke=>{const ot=Il.bptOutZeroPiForInputNode(Ke);ge=ge.add(ot)});else{const Ke=Il.bptOutZeroPiForInputNode(Ne[0]);ge=ge.add(Ke)}}),ge},Nl.bptOutZeroPiForInputNode=qe=>{if("0"===qe.index||"input"!==qe.joinAction)return BigInt(0);let ge=1,Ne=qe.parent,Ke=qe.address;for(;void 0!==Ne;){if("batchSwap"===Ne.joinAction||"joinPool"===Ne.joinAction){const Ht=Ne.spotPrices[Ke.toLowerCase()];ge*=parseFloat(Ht),Ke=Ne.address}Ne=Ne.parent}const ot=f.parseFixed(ge.toFixed(18),18),Mt=tt(BigInt(qe.decimals)),Vt=mt(BigInt(qe.index),Mt);return wt.divDownFixed(Vt,ot.toBigInt())},Nl.updateTotalProportions=qe=>{const ge={};return qe.forEach(Ne=>{ge[Ne.address]=ge[Ne.address]?ge[Ne.address].add(Ne.proportionOfParent):Ne.proportionOfParent}),ge},Nl.updateNodeAmount=(qe,ge,Ne,Ke)=>{const ot=ge.map(Ht=>Ht.toLowerCase()).indexOf(qe.address.toLowerCase());if(-1===ot)return qe.index="0",qe;const Mt=Ke[qe.address],Vt=qe.proportionOfParent.mul(1e18.toString()).div(Mt).mul(Ne[ot]).div(1e18.toString());return qe.index=Vt.toString(),qe};const a0=new d.Interface(x0);class rc{constructor(ge,Ne){var Ke=this;this.pools=ge,this.amountsOutByExitPath=function(){var Vt=ie(function*(Ht,un,pn,yn,Zn){const fr=yield Ke.tenderlyHelper.simulateMulticall(Ke.relayer,un,Ht,[pn]),zr=d.defaultAbiCoder.decode(["bytes[]"],fr)[0],ci=yn.map(li=>d.defaultAbiCoder.decode(["uint256"],zr[li]).toString()),ai=ci.map(li=>Wi(f.BigNumber.from(li),f.BigNumber.from(Zn)).toString());return{expectedAmountsOutByExitPath:ci,minAmountsOutByExitPath:ai}});return function(Ht,un,pn,yn,Zn){return Vt.apply(this,arguments)}}(),this.amountsOutByTokenOut=(Vt,Ht,un,pn)=>{const yn={};Ht.forEach((zr,ci)=>{var ai;return yn[zr]=(null!==(ai=yn[zr])&&void 0!==ai?ai:x.Zero).add(un[ci])});const Zn=Vt.map(zr=>yn[zr].toString()),fr=Zn.map(zr=>Wi(f.BigNumber.from(zr),f.BigNumber.from(pn)).toString());return{expectedAmountsOut:Zn,minAmountsOut:fr}},this.getExitPaths=(Vt,Ht)=>{const un=Vt.map(Zn=>{const fr=[Zn];for(;fr[0].parent;)fr.unshift(u.cloneDeep(fr[0].parent));return fr[0].index=fr[fr.length-1].proportionOfParent.mul(Ht).div(x.WeiPerEther).toString(),fr}),pn=un.reduce((Zn,fr)=>f.BigNumber.from(fr[0].index).add(Zn),x.Zero),yn=f.BigNumber.from(Ht).sub(pn);return un[un.length-1][0].index=yn.add(un[un.length-1][0].index).toString(),un},this.getOutputRef=(Vt,Ht)=>100*Vt+parseInt(Ht);const{tokens:ot,contracts:Mt}=zi(Ne.chainId);this.wrappedNativeAsset=ot.wrappedNativeAsset,this.relayer=Mt.relayerV4,this.tenderlyHelper=new Jp(Ne.chainId,Ne.tenderly)}exitPool(ge,Ne,Ke,ot,Mt){var Vt=this;return ie(function*(){const Ht=yield bp.getGraphNodes(!1,ge,Vt.pools,!1),un=Ht.filter(Ds=>"output"===Ds.exitAction),pn=Vt.getExitPaths(un,Ne),yn=un.map(Ds=>Ds.address.toLowerCase()),Zn=[...new Set(yn)].sort(),fr=yield Vt.createCalls(pn,Ke,void 0,Mt),{expectedAmountsOutByExitPath:zr,minAmountsOutByExitPath:ci}=yield Vt.amountsOutByExitPath(Ke,fr.callData,Ht[0].address,fr.outputIndexes,ot),{callData:ai,deltas:li}=yield Vt.createCalls(pn,Ke,ci,Mt),{expectedAmountsOut:bi,minAmountsOut:os}=Vt.amountsOutByTokenOut(Zn,yn,zr,ot);Vt.assertDeltas(ge,li,Ne,Zn,os);const es=yield Vt.calculatePriceImpact(ge,Zn,bi,Ne);return{to:Vt.relayer,callData:ai,tokensOut:Zn,expectedAmountsOut:bi,minAmountsOut:os,priceImpact:es}})()}calculatePriceImpact(ge,Ne,Ke,ot){var Mt=this;return ie(function*(){const Vt=yield bp.getGraphNodes(!0,ge,Mt.pools,!1),Ht=Nl.getJoinPaths(Vt,Ne,Ke),un=Nl.totalBptZeroPriceImpact(Ht);return Du(BigInt(ot),un.toBigInt(),!1).toString()})()}assertDeltas(ge,Ne,Ke,ot,Mt){var Vt;const Ht=Q(ge);if(Ne[Ht.toLowerCase()].sub(Ke).abs().gt(3))throw console.error("exit assertDeltas, bptIn: ",Ht,Ke,null===(Vt=Ne[Ht.toLowerCase()])||void 0===Vt?void 0:Vt.toString()),new Oi(E.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete Ne[Ht.toLowerCase()],ot.forEach((un,pn)=>{var yn;if(Ne[un.toLowerCase()].add(Mt[pn]).abs().gt(1))throw console.error("exit assertDeltas, tokenOut: ",un,Mt[pn],null===(yn=Ne[un.toLowerCase()])||void 0===yn?void 0:yn.toString()),new Oi(E.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete Ne[un.toLowerCase()]});for(const un in Ne)if("0"!==Ne[un].toString())throw console.error("exit assertDeltas, non-input token should be 0: ",un,Ne[un].toString()),new Oi(E.BalancerErrorCode.EXIT_DELTA_AMOUNTS)}createCalls(ge,Ne,Ke,ot){var Mt=this;return ie(function*(){const{calls:Vt,outputIndexes:Ht,deltas:un}=Mt.createActionCalls(u.cloneDeep(ge),Ne,Ke);return ot&&Vt.unshift(Qs.encodeSetRelayerApproval(Mt.relayer,!0,ot)),{callData:a0.encodeFunctionData("multicall",[Vt]),outputIndexes:ot?Ht.map(pn=>pn+1):Ht,deltas:un}})()}updateDeltas(ge,Ne,Ke){return Ne.forEach((ot,Mt)=>{const Vt=ot.toLowerCase();ge[Vt]||(ge[Vt]=x.Zero),ge[Vt]=ge[Vt].add(Ke[Mt])}),ge}createActionCalls(ge,Ne,Ke){const ot=[],Mt=[],Vt=!Ke,Ht={};return ge.forEach((un,pn)=>{un.forEach(yn=>{const Zn=yn.parent?this.relayer:Ne,fr=yn.children.find(li=>un.map(bi=>bi.index).includes(li.index)),zr="output"===(null==fr?void 0:fr.exitAction),ci=zr?Ne:this.relayer,ai=zr&&Ke?Ke[pn]:"0";switch(yn.exitAction){case"batchSwap":{const[li,bi,os]=this.createBatchSwap(yn,fr,pn,ai,Zn,ci);ot.push(li),this.updateDeltas(Ht,bi,os);break}case"exitPool":{const[li,bi,os,es]=this.createExitPool(yn,fr,pn,ai,Zn,ci);ot.push(li),this.updateDeltas(Ht,[yn.address,...os],[bi,...es]);break}case"output":Vt&&(ot.push(Qs.encodePeekChainedReferenceValue(Qs.toChainedReference(this.getOutputRef(pn,yn.index),!1))),Mt.push(ot.length-1));break;default:return}})}),{calls:ot,outputIndexes:Mt,deltas:Ht}}createBatchSwap(ge,Ne,Ke,ot,Mt,Vt){const Ht=ge.parent?Qs.toChainedReference(this.getOutputRef(Ke,ge.index)).toString():ge.index,un=Ne.address,pn=[un,ge.address],yn=[f.BigNumber.from(ot).mul(-1).toString(),Qs.isChainedReference(Ht)?x.MaxInt256.toString():Ht],Zn=[{poolId:ge.id,assetInIndex:1,assetOutIndex:0,amount:Ht,userData:"0x"}],fr={sender:Mt,recipient:Vt,fromInternalBalance:!1,toInternalBalance:!1},zr=[{index:pn.map(os=>os.toLowerCase()).indexOf(un.toLowerCase()),key:Qs.toChainedReference(this.getOutputRef(Ke,Ne.index))}],ci=Qs.encodeBatchSwap({swapType:E.SwapType.SwapExactIn,swaps:Zn,assets:pn,funds:fr,limits:yn,deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:zr});let ai=yn[0];return ai=Vt===this.relayer?"0":ai,[ci,pn,[ai,Mt===this.relayer?"0":yn[1]]]}createExitPool(ge,Ne,Ke,ot,Mt,Vt){const Ht=Ne.address,un=ge.parent?Qs.toChainedReference(this.getOutputRef(Ke,ge.index)).toString():ge.index,pn=[],yn=[];ge.children.forEach(ws=>{pn.push(ws.address),yn.push(ws.address===Ht?ot:"0")}),ge.type===E.PoolType.ComposableStable&&(pn.push(ge.address),yn.push("0"));const Zn=new X(this.wrappedNativeAsset),[fr,zr]=Zn.sortTokens(pn,yn);let ci=[];const ai=fr.map(ws=>ws.toLowerCase()).indexOf(ge.address.toLowerCase());let li;ci=-1===ai?fr:[...fr.slice(0,ai),...fr.slice(ai+1)],li=ge.type===E.PoolType.Weighted?M.exitExactBPTInForOneTokenOut(un,ci.indexOf(Ht)):y.exitExactBPTInForOneTokenOut(un,ci.indexOf(Ht));const bi=[{index:fr.map(ws=>ws.toLowerCase()).indexOf(Ht.toLowerCase()),key:Qs.toChainedReference(this.getOutputRef(Ke,Ne.index))}],os=Qs.constructExitCall({poolId:ge.id,poolKind:0,sender:Mt,recipient:Vt,outputReferences:bi,exitPoolRequest:{},assets:fr,minAmountsOut:zr,userData:li,toInternalBalance:!1}),es=zr.map(ws=>Qs.isChainedReference(ws)?"0":x.Zero.sub(ws).toString()),Ds=Qs.isChainedReference(un)?"0":un;return[os,Mt===this.relayer?x.Zero.toString():Ds,Vt===this.relayer?[]:fr,Vt===this.relayer?[]:es]}}class _h{constructor(ge){this.yesterdaysPools=ge}last24h(ge){var Ne=this;return ie(function*(){let Ke;return Ne.yesterdaysPools&&(Ke=yield Ne.yesterdaysPools.find(ge.id)),ge.totalSwapVolume?(null==Ke?void 0:Ke.totalSwapVolume)?parseFloat(ge.totalSwapVolume)-parseFloat(Ke.totalSwapVolume):ge.createTime&&n0(ge.createTime)?parseFloat(ge.totalSwapVolume):0:0})()}}var rm=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"contract ComposableStablePool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class Dd{constructor(ge){const{tokens:Ne}=zi(ge.chainId);this.wrappedNativeAsset=Ne.wrappedNativeAsset}create({factoryAddress:ge,name:Ne,symbol:Ke,tokenAddresses:ot,amplificationParameter:Mt,rateProviders:Vt,tokenRateCacheDurations:Ht,exemptFromYieldProtocolFeeFlags:un,swapFee:pn,owner:yn}){const Zn=$i(`${pn}`),fr=new X(this.wrappedNativeAsset),[zr,ci,ai,li]=fr.sortTokens(ot,Vt,Ht,un),bi=[Ne,Ke,zr,Mt,ci,ai,li,Zn.toString(),yn],os=new d.Interface(rm),es=rm.find(({name:ws})=>"create"===ws);if(!es)throw new Oi(E.BalancerErrorCode.INTERNAL_ERROR_INVALID_ABI);const Ds=d.FunctionFragment.from(es);return{to:ge,data:os.encodeFunctionData(Ds,bi)}}buildInitJoin({}){throw new Error("To be implemented")}}class Xp{constructor(ge){const{tokens:Ne}=zi(ge.chainId);this.wrappedNativeAsset=Ne.wrappedNativeAsset}create({factoryAddress:ge,name:Ne,symbol:Ke,tokenAddresses:ot,weights:Mt,swapFee:Vt,owner:Ht}){const un=$i(`${Vt}`),pn=new X(this.wrappedNativeAsset),[yn,Zn]=pn.sortTokens(ot,Mt),fr=[Ne,Ke,yn,Zn,un.toString(),Ht],zr=new d.Interface(_.WeightedPoolFactory__factory.abi),ci=_.WeightedPoolFactory__factory.abi.find(({name:li})=>"create"===li);if(!ci)throw new Oi(E.BalancerErrorCode.INTERNAL_ERROR_INVALID_ABI);const ai=d.FunctionFragment.from(ci);return{to:ge,data:zr.encodeFunctionData(ai,fr)}}buildInitJoin({joiner:ge,poolId:Ne,tokensIn:Ke,amountsIn:ot}){const Mt=new X(this.wrappedNativeAsset),[Vt,Ht]=Mt.sortTokens(Ke,ot),un="joinPool",pn={poolId:Ne,sender:ge,recipient:ge,joinPoolRequest:{assets:Vt,maxAmountsIn:Ht,userData:M.joinInit(Ht),fromInternalBalance:!1}},yn=_.Vault__factory.createInterface().encodeFunctionData(un,[pn.poolId,pn.sender,pn.recipient,pn.joinPoolRequest]);return{to:_s,functionName:un,attributes:pn,data:yn}}}class Hf{constructor(ge){this.networkConfig=ge}of(ge){switch(ge){case"Weighted":return new Xp(this.networkConfig);case"Investment":case"LiquidityBootstrapping":case"Stable":case"MetaStable":case"StablePhantom":case"AaveLinear":case"ERC4626Linear":default:throw new Oi(E.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case"ComposableStable":return new Dd(this.networkConfig)}}}class wh{constructor(ge){this.pool=ge;const Ne=(Ke=>{switch(Ke){case E.PoolType.Weighted:return M;case E.PoolType.Stable:case E.PoolType.MetaStable:case E.PoolType.StablePhantom:case E.PoolType.AaveLinear:case E.PoolType.EulerLinear:case E.PoolType.ERC4626Linear:case E.PoolType.Element:case E.PoolType.Gyro2:case E.PoolType.Gyro3:return y;case E.PoolType.ComposableStable:return N}})(ge.poolType);if(!Ne)throw"Pool type not supported";this.encoder=Ne}buildQueryJoinExactIn({sender:ge=x.AddressZero,recipient:Ne=ge,maxAmountsIn:Ke,minimumBPT:ot=x.Zero,fromInternalBalance:Mt=!1}){const Vt=this.pool.tokensList.findIndex(pn=>this.pool.id.includes(pn)),Ht=[...this.pool.tokensList];Vt&&Vt>-1&&Ke.splice(Vt,1);const un=this.encoder.joinExactTokensInForBPTOut(Ke,ot);return[this.pool.id,ge,Ne,{assets:Ht,maxAmountsIn:Ke,userData:un,fromInternalBalance:Mt}]}buildQueryJoinExactOut({sender:ge=x.AddressZero,recipient:Ne=ge,maxAmountsIn:Ke=[],bptOut:ot,tokenIn:Mt,fromInternalBalance:Vt=!1}){const Ht=this.pool.tokensList.indexOf(Mt),un=this.encoder.joinTokenInForExactBPTOut(ot,Ht);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,maxAmountsIn:Ke,userData:un,fromInternalBalance:Vt}]}buildQueryExitToSingleToken({sender:ge=x.AddressZero,recipient:Ne=ge,minAmountsOut:Ke=[],bptIn:ot,tokenOut:Mt,toInternalBalance:Vt=!1}){const Ht=this.pool.tokensList.indexOf(Mt),un=this.encoder.exitExactBPTInForOneTokenOut(ot,Ht);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,minAmountsOut:Ke,userData:un,toInternalBalance:Vt}]}buildQueryExitProportionally({sender:ge=x.AddressZero,recipient:Ne=ge,minAmountsOut:Ke=[],bptIn:ot,toInternalBalance:Mt=!1}){if(!this.encoder.exitExactBPTInForTokensOut)throw"Proportional exit not implemented";const Vt=this.encoder.exitExactBPTInForTokensOut(ot);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,minAmountsOut:Ke,userData:Vt,toInternalBalance:Mt}]}buildQueryExitExactOut({sender:ge=x.AddressZero,recipient:Ne=ge,minAmountsOut:Ke,maxBptIn:ot=x.MaxUint256,toInternalBalance:Mt=!1}){const Vt=this.pool.tokensList.findIndex(un=>this.pool.id.includes(un));Vt&&Vt>-1&&Ke.splice(Vt,1);const Ht=this.encoder.exitBPTInForExactTokensOut(Ke,ot);return[this.pool.id,ge,Ne,{assets:this.pool.tokensList,minAmountsOut:Ke,userData:Ht,toInternalBalance:Mt}]}}class Kl{constructor(ge){this.liquidityGaugesRepository=ge}relativeWeight(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.liquidityGaugesRepository.findBy("poolId",ge);return Ke?Ke.relativeWeight:0})()}weekly(ge){var Ne=this;return ie(function*(){return ol()*(yield Ne.relativeWeight(ge))})()}}const Sl=(qe,ge,Ne)=>{const Ke=qe.tokens.filter(un=>!qe.id.toLowerCase().includes(un.address.toLowerCase())),ot=Ke.findIndex(un=>un.address.toLowerCase()===ge.toLowerCase());if(-1==ot)throw new Error("Token not found in pool");const Mt=Ke.map(un=>Un(un.balance,un.decimals)),Vt=f.BigNumber.from(Ne),Ht=Mt.map(un=>un.mul(Vt).div(Mt[ot]));return{tokens:Ke.map(un=>un.address),amounts:Ht.map(un=>un.toString())}},u0=(qe,ge)=>()=>{throw`${ge} for poolType ${qe} not implemented`};class Pd{constructor(ge,Ne){this.networkConfig=ge,this.repositories=Ne,this.aprService=new nm(this.repositories.pools,this.repositories.tokenPrices,this.repositories.tokenMeta,this.repositories.tokenYields,this.repositories.feeCollector,this.repositories.yesterdaysPools,this.repositories.liquidityGauges,this.repositories.feeDistributor),this.liquidityService=new Sn(Ne.pools,Ne.tokenPrices),this.joinService=new Nl(this.repositories.poolsOnChain,ge),this.exitService=new rc(this.repositories.poolsOnChain,ge),this.feesService=new Yp(Ne.yesterdaysPools),this.volumeService=new _h(Ne.yesterdaysPools),this.poolFactory=new Hf(ge),this.impermanentLossService=new Tf(Ne.tokenPrices,Ne.tokenHistoricalPrices),Ne.liquidityGauges&&(this.emissionsService=new Kl(Ne.liquidityGauges)),this.proportionalAmounts=Sl}dataSource(){return this.repositories.pools}apr(ge){var Ne=this;return ie(function*(){return Ne.aprService.apr(ge)})()}impermanentLoss(ge,Ne){var Ke=this;return ie(function*(){return Ke.impermanentLossService.calcImpLoss(ge,Ne)})()}liquidity(ge){var Ne=this;return ie(function*(){return Ne.liquidityService.getLiquidity(ge)})()}generalisedJoin(ge,Ne,Ke,ot,Mt,Vt,Ht){var un=this;return ie(function*(){return un.joinService.joinPool(ge,Ne,Ke,ot,Mt,Vt,Ht)})()}generalisedExit(ge,Ne,Ke,ot,Mt){var Vt=this;return ie(function*(){return Vt.exitService.exitPool(ge,Ne,Ke,ot,Mt)})()}fees(ge){var Ne=this;return ie(function*(){return Ne.feesService.last24h(ge)})()}volume(ge){var Ne=this;return ie(function*(){return Ne.volumeService.last24h(ge)})()}static wrap(ge,Ne){let Ke,ot,Mt;try{Ke=po.from(ge.poolType),Mt={buildJoin:(Ht,un,pn,yn)=>Ke.join.buildJoin({joiner:Ht,pool:ge,tokensIn:un,amountsIn:pn,slippage:yn,wrappedNativeAsset:Vt}),calcPriceImpact:(Ht=ie(function*(un,pn,yn){return Ke.priceImpactCalculator.calcPriceImpact(ge,un,pn,yn)}),function(pn,yn,Zn){return Ht.apply(this,arguments)}),buildExitExactBPTIn:(Ht,un,pn,yn=!1,Zn)=>{if(Ke.exit.buildExitExactBPTIn)return Ke.exit.buildExitExactBPTIn({exiter:Ht,pool:ge,bptIn:un,slippage:pn,shouldUnwrapNativeAsset:yn,wrappedNativeAsset:Vt,singleTokenMaxOut:Zn});throw"ExitExactBPTIn not supported"},buildExitExactTokensOut:(Ht,un,pn,yn)=>Ke.exit.buildExitExactTokensOut({exiter:Ht,pool:ge,tokensOut:un,amountsOut:pn,slippage:yn,wrappedNativeAsset:Vt}),calcSpotPrice:(Ht,un)=>Ke.spotPriceCalculator.calcPoolSpotPrice(Ht,un,ge),calcProportionalAmounts:(Ht,un)=>Sl(ge,Ht,un)}}catch(Ht){"UNSUPPORTED_POOL_TYPE"!=Ht.code&&console.error(Ht),Mt={buildJoin:u0(ge.poolType,"buildJoin"),calcPriceImpact:u0(ge.poolType,"calcPriceImpact"),buildExitExactBPTIn:u0(ge.poolType,"buildExitExactBPTIn"),buildExitExactTokensOut:u0(ge.poolType,"buildExitExactTokensOut"),calcSpotPrice:u0(ge.poolType,"calcSpotPrice")}}var Ht;try{ot=new wh(ge),Mt={...Mt,buildQueryJoinExactIn:ot.buildQueryJoinExactIn.bind(ot),buildQueryJoinExactOut:ot.buildQueryJoinExactOut.bind(ot),buildQueryExitExactOut:ot.buildQueryExitExactOut.bind(ot),buildQueryExitToSingleToken:ot.buildQueryExitToSingleToken.bind(ot),buildQueryExitProportionally:ot.buildQueryExitProportionally.bind(ot)}}catch{Mt={...Mt,buildQueryJoinExactIn:u0(ge.poolType,"buildQueryJoinExactIn"),buildQueryJoinExactOut:u0(ge.poolType,"buildQueryJoinExactOut"),buildQueryExitExactOut:u0(ge.poolType,"buildQueryExitExactOut"),buildQueryExitToSingleToken:u0(ge.poolType,"buildQueryExitToSingleToken"),buildQueryExitProportionally:u0(ge.poolType,"buildQueryExitProportionally")}}const Vt=Ne.addresses.tokens.wrappedNativeAsset.toLowerCase();return{...ge,...Mt}}find(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.dataSource().find(ge);if(Ke)return Pd.wrap(Ke,Ne.networkConfig)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("id"==ge)return Ke.find(Ne);if("address"==ge){const ot=yield Ke.dataSource().findBy("address",Ne);return ot?Pd.wrap(ot,Ke.networkConfig):void 0}throw`search by ${ge} not implemented`})()}all(){var ge=this;return ie(function*(){const Ne=yield ge.dataSource().all();return Ne?Ne.map(Ke=>Pd.wrap(Ke,ge.networkConfig)).filter(Ke=>Ke):[]})()}where(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.dataSource().where(ge);return Ke?Ke.map(ot=>Pd.wrap(ot,Ne.networkConfig)).filter(ot=>ot):[]})()}}const T0=new d.Interface(["function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)"]);class gd{constructor(ge,Ne,Ke){this.gaugeControllerAddress=Ne,this.multicall=Sa(ge,Ke)}getRelativeWeights(ge,Ne){var Ke=this;return ie(function*(){const ot=ge.map(Vt=>[Ke.gaugeControllerAddress,T0.encodeFunctionData("gauge_relative_weight",[T.getAddress(Vt),Ne||Math.floor(Date.now()/1e3)])]),[,Mt]=yield Ke.multicall.aggregate(ot);return ge.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]=parseFloat(Ii(Mt[un],18))),Vt),{})})()}}class $f{get(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.query(ge);return(null==Ke?void 0:Ke.length)>0?Ke[0]:void 0})()}find(ge){var Ne=this;return ie(function*(){return Ne.get({where:{id:ge}})})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.get({where:{[String(ge)]:Ne}})})()}findAllBy(ge,Ne,Ke=1e3,ot=0){var Mt=this;return ie(function*(){const Vt={where:{[String(ge)]:Ne},first:Ke,skip:ot};return Mt.query(Vt)})()}}class vp extends $f{constructor(ge,Ne,Ke){super(),this.chainId=Ne,this.blockHeight=Ke,this.client=Ns(ge)}}class c0 extends $f{constructor(ge,Ne,Ke){super(),this.chainId=Ne,this.blockHeight=Ke,this.client=ha(ge)}}class yr extends c0{query(ge){var Ne=this;return ie(function*(){ge.orderBy||(ge.orderBy=Uh.Balance),ge.orderDirection||(ge.orderDirection=Ti.Desc),!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{gaugeShares:Ke}=yield Ne.client.GaugeShares(ge);return Ke.map(Ne.mapType)})()}mapType(ge){var Ne;return{id:ge.id,balance:ge.balance,userAddress:null===(Ne=ge.user)||void 0===Ne?void 0:Ne.id,gauge:{id:ge.gauge.id,poolId:ge.gauge.poolId||void 0,isKilled:ge.gauge.isKilled,totalSupply:ge.gauge.totalSupply}}}findByUser(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.GaugeShareAttributes.UserAddress,ge,Ne,Ke)})()}findByGauge(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.GaugeShareAttributes.GaugeId,ge,Ne,Ke)})()}}const Oa=new d.Interface(["function totalSupply() view returns (uint)","function working_supply() view returns (uint)","function reward_count() view returns (uint)","function reward_tokens(uint rewardIndex) view returns (address)","function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)"]);class _p{constructor(ge,Ne,Ke){this.chainId=Ne,this.multicall=Sa(ge,Ke)}getTotalSupplies(ge){var Ne=this;return ie(function*(){const Ke=ge.map(Vt=>[Vt,Oa.encodeFunctionData("totalSupply",[])]),[,ot]=yield Ne.multicall.aggregate(Ke),Mt=ot.map(Vt=>"0x"==Vt?"0x0":Vt);return ge.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]=parseFloat(Ii(Mt[un],18))),Vt),{})})()}getWorkingSupplies(ge){var Ne=this;return ie(function*(){const Ke=ge.map(Vt=>[Vt,Oa.encodeFunctionData("working_supply",[])]),[,ot]=yield Ne.multicall.aggregate(Ke),Mt=ot.map(Vt=>"0x"==Vt?"0x0":Vt);return ge.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]=parseFloat(Ii(Mt[un],18))),Vt),{})})()}getRewardCounts(ge){var Ne=this;return ie(function*(){let Ke;if(1==Ne.chainId){const ot=ge.map(Ht=>[Ht,Oa.encodeFunctionData("reward_count",[])]),[,Mt]=yield Ne.multicall.aggregate(ot),Vt=Mt.map(Ht=>"0x"==Ht?"0x0":Ht);Ke=ge.reduce((Ht,un,pn)=>(Ht[un]||(Ht[un]=parseInt(Vt[pn])),Ht),{})}else Ke=ge.reduce((ot,Mt)=>(ot[Mt]||(ot[Mt]=1),ot),{});return Ke})()}getRewardTokens(ge,Ne){var Ke=this;return ie(function*(){const ot=Ne||(yield Ke.getRewardCounts(ge)),Mt=ge.filter(pn=>ot[pn]>0),Vt=[0],Ht=Mt.map((pn,yn)=>{const Zn=[];for(let fr=0;fr{const zr=Vt[Zn+1],ci=[];for(let ai=Vt[Zn];ai{const Zn=[];for(let fr=0;frOa.decodeFunctionResult("reward_data",pn)[0]);return Object.keys(ot).reduce((pn,yn,Zn)=>{const fr=Mt[Zn],zr=ot[yn].reduce((ci,ai,li)=>(ci[ai]||(ci[ai]=un[fr+li]),ci),{});return pn[yn]||(pn[yn]=zr),pn},{})})()}}class pc{constructor(ge){this.gauges=[],this.client=ha(ge)}fetch(){var ge=this;return ie(function*(){const Ne=(yield ge.client.Pools({where:{preferentialGauge_not:null}})).pools.map(Ke=>Ke.preferentialGauge);return ge.gauges=Ne,ge.gauges})()}find(ge){var Ne=this;return ie(function*(){return 0==Ne.gauges.length&&(yield Ne.fetch()),Ne.gauges.find(Ke=>Ke.id==ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if(0==Ke.gauges.length&&(yield Ke.fetch()),"id"==ge)return Ke.find(Ne);if("poolId"==ge)return Ke.gauges.find(ot=>ot.poolId==Ne);if("poolAddress"==ge)return Ke.gauges.find(ot=>ot.poolAddress==Ne);throw`search by ${ge} not implemented`})()}}class Wf{constructor(ge,Ne,Ke,ot,Mt){this.chainId=ot,this.workingSupplies={},this.relativeWeights={},this.rewardData={},Ke&&(this.gaugeController=new gd(Ne,Ke,Mt)),this.multicall=new _p(Ne,ot,Mt),this.subgraph=new pc(ge)}fetch(){var ge=this;return ie(function*(){const Ne=yield ge.subgraph.fetch(),Ke=Ne.map(ot=>ot.id);return 1==ge.chainId&&(ge.workingSupplies=yield ge.multicall.getWorkingSupplies(Ke)),ge.gaugeController&&(ge.relativeWeights=yield ge.gaugeController.getRelativeWeights(Ke)),ge.rewardData=Ne.reduce((ot,Mt)=>{var Vt;return ot[Vt=Mt.id]||(ot[Vt]=Mt.tokens?Object.fromEntries(Mt.tokens.map(Ht=>[Ht.id.split("-")[0],{distributor:"",last_update:f.BigNumber.from(0),integral:f.BigNumber.from(0),token:Ht.id.split("-")[0],decimals:Ht.decimals,rate:Un(Ht.rate||"0",Ht.decimals),period_finish:f.BigNumber.from(Ht.periodFinish||"0")}])):{}),ot},{}),Ne.map(ge.compose.bind(ge))})()}find(ge){var Ne=this;return ie(function*(){return Ne.gauges||(Ne.gauges=Ne.fetch()),(yield Ne.gauges).find(Ke=>Ke.id==ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){let ot;if(Ke.gauges||(Ke.gauges=Ke.fetch()),"id"==ge||"address"==ge)return Ke.find(Ne);if("poolId"==ge)ot=(yield Ke.gauges).find(Mt=>Mt.poolId==Ne);else{if("poolAddress"!=ge)throw`search by ${ge} not implemented`;ot=(yield Ke.gauges).find(Mt=>Mt.poolAddress==Ne)}return ot})()}compose(ge){return{id:ge.id,address:ge.id,name:ge.symbol,poolId:ge.poolId,poolAddress:ge.poolAddress,totalSupply:parseFloat(ge.totalSupply),workingSupply:this.workingSupplies[ge.id],relativeWeight:this.relativeWeights[ge.id],rewardTokens:this.rewardData[ge.id]}}}class w1{constructor(ge,Ne){this.url=ge,this.apiKey=Ne}get(ge){var Ne=this;return ie(function*(){try{const Ke=Ne.toPayload(ge),{data:ot}=yield R.default.post(Ne.url,Ke,{headers:{"x-api-key":Ne.apiKey}});if(ot.errors)throw new Error(ot.errors.map(Mt=>Mt.message).join(","));return ot.data}catch(Ke){throw console.error(Ke),Ke}return[]})()}toPayload(ge){return JSON.stringify({query:P.jsonToGraphQLQuery({query:ge})})}}class Yn{constructor(ge){var Ne,Ke;this.skip=0,this.client=Ns(ge.url),this.blockHeight=ge.blockHeight,this.chainId=ge.chainId;const Mt=Object.assign({},(null===(Ne=ge.query)||void 0===Ne?void 0:Ne.args)||{orderBy:lo.TotalLiquidity,orderDirection:xi.Desc,where:{swapEnabled:{eq:!0},totalShares:{gt:1e-12}}}),Vt=Object.assign({},(null===(Ke=ge.query)||void 0===Ke?void 0:Ke.attrs)||{});this.query={args:Mt,attrs:Vt}}fetchDefault(){var ge=this;return ie(function*(){const{pool0:Ne,pool1000:Ke,pool2000:ot}=yield ge.client.AllPools({where:{swapEnabled:!0,totalShares_gt:"0.000000000001"},orderBy:lo.TotalLiquidity,orderDirection:xi.Desc,block:yield ge.block()});return[...Ne,...Ke,...ot].map(ge.mapType.bind(ge))})()}fetch(ge){var Ne=this;return ie(function*(){(null==ge?void 0:ge.skip)&&(Ne.query.args.skip=ge.skip),Ne.blockHeight&&(Ne.query.args.block={number:yield Ne.blockHeight()}),Ne.query.args.first=(null==ge?void 0:ge.first)||1e3;const Ke=new go(Ne.query.args).format(new is),{pools:ot}=yield Ne.client.Pools(Ke);return Ne.skip=((null==ge?void 0:ge.skip)||0)+ot.length,ot.map(Ne.mapType.bind(Ne))})()}find(ge){var Ne=this;return ie(function*(){return yield Ne.findBy("id",ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.pools||(Ke.pools=Ke.fetchDefault()),(yield Ke.pools).find(ot=>ot[ge]==Ne)})()}all(){var ge=this;return ie(function*(){return ge.pools||(ge.pools=ge.fetchDefault()),ge.pools})()}block(){var ge=this;return ie(function*(){return ge.blockHeight?{number:yield ge.blockHeight()}:void 0})()}where(ge){var Ne=this;return ie(function*(){return Ne.pools||(Ne.pools=Ne.fetchDefault()),(yield Ne.pools).filter(ge)})()}mapType(ge){var Ne,Ke,ot,Mt,Vt,Ht,un,pn,yn;return{id:ge.id,name:ge.name||"",address:ge.address,chainId:this.chainId,poolType:ge.poolType,poolTypeVersion:ge.poolTypeVersion||1,swapFee:ge.swapFee,swapEnabled:ge.swapEnabled,protocolYieldFeeCache:ge.protocolYieldFeeCache||"0",protocolSwapFeeCache:ge.protocolSwapFeeCache||"0",amp:null!==(Ne=ge.amp)&&void 0!==Ne?Ne:void 0,owner:null!==(Ke=ge.owner)&&void 0!==Ke?Ke:void 0,factory:null!==(ot=ge.factory)&&void 0!==ot?ot:void 0,symbol:null!==(Mt=ge.symbol)&&void 0!==Mt?Mt:void 0,tokens:(ge.tokens||[]).map(this.mapToken.bind(this)),tokensList:ge.tokensList,tokenAddresses:(ge.tokens||[]).map(Zn=>Zn.address),totalLiquidity:ge.totalLiquidity,totalShares:ge.totalShares,totalSwapFee:ge.totalSwapFee,totalSwapVolume:ge.totalSwapVolume,priceRateProviders:null!==(Vt=ge.priceRateProviders)&&void 0!==Vt?Vt:void 0,createTime:ge.createTime,mainIndex:null!==(Ht=ge.mainIndex)&&void 0!==Ht?Ht:void 0,wrappedIndex:null!==(un=ge.wrappedIndex)&&void 0!==un?un:void 0,totalWeight:ge.totalWeight||"1",lowerTarget:null!==(pn=ge.lowerTarget)&&void 0!==pn?pn:"0",upperTarget:null!==(yn=ge.upperTarget)&&void 0!==yn?yn:"0"}}mapToken(ge){const Ne=this.mapSubPools(ge.token);return{...ge,isExemptFromYieldProtocolFee:ge.isExemptFromYieldProtocolFee||!1,token:Ne}}mapSubPools(ge){let Ne=null;return ge.pool&&(Ne={id:ge.pool.id,address:ge.pool.address,totalShares:ge.pool.totalShares,poolType:ge.pool.poolType,mainIndex:ge.pool.mainIndex||0},(null==ge?void 0:ge.pool.tokens)&&(Ne.tokens=ge.pool.tokens.map(this.mapSubPoolToken.bind(this)))),{pool:Ne,latestUSDPrice:ge.latestUSDPrice||void 0}}mapSubPoolToken(ge){return{address:ge.address,decimals:ge.decimals,symbol:ge.symbol,balance:ge.balance,priceRate:ge.priceRate,weight:ge.weight,isExemptFromYieldProtocolFee:ge.isExemptFromYieldProtocolFee||void 0,token:ge.token?this.mapSubPools(ge.token):void 0}}}class Jd{constructor(ge){this.skip=0,this.poolsSubgraph=new Yn({url:ge.url,chainId:ge.chainId,blockHeight:ge.blockHeight,query:ge.query}),this.provider=ge.provider,this.multicall=ge.multicall,this.vault=ge.vault}fetchDefault(){var ge=this;return ie(function*(){const Ne=yield ge.poolsSubgraph.fetch();return yield sl(Ne,ge.multicall,ge.vault,ge.provider)})()}fetch(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.poolsSubgraph.fetch(ge);return yield sl(Ke,Ne.multicall,Ne.vault,Ne.provider)})()}find(ge){var Ne=this;return ie(function*(){return yield Ne.findBy("id",ge)})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.pools||(Ke.pools=Ke.fetchDefault()),(yield Ke.pools).find(ot=>ot[ge]==Ne)})()}all(){var ge=this;return ie(function*(){return ge.pools||(ge.pools=ge.fetchDefault()),ge.pools})()}where(ge){var Ne=this;return ie(function*(){return Ne.pools||(Ne.pools=Ne.fetchDefault()),(yield Ne.pools).filter(ge)})()}}class Mo extends c0{query(ge){var Ne=this;return ie(function*(){!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{pools:Ke}=yield Ne.client.PoolGauges(ge);return Ke.map(Ne.mapType)})()}mapType(ge){return ge}}var yd;E.PoolJoinExitAttributes=void 0,(yd=E.PoolJoinExitAttributes||(E.PoolJoinExitAttributes={})).Pool="pool",yd.Sender="sender";class bd extends vp{query(ge){var Ne=this;return ie(function*(){ge.orderBy||(ge.orderBy=gn.Timestamp),ge.orderDirection||(ge.orderDirection=xi.Asc),!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{joinExits:Ke}=yield Ne.client.JoinExits(ge);return Ke.map(Ne.mapType)})()}mapType(ge){return{id:ge.id,userAddress:ge.user.id,poolId:ge.pool.id,timestamp:ge.timestamp,type:ge.type,amounts:ge.amounts,tokens:ge.pool.tokensList}}findByUser(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolJoinExitAttributes.Sender,ge,Ne,Ke)})()}findJoins(ge,Ne){var Ke=this;return ie(function*(){return Ke.query({where:{sender:ge,pool:Ne,type:"Join"}})})()}findExits(ge,Ne){var Ke=this;return ie(function*(){return Ke.query({where:{sender:ge,pool:Ne,type:"Exit"}})})()}findByPool(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolJoinExitAttributes.Pool,ge,Ne,Ke)})()}}class Zl extends vp{query(ge){var Ne=this;return ie(function*(){ge.orderBy||(ge.orderBy=As.Balance),ge.orderDirection||(ge.orderDirection=xi.Desc),!ge.block&&Ne.blockHeight&&(ge.block={number:yield Ne.blockHeight()});const{poolShares:Ke}=yield Ne.client.PoolShares(ge);return Ke.map(Ne.mapType)})()}mapType(ge){return{id:ge.id,userAddress:ge.userAddress.id,poolId:ge.poolId.id,balance:ge.balance}}findByUser(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolShareAttributes.UserAddress,ge,Ne,Ke)})()}findByPool(ge,Ne,Ke){var ot=this;return ie(function*(){return ot.findAllBy(E.PoolShareAttributes.PoolId,ge,Ne,Ke)})()}}class A0{constructor(ge){this.tokens=ge}find(ge){var Ne=this;return ie(function*(){return Ne.tokens.find(Ke=>Ke.address.toLowerCase()===ge.toLowerCase())})()}findBy(ge,Ne){var Ke=this;return ie(function*(){return Ke.tokens.find(ot=>ot[ge]===Ne)})()}}class No{constructor(ge,Ne=1){this.chainId=Ne,this.prices={},this.baseTokenAddresses=ge.map(ur),this.urlBase=`https://api.coingecko.com/api/v3/simple/token_price/${this.platform(Ne)}?vs_currencies=usd,eth`,this.debouncer=new hi(this.fetch.bind(this),200)}fetch(ge,{signal:Ne}={}){return R.default.get(this.url(ge),{signal:Ne}).then(({data:Ke})=>Ke).finally(()=>{})}fetchNative({signal:ge}={}){let Ne;var ot;(ot=Ne||(Ne={})).ETH="ethereum",ot.MATIC="matic-network",ot.XDAI="xdai";let Ke=Ne.ETH;return 137===this.chainId&&(Ke=Ne.MATIC),100===this.chainId&&(Ke=Ne.XDAI),R.default.get(`https://api.coingecko.com/api/v3/simple/price/?vs_currencies=eth,usd&ids=${Ke}`,{signal:ge}).then(({data:ot})=>ot[Ke]).finally(()=>{})}find(ge){const Ne=ur(ge,this.chainId);if(!this.prices[Ne]){if(0===Object.keys(this.prices).length)for(const Ke of this.baseTokenAddresses)this.prices[Ke]=this.debouncer.fetch(Ke).then(ot=>ot[Ke]);if(Ne===St(this.chainId).Addresses.nativeAsset.toLowerCase())return this.nativePrice||(this.prices[Ne]=this.fetchNative()),this.prices[Ne];this.prices[Ne]=this.debouncer.fetch(Ne).then(Ke=>Ke[Ne])}return this.prices[Ne]}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"==ge)return Ke.find(Ne)})()}platform(ge){switch(ge){case 1:case 5:case 42:case 31337:return"ethereum";case 100:return"xdai";case 137:return"polygon-pos";case 42161:return"arbitrum-one"}return"2"}url(ge){return`${this.urlBase}&contract_addresses=${ge.join(",")}`}}class uc{constructor(ge=1){this.chainId=ge,this.prices={},this.urlBase=`https://api.coingecko.com/api/v3/coins/${this.platform(ge)}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`}fetch(ge,Ne,{signal:Ke}={}){const ot=this.urlRange(ge,Ne);return R.default.get(ot,{signal:Ke}).then(({data:Mt})=>Mt).finally(()=>{})}find(ge){return ie(function*(){throw"Historic price requires point-in-time timestamp, please use findBy(address, timestamp)"})()}findBy(ge,Ne){var Ke=this;return ie(function*(){const ot=ur(ge,Ke.chainId);return{usd:`${(yield Ke.fetch(ot,Ne)).prices[0][1]}`}})()}platform(ge){switch(ge){case 1:case 5:case 42:case 31337:return"ethereum";case 137:return"polygon-pos";case 42161:return"arbitrum-one";case 100:return"xdai"}return"2"}urlRange(ge,Ne){const Ke=Ne-3600,ot=Ne+3600;return`${this.urlBase.replace("%TOKEN_ADDRESS%",ge)}&from=${Ke}&to=${ot}`}}class l0{constructor(ge,Ne=1){this.subgraphUrl=ge,this.chainId=Ne,this.prices={},this.debouncer=new hi(this.fetch.bind(this),200)}fetch(ge,{signal:Ne}={}){var Ke=this;return ie(function*(){return R.default.post(Ke.subgraphUrl,{variables:{addresses:ge},query:"query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }"},{signal:Ne}).then(ot=>ot.data.data).then(({tokens:ot})=>Object.fromEntries(ot.map(Mt=>[Mt.address,{usd:Mt.latestUSDPrice||void 0}]))).finally(()=>{})})()}find(ge){var Ne=this;return ie(function*(){const Ke=ur(ge,Ne.chainId);return Ne.prices[Ke]||(Ne.prices[Ke]=Ne.debouncer.fetch(Ke).then(ot=>ot[Ke])),Ne.prices[Ke]})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"==ge)return Ke.find(Ne)})()}}class Bl{constructor(ge,Ne,Ke){this.coingeckoRepository=ge,this.subgraphRepository=Ne,this.aaveRates=Ke}find(ge){var Ne=this;return ie(function*(){let Ke;try{try{if(Ke=yield Ne.coingeckoRepository.find(ge),!(null==Ke?void 0:Ke.usd))throw new Error("Price not found")}catch(Mt){console.error(`Coingecko API error: ${Mt}`),Ke=yield Ne.subgraphRepository.find(ge)}}catch(Mt){console.error(Mt)}const ot=(yield Ne.aaveRates.getRate(ge))||1;return Ke&&Ke.usd?{...Ke,usd:(parseFloat(Ke.usd)*ot).toString()}:Ke})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"===ge)return Ke.find(Ne);throw`Token price search by ${ge} not implemented`})()}}class wp{constructor(ge,Ne){this.coingeckoRepository=ge,this.aaveRates=Ne}find(ge){var Ne=this;return ie(function*(){return Ne.findBy(ge,Math.floor(Date.now()/1e3))})()}findBy(ge,Ne){var Ke=this;return ie(function*(){const ot=yield Ke.coingeckoRepository.findBy(ge,Ne),Mt=(yield Ke.aaveRates.getRate(ge))||1;return ot&&ot.usd?{...ot,usd:(parseFloat(ot.usd)*Mt).toString()}:ot})()}}const qc=new d.Interface(["function rate() view returns (uint256)"]);class Sf{constructor(ge,Ne,Ke){this.network=Ke,this.multicall=Sa(ge,Ne)}fetch(ge){var Ne=this;return ie(function*(){const Ke=Object.values(ir[ge]),ot=Ke.map(Vt=>[Vt,qc.encodeFunctionData("rate",[])]),[,Mt]=yield Ne.multicall.aggregate(ot);return Ke.reduce((Vt,Ht,un)=>(Vt[Ht]||(Vt[Ht]="0x"==Mt[un]?0:parseFloat(Ii(Mt[un],27))),Vt),{})})()}getRate(ge){var Ne=this;return ie(function*(){return Ne.network!=E.Network.MAINNET&&Ne.network!=E.Network.POLYGON?1:Object.values(ir[Ne.network]).includes(ge)?(Ne.rates||(Ne.rates=Ne.fetch(Ne.network)),(yield Ne.rates)[ge]):1})()}}const Rd=new d.Interface(["function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)"]),x1=new d.Interface(["function totalSupply() view returns (uint)"]),G0=new d.Interface(["function getRate() view returns (uint)"]);class Qp{constructor(ge,Ne,Ke,ot,Mt,Vt){this.feeDistributorAddress=Ne,this.balAddress=Ke,this.veBalAddress=ot,this.bbAUsdAddress=Mt,this.multicall=Sa(ge,Vt)}fetch(ge){var Ne=this;return ie(function*(){const Ke=Ne.getPreviousWeek(ge),ot=[[Ne.feeDistributorAddress,Rd.encodeFunctionData("getTokensDistributedInWeek",[T.getAddress(Ne.balAddress),Ke])],[Ne.feeDistributorAddress,Rd.encodeFunctionData("getTokensDistributedInWeek",[T.getAddress(Ne.bbAUsdAddress),Ke])],[Ne.veBalAddress,x1.encodeFunctionData("totalSupply",[])],[Ne.bbAUsdAddress,G0.encodeFunctionData("getRate",[])]],[,Mt]=yield Ne.multicall.aggregate(ot);return{balAmount:parseFloat(Ii(Mt[0],18)),bbAUsdAmount:parseFloat(Ii(Mt[1],18)),veBalSupply:parseFloat(Ii(Mt[2],18)),bbAUsdPrice:parseFloat(Ii(Mt[3],18)),balAddress:Ne.balAddress}})()}multicallData(ge){var Ne=this;return ie(function*(){return Ne.data||(Ne.data=yield Ne.fetch(ge)),Ne.data})()}getPreviousWeek(ge){const Ne=new Date(ge);Ne.setUTCHours(0),Ne.setUTCMinutes(0),Ne.setUTCSeconds(0),Ne.setUTCMilliseconds(0);let Ke=Ne.getUTCDay()-4;return Ke<0&&(Ke+=7),Ke+=7,Math.floor(Ne.getTime()/1e3)-86400*Ke}}const Nd=new d.Interface(["function getProtocolFeesCollector() view returns (address)"]),Gh=new d.Interface(["function getSwapFeePercentage() view returns (uint)"]);let d0;class I0{constructor(ge,Ne){this.provider=Ne,this.vault=new g.Contract(ge,Nd,this.provider)}fetch(){var ge=this;return ie(function*(){const Ne=yield ge.vault.getProtocolFeesCollector(),Ke=new g.Contract(Ne,Gh,ge.provider),ot=yield Ke.getSwapFeePercentage();return parseFloat(Ii(ot,18))})()}find(){var ge=this;return ie(function*(){return d0||(d0=ge.fetch()),ge.swapFeePercentage=yield d0,ge.swapFeePercentage})()}findBy(){var ge=this;return ie(function*(){return ge.find()})()}}const z0=new d.Interface(["function getSwapFeePercentage() view returns (uint)"]);let zh;class xp{constructor(ge,Ne,Ke){this.protocolFeePercentagesProviderAddress=Ne,this.multicall=Sa(ge,Ke)}fetch(){var ge=this;return ie(function*(){const Ne=[[ge.protocolFeePercentagesProviderAddress,z0.encodeFunctionData("getFeeTypePercentage",[0])],[ge.protocolFeePercentagesProviderAddress,z0.encodeFunctionData("getFeeTypePercentage",[2])]],[,Ke]=yield ge.multicall.aggregate(Ne);return{swapFee:parseFloat(Ii(Ke[0],18)),yieldFee:parseFloat(Ii(Ke[2],18))}})()}getFees(){var ge=this;return ie(function*(){return zh||(zh=ge.fetch()),ge.protocolFees=yield zh,ge.protocolFees})()}}const xh={stETH:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",wstETH:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",arbitrumStEth:"0x5979d7b546e38e414f7e9822514be443a4800529"},f0=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://lido-aprs-proxy.balancer.workers.dev/?network=1"),{data:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke.smaApr))}catch(Ne){console.error("Failed to fetch stETH APR:",Ne)}return{[xh.stETH]:ge,[xh.wstETH]:ge,[xh.arbitrumStEth]:ge}});return function(){return qe.apply(this,arguments)}}(),Gf={rETH:"0xae78736cd615f374d3085123a210448e74fc6393"},E1=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://api.rocketpool.net/api/apr"),{yearlyAPR:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[Gf.rETH]:ge}});return function(){return qe.apply(this,arguments)}}(),kf={stMATIC:"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4"},kl=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://lido-aprs-proxy.balancer.workers.dev/?network=137"),{apr:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch stMATIC APR:",Ne)}return{[kf.stMATIC]:ge}});return function(){return qe.apply(this,arguments)}}(),qh={usdcUSDplus:"0x1aafc31091d93c3ff003cff5d2d8f7ba2e728425",usdcUSDplus2:"0x6933ec1ca55c06a894107860c92acdfd2dd8512f"},Bd=function(){var qe=ie(function*(){let ge=0;try{const{data:Ne}=yield R.default.get("https://app.overnight.fi/api/balancer/week/apr");ge=Math.round(1e4*parseFloat(Ne)/100)}catch(Ne){console.error("Failed to fetch USD+ APR:",Ne)}return Object.fromEntries(Object.values(qh).map(Ne=>[Ne,ge]))});return function(){return qe.apply(this,arguments)}}(),q0={sfrxETH:"0xac3e018457b222d93114458476f3e3416abbe38f"},T1=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://api.frax.finance/v2/frxeth/summary/latest"),{sfrxethApr:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[q0.sfrxETH]:ge}});return function(){return qe.apply(this,arguments)}}(),Eh={maticX:"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6"},Cf=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://generic-apr-proxy.balancer.workers.dev/?provider=stader"),{value:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[Eh.maticX]:ge}});return function(){return qe.apply(this,arguments)}}(),ml={qETH:"0x93ef1ea305d11a9b2a3ebb9bb4fcc34695292e7d"},Ep=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://generic-apr-proxy.balancer.workers.dev/?provider=tranchess"),[{weeklyAveragePnlPercentage:Ke}]=Ne.data;ge=Math.round(parseFloat(Ii(f.BigNumber.from(Ke).mul(365).mul(1e4),18)))}catch(Ne){console.error("Failed to fetch qETH APR:",Ne)}return{[ml.qETH]:ge}});return function(){return qe.apply(this,arguments)}}(),Tp={USDR:"0xaf0d9d65fc54de245cda37af3d18cbec860a4d4b"},K0=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://generic-apr-proxy.balancer.workers.dev/?provider=usdr"),{usdr:Ke}=Ne.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch USDR APR:",Ne)}return{[Tp.USDR]:ge}});return function(){return qe.apply(this,arguments)}}(),Fl={rETH:"0x9559aaa82d9649c7a7b220e7c461d2e74c9a3593"},zf=function(){var qe=ie(function*(){let ge=0;try{const Ne=yield R.default.get("https://drop-api.stafi.io/reth/v1/poolData/"),{stakeApr:Ke}=Ne.data.data;ge=Math.round(100*parseFloat(Ke))}catch(Ne){console.error("Failed to fetch APR:",Ne)}return{[Fl.rETH]:ge}});return function(){return qe.apply(this,arguments)}}(),Ja=new w.JsonRpcProvider("https://rpc.ankr.com/eth",1),im={getPoolsUI:new g.Contract("0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9",[{inputs:[],name:"getPoolsUI",outputs:[{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"poolId",type:"uint256"},{internalType:"uint256",name:"stakedAmount",type:"uint256"},{components:[{internalType:"uint48",name:"startTimestampHour",type:"uint48"},{internalType:"uint48",name:"endTimestampHour",type:"uint48"},{internalType:"uint96",name:"rewardsPerHour",type:"uint96"},{internalType:"uint96",name:"capPerPosition",type:"uint96"}],internalType:"struct ApeCoinStaking.TimeRange",name:"currentTimeRange",type:"tuple"}],internalType:"struct ApeCoinStaking.PoolUI",name:"",type:"tuple"}],stateMutability:"view",type:"function"}],Ja).getPoolsUI},e1={sApe:"0x7966c5bae631294d7cffcea5430b78c2f76db6fa"},Je=function(){var qe=ie(function*(ge=1,Ne=im){let Ke=0;try{const ot=(yield Ne.getPoolsUI())[0],Mt=ot.stakedAmount,Vt=ot.currentTimeRange.rewardsPerHour.mul(8760);Ke=Number(Vt.mul(1e4).div(Mt))}catch(ot){console.error("Failed to fetch Tessera Ape Coin APR:",ot)}return{[e1.sApe]:Ke}});return function(){return qe.apply(this,arguments)}}(),oe={eUSDC:"0xeb91861f8a4e1c12333f42dce8fb0ecdc28da716",eDAI:"0xe025e3ca2be02316033184551d4d3aa22024d9dc",eUSDT:"0x4d19f33948b99800b6113ff3e83bec9b537c85d2",eFRAX:"0x5484451a88a35cd0878a1be177435ca8a0e4054e"},Pe={[E.Network.MAINNET]:"https://api.thegraph.com/subgraphs/name/euler-xyz/euler-mainnet"},He=function(){var qe=ie(function*(){const ge=E.Network.MAINNET,Ne={operationName:"getAssetsAPY",query:"\n query getAssetsAPY($eTokenAddress_in: [String!]) {\n assets(\n where: {\n eTokenAddress_in: $eTokenAddress_in\n }\n ) {\n eTokenAddress\n supplyAPY\n }\n }\n",variables:{eTokenAddress_in:Object.values(oe)}},Ke=yield R.default.post(Pe[ge],Ne),{data:{assets:ot}}=Ke.data,Mt={eUSDT:0,eDAI:0,eUSDC:0,eFRAX:0};return ot.forEach(({eTokenAddress:Vt,supplyAPY:Ht})=>{const un=Object.entries(oe).filter(([,pn])=>pn.toLocaleLowerCase()===Vt.toLocaleLowerCase())[0][0];Mt[un]=Math.round(1e4*parseFloat(Ii(f.BigNumber.from(Ht),27)))}),{[oe.eUSDT]:Mt.eUSDT,[oe.eDAI]:Mt.eDAI,[oe.eUSDC]:Mt.eUSDC,[oe.eFRAX]:Mt.eFRAX}});return function(){return qe.apply(this,arguments)}}(),We=Object.fromEntries([...Object.values(xh).map(qe=>[qe,f0]),...Object.values(kf).map(qe=>[qe,kl]),...Object.values(ts).map(qe=>[qe,ki]),...Object.values(qh).map(qe=>[qe,Bd]),...Object.values(Gf).map(qe=>[qe,E1]),...Object.values(q0).map(qe=>[qe,T1]),...Object.values(Eh).map(qe=>[qe,Cf]),...Object.values(ml).map(qe=>[qe,Ep]),...Object.values(Tp).map(qe=>[qe,K0]),...Object.values(Fl).map(qe=>[qe,zf]),...Object.values(e1).map(qe=>[qe,Je]),...Object.values(oe).map(qe=>[qe,He])]);class Xe{constructor(ge,Ne=We){this.network=ge,this.sources=Ne,this.yields={}}fetch(ge){var Ne=this;return ie(function*(){const Ke=yield Ne.sources[ge](Ne.network);Ne.yields={...Ne.yields,...Ke}})()}find(ge){var Ne=this;return ie(function*(){const Ke=ge.toLocaleLowerCase();return Object.keys(Ne.sources).includes(Ke)&&!Object.keys(Ne.yields).includes(Ke)&&(yield Ne.fetch(Ke)),Ne.yields[Ke]})()}findBy(ge,Ne){var Ke=this;return ie(function*(){if("address"==ge)return Ke.find(Ne)})()}}const at=qe=>`{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${qe} }) {\n number\n }\n}`,_t=function(){var qe=ie(function*(ge,Ne){const Ke={query:at(Ne)},ot=yield R.default.post(ge,Ke),{data:{blocks:Mt}}=ot.data;return parseInt(Mt[0].number)});return function(Ne,Ke){return qe.apply(this,arguments)}}();class xt{constructor(ge){this.endpoint=ge,this.blocks={}}find(ge){var Ne=this;return ie(function*(){if("dayAgo"==ge){const Ke=""+(Math.floor(Date.now()/1e3)-86400);return Ne.blocks[Ke]||(Ne.blocks={...Ne.blocks,[Ke]:_t(Ne.endpoint,Ke)}),Ne.blocks[Ke]}})()}findBy(ge="",Ne=""){return ie(function*(){})()}}var $t,cn,In=[{chainId:1,address:"0x8888801af4d980682e47f1a9036e589479e835c5",symbol:"mph"},{chainId:1,address:"0x27054b13b1b798b345b591a4d22e6562d47ea75a",symbol:"ast"},{chainId:1,address:"0x3301ee63fb29f863f2333bd4466acb46cd8323e6",symbol:"akita"},{chainId:1,address:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",symbol:"aurabal"},{chainId:1,address:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",symbol:"aura"},{chainId:1,address:"0x3472a5a71965499acd81997a54bba8d852c6e53d",symbol:"badger"},{chainId:1,address:"0xba100000625a3754423978a60c9317c58a424e3d",symbol:"bal"},{chainId:1,address:"0x804cdb9116a10bb78768d3252355a1b18067bf8f",symbol:"bb-a-dai"},{chainId:1,address:"0x9210f1204b5a24742eba12f710636d76240df3d0",symbol:"bb-a-usdc"},{chainId:1,address:"0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c",symbol:"bb-a-usdt"},{chainId:1,address:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2",symbol:"bb-a-usd"},{chainId:1,address:"0x2d94aa3e47d9d5024503ca8491fce9a2fb4da198",symbol:"bank"},{chainId:1,address:"0x0d8775f648430679a709e98d2b0cb6250d2887ef",symbol:"bat"},{chainId:1,address:"0xf17e65822b568b3903685a7c9f496cf7656cc6c2",symbol:"bico"},{chainId:1,address:"0x799ebfabe77a6e34311eeee9825190b9ece32824",symbol:"btrst"},{chainId:1,address:"0x514910771af9ca656af840dff83e8264ecf986ca",symbol:"link"},{chainId:1,address:"0x3506424f91fd33084466f402d5d97f05f8e3b4af",symbol:"chz"},{chainId:1,address:"0x41e5560054824ea6b0732e656e3ad64e20e94e45",symbol:"cvc"},{chainId:1,address:"0xc00e94cb662c3520282e6f5717214004a7f26888",symbol:"comp"},{chainId:1,address:"0xdef1ca1fb7fbcdc777520aa7f396b4e015f497ab",symbol:"cow"},{chainId:1,address:"0xd533a949740bb3306d119cc777fa900ba034cd52",symbol:"crv"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",symbol:"dai"},{chainId:1,address:"0xf2051511b9b121394fa75b8f7d4e7424337af687",symbol:"haus"},{chainId:1,address:"0x888888435fde8e7d4c54cab67f206e4199454c60",symbol:"dfx"},{chainId:1,address:"0x798d1be841a82a273720ce31c822c61a67a601c3",symbol:"digg"},{chainId:1,address:"0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c",symbol:"enj"},{chainId:1,address:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",symbol:"ens"},{chainId:1,address:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",symbol:"ftm"},{chainId:1,address:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",symbol:"fei"},{chainId:1,address:"0xed1480d12be41d92f36f5f7bdd88212e381a3677",symbol:"fdt"},{chainId:1,address:"0x586aa273f262909eef8fa02d90ab65f5015e0516",symbol:"fiat"},{chainId:1,address:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",symbol:"gtc"},{chainId:1,address:"0x900db999074d9277c5da2a43f252d74366230da0",symbol:"giv"},{chainId:1,address:"0x6810e776880c02933d47db1b9fc05908e5386b96",symbol:"gno"},{chainId:1,address:"0xba485b556399123261a5f9c95d413b4f93107407",symbol:"graviaura"},{chainId:1,address:"0x3ec8798b81485a254928b70cda1cf0a2bb0b74d7",symbol:"gro"},{chainId:1,address:"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",symbol:"snx"},{chainId:1,address:"0x5a98fcbea516cf06857215779fd812ca3bef1b32",symbol:"ldo"},{chainId:1,address:"0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d",symbol:"lqty"},{chainId:1,address:"0x5f98805a4e8be255a32880fdec7f6728c6568ba0",symbol:"lusd"},{chainId:1,address:"0x965d79f1a1016b574a62986e13ca8ab04dfdd15c",symbol:"m2"},{chainId:1,address:"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",symbol:"mkr"},{chainId:1,address:"0xd084944d3c05cd115c09d072b9f44ba3e0e45921",symbol:"fold"},{chainId:1,address:"0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",symbol:"matic"},{chainId:1,address:"0xa3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2",symbol:"mta"},{chainId:1,address:"0x4b13006980acb09645131b91d259eaa111eaf5ba",symbol:"myc"},{chainId:1,address:"0x333a4823466879eef910a04d473505da62142069",symbol:"nation"},{chainId:1,address:"0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5",symbol:"note"},{chainId:1,address:"0x967da4048cd07ab37855c090aaf366e4ce1b9f48",symbol:"ocean"},{chainId:1,address:"0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5",symbol:"ohm"},{chainId:1,address:"0xab846fb6c81370327e784ae7cbb6d6a6af6ff4bf",symbol:"pal"},{chainId:1,address:"0xcafe001067cdef266afb7eb5a286dcfd277f3de5",symbol:"psp"},{chainId:1,address:"0x68037790a0229e9ce6eaa8a99ea92964106c4703",symbol:"par"},{chainId:1,address:"0x45804880de22913dafe09f4980848ece6ecbaf78",symbol:"paxg"},{chainId:1,address:"0x89ab32156e46f46d02ade3fecbe5fc4243b9aaed",symbol:"pnt"},{chainId:1,address:"0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec",symbol:"poly"},{chainId:1,address:"0x43d4a3cd90ddd2f8f4f693170c9c8098163502ad",symbol:"d2d"},{chainId:1,address:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",symbol:"renbtc"},{chainId:1,address:"0x408e41876cccdc0f92210600ef50372656052a38",symbol:"ren"},{chainId:1,address:"0xfb5453340c03db5ade474b27e68b6a9c6b2823eb",symbol:"robot"},{chainId:1,address:"0xd33526068d116ce69f19a9ee46f0bd304f21a51f",symbol:"rpl"},{chainId:1,address:"0xae78736cd615f374d3085123a210448e74fc6393",symbol:"reth"},{chainId:1,address:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",symbol:"sbtc"},{chainId:1,address:"0x476c5e26a75bd202a9683ffd34359c0cc15be0ff",symbol:"srm"},{chainId:1,address:"0x35e78b3982e87ecfd5b3f3265b601c046cdbe232",symbol:"xai"},{chainId:1,address:"0x3affcca64c2a6f4e3b6bd9c64cd2c969efd1ecbe",symbol:"dsla"},{chainId:1,address:"0xf24d8651578a55b0c119b9910759a351a3458895",symbol:"sdbal"},{chainId:1,address:"0x11c1a6b3ed6bb362954b29d3183cfa97a0c806aa",symbol:"str"},{chainId:1,address:"0x8f693ca8d21b157107184d29d398a8d082b38b76",symbol:"data"},{chainId:1,address:"0x470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7",symbol:"temple"},{chainId:1,address:"0xa36fdbbae3c9d55a1d67ee5821d53b50b63a1ab9",symbol:"temp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",symbol:"usdt"},{chainId:1,address:"0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050",symbol:"tcr"},{chainId:1,address:"0x226f7b842e0f0120b7e194d05432b3fd14773a9d",symbol:"unn"},{chainId:1,address:"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",symbol:"uni"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",symbol:"usdc"},{chainId:1,address:"0x81f8f0bb1cb2a06649e51913a151f0e7ef6fa321",symbol:"vita"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",symbol:"weth"},{chainId:1,address:"0xedb171c18ce90b633db442f2a6f72874093b49ef",symbol:"wampl"},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",symbol:"wbtc"},{chainId:1,address:"0xf203ca1769ca8e9e8fe1da9d147db68b6c919817",symbol:"wncg"},{chainId:1,address:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",symbol:"wsteth"},{chainId:1,address:"0x79c71d3436f39ce382d0f58f1b011d88100b9d91",symbol:"xns"},{chainId:1,address:"0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",symbol:"yfi"},{chainId:1,address:"0xbcca60bb61934080951369a648fb03df4f96263c",symbol:"ausdc"},{chainId:1,address:"0x028171bca77440897b824ca71d1c56cac55b68a3",symbol:"adai"},{chainId:1,address:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",symbol:"ausdt"},{chainId:137,address:"0x9c2c5fd7b07e95ee044ddeba0e97a665f142394f",symbol:"1inch"},{chainId:137,address:"0xd6df932a45c0f255f85145f286ea0b292b21c90b",symbol:"aave"},{chainId:137,address:"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539",symbol:"addy"},{chainId:137,address:"0xf84bd51eab957c2e7b7d646a3427c5a50848281d",symbol:"agar"},{chainId:137,address:"0x033d942a6b495c4071083f4cde1f17e986fe856c",symbol:"aga"},{chainId:137,address:"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58",symbol:"amaticc"},{chainId:137,address:"0x034b2090b579228482520c589dbd397c53fc51cc",symbol:"vision"},{chainId:137,address:"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b",symbol:"avax"},{chainId:137,address:"0x49690541e3f6e933a9aa3cffee6010a7bb5b72d7",symbol:"axiav3"},{chainId:137,address:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",symbol:"bal"},{chainId:137,address:"0xdb7cb471dd0b49b29cab4a1c14d070f27216a0ab",symbol:"bank"},{chainId:137,address:"0xfbdd194376de19a88118e84e279b977f165d01b8",symbol:"bifi"},{chainId:137,address:"0xd6ca869a4ec9ed2c7e618062cdc45306d8dbbc14",symbol:"btc2x-fli-p"},{chainId:137,address:"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",symbol:"link"},{chainId:137,address:"0x172370d5cd63279efa6d502dab29171933a610af",symbol:"crv"},{chainId:137,address:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",symbol:"dai"},{chainId:137,address:"0x1d607faa0a51518a7728580c238d912747e71f7a",symbol:"data"},{chainId:137,address:"0x85955046df4668e1dd369d2de9f3aeb98dd2a369",symbol:"dpi"},{chainId:137,address:"0xe7804d91dfcde7f776c90043e03eaa6df87e6395",symbol:"dfx"},{chainId:137,address:"0xf28164a485b0b2c90639e47b0f377b4a438a16b1",symbol:"dquick"},{chainId:137,address:"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89",symbol:"frax"},{chainId:137,address:"0x50b728d8d964fd00c2d0aad81718b71311fef68a",symbol:"snx"},{chainId:137,address:"0x72928d5436ff65e57f72d5566dcd3baedc649a88",symbol:"hdao"},{chainId:137,address:"0x3ad707da309f3845cd602059901e39c4dcd66473",symbol:"eth2x-fli-p"},{chainId:137,address:"0x4f025829c4b13df652f38abd2ab901185ff1e609",symbol:"ieth-fli-p"},{chainId:137,address:"0x340f412860da7b7823df372a2b59ff78b7ae6abc",symbol:"imatic-fli-p"},{chainId:137,address:"0xf287d97b6345bad3d88856b26fb7c0ab3f2c7976",symbol:"matic2x-fli-p"},{chainId:137,address:"0x130ce4e4f76c2265f94a961d70618562de0bb8d2",symbol:"ibtc-fli-p"},{chainId:137,address:"0x596ebe76e2db4470966ea395b0d063ac6197a8c5",symbol:"jrt"},{chainId:137,address:"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4",symbol:"stmatic"},{chainId:137,address:"0xf501dd45a1198c2e1b5aef5314a68b9006d842e0",symbol:"mta"},{chainId:137,address:"0xeaecc18198a475c921b24b8a6c1c1f0f5f3f7ea0",symbol:"seed"},{chainId:137,address:"0xfe712251173a2cd5f5be2b46bb528328ea3565e1",symbol:"mvi"},{chainId:137,address:"0xa3fa99a148fa48d14ed51d610c367c61876997f1",symbol:"mimatic"},{chainId:137,address:"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb",symbol:"nex"},{chainId:137,address:"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128",symbol:"par"},{chainId:137,address:"0x580a84c73811e1839f75d86d75d88cca0c241ff4",symbol:"qi"},{chainId:137,address:"0x831753dd7087cac61ab5644b308642cc1c33dc13",symbol:"quick"},{chainId:137,address:"0xb5c064f955d8e7f38fe0460c556a72987494ee17",symbol:"quick"},{chainId:137,address:"0x00e5646f60ac6fb446f621d146b6e1886f002905",symbol:"rai"},{chainId:137,address:"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f",symbol:"rbw"},{chainId:137,address:"0xdbf31df14b66535af65aac99c32e9ea844e14501",symbol:"renbtc"},{chainId:137,address:"0x501ace9c35e60f03a2af4d484f49f9b1efde9f40",symbol:"solace"},{chainId:137,address:"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6",symbol:"maticx"},{chainId:137,address:"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a",symbol:"sushi"},{chainId:137,address:"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32",symbol:"tel"},{chainId:137,address:"0xe6469ba6d2fd6130788e0ea9c0a0515900563b59",symbol:"ust"},{chainId:137,address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",symbol:"usdt"},{chainId:137,address:"0x5fe2b58c013d7601147dcdd68c143a77499f5531",symbol:"grt"},{chainId:137,address:"0xbbba073c31bf03b8acf7c28ef0738decf3695683",symbol:"sand"},{chainId:137,address:"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015",symbol:"thx"},{chainId:137,address:"0x2f800db0fdb5223b3c3f354886d907a671414a7f",symbol:"bct"},{chainId:137,address:"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756",symbol:"tusd"},{chainId:137,address:"0x3809dcdd5dde24b37abe64a5a339784c3323c44f",symbol:"swap"},{chainId:137,address:"0x7fbc10850cae055b27039af31bd258430e714c62",symbol:"ubt"},{chainId:137,address:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",symbol:"usdc"},{chainId:137,address:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",symbol:"weth"},{chainId:137,address:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",symbol:"wmatic"},{chainId:137,address:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",symbol:"wbtc"},{chainId:137,address:"0x24834bbec7e39ef42f4a75eaf8e5b6486d3f0e57",symbol:"lunc"},{chainId:137,address:"0xf153eff70dc0bf3b085134928daeea248d9b30d0",symbol:"xmark"},{chainId:42161,address:"0x9f20de1fc9b161b34089cbeae888168b44b03461",symbol:"arbis"},{chainId:42161,address:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",symbol:"bal"},{chainId:42161,address:"0x031d35296154279dc1984dcd93e392b1f946737b",symbol:"cap"},{chainId:42161,address:"0xf97f4df75117a78c1a5a0dbb814af92458539fb4",symbol:"link"},{chainId:42161,address:"0x354a6da3fcde098f8389cad84b0182725c6c91de",symbol:"comp"},{chainId:42161,address:"0xf4d48ce3ee1ac3651998971541badbb9a14d7234",symbol:"cream"},{chainId:42161,address:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",symbol:"crv"},{chainId:42161,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",symbol:"dai"},{chainId:42161,address:"0x8038f3c971414fd1fc220ba727f2d4a0fc98cb65",symbol:"dht"},{chainId:42161,address:"0xf0b5ceefc89684889e5f7e0a7775bd100fcd3709",symbol:"dusd"},{chainId:42161,address:"0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55",symbol:"dpx"},{chainId:42161,address:"0x32eb7902d4134bf98a28b963d26de779af92a212",symbol:"rdpx"},{chainId:42161,address:"0xc3ae0333f0f34aa734d5493276223d95b8f9cb37",symbol:"dxd"},{chainId:42161,address:"0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a",symbol:"gmx"},{chainId:42161,address:"0xa0b862f60edef4452f25b4160f177db44deb6cf1",symbol:"gno"},{chainId:42161,address:"0xb965029343d55189c25a7f3e0c9394dc0f5d41b1",symbol:"ndx"},{chainId:42161,address:"0x539bde0d7dbd336b79148aa742883198bbf60342",symbol:"magic"},{chainId:42161,address:"0x4e352cf164e64adcbad318c3a1e222e9eba4ce42",symbol:"mcb"},{chainId:42161,address:"0x3f56e0c36d275367b8c502090edf38289b3dea0d",symbol:"mimatic"},{chainId:42161,address:"0x965772e0e9c84b6f359c8597c891108dcf1c5b1a",symbol:"pickle"},{chainId:42161,address:"0x6694340fc020c5e6b96567843da2df01b2ce1eb6",symbol:"stg"},{chainId:42161,address:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",symbol:"sushi"},{chainId:42161,address:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",symbol:"usdt"},{chainId:42161,address:"0x23a941036ae778ac51ab04cea08ed6e2fe103614",symbol:"grt"},{chainId:42161,address:"0xa72159fc390f0e3c6d415e658264c7c4051e9b87",symbol:"tcr"},{chainId:42161,address:"0x4d15a3a2286d883af0aa1b3f21367843fac63e07",symbol:"tusd"},{chainId:42161,address:"0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",symbol:"uni"},{chainId:42161,address:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",symbol:"usdc"},{chainId:42161,address:"0xa684cd057951541187f288294a1e1c2646aa2d24",symbol:"vsta"},{chainId:42161,address:"0x64343594ab9b56e99087bfa6f2335db24c2d1f17",symbol:"vst"},{chainId:42161,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",symbol:"weth"},{chainId:42161,address:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",symbol:"wbtc"},{chainId:42161,address:"0x82e3a8f066a6989666b031d916c43672085b1582",symbol:"yfi"}];class Rn{constructor(ge,Ne,Ke){var ot=this;if(this.pools=new Yn({url:ge.urls.subgraph,chainId:ge.chainId}),this.poolsOnChain=new Jd({url:ge.urls.subgraph,chainId:ge.chainId,provider:Ne,multicall:ge.addresses.contracts.multicall,vault:ge.addresses.contracts.vault,query:Ke}),this.poolShares=new Zl(ge.urls.subgraph,ge.chainId),this.poolJoinExits=new bd(ge.urls.subgraph,ge.chainId),ge.urls.gaugesSubgraph&&(this.poolGauges=new Mo(ge.urls.gaugesSubgraph,ge.chainId),this.gaugeShares=new yr(ge.urls.gaugesSubgraph,ge.chainId)),ge.urls.blockNumberSubgraph){this.blockNumbers=new xt(ge.urls.blockNumberSubgraph);const yn=function(){var Zn=ie(function*(){if(ot.blockNumbers)return yield ot.blockNumbers.find("dayAgo")});return function(){return Zn.apply(this,arguments)}}();this.yesterdaysPools=new Yn({url:ge.urls.subgraph,chainId:ge.chainId,blockHeight:yn})}const Mt=In.filter(yn=>yn.chainId==ge.chainId).map(yn=>yn.address),Vt=new No(Mt,ge.chainId),Ht=new l0(ge.urls.subgraph,ge.chainId),un=new Sf(ge.addresses.contracts.multicall,Ne,ge.chainId);this.tokenPrices=new Bl(Vt,Ht,un);const pn=new uc(ge.chainId);this.tokenHistoricalPrices=new wp(pn,un),this.tokenMeta=new A0([]),ge.urls.gaugesSubgraph&&(this.liquidityGauges=new Wf(ge.urls.gaugesSubgraph,ge.addresses.contracts.multicall,ge.addresses.contracts.gaugeController||"",ge.chainId,Ne)),ge.addresses.contracts.feeDistributor&&ge.addresses.tokens.bal&&ge.addresses.tokens.veBal&&ge.addresses.tokens.bbaUsd&&(this.feeDistributor=new Qp(ge.addresses.contracts.multicall,ge.addresses.contracts.feeDistributor,ge.addresses.tokens.bal,ge.addresses.tokens.veBal,ge.addresses.tokens.bbaUsd,Ne)),this.feeCollector=new I0(ge.addresses.contracts.vault,Ne),ge.addresses.contracts.protocolFeePercentagesProvider&&(this.protocolFees=new xp(ge.addresses.contracts.multicall,ge.addresses.contracts.protocolFeePercentagesProvider,Ne)),this.tokenYields=new Xe(ge.chainId)}}(function(qe){qe[qe.Direct=0]="Direct",qe[qe.TokenIn=1]="TokenIn",qe[qe.TokenOut=2]="TokenOut",qe[qe.Middle=3]="Middle"})($t||($t={})),function(qe){qe[qe.Swap=0]="Swap",qe[qe.BatchSwap=1]="BatchSwap",qe[qe.Join=2]="Join",qe[qe.Exit=3]="Exit"}(cn||(cn={}));const hr={type:cn.BatchSwap,swaps:[],opRef:[],minOut:"0",assets:[],hasTokenIn:!1,hasTokenOut:!1,fromInternal:!1,toInternal:!1,limits:[],approveTokens:[],sender:"",receiver:""},jr=new d.Interface(Sd);function ni(qe,ge){return qe.some(Ne=>Ne.address.toLowerCase()===ge.toLowerCase())}function Fi(qe,ge){const Ne=ge[qe.assetOutIndex],Ke=Q(qe.poolId);return Ne.toLowerCase()===Ke.toLowerCase()}function Nr(qe,ge){const Ne=ge[qe.assetInIndex],Ke=Q(qe.poolId);return Ne.toLowerCase()===Ke.toLowerCase()}function Ci(qe,ge,Ne){let Ke={};return qe!==$t.TokenIn&&qe!==$t.Middle||(Ke={index:ge,key:Qs.toChainedReference(Ne)},Ne++),[Ke,Ne]}function Wo(qe,ge){return Wi(f.BigNumber.from(qe),f.BigNumber.from(ge)).toString()}function Go(qe,ge,Ne,Ke){let ot=qe.amount;return(Ne===$t.TokenOut||Ne===$t.Middle&&ge===cn.Join||Ne===$t.Middle&&ge===cn.Exit)&&(ot=Qs.toChainedReference(Ke-1).toString()),ot}function Ha(qe,ge,Ne,Ke){let ot;return ot=Ne===qe&&Ke===ge?$t.Direct:Ne===qe?$t.TokenIn:Ke===ge?$t.TokenOut:$t.Middle,ot}function Vn(qe,ge,Ne,Ke,ot,Mt,Vt,Ht){var un;const pn=Ha(ge,Ne,qe.assetInIndex,qe.assetOutIndex),yn=Go(qe,cn.Join,pn,Ke),Zn=Wo(null!==(un=qe.returnAmount)&&void 0!==un?un:"0",Mt),[fr,zr]=Ci(pn,qe.assetOutIndex,Ke);let ci=Ht,ai=!0,li=!1;pn!==$t.Direct&&pn!==$t.TokenIn||(ci=Vt,ai=!1,li=!0);let bi=Ht,os=!1;return pn!==$t.Direct&&pn!==$t.TokenOut||(bi=Vt,os=!0),[{type:cn.Join,poolId:qe.poolId,tokenIn:ot[qe.assetInIndex],bpt:ot[qe.assetOutIndex],opRef:fr,minOut:Zn,amountIn:yn,assets:ot,actionStep:pn,sender:ci,receiver:bi,fromInternal:ai,hasTokenIn:li,hasTokenOut:os},zr]}function lr(qe,ge,Ne,Ke,ot,Mt,Vt,Ht){var un;const pn=Ha(ge,Ne,qe.assetInIndex,qe.assetOutIndex),yn=Go(qe,cn.Exit,pn,Ke),Zn=Wo(null!==(un=qe.returnAmount)&&void 0!==un?un:"0",Mt),[fr,zr]=Ci(pn,qe.assetOutIndex,Ke);let ci=Ht,ai=!1;pn!==$t.Direct&&pn!==$t.TokenIn||(ci=Vt,ai=!0);let li=!1,bi=!0,os=Ht;return pn!==$t.Direct&&pn!==$t.TokenOut||(os=Vt,bi=!1,li=!0),[{type:cn.Exit,poolId:qe.poolId,tokenOut:ot[qe.assetOutIndex],bpt:ot[qe.assetInIndex],opRef:fr.key?[fr]:[],minOut:Zn,amountIn:yn,assets:ot,actionStep:pn,sender:ci,receiver:os,toInternal:bi,hasTokenIn:ai,hasTokenOut:li},zr]}function Tr(qe,ge,Ne,Ke,ot,Mt,Vt,Ht,un){var pn;const yn=Ha(ge,Ne,qe.assetInIndex,qe.assetOutIndex),Zn=Go(qe,cn.Swap,yn,Ke);qe.amount=Zn;const fr=Wo(null!==(pn=qe.returnAmount)&&void 0!==pn?pn:"0",Mt),[zr,ci]=Ci(yn,qe.assetOutIndex,Ke),ai=yn===$t.Direct||yn===$t.TokenIn,li=yn===$t.Direct||yn===$t.TokenOut,bi=ni(Vt,ot[qe.assetInIndex]);let os=!0;(ai||bi)&&(os=!1);let es,Ds,ws=!0;return(li||ni(Vt,ot[qe.assetOutIndex]))&&(ws=!1),es=ai?Ht:un,Ds=li?Ht:un,[{type:cn.Swap,opRef:zr.key?[zr]:[],minOut:fr,amountIn:Zn,assets:ot,swap:qe,hasTokenIn:ai,hasTokenOut:li,fromInternal:os,toInternal:ws,isBptIn:bi,sender:es,receiver:Ds},ci]}function di(qe,ge,Ne){const Ke=qe.tokensList,ot=new X(Ne),[Mt]=ot.sortTokens(Ke),Vt=ge.tokenOut,Ht=Mt.findIndex(zr=>zr.toLowerCase()===Vt.toLowerCase()),un=Array(Ke.length).fill("0");un[Ht]=ge.minOut;const pn=ge.amountIn,yn={assets:Mt,minAmountsOut:un,userData:M.exitExactBPTInForOneTokenOut(pn,Ht),toInternalBalance:ge.toInternal,poolId:ge.poolId,poolKind:0,sender:ge.sender,recipient:ge.receiver,outputReferences:ge.opRef,exitPoolRequest:{}};return[Qs.constructExitCall(yn),ge.hasTokenIn?pn:"0",ge.hasTokenOut?un[Ht]:"0"]}function Kr(qe,ge,Ne){const Ke=qe.tokensList,ot=new X(Ne),[Mt]=ot.sortTokens(Ke),Vt=ge.tokenIn,Ht=Mt.findIndex(ci=>ci.toLowerCase()===Vt.toLowerCase()),un=Array(Ke.length).fill("0");un[Ht]=ge.amountIn;const pn=ge.minOut,yn=M.joinExactTokensInForBPTOut(un,pn),Zn={poolId:ge.poolId,sender:ge.sender,recipient:ge.receiver,kind:0,joinPoolRequest:{assets:Mt,maxAmountsIn:un,userData:yn,fromInternalBalance:ge.fromInternal},value:"0",outputReference:ge.opRef.key?ge.opRef.key.toString():"0"};return[Qs.encodeJoinPool(Zn),ge.hasTokenIn?un[Ht]:"0",ge.hasTokenOut?pn:"0"]}function ui(qe,ge,Ne){const Ke=[];for(const pn of qe.approveTokens){const yn=Qs.encodeApproveVault(pn,x.MaxUint256.toString());Ke.push(yn)}const Mt={swapType:E.SwapType.SwapExactIn,swaps:qe.swaps,assets:qe.assets,funds:{sender:qe.sender,recipient:qe.receiver,fromInternalBalance:qe.fromInternal,toInternalBalance:qe.toInternal},limits:qe.limits.map(pn=>pn.toString()),deadline:f.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:qe.opRef},Vt=Qs.encodeBatchSwap(Mt);Ke.push(Vt);const Ht=qe.assets.findIndex(pn=>pn.toLowerCase()===ge.toLowerCase()),un=qe.assets.findIndex(pn=>pn.toLowerCase()===Ne.toLowerCase());return[Ke,qe.hasTokenIn?qe.limits[Ht].toString():"0",qe.hasTokenOut?qe.limits[un].abs().toString():"0"]}Object.defineProperty(E,"PoolFilter",{enumerable:!0,get:function(){return m.PoolFilter}}),Object.defineProperty(E,"RouteProposer",{enumerable:!0,get:function(){return m.RouteProposer}}),Object.defineProperty(E,"SOR",{enumerable:!0,get:function(){return m.SOR}}),Object.defineProperty(E,"SwapTypes",{enumerable:!0,get:function(){return m.SwapTypes}}),Object.defineProperty(E,"formatSequence",{enumerable:!0,get:function(){return m.formatSequence}}),Object.defineProperty(E,"getTokenAddressesForSwap",{enumerable:!0,get:function(){return m.getTokenAddressesForSwap}}),Object.defineProperty(E,"parseToPoolsDict",{enumerable:!0,get:function(){return m.parseToPoolsDict}}),Object.defineProperty(E,"phantomStableBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return m.phantomStableBPTForTokensZeroPriceImpact}}),Object.defineProperty(E,"queryBatchSwapTokensIn",{enumerable:!0,get:function(){return m.queryBatchSwapTokensIn}}),Object.defineProperty(E,"queryBatchSwapTokensOut",{enumerable:!0,get:function(){return m.queryBatchSwapTokensOut}}),Object.defineProperty(E,"stableBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return m.stableBPTForTokensZeroPriceImpact}}),Object.defineProperty(E,"weightedBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return m.weightedBPTForTokensZeroPriceImpact}}),E.APR_THRESHOLD=1e4,E.AaveHelpers=class{static getRate(qe,ge){return ie(function*(){return(yield new g.Contract(qe,Te,ge).getRate()).toString()})()}},E.AaveRates=Sf,E.AssetHelpers=X,E.BalancerAPIArgsFormatter=$s,E.BalancerError=Oi,E.BalancerErrors=pe,E.BalancerMinterAuthorization=me,E.BalancerSDK=class{constructor(qe,ge=new Yu(qe),Ne=new t0(qe)){this.config=qe,this.sor=ge,this.subgraph=Ne,this.networkConfig=Mc(qe),this.provider=ge.provider,this.data=new Rn(this.networkConfig,ge.provider,qe.subgraphQuery),this.swaps=new df(this.config),this.relayer=new Qs(this.swaps),this.pricing=new jf(qe,this.swaps),this.pools=new Pd(this.networkConfig,this.data),this.balancerContracts=new kd(this.networkConfig.addresses.contracts,ge.provider),this.zaps=new Iu(this.networkConfig.chainId)}get rpcProvider(){return this.sor.provider}get contracts(){return this.balancerContracts.contracts}},E.BlockNumberRepository=xt,E.CoingeckoHistoricalPriceRepository=uc,E.CoingeckoPriceRepository=No,E.ComposableStablePoolEncoder=N,E.Data=Rn,E.Debouncer=hi,E.FeeCollectorRepository=I0,E.FeeDistributorRepository=Qp,E.GaugeControllerMulticallRepository=gd,E.GaugeSharesRepository=yr,E.GraphQLArgsBuilder=go,E.HistoricalPriceProvider=wp,E.Liquidity=Sn,E.LiquidityGaugeSubgraphRPCProvider=Wf,E.LiquidityGaugesMulticallRepository=_p,E.LiquidityGaugesSubgraphRepository=pc,E.ManagedPoolEncoder=v,E.POOLS=function(qe){return ae[qe]?ae[qe]:we},E.PoolGaugesRepository=Mo,E.PoolJoinExitRepository=bd,E.PoolSharesRepository=Zl,E.Pools=Pd,E.PoolsBalancerAPIRepository=class{constructor(qe){var ge,Ne;this.pools=[],this.skip=0,this.client=new w1(qe.url,qe.apiKey),this.query={args:Object.assign({},(null===(ge=qe.query)||void 0===ge?void 0:ge.args)||{chainId:1,orderBy:"totalLiquidity",orderDirection:"desc",where:{swapEnabled:{eq:!0},totalShares:{gt:.05}}}),attrs:Object.assign({},(null===(Ne=qe.query)||void 0===Ne?void 0:Ne.attrs)||{id:!0,address:!0})},delete this.query.args.skip}fetchFromCache(qe){const ge=(null==qe?void 0:qe.first)||10,Ne=(null==qe?void 0:qe.skip)||0,Ke=this.pools.slice(Ne,ge+Ne);return this.skip=Ne+ge,Ke}fetch(qe){var ge=this;return ie(function*(){if(ge.pools.length>((null==qe?void 0:qe.first)||10)+((null==qe?void 0:qe.skip)||0))return ge.fetchFromCache(qe);ge.nextToken&&(ge.query.args.nextToken=ge.nextToken),(null==qe?void 0:qe.first)&&(ge.query.args.first=2*qe.first);const Ne=new go(ge.query.args).format(new $s),Ke=ge.query.attrs;Ke.nextToken=!0;const ot={pools:{__args:Ne,...Ke}},Mt=(yield ge.client.get(ot)).pools;return ge.nextToken=Mt.nextToken,ge.pools=ge.pools.concat(Mt.pools.map(ge.format)),ge.skip=ge.pools.length,ge.fetchFromCache(qe)})()}find(qe){var ge=this;return ie(function*(){return 0==ge.pools.length&&(yield ge.fetch()),ge.findBy("id",qe)})()}findBy(qe,ge){var Ne=this;return ie(function*(){0==Ne.pools.length&&(yield Ne.fetch());const Ke=Ne.pools.find(ot=>ot[qe]==ge);if(Ke)return Ne.format(Ke)})()}format(qe){var ge,Ne,Ke,ot;if(null===(ge=qe.apr)||void 0===ge?void 0:ge.rewardAprs.breakdown){const Mt=JSON.parse(null===(Ne=qe.apr)||void 0===Ne?void 0:Ne.rewardAprs.breakdown);qe.apr.rewardAprs.breakdown=Mt}if(null===(Ke=qe.apr)||void 0===Ke?void 0:Ke.tokenAprs.breakdown){const Mt=JSON.parse(null===(ot=qe.apr)||void 0===ot?void 0:ot.tokenAprs.breakdown);qe.apr.tokenAprs.breakdown=Mt}return qe}},E.PoolsFallbackRepository=class{constructor(qe,ge={}){this.providers=qe,this.currentProviderIdx=0,this.timeout=ge.timeout||1e4}fetch(qe){var ge=this;return ie(function*(){return ge.fallbackQuery("fetch",[qe])})()}get currentProvider(){if(this.providers.length&&!(this.currentProviderIdx>=this.providers.length))return this.providers[this.currentProviderIdx]}find(qe){var ge=this;return ie(function*(){return ge.fallbackQuery("find",[qe])})()}findBy(qe,ge){var Ne=this;return ie(function*(){return Ne.fallbackQuery("findBy",[qe,ge])})()}fallbackQuery(qe,ge){var Ne=this;return ie(function*(){if(Ne.currentProviderIdx>=Ne.providers.length)throw new Error("No working providers found");let Ke;try{const ot=Ne.providers[Ne.currentProviderIdx];Ke=yield Promise.race([ot[qe].apply(ot,ge),new Promise((Mt,Vt)=>setTimeout(()=>Vt(new Error("timeout")),Ne.timeout))])}catch(ot){const Mt=ot.message;"timeout"===Mt?console.error("Provider "+Ne.currentProviderIdx+" timed out, falling back to next provider"):console.error("Provider "+Ne.currentProviderIdx+" failed with error: ",Mt,", falling back to next provider"),Ne.currentProviderIdx++,Ke=yield Ne.fallbackQuery.call(Ne,qe,ge)}return Ke})()}},E.PoolsStaticRepository=class{constructor(qe){this.pools=qe}find(qe){var ge=this;return ie(function*(){return ge.pools.find(Ne=>Ne.id.toLowerCase()===qe.toLowerCase())})()}findBy(qe,ge){var Ne=this;return ie(function*(){return Ne.pools.find(Ke=>Ke[qe]===ge)})()}all(){var qe=this;return ie(function*(){return qe.pools})()}where(qe){var ge=this;return ie(function*(){return(yield ge.all()).filter(qe)})()}},E.PoolsSubgraphOnChainRepository=Jd,E.PoolsSubgraphRepository=Yn,E.ProtocolFeesProvider=xp,E.Relayer=Qs,E.RelayerAuthorization=ke,E.SHALLOW_COMPOSABLE_STABLE_BUFFER=1e6,E.Sor=Yu,E.StablePoolEncoder=y,E.StaticTokenPriceProvider=class{constructor(qe){this.tokenPrices=Object.fromEntries(Object.entries(qe).map(([ge,Ne])=>[ge.toLowerCase(),Ne]))}find(qe){var ge=this;return ie(function*(){const Ne=qe.toLowerCase(),Ke=ge.tokenPrices[Ne];if(Ke)return Ke})()}findBy(qe,ge){var Ne=this;return ie(function*(){if("address"==qe)return Ne.find(ge)})()}},E.StaticTokenProvider=A0,E.Subgraph=t0,E.SubgraphArgsFormatter=is,E.SubgraphPriceRepository=l0,E.Swaps=df,E.TokenPriceProvider=Bl,E.TokenYieldsRepository=Xe,E.WeightedPoolEncoder=M,E.accountToAddress=_e,E.addressMapIn=mr,E.balEmissions=mf,E.bn=qe=>f.parseFixed(`${qe}`,18),E.buildRelayerCalls=function(qe,ge,Ne,Ke,ot,Mt,Vt){const Ht=function(qe,ge){return function(ot,Mt){const Vt=[];let Ht=u.cloneDeep(hr);Ht.assets=Mt,Ht.limits=Array(Mt.length).fill(f.BigNumber.from("0"));let un=!0,pn={};for(const yn of ot)yn.type===cn.Swap?(un&&(pn=yn,un=!1),yn.isBptIn&&Ht.approveTokens.push(yn.assets[yn.swap.assetInIndex]),yn.fromInternal===pn.fromInternal&&yn.toInternal===pn.toInternal&&yn.receiver===pn.receiver&&yn.sender===pn.sender||Ht.swaps.length>0&&(Vt.push(Ht),Ht=u.cloneDeep(hr),Ht.assets=Mt,Ht.limits=Array(Mt.length).fill(f.BigNumber.from("0"))),Ht.swaps.push(yn.swap),Ht.opRef.push(...yn.opRef),Ht.fromInternal=yn.fromInternal,Ht.toInternal=yn.toInternal,Ht.sender=yn.sender,Ht.receiver=yn.receiver,yn.hasTokenIn?(Ht.hasTokenIn=!0,Ht.limits[yn.swap.assetInIndex]=Ht.limits[yn.swap.assetInIndex].add(yn.amountIn)):Ht.limits[yn.swap.assetInIndex]=x.MaxInt256,yn.hasTokenOut&&(Ht.hasTokenOut=!0,Ht.limits[yn.swap.assetOutIndex]=Ht.limits[yn.swap.assetOutIndex].sub(yn.minOut)),pn=yn):(Ht.swaps.length>0&&(Vt.push(Ht),Ht=u.cloneDeep(hr),Ht.assets=Mt,Ht.limits=Array(Mt.length).fill(f.BigNumber.from("0"))),Vt.push(yn));return Ht.swaps.length>0&&Vt.push(Ht),Vt}(function(ot){const Mt=[],Vt=[],Ht=[];for(const un of ot)un.type===cn.Exit||un.type===cn.Join?un.hasTokenIn?Mt.push(un):un.hasTokenOut?Vt.push(un):Ht.push(un):Ht.push(un);return[...Mt,...Ht,...Vt]}(qe),ge)}(function(Zn,fr,zr,ci,ai,li,bi,os){const es=ci.findIndex(io=>io.toLowerCase()===Zn.toLowerCase()),Ds=ci.findIndex(io=>io.toLowerCase()===fr.toLowerCase()),ws=[];let Zs=0,Us={};for(const io of zr)if(Fi(io,ci)){const[Xs,ao]=Vn(io,es,Ds,Zs,ci,ai,bi,os);Zs=ao,ws.push(Xs),Us=Xs}else{if(!Nr(io,ci)){const Xs=io.amount,[ao,ia]=Tr(io,es,Ds,Zs,ci,ai,li,bi,os);Us.type===cn.Swap&&"0"===Xs&&(Us.receiver=Us.sender,Us.toInternal=Us.fromInternal,Us.opRef=[],ao.sender=Us.receiver,ao.fromInternal=Us.fromInternal,ao.amountIn="0",ao.swap.amount="0"),Zs=ia,ws.push(ao),Us=ao;continue}{const[Xs,ao]=lr(io,es,Ds,Zs,ci,ai,bi,os);Zs=ao,ws.push(Xs),Us=Xs}}return ws}(qe.tokenIn,qe.tokenOut,qe.swaps,qe.tokenAddresses,Mt,ge,Ne,Ke),qe.tokenAddresses),un=[],pn=[],yn=[];Vt&&un.push(Qs.encodeSetRelayerApproval(Ke,!0,Vt));for(const Zn of Ht){if(Zn.type===cn.Exit){const fr=ge.find(li=>li.id===Zn.poolId);if(void 0===fr)throw new Oi(E.BalancerErrorCode.NO_POOL_DATA);const[zr,ci,ai]=di(fr,Zn,ot);un.push(zr),pn.push(f.BigNumber.from(ci)),yn.push(f.BigNumber.from(ai))}if(Zn.type===cn.Join){const fr=ge.find(li=>li.id===Zn.poolId);if(void 0===fr)throw new Oi(E.BalancerErrorCode.NO_POOL_DATA);const[zr,ci,ai]=Kr(fr,Zn,ot);un.push(zr),pn.push(f.BigNumber.from(ci)),yn.push(f.BigNumber.from(ai))}if(Zn.type===cn.BatchSwap){const[fr,zr,ci]=ui(Zn,qe.tokenIn,qe.tokenOut);un.push(...fr),pn.push(f.BigNumber.from(zr)),yn.push(f.BigNumber.from(ci))}}return function(Zn,fr,zr,ci){const ai=Zn.reduce((os=f.BigNumber.from(0),es)=>os.add(es)),bi=fr.reduce((os=f.BigNumber.from(0),es)=>os.add(es)).sub(Wi(zr.returnAmount,f.BigNumber.from(ci)));if(!ai.eq(zr.swapAmount)||!bi.lt("3"))throw new Oi(E.BalancerErrorCode.RELAY_SWAP_AMOUNTS)}(pn,yn,qe,Mt),{to:Ke,data:jr.encodeFunctionData("multicall",[un]),rawCalls:un}},E.canUseJoinExit=function(qe,ge,Ne){return qe!==m.SwapTypes.SwapExactOut&&ge.toLowerCase()!==x.AddressZero.toLowerCase()&&Ne.toLowerCase()!==x.AddressZero.toLowerCase()},E.formatFixed=cs,E.formatFromBigInt18=function(qe){return f.formatFixed(f.BigNumber.from(qe),18)},E.getLimitsForSlippage=so,E.getPoolAddress=Q,E.getPoolNonce=ce,E.getPoolSpecialization=ee,E.insert=Xi,E.isNormalizedWeights=qe=>qe.reduce((Ne,Ke)=>Ne.add(Ke),x.Zero).eq(x.WeiPerEther),E.isSameAddress=rs,E.parseFixed=wi,E.parsePoolInfo=st,E.parseToBigInt18=$i,E.signPermit=function(){var qe=ie(function*(ge,Ne,Ke,ot,Mt=x.MaxUint256,Vt){const{chainId:Ht}=yield ge.provider.getNetwork(),un=yield Ne.getAddress();Vt||(Vt=yield ge.nonces(un));const pn={name:yield ge.name(),version:"1",chainId:Ht,verifyingContract:ge.address},yn={owner:un,spender:yield _e(Ke),value:ot,nonce:Vt,deadline:Mt},Zn=yield Ne._signTypedData(pn,{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},yn);return{...b.splitSignature(Zn),deadline:f.BigNumber.from(Mt),nonce:f.BigNumber.from(Vt)}});return function(ge,Ne,Ke,ot){return qe.apply(this,arguments)}}(),E.someJoinExit=function(qe,ge,Ne){return ge.some(Ke=>function(ot,Mt,Vt){const Ht=ot.find(un=>un.id===Mt.poolId);return"Weighted"===(null==Ht?void 0:Ht.poolType)&&[Vt[Mt.assetInIndex],Vt[Mt.assetOutIndex]].includes(Ht.address)}(qe,Ke,Ne))},E.splitPoolId=qe=>({address:Q(qe),specialization:ee(qe),nonce:ce(qe)}),E.toNormalizedWeights=function(qe){if(100==qe.length)return Array(100).fill(x.WeiPerEther.div(100));const ge=qe.reduce((ot,Mt)=>ot.add(Mt),x.Zero);if(ge.eq(x.WeiPerEther))return qe;const Ne=[];let Ke=x.Zero;for(let ot=0;ot{Ne.price&&(ge[Ne.address]=Ne.price)}),ge},E.unwrapToken=Fr,Object.defineProperty(E,"__esModule",{value:!0})}(be,Y(7910),Y(11843),Y(34078),Y(2885),Y(36776),Y(61488),Y(11221),Y(28686),Y(23815),Y(80488),Y(8206),Y(80831),Y(47106),Y(22721),Y(80233))},76959:function(bt,be,Y){"use strict";var ie=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(be,"__esModule",{value:!0});var q=Y(58673),O=ie(Y(27012)),E=function(x){return q.isExtractableFile(x)||null!==x&&"object"==typeof x&&"function"==typeof x.pipe};be.default=function(x,f,T){var g=q.extractFiles({query:x,variables:f,operationName:T},"",E),b=g.clone,l=g.files;if(0===l.size){if(!Array.isArray(x))return JSON.stringify(b);if(void 0!==f&&!Array.isArray(f))throw new Error("Cannot create request body with given variable type, array expected");var h=x.reduce(function(S,I,P){return S.push({query:I,variables:f?f[P]:void 0}),S},[]);return JSON.stringify(h)}var m=new("undefined"==typeof FormData?O.default:FormData);m.append("operations",JSON.stringify(b));var _={},w=0;return l.forEach(function(S){_[++w]=S}),m.append("map",JSON.stringify(_)),w=0,l.forEach(function(S,I){m.append(""+ ++w,I)}),m}},47106:function(bt,be,Y){"use strict";var ie=this&&this.__assign||function(){return ie=Object.assign||function(o){for(var y,M=1,v=arguments.length;M0&&D[D.length-1])&&(6===B[0]||2===B[0])){M=0;continue}if(3===B[0]&&(!D||B[1]>D[0]&&B[1]{"use strict";Y.r(be),Y.d(be,{ComposableStablePool:()=>lo,FxMaths:()=>Od,FxPool:()=>ol,Gyro2Maths:()=>Uh,Gyro2Pool:()=>Ti,Gyro3Maths:()=>ha,Gyro3Pool:()=>Fo,GyroEMathFunctions:()=>t0,GyroEMaths:()=>Sd,GyroEV2Pool:()=>ql,GyroHelpers:()=>Or,GyroHelpersSignedFixedPoint:()=>e0,LinearMaths:()=>po,LinearPool:()=>rr,MetaStablePool:()=>xa,OldBigNumber:()=>M,PhantomStablePool:()=>Ji,PoolFilter:()=>ke,PoolTypes:()=>Ce,RouteProposer:()=>Fl,SOR:()=>Ja,StableMathBigInt:()=>Qa,StableMaths:()=>hi,StablePool:()=>ja,SwapTypes:()=>xe,WeightedMaths:()=>zn,WeightedPool:()=>Kn,ZERO:()=>v,balancesFromTokenInOut:()=>au,bnum:()=>C,formatSequence:()=>Rd,getSpotPriceAfterSwapForPath:()=>rc,getTokenAddressesForSwap:()=>qc,parseToPoolsDict:()=>kl,safeParseFixed:()=>X,stableBPTForTokensZeroPriceImpact:()=>e1,weightedBPTForTokensZeroPriceImpact:()=>im});var ie=Y(34553),q=Y(71677),O=Y(2024),E=Y(2885),d=Y(16659),x=Y(51528),f=Y(36776),T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},g={exports:{}};!function(Je,oe){var He="__lodash_hash_undefined__",We=9007199254740991,Xe="[object Arguments]",_t="[object Boolean]",xt="[object Date]",cn="[object Function]",In="[object GeneratorFunction]",Rn="[object Map]",hr="[object Number]",jr="[object Object]",ni="[object Promise]",Fi="[object RegExp]",Nr="[object Set]",Ci="[object String]",Wo="[object Symbol]",Go="[object WeakMap]",Ha="[object ArrayBuffer]",Ba="[object DataView]",Vn="[object Float32Array]",lr="[object Float64Array]",Tr="[object Int8Array]",di="[object Int16Array]",Kr="[object Int32Array]",ui="[object Uint8Array]",qe="[object Uint8ClampedArray]",ge="[object Uint16Array]",Ne="[object Uint32Array]",ot=/\w*$/,Mt=/^\[object .+?Constructor\]$/,Vt=/^(?:0|[1-9]\d*)$/,Ht={};Ht[Xe]=Ht["[object Array]"]=Ht[Ha]=Ht[Ba]=Ht[_t]=Ht[xt]=Ht[Vn]=Ht[lr]=Ht[Tr]=Ht[di]=Ht[Kr]=Ht[Rn]=Ht[hr]=Ht[jr]=Ht[Fi]=Ht[Nr]=Ht[Ci]=Ht[Wo]=Ht[ui]=Ht[qe]=Ht[ge]=Ht[Ne]=!0,Ht["[object Error]"]=Ht[cn]=Ht[Go]=!1;var pn="object"==typeof self&&self&&self.Object===Object&&self,yn="object"==typeof T&&T&&T.Object===Object&&T||pn||Function("return this")(),Zn=oe&&!oe.nodeType&&oe,fr=Zn&&Je&&!Je.nodeType&&Je,zr=fr&&fr.exports===Zn;function ci(qn,_i){return qn.set(_i[0],_i[1]),qn}function ai(qn,_i){return qn.add(_i),qn}function os(qn,_i,fs,ko){var Ld=-1,yl=qn?qn.length:0;for(ko&&yl&&(fs=qn[++Ld]);++Ld-1},Wu.prototype.set=function(qn,_i){var fs=this.__data__,ko=C0(fs,qn);return ko<0?fs.push([qn,_i]):fs[ko][1]=_i,this},Is.prototype.clear=function(){this.__data__={hash:new Zi,map:new(ut||Wu),string:new Zi}},Is.prototype.delete=function(qn){return Dt(this,qn).delete(qn)},Is.prototype.get=function(qn){return Dt(this,qn).get(qn)},Is.prototype.has=function(qn){return Dt(this,qn).has(qn)},Is.prototype.set=function(qn,_i){return Dt(this,qn).set(qn,_i),this},p0.prototype.clear=function(){this.__data__=new Wu},p0.prototype.delete=function(qn){return this.__data__.delete(qn)},p0.prototype.get=function(qn){return this.__data__.get(qn)},p0.prototype.has=function(qn){return this.__data__.has(qn)},p0.prototype.set=function(qn,_i){var fs=this.__data__;if(fs instanceof Wu){var ko=fs.__data__;if(!ut||ko.length<199)return ko.push([qn,_i]),this;fs=this.__data__=new Is(ko)}return fs.set(qn,_i),this};var Nn=Se?Us(Se,Object):function(){return[]},Mr=function(qn){return vd.call(qn)};function Oo(qn,_i){return!!(_i=_i??We)&&("number"==typeof qn||Vt.test(qn))&&qn>-1&&qn%1==0&&qn<_i}function Jo(qn){var _i=qn&&qn.constructor;return qn===("function"==typeof _i&&_i.prototype||ia)}function Lo(qn){if(null!=qn){try{return sm.call(qn)}catch{}try{return qn+""}catch{}}return""}function mc(qn,_i){return qn===_i||qn!=qn&&_i!=_i}(Qe&&Mr(new Qe(new ArrayBuffer(1)))!=Ba||ut&&Mr(new ut)!=Rn||At&&Mr(At.resolve())!=ni||Zt&&Mr(new Zt)!=Nr||Jt&&Mr(new Jt)!=Go)&&(Mr=function(qn){var _i=vd.call(qn),fs=_i==jr?qn.constructor:void 0,ko=fs?Lo(fs):void 0;if(ko)switch(ko){case Pn:return Ba;case Xn:return Rn;case or:return ni;case Er:return Nr;case Hr:return Go}return _i});var zu=Array.isArray;function Ru(qn){return null!=qn&&function(qn){return"number"==typeof qn&&qn>-1&&qn%1==0&&qn<=We}(qn.length)&&!_d(qn)}var Tc=Ue||function(){return!1};function _d(qn){var _i=l2(qn)?vd.call(qn):"";return _i==cn||_i==In}function l2(qn){var _i=typeof qn;return!!qn&&("object"==_i||"function"==_i)}function Sp(qn){return Ru(qn)?function(qn,_i){var fs=zu(qn)||function(qn){return function(qn){return function(qn){return!!qn&&"object"==typeof qn}(qn)&&Ru(qn)}(qn)&&h0.call(qn,"callee")&&(!Ll.call(qn,"callee")||vd.call(qn)==Xe)}(qn)?function(qn,_i){for(var fs=-1,ko=Array(qn);++fs0||Je===oe?oe:oe-1}function H(Je){for(var oe,Pe,He=1,We=Je.length,Xe=Je[0]+"";He$t^Pe?1:-1;for(_t=(xt=We.length)<($t=Xe.length)?xt:$t,at=0;at<_t;at++)if(We[at]!=Xe[at])return We[at]>Xe[at]^Pe?1:-1;return xt==$t?0:xt>$t^Pe?1:-1}function K(Je,oe,Pe,He){if(JePe||Je!==u(Je))throw Error(m+(He||"Argument")+("number"==typeof Je?JePe?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Je))}function R(Je){var oe=Je.c.length-1;return G(Je.e/S)==oe&&Je.c[oe]%2!=0}function o(Je,oe){return(Je.length>1?Je.charAt(0)+"."+Je.slice(1):Je)+(oe<0?"e":"e+")+oe}function y(Je,oe,Pe){var He,We;if(oe<0){for(We=Pe+".";++oe;We+=Pe);Je=We+Je}else if(++oe>(He=Je.length)){for(We=Pe,oe-=He;--oe;We+=Pe);Je+=We}else oeIn?ot.c=ot.e=null:Vn.e=10;qe/=10,ui++);return void(ui>In?ot.c=ot.e=null:(ot.e=ui,ot.c=[Vn]))}Ke=String(Vn)}else{if(!l.test(Ke=String(Vn)))return He(ot,Ke,ge);ot.s=45==Ke.charCodeAt(0)?(Ke=Ke.slice(1),-1):1}(ui=Ke.indexOf("."))>-1&&(Ke=Ke.replace(".","")),(qe=Ke.search(/e/i))>0?(ui<0&&(ui=qe),ui+=+Ke.slice(qe+1),Ke=Ke.substring(0,qe)):ui<0&&(ui=Ke.length)}else{if(K(lr,2,Fi.length,"Base"),10==lr)return Ha(ot=new Nr(Vn),at+ot.e+1,_t);if(Ke=String(Vn),ge="number"==typeof Vn){if(0*Vn!=0)return He(ot,Ke,ge,lr);if(ot.s=1/Vn<0?(Ke=Ke.slice(1),-1):1,Nr.DEBUG&&Ke.replace(/^0\.0*|\./,"").length>15)throw Error(_+Vn)}else ot.s=45===Ke.charCodeAt(0)?(Ke=Ke.slice(1),-1):1;for(Tr=Fi.slice(0,lr),ui=qe=0,Ne=Ke.length;qeui){ui=Ne;continue}}else if(!Kr&&(Ke==Ke.toUpperCase()&&(Ke=Ke.toLowerCase())||Ke==Ke.toLowerCase()&&(Ke=Ke.toUpperCase()))){Kr=!0,qe=-1,ui=0;continue}return He(ot,String(Vn),ge,lr)}ge=!1,(ui=(Ke=Pe(Ke,lr,10,ot.s)).indexOf("."))>-1?Ke=Ke.replace(".",""):ui=Ke.length}for(qe=0;48===Ke.charCodeAt(qe);qe++);for(Ne=Ke.length;48===Ke.charCodeAt(--Ne););if(Ke=Ke.slice(qe,++Ne)){if(Ne-=qe,ge&&Nr.DEBUG&&Ne>15&&(Vn>I||Vn!==u(Vn)))throw Error(_+ot.s*Vn);if((ui=ui-qe-1)>In)ot.c=ot.e=null;else if(ui=$t)?o(Ne,qe):y(Ne,qe,"0");else if(ui=(Vn=Ha(new Nr(Vn),lr,Tr)).e,ge=(Ne=H(Vn.c)).length,1==di||2==di&&(lr<=ui||ui<=xt)){for(;gege){if(--lr>0)for(Ne+=".";lr--;Ne+="0");}else if((lr+=ui-ge)>0)for(ui+1==ge&&(Ne+=".");lr--;Ne+="0");return Vn.s<0&&Kr?"-"+Ne:Ne}function Wo(Vn,lr){for(var Tr,di=1,Kr=new Nr(Vn[0]);di=10;Kr/=10,di++);return(Tr=di+Tr*S-1)>In?Vn.c=Vn.e=null:Tr=10;ge/=10,Kr++);if((ui=lr-Kr)<0)ui+=S,ot=(Ne=Mt[Ke=0])/Vt[Kr-(qe=lr)-1]%10|0;else if((Ke=h((ui+1)/S))>=Mt.length){if(!di)break e;for(;Mt.length<=Ke;Mt.push(0));Ne=ot=0,Kr=1,qe=(ui%=S)-S+1}else{for(Ne=ge=Mt[Ke],Kr=1;ge>=10;ge/=10,Kr++);ot=(qe=(ui%=S)-S+Kr)<0?0:Ne/Vt[Kr-qe-1]%10|0}if(di=di||lr<0||null!=Mt[Ke+1]||(qe<0?Ne:Ne%Vt[Kr-qe-1]),di=Tr<4?(ot||di)&&(0==Tr||Tr==(Vn.s<0?3:2)):ot>5||5==ot&&(4==Tr||di||6==Tr&&(ui>0?qe>0?Ne/Vt[Kr-qe]:0:Mt[Ke-1])%10&1||Tr==(Vn.s<0?8:7)),lr<1||!Mt[0])return Mt.length=0,di?(Mt[0]=Vt[(S-(lr-=Vn.e+1)%S)%S],Vn.e=-lr||0):Mt[0]=Vn.e=0,Vn;if(0==ui?(Mt.length=Ke,ge=1,Ke--):(Mt.length=Ke+1,ge=Vt[S-ui],Mt[Ke]=qe>0?u(Ne/Vt[Kr-qe]%Vt[qe])*ge:0),di)for(;;){if(0==Ke){for(ui=1,qe=Mt[0];qe>=10;qe/=10,ui++);for(qe=Mt[0]+=ge,ge=1;qe>=10;qe/=10,ge++);ui!=ge&&(Vn.e++,Mt[0]==w&&(Mt[0]=1));break}if(Mt[Ke]+=ge,Mt[Ke]!=w)break;Mt[Ke--]=0,ge=1}for(ui=Mt.length;0===Mt[--ui];Mt.pop());}Vn.e>In?Vn.c=Vn.e=null:Vn.e=$t?o(lr,Tr):y(lr,Tr,"0"),Vn.s<0?"-"+lr:lr)}return Nr.clone=W,Nr.ROUND_UP=0,Nr.ROUND_DOWN=1,Nr.ROUND_CEIL=2,Nr.ROUND_FLOOR=3,Nr.ROUND_HALF_UP=4,Nr.ROUND_HALF_DOWN=5,Nr.ROUND_HALF_EVEN=6,Nr.ROUND_HALF_CEIL=7,Nr.ROUND_HALF_FLOOR=8,Nr.EUCLID=9,Nr.config=Nr.set=function(Vn){var lr,Tr;if(null!=Vn){if("object"!=typeof Vn)throw Error(m+"Object expected: "+Vn);if(Vn.hasOwnProperty(lr="DECIMAL_PLACES")&&(K(Tr=Vn[lr],0,V,lr),at=Tr),Vn.hasOwnProperty(lr="ROUNDING_MODE")&&(K(Tr=Vn[lr],0,8,lr),_t=Tr),Vn.hasOwnProperty(lr="EXPONENTIAL_AT")&&((Tr=Vn[lr])&&Tr.pop?(K(Tr[0],-V,0,lr),K(Tr[1],0,V,lr),xt=Tr[0],$t=Tr[1]):(K(Tr,-V,V,lr),xt=-($t=Tr<0?-Tr:Tr))),Vn.hasOwnProperty(lr="RANGE"))if((Tr=Vn[lr])&&Tr.pop)K(Tr[0],-V,-1,lr),K(Tr[1],1,V,lr),cn=Tr[0],In=Tr[1];else{if(K(Tr,-V,V,lr),!Tr)throw Error(m+lr+" cannot be zero: "+Tr);cn=-(In=Tr<0?-Tr:Tr)}if(Vn.hasOwnProperty(lr="CRYPTO")){if((Tr=Vn[lr])!==!!Tr)throw Error(m+lr+" not true or false: "+Tr);if(Tr){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Rn=!Tr,Error(m+"crypto unavailable");Rn=Tr}else Rn=Tr}if(Vn.hasOwnProperty(lr="MODULO_MODE")&&(K(Tr=Vn[lr],0,9,lr),hr=Tr),Vn.hasOwnProperty(lr="POW_PRECISION")&&(K(Tr=Vn[lr],0,V,lr),jr=Tr),Vn.hasOwnProperty(lr="FORMAT")){if("object"!=typeof(Tr=Vn[lr]))throw Error(m+lr+" not an object: "+Tr);ni=Tr}if(Vn.hasOwnProperty(lr="ALPHABET")){if("string"!=typeof(Tr=Vn[lr])||/^.$|[+-.\s]|(.).*\1/.test(Tr))throw Error(m+lr+" invalid: "+Tr);Fi=Tr}}return{DECIMAL_PLACES:at,ROUNDING_MODE:_t,EXPONENTIAL_AT:[xt,$t],RANGE:[cn,In],CRYPTO:Rn,MODULO_MODE:hr,POW_PRECISION:jr,FORMAT:ni,ALPHABET:Fi}},Nr.isBigNumber=function(Vn){if(!Vn||!0!==Vn._isBigNumber)return!1;if(!Nr.DEBUG)return!0;var lr,Tr,di=Vn.c,Kr=Vn.e,ui=Vn.s;e:if("[object Array]"=={}.toString.call(di)){if((1===ui||-1===ui)&&Kr>=-V&&Kr<=V&&Kr===u(Kr)){if(0===di[0]){if(0===Kr&&1===di.length)return!0;break e}if((lr=(Kr+1)%S)<1&&(lr+=S),String(di[0]).length==lr){for(lr=0;lr=w||Tr!==u(Tr))break e;if(0!==Tr)return!0}}}else if(null===di&&null===Kr&&(null===ui||1===ui||-1===ui))return!0;throw Error(m+"Invalid BigNumber: "+Vn)},Nr.maximum=Nr.max=function(){return Wo(arguments,We.lt)},Nr.minimum=Nr.min=function(){return Wo(arguments,We.gt)},Nr.random=(Vn=9007199254740992,lr=Math.random()*Vn&2097151?function(){return u(Math.random()*Vn)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(Tr){var di,Kr,ui,qe,ge,Ne=0,Ke=[],ot=new Nr(Xe);if(null==Tr?Tr=at:K(Tr,0,V),qe=h(Tr/S),Rn)if(crypto.getRandomValues){for(di=crypto.getRandomValues(new Uint32Array(qe*=2));Ne>>11))>=9e15?(Kr=crypto.getRandomValues(new Uint32Array(2)),di[Ne]=Kr[0],di[Ne+1]=Kr[1]):(Ke.push(ge%1e14),Ne+=2);Ne=qe/2}else{if(!crypto.randomBytes)throw Rn=!1,Error(m+"crypto unavailable");for(di=crypto.randomBytes(qe*=7);Ne=9e15?crypto.randomBytes(7).copy(di,Ne):(Ke.push(ge%1e14),Ne+=7);Ne=qe/7}if(!Rn)for(;Ne=10;ge/=10,Ne++);NeKr-1&&(null==ge[qe+1]&&(ge[qe+1]=0),ge[qe+1]+=ge[qe]/Kr|0,ge[qe]%=Kr)}return ge.reverse()}return function(Tr,di,Kr,ui,qe){var ge,Ne,Ke,ot,Mt,Vt,Ht,un,pn=Tr.indexOf("."),yn=at,Zn=_t;for(pn>=0&&(ot=jr,jr=0,Tr=Tr.replace(".",""),Vt=(un=new Nr(di)).pow(Tr.length-pn),jr=ot,un.c=lr(y(H(Vt.c),Vt.e,"0"),10,Kr,Vn),un.e=un.c.length),Ke=ot=(Ht=lr(Tr,di,Kr,qe?(ge=Fi,Vn):(ge=Vn,Fi))).length;0==Ht[--ot];Ht.pop());if(!Ht[0])return ge.charAt(0);if(pn<0?--Ke:(Vt.c=Ht,Vt.e=Ke,Vt.s=ui,Ht=(Vt=oe(Vt,un,yn,Zn,Kr)).c,Mt=Vt.r,Ke=Vt.e),pn=Ht[Ne=Ke+yn+1],ot=Kr/2,Mt=Mt||Ne<0||null!=Ht[Ne+1],Mt=Zn<4?(null!=pn||Mt)&&(0==Zn||Zn==(Vt.s<0?3:2)):pn>ot||pn==ot&&(4==Zn||Mt||6==Zn&&1&Ht[Ne-1]||Zn==(Vt.s<0?8:7)),Ne<1||!Ht[0])Tr=Mt?y(ge.charAt(1),-yn,ge.charAt(0)):ge.charAt(0);else{if(Ht.length=Ne,Mt)for(--Kr;++Ht[--Ne]>Kr;)Ht[Ne]=0,Ne||(++Ke,Ht=[1].concat(Ht));for(ot=Ht.length;!Ht[--ot];);for(pn=0,Tr="";pn<=ot;Tr+=ge.charAt(Ht[pn++]));Tr=y(Tr,Ke,ge.charAt(0))}return Tr}}(),oe=function(){function Vn(di,Kr,ui){var qe,ge,Ne,Ke,ot=0,Mt=di.length,Vt=Kr%L,Ht=Kr/L|0;for(di=di.slice();Mt--;)ot=((ge=Vt*(Ne=di[Mt]%L)+(qe=Ht*Ne+(Ke=di[Mt]/L|0)*Vt)%L*L+ot)/ui|0)+(qe/L|0)+Ht*Ke,di[Mt]=ge%ui;return ot&&(di=[ot].concat(di)),di}function lr(di,Kr,ui,qe){var ge,Ne;if(ui!=qe)Ne=ui>qe?1:-1;else for(ge=Ne=0;geKr[ge]?1:-1;break}return Ne}function Tr(di,Kr,ui,qe){for(var ge=0;ui--;)di[ui]-=ge,di[ui]=(ge=di[ui]1;di.splice(0,1));}return function(di,Kr,ui,qe,ge){var Ne,Ke,ot,Mt,Vt,Ht,un,pn,yn,Zn,fr,zr,ci,ai,li,bi,os,es=di.s==Kr.s?1:-1,Ds=di.c,ws=Kr.c;if(!(Ds&&Ds[0]&&ws&&ws[0]))return new Nr(di.s&&Kr.s&&(Ds?!ws||Ds[0]!=ws[0]:ws)?Ds&&0==Ds[0]||!ws?0*es:es/0:NaN);for(yn=(pn=new Nr(es)).c=[],es=ui+(Ke=di.e-Kr.e)+1,ge||(ge=w,Ke=G(di.e/S)-G(Kr.e/S),es=es/S|0),ot=0;ws[ot]==(Ds[ot]||0);ot++);if(ws[ot]>(Ds[ot]||0)&&Ke--,es<0)yn.push(1),Mt=!0;else{for(ai=Ds.length,bi=ws.length,ot=0,es+=2,(Vt=u(ge/(ws[0]+1)))>1&&(ws=Vn(ws,Vt,ge),Ds=Vn(Ds,Vt,ge),bi=ws.length,ai=Ds.length),ci=bi,fr=(Zn=Ds.slice(0,bi)).length;fr=ge/2&&li++;do{if(Vt=0,(Ne=lr(ws,Zn,bi,fr))<0){if(zr=Zn[0],bi!=fr&&(zr=zr*ge+(Zn[1]||0)),(Vt=u(zr/li))>1)for(Vt>=ge&&(Vt=ge-1),un=(Ht=Vn(ws,Vt,ge)).length,fr=Zn.length;1==lr(Ht,Zn,un,fr);)Vt--,Tr(Ht,bi=10;es/=10,ot++);Ha(pn,ui+(pn.e=ot+Ke*S-1)+1,qe,Mt)}else pn.e=Ke,pn.r=+Mt;return pn}}(),He=function(){var Vn=/^(-?)0([xbo])(?=\w[\w.]*$)/i,lr=/^([^.]+)\.$/,Tr=/^\.([^.]+)$/,di=/^-?(Infinity|NaN)$/,Kr=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(ui,qe,ge,Ne){var Ke,ot=ge?qe:qe.replace(Kr,"");if(di.test(ot))ui.s=isNaN(ot)?null:ot<0?-1:1;else{if(!ge&&(ot=ot.replace(Vn,function(Mt,Vt,Ht){return Ke="x"==(Ht=Ht.toLowerCase())?16:"b"==Ht?2:8,Ne&&Ne!=Ke?Mt:Vt}),Ne&&(Ke=Ne,ot=ot.replace(lr,"$1").replace(Tr,"0.$1")),qe!=ot))return new Nr(ot,Ke);if(Nr.DEBUG)throw Error(m+"Not a"+(Ne?" base "+Ne:"")+" number: "+qe);ui.s=null}ui.c=ui.e=null}}(),We.absoluteValue=We.abs=function(){var Vn=new Nr(this);return Vn.s<0&&(Vn.s=1),Vn},We.comparedTo=function(Vn,lr){return j(this,new Nr(Vn,lr))},We.decimalPlaces=We.dp=function(Vn,lr){var Tr,di,Kr;if(null!=Vn)return K(Vn,0,V),null==lr?lr=_t:K(lr,0,8),Ha(new Nr(this),Vn+this.e+1,lr);if(!(Tr=this.c))return null;if(di=((Kr=Tr.length-1)-G(this.e/S))*S,Kr=Tr[Kr])for(;Kr%10==0;Kr/=10,di--);return di<0&&(di=0),di},We.dividedBy=We.div=function(Vn,lr){return oe(this,new Nr(Vn,lr),at,_t)},We.dividedToIntegerBy=We.idiv=function(Vn,lr){return oe(this,new Nr(Vn,lr),0,1)},We.exponentiatedBy=We.pow=function(Vn,lr){var Tr,di,Kr,ui,ge,Ne,Ke,ot,Mt=this;if((Vn=new Nr(Vn)).c&&!Vn.isInteger())throw Error(m+"Exponent not an integer: "+Ba(Vn));if(null!=lr&&(lr=new Nr(lr)),ge=Vn.e>14,!Mt.c||!Mt.c[0]||1==Mt.c[0]&&!Mt.e&&1==Mt.c.length||!Vn.c||!Vn.c[0])return ot=new Nr(Math.pow(+Ba(Mt),ge?2-R(Vn):+Ba(Vn))),lr?ot.mod(lr):ot;if(Ne=Vn.s<0,lr){if(lr.c?!lr.c[0]:!lr.s)return new Nr(NaN);(di=!Ne&&Mt.isInteger()&&lr.isInteger())&&(Mt=Mt.mod(lr))}else{if(Vn.e>9&&(Mt.e>0||Mt.e<-1||(0==Mt.e?Mt.c[0]>1||ge&&Mt.c[1]>=24e7:Mt.c[0]<8e13||ge&&Mt.c[0]<=9999975e7)))return ui=Mt.s<0&&R(Vn)?-0:0,Mt.e>-1&&(ui=1/ui),new Nr(Ne?1/ui:ui);jr&&(ui=h(jr/S+2))}for(ge?(Tr=new Nr(.5),Ne&&(Vn.s=1),Ke=R(Vn)):Ke=(Kr=Math.abs(+Ba(Vn)))%2,ot=new Nr(Xe);;){if(Ke){if(!(ot=ot.times(Mt)).c)break;ui?ot.c.length>ui&&(ot.c.length=ui):di&&(ot=ot.mod(lr))}if(Kr){if(0===(Kr=u(Kr/2)))break;Ke=Kr%2}else if(Ha(Vn=Vn.times(Tr),Vn.e+1,1),Vn.e>14)Ke=R(Vn);else{if(0==(Kr=+Ba(Vn)))break;Ke=Kr%2}Mt=Mt.times(Mt),ui?Mt.c&&Mt.c.length>ui&&(Mt.c.length=ui):di&&(Mt=Mt.mod(lr))}return di?ot:(Ne&&(ot=Xe.div(ot)),lr?ot.mod(lr):ui?Ha(ot,jr,_t,void 0):ot)},We.integerValue=function(Vn){var lr=new Nr(this);return null==Vn?Vn=_t:K(Vn,0,8),Ha(lr,lr.e+1,Vn)},We.isEqualTo=We.eq=function(Vn,lr){return 0===j(this,new Nr(Vn,lr))},We.isFinite=function(){return!!this.c},We.isGreaterThan=We.gt=function(Vn,lr){return j(this,new Nr(Vn,lr))>0},We.isGreaterThanOrEqualTo=We.gte=function(Vn,lr){return 1===(lr=j(this,new Nr(Vn,lr)))||0===lr},We.isInteger=function(){return!!this.c&&G(this.e/S)>this.c.length-2},We.isLessThan=We.lt=function(Vn,lr){return j(this,new Nr(Vn,lr))<0},We.isLessThanOrEqualTo=We.lte=function(Vn,lr){return-1===(lr=j(this,new Nr(Vn,lr)))||0===lr},We.isNaN=function(){return!this.s},We.isNegative=function(){return this.s<0},We.isPositive=function(){return this.s>0},We.isZero=function(){return!!this.c&&0==this.c[0]},We.minus=function(Vn,lr){var Tr,di,Kr,ui,qe=this,ge=qe.s;if(lr=(Vn=new Nr(Vn,lr)).s,!ge||!lr)return new Nr(NaN);if(ge!=lr)return Vn.s=-lr,qe.plus(Vn);var Ne=qe.e/S,Ke=Vn.e/S,ot=qe.c,Mt=Vn.c;if(!Ne||!Ke){if(!ot||!Mt)return ot?(Vn.s=-lr,Vn):new Nr(Mt?qe:NaN);if(!ot[0]||!Mt[0])return Mt[0]?(Vn.s=-lr,Vn):new Nr(ot[0]?qe:3==_t?-0:0)}if(Ne=G(Ne),Ke=G(Ke),ot=ot.slice(),ge=Ne-Ke){for((ui=ge<0)?(ge=-ge,Kr=ot):(Ke=Ne,Kr=Mt),Kr.reverse(),lr=ge;lr--;Kr.push(0));Kr.reverse()}else for(di=(ui=(ge=ot.length)<(lr=Mt.length))?ge:lr,ge=lr=0;lr0)for(;lr--;ot[Tr++]=0);for(lr=w-1;di>ge;){if(ot[--di]=0;){for(Tr=0,Vt=zr[Kr]%yn,Ht=zr[Kr]/yn|0,ui=Kr+(qe=Ne);ui>Kr;)Tr=((Ke=Vt*(Ke=fr[--qe]%yn)+(ge=Ht*Ke+(ot=fr[qe]/yn|0)*Vt)%yn*yn+un[ui]+Tr)/pn|0)+(ge/yn|0)+Ht*ot,un[ui--]=Ke%pn;un[ui]=Tr}return Tr?++di:un.splice(0,1),Go(Vn,un,di)},We.negated=function(){var Vn=new Nr(this);return Vn.s=-Vn.s||null,Vn},We.plus=function(Vn,lr){var Tr,di=this,Kr=di.s;if(lr=(Vn=new Nr(Vn,lr)).s,!Kr||!lr)return new Nr(NaN);if(Kr!=lr)return Vn.s=-lr,di.minus(Vn);var ui=di.e/S,qe=Vn.e/S,ge=di.c,Ne=Vn.c;if(!ui||!qe){if(!ge||!Ne)return new Nr(Kr/0);if(!ge[0]||!Ne[0])return Ne[0]?Vn:new Nr(ge[0]?di:0*Kr)}if(ui=G(ui),qe=G(qe),ge=ge.slice(),Kr=ui-qe){for(Kr>0?(qe=ui,Tr=Ne):(Kr=-Kr,Tr=ge),Tr.reverse();Kr--;Tr.push(0));Tr.reverse()}for((Kr=ge.length)-(lr=Ne.length)<0&&(Tr=Ne,Ne=ge,ge=Tr,lr=Kr),Kr=0;lr;)Kr=(ge[--lr]=ge[lr]+Ne[lr]+Kr)/w|0,ge[lr]=w===ge[lr]?0:ge[lr]%w;return Kr&&(ge=[Kr].concat(ge),++qe),Go(Vn,ge,qe)},We.precision=We.sd=function(Vn,lr){var Tr,di,Kr;if(null!=Vn&&Vn!==!!Vn)return K(Vn,1,V),null==lr?lr=_t:K(lr,0,8),Ha(new Nr(this),Vn,lr);if(!(Tr=this.c))return null;if(di=(Kr=Tr.length-1)*S+1,Kr=Tr[Kr]){for(;Kr%10==0;Kr/=10,di--);for(Kr=Tr[0];Kr>=10;Kr/=10,di++);}return Vn&&this.e+1>di&&(di=this.e+1),di},We.shiftedBy=function(Vn){return K(Vn,-I,I),this.times("1e"+Vn)},We.squareRoot=We.sqrt=function(){var Vn,lr,Tr,di,Kr,ui=this,qe=ui.c,ge=ui.s,Ne=ui.e,Ke=at+4,ot=new Nr("0.5");if(1!==ge||!qe||!qe[0])return new Nr(!ge||ge<0&&(!qe||qe[0])?NaN:qe?ui:1/0);if(0==(ge=Math.sqrt(+Ba(ui)))||ge==1/0?(((lr=H(qe)).length+Ne)%2==0&&(lr+="0"),ge=Math.sqrt(+lr),Ne=G((Ne+1)/2)-(Ne<0||Ne%2),Tr=new Nr(lr=ge==1/0?"5e"+Ne:(lr=ge.toExponential()).slice(0,lr.indexOf("e")+1)+Ne)):Tr=new Nr(ge+""),Tr.c[0])for((ge=(Ne=Tr.e)+Ke)<3&&(ge=0);;)if(Tr=ot.times((Kr=Tr).plus(oe(ui,Kr,Ke,1))),H(Kr.c).slice(0,ge)===(lr=H(Tr.c)).slice(0,ge)){if(Tr.e0&&un>0){for(ot=Ht.substr(0,ui=un%ge||ge);ui0&&(ot+=Ke+Ht.slice(ui)),Vt&&(ot="-"+ot)}di=Mt?ot+(Tr.decimalSeparator||"")+((Ne=+Tr.fractionGroupSize)?Mt.replace(new RegExp("\\d{"+Ne+"}\\B","g"),"$&"+(Tr.fractionGroupSeparator||"")):Mt):ot}return(Tr.prefix||"")+di+(Tr.suffix||"")},We.toFraction=function(Vn){var lr,Tr,di,Kr,ui,qe,ge,Ne,Ke,ot,Mt,Vt,Ht=this,un=Ht.c;if(null!=Vn&&(!(ge=new Nr(Vn)).isInteger()&&(ge.c||1!==ge.s)||ge.lt(Xe)))throw Error(m+"Argument "+(ge.isInteger()?"out of range: ":"not an integer: ")+Ba(ge));if(!un)return new Nr(Ht);for(lr=new Nr(Xe),Ke=Tr=new Nr(Xe),di=Ne=new Nr(Xe),Vt=H(un),ui=lr.e=Vt.length-Ht.e-1,lr.c[0]=P[(qe=ui%S)<0?S+qe:qe],Vn=!Vn||ge.comparedTo(lr)>0?ui>0?lr:Ke:ge,qe=In,In=1/0,ge=new Nr(Vt),Ne.c[0]=0;ot=oe(ge,lr,0,1),1!=(Kr=Tr.plus(ot.times(di))).comparedTo(Vn);)Tr=di,di=Kr,Ke=Ne.plus(ot.times(Kr=Ke)),Ne=Kr,lr=ge.minus(ot.times(Kr=lr)),ge=Kr;return Kr=oe(Vn.minus(Tr),di,0,1),Ne=Ne.plus(Kr.times(Ke)),Tr=Tr.plus(Kr.times(di)),Ne.s=Ke.s=Ht.s,Mt=oe(Ke,di,ui*=2,_t).minus(Ht).abs().comparedTo(oe(Ne,Tr,ui,_t).minus(Ht).abs())<1?[Ke,di]:[Ne,Tr],In=qe,Mt},We.toNumber=function(){return+Ba(this)},We.toPrecision=function(Vn,lr){return null!=Vn&&K(Vn,1,V),Ci(this,Vn,lr,2)},We.toString=function(Vn){var lr,Tr=this,di=Tr.s,Kr=Tr.e;return null===Kr?di?(lr="Infinity",di<0&&(lr="-"+lr)):lr="NaN":(null==Vn?lr=Kr<=xt||Kr>=$t?o(H(Tr.c),Kr):y(H(Tr.c),Kr,"0"):10===Vn?lr=y(H((Tr=Ha(new Nr(Tr),at+Kr+1,_t)).c),Tr.e,"0"):(K(Vn,2,Fi.length,"Base"),lr=Pe(y(H(Tr.c),Kr,"0"),10,Vn,di,!0)),di<0&&Tr.c[0]&&(lr="-"+lr)),lr},We.valueOf=We.toJSON=function(){return Ba(this)},We._isBigNumber=!0,We[Symbol.toStringTag]="BigNumber",We[Symbol.for("nodejs.util.inspect.custom")]=We.valueOf,null!=Je&&Nr.set(Je),Nr}();M.config({EXPONENTIAL_AT:[-100,100],ROUNDING_MODE:1,DECIMAL_PLACES:18});const v=C(0),k=C(1),D=C("Infinity");function N(Je,oe){const Pe=new M(oe.toString()),He=new M(10).pow(Pe);return Je.times(He)}function C(Je){return new M(Je.toString())}const a=BigInt(0),B=BigInt(1),Q=BigInt("1000000000000000000"),ee=(Je,oe)=>{if(!Je)throw new Error(oe)};function ce(Je){const oe=BigInt(18)-Je;return Q*BigInt(10)**oe}class ae{static add(oe,Pe){const He=oe+Pe;return ee(Pe>=0&&He>=oe||Pe<0&&He=Pe?oe:Pe}static min(oe,Pe){return oe=this.MIN_NATURAL_EXPONENT&&oe<=this.MAX_NATURAL_EXPONENT,"Errors.INVALID_EXPONENT"),oe<0)return this.ONE_18*this.ONE_18/this.exp(BigInt(-1)*oe);let Pe;oe>=this.x0?(oe-=this.x0,Pe=this.a0):oe>=this.x1?(oe-=this.x1,Pe=this.a1):Pe=BigInt(1),oe*=BigInt(100);let He=this.ONE_20;oe>=this.x2&&(oe-=this.x2,He=He*this.a2/this.ONE_20),oe>=this.x3&&(oe-=this.x3,He=He*this.a3/this.ONE_20),oe>=this.x4&&(oe-=this.x4,He=He*this.a4/this.ONE_20),oe>=this.x5&&(oe-=this.x5,He=He*this.a5/this.ONE_20),oe>=this.x6&&(oe-=this.x6,He=He*this.a6/this.ONE_20),oe>=this.x7&&(oe-=this.x7,He=He*this.a7/this.ONE_20),oe>=this.x8&&(oe-=this.x8,He=He*this.a8/this.ONE_20),oe>=this.x9&&(oe-=this.x9,He=He*this.a9/this.ONE_20);let Xe,We=this.ONE_20;return Xe=oe,We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(2),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(3),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(4),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(5),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(6),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(7),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(8),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(9),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(10),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(11),We+=Xe,Xe=Xe*oe/this.ONE_20/BigInt(12),We+=Xe,He*We/this.ONE_20*Pe/BigInt(100)}static _ln_36(oe){const Pe=((oe*=this.ONE_18)-this.ONE_36)*this.ONE_36/(oe+this.ONE_36),He=Pe*Pe/this.ONE_36;let We=Pe,Xe=We;return We=We*He/this.ONE_36,Xe+=We/BigInt(3),We=We*He/this.ONE_36,Xe+=We/BigInt(5),We=We*He/this.ONE_36,Xe+=We/BigInt(7),We=We*He/this.ONE_36,Xe+=We/BigInt(9),We=We*He/this.ONE_36,Xe+=We/BigInt(11),We=We*He/this.ONE_36,Xe+=We/BigInt(13),We=We*He/this.ONE_36,Xe+=We/BigInt(15),Xe*BigInt(2)}static _ln(oe){if(oe=this.a0*this.ONE_18&&(oe/=this.a0,Pe+=this.x0),oe>=this.a1*this.ONE_18&&(oe/=this.a1,Pe+=this.x1),Pe*=BigInt(100),(oe*=BigInt(100))>=this.a2&&(oe=oe*this.ONE_20/this.a2,Pe+=this.x2),oe>=this.a3&&(oe=oe*this.ONE_20/this.a3,Pe+=this.x3),oe>=this.a4&&(oe=oe*this.ONE_20/this.a4,Pe+=this.x4),oe>=this.a5&&(oe=oe*this.ONE_20/this.a5,Pe+=this.x5),oe>=this.a6&&(oe=oe*this.ONE_20/this.a6,Pe+=this.x6),oe>=this.a7&&(oe=oe*this.ONE_20/this.a7,Pe+=this.x7),oe>=this.a8&&(oe=oe*this.ONE_20/this.a8,Pe+=this.x8),oe>=this.a9&&(oe=oe*this.ONE_20/this.a9,Pe+=this.x9),oe>=this.a10&&(oe=oe*this.ONE_20/this.a10,Pe+=this.x10),oe>=this.a11&&(oe=oe*this.ONE_20/this.a11,Pe+=this.x11);const He=(oe-this.ONE_20)*this.ONE_20/(oe+this.ONE_20),We=He*He/this.ONE_20;let Xe=He,at=Xe;return Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(3),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(5),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(7),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(9),Xe=Xe*We/this.ONE_20,at+=Xe/BigInt(11),at*=BigInt(2),(Pe+at)/BigInt(100)}}Te.ONE_18=BigInt("1000000000000000000"),Te.ONE_20=BigInt("100000000000000000000"),Te.ONE_36=BigInt("1000000000000000000000000000000000000"),Te.MAX_NATURAL_EXPONENT=BigInt("130000000000000000000"),Te.MIN_NATURAL_EXPONENT=BigInt("-41000000000000000000"),Te.LN_36_LOWER_BOUND=BigInt(Te.ONE_18)-BigInt("100000000000000000"),Te.LN_36_UPPER_BOUND=BigInt(Te.ONE_18)+BigInt("100000000000000000"),Te.MILD_EXPONENT_BOUND=BigInt(2)**BigInt(254)/Te.ONE_20,Te.x0=BigInt("128000000000000000000"),Te.a0=BigInt("38877084059945950922200000000000000000000000000000000000"),Te.x1=BigInt("64000000000000000000"),Te.a1=BigInt("6235149080811616882910000000"),Te.x2=BigInt("3200000000000000000000"),Te.a2=BigInt("7896296018268069516100000000000000"),Te.x3=BigInt("1600000000000000000000"),Te.a3=BigInt("888611052050787263676000000"),Te.x4=BigInt("800000000000000000000"),Te.a4=BigInt("298095798704172827474000"),Te.x5=BigInt("400000000000000000000"),Te.a5=BigInt("5459815003314423907810"),Te.x6=BigInt("200000000000000000000"),Te.a6=BigInt("738905609893065022723"),Te.x7=BigInt("100000000000000000000"),Te.a7=BigInt("271828182845904523536"),Te.x8=BigInt("50000000000000000000"),Te.a8=BigInt("164872127070012814685"),Te.x9=BigInt("25000000000000000000"),Te.a9=BigInt("128402541668774148407"),Te.x10=BigInt("12500000000000000000"),Te.a10=BigInt("113314845306682631683"),Te.x11=BigInt("6250000000000000000"),Te.a11=BigInt("106449445891785942956");const le=(Je,oe)=>(0,E.getAddress)(Je)===(0,E.getAddress)(oe);function X(Je,oe=0){const[Pe,He]=Je.split(".");if(!He)return(0,q.Ox)(Je,oe);const We=Pe+"."+He.slice(0,oe);return(0,q.Ox)(We,oe)}const ne=Je=>(0,q.Ox)(Je.balance,18).mul((0,q.Ox)(Je.priceRate??"1",18)).div(d.Ce).toBigInt(),pe=(Je,oe)=>{const Pe=ce(BigInt(oe.decimals));return O.O$.from(function(Je,oe){return ae.mulDownFixed(Je,oe)}(Je,Pe).toString()).mul((0,q.Ox)(oe.priceRate??"1",18)).div(d.Ce).toBigInt()},_e=(Je,oe)=>function(Je,oe){return ae.divDownFixed(Je,oe)}(Je*Q/BigInt((0,q.Ox)(oe.priceRate??"1",18).toString()),ce(BigInt(oe.decimals)));var xe=(()=>{return(Je=xe||(xe={}))[Je.SwapExactIn=0]="SwapExactIn",Je[Je.SwapExactOut=1]="SwapExactOut",xe;var Je})(),Ce=(()=>{return(Je=Ce||(Ce={}))[Je.Weighted=0]="Weighted",Je[Je.Stable=1]="Stable",Je[Je.Element=2]="Element",Je[Je.MetaStable=3]="MetaStable",Je[Je.Linear=4]="Linear",Je[Je.Gyro2=5]="Gyro2",Je[Je.Gyro3=6]="Gyro3",Je[Je.GyroE=7]="GyroE",Je[Je.Fx=8]="Fx",Ce;var Je})(),ke=(()=>{return(Je=ke||(ke={})).All="All",Je.Weighted="Weighted",Je.Stable="Stable",Je.MetaStable="MetaStable",Je.LiquidityBootstrapping="LiquidityBootstrapping",Je.Investment="Investment",Je.Element="Element",Je.StablePhantom="StablePhantom",Je.ComposableStable="ComposableStable",Je.Gyro2="Gyro2",Je.Gyro3="Gyro3",Je.GyroE="GyroE",Je.AaveLinear="AaveLinear",Je.Linear="Linear",Je.EulerLinear="EulerLinear",Je.ERC4626Linear="ERC4626Linear",Je.BeefyLinear="BeefyLinear",Je.GearboxLinear="GearboxLinear",Je.MidasLinear="MidasLinear",Je.ReaperLinear="ReaperLinear",Je.SiloLinear="SiloLinear",Je.TetuLinear="TetuLinear",Je.YearnLinear="YearnLinear",Je.FX="FX",ke;var Je})();const me=BigInt("3000000000000000000");function Ee(Je,oe,Pe,He,We,Xe){We=function(Je,oe){return Je-ae.mulUpFixed(Je,oe)}(We,Xe);const at=ae.divDownFixed(oe,He),_t=ae.add(Je,We),xt=ae.divUpFixed(Je,_t),$t=ae.powUpFixed(xt,at);return ae.mulDownFixed(Pe,ae.complementFixed($t))}function ze(Je,oe,Pe,He,We,Xe){const at=ae.divUpFixed(Pe,Pe-We),_t=ae.divUpFixed(He,oe),xt=ae.powUpFixed(at,_t),$t=ae.sub(xt,ae.ONE);return function(Je,oe){return ae.divUpFixed(Je,ae.complementFixed(oe))}(ae.mulUpFixed(Je,$t),Xe)}function ht(Je,oe,Pe,He,We){const Xe=new Array(Pe.length);let at=a;for(let xt=0;xtat){const In=ae.mulDownFixed(Je[xt],ae.sub(at,ae.ONE)),Rn=ae.sub(Pe[xt],In),hr=ae.mulUpFixed(Rn,We);$t=ae.add(In,ae.sub(Rn,hr))}else $t=Pe[xt];const cn=ae.divDownFixed(ae.add(Je[xt],$t),Je[xt]);_t=ae.mulDownFixed(_t,ae.powDown(cn,oe[xt]))}return _t>ae.ONE?ae.mulDownFixed(He,ae.sub(_t,ae.ONE)):a}function wt(Je,oe,Pe){const He=ae.divDownFixed(oe,Pe),We=new Array(Je.length);for(let Xe=0;XeHe[_t]){const cn=ae.mulDownFixed(Je[_t],ae.complementFixed(We)),In=ae.sub(Pe[_t],cn),Rn=ae.divUpFixed(In,ae.complementFixed(Xe));xt=ae.add(cn,Rn)}else xt=Pe[_t];const $t=ae.divDownFixed(ae.sub(Je[_t],xt),Je[_t]);at=ae.mulDownFixed(at,ae.powDown($t,oe[_t]))}return at}(Je,oe,Pe,Xe,at,We);return ae.mulUpFixed(He,ae.complementFixed(_t))}const Ye=(Je,oe,Pe,He,We)=>{const Xe=ae.divUpFixed(ae.add(He,Pe),He);if(Xe>me)throw new Error("MAX_OUT_BPT_FOR_TOKEN_IN");const at=ae.powUpFixed(Xe,ae.divUpFixed(ae.ONE,oe)),_t=ae.mulUpFixed(Je,ae.sub(at,ae.ONE)),xt=ae.complementFixed(oe),$t=ae.mulUpFixed(_t,xt),cn=ae.sub(_t,$t);return ae.add(cn,ae.divUpFixed($t,ae.complementFixed(We)))};function dn(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightIn,18)),Xe=parseFloat((0,q.S5)(oe.weightOut,18)),at=Je.toNumber(),_t=parseFloat((0,q.S5)(oe.swapFee,18));return C(-Pe*Xe/(He*(-1+_t)*(Pe/(at+Pe-at*_t))**((We+Xe)/Xe)*We))}function Nt(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightIn,18)),Xe=parseFloat((0,q.S5)(oe.weightOut,18));return C(-Pe*(He/(-Je.toNumber()+He))**((We+Xe)/We)*Xe/(He*(-1+parseFloat((0,q.S5)(oe.swapFee,18)))*We))}function It(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightIn,18)),Xe=Je.toNumber(),at=parseFloat((0,q.S5)(oe.swapFee,18));return C(Pe*((Xe+Pe+Xe*at*(-1+We))/Pe)**(1-We)/(He*(1+at*(-1+We))*We))}function jt(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightOut,18));return C((1-Je.toNumber()/Pe)**((-1+We)/We)*Pe*(1+parseFloat((0,q.S5)(oe.swapFee))*(-1+We))*We/He)}function Yt(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,18)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightOut,18)),Xe=Je.toNumber(),at=parseFloat((0,q.S5)(oe.swapFee,18));return C(Pe*(1+at*(-1+We))*We*(1+Xe*(-1+at-at*We)/He)**(-1+We)/He)}function Wn(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,18)),We=parseFloat((0,q.S5)(oe.weightIn,18)),Xe=Je.toNumber();return C(((Xe+He)/He)**(1/We)*Pe/((Xe+He)*(1+parseFloat((0,q.S5)(oe.swapFee,18))*(-1+We))*We))}function fn(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightIn,18)),Xe=parseFloat((0,q.S5)(oe.weightOut,18)),at=Je.toNumber();return C((We+Xe)/(He*(Pe/(at+Pe-at*parseFloat((0,q.S5)(oe.swapFee,18))))**(We/Xe)*We))}function $n(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightIn,18)),Xe=parseFloat((0,q.S5)(oe.weightOut,18)),at=Je.toNumber();return C(-Pe*(He/(-at+He))**(Xe/We)*Xe*(We+Xe)/((at-He)**2*(-1+parseFloat((0,q.S5)(oe.swapFee,18)))*We**2))}function Jr(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),He=parseFloat((0,q.S5)(oe.balanceOut,18)),We=parseFloat((0,q.S5)(oe.weightIn,18)),Xe=Je.toNumber();return C(-(-1+We)/(He*((Xe+Pe+Xe*parseFloat((0,q.S5)(oe.swapFee,18))*(-1+We))/Pe)**We*We))}function Bn(Je,oe){const Pe=parseFloat((0,q.S5)(oe.balanceIn,18)),He=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),We=parseFloat((0,q.S5)(oe.weightOut,18)),Xe=Je.toNumber();return C(-(1+parseFloat((0,q.S5)(oe.swapFee,18))*(-1+We))*(-1+We)/((1-Xe/Pe)**(1/We)*He))}var zn=Object.freeze({__proto__:null,_calcOutGivenIn:Ee,_calcInGivenOut:ze,_spotPriceAfterSwapExactTokenInForTokenOutBigInt:function(Je,oe,Pe,He,We,Xe){const at=ae.mulUpFixed(Je,He);let _t=ae.mulUpFixed(Pe,oe);const xt=ae.complementFixed(Xe);_t=ae.mulUpFixed(_t,xt);const $t=ae.divUpFixed(Je,ae.add(ae.mulUpFixed(We,xt),Je)),cn=ae.divUpFixed(oe+He,He);return _t=ae.mulUpFixed(_t,ae.powUpFixed($t,cn)),ae.divUpFixed(at,_t)},_spotPriceAfterSwapTokenInForExactTokenOutBigInt:function(Je,oe,Pe,He,We,Xe){let at=ae.mulUpFixed(Je,He);const _t=ae.complementFixed(Xe),xt=ae.divUpFixed(Pe,ae.sub(Pe,We)),$t=ae.divUpFixed(oe+He,oe);at=ae.mulUpFixed(at,ae.powUpFixed(xt,$t));const cn=ae.mulUpFixed(ae.mulUpFixed(Pe,oe),_t);return ae.divUpFixed(at,cn)},_calcBptOutGivenExactTokensIn:ht,_calcTokensOutGivenExactBptIn:wt,_calcTokenOutGivenExactBptIn:Pt,_calcBptInGivenExactTokensOut:st,_calcTokenInGivenExactBptOut:Ye,_calculateInvariant:function(Je,oe){let Pe=ae.ONE;for(let He=0;He{return(Je=Lr||(Lr={}))[Je.BptToToken=0]="BptToToken",Je[Je.TokenToBpt=1]="TokenToBpt",Je[Je.TokenToToken=2]="TokenToToken",Lr;var Je})();class Kn{constructor(oe,Pe,He,We,Xe,at,_t){this.poolType=Ce.Weighted,this.MAX_IN_RATIO=(0,q.Ox)("0.3",18),this.MAX_OUT_RATIO=(0,q.Ox)("0.3",18),this.isLBP=!1,this.id=oe,this.address=Pe,this.swapFee=(0,q.Ox)(He,18),this.totalShares=(0,q.Ox)(Xe,18),this.tokens=at,this.tokensList=_t,this.totalWeight=(0,q.Ox)(We,18)}static fromPool(oe,Pe){if(!oe.totalWeight)throw new Error("WeightedPool missing totalWeight");const He=new Kn(oe.id,oe.address,oe.swapFee,oe.totalWeight,oe.totalShares,oe.tokens,oe.tokensList);return Pe&&(He.isLBP=!0),He}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=(0,q.Ox)(We.weight,18).mul(d.Ce).div(this.totalWeight),xt=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(Pe));if(xt<0)throw"Pool does not contain tokenOut";const $t=this.tokens[xt],cn=$t.balance,In=$t.decimals,Rn=(0,q.Ox)($t.weight,18).mul(d.Ce).div(this.totalWeight);let hr;return hr=oe==this.address?Lr.BptToToken:Pe==this.address?Lr.TokenToBpt:Lr.TokenToToken,{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(In),balanceIn:(0,q.Ox)(Xe,at),balanceOut:(0,q.Ox)(cn,In),pairType:hr,weightIn:_t,weightOut:Rn,swapFee:this.swapFee}}getNormalizedWeights(){return this.tokens.map(oe=>(0,q.Ox)(oe.weight,18).mul(d.Ce).div(this.totalWeight).toBigInt())}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){return C(Pe===xe.SwapExactIn?(0,q.S5)(oe.balanceIn.mul(this.MAX_IN_RATIO).div(d.Ce),oe.decimalsIn):(0,q.S5)(oe.balanceOut.mul(this.MAX_OUT_RATIO).div(d.Ce),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){le(this.address,oe)&&this.updateTotalShares(Pe);const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,q.S5)(Pe,He.decimals)}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){if(Pe.isNaN())return Pe;const He=(0,q.Ox)(Pe.dp(18,1).toString(),18).toBigInt(),We=oe.decimalsIn,Xe=oe.decimalsOut,at=(0,q.Ox)(oe.balanceIn.toString(),18-We).toBigInt(),_t=(0,q.Ox)(oe.balanceOut.toString(),18-Xe).toBigInt(),xt=oe.weightIn.toBigInt(),$t=oe.weightOut.toBigInt(),cn=oe.swapFee.toBigInt();let In;try{return In=oe.pairType===Lr.TokenToBpt?ht([at,BigInt(1)],[xt,ae.ONE-xt],[He,BigInt(0)],_t,cn):oe.pairType===Lr.BptToToken?Pt(_t,$t,He,at,cn):Ee(at,xt,_t,$t,He,cn),N(C(In.toString()),-18)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){if(Pe.isNaN())return Pe;const He=(0,q.Ox)(Pe.dp(18,1).toString(),18).toBigInt(),We=oe.decimalsIn,Xe=oe.decimalsOut,at=(0,q.Ox)(oe.balanceIn.toString(),18-We).toBigInt(),_t=(0,q.Ox)(oe.balanceOut.toString(),18-Xe).toBigInt(),xt=oe.weightIn.toBigInt(),$t=oe.weightOut.toBigInt(),cn=oe.swapFee.toBigInt();let In;try{return In=oe.pairType===Lr.TokenToBpt?Ye(at,xt,He,_t,cn):oe.pairType===Lr.BptToToken?st([_t,BigInt(1)],[$t,ae.ONE-$t],[He,BigInt(0)],at,cn):ze(at,xt,_t,$t,He,cn),N(C(In.toString()),-18)}catch{return v}}_calcTokensOutGivenExactBptIn(oe){const Pe=this.tokens.filter(He=>!le(He.address,this.address)).map(He=>ne(He));try{return wt(Pe,oe.toBigInt(),this.totalShares.toBigInt()).map((Xe,at)=>_e(Xe,this.tokens[at])).map(Xe=>O.O$.from(Xe))}catch{return new Array(Pe.length).fill(v)}}_calcBptOutGivenExactTokensIn(oe){try{const Pe=new Array(oe.length).fill(BigInt(0)),He=new Array(oe.length).fill(BigInt(0));this.tokens.filter(Xe=>!le(Xe.address,this.address)).forEach((Xe,at)=>{Pe[at]=pe(BigInt(oe[at].toString()),Xe),He[at]=ne(Xe)});const We=ht(He,this.getNormalizedWeights(),Pe,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(We.toString())}catch{return d._Y}}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.pairType===Lr.TokenToBpt?It(Pe,oe):oe.pairType===Lr.BptToToken?jt(Pe,oe):dn(Pe,oe)}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return oe.pairType===Lr.TokenToBpt?Wn(Pe,oe):oe.pairType===Lr.BptToToken?Yt(Pe,oe):Nt(Pe,oe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.pairType===Lr.TokenToBpt?Jr(Pe,oe):oe.pairType===Lr.BptToToken?Bn(Pe,oe):fn(Pe,oe)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return $n(Pe,oe)}}function sr(Je,oe){let Pe=v;const He=oe.length;for(let xt=0;xtWe){if(Xe-We<=1)return Xe}else if(We-Xe<=1)return Xe}throw new Error("Errors.STABLE_INVARIANT_DIDNT_CONVERGE")}function $i(Je,oe,Pe,He,We,Xe){We=function(Je,oe){return Je-ae.mulUpFixed(Je,oe)}(We,Xe);const at=cs(Je,oe);oe[Pe]=oe[Pe]+We;const xt=so(Je,oe,at,He);return oe[He]-xt-BigInt(1)}function rs(Je,oe,Pe,He,We,Xe){const at=cs(Je,oe);oe[He]=ae.sub(oe[He],We);const _t=so(Je,oe,at,Pe);let xt=ae.add(ae.sub(_t,oe[Pe]),BigInt(1));return xt=function(Je,oe){return ae.divUpFixed(Je,ae.complementFixed(oe))}(xt,Xe),xt}function Xi(Je,oe,Pe,He,We){let Xe=BigInt(0);for(let Rn=0;Rn_t){const jr=ae.mulDownFixed(oe[Rn],_t-ae.ONE);hr=jr+ae.mulDownFixed(Pe[Rn]-jr,ae.ONE-We)}else hr=Pe[Rn];xt[Rn]=oe[Rn]+hr}const $t=cs(Je,oe),cn=cs(Je,xt),In=ae.divDownFixed(cn,$t);return In>ae.ONE?ae.mulDownFixed(He,In-ae.ONE):BigInt(0)}function $s(Je,oe,Pe,He,We,Xe){const at=cs(Je,oe),xt=so(Je,oe,ae.mulUpFixed(ae.divUpFixed(ae.add(We,He),We),at),Pe),$t=ae.sub(xt,oe[Pe]);let cn=BigInt(0);for(let ni=0;niat[Rn]){const jr=ae.mulDownFixed(oe[Rn],ae.complementFixed(_t));hr=jr+ae.divUpFixed(Pe[Rn]-jr,ae.ONE-We)}else hr=Pe[Rn];xt[Rn]=oe[Rn]-hr}const $t=cs(Je,oe),cn=cs(Je,xt),In=ae.divDownFixed(cn,$t);return ae.mulUpFixed(He,ae.complementFixed(In))}function go(Je,oe,Pe,He,We,Xe){const at=cs(Je,oe),xt=so(Je,oe,ae.mulUpFixed(ae.divUpFixed(We-He,We),at),Pe),$t=oe[Pe]-xt;let cn=BigInt(0);for(let ni=0;nicn){if(In-cn<=1)return In}else if(cn-In<=1)return In;throw new Error("Errors.STABLE_GET_BALANCE_DIDNT_CONVERGE")}function Oi(Je,oe,Pe,He,We,Xe){const at=oe.length,_t=cs(Je,oe);let xt=BigInt(0);for(let Nr=0;Nr$t==Pe?We:BigInt(0));let _t=Lu(Je,oe,He+Xi(Je,oe,Xe,He,BigInt(0)),Pe);return _t=ae.divUpFixed(ae.ONE,_t),_t},_spotPriceAfterSwapTokenInForExactBPTOut:function(Je,oe,Pe,He,We){const at=$s(Je,[...oe],Pe,We,He,BigInt(0));oe[Pe]=oe[Pe]+at;let _t=Lu(Je,oe,He+We,Pe);return _t=ae.divUpFixed(ae.ONE,_t),_t},_spotPriceAfterSwapExactBPTInForTokenOut:function(Je,oe,Pe,He,We){const Xe=go(Je,oe,Pe,We,He,BigInt(0));return oe[Pe]=oe[Pe]-Xe,Lu(Je,oe,ae.sub(He,We),Pe)},_spotPriceAfterSwapBPTInForExactTokenOut:function(Je,oe,Pe,He,We){oe[Pe]=ae.sub(oe[Pe],We);const Xe=oe.map((xt,$t)=>$t==Pe?We:BigInt(0));return Lu(Je,oe,He-is(Je,oe,Xe,He,BigInt(0)),Pe)},_poolDerivatives:Oi,_poolDerivativesBPT:Lu});let ja=(()=>{class Je{constructor(Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.Stable,this.MAX_IN_RATIO=(0,q.Ox)("0.3",18),this.MAX_OUT_RATIO=(0,q.Ox)("0.3",18),this.id=Pe,this.address=He,this.amp=(0,q.Ox)(We,Je.AMP_DECIMALS),this.swapFee=(0,q.Ox)(Xe,18),this.totalShares=(0,q.Ox)(at,18),this.tokens=_t,this.tokensList=xt}static fromPool(Pe){if(!Pe.amp)throw new Error("StablePool missing amp factor");return new Je(Pe.id,Pe.address,Pe.amp,Pe.swapFee,Pe.totalShares,Pe.tokens,Pe.tokensList)}parsePoolPairData(Pe,He){const We=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(Pe));if(We<0)throw"Pool does not contain tokenIn";const Xe=this.tokens[We],at=Xe.balance,_t=Xe.decimals,xt=this.tokens.findIndex(ni=>(0,E.getAddress)(ni.address)===(0,E.getAddress)(He));if(xt<0)throw"Pool does not contain tokenOut";const $t=this.tokens[xt],cn=$t.balance,In=$t.decimals,Rn=this.tokens.map(({balance:ni})=>C(ni)),hr=this.tokens.map(({balance:ni})=>(0,q.Ox)(ni,18));return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:Pe,tokenOut:He,balanceIn:(0,q.Ox)(at,_t),balanceOut:(0,q.Ox)(cn,In),swapFee:this.swapFee,allBalances:Rn,allBalancesScaled:hr,amp:this.amp,tokenIndexIn:We,tokenIndexOut:xt,decimalsIn:Number(_t),decimalsOut:Number(In)}}getNormalizedLiquidity(Pe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,v))}getLimitAmountSwap(Pe,He){return C(He===xe.SwapExactIn?(0,q.S5)(Pe.balanceIn.mul(this.MAX_IN_RATIO).div(d.Ce),Pe.decimalsIn):(0,q.S5)(Pe.balanceOut.mul(this.MAX_OUT_RATIO).div(d.Ce),Pe.decimalsOut))}updateTokenBalanceForPool(Pe,He){if(le(this.address,Pe))this.updateTotalShares(He);else{const We=this.tokens.find(Xe=>le(Xe.address,Pe));if(!We)throw Error("Pool does not contain this token");We.balance=(0,q.S5)(He,We.decimals)}}updateTotalShares(Pe){this.totalShares=Pe}_exactTokenInForTokenOut(Pe,He){try{if(He.isZero())return v;const Xe=this.subtractSwapFeeAmount((0,q.Ox)(He.dp(Pe.decimalsIn).toString(),Pe.decimalsIn),Pe.swapFee).mul(10**(18-Pe.decimalsIn));return N(C($i(this.amp.toBigInt(),Pe.allBalancesScaled.map(_t=>_t.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,Xe.toBigInt(),BigInt(0)).toString()),-18).dp(Pe.decimalsOut,1)}catch{return v}}_tokenInForExactTokenOut(Pe,He){try{if(He.isZero())return v;const We=(0,q.Ox)(He.dp(18).toString(),18);let Xe=rs(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,We.toBigInt(),BigInt(0));const at=BigInt(10**(18-Pe.decimalsIn));return Xe=(Xe+at-BigInt(1))/at,C(this.addSwapFeeAmount(O.O$.from(Xe),Pe.swapFee).toString()).div(10**Pe.decimalsIn)}catch(We){return console.error(`_evminGivenOut: ${We.message}`),v}}_calcTokensOutGivenExactBptIn(Pe){const He=this.tokens.filter(We=>!le(We.address,this.address)).map(We=>ne(We));try{return ji(He,Pe.toBigInt(),this.totalShares.toBigInt()).map((at,_t)=>_e(at,this.tokens[_t])).map(at=>O.O$.from(at))}catch{return new Array(He.length).fill(v)}}_calcBptOutGivenExactTokensIn(Pe){try{const He=new Array(Pe.length).fill(BigInt(0)),We=new Array(Pe.length).fill(BigInt(0));this.tokens.filter(at=>!le(at.address,this.address)).forEach((at,_t)=>{He[_t]=pe(BigInt(Pe[_t].toString()),at),We[_t]=ne(at)});const Xe=Xi(this.amp.toBigInt(),We,He,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(Xe.toString())}catch{return d._Y}}_spotPriceAfterSwapExactTokenInForTokenOut(Pe,He){return Tn(He,Pe)}_spotPriceAfterSwapTokenInForExactTokenOut(Pe,He){return Qn(He,Pe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,He){return Vi(He,Pe)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(Pe,He){return ar(He,Pe)}subtractSwapFeeAmount(Pe,He){const We=Pe.mul(He).add(d.Ce.sub(1)).div(d.Ce);return Pe.sub(We)}addSwapFeeAmount(Pe,He){const We=d.Ce.sub(He);return Pe.mul(d.Ce).add(We.sub(1)).div(We)}}return Je.AMP_DECIMALS=3,Je})(),xa=(()=>{class Je{constructor(Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.MetaStable,this.MAX_IN_RATIO=(0,q.Ox)("0.3",18),this.MAX_OUT_RATIO=(0,q.Ox)("0.3",18),this.id=Pe,this.address=He,this.amp=(0,q.Ox)(We,Je.AMP_DECIMALS),this.swapFee=(0,q.Ox)(Xe,18),this.totalShares=(0,q.Ox)(at,18),this.tokens=_t,this.tokensList=xt}static fromPool(Pe){if(!Pe.amp)throw new Error("MetaStablePool missing amp factor");return new Je(Pe.id,Pe.address,Pe.amp,Pe.swapFee,Pe.totalShares,Pe.tokens,Pe.tokensList)}parsePoolPairData(Pe,He){const We=this.tokens.findIndex(Nr=>(0,E.getAddress)(Nr.address)===(0,E.getAddress)(Pe));if(We<0)throw"Pool does not contain tokenIn";const Xe=this.tokens[We],at=Xe.decimals,_t=(0,q.Ox)(Xe.priceRate,18),xt=(0,q.S5)((0,q.Ox)(Xe.balance,at).mul(_t).div(d.Ce),at),$t=this.tokens.findIndex(Nr=>(0,E.getAddress)(Nr.address)===(0,E.getAddress)(He));if($t<0)throw"Pool does not contain tokenOut";const cn=this.tokens[$t],In=cn.decimals,Rn=(0,q.Ox)(cn.priceRate,18),hr=(0,q.S5)((0,q.Ox)(cn.balance,In).mul(Rn).div(d.Ce),In),jr=this.tokens.map(({balance:Nr,priceRate:Ci})=>C(Nr).times(C(Ci))),ni=this.tokens.map(({balance:Nr,priceRate:Ci})=>(0,q.Ox)(Nr,18).mul((0,q.Ox)(Ci,18)).div(d.Ce));return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:Pe,tokenOut:He,balanceIn:(0,q.Ox)(xt,at),balanceOut:(0,q.Ox)(hr,In),swapFee:this.swapFee,allBalances:jr,allBalancesScaled:ni,amp:this.amp,tokenIndexIn:We,tokenIndexOut:$t,decimalsIn:Number(at),decimalsOut:Number(In),tokenInPriceRate:_t,tokenOutPriceRate:Rn}}getNormalizedLiquidity(Pe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,v))}getLimitAmountSwap(Pe,He){return C(He===xe.SwapExactIn?(0,q.S5)(Pe.balanceIn.mul(this.MAX_IN_RATIO).div(Pe.tokenInPriceRate),Pe.decimalsIn):(0,q.S5)(Pe.balanceOut.mul(this.MAX_OUT_RATIO).div(Pe.tokenOutPriceRate),Pe.decimalsOut))}updateTokenBalanceForPool(Pe,He){if(le(this.address,Pe))this.updateTotalShares(He);else{const We=this.tokens.find(Xe=>le(Xe.address,Pe));if(!We)throw Error("Pool does not contain this token");We.balance=(0,q.S5)(He,We.decimals)}}updateTotalShares(Pe){this.totalShares=Pe}_exactTokenInForTokenOut(Pe,He){try{if(He.isZero())return v;const Xe=this.subtractSwapFeeAmount((0,q.Ox)(He.dp(Pe.decimalsIn).toString(),Pe.decimalsIn),Pe.swapFee).mul(Pe.tokenInPriceRate).div(d.Ce),at=$i(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,Xe.toBigInt(),BigInt(0)),_t=O.O$.from(at).mul(d.Ce).div(Pe.tokenOutPriceRate);return C((0,q.S5)(_t,18))}catch{return v}}_tokenInForExactTokenOut(Pe,He){try{if(He.isZero())return v;const We=Pe.decimalsIn,Xe=Pe.decimalsOut,at=Pe.tokenInPriceRate.toBigInt()*BigInt(10**(18-We)),_t=Pe.tokenOutPriceRate.toBigInt()*BigInt(10**(18-Xe)),$t=BigInt(He.times(10**Xe).dp(0).toString())*_t/BigInt(10**18),In=rs(this.amp.toBigInt(),Pe.allBalancesScaled.map(hr=>hr.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,$t,BigInt(0))*BigInt(10**18)/at;return C(this.addSwapFeeAmount(O.O$.from(In),Pe.swapFee).toString()).div(10**Pe.decimalsIn)}catch(We){return console.error(`_evminGivenOut: ${We.message}`),v}}_calcTokensOutGivenExactBptIn(Pe){const He=this.tokens.filter(We=>!le(We.address,this.address)).map(We=>ne(We));try{return ji(He,Pe.toBigInt(),this.totalShares.toBigInt()).map((at,_t)=>O.O$.from(_e(at,this.tokens[_t]).toString()))}catch{return new Array(He.length).fill(v)}}_calcBptOutGivenExactTokensIn(Pe){try{const He=new Array(Pe.length).fill(BigInt(0)),We=new Array(Pe.length).fill(BigInt(0));this.tokens.filter(at=>!le(at.address,this.address)).forEach((at,_t)=>{He[_t]=pe(BigInt(Pe[_t].toString()),at),We[_t]=ne(at)});const Xe=Xi(this.amp.toBigInt(),We,He,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(Xe.toString())}catch{return d._Y}}_spotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,q.S5)(Pe.tokenOutPriceRate,18));return Tn(He.times((0,q.S5)(Pe.tokenInPriceRate,18)),Pe).div(We).times(Xe)}_spotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,q.S5)(Pe.tokenOutPriceRate,18));return Qn(He.times((0,q.S5)(Pe.tokenOutPriceRate,18)),Pe).div(We).times(Xe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenOutPriceRate,18));return Vi(He,Pe).times(We)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,q.S5)(Pe.tokenOutPriceRate,18));return ar(He,Pe).div(We).times(Xe).times(Xe)}subtractSwapFeeAmount(Pe,He){const We=Pe.mul(He).add(d.Ce.sub(1)).div(d.Ce);return Pe.sub(We)}addSwapFeeAmount(Pe,He){const We=d.Ce.sub(He);return Pe.mul(d.Ce).add(We.sub(1)).div(We)}}return Je.AMP_DECIMALS=3,Je})();function Du(Je,oe,Pe,He,We){if(He==BigInt(0))return aa(Je,We);const Xe=aa(oe,We),_t=aa(oe+Je,We)-Xe,xt=eu(Xe,Pe,We);return ae.divDown(ae.mul(He,_t),xt)}function Na(Je,oe,Pe,He,We){const Xe=aa(oe,We),_t=Xe-aa(oe-Je,We),xt=tu(Xe,Pe,We);return ae.divUp(ae.mul(He,_t),xt)}function Va(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=eu(Xe,Pe,We),xt=tu(Xe,Pe-Je,We);return He-ae.divDown(ae.mul(He,xt),at)}function Uu(Je,oe,Pe,He,We){const Xe=aa(oe,We),_t=aa(oe+Je,We)-Xe;return ae.divDownFixed(_t,We.rate)}function Eu(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=aa(oe-Je,We);return ae.divUpFixed(Xe-at,We.rate)}function jo(Je,oe,Pe,He,We){if(He==BigInt(0))return rl(Je,We);const Xe=aa(oe,We),at=eu(Xe,Pe,We);return rl(Xe+ae.divUp(ae.mul(at,Je),He),We)-oe}function yo(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=tu(Xe,Pe,We);return oe-rl(Xe-ae.divDown(ae.mul(at,Je),He),We)}function Vc(Je,oe,Pe,He,We){return oe-rl(aa(oe,We)-ae.mulDownFixed(Je,We.rate),We)}function El(Je,oe,Pe,He,We){return rl(aa(oe,We)+ae.mulUpFixed(Je,We.rate),We)-oe}function ec(Je,oe,Pe,He,We){if(He==BigInt(0))return ae.mulDownFixed(Je,We.rate);const Xe=aa(oe,We),at=eu(Xe,Pe,We),xt=tu(Xe,Pe+Je,We);return ae.divDown(ae.mul(He,xt),at)-He}function kc(Je,oe,Pe,He,We){if(He==BigInt(0))return ae.divUpFixed(Je,We.rate);const Xe=aa(oe,We),at=eu(Xe,Pe,We);return ae.divUpFixed(ae.divUp(ae.mul(He+Je,at),He)-Xe,We.rate)-Pe}function Cc(Je,oe,Pe,He,We){const Xe=aa(oe,We),at=eu(Xe,Pe,We);return Pe-ae.divUpFixed(ae.divUp(ae.mul(He-Je,at),He)-Xe,We.rate)}function eu(Je,oe,Pe){return Je+ae.mulUpFixed(oe,Pe.rate)}function tu(Je,oe,Pe){return Je+ae.mulDownFixed(oe,Pe.rate)}function aa(Je,oe){if(Je{return(Je=Sn||(Sn={}))[Je.BptToMainToken=0]="BptToMainToken",Je[Je.MainTokenToBpt=1]="MainTokenToBpt",Je[Je.MainTokenToWrappedToken=2]="MainTokenToWrappedToken",Je[Je.WrappedTokenToMainToken=3]="WrappedTokenToMainToken",Je[Je.BptToWrappedToken=4]="BptToWrappedToken",Je[Je.WrappedTokenToBpt=5]="WrappedTokenToBpt",Sn;var Je})();class rr{constructor(oe,Pe,He,We,Xe,at,_t,xt,$t,cn){this.poolType=Ce.Linear,this.MAX_RATIO=(0,q.Ox)("10",18),this.ALMOST_ONE=(0,q.Ox)("0.99",18),this.MAX_TOKEN_BALANCE=O.O$.from("2").pow("112").sub("1"),this.id=oe,this.address=Pe,this.swapFee=(0,q.Ox)(He,18),this.totalShares=(0,q.Ox)(We,18),this.tokens=Xe,this.tokensList=at,this.mainIndex=_t,this.bptIndex=this.tokensList.indexOf(this.address),this.wrappedIndex=xt,this.wrappedDecimals=this.tokens[this.wrappedIndex].decimals,this.lowerTarget=(0,q.Ox)($t,18),this.upperTarget=(0,q.Ox)(cn,18)}static fromPool(oe){if(void 0===oe.mainIndex)throw new Error("LinearPool missing mainIndex");if(void 0===oe.wrappedIndex)throw new Error("LinearPool missing wrappedIndex");if(!oe.lowerTarget)throw new Error("LinearPool missing lowerTarget");if(!oe.upperTarget)throw new Error("LinearPool missing upperTarget");return new rr(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.mainIndex,oe.wrappedIndex,oe.lowerTarget,oe.upperTarget)}parsePoolPairData(oe,Pe){let He;const We=this.tokens.find(jr=>le(jr.address,oe));if(!We)throw Error(`Pool does not contain token in ${oe}`);const Xe=We.decimals,at=(0,q.Ox)(We.balance,Xe),_t=this.tokens.find(jr=>le(jr.address,Pe));if(!_t)throw Error(`Pool does not contain token out ${Pe}`);const xt=_t.decimals,$t=(0,q.Ox)(_t.balance,xt);He=le(oe,this.address)?le(Pe,this.tokens[this.wrappedIndex].address)?Sn.BptToWrappedToken:Sn.BptToMainToken:le(Pe,this.address)?le(oe,this.tokens[this.wrappedIndex].address)?Sn.WrappedTokenToBpt:Sn.MainTokenToBpt:le(oe,this.tokens[this.wrappedIndex].address)?Sn.WrappedTokenToMainToken:Sn.MainTokenToWrappedToken;const cn=this.tokens.map(({balance:jr})=>(0,q.Ox)(jr,18)),In=cn[this.bptIndex],Rn=this.MAX_TOKEN_BALANCE.sub(In);return{id:this.id,address:this.address,poolType:this.poolType,pairType:He,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(Xe),decimalsOut:Number(xt),balanceIn:at,balanceOut:$t,swapFee:this.swapFee,wrappedBalance:N(C(this.tokens[this.wrappedIndex].balance),this.wrappedDecimals),wrappedBalanceScaled:cn[this.wrappedIndex],wrappedDecimals:this.wrappedDecimals,rate:(0,q.Ox)(this.tokens[this.wrappedIndex].priceRate,18),lowerTarget:this.lowerTarget,upperTarget:this.upperTarget,mainBalanceScaled:cn[this.mainIndex],bptBalanceScaled:In,virtualBptSupply:Rn}}getNormalizedLiquidity(oe){return D}getLimitAmountSwap(oe,Pe){const He=oe,We=N(C(oe.balanceOut.toString()),-oe.decimalsOut);return Pe===xe.SwapExactIn?He.pairType===Sn.MainTokenToBpt?this._mainTokenInForExactBPTOut(oe,We.times(this.ALMOST_ONE.toString()).div(d.Ce.toString())):He.pairType===Sn.WrappedTokenToBpt?N(C(this.MAX_TOKEN_BALANCE.toString()),-18):He.pairType===Sn.BptToMainToken?this._BPTInForExactMainTokenOut(He,We.times(this.ALMOST_ONE.toString()).div(d.Ce.toString())):He.pairType===Sn.BptToWrappedToken?this._BPTInForExactWrappedTokenOut(oe,We.times(this.ALMOST_ONE.toString()).div(d.Ce.toString())):He.pairType===Sn.MainTokenToWrappedToken||He.pairType===Sn.WrappedTokenToMainToken?N(C(oe.balanceOut.mul(this.ALMOST_ONE).div(d.Ce).toString()),-oe.decimalsOut):C(0):He.pairType===Sn.MainTokenToBpt||He.pairType===Sn.WrappedTokenToBpt?N(C(oe.balanceOut.mul(this.MAX_RATIO).div(d.Ce).toString()),-oe.decimalsOut):He.pairType===Sn.BptToMainToken||He.pairType===Sn.BptToWrappedToken||He.pairType===Sn.MainTokenToWrappedToken||He.pairType===Sn.WrappedTokenToMainToken?N(C(oe.balanceOut.mul(this.ALMOST_ONE).div(d.Ce).toString()),-oe.decimalsOut):C(0)}updateTokenBalanceForPool(oe,Pe){const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");if(le(this.address,oe)){const Xe=(0,q.Ox)(He.balance,He.decimals).sub(Pe),at=this.totalShares.add(Xe);this.updateTotalShares(at)}He.balance=(0,q.S5)(Pe,He.decimals)}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){return oe.pairType===Sn.MainTokenToBpt?this._exactMainTokenInForBPTOut(oe,Pe):oe.pairType===Sn.BptToMainToken?this._exactBPTInForMainTokenOut(oe,Pe):oe.pairType===Sn.WrappedTokenToBpt?this._exactWrappedTokenInForBPTOut(oe,Pe):oe.pairType===Sn.BptToWrappedToken?this._exactBPTInForWrappedTokenOut(oe,Pe):oe.pairType===Sn.MainTokenToWrappedToken?this._exactMainTokenInForWrappedOut(oe,Pe):oe.pairType===Sn.WrappedTokenToMainToken?this._exactWrappedTokenInForMainOut(oe,Pe):C(0)}_exactWrappedTokenInForMainOut(oe,Pe){try{return N(C(Vc((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactMainTokenInForWrappedOut(oe,Pe){try{return N(C(Uu((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactMainTokenInForBPTOut(oe,Pe){try{return N(C(Du((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactBPTInForMainTokenOut(oe,Pe){try{return N(C(yo((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactWrappedTokenInForBPTOut(oe,Pe){try{return N(C(ec((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_exactBPTInForWrappedTokenOut(oe,Pe){try{return N(C(Cc((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){return oe.pairType===Sn.MainTokenToBpt?this._mainTokenInForExactBPTOut(oe,Pe):oe.pairType===Sn.BptToMainToken?this._BPTInForExactMainTokenOut(oe,Pe):oe.pairType===Sn.WrappedTokenToBpt?this._wrappedTokenInForExactBPTOut(oe,Pe):oe.pairType===Sn.BptToWrappedToken?this._BPTInForExactWrappedTokenOut(oe,Pe):oe.pairType===Sn.MainTokenToWrappedToken?this._mainTokenInForExactWrappedOut(oe,Pe):oe.pairType===Sn.WrappedTokenToMainToken?this._wrappedTokenInForExactMainOut(oe,Pe):C(0)}_wrappedTokenInForExactMainOut(oe,Pe){try{return N(C(Eu((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_mainTokenInForExactWrappedOut(oe,Pe){try{return N(C(El((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsOut,1)}catch{return v}}_mainTokenInForExactBPTOut(oe,Pe){try{return N(C(jo((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_BPTInForExactMainTokenOut(oe,Pe){try{return N(C(Na((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_wrappedTokenInForExactBPTOut(oe,Pe){try{return N(C(kc((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_BPTInForExactWrappedTokenOut(oe,Pe){try{return N(C(Va((0,q.Ox)(Pe.toString(),18).toBigInt(),oe.mainBalanceScaled.toBigInt(),oe.wrappedBalanceScaled.toBigInt(),oe.virtualBptSupply.toBigInt(),{fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()}).toString()),-18).dp(oe.decimalsIn,0)}catch{return v}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const He=(0,q.Ox)(Pe.dp(18).toString(),18).toBigInt(),We=oe.mainBalanceScaled.toBigInt(),Xe=oe.wrappedBalanceScaled.toBigInt(),at=oe.virtualBptSupply.toBigInt(),_t={fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()};let xt;if(oe.pairType===Sn.MainTokenToBpt)xt=_o(He,We,Xe,at,_t);else if(oe.pairType===Sn.BptToMainToken)xt=Tu(He,We,Xe,at,_t);else if(oe.pairType===Sn.WrappedTokenToBpt)xt=Vu(0,We,Xe,at,_t);else if(oe.pairType===Sn.BptToWrappedToken)xt=ua(0,We,Xe,at,_t);else if(oe.pairType===Sn.MainTokenToWrappedToken)xt=na(He,We,0,0,_t);else{if(oe.pairType!==Sn.WrappedTokenToMainToken)return C(0);xt=ou(He,We,0,0,_t)}return N(C(xt.toString()),-18).dp(oe.decimalsOut,0)}catch{return C(0)}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=(0,q.Ox)(Pe.dp(18).toString(),18).toBigInt(),We=oe.mainBalanceScaled.toBigInt(),Xe=oe.wrappedBalanceScaled.toBigInt(),at=oe.virtualBptSupply.toBigInt(),_t={fee:oe.swapFee.toBigInt(),lowerTarget:oe.lowerTarget.toBigInt(),upperTarget:oe.upperTarget.toBigInt(),rate:oe.rate.toBigInt()};let xt;if(oe.pairType===Sn.MainTokenToBpt)xt=ta(He,We,Xe,at,_t);else if(oe.pairType===Sn.BptToMainToken)xt=qo(He,We,Xe,at,_t);else if(oe.pairType===Sn.WrappedTokenToBpt)xt=Pu(0,We,Xe,at,_t);else if(oe.pairType===Sn.BptToWrappedToken)xt=oc(0,We,Xe,at,_t);else if(oe.pairType===Sn.MainTokenToWrappedToken)xt=xo(He,We,0,0,_t);else{if(oe.pairType!==Sn.WrappedTokenToMainToken)return C(0);xt=Wa(He,We,0,0,_t)}return N(C(xt.toString()),-18).dp(oe.decimalsOut,0)}catch{return C(0)}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return C(0)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return C(0)}}function zs(Je,oe,Pe){let He=oe(0,E.getAddress)(jr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.decimals,at=this.tokens.findIndex(jr=>(0,E.getAddress)(jr.address)===(0,E.getAddress)(Pe));if(at<0)throw"Pool does not contain tokenOut";const _t=this.tokens[at],xt=_t.decimals,$t=(0,q.Ox)(We.balance,Xe),cn=(0,q.Ox)(_t.balance,xt);let In=$t,Rn=cn;return oe==this.principalToken?In=$t.add(this.totalShares):Pe==this.principalToken&&(Rn=cn.add(this.totalShares)),{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,principalToken:this.principalToken,baseToken:this.baseToken,decimalsIn:Number(Xe),decimalsOut:Number(xt),balanceIn:In,balanceOut:Rn,swapFee:this.swapFee,totalShares:this.totalShares,expiryTime:this.expiryTime,unitSeconds:this.unitSeconds,currentBlockTimestamp:this.currentBlockTimestamp}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){const He=(0,q.Ox)("0.3",18);if(Pe===xe.SwapExactIn){const We=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),Xe=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),at=zs(this.expiryTime,this.currentBlockTimestamp,this.unitSeconds);return C((We**(1-at)+Xe**(1-at))**(1/(1-at))-We)}return C((0,q.S5)(oe.balanceOut.mul(He).div(d.Ce),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,q.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){if(Je.isZero())return Je;const Pe=parseFloat((0,q.S5)(oe.swapFee,18)),He=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(We-(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe))-Math.abs(at-We+(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)))*Pe)}(Pe,oe)}_tokenInForExactTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){if(Je.isZero())return Je;const Pe=parseFloat((0,q.S5)(oe.swapFee,18)),He=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(-He+(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe))+Math.abs(-at-He+(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)))*Pe)}(Pe,oe)}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,q.S5)(oe.swapFee,18)),He=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(1/((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe-Math.abs(1-(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe)*Pe))}(Pe,oe)}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,q.S5)(oe.swapFee,18)),He=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)/(-at+We)**Xe+Math.abs((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)/(-at+We)**Xe-1)*Pe)}(Pe,oe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,q.S5)(oe.swapFee,18)),He=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C(-(-((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-2))*(1/(1-Xe)-1)*(1-Xe)/(at+He)**(2*Xe)-(at+He)**(-1-Xe)*(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)*Xe-Pe*Math.abs((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-2)*(1/(1-Xe)-1)*(1-Xe)/(at+He)**(2*Xe)+(at+He)**(-1-Xe)*(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)*Xe))/((He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe-Math.abs(1-(He**(1-Xe)-(at+He)**(1-Xe)+We**(1-Xe))**(1/(1-Xe)-1)/(at+He)**Xe)*Pe)**2)}(Pe,oe)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){return oe.currentBlockTimestamp=this.currentBlockTimestamp,function(Je,oe){const Pe=parseFloat((0,q.S5)(oe.swapFee,18)),He=parseFloat((0,q.S5)(oe.balanceIn,oe.decimalsIn)),We=parseFloat((0,q.S5)(oe.balanceOut,oe.decimalsOut)),Xe=zs(oe.expiryTime,oe.currentBlockTimestamp,oe.unitSeconds),at=Je.toNumber();return C((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-2)*(1/(1-Xe)-1)*(1-Xe)/(-at+We)**(2*Xe)+(-at+We)**(-1-Xe)*(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)*Xe+Pe*Math.abs((He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-2)*(1/(1-Xe)-1)*(1-Xe)/(-at+We)**(2*Xe)+(-at+We)**(-1-Xe)*(He**(1-Xe)+We**(1-Xe)-(-at+We)**(1-Xe))**(1/(1-Xe)-1)*Xe))}(Pe,oe)}}const co=C(1e3);function Vo(Je,oe){let Pe=v;const He=oe.length;for(let xt=0;xt{return(Je=Ni||(Ni={}))[Je.BptToToken=0]="BptToToken",Je[Je.TokenToBpt=1]="TokenToBpt",Je[Je.TokenToToken=2]="TokenToToken",Ni;var Je})();let Ji=(()=>{class Je{constructor(Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.MetaStable,this.ALMOST_ONE=(0,q.Ox)("0.99",18),this.id=Pe,this.address=He,this.amp=(0,q.Ox)(We,Je.AMP_DECIMALS),this.swapFee=(0,q.Ox)(Xe,18),this.totalShares=(0,q.Ox)(at,18),this.tokens=_t,this.tokensList=xt}static fromPool(Pe){if(!Pe.amp)throw new Error("PhantomStablePool missing amp factor");return new Je(Pe.id,Pe.address,Pe.amp,Pe.swapFee,Pe.totalShares,Pe.tokens,Pe.tokensList)}static removeBPT(Pe){const He=b(Pe),We=Pe.bptIndex;return-1!=We&&(He.allBalances.splice(We,1),He.allBalancesScaled.splice(We,1),We(0,E.getAddress)(Go.address)===(0,E.getAddress)(Pe));if(We<0)throw"Pool does not contain tokenIn";const Xe=this.tokens[We],at=C(Xe.balance).times(C(Xe.priceRate)).dp(Xe.decimals).toString(),_t=Xe.decimals,xt=(0,q.Ox)(Xe.priceRate,18),$t=this.tokens.findIndex(Go=>(0,E.getAddress)(Go.address)===(0,E.getAddress)(He));if($t<0)throw"Pool does not contain tokenOut";const cn=this.tokens[$t],In=C(cn.balance).times(C(cn.priceRate)).dp(cn.decimals).toString(),Rn=cn.decimals,hr=(0,q.Ox)(cn.priceRate,18),jr=this.tokens.map(({balance:Go,priceRate:Ha})=>C(Go).times(C(Ha))),ni=this.tokens.map(({balance:Go,priceRate:Ha})=>(0,q.Ox)(Go,18).mul((0,q.Ox)(Ha,18)).div(d.Ce));let Fi;Fi=le(Pe,this.address)?Ni.BptToToken:le(He,this.address)?Ni.TokenToBpt:Ni.TokenToToken;const Nr=this.tokensList.indexOf(this.address),Ci=this.totalShares,Wo={id:this.id,address:this.address,poolType:this.poolType,pairType:Fi,bptIndex:Nr,tokenIn:Pe,tokenOut:He,balanceIn:(0,q.Ox)(at,_t),balanceOut:(0,q.Ox)(In,Rn),swapFee:this.swapFee,allBalances:jr,allBalancesScaled:ni,amp:this.amp,tokenIndexIn:We,tokenIndexOut:$t,decimalsIn:Number(_t),decimalsOut:Number(Rn),tokenInPriceRate:xt,tokenOutPriceRate:hr,virtualBptSupply:Ci};return Je.removeBPT(Wo)}getNormalizedLiquidity(Pe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,v))}getLimitAmountSwap(Pe,He){return C((0,q.S5)(Pe.balanceOut.mul(this.ALMOST_ONE).div(Pe.tokenOutPriceRate),Pe.decimalsOut))}updateTokenBalanceForPool(Pe,He){const We=this.tokens.find(Xe=>le(Xe.address,Pe));if(!We)throw Error("Pool does not contain this token");if(le(this.address,Pe)){const at=(0,q.Ox)(We.balance,We.decimals).sub(He),_t=this.totalShares.add(at);this.updateTotalShares(_t)}We.balance=(0,q.S5)(He,We.decimals)}updateTotalShares(Pe){this.totalShares=Pe}_exactTokenInForTokenOut(Pe,He){try{if(He.isZero())return v;const Xe=this.subtractSwapFeeAmount((0,q.Ox)(He.dp(18).toString(),18),Pe.swapFee).mul(Pe.tokenInPriceRate).div(d.Ce);let at;if(Pe.pairType===Ni.TokenToBpt){const xt=Array(Pe.allBalancesScaled.length).fill(BigInt(0));xt[Pe.tokenIndexIn]=Xe.toBigInt(),at=Xi(this.amp.toBigInt(),Pe.allBalancesScaled.map($t=>$t.toBigInt()),xt,Pe.virtualBptSupply.toBigInt(),BigInt(0))}else at=Pe.pairType===Ni.BptToToken?go(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexOut,Xe.toBigInt(),Pe.virtualBptSupply.toBigInt(),BigInt(0)):$i(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,Xe.toBigInt(),BigInt(0));const _t=O.O$.from(at).mul(d.Ce).div(Pe.tokenOutPriceRate);return C((0,q.S5)(_t,18))}catch{return v}}_tokenInForExactTokenOut(Pe,He){try{if(He.isZero())return v;const We=(0,q.Ox)(He.dp(18).toString(),18).mul(Pe.tokenOutPriceRate).div(d.Ce);let Xe;if(Pe.pairType===Ni.TokenToBpt)Xe=$s(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,We.toBigInt(),Pe.virtualBptSupply.toBigInt(),BigInt(0));else if(Pe.pairType===Ni.BptToToken){const xt=Array(Pe.allBalancesScaled.length).fill(BigInt(0));xt[Pe.tokenIndexOut]=We.toBigInt(),Xe=is(this.amp.toBigInt(),Pe.allBalancesScaled.map($t=>$t.toBigInt()),xt,Pe.virtualBptSupply.toBigInt(),BigInt(0))}else Xe=rs(this.amp.toBigInt(),Pe.allBalancesScaled.map(xt=>xt.toBigInt()),Pe.tokenIndexIn,Pe.tokenIndexOut,We.toBigInt(),BigInt(0));const at=O.O$.from(Xe).mul(d.Ce).div(Pe.tokenInPriceRate),_t=this.addSwapFeeAmount(at,Pe.swapFee);return C((0,q.S5)(_t,18))}catch(We){return console.error(`PhantomStable _evminGivenOut: ${We.message}`),v}}_calcTokensOutGivenExactBptIn(Pe){throw new Error("PhantomPool does not have exit pool (_calcTokensOutGivenExactBptIn).")}_calcBptOutGivenExactTokensIn(Pe){throw new Error("PhantomPool does not have join pool (_calcBptOutGivenExactTokensIn).")}_spotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,q.S5)(Pe.tokenOutPriceRate,18)),at=He.times(C((0,q.S5)(Pe.tokenInPriceRate,18)));let _t;return _t=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,decimalsOut:Xe,tokenIndexIn:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=xn(xt,at,_t);let Rn=C((0,q.S5)(We,Xe));xt[at]=xt[at].plus(Je.times(In)),Rn=Rn.plus(qd(Je,oe));let hr=Ea(cn,xt,Rn,at,!0,!0,!1);return hr=C(1).div(hr.times(In)),hr}(at,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,tokenIndexOut:Xe,swapFee:at,decimalsIn:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Wc(Je,oe),Rn=xn(xt,Xe,at);let hr=C((0,q.S5)(We,_t));return xt[Xe]=xt[Xe].minus(In.div(Rn)),hr=hr.minus(Je),Ea(cn,xt,hr,Xe,!0,!1,!1).div(Rn)}(at,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1));_t[We]=_t[We].plus(Je.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),_t[Xe]=_t[Xe].minus(sa(Je,oe));let cn=nd($t,_t,We,Xe,!0,!1);return cn=k.div(cn.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),cn}(at,Pe),_t.div(We).times(Xe)}_spotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,q.S5)(Pe.tokenOutPriceRate,18)),at=He.times((0,q.S5)(Pe.tokenOutPriceRate,18));let _t;return _t=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,tokenIndexIn:Xe,decimalsOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Po(Je,oe),Rn=xn(xt,Xe,_t);xt[Xe]=xt[Xe].plus(In.times(Rn));let hr=C((0,q.S5)(We,at));hr=hr.plus(Je);let jr=Ea(cn,xt,hr,Xe,!0,!0,!0);return jr=k.div(jr.times(Rn)),jr}(at,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,virtualBptSupply:We,decimalsIn:Xe,tokenIndexOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=xn(xt,at,_t);xt[at]=xt[at].minus(Je.div(In));let Rn=C((0,q.S5)(We,Xe));return Rn=Rn.minus(Hu(Je,oe)),Ea(cn,xt,Rn,at,!0,!1,!0).div(In)}(at,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1)),cn=nu(Je,oe).times(d.Ce.sub(at).toString()).div(d.Ce.toString());_t[We]=_t[We].plus(cn),_t[Xe]=_t[Xe].minus(Je);let In=nd($t,_t,We,Xe,!0,!0);return In=k.div(In.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),In}(at,Pe),_t.div(We).times(Xe)}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenOutPriceRate,18)),Xe=He.times((0,q.S5)(Pe.tokenInPriceRate,18));let at;return at=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,balanceOut:We,decimalsOut:Xe,tokenIndexIn:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=xn(xt,at,_t);xt[at]=xt[at].plus(Je.times(In));let Rn=C((0,q.S5)(We,Xe));return Rn=Rn.plus(qd(Je,oe)),Ea(cn,xt,Rn,at,!1,!0,!1)}(Xe,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,balanceIn:We,decimalsIn:Xe,tokenIndexOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Wc(Je,oe),Rn=xn(xt,at,_t);xt[at]=xt[at].minus(In.div(Rn));let hr=C((0,q.S5)(We,Xe));return hr=hr.minus(Je),Ea(cn,xt,hr,at,!1,!1,!1).div(Rn)}(Xe,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1));return _t[We]=_t[We].plus(Je.times(d.Ce.sub(at).toString()).div(d.Ce.toString())),_t[Xe]=_t[Xe].minus(sa(Je,oe)),nd($t,_t,We,Xe,!1,!1)}(Xe,Pe),at.times(We)}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(Pe,He){const We=C((0,q.S5)(Pe.tokenInPriceRate,18)),Xe=C((0,q.S5)(Pe.tokenOutPriceRate,18)),at=He.times((0,q.S5)(Pe.tokenOutPriceRate,18));let _t;return _t=Pe.pairType===Ni.TokenToBpt?function(Je,oe){const{amp:Pe,allBalances:He,balanceOut:We,decimalsOut:Xe,tokenIndexIn:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Po(Je,oe),Rn=xn(xt,at,_t);xt[at]=xt[at].plus(In.times(Rn));let hr=C((0,q.S5)(We,Xe));return hr=hr.plus(Je),Ea(cn,xt,hr,at,!1,!0,!0).div(Rn)}(at,Pe):Pe.pairType===Ni.BptToToken?function(Je,oe){const{amp:Pe,allBalances:He,balanceIn:We,decimalsIn:Xe,tokenIndexOut:at,swapFee:_t}=oe,xt=[...He],$t=xt.length,cn=Pe.div($t**($t-1)),In=Hu(Je,oe),Rn=xn(xt,at,_t);xt[at]=xt[at].minus(Je.div(Rn));let hr=C((0,q.S5)(We,Xe));return hr=hr.minus(In),Ea(cn,xt,hr,at,!1,!1,!0).div(Rn.pow(2))}(at,Pe):function(Je,oe){const{amp:Pe,allBalances:He,tokenIndexIn:We,tokenIndexOut:Xe,swapFee:at}=oe,_t=[...He],xt=_t.length,$t=Pe.div(xt**(xt-1)),cn=C((0,q.S5)(at,18)),In=nu(Je,oe).times(C(1).minus(cn));_t[We]=_t[We].plus(In),_t[Xe]=_t[Xe].minus(Je);const Rn=C(1).minus(cn);return nd($t,_t,We,Xe,!1,!0).div(Rn)}(at,Pe),_t.div(We).times(Xe).times(Xe)}subtractSwapFeeAmount(Pe,He){const We=Pe.mul(He).add(d.Ce.sub(1)).div(d.Ce);return Pe.sub(We)}addSwapFeeAmount(Pe,He){const We=d.Ce.sub(He);return Pe.mul(d.Ce).add(We.sub(1)).div(We)}}return Je.AMP_DECIMALS=3,Je})();class lo extends Ji{constructor(oe,Pe,He,We,Xe,at,_t){super(oe,Pe,He,We,Xe,at,_t)}static fromPool(oe){if(!oe.amp)throw new Error("ComposableStablePool missing amp factor");return new lo(oe.id,oe.address,oe.amp,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList)}_exactTokenInForTokenOut(oe,Pe){try{if(Pe.isZero())return v;const He=(0,q.Ox)(Pe.dp(18).toString(),18).mul(oe.tokenInPriceRate).div(d.Ce);let We;if(oe.pairType===Ni.TokenToBpt){const at=Array(oe.allBalancesScaled.length).fill(BigInt(0));at[oe.tokenIndexIn]=He.toBigInt(),We=Xi(this.amp.toBigInt(),oe.allBalancesScaled.map(_t=>_t.toBigInt()),at,oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt())}else We=oe.pairType===Ni.BptToToken?go(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexOut,He.toBigInt(),oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt()):$i(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexIn,oe.tokenIndexOut,He.toBigInt(),oe.swapFee.toBigInt());const Xe=O.O$.from(We).mul(d.Ce).div(oe.tokenOutPriceRate);return C((0,q.S5)(Xe,18)).dp(oe.decimalsOut)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){try{if(Pe.isZero())return v;const He=(0,q.Ox)(Pe.dp(18).toString(),18).mul(oe.tokenOutPriceRate).div(d.Ce);let We;if(oe.pairType===Ni.TokenToBpt)We=$s(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexIn,He.toBigInt(),oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt());else if(oe.pairType===Ni.BptToToken){const at=Array(oe.allBalancesScaled.length).fill(BigInt(0));at[oe.tokenIndexOut]=He.toBigInt(),We=is(this.amp.toBigInt(),oe.allBalancesScaled.map(_t=>_t.toBigInt()),at,oe.virtualBptSupply.toBigInt(),oe.swapFee.toBigInt())}else We=rs(this.amp.toBigInt(),oe.allBalancesScaled.map(at=>at.toBigInt()),oe.tokenIndexIn,oe.tokenIndexOut,He.toBigInt(),oe.swapFee.toBigInt());const Xe=O.O$.from(We).mul(d.Ce).div(oe.tokenInPriceRate);return C((0,q.S5)(Xe,18)).dp(oe.decimalsOut)}catch(He){return console.error(`PhantomStable _evminGivenOut: ${He.message}`),v}}_calcTokensOutGivenExactBptIn(oe){const Pe=this.tokens.filter(We=>!le(We.address,this.address)),He=Pe.map(We=>ne(We));try{return ji(He,oe.toBigInt(),this.totalShares.toBigInt()).map((at,_t)=>_e(at,Pe[_t])).map(at=>O.O$.from(at))}catch{return new Array(He.length).fill(v)}}_calcBptOutGivenExactTokensIn(oe){try{const Pe=new Array(oe.length).fill(BigInt(0)),He=new Array(oe.length).fill(BigInt(0));this.tokens.filter(Xe=>!le(Xe.address,this.address)).forEach((Xe,at)=>{Pe[at]=pe(BigInt(oe[at].toString()),Xe),He[at]=ne(Xe)});const We=Xi(this.amp.toBigInt(),He,Pe,this.totalShares.toBigInt(),this.swapFee.toBigInt());return O.O$.from(We.toString())}catch(Pe){return console.error(Pe),d._Y}}}const qs=O.O$.from("316227766016837933"),Ka=O.O$.from("31622776601683793"),Ko=O.O$.from("3162277660168379"),dl=O.O$.from("316227766016837"),Gc=O.O$.from("31622776601683"),Rc=O.O$.from("3162277660168"),Ki=O.O$.from("316227766016"),ga=O.O$.from("31622776601"),Ur=O.O$.from("3162277660"),ca=O.O$.from(10).pow(38),wf=O.O$.from(10).pow(8),ra=O.O$.from("999999000000000000");function fu(Je,oe){return Je.mul(oe).sub(1).div(d.Ce).add(1)}function ka(Je,oe){return Je.mul(d.Ce).sub(1).div(oe).add(1)}function Dr(Je,oe){return Je.mul(oe).div(d.Ce)}function Eo(Je,oe){return Je.mul(d.Ce).div(oe)}function Io(Je,oe){return Je.mul(oe).div(ca)}function Ho(Je,oe){if(oe.isZero())throw new Error("ZERO DIVISION");return Je.mul(ca).div(oe)}function $o(Je,oe){return Je.mul(oe).div(d.Ce)}function oa(Je,oe){if(oe.isZero())throw new Error("ZERO DIVISION");return Je.mul(d.Ce).div(oe)}function Bo(Je,oe){const Pe=Je.mul(oe);return Pe.gt(0)?Pe.sub(1).div(d.Ce).add(1):Pe.lt(0)?Pe.add(1).div(d.Ce).sub(1):O.O$.from(0)}function xf(Je,oe){if(oe.isZero())throw new Error("ZERO DIVISION");return oe.lt(0)&&(oe=oe.mul(-1),Je=Je.mul(-1)),Je.isZero()?O.O$.from(0):Je.gt(0)?Je.mul(d.Ce).sub(1).div(oe).add(1):Je.mul(d.Ce).add(1).div(oe.sub(1))}function la(Je,oe){const Pe=O.O$.from(10).pow(19),He=oe.div(Pe),We=oe.isNegative()?oe.mul(-1).mod(Pe).mul(-1):oe.mod(Pe),Xe=Je.mul(He),at=Je.mul(We);return Xe.lte(0)&&at.lte(0)?Xe.add(at.div(Pe)).div(Pe):Xe.add(at.div(Pe)).sub(1).div(Pe).add(1)}function tc(Je,oe){const Pe=O.O$.from(10).pow(19),He=oe.div(Pe),We=oe.isNegative()?oe.mul(-1).mod(Pe).mul(-1):oe.mod(Pe),Xe=Je.mul(He),at=Je.mul(We);return Xe.gte(0)&&at.gte(0)?Xe.add(at.div(Pe)).div(Pe):Xe.add(at.div(Pe)).add(1).div(Pe).sub(1)}function fc(Je,oe){if(Je.isZero())return O.O$.from(0);let Pe=function(Je){return Je.gte(d.Ce)?O.O$.from(2).pow(function(Je){let oe=0;for(let Pe=128;Pe>=2;Pe/=2){const He=O.O$.from(2).pow(Pe);Je.gte(He)&&(Je=Je.div(He),oe+=Pe/2)}return oe}(Je.div(d.Ce))).mul(d.Ce):Je.lte("10")?Ur:Je.lte("100")?O.O$.from("10000000000"):Je.lte("1000")?ga:Je.lte("10000")?O.O$.from("100000000000"):Je.lte("100000")?Ki:Je.lte("1000000")?O.O$.from("1000000000000"):Je.lte("10000000")?Rc:Je.lte("100000000")?O.O$.from("10000000000000"):Je.lte("1000000000")?Gc:Je.lte("10000000000")?O.O$.from("100000000000000"):Je.lte("100000000000")?dl:Je.lte("1000000000000")?O.O$.from("1000000000000000"):Je.lte("10000000000000")?Ko:Je.lte("100000000000000")?O.O$.from("10000000000000000"):Je.lte("1000000000000000")?Ka:Je.lte("10000000000000000")?O.O$.from("100000000000000000"):Je.lte("100000000000000000")?qs:Je}(Je);for(const We of new Array(7).fill(0))Pe=Pe.add(Je.mul(d.Ce).div(Pe)).div(2);const He=Pe.mul(Pe).div(d.Ce);if(!He.lte(Je.add(fu(Pe,oe)))||!He.gte(Je.sub(fu(Pe,oe))))throw new Error("GyroEPool: sqrt failed");return Pe}var e0=Object.freeze({__proto__:null,mulUp:fu,divUp:ka,mulDown:Dr,divDown:Eo,mulXpU:Io,divXpU:Ho,mulDownMagU:$o,divDownMagU:oa,mulUpMagU:Bo,divUpMagU:xf,mulUpXpToNpU:la,mulDownXpToNpU:tc,sqrt:fc});function Nc(Je,oe,Pe){return[Eo(Je,Pe),Dr(Je,oe)]}function Kd(Je,oe,Pe){const[He,We,Xe,at]=Fh(Je,oe,Pe);return hl(He,We,Xe,at)}function Fh(Je,oe,Pe){const He=d.Ce.sub(Eo(oe,Pe)),We=Eo(Je[1],Pe),Xe=Dr(Je[0],oe),at=We.add(Xe),_t=Dr(Je[0],Je[1]);let xt=Dr(Dr(Dr(Je[0],Je[0]),oe),oe);const $t=Eo(Dr(Dr(Dr(Je[0],Je[1]),d.Ce.mul(2)),oe),Pe),cn=Eo(Dr(Je[1],Je[1]),fu(Pe,Pe));return xt=xt.add($t).add(cn),[He,at,xt,_t]}function hl(Je,oe,Pe,He){const We=fu(Je,d.Ce.mul(2)),Xe=Dr(Dr(He,d.Ce.mul(4)),Je),_t=fc(Pe.add(Xe),O.O$.from(5));return Eo(oe.add(_t),We)}function mh(Je,oe,Pe,He,We){const Xe=Je.add(fu(He,d.Ce.add(2))),at=oe.add(Dr(We,d.Ce.sub(1))),_t=Eo(Dr(at,Pe),Xe.add(Pe));if(_t.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");return _t}function dd(Je,oe,Pe,He,We){if(Pe.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");const Xe=Je.add(fu(He,d.Ce.add(2))),at=oe.add(Dr(We,d.Ce.sub(1)));return ka(fu(Xe,Pe),at.sub(Pe))}function Tl(Je,oe,Pe,He,We,Xe){const at=d.Ce.sub(Xe);return Eo(Je[0].add(He).add(Dr(at,oe)),Dr(at,Je[1].add(We).sub(Pe)))}function Ff(Je,oe,Pe){return Eo(O.O$.from(2).mul(d.Ce),Je[1].add(Pe).sub(oe))}function gh(Je,oe,Pe,He,We,Xe){const at=O.O$.from(2).mul(d.Ce),_t=d.Ce.sub(Xe),$t=Je[0].add(He).add(Dr(_t,oe)),cn=Je[1].add(We),In=Dr(cn.sub(Pe),cn.sub(Pe));return Dr(Eo(at,_t),Eo($t,In))}var Uh=Object.freeze({__proto__:null,_findVirtualParams:Nc,_calculateInvariant:Kd,_calculateQuadraticTerms:Fh,_calculateQuadratic:hl,_calcOutGivenIn:mh,_calcInGivenOut:dd,_calculateNewSpotPrice:Tl,_derivativeSpotPriceAfterSwapExactTokenInForTokenOut:Ff,_derivativeSpotPriceAfterSwapTokenInForExactTokenOut:gh,_getNormalizedLiquidity:function(Je,oe){return Je[1].add(oe).div(2)}});function Hc(Je,oe){const Pe=oe.map(He=>(0,q.Ox)("1",He));return Je.map((He,We)=>He.mul(d.Ce).div(Pe[We]))}function fd(Je,oe){const Pe=Je.mul(oe).div(d.Ce);return Je.sub(Pe)}function Ca(Je,oe){return Je.mul(d.Ce).div(d.Ce.sub(oe))}var Or=Object.freeze({__proto__:null,_normalizeBalances:Hc,_reduceFee:fd,_addFee:Ca});class Ti{constructor(oe,Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.Gyro2,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.sqrtAlpha=X(_t,18),this.sqrtBeta=X(xt,18)}static fromPool(oe){if(!oe.sqrtAlpha||!oe.sqrtBeta)throw new Error("Pool missing Gyro2 sqrtAlpha and/or sqrtBeta params");return new Ti(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.sqrtAlpha,oe.sqrtBeta)}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals,In=0===He;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:X(Xe,at),balanceOut:X($t,cn),swapFee:this.swapFee,sqrtAlpha:In?this.sqrtAlpha:Eo(d.Ce,this.sqrtBeta),sqrtBeta:In?this.sqrtBeta:Eo(d.Ce,this.sqrtAlpha)}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),_t=Dr(Kd(We,oe.sqrtAlpha,oe.sqrtBeta),Eo(d.Ce,oe.sqrtAlpha).sub(Eo(d.Ce,oe.sqrtBeta))).sub(We[0]),xt=Eo(_t,d.Ce.sub(oe.swapFee));return C((0,q.S5)(Dr(xt,ra),18))}return C((0,q.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,q.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){try{const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=Kd(We,oe.sqrtAlpha,oe.sqrtBeta),[at,_t]=Nc(Xe,oe.sqrtAlpha,oe.sqrtBeta),$t=fd(X(Pe.toString(),18),oe.swapFee),cn=mh(We[0],We[1],$t,at,_t);return C((0,q.S5)(cn,18))}catch{return C(0)}}_tokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),Xe=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),at=Kd(Xe,oe.sqrtAlpha,oe.sqrtBeta),[_t,xt]=Nc(at,oe.sqrtAlpha,oe.sqrtBeta),cn=Ca(dd(Xe[0],Xe[1],He,_t,xt),oe.swapFee);return C((0,q.S5)(cn,18))}catch{return C(0)}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=Kd(We,oe.sqrtAlpha,oe.sqrtBeta),[at,_t]=Nc(Xe,oe.sqrtAlpha,oe.sqrtBeta),xt=X(Pe.toString(),18),$t=fd(xt,oe.swapFee),In=Tl(We,xt,mh(We[0],We[1],$t,at,_t),at,_t,oe.swapFee);return C((0,q.S5)(In,18))}catch{return C(0)}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),Xe=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),at=Kd(Xe,oe.sqrtAlpha,oe.sqrtBeta),[_t,xt]=Nc(at,oe.sqrtAlpha,oe.sqrtBeta),In=Tl(Xe,Ca(dd(Xe[0],Xe[1],He,_t,xt),oe.swapFee),He,_t,xt,oe.swapFee);return C((0,q.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const We=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=Kd(We,oe.sqrtAlpha,oe.sqrtBeta),[at,_t]=Nc(Xe,oe.sqrtAlpha,oe.sqrtBeta),$t=fd(X(Pe.toString(),18),oe.swapFee),In=Ff(We,mh(We[0],We[1],$t,at,_t),_t);return C((0,q.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),Xe=Hc([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),at=Kd(Xe,oe.sqrtAlpha,oe.sqrtBeta),[_t,xt]=Nc(at,oe.sqrtAlpha,oe.sqrtBeta),In=gh(Xe,Ca(dd(Xe[0],Xe[1],He,_t,xt),oe.swapFee),He,_t,xt,oe.swapFee);return C((0,q.S5)(In,18))}catch{return C(0)}}}const ii=O.O$.from(10).pow(29).mul(487),to=O.O$.from(10).pow(9);function Ia(Je,oe){const[Pe,He,We,Xe]=jh(Je,oe);return Lt(Pe,He,We,Xe,oe)}function jh(Je,oe){const Pe=Dr(oe,oe),He=Dr(Pe,oe),We=d.Ce.sub(He),at=Dr(Dr(Je[0].add(Je[1]).add(Je[2]),oe),oe),_t=Dr(Je[0],Je[1]).add(Dr(Je[1],Je[2])).add(Dr(Je[2],Je[0]));return[We,at,Dr(_t,oe),Dr(Dr(Je[0],Je[1]),Je[2])]}function Lt(Je,oe,Pe,He,We){let Xe=en(Je,oe,Pe);return Xe=Dn(Je,oe,Pe,He,We,Xe),Xe}function en(Je,oe,Pe){const He=fu(oe,oe).add(fu(fu(Je,Pe),d.Ce.mul(3)));return fu(ka(oe,Je.mul(3)).add(ka(fc(He,O.O$.from(5)),Je.mul(3))),d.Ce.sub(Je).gte(d.Ce.div(2))?d.Ce.mul(3).div(2):d.Ce.mul(2))}function Dn(Je,oe,Pe,He,We,Xe){let at=O.O$.from(0);for(let _t=0;_t<255;++_t){const[xt,$t]=cr(0,oe,Pe,He,We,Xe);if(xt.lte(1)||_t>=5&&$t||_t>=5&&xt.gte(at.div(O.O$.from(8))))return Xe;at=xt,Xe=$t?Xe.add(xt):Xe.sub(xt)}throw new Error("Gyro3Pool: Newton Method did not converge on required invariant")}function cr(Je,oe,Pe,He,We,Xe){let at=O.O$.from(0);at=Dr(Xe,Xe).mul(3),at=at.sub(Dr(Dr(Dr(at,We),We),We)),at=at.sub(Dr(Xe,oe).mul(2)).sub(Pe);const xt=function(Je,oe,Pe){let He=O.O$.from(0);if(Je.lte(ii))He=Je.mul(Je).div(d.Ce).mul(Je).div(d.Ce),He=He.sub(He.mul(oe).div(d.Ce).mul(oe).div(d.Ce).mul(oe).div(d.Ce)),He=He.mul(d.Ce).div(Pe);else{He=Je.mul(Je).div(d.Ce),He=He.mul(Je.div(d.Ce)).add(He.mul(Je.mod(d.Ce)).div(d.Ce));let We=He;for(let Xe=0;Xe<3;Xe++)We=We.mul(oe.div(to)).div(to).add(We.mul(oe.mod(to)));He=He.sub(We),He=He.mul(to).div(Pe.div(to))}return He}(Xe,We,at);let $t=Dr(Dr(Xe,Xe),oe);$t=Eo($t.add(Dr(Xe,Pe)),at),$t=$t.add(Eo(He,at));const cn=$t.gte(xt);return[cn?$t.sub(xt):xt.sub($t),cn]}function Gr(Je,oe,Pe,He){const We=Je.add(fu(He,d.Ce.add(2))),at=oe.add(Dr(He,d.Ce.sub(1))).mul(Pe).div(We.add(Pe));if(at.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");return at}function Bi(Je,oe,Pe,He){if(Pe.gt(oe))throw new Error("ASSET_BOUNDS_EXCEEDED");const We=Je.add(fu(He,d.Ce.add(2))),Xe=oe.add(Dr(He,d.Ce.sub(1)));return ka(fu(We,Pe),Xe.sub(Pe))}function Ai(Je,oe,Pe,He,We){const Xe=d.Ce.sub(We);return Eo(Je[0].add(He).add(Dr(Xe,oe)),Dr(Xe,Je[1].add(He).sub(Pe)))}function gi(Je,oe,Pe){return Eo(O.O$.from(2).mul(d.Ce),Je[1].add(Pe).sub(oe))}function Bs(Je,oe,Pe,He,We){const Xe=O.O$.from(2).mul(d.Ce),at=d.Ce.sub(We),xt=Je[0].add(He).add(Dr(at,oe)),$t=Je[1].add(He),cn=Dr($t.sub(Pe),$t.sub(Pe));return Dr(Eo(Xe,at),Eo(xt,cn))}var ha=Object.freeze({__proto__:null,_calculateInvariant:Ia,_calculateCubicTerms:jh,_calculateCubic:Lt,_calculateCubicStartingPoint:en,_runNewtonIteration:Dn,_calcNewtonDelta:cr,_calcOutGivenIn:Gr,_calcInGivenOut:Bi,_calculateNewSpotPrice:Ai,_derivativeSpotPriceAfterSwapExactTokenInForTokenOut:gi,_derivativeSpotPriceAfterSwapTokenInForExactTokenOut:Bs,_getNormalizedLiquidity:function(Je,oe){return Je[1].add(oe).div(2)}});class Fo{constructor(oe,Pe,He,We,Xe,at,_t){this.poolType=Ce.Gyro3,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.root3Alpha=X(_t,18)}static findToken(oe,Pe,He){const We=oe.find(Xe=>(0,E.getAddress)(Xe.address)===(0,E.getAddress)(Pe));if(!We)throw new Error(He);return We}static fromPool(oe){if(!oe.root3Alpha)throw new Error("Pool missing root3Alpha");if(X(oe.root3Alpha,18).lte(0)||X(oe.root3Alpha,18).gte(d.Ce))throw new Error("Invalid root3Alpha parameter");if(3!==oe.tokens.length)throw new Error("Gyro3Pool must contain three tokens only");return new Fo(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.root3Alpha)}parsePoolPairData(oe,Pe){const He=Fo.findToken(this.tokens,oe,"Pool does not contain tokenIn"),We=He.balance,Xe=He.decimals,at=Fo.findToken(this.tokens,Pe,"Pool does not contain tokenOut"),_t=at.balance,xt=at.decimals,$t=this.tokens.find(hr=>(0,E.getAddress)(hr.address)!==(0,E.getAddress)(Pe)&&(0,E.getAddress)(hr.address)!==(0,E.getAddress)(oe));if(!$t)throw new Error("Pool does not contain a valid third token");const cn=$t.balance,In=$t.decimals;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(Xe),decimalsOut:Number(xt),decimalsTertiary:Number(In),balanceIn:X(We,Xe),balanceOut:X(_t,xt),balanceTertiary:X(cn,In),swapFee:this.swapFee}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),$t=Eo(Dr(Xe[0].add(_t),Xe[1].add(_t)),_t).sub(_t).sub(Xe[0]),cn=Eo($t,d.Ce.sub(oe.swapFee));return C((0,q.S5)(Dr(cn,ra),18))}return C((0,q.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,q.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){try{const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),$t=fd(X(Pe.toString(),18),oe.swapFee),cn=Gr(Xe[0],Xe[1],$t,_t);return C((0,q.S5)(cn,18))}catch{return C(0)}}_tokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),at=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),xt=Dr(Ia(at,this.root3Alpha),this.root3Alpha),cn=Ca(Bi(at[0],at[1],He,xt),oe.swapFee);return C((0,q.S5)(cn,18))}catch{return C(0)}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),xt=X(Pe.toString(),18),$t=fd(xt,oe.swapFee),In=Ai(Xe,xt,Gr(Xe[0],Xe[1],$t,_t),_t,oe.swapFee);return C((0,q.S5)(In,18))}catch{return C(0)}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),at=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),xt=Dr(Ia(at,this.root3Alpha),this.root3Alpha),In=Ai(at,Ca(Bi(at[0],at[1],He,xt),oe.swapFee),He,xt,oe.swapFee);return C((0,q.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const Xe=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),_t=Dr(Ia(Xe,this.root3Alpha),this.root3Alpha),$t=fd(X(Pe.toString(),18),oe.swapFee),In=gi(Xe,Gr(Xe[0],Xe[1],$t,_t),_t);return C((0,q.S5)(In,18))}catch{return C(0)}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),at=Hc([oe.balanceIn,oe.balanceOut,oe.balanceTertiary],[oe.decimalsIn,oe.decimalsOut,oe.decimalsTertiary]),xt=Dr(Ia(at,this.root3Alpha),this.root3Alpha),In=Bs(at,Ca(Bi(at[0],at[1],He,xt),oe.swapFee),He,xt,oe.swapFee);return C((0,q.S5)(In,18))}catch{return C(0)}}}const Sa=O.O$.from(10).pow(34),Zo=O.O$.from(10).pow(37).mul(3);function Ma(Je,oe){const Pe=Dr(Je,oe);return Je.sub(Pe)}function $u(Je,oe){return Eo(Je,d.Ce.sub(oe))}function vu(Je,oe){const Pe=oe.map(He=>(0,q.Ox)("1",He));return Je.map((He,We)=>He.mul(d.Ce).div(Pe[We]))}function au(Je,oe,Pe){return Pe?[Je,oe]:[oe,Je]}function Mc(Je,oe,Pe,He,We){if(0===We){const Xe=function(Je,oe,Pe){const He=Ho(oe.tauBeta.x.sub(oe.tauAlpha.x),oe.dSq),We=Ho(oe.tauBeta.y.sub(oe.tauAlpha.y),oe.dSq);let Xe=tc($o($o(Pe.y,Je.lambda),Je.c),He);return Xe=Xe.add(We.gt(O.O$.from(0))?$o(Pe.y,Je.s):tc(Bo(Pe.x,Je.s),We)),Xe}(Je,oe,Pe);if(He.gt(Sa)||He.gt(Xe))throw new Error("ASSET BOUNDS EXCEEDED")}else{const Xe=function(Je,oe,Pe){const He=Ho(oe.tauBeta.x.sub(oe.tauAlpha.x),oe.dSq),We=Ho(oe.tauBeta.y.sub(oe.tauAlpha.y),oe.dSq);let Xe=tc($o($o(Pe.y,Je.lambda),Je.s),He);return Xe=Xe.add(We.gt(O.O$.from(0))?$o(Pe.y,Je.c):tc(Bo(Pe.x,Je.c),We)),Xe}(Je,oe,Pe);if(He.gt(Sa)||He.gt(Xe))throw new Error("ASSET BOUNDS EXCEEDED")}}function b1(Je,oe,Pe,He){const We={x:hd(oe,Pe,He),y:Ad(oe,Pe,He)};return Vh(oe.lambda,Je,oe.s,oe.c,He,We,Pe.tauBeta,Pe.dSq)}function yh(Je,oe,Pe,He){const We={x:Ad(oe,Pe,He),y:hd(oe,Pe,He)};return Vh(oe.lambda,Je,oe.c,oe.s,He,We,{x:Pe.tauAlpha.x.mul(-1),y:Pe.tauAlpha.y},Pe.dSq)}function hd(Je,oe,Pe,He){const We=He?oe.tauAlpha:oe.tauBeta,Xe=Ho(We.x,oe.dSq);let at=We.x.gt(O.O$.from(0))?la(Bo(Bo(Pe.x,Je.lambda),Je.c),Xe):la($o($o(Pe.y,Je.lambda),Je.c),Xe);return at=at.add(la(Bo(Pe.x,Je.s),Ho(We.y,oe.dSq))),at}function Ad(Je,oe,Pe,He){const We=He?oe.tauBeta:oe.tauAlpha,Xe=Ho(We.x,oe.dSq);let at=We.x.lt(O.O$.from(0))?la(Bo(Bo(Pe.x,Je.lambda),Je.s),Xe.mul(-1)):la($o($o(Pe.y.mul(-1),Je.lambda),Je.s),Xe);return at=at.add(la(Bo(Pe.x,Je.c),Ho(We.y,oe.dSq))),at}function Vh(Je,oe,Pe,He,We,Xe,at,_t){const xt={x:ca.sub(oa(oa(ca,Je),Je)),y:ca.sub(xf(xf(ca,Je),Je))},$t={a:O.O$.from(0),b:O.O$.from(0),c:O.O$.from(0)},cn=oe.sub(Xe.x);$t.b=cn.gt(O.O$.from(0))?la($o($o(cn.mul(-1),Pe),He),Ho(xt.y,_t)):la(Bo(Bo(cn.mul(-1),Pe),He),Ho(xt.x,_t).add(1));const In={x:Ho($o($o(xt.y,Pe),Pe),_t),y:Ho(Bo(Bo(xt.x,Pe),Pe),_t.add(1)).add(1)};return In.x=ca.sub(In.x),In.y=ca.sub(In.y),$t.c=j0(oe,We,Je,Pe,He,at,_t).mul(-1),$t.c=$t.c.add(tc($o(We.y,We.y),In.y)),$t.c=$t.c.gt(O.O$.from(0))?fc($t.c,O.O$.from(5)):O.O$.from(0),$t.a=$t.b.sub($t.c).gt(O.O$.from(0))?la($t.b.sub($t.c),Ho(ca,In.y).add(1)):la($t.b.sub($t.c),Ho(ca,In.x)),$t.a.add(Xe.y)}function j0(Je,oe,Pe,He,We,Xe,at){const _t={x:Io(at,at),y:Bo(oe.x,oe.x)},xt={a:O.O$.from(0),b:O.O$.from(0),c:O.O$.from(0)};let $t=Ho(Io(Xe.x,Xe.y),_t.x);return $t.gt(O.O$.from(0))?(xt.a=Bo(_t.y,He.mul(2)),xt.a=la(Bo(xt.a,We),$t.add(7))):(xt.a=$o($o(oe.y,oe.y),He.mul(2)),xt.a=la($o(xt.a,We),$t)),xt.b=Xe.x.lt(O.O$.from(0))?la(Bo(Bo(oe.x,Je),We.mul(2)),Ho(Xe.x,at).mul(-1).add(3)):la($o($o(oe.y.mul(-1),Je),We.mul(2)),Ho(Xe.x,at)),xt.a=xt.a.add(xt.b),$t=Ho(Io(Xe.y,Xe.y),_t.x).add(7),xt.b=Bo(_t.y,He),xt.b=la(Bo(xt.b,He),$t),xt.c=la($o($o(oe.y.mul(-1),Je),He.mul(2)),Ho(Xe.y,at)),xt.b=xt.b.add(xt.c).add(Bo(Je,Je)),xt.b=xt.b.gt(O.O$.from(0))?xf(xt.b,Pe):oa(xt.b,Pe),xt.a=xt.a.add(xt.b),xt.a=xt.a.gt(O.O$.from(0))?xf(xt.a,Pe):oa(xt.a,Pe),$t=Ho(Io(Xe.x,Xe.x),_t.x).add(7),la(Bo(Bo(_t.y,We),We),$t).add(xt.a)}function lf(Je,oe,Pe,He){const We={x:hd(oe,Pe,He),y:Ad(oe,Pe,He)};return Hh(oe.lambda,Je,oe.s,oe.c,He,We,Pe.tauBeta,Pe.dSq)}function bh(Je,oe,Pe,He){const We={x:Ad(oe,Pe,He),y:hd(oe,Pe,He)};return Hh(oe.lambda,Je,oe.c,oe.s,He,We,{x:Pe.tauAlpha.x.mul(-1),y:Pe.tauAlpha.y},Pe.dSq)}function Hh(Je,oe,Pe,He,We,Xe,at,_t){const xt={x:ca.sub(oa(oa(ca,Je),Je)),y:ca.sub(xf(xf(ca,Je),Je))},$t={a:O.O$.from(0),b:O.O$.from(0),c:O.O$.from(0)},cn=oe.sub(Xe.x);$t.b=la($o(Pe,He),Ho(xt.y,_t));const In={x:Ho($o($o(xt.y,Pe),Pe),_t),y:Ho(Bo(Bo(xt.x,Pe),Pe),_t.add(1)).add(1)};return In.x=ca.sub(In.x),In.y=ca.sub(In.y),$t.c=j0(oe,We,Je,Pe,He,at,_t).mul(-1),$t.c=$t.c.add(tc($o(We.y,We.y),In.y)),$t.c=$t.c.gt(O.O$.from(0))?fc($t.c,O.O$.from(5)):O.O$.from(0),$t.c=Dr(Dr($t.c,Je),Je),$t.c=Eo(cn,$t.c),$t.a=$t.b.sub($t.c).gt(O.O$.from(0))?la($t.b.sub($t.c),Ho(ca,In.y).add(1)):la($t.b.sub($t.c),Ho(ca,In.x)),$t.a}function nc(Je,oe,Pe,He,We,Xe){const at=We.y,{c:_t,s:xt,lambda:$t}=oe,[cn,In]=Je,Rn=hd(oe,Pe,We),hr=Ad(oe,Pe,We),jr=d.Ce.sub(Eo(d.Ce,Dr($t,$t))),ni=d.Ce.sub(He);let Fi;return Fi=fc(0===Xe?Dr(Dr(at,at),d.Ce.sub(Dr(jr,Dr(xt,xt)))).sub(Eo(Dr(cn.sub(Rn),cn.sub(Rn)),Dr($t,$t))):Dr(Dr(at,at),d.Ce.sub(Dr(jr,Dr(_t,_t)))).sub(Eo(Dr(In.sub(hr),In.sub(hr)),Dr($t,$t))),O.O$.from(5)),{x0:cn,y0:In,c:_t,s:xt,lambda:$t,a:Rn,b:hr,ls:jr,f:ni,r:at,R:Fi}}function Al(Je,oe,Pe,He,We){const{y0:Xe,c:at,s:_t,lambda:xt,b:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,1);return Eo(Dr(Eo(d.Ce,d.Ce.sub(Dr(cn,Dr(at,at)))),Dr(In,Dr(Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t)),Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t))))),Dr(Dr(xt,xt),Dr(In,In)).add(Dr(Xe.sub($t),Xe.sub($t))))}function V0(Je,oe,Pe,He,We){const{x0:Xe,c:at,s:_t,lambda:xt,a:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,0);return Eo(Dr(Eo(d.Ce,d.Ce.sub(Dr(cn,Dr(_t,_t)))),Dr(In,Dr(Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t)),Dr(Dr(Dr(Dr(cn,_t),at),Dr(xt,xt)),In).sub(Xe.sub($t))))),Dr(Dr(xt,xt),Dr(In,In)).add(Dr(Xe.sub($t),Xe.sub($t))))}function v1(Je,oe,Pe,He,We){const{x0:Xe,c:at,s:_t,lambda:xt,a:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,0);return Eo(Dr(d.Ce.sub(Dr(cn,Dr(_t,_t))),Eo(d.Ce,Dr(Dr(xt,xt),In)).add(Eo(Dr(Xe.sub($t),Xe.sub($t)),Dr(Dr(Dr(xt,xt),Dr(xt,xt)),Dr(In,Dr(In,In)))))),Dr(Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In))),Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In)))))}function df(Je,oe,Pe,He,We){const{y0:Xe,c:at,s:_t,lambda:xt,b:$t,ls:cn,R:In}=nc(Je,oe,Pe,He,We,1);return Eo(Dr(d.Ce.sub(Dr(cn,Dr(at,at))),Eo(d.Ce,Dr(Dr(xt,xt),In)).add(Eo(Dr(Xe.sub($t),Xe.sub($t)),Dr(Dr(Dr(xt,xt),Dr(xt,xt)),Dr(In,Dr(In,In)))))),Dr(Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In))),Dr(Dr(cn,_t),at).sub(Eo(Xe.sub($t),Dr(Dr(xt,xt),In)))))}function Zd(Je,oe,Pe,He,We){const{x0:Xe,s:at,lambda:_t,a:xt,ls:$t,R:cn,f:In}=nc(Je,oe,Pe,He,We,0);return Dr(Eo(d.Ce,Dr(In,d.Ce.sub(Dr($t,Dr(at,at))))),Eo(d.Ce,Dr(Dr(_t,_t),cn)).add(Eo(Dr(Xe.sub(xt),Xe.sub(xt)),Dr(Dr(Dr(_t,_t),Dr(_t,_t)),Dr(Dr(cn,cn),cn)))))}function Qs(Je,oe,Pe,He,We){const{y0:Xe,c:at,lambda:_t,b:xt,ls:$t,R:cn,f:In}=nc(Je,oe,Pe,He,We,1);return Dr(Eo(d.Ce,Dr(In,d.Ce.sub(Dr($t,Dr(at,at))))),Eo(d.Ce,Dr(Dr(_t,_t),cn)).add(Eo(Dr(Xe.sub(xt),Xe.sub(xt)),Dr(Dr(Dr(_t,_t),Dr(_t,_t)),Dr(Dr(cn,cn),cn)))))}var t0=Object.freeze({__proto__:null,calcSpotPriceYGivenX:lf,calcSpotPriceXGivenY:bh,normalizedLiquidityYIn:Al,normalizedLiquidityXIn:V0,dPyDXIn:v1,dPxDYIn:df,dPxDXOut:Zd,dPyDYOut:Qs});function hc(Je,oe,Pe){const[He,We]=Je;if(He.add(We).gt(Sa))throw new Error("MAX ASSETS EXCEEDED");const Xe=function(Je,oe,Pe,He){const We=Io(He.dSq,He.dSq),Xe=Ho(oa(oa(He.w,Pe.lambda).add(He.z),Pe.lambda),We);let at=tc($o(Je,Pe.c).sub($o(oe,Pe.s)),Xe),_t=$o($o(Je,Pe.lambda),Pe.s).add($o($o(oe,Pe.lambda),Pe.c));return at=at.add(tc(_t,Ho(He.u,We))),_t=$o(Je,Pe.s).add($o(oe,Pe.c)),at=at.add(tc(_t,Ho(He.v,We))),at}(He,We,oe,Pe),at=function(Je,oe,Pe,He){let We=function(Je,oe,Pe,He){let We=Bo(Bo(Bo(Je,Je),Pe.c),Pe.c).add(Bo(Bo(Bo(oe,oe),Pe.s),Pe.s));We=We.sub($o($o($o(Je,oe),Pe.c.mul(2)),Pe.s));const Xe=Io(He.u,He.u).add(oa(Io(He.u.mul(2),He.v),Pe.lambda)).add(oa(oa(Io(He.v,He.v),Pe.lambda),Pe.lambda));let at=tc(We.mul(-1),Xe);return at=at.add(tc(oa(oa(We.sub(9),Pe.lambda),Pe.lambda),Ho(ca,He.dSq))),at}(Je,oe,Pe,He).add(function(Je,oe,Pe,He){let We=$o($o($o(Je,Je).sub(Bo(oe,oe)),Pe.c.mul(2)),Pe.s);const Xe=$o(oe,Je.mul(2));We=We.add($o($o(Xe,Pe.c),Pe.c)).sub($o($o(Xe,Pe.s),Pe.s));let at=Io(He.z,He.u).add(oa(oa(Io(He.w,He.v),Pe.lambda),Pe.lambda));return at=at.add(oa(Io(He.w,He.u).add(Io(He.z,He.v)),Pe.lambda)),at=Ho(at,Io(Io(Io(He.dSq,He.dSq),He.dSq),He.dSq)),tc(We,at)}(Je,oe,Pe,He));We=We.add(function(Je,oe,Pe,He){let We=Bo(Bo(Bo(Je,Je),Pe.s),Pe.s).add(Bo(Bo(Bo(oe,oe),Pe.c),Pe.c));We=We.add(Bo(Bo(Bo(Je,oe),Pe.s.mul(2)),Pe.c));let Xe=Io(He.z,He.z).add(oa(oa(Io(He.w,He.w),Pe.lambda),Pe.lambda));Xe=Xe.add(oa(Io(He.z.mul(2),He.w),Pe.lambda)),Xe=Ho(Xe,Io(Io(Io(He.dSq,He.dSq),He.dSq),He.dSq));let at=tc(We.mul(-1),Xe);return at=at.add(tc(We.sub(9),Ho(ca,He.dSq))),at}(Je,oe,Pe,He));const Xe=Bo(Je,Je).add(Bo(oe,oe)).div(ca);return We=We.gt(0)?fc(We,O.O$.from(5)):O.O$.from(0),[We,Xe]}(He,We,oe,Pe),_t=at[0];let xt=at[1];xt=_t.gt(0)?xf(xt.add(1),_t.mul(2)):xt.gt(0)?fc(xt,O.O$.from(5)):O.O$.from(10).pow(9),xt=Bo(oe.lambda,He.add(We)).div(ca).add(xt).add(1).mul(20);const $t=Ho(ca,function(Je,oe){const Pe=Io(Io(oe.dSq,oe.dSq),oe.dSq);let He=Bo(Je.lambda,Ho(Io(oe.u.mul(2),oe.v),Pe));He=He.add(Bo(Bo(Ho(Io(oe.u.add(1),oe.u.add(1)),Pe),Je.lambda),Je.lambda)),He=He.add(Ho(Io(oe.v,oe.v),Pe));const We=xf(oe.w,Je.lambda).add(oe.z);return He=He.add(Ho(Io(We,We),Pe)),He}(oe,Pe).sub(ca)),cn=tc(Xe.add(_t).sub(xt),$t);if(xt=la(xt,$t),xt=xt.add(la(cn,$t).mul(oe.lambda.mul(oe.lambda).div(O.O$.from(10).pow(36))).mul(40).div(ca)).add(1),cn.add(xt).gt(Zo))throw new Error("MAX INVARIANT EXCEEDED");return[cn,xt]}function n0(Je,oe,Pe,He,We,Xe){if(oe.lt(wf))return O.O$.from(0);const at=Number(!Pe),_t=Number(Pe),xt=Pe?b1:yh,$t=Je[at].add(oe);Mc(He,We,Xe,$t,at);const cn=xt($t,He,We,Xe),In=Je[_t].sub(cn);if(In.lt(0))throw new Error("ASSET BOUNDS EXCEEDED 1");return In}function H0(Je,oe,Pe,He,We,Xe){if(oe.lt(wf))return O.O$.from(0);const at=Number(!Pe),_t=Number(Pe),xt=Pe?yh:b1;if(oe.gt(Je[_t]))throw new Error("ASSET BOUNDS EXCEEDED 2");const cn=xt(Je[_t].sub(oe),He,We,Xe);Mc(He,We,Xe,cn,at);const In=cn.sub(Je[at]);if(In.lt(0))throw new Error("ASSET BOUNDS EXCEEDED 3");return In}function ac(Je,oe,Pe,He,We,Xe,at){const _t=Number(!Pe),xt=d.Ce.sub(at),In=(Pe?lf:bh)(Je[_t].add(oe),He,We,Xe);return Eo(d.Ce,Dr(In,xt))}function Id(Je,oe,Pe,He,We,Xe,at){const _t=Number(Pe),xt=d.Ce.sub(at);return Eo((Pe?bh:lf)(Je[_t].sub(oe),He,We,Xe),xt)}function Au(Je,oe,Pe,He,We,Xe){return Number(!oe)?df(Je,Pe,He,Xe,We):v1(Je,Pe,He,Xe,We)}function x0(Je,oe,Pe,He,We,Xe){return Number(!oe)?Zd(Je,Pe,He,Xe,We):Qs(Je,Pe,He,Xe,We)}var Sd=Object.freeze({__proto__:null,calculateNormalizedLiquidity:function(Je,oe,Pe,He,We,Xe){return Xe?V0(Je,oe,Pe,We,He):Al(Je,oe,Pe,We,He)},calculateInvariantWithError:hc,calcOutGivenIn:n0,calcInGivenOut:H0,calcSpotPriceAfterSwapOutGivenIn:ac,calcSpotPriceAfterSwapInGivenOut:Id,calcDerivativePriceAfterSwapOutGivenIn:Au,calcDerivativeSpotPriceAfterSwapInGivenOut:x0});class r0{constructor(oe,Pe,He,We,Xe,at,_t,xt){this.poolType=Ce.GyroE,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.gyroEParams={alpha:X(_t.alpha,18),beta:X(_t.beta,18),c:X(_t.c,18),s:X(_t.s,18),lambda:X(_t.lambda,18)},this.derivedGyroEParams={tauAlpha:{x:X(xt.tauAlphaX,38),y:X(xt.tauAlphaY,38)},tauBeta:{x:X(xt.tauBetaX,38),y:X(xt.tauBetaY,38)},u:X(xt.u,38),v:X(xt.v,38),w:X(xt.w,38),z:X(xt.z,38),dSq:X(xt.dSq,38)}}static fromPool(oe){const{alpha:Pe,beta:He,c:We,s:Xe,lambda:at,tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni}=oe,Fi={alpha:Pe,beta:He,c:We,s:Xe,lambda:at},Nr={tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni};if(!Object.values(Fi).every(Ci=>Ci)||!Object.values(Nr).every(Ci=>Ci))throw new Error("Pool missing GyroE params and/or GyroE derived params");return new r0(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,Fi,Nr)}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals,In=0===He;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:X(Xe,at),balanceOut:X($t,cn),swapFee:this.swapFee,tokenInIsToken0:In}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const He=vu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},xt=oe.tokenInIsToken0?hd:Ad,In=Eo(xt(this.gyroEParams,this.derivedGyroEParams,_t).sub(xt(this.gyroEParams,this.derivedGyroEParams,_t,!0)).sub(He[0]),d.Ce.sub(oe.swapFee));return C((0,q.S5)(Dr(In,ra),18))}return C((0,q.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,q.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){const He=vu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},cn=n0(We,Ma(X(Pe.toString(),18),oe.swapFee),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t);return C((0,q.S5)(cn,18))}_tokenInForExactTokenOut(oe,Pe){const He=vu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},cn=$u(H0(We,X(Pe.toString(),18),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t),oe.swapFee);return C((0,q.S5)(cn,18))}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){const He=vu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},cn=ac(We,Ma(X(Pe.toString(),18),oe.swapFee),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t,oe.swapFee);return C((0,q.S5)(cn,18))}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){const He=vu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},$t=Id(We,X(Pe.toString(),18),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t,oe.swapFee);return C((0,q.S5)($t,18))}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){const He=X(Pe.toString(),18),We=vu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=Au([Xe[0].add(Ma(He,oe.swapFee)),Xe[1]],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee);return C((0,q.S5)($t,18))}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){const He=vu([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut]),We=au(He[0],He[1],oe.tokenInIsToken0),[Xe,at]=hc(We,this.gyroEParams,this.derivedGyroEParams),_t={x:Xe.add(at.mul(2)),y:Xe},xt=X(Pe.toString(),18),$t=x0([We[0],We[1].sub(xt)],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,_t,oe.swapFee);return C((0,q.S5)($t,18))}}function Yd(Je,oe,Pe){const He=oe.map(We=>(0,q.Ox)("1",We));return Je.map((We,Xe)=>Dr(We.mul(d.Ce).div(He[Xe]),Pe[Xe]))}const kd=au;class ql{constructor(oe,Pe,He,We,Xe,at,_t,xt,$t){this.poolType=Ce.GyroE,this.id=oe,this.address=Pe,this.swapFee=X(He,18),this.totalShares=X(We,18),this.tokens=Xe,this.tokensList=at,this.tokenRates=[X($t[0],18),X($t[1],18)],this.gyroEParams={alpha:X(_t.alpha,18),beta:X(_t.beta,18),c:X(_t.c,18),s:X(_t.s,18),lambda:X(_t.lambda,18)},this.derivedGyroEParams={tauAlpha:{x:X(xt.tauAlphaX,38),y:X(xt.tauAlphaY,38)},tauBeta:{x:X(xt.tauBetaX,38),y:X(xt.tauBetaY,38)},u:X(xt.u,38),v:X(xt.v,38),w:X(xt.w,38),z:X(xt.z,38),dSq:X(xt.dSq,38)}}static fromPool(oe){const{alpha:Pe,beta:He,c:We,s:Xe,lambda:at,tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni,tokenRates:Fi}=oe,Nr={alpha:Pe,beta:He,c:We,s:Xe,lambda:at},Ci={tauAlphaX:_t,tauAlphaY:xt,tauBetaX:$t,tauBetaY:cn,u:In,v:Rn,w:hr,z:jr,dSq:ni};if(!Object.values(Nr).every(Wo=>Wo)||!Object.values(Ci).every(Wo=>Wo))throw new Error("Pool missing GyroE params and/or GyroE derived params");if(!Fi)throw new Error("GyroEV2 Pool missing tokenRates");return new ql(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,Nr,Ci,Fi)}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(hr=>(0,E.getAddress)(hr.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals,In=0===He;return{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:X(Xe,at),balanceOut:X($t,cn),swapFee:this.swapFee,tokenInIsToken0:In}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){if(Pe===xe.SwapExactIn){const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=oe.tokenInIsToken0?hd:Ad,In=Eo($t(this.gyroEParams,this.derivedGyroEParams,xt).sub($t(this.gyroEParams,this.derivedGyroEParams,xt,!0)).sub(We[0]),He[0]),Rn=Eo(In,d.Ce.sub(oe.swapFee));return C((0,q.S5)(Dr(Rn,ra),18))}return C((0,q.S5)(Dr(oe.balanceOut,ra),oe.decimalsOut))}updateTokenBalanceForPool(oe,Pe){if(le(this.address,oe))this.updateTotalShares(Pe);else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,q.S5)(Pe,He.decimals)}}updateTotalShares(oe){this.totalShares=oe}_exactTokenInForTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=X(Pe.toString(),18),hr=Eo(n0(Xe,Dr(Ma($t,oe.swapFee),He[0]),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt),He[1]);return C((0,q.S5)(hr,18))}catch{return v}}_tokenInForExactTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=X(Pe.toString(),18),hr=$u(Eo(H0(Xe,Dr($t,He[1]),oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt),He[0]),oe.swapFee);return C((0,q.S5)(hr,18))}catch{return v}}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},In=Dr(Ma(X(Pe.toString(),18),oe.swapFee),He[0]),hr=Eo(Dr(ac(Xe,In,oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee),He[1]),He[0]);return C((0,q.S5)(hr,18))}catch{return v}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},cn=Dr(X(Pe.toString(),18),He[1]),Rn=Eo(Dr(Id(Xe,cn,oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee),He[1]),He[0]);return C((0,q.S5)(Rn,18))}catch{return v}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{const He=X(Pe.toString(),18),We=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),Xe=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],We),at=au(Xe[0],Xe[1],oe.tokenInIsToken0),[_t,xt]=hc(at,this.gyroEParams,this.derivedGyroEParams),$t={x:_t.add(xt.mul(2)),y:_t},cn=Au([at[0].add(Ma(Dr(He,We[0]),oe.swapFee)),at[1]],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,$t,oe.swapFee),In=Dr(cn,We[1]);return C((0,q.S5)(In,18))}catch{return v}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{const He=kd(this.tokenRates[0],this.tokenRates[1],oe.tokenInIsToken0),We=Yd([oe.balanceIn,oe.balanceOut],[oe.decimalsIn,oe.decimalsOut],He),Xe=au(We[0],We[1],oe.tokenInIsToken0),[at,_t]=hc(Xe,this.gyroEParams,this.derivedGyroEParams),xt={x:at.add(_t.mul(2)),y:at},$t=X(Pe.toString(),18),cn=x0([Xe[0],Xe[1].sub(Dr($t,He[1]))],oe.tokenInIsToken0,this.gyroEParams,this.derivedGyroEParams,xt,oe.swapFee),In=Eo(Dr(He[1],He[1]),He[0]),Rn=Dr(cn,In);return C((0,q.S5)(Rn,18))}catch{return v}}}const Ef=Je=>C(((BigInt((0,q.Ox)(Je,18).toString())+1n<<64n)/10n**18n*10n**36n>>64n).toString()).div(C(10).pow(18)).decimalPlaces(3,M.ROUND_UP),mn=(0,q.Ox)("1",36),$0=(0,q.Ox)("1",18),Cd=C(10).pow(36),sd=(0,q.Ox)("-0.000001000000000000024",36),_u=(0,q.Ox)("10000000000000",36),pd=(0,q.Ox)("0.25",36);var fo=(()=>{return(Je=fo||(fo={})).LowerHalt="CurveMath/lower-halt",Je.UpperHalt="CurveMath/upper-halt",Je.SwapInvariantViolation="CurveMath/swap-invariant-violation",Je.SwapConvergenceFailed="CurveMath/swap-convergence-failed",Je.CannotSwap="CannotSwap",fo;var Je})();const ff=Je=>"0x2791bca1f2de4661ed88a30c99a7a9449aa84174"==Je||"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"==Je||"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"==Je,_1=Je=>{const oe=Vf(X(Je.balanceIn.toString(),36),Je.decimalsIn,Je.tokenInLatestFXPrice,Je.tokenInfxOracleDecimals),Pe=Vf(X(Je.balanceOut.toString(),36),Je.decimalsOut,Je.tokenOutLatestFXPrice,Je.tokenOutfxOracleDecimals);return{tokenInReservesInNumeraire_36:oe,tokenOutReservesInNumeraire_36:Pe,_oGLiq_36:oe.add(Pe)}},yp=(Je,oe,Pe)=>{const He=ff(oe.tokenIn)?Vf(X(oe.balanceOut.toString(),36),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals):Vf(X(oe.balanceIn.toString(),36),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals),We=ff(oe.tokenIn)?Vf(X(oe.balanceIn.toString(),36),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals):Vf(X(oe.balanceOut.toString(),36),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals),Xe=ff(oe.tokenIn)?oe.tokenOutLatestFXPrice.mul(mn).div(X("1",oe.tokenOutfxOracleDecimals)):oe.tokenInLatestFXPrice.mul(mn).div(X("1",oe.tokenInfxOracleDecimals)),at=((Je,oe,Pe)=>{let He;return He=Je?Vf(X(Pe.toString(),oe.decimalsIn),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals):Vf(X(Pe.toString(),oe.decimalsOut),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals),He})(Pe,oe,Je);return{alpha_36:X(oe.alpha.toString(),18),beta_36:(0,q.Ox)(oe.beta.toString(),18),delta_36:(0,q.Ox)(oe.delta.toString(),18),epsilon_36:(0,q.Ox)(oe.epsilon.toString(),18),lambda_36:(0,q.Ox)(oe.lambda.toString(),18),baseTokenRate_36:Xe,_oGLiq_36:He.add(We),_nGLiq_36:He.add(We),_oBals_36:[We,He],_nBals_36:ff(oe.tokenIn)?[We.add(at),He.sub(at)]:[We.sub(at),He.add(at)],givenAmountInNumeraire_36:at}},$h=(Je,oe,Pe,He)=>X(Je.toString(),oe).div(mn).mul(X("1",He)).mul(mn).div(X(Pe.toString(),36)),Vf=(Je,oe,Pe,He)=>Je.mul(X(Pe.toString(),36)).div(mn).div(mn).div(X("1",He)).mul(mn).div(X("1",oe)),hf=(Je,oe,Pe,He)=>{let We,Xe,at=O.O$.from(0);return Je.lt(oe)?(We=oe.mul(mn.sub(Pe)).div(mn),Je.lt(We)?(Xe=We.sub(Je),at=Xe.mul(mn).div(oe),at=at.mul(He).div(mn),at.gt(pd)&&(at=pd),at=at.mul(Xe).div(mn)):at=O.O$.from(0)):(We=oe.mul(Pe.add(mn)).div(mn),Je.gt(We)?(Xe=Je.sub(We),at=Xe.mul(mn).div(oe),at=at.mul(He).div(mn),at.gt(pd)&&(at=pd),at=at.mul(Xe).div(mn)):at=O.O$.from(0)),at},pf=(Je,oe,Pe,He,We)=>{const Xe=oe.length;let at=O.O$.from(0);for(let _t=0;_t{const _t=[X("0.5",36),X("0.5",36)],xt=at.alpha_36,$t=at.beta_36,cn=at.delta_36,In=at.lambda_36;let Rn=We.mul(-1);const hr=pf(Je,Pe,$t,cn,_t);let jr;for(let ni=0;ni<32;ni++){jr=pf(oe,He,$t,cn,_t);const Fi=Rn;if(Rn=hr.lt(jr)?We.add(hr.sub(jr)).mul(-1):We.add(In.mul(hr.sub(jr)).div(mn)).mul(-1),Rn.mul(mn).div(_u).eq(Fi.mul(mn).div(_u)))return oe=Je.add(We).add(Rn),He[Xe]=Pe[Xe].add(Rn),tm(Je,oe,Pe,He,_t,xt),Kp(Je,hr,oe,jr),[Rn,oe];oe=Je.add(We).add(Rn),He[Xe]=Pe[Xe].add(Rn)}throw new Error(fo.SwapConvergenceFailed)},tm=(Je,oe,Pe,He,We,Xe)=>{const at=He.length;for(let _t=0;_t{const We=Pe.sub(He),Xe=Je.sub(oe),at=We.sub(Xe);if(at.gt(0)||at.gte(sd))return!0;throw new Error(fo.SwapInvariantViolation)};function o0(Je,oe){const Pe=yp(X(Je.toString(),36),oe,!0),He=Pe.givenAmountInNumeraire_36;if(oe.tokenIn===oe.tokenOut)return C($h(He,oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsIn));const xt=Md(Pe._oGLiq_36,Pe._nGLiq_36,Pe._oBals_36,Pe._nBals_36,He,ff(oe.tokenIn)?1:0,Pe);if(void 0===xt)throw new Error(fo.CannotSwap);{const cn=xt[0].mul(mn.sub(Pe.epsilon_36)).div(mn);return C($h(cn.abs(),oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsOut))}}function Zp(Je,oe){const Pe=yp(X(Je.toString(),36),oe,!1),He=Pe.givenAmountInNumeraire_36.mul(-1);oe.tokenIn===oe.tokenOut&&C($h(He,oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsOut));const We=Md(Pe._oGLiq_36,Pe._nGLiq_36,Pe._oBals_36,Pe._nBals_36,He,ff(oe.tokenIn)?0:1,Pe);if(void 0===We)throw new Error(fo.CannotSwap);{const Xe=X(oe.epsilon.toString(),18),at=We[0].mul(mn.add(Xe)).div(mn);return C($h(at.abs(),oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsIn))}}const Iu=(Je,oe)=>{const Pe=yp(Je,oe,!0);return C(Md(Pe._oGLiq_36,Pe._nGLiq_36,Pe._oBals_36,Pe._nBals_36,(0,q.Ox)("1",36),0,Pe)[0].abs().mul(mn.sub(Pe.epsilon_36)).div(mn).mul(Pe.baseTokenRate_36).div(mn).toString()).div(Cd)},Tf=(Je,oe)=>{const Pe=X(oe.toString(),36),He=yp(Pe,Je,!0),We=He.givenAmountInNumeraire_36,Xe=He._oGLiq_36,at=He._nBals_36,_t=He.baseTokenRate_36,xt=He.beta_36,$t=He.epsilon_36,hr=Md(Xe,He._nGLiq_36,He._oBals_36,at,We,ff(Je.tokenIn)?1:0,He)[0],jr=xt.add(mn).div(2).mul(Xe).div(mn),ni=mn.sub(xt).div(2).mul(Xe).div(mn);if(ff(Je.tokenIn)){const Fi=at[0];return at[1].lt(ni)&&Fi.gt(jr)?oe.isZero()?Iu(Pe,Je):C(hr.mul(mn.sub($t)).abs().div(We.abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.mul(mn.sub($t)).div(mn).toString()).div(Cd)}{const Fi=at[1];return at[0].lt(ni)&&Fi.gt(jr)?oe.isZero()?Iu(Pe,Je):C(hr.mul(mn.sub($t)).abs().div(We.abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.toString()).div(mn.toString()).times(C(1).minus(C($t.toString()).div(Cd)))}},E0=(Je,oe)=>{const Pe=X(oe.toString(),36),He=yp(Pe,Je,!1),We=He.givenAmountInNumeraire_36.mul(-1),Xe=He._oGLiq_36,at=He._nBals_36,_t=He.baseTokenRate_36,xt=He.beta_36,$t=He.epsilon_36,hr=Md(Xe,He._nGLiq_36,He._oBals_36,at,We,ff(Je.tokenIn)?0:1,He)[0],jr=xt.add(mn).div(2).mul(Xe).div(mn),ni=mn.sub(xt).div(2).mul(Xe).div(mn);if(ff(Je.tokenIn)){const Fi=at[0];return at[1].lt(ni)&&Fi.gt(jr)?C(We.abs().mul(mn).div(hr.mul($t.add(mn)).div(mn).abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.mul(mn.sub($t)).div(mn).toString()).div(Cd)}{const Nr=at[1],Ci=at[0].lt(ni),Wo=Nr.gt(jr);return Ci&&Wo?C(We.abs().mul(mn).div(hr.mul($t.add(mn)).div(mn).abs()).mul(_t).div(mn).toString()).div(Cd):C(_t.mul(mn.sub($t)).div(mn).toString()).div(Cd)}},W0=(Je,oe)=>{const Pe=Iu((0,q.Ox)("1",36),oe),Xe=Tf(oe,Je).minus(Pe).div(Pe);return Xe.isZero()?C(1).div($0.toString()):Xe.abs()},Af=(Je,oe)=>{const Pe=Iu((0,q.Ox)("1",36),oe);return E0(oe,Je).minus(Pe).div(Pe).abs()};var Od=Object.freeze({__proto__:null,ONE_36:mn,ONE_18:$0,OLD_ONE_36:Cd,CURVEMATH_MAX_DIFF_36:sd,ONE_TO_THE_THIRTEEN_NUM_36:_u,get CurveMathRevert(){return fo},poolBalancesToNumeraire:_1,viewRawAmount:$h,viewNumeraireAmount:Vf,_exactTokenInForTokenOut:o0,_tokenInForExactTokenOut:Zp,spotPriceBeforeSwap:Iu,_spotPriceAfterSwapExactTokenInForTokenOut:Tf,_spotPriceAfterSwapTokenInForExactTokenOut:E0,_derivativeSpotPriceAfterSwapExactTokenInForTokenOut:W0,_derivativeSpotPriceAfterSwapTokenInForExactTokenOut:Af});class ol{constructor(oe,Pe,He,We,Xe,at,_t,xt,$t,cn,In){this.poolType=Ce.Fx,this.id=oe,this.address=Pe,this.swapFee=(0,q.Ox)(He,18),this.totalShares=(0,q.Ox)(We,18),this.tokens=Xe,this.tokensList=at,this.alpha=Ef(_t),this.beta=Ef(xt),this.lambda=Ef($t),this.delta=C((0,q.Ox)(cn,18).toString()),this.epsilon=Ef(In)}static fromPool(oe){if(!(oe.alpha&&oe.beta&&oe.lambda&&oe.delta&&oe.epsilon))throw new Error("FX Pool Missing Subgraph Field");return new ol(oe.id,oe.address,oe.swapFee,oe.totalShares,oe.tokens,oe.tokensList,oe.alpha,oe.beta,oe.lambda,oe.delta,oe.epsilon)}_calcTokensOutGivenExactBptIn(oe){return new Array(this.tokens.length).fill(d._Y)}_calcBptOutGivenExactTokensIn(oe){return d._Y}parsePoolPairData(oe,Pe){const He=this.tokens.findIndex(Rn=>(0,E.getAddress)(Rn.address)===(0,E.getAddress)(oe));if(He<0)throw"Pool does not contain tokenIn";const We=this.tokens[He],Xe=We.balance,at=We.decimals,_t=this.tokens.findIndex(Rn=>(0,E.getAddress)(Rn.address)===(0,E.getAddress)(Pe));if(_t<0)throw"Pool does not contain tokenOut";const xt=this.tokens[_t],$t=xt.balance,cn=xt.decimals;if(!xt.token?.latestFXPrice||!We.token?.latestFXPrice)throw"FX Pool Missing LatestFxPrice";return null==xt.token?.fxOracleDecimals&&(xt.token.fxOracleDecimals=8),null==We.token?.fxOracleDecimals&&(We.token.fxOracleDecimals=8),{id:this.id,address:this.address,poolType:this.poolType,tokenIn:oe,tokenOut:Pe,decimalsIn:Number(at),decimalsOut:Number(cn),balanceIn:(0,q.Ox)(Xe,at),balanceOut:(0,q.Ox)($t,cn),swapFee:this.swapFee,alpha:this.alpha,beta:this.beta,lambda:this.lambda,delta:this.delta,epsilon:this.epsilon,tokenInLatestFXPrice:(0,q.Ox)(We.token.latestFXPrice,We.token.fxOracleDecimals),tokenOutLatestFXPrice:(0,q.Ox)(xt.token.latestFXPrice,xt.token.fxOracleDecimals),tokenInfxOracleDecimals:We.token.fxOracleDecimals,tokenOutfxOracleDecimals:xt.token.fxOracleDecimals}}getNormalizedLiquidity(oe){return bn(this._derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,v))}getLimitAmountSwap(oe,Pe){return this._inHigherPrecision(this._getLimitAmountSwap,oe,Pe)}_getLimitAmountSwap(oe,Pe){try{const He=_1(oe),Xe=X(oe.alpha.toString(),18).add(mn).mul(He._oGLiq_36).div(mn).div(2);if(Pe===xe.SwapExactIn){const at=Xe.sub(He.tokenInReservesInNumeraire_36.toString());return C($h(at,oe.decimalsIn,oe.tokenInLatestFXPrice,oe.tokenInfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsIn))}{const at=Xe.sub(He.tokenOutReservesInNumeraire_36);return C($h(at,oe.decimalsOut,oe.tokenOutLatestFXPrice,oe.tokenOutfxOracleDecimals).toString()).div(C(10).pow(oe.decimalsOut))}}catch{return v}}updateTokenBalanceForPool(oe,Pe){if(this.address==oe)this.totalShares=Pe;else{const He=this.tokens.find(We=>le(We.address,oe));if(!He)throw Error("Pool does not contain this token");He.balance=(0,q.S5)(Pe,He.decimals)}}_exactTokenInForTokenOut(oe,Pe){try{return this._inHigherPrecision(o0,Pe,oe)}catch{return v}}_tokenInForExactTokenOut(oe,Pe){try{return this._inHigherPrecision(Zp,Pe,oe)}catch{return v}}_spotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{return this._inHigherPrecision(Tf,oe,Pe)}catch{return v}}_spotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{return this._inHigherPrecision(E0,oe,Pe)}catch{return v}}_derivativeSpotPriceAfterSwapExactTokenInForTokenOut(oe,Pe){try{return this._inHigherPrecision(W0,Pe,oe)}catch{return v}}_derivativeSpotPriceAfterSwapTokenInForExactTokenOut(oe,Pe){try{return this._inHigherPrecision(Af,Pe,oe)}catch{return v}}_inHigherPrecision(oe,...Pe){const He=M.config({}).DECIMAL_PLACES;M.config({DECIMAL_PLACES:36});try{const We=oe.apply(this,Pe);return M.config({DECIMAL_PLACES:He}),We}catch(We){throw M.config({DECIMAL_PLACES:He}),We}}}function vh(Je,oe=0){if(!Je.swapEnabled)return;let Pe;try{const He=Je.poolType.toString().includes("Linear");if(!He&&!(Je.poolType in ke))return void console.error(`Unsupported pool type: ${Je.poolType} ${Je.id}`);if("Weighted"===Je.poolType||"Investment"===Je.poolType)Pe=Kn.fromPool(Je,!1);else if("LiquidityBootstrapping"===Je.poolType)Pe=Kn.fromPool(Je,!0);else if("Stable"===Je.poolType)Pe=ja.fromPool(Je);else if("MetaStable"===Je.poolType)Pe=xa.fromPool(Je);else if("Element"===Je.poolType)Pe=Rs.fromPool(Je),Pe.setCurrentBlockTimestamp(oe);else if(He)Pe=rr.fromPool(Je);else if("StablePhantom"===Je.poolType)Pe=Ji.fromPool(Je);else if("ComposableStable"===Je.poolType)Pe=lo.fromPool(Je);else if("Gyro2"===Je.poolType)Pe=Ti.fromPool(Je);else if("Gyro3"===Je.poolType)Pe=Fo.fromPool(Je);else if("GyroE"===Je.poolType)Pe=2===Je.poolTypeVersion?ql.fromPool(Je):r0.fromPool(Je);else{if("FX"!==Je.poolType)return void console.error(`Unknown pool type or type field missing: ${Je.poolType} ${Je.id}`);Pe=ol.fromPool(Je)}}catch(He){return void console.error(`parseNewPool: ${He.message}`)}return Pe}function mf(Je,oe,Pe,He){return Pe===xe.SwapExactIn?oe.poolType!==Ce.Linear&&oe.balanceIn.isZero()?v:Je._exactTokenInForTokenOut(oe,He):oe.balanceOut.isZero()?v:N(He,oe.decimalsOut).gte(oe.balanceOut.toString())?D:Je._tokenInForExactTokenOut(oe,He)}let pl="0.00001";try{pl=process.env.PRICE_ERROR_TOLERANCE||"0.00001"}catch(Je){console&&console.log(Je)}const Yp=new M(pl),md=new M("0.01"),If=C("0.000000000000000001");function Il(Je,oe,Pe,He){if(Pe.gt(C((0,q.S5)(Je.limitAmount,He))))return oe===xe.SwapExactIn?v:D;const We=Wh(Je,oe,Pe);return oe===xe.SwapExactIn?We[We.length-1]:We[0]}function Wh(Je,oe,Pe){const He=Je.pools,We=Je.poolPairData,Xe=[Pe];if(oe===xe.SwapExactIn)for(let at=0;at{let[_t,xt]=Sl(Je,oe,He,We,Xe,at),$t=He;if(1===He.length)return{swapAmounts:$t,paths:_t};const cn=C((0,q.S5)(Pe,We));let In=_t;const Rn=[];let hr=JSON.stringify(In.map(({id:jr})=>jr).sort());for(;!Rn.includes(hr)&&(Rn.push(hr),_t=In,[$t,xt]=u0(_t,oe,cn,$t,xt),[In,xt]=Sl(Je,oe,$t,We,Xe,at),0!==In.length);){const jr=In.map(({id:ni})=>ni).sort();hr=JSON.stringify(jr)}return{swapAmounts:$t,paths:_t}};function Sl(Je,oe,Pe,He,We,Xe){const at=[],_t=[],xt=b(Je);return[...Pe].sort((cn,In)=>In.minus(cn).toNumber()).forEach(cn=>{let In=-1,Rn=D;if(xt.forEach((hr,jr)=>{if(C((0,q.S5)(hr.limitAmount,He)).gte(cn)){let ni;ni=C((0,q.S5)(hr.limitAmount,He)).eq(cn)?D:function(Je,oe,Pe,He,We,Xe){if(Pe.lt(md))return rc(Je,oe,Pe);let at=Il(Je,oe,Pe,He);const _t=C((0,q.S5)(Xe,We)).times(Je.pools.length);return oe===xe.SwapExactIn?(at=at.minus(_t),Pe.div(at)):(Pe=Pe.plus(_t),at.div(Pe))}(hr,oe,cn,He,We,Xe),ni.lte(Rn)&&(Rn=ni,In=jr)}}),-1===In)return at.push({id:"",swaps:[],poolPairData:[],limitAmount:O.O$.from("0"),pools:[]}),void _t.push(v);at.push(xt[In]),_t.push(cn.minus(C((0,q.S5)(xt[In].limitAmount,He)))),xt.splice(In,1)}),[at,_t]}function u0(Je,oe,Pe,He,We){let Xe=k,at=[],_t=0;for(;Xe.isGreaterThan(Yp);){[at,He,We]=Pd(Je,oe,Pe,He,We,_t);const xt=M.max.apply(null,at),$t=M.min.apply(null,at);if(Xe=xt.minus($t).div($t),_t++,_t>100)break}return[He,We]}function Pd(Je,oe,Pe,He,We,Xe){let at=v,_t=v;const xt=[],$t=[];He.forEach((jr,ni)=>{if(0==Xe&&jr.gte(v)&&We[ni].lte(v)||0!=Xe&&jr.gt(v)&&We[ni].lt(v)){const Fi=Je[ni],Nr=rc(Fi,oe,jr);xt.push(Nr);const Ci=function(Je,oe,Pe){const He=Je.poolPairData,We=Je.pools,Xe=We.length,at=Wh(Je,oe,Pe),_t=Nl(Je,oe,at);let xt=C(0);if(oe===xe.SwapExactIn)for(let $t=0;$t{if(0==Xe&&jr.gte(v)&&We[ni].lte(v)||0!=Xe&&jr.gt(v)&&We[ni].lt(v)){const Fi=cn.minus(xt[ni]).div($t[ni]);He[ni]=He[ni].plus(Fi),We[ni]=We[ni].plus(Fi)}});M.min.apply(null,He).lt(v)||M.max.apply(null,We).gt(v);)[He,We]=T0(He,We,$t);const In=[];let Rn=v;He.forEach((jr,ni)=>{Rn=Rn.plus(jr),(0==Xe&&jr.gte(v)&&We[ni].lte(v)||0!=Xe&&jr.gt(v)&&We[ni].lt(v))&&In.push(rc(Je[ni],oe,jr))});const hr=Pe.minus(Rn);for(let jr=0;jr{_t.lte(v)?(at=at.plus(_t),We=We.plus(k.div(Pe[xt]))):oe[xt].gte(v)?(at=at.plus(oe[xt]),Xe=Xe.plus(k.div(Pe[xt]))):He=He.plus(k.div(Pe[xt]))}),Je.forEach((_t,xt)=>{if(_t.lte(v))Je[xt]=v,oe[xt]=oe[xt].minus(_t);else if(oe[xt].gte(v))Je[xt]=Je[xt].minus(oe[xt]),oe[xt]=v;else{const $t=at.times(k.div(Pe[xt])).div(He);Je[xt]=Je[xt].plus($t),oe[xt]=oe[xt].plus($t)}}),He.isZero()&&(at.lt(v)?Je.forEach((_t,xt)=>{if(oe[xt].isZero()){const $t=at.times(k.div(Pe[xt])).div(Xe);Je[xt]=Je[xt].plus($t),oe[xt]=oe[xt].plus($t)}}):Je.forEach((_t,xt)=>{if(Je[xt].isZero()){const $t=at.times(k.div(Pe[xt])).div(We);Je[xt]=Je[xt].plus($t),oe[xt]=oe[xt].plus($t)}})),[Je,oe]}const gd=(Je,oe,Pe,He)=>{let We=new M(0);return Je.forEach((Xe,at)=>{We=We.plus(Il(Xe,oe,Pe[at],He))}),We};var vp=[{inputs:[{internalType:"contract IAuthorizer",name:"authorizer",type:"address"},{internalType:"contract IWETH",name:"weth",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"AuthorizerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExternalBalanceTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"delta",type:"int256"}],name:"InternalBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"liquidityProvider",type:"address"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"deltas",type:"int256[]"},{indexed:!1,internalType:"uint256[]",name:"protocolFeeAmounts",type:"uint256[]"}],name:"PoolBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"assetManager",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"cashDelta",type:"int256"},{indexed:!1,internalType:"int256",name:"managedDelta",type:"int256"}],name:"PoolBalanceManaged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"PoolRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"RelayerApprovalChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"contract IERC20",name:"tokenIn",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"amountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountOut",type:"uint256"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"TokensDeregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"TokensRegistered",type:"event"},{inputs:[],name:"WETH",outputs:[{internalType:"contract IWETH",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"assetDeltas",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"deregisterTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"getInternalBalance",outputs:[{internalType:"uint256[]",name:"balances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"enum IVault.PoolSpecialization",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPoolTokenInfo",outputs:[{internalType:"uint256",name:"cash",type:"uint256"},{internalType:"uint256",name:"managed",type:"uint256"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"assetManager",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPoolTokens",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract ProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"relayer",type:"address"}],name:"hasApprovedRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.PoolBalanceOpKind",name:"kind",type:"uint8"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct IVault.PoolBalanceOp[]",name:"ops",type:"tuple[]"}],name:"managePoolBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"}],name:"queryBatchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"registerPool",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"registerTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"setAuthorizer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setRelayerApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"amountCalculated",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];const c0={tokenAddresses:[],swaps:[],swapAmount:d._Y,swapAmountForSwaps:d._Y,tokenIn:"",tokenInForSwaps:"",tokenOut:"",tokenOutFromSwaps:"",returnAmount:d._Y,returnAmountConsideringFees:d._Y,returnAmountFromSwaps:d._Y,marketSp:d._Y.toString()},yr={Networks:[1,42],stETH:{1:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",42:"0x4803bb90d18a1cb7a2187344fe4feb0e07878d05"},wstETH:{1:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",42:"0xa387b91e393cfb9356a460370842bc8dbb2f29af"},WETH:{1:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",42:"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1"},DAI:{1:"0x6b175474e89094c44da98b954eedeac495271d0f",42:"0x04df6e4121c27713ed22341e7c7df330f56f289b"},USDC:{1:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",42:"0xc2569dd7d0fd715b054fbf16e75b001e5c0c1115"},USDT:{1:"0xdac17f958d2ee523a2206206994597c13d831ec7",42:"0xcc08220af469192c53295fdd34cfb8df29aa17ab"},StaticPools:{staBal:{1:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",42:"0x45f78862bd3aa5205e63141fa7f2d35f38eb87c30000000000000000000000fd"},wethDai:{1:"0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a",42:"0x3a19030ed746bd1c3f2b0f996ff9479af04c5f0a000200000000000000000004"},wstEthWeth:{1:"0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080",42:"0xe08590bde837eb9b2d42aa1196469d6e08fe96ec000200000000000000000101"}}},Oa={1:{},42:{}};function pc(Je,oe,Pe,He){return Wf.apply(this,arguments)}function Wf(){return(Wf=(0,ie.Z)(function*(Je,oe,Pe,He){const Xe=new f.Contract("0xBA12222222228d8Ba445958a75a0704d566BF2C8",vp,He),at={sender:x.d,recipient:x.d,fromInternalBalance:!1,toInternalBalance:!1};try{const _t=yield Xe.callStatic.queryBatchSwap(Je,oe,Pe,at);return Je===xe.SwapExactIn?_t[Pe.length-1].mul(-1):_t[0]}catch{return console.error("SOR - Lido Static Route QueryBatchSwap Error. No swaps."),d._Y}})).apply(this,arguments)}function w1(Je,oe,Pe,He){const We=[];for(let Xe=0;XeIn.id===at.poolId);if(1!==_t.length)return C(0);const xt=vh(_t[0]);if(!xt)return C(0);const $t=xt.parsePoolPairData(Pe[at.assetInIndex],Pe[at.assetOutIndex]);let cn;cn=Je===xe.SwapExactIn?xt._spotPriceAfterSwapExactTokenInForTokenOut($t,v):xt._spotPriceAfterSwapTokenInForExactTokenOut($t,v),We.push(cn)}return We.reduce((Xe,at)=>Xe.times(at))}function Yn(Je,oe){return Jd.apply(this,arguments)}function Jd(){return(Jd=(0,ie.Z)(function*(Je,oe){return yield new f.Contract(yr.wstETH[oe],["function tokensPerStEth() external view returns (uint256)"],Je).tokensPerStEth()})).apply(this,arguments)}function yd(){return(yd=(0,ie.Z)(function*(Je,oe,Pe,He,We,Xe,at){let _t,xt=!1;Pe===yr.stETH[oe]&&(Pe=yr.wstETH[oe],_t=!0),He===yr.stETH[oe]&&(He=yr.wstETH[oe],xt=!0);const $t=b(c0),cn=Oa[oe][`${Pe}${He}${We}`];return cn?($t.tokenAddresses=cn.tokenAddresses,$t.swaps=cn.swaps,$t.swapAmount=Xe,$t.swaps[0].amount=$t.swapAmount.toString(),$t.tokenIn=_t?yr.stETH[oe]:Pe,$t.tokenOut=xt?yr.stETH[oe]:He,$t.marketSp=w1(We,$t.swaps,$t.tokenAddresses,Je).toString(),$t.returnAmount=yield pc(We,$t.swaps,$t.tokenAddresses,at),$t.returnAmount.isZero()?b(c0):($t.returnAmountConsideringFees=$t.returnAmount,$t)):$t})).apply(this,arguments)}Oa[1][`${yr.DAI[1]}${yr.wstETH[1]}0`]={name:"DAI/wstETH-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wethDai[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.DAI[1]}0`]={name:"wstETH/DAI-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[1][`${yr.DAI[1]}${yr.wstETH[1]}1`]={name:"DAI/wstETH-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.DAI[1]}1`]={name:"wstETH/DAI-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1]],swaps:[{poolId:yr.StaticPools.wethDai[1],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.USDC[1]}${yr.wstETH[1]}0`]={name:"USDC/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.USDC[1]}${yr.wstETH[1]}1`]={name:"USDC/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDC[1]}0`]={name:"wstETH/USDC-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDC[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDC[1]}1`]={name:"wstETH/USDC-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDC[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.USDT[1]}${yr.wstETH[1]}0`]={name:"USDT/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.USDT[1]}${yr.wstETH[1]}1`]={name:"USDT/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[1],yr.DAI[1],yr.WETH[1],yr.wstETH[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDT[1]}0`]={name:"wstETH/USDT-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDT[1]],swaps:[{poolId:yr.StaticPools.wstEthWeth[1],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[1],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[1][`${yr.wstETH[1]}${yr.USDT[1]}1`]={name:"wstETH/USDT-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[1],yr.WETH[1],yr.DAI[1],yr.USDT[1]],swaps:[{poolId:yr.StaticPools.staBal[1],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[1],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[1],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.USDC[42]}${yr.wstETH[42]}0`]={name:"USDC/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wethDai[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDC[42]}0`]={name:"wstETH/USDC-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"}]},Oa[42][`${yr.USDC[42]}${yr.wstETH[42]}1`]={name:"USDC/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDC[42]}1`]={name:"wstETH/USDC-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42]],swaps:[{poolId:yr.StaticPools.wethDai[42],amount:"",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.DAI[42]}${yr.wstETH[42]}0`]={name:"DAI/wstETH-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.DAI[42]}${yr.wstETH[42]}1`]={name:"DAI/wstETH-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.DAI[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.DAI[42]}0`]={name:"wstETH/DAI-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.DAI[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.DAI[42]}1`]={name:"wstETH/DAI-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:18,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.DAI[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.USDT[42]}${yr.wstETH[42]}0`]={name:"USDT/wstETH-SwapExactIn",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.USDT[42]}${yr.wstETH[42]}1`]={name:"USDT/wstETH-SwapExactOut",tokenInDecimals:6,tokenOutDecimals:18,tokenAddresses:[yr.USDT[42],yr.USDC[42],yr.WETH[42],yr.wstETH[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDT[42]}0`]={name:"wstETH/USDT-SwapExactIn",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.USDT[42]],swaps:[{poolId:yr.StaticPools.wstEthWeth[42],amount:"",assetInIndex:0,assetOutIndex:1,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.staBal[42],amount:"0",assetInIndex:2,assetOutIndex:3,userData:"0x"}]},Oa[42][`${yr.wstETH[42]}${yr.USDT[42]}1`]={name:"wstETH/USDT-SwapExactOut",tokenInDecimals:18,tokenOutDecimals:6,tokenAddresses:[yr.wstETH[42],yr.WETH[42],yr.USDC[42],yr.USDT[42]],swaps:[{poolId:yr.StaticPools.staBal[42],amount:"",assetInIndex:2,assetOutIndex:3,userData:"0x"},{poolId:yr.StaticPools.wethDai[42],amount:"0",assetInIndex:1,assetOutIndex:2,userData:"0x"},{poolId:yr.StaticPools.wstEthWeth[42],amount:"0",assetInIndex:0,assetOutIndex:1,userData:"0x"}]};const bd={Networks:[1],1:{"0xd46ba6d942050d489dbd938a2c909a5d5039a161":"0xedb171c18ce90b633db442f2a6f72874093b49ef","0x1e6bb68acec8fefbd87d192be09bb274170a0548":"0xF03387d8d0FF326ab586A58E0ab4121d106147DF"}};function Zl(Je,oe){return A0.apply(this,arguments)}function A0(){return(A0=(0,ie.Z)(function*(Je,oe){return new f.Contract(oe,["function underlyingToWrapper(uint256 amount) external view returns (uint256)"],Je).underlyingToWrapper(d.Ce)})).apply(this,arguments)}var No=(()=>{return(Je=No||(No={}))[Je.None=0]="None",Je[Je.ETH=1]="ETH",Je[Je.stETH=2]="stETH",Je[Je.Unbutton=3]="Unbutton",No;var Je})();function l0(){return(l0=(0,ie.Z)(function*(Je,oe,Pe,He,We,Xe){Pe=Pe.toLowerCase(),He=He.toLowerCase();let at=Xe,_t=Pe,xt=No.None,$t=He,cn=No.None,In=d.Ce,Rn=d.Ce;if(Pe===x.d&&(_t=We.weth.toLowerCase(),xt=No.ETH),He===x.d&&($t=We.weth.toLowerCase(),cn=No.ETH),Pe===yr.stETH[We.chainId]){_t=yr.wstETH[We.chainId],xt=No.stETH;const jr=yield Yn(Je,We.chainId);In=jr,oe===xe.SwapExactIn&&(at=Xe.mul(jr).div(d.Ce))}if(He===yr.stETH[We.chainId]){$t=yr.wstETH[We.chainId],cn=No.stETH;const jr=yield Yn(Je,We.chainId);Rn=jr,oe===xe.SwapExactOut&&(at=Xe.mul(jr).div(d.Ce))}const hr=bd[We.chainId]||{};return hr[Pe]&&(_t=hr[Pe],xt=No.Unbutton,In=yield Zl(Je,_t),oe===xe.SwapExactIn&&(at=Xe.mul(In).div(d.Ce))),hr[He]&&($t=hr[He],cn=No.Unbutton,Rn=yield Zl(Je,$t),oe===xe.SwapExactOut&&(at=Xe.mul(Rn).div(d.Ce))),{swapAmountOriginal:Xe,swapAmountForSwaps:at,tokenIn:{addressOriginal:Pe,addressForSwaps:_t,wrapType:xt,rate:In},tokenOut:{addressOriginal:He,addressForSwaps:$t,wrapType:cn,rate:Rn}}})).apply(this,arguments)}const qc=Je=>[...new Set(Je.flatMap(Pe=>[Pe.tokenIn,Pe.tokenOut]))],Rd=(Je,oe,Pe)=>(Je===xe.SwapExactOut&&(oe=oe.reverse()),oe.map((He,We)=>{let Xe="0";if(0===We){const cn=Je===xe.SwapExactIn?He.tokenInDecimals:He.tokenOutDecimals;Xe=N(C(He.swapAmount),cn).decimalPlaces(0,1).toString()}const at=Je===xe.SwapExactIn?He.tokenOutDecimals:He.tokenInDecimals,_t=N(C(He.returnAmount??"0"),at).decimalPlaces(0,1).toString(),xt=Pe.indexOf(He.tokenIn),$t=Pe.indexOf(He.tokenOut);return{poolId:He.pool,assetInIndex:xt,assetOutIndex:$t,amount:Xe,userData:"0x",returnAmount:_t}}));class G0{constructor(oe){this.poolDataService=oe,this.pools=[],this._finishedFetching=!1}get finishedFetching(){return this._finishedFetching}getPools(oe){const Pe=b(this.pools);if(oe)for(const He of Pe)"Weighted"!==He.poolType&&"Investment"!==He.poolType||(He.tokens.push({address:He.address,balance:He.totalShares,decimals:18,priceRate:"1",weight:"0"}),He.tokensList.push(He.address));return Pe}fetchPools(oe,Pe){var He=this;return(0,ie.Z)(function*(){try{return He.pools=yield He.poolDataService.getPools(oe,Pe),He._finishedFetching=!0,!0}catch(We){return He._finishedFetching=!1,He.pools=[],console.error(`Error: fetchPools(): ${We}`),!1}})()}}function Gh(Je,oe,Pe,He){const We={},Xe={},at={};return Object.keys(Je).forEach(_t=>{const xt=Je[_t],$t=new Set(xt.tokensList),cn=$t.has(oe.toLowerCase()),In=$t.has(Pe.toLowerCase());if(cn&&In)We[xt.id]=xt;else if(He>1)if(cn&&!In)for(const Rn of $t)Xe[Rn]||(Xe[Rn]=new Set([])),Xe[Rn].add(xt.id);else if(!cn&&In)for(const Rn of[...$t])at[Rn]||(at[Rn]=new Set([])),at[Rn].add(xt.id)}),[We,Xe,at]}function d0(Je,oe,Pe,He,We,Xe){const at=[];for(const _t in Pe){const xt=f0([Je,oe],[Xe[_t]]);at.push(xt)}for(const _t in He)if(We[_t]){let $t,In,xt=v,cn=v;for(const Rn of[...He[_t]]){const hr=Xe[Rn],jr=hr.parsePoolPairData(Je,_t),ni=hr.getNormalizedLiquidity(jr);ni.isGreaterThanOrEqualTo(xt)&&(xt=ni,$t=hr.id)}for(const Rn of[...We[_t]]){const hr=Xe[Rn],jr=hr.parsePoolPairData(_t,oe),ni=hr.getNormalizedLiquidity(jr);ni.isGreaterThanOrEqualTo(cn)&&(cn=ni,In=hr.id)}if($t&&In){const Rn=f0([Je,_t,oe],[Xe[$t],Xe[In]]);at.push(Rn)}}return at}function zh(Je,oe,Pe,He){const We=function(Je,oe,Pe,He){const We=new Set,Xe=[],at=[],_t=He.connectingTokens?He.connectingTokens.map(In=>In.address):[];for(const In in Pe){const Rn=Pe[In];Rn.poolType==Ce.Linear?(Xe.push(Rn.address),We.add(Rn)):((Rn.tokensList.map(jr=>jr.toLowerCase()).includes(Rn.address)||Rn.poolType===Ce.Weighted)&&at.push(Rn),He.lbpRaisingTokens&&Rn.isLBP&&Bd(We,He.lbpRaisingTokens,Rn,Je,oe,_t,Pe))}if(0==Xe.length)return{};for(const In of _t)q0(Je,In,Pe,We),q0(In,oe,Pe,We);const xt=new Set;for(const In of at)In.tokensList.some(Rn=>Xe.includes(Rn))&&(We.add(In),xt.add(In.address));for(const In in Pe){const Rn=Pe[In];Rn.tokensList.some(hr=>xt.has(hr))&&We.add(Rn)}return He.wETHwstETH&&Pe[He.wETHwstETH.id]&&We.add(Pe[He.wETHwstETH.id]),function(Je){const oe={};for(const Pe of Je){const He=Pe.tokensList.length;for(let We=0;Weoe[Xe]);We.length>2&&Pe.push(f0(He[0],We))}return Pe}(Xe,Pe)}function xp(Je,oe,Pe){const He=[Je];He.unshift(oe.edge);let We=oe.parentIndices;for(;-1!==We[0];)He.unshift(Pe[We[0]][We[1]].edge),We=Pe[We[0]][We[1]].parentIndices;const Xe=He.map(_t=>_t[0]);return Xe.splice(0,1),[He.map(_t=>_t[2]),Xe]}function f0(Je,oe){let Pe,He;const We=[],Xe=[];let at="";for(let xt=0;xtPe.tokensList.length>0&&"0"!==Pe.tokens[0].balance).map(Pe=>[Pe.id,vh(Pe,oe)]).filter(([,Pe])=>void 0!==Pe))}function qh(Je,oe,Pe){let He;const We=Je.tokensList;if(We.includes(Pe)&&!oe.includes(Pe))for(let Xe=0;Xe<2;Xe++)We[Xe]==Pe&&(He=We[1-Xe]);return He}function Bd(Je,oe,Pe,He,We,Xe,at){const _t=oe.map(cn=>cn.toLowerCase());if(0===_t.length)return;const xt=qh(Pe,_t,He),$t=qh(Pe,_t,We);if(xt||$t){Je.add(Pe);for(const cn of Xe)xt&&xt!==cn&&q0(xt,cn,at,Je),$t&&$t!==cn&&q0(cn,$t,at,Je)}}function q0(Je,oe,Pe,He){const We=Gf(Je,oe,Pe);We&&He.add(Pe[We])}function T1(Je,oe){let Pe=d._Y;return Je.forEach(We=>{We.limitAmount=function(Je,oe){const Pe=Je.poolPairData;let He;if(oe===xe.SwapExactIn){He=Je.pools[Pe.length-1].getLimitAmountSwap(Pe[Pe.length-1],xe.SwapExactIn);for(let Xe=Pe.length-2;Xe>=0;Xe--){const at=Je.pools[Xe].getLimitAmountSwap(Pe[Xe],xe.SwapExactIn);if(Je.pools[Xe].getLimitAmountSwap(Pe[Xe],xe.SwapExactOut).lte(He))He=at;else{const xt=mf(Je.pools[Xe],Je.poolPairData[Xe],xe.SwapExactOut,He);He=M.min(xt,at)}}return He.isZero()?d._Y:(0,q.Ox)(He.dp(Pe[0].decimalsIn).toString(),Pe[0].decimalsIn)}He=Je.pools[0].getLimitAmountSwap(Pe[0],xe.SwapExactOut);for(let We=1;WeXe.limitAmount.gt(We.limitAmount)?1:-1),Pe]}class Fl{constructor(oe){this.config=oe,this.cache={}}getCandidatePaths(oe,Pe,He,We,Xe){if(oe=oe.toLowerCase(),Pe=Pe.toLowerCase(),0===We.length)return[];const at=this.cache[`${oe}${Pe}${He}${Xe.timestamp}`];if(!Xe.forceRefresh&&at)return at.paths;const _t=kl(We,Xe.timestamp),[xt,$t,cn]=Gh(_t,oe,Pe,Xe.maxPools),In=d0(oe,Pe,xt,$t,cn,_t),Rn=zh(oe,Pe,_t,this.config),hr=function(Je,oe,Pe,He,We){const Xe=We.usdcConnectingPool;if(!Xe)return[];const at=Pe[Xe.id],_t=We.staBal3Pool?.address;if(!at||!_t)return[];const xt=Gf(Je,_t,He),$t=Gf(_t,oe,He);if(xt&&!$t){const In=f0([Je,_t,Xe.usdc],[He[xt],at]),Rn=Gf(Xe.usdc,oe,He);return null===Rn?[]:[E1([In,f0([Xe.usdc,oe],[He[Rn]])])]}if(!xt&&$t){const cn=Gf(Je,Xe.usdc,He);if(null===cn)return[];const Rn=He[cn],hr=f0([Xe.usdc,_t,oe],[at,He[$t]]);return[E1([f0([Je,Xe.usdc],[Rn]),hr])]}return[]}(oe,Pe,_t,_t,this.config),jr=function(Je,oe,Pe,He){const We=[];return He.forEach(Xe=>{const at=function(Je,oe,Pe,He){const We=function(Je,oe,Pe,He){const We=Pe[He];return!We||We.tokensList.some(Xe=>Xe.toLowerCase()===Je.toLowerCase()||Xe.toLowerCase()===oe.toLowerCase())?null:We}(Je,oe,Pe,He);if(null===We)return[];const Xe=function(Je,oe,Pe,He){const We=He.tokensList.map(Xe=>({token:Xe,mostLiquidPoolIn:null,mostLiquidPoolOut:null}));return We.forEach(Xe=>{const at=Gf(Je,Xe.token,Pe),_t=Gf(Xe.token,oe,Pe);Xe.mostLiquidPoolIn=at?Pe[at]:null,Xe.mostLiquidPoolOut=_t?Pe[_t]:null}),We}(Je,oe,Pe,We);return function(Je,oe,Pe,He){const We=[];return Pe.forEach((Xe,at)=>{const _t=Xe.mostLiquidPoolIn;_t&&[...Pe.slice(0,at),...Pe.slice(at+1)].forEach($t=>{$t.mostLiquidPoolOut&&We.push(f0([Je,Xe.token,$t.token,oe],[_t,He,$t.mostLiquidPoolOut]))})}),We}(Je,oe,Xe,We)}(Je,oe,Pe,Xe);We.push(...at)}),We}(oe,Pe,_t,this.config.triPathMidPoolIds??[]),ni=In.concat(...Rn).concat(...hr).concat(...jr),[Fi]=T1(ni,He);return this.cache[`${oe}${Pe}${He}${Xe.timestamp}`]={paths:Fi},Fi}getCandidatePathsFromDict(oe,Pe,He,We,Xe){if(oe=oe.toLowerCase(),Pe=Pe.toLowerCase(),0===Object.keys(We).length)return[];const[at,_t,xt]=Gh(We,oe,Pe,Xe),$t=d0(oe,Pe,at,_t,xt,We),cn=zh(oe,Pe,We,this.config),In=$t.concat(...cn),[Rn]=T1(In,He);return Rn}}class zf{constructor(oe,Pe){this.tokenPriceService=Pe,this.tokenPriceCache={AddressZero:"1",[oe.weth.toLowerCase()]:"1"}}convertGasCostToToken(oe,Pe,He,We=O.O$.from("85000")){var Xe=this;return(0,ie.Z)(function*(){if(He.isZero()||We.isZero())return d._Y;const at=yield Xe.getNativeAssetPriceInToken(oe),_t=O.O$.from(N(C(at),Pe).dp(0).toString());return He.mul(We).mul(_t).div(d.Ce)})()}setNativeAssetPriceInToken(oe,Pe){this.tokenPriceCache[oe.toLowerCase()]=Pe}getNativeAssetPriceInToken(oe){var Pe=this;return(0,ie.Z)(function*(){const He=Pe.tokenPriceCache[oe.toLowerCase()];if(He)return He;try{const We=yield Pe.tokenPriceService.getNativeAssetPriceInToken(oe);return Pe.setNativeAssetPriceInToken(oe,We),We}catch(We){return console.log("Error Getting Token Price. Defaulting to 0."),console.log(We),"0"}})()}}class Ja{constructor(oe,Pe,He,We){this.provider=oe,this.config=Pe,this.defaultSwapOptions={gasPrice:(0,q.Ox)("50",9),swapGas:O.O$.from("85000"),poolTypeFilter:ke.All,maxPools:4,timestamp:Math.floor(Date.now()/1e3),forceRefresh:!1},this.poolCacher=new G0(He),this.routeProposer=new Fl(Pe),this.swapCostCalculator=new zf(Pe,We)}getPools(oe){return this.poolCacher.getPools(oe)}fetchPools(oe,Pe){var He=this;return(0,ie.Z)(function*(){return He.poolCacher.fetchPools(oe,Pe)})()}getSwaps(oe,Pe,He,We,Xe,at=!1){var _t=this;return(0,ie.Z)(function*(){if(!_t.poolCacher.finishedFetching)return b(c0);const xt={..._t.defaultSwapOptions,...Xe};_t.useBpt!==at&&(xt.forceRefresh=!0,_t.useBpt=at);const cn=((Je,oe)=>oe===ke.All?Je:Je.filter(Pe=>Pe.poolType===oe))(_t.poolCacher.getPools(at),xt.poolTypeFilter),In=yield function(Je,oe,Pe,He,We,Xe){return l0.apply(this,arguments)}(_t.provider,He,oe,Pe,_t.config,O.O$.from(We));let Rn;return Rn=function(Je,oe,Pe){return!!yr.Networks.includes(Je)&&(oe=oe.toLowerCase(),Pe=Pe.toLowerCase(),oe===yr.wstETH[Je]&&Pe===yr.DAI[Je]||oe===yr.wstETH[Je]&&Pe===yr.USDC[Je]||oe===yr.wstETH[Je]&&Pe===yr.USDT[Je]||oe===yr.DAI[Je]&&Pe===yr.wstETH[Je]||oe===yr.USDC[Je]&&Pe===yr.wstETH[Je]||oe===yr.USDT[Je]&&Pe===yr.wstETH[Je]||oe===yr.stETH[Je]&&Pe===yr.DAI[Je]||oe===yr.stETH[Je]&&Pe===yr.USDC[Je]||oe===yr.stETH[Je]&&Pe===yr.USDT[Je]||oe===yr.DAI[Je]&&Pe===yr.stETH[Je]||oe===yr.USDC[Je]&&Pe===yr.stETH[Je]||oe===yr.USDT[Je]&&Pe===yr.stETH[Je])}(_t.config.chainId,oe,Pe)?yield function(Je,oe,Pe,He,We,Xe,at){return yd.apply(this,arguments)}(cn,_t.config.chainId,In.tokenIn.addressForSwaps,In.tokenOut.addressForSwaps,He,In.swapAmountForSwaps,_t.provider):yield _t.processSwaps(In.tokenIn.addressForSwaps,In.tokenOut.addressForSwaps,He,In.swapAmountForSwaps,cn,xt),Rn.returnAmount.isZero()||(Rn=function(Je,oe,Pe,He){if(0===Je.swaps.length||(Je.tokenIn=Pe.tokenIn.addressOriginal,Je.tokenOut=Pe.tokenOut.addressOriginal,Je.swapAmountForSwaps=Je.swapAmount,Je.returnAmountFromSwaps=Je.returnAmount,Je.tokenInForSwaps=Pe.tokenIn.addressForSwaps,Je.tokenOutFromSwaps=Pe.tokenOut.addressForSwaps,Pe.tokenIn.wrapType===No.None&&Pe.tokenOut.wrapType===No.None))return Je;(Pe.tokenIn.wrapType===No.ETH||Pe.tokenOut.wrapType===No.ETH)&&(Je.tokenAddresses=Je.tokenAddresses.map(Xe=>le(Xe,He.weth)?x.d:Xe));const We=Xe=>Xe===No.stETH||Xe===No.Unbutton;return(We(Pe.tokenIn.wrapType)&&oe===xe.SwapExactIn||We(Pe.tokenOut.wrapType)&&oe===xe.SwapExactOut)&&(Je.swapAmount=Pe.swapAmountOriginal,Je.swapAmountForSwaps=Pe.swapAmountForSwaps),oe===xe.SwapExactIn&&We(Pe.tokenOut.wrapType)&&(Je.returnAmount=Je.returnAmount.mul(d.Ce).div(Pe.tokenOut.rate),Je.returnAmountConsideringFees=Je.returnAmountConsideringFees.mul(d.Ce).div(Pe.tokenOut.rate)),oe===xe.SwapExactOut&&We(Pe.tokenIn.wrapType)&&(Je.returnAmount=Je.returnAmount.mul(d.Ce).div(Pe.tokenIn.rate),Je.returnAmountConsideringFees=Je.returnAmountConsideringFees.mul(d.Ce).div(Pe.tokenIn.rate)),Je}(Rn,He,In,_t.config)),Rn})()}getCostOfSwapInToken(oe,Pe,He,We){var Xe=this;return(0,ie.Z)(function*(){return He.isZero()?d._Y:Xe.swapCostCalculator.convertGasCostToToken(oe,Pe,He,We)})()}processSwaps(oe,Pe,He,We,Xe,at){var _t=this;return(0,ie.Z)(function*(){if(0===Xe.length)return b(c0);const xt=_t.routeProposer.getCandidatePaths(oe,Pe,He,Xe,at);if(0==xt.length)return b(c0);let $t,cn;xt[0].swaps.forEach(Nr=>{le(Nr.tokenIn,oe)&&($t=Nr.tokenInDecimals),le(Nr.tokenOut,Pe)&&(cn=Nr.tokenOutDecimals)});const In=yield _t.getCostOfSwapInToken(He===xe.SwapExactIn?Pe:oe,He===xe.SwapExactIn?cn:$t,at.gasPrice,at.swapGas),[Rn,hr,jr,ni]=_t.getBestPaths(xt,We,He,$t,cn,In,at.maxPools);return function(Je,oe,Pe,He,We,Xe,at,_t){if(0===Je.length)return b(c0);const xt=b(Je),$t=(Je=>[...new Set(Je.flatMap(Pe=>Pe.flatMap(He=>[He.tokenIn,He.tokenOut])))])(xt),cn=xt.flatMap(hr=>Rd(oe,hr,$t)),In=Pe.sub((Je=>Je.reduce((oe,{amount:Pe})=>oe.add(Pe),d._Y))(cn));return In.gt(0)&&(cn[0].amount=O.O$.from(cn[0].amount).add(In).toString()),{swapAmount:Pe,swapAmountForSwaps:Pe,returnAmount:Xe,returnAmountFromSwaps:Xe,returnAmountConsideringFees:at,swaps:cn,tokenAddresses:$t,tokenIn:He,tokenOut:We,marketSp:_t}}(Rn,He,We,oe,Pe,hr,ni,jr)})()}getBestPaths(oe,Pe,He,We,Xe,at,_t){const[xt,$t]=He===xe.SwapExactIn?[We,Xe]:[Xe,We],[cn,In,Rn,hr]=((Je,oe,Pe,He,We,Xe,at)=>{if(0==Je.length||Pe.isZero())return[[],v,v,v];const _t=function(Je,oe){if(0===Je.length)return[];const Pe=[];for(let He=0;He(Ci.push(Wo.add(Ci[Ci.length-1]||d._Y)),Ci),[]);if(Pe.gt(xt[xt.length-1]))return[[],v,v,v];const $t=xt.findIndex(Ci=>Pe.lte(Ci))+1,cn=_t.slice(0,$t),In=xt[$t-1].sub(Pe);cn[cn.length-1]=cn[cn.length-1].sub(In);const[Rn,hr,jr]=((Je,oe,Pe,He,We,Xe,at,_t,xt,$t)=>{let cn=oe===xe.SwapExactIn?D.times(-1):D,In=[],Rn=[],hr=He.map(jr=>C((0,q.S5)(jr,Xe)));for(let jr=_t;jr<=Je.length;jr++){if(jr!=_t){const Vn=(0,q.S5)(Pe,Xe),lr=M.min.apply(null,[C(Vn).times(C(1/jr)),(0,q.S5)(We[jr-1],Xe)]);hr.forEach((Tr,di)=>{hr[di]=Tr.times(k.minus(lr.div(Vn)))}),lr.isZero()||hr.push(lr)}const{paths:ni,swapAmounts:Fi}=wh(Je,oe,Pe,hr,Xe,at,$t);hr=Fi;const Nr=gd(ni,oe,hr,Xe),Ci=ni.reduce((Vn,lr)=>Vn+lr.swaps.length,0),Wo=(0,q.S5)($t,at);let Go=!1,Ha=v;const Ba=C(Ci).times(Wo);if(oe===xe.SwapExactIn?(Ha=Nr.minus(Ba),Go=Ha.isGreaterThan(cn)):(Ha=Nr.plus(Ba),Go=Ha.isLessThan(cn)),!Go||(In=[...hr],Rn=[...ni],cn=Ha,Ci>=xt))break}return Rn=Rn.filter((jr,ni)=>!In[ni].isZero()),In=In.filter(jr=>!jr.isZero()),[Rn,In,cn]})(Je,oe,Pe,cn,_t,He,We,$t,Xe,at),[ni,Fi,Nr]=((Je,oe,Pe,He)=>{const We=[];let Xe=He[0],at=Je[0],_t=v;if(Je.forEach(($t,cn)=>{const In=He[cn];In.gt(Xe)&&(Xe=In,at=$t);const Rn=$t.poolPairData,hr=[],jr=[];let ni;const Fi=Rn.length;if(jr.push(In),oe===xe.SwapExactIn){for(let Nr=0;Nr0){const $t=He.reduce((In,Rn)=>In.plus(Rn),v),cn=Pe.minus($t);if(oe===xe.SwapExactIn)We[0][0].swapAmount=C(We[0][0].swapAmount).plus(cn).toString();else{const In=Je[0].swaps.length-1;We[0][In].swapAmount=C(We[0][In].swapAmount).plus(cn).toString()}}if(_t.eq(0))return[[],v,v];const xt=rc(at,oe,v);return[We,_t,xt]})(Rn,oe,C((0,q.S5)(Pe,He)),hr);return Fi.eq(0)?[[],v,v,v]:[ni,Fi,Nr,jr]})(oe,He,Pe,xt,$t,_t,at);return[cn,(0,q.Ox)(In.dp($t,M.ROUND_FLOOR).toString(),$t),Rn.toString(),(0,q.Ox)(hr.dp($t,M.ROUND_FLOOR).toString(),$t)]}}function im(Je,oe,Pe,He,We){const Xe=He.reduce((at,_t,xt)=>{const cn=Wn(v,{balanceIn:Je[xt],decimalsIn:oe[xt],balanceOut:We,weightIn:Pe[xt],swapFee:d._Y}),Rn=C((0,q.S5)(_t,oe[xt])).div(cn).toString();return O.O$.from(at).add((0,q.Ox)(Rn,18))},d._Y);return O.O$.from(Xe)}function e1(Je,oe,Pe,He,We){if(Je.length!=Pe.length)throw"allBalances and amounts have to have same length";const Xe=Je.map((_t,xt)=>C((0,q.S5)(_t,oe[xt]))),at=Pe.reduce((_t,xt,$t)=>{const cn={amp:O.O$.from(We),allBalances:Xe,tokenIndexIn:$t,balanceOut:He,decimalsOut:18,swapFee:d._Y},In=ki(v,cn),hr=C((0,q.S5)(xt,oe[$t])).div(In).toString();return O.O$.from(_t).add((0,q.Ox)(hr,18))},d._Y);return O.O$.from(at)}},39885:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Authorizer__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"address",name:"admin",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"actionId",type:"bytes32"},{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"",type:"address"}],name:"canPerform",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"grantRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"grantRolesToMany",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"revokeRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"revokeRolesFromMany",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.Authorizer__factory=O,O.abi=q},77460:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BalancerHelpers__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.BalancerHelpers__factory=O,O.abi=q},84267:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.InvestmentPoolFactory__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"},{internalType:"uint256",name:"managementSwapFeePercentage",type:"uint256"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.InvestmentPoolFactory__factory=O,O.abi=q},99598:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.InvestmentPool__factory=void 0;const ie=Y(94464),q=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"},{internalType:"uint256",name:"managementSwapFeePercentage",type:"uint256"}],internalType:"struct InvestmentPool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"startWeights",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"GradualWeightUpdateScheduled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"managementFeePercentage",type:"uint256"}],name:"ManagementFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"ManagementFeesCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"swapEnabled",type:"bool"}],name:"SwapEnabledSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCollectedManagementFees",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"collectedFees",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getGradualWeightUpdateParams",outputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getManagementSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumWeightChangeDuration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapEnabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"currentBalanceTokenIn",type:"uint256"},{internalType:"uint256",name:"currentBalanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapEnabled",type:"bool"}],name:"setSwapEnabled",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"updateWeightsGradually",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"}],name:"withdrawCollectedManagementFees",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.InvestmentPool__factory=O,O.abi=q},89445:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.LidoRelayer__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IwstETH",name:"wstETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"swapAmounts",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getStETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWstETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"swapAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.LidoRelayer__factory=O,O.abi=q},59198:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.LiquidityBootstrappingPoolFactory__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.LiquidityBootstrappingPoolFactory__factory=O,O.abi=q},76389:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.LiquidityBootstrappingPool__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"swapEnabledOnStart",type:"bool"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"startWeights",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"GradualWeightUpdateScheduled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"swapEnabled",type:"bool"}],name:"SwapEnabledSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getGradualWeightUpdateParams",outputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapEnabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapEnabled",type:"bool"}],name:"setSwapEnabled",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256[]",name:"endWeights",type:"uint256[]"}],name:"updateWeightsGradually",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.LiquidityBootstrappingPool__factory=O,O.abi=q},45949:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.MerkleRedeem__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"},{internalType:"contract IERC20",name:"_rewardToken",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"rewardToken",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardPaid",type:"event"},{inputs:[{internalType:"address",name:"liquidityProvider",type:"address"},{internalType:"uint256",name:"begin",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"}],name:"claimStatus",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"claimedBalance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],name:"claimWeek",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{components:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],internalType:"struct MerkleRedeem.Claim[]",name:"claims",type:"tuple[]"}],name:"claimWeeks",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{components:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],internalType:"struct MerkleRedeem.Claim[]",name:"claims",type:"tuple[]"}],name:"claimWeeksToInternalBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"liquidityProvider",type:"address"},{internalType:"address payable",name:"callbackContract",type:"address"},{internalType:"bytes",name:"callbackData",type:"bytes"},{components:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],internalType:"struct MerkleRedeem.Claim[]",name:"claims",type:"tuple[]"}],name:"claimWeeksWithCallback",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"address",name:"",type:"address"}],name:"claimed",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"begin",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"}],name:"merkleRoots",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rewardToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"week",type:"uint256"},{internalType:"bytes32",name:"_merkleRoot",type:"bytes32"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"seedAllocations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"liquidityProvider",type:"address"},{internalType:"uint256",name:"week",type:"uint256"},{internalType:"uint256",name:"claimedBalance",type:"uint256"},{internalType:"bytes32[]",name:"merkleProof",type:"bytes32[]"}],name:"verifyClaim",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"weekMerkleRoots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.MerkleRedeem__factory=O,O.abi=q},83429:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.MetaStablePoolFactory__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"priceRateCacheDuration",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.MetaStablePoolFactory__factory=O,O.abi=q},8337:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.MetaStablePool__factory=void 0;const ie=Y(94464),q=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"priceRateCacheDuration",type:"uint256[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct MetaStablePool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"OracleEnabledChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"PriceRateCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"contract IRateProvider",name:"provider",type:"address"},{indexed:!1,internalType:"uint256",name:"cacheDuration",type:"uint256"}],name:"PriceRateProviderSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLargestSafeQueryWindow",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"lastInvariant",type:"uint256"},{internalType:"uint256",name:"lastInvariantAmp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"}],name:"getLatest",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOracleMiscData",outputs:[{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"logTotalSupply",type:"int256"},{internalType:"uint256",name:"oracleSampleCreationTimestamp",type:"uint256"},{internalType:"uint256",name:"oracleIndex",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAccumulatorQuery[]",name:"queries",type:"tuple[]"}],name:"getPastAccumulators",outputs:[{internalType:"int256[]",name:"results",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPriceRateCache",outputs:[{internalType:"uint256",name:"rate",type:"uint256"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"uint256",name:"expires",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"providers",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getSample",outputs:[{internalType:"int256",name:"logPairPrice",type:"int256"},{internalType:"int256",name:"accLogPairPrice",type:"int256"},{internalType:"int256",name:"logBptPrice",type:"int256"},{internalType:"int256",name:"accLogBptPrice",type:"int256"},{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"accLogInvariant",type:"int256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"secs",type:"uint256"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAverageQuery[]",name:"queries",type:"tuple[]"}],name:"getTimeWeightedAverage",outputs:[{internalType:"uint256[]",name:"results",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalSamples",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"setPriceRateCacheDuration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"updatePriceRateCache",outputs:[],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.MetaStablePool__factory=O,O.abi=q},70869:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.StablePoolFactory__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.StablePoolFactory__factory=O,O.abi=q},34027:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.StablePool__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.StablePool__factory=O,O.abi=q},49702:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Vault__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IAuthorizer",name:"authorizer",type:"address"},{internalType:"contract IWETH",name:"weth",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"AuthorizerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExternalBalanceTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"delta",type:"int256"}],name:"InternalBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"liquidityProvider",type:"address"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"deltas",type:"int256[]"},{indexed:!1,internalType:"uint256[]",name:"protocolFeeAmounts",type:"uint256[]"}],name:"PoolBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"assetManager",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"cashDelta",type:"int256"},{indexed:!1,internalType:"int256",name:"managedDelta",type:"int256"}],name:"PoolBalanceManaged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"PoolRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"RelayerApprovalChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"contract IERC20",name:"tokenIn",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"amountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountOut",type:"uint256"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"TokensDeregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"TokensRegistered",type:"event"},{inputs:[],name:"WETH",outputs:[{internalType:"contract IWETH",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"assetDeltas",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"deregisterTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"getInternalBalance",outputs:[{internalType:"uint256[]",name:"balances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"enum IVault.PoolSpecialization",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPoolTokenInfo",outputs:[{internalType:"uint256",name:"cash",type:"uint256"},{internalType:"uint256",name:"managed",type:"uint256"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"assetManager",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPoolTokens",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract ProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"relayer",type:"address"}],name:"hasApprovedRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.PoolBalanceOpKind",name:"kind",type:"uint8"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct IVault.PoolBalanceOp[]",name:"ops",type:"tuple[]"}],name:"managePoolBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"}],name:"queryBatchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"registerPool",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"registerTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"setAuthorizer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setRelayerApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"amountCalculated",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.Vault__factory=O,O.abi=q},62241:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WETH__factory=void 0;const ie=Y(94464),q=[{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.WETH__factory=O,O.abi=q},70384:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPool2TokensFactory__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.WeightedPool2TokensFactory__factory=O,O.abi=q},31039:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPool2Tokens__factory=void 0;const ie=Y(94464),q=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"token0",type:"address"},{internalType:"contract IERC20",name:"token1",type:"address"},{internalType:"uint256",name:"normalizedWeight0",type:"uint256"},{internalType:"uint256",name:"normalizedWeight1",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct WeightedPool2Tokens.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"OracleEnabledChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLargestSafeQueryWindow",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"}],name:"getLatest",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiscData",outputs:[{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"logTotalSupply",type:"int256"},{internalType:"uint256",name:"oracleSampleCreationTimestamp",type:"uint256"},{internalType:"uint256",name:"oracleIndex",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAccumulatorQuery[]",name:"queries",type:"tuple[]"}],name:"getPastAccumulators",outputs:[{internalType:"int256[]",name:"results",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getSample",outputs:[{internalType:"int256",name:"logPairPrice",type:"int256"},{internalType:"int256",name:"accLogPairPrice",type:"int256"},{internalType:"int256",name:"logBptPrice",type:"int256"},{internalType:"int256",name:"accLogBptPrice",type:"int256"},{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"accLogInvariant",type:"int256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"secs",type:"uint256"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAverageQuery[]",name:"queries",type:"tuple[]"}],name:"getTimeWeightedAverage",outputs:[{internalType:"uint256[]",name:"results",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalSamples",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.WeightedPool2Tokens__factory=O,O.abi=q},69449:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPoolFactory__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"weights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.WeightedPoolFactory__factory=O,O.abi=q},33009:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WeightedPool__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.WeightedPool__factory=O,O.abi=q},52971:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WstETHRateProvider__factory=void 0;const ie=Y(94464),q=[{inputs:[{internalType:"contract IwstETH",name:"_wstETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"wstETH",outputs:[{internalType:"contract IwstETH",name:"",type:"address"}],stateMutability:"view",type:"function"}];class O{static createInterface(){return new ie.utils.Interface(q)}static connect(d,x){return new ie.Contract(d,q,x)}}be.WstETHRateProvider__factory=O,O.abi=q},8206:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WETH__factory=be.InvestmentPoolFactory__factory=be.InvestmentPool__factory=be.WstETHRateProvider__factory=be.LidoRelayer__factory=be.MerkleRedeem__factory=be.MetaStablePoolFactory__factory=be.MetaStablePool__factory=be.LiquidityBootstrappingPoolFactory__factory=be.LiquidityBootstrappingPool__factory=be.StablePoolFactory__factory=be.StablePool__factory=be.WeightedPoolFactory__factory=be.WeightedPool2TokensFactory__factory=be.WeightedPool2Tokens__factory=be.WeightedPool__factory=be.Vault__factory=be.BalancerHelpers__factory=be.Authorizer__factory=void 0;var ie=Y(39885);Object.defineProperty(be,"Authorizer__factory",{enumerable:!0,get:function(){return ie.Authorizer__factory}});var q=Y(77460);Object.defineProperty(be,"BalancerHelpers__factory",{enumerable:!0,get:function(){return q.BalancerHelpers__factory}});var O=Y(49702);Object.defineProperty(be,"Vault__factory",{enumerable:!0,get:function(){return O.Vault__factory}});var E=Y(33009);Object.defineProperty(be,"WeightedPool__factory",{enumerable:!0,get:function(){return E.WeightedPool__factory}});var d=Y(31039);Object.defineProperty(be,"WeightedPool2Tokens__factory",{enumerable:!0,get:function(){return d.WeightedPool2Tokens__factory}});var x=Y(70384);Object.defineProperty(be,"WeightedPool2TokensFactory__factory",{enumerable:!0,get:function(){return x.WeightedPool2TokensFactory__factory}});var f=Y(69449);Object.defineProperty(be,"WeightedPoolFactory__factory",{enumerable:!0,get:function(){return f.WeightedPoolFactory__factory}});var T=Y(34027);Object.defineProperty(be,"StablePool__factory",{enumerable:!0,get:function(){return T.StablePool__factory}});var g=Y(70869);Object.defineProperty(be,"StablePoolFactory__factory",{enumerable:!0,get:function(){return g.StablePoolFactory__factory}});var b=Y(76389);Object.defineProperty(be,"LiquidityBootstrappingPool__factory",{enumerable:!0,get:function(){return b.LiquidityBootstrappingPool__factory}});var l=Y(59198);Object.defineProperty(be,"LiquidityBootstrappingPoolFactory__factory",{enumerable:!0,get:function(){return l.LiquidityBootstrappingPoolFactory__factory}});var h=Y(8337);Object.defineProperty(be,"MetaStablePool__factory",{enumerable:!0,get:function(){return h.MetaStablePool__factory}});var u=Y(83429);Object.defineProperty(be,"MetaStablePoolFactory__factory",{enumerable:!0,get:function(){return u.MetaStablePoolFactory__factory}});var m=Y(45949);Object.defineProperty(be,"MerkleRedeem__factory",{enumerable:!0,get:function(){return m.MerkleRedeem__factory}});var _=Y(89445);Object.defineProperty(be,"LidoRelayer__factory",{enumerable:!0,get:function(){return _.LidoRelayer__factory}});var w=Y(52971);Object.defineProperty(be,"WstETHRateProvider__factory",{enumerable:!0,get:function(){return w.WstETHRateProvider__factory}});var S=Y(99598);Object.defineProperty(be,"InvestmentPool__factory",{enumerable:!0,get:function(){return S.InvestmentPool__factory}});var I=Y(84267);Object.defineProperty(be,"InvestmentPoolFactory__factory",{enumerable:!0,get:function(){return I.InvestmentPoolFactory__factory}});var P=Y(62241);Object.defineProperty(be,"WETH__factory",{enumerable:!0,get:function(){return P.WETH__factory}})},21362:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="abi/5.7.0"},53941:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>o,$:()=>y});var ie=Y(61488),q=Y(92275),O=Y(53898),E=Y(21362),d=Y(91125),x=Y(2885);class f extends d.XI{constructor(v){super("address","address",v,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(v,k){try{k=(0,x.getAddress)(k)}catch(D){this._throwError(D.message,k)}return v.writeValue(k)}decode(v){return(0,x.getAddress)((0,ie.hexZeroPad)(v.readValue().toHexString(),20))}}class T extends d.XI{constructor(v){super(v.name,v.type,void 0,v.dynamic),this.coder=v}defaultValue(){return this.coder.defaultValue()}encode(v,k){return this.coder.encode(v,k)}decode(v){return this.coder.decode(v)}}const g=new O.Logger(E.i);function b(M,v,k){let D=null;if(Array.isArray(k))D=k;else if(k&&"object"==typeof k){let Q={};D=v.map(ee=>{const ce=ee.localName;return ce||g.throwError("cannot encode object for signature with missing names",O.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:ee,value:k}),Q[ce]&&g.throwError("cannot encode object for signature with duplicate names",O.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:ee,value:k}),Q[ce]=!0,k[ce]})}else g.throwArgumentError("invalid tuple value","tuple",k);v.length!==D.length&&g.throwArgumentError("types/value length mismatch","tuple",k);let N=new d.QV(M.wordSize),C=new d.QV(M.wordSize),a=[];v.forEach((Q,ee)=>{let ce=D[ee];if(Q.dynamic){let ue=C.length;Q.encode(C,ce);let we=N.writeUpdatableValue();a.push(ae=>{we(ae+ue)})}else Q.encode(N,ce)}),a.forEach(Q=>{Q(N.length)});let B=M.appendWriter(N);return B+=M.appendWriter(C),B}function l(M,v){let k=[],D=M.subReader(0);v.forEach(C=>{let a=null;if(C.dynamic){let B=M.readValue(),Q=D.subReader(B.toNumber());try{a=C.decode(Q)}catch(ee){if(ee.code===O.Logger.errors.BUFFER_OVERRUN)throw ee;a=ee,a.baseType=C.name,a.name=C.localName,a.type=C.type}}else try{a=C.decode(M)}catch(B){if(B.code===O.Logger.errors.BUFFER_OVERRUN)throw B;a=B,a.baseType=C.name,a.name=C.localName,a.type=C.type}null!=a&&k.push(a)});const N=v.reduce((C,a)=>{const B=a.localName;return B&&(C[B]||(C[B]=0),C[B]++),C},{});v.forEach((C,a)=>{let B=C.localName;if(!B||1!==N[B]||("length"===B&&(B="_length"),null!=k[B]))return;const Q=k[a];Q instanceof Error?Object.defineProperty(k,B,{enumerable:!0,get:()=>{throw Q}}):k[B]=Q});for(let C=0;C{throw a}})}return Object.freeze(k)}class h extends d.XI{constructor(v,k,D){super("array",v.type+"["+(k>=0?k:"")+"]",D,-1===k||v.dynamic),this.coder=v,this.length=k}defaultValue(){const v=this.coder.defaultValue(),k=[];for(let D=0;Dv._data.length&&g.throwError("insufficient data length",O.Logger.errors.BUFFER_OVERRUN,{length:v._data.length,count:k}));let D=[];for(let N=0;N{a.dynamic&&(D=!0),N.push(a.type)}),super("tuple","tuple("+N.join(",")+")",k,D),this.coders=v}defaultValue(){const v=[];this.coders.forEach(D=>{v.push(D.defaultValue())});const k=this.coders.reduce((D,N)=>{const C=N.localName;return C&&(D[C]||(D[C]=0),D[C]++),D},{});return this.coders.forEach((D,N)=>{let C=D.localName;!C||1!==k[C]||("length"===C&&(C="_length"),null==v[C]&&(v[C]=v[N]))}),Object.freeze(v)}encode(v,k){return b(v,this.coders,k)}decode(v){return v.coerce(this.name,l(v,this.coders))}}var H=Y(55586);const j=new O.Logger(E.i),K=new RegExp(/^bytes([0-9]*)$/),R=new RegExp(/^(u?int)([0-9]*)$/);class o{constructor(v){(0,q.defineReadOnly)(this,"coerceFunc",v||null)}_getCoder(v){switch(v.baseType){case"address":return new f(v.name);case"bool":return new u(v.name);case"string":return new W(v.name);case"bytes":return new _(v.name);case"array":return new h(this._getCoder(v.arrayChildren),v.arrayLength,v.name);case"tuple":return new G((v.components||[]).map(D=>this._getCoder(D)),v.name);case"":return new S(v.name)}let k=v.type.match(R);if(k){let D=parseInt(k[2]||"256");return(0===D||D>256||D%8!=0)&&j.throwArgumentError("invalid "+k[1]+" bit length","param",v),new L(D/8,"int"===k[1],v.name)}if(k=v.type.match(K),k){let D=parseInt(k[1]);return(0===D||D>32)&&j.throwArgumentError("invalid bytes length","param",v),new w(D,v.name)}return j.throwArgumentError("invalid type","type",v.type)}_getWordSize(){return 32}_getReader(v,k){return new d.Ej(v,this._getWordSize(),this.coerceFunc,k)}_getWriter(){return new d.QV(this._getWordSize())}getDefaultValue(v){const k=v.map(N=>this._getCoder(H._R.from(N)));return new G(k,"_").defaultValue()}encode(v,k){v.length!==k.length&&j.throwError("types/values length mismatch",O.Logger.errors.INVALID_ARGUMENT,{count:{types:v.length,values:k.length},value:{types:v,values:k}});const D=v.map(a=>this._getCoder(H._R.from(a))),N=new G(D,"_"),C=this._getWriter();return N.encode(C,k),C.data}decode(v,k,D){const N=v.map(a=>this._getCoder(H._R.from(a)));return new G(N,"_").decode(this._getReader((0,ie.arrayify)(k),D))}}const y=new o},91125:(bt,be,Y)=>{"use strict";Y.d(be,{BR:()=>f,XI:()=>T,QV:()=>g,Ej:()=>b});var ie=Y(61488),q=Y(2024),O=Y(92275),E=Y(53898),d=Y(21362);const x=new E.Logger(d.i);function f(l){const h=[],u=function(m,_){if(Array.isArray(_))for(let w in _){const S=m.slice();S.push(w);try{u(S,_[w])}catch(I){h.push({path:S,error:I})}}};return u([],l),h}class T{constructor(h,u,m,_){this.name=h,this.type=u,this.localName=m,this.dynamic=_}_throwError(h,u){x.throwArgumentError(h,this.localName,u)}}class g{constructor(h){(0,O.defineReadOnly)(this,"wordSize",h||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(h)}get data(){return(0,ie.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(h){return this._data.push(h),this._dataLength+=h.length,h.length}appendWriter(h){return this._writeData((0,ie.concat)(h._data))}writeBytes(h){let u=(0,ie.arrayify)(h);const m=u.length%this.wordSize;return m&&(u=(0,ie.concat)([u,this._padding.slice(m)])),this._writeData(u)}_getValue(h){let u=(0,ie.arrayify)(q.O$.from(h));return u.length>this.wordSize&&x.throwError("value out-of-bounds",E.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:u.length}),u.length%this.wordSize&&(u=(0,ie.concat)([this._padding.slice(u.length%this.wordSize),u])),u}writeValue(h){return this._writeData(this._getValue(h))}writeUpdatableValue(){const h=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,u=>{this._data[h]=this._getValue(u)}}}class b{constructor(h,u,m,_){(0,O.defineReadOnly)(this,"_data",(0,ie.arrayify)(h)),(0,O.defineReadOnly)(this,"wordSize",u||32),(0,O.defineReadOnly)(this,"_coerceFunc",m),(0,O.defineReadOnly)(this,"allowLoose",_),this._offset=0}get data(){return(0,ie.hexlify)(this._data)}get consumed(){return this._offset}static coerce(h,u){let m=h.match("^u?int([0-9]+)$");return m&&parseInt(m[1])<=48&&(u=u.toNumber()),u}coerce(h,u){return this._coerceFunc?this._coerceFunc(h,u):b.coerce(h,u)}_peekBytes(h,u,m){let _=Math.ceil(u/this.wordSize)*this.wordSize;return this._offset+_>this._data.length&&(this.allowLoose&&m&&this._offset+u<=this._data.length?_=u:x.throwError("data out-of-bounds",E.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+_})),this._data.slice(this._offset,this._offset+_)}subReader(h){return new b(this._data.slice(this._offset+h),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(h,u){let m=this._peekBytes(0,h,!!u);return this._offset+=m.length,m.slice(0,h)}readValue(){return q.O$.from(this.readBytes(this.wordSize))}}},55586:(bt,be,Y)=>{"use strict";Y.d(be,{pc:()=>h,_R:()=>m,HY:()=>w,QV:()=>S,Xg:()=>V,YW:()=>W,IC:()=>H});var ie=Y(2024),q=Y(92275),O=Y(53898),E=Y(21362);const d=new O.Logger(E.i),x={};let f={calldata:!0,memory:!0,storage:!0},T={calldata:!0,memory:!0};function g(M,v){if("bytes"===M||"string"===M){if(f[v])return!0}else if("address"===M){if("payable"===v)return!0}else if((M.indexOf("[")>=0||"tuple"===M)&&T[v])return!0;return(f[v]||"payable"===v)&&d.throwArgumentError("invalid modifier","name",v),!1}function l(M,v){for(let k in v)(0,q.defineReadOnly)(M,k,v[k])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),u=new RegExp(/^(.*)\[([0-9]*)\]$/);class m{constructor(v,k){v!==x&&d.throwError("use fromString",O.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),l(this,k);let D=this.type.match(u);l(this,D?{arrayLength:parseInt(D[2]||"-1"),arrayChildren:m.fromObject({type:D[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.json){let D={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(D.indexed=this.indexed),this.components&&(D.components=this.components.map(N=>JSON.parse(N.format(v)))),JSON.stringify(D)}let k="";return"array"===this.baseType?(k+=this.arrayChildren.format(v),k+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(v!==h.sighash&&(k+=this.type),k+="("+this.components.map(D=>D.format(v)).join(v===h.full?", ":",")+")"):k+=this.type,v!==h.sighash&&(!0===this.indexed&&(k+=" indexed"),v===h.full&&this.name&&(k+=" "+this.name)),k}static from(v,k){return"string"==typeof v?m.fromString(v,k):m.fromObject(v)}static fromObject(v){return m.isParamType(v)?v:new m(x,{name:v.name||null,type:j(v.type),indexed:null==v.indexed?null:!!v.indexed,components:v.components?v.components.map(m.fromObject):null})}static fromString(v,k){return N=function(M,v){let k=M;function D(B){d.throwArgumentError(`unexpected character at position ${B}`,"param",M)}function N(B){let Q={type:"",name:"",parent:B,state:{allowType:!0}};return v&&(Q.indexed=!1),Q}M=M.replace(/\s/g," ");let C={type:"",name:"",state:{allowType:!0}},a=C;for(let B=0;Bm.fromString(k,v))}class w{constructor(v,k){v!==x&&d.throwError("use a static from method",O.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),l(this,k),this._isFragment=!0,Object.freeze(this)}static from(v){return w.isFragment(v)?v:"string"==typeof v?w.fromString(v):w.fromObject(v)}static fromObject(v){if(w.isFragment(v))return v;switch(v.type){case"function":return W.fromObject(v);case"event":return S.fromObject(v);case"constructor":return V.fromObject(v);case"error":return H.fromObject(v);case"fallback":case"receive":return null}return d.throwArgumentError("invalid fragment object","value",v)}static fromString(v){return"event"===(v=(v=(v=v.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?S.fromString(v.substring(5).trim()):"function"===v.split(" ")[0]?W.fromString(v.substring(8).trim()):"constructor"===v.split("(")[0].trim()?V.fromString(v.trim()):"error"===v.split(" ")[0]?H.fromString(v.substring(5).trim()):d.throwArgumentError("unsupported fragment","value",v)}static isFragment(v){return!(!v||!v._isFragment)}}class S extends w{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(D=>JSON.parse(D.format(v)))});let k="";return v!==h.sighash&&(k+="event "),k+=this.name+"("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ",v!==h.sighash&&this.anonymous&&(k+="anonymous "),k.trim()}static from(v){return"string"==typeof v?S.fromString(v):S.fromObject(v)}static fromObject(v){if(S.isEventFragment(v))return v;"event"!==v.type&&d.throwArgumentError("invalid event object","value",v);const k={name:R(v.name),anonymous:v.anonymous,inputs:v.inputs?v.inputs.map(m.fromObject):[],type:"event"};return new S(x,k)}static fromString(v){let k=v.match(o);k||d.throwArgumentError("invalid event string","value",v);let D=!1;return k[3].split(" ").forEach(N=>{switch(N.trim()){case"anonymous":D=!0;break;case"":break;default:d.warn("unknown modifier: "+N)}}),S.fromObject({name:k[1].trim(),anonymous:D,inputs:_(k[2],!0),type:"event"})}static isEventFragment(v){return v&&v._isFragment&&"event"===v.type}}function I(M,v){v.gas=null;let k=M.split("@");return 1!==k.length?(k.length>2&&d.throwArgumentError("invalid human-readable ABI signature","value",M),k[1].match(/^[0-9]+$/)||d.throwArgumentError("invalid human-readable ABI signature gas","value",M),v.gas=ie.O$.from(k[1]),k[0]):M}function P(M,v){v.constant=!1,v.payable=!1,v.stateMutability="nonpayable",M.split(" ").forEach(k=>{switch(k.trim()){case"constant":v.constant=!0;break;case"payable":v.payable=!0,v.stateMutability="payable";break;case"nonpayable":v.payable=!1,v.stateMutability="nonpayable";break;case"pure":v.constant=!0,v.stateMutability="pure";break;case"view":v.constant=!0,v.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+k)}})}function L(M){let v={constant:!1,payable:!0,stateMutability:"payable"};return null!=M.stateMutability?(v.stateMutability=M.stateMutability,v.constant="view"===v.stateMutability||"pure"===v.stateMutability,null!=M.constant&&!!M.constant!==v.constant&&d.throwArgumentError("cannot have constant function with mutability "+v.stateMutability,"value",M),v.payable="payable"===v.stateMutability,null!=M.payable&&!!M.payable!==v.payable&&d.throwArgumentError("cannot have payable function with mutability "+v.stateMutability,"value",M)):null!=M.payable?(v.payable=!!M.payable,null==M.constant&&!v.payable&&"constructor"!==M.type&&d.throwArgumentError("unable to determine stateMutability","value",M),v.constant=!!M.constant,v.stateMutability=v.constant?"view":v.payable?"payable":"nonpayable",v.payable&&v.constant&&d.throwArgumentError("cannot have constant payable function","value",M)):null!=M.constant?(v.constant=!!M.constant,v.payable=!v.constant,v.stateMutability=v.constant?"view":"payable"):"constructor"!==M.type&&d.throwArgumentError("unable to determine stateMutability","value",M),v}class V extends w{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.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(D=>JSON.parse(D.format(v)))});v===h.sighash&&d.throwError("cannot format a constructor for sighash",O.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let k="constructor("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(k+=this.stateMutability+" "),k.trim()}static from(v){return"string"==typeof v?V.fromString(v):V.fromObject(v)}static fromObject(v){if(V.isConstructorFragment(v))return v;"constructor"!==v.type&&d.throwArgumentError("invalid constructor object","value",v);let k=L(v);k.constant&&d.throwArgumentError("constructor cannot be constant","value",v);const D={name:null,type:v.type,inputs:v.inputs?v.inputs.map(m.fromObject):[],payable:k.payable,stateMutability:k.stateMutability,gas:v.gas?ie.O$.from(v.gas):null};return new V(x,D)}static fromString(v){let k={type:"constructor"},D=(v=I(v,k)).match(o);return(!D||"constructor"!==D[1].trim())&&d.throwArgumentError("invalid constructor string","value",v),k.inputs=_(D[2].trim(),!1),P(D[3].trim(),k),V.fromObject(k)}static isConstructorFragment(v){return v&&v._isFragment&&"constructor"===v.type}}class W extends V{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.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(D=>JSON.parse(D.format(v))),outputs:this.outputs.map(D=>JSON.parse(D.format(v)))});let k="";return v!==h.sighash&&(k+="function "),k+=this.name+"("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ",v!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(k+=this.stateMutability+" "):this.constant&&(k+="view "),this.outputs&&this.outputs.length&&(k+="returns ("+this.outputs.map(D=>D.format(v)).join(", ")+") "),null!=this.gas&&(k+="@"+this.gas.toString()+" ")),k.trim()}static from(v){return"string"==typeof v?W.fromString(v):W.fromObject(v)}static fromObject(v){if(W.isFunctionFragment(v))return v;"function"!==v.type&&d.throwArgumentError("invalid function object","value",v);let k=L(v);const D={type:v.type,name:R(v.name),constant:k.constant,inputs:v.inputs?v.inputs.map(m.fromObject):[],outputs:v.outputs?v.outputs.map(m.fromObject):[],payable:k.payable,stateMutability:k.stateMutability,gas:v.gas?ie.O$.from(v.gas):null};return new W(x,D)}static fromString(v){let k={type:"function"},D=(v=I(v,k)).split(" returns ");D.length>2&&d.throwArgumentError("invalid function string","value",v);let N=D[0].match(o);if(N||d.throwArgumentError("invalid function signature","value",v),k.name=N[1].trim(),k.name&&R(k.name),k.inputs=_(N[2],!1),P(N[3].trim(),k),D.length>1){let C=D[1].match(o);(""!=C[1].trim()||""!=C[3].trim())&&d.throwArgumentError("unexpected tokens","value",v),k.outputs=_(C[2],!1)}else k.outputs=[];return W.fromObject(k)}static isFunctionFragment(v){return v&&v._isFragment&&"function"===v.type}}function G(M){const v=M.format();return("Error(string)"===v||"Panic(uint256)"===v)&&d.throwArgumentError(`cannot specify user defined ${v} error`,"fragment",M),M}class H extends w{format(v){if(v||(v=h.sighash),h[v]||d.throwArgumentError("invalid format type","format",v),v===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(D=>JSON.parse(D.format(v)))});let k="";return v!==h.sighash&&(k+="error "),k+=this.name+"("+this.inputs.map(D=>D.format(v)).join(v===h.full?", ":",")+") ",k.trim()}static from(v){return"string"==typeof v?H.fromString(v):H.fromObject(v)}static fromObject(v){if(H.isErrorFragment(v))return v;"error"!==v.type&&d.throwArgumentError("invalid error object","value",v);const k={type:v.type,name:R(v.name),inputs:v.inputs?v.inputs.map(m.fromObject):[]};return G(new H(x,k))}static fromString(v){let k={type:"error"},D=v.match(o);return D||d.throwArgumentError("invalid error signature","value",v),k.name=D[1].trim(),k.name&&R(k.name),k.inputs=_(D[2],!1),G(H.fromObject(k))}static isErrorFragment(v){return v&&v._isFragment&&"error"===v.type}}function j(M){return M.match(/^uint($|[^1-9])/)?M="uint256"+M.substring(4):M.match(/^int($|[^1-9])/)&&(M="int256"+M.substring(3)),M}const K=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function R(M){return(!M||!M.match(K))&&d.throwArgumentError(`invalid identifier "${M}"`,"value",M),M}const o=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},7910:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{ConstructorFragment:()=>ie.Xg,ErrorFragment:()=>ie.IC,EventFragment:()=>ie.QV,Fragment:()=>ie.HY,FunctionFragment:()=>ie.YW,ParamType:()=>ie._R,FormatTypes:()=>ie.pc,AbiCoder:()=>q.R,defaultAbiCoder:()=>q.$,Interface:()=>O.vU,Indexed:()=>O.Hk,checkResultErrors:()=>E.BR,LogDescription:()=>O.CC,TransactionDescription:()=>O.vk});var ie=Y(55586),q=Y(53941),O=Y(20886),E=Y(91125)},20886:(bt,be,Y)=>{"use strict";Y.d(be,{CC:()=>h,vk:()=>u,Hk:()=>_,vU:()=>I});var ie=Y(2885),q=Y(2024),O=Y(61488),E=Y(67475),d=Y(28518),x=Y(92275),f=Y(53941),T=Y(55586),g=Y(53898),b=Y(21362);const l=new g.Logger(b.i);class h extends x.Description{}class u extends x.Description{}class m extends x.Description{}class _ extends x.Description{static isIndexed(L){return!(!L||!L._isIndexed)}}const w={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function S(P,L){const V=new Error(`deferred error during ABI decoding triggered accessing ${P}`);return V.error=L,V}class I{constructor(L){let V=[];V="string"==typeof L?JSON.parse(L):L,(0,x.defineReadOnly)(this,"fragments",V.map(W=>T.HY.from(W)).filter(W=>null!=W)),(0,x.defineReadOnly)(this,"_abiCoder",(0,x.getStatic)(new.target,"getAbiCoder")()),(0,x.defineReadOnly)(this,"functions",{}),(0,x.defineReadOnly)(this,"errors",{}),(0,x.defineReadOnly)(this,"events",{}),(0,x.defineReadOnly)(this,"structs",{}),this.fragments.forEach(W=>{let G=null;switch(W.type){case"constructor":return this.deploy?void l.warn("duplicate definition - constructor"):void(0,x.defineReadOnly)(this,"deploy",W);case"function":G=this.functions;break;case"event":G=this.events;break;case"error":G=this.errors;break;default:return}let H=W.format();G[H]?l.warn("duplicate definition - "+H):G[H]=W}),this.deploy||(0,x.defineReadOnly)(this,"deploy",T.Xg.from({payable:!1,type:"constructor"})),(0,x.defineReadOnly)(this,"_isInterface",!0)}format(L){L||(L=T.pc.full),L===T.pc.sighash&&l.throwArgumentError("interface does not support formatting sighash","format",L);const V=this.fragments.map(W=>W.format(L));return L===T.pc.json?JSON.stringify(V.map(W=>JSON.parse(W))):V}static getAbiCoder(){return f.$}static getAddress(L){return(0,ie.getAddress)(L)}static getSighash(L){return(0,O.hexDataSlice)((0,E.id)(L.format()),0,4)}static getEventTopic(L){return(0,E.id)(L.format())}getFunction(L){if((0,O.isHexString)(L)){for(const W in this.functions)if(L===this.getSighash(W))return this.functions[W];l.throwArgumentError("no matching function","sighash",L)}if(-1===L.indexOf("(")){const W=L.trim(),G=Object.keys(this.functions).filter(H=>H.split("(")[0]===W);return 0===G.length?l.throwArgumentError("no matching function","name",W):G.length>1&&l.throwArgumentError("multiple matching functions","name",W),this.functions[G[0]]}const V=this.functions[T.YW.fromString(L).format()];return V||l.throwArgumentError("no matching function","signature",L),V}getEvent(L){if((0,O.isHexString)(L)){const W=L.toLowerCase();for(const G in this.events)if(W===this.getEventTopic(G))return this.events[G];l.throwArgumentError("no matching event","topichash",W)}if(-1===L.indexOf("(")){const W=L.trim(),G=Object.keys(this.events).filter(H=>H.split("(")[0]===W);return 0===G.length?l.throwArgumentError("no matching event","name",W):G.length>1&&l.throwArgumentError("multiple matching events","name",W),this.events[G[0]]}const V=this.events[T.QV.fromString(L).format()];return V||l.throwArgumentError("no matching event","signature",L),V}getError(L){if((0,O.isHexString)(L)){const W=(0,x.getStatic)(this.constructor,"getSighash");for(const G in this.errors)if(L===W(this.errors[G]))return this.errors[G];l.throwArgumentError("no matching error","sighash",L)}if(-1===L.indexOf("(")){const W=L.trim(),G=Object.keys(this.errors).filter(H=>H.split("(")[0]===W);return 0===G.length?l.throwArgumentError("no matching error","name",W):G.length>1&&l.throwArgumentError("multiple matching errors","name",W),this.errors[G[0]]}const V=this.errors[T.YW.fromString(L).format()];return V||l.throwArgumentError("no matching error","signature",L),V}getSighash(L){if("string"==typeof L)try{L=this.getFunction(L)}catch(V){try{L=this.getError(L)}catch{throw V}}return(0,x.getStatic)(this.constructor,"getSighash")(L)}getEventTopic(L){return"string"==typeof L&&(L=this.getEvent(L)),(0,x.getStatic)(this.constructor,"getEventTopic")(L)}_decodeParams(L,V){return this._abiCoder.decode(L,V)}_encodeParams(L,V){return this._abiCoder.encode(L,V)}encodeDeploy(L){return this._encodeParams(this.deploy.inputs,L||[])}decodeErrorResult(L,V){"string"==typeof L&&(L=this.getError(L));const W=(0,O.arrayify)(V);return(0,O.hexlify)(W.slice(0,4))!==this.getSighash(L)&&l.throwArgumentError(`data signature does not match error ${L.name}.`,"data",(0,O.hexlify)(W)),this._decodeParams(L.inputs,W.slice(4))}encodeErrorResult(L,V){return"string"==typeof L&&(L=this.getError(L)),(0,O.hexlify)((0,O.concat)([this.getSighash(L),this._encodeParams(L.inputs,V||[])]))}decodeFunctionData(L,V){"string"==typeof L&&(L=this.getFunction(L));const W=(0,O.arrayify)(V);return(0,O.hexlify)(W.slice(0,4))!==this.getSighash(L)&&l.throwArgumentError(`data signature does not match function ${L.name}.`,"data",(0,O.hexlify)(W)),this._decodeParams(L.inputs,W.slice(4))}encodeFunctionData(L,V){return"string"==typeof L&&(L=this.getFunction(L)),(0,O.hexlify)((0,O.concat)([this.getSighash(L),this._encodeParams(L.inputs,V||[])]))}decodeFunctionResult(L,V){"string"==typeof L&&(L=this.getFunction(L));let W=(0,O.arrayify)(V),G=null,H="",j=null,K=null,R=null;switch(W.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(L.outputs,W)}catch{}break;case 4:{const o=(0,O.hexlify)(W.slice(0,4)),y=w[o];if(y)j=this._abiCoder.decode(y.inputs,W.slice(4)),K=y.name,R=y.signature,y.reason&&(G=j[0]),"Error"===K?H=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(j[0])}`:"Panic"===K&&(H=`; VM Exception while processing transaction: reverted with panic code ${j[0]}`);else try{const M=this.getError(o);j=this._abiCoder.decode(M.inputs,W.slice(4)),K=M.name,R=M.format()}catch{}break}}return l.throwError("call revert exception"+H,g.Logger.errors.CALL_EXCEPTION,{method:L.format(),data:(0,O.hexlify)(V),errorArgs:j,errorName:K,errorSignature:R,reason:G})}encodeFunctionResult(L,V){return"string"==typeof L&&(L=this.getFunction(L)),(0,O.hexlify)(this._abiCoder.encode(L.outputs,V||[]))}encodeFilterTopics(L,V){"string"==typeof L&&(L=this.getEvent(L)),V.length>L.inputs.length&&l.throwError("too many arguments for "+L.format(),g.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:V});let W=[];L.anonymous||W.push(this.getEventTopic(L));const G=(H,j)=>"string"===H.type?(0,E.id)(j):"bytes"===H.type?(0,d.keccak256)((0,O.hexlify)(j)):("bool"===H.type&&"boolean"==typeof j&&(j=j?"0x01":"0x00"),H.type.match(/^u?int/)&&(j=q.O$.from(j).toHexString()),"address"===H.type&&this._abiCoder.encode(["address"],[j]),(0,O.hexZeroPad)((0,O.hexlify)(j),32));for(V.forEach((H,j)=>{let K=L.inputs[j];K.indexed?null==H?W.push(null):"array"===K.baseType||"tuple"===K.baseType?l.throwArgumentError("filtering with tuples or arrays not supported","contract."+K.name,H):Array.isArray(H)?W.push(H.map(R=>G(K,R))):W.push(G(K,H)):null!=H&&l.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+K.name,H)});W.length&&null===W[W.length-1];)W.pop();return W}encodeEventLog(L,V){"string"==typeof L&&(L=this.getEvent(L));const W=[],G=[],H=[];return L.anonymous||W.push(this.getEventTopic(L)),V.length!==L.inputs.length&&l.throwArgumentError("event arguments/values mismatch","values",V),L.inputs.forEach((j,K)=>{const R=V[K];if(j.indexed)if("string"===j.type)W.push((0,E.id)(R));else if("bytes"===j.type)W.push((0,d.keccak256)(R));else{if("tuple"===j.baseType||"array"===j.baseType)throw new Error("not implemented");W.push(this._abiCoder.encode([j.type],[R]))}else G.push(j),H.push(R)}),{data:this._abiCoder.encode(G,H),topics:W}}decodeEventLog(L,V,W){if("string"==typeof L&&(L=this.getEvent(L)),null!=W&&!L.anonymous){let v=this.getEventTopic(L);(!(0,O.isHexString)(W[0],32)||W[0].toLowerCase()!==v)&&l.throwError("fragment/topic mismatch",g.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:v,value:W[0]}),W=W.slice(1)}let G=[],H=[],j=[];L.inputs.forEach((v,k)=>{v.indexed?"string"===v.type||"bytes"===v.type||"tuple"===v.baseType||"array"===v.baseType?(G.push(T._R.fromObject({type:"bytes32",name:v.name})),j.push(!0)):(G.push(v),j.push(!1)):(H.push(v),j.push(!1))});let K=null!=W?this._abiCoder.decode(G,(0,O.concat)(W)):null,R=this._abiCoder.decode(H,V,!0),o=[],y=0,M=0;L.inputs.forEach((v,k)=>{if(v.indexed)if(null==K)o[k]=new _({_isIndexed:!0,hash:null});else if(j[k])o[k]=new _({_isIndexed:!0,hash:K[M++]});else try{o[k]=K[M++]}catch(D){o[k]=D}else try{o[k]=R[y++]}catch(D){o[k]=D}if(v.name&&null==o[v.name]){const D=o[k];D instanceof Error?Object.defineProperty(o,v.name,{enumerable:!0,get:()=>{throw S(`property ${JSON.stringify(v.name)}`,D)}}):o[v.name]=D}});for(let v=0;v{throw S(`index ${v}`,k)}})}return Object.freeze(o)}parseTransaction(L){let V=this.getFunction(L.data.substring(0,10).toLowerCase());return V?new u({args:this._abiCoder.decode(V.inputs,"0x"+L.data.substring(10)),functionFragment:V,name:V.name,signature:V.format(),sighash:this.getSighash(V),value:q.O$.from(L.value||"0")}):null}parseLog(L){let V=this.getEvent(L.topics[0]);return!V||V.anonymous?null:new h({eventFragment:V,name:V.name,signature:V.format(),topic:this.getEventTopic(V),args:this.decodeEventLog(V,L.data,L.topics)})}parseError(L){const V=(0,O.hexlify)(L);let W=this.getError(V.substring(0,10).toLowerCase());return W?new m({args:this._abiCoder.decode(W.inputs,"0x"+V.substring(10)),errorFragment:W,name:W.name,signature:W.format(),sighash:this.getSighash(W)}):null}static isInterface(L){return!(!L||!L._isInterface)}}},11527:(bt,be,Y)=>{"use strict";Y.d(be,{Sg:()=>f,zt:()=>l});var ie=Y(2024),q=Y(92275),O=Y(53898);const x=new O.Logger("abstract-provider/5.7.0");class f extends q.Description{static isForkEvent(u){return!(!u||!u._isForkEvent)}}class l{constructor(){x.checkAbstract(new.target,l),(0,q.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return h=this,u=void 0,_=function*(){const{block:u,gasPrice:m}=yield(0,q.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(I=>null)});let _=null,w=null,S=null;return u&&u.baseFeePerGas&&(_=u.baseFeePerGas,S=ie.O$.from("1500000000"),w=u.baseFeePerGas.mul(2).add(S)),{lastBaseFeePerGas:_,maxFeePerGas:w,maxPriorityFeePerGas:S,gasPrice:m}},new((m=void 0)||(m=Promise))(function(S,I){function P(W){try{V(_.next(W))}catch(G){I(G)}}function L(W){try{V(_.throw(W))}catch(G){I(G)}}function V(W){W.done?S(W.value):function(S){return S instanceof m?S:new m(function(I){I(S)})}(W.value).then(P,L)}V((_=_.apply(h,u||[])).next())});var h,u,m,_}addListener(u,m){return this.on(u,m)}removeListener(u,m){return this.off(u,m)}static isProvider(u){return!(!u||!u._isProvider)}}},11221:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{Signer:()=>T,VoidSigner:()=>g});var ie=Y(92275),q=Y(53898),E=function(b,l,h,u){return new(h||(h=Promise))(function(_,w){function S(L){try{P(u.next(L))}catch(V){w(V)}}function I(L){try{P(u.throw(L))}catch(V){w(V)}}function P(L){L.done?_(L.value):function(_){return _ instanceof h?_:new h(function(w){w(_)})}(L.value).then(S,I)}P((u=u.apply(b,l||[])).next())})};const d=new q.Logger("abstract-signer/5.7.0"),x=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],f=[q.Logger.errors.INSUFFICIENT_FUNDS,q.Logger.errors.NONCE_EXPIRED,q.Logger.errors.REPLACEMENT_UNDERPRICED];class T{constructor(){d.checkAbstract(new.target,T),(0,ie.defineReadOnly)(this,"_isSigner",!0)}getBalance(l){return E(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),l)})}getTransactionCount(l){return E(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),l)})}estimateGas(l){return E(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const h=yield(0,ie.resolveProperties)(this.checkTransaction(l));return yield this.provider.estimateGas(h)})}call(l,h){return E(this,void 0,void 0,function*(){this._checkProvider("call");const u=yield(0,ie.resolveProperties)(this.checkTransaction(l));return yield this.provider.call(u,h)})}sendTransaction(l){return E(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const h=yield this.populateTransaction(l),u=yield this.signTransaction(h);return yield this.provider.sendTransaction(u)})}getChainId(){return E(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return E(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return E(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(l){return E(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(l)})}checkTransaction(l){for(const u in l)-1===x.indexOf(u)&&d.throwArgumentError("invalid transaction key: "+u,"transaction",l);const h=(0,ie.shallowCopy)(l);return h.from=null==h.from?this.getAddress():Promise.all([Promise.resolve(h.from),this.getAddress()]).then(u=>(u[0].toLowerCase()!==u[1].toLowerCase()&&d.throwArgumentError("from address mismatch","transaction",l),u[0])),h}populateTransaction(l){return E(this,void 0,void 0,function*(){const h=yield(0,ie.resolveProperties)(this.checkTransaction(l));null!=h.to&&(h.to=Promise.resolve(h.to).then(m=>E(this,void 0,void 0,function*(){if(null==m)return null;const _=yield this.resolveName(m);return null==_&&d.throwArgumentError("provided ENS name resolves to null","tx.to",m),_})),h.to.catch(m=>{}));const u=null!=h.maxFeePerGas||null!=h.maxPriorityFeePerGas;if(null==h.gasPrice||2!==h.type&&!u?(0===h.type||1===h.type)&&u&&d.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",l):d.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",l),2!==h.type&&null!=h.type||null==h.maxFeePerGas||null==h.maxPriorityFeePerGas)if(0===h.type||1===h.type)null==h.gasPrice&&(h.gasPrice=this.getGasPrice());else{const m=yield this.getFeeData();if(null==h.type)if(null!=m.maxFeePerGas&&null!=m.maxPriorityFeePerGas)if(h.type=2,null!=h.gasPrice){const _=h.gasPrice;delete h.gasPrice,h.maxFeePerGas=_,h.maxPriorityFeePerGas=_}else null==h.maxFeePerGas&&(h.maxFeePerGas=m.maxFeePerGas),null==h.maxPriorityFeePerGas&&(h.maxPriorityFeePerGas=m.maxPriorityFeePerGas);else null!=m.gasPrice?(u&&d.throwError("network does not support EIP-1559",q.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==h.gasPrice&&(h.gasPrice=m.gasPrice),h.type=0):d.throwError("failed to get consistent fee data",q.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===h.type&&(null==h.maxFeePerGas&&(h.maxFeePerGas=m.maxFeePerGas),null==h.maxPriorityFeePerGas&&(h.maxPriorityFeePerGas=m.maxPriorityFeePerGas))}else h.type=2;return null==h.nonce&&(h.nonce=this.getTransactionCount("pending")),null==h.gasLimit&&(h.gasLimit=this.estimateGas(h).catch(m=>{if(f.indexOf(m.code)>=0)throw m;return d.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:m,tx:h})})),h.chainId=null==h.chainId?this.getChainId():Promise.all([Promise.resolve(h.chainId),this.getChainId()]).then(m=>(0!==m[1]&&m[0]!==m[1]&&d.throwArgumentError("chainId address mismatch","transaction",l),m[0])),yield(0,ie.resolveProperties)(h)})}_checkProvider(l){this.provider||d.throwError("missing provider",q.Logger.errors.UNSUPPORTED_OPERATION,{operation:l||"_checkProvider"})}static isSigner(l){return!(!l||!l._isSigner)}}class g extends T{constructor(l,h){super(),(0,ie.defineReadOnly)(this,"address",l),(0,ie.defineReadOnly)(this,"provider",h||null)}getAddress(){return Promise.resolve(this.address)}_fail(l,h){return Promise.resolve().then(()=>{d.throwError(l,q.Logger.errors.UNSUPPORTED_OPERATION,{operation:h})})}signMessage(l){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(l){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(l,h,u){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(l){return new g(this.address,l)}}},2885:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{getAddress:()=>m,getContractAddress:()=>S,getCreate2Address:()=>I,getIcapAddress:()=>w,isAddress:()=>_});var ie=Y(61488),q=Y(2024),O=Y(28518),E=Y(29276);const f=new(Y(53898).Logger)("address/5.7.0");function T(P){(0,ie.isHexString)(P,20)||f.throwArgumentError("invalid address","address",P);const L=(P=P.toLowerCase()).substring(2).split(""),V=new Uint8Array(40);for(let G=0;G<40;G++)V[G]=L[G].charCodeAt(0);const W=(0,ie.arrayify)((0,O.keccak256)(V));for(let G=0;G<40;G+=2)W[G>>1]>>4>=8&&(L[G]=L[G].toUpperCase()),(15&W[G>>1])>=8&&(L[G+1]=L[G+1].toUpperCase());return"0x"+L.join("")}const l={};for(let P=0;P<10;P++)l[String(P)]=String(P);for(let P=0;P<26;P++)l[String.fromCharCode(65+P)]=String(10+P);const h=Math.floor((P=9007199254740991,Math.log10?Math.log10(P):Math.log(P)/Math.LN10));var P;function u(P){let L=(P=(P=P.toUpperCase()).substring(4)+P.substring(0,2)+"00").split("").map(W=>l[W]).join("");for(;L.length>=h;){let W=L.substring(0,h);L=parseInt(W,10)%97+L.substring(W.length)}let V=String(98-parseInt(L,10)%97);for(;V.length<2;)V="0"+V;return V}function m(P){let L=null;if("string"!=typeof P&&f.throwArgumentError("invalid address","address",P),P.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==P.substring(0,2)&&(P="0x"+P),L=T(P),P.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&L!==P&&f.throwArgumentError("bad address checksum","address",P);else if(P.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(P.substring(2,4)!==u(P)&&f.throwArgumentError("bad icap checksum","address",P),L=(0,q.g$)(P.substring(4));L.length<40;)L="0"+L;L=T("0x"+L)}else f.throwArgumentError("invalid address","address",P);return L}function _(P){try{return m(P),!0}catch{}return!1}function w(P){let L=(0,q.t2)(m(P).substring(2)).toUpperCase();for(;L.length<30;)L="0"+L;return"XE"+u("XE00"+L)+L}function S(P){let L=null;try{L=m(P.from)}catch{f.throwArgumentError("missing from address","transaction",P)}const V=(0,ie.stripZeros)((0,ie.arrayify)(q.O$.from(P.nonce).toHexString()));return m((0,ie.hexDataSlice)((0,O.keccak256)((0,E.encode)([L,V])),12))}function I(P,L,V){return 32!==(0,ie.hexDataLength)(L)&&f.throwArgumentError("salt must be 32 bytes","salt",L),32!==(0,ie.hexDataLength)(V)&&f.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",V),m((0,ie.hexDataSlice)((0,O.keccak256)((0,ie.concat)(["0xff",m(P),L,V])),12))}},53744:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BaseX:()=>O,Base32:()=>E,Base58:()=>d});var ie=Y(61488),q=Y(92275);class O{constructor(f){(0,q.defineReadOnly)(this,"alphabet",f),(0,q.defineReadOnly)(this,"base",f.length),(0,q.defineReadOnly)(this,"_alphabetMap",{}),(0,q.defineReadOnly)(this,"_leader",f.charAt(0));for(let T=0;T0;)g.push(h%this.base),h=h/this.base|0}let b="";for(let l=0;0===T[l]&&l=0;--l)b+=this.alphabet[g[l]];return b}decode(f){if("string"!=typeof f)throw new TypeError("Expected String");let T=[];if(0===f.length)return new Uint8Array(T);T.push(0);for(let g=0;g>=8;for(;l>0;)T.push(255&l),l>>=8}for(let g=0;f[g]===this._leader&&g{"use strict";Y.d(be,{i:()=>ie});const ie="bignumber/5.7.0"},2024:(bt,be,Y)=>{"use strict";Y.d(be,{Zm:()=>b,O$:()=>h,g$:()=>S,t2:()=>I});var ie=Y(62630),q=Y.n(ie),O=Y(61488),E=Y(53898),d=Y(64325),x=q().BN;const f=new E.Logger(d.i),T={},g=9007199254740991;function b(P){return null!=P&&(h.isBigNumber(P)||"number"==typeof P&&P%1==0||"string"==typeof P&&!!P.match(/^-?[0-9]+$/)||(0,O.isHexString)(P)||"bigint"==typeof P||(0,O.isBytes)(P))}let l=!1;class h{constructor(L,V){L!==T&&f.throwError("cannot call constructor directly; use BigNumber.from",E.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=V,this._isBigNumber=!0,Object.freeze(this)}fromTwos(L){return m(_(this).fromTwos(L))}toTwos(L){return m(_(this).toTwos(L))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(L){return m(_(this).add(_(L)))}sub(L){return m(_(this).sub(_(L)))}div(L){return h.from(L).isZero()&&w("division-by-zero","div"),m(_(this).div(_(L)))}mul(L){return m(_(this).mul(_(L)))}mod(L){const V=_(L);return V.isNeg()&&w("division-by-zero","mod"),m(_(this).umod(V))}pow(L){const V=_(L);return V.isNeg()&&w("negative-power","pow"),m(_(this).pow(V))}and(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("unbound-bitwise-result","and"),m(_(this).and(V))}or(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("unbound-bitwise-result","or"),m(_(this).or(V))}xor(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("unbound-bitwise-result","xor"),m(_(this).xor(V))}mask(L){return(this.isNegative()||L<0)&&w("negative-width","mask"),m(_(this).maskn(L))}shl(L){return(this.isNegative()||L<0)&&w("negative-width","shl"),m(_(this).shln(L))}shr(L){return(this.isNegative()||L<0)&&w("negative-width","shr"),m(_(this).shrn(L))}eq(L){return _(this).eq(_(L))}lt(L){return _(this).lt(_(L))}lte(L){return _(this).lte(_(L))}gt(L){return _(this).gt(_(L))}gte(L){return _(this).gte(_(L))}isNegative(){return"-"===this._hex[0]}isZero(){return _(this).isZero()}toNumber(){try{return _(this).toNumber()}catch{w("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return f.throwError("this platform does not support BigInt",E.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?l||(l=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):f.throwError(16===arguments[0]?"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()":"BigNumber.toString does not accept parameters",E.Logger.errors.UNEXPECTED_ARGUMENT,{})),_(this).toString(10)}toHexString(){return this._hex}toJSON(L){return{type:"BigNumber",hex:this.toHexString()}}static from(L){if(L instanceof h)return L;if("string"==typeof L)return L.match(/^-?0x[0-9a-f]+$/i)?new h(T,u(L)):L.match(/^-?[0-9]+$/)?new h(T,u(new x(L))):f.throwArgumentError("invalid BigNumber string","value",L);if("number"==typeof L)return L%1&&w("underflow","BigNumber.from",L),(L>=g||L<=-g)&&w("overflow","BigNumber.from",L),h.from(String(L));const V=L;if("bigint"==typeof V)return h.from(V.toString());if((0,O.isBytes)(V))return h.from((0,O.hexlify)(V));if(V)if(V.toHexString){const W=V.toHexString();if("string"==typeof W)return h.from(W)}else{let W=V._hex;if(null==W&&"BigNumber"===V.type&&(W=V.hex),"string"==typeof W&&((0,O.isHexString)(W)||"-"===W[0]&&(0,O.isHexString)(W.substring(1))))return h.from(W)}return f.throwArgumentError("invalid BigNumber value","value",L)}static isBigNumber(L){return!(!L||!L._isBigNumber)}}function u(P){if("string"!=typeof P)return u(P.toString(16));if("-"===P[0])return"-"===(P=P.substring(1))[0]&&f.throwArgumentError("invalid hex","value",P),"0x00"===(P=u(P))?P:"-"+P;if("0x"!==P.substring(0,2)&&(P="0x"+P),"0x"===P)return"0x00";for(P.length%2&&(P="0x0"+P.substring(2));P.length>4&&"0x00"===P.substring(0,4);)P="0x"+P.substring(4);return P}function m(P){return h.from(u(P))}function _(P){const L=h.from(P).toHexString();return new x("-"===L[0]?"-"+L.substring(3):L.substring(2),16)}function w(P,L,V){const W={fault:P,operation:L};return null!=V&&(W.value=V),f.throwError(P,E.Logger.errors.NUMERIC_FAULT,W)}function S(P){return new x(P,36).toString(16)}function I(P){return new x(P,16).toString(36)}},71677:(bt,be,Y)=>{"use strict";Y.d(be,{S5:()=>h,Ox:()=>u,xO:()=>m,xs:()=>_});var ie=Y(61488),q=Y(53898),O=Y(64325),E=Y(2024);const d=new q.Logger(O.i),x={},f=E.O$.from(0),T=E.O$.from(-1);function g(I,P,L,V){const W={fault:P,operation:L};return void 0!==V&&(W.value=V),d.throwError(I,q.Logger.errors.NUMERIC_FAULT,W)}let b="0";for(;b.length<256;)b+=b;function l(I){if("number"!=typeof I)try{I=E.O$.from(I).toNumber()}catch{}return"number"==typeof I&&I>=0&&I<=256&&!(I%1)?"1"+b.substring(0,I):d.throwArgumentError("invalid decimal size","decimals",I)}function h(I,P){null==P&&(P=0);const L=l(P),V=(I=E.O$.from(I)).lt(f);V&&(I=I.mul(T));let W=I.mod(L).toString();for(;W.length2&&d.throwArgumentError("too many decimal points","value",I);let G=W[0],H=W[1];for(G||(G="0"),H||(H="0");"0"===H[H.length-1];)H=H.substring(0,H.length-1);for(H.length>L.length-1&&g("fractional component exceeds decimals","underflow","parseFixed"),""===H&&(H="0");H.lengthnull==P[H]?K:(typeof P[H]!==j&&d.throwArgumentError("invalid fixed format ("+H+" not "+j+")","format."+H,P[H]),P[H]);L=G("signed","boolean",L),V=G("width","number",V),W=G("decimals","number",W)}return V%8&&d.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",V),W>80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",W),new m(x,L,V,W)}}class _{constructor(P,L,V,W){P!==x&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",q.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=W,this._hex=L,this._value=V,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(P){this.format.name!==P.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",P)}addUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.add(V),this.format.decimals,this.format)}subUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.sub(V),this.format.decimals,this.format)}mulUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.mul(V).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(P){this._checkFormat(P);const L=u(this._value,this.format.decimals),V=u(P._value,P.format.decimals);return _.fromValue(L.mul(this.format._multiplier).div(V),this.format.decimals,this.format)}floor(){const P=this.toString().split(".");1===P.length&&P.push("0");let L=_.from(P[0],this.format);const V=!P[1].match(/^(0*)$/);return this.isNegative()&&V&&(L=L.subUnsafe(w.toFormat(L.format))),L}ceiling(){const P=this.toString().split(".");1===P.length&&P.push("0");let L=_.from(P[0],this.format);const V=!P[1].match(/^(0*)$/);return!this.isNegative()&&V&&(L=L.addUnsafe(w.toFormat(L.format))),L}round(P){null==P&&(P=0);const L=this.toString().split(".");if(1===L.length&&L.push("0"),(P<0||P>80||P%1)&&d.throwArgumentError("invalid decimal count","decimals",P),L[1].length<=P)return this;const V=_.from("1"+b.substring(0,P),this.format),W=S.toFormat(this.format);return this.mulUnsafe(V).addUnsafe(W).floor().divUnsafe(V)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(P){if(null==P)return this._hex;P%8&&d.throwArgumentError("invalid byte width","width",P);const L=E.O$.from(this._hex).fromTwos(this.format.width).toTwos(P).toHexString();return(0,ie.hexZeroPad)(L,P/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(P){return _.fromString(this._value,P)}static fromValue(P,L,V){return null==V&&null!=L&&!(0,E.Zm)(L)&&(V=L,L=null),null==L&&(L=0),null==V&&(V="fixed"),_.fromString(h(P,L),m.from(V))}static fromString(P,L){null==L&&(L="fixed");const V=m.from(L),W=u(P,V.decimals);!V.signed&&W.lt(f)&&g("unsigned value cannot be negative","overflow","value",P);let G=null;V.signed?G=W.toTwos(V.width).toHexString():(G=W.toHexString(),G=(0,ie.hexZeroPad)(G,V.width/8));const H=h(W,V.decimals);return new _(x,G,H,V)}static fromBytes(P,L){null==L&&(L="fixed");const V=m.from(L);if((0,ie.arrayify)(P).length>V.width/8)throw new Error("overflow");let W=E.O$.from(P);V.signed&&(W=W.fromTwos(V.width));const G=W.toTwos((V.signed?0:1)+V.width).toHexString(),H=h(W,V.decimals);return new _(x,G,H,V)}static from(P,L){if("string"==typeof P)return _.fromString(P,L);if((0,ie.isBytes)(P))return _.fromBytes(P,L);try{return _.fromValue(P,0,L)}catch(V){if(V.code!==q.Logger.errors.INVALID_ARGUMENT)throw V}return d.throwArgumentError("invalid FixedNumber value","value",P)}static isFixedNumber(P){return!(!P||!P._isFixedNumber)}}const w=_.from(1),S=_.from("0.5")},34078:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BigNumber:()=>ie.O$,formatFixed:()=>q.S5,FixedFormat:()=>q.xO,FixedNumber:()=>q.xs,parseFixed:()=>q.Ox,_base16To36:()=>ie.t2,_base36To16:()=>ie.g$});var ie=Y(2024),q=Y(71677)},61488:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{arrayify:()=>g,concat:()=>b,hexConcat:()=>I,hexDataLength:()=>w,hexDataSlice:()=>S,hexStripZeros:()=>L,hexValue:()=>P,hexZeroPad:()=>V,hexlify:()=>_,isBytes:()=>T,isBytesLike:()=>x,isHexString:()=>u,joinSignature:()=>G,splitSignature:()=>W,stripZeros:()=>l,zeroPad:()=>h});const O=new(Y(53898).Logger)("bytes/5.7.0");function E(H){return!!H.toHexString}function d(H){return H.slice||(H.slice=function(){const j=Array.prototype.slice.call(arguments);return d(new Uint8Array(Array.prototype.slice.apply(H,j)))}),H}function x(H){return u(H)&&!(H.length%2)||T(H)}function f(H){return"number"==typeof H&&H==H&&H%1==0}function T(H){if(null==H)return!1;if(H.constructor===Uint8Array)return!0;if("string"==typeof H||!f(H.length)||H.length<0)return!1;for(let j=0;j=256)return!1}return!0}function g(H,j){if(j||(j={}),"number"==typeof H){O.checkSafeUint53(H,"invalid arrayify value");const K=[];for(;H;)K.unshift(255&H),H=parseInt(String(H/256));return 0===K.length&&K.push(0),d(new Uint8Array(K))}if(j.allowMissingPrefix&&"string"==typeof H&&"0x"!==H.substring(0,2)&&(H="0x"+H),E(H)&&(H=H.toHexString()),u(H)){let K=H.substring(2);K.length%2&&("left"===j.hexPad?K="0"+K:"right"===j.hexPad?K+="0":O.throwArgumentError("hex data is odd-length","value",H));const R=[];for(let o=0;og(o)),K=j.reduce((o,y)=>o+y.length,0),R=new Uint8Array(K);return j.reduce((o,y)=>(R.set(y,o),o+y.length),0),d(R)}function l(H){let j=g(H);if(0===j.length)return j;let K=0;for(;Kj&&O.throwArgumentError("value out of range","value",arguments[0]);const K=new Uint8Array(j);return K.set(H,j-H.length),d(K)}function u(H,j){return!("string"!=typeof H||!H.match(/^0x[0-9A-Fa-f]*$/)||j&&H.length!==2+2*j)}const m="0123456789abcdef";function _(H,j){if(j||(j={}),"number"==typeof H){O.checkSafeUint53(H,"invalid hexlify value");let K="";for(;H;)K=m[15&H]+K,H=Math.floor(H/16);return K.length?(K.length%2&&(K="0"+K),"0x"+K):"0x00"}if("bigint"==typeof H)return(H=H.toString(16)).length%2?"0x0"+H:"0x"+H;if(j.allowMissingPrefix&&"string"==typeof H&&"0x"!==H.substring(0,2)&&(H="0x"+H),E(H))return H.toHexString();if(u(H))return H.length%2&&("left"===j.hexPad?H="0x0"+H.substring(2):"right"===j.hexPad?H+="0":O.throwArgumentError("hex data is odd-length","value",H)),H.toLowerCase();if(T(H)){let K="0x";for(let R=0;R>4]+m[15&o]}return K}return O.throwArgumentError("invalid hexlify value","value",H)}function w(H){if("string"!=typeof H)H=_(H);else if(!u(H)||H.length%2)return null;return(H.length-2)/2}function S(H,j,K){return"string"!=typeof H?H=_(H):(!u(H)||H.length%2)&&O.throwArgumentError("invalid hexData","value",H),j=2+2*j,null!=K?"0x"+H.substring(j,2+2*K):"0x"+H.substring(j)}function I(H){let j="0x";return H.forEach(K=>{j+=_(K).substring(2)}),j}function P(H){const j=L(_(H,{hexPad:"left"}));return"0x"===j?"0x0":j}function L(H){"string"!=typeof H&&(H=_(H)),u(H)||O.throwArgumentError("invalid hex string","value",H),H=H.substring(2);let j=0;for(;j2*j+2&&O.throwArgumentError("value out of range","value",arguments[1]);H.length<2*j+2;)H="0x0"+H.substring(2);return H}function W(H){const j={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(x(H)){let K=g(H);64===K.length?(j.v=27+(K[32]>>7),K[32]&=127,j.r=_(K.slice(0,32)),j.s=_(K.slice(32,64))):65===K.length?(j.r=_(K.slice(0,32)),j.s=_(K.slice(32,64)),j.v=K[64]):O.throwArgumentError("invalid signature string","signature",H),j.v<27&&(0===j.v||1===j.v?j.v+=27:O.throwArgumentError("signature invalid v byte","signature",H)),j.recoveryParam=1-j.v%2,j.recoveryParam&&(K[32]|=128),j._vs=_(K.slice(32,64))}else{if(j.r=H.r,j.s=H.s,j.v=H.v,j.recoveryParam=H.recoveryParam,j._vs=H._vs,null!=j._vs){const o=h(g(j._vs),32);j._vs=_(o);const y=o[0]>=128?1:0;null==j.recoveryParam?j.recoveryParam=y:j.recoveryParam!==y&&O.throwArgumentError("signature recoveryParam mismatch _vs","signature",H),o[0]&=127;const M=_(o);null==j.s?j.s=M:j.s!==M&&O.throwArgumentError("signature v mismatch _vs","signature",H)}null==j.recoveryParam?null==j.v?O.throwArgumentError("signature missing v and recoveryParam","signature",H):j.recoveryParam=0===j.v||1===j.v?j.v:1-j.v%2:null==j.v?j.v=27+j.recoveryParam:j.recoveryParam!==(0===j.v||1===j.v?j.v:1-j.v%2)&&O.throwArgumentError("signature recoveryParam mismatch v","signature",H),null!=j.r&&u(j.r)?j.r=V(j.r,32):O.throwArgumentError("signature missing or invalid r","signature",H),null!=j.s&&u(j.s)?j.s=V(j.s,32):O.throwArgumentError("signature missing or invalid s","signature",H);const K=g(j.s);K[0]>=128&&O.throwArgumentError("signature s out of range","signature",H),j.recoveryParam&&(K[0]|=128);const R=_(K);j._vs&&(u(j._vs)||O.throwArgumentError("signature invalid _vs","signature",H),j._vs=V(j._vs,32)),null==j._vs?j._vs=R:j._vs!==R&&O.throwArgumentError("signature _vs mismatch v and s","signature",H)}return j.yParityAndS=j._vs,j.compact=j.r+j.yParityAndS.substring(2),j}function G(H){return _(b([(H=W(H)).r,H.s,H.recoveryParam?"0x1c":"0x1b"]))}},51528:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>ie});const ie="0x0000000000000000000000000000000000000000"},16659:(bt,be,Y)=>{"use strict";Y.d(be,{tL:()=>q,_Y:()=>O,fh:()=>E,Py:()=>d,Ce:()=>x,Bz:()=>f,$B:()=>T,PS:()=>g});var ie=Y(2024);const q=ie.O$.from(-1),O=ie.O$.from(0),E=ie.O$.from(1),d=ie.O$.from(2),x=ie.O$.from("1000000000000000000"),f=ie.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),T=ie.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),g=ie.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},45052:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>ie});const ie="0x0000000000000000000000000000000000000000000000000000000000000000"},11843:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{AddressZero:()=>ie.d,EtherSymbol:()=>E,HashZero:()=>O.R,MaxInt256:()=>q.PS,MaxUint256:()=>q.Bz,MinInt256:()=>q.$B,NegativeOne:()=>q.tL,One:()=>q.fh,Two:()=>q.Py,WeiPerEther:()=>q.Ce,Zero:()=>q._Y});var ie=Y(51528),q=Y(16659),O=Y(45052);const E="\u039e"},36776:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BaseContract:()=>y,Contract:()=>M,ContractFactory:()=>v});var ie=Y(91125),q=Y(20886),O=Y(11527),E=Y(11221),d=Y(2885),x=Y(2024),f=Y(61488),T=Y(92275),g=Y(32701),b=Y(53898),h=function(k,D,N,C){return new(N||(N=Promise))(function(B,Q){function ee(we){try{ue(C.next(we))}catch(ae){Q(ae)}}function ce(we){try{ue(C.throw(we))}catch(ae){Q(ae)}}function ue(we){we.done?B(we.value):function(B){return B instanceof N?B:new N(function(Q){Q(B)})}(we.value).then(ee,ce)}ue((C=C.apply(k,D||[])).next())})};const u=new b.Logger("contracts/5.7.0"),m={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function _(k,D){return h(this,void 0,void 0,function*(){const N=yield D;"string"!=typeof N&&u.throwArgumentError("invalid address or ENS name","name",N);try{return(0,d.getAddress)(N)}catch{}k||u.throwError("a provider or signer is needed to resolve ENS names",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const C=yield k.resolveName(N);return null==C&&u.throwArgumentError("resolver or addr is not configured for ENS name","name",N),C})}function w(k,D,N){return h(this,void 0,void 0,function*(){return Array.isArray(N)?yield Promise.all(N.map((C,a)=>w(k,Array.isArray(D)?D[a]:D[C.name],C))):"address"===N.type?yield _(k,D):"tuple"===N.type?yield w(k,D,N.components):"array"===N.baseType?Array.isArray(D)?yield Promise.all(D.map(C=>w(k,C,N.arrayChildren))):Promise.reject(u.makeError("invalid value for array",b.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:D})):D})}function S(k,D,N){return h(this,void 0,void 0,function*(){let C={};N.length===D.inputs.length+1&&"object"==typeof N[N.length-1]&&(C=(0,T.shallowCopy)(N.pop())),u.checkArgumentCount(N.length,D.inputs.length,"passed to contract"),k.signer?C.from=C.from?(0,T.resolveProperties)({override:_(k.signer,C.from),signer:k.signer.getAddress()}).then(ue=>h(this,void 0,void 0,function*(){return(0,d.getAddress)(ue.signer)!==ue.override&&u.throwError("Contract with a Signer cannot override from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),ue.override})):k.signer.getAddress():C.from&&(C.from=_(k.provider,C.from));const a=yield(0,T.resolveProperties)({args:w(k.signer||k.provider,N,D.inputs),address:k.resolvedAddress,overrides:(0,T.resolveProperties)(C)||{}}),B=k.interface.encodeFunctionData(D,a.args),Q={data:B,to:a.address},ee=a.overrides;if(null!=ee.nonce&&(Q.nonce=x.O$.from(ee.nonce).toNumber()),null!=ee.gasLimit&&(Q.gasLimit=x.O$.from(ee.gasLimit)),null!=ee.gasPrice&&(Q.gasPrice=x.O$.from(ee.gasPrice)),null!=ee.maxFeePerGas&&(Q.maxFeePerGas=x.O$.from(ee.maxFeePerGas)),null!=ee.maxPriorityFeePerGas&&(Q.maxPriorityFeePerGas=x.O$.from(ee.maxPriorityFeePerGas)),null!=ee.from&&(Q.from=ee.from),null!=ee.type&&(Q.type=ee.type),null!=ee.accessList&&(Q.accessList=(0,g.accessListify)(ee.accessList)),null==Q.gasLimit&&null!=D.gas){let ue=21e3;const we=(0,f.arrayify)(B);for(let ae=0;aenull!=C[ue]);return ce.length&&u.throwError(`cannot override ${ce.map(ue=>JSON.stringify(ue)).join(",")}`,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:ce}),Q})}function L(k,D){const N=D.wait.bind(D);D.wait=C=>N(C).then(a=>(a.events=a.logs.map(B=>{let Q=(0,T.deepCopy)(B),ee=null;try{ee=k.interface.parseLog(B)}catch{}return ee&&(Q.args=ee.args,Q.decode=(ce,ue)=>k.interface.decodeEventLog(ee.eventFragment,ce,ue),Q.event=ee.name,Q.eventSignature=ee.signature),Q.removeListener=()=>k.provider,Q.getBlock=()=>k.provider.getBlock(a.blockHash),Q.getTransaction=()=>k.provider.getTransaction(a.transactionHash),Q.getTransactionReceipt=()=>Promise.resolve(a),Q}),a))}function V(k,D,N){const C=k.signer||k.provider;return function(...a){return h(this,void 0,void 0,function*(){let B;if(a.length===D.inputs.length+1&&"object"==typeof a[a.length-1]){const ce=(0,T.shallowCopy)(a.pop());null!=ce.blockTag&&(B=yield ce.blockTag),delete ce.blockTag,a.push(ce)}null!=k.deployTransaction&&(yield k._deployed(B));const Q=yield S(k,D,a),ee=yield C.call(Q,B);try{let ce=k.interface.decodeFunctionResult(D,ee);return N&&1===D.outputs.length&&(ce=ce[0]),ce}catch(ce){throw ce.code===b.Logger.errors.CALL_EXCEPTION&&(ce.address=k.address,ce.args=a,ce.transaction=Q),ce}})}}function G(k,D,N){return D.constant?V(k,D,N):function(k,D){return function(...N){return h(this,void 0,void 0,function*(){k.signer||u.throwError("sending a transaction requires a signer",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=k.deployTransaction&&(yield k._deployed());const C=yield S(k,D,N),a=yield k.signer.sendTransaction(C);return L(k,a),a})}}(k,D)}function H(k){return!k.address||null!=k.topics&&0!==k.topics.length?(k.address||"*")+"@"+(k.topics?k.topics.map(D=>Array.isArray(D)?D.join("|"):D).join(":"):""):"*"}class j{constructor(D,N){(0,T.defineReadOnly)(this,"tag",D),(0,T.defineReadOnly)(this,"filter",N),this._listeners=[]}addListener(D,N){this._listeners.push({listener:D,once:N})}removeListener(D){let N=!1;this._listeners=this._listeners.filter(C=>!(!N&&C.listener===D&&(N=!0,1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(D=>D.listener)}listenerCount(){return this._listeners.length}run(D){const N=this.listenerCount();return this._listeners=this._listeners.filter(C=>{const a=D.slice();return setTimeout(()=>{C.listener.apply(this,a)},0),!C.once}),N}prepareEvent(D){}getEmit(D){return[D]}}class K extends j{constructor(){super("error",null)}}class R extends j{constructor(D,N,C,a){const B={address:D};let Q=N.getEventTopic(C);a?(Q!==a[0]&&u.throwArgumentError("topic mismatch","topics",a),B.topics=a.slice()):B.topics=[Q],super(H(B),B),(0,T.defineReadOnly)(this,"address",D),(0,T.defineReadOnly)(this,"interface",N),(0,T.defineReadOnly)(this,"fragment",C)}prepareEvent(D){super.prepareEvent(D),D.event=this.fragment.name,D.eventSignature=this.fragment.format(),D.decode=(N,C)=>this.interface.decodeEventLog(this.fragment,N,C);try{D.args=this.interface.decodeEventLog(this.fragment,D.data,D.topics)}catch(N){D.args=null,D.decodeError=N}}getEmit(D){const N=(0,ie.BR)(D.args);if(N.length)throw N[0].error;const C=(D.args||[]).slice();return C.push(D),C}}class o extends j{constructor(D,N){super("*",{address:D}),(0,T.defineReadOnly)(this,"address",D),(0,T.defineReadOnly)(this,"interface",N)}prepareEvent(D){super.prepareEvent(D);try{const N=this.interface.parseLog(D);D.event=N.name,D.eventSignature=N.signature,D.decode=(C,a)=>this.interface.decodeEventLog(N.eventFragment,C,a),D.args=N.args}catch{}}}class y{constructor(D,N,C){(0,T.defineReadOnly)(this,"interface",(0,T.getStatic)(new.target,"getInterface")(N)),null==C?((0,T.defineReadOnly)(this,"provider",null),(0,T.defineReadOnly)(this,"signer",null)):E.Signer.isSigner(C)?((0,T.defineReadOnly)(this,"provider",C.provider||null),(0,T.defineReadOnly)(this,"signer",C)):O.zt.isProvider(C)?((0,T.defineReadOnly)(this,"provider",C),(0,T.defineReadOnly)(this,"signer",null)):u.throwArgumentError("invalid signer or provider","signerOrProvider",C),(0,T.defineReadOnly)(this,"callStatic",{}),(0,T.defineReadOnly)(this,"estimateGas",{}),(0,T.defineReadOnly)(this,"functions",{}),(0,T.defineReadOnly)(this,"populateTransaction",{}),(0,T.defineReadOnly)(this,"filters",{});{const Q={};Object.keys(this.interface.events).forEach(ee=>{const ce=this.interface.events[ee];(0,T.defineReadOnly)(this.filters,ee,(...ue)=>({address:this.address,topics:this.interface.encodeFilterTopics(ce,ue)})),Q[ce.name]||(Q[ce.name]=[]),Q[ce.name].push(ee)}),Object.keys(Q).forEach(ee=>{const ce=Q[ee];1===ce.length?(0,T.defineReadOnly)(this.filters,ee,this.filters[ce[0]]):u.warn(`Duplicate definition of ${ee} (${ce.join(", ")})`)})}if((0,T.defineReadOnly)(this,"_runningEvents",{}),(0,T.defineReadOnly)(this,"_wrappedEmits",{}),null==D&&u.throwArgumentError("invalid contract address or ENS name","addressOrName",D),(0,T.defineReadOnly)(this,"address",D),this.provider)(0,T.defineReadOnly)(this,"resolvedAddress",_(this.provider,D));else try{(0,T.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,d.getAddress)(D)))}catch{u.throwError("provider is required to use ENS name as contract address",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(Q=>{});const a={},B={};Object.keys(this.interface.functions).forEach(Q=>{const ee=this.interface.functions[Q];if(B[Q])u.warn(`Duplicate ABI entry for ${JSON.stringify(Q)}`);else{B[Q]=!0;{const ce=ee.name;a[`%${ce}`]||(a[`%${ce}`]=[]),a[`%${ce}`].push(Q)}null==this[Q]&&(0,T.defineReadOnly)(this,Q,G(this,ee,!0)),null==this.functions[Q]&&(0,T.defineReadOnly)(this.functions,Q,G(this,ee,!1)),null==this.callStatic[Q]&&(0,T.defineReadOnly)(this.callStatic,Q,V(this,ee,!0)),null==this.populateTransaction[Q]&&(0,T.defineReadOnly)(this.populateTransaction,Q,function(k,D){return function(...N){return S(k,D,N)}}(this,ee)),null==this.estimateGas[Q]&&(0,T.defineReadOnly)(this.estimateGas,Q,function(k,D){const N=k.signer||k.provider;return function(...C){return h(this,void 0,void 0,function*(){N||u.throwError("estimate require a provider or signer",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const a=yield S(k,D,C);return yield N.estimateGas(a)})}}(this,ee))}}),Object.keys(a).forEach(Q=>{const ee=a[Q];if(ee.length>1)return;Q=Q.substring(1);const ce=ee[0];try{null==this[Q]&&(0,T.defineReadOnly)(this,Q,this[ce])}catch{}null==this.functions[Q]&&(0,T.defineReadOnly)(this.functions,Q,this.functions[ce]),null==this.callStatic[Q]&&(0,T.defineReadOnly)(this.callStatic,Q,this.callStatic[ce]),null==this.populateTransaction[Q]&&(0,T.defineReadOnly)(this.populateTransaction,Q,this.populateTransaction[ce]),null==this.estimateGas[Q]&&(0,T.defineReadOnly)(this.estimateGas,Q,this.estimateGas[ce])})}static getContractAddress(D){return(0,d.getContractAddress)(D)}static getInterface(D){return q.vU.isInterface(D)?D:new q.vU(D)}deployed(){return this._deployed()}_deployed(D){return this._deployedPromise||(this._deployedPromise=this.deployTransaction?this.deployTransaction.wait().then(()=>this):this.provider.getCode(this.address,D).then(N=>("0x"===N&&u.throwError("contract not deployed",b.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(D){this.signer||u.throwError("sending a transactions require a signer",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const N=(0,T.shallowCopy)(D||{});return["from","to"].forEach(function(C){null!=N[C]&&u.throwError("cannot override "+C,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:C})}),N.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(N))}connect(D){"string"==typeof D&&(D=new E.VoidSigner(D,this.provider));const N=new this.constructor(this.address,this.interface,D);return this.deployTransaction&&(0,T.defineReadOnly)(N,"deployTransaction",this.deployTransaction),N}attach(D){return new this.constructor(D,this.interface,this.signer||this.provider)}static isIndexed(D){return q.Hk.isIndexed(D)}_normalizeRunningEvent(D){return this._runningEvents[D.tag]?this._runningEvents[D.tag]:D}_getRunningEvent(D){if("string"==typeof D){if("error"===D)return this._normalizeRunningEvent(new K);if("event"===D)return this._normalizeRunningEvent(new j("event",null));if("*"===D)return this._normalizeRunningEvent(new o(this.address,this.interface));const N=this.interface.getEvent(D);return this._normalizeRunningEvent(new R(this.address,this.interface,N))}if(D.topics&&D.topics.length>0){try{const C=D.topics[0];if("string"!=typeof C)throw new Error("invalid topic");const a=this.interface.getEvent(C);return this._normalizeRunningEvent(new R(this.address,this.interface,a,D.topics))}catch{}const N={address:this.address,topics:D.topics};return this._normalizeRunningEvent(new j(H(N),N))}return this._normalizeRunningEvent(new o(this.address,this.interface))}_checkRunningEvents(D){if(0===D.listenerCount()){delete this._runningEvents[D.tag];const N=this._wrappedEmits[D.tag];N&&D.filter&&(this.provider.off(D.filter,N),delete this._wrappedEmits[D.tag])}}_wrapEvent(D,N,C){const a=(0,T.deepCopy)(N);return a.removeListener=()=>{!C||(D.removeListener(C),this._checkRunningEvents(D))},a.getBlock=()=>this.provider.getBlock(N.blockHash),a.getTransaction=()=>this.provider.getTransaction(N.transactionHash),a.getTransactionReceipt=()=>this.provider.getTransactionReceipt(N.transactionHash),D.prepareEvent(a),a}_addEventListener(D,N,C){if(this.provider||u.throwError("events require a provider or a signer with a provider",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),D.addListener(N,C),this._runningEvents[D.tag]=D,!this._wrappedEmits[D.tag]){const a=B=>{let Q=this._wrapEvent(D,B,N);if(null==Q.decodeError)try{const ee=D.getEmit(Q);this.emit(D.filter,...ee)}catch(ee){Q.decodeError=ee.error}null!=D.filter&&this.emit("event",Q),null!=Q.decodeError&&this.emit("error",Q.decodeError,Q)};this._wrappedEmits[D.tag]=a,null!=D.filter&&this.provider.on(D.filter,a)}}queryFilter(D,N,C){const a=this._getRunningEvent(D),B=(0,T.shallowCopy)(a.filter);return"string"==typeof N&&(0,f.isHexString)(N,32)?(null!=C&&u.throwArgumentError("cannot specify toBlock with blockhash","toBlock",C),B.blockHash=N):(B.fromBlock=N??0,B.toBlock=C??"latest"),this.provider.getLogs(B).then(Q=>Q.map(ee=>this._wrapEvent(a,ee,null)))}on(D,N){return this._addEventListener(this._getRunningEvent(D),N,!1),this}once(D,N){return this._addEventListener(this._getRunningEvent(D),N,!0),this}emit(D,...N){if(!this.provider)return!1;const C=this._getRunningEvent(D),a=C.run(N)>0;return this._checkRunningEvents(C),a}listenerCount(D){return this.provider?null==D?Object.keys(this._runningEvents).reduce((N,C)=>N+this._runningEvents[C].listenerCount(),0):this._getRunningEvent(D).listenerCount():0}listeners(D){if(!this.provider)return[];if(null==D){const N=[];for(let C in this._runningEvents)this._runningEvents[C].listeners().forEach(a=>{N.push(a)});return N}return this._getRunningEvent(D).listeners()}removeAllListeners(D){if(!this.provider)return this;if(null==D){for(const C in this._runningEvents){const a=this._runningEvents[C];a.removeAllListeners(),this._checkRunningEvents(a)}return this}const N=this._getRunningEvent(D);return N.removeAllListeners(),this._checkRunningEvents(N),this}off(D,N){if(!this.provider)return this;const C=this._getRunningEvent(D);return C.removeListener(N),this._checkRunningEvents(C),this}removeListener(D,N){return this.off(D,N)}}class M extends y{}class v{constructor(D,N,C){let a=null;a="string"==typeof N?N:(0,f.isBytes)(N)?(0,f.hexlify)(N):N&&"string"==typeof N.object?N.object:"!","0x"!==a.substring(0,2)&&(a="0x"+a),(!(0,f.isHexString)(a)||a.length%2)&&u.throwArgumentError("invalid bytecode","bytecode",N),C&&!E.Signer.isSigner(C)&&u.throwArgumentError("invalid signer","signer",C),(0,T.defineReadOnly)(this,"bytecode",a),(0,T.defineReadOnly)(this,"interface",(0,T.getStatic)(new.target,"getInterface")(D)),(0,T.defineReadOnly)(this,"signer",C||null)}getDeployTransaction(...D){let N={};if(D.length===this.interface.deploy.inputs.length+1&&"object"==typeof D[D.length-1]){N=(0,T.shallowCopy)(D.pop());for(const C in N)if(!m[C])throw new Error("unknown transaction override "+C)}return["data","from","to"].forEach(C=>{null!=N[C]&&u.throwError("cannot override "+C,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:C})}),N.value&&!x.O$.from(N.value).isZero()&&!this.interface.deploy.payable&&u.throwError("non-payable constructor cannot override value",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:N.value}),u.checkArgumentCount(D.length,this.interface.deploy.inputs.length," in Contract constructor"),N.data=(0,f.hexlify)((0,f.concat)([this.bytecode,this.interface.encodeDeploy(D)])),N}deploy(...D){return h(this,void 0,void 0,function*(){let N={};D.length===this.interface.deploy.inputs.length+1&&(N=D.pop()),u.checkArgumentCount(D.length,this.interface.deploy.inputs.length," in Contract constructor");const C=yield w(this.signer,D,this.interface.deploy.inputs);C.push(N);const a=this.getDeployTransaction(...C),B=yield this.signer.sendTransaction(a),Q=(0,T.getStatic)(this.constructor,"getContractAddress")(B),ee=(0,T.getStatic)(this.constructor,"getContract")(Q,this.interface,this.signer);return L(ee,B),(0,T.defineReadOnly)(ee,"deployTransaction",B),ee})}attach(D){return this.constructor.getContract(D,this.interface,this.signer)}connect(D){return new this.constructor(this.interface,this.bytecode,D)}static fromSolidity(D,N){null==D&&u.throwError("missing compiler output",b.Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof D&&(D=JSON.parse(D));let a=null;return D.bytecode?a=D.bytecode:D.evm&&D.evm.bytecode&&(a=D.evm.bytecode),new this(D.abi,a,N)}static getInterface(D){return M.getInterface(D)}static getContractAddress(D){return(0,d.getContractAddress)(D)}static getContract(D,N,C){return new M(D,N,C)}}},88022:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="hash/5.7.0"},67475:(bt,be,Y)=>{"use strict";Y.d(be,{id:()=>O});var ie=Y(28518),q=Y(8822);function O(E){return(0,ie.keccak256)((0,q.Y0)(E))}},778:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{id:()=>ie.id,dnsEncode:()=>q.Kn,namehash:()=>q.VM,isValidName:()=>q.r1,ensNormalize:()=>q.w3,messagePrefix:()=>O.B,hashMessage:()=>O.r,_TypedDataEncoder:()=>E.E});var ie=Y(67475),q=Y(21),O=Y(78429),E=Y(72072)},78429:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>E,r:()=>d});var ie=Y(61488),q=Y(28518),O=Y(8822);const E="\x19Ethereum Signed Message:\n";function d(x){return"string"==typeof x&&(x=(0,O.Y0)(x)),(0,q.keccak256)((0,ie.concat)([(0,O.Y0)(E),(0,O.Y0)(String(x.length)),x]))}},21:(bt,be,Y)=>{"use strict";Y.d(be,{Kn:()=>X,w3:()=>ae,r1:()=>Te,VM:()=>le});var ie=Y(61488),q=Y(8822),O=Y(28518),E=Y(53898),d=Y(88022);function T(ne,pe){null==pe&&(pe=1);const _e=[],xe=_e.forEach,Ce=function(ke,me){xe.call(ke,function(Ee){me>0&&Array.isArray(Ee)?Ce(Ee,me-1):_e.push(Ee)})};return Ce(ne,pe),_e}function u(ne){return 1&ne?~ne>>1:ne>>1}function _(ne,pe){let _e=Array(ne);for(let xe=0,Ce=-1;xepe[me]):_e}function L(ne,pe,_e){let xe=Array(ne).fill(void 0).map(()=>[]);for(let Ce=0;Cexe[me].push(ke));return xe}function V(ne,pe){let _e=1+pe(),xe=pe(),Ce=function(ne){let pe=[];for(;;){let _e=ne();if(0==_e)break;pe.push(_e)}return pe}(pe);return T(L(Ce.length,1+ne,pe).map((me,Ee)=>{const ze=me[0],Ve=me.slice(1);return Array(Ce[Ee]).fill(void 0).map((nt,tt)=>{let mt=tt*xe;return[ze+tt*_e,Ve.map(ht=>ht+mt)]})}))}function W(ne,pe){return L(1+pe(),1+ne,pe).map(Ce=>[Ce[0],Ce.slice(1)])}const j=function(ne){let pe=0;return()=>ne[pe++]}(function(ne){let pe=0;function _e(){return ne[pe++]<<8|ne[pe++]}let xe=_e(),Ce=1,ke=[0,1];for(let dn=1;dn>--ze&1}const mt=Math.pow(2,31),ht=mt>>>1,wt=ht>>1,Pt=mt-1;let st=0;for(let dn=0;dn<31;dn++)st=st<<1|nt();let Ye=[],gt=0,St=mt;for(;;){let dn=Math.floor(((st-gt+1)*Ce-1)/St),Nt=0,It=xe;for(;It-Nt>1;){let Yt=Nt+It>>>1;dn>>1|nt(),qt=qt<<1^ht,jt=(jt^ht)<<1|ht|1;gt=qt,St=1+jt-qt}let Wt=xe-4;return Ye.map(dn=>{switch(dn-Wt){case 3:return Wt+65792+(ne[Ee++]<<16|ne[Ee++]<<8|ne[Ee++]);case 2:return Wt+256+(ne[Ee++]<<8|ne[Ee++]);case 1:return Wt+ne[Ee++];default:return dn-1}})}(function(ne){ne=atob(ne);const pe=[];for(let _e=0;_exe-Ce);return function _e(){let xe=[];for(;;){let Ve=S(ne,pe);if(0==Ve.length)break;xe.push({set:new Set(Ve),node:_e()})}xe.sort((Ve,nt)=>nt.set.size-Ve.set.size);let Ce=ne(),ke=Ce%3;Ce=Ce/3|0;let me=!!(1&Ce);return Ce>>=1,{branches:xe,valid:ke,fe0f:me,save:1==Ce,check:2==Ce}}()}(j);function k(ne){return(0,q.XL)(ne)}function D(ne){return ne.filter(pe=>65039!=pe)}function N(ne){for(let pe of ne.split(".")){let _e=k(pe);try{for(let xe=_e.lastIndexOf(95)-1;xe>=0;xe--)if(95!==_e[xe])throw new Error("underscore only allowed at start");if(_e.length>=4&&_e.every(xe=>xe<128)&&45===_e[2]&&45===_e[3])throw new Error("invalid label extension")}catch(xe){throw new Error(`Invalid label "${pe}": ${xe.message}`)}}return ne}function Q(ne,pe){var _e;let Ce,ke,xe=y,me=[],Ee=ne.length;for(pe&&(pe.length=0);Ee;){let ze=ne[--Ee];if(xe=null===(_e=xe.branches.find(Ve=>Ve.set.has(ze)))||void 0===_e?void 0:_e.node,!xe)break;if(xe.save)ke=ze;else if(xe.check&&ze===ke)break;me.push(ze),xe.fe0f&&(me.push(65039),Ee>0&&65039==ne[Ee-1]&&Ee--),xe.valid&&(Ce=me.slice(),2==xe.valid&&Ce.splice(1,1),pe&&pe.push(...ne.slice(Ee).reverse()),ne.length=Ee)}return Ce}const ee=new E.Logger(d.i),ce=new Uint8Array(32);function ue(ne){if(0===ne.length)throw new Error("invalid ENS name; empty component");return ne}function we(ne){const pe=(0,q.Y0)(function(ne){return N(function(ne,pe){let _e=k(ne).reverse(),xe=[];for(;_e.length;){let Ce=Q(_e);if(Ce){xe.push(...pe(Ce));continue}let ke=_e.pop();if(K.has(ke)){xe.push(ke);continue}if(R.has(ke))continue;let me=o[ke];if(!me)throw new Error(`Disallowed codepoint: 0x${ke.toString(16).toUpperCase()}`);xe.push(...me)}return N(function(ne){return ne.normalize("NFC")}(String.fromCodePoint(...xe)))}(ne,D))}(ne)),_e=[];if(0===ne.length)return _e;let xe=0;for(let Ce=0;Ce=pe.length)throw new Error("invalid ENS name; empty component");return _e.push(ue(pe.slice(xe))),_e}function ae(ne){return we(ne).map(pe=>(0,q.ZN)(pe)).join(".")}function Te(ne){try{return 0!==we(ne).length}catch{}return!1}function le(ne){"string"!=typeof ne&&ee.throwArgumentError("invalid ENS name; not a string","name",ne);let pe=ce;const _e=we(ne);for(;_e.length;)pe=(0,O.keccak256)((0,ie.concat)([pe,(0,O.keccak256)(_e.pop())]));return(0,ie.hexlify)(pe)}function X(ne){return(0,ie.hexlify)((0,ie.concat)(we(ne).map(pe=>{if(pe.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const _e=new Uint8Array(pe.length+1);return _e.set(pe,1),_e[0]=_e.length-1,_e})))+"00"}ce.fill(0)},72072:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>j});var ie=Y(2885),q=Y(2024),O=Y(61488),E=Y(28518),d=Y(92275),x=Y(53898),f=Y(88022),T=Y(67475);const b=new x.Logger(f.i),l=new Uint8Array(32);l.fill(0);const h=q.O$.from(-1),u=q.O$.from(0),m=q.O$.from(1),_=q.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),S=(0,O.hexZeroPad)(m.toHexString(),32),I=(0,O.hexZeroPad)(u.toHexString(),32),P={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},L=["name","version","chainId","verifyingContract","salt"];function V(K){return function(R){return"string"!=typeof R&&b.throwArgumentError(`invalid domain value for ${JSON.stringify(K)}`,`domain.${K}`,R),R}}const W={name:V("name"),version:V("version"),chainId:function(K){try{return q.O$.from(K).toString()}catch{}return b.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",K)},verifyingContract:function(K){try{return(0,ie.getAddress)(K).toLowerCase()}catch{}return b.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",K)},salt:function(K){try{const R=(0,O.arrayify)(K);if(32!==R.length)throw new Error("bad length");return(0,O.hexlify)(R)}catch{}return b.throwArgumentError('invalid domain value "salt"',"domain.salt",K)}};function G(K){{const R=K.match(/^(u?)int(\d*)$/);if(R){const o=""===R[1],y=parseInt(R[2]||"256");(y%8!=0||y>256||R[2]&&R[2]!==String(y))&&b.throwArgumentError("invalid numeric width","type",K);const M=_.mask(o?y-1:y),v=o?M.add(m).mul(h):u;return function(k){const D=q.O$.from(k);return(D.lt(v)||D.gt(M))&&b.throwArgumentError(`value out-of-bounds for ${K}`,"value",k),(0,O.hexZeroPad)(D.toTwos(256).toHexString(),32)}}}{const R=K.match(/^bytes(\d+)$/);if(R){const o=parseInt(R[1]);return(0===o||o>32||R[1]!==String(o))&&b.throwArgumentError("invalid bytes width","type",K),function(y){return(0,O.arrayify)(y).length!==o&&b.throwArgumentError(`invalid length for ${K}`,"value",y),function(K){const R=(0,O.arrayify)(K),o=R.length%32;return o?(0,O.hexConcat)([R,l.slice(o)]):(0,O.hexlify)(R)}(y)}}}switch(K){case"address":return function(R){return(0,O.hexZeroPad)((0,ie.getAddress)(R),32)};case"bool":return function(R){return R?S:I};case"bytes":return function(R){return(0,E.keccak256)(R)};case"string":return function(R){return(0,T.id)(R)}}return null}function H(K,R){return`${K}(${R.map(({name:o,type:y})=>y+" "+o).join(",")})`}class j{constructor(R){(0,d.defineReadOnly)(this,"types",Object.freeze((0,d.deepCopy)(R))),(0,d.defineReadOnly)(this,"_encoderCache",{}),(0,d.defineReadOnly)(this,"_types",{});const o={},y={},M={};Object.keys(R).forEach(D=>{o[D]={},y[D]=[],M[D]={}});for(const D in R){const N={};R[D].forEach(C=>{N[C.name]&&b.throwArgumentError(`duplicate variable name ${JSON.stringify(C.name)} in ${JSON.stringify(D)}`,"types",R),N[C.name]=!0;const a=C.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===D&&b.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",R),!G(a)&&(y[a]||b.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",R),y[a].push(D),o[D][a]=!0)})}const v=Object.keys(y).filter(D=>0===y[D].length);0===v.length?b.throwArgumentError("missing primary type","types",R):v.length>1&&b.throwArgumentError(`ambiguous primary types or unused types: ${v.map(D=>JSON.stringify(D)).join(", ")}`,"types",R),(0,d.defineReadOnly)(this,"primaryType",v[0]),function k(D,N){N[D]&&b.throwArgumentError(`circular type reference to ${JSON.stringify(D)}`,"types",R),N[D]=!0,Object.keys(o[D]).forEach(C=>{!y[C]||(k(C,N),Object.keys(N).forEach(a=>{M[a][C]=!0}))}),delete N[D]}(this.primaryType,{});for(const D in M){const N=Object.keys(M[D]);N.sort(),this._types[D]=H(D,R[D])+N.map(C=>H(C,R[C])).join("")}}getEncoder(R){let o=this._encoderCache[R];return o||(o=this._encoderCache[R]=this._getEncoder(R)),o}_getEncoder(R){{const M=G(R);if(M)return M}const o=R.match(/^(.*)(\x5b(\d*)\x5d)$/);if(o){const M=o[1],v=this.getEncoder(M),k=parseInt(o[3]);return D=>{k>=0&&D.length!==k&&b.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",D);let N=D.map(v);return this._types[M]&&(N=N.map(E.keccak256)),(0,E.keccak256)((0,O.hexConcat)(N))}}const y=this.types[R];if(y){const M=(0,T.id)(this._types[R]);return v=>{const k=y.map(({name:D,type:N})=>{const C=this.getEncoder(N)(v[D]);return this._types[N]?(0,E.keccak256)(C):C});return k.unshift(M),(0,O.hexConcat)(k)}}return b.throwArgumentError(`unknown type: ${R}`,"type",R)}encodeType(R){const o=this._types[R];return o||b.throwArgumentError(`unknown type: ${JSON.stringify(R)}`,"name",R),o}encodeData(R,o){return this.getEncoder(R)(o)}hashStruct(R,o){return(0,E.keccak256)(this.encodeData(R,o))}encode(R){return this.encodeData(this.primaryType,R)}hash(R){return this.hashStruct(this.primaryType,R)}_visit(R,o,y){if(G(R))return y(R,o);const M=R.match(/^(.*)(\x5b(\d*)\x5d)$/);if(M){const k=M[1],D=parseInt(M[3]);return D>=0&&o.length!==D&&b.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o),o.map(N=>this._visit(k,N,y))}const v=this.types[R];return v?v.reduce((k,{name:D,type:N})=>(k[D]=this._visit(N,o[D],y),k),{}):b.throwArgumentError(`unknown type: ${R}`,"type",R)}visit(R,o){return this._visit(this.primaryType,R,o)}static from(R){return new j(R)}static getPrimaryType(R){return j.from(R).primaryType}static hashStruct(R,o,y){return j.from(o).hashStruct(R,y)}static hashDomain(R){const o=[];for(const y in R){const M=P[y];M||b.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(y)}`,"domain",R),o.push({name:y,type:M})}return o.sort((y,M)=>L.indexOf(y.name)-L.indexOf(M.name)),j.hashStruct("EIP712Domain",{EIP712Domain:o},R)}static encode(R,o,y){return(0,O.hexConcat)(["0x1901",j.hashDomain(R),j.from(o).hash(y)])}static hash(R,o,y){return(0,E.keccak256)(j.encode(R,o,y))}static resolveNames(R,o,y,M){return function(K,R,o,y){return new(o||(o=Promise))(function(v,k){function D(a){try{C(y.next(a))}catch(B){k(B)}}function N(a){try{C(y.throw(a))}catch(B){k(B)}}function C(a){a.done?v(a.value):function(v){return v instanceof o?v:new o(function(k){k(v)})}(a.value).then(D,N)}C((y=y.apply(K,R||[])).next())})}(this,void 0,void 0,function*(){R=(0,d.shallowCopy)(R);const v={};R.verifyingContract&&!(0,O.isHexString)(R.verifyingContract,20)&&(v[R.verifyingContract]="0x");const k=j.from(o);k.visit(y,(D,N)=>("address"===D&&!(0,O.isHexString)(N,20)&&(v[N]="0x"),N));for(const D in v)v[D]=yield M(D);return R.verifyingContract&&v[R.verifyingContract]&&(R.verifyingContract=v[R.verifyingContract]),y=k.visit(y,(D,N)=>"address"===D&&v[N]?v[N]:N),{domain:R,value:y}})}static getPayload(R,o,y){j.hashDomain(R);const M={},v=[];L.forEach(N=>{const C=R[N];null!=C&&(M[N]=W[N](C),v.push({name:N,type:P[N]}))});const k=j.from(o),D=(0,d.shallowCopy)(o);return D.EIP712Domain?b.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",o):D.EIP712Domain=v,k.encode(y),{types:D,domain:M,primaryType:k.primaryType,message:k.visit(y,(N,C)=>{if(N.match(/^bytes(\d*)/))return(0,O.hexlify)((0,O.arrayify)(C));if(N.match(/^u?int/))return q.O$.from(C).toString();switch(N){case"address":return C.toLowerCase();case"bool":return!!C;case"string":return"string"!=typeof C&&b.throwArgumentError("invalid string","value",C),C}return b.throwArgumentError("unsupported type","type",N)})}}}},49593:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{HDNode:()=>j,defaultPath:()=>H,entropyToMnemonic:()=>o,getAccountPath:()=>M,isValidMnemonic:()=>y,mnemonicToEntropy:()=>R,mnemonicToSeed:()=>K});var ie=Y(53744),q=Y(61488),O=Y(2024),E=Y(8822),d=Y(39938),x=Y(92275),f=Y(99596),T=Y(15614),g=Y(83389),b=Y(32701),l=Y(33692);const m=new(Y(53898).Logger)("hdnode/5.7.0"),_=O.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),w=(0,E.Y0)("Bitcoin seed"),S=2147483648;function I(v){return(1<=256)throw new Error("Depth too large!");return V((0,q.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,q.hexlify)(this.depth),this.parentFingerprint,(0,q.hexZeroPad)((0,q.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,q.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new j(G,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(k){if(k>4294967295)throw new Error("invalid index - "+String(k));let D=this.path;D&&(D+="/"+(k&~S));const N=new Uint8Array(37);if(k&S){if(!this.privateKey)throw new Error("cannot derive child of neutered node");N.set((0,q.arrayify)(this.privateKey),1),D&&(D+="'")}else N.set((0,q.arrayify)(this.publicKey));for(let we=24;we>=0;we-=8)N[33+(we>>3)]=k>>24-we&255;const C=(0,q.arrayify)((0,T.Gy)(g.p.sha512,this.chainCode,N)),a=C.slice(0,32),B=C.slice(32);let Q=null,ee=null;this.privateKey?Q=L(O.O$.from(a).add(this.privateKey).mod(_)):ee=new f.SigningKey((0,q.hexlify)(a))._addPoint(this.publicKey);let ce=D;const ue=this.mnemonic;return ue&&(ce=Object.freeze({phrase:ue.phrase,path:D,locale:ue.locale||"en"})),new j(G,Q,ee,this.fingerprint,L(B),k,this.depth+1,ce)}derivePath(k){const D=k.split("/");if(0===D.length||"m"===D[0]&&0!==this.depth)throw new Error("invalid path - "+k);"m"===D[0]&&D.shift();let N=this;for(let C=0;C=S)throw new Error("invalid path index - "+a);N=N._derive(S+B)}else{if(!a.match(/^[0-9]+$/))throw new Error("invalid path component - "+a);{const B=parseInt(a);if(B>=S)throw new Error("invalid path index - "+a);N=N._derive(B)}}}return N}static _fromSeed(k,D){const N=(0,q.arrayify)(k);if(N.length<16||N.length>64)throw new Error("invalid seed");const C=(0,q.arrayify)((0,T.Gy)(g.p.sha512,w,N));return new j(G,L(C.slice(0,32)),null,"0x00000000",L(C.slice(32)),0,0,D)}static fromMnemonic(k,D,N){return k=o(R(k,N=W(N)),N),j._fromSeed(K(k,D),{phrase:k,path:"m",locale:N.locale})}static fromSeed(k){return j._fromSeed(k,null)}static fromExtendedKey(k){const D=ie.Base58.decode(k);(82!==D.length||V(D.slice(0,78))!==k)&&m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const N=D[4],C=(0,q.hexlify)(D.slice(5,9)),a=parseInt((0,q.hexlify)(D.slice(9,13)).substring(2),16),B=(0,q.hexlify)(D.slice(13,45)),Q=D.slice(45,78);switch((0,q.hexlify)(D.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new j(G,null,(0,q.hexlify)(Q),C,B,a,N,null);case"0x0488ade4":case"0x04358394 ":if(0!==Q[0])break;return new j(G,(0,q.hexlify)(Q.slice(1)),null,C,B,a,N,null)}return m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function K(v,k){k||(k="");const D=(0,E.Y0)("mnemonic"+k,E.Uj.NFKD);return(0,d.n)((0,E.Y0)(v,E.Uj.NFKD),D,2048,64,"sha512")}function R(v,k){k=W(k),m.checkNormalize();const D=k.split(v);if(D.length%3!=0)throw new Error("invalid mnemonic");const N=(0,q.arrayify)(new Uint8Array(Math.ceil(11*D.length/8)));let C=0;for(let ce=0;ce>3]|=1<<7-C%8),C++}const a=32*D.length/3,Q=I(D.length/3);if(((0,q.arrayify)((0,T.JQ)(N.slice(0,a/8)))[0]&Q)!=(N[N.length-1]&Q))throw new Error("invalid checksum");return(0,q.hexlify)(N.slice(0,a/8))}function o(v,k){if(k=W(k),(v=(0,q.arrayify)(v)).length%4!=0||v.length<16||v.length>32)throw new Error("invalid entropy");const D=[0];let N=11;for(let B=0;B8?(D[D.length-1]<<=8,D[D.length-1]|=v[B],N-=8):(D[D.length-1]<<=N,D[D.length-1]|=v[B]>>8-N,D.push(v[B]&P(8-N)),N+=3);const C=v.length/4,a=(0,q.arrayify)((0,T.JQ)(v))[0]&I(C);return D[D.length-1]<<=C,D[D.length-1]|=a>>8-C,k.join(D.map(B=>k.getWord(B)))}function y(v,k){try{return R(v,k),!0}catch{}return!1}function M(v){return("number"!=typeof v||v<0||v>=S||v%1)&&m.throwArgumentError("invalid account index","index",v),`m/44'/60'/${v}'/0/0`}},38590:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="json-wallets/5.7.0"},53746:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{decryptCrowdsale:()=>m,decryptJsonWallet:()=>S,decryptJsonWalletSync:()=>I,decryptKeystore:()=>w.pe,decryptKeystoreSync:()=>w.hb,encryptKeystore:()=>w.HI,getJsonWalletAddress:()=>_.Rb,isCrowdsaleWallet:()=>_.LW,isKeystoreWallet:()=>_.aO});var ie=Y(52280),q=Y.n(ie),O=Y(2885),E=Y(61488),d=Y(28518),x=Y(39938),f=Y(8822),T=Y(92275),g=Y(53898),b=Y(38590),l=Y(93137);const h=new g.Logger(b.i);class u extends T.Description{isCrowdsaleAccount(L){return!(!L||!L._isCrowdsaleAccount)}}function m(P,L){const V=JSON.parse(P);L=(0,l.Ij)(L);const W=(0,O.getAddress)((0,l.gx)(V,"ethaddr")),G=(0,l.p3)((0,l.gx)(V,"encseed"));(!G||G.length%16!=0)&&h.throwArgumentError("invalid encseed","json",P);const H=(0,E.arrayify)((0,x.n)(L,L,2e3,32,"sha256")).slice(0,16),j=G.slice(0,16),K=G.slice(16),R=new(q().ModeOfOperation.cbc)(H,j),o=q().padding.pkcs7.strip((0,E.arrayify)(R.decrypt(K)));let y="";for(let k=0;k{"use strict";Y.d(be,{LW:()=>q,aO:()=>O,Rb:()=>E});var ie=Y(2885);function q(d){let x=null;try{x=JSON.parse(d)}catch{return!1}return x.encseed&&x.ethaddr}function O(d){let x=null;try{x=JSON.parse(d)}catch{return!1}return!(!x.version||parseInt(x.version)!==x.version||3!==parseInt(x.version))}function E(d){if(q(d))try{return(0,ie.getAddress)(JSON.parse(d).ethaddr)}catch{return null}if(O(d))try{return(0,ie.getAddress)(JSON.parse(d).address)}catch{return null}return null}},66484:(bt,be,Y)=>{"use strict";Y.d(be,{hb:()=>j,pe:()=>K,HI:()=>R});var ie=Y(52280),q=Y.n(ie),O=Y(21719),E=Y.n(O),d=Y(2885),x=Y(61488),f=Y(49593),T=Y(28518),g=Y(39938),b=Y(42563),l=Y(92275),h=Y(32701),u=Y(93137),m=Y(53898),_=Y(38590);const S=new m.Logger(_.i);function I(o){return null!=o&&o.mnemonic&&o.mnemonic.phrase}class P extends l.Description{isKeystoreAccount(y){return!(!y||!y._isKeystoreAccount)}}function V(o,y){const M=(0,u.p3)((0,u.gx)(o,"crypto/ciphertext"));if((0,x.hexlify)((0,T.keccak256)((0,x.concat)([y.slice(16,32),M]))).substring(2)!==(0,u.gx)(o,"crypto/mac").toLowerCase())throw new Error("invalid password");const k=function(o,y,M){if("aes-128-ctr"===(0,u.gx)(o,"crypto/cipher")){const k=(0,u.p3)((0,u.gx)(o,"crypto/cipherparams/iv")),D=new(q().Counter)(k),N=new(q().ModeOfOperation.ctr)(y,D);return(0,x.arrayify)(N.decrypt(M))}return null}(o,y.slice(0,16),M);k||S.throwError("unsupported cipher",m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const D=y.slice(32,64),N=(0,h.computeAddress)(k);if(o.address){let a=o.address.toLowerCase();if("0x"!==a.substring(0,2)&&(a="0x"+a),(0,d.getAddress)(a)!==N)throw new Error("address mismatch")}const C={_isKeystoreAccount:!0,address:N,privateKey:(0,x.hexlify)(k)};if("0.1"===(0,u.gx)(o,"x-ethers/version")){const a=(0,u.p3)((0,u.gx)(o,"x-ethers/mnemonicCiphertext")),B=(0,u.p3)((0,u.gx)(o,"x-ethers/mnemonicCounter")),Q=new(q().Counter)(B),ee=new(q().ModeOfOperation.ctr)(D,Q),ce=(0,u.gx)(o,"x-ethers/path")||f.defaultPath,ue=(0,u.gx)(o,"x-ethers/locale")||"en",we=(0,x.arrayify)(ee.decrypt(a));try{const ae=(0,f.entropyToMnemonic)(we,ue),Te=f.HDNode.fromMnemonic(ae,null,ue).derivePath(ce);if(Te.privateKey!=C.privateKey)throw new Error("mnemonic mismatch");C.mnemonic=Te.mnemonic}catch(ae){if(ae.code!==m.Logger.errors.INVALID_ARGUMENT||"wordlist"!==ae.argument)throw ae}}return new P(C)}function W(o,y,M,v,k){return(0,x.arrayify)((0,g.n)(o,y,M,v,k))}function G(o,y,M,v,k){return Promise.resolve(W(o,y,M,v,k))}function H(o,y,M,v,k){const D=(0,u.Ij)(y),N=(0,u.gx)(o,"crypto/kdf");if(N&&"string"==typeof N){const C=function(a,B){return S.throwArgumentError("invalid key-derivation function parameters",a,B)};if("scrypt"===N.toLowerCase()){const a=(0,u.p3)((0,u.gx)(o,"crypto/kdfparams/salt")),B=parseInt((0,u.gx)(o,"crypto/kdfparams/n")),Q=parseInt((0,u.gx)(o,"crypto/kdfparams/r")),ee=parseInt((0,u.gx)(o,"crypto/kdfparams/p"));(!B||!Q||!ee)&&C("kdf",N),0!=(B&B-1)&&C("N",B);const ce=parseInt((0,u.gx)(o,"crypto/kdfparams/dklen"));return 32!==ce&&C("dklen",ce),v(D,a,B,Q,ee,64,k)}if("pbkdf2"===N.toLowerCase()){const a=(0,u.p3)((0,u.gx)(o,"crypto/kdfparams/salt"));let B=null;const Q=(0,u.gx)(o,"crypto/kdfparams/prf");"hmac-sha256"===Q?B="sha256":"hmac-sha512"===Q?B="sha512":C("prf",Q);const ee=parseInt((0,u.gx)(o,"crypto/kdfparams/c")),ce=parseInt((0,u.gx)(o,"crypto/kdfparams/dklen"));return 32!==ce&&C("dklen",ce),M(D,a,ee,ce,B)}}return S.throwArgumentError("unsupported key-derivation function","kdf",N)}function j(o,y){const M=JSON.parse(o);return V(M,H(M,y,W,E().syncScrypt))}function K(o,y,M){return function(o,y,M,v){return new(M||(M=Promise))(function(D,N){function C(Q){try{B(v.next(Q))}catch(ee){N(ee)}}function a(Q){try{B(v.throw(Q))}catch(ee){N(ee)}}function B(Q){Q.done?D(Q.value):function(D){return D instanceof M?D:new M(function(N){N(D)})}(Q.value).then(C,a)}B((v=v.apply(o,y||[])).next())})}(this,void 0,void 0,function*(){const v=JSON.parse(o);return V(v,yield H(v,y,G,E().scrypt,M))})}function R(o,y,M,v){try{if((0,d.getAddress)(o.address)!==(0,h.computeAddress)(o.privateKey))throw new Error("address/privateKey mismatch");if(I(o)){const Te=o.mnemonic;if(f.HDNode.fromMnemonic(Te.phrase,null,Te.locale).derivePath(Te.path||f.defaultPath).privateKey!=o.privateKey)throw new Error("mnemonic mismatch")}}catch(Te){return Promise.reject(Te)}"function"==typeof M&&!v&&(v=M,M={}),M||(M={});const k=(0,x.arrayify)(o.privateKey),D=(0,u.Ij)(y);let N=null,C=null,a=null;if(I(o)){const Te=o.mnemonic;N=(0,x.arrayify)((0,f.mnemonicToEntropy)(Te.phrase,Te.locale||"en")),C=Te.path||f.defaultPath,a=Te.locale||"en"}let B=M.client;B||(B="ethers.js");let Q=null;Q=M.salt?(0,x.arrayify)(M.salt):(0,b.O)(32);let ee=null;if(M.iv){if(ee=(0,x.arrayify)(M.iv),16!==ee.length)throw new Error("invalid iv")}else ee=(0,b.O)(16);let ce=null;if(M.uuid){if(ce=(0,x.arrayify)(M.uuid),16!==ce.length)throw new Error("invalid uuid")}else ce=(0,b.O)(16);let ue=1<<17,we=8,ae=1;return M.scrypt&&(M.scrypt.N&&(ue=M.scrypt.N),M.scrypt.r&&(we=M.scrypt.r),M.scrypt.p&&(ae=M.scrypt.p)),E().scrypt(D,Q,ue,we,ae,64,v).then(Te=>{const le=(Te=(0,x.arrayify)(Te)).slice(0,16),X=Te.slice(16,32),ne=Te.slice(32,64),pe=new(q().Counter)(ee),_e=new(q().ModeOfOperation.ctr)(le,pe),xe=(0,x.arrayify)(_e.encrypt(k)),Ce=(0,T.keccak256)((0,x.concat)([X,xe])),ke={address:o.address.substring(2).toLowerCase(),id:(0,u.EH)(ce),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,x.hexlify)(ee).substring(2)},ciphertext:(0,x.hexlify)(xe).substring(2),kdf:"scrypt",kdfparams:{salt:(0,x.hexlify)(Q).substring(2),n:ue,dklen:32,p:ae,r:we},mac:Ce.substring(2)}};if(N){const me=(0,b.O)(16),Ee=new(q().Counter)(me),ze=new(q().ModeOfOperation.ctr)(ne,Ee),Ve=(0,x.arrayify)(ze.encrypt(N)),nt=new Date,tt=nt.getUTCFullYear()+"-"+(0,u.VP)(nt.getUTCMonth()+1,2)+"-"+(0,u.VP)(nt.getUTCDate(),2)+"T"+(0,u.VP)(nt.getUTCHours(),2)+"-"+(0,u.VP)(nt.getUTCMinutes(),2)+"-"+(0,u.VP)(nt.getUTCSeconds(),2)+".0Z";ke["x-ethers"]={client:B,gethFilename:"UTC--"+tt+"--"+ke.address,mnemonicCounter:(0,x.hexlify)(me).substring(2),mnemonicCiphertext:(0,x.hexlify)(Ve).substring(2),path:C,locale:a,version:"0.1"}}return JSON.stringify(ke)})}},93137:(bt,be,Y)=>{"use strict";Y.d(be,{p3:()=>O,VP:()=>E,Ij:()=>d,gx:()=>x,EH:()=>f});var ie=Y(61488),q=Y(8822);function O(T){return"string"==typeof T&&"0x"!==T.substring(0,2)&&(T="0x"+T),(0,ie.arrayify)(T)}function E(T,g){for(T=String(T);T.length{"use strict";Y.r(be),Y.d(be,{keccak256:()=>E});var ie=Y(37109),q=Y.n(ie),O=Y(61488);function E(d){return"0x"+q().keccak_256((0,O.arrayify)(d))}},53898:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{ErrorCode:()=>b,LogLevel:()=>g,Logger:()=>h});let q=!1,O=!1;const E={debug:1,default:2,info:2,warning:3,error:4,off:5};let d=E.default,x=null;const T=function(){try{const u=[];if(["NFD","NFC","NFKD","NFKC"].forEach(m=>{try{if("test"!=="test".normalize(m))throw new Error("bad normalize")}catch{u.push(m)}}),u.length)throw new Error("missing "+u.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(u){return u.message}return null}();var g=(()=>{return(u=g||(g={})).DEBUG="DEBUG",u.INFO="INFO",u.WARNING="WARNING",u.ERROR="ERROR",u.OFF="OFF",g;var u})(),b=(()=>{return(u=b||(b={})).UNKNOWN_ERROR="UNKNOWN_ERROR",u.NOT_IMPLEMENTED="NOT_IMPLEMENTED",u.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",u.NETWORK_ERROR="NETWORK_ERROR",u.SERVER_ERROR="SERVER_ERROR",u.TIMEOUT="TIMEOUT",u.BUFFER_OVERRUN="BUFFER_OVERRUN",u.NUMERIC_FAULT="NUMERIC_FAULT",u.MISSING_NEW="MISSING_NEW",u.INVALID_ARGUMENT="INVALID_ARGUMENT",u.MISSING_ARGUMENT="MISSING_ARGUMENT",u.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",u.CALL_EXCEPTION="CALL_EXCEPTION",u.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",u.NONCE_EXPIRED="NONCE_EXPIRED",u.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",u.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",u.TRANSACTION_REPLACED="TRANSACTION_REPLACED",u.ACTION_REJECTED="ACTION_REJECTED",b;var u})();const l="0123456789abcdef";let h=(()=>{class u{constructor(_){Object.defineProperty(this,"version",{enumerable:!0,value:_,writable:!1})}_log(_,w){const S=_.toLowerCase();null==E[S]&&this.throwArgumentError("invalid log level name","logLevel",_),!(d>E[S])&&console.log.apply(console,w)}debug(..._){this._log(u.levels.DEBUG,_)}info(..._){this._log(u.levels.INFO,_)}warn(..._){this._log(u.levels.WARNING,_)}makeError(_,w,S){if(O)return this.makeError("censored error",w,{});w||(w=u.errors.UNKNOWN_ERROR),S||(S={});const I=[];Object.keys(S).forEach(W=>{const G=S[W];try{if(G instanceof Uint8Array){let H="";for(let j=0;j>4],H+=l[15&G[j]];I.push(W+"=Uint8Array(0x"+H+")")}else I.push(W+"="+JSON.stringify(G))}catch{I.push(W+"="+JSON.stringify(S[W].toString()))}}),I.push(`code=${w}`),I.push(`version=${this.version}`);const P=_;let L="";switch(w){case b.NUMERIC_FAULT:{L="NUMERIC_FAULT";const W=_;switch(W){case"overflow":case"underflow":case"division-by-zero":L+="-"+W;break;case"negative-power":case"negative-width":L+="-unsupported";break;case"unbound-bitwise-result":L+="-unbound-result"}break}case b.CALL_EXCEPTION:case b.INSUFFICIENT_FUNDS:case b.MISSING_NEW:case b.NONCE_EXPIRED:case b.REPLACEMENT_UNDERPRICED:case b.TRANSACTION_REPLACED:case b.UNPREDICTABLE_GAS_LIMIT:L=w}L&&(_+=" [ See: https://links.ethers.org/v5-errors-"+L+" ]"),I.length&&(_+=" ("+I.join(", ")+")");const V=new Error(_);return V.reason=P,V.code=w,Object.keys(S).forEach(function(W){V[W]=S[W]}),V}throwError(_,w,S){throw this.makeError(_,w,S)}throwArgumentError(_,w,S){return this.throwError(_,u.errors.INVALID_ARGUMENT,{argument:w,value:S})}assert(_,w,S,I){_||this.throwError(w,S,I)}assertArgument(_,w,S,I){_||this.throwArgumentError(w,S,I)}checkNormalize(_){null==_&&(_="platform missing String.prototype.normalize"),T&&this.throwError("platform missing String.prototype.normalize",u.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:T})}checkSafeUint53(_,w){"number"==typeof _&&(null==w&&(w="value not safe"),(_<0||_>=9007199254740991)&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:_}),_%1&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:_}))}checkArgumentCount(_,w,S){S=S?": "+S:"",_w&&this.throwError("too many arguments"+S,u.errors.UNEXPECTED_ARGUMENT,{count:_,expectedCount:w})}checkNew(_,w){(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}checkAbstract(_,w){_===w?this.throwError("cannot instantiate abstract class "+JSON.stringify(w.name)+" directly; use a sub-class",u.errors.UNSUPPORTED_OPERATION,{name:_.name,operation:"new"}):(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}static globalLogger(){return x||(x=new u("logger/5.7.0")),x}static setCensorship(_,w){if(!_&&w&&this.globalLogger().throwError("cannot permanently disable censorship",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),q){if(!_)return;this.globalLogger().throwError("error censorship permanent",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}O=!!_,q=!!w}static setLogLevel(_){const w=E[_.toLowerCase()];null!=w?d=w:u.globalLogger().warn("invalid log level - "+_)}static from(_){return new u(_)}}return u.errors=b,u.levels=g,u})()},35473:(bt,be,Y)=>{"use strict";Y.d(be,{H:()=>l});const O=new(Y(53898).Logger)("networks/5.7.1");function d(h){const u=function(m,_){null==_&&(_={});const w=[];if(m.InfuraProvider&&"-"!==_.infura)try{w.push(new m.InfuraProvider(h,_.infura))}catch{}if(m.EtherscanProvider&&"-"!==_.etherscan)try{w.push(new m.EtherscanProvider(h,_.etherscan))}catch{}if(m.AlchemyProvider&&"-"!==_.alchemy)try{w.push(new m.AlchemyProvider(h,_.alchemy))}catch{}if(m.PocketProvider&&"-"!==_.pocket){const S=["goerli","ropsten","rinkeby","sepolia"];try{const I=new m.PocketProvider(h,_.pocket);I.network&&-1===S.indexOf(I.network.name)&&w.push(I)}catch{}}if(m.CloudflareProvider&&"-"!==_.cloudflare)try{w.push(new m.CloudflareProvider(h))}catch{}if(m.AnkrProvider&&"-"!==_.ankr)try{const S=["ropsten"],I=new m.AnkrProvider(h,_.ankr);I.network&&-1===S.indexOf(I.network.name)&&w.push(I)}catch{}if(0===w.length)return null;if(m.FallbackProvider){let S=1;return null!=_.quorum?S=_.quorum:"homestead"===h&&(S=2),new m.FallbackProvider(w,S)}return w[0]};return u.renetwork=function(m){return d(m)},u}function x(h,u){const m=function(_,w){return _.JsonRpcProvider?new _.JsonRpcProvider(h,u):null};return m.renetwork=function(_){return x(h,_)},m}const f={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:d("homestead")},T={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:d("ropsten")},g={chainId:63,name:"classicMordor",_defaultProvider:x("https://www.ethercluster.com/mordor","classicMordor")},b={unspecified:{chainId:0,name:"unspecified"},homestead:f,mainnet:f,morden:{chainId:2,name:"morden"},ropsten:T,testnet:T,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:d("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:d("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:d("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:d("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:x("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:g,classicTestnet:g,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:x("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:d("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:d("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"}};function l(h){if(null==h)return null;if("number"==typeof h){for(const _ in b){const w=b[_];if(w.chainId===h)return{name:w.name,chainId:w.chainId,ensAddress:w.ensAddress||null,_defaultProvider:w._defaultProvider||null}}return{chainId:h,name:"unknown"}}if("string"==typeof h){const _=b[h];return null==_?null:{name:_.name,chainId:_.chainId,ensAddress:_.ensAddress,_defaultProvider:_._defaultProvider||null}}const u=b[h.name];if(!u)return"number"!=typeof h.chainId&&O.throwArgumentError("invalid network chainId","network",h),h;0!==h.chainId&&h.chainId!==u.chainId&&O.throwArgumentError("network chainId mismatch","network",h);let m=h._defaultProvider||null;return null==m&&u._defaultProvider&&(m=function(h){return h&&"function"==typeof h.renetwork}(u._defaultProvider)?u._defaultProvider.renetwork(h):u._defaultProvider),{name:h.name,chainId:u.chainId,ensAddress:h.ensAddress||u.ensAddress||null,_defaultProvider:m}}},39938:(bt,be,Y)=>{"use strict";Y.d(be,{n:()=>O});var ie=Y(61488),q=Y(15614);function O(E,d,x,f,T){E=(0,ie.arrayify)(E),d=(0,ie.arrayify)(d);let g,b=1;const l=new Uint8Array(f),h=new Uint8Array(d.length+4);let u,m;h.set(d);for(let _=1;_<=b;_++){h[d.length]=_>>24&255,h[d.length+1]=_>>16&255,h[d.length+2]=_>>8&255,h[d.length+3]=255&_;let w=(0,ie.arrayify)((0,q.Gy)(T,E,h));g||(g=w.length,m=new Uint8Array(g),b=Math.ceil(f/g),u=f-(b-1)*g),m.set(w);for(let P=1;P{"use strict";Y.r(be),Y.d(be,{Description:()=>m,checkProperties:()=>T,deepCopy:()=>u,defineReadOnly:()=>d,getStatic:()=>x,resolveProperties:()=>f,shallowCopy:()=>g});var ie=Y(53898);const E=new ie.Logger("properties/5.7.0");function d(_,w,S){Object.defineProperty(_,w,{enumerable:!0,value:S,writable:!1})}function x(_,w){for(let S=0;S<32;S++){if(_[w])return _[w];if(!_.prototype||"object"!=typeof _.prototype)break;_=Object.getPrototypeOf(_.prototype).constructor}return null}function f(_){return function(_,w,S,I){return new(S||(S=Promise))(function(L,V){function W(j){try{H(I.next(j))}catch(K){V(K)}}function G(j){try{H(I.throw(j))}catch(K){V(K)}}function H(j){j.done?L(j.value):function(L){return L instanceof S?L:new S(function(V){V(L)})}(j.value).then(W,G)}H((I=I.apply(_,w||[])).next())})}(this,void 0,void 0,function*(){const w=Object.keys(_).map(I=>Promise.resolve(_[I]).then(L=>({key:I,value:L})));return(yield Promise.all(w)).reduce((I,P)=>(I[P.key]=P.value,I),{})})}function T(_,w){(!_||"object"!=typeof _)&&E.throwArgumentError("invalid object","object",_),Object.keys(_).forEach(S=>{w[S]||E.throwArgumentError("invalid object key - "+S,"transaction:"+S,_)})}function g(_){const w={};for(const S in _)w[S]=_[S];return w}const b={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function l(_){if(null==_||b[typeof _])return!0;if(Array.isArray(_)||"object"==typeof _){if(!Object.isFrozen(_))return!1;const w=Object.keys(_);for(let S=0;Su(w)));if("object"==typeof _){const w={};for(const S in _){const I=_[S];void 0!==I&&d(w,S,u(I))}return w}return E.throwArgumentError("Cannot deepCopy "+typeof _,"object",_)}function u(_){return h(_)}class m{constructor(w){for(const S in w)this[S]=u(w[S])}}},5102:(bt,be,Y)=>{"use strict";Y.d(be,{i:()=>ie});const ie="providers/5.7.2"},70744:(bt,be,Y)=>{"use strict";Y.d(be,{Zk:()=>Te,H2:()=>ue});var ie=Y(11527),q=Y(61488),d=Y(53744),x=Y(2024),f=Y(45052),T=Y(21),g=Y(35473),b=Y(92275),l=Y(15614),h=Y(8822),u=Y(51838),m=Y(29901),_=Y.n(m),w=Y(53898),S=Y(5102),I=Y(47949),P=function(le,X,ne,pe){return new(ne||(ne=Promise))(function(xe,Ce){function ke(ze){try{Ee(pe.next(ze))}catch(Ve){Ce(Ve)}}function me(ze){try{Ee(pe.throw(ze))}catch(Ve){Ce(Ve)}}function Ee(ze){ze.done?xe(ze.value):function(xe){return xe instanceof ne?xe:new ne(function(Ce){Ce(xe)})}(ze.value).then(ke,me)}Ee((pe=pe.apply(le,X||[])).next())})};const L=new w.Logger(S.i);function W(le){return null==le?"null":(32!==(0,q.hexDataLength)(le)&&L.throwArgumentError("invalid topic","topic",le),le.toLowerCase())}function G(le){for(le=le.slice();le.length>0&&null==le[le.length-1];)le.pop();return le.map(X=>{if(Array.isArray(X)){const ne={};X.forEach(_e=>{ne[W(_e)]=!0});const pe=Object.keys(ne);return pe.sort(),pe.join("|")}return W(X)}).join("&")}function j(le){if("string"==typeof le){if(le=le.toLowerCase(),32===(0,q.hexDataLength)(le))return"tx:"+le;if(-1===le.indexOf(":"))return le}else{if(Array.isArray(le))return"filter:*:"+G(le);if(ie.Sg.isForkEvent(le))throw L.warn("not implemented"),new Error("not implemented");if(le&&"object"==typeof le)return"filter:"+(le.address||"*")+":"+G(le.topics||[])}throw new Error("invalid event - "+le)}function K(){return(new Date).getTime()}function R(le){return new Promise(X=>{setTimeout(X,le)})}const o=["block","network","pending","poll"];class y{constructor(X,ne,pe){(0,b.defineReadOnly)(this,"tag",X),(0,b.defineReadOnly)(this,"listener",ne),(0,b.defineReadOnly)(this,"once",pe),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(){const X=this.tag.split(":");return"tx"!==X[0]?null:X[1]}get filter(){const X=this.tag.split(":");if("filter"!==X[0])return null;const ne=X[1],pe=""===(le=X[2])?[]:le.split(/&/g).map(X=>{if(""===X)return[];const ne=X.split("|").map(pe=>"null"===pe?null:pe);return 1===ne.length?ne[0]:ne}),_e={};var le;return pe.length>0&&(_e.topics=pe),ne&&"*"!==ne&&(_e.address=ne),_e}pollable(){return this.tag.indexOf(":")>=0||o.indexOf(this.tag)>=0}}const M={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 v(le){return(0,q.hexZeroPad)(x.O$.from(le).toHexString(),32)}function k(le){return d.Base58.encode((0,q.concat)([le,(0,q.hexDataSlice)((0,l.JQ)((0,l.JQ)(le)),0,4)]))}const D=new RegExp("^(ipfs)://(.*)$","i"),N=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),D,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function C(le,X){try{return(0,h.ZN)(a(le,X))}catch{}return null}function a(le,X){if("0x"===le)return null;const ne=x.O$.from((0,q.hexDataSlice)(le,X,X+32)).toNumber(),pe=x.O$.from((0,q.hexDataSlice)(le,ne,ne+32)).toNumber();return(0,q.hexDataSlice)(le,ne+32,ne+32+pe)}function B(le){return le.match(/^ipfs:\/\/ipfs\//i)?le=le.substring(12):le.match(/^ipfs:\/\//i)?le=le.substring(7):L.throwArgumentError("unsupported IPFS format","link",le),`https://gateway.ipfs.io/ipfs/${le}`}function Q(le){const X=(0,q.arrayify)(le);if(X.length>32)throw new Error("internal; should not happen");const ne=new Uint8Array(32);return ne.set(X,32-X.length),ne}function ee(le){if(le.length%32==0)return le;const X=new Uint8Array(32*Math.ceil(le.length/32));return X.set(le),X}function ce(le){const X=[];let ne=0;for(let pe=0;pex.O$.from(X).eq(1)).catch(X=>{if(X.code===w.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,X})),this._supportsEip2544}_fetch(X,ne){return P(this,void 0,void 0,function*(){const pe={to:this.address,ccipReadEnabled:!0,data:(0,q.hexConcat)([X,(0,T.VM)(this.name),ne||"0x"])};let _e=!1;(yield this.supportsWildcard())&&(_e=!0,pe.data=(0,q.hexConcat)(["0x9061b923",ce([(0,T.Kn)(this.name),pe.data])]));try{let xe=yield this.provider.call(pe);return(0,q.arrayify)(xe).length%32==4&&L.throwError("resolver threw error",w.Logger.errors.CALL_EXCEPTION,{transaction:pe,data:xe}),_e&&(xe=a(xe,0)),xe}catch(xe){if(xe.code===w.Logger.errors.CALL_EXCEPTION)return null;throw xe}})}_fetchBytes(X,ne){return P(this,void 0,void 0,function*(){const pe=yield this._fetch(X,ne);return null!=pe?a(pe,0):null})}_getAddress(X,ne){const pe=M[String(X)];if(null==pe&&L.throwError(`unsupported coin type: ${X}`,w.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${X})`}),"eth"===pe.ilk)return this.provider.formatter.address(ne);const _e=(0,q.arrayify)(ne);if(null!=pe.p2pkh){const xe=ne.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(xe){const Ce=parseInt(xe[1],16);if(xe[2].length===2*Ce&&Ce>=1&&Ce<=75)return k((0,q.concat)([[pe.p2pkh],"0x"+xe[2]]))}}if(null!=pe.p2sh){const xe=ne.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(xe){const Ce=parseInt(xe[1],16);if(xe[2].length===2*Ce&&Ce>=1&&Ce<=75)return k((0,q.concat)([[pe.p2sh],"0x"+xe[2]]))}}if(null!=pe.prefix){const xe=_e[1];let Ce=_e[0];if(0===Ce?20!==xe&&32!==xe&&(Ce=-1):Ce=-1,Ce>=0&&_e.length===2+xe&&xe>=1&&xe<=75){const ke=_().toWords(_e.slice(2));return ke.unshift(Ce),_().encode(pe.prefix,ke)}}return null}getAddress(X){return P(this,void 0,void 0,function*(){if(null==X&&(X=60),60===X)try{const _e=yield this._fetch("0x3b3b57de");return"0x"===_e||_e===f.R?null:this.provider.formatter.callAddress(_e)}catch(_e){if(_e.code===w.Logger.errors.CALL_EXCEPTION)return null;throw _e}const ne=yield this._fetchBytes("0xf1cb7e06",v(X));if(null==ne||"0x"===ne)return null;const pe=this._getAddress(X,ne);return null==pe&&L.throwError("invalid or unsupported coin data",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${X})`,coinType:X,data:ne}),pe})}getAvatar(){return P(this,void 0,void 0,function*(){const X=[{type:"name",content:this.name}];try{const ne=yield this.getText("avatar");if(null==ne)return null;for(let pe=0;peCe[me]);return"sia://"+ke}return L.throwError("invalid or unsupported content hash data",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:X})})}getText(X){return P(this,void 0,void 0,function*(){let ne=(0,h.Y0)(X);ne=(0,q.concat)([v(64),v(ne.length),ne]),ne.length%32!=0&&(ne=(0,q.concat)([ne,(0,q.hexZeroPad)("0x",32-X.length%32)]));const pe=yield this._fetchBytes("0x59d1d43c",(0,q.hexlify)(ne));return null==pe||"0x"===pe?null:(0,h.ZN)(pe)})}}let we=null,ae=1;class Te extends ie.zt{constructor(X){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,b.defineReadOnly)(this,"anyNetwork","any"===X),this.anyNetwork&&(X=this.detectNetwork()),X instanceof Promise)this._networkPromise=X,X.catch(ne=>{}),this._ready().catch(ne=>{});else{const ne=(0,b.getStatic)(new.target,"getNetwork")(X);ne?((0,b.defineReadOnly)(this,"_network",ne),this.emit("network",ne,null)):L.throwArgumentError("invalid network","network",X)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return P(this,void 0,void 0,function*(){if(null==this._network){let X=null;if(this._networkPromise)try{X=yield this._networkPromise}catch{}null==X&&(X=yield this.detectNetwork()),X||L.throwError("no network detected",w.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=X:(0,b.defineReadOnly)(this,"_network",X),this.emit("network",X,null))}return this._network})}get ready(){return(0,u.poll)(()=>this._ready().then(X=>X,X=>{if(X.code!==w.Logger.errors.NETWORK_ERROR||"noNetwork"!==X.event)throw X}))}static getFormatter(){return null==we&&(we=new I.Mb),we}static getNetwork(X){return(0,g.H)(X??"homestead")}ccipReadFetch(X,ne,pe){return P(this,void 0,void 0,function*(){if(this.disableCcipRead||0===pe.length)return null;const _e=X.to.toLowerCase(),xe=ne.toLowerCase(),Ce=[];for(let ke=0;ke=0?null:JSON.stringify({data:xe,sender:_e}),Ve=yield(0,u.fetchJson)({url:Ee,errorPassThrough:!0},ze,(tt,mt)=>(tt.status=mt.statusCode,tt));if(Ve.data)return Ve.data;const nt=Ve.message||"unknown error";if(Ve.status>=400&&Ve.status<500)return L.throwError(`response not found during CCIP fetch: ${nt}`,w.Logger.errors.SERVER_ERROR,{url:me,errorMessage:nt});Ce.push(nt)}return L.throwError(`error encountered during CCIP fetch: ${Ce.map(ke=>JSON.stringify(ke)).join(", ")}`,w.Logger.errors.SERVER_ERROR,{urls:pe,errorMessages:Ce})})}_getInternalBlockNumber(X){return P(this,void 0,void 0,function*(){if(yield this._ready(),X>0)for(;this._internalBlockNumber;){const _e=this._internalBlockNumber;try{const xe=yield _e;if(K()-xe.respTime<=X)return xe.blockNumber;break}catch{if(this._internalBlockNumber===_e)break}}const ne=K(),pe=(0,b.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(_e=>null,_e=>_e)}).then(({blockNumber:_e,networkError:xe})=>{if(xe)throw this._internalBlockNumber===pe&&(this._internalBlockNumber=null),xe;const Ce=K();return(_e=x.O$.from(_e).toNumber()){this._internalBlockNumber===pe&&(this._internalBlockNumber=null)}),(yield pe).blockNumber})}poll(){return P(this,void 0,void 0,function*(){const X=ae++,ne=[];let pe=null;try{pe=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(_e){return void this.emit("error",_e)}if(this._setFastBlockNumber(pe),this.emit("poll",X,pe),pe!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=pe-1),Math.abs(this._emitted.block-pe)>1e3)L.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${pe})`),this.emit("error",L.makeError("network block skew detected",w.Logger.errors.NETWORK_ERROR,{blockNumber:pe,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",pe);else for(let _e=this._emitted.block+1;_e<=pe;_e++)this.emit("block",_e);this._emitted.block!==pe&&(this._emitted.block=pe,Object.keys(this._emitted).forEach(_e=>{if("block"===_e)return;const xe=this._emitted[_e];"pending"!==xe&&pe-xe>12&&delete this._emitted[_e]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=pe-1),this._events.forEach(_e=>{switch(_e.type){case"tx":{const xe=_e.hash;let Ce=this.getTransactionReceipt(xe).then(ke=>(!ke||null==ke.blockNumber||(this._emitted["t:"+xe]=ke.blockNumber,this.emit(xe,ke)),null)).catch(ke=>{this.emit("error",ke)});ne.push(Ce);break}case"filter":if(!_e._inflight){_e._inflight=!0,-2===_e._lastBlockNumber&&(_e._lastBlockNumber=pe-1);const xe=_e.filter;xe.fromBlock=_e._lastBlockNumber+1,xe.toBlock=pe;const Ce=xe.toBlock-this._maxFilterBlockRange;Ce>xe.fromBlock&&(xe.fromBlock=Ce),xe.fromBlock<0&&(xe.fromBlock=0);const ke=this.getLogs(xe).then(me=>{_e._inflight=!1,0!==me.length&&me.forEach(Ee=>{Ee.blockNumber>_e._lastBlockNumber&&(_e._lastBlockNumber=Ee.blockNumber),this._emitted["b:"+Ee.blockHash]=Ee.blockNumber,this._emitted["t:"+Ee.transactionHash]=Ee.blockNumber,this.emit(xe,Ee)})}).catch(me=>{this.emit("error",me),_e._inflight=!1});ne.push(ke)}}}),this._lastBlockNumber=pe,Promise.all(ne).then(()=>{this.emit("didPoll",X)}).catch(_e=>{this.emit("error",_e)})}else this.emit("didPoll",X)})}resetEventsBlock(X){this._lastBlockNumber=X-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return P(this,void 0,void 0,function*(){return L.throwError("provider does not support network detection",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return P(this,void 0,void 0,function*(){const X=yield this._ready(),ne=yield this.detectNetwork();if(X.chainId!==ne.chainId){if(this.anyNetwork)return this._network=ne,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",ne,X),yield R(0),this._network;const pe=L.makeError("underlying network changed",w.Logger.errors.NETWORK_ERROR,{event:"changed",network:X,detectedNetwork:ne});throw this.emit("error",pe),pe}return X})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(X=>{this._setFastBlockNumber(X)},X=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(X){X&&!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))):!X&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(X){if("number"!=typeof X||X<=0||parseInt(String(X))!=X)throw new Error("invalid polling interval");this._pollingInterval=X,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const X=K();return X-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=X,this._fastBlockNumberPromise=this.getBlockNumber().then(ne=>((null==this._fastBlockNumber||ne>this._fastBlockNumber)&&(this._fastBlockNumber=ne),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(X){null!=this._fastBlockNumber&&Xthis._fastBlockNumber)&&(this._fastBlockNumber=X,this._fastBlockNumberPromise=Promise.resolve(X)))}waitForTransaction(X,ne,pe){return P(this,void 0,void 0,function*(){return this._waitForTransaction(X,ne??1,pe||0,null)})}_waitForTransaction(X,ne,pe,_e){return P(this,void 0,void 0,function*(){const xe=yield this.getTransactionReceipt(X);return(xe?xe.confirmations:0)>=ne?xe:new Promise((Ce,ke)=>{const me=[];let Ee=!1;const ze=function(){return!!Ee||(Ee=!0,me.forEach(nt=>{nt()}),!1)},Ve=nt=>{nt.confirmations{this.removeListener(X,Ve)}),_e){let nt=_e.startBlock,tt=null;const mt=ht=>P(this,void 0,void 0,function*(){Ee||(yield R(1e3),this.getTransactionCount(_e.from).then(wt=>P(this,void 0,void 0,function*(){if(!Ee){if(wt<=_e.nonce)nt=ht;else{{const Pt=yield this.getTransaction(X);if(Pt&&null!=Pt.blockNumber)return}for(null==tt&&(tt=nt-3,tt<_e.startBlock&&(tt=_e.startBlock));tt<=ht;){if(Ee)return;const Pt=yield this.getBlockWithTransactions(tt);for(let st=0;st{Ee||this.once("block",mt)}))});if(Ee)return;this.once("block",mt),me.push(()=>{this.removeListener("block",mt)})}if("number"==typeof pe&&pe>0){const nt=setTimeout(()=>{ze()||ke(L.makeError("timeout exceeded",w.Logger.errors.TIMEOUT,{timeout:pe}))},pe);nt.unref&&nt.unref(),me.push(()=>{clearTimeout(nt)})}})})}getBlockNumber(){return P(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return P(this,void 0,void 0,function*(){yield this.getNetwork();const X=yield this.perform("getGasPrice",{});try{return x.O$.from(X)}catch(ne){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:X,error:ne})}})}getBalance(X,ne){return P(this,void 0,void 0,function*(){yield this.getNetwork();const pe=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(ne)}),_e=yield this.perform("getBalance",pe);try{return x.O$.from(_e)}catch(xe){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getBalance",params:pe,result:_e,error:xe})}})}getTransactionCount(X,ne){return P(this,void 0,void 0,function*(){yield this.getNetwork();const pe=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(ne)}),_e=yield this.perform("getTransactionCount",pe);try{return x.O$.from(_e).toNumber()}catch(xe){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:pe,result:_e,error:xe})}})}getCode(X,ne){return P(this,void 0,void 0,function*(){yield this.getNetwork();const pe=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(ne)}),_e=yield this.perform("getCode",pe);try{return(0,q.hexlify)(_e)}catch(xe){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getCode",params:pe,result:_e,error:xe})}})}getStorageAt(X,ne,pe){return P(this,void 0,void 0,function*(){yield this.getNetwork();const _e=yield(0,b.resolveProperties)({address:this._getAddress(X),blockTag:this._getBlockTag(pe),position:Promise.resolve(ne).then(Ce=>(0,q.hexValue)(Ce))}),xe=yield this.perform("getStorageAt",_e);try{return(0,q.hexlify)(xe)}catch(Ce){return L.throwError("bad result from backend",w.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:_e,result:xe,error:Ce})}})}_wrapTransaction(X,ne,pe){if(null!=ne&&32!==(0,q.hexDataLength)(ne))throw new Error("invalid response - sendTransaction");const _e=X;return null!=ne&&X.hash!==ne&&L.throwError("Transaction hash mismatch from Provider.sendTransaction.",w.Logger.errors.UNKNOWN_ERROR,{expectedHash:X.hash,returnedHash:ne}),_e.wait=(xe,Ce)=>P(this,void 0,void 0,function*(){let ke;null==xe&&(xe=1),null==Ce&&(Ce=0),0!==xe&&null!=pe&&(ke={data:X.data,from:X.from,nonce:X.nonce,to:X.to,value:X.value,startBlock:pe});const me=yield this._waitForTransaction(X.hash,xe,Ce,ke);return null==me&&0===xe?null:(this._emitted["t:"+X.hash]=me.blockNumber,0===me.status&&L.throwError("transaction failed",w.Logger.errors.CALL_EXCEPTION,{transactionHash:X.hash,transaction:X,receipt:me}),me)}),_e}sendTransaction(X){return P(this,void 0,void 0,function*(){yield this.getNetwork();const ne=yield Promise.resolve(X).then(xe=>(0,q.hexlify)(xe)),pe=this.formatter.transaction(X);null==pe.confirmations&&(pe.confirmations=0);const _e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const xe=yield this.perform("sendTransaction",{signedTransaction:ne});return this._wrapTransaction(pe,xe,_e)}catch(xe){throw xe.transaction=pe,xe.transactionHash=pe.hash,xe}})}_getTransactionRequest(X){return P(this,void 0,void 0,function*(){const ne=yield X,pe={};return["from","to"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe?this._getAddress(xe):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe?x.O$.from(xe):null))}),["type"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe??null))}),ne.accessList&&(pe.accessList=this.formatter.accessList(ne.accessList)),["data"].forEach(_e=>{null!=ne[_e]&&(pe[_e]=Promise.resolve(ne[_e]).then(xe=>xe?(0,q.hexlify)(xe):null))}),this.formatter.transactionRequest(yield(0,b.resolveProperties)(pe))})}_getFilter(X){return P(this,void 0,void 0,function*(){X=yield X;const ne={};return null!=X.address&&(ne.address=this._getAddress(X.address)),["blockHash","topics"].forEach(pe=>{null!=X[pe]&&(ne[pe]=X[pe])}),["fromBlock","toBlock"].forEach(pe=>{null!=X[pe]&&(ne[pe]=this._getBlockTag(X[pe]))}),this.formatter.filter(yield(0,b.resolveProperties)(ne))})}_call(X,ne,pe){return P(this,void 0,void 0,function*(){pe>=10&&L.throwError("CCIP read exceeded maximum redirections",w.Logger.errors.SERVER_ERROR,{redirects:pe,transaction:X});const _e=X.to,xe=yield this.perform("call",{transaction:X,blockTag:ne});if(pe>=0&&"latest"===ne&&null!=_e&&"0x556f1830"===xe.substring(0,10)&&(0,q.hexDataLength)(xe)%32==4)try{const Ce=(0,q.hexDataSlice)(xe,4),ke=(0,q.hexDataSlice)(Ce,0,32);x.O$.from(ke).eq(_e)||L.throwError("CCIP Read sender did not match",w.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:X,data:xe});const me=[],Ee=x.O$.from((0,q.hexDataSlice)(Ce,32,64)).toNumber(),ze=x.O$.from((0,q.hexDataSlice)(Ce,Ee,Ee+32)).toNumber(),Ve=(0,q.hexDataSlice)(Ce,Ee+32);for(let Pt=0;PtP(this,void 0,void 0,function*(){const xe=yield this.perform("getBlock",_e);if(null==xe)return null!=_e.blockHash&&null==this._emitted["b:"+_e.blockHash]||null!=_e.blockTag&&pe>this._emitted.block?null:void 0;if(ne){let Ce=null;for(let me=0;methis._wrapTransaction(me)),ke}return this.formatter.block(xe)}),{oncePoll:this})})}getBlock(X){return this._getBlock(X,!1)}getBlockWithTransactions(X){return this._getBlock(X,!0)}getTransaction(X){return P(this,void 0,void 0,function*(){yield this.getNetwork(),X=yield X;const ne={transactionHash:this.formatter.hash(X,!0)};return(0,u.poll)(()=>P(this,void 0,void 0,function*(){const pe=yield this.perform("getTransaction",ne);if(null==pe)return null==this._emitted["t:"+X]?null:void 0;const _e=this.formatter.transactionResponse(pe);if(null==_e.blockNumber)_e.confirmations=0;else if(null==_e.confirmations){let Ce=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-_e.blockNumber+1;Ce<=0&&(Ce=1),_e.confirmations=Ce}return this._wrapTransaction(_e)}),{oncePoll:this})})}getTransactionReceipt(X){return P(this,void 0,void 0,function*(){yield this.getNetwork(),X=yield X;const ne={transactionHash:this.formatter.hash(X,!0)};return(0,u.poll)(()=>P(this,void 0,void 0,function*(){const pe=yield this.perform("getTransactionReceipt",ne);if(null==pe)return null==this._emitted["t:"+X]?null:void 0;if(null==pe.blockHash)return;const _e=this.formatter.receipt(pe);if(null==_e.blockNumber)_e.confirmations=0;else if(null==_e.confirmations){let Ce=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-_e.blockNumber+1;Ce<=0&&(Ce=1),_e.confirmations=Ce}return _e}),{oncePoll:this})})}getLogs(X){return P(this,void 0,void 0,function*(){yield this.getNetwork();const ne=yield(0,b.resolveProperties)({filter:this._getFilter(X)}),pe=yield this.perform("getLogs",ne);return pe.forEach(_e=>{null==_e.removed&&(_e.removed=!1)}),I.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(pe)})}getEtherPrice(){return P(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(X){return P(this,void 0,void 0,function*(){if("number"==typeof(X=yield X)&&X<0){X%1&&L.throwArgumentError("invalid BlockTag","blockTag",X);let ne=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return ne+=X,ne<0&&(ne=0),this.formatter.blockTag(ne)}return this.formatter.blockTag(X)})}getResolver(X){return P(this,void 0,void 0,function*(){let ne=X;for(;;){if(""===ne||"."===ne||"eth"!==X&&"eth"===ne)return null;const pe=yield this._getResolver(ne,"getResolver");if(null!=pe){const _e=new ue(this,pe,X);return ne===X||(yield _e.supportsWildcard())?_e:null}ne=ne.split(".").slice(1).join(".")}})}_getResolver(X,ne){return P(this,void 0,void 0,function*(){null==ne&&(ne="ENS");const pe=yield this.getNetwork();pe.ensAddress||L.throwError("network does not support ENS",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:ne,network:pe.name});try{const _e=yield this.call({to:pe.ensAddress,data:"0x0178b8bf"+(0,T.VM)(X).substring(2)});return this.formatter.callAddress(_e)}catch{}return null})}resolveName(X){return P(this,void 0,void 0,function*(){X=yield X;try{return Promise.resolve(this.formatter.address(X))}catch(pe){if((0,q.isHexString)(X))throw pe}"string"!=typeof X&&L.throwArgumentError("invalid ENS name","name",X);const ne=yield this.getResolver(X);return ne?yield ne.getAddress():null})}lookupAddress(X){return P(this,void 0,void 0,function*(){X=yield X;const ne=(X=this.formatter.address(X)).substring(2).toLowerCase()+".addr.reverse",pe=yield this._getResolver(ne,"lookupAddress");if(null==pe)return null;const _e=C(yield this.call({to:pe,data:"0x691f3431"+(0,T.VM)(ne).substring(2)}),0);return(yield this.resolveName(_e))!=X?null:_e})}getAvatar(X){return P(this,void 0,void 0,function*(){let ne=null;if((0,q.isHexString)(X)){const xe=this.formatter.address(X).substring(2).toLowerCase()+".addr.reverse",Ce=yield this._getResolver(xe,"getAvatar");if(!Ce)return null;ne=new ue(this,Ce,xe);try{const ke=yield ne.getAvatar();if(ke)return ke.url}catch(ke){if(ke.code!==w.Logger.errors.CALL_EXCEPTION)throw ke}try{const ke=C(yield this.call({to:Ce,data:"0x691f3431"+(0,T.VM)(xe).substring(2)}),0);ne=yield this.getResolver(ke)}catch(ke){if(ke.code!==w.Logger.errors.CALL_EXCEPTION)throw ke;return null}}else if(ne=yield this.getResolver(X),!ne)return null;const pe=yield ne.getAvatar();return null==pe?null:pe.url})}perform(X,ne){return L.throwError(X+" not implemented",w.Logger.errors.NOT_IMPLEMENTED,{operation:X})}_startEvent(X){this.polling=this._events.filter(ne=>ne.pollable()).length>0}_stopEvent(X){this.polling=this._events.filter(ne=>ne.pollable()).length>0}_addEventListener(X,ne,pe){const _e=new y(j(X),ne,pe);return this._events.push(_e),this._startEvent(_e),this}on(X,ne){return this._addEventListener(X,ne,!1)}once(X,ne){return this._addEventListener(X,ne,!0)}emit(X,...ne){let pe=!1,_e=[],xe=j(X);return this._events=this._events.filter(Ce=>Ce.tag!==xe||(setTimeout(()=>{Ce.listener.apply(this,ne)},0),pe=!0,!Ce.once||(_e.push(Ce),!1))),_e.forEach(Ce=>{this._stopEvent(Ce)}),pe}listenerCount(X){if(!X)return this._events.length;let ne=j(X);return this._events.filter(pe=>pe.tag===ne).length}listeners(X){if(null==X)return this._events.map(pe=>pe.listener);let ne=j(X);return this._events.filter(pe=>pe.tag===ne).map(pe=>pe.listener)}off(X,ne){if(null==ne)return this.removeAllListeners(X);const pe=[];let _e=!1,xe=j(X);return this._events=this._events.filter(Ce=>!(Ce.tag===xe&&Ce.listener==ne&&!_e&&(_e=!0,pe.push(Ce),1))),pe.forEach(Ce=>{this._stopEvent(Ce)}),this}removeAllListeners(X){let ne=[];if(null==X)ne=this._events,this._events=[];else{const pe=j(X);this._events=this._events.filter(_e=>_e.tag!==pe||(ne.push(_e),!1))}return ne.forEach(pe=>{this._stopEvent(pe)}),this}}},12539:(bt,be,Y)=>{"use strict";Y.d(be,{A:()=>w});var ie=Y(61488),q=Y(92275),O=Y(32701),E=Y(51838),d=Y(47949),x=Y(53898),f=Y(5102),T=Y(70744),g=function(S,I,P,L){return new(P||(P=Promise))(function(W,G){function H(R){try{K(L.next(R))}catch(o){G(o)}}function j(R){try{K(L.throw(R))}catch(o){G(o)}}function K(R){R.done?W(R.value):function(W){return W instanceof P?W:new P(function(G){G(W)})}(R.value).then(H,j)}K((L=L.apply(S,I||[])).next())})};const b=new x.Logger(f.i);function l(S){const I={};for(let P in S){if(null==S[P])continue;let L=S[P];"type"===P&&0===L||(L={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[P]?(0,ie.hexValue)((0,ie.hexlify)(L)):"accessList"===P?"["+(0,O.accessListify)(L).map(V=>`{address:"${V.address}",storageKeys:["${V.storageKeys.join('","')}"]}`).join(",")+"]":(0,ie.hexlify)(L),I[P]=L)}return I}function h(S){if(0==S.status&&("No records found"===S.message||"No transactions found"===S.message))return S.result;if(1!=S.status||"string"!=typeof S.message||!S.message.match(/^OK/)){const I=new Error("invalid response");throw I.result=JSON.stringify(S),(S.result||"").toLowerCase().indexOf("rate limit")>=0&&(I.throttleRetry=!0),I}return S.result}function u(S){if(S&&0==S.status&&"NOTOK"==S.message&&(S.result||"").toLowerCase().indexOf("rate limit")>=0){const I=new Error("throttled response");throw I.result=JSON.stringify(S),I.throttleRetry=!0,I}if("2.0"!=S.jsonrpc){const I=new Error("invalid response");throw I.result=JSON.stringify(S),I}if(S.error){const I=new Error(S.error.message||"unknown error");throw S.error.code&&(I.code=S.error.code),S.error.data&&(I.data=S.error.data),I}return S.result}function m(S){if("pending"===S)throw new Error("pending not supported");return"latest"===S?S:parseInt(S.substring(2),16)}function _(S,I,P){if("call"===S&&I.code===x.Logger.errors.SERVER_ERROR){const V=I.error;if(V&&(V.message.match(/reverted/i)||V.message.match(/VM execution error/i))){let W=V.data;if(W&&(W="0x"+W.replace(/^.*0x/i,"")),(0,ie.isHexString)(W))return W;b.throwError("missing revert data in call exception",x.Logger.errors.CALL_EXCEPTION,{error:I,data:"0x"})}}let L=I.message;throw I.code===x.Logger.errors.SERVER_ERROR&&(I.error&&"string"==typeof I.error.message?L=I.error.message:"string"==typeof I.body?L=I.body:"string"==typeof I.responseText&&(L=I.responseText)),L=(L||"").toLowerCase(),L.match(/insufficient funds/)&&b.throwError("insufficient funds for intrinsic transaction cost",x.Logger.errors.INSUFFICIENT_FUNDS,{error:I,method:S,transaction:P}),L.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&b.throwError("nonce has already been used",x.Logger.errors.NONCE_EXPIRED,{error:I,method:S,transaction:P}),L.match(/another transaction with same nonce/)&&b.throwError("replacement fee too low",x.Logger.errors.REPLACEMENT_UNDERPRICED,{error:I,method:S,transaction:P}),L.match(/execution failed due to an exception|execution reverted/)&&b.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",x.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:I,method:S,transaction:P}),I}class w extends T.Zk{constructor(I,P){super(I),(0,q.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,q.defineReadOnly)(this,"apiKey",P||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return b.throwArgumentError("unsupported network","network",this.network.name)}getUrl(I,P){const L=Object.keys(P).reduce((W,G)=>{const H=P[G];return null!=H&&(W+=`&${G}=${H}`),W},"");return`${this.baseUrl}/api?module=${I}${L}${this.apiKey?`&apikey=${this.apiKey}`:""}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(I,P){return P.module=I,P.apikey=this.apiKey,P}fetch(I,P,L){return g(this,void 0,void 0,function*(){const V=L?this.getPostUrl():this.getUrl(I,P),W=L?this.getPostData(I,P):null,G="proxy"===I?u:h;this.emit("debug",{action:"request",request:V,provider:this});const H={url:V,throttleSlotInterval:1e3,throttleCallback:(R,o)=>(this.isCommunityResource()&&(0,d.vh)(),Promise.resolve(!0))};let j=null;W&&(H.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},j=Object.keys(W).map(R=>`${R}=${W[R]}`).join("&"));const K=yield(0,E.fetchJson)(H,j,G||u);return this.emit("debug",{action:"response",request:V,response:(0,q.deepCopy)(K),provider:this}),K})}detectNetwork(){return g(this,void 0,void 0,function*(){return this.network})}perform(I,P){const L=Object.create(null,{perform:{get:()=>super.perform}});return g(this,void 0,void 0,function*(){switch(I){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:P.address,tag:P.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:P.address,tag:P.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:P.address,tag:P.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:P.address,position:P.position,tag:P.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:P.signedTransaction},!0).catch(V=>_("sendTransaction",V,P.signedTransaction));case"getBlock":if(P.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:P.blockTag,boolean:P.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:P.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:P.transactionHash});case"call":{if("latest"!==P.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const V=l(P.transaction);V.module="proxy",V.action="eth_call";try{return yield this.fetch("proxy",V,!0)}catch(W){return _("call",W,P.transaction)}}case"estimateGas":{const V=l(P.transaction);V.module="proxy",V.action="eth_estimateGas";try{return yield this.fetch("proxy",V,!0)}catch(W){return _("estimateGas",W,P.transaction)}}case"getLogs":{const V={action:"getLogs"};if(P.filter.fromBlock&&(V.fromBlock=m(P.filter.fromBlock)),P.filter.toBlock&&(V.toBlock=m(P.filter.toBlock)),P.filter.address&&(V.address=P.filter.address),P.filter.topics&&P.filter.topics.length>0&&(P.filter.topics.length>1&&b.throwError("unsupported topic count",x.Logger.errors.UNSUPPORTED_OPERATION,{topics:P.filter.topics}),1===P.filter.topics.length)){const H=P.filter.topics[0];("string"!=typeof H||66!==H.length)&&b.throwError("unsupported topic format",x.Logger.errors.UNSUPPORTED_OPERATION,{topic0:H}),V.topic0=H}const W=yield this.fetch("logs",V);let G={};for(let H=0;H{["contractAddress","to"].forEach(function(j){""==G[j]&&delete G[j]}),null==G.creates&&null!=G.contractAddress&&(G.creates=G.contractAddress);const H=this.formatter.transactionResponse(G);return G.timeStamp&&(H.timestamp=parseInt(G.timeStamp)),H})})}isCommunityResource(){return null==this.apiKey}}},47949:(bt,be,Y)=>{"use strict";Y.d(be,{Mb:()=>b,Ed:()=>l,Gp:()=>h,vh:()=>m});var ie=Y(2885),q=Y(2024),O=Y(61488),E=Y(51528),d=Y(92275),x=Y(32701),f=Y(53898),T=Y(5102);const g=new f.Logger(T.i);class b{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const w={},S=this.address.bind(this),I=this.bigNumber.bind(this),P=this.blockTag.bind(this),L=this.data.bind(this),V=this.hash.bind(this),W=this.hex.bind(this),G=this.number.bind(this),H=this.type.bind(this);return w.transaction={hash:V,type:H,accessList:b.allowNull(this.accessList.bind(this),null),blockHash:b.allowNull(V,null),blockNumber:b.allowNull(G,null),transactionIndex:b.allowNull(G,null),confirmations:b.allowNull(G,null),from:S,gasPrice:b.allowNull(I),maxPriorityFeePerGas:b.allowNull(I),maxFeePerGas:b.allowNull(I),gasLimit:I,to:b.allowNull(S,null),value:I,nonce:G,data:L,r:b.allowNull(this.uint256),s:b.allowNull(this.uint256),v:b.allowNull(G),creates:b.allowNull(S,null),raw:b.allowNull(L)},w.transactionRequest={from:b.allowNull(S),nonce:b.allowNull(G),gasLimit:b.allowNull(I),gasPrice:b.allowNull(I),maxPriorityFeePerGas:b.allowNull(I),maxFeePerGas:b.allowNull(I),to:b.allowNull(S),value:b.allowNull(I),data:b.allowNull(K=>this.data(K,!0)),type:b.allowNull(G),accessList:b.allowNull(this.accessList.bind(this),null)},w.receiptLog={transactionIndex:G,blockNumber:G,transactionHash:V,address:S,topics:b.arrayOf(V),data:L,logIndex:G,blockHash:V},w.receipt={to:b.allowNull(this.address,null),from:b.allowNull(this.address,null),contractAddress:b.allowNull(S,null),transactionIndex:G,root:b.allowNull(W),gasUsed:I,logsBloom:b.allowNull(L),blockHash:V,transactionHash:V,logs:b.arrayOf(this.receiptLog.bind(this)),blockNumber:G,confirmations:b.allowNull(G,null),cumulativeGasUsed:I,effectiveGasPrice:b.allowNull(I),status:b.allowNull(G),type:H},w.block={hash:b.allowNull(V),parentHash:V,number:G,timestamp:G,nonce:b.allowNull(W),difficulty:this.difficulty.bind(this),gasLimit:I,gasUsed:I,miner:b.allowNull(S),extraData:L,transactions:b.allowNull(b.arrayOf(V)),baseFeePerGas:b.allowNull(I)},w.blockWithTransactions=(0,d.shallowCopy)(w.block),w.blockWithTransactions.transactions=b.allowNull(b.arrayOf(this.transactionResponse.bind(this))),w.filter={fromBlock:b.allowNull(P,void 0),toBlock:b.allowNull(P,void 0),blockHash:b.allowNull(V,void 0),address:b.allowNull(S,void 0),topics:b.allowNull(this.topics.bind(this),void 0)},w.filterLog={blockNumber:b.allowNull(G),blockHash:b.allowNull(V),transactionIndex:G,removed:b.allowNull(this.boolean.bind(this)),address:S,data:b.allowFalsish(L,"0x"),topics:b.arrayOf(V),transactionHash:V,logIndex:G},w}accessList(w){return(0,x.accessListify)(w||[])}number(w){return"0x"===w?0:q.O$.from(w).toNumber()}type(w){return"0x"===w||null==w?0:q.O$.from(w).toNumber()}bigNumber(w){return q.O$.from(w)}boolean(w){if("boolean"==typeof w)return w;if("string"==typeof w){if("true"===(w=w.toLowerCase()))return!0;if("false"===w)return!1}throw new Error("invalid boolean - "+w)}hex(w,S){return"string"==typeof w&&(!S&&"0x"!==w.substring(0,2)&&(w="0x"+w),(0,O.isHexString)(w))?w.toLowerCase():g.throwArgumentError("invalid hash","value",w)}data(w,S){const I=this.hex(w,S);if(I.length%2!=0)throw new Error("invalid data; odd-length - "+w);return I}address(w){return(0,ie.getAddress)(w)}callAddress(w){if(!(0,O.isHexString)(w,32))return null;const S=(0,ie.getAddress)((0,O.hexDataSlice)(w,12));return S===E.d?null:S}contractAddress(w){return(0,ie.getContractAddress)(w)}blockTag(w){if(null==w)return"latest";if("earliest"===w)return"0x0";switch(w){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return w}if("number"==typeof w||(0,O.isHexString)(w))return(0,O.hexValue)(w);throw new Error("invalid blockTag")}hash(w,S){const I=this.hex(w,S);return 32!==(0,O.hexDataLength)(I)?g.throwArgumentError("invalid hash","value",w):I}difficulty(w){if(null==w)return null;const S=q.O$.from(w);try{return S.toNumber()}catch{}return null}uint256(w){if(!(0,O.isHexString)(w))throw new Error("invalid uint256");return(0,O.hexZeroPad)(w,32)}_block(w,S){null!=w.author&&null==w.miner&&(w.miner=w.author);const I=null!=w._difficulty?w._difficulty:w.difficulty,P=b.check(S,w);return P._difficulty=null==I?null:q.O$.from(I),P}block(w){return this._block(w,this.formats.block)}blockWithTransactions(w){return this._block(w,this.formats.blockWithTransactions)}transactionRequest(w){return b.check(this.formats.transactionRequest,w)}transactionResponse(w){null!=w.gas&&null==w.gasLimit&&(w.gasLimit=w.gas),w.to&&q.O$.from(w.to).isZero()&&(w.to="0x0000000000000000000000000000000000000000"),null!=w.input&&null==w.data&&(w.data=w.input),null==w.to&&null==w.creates&&(w.creates=this.contractAddress(w)),(1===w.type||2===w.type)&&null==w.accessList&&(w.accessList=[]);const S=b.check(this.formats.transaction,w);if(null!=w.chainId){let I=w.chainId;(0,O.isHexString)(I)&&(I=q.O$.from(I).toNumber()),S.chainId=I}else{let I=w.networkId;null==I&&null==S.v&&(I=w.chainId),(0,O.isHexString)(I)&&(I=q.O$.from(I).toNumber()),"number"!=typeof I&&null!=S.v&&(I=(S.v-35)/2,I<0&&(I=0),I=parseInt(I)),"number"!=typeof I&&(I=0),S.chainId=I}return S.blockHash&&"x"===S.blockHash.replace(/0/g,"")&&(S.blockHash=null),S}transaction(w){return(0,x.parse)(w)}receiptLog(w){return b.check(this.formats.receiptLog,w)}receipt(w){const S=b.check(this.formats.receipt,w);if(null!=S.root)if(S.root.length<=4){const I=q.O$.from(S.root).toNumber();0===I||1===I?(null!=S.status&&S.status!==I&&g.throwArgumentError("alt-root-status/status mismatch","value",{root:S.root,status:S.status}),S.status=I,delete S.root):g.throwArgumentError("invalid alt-root-status","value.root",S.root)}else 66!==S.root.length&&g.throwArgumentError("invalid root hash","value.root",S.root);return null!=S.status&&(S.byzantium=!0),S}topics(w){return Array.isArray(w)?w.map(S=>this.topics(S)):null!=w?this.hash(w,!0):null}filter(w){return b.check(this.formats.filter,w)}filterLog(w){return b.check(this.formats.filterLog,w)}static check(w,S){const I={};for(const P in w)try{const L=w[P](S[P]);void 0!==L&&(I[P]=L)}catch(L){throw L.checkKey=P,L.checkValue=S[P],L}return I}static allowNull(w,S){return function(I){return null==I?S:w(I)}}static allowFalsish(w,S){return function(I){return I?w(I):S}}static arrayOf(w){return function(S){if(!Array.isArray(S))throw new Error("not an array");const I=[];return S.forEach(function(P){I.push(w(P))}),I}}}function l(_){return _&&"function"==typeof _.isCommunityResource}function h(_){return l(_)&&_.isCommunityResource()}let u=!1;function m(){u||(u=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},80831:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{AlchemyProvider:()=>W,AlchemyWebSocketProvider:()=>V,AnkrProvider:()=>K,BaseProvider:()=>O.Zk,CloudflareProvider:()=>y,EtherscanProvider:()=>M.A,FallbackProvider:()=>_e,Formatter:()=>d.Mb,InfuraProvider:()=>Ee,InfuraWebSocketProvider:()=>me,IpcProvider:()=>xe,JsonRpcBatchProvider:()=>ze,JsonRpcProvider:()=>f.r,JsonRpcSigner:()=>f.C,NodesmithProvider:()=>tt,PocketProvider:()=>wt,Provider:()=>ie.zt,Resolver:()=>O.H2,StaticJsonRpcProvider:()=>S,UrlJsonRpcProvider:()=>I,Web3Provider:()=>St,WebSocketProvider:()=>m,getDefaultProvider:()=>dn,getNetwork:()=>q.H,isCommunityResourcable:()=>d.Ed,isCommunityResource:()=>d.Gp,showThrottleMessage:()=>d.vh});var ie=Y(11527),q=Y(35473),O=Y(70744),E=Y(92275),d=Y(47949),x=Y(2024),f=Y(61522),T=Y(53898),g=Y(5102);let b=null;try{if(b=WebSocket,null==b)throw new Error("inject please")}catch{const It=new T.Logger(g.i);b=function(){It.throwError("WebSockets not supported in this environment",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var l=function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch(Wr){fn(Wr)}}function Jr(Bn){try{Ln(jt.throw(Bn))}catch(Wr){fn(Wr)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Jr)}Ln((jt=jt.apply(Nt,It||[])).next())})};const h=new T.Logger(g.i);let u=1;class m extends f.r{constructor(It,qt){"any"===qt&&h.throwError("WebSocketProvider does not support 'any' network yet",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof It?It:"_websocket",qt),this._pollingInterval=-1,this._wsReady=!1,(0,E.defineReadOnly)(this,"_websocket","string"==typeof It?new b(this.connection.url):It),(0,E.defineReadOnly)(this,"_requests",{}),(0,E.defineReadOnly)(this,"_subs",{}),(0,E.defineReadOnly)(this,"_subIds",{}),(0,E.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(Yt=>{this.websocket.send(this._requests[Yt].payload)})},this.websocket.onmessage=Yt=>{const Wn=Yt.data,fn=JSON.parse(Wn);if(null!=fn.id){const $n=String(fn.id),Jr=this._requests[$n];if(delete this._requests[$n],void 0!==fn.result)Jr.callback(null,fn.result),this.emit("debug",{action:"response",request:JSON.parse(Jr.payload),response:fn.result,provider:this});else{let Ln=null;fn.error?(Ln=new Error(fn.error.message||"unknown error"),(0,E.defineReadOnly)(Ln,"code",fn.error.code||null),(0,E.defineReadOnly)(Ln,"response",Wn)):Ln=new Error("unknown error"),Jr.callback(Ln,void 0),this.emit("debug",{action:"response",error:Ln,request:JSON.parse(Jr.payload),provider:this})}}else if("eth_subscription"===fn.method){const $n=this._subs[fn.params.subscription];$n&&$n.processFunc(fn.params.result)}else console.warn("this should not happen")};const jt=setInterval(()=>{this.emit("poll")},1e3);jt.unref&&jt.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(It){h.throwError("cannot reset events block on WebSocketProvider",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(It){h.throwError("cannot set polling interval on WebSocketProvider",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return l(this,void 0,void 0,function*(){return null})}set polling(It){!It||h.throwError("cannot set polling on WebSocketProvider",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(It,qt){const jt=u++;return new Promise((Yt,Wn)=>{const $n=JSON.stringify({method:It,params:qt,id:jt,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse($n),provider:this}),this._requests[String(jt)]={callback:function(Jr,Ln){return Jr?Wn(Jr):Yt(Ln)},payload:$n},this._wsReady&&this.websocket.send($n)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(It,qt,jt){return l(this,void 0,void 0,function*(){let Yt=this._subIds[It];null==Yt&&(Yt=Promise.all(qt).then(fn=>this.send("eth_subscribe",fn)),this._subIds[It]=Yt);const Wn=yield Yt;this._subs[Wn]={tag:It,processFunc:jt}})}_startEvent(It){switch(It.type){case"block":this._subscribe("block",["newHeads"],qt=>{const jt=x.O$.from(qt.number).toNumber();this._emitted.block=jt,this.emit("block",jt)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],qt=>{this.emit("pending",qt)});break;case"filter":this._subscribe(It.tag,["logs",this._getFilter(It.filter)],qt=>{null==qt.removed&&(qt.removed=!1),this.emit(It.filter,this.formatter.filterLog(qt))});break;case"tx":{const qt=jt=>{const Yt=jt.hash;this.getTransactionReceipt(Yt).then(Wn=>{!Wn||this.emit(Yt,Wn)})};qt(It),this._subscribe("tx",["newHeads"],jt=>{this._events.filter(Yt=>"tx"===Yt.type).forEach(qt)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",It)}}_stopEvent(It){let qt=It.tag;if("tx"===It.type){if(this._events.filter(Yt=>"tx"===Yt.type).length)return;qt="tx"}else if(this.listenerCount(It.event))return;const jt=this._subIds[qt];!jt||(delete this._subIds[qt],jt.then(Yt=>{!this._subs[Yt]||(delete this._subs[Yt],this.send("eth_unsubscribe",[Yt]))}))}destroy(){return l(this,void 0,void 0,function*(){this.websocket.readyState===b.CONNECTING&&(yield new Promise(It=>{this.websocket.onopen=function(){It(!0)},this.websocket.onerror=function(){It(!1)}})),this.websocket.close(1e3)})}}const w=new T.Logger(g.i);class S extends f.r{detectNetwork(){const It=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch(Wr){fn(Wr)}}function Jr(Bn){try{Ln(jt.throw(Bn))}catch(Wr){fn(Wr)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Jr)}Ln((jt=jt.apply(Nt,It||[])).next())})}(this,void 0,void 0,function*(){let qt=this.network;return null==qt&&(qt=yield It.detectNetwork.call(this),qt||w.throwError("no network detected",T.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,E.defineReadOnly)(this,"_network",qt),this.emit("network",qt,null))),qt})}}class I extends S{constructor(It,qt){w.checkAbstract(new.target,I),It=(0,E.getStatic)(new.target,"getNetwork")(It),qt=(0,E.getStatic)(new.target,"getApiKey")(qt),super((0,E.getStatic)(new.target,"getUrl")(It,qt),It),"string"==typeof qt?(0,E.defineReadOnly)(this,"apiKey",qt):null!=qt&&Object.keys(qt).forEach(Yt=>{(0,E.defineReadOnly)(this,Yt,qt[Yt])})}_startPending(){w.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(It){return w.throwError("API provider does not support signing",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(It){return It}static getUrl(It,qt){return w.throwError("not implemented; sub-classes must override getUrl",T.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const P=new T.Logger(g.i),L="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class V extends m{constructor(It,qt){const jt=new W(It,qt);super(jt.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),jt.network),(0,E.defineReadOnly)(this,"apiKey",jt.apiKey)}isCommunityResource(){return this.apiKey===L}}class W extends I{static getWebSocketProvider(It,qt){return new V(It,qt)}static getApiKey(It){return null==It?L:(It&&"string"!=typeof It&&P.throwArgumentError("invalid apiKey","apiKey",It),It)}static getUrl(It,qt){let jt=null;switch(It.name){case"homestead":jt="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":jt="eth-goerli.g.alchemy.com/v2/";break;case"matic":jt="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":jt="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":jt="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":jt="arb-goerli.g.alchemy.com/v2/";break;case"optimism":jt="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":jt="opt-goerli.g.alchemy.com/v2/";break;default:P.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+jt+qt,throttleCallback:(Yt,Wn)=>(qt===L&&(0,d.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===L}}const G=new T.Logger(g.i),H="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function j(Nt){switch(Nt){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return G.throwArgumentError("unsupported network","name",Nt)}class K extends I{isCommunityResource(){return this.apiKey===H}static getApiKey(It){return It??H}static getUrl(It,qt){null==qt&&(qt=H);const jt={allowGzip:!0,url:"https://"+j(It.name)+qt,throttleCallback:(Yt,Wn)=>(qt.apiKey===H&&(0,d.vh)(),Promise.resolve(!0))};return null!=qt.projectSecret&&(jt.user="",jt.password=qt.projectSecret),jt}}const o=new T.Logger(g.i);class y extends I{static getApiKey(It){return null!=It&&o.throwArgumentError("apiKey not supported for cloudflare","apiKey",It),null}static getUrl(It,qt){let jt=null;return"homestead"===It.name?jt="https://cloudflare-eth.com/":o.throwArgumentError("unsupported network","network",arguments[0]),jt}perform(It,qt){const jt=Object.create(null,{perform:{get:()=>super.perform}});return function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch(Wr){fn(Wr)}}function Jr(Bn){try{Ln(jt.throw(Bn))}catch(Wr){fn(Wr)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Jr)}Ln((jt=jt.apply(Nt,It||[])).next())})}(this,void 0,void 0,function*(){return"getBlockNumber"===It?(yield jt.perform.call(this,"getBlock",{blockTag:"latest"})).number:jt.perform.call(this,It,qt)})}}var M=Y(12539),v=Y(61488),k=Y(34820),D=Y(51838),N=function(Nt,It,qt,jt){return new(qt||(qt=Promise))(function(Wn,fn){function $n(Bn){try{Ln(jt.next(Bn))}catch(Wr){fn(Wr)}}function Jr(Bn){try{Ln(jt.throw(Bn))}catch(Wr){fn(Wr)}}function Ln(Bn){Bn.done?Wn(Bn.value):function(Wn){return Wn instanceof qt?Wn:new qt(function(fn){fn(Wn)})}(Bn.value).then($n,Jr)}Ln((jt=jt.apply(Nt,It||[])).next())})};const C=new T.Logger(g.i);function a(){return(new Date).getTime()}function B(Nt){let It=null;for(let qt=0;qtIt?null:(jt+Yt)/2}function ee(Nt){if(null===Nt)return"null";if("number"==typeof Nt||"boolean"==typeof Nt)return JSON.stringify(Nt);if("string"==typeof Nt)return Nt;if(x.O$.isBigNumber(Nt))return Nt.toString();if(Array.isArray(Nt))return JSON.stringify(Nt.map(It=>ee(It)));if("object"==typeof Nt){const It=Object.keys(Nt);return It.sort(),"{"+It.map(qt=>{let jt=Nt[qt];return jt="function"==typeof jt?"[function]":ee(jt),JSON.stringify(qt)+":"+jt}).join(",")+"}"}throw new Error("unknown value type: "+typeof Nt)}let ce=1;function ue(Nt){let It=null,qt=null,jt=new Promise(fn=>{It=function(){qt&&(clearTimeout(qt),qt=null),fn()},qt=setTimeout(It,Nt)});return{cancel:It,getPromise:function(){return jt},wait:fn=>(jt=jt.then(fn),jt)}}const we=[T.Logger.errors.CALL_EXCEPTION,T.Logger.errors.INSUFFICIENT_FUNDS,T.Logger.errors.NONCE_EXPIRED,T.Logger.errors.REPLACEMENT_UNDERPRICED,T.Logger.errors.UNPREDICTABLE_GAS_LIMIT],ae=["address","args","errorArgs","errorSignature","method","transaction"];function Te(Nt,It){const qt={weight:Nt.weight};return Object.defineProperty(qt,"provider",{get:()=>Nt.provider}),Nt.start&&(qt.start=Nt.start),It&&(qt.duration=It-Nt.start),Nt.done&&(Nt.error?qt.error=Nt.error:qt.result=Nt.result||null),qt}function ne(Nt,It){return N(this,void 0,void 0,function*(){const qt=Nt.provider;return null!=qt.blockNumber&&qt.blockNumber>=It||-1===It?qt:(0,D.poll)(()=>new Promise((jt,Yt)=>{setTimeout(function(){return jt(qt.blockNumber>=It?qt:Nt.cancelled?null:void 0)},0)}),{oncePoll:qt})})}function pe(Nt,It,qt,jt){return N(this,void 0,void 0,function*(){let Yt=Nt.provider;switch(qt){case"getBlockNumber":case"getGasPrice":return Yt[qt]();case"getEtherPrice":if(Yt.getEtherPrice)return Yt.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),Yt[qt](jt.address,jt.blockTag||"latest");case"getStorageAt":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),Yt.getStorageAt(jt.address,jt.position,jt.blockTag||"latest");case"getBlock":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),Yt[jt.includeTransactions?"getBlockWithTransactions":"getBlock"](jt.blockTag||jt.blockHash);case"call":case"estimateGas":return jt.blockTag&&(0,v.isHexString)(jt.blockTag)&&(Yt=yield ne(Nt,It)),"call"===qt&&jt.blockTag?Yt[qt](jt.transaction,jt.blockTag):Yt[qt](jt.transaction);case"getTransaction":case"getTransactionReceipt":return Yt[qt](jt.transactionHash);case"getLogs":{let Wn=jt.filter;return(Wn.fromBlock&&(0,v.isHexString)(Wn.fromBlock)||Wn.toBlock&&(0,v.isHexString)(Wn.toBlock))&&(Yt=yield ne(Nt,It)),Yt.getLogs(Wn)}}return C.throwError("unknown method error",T.Logger.errors.UNKNOWN_ERROR,{method:qt,params:jt})})}class _e extends O.Zk{constructor(It,qt){0===It.length&&C.throwArgumentError("missing providers","providers",It);const jt=It.map((fn,$n)=>{if(ie.zt.isProvider(fn)){const Bn=(0,d.Gp)(fn)?2e3:750;return Object.freeze({provider:fn,weight:1,stallTimeout:Bn,priority:1})}const Jr=(0,E.shallowCopy)(fn);null==Jr.priority&&(Jr.priority=1),null==Jr.stallTimeout&&(Jr.stallTimeout=(0,d.Gp)(fn)?2e3:750),null==Jr.weight&&(Jr.weight=1);const Ln=Jr.weight;return(Ln%1||Ln>512||Ln<1)&&C.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${$n}].weight`,Ln),Object.freeze(Jr)}),Yt=jt.reduce((fn,$n)=>fn+$n.weight,0);null==qt?qt=Yt/2:qt>Yt&&C.throwArgumentError("quorum will always fail; larger than total weight","quorum",qt);let Wn=B(jt.map(fn=>fn.provider.network));null==Wn&&(Wn=new Promise((fn,$n)=>{setTimeout(()=>{this.detectNetwork().then(fn,$n)},0)})),super(Wn),(0,E.defineReadOnly)(this,"providerConfigs",Object.freeze(jt)),(0,E.defineReadOnly)(this,"quorum",qt),this._highestBlockNumber=-1}detectNetwork(){return N(this,void 0,void 0,function*(){return B(yield Promise.all(this.providerConfigs.map(qt=>qt.provider.getNetwork())))})}perform(It,qt){return N(this,void 0,void 0,function*(){if("sendTransaction"===It){const Jr=yield Promise.all(this.providerConfigs.map(Ln=>Ln.provider.sendTransaction(qt.signedTransaction).then(Bn=>Bn.hash,Bn=>Bn)));for(let Ln=0;Ln$n.result);let fn=Q(Yt.map($n=>$n.result),2);if(null!=fn)return fn=Math.ceil(fn),Wn.indexOf(fn+1)>=0&&fn++,fn>=Nt._highestBlockNumber&&(Nt._highestBlockNumber=fn),Nt._highestBlockNumber};case"getGasPrice":return function(Yt){const Wn=Yt.map(fn=>fn.result);return Wn.sort(),Wn[Math.floor(Wn.length/2)]};case"getEtherPrice":return function(Yt){return Q(Yt.map(Wn=>Wn.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":jt=function(Yt){return null==Yt?null:((Yt=(0,E.shallowCopy)(Yt)).confirmations=-1,ee(Yt))};break;case"getBlock":jt=qt.includeTransactions?function(Yt){return null==Yt?null:((Yt=(0,E.shallowCopy)(Yt)).transactions=Yt.transactions.map(Wn=>((Wn=(0,E.shallowCopy)(Wn)).confirmations=-1,Wn)),ee(Yt))}:function(Yt){return null==Yt?null:ee(Yt)};break;default:throw new Error("unknown method: "+It)}return function(Nt,It){return function(qt){const jt={};qt.forEach(Wn=>{const fn=Nt(Wn.result);jt[fn]||(jt[fn]={count:0,result:Wn.result}),jt[fn].count++});const Yt=Object.keys(jt);for(let Wn=0;Wn=It)return fn.result}}}(jt,Nt.quorum)}(this,It,qt),Yt=(0,k.y)(this.providerConfigs.map(E.shallowCopy));Yt.sort((Jr,Ln)=>Jr.priority-Ln.priority);const Wn=this._highestBlockNumber;let fn=0,$n=!0;for(;;){const Jr=a();let Ln=Yt.filter(bn=>bn.runner&&Jr-bn.startbn+Lr.weight,0);for(;Ln{bn.staller=null}),bn.runner=pe(bn,Wn,It,qt).then(Kn=>{bn.done=!0,bn.result=Kn,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:Lr,backend:Te(bn,a()),request:{method:It,params:(0,E.deepCopy)(qt)},provider:this})},Kn=>{bn.done=!0,bn.error=Kn,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:Lr,backend:Te(bn,a()),request:{method:It,params:(0,E.deepCopy)(qt)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:Lr,backend:Te(bn,null),request:{method:It,params:(0,E.deepCopy)(qt)},provider:this}),Ln+=bn.weight}const Bn=[];Yt.forEach(bn=>{bn.done||!bn.runner||(Bn.push(bn.runner),bn.staller&&Bn.push(bn.staller.getPromise()))}),Bn.length&&(yield Promise.race(Bn));const Wr=Yt.filter(bn=>bn.done&&null==bn.error);if(Wr.length>=this.quorum){const bn=jt(Wr);if(void 0!==bn)return Yt.forEach(Lr=>{Lr.staller&&Lr.staller.cancel(),Lr.cancelled=!0}),bn;$n||(yield ue(100).getPromise()),$n=!1}const zn=Yt.reduce((bn,Lr)=>{if(!Lr.done||null==Lr.error)return bn;const Kn=Lr.error.code;return we.indexOf(Kn)>=0&&(bn[Kn]||(bn[Kn]={error:Lr.error,weight:0}),bn[Kn].weight+=Lr.weight),bn},{});if(Object.keys(zn).forEach(bn=>{const Lr=zn[bn];if(Lr.weight{Ii.staller&&Ii.staller.cancel(),Ii.cancelled=!0});const Kn=Lr.error,sr={};ae.forEach(Ii=>{null!=Kn[Ii]&&(sr[Ii]=Kn[Ii])}),C.throwError(Kn.reason||Kn.message,bn,sr)}),0===Yt.filter(bn=>!bn.done).length)break}return Yt.forEach(Jr=>{Jr.staller&&Jr.staller.cancel(),Jr.cancelled=!0}),C.throwError("failed to meet quorum",T.Logger.errors.SERVER_ERROR,{method:It,params:qt,results:Yt.map(Jr=>Te(Jr)),provider:this})})}}const xe=null,Ce=new T.Logger(g.i),ke="84842078b09946638c03157f83405213";class me extends m{constructor(It,qt){const jt=new Ee(It,qt),Yt=jt.connection;Yt.password&&Ce.throwError("INFURA WebSocket project secrets unsupported",T.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"}),super(Yt.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),It),(0,E.defineReadOnly)(this,"apiKey",jt.projectId),(0,E.defineReadOnly)(this,"projectId",jt.projectId),(0,E.defineReadOnly)(this,"projectSecret",jt.projectSecret)}isCommunityResource(){return this.projectId===ke}}class Ee extends I{static getWebSocketProvider(It,qt){return new me(It,qt)}static getApiKey(It){const qt={apiKey:ke,projectId:ke,projectSecret:null};return null==It||("string"==typeof It?qt.projectId=It:null!=It.projectSecret?(Ce.assertArgument("string"==typeof It.projectId,"projectSecret requires a projectId","projectId",It.projectId),Ce.assertArgument("string"==typeof It.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),qt.projectId=It.projectId,qt.projectSecret=It.projectSecret):It.projectId&&(qt.projectId=It.projectId),qt.apiKey=qt.projectId),qt}static getUrl(It,qt){let jt=null;switch(It?It.name:"unknown"){case"homestead":jt="mainnet.infura.io";break;case"goerli":jt="goerli.infura.io";break;case"sepolia":jt="sepolia.infura.io";break;case"matic":jt="polygon-mainnet.infura.io";break;case"maticmum":jt="polygon-mumbai.infura.io";break;case"optimism":jt="optimism-mainnet.infura.io";break;case"optimism-goerli":jt="optimism-goerli.infura.io";break;case"arbitrum":jt="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":jt="arbitrum-goerli.infura.io";break;default:Ce.throwError("unsupported network",T.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:It})}const Yt={allowGzip:!0,url:"https://"+jt+"/v3/"+qt.projectId,throttleCallback:(Wn,fn)=>(qt.projectId===ke&&(0,d.vh)(),Promise.resolve(!0))};return null!=qt.projectSecret&&(Yt.user="",Yt.password=qt.projectSecret),Yt}isCommunityResource(){return this.projectId===ke}}class ze extends f.r{send(It,qt){const jt={method:It,params:qt,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const Yt={request:jt,resolve:null,reject:null},Wn=new Promise((fn,$n)=>{Yt.resolve=fn,Yt.reject=$n});return this._pendingBatch.push(Yt),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{const fn=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const $n=fn.map(Jr=>Jr.request);return this.emit("debug",{action:"requestBatch",request:(0,E.deepCopy)($n),provider:this}),(0,D.fetchJson)(this.connection,JSON.stringify($n)).then(Jr=>{this.emit("debug",{action:"response",request:$n,response:Jr,provider:this}),fn.forEach((Ln,Bn)=>{const Wr=Jr[Bn];if(Wr.error){const zn=new Error(Wr.error.message);zn.code=Wr.error.code,zn.data=Wr.error.data,Ln.reject(zn)}else Ln.resolve(Wr.result)})},Jr=>{this.emit("debug",{action:"response",error:Jr,request:$n,provider:this}),fn.forEach(Ln=>{Ln.reject(Jr)})})},10)),Wn}}const Ve=new T.Logger(g.i);class tt extends I{static getApiKey(It){return It&&"string"!=typeof It&&Ve.throwArgumentError("invalid apiKey","apiKey",It),It||"ETHERS_JS_SHARED"}static getUrl(It,qt){Ve.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let jt=null;switch(It.name){case"homestead":jt="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":jt="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":jt="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":jt="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":jt="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ve.throwArgumentError("unsupported network","network",arguments[0])}return jt+"?apiKey="+qt}}const mt=new T.Logger(g.i),ht="62e1ad51b37b8e00394bda3b";class wt extends I{static getApiKey(It){const qt={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==It?qt.applicationId=ht:"string"==typeof It?qt.applicationId=It:null!=It.applicationSecretKey?(qt.applicationId=It.applicationId,qt.applicationSecretKey=It.applicationSecretKey):It.applicationId?qt.applicationId=It.applicationId:mt.throwArgumentError("unsupported PocketProvider apiKey","apiKey",It),qt}static getUrl(It,qt){let jt=null;switch(It?It.name:"unknown"){case"goerli":jt="eth-goerli.gateway.pokt.network";break;case"homestead":jt="eth-mainnet.gateway.pokt.network";break;case"kovan":jt="poa-kovan.gateway.pokt.network";break;case"matic":jt="poly-mainnet.gateway.pokt.network";break;case"maticmum":jt="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":jt="eth-rinkeby.gateway.pokt.network";break;case"ropsten":jt="eth-ropsten.gateway.pokt.network";break;default:mt.throwError("unsupported network",T.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:It})}const Wn={headers:{},url:`https://${jt}/v1/lb/${qt.applicationId}`};return null!=qt.applicationSecretKey&&(Wn.user="",Wn.password=qt.applicationSecretKey),Wn}isCommunityResource(){return this.applicationId===ht}}const Pt=new T.Logger(g.i);let st=1;function Ye(Nt,It){const qt="Web3LegacyFetcher";return function(jt,Yt){const Wn={method:jt,params:Yt,id:st++,jsonrpc:"2.0"};return new Promise((fn,$n)=>{this.emit("debug",{action:"request",fetcher:qt,request:(0,E.deepCopy)(Wn),provider:this}),It(Wn,(Jr,Ln)=>{if(Jr)return this.emit("debug",{action:"response",fetcher:qt,error:Jr,request:Wn,provider:this}),$n(Jr);if(this.emit("debug",{action:"response",fetcher:qt,request:Wn,response:Ln,provider:this}),Ln.error){const Bn=new Error(Ln.error.message);return Bn.code=Ln.error.code,Bn.data=Ln.error.data,$n(Bn)}fn(Ln.result)})})}}class St extends f.r{constructor(It,qt){null==It&&Pt.throwArgumentError("missing provider","provider",It);let jt=null,Yt=null,Wn=null;var Nt;"function"==typeof It?(jt="unknown:",Yt=It):(jt=It.host||It.path||"",!jt&&It.isMetaMask&&(jt="metamask"),Wn=It,It.request?(""===jt&&(jt="eip-1193:"),Nt=It,Yt=function(It,qt){null==qt&&(qt=[]);const jt={method:It,params:qt};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,E.deepCopy)(jt),provider:this}),Nt.request(jt).then(Yt=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:jt,response:Yt,provider:this}),Yt),Yt=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:jt,error:Yt,provider:this}),Yt})}):It.sendAsync?Yt=Ye(0,It.sendAsync.bind(It)):It.send?Yt=Ye(0,It.send.bind(It)):Pt.throwArgumentError("unsupported provider","provider",It),jt||(jt="unknown:")),super(jt,qt),(0,E.defineReadOnly)(this,"jsonRpcFetchFunc",Yt),(0,E.defineReadOnly)(this,"provider",Wn)}send(It,qt){return this.jsonRpcFetchFunc(It,qt)}}const Wt=new T.Logger(g.i);function dn(Nt,It){if(null==Nt&&(Nt="homestead"),"string"==typeof Nt){const jt=Nt.match(/^(ws|http)s?:/i);if(jt)switch(jt[1].toLowerCase()){case"http":case"https":return new f.r(Nt);case"ws":case"wss":return new m(Nt);default:Wt.throwArgumentError("unsupported URL scheme","network",Nt)}}const qt=(0,q.H)(Nt);return(!qt||!qt._defaultProvider)&&Wt.throwError("unsupported getDefaultProvider network",T.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:Nt}),qt._defaultProvider({FallbackProvider:_e,AlchemyProvider:W,AnkrProvider:K,CloudflareProvider:y,EtherscanProvider:M.A,InfuraProvider:Ee,JsonRpcProvider:f.r,NodesmithProvider:tt,PocketProvider:wt,Web3Provider:St,IpcProvider:xe},It)}},61522:(bt,be,Y)=>{"use strict";Y.d(be,{C:()=>V,r:()=>H});var ie=Y(11221),q=Y(2024),O=Y(61488),E=Y(72072),d=Y(92275),x=Y(8822),f=Y(32701),T=Y(51838),g=Y(53898),b=Y(5102),l=Y(70744),h=function(j,K,R,o){return new(R||(R=Promise))(function(M,v){function k(C){try{N(o.next(C))}catch(a){v(a)}}function D(C){try{N(o.throw(C))}catch(a){v(a)}}function N(C){C.done?M(C.value):function(M){return M instanceof R?M:new R(function(v){v(M)})}(C.value).then(k,D)}N((o=o.apply(j,K||[])).next())})};const u=new g.Logger(b.i),m=["call","estimateGas"];function _(j,K){if(null==j)return null;if("string"==typeof j.message&&j.message.match("reverted")){const R=(0,O.isHexString)(j.data)?j.data:null;if(!K||R)return{message:j.message,data:R}}if("object"==typeof j){for(const R in j){const o=_(j[R],K);if(o)return o}return null}if("string"==typeof j)try{return _(JSON.parse(j),K)}catch{}return null}function w(j,K,R){const o=R.transaction||R.signedTransaction;if("call"===j){const M=_(K,!0);if(M)return M.data;u.throwError("missing revert data in call exception; Transaction reverted without a reason string",g.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:o,error:K})}if("estimateGas"===j){let M=_(K.body,!1);null==M&&(M=_(K,!1)),M&&u.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:M.message,method:j,transaction:o,error:K})}let y=K.message;throw K.code===g.Logger.errors.SERVER_ERROR&&K.error&&"string"==typeof K.error.message?y=K.error.message:"string"==typeof K.body?y=K.body:"string"==typeof K.responseText&&(y=K.responseText),y=(y||"").toLowerCase(),y.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&u.throwError("insufficient funds for intrinsic transaction cost",g.Logger.errors.INSUFFICIENT_FUNDS,{error:K,method:j,transaction:o}),y.match(/nonce (is )?too low/i)&&u.throwError("nonce has already been used",g.Logger.errors.NONCE_EXPIRED,{error:K,method:j,transaction:o}),y.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&u.throwError("replacement fee too low",g.Logger.errors.REPLACEMENT_UNDERPRICED,{error:K,method:j,transaction:o}),y.match(/only replay-protected/i)&&u.throwError("legacy pre-eip-155 transactions not supported",g.Logger.errors.UNSUPPORTED_OPERATION,{error:K,method:j,transaction:o}),m.indexOf(j)>=0&&y.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&u.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:K,method:j,transaction:o}),K}function S(j){return new Promise(function(K){setTimeout(K,j)})}function I(j){if(j.error){const K=new Error(j.error.message);throw K.code=j.error.code,K.data=j.error.data,K}return j.result}function P(j){return j&&j.toLowerCase()}const L={};class V extends ie.Signer{constructor(K,R,o){if(super(),K!==L)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,d.defineReadOnly)(this,"provider",R),null==o&&(o=0),"string"==typeof o?((0,d.defineReadOnly)(this,"_address",this.provider.formatter.address(o)),(0,d.defineReadOnly)(this,"_index",null)):"number"==typeof o?((0,d.defineReadOnly)(this,"_index",o),(0,d.defineReadOnly)(this,"_address",null)):u.throwArgumentError("invalid address or index","addressOrIndex",o)}connect(K){return u.throwError("cannot alter JSON-RPC Signer connection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new W(L,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(K=>(K.length<=this._index&&u.throwError("unknown account #"+this._index,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(K[this._index])))}sendUncheckedTransaction(K){K=(0,d.shallowCopy)(K);const R=this.getAddress().then(o=>(o&&(o=o.toLowerCase()),o));if(null==K.gasLimit){const o=(0,d.shallowCopy)(K);o.from=R,K.gasLimit=this.provider.estimateGas(o)}return null!=K.to&&(K.to=Promise.resolve(K.to).then(o=>h(this,void 0,void 0,function*(){if(null==o)return null;const y=yield this.provider.resolveName(o);return null==y&&u.throwArgumentError("provided ENS name resolves to null","tx.to",o),y}))),(0,d.resolveProperties)({tx:(0,d.resolveProperties)(K),sender:R}).then(({tx:o,sender:y})=>{null!=o.from?o.from.toLowerCase()!==y&&u.throwArgumentError("from address mismatch","transaction",K):o.from=y;const M=this.provider.constructor.hexlifyTransaction(o,{from:!0});return this.provider.send("eth_sendTransaction",[M]).then(v=>v,v=>("string"==typeof v.message&&v.message.match(/user denied/i)&&u.throwError("user rejected transaction",g.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:o}),w("sendTransaction",v,M)))})}signTransaction(K){return u.throwError("signing transactions is unsupported",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(K){return h(this,void 0,void 0,function*(){const R=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),o=yield this.sendUncheckedTransaction(K);try{return yield(0,T.poll)(()=>h(this,void 0,void 0,function*(){const y=yield this.provider.getTransaction(o);if(null!==y)return this.provider._wrapTransaction(y,o,R)}),{oncePoll:this.provider})}catch(y){throw y.transactionHash=o,y}})}signMessage(K){return h(this,void 0,void 0,function*(){const R="string"==typeof K?(0,x.Y0)(K):K,o=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,O.hexlify)(R),o.toLowerCase()])}catch(y){throw"string"==typeof y.message&&y.message.match(/user denied/i)&&u.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:o,messageData:K}),y}})}_legacySignMessage(K){return h(this,void 0,void 0,function*(){const R="string"==typeof K?(0,x.Y0)(K):K,o=yield this.getAddress();try{return yield this.provider.send("eth_sign",[o.toLowerCase(),(0,O.hexlify)(R)])}catch(y){throw"string"==typeof y.message&&y.message.match(/user denied/i)&&u.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:o,messageData:K}),y}})}_signTypedData(K,R,o){return h(this,void 0,void 0,function*(){const y=yield E.E.resolveNames(K,R,o,v=>this.provider.resolveName(v)),M=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[M.toLowerCase(),JSON.stringify(E.E.getPayload(y.domain,R,y.value))])}catch(v){throw"string"==typeof v.message&&v.message.match(/user denied/i)&&u.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:M,messageData:{domain:y.domain,types:R,value:y.value}}),v}})}unlock(K){return h(this,void 0,void 0,function*(){const R=this.provider,o=yield this.getAddress();return R.send("personal_unlockAccount",[o.toLowerCase(),K,null])})}}class W extends V{sendTransaction(K){return this.sendUncheckedTransaction(K).then(R=>({hash:R,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:o=>this.provider.waitForTransaction(R,o)}))}}const G={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class H extends l.Zk{constructor(K,R){let o=R;null==o&&(o=new Promise((y,M)=>{setTimeout(()=>{this.detectNetwork().then(v=>{y(v)},v=>{M(v)})},0)})),super(o),K||(K=(0,d.getStatic)(this.constructor,"defaultUrl")()),(0,d.defineReadOnly)(this,"connection",Object.freeze("string"==typeof K?{url:K}:(0,d.shallowCopy)(K))),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 h(this,void 0,void 0,function*(){yield S(0);let K=null;try{K=yield this.send("eth_chainId",[])}catch{try{K=yield this.send("net_version",[])}catch{}}if(null!=K){const R=(0,d.getStatic)(this.constructor,"getNetwork");try{return R(q.O$.from(K).toNumber())}catch(o){return u.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{chainId:K,event:"invalidNetwork",serverError:o})}}return u.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(K){return new V(L,this,K)}getUncheckedSigner(K){return this.getSigner(K).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(K=>K.map(R=>this.formatter.address(R)))}send(K,R){const o={method:K,params:R,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,d.deepCopy)(o),provider:this});const y=["eth_chainId","eth_blockNumber"].indexOf(K)>=0;if(y&&this._cache[K])return this._cache[K];const M=(0,T.fetchJson)(this.connection,JSON.stringify(o),I).then(v=>(this.emit("debug",{action:"response",request:o,response:v,provider:this}),v),v=>{throw this.emit("debug",{action:"response",error:v,request:o,provider:this}),v});return y&&(this._cache[K]=M,setTimeout(()=>{this._cache[K]=null},0)),M}prepareRequest(K,R){switch(K){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[P(R.address),R.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[P(R.address),R.blockTag]];case"getCode":return["eth_getCode",[P(R.address),R.blockTag]];case"getStorageAt":return["eth_getStorageAt",[P(R.address),(0,O.hexZeroPad)(R.position,32),R.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[R.signedTransaction]];case"getBlock":return R.blockTag?["eth_getBlockByNumber",[R.blockTag,!!R.includeTransactions]]:R.blockHash?["eth_getBlockByHash",[R.blockHash,!!R.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[R.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[R.transactionHash]];case"call":return["eth_call",[(0,d.getStatic)(this.constructor,"hexlifyTransaction")(R.transaction,{from:!0}),R.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,d.getStatic)(this.constructor,"hexlifyTransaction")(R.transaction,{from:!0})]];case"getLogs":return R.filter&&null!=R.filter.address&&(R.filter.address=P(R.filter.address)),["eth_getLogs",[R.filter]]}return null}perform(K,R){return h(this,void 0,void 0,function*(){if("call"===K||"estimateGas"===K){const y=R.transaction;if(y&&null!=y.type&&q.O$.from(y.type).isZero()&&null==y.maxFeePerGas&&null==y.maxPriorityFeePerGas){const M=yield this.getFeeData();null==M.maxFeePerGas&&null==M.maxPriorityFeePerGas&&((R=(0,d.shallowCopy)(R)).transaction=(0,d.shallowCopy)(y),delete R.transaction.type)}}const o=this.prepareRequest(K,R);null==o&&u.throwError(K+" not implemented",g.Logger.errors.NOT_IMPLEMENTED,{operation:K});try{return yield this.send(o[0],o[1])}catch(y){return w(K,y,R)}})}_startEvent(K){"pending"===K.tag&&this._startPending(),super._startEvent(K)}_startPending(){if(null!=this._pendingFilter)return;const K=this,R=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=R,R.then(function(o){return function y(){K.send("eth_getFilterChanges",[o]).then(function(M){if(K._pendingFilter!=R)return null;let v=Promise.resolve();return M.forEach(function(k){K._emitted["t:"+k.toLowerCase()]="pending",v=v.then(function(){return K.getTransaction(k).then(function(D){return K.emit("pending",D),null})})}),v.then(function(){return S(1e3)})}).then(function(){if(K._pendingFilter==R)return setTimeout(function(){y()},0),null;K.send("eth_uninstallFilter",[o])}).catch(M=>{})}(),o}).catch(o=>{})}_stopEvent(K){"pending"===K.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(K)}static hexlifyTransaction(K,R){const o=(0,d.shallowCopy)(G);if(R)for(const M in R)R[M]&&(o[M]=!0);(0,d.checkProperties)(K,o);const y={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(M){if(null==K[M])return;const v=(0,O.hexValue)(q.O$.from(K[M]));"gasLimit"===M&&(M="gas"),y[M]=v}),["from","to","data"].forEach(function(M){null!=K[M]&&(y[M]=(0,O.hexlify)(K[M]))}),K.accessList&&(y.accessList=(0,f.accessListify)(K.accessList)),y}}},8859:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{randomBytes:()=>ie.O,shuffled:()=>q.y});var ie=Y(42563),q=Y(34820)},42563:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>T});var ie=Y(61488),q=Y(53898);const E=new q.Logger("random/5.7.0"),x=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();let f=x.crypto||x.msCrypto;function T(g){(g<=0||g>1024||g%1||g!=g)&&E.throwArgumentError("invalid length","length",g);const b=new Uint8Array(g);return f.getRandomValues(b),(0,ie.arrayify)(b)}(!f||!f.getRandomValues)&&(E.warn("WARNING: Missing strong random number source"),f={getRandomValues:function(g){return E.throwError("no secure random source avaialble",q.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},34820:(bt,be,Y)=>{"use strict";function ie(q){for(let O=(q=q.slice()).length-1;O>0;O--){const E=Math.floor(Math.random()*(O+1)),d=q[O];q[O]=q[E],q[E]=d}return q}Y.d(be,{y:()=>ie})},29276:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{decode:()=>l,encode:()=>T});var ie=Y(61488),q=Y(53898);const E=new q.Logger("rlp/5.7.0");function d(h){const u=[];for(;h;)u.unshift(255&h),h>>=8;return u}function x(h,u,m){let _=0;for(let w=0;wu+1+_&&E.throwError("child data too short",q.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+_,result:w}}function b(h,u){if(0===h.length&&E.throwError("data too short",q.Logger.errors.BUFFER_OVERRUN,{}),h[u]>=248){const m=h[u]-247;u+1+m>h.length&&E.throwError("data short segment too short",q.Logger.errors.BUFFER_OVERRUN,{});const _=x(h,u+1,m);return u+1+m+_>h.length&&E.throwError("data long segment too short",q.Logger.errors.BUFFER_OVERRUN,{}),g(h,u,u+1+m,m+_)}if(h[u]>=192){const m=h[u]-192;return u+1+m>h.length&&E.throwError("data array too short",q.Logger.errors.BUFFER_OVERRUN,{}),g(h,u,u+1,m)}if(h[u]>=184){const m=h[u]-183;u+1+m>h.length&&E.throwError("data array too short",q.Logger.errors.BUFFER_OVERRUN,{});const _=x(h,u+1,m);return u+1+m+_>h.length&&E.throwError("data array too short",q.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+m+_,result:(0,ie.hexlify)(h.slice(u+1+m,u+1+m+_))}}if(h[u]>=128){const m=h[u]-128;return u+1+m>h.length&&E.throwError("data too short",q.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+m,result:(0,ie.hexlify)(h.slice(u+1,u+1+m))}}return{consumed:1,result:(0,ie.hexlify)(h[u])}}function l(h){const u=(0,ie.arrayify)(h),m=b(u,0);return m.consumed!==u.length&&E.throwArgumentError("invalid rlp data","data",h),m.result}},67591:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{computeHmac:()=>ie.Gy,ripemd160:()=>ie.bP,sha256:()=>ie.JQ,sha512:()=>ie.o,SupportedAlgorithm:()=>q.p});var ie=Y(15614),q=Y(83389)},15614:(bt,be,Y)=>{"use strict";Y.d(be,{Gy:()=>l,bP:()=>T,JQ:()=>g,o:()=>b});var ie=Y(37909),q=Y.n(ie),O=Y(61488),E=Y(83389),d=Y(53898);const f=new d.Logger("sha2/5.7.0");function T(h){return"0x"+q().ripemd160().update((0,O.arrayify)(h)).digest("hex")}function g(h){return"0x"+q().sha256().update((0,O.arrayify)(h)).digest("hex")}function b(h){return"0x"+q().sha512().update((0,O.arrayify)(h)).digest("hex")}function l(h,u,m){return E.p[h]||f.throwError("unsupported algorithm "+h,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:h}),"0x"+q().hmac(q()[h],(0,O.arrayify)(u)).update((0,O.arrayify)(m)).digest("hex")}},83389:(bt,be,Y)=>{"use strict";Y.d(be,{p:()=>ie});var ie=(()=>{return(q=ie||(ie={})).sha256="sha256",q.sha512="sha512",ie;var q})()},99596:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{SigningKey:()=>ze,computePublicKey:()=>nt,recoverPublicKey:()=>Ve});var ie=Y(62630),q=Y.n(ie),O=Y(37909),E=Y.n(O);function f(tt,mt,ht){return tt(ht={path:mt,exports:{},require:function(wt,Pt){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},ht.exports),ht.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var h=u;function u(tt,mt){if(!tt)throw new Error(mt||"Assertion failed")}u.equal=function(mt,ht,wt){if(mt!=ht)throw new Error(wt||"Assertion failed: "+mt+" != "+ht)};var m=f(function(tt,mt){var ht=mt;function Pt(Ye){return 1===Ye.length?"0"+Ye:Ye}function st(Ye){for(var gt="",St=0;St>8,It=255&dn;Nt?St.push(Nt,It):St.push(It)}return St},ht.zero2=Pt,ht.toHex=st,ht.encode=function(gt,St){return"hex"===St?st(gt):gt}}),_=f(function(tt,mt){var ht=mt;ht.assert=h,ht.toArray=m.toArray,ht.zero2=m.zero2,ht.toHex=m.toHex,ht.encode=m.encode,ht.getNAF=function(St,Wt,dn){var Nt=new Array(Math.max(St.bitLength(),dn)+1);Nt.fill(0);for(var It=1<(It>>1)-1?(It>>1)-Wn:Wn):Yt=0,Nt[jt]=Yt,qt.iushrn(1)}return Nt},ht.getJSF=function(St,Wt){var dn=[[],[]];St=St.clone(),Wt=Wt.clone();for(var qt,Nt=0,It=0;St.cmpn(-Nt)>0||Wt.cmpn(-It)>0;){var Wn,fn,jt=St.andln(3)+Nt&3,Yt=Wt.andln(3)+It&3;3===jt&&(jt=-1),3===Yt&&(Yt=-1),Wn=0==(1&jt)?0:3!=(qt=St.andln(7)+Nt&7)&&5!==qt||2!==Yt?jt:-jt,dn[0].push(Wn),fn=0==(1&Yt)?0:3!=(qt=Wt.andln(7)+It&7)&&5!==qt||2!==jt?Yt:-Yt,dn[1].push(fn),2*Nt===Wn+1&&(Nt=1-Nt),2*It===fn+1&&(It=1-It),St.iushrn(1),Wt.iushrn(1)}return dn},ht.cachedProperty=function(St,Wt,dn){var Nt="_"+Wt;St.prototype[Wt]=function(){return void 0!==this[Nt]?this[Nt]:this[Nt]=dn.call(this)}},ht.parseBytes=function(St){return"string"==typeof St?ht.toArray(St,"hex"):St},ht.intFromLE=function(St){return new(q())(St,"hex","le")}}),w=_.getNAF,S=_.getJSF,I=_.assert;function P(tt,mt){this.type=tt,this.p=new(q())(mt.p,16),this.red=mt.prime?q().red(mt.prime):q().mont(this.p),this.zero=new(q())(0).toRed(this.red),this.one=new(q())(1).toRed(this.red),this.two=new(q())(2).toRed(this.red),this.n=mt.n&&new(q())(mt.n,16),this.g=mt.g&&this.pointFromJSON(mt.g,mt.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var ht=this.n&&this.p.div(this.n);!ht||ht.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var L=P;function V(tt,mt){this.curve=tt,this.type=mt,this.precomputed=null}P.prototype.point=function(){throw new Error("Not implemented")},P.prototype.validate=function(){throw new Error("Not implemented")},P.prototype._fixedNafMul=function(mt,ht){I(mt.precomputed);var wt=mt._getDoubles(),Pt=w(ht,1,this._bitLength),st=(1<=gt;Wt--)St=(St<<1)+Pt[Wt];Ye.push(St)}for(var dn=this.jpoint(null,null,null),Nt=this.jpoint(null,null,null),It=st;It>0;It--){for(gt=0;gt=0;St--){for(var Wt=0;St>=0&&0===Ye[St];St--)Wt++;if(St>=0&&Wt++,gt=gt.dblp(Wt),St<0)break;var dn=Ye[St];I(0!==dn),gt="affine"===mt.type?gt.mixedAdd(dn>0?st[dn-1>>1]:st[-dn-1>>1].neg()):gt.add(dn>0?st[dn-1>>1]:st[-dn-1>>1].neg())}return"affine"===mt.type?gt.toP():gt},P.prototype._wnafMulAdd=function(mt,ht,wt,Pt,st){var dn,Nt,It,Ye=this._wnafT1,gt=this._wnafT2,St=this._wnafT3,Wt=0;for(dn=0;dn=1;dn-=2){var jt=dn-1,Yt=dn;if(1===Ye[jt]&&1===Ye[Yt]){var Wn=[ht[jt],null,null,ht[Yt]];0===ht[jt].y.cmp(ht[Yt].y)?(Wn[1]=ht[jt].add(ht[Yt]),Wn[2]=ht[jt].toJ().mixedAdd(ht[Yt].neg())):0===ht[jt].y.cmp(ht[Yt].y.redNeg())?(Wn[1]=ht[jt].toJ().mixedAdd(ht[Yt]),Wn[2]=ht[jt].add(ht[Yt].neg())):(Wn[1]=ht[jt].toJ().mixedAdd(ht[Yt]),Wn[2]=ht[jt].toJ().mixedAdd(ht[Yt].neg()));var fn=[-3,-1,-5,-7,0,7,5,1,3],$n=S(wt[jt],wt[Yt]);for(Wt=Math.max($n[0].length,Wt),St[jt]=new Array(Wt),St[Yt]=new Array(Wt),Nt=0;Nt=0;dn--){for(var zn=0;dn>=0;){var bn=!0;for(Nt=0;Nt=0&&zn++,Bn=Bn.dblp(zn),dn<0)break;for(Nt=0;Nt0?It=gt[Nt][Lr-1>>1]:Lr<0&&(It=gt[Nt][-Lr-1>>1].neg()),Bn="affine"===It.type?Bn.mixedAdd(It):Bn.add(It))}}for(dn=0;dn=Math.ceil((mt.bitLength()+1)/ht.step)},V.prototype._getDoubles=function(mt,ht){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var wt=[this],Pt=this,st=0;st=0&&(qt=Wt,jt=dn),Nt.negative&&(Nt=Nt.neg(),It=It.neg()),qt.negative&&(qt=qt.neg(),jt=jt.neg()),[{a:Nt,b:It},{a:qt,b:jt}]},H.prototype._endoSplit=function(mt){var ht=this.endo.basis,wt=ht[0],Pt=ht[1],st=Pt.b.mul(mt).divRound(this.n),Ye=wt.b.neg().mul(mt).divRound(this.n),gt=st.mul(wt.a),St=Ye.mul(Pt.a),Wt=st.mul(wt.b),dn=Ye.mul(Pt.b);return{k1:mt.sub(gt).sub(St),k2:Wt.add(dn).neg()}},H.prototype.pointFromX=function(mt,ht){(mt=new(q())(mt,16)).red||(mt=mt.toRed(this.red));var wt=mt.redSqr().redMul(mt).redIAdd(mt.redMul(this.a)).redIAdd(this.b),Pt=wt.redSqrt();if(0!==Pt.redSqr().redSub(wt).cmp(this.zero))throw new Error("invalid point");var st=Pt.fromRed().isOdd();return(ht&&!st||!ht&&st)&&(Pt=Pt.redNeg()),this.point(mt,Pt)},H.prototype.validate=function(mt){if(mt.inf)return!0;var ht=mt.x,wt=mt.y,Pt=this.a.redMul(ht),st=ht.redSqr().redMul(ht).redIAdd(Pt).redIAdd(this.b);return 0===wt.redSqr().redISub(st).cmpn(0)},H.prototype._endoWnafMulAdd=function(mt,ht,wt){for(var Pt=this._endoWnafT1,st=this._endoWnafT2,Ye=0;Ye":""},K.prototype.isInfinity=function(){return this.inf},K.prototype.add=function(mt){if(this.inf)return mt;if(mt.inf)return this;if(this.eq(mt))return this.dbl();if(this.neg().eq(mt))return this.curve.point(null,null);if(0===this.x.cmp(mt.x))return this.curve.point(null,null);var ht=this.y.redSub(mt.y);0!==ht.cmpn(0)&&(ht=ht.redMul(this.x.redSub(mt.x).redInvm()));var wt=ht.redSqr().redISub(this.x).redISub(mt.x),Pt=ht.redMul(this.x.redSub(wt)).redISub(this.y);return this.curve.point(wt,Pt)},K.prototype.dbl=function(){if(this.inf)return this;var mt=this.y.redAdd(this.y);if(0===mt.cmpn(0))return this.curve.point(null,null);var ht=this.curve.a,wt=this.x.redSqr(),Pt=mt.redInvm(),st=wt.redAdd(wt).redIAdd(wt).redIAdd(ht).redMul(Pt),Ye=st.redSqr().redISub(this.x.redAdd(this.x)),gt=st.redMul(this.x.redSub(Ye)).redISub(this.y);return this.curve.point(Ye,gt)},K.prototype.getX=function(){return this.x.fromRed()},K.prototype.getY=function(){return this.y.fromRed()},K.prototype.mul=function(mt){return mt=new(q())(mt,16),this.isInfinity()?this:this._hasDoubles(mt)?this.curve._fixedNafMul(this,mt):this.curve.endo?this.curve._endoWnafMulAdd([this],[mt]):this.curve._wnafMul(this,mt)},K.prototype.mulAdd=function(mt,ht,wt){var Pt=[this,ht],st=[mt,wt];return this.curve.endo?this.curve._endoWnafMulAdd(Pt,st):this.curve._wnafMulAdd(1,Pt,st,2)},K.prototype.jmulAdd=function(mt,ht,wt){var Pt=[this,ht],st=[mt,wt];return this.curve.endo?this.curve._endoWnafMulAdd(Pt,st,!0):this.curve._wnafMulAdd(1,Pt,st,2,!0)},K.prototype.eq=function(mt){return this===mt||this.inf===mt.inf&&(this.inf||0===this.x.cmp(mt.x)&&0===this.y.cmp(mt.y))},K.prototype.neg=function(mt){if(this.inf)return this;var ht=this.curve.point(this.x,this.y.redNeg());if(mt&&this.precomputed){var wt=this.precomputed,Pt=function(st){return st.neg()};ht.precomputed={naf:wt.naf&&{wnd:wt.naf.wnd,points:wt.naf.points.map(Pt)},doubles:wt.doubles&&{step:wt.doubles.step,points:wt.doubles.points.map(Pt)}}}return ht},K.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},W(R,L.BasePoint),H.prototype.jpoint=function(mt,ht,wt){return new R(this,mt,ht,wt)},R.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var mt=this.z.redInvm(),ht=mt.redSqr(),wt=this.x.redMul(ht),Pt=this.y.redMul(ht).redMul(mt);return this.curve.point(wt,Pt)},R.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},R.prototype.add=function(mt){if(this.isInfinity())return mt;if(mt.isInfinity())return this;var ht=mt.z.redSqr(),wt=this.z.redSqr(),Pt=this.x.redMul(ht),st=mt.x.redMul(wt),Ye=this.y.redMul(ht.redMul(mt.z)),gt=mt.y.redMul(wt.redMul(this.z)),St=Pt.redSub(st),Wt=Ye.redSub(gt);if(0===St.cmpn(0))return 0!==Wt.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var dn=St.redSqr(),Nt=dn.redMul(St),It=Pt.redMul(dn),qt=Wt.redSqr().redIAdd(Nt).redISub(It).redISub(It),jt=Wt.redMul(It.redISub(qt)).redISub(Ye.redMul(Nt)),Yt=this.z.redMul(mt.z).redMul(St);return this.curve.jpoint(qt,jt,Yt)},R.prototype.mixedAdd=function(mt){if(this.isInfinity())return mt.toJ();if(mt.isInfinity())return this;var ht=this.z.redSqr(),wt=this.x,Pt=mt.x.redMul(ht),st=this.y,Ye=mt.y.redMul(ht).redMul(this.z),gt=wt.redSub(Pt),St=st.redSub(Ye);if(0===gt.cmpn(0))return 0!==St.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var Wt=gt.redSqr(),dn=Wt.redMul(gt),Nt=wt.redMul(Wt),It=St.redSqr().redIAdd(dn).redISub(Nt).redISub(Nt),qt=St.redMul(Nt.redISub(It)).redISub(st.redMul(dn)),jt=this.z.redMul(gt);return this.curve.jpoint(It,qt,jt)},R.prototype.dblp=function(mt){if(0===mt)return this;if(this.isInfinity())return this;if(!mt)return this.dbl();var ht;if(this.curve.zeroA||this.curve.threeA){var wt=this;for(ht=0;ht=0)return!1;if(wt.redIAdd(st),0===this.x.cmp(wt))return!0}},R.prototype.inspect=function(){return this.isInfinity()?"":""},R.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var o=f(function(tt,mt){var ht=mt;ht.base=L,ht.short=j,ht.mont=null,ht.edwards=null}),y=f(function(tt,mt){var Ye,ht=mt,wt=_.assert;function Pt(gt){this.curve="short"===gt.type?new o.short(gt):"edwards"===gt.type?new o.edwards(gt):new o.mont(gt),this.g=this.curve.g,this.n=this.curve.n,this.hash=gt.hash,wt(this.g.validate(),"Invalid curve"),wt(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function st(gt,St){Object.defineProperty(ht,gt,{configurable:!0,enumerable:!0,get:function(){var Wt=new Pt(St);return Object.defineProperty(ht,gt,{configurable:!0,enumerable:!0,value:Wt}),Wt}})}ht.PresetCurve=Pt,st("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:E().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),st("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:E().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),st("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:E().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),st("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:E().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"]}),st("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:E().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"]}),st("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:E().sha256,gRed:!1,g:["9"]}),st("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:E().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{Ye=null.crash()}catch{Ye=void 0}st("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:E().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Ye]})});function M(tt){if(!(this instanceof M))return new M(tt);this.hash=tt.hash,this.predResist=!!tt.predResist,this.outLen=this.hash.outSize,this.minEntropy=tt.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var mt=m.toArray(tt.entropy,tt.entropyEnc||"hex"),ht=m.toArray(tt.nonce,tt.nonceEnc||"hex"),wt=m.toArray(tt.pers,tt.persEnc||"hex");h(mt.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(mt,ht,wt)}var v=M;M.prototype._init=function(mt,ht,wt){var Pt=mt.concat(ht).concat(wt);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var st=0;st=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(mt.concat(wt||[])),this._reseed=1},M.prototype.generate=function(mt,ht,wt,Pt){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof ht&&(Pt=wt,wt=ht,ht=null),wt&&(wt=m.toArray(wt,Pt||"hex"),this._update(wt));for(var st=[];st.length"};var C=_.assert;function a(tt,mt){if(tt instanceof a)return tt;this._importDER(tt,mt)||(C(tt.r&&tt.s,"Signature without r or s"),this.r=new(q())(tt.r,16),this.s=new(q())(tt.s,16),this.recoveryParam=void 0===tt.recoveryParam?null:tt.recoveryParam)}var B=a;function Q(){this.place=0}function ee(tt,mt){var ht=tt[mt.place++];if(!(128&ht))return ht;var wt=15&ht;if(0===wt||wt>4)return!1;for(var Pt=0,st=0,Ye=mt.place;st>>=0;return!(Pt<=127)&&(mt.place=Ye,Pt)}function ce(tt){for(var mt=0,ht=tt.length-1;!tt[mt]&&!(128&tt[mt+1])&&mt>>3);for(tt.push(128|ht);--ht;)tt.push(mt>>>(ht<<3)&255);tt.push(mt)}}a.prototype._importDER=function(mt,ht){mt=_.toArray(mt,ht);var wt=new Q;if(48!==mt[wt.place++])return!1;var Pt=ee(mt,wt);if(!1===Pt||Pt+wt.place!==mt.length||2!==mt[wt.place++])return!1;var st=ee(mt,wt);if(!1===st)return!1;var Ye=mt.slice(wt.place,st+wt.place);if(wt.place+=st,2!==mt[wt.place++])return!1;var gt=ee(mt,wt);if(!1===gt||mt.length!==gt+wt.place)return!1;var St=mt.slice(wt.place,gt+wt.place);if(0===Ye[0]){if(!(128&Ye[1]))return!1;Ye=Ye.slice(1)}if(0===St[0]){if(!(128&St[1]))return!1;St=St.slice(1)}return this.r=new(q())(Ye),this.s=new(q())(St),this.recoveryParam=null,!0},a.prototype.toDER=function(mt){var ht=this.r.toArray(),wt=this.s.toArray();for(128&ht[0]&&(ht=[0].concat(ht)),128&wt[0]&&(wt=[0].concat(wt)),ht=ce(ht),wt=ce(wt);!(wt[0]||128&wt[1]);)wt=wt.slice(1);var Pt=[2];ue(Pt,ht.length),(Pt=Pt.concat(ht)).push(2),ue(Pt,wt.length);var st=Pt.concat(wt),Ye=[48];return ue(Ye,st.length),Ye=Ye.concat(st),_.encode(Ye,mt)};var we=function(){throw new Error("unsupported")},ae=_.assert;function Te(tt){if(!(this instanceof Te))return new Te(tt);"string"==typeof tt&&(ae(Object.prototype.hasOwnProperty.call(y,tt),"Unknown curve "+tt),tt=y[tt]),tt instanceof y.PresetCurve&&(tt={curve:tt}),this.curve=tt.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=tt.curve.g,this.g.precompute(tt.curve.n.bitLength()+1),this.hash=tt.hash||tt.curve.hash}var le=Te;Te.prototype.keyPair=function(mt){return new N(this,mt)},Te.prototype.keyFromPrivate=function(mt,ht){return N.fromPrivate(this,mt,ht)},Te.prototype.keyFromPublic=function(mt,ht){return N.fromPublic(this,mt,ht)},Te.prototype.genKeyPair=function(mt){mt||(mt={});for(var ht=new v({hash:this.hash,pers:mt.pers,persEnc:mt.persEnc||"utf8",entropy:mt.entropy||we(),entropyEnc:mt.entropy&&mt.entropyEnc||"utf8",nonce:this.n.toArray()}),wt=this.n.byteLength(),Pt=this.n.sub(new(q())(2));;){var st=new(q())(ht.generate(wt));if(!(st.cmp(Pt)>0))return st.iaddn(1),this.keyFromPrivate(st)}},Te.prototype._truncateToN=function(mt,ht){var wt=8*mt.byteLength()-this.n.bitLength();return wt>0&&(mt=mt.ushrn(wt)),!ht&&mt.cmp(this.n)>=0?mt.sub(this.n):mt},Te.prototype.sign=function(mt,ht,wt,Pt){"object"==typeof wt&&(Pt=wt,wt=null),Pt||(Pt={}),ht=this.keyFromPrivate(ht,wt),mt=this._truncateToN(new(q())(mt,16));for(var st=this.n.byteLength(),Ye=ht.getPrivate().toArray("be",st),gt=mt.toArray("be",st),St=new v({hash:this.hash,entropy:Ye,nonce:gt,pers:Pt.pers,persEnc:Pt.persEnc||"utf8"}),Wt=this.n.sub(new(q())(1)),dn=0;;dn++){var Nt=Pt.k?Pt.k(dn):new(q())(St.generate(this.n.byteLength()));if(!((Nt=this._truncateToN(Nt,!0)).cmpn(1)<=0||Nt.cmp(Wt)>=0)){var It=this.g.mul(Nt);if(!It.isInfinity()){var qt=It.getX(),jt=qt.umod(this.n);if(0!==jt.cmpn(0)){var Yt=Nt.invm(this.n).mul(jt.mul(ht.getPrivate()).iadd(mt));if(0!==(Yt=Yt.umod(this.n)).cmpn(0)){var Wn=(It.getY().isOdd()?1:0)|(0!==qt.cmp(jt)?2:0);return Pt.canonical&&Yt.cmp(this.nh)>0&&(Yt=this.n.sub(Yt),Wn^=1),new B({r:jt,s:Yt,recoveryParam:Wn})}}}}}},Te.prototype.verify=function(mt,ht,wt,Pt){mt=this._truncateToN(new(q())(mt,16)),wt=this.keyFromPublic(wt,Pt);var st=(ht=new B(ht,"hex")).r,Ye=ht.s;if(st.cmpn(1)<0||st.cmp(this.n)>=0||Ye.cmpn(1)<0||Ye.cmp(this.n)>=0)return!1;var dn,gt=Ye.invm(this.n),St=gt.mul(mt).umod(this.n),Wt=gt.mul(st).umod(this.n);return this.curve._maxwellTrick?!(dn=this.g.jmulAdd(St,wt.getPublic(),Wt)).isInfinity()&&dn.eqXToP(st):!(dn=this.g.mulAdd(St,wt.getPublic(),Wt)).isInfinity()&&0===dn.getX().umod(this.n).cmp(st)},Te.prototype.recoverPubKey=function(tt,mt,ht,wt){ae((3&ht)===ht,"The recovery param is more than two bits"),mt=new B(mt,wt);var Pt=this.n,st=new(q())(tt),Ye=mt.r,gt=mt.s,St=1&ht,Wt=ht>>1;if(Ye.cmp(this.curve.p.umod(this.curve.n))>=0&&Wt)throw new Error("Unable to find sencond key candinate");Ye=this.curve.pointFromX(Wt?Ye.add(this.curve.n):Ye,St);var dn=mt.r.invm(Pt),Nt=Pt.sub(st).mul(dn).umod(Pt),It=gt.mul(dn).umod(Pt);return this.g.mulAdd(Nt,Ye,It)},Te.prototype.getKeyRecoveryParam=function(tt,mt,ht,wt){if(null!==(mt=new B(mt,wt)).recoveryParam)return mt.recoveryParam;for(var Pt=0;Pt<4;Pt++){var st;try{st=this.recoverPubKey(tt,mt,Pt)}catch{continue}if(st.eq(ht))return Pt}throw new Error("Unable to find valid recovery factor")};var ne=f(function(tt,mt){var ht=mt;ht.version="6.5.4",ht.utils=_,ht.rand=function(){throw new Error("unsupported")},ht.curve=o,ht.curves=y,ht.ec=le,ht.eddsa=null}).ec,pe=Y(61488),_e=Y(92275);const ke=new(Y(53898).Logger)("signing-key/5.7.0");let me=null;function Ee(){return me||(me=new ne("secp256k1")),me}class ze{constructor(mt){(0,_e.defineReadOnly)(this,"curve","secp256k1"),(0,_e.defineReadOnly)(this,"privateKey",(0,pe.hexlify)(mt)),32!==(0,pe.hexDataLength)(this.privateKey)&&ke.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const ht=Ee().keyFromPrivate((0,pe.arrayify)(this.privateKey));(0,_e.defineReadOnly)(this,"publicKey","0x"+ht.getPublic(!1,"hex")),(0,_e.defineReadOnly)(this,"compressedPublicKey","0x"+ht.getPublic(!0,"hex")),(0,_e.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(mt){const ht=Ee().keyFromPublic((0,pe.arrayify)(this.publicKey)),wt=Ee().keyFromPublic((0,pe.arrayify)(mt));return"0x"+ht.pub.add(wt.pub).encodeCompressed("hex")}signDigest(mt){const ht=Ee().keyFromPrivate((0,pe.arrayify)(this.privateKey)),wt=(0,pe.arrayify)(mt);32!==wt.length&&ke.throwArgumentError("bad digest length","digest",mt);const Pt=ht.sign(wt,{canonical:!0});return(0,pe.splitSignature)({recoveryParam:Pt.recoveryParam,r:(0,pe.hexZeroPad)("0x"+Pt.r.toString(16),32),s:(0,pe.hexZeroPad)("0x"+Pt.s.toString(16),32)})}computeSharedSecret(mt){const ht=Ee().keyFromPrivate((0,pe.arrayify)(this.privateKey)),wt=Ee().keyFromPublic((0,pe.arrayify)(nt(mt)));return(0,pe.hexZeroPad)("0x"+ht.derive(wt.getPublic()).toString(16),32)}static isSigningKey(mt){return!(!mt||!mt._isSigningKey)}}function Ve(tt,mt){const ht=(0,pe.splitSignature)(mt),wt={r:(0,pe.arrayify)(ht.r),s:(0,pe.arrayify)(ht.s)};return"0x"+Ee().recoverPubKey((0,pe.arrayify)(tt),wt,ht.recoveryParam).encode("hex",!1)}function nt(tt,mt){const ht=(0,pe.arrayify)(tt);if(32===ht.length){const wt=new ze(ht);return mt?"0x"+Ee().keyFromPrivate(ht).getPublic(!0,"hex"):wt.publicKey}return 33===ht.length?mt?(0,pe.hexlify)(ht):"0x"+Ee().keyFromPublic(ht).getPublic(!1,"hex"):65===ht.length?mt?"0x"+Ee().keyFromPublic(ht).getPublic(!0,"hex"):(0,pe.hexlify)(ht):ke.throwArgumentError("invalid public or private key","key","[REDACTED]")}},37979:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{keccak256:()=>_,pack:()=>m,sha256:()=>w});var ie=Y(2024),q=Y(61488),O=Y(28518),E=Y(15614),d=Y(8822),x=Y(53898);const T=new RegExp("^bytes([0-9]+)$"),g=new RegExp("^(u?int)([0-9]*)$"),b=new RegExp("^(.*)\\[([0-9]*)\\]$"),h=new x.Logger("solidity/5.7.0");function u(S,I,P){switch(S){case"address":return P?(0,q.zeroPad)(I,32):(0,q.arrayify)(I);case"string":return(0,d.Y0)(I);case"bytes":return(0,q.arrayify)(I);case"bool":return I=I?"0x01":"0x00",P?(0,q.zeroPad)(I,32):(0,q.arrayify)(I)}let L=S.match(g);if(L){let V=parseInt(L[2]||"256");return(L[2]&&String(V)!==L[2]||V%8!=0||0===V||V>256)&&h.throwArgumentError("invalid number type","type",S),P&&(V=256),I=ie.O$.from(I).toTwos(V),(0,q.zeroPad)(I,V/8)}if(L=S.match(T),L){const V=parseInt(L[1]);return(String(V)!==L[1]||0===V||V>32)&&h.throwArgumentError("invalid bytes type","type",S),(0,q.arrayify)(I).byteLength!==V&&h.throwArgumentError(`invalid value for ${S}`,"value",I),P?(0,q.arrayify)((I+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):I}if(L=S.match(b),L&&Array.isArray(I)){const V=L[1];parseInt(L[2]||String(I.length))!=I.length&&h.throwArgumentError(`invalid array length for ${S}`,"value",I);const G=[];return I.forEach(function(H){G.push(u(V,H,!0))}),(0,q.concat)(G)}return h.throwArgumentError("invalid type","type",S)}function m(S,I){S.length!=I.length&&h.throwArgumentError("wrong number of values; expected ${ types.length }","values",I);const P=[];return S.forEach(function(L,V){P.push(u(L,I[V]))}),(0,q.hexlify)((0,q.concat)(P))}function _(S,I){return(0,O.keccak256)(m(S,I))}function w(S,I){return(0,E.JQ)(m(S,I))}},44688:(bt,be,Y)=>{"use strict";Y.d(be,{s:()=>E,F:()=>d});var ie=Y(45052),q=Y(61488),O=Y(8822);function E(x){const f=(0,O.Y0)(x);if(f.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,q.hexlify)((0,q.concat)([f,ie.R]).slice(0,32))}function d(x){const f=(0,q.arrayify)(x);if(32!==f.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==f[31])throw new Error("invalid bytes32 string - no null terminator");let T=31;for(;0===f[T-1];)T--;return(0,O.ZN)(f.slice(0,T))}},17188:(bt,be,Y)=>{"use strict";Y.d(be,{Ll:()=>S});var ie=Y(8822);function O(I,P){P||(P=function(W){return[parseInt(W,16)]});let L=0,V={};return I.split(",").forEach(W=>{let G=W.split(":");L+=parseInt(G[0],16),V[L]=P(G[1])}),V}function E(I){let P=0;return I.split(",").map(L=>{let V=L.split("-");1===V.length?V[1]="0":""===V[1]&&(V[1]="1");let W=P+parseInt(V[0],16);return P=parseInt(V[1],16),{l:W,h:P}})}function d(I,P){let L=0;for(let V=0;V=L&&I<=L+W.h&&(I-L)%(W.d||1)==0){if(W.e&&-1!==W.e.indexOf(I-L))continue;return W}}return null}const x=E("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),f="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(I=>parseInt(I,16)),T=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],g=O("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),b=O("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l=O("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function(I){if(I.length%4!=0)throw new Error("bad data");let P=[];for(let L=0;L(L.forEach(V=>{P.push(V)}),P),[])}(P.map(V=>{if(f.indexOf(V)>=0)return[];if(V>=65024&&V<=65039)return[];let W=function(I){let P=d(I,T);if(P)return[I+P.s];let L=g[I];if(L)return L;let V=b[I];return V?[I+V[0]]:l[I]||null}(V);return W||[V]})),P=(0,ie.XL)((0,ie.uu)(P),ie.Uj.NFKC),P.forEach(V=>{if(function(I){return!!d(I,h)}(V))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),P.forEach(V=>{if(function(I){return!!d(I,x)}(V))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let L=(0,ie.uu)(P);if("-"===L.substring(0,1)||"--"===L.substring(2,4)||"-"===L.substring(L.length-1))throw new Error("invalid hyphen");return L}},46956:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{_toEscapedUtf8String:()=>O.U$,toUtf8Bytes:()=>O.Y0,toUtf8CodePoints:()=>O.XL,toUtf8String:()=>O.ZN,Utf8ErrorFuncs:()=>O.te,Utf8ErrorReason:()=>O.Uw,UnicodeNormalizationForm:()=>O.Uj,formatBytes32String:()=>ie.s,parseBytes32String:()=>ie.F,nameprep:()=>q.Ll});var ie=Y(44688),q=Y(17188),O=Y(8822)},8822:(bt,be,Y)=>{"use strict";Y.d(be,{Uj:()=>d,te:()=>b,Uw:()=>x,U$:()=>m,uu:()=>_,Y0:()=>h,XL:()=>S,ZN:()=>w});var ie=Y(61488);const E=new(Y(53898).Logger)("strings/5.7.0");var d=(()=>{return(I=d||(d={})).current="",I.NFC="NFC",I.NFD="NFD",I.NFKC="NFKC",I.NFKD="NFKD",d;var I})(),x=(()=>{return(I=x||(x={})).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",x;var I})();function T(I,P,L,V,W){if(I===x.BAD_PREFIX||I===x.UNEXPECTED_CONTINUE){let G=0;for(let H=P+1;H>6==2;H++)G++;return G}return I===x.OVERRUN?L.length-P-1:0}const b=Object.freeze({error:function(I,P,L,V,W){return E.throwArgumentError(`invalid codepoint at offset ${P}; ${I}`,"bytes",L)},ignore:T,replace:function(I,P,L,V,W){return I===x.OVERLONG?(V.push(W),0):(V.push(65533),T(I,P,L))}});function l(I,P){null==P&&(P=b.error),I=(0,ie.arrayify)(I);const L=[];let V=0;for(;V>7==0){L.push(W);continue}let G=null,H=null;if(192==(224&W))G=1,H=127;else if(224==(240&W))G=2,H=2047;else{if(240!=(248&W)){V+=P(128==(192&W)?x.UNEXPECTED_CONTINUE:x.BAD_PREFIX,V-1,I,L);continue}G=3,H=65535}if(V-1+G>=I.length){V+=P(x.OVERRUN,V-1,I,L);continue}let j=W&(1<<8-G-1)-1;for(let K=0;K1114111){V+=P(x.OUT_OF_RANGE,V-1-G,I,L,j);continue}if(j>=55296&&j<=57343){V+=P(x.UTF16_SURROGATE,V-1-G,I,L,j);continue}if(j<=H){V+=P(x.OVERLONG,V-1-G,I,L,j);continue}L.push(j)}}return L}function h(I,P=d.current){P!=d.current&&(E.checkNormalize(),I=I.normalize(P));let L=[];for(let V=0;V>6|192),L.push(63&W|128);else if(55296==(64512&W)){V++;const G=I.charCodeAt(V);if(V>=I.length||56320!=(64512&G))throw new Error("invalid utf-8 string");const H=65536+((1023&W)<<10)+(1023&G);L.push(H>>18|240),L.push(H>>12&63|128),L.push(H>>6&63|128),L.push(63&H|128)}else L.push(W>>12|224),L.push(W>>6&63|128),L.push(63&W|128)}return(0,ie.arrayify)(L)}function u(I){const P="0000"+I.toString(16);return"\\u"+P.substring(P.length-4)}function m(I,P){return'"'+l(I,P).map(L=>{if(L<256){switch(L){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(L>=32&&L<127)return String.fromCharCode(L)}return L<=65535?u(L):u(55296+((L-=65536)>>10&1023))+u(56320+(1023&L))}).join("")+'"'}function _(I){return I.map(P=>P<=65535?String.fromCharCode(P):(P-=65536,String.fromCharCode(55296+(P>>10&1023),56320+(1023&P)))).join("")}function w(I,P){return _(l(I,P))}function S(I,P=d.current){return l(h(I,P))}},32701:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{TransactionTypes:()=>h,accessListify:()=>V,computeAddress:()=>S,parse:()=>v,recoverAddress:()=>I,serialize:()=>K});var ie=Y(2885),q=Y(2024),O=Y(61488),E=Y(16659),d=Y(28518),x=Y(92275),f=Y(29276),T=Y(99596),g=Y(53898);const l=new g.Logger("transactions/5.7.0");var h=(()=>{return(k=h||(h={}))[k.legacy=0]="legacy",k[k.eip2930=1]="eip2930",k[k.eip1559=2]="eip1559",h;var k})();function u(k){return"0x"===k?null:(0,ie.getAddress)(k)}function m(k){return"0x"===k?E._Y:q.O$.from(k)}const _=[{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"}],w={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function S(k){const D=(0,T.computePublicKey)(k);return(0,ie.getAddress)((0,O.hexDataSlice)((0,d.keccak256)((0,O.hexDataSlice)(D,1)),12))}function I(k,D){return S((0,T.recoverPublicKey)((0,O.arrayify)(k),D))}function P(k,D){const N=(0,O.stripZeros)(q.O$.from(k).toHexString());return N.length>32&&l.throwArgumentError("invalid length for "+D,"transaction:"+D,k),N}function L(k,D){return{address:(0,ie.getAddress)(k),storageKeys:(D||[]).map((N,C)=>(32!==(0,O.hexDataLength)(N)&&l.throwArgumentError("invalid access list storageKey",`accessList[${k}:${C}]`,N),N.toLowerCase()))}}function V(k){if(Array.isArray(k))return k.map((N,C)=>Array.isArray(N)?(N.length>2&&l.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${C}]`,N),L(N[0],N[1])):L(N.address,N.storageKeys));const D=Object.keys(k).map(N=>{const C=k[N].reduce((a,B)=>(a[B]=!0,a),{});return L(N,Object.keys(C).sort())});return D.sort((N,C)=>N.address.localeCompare(C.address)),D}function W(k){return V(k).map(D=>[D.address,D.storageKeys])}function G(k,D){if(null!=k.gasPrice){const C=q.O$.from(k.gasPrice),a=q.O$.from(k.maxFeePerGas||0);C.eq(a)||l.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:C,maxFeePerGas:a})}const N=[P(k.chainId||0,"chainId"),P(k.nonce||0,"nonce"),P(k.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(k.maxFeePerGas||0,"maxFeePerGas"),P(k.gasLimit||0,"gasLimit"),null!=k.to?(0,ie.getAddress)(k.to):"0x",P(k.value||0,"value"),k.data||"0x",W(k.accessList||[])];if(D){const C=(0,O.splitSignature)(D);N.push(P(C.recoveryParam,"recoveryParam")),N.push((0,O.stripZeros)(C.r)),N.push((0,O.stripZeros)(C.s))}return(0,O.hexConcat)(["0x02",f.encode(N)])}function H(k,D){const N=[P(k.chainId||0,"chainId"),P(k.nonce||0,"nonce"),P(k.gasPrice||0,"gasPrice"),P(k.gasLimit||0,"gasLimit"),null!=k.to?(0,ie.getAddress)(k.to):"0x",P(k.value||0,"value"),k.data||"0x",W(k.accessList||[])];if(D){const C=(0,O.splitSignature)(D);N.push(P(C.recoveryParam,"recoveryParam")),N.push((0,O.stripZeros)(C.r)),N.push((0,O.stripZeros)(C.s))}return(0,O.hexConcat)(["0x01",f.encode(N)])}function K(k,D){if(null==k.type||0===k.type)return null!=k.accessList&&l.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",k),function(k,D){(0,x.checkProperties)(k,w);const N=[];_.forEach(function(Q){let ee=k[Q.name]||[];const ce={};Q.numeric&&(ce.hexPad="left"),ee=(0,O.arrayify)((0,O.hexlify)(ee,ce)),Q.length&&ee.length!==Q.length&&ee.length>0&&l.throwArgumentError("invalid length for "+Q.name,"transaction:"+Q.name,ee),Q.maxLength&&(ee=(0,O.stripZeros)(ee),ee.length>Q.maxLength&&l.throwArgumentError("invalid length for "+Q.name,"transaction:"+Q.name,ee)),N.push((0,O.hexlify)(ee))});let C=0;if(null!=k.chainId?(C=k.chainId,"number"!=typeof C&&l.throwArgumentError("invalid transaction.chainId","transaction",k)):D&&!(0,O.isBytesLike)(D)&&D.v>28&&(C=Math.floor((D.v-35)/2)),0!==C&&(N.push((0,O.hexlify)(C)),N.push("0x"),N.push("0x")),!D)return f.encode(N);const a=(0,O.splitSignature)(D);let B=27+a.recoveryParam;return 0!==C?(N.pop(),N.pop(),N.pop(),B+=2*C+8,a.v>28&&a.v!==B&&l.throwArgumentError("transaction.chainId/signature.v mismatch","signature",D)):a.v!==B&&l.throwArgumentError("transaction.chainId/signature.v mismatch","signature",D),N.push((0,O.hexlify)(B)),N.push((0,O.stripZeros)((0,O.arrayify)(a.r))),N.push((0,O.stripZeros)((0,O.arrayify)(a.s))),f.encode(N)}(k,D);switch(k.type){case 1:return H(k,D);case 2:return G(k,D)}return l.throwError(`unsupported transaction type: ${k.type}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:k.type})}function R(k,D,N){try{const C=m(D[0]).toNumber();if(0!==C&&1!==C)throw new Error("bad recid");k.v=C}catch{l.throwArgumentError("invalid v for transaction type: 1","v",D[0])}k.r=(0,O.hexZeroPad)(D[1],32),k.s=(0,O.hexZeroPad)(D[2],32);try{const C=(0,d.keccak256)(N(k));k.from=I(C,{r:k.r,s:k.s,recoveryParam:k.v})}catch{}}function v(k){const D=(0,O.arrayify)(k);if(D[0]>127)return function(k){const D=f.decode(k);9!==D.length&&6!==D.length&&l.throwArgumentError("invalid raw transaction","rawTransaction",k);const N={nonce:m(D[0]).toNumber(),gasPrice:m(D[1]),gasLimit:m(D[2]),to:u(D[3]),value:m(D[4]),data:D[5],chainId:0};if(6===D.length)return N;try{N.v=q.O$.from(D[6]).toNumber()}catch{return N}if(N.r=(0,O.hexZeroPad)(D[7],32),N.s=(0,O.hexZeroPad)(D[8],32),q.O$.from(N.r).isZero()&&q.O$.from(N.s).isZero())N.chainId=N.v,N.v=0;else{N.chainId=Math.floor((N.v-35)/2),N.chainId<0&&(N.chainId=0);let C=N.v-27;const a=D.slice(0,6);0!==N.chainId&&(a.push((0,O.hexlify)(N.chainId)),a.push("0x"),a.push("0x"),C-=2*N.chainId+8);const B=(0,d.keccak256)(f.encode(a));try{N.from=I(B,{r:(0,O.hexlify)(N.r),s:(0,O.hexlify)(N.s),recoveryParam:C})}catch{}N.hash=(0,d.keccak256)(k)}return N.type=null,N}(D);switch(D[0]){case 1:return function(k){const D=f.decode(k.slice(1));8!==D.length&&11!==D.length&&l.throwArgumentError("invalid component count for transaction type: 1","payload",(0,O.hexlify)(k));const N={type:1,chainId:m(D[0]).toNumber(),nonce:m(D[1]).toNumber(),gasPrice:m(D[2]),gasLimit:m(D[3]),to:u(D[4]),value:m(D[5]),data:D[6],accessList:V(D[7])};return 8===D.length||(N.hash=(0,d.keccak256)(k),R(N,D.slice(8),H)),N}(D);case 2:return function(k){const D=f.decode(k.slice(1));9!==D.length&&12!==D.length&&l.throwArgumentError("invalid component count for transaction type: 2","payload",(0,O.hexlify)(k));const N=m(D[2]),C=m(D[3]),a={type:2,chainId:m(D[0]).toNumber(),nonce:m(D[1]).toNumber(),maxPriorityFeePerGas:N,maxFeePerGas:C,gasPrice:null,gasLimit:m(D[4]),to:u(D[5]),value:m(D[6]),data:D[7],accessList:V(D[8])};return 9===D.length||(a.hash=(0,d.keccak256)(k),R(a,D.slice(9),G)),a}(D)}return l.throwError(`unsupported transaction type: ${D[0]}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:D[0]})}},2519:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{commify:()=>x,formatEther:()=>g,formatUnits:()=>f,parseEther:()=>b,parseUnits:()=>T});var ie=Y(71677);const E=new(Y(53898).Logger)("units/5.7.0"),d=["wei","kwei","mwei","gwei","szabo","finney","ether"];function x(l){const h=String(l).split(".");(h.length>2||!h[0].match(/^-?[0-9]*$/)||h[1]&&!h[1].match(/^[0-9]*$/)||"."===l||"-."===l)&&E.throwArgumentError("invalid value","value",l);let u=h[0],m="";for("-"===u.substring(0,1)&&(m="-",u=u.substring(1));"0"===u.substring(0,1);)u=u.substring(1);""===u&&(u="0");let _="";for(2===h.length&&(_="."+(h[1]||"0"));_.length>2&&"0"===_[_.length-1];)_=_.substring(0,_.length-1);const w=[];for(;u.length;){if(u.length<=3){w.unshift(u);break}{const S=u.length-3;w.unshift(u.substring(S)),u=u.substring(0,S)}}return m+w.join(",")+_}function f(l,h){if("string"==typeof h){const u=d.indexOf(h);-1!==u&&(h=3*u)}return(0,ie.S5)(l,h??18)}function T(l,h){if("string"!=typeof l&&E.throwArgumentError("value must be a string","value",l),"string"==typeof h){const u=d.indexOf(h);-1!==u&&(h=3*u)}return(0,ie.Ox)(l,h??18)}function g(l){return f(l,18)}function b(l){return T(l,18)}},6846:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{Wallet:()=>V,verifyMessage:()=>W,verifyTypedData:()=>G});var ie=Y(2885),q=Y(11527),O=Y(11221),E=Y(61488),d=Y(78429),x=Y(72072),f=Y(49593),T=Y(28518),g=Y(92275),b=Y(42563),l=Y(99596),h=Y(53746),u=Y(66484),m=Y(32701),_=Y(53898),S=function(H,j,K,R){return new(K||(K=Promise))(function(y,M){function v(N){try{D(R.next(N))}catch(C){M(C)}}function k(N){try{D(R.throw(N))}catch(C){M(C)}}function D(N){N.done?y(N.value):function(y){return y instanceof K?y:new K(function(M){M(y)})}(N.value).then(v,k)}D((R=R.apply(H,j||[])).next())})};const I=new _.Logger("wallet/5.7.0");class V extends O.Signer{constructor(j,K){if(super(),null!=(H=j)&&(0,E.isHexString)(H.privateKey,32)&&null!=H.address){const R=new l.SigningKey(j.privateKey);if((0,g.defineReadOnly)(this,"_signingKey",()=>R),(0,g.defineReadOnly)(this,"address",(0,m.computeAddress)(this.publicKey)),this.address!==(0,ie.getAddress)(j.address)&&I.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(H){const j=H.mnemonic;return j&&j.phrase}(j)){const o=j.mnemonic;(0,g.defineReadOnly)(this,"_mnemonic",()=>({phrase:o.phrase,path:o.path||f.defaultPath,locale:o.locale||"en"}));const y=this.mnemonic,M=f.HDNode.fromMnemonic(y.phrase,null,y.locale).derivePath(y.path);(0,m.computeAddress)(M.privateKey)!==this.address&&I.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,g.defineReadOnly)(this,"_mnemonic",()=>null)}else{if(l.SigningKey.isSigningKey(j))"secp256k1"!==j.curve&&I.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,g.defineReadOnly)(this,"_signingKey",()=>j);else{"string"==typeof j&&j.match(/^[0-9a-f]*$/i)&&64===j.length&&(j="0x"+j);const R=new l.SigningKey(j);(0,g.defineReadOnly)(this,"_signingKey",()=>R)}(0,g.defineReadOnly)(this,"_mnemonic",()=>null),(0,g.defineReadOnly)(this,"address",(0,m.computeAddress)(this.publicKey))}var H;K&&!q.zt.isProvider(K)&&I.throwArgumentError("invalid provider","provider",K),(0,g.defineReadOnly)(this,"provider",K||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(j){return new V(this,j)}signTransaction(j){return(0,g.resolveProperties)(j).then(K=>{null!=K.from&&((0,ie.getAddress)(K.from)!==this.address&&I.throwArgumentError("transaction from address mismatch","transaction.from",j.from),delete K.from);const R=this._signingKey().signDigest((0,T.keccak256)((0,m.serialize)(K)));return(0,m.serialize)(K,R)})}signMessage(j){return S(this,void 0,void 0,function*(){return(0,E.joinSignature)(this._signingKey().signDigest((0,d.r)(j)))})}_signTypedData(j,K,R){return S(this,void 0,void 0,function*(){const o=yield x.E.resolveNames(j,K,R,y=>(null==this.provider&&I.throwError("cannot resolve ENS names without a provider",_.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:y}),this.provider.resolveName(y)));return(0,E.joinSignature)(this._signingKey().signDigest(x.E.hash(o.domain,K,o.value)))})}encrypt(j,K,R){if("function"==typeof K&&!R&&(R=K,K={}),R&&"function"!=typeof R)throw new Error("invalid callback");return K||(K={}),(0,u.HI)(this,j,K,R)}static createRandom(j){let K=(0,b.O)(16);j||(j={}),j.extraEntropy&&(K=(0,E.arrayify)((0,E.hexDataSlice)((0,T.keccak256)((0,E.concat)([K,j.extraEntropy])),0,16)));const R=(0,f.entropyToMnemonic)(K,j.locale);return V.fromMnemonic(R,j.path,j.locale)}static fromEncryptedJson(j,K,R){return(0,h.decryptJsonWallet)(j,K,R).then(o=>new V(o))}static fromEncryptedJsonSync(j,K){return new V((0,h.decryptJsonWalletSync)(j,K))}static fromMnemonic(j,K,R){return K||(K=f.defaultPath),new V(f.HDNode.fromMnemonic(j,null,R).derivePath(K))}}function W(H,j){return(0,m.recoverAddress)((0,d.r)(H),j)}function G(H,j,K,R){return(0,m.recoverAddress)(x.E.hash(H,j,K),R)}},51838:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{_fetchData:()=>_,fetchJson:()=>w,poll:()=>S});var ie=Y(61488);function q(I){I=atob(I);const P=[];for(let L=0;L{G[j.toLowerCase()]=H}):V.headers.keys().forEach(H=>{G[H.toLowerCase()]=V.headers.get(H)}),{headers:G,statusCode:V.status,statusMessage:V.statusText,body:(0,ie.arrayify)(new Uint8Array(W))}})}const l=new x.Logger("web/5.7.1");function h(I){return new Promise(P=>{setTimeout(P,I)})}function u(I,P){if(null==I)return null;if("string"==typeof I)return I;if((0,ie.isBytesLike)(I)){if(P&&("text"===P.split("/")[0]||"application/json"===P.split(";")[0].trim()))try{return(0,d.ZN)(I)}catch{}return(0,ie.hexlify)(I)}return I}function m(I){return(0,d.Y0)(I.replace(/%([0-9a-f][0-9a-f])/gi,(P,L)=>String.fromCharCode(parseInt(L,16))))}function _(I,P,L){const V="object"==typeof I&&null!=I.throttleLimit?I.throttleLimit:12;l.assertArgument(V>0&&V%1==0,"invalid connection throttle limit","connection.throttleLimit",V);const W="object"==typeof I?I.throttleCallback:null,G="object"==typeof I&&"number"==typeof I.throttleSlotInterval?I.throttleSlotInterval:100;l.assertArgument(G>0&&G%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",G);const H="object"==typeof I&&!!I.errorPassThrough,j={};let K=null;const R={method:"GET"};let o=!1,y=12e4;if("string"==typeof I)K=I;else if("object"==typeof I){if((null==I||null==I.url)&&l.throwArgumentError("missing URL","connection.url",I),K=I.url,"number"==typeof I.timeout&&I.timeout>0&&(y=I.timeout),I.headers)for(const C in I.headers)j[C.toLowerCase()]={key:C,value:String(I.headers[C])},["if-none-match","if-modified-since"].indexOf(C.toLowerCase())>=0&&(o=!0);R.allowGzip=!!I.allowGzip,null!=I.user&&null!=I.password&&("https:"!==K.substring(0,6)&&!0!==I.allowInsecureAuthentication&&l.throwError("basic authentication requires a secure https url",x.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:K,user:I.user,password:"[REDACTED]"}),j.authorization={key:"Authorization",value:"Basic "+O((0,d.Y0)(I.user+":"+I.password))}),null!=I.skipFetchSetup&&(R.skipFetchSetup=!!I.skipFetchSetup),null!=I.fetchOptions&&(R.fetchOptions=(0,E.shallowCopy)(I.fetchOptions))}const M=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=K?K.match(M):null;if(v)try{const C={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?q(v[3]):m(v[3])};let a=C.body;return L&&(a=L(C.body,C)),Promise.resolve(a)}catch(C){l.throwError("processing response error",x.Logger.errors.SERVER_ERROR,{body:u(v[1],v[2]),error:C,requestBody:null,requestMethod:"GET",url:K})}P&&(R.method="POST",R.body=P,null==j["content-type"]&&(j["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==j["content-length"]&&(j["content-length"]={key:"Content-Length",value:String(P.length)}));const k={};Object.keys(j).forEach(C=>{const a=j[C];k[a.key]=a.value}),R.headers=k;const D=function(){let C=null;return{promise:new Promise(function(Q,ee){y&&(C=setTimeout(()=>{null!=C&&(C=null,ee(l.makeError("timeout",x.Logger.errors.TIMEOUT,{requestBody:u(R.body,k["content-type"]),requestMethod:R.method,timeout:y,url:K})))},y))}),cancel:function(){null!=C&&(clearTimeout(C),C=null)}}}(),N=function(){return function(I,P,L,V){return new(L||(L=Promise))(function(G,H){function j(o){try{R(V.next(o))}catch(y){H(y)}}function K(o){try{R(V.throw(o))}catch(y){H(y)}}function R(o){o.done?G(o.value):function(G){return G instanceof L?G:new L(function(H){H(G)})}(o.value).then(j,K)}R((V=V.apply(I,P||[])).next())})}(this,void 0,void 0,function*(){for(let C=0;C=300)&&(D.cancel(),l.throwError("bad response",x.Logger.errors.SERVER_ERROR,{status:a.statusCode,headers:a.headers,body:u(B,a.headers?a.headers["content-type"]:null),requestBody:u(R.body,k["content-type"]),requestMethod:R.method,url:K})),L)try{const Q=yield L(B,a);return D.cancel(),Q}catch(Q){if(Q.throttleRetry&&C"content-type"===j.toLowerCase()).length||(G.headers=(0,E.shallowCopy)(G.headers),G.headers["content-type"]="application/json"):G.headers={"content-type":"application/json"},I=G}return _(I,W,(G,H)=>{let j=null;if(null!=G)try{j=JSON.parse((0,d.ZN)(G))}catch(K){l.throwError("invalid JSON",x.Logger.errors.SERVER_ERROR,{body:G,error:K})}return L&&(j=L(j,H)),j})}function S(I,P){return P||(P={}),null==(P=(0,E.shallowCopy)(P)).floor&&(P.floor=0),null==P.ceiling&&(P.ceiling=1e4),null==P.interval&&(P.interval=250),new Promise(function(L,V){let W=null,G=!1;const H=()=>!G&&(G=!0,W&&clearTimeout(W),!0);P.timeout&&(W=setTimeout(()=>{H()&&V(new Error("timeout"))},P.timeout));const j=P.retryLimit;let K=0;!function R(){return I().then(function(o){if(void 0!==o)H()&&L(o);else if(P.oncePoll)P.oncePoll.once("poll",R);else if(P.onceBlock)P.onceBlock.once("block",R);else if(!G){if(K++,K>j)return void(H()&&V(new Error("retry limit reached")));let y=P.interval*parseInt(String(Math.random()*Math.pow(2,K)));yP.ceiling&&(y=P.ceiling),setTimeout(R,y)}return null},function(o){H()&&V(o)})}()})}},14667:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>f});var ie=Y(67475),q=Y(92275);const x=new(Y(53898).Logger)("wordlists/5.7.0");class f{constructor(g){x.checkAbstract(new.target,f),(0,q.defineReadOnly)(this,"locale",g)}split(g){return g.toLowerCase().split(/ +/g)}join(g){return g.join(" ")}static check(g){const b=[];for(let l=0;l<2048;l++){const h=g.getWord(l);if(l!==g.getWordIndex(h))return"0x";b.push(h)}return(0,ie.id)(b.join("\n")+"\n")}static register(g,b){b||(b=g.locale)}}},33692:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>f});var ie=Y(14667);let O=null;function E(T){if(null==O&&(O="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==ie.D.check(T)))throw O=null,new Error("BIP39 Wordlist for en (English) FAILED")}const x=new class extends ie.D{constructor(){super("en")}getWord(g){return E(this),O[g]}getWordIndex(g){return E(this),O.indexOf(g)}};ie.D.register(x);const f={en:x}},67083:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(94846);function x(k,D,N){return void 0===D&&(D=new Uint8Array(2)),void 0===N&&(N=0),D[N+0]=k>>>8,D[N+1]=k>>>0,D}function f(k,D,N){return void 0===D&&(D=new Uint8Array(2)),void 0===N&&(N=0),D[N+0]=k>>>0,D[N+1]=k>>>8,D}function T(k,D){return void 0===D&&(D=0),k[D]<<24|k[D+1]<<16|k[D+2]<<8|k[D+3]}function g(k,D){return void 0===D&&(D=0),(k[D]<<24|k[D+1]<<16|k[D+2]<<8|k[D+3])>>>0}function b(k,D){return void 0===D&&(D=0),k[D+3]<<24|k[D+2]<<16|k[D+1]<<8|k[D]}function l(k,D){return void 0===D&&(D=0),(k[D+3]<<24|k[D+2]<<16|k[D+1]<<8|k[D])>>>0}function h(k,D,N){return void 0===D&&(D=new Uint8Array(4)),void 0===N&&(N=0),D[N+0]=k>>>24,D[N+1]=k>>>16,D[N+2]=k>>>8,D[N+3]=k>>>0,D}function u(k,D,N){return void 0===D&&(D=new Uint8Array(4)),void 0===N&&(N=0),D[N+0]=k>>>0,D[N+1]=k>>>8,D[N+2]=k>>>16,D[N+3]=k>>>24,D}function I(k,D,N){return void 0===D&&(D=new Uint8Array(8)),void 0===N&&(N=0),h(k/4294967296>>>0,D,N),h(k>>>0,D,N+4),D}function P(k,D,N){return void 0===D&&(D=new Uint8Array(8)),void 0===N&&(N=0),u(k>>>0,D,N),u(k/4294967296>>>0,D,N+4),D}be.readInt16BE=function(k,D){return void 0===D&&(D=0),(k[D+0]<<8|k[D+1])<<16>>16},be.readUint16BE=function(k,D){return void 0===D&&(D=0),(k[D+0]<<8|k[D+1])>>>0},be.readInt16LE=function(k,D){return void 0===D&&(D=0),(k[D+1]<<8|k[D])<<16>>16},be.readUint16LE=function(k,D){return void 0===D&&(D=0),(k[D+1]<<8|k[D])>>>0},be.writeUint16BE=x,be.writeInt16BE=x,be.writeUint16LE=f,be.writeInt16LE=f,be.readInt32BE=T,be.readUint32BE=g,be.readInt32LE=b,be.readUint32LE=l,be.writeUint32BE=h,be.writeInt32BE=h,be.writeUint32LE=u,be.writeInt32LE=u,be.readInt64BE=function(k,D){void 0===D&&(D=0);var N=T(k,D),C=T(k,D+4);return 4294967296*N+C-4294967296*(C>>31)},be.readUint64BE=function(k,D){return void 0===D&&(D=0),4294967296*g(k,D)+g(k,D+4)},be.readInt64LE=function(k,D){void 0===D&&(D=0);var N=b(k,D);return 4294967296*b(k,D+4)+N-4294967296*(N>>31)},be.readUint64LE=function(k,D){void 0===D&&(D=0);var N=l(k,D);return 4294967296*l(k,D+4)+N},be.writeUint64BE=I,be.writeInt64BE=I,be.writeUint64LE=P,be.writeInt64LE=P,be.readUintBE=function(k,D,N){if(void 0===N&&(N=0),k%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(k/8>D.length-N)throw new Error("readUintBE: array is too short for the given bitLength");for(var C=0,a=1,B=k/8+N-1;B>=N;B--)C+=D[B]*a,a*=256;return C},be.readUintLE=function(k,D,N){if(void 0===N&&(N=0),k%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(k/8>D.length-N)throw new Error("readUintLE: array is too short for the given bitLength");for(var C=0,a=1,B=N;B=C;B--)N[B]=D/a&255,a*=256;return N},be.writeUintLE=function(k,D,N,C){if(void 0===N&&(N=new Uint8Array(k/8)),void 0===C&&(C=0),k%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!ie.isSafeInteger(D))throw new Error("writeUintLE value must be an integer");for(var a=1,B=C;B{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(67083),q=Y(91897);function E(T,g,b){for(var l=1634760805,h=857760878,u=2036477234,m=1797285236,_=b[3]<<24|b[2]<<16|b[1]<<8|b[0],w=b[7]<<24|b[6]<<16|b[5]<<8|b[4],S=b[11]<<24|b[10]<<16|b[9]<<8|b[8],I=b[15]<<24|b[14]<<16|b[13]<<8|b[12],P=b[19]<<24|b[18]<<16|b[17]<<8|b[16],L=b[23]<<24|b[22]<<16|b[21]<<8|b[20],V=b[27]<<24|b[26]<<16|b[25]<<8|b[24],W=b[31]<<24|b[30]<<16|b[29]<<8|b[28],G=g[3]<<24|g[2]<<16|g[1]<<8|g[0],H=g[7]<<24|g[6]<<16|g[5]<<8|g[4],j=g[11]<<24|g[10]<<16|g[9]<<8|g[8],K=g[15]<<24|g[14]<<16|g[13]<<8|g[12],R=l,o=h,y=u,M=m,v=_,k=w,D=S,N=I,C=P,a=L,B=V,Q=W,ee=G,ce=H,ue=j,we=K,ae=0;ae<20;ae+=2)v=(v^=C=C+(ee=(ee^=R=R+v|0)>>>16|ee<<16)|0)>>>20|v<<12,k=(k^=a=a+(ce=(ce^=o=o+k|0)>>>16|ce<<16)|0)>>>20|k<<12,D=(D^=B=B+(ue=(ue^=y=y+D|0)>>>16|ue<<16)|0)>>>20|D<<12,N=(N^=Q=Q+(we=(we^=M=M+N|0)>>>16|we<<16)|0)>>>20|N<<12,D=(D^=B=B+(ue=(ue^=y=y+D|0)>>>24|ue<<8)|0)>>>25|D<<7,N=(N^=Q=Q+(we=(we^=M=M+N|0)>>>24|we<<8)|0)>>>25|N<<7,k=(k^=a=a+(ce=(ce^=o=o+k|0)>>>24|ce<<8)|0)>>>25|k<<7,v=(v^=C=C+(ee=(ee^=R=R+v|0)>>>24|ee<<8)|0)>>>25|v<<7,k=(k^=B=B+(we=(we^=R=R+k|0)>>>16|we<<16)|0)>>>20|k<<12,D=(D^=Q=Q+(ee=(ee^=o=o+D|0)>>>16|ee<<16)|0)>>>20|D<<12,N=(N^=C=C+(ce=(ce^=y=y+N|0)>>>16|ce<<16)|0)>>>20|N<<12,v=(v^=a=a+(ue=(ue^=M=M+v|0)>>>16|ue<<16)|0)>>>20|v<<12,N=(N^=C=C+(ce=(ce^=y=y+N|0)>>>24|ce<<8)|0)>>>25|N<<7,v=(v^=a=a+(ue=(ue^=M=M+v|0)>>>24|ue<<8)|0)>>>25|v<<7,D=(D^=Q=Q+(ee=(ee^=o=o+D|0)>>>24|ee<<8)|0)>>>25|D<<7,k=(k^=B=B+(we=(we^=R=R+k|0)>>>24|we<<8)|0)>>>25|k<<7;ie.writeUint32LE(R+l|0,T,0),ie.writeUint32LE(o+h|0,T,4),ie.writeUint32LE(y+u|0,T,8),ie.writeUint32LE(M+m|0,T,12),ie.writeUint32LE(v+_|0,T,16),ie.writeUint32LE(k+w|0,T,20),ie.writeUint32LE(D+S|0,T,24),ie.writeUint32LE(N+I|0,T,28),ie.writeUint32LE(C+P|0,T,32),ie.writeUint32LE(a+L|0,T,36),ie.writeUint32LE(B+V|0,T,40),ie.writeUint32LE(Q+W|0,T,44),ie.writeUint32LE(ee+G|0,T,48),ie.writeUint32LE(ce+H|0,T,52),ie.writeUint32LE(ue+j|0,T,56),ie.writeUint32LE(we+K|0,T,60)}function d(T,g,b,l,h){if(void 0===h&&(h=0),32!==T.length)throw new Error("ChaCha: key size must be 32 bytes");if(l.length>>=8,g++;if(l>0)throw new Error("ChaCha: counter overflow")}be.streamXOR=d,be.stream=function(T,g,b,l){return void 0===l&&(l=0),q.wipe(b),d(T,g,b,b,l)}},91573:(bt,be,Y)=>{"use strict";var q=Y(25046),O=Y(37852),E=Y(91897),d=Y(67083),x=Y(3054);be.Cv=32,be.WH=12,be.pg=16;var f=new Uint8Array(16),T=function(){function g(b){if(this.nonceLength=be.WH,this.tagLength=be.pg,b.length!==be.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(b)}return g.prototype.seal=function(b,l,h,u){if(b.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var m=new Uint8Array(16);m.set(b,m.length-b.length);var _=new Uint8Array(32);q.stream(this._key,m,_,4);var S,w=l.length+this.tagLength;if(u){if(u.length!==w)throw new Error("ChaCha20Poly1305: incorrect destination length");S=u}else S=new Uint8Array(w);return q.streamXOR(this._key,m,l,S,4),this._authenticate(S.subarray(S.length-this.tagLength,S.length),_,S.subarray(0,S.length-this.tagLength),h),E.wipe(m),S},g.prototype.open=function(b,l,h,u){if(b.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(l.length0&&m.update(f.subarray(u.length%16))),m.update(h),h.length%16>0&&m.update(f.subarray(h.length%16));var _=new Uint8Array(8);u&&d.writeUint64LE(u.length,_),m.update(_),d.writeUint64LE(h.length,_),m.update(_);for(var w=m.digest(),S=0;S{"use strict";function q(E,d){if(E.length!==d.length)return 0;for(var x=0,f=0;f>>8}Object.defineProperty(be,"__esModule",{value:!0}),be.select=function(E,d,x){return~(E-1)&d|E-1&x},be.lessOrEqual=function(E,d){return(0|E)-(0|d)-1>>>31&1},be.compare=q,be.equal=function(E,d){return 0!==E.length&&0!==d.length&&0!==q(E,d)}},47903:(bt,be,Y)=>{"use strict";be.Xx=be._w=be.aP=be.KS=be.jQ=void 0;Y(52632);const O=Y(16);Y(91897);function d(Te){const le=new Float64Array(16);if(Te)for(let X=0;X>16&1),X[xe-1]&=65535;X[15]=ne[15]-32767-(X[14]>>16&1);const _e=X[15]>>16&1;X[14]&=65535,w(ne,X,1-_e)}for(let pe=0;pe<16;pe++)Te[2*pe]=255&ne[pe],Te[2*pe+1]=ne[pe]>>8}function L(Te){const le=new Uint8Array(32);return S(le,Te),1&le[0]}function W(Te,le,X){for(let ne=0;ne<16;ne++)Te[ne]=le[ne]+X[ne]}function G(Te,le,X){for(let ne=0;ne<16;ne++)Te[ne]=le[ne]-X[ne]}function H(Te,le,X){let ne,pe,_e=0,xe=0,Ce=0,ke=0,me=0,Ee=0,ze=0,Ve=0,nt=0,tt=0,mt=0,ht=0,wt=0,Pt=0,st=0,Ye=0,gt=0,St=0,Wt=0,dn=0,Nt=0,It=0,qt=0,jt=0,Yt=0,Wn=0,fn=0,$n=0,Jr=0,Ln=0,Bn=0,Wr=X[0],zn=X[1],bn=X[2],Lr=X[3],Kn=X[4],sr=X[5],Ii=X[6],Un=X[7],ir=X[8],ts=X[9],Tn=X[10],Qn=X[11],Vi=X[12],ar=X[13],br=X[14],ki=X[15];ne=le[0],_e+=ne*Wr,xe+=ne*zn,Ce+=ne*bn,ke+=ne*Lr,me+=ne*Kn,Ee+=ne*sr,ze+=ne*Ii,Ve+=ne*Un,nt+=ne*ir,tt+=ne*ts,mt+=ne*Tn,ht+=ne*Qn,wt+=ne*Vi,Pt+=ne*ar,st+=ne*br,Ye+=ne*ki,ne=le[1],xe+=ne*Wr,Ce+=ne*zn,ke+=ne*bn,me+=ne*Lr,Ee+=ne*Kn,ze+=ne*sr,Ve+=ne*Ii,nt+=ne*Un,tt+=ne*ir,mt+=ne*ts,ht+=ne*Tn,wt+=ne*Qn,Pt+=ne*Vi,st+=ne*ar,Ye+=ne*br,gt+=ne*ki,ne=le[2],Ce+=ne*Wr,ke+=ne*zn,me+=ne*bn,Ee+=ne*Lr,ze+=ne*Kn,Ve+=ne*sr,nt+=ne*Ii,tt+=ne*Un,mt+=ne*ir,ht+=ne*ts,wt+=ne*Tn,Pt+=ne*Qn,st+=ne*Vi,Ye+=ne*ar,gt+=ne*br,St+=ne*ki,ne=le[3],ke+=ne*Wr,me+=ne*zn,Ee+=ne*bn,ze+=ne*Lr,Ve+=ne*Kn,nt+=ne*sr,tt+=ne*Ii,mt+=ne*Un,ht+=ne*ir,wt+=ne*ts,Pt+=ne*Tn,st+=ne*Qn,Ye+=ne*Vi,gt+=ne*ar,St+=ne*br,Wt+=ne*ki,ne=le[4],me+=ne*Wr,Ee+=ne*zn,ze+=ne*bn,Ve+=ne*Lr,nt+=ne*Kn,tt+=ne*sr,mt+=ne*Ii,ht+=ne*Un,wt+=ne*ir,Pt+=ne*ts,st+=ne*Tn,Ye+=ne*Qn,gt+=ne*Vi,St+=ne*ar,Wt+=ne*br,dn+=ne*ki,ne=le[5],Ee+=ne*Wr,ze+=ne*zn,Ve+=ne*bn,nt+=ne*Lr,tt+=ne*Kn,mt+=ne*sr,ht+=ne*Ii,wt+=ne*Un,Pt+=ne*ir,st+=ne*ts,Ye+=ne*Tn,gt+=ne*Qn,St+=ne*Vi,Wt+=ne*ar,dn+=ne*br,Nt+=ne*ki,ne=le[6],ze+=ne*Wr,Ve+=ne*zn,nt+=ne*bn,tt+=ne*Lr,mt+=ne*Kn,ht+=ne*sr,wt+=ne*Ii,Pt+=ne*Un,st+=ne*ir,Ye+=ne*ts,gt+=ne*Tn,St+=ne*Qn,Wt+=ne*Vi,dn+=ne*ar,Nt+=ne*br,It+=ne*ki,ne=le[7],Ve+=ne*Wr,nt+=ne*zn,tt+=ne*bn,mt+=ne*Lr,ht+=ne*Kn,wt+=ne*sr,Pt+=ne*Ii,st+=ne*Un,Ye+=ne*ir,gt+=ne*ts,St+=ne*Tn,Wt+=ne*Qn,dn+=ne*Vi,Nt+=ne*ar,It+=ne*br,qt+=ne*ki,ne=le[8],nt+=ne*Wr,tt+=ne*zn,mt+=ne*bn,ht+=ne*Lr,wt+=ne*Kn,Pt+=ne*sr,st+=ne*Ii,Ye+=ne*Un,gt+=ne*ir,St+=ne*ts,Wt+=ne*Tn,dn+=ne*Qn,Nt+=ne*Vi,It+=ne*ar,qt+=ne*br,jt+=ne*ki,ne=le[9],tt+=ne*Wr,mt+=ne*zn,ht+=ne*bn,wt+=ne*Lr,Pt+=ne*Kn,st+=ne*sr,Ye+=ne*Ii,gt+=ne*Un,St+=ne*ir,Wt+=ne*ts,dn+=ne*Tn,Nt+=ne*Qn,It+=ne*Vi,qt+=ne*ar,jt+=ne*br,Yt+=ne*ki,ne=le[10],mt+=ne*Wr,ht+=ne*zn,wt+=ne*bn,Pt+=ne*Lr,st+=ne*Kn,Ye+=ne*sr,gt+=ne*Ii,St+=ne*Un,Wt+=ne*ir,dn+=ne*ts,Nt+=ne*Tn,It+=ne*Qn,qt+=ne*Vi,jt+=ne*ar,Yt+=ne*br,Wn+=ne*ki,ne=le[11],ht+=ne*Wr,wt+=ne*zn,Pt+=ne*bn,st+=ne*Lr,Ye+=ne*Kn,gt+=ne*sr,St+=ne*Ii,Wt+=ne*Un,dn+=ne*ir,Nt+=ne*ts,It+=ne*Tn,qt+=ne*Qn,jt+=ne*Vi,Yt+=ne*ar,Wn+=ne*br,fn+=ne*ki,ne=le[12],wt+=ne*Wr,Pt+=ne*zn,st+=ne*bn,Ye+=ne*Lr,gt+=ne*Kn,St+=ne*sr,Wt+=ne*Ii,dn+=ne*Un,Nt+=ne*ir,It+=ne*ts,qt+=ne*Tn,jt+=ne*Qn,Yt+=ne*Vi,Wn+=ne*ar,fn+=ne*br,$n+=ne*ki,ne=le[13],Pt+=ne*Wr,st+=ne*zn,Ye+=ne*bn,gt+=ne*Lr,St+=ne*Kn,Wt+=ne*sr,dn+=ne*Ii,Nt+=ne*Un,It+=ne*ir,qt+=ne*ts,jt+=ne*Tn,Yt+=ne*Qn,Wn+=ne*Vi,fn+=ne*ar,$n+=ne*br,Jr+=ne*ki,ne=le[14],st+=ne*Wr,Ye+=ne*zn,gt+=ne*bn,St+=ne*Lr,Wt+=ne*Kn,dn+=ne*sr,Nt+=ne*Ii,It+=ne*Un,qt+=ne*ir,jt+=ne*ts,Yt+=ne*Tn,Wn+=ne*Qn,fn+=ne*Vi,$n+=ne*ar,Jr+=ne*br,Ln+=ne*ki,ne=le[15],Ye+=ne*Wr,gt+=ne*zn,St+=ne*bn,Wt+=ne*Lr,dn+=ne*Kn,Nt+=ne*sr,It+=ne*Ii,qt+=ne*Un,jt+=ne*ir,Yt+=ne*ts,Wn+=ne*Tn,fn+=ne*Qn,$n+=ne*Vi,Jr+=ne*ar,Ln+=ne*br,Bn+=ne*ki,_e+=38*gt,xe+=38*St,Ce+=38*Wt,ke+=38*dn,me+=38*Nt,Ee+=38*It,ze+=38*qt,Ve+=38*jt,nt+=38*Yt,tt+=38*Wn,mt+=38*fn,ht+=38*$n,wt+=38*Jr,Pt+=38*Ln,st+=38*Bn,pe=1,ne=_e+pe+65535,pe=Math.floor(ne/65536),_e=ne-65536*pe,ne=xe+pe+65535,pe=Math.floor(ne/65536),xe=ne-65536*pe,ne=Ce+pe+65535,pe=Math.floor(ne/65536),Ce=ne-65536*pe,ne=ke+pe+65535,pe=Math.floor(ne/65536),ke=ne-65536*pe,ne=me+pe+65535,pe=Math.floor(ne/65536),me=ne-65536*pe,ne=Ee+pe+65535,pe=Math.floor(ne/65536),Ee=ne-65536*pe,ne=ze+pe+65535,pe=Math.floor(ne/65536),ze=ne-65536*pe,ne=Ve+pe+65535,pe=Math.floor(ne/65536),Ve=ne-65536*pe,ne=nt+pe+65535,pe=Math.floor(ne/65536),nt=ne-65536*pe,ne=tt+pe+65535,pe=Math.floor(ne/65536),tt=ne-65536*pe,ne=mt+pe+65535,pe=Math.floor(ne/65536),mt=ne-65536*pe,ne=ht+pe+65535,pe=Math.floor(ne/65536),ht=ne-65536*pe,ne=wt+pe+65535,pe=Math.floor(ne/65536),wt=ne-65536*pe,ne=Pt+pe+65535,pe=Math.floor(ne/65536),Pt=ne-65536*pe,ne=st+pe+65535,pe=Math.floor(ne/65536),st=ne-65536*pe,ne=Ye+pe+65535,pe=Math.floor(ne/65536),Ye=ne-65536*pe,_e+=pe-1+37*(pe-1),pe=1,ne=_e+pe+65535,pe=Math.floor(ne/65536),_e=ne-65536*pe,ne=xe+pe+65535,pe=Math.floor(ne/65536),xe=ne-65536*pe,ne=Ce+pe+65535,pe=Math.floor(ne/65536),Ce=ne-65536*pe,ne=ke+pe+65535,pe=Math.floor(ne/65536),ke=ne-65536*pe,ne=me+pe+65535,pe=Math.floor(ne/65536),me=ne-65536*pe,ne=Ee+pe+65535,pe=Math.floor(ne/65536),Ee=ne-65536*pe,ne=ze+pe+65535,pe=Math.floor(ne/65536),ze=ne-65536*pe,ne=Ve+pe+65535,pe=Math.floor(ne/65536),Ve=ne-65536*pe,ne=nt+pe+65535,pe=Math.floor(ne/65536),nt=ne-65536*pe,ne=tt+pe+65535,pe=Math.floor(ne/65536),tt=ne-65536*pe,ne=mt+pe+65535,pe=Math.floor(ne/65536),mt=ne-65536*pe,ne=ht+pe+65535,pe=Math.floor(ne/65536),ht=ne-65536*pe,ne=wt+pe+65535,pe=Math.floor(ne/65536),wt=ne-65536*pe,ne=Pt+pe+65535,pe=Math.floor(ne/65536),Pt=ne-65536*pe,ne=st+pe+65535,pe=Math.floor(ne/65536),st=ne-65536*pe,ne=Ye+pe+65535,pe=Math.floor(ne/65536),Ye=ne-65536*pe,_e+=pe-1+37*(pe-1),Te[0]=_e,Te[1]=xe,Te[2]=Ce,Te[3]=ke,Te[4]=me,Te[5]=Ee,Te[6]=ze,Te[7]=Ve,Te[8]=nt,Te[9]=tt,Te[10]=mt,Te[11]=ht,Te[12]=wt,Te[13]=Pt,Te[14]=st,Te[15]=Ye}function j(Te,le){H(Te,le,le)}function o(Te,le){const X=d(),ne=d(),pe=d(),_e=d(),xe=d(),Ce=d(),ke=d(),me=d(),Ee=d();G(X,Te[1],Te[0]),G(Ee,le[1],le[0]),H(X,X,Ee),W(ne,Te[0],Te[1]),W(Ee,le[0],le[1]),H(ne,ne,Ee),H(pe,Te[3],le[3]),H(pe,pe,b),H(_e,Te[2],le[2]),W(_e,_e,_e),G(xe,ne,X),G(Ce,_e,pe),W(ke,_e,pe),W(me,ne,X),H(Te[0],xe,Ce),H(Te[1],me,ke),H(Te[2],ke,Ce),H(Te[3],xe,me)}function y(Te,le,X){for(let ne=0;ne<4;ne++)w(Te[ne],le[ne],X)}function M(Te,le){const X=d(),ne=d(),pe=d();(function(Te,le){const X=d();let ne;for(ne=0;ne<16;ne++)X[ne]=le[ne];for(ne=253;ne>=0;ne--)j(X,X),2!==ne&&4!==ne&&H(X,X,le);for(ne=0;ne<16;ne++)Te[ne]=X[ne]})(pe,le[2]),H(X,le[0],pe),H(ne,le[1],pe),S(Te,ne),Te[31]^=L(X)<<7}function k(Te,le){const X=[d(),d(),d(),d()];m(X[0],l),m(X[1],h),m(X[2],T),H(X[3],l,h),function(Te,le,X){m(Te[0],f),m(Te[1],T),m(Te[2],T),m(Te[3],f);for(let ne=255;ne>=0;--ne){const pe=X[ne/8|0]>>(7&ne)&1;y(Te,le,pe),o(le,Te),o(Te,Te),y(Te,le,pe)}}(Te,X,le)}be._w=function(Te){if(Te.length!==be.aP)throw new Error(`ed25519: seed must be ${be.aP} bytes`);const le=(0,O.hash)(Te);le[0]&=248,le[31]&=127,le[31]|=64;const X=new Uint8Array(32),ne=[d(),d(),d(),d()];k(ne,le),M(X,ne);const pe=new Uint8Array(64);return pe.set(Te),pe.set(X,32),{publicKey:X,secretKey:pe}};const a=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 B(Te,le){let X,ne,pe,_e;for(ne=63;ne>=32;--ne){for(X=0,pe=ne-32,_e=ne-12;pe<_e;++pe)le[pe]+=X-16*le[ne]*a[pe-(ne-32)],X=Math.floor((le[pe]+128)/256),le[pe]-=256*X;le[pe]+=X,le[ne]=0}for(X=0,pe=0;pe<32;pe++)le[pe]+=X-(le[31]>>4)*a[pe],X=le[pe]>>8,le[pe]&=255;for(pe=0;pe<32;pe++)le[pe]-=X*a[pe];for(ne=0;ne<32;ne++)le[ne+1]+=le[ne]>>8,Te[ne]=255&le[ne]}function Q(Te){const le=new Float64Array(64);for(let X=0;X<64;X++)le[X]=Te[X];for(let X=0;X<64;X++)Te[X]=0;B(Te,le)}be.Xx=function(Te,le){const X=new Float64Array(64),ne=[d(),d(),d(),d()],pe=(0,O.hash)(Te.subarray(0,32));pe[0]&=248,pe[31]&=127,pe[31]|=64;const _e=new Uint8Array(64);_e.set(pe.subarray(32),32);const xe=new O.SHA512;xe.update(_e.subarray(32)),xe.update(le);const Ce=xe.digest();xe.clean(),Q(Ce),k(ne,Ce),M(_e,ne),xe.reset(),xe.update(_e.subarray(0,32)),xe.update(Te.subarray(32)),xe.update(le);const ke=xe.digest();Q(ke);for(let me=0;me<32;me++)X[me]=Ce[me];for(let me=0;me<32;me++)for(let Ee=0;Ee<32;Ee++)X[me+Ee]+=ke[me]*pe[Ee];return B(_e.subarray(32),X),_e}},22266:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.isSerializableHash=function(ie){return void 0!==ie.saveState&&void 0!==ie.restoreState&&void 0!==ie.cleanSavedState}},37651:(bt,be,Y)=>{"use strict";var q=Y(56283),O=Y(91897),E=function(){function d(x,f,T,g){void 0===T&&(T=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=x,this._info=g;var b=q.hmac(this._hash,T,f);this._hmac=new q.HMAC(x,b),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return d.prototype._fillBuffer=function(){this._counter[0]++;var x=this._counter[0];if(0===x)throw new Error("hkdf: cannot expand more");this._hmac.reset(),x>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},d.prototype.expand=function(x){for(var f=new Uint8Array(x),T=0;T{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(22266),q=Y(3054),O=Y(91897),E=function(){function x(f,T){this._finished=!1,this._inner=new f,this._outer=new f,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var g=new Uint8Array(this.blockSize);T.length>this.blockSize?this._inner.update(T).finish(g).clean():g.set(T);for(var b=0;b{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.mul=Math.imul||function(x,f){var g=65535&x,l=65535&f;return g*l+((x>>>16&65535)*l+g*(f>>>16&65535)<<16>>>0)|0},be.add=function(x,f){return x+f|0},be.sub=function(x,f){return x-f|0},be.rotl=function(x,f){return x<>>32-f},be.rotr=function(x,f){return x<<32-f|x>>>f},be.isInteger=Number.isInteger||function(x){return"number"==typeof x&&isFinite(x)&&Math.floor(x)===x},be.MAX_SAFE_INTEGER=9007199254740991,be.isSafeInteger=function(x){return be.isInteger(x)&&x>=-be.MAX_SAFE_INTEGER&&x<=be.MAX_SAFE_INTEGER}},37852:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(3054),q=Y(91897);be.DIGEST_LENGTH=16;var O=function(){function x(f){this.digestLength=be.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 T=f[0]|f[1]<<8;this._r[0]=8191&T;var g=f[2]|f[3]<<8;this._r[1]=8191&(T>>>13|g<<3);var b=f[4]|f[5]<<8;this._r[2]=7939&(g>>>10|b<<6);var l=f[6]|f[7]<<8;this._r[3]=8191&(b>>>7|l<<9);var h=f[8]|f[9]<<8;this._r[4]=255&(l>>>4|h<<12),this._r[5]=h>>>1&8190;var u=f[10]|f[11]<<8;this._r[6]=8191&(h>>>14|u<<2);var m=f[12]|f[13]<<8;this._r[7]=8065&(u>>>11|m<<5);var _=f[14]|f[15]<<8;this._r[8]=8191&(m>>>8|_<<8),this._r[9]=_>>>5&127,this._pad[0]=f[16]|f[17]<<8,this._pad[1]=f[18]|f[19]<<8,this._pad[2]=f[20]|f[21]<<8,this._pad[3]=f[22]|f[23]<<8,this._pad[4]=f[24]|f[25]<<8,this._pad[5]=f[26]|f[27]<<8,this._pad[6]=f[28]|f[29]<<8,this._pad[7]=f[30]|f[31]<<8}return x.prototype._blocks=function(f,T,g){for(var b=this._fin?0:2048,l=this._h[0],h=this._h[1],u=this._h[2],m=this._h[3],_=this._h[4],w=this._h[5],S=this._h[6],I=this._h[7],P=this._h[8],L=this._h[9],V=this._r[0],W=this._r[1],G=this._r[2],H=this._r[3],j=this._r[4],K=this._r[5],R=this._r[6],o=this._r[7],y=this._r[8],M=this._r[9];g>=16;){var v=f[T+0]|f[T+1]<<8,k=f[T+2]|f[T+3]<<8,D=f[T+4]|f[T+5]<<8,N=f[T+6]|f[T+7]<<8,C=f[T+8]|f[T+9]<<8,a=f[T+10]|f[T+11]<<8,B=f[T+12]|f[T+13]<<8,Q=f[T+14]|f[T+15]<<8,ee=0,ce=ee;ce+=(l+=8191&v)*V,ce+=(h+=8191&(v>>>13|k<<3))*(5*M),ce+=(u+=8191&(k>>>10|D<<6))*(5*y),ce+=(m+=8191&(D>>>7|N<<9))*(5*o),ee=(ce+=(_+=8191&(N>>>4|C<<12))*(5*R))>>>13,ce&=8191,ce+=(w+=C>>>1&8191)*(5*K),ce+=(S+=8191&(C>>>14|a<<2))*(5*j),ce+=(I+=8191&(a>>>11|B<<5))*(5*H),ce+=(P+=8191&(B>>>8|Q<<8))*(5*G);var ue=ee+=(ce+=(L+=Q>>>5|b)*(5*W))>>>13;ue+=l*W,ue+=h*V,ue+=u*(5*M),ue+=m*(5*y),ee=(ue+=_*(5*o))>>>13,ue&=8191,ue+=w*(5*R),ue+=S*(5*K),ue+=I*(5*j),ue+=P*(5*H),ee+=(ue+=L*(5*G))>>>13,ue&=8191;var we=ee;we+=l*G,we+=h*W,we+=u*V,we+=m*(5*M),ee=(we+=_*(5*y))>>>13,we&=8191,we+=w*(5*o),we+=S*(5*R),we+=I*(5*K),we+=P*(5*j);var ae=ee+=(we+=L*(5*H))>>>13;ae+=l*H,ae+=h*G,ae+=u*W,ae+=m*V,ee=(ae+=_*(5*M))>>>13,ae&=8191,ae+=w*(5*y),ae+=S*(5*o),ae+=I*(5*R),ae+=P*(5*K);var Te=ee+=(ae+=L*(5*j))>>>13;Te+=l*j,Te+=h*H,Te+=u*G,Te+=m*W,ee=(Te+=_*V)>>>13,Te&=8191,Te+=w*(5*M),Te+=S*(5*y),Te+=I*(5*o),Te+=P*(5*R);var le=ee+=(Te+=L*(5*K))>>>13;le+=l*K,le+=h*j,le+=u*H,le+=m*G,ee=(le+=_*W)>>>13,le&=8191,le+=w*V,le+=S*(5*M),le+=I*(5*y),le+=P*(5*o);var X=ee+=(le+=L*(5*R))>>>13;X+=l*R,X+=h*K,X+=u*j,X+=m*H,ee=(X+=_*G)>>>13,X&=8191,X+=w*W,X+=S*V,X+=I*(5*M),X+=P*(5*y);var ne=ee+=(X+=L*(5*o))>>>13;ne+=l*o,ne+=h*R,ne+=u*K,ne+=m*j,ee=(ne+=_*H)>>>13,ne&=8191,ne+=w*G,ne+=S*W,ne+=I*V,ne+=P*(5*M);var pe=ee+=(ne+=L*(5*y))>>>13;pe+=l*y,pe+=h*o,pe+=u*R,pe+=m*K,ee=(pe+=_*j)>>>13,pe&=8191,pe+=w*H,pe+=S*G,pe+=I*W,pe+=P*V;var _e=ee+=(pe+=L*(5*M))>>>13;_e+=l*M,_e+=h*y,_e+=u*o,_e+=m*R,ee=(_e+=_*K)>>>13,_e&=8191,_e+=w*j,_e+=S*H,_e+=I*G,_e+=P*W,l=ce=8191&(ee=(ee=((ee+=(_e+=L*V)>>>13)<<2)+ee|0)+(ce&=8191)|0),h=ue+=ee>>>=13,u=we&=8191,m=ae&=8191,_=Te&=8191,w=le&=8191,S=X&=8191,I=ne&=8191,P=pe&=8191,L=_e&=8191,T+=16,g-=16}this._h[0]=l,this._h[1]=h,this._h[2]=u,this._h[3]=m,this._h[4]=_,this._h[5]=w,this._h[6]=S,this._h[7]=I,this._h[8]=P,this._h[9]=L},x.prototype.finish=function(f,T){void 0===T&&(T=0);var b,l,h,u,g=new Uint16Array(10);if(this._leftover){for(u=this._leftover,this._buffer[u++]=1;u<16;u++)this._buffer[u]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(b=this._h[1]>>>13,this._h[1]&=8191,u=2;u<10;u++)this._h[u]+=b,b=this._h[u]>>>13,this._h[u]&=8191;for(this._h[0]+=5*b,b=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=b,b=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=b,g[0]=this._h[0]+5,b=g[0]>>>13,g[0]&=8191,u=1;u<10;u++)g[u]=this._h[u]+b,b=g[u]>>>13,g[u]&=8191;for(g[9]-=8192,l=(1^b)-1,u=0;u<10;u++)g[u]&=l;for(l=~l,u=0;u<10;u++)this._h[u]=this._h[u]&l|g[u];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),this._h[0]=65535&(h=this._h[0]+this._pad[0]),u=1;u<8;u++)this._h[u]=65535&(h=(this._h[u]+this._pad[u]|0)+(h>>>16)|0);return f[T+0]=this._h[0]>>>0,f[T+1]=this._h[0]>>>8,f[T+2]=this._h[1]>>>0,f[T+3]=this._h[1]>>>8,f[T+4]=this._h[2]>>>0,f[T+5]=this._h[2]>>>8,f[T+6]=this._h[3]>>>0,f[T+7]=this._h[3]>>>8,f[T+8]=this._h[4]>>>0,f[T+9]=this._h[4]>>>8,f[T+10]=this._h[5]>>>0,f[T+11]=this._h[5]>>>8,f[T+12]=this._h[6]>>>0,f[T+13]=this._h[6]>>>8,f[T+14]=this._h[7]>>>0,f[T+15]=this._h[7]>>>8,this._finished=!0,this},x.prototype.update=function(f){var b,T=0,g=f.length;if(this._leftover){(b=16-this._leftover)>g&&(b=g);for(var l=0;l=16&&(this._blocks(f,T,b=g-g%16),T+=b,g-=b),g){for(l=0;l{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.randomStringForEntropy=be.randomString=be.randomUint32=be.randomBytes=be.defaultRandomSource=void 0;const ie=Y(88920),q=Y(67083),O=Y(91897);function E(g,b=be.defaultRandomSource){return b.randomBytes(g)}be.defaultRandomSource=new ie.SystemRandomSource,be.randomBytes=E,be.randomUint32=function(g=be.defaultRandomSource){const b=E(4,g),l=(0,q.readUint32LE)(b);return(0,O.wipe)(b),l};const x="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function f(g,b=x,l=be.defaultRandomSource){if(b.length<2)throw new Error("randomString charset is too short");if(b.length>256)throw new Error("randomString charset is too long");let h="";const u=b.length,m=256-256%u;for(;g>0;){const _=E(Math.ceil(256*g/m),l);for(let w=0;w<_.length&&g>0;w++){const S=_[w];S{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BrowserRandomSource=void 0,be.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const O="undefined"!=typeof self?self.crypto||self.msCrypto:null;O&&void 0!==O.getRandomValues&&(this._crypto=O,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(O){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const E=new Uint8Array(O);for(let d=0;d{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.NodeRandomSource=void 0;const ie=Y(91897);be.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const E=Y(19726);E&&E.randomBytes&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(E){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let d=this._crypto.randomBytes(E);if(d.length!==E)throw new Error("NodeRandomSource: got fewer bytes than requested");const x=new Uint8Array(E);for(let f=0;f{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.SystemRandomSource=void 0;const ie=Y(65695),q=Y(49398);be.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new ie.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new q.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(d){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(d)}}},41027:(bt,be,Y)=>{"use strict";var q=Y(67083),O=Y(91897);be.k=32,be.cn=64;var E=function(){function T(){this.digestLength=be.k,this.blockSize=be.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 T.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},T.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},T.prototype.clean=function(){O.wipe(this._buffer),O.wipe(this._temp),this.reset()},T.prototype.update=function(g,b){if(void 0===b&&(b=g.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var l=0;if(this._bytesHashed+=b,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=g[l++],b--;this._bufferLength===this.blockSize&&(x(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(b>=this.blockSize&&(l=x(this._temp,this._state,g,l,b),b%=this.blockSize);b>0;)this._buffer[this._bufferLength++]=g[l++],b--;return this},T.prototype.finish=function(g){if(!this._finished){var b=this._bytesHashed,l=this._bufferLength,h=b/536870912|0,u=b<<3,m=b%64<56?64:128;this._buffer[l]=128;for(var _=l+1;_0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},T.prototype.restoreState=function(g){return this._state.set(g.state),this._bufferLength=g.bufferLength,g.buffer&&this._buffer.set(g.buffer),this._bytesHashed=g.bytesHashed,this._finished=!1,this},T.prototype.cleanSavedState=function(g){O.wipe(g.state),g.buffer&&O.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},T}();be.mE=E;var d=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 x(T,g,b,l,h){for(;h>=64;){for(var u=g[0],m=g[1],_=g[2],w=g[3],S=g[4],I=g[5],P=g[6],L=g[7],V=0;V<16;V++)T[V]=q.readUint32BE(b,l+4*V);for(V=16;V<64;V++){var G=T[V-2];T[V]=((H=(G>>>17|G<<15)^(G>>>19|G<<13)^G>>>10)+T[V-7]|0)+((j=((G=T[V-15])>>>7|G<<25)^(G>>>18|G<<14)^G>>>3)+T[V-16]|0)}for(V=0;V<64;V++){var H=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&I^~S&P)|0)+(L+(d[V]+T[V]|0)|0)|0,j=((u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10))+(u&m^u&_^m&_)|0;L=P,P=I,I=S,S=w+H|0,w=_,_=m,m=u,u=H+j|0}g[0]+=u,g[1]+=m,g[2]+=_,g[3]+=w,g[4]+=S,g[5]+=I,g[6]+=P,g[7]+=L,l+=64,h-=64}return l}be.vp=function(T){var g=new E;g.update(T);var b=g.digest();return g.clean(),b}},16:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ie=Y(67083),q=Y(91897);be.DIGEST_LENGTH=64,be.BLOCK_SIZE=128;var O=function(){function f(){this.digestLength=be.DIGEST_LENGTH,this.blockSize=be.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 f.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},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){q.wipe(this._buffer),q.wipe(this._tempHi),q.wipe(this._tempLo),this.reset()},f.prototype.update=function(T,g){if(void 0===g&&(g=T.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var b=0;if(this._bytesHashed+=g,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=T[b++],g--;this._bufferLength===this.blockSize&&(d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(g>=this.blockSize&&(b=d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,T,b,g),g%=this.blockSize);g>0;)this._buffer[this._bufferLength++]=T[b++],g--;return this},f.prototype.finish=function(T){if(!this._finished){var g=this._bytesHashed,b=this._bufferLength,l=g/536870912|0,h=g<<3,u=g%128<112?128:256;this._buffer[b]=128;for(var m=b+1;m0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(T){return this._stateHi.set(T.stateHi),this._stateLo.set(T.stateLo),this._bufferLength=T.bufferLength,T.buffer&&this._buffer.set(T.buffer),this._bytesHashed=T.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(T){q.wipe(T.stateHi),q.wipe(T.stateLo),T.buffer&&q.wipe(T.buffer),T.bufferLength=0,T.bytesHashed=0},f}();be.SHA512=O;var E=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 d(f,T,g,b,l,h,u){for(var M,v,k,D,N,C,a,B,m=g[0],_=g[1],w=g[2],S=g[3],I=g[4],P=g[5],L=g[6],V=g[7],W=b[0],G=b[1],H=b[2],j=b[3],K=b[4],R=b[5],o=b[6],y=b[7];u>=128;){for(var Q=0;Q<16;Q++)f[Q]=ie.readUint32BE(l,ee=8*Q+h),T[Q]=ie.readUint32BE(l,ee+4);for(Q=0;Q<80;Q++){var ne,ze,ue=_,we=w,ae=S,Te=I,le=P,X=L,_e=G,xe=H,Ce=j,ke=K,me=R,Ee=o;if(N=65535&(v=y),C=v>>>16,a=65535&(M=V),B=M>>>16,N+=65535&(v=(K>>>14|I<<18)^(K>>>18|I<<14)^(I>>>9|K<<23)),C+=v>>>16,a+=65535&(M=(I>>>14|K<<18)^(I>>>18|K<<14)^(K>>>9|I<<23)),B+=M>>>16,N+=65535&(v=K&R^~K&o),C+=v>>>16,a+=65535&(M=I&P^~I&L),B+=M>>>16,N+=65535&(v=E[2*Q+1]),C+=v>>>16,a+=65535&(M=E[2*Q]),B+=M>>>16,C+=(v=T[Q%16])>>>16,a+=65535&(M=f[Q%16]),B+=M>>>16,a+=(C+=(N+=65535&v)>>>16)>>>16,N=65535&(v=D=65535&N|C<<16),C=v>>>16,a=65535&(M=k=65535&a|(B+=a>>>16)<<16),B=M>>>16,N+=65535&(v=(W>>>28|m<<4)^(m>>>2|W<<30)^(m>>>7|W<<25)),C+=v>>>16,a+=65535&(M=(m>>>28|W<<4)^(W>>>2|m<<30)^(W>>>7|m<<25)),B+=M>>>16,C+=(v=W&G^W&H^G&H)>>>16,a+=65535&(M=m&_^m&w^_&w),B+=M>>>16,ne=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,ze=65535&N|C<<16,N=65535&(v=Ce),C=v>>>16,a=65535&(M=ae),B=M>>>16,C+=(v=D)>>>16,a+=65535&(M=k),B+=M>>>16,_=m,w=ue,S=we,I=ae=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,P=Te,L=le,V=X,m=ne,G=W,H=_e,j=xe,K=Ce=65535&N|C<<16,R=ke,o=me,y=Ee,W=ze,Q%16==15)for(var ee=0;ee<16;ee++)N=65535&(v=T[ee]),C=v>>>16,a=65535&(M=f[ee]),B=M>>>16,N+=65535&(v=T[(ee+9)%16]),C+=v>>>16,a+=65535&(M=f[(ee+9)%16]),B+=M>>>16,N+=65535&(v=((D=T[(ee+1)%16])>>>1|(k=f[(ee+1)%16])<<31)^(D>>>8|k<<24)^(D>>>7|k<<25)),C+=v>>>16,a+=65535&(M=(k>>>1|D<<31)^(k>>>8|D<<24)^k>>>7),B+=M>>>16,C+=(v=((D=T[(ee+14)%16])>>>19|(k=f[(ee+14)%16])<<13)^(k>>>29|D<<3)^(D>>>6|k<<26))>>>16,a+=65535&(M=(k>>>19|D<<13)^(D>>>29|k<<3)^k>>>6),B+=M>>>16,f[ee]=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,T[ee]=65535&N|C<<16}N=65535&(v=W),C=v>>>16,a=65535&(M=m),B=M>>>16,C+=(v=b[0])>>>16,a+=65535&(M=g[0]),B+=M>>>16,g[0]=m=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[0]=W=65535&N|C<<16,N=65535&(v=G),C=v>>>16,a=65535&(M=_),B=M>>>16,C+=(v=b[1])>>>16,a+=65535&(M=g[1]),B+=M>>>16,g[1]=_=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[1]=G=65535&N|C<<16,N=65535&(v=H),C=v>>>16,a=65535&(M=w),B=M>>>16,C+=(v=b[2])>>>16,a+=65535&(M=g[2]),B+=M>>>16,g[2]=w=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[2]=H=65535&N|C<<16,N=65535&(v=j),C=v>>>16,a=65535&(M=S),B=M>>>16,C+=(v=b[3])>>>16,a+=65535&(M=g[3]),B+=M>>>16,g[3]=S=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[3]=j=65535&N|C<<16,N=65535&(v=K),C=v>>>16,a=65535&(M=I),B=M>>>16,C+=(v=b[4])>>>16,a+=65535&(M=g[4]),B+=M>>>16,g[4]=I=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[4]=K=65535&N|C<<16,N=65535&(v=R),C=v>>>16,a=65535&(M=P),B=M>>>16,C+=(v=b[5])>>>16,a+=65535&(M=g[5]),B+=M>>>16,g[5]=P=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[5]=R=65535&N|C<<16,N=65535&(v=o),C=v>>>16,a=65535&(M=L),B=M>>>16,C+=(v=b[6])>>>16,a+=65535&(M=g[6]),B+=M>>>16,g[6]=L=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[6]=o=65535&N|C<<16,N=65535&(v=y),C=v>>>16,a=65535&(M=V),B=M>>>16,C+=(v=b[7])>>>16,a+=65535&(M=g[7]),B+=M>>>16,g[7]=V=65535&(a+=(C+=(N+=65535&v)>>>16)>>>16)|(B+=a>>>16)<<16,b[7]=y=65535&N|C<<16,h+=128,u-=128}return h}be.hash=function(f){var T=new O;T.update(f);var g=T.digest();return T.clean(),g}},91897:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.wipe=function(ie){for(var q=0;q{"use strict";be.gi=be.Au=be.KS=be.kz=void 0;const q=Y(52632),O=Y(91897);function E(V){const W=new Float64Array(16);if(V)for(let G=0;G=0;--N){const C=G[N>>>3]>>>(7&N)&1;T(j,K,C),T(R,o,C),l(y,j,R),h(j,j,R),l(R,K,o),h(K,K,o),m(o,y),m(M,j),u(j,R,j),u(R,K,y),l(y,j,R),h(j,j,R),m(K,j),h(R,o,M),u(j,R,x),l(j,j,o),u(R,R,j),u(j,o,M),u(o,K,H),m(K,y),T(j,K,C),T(R,o,C)}for(let N=0;N<16;N++)H[N+16]=j[N],H[N+32]=R[N],H[N+48]=K[N],H[N+64]=o[N];const v=H.subarray(32),k=H.subarray(16);(function(V,W){const G=E();for(let H=0;H<16;H++)G[H]=W[H];for(let H=253;H>=0;H--)m(G,G),2!==H&&4!==H&&u(G,G,W);for(let H=0;H<16;H++)V[H]=G[H]})(v,v),u(k,k,v);const D=new Uint8Array(32);return function(V,W){const G=E(),H=E();for(let j=0;j<16;j++)H[j]=W[j];f(H),f(H),f(H);for(let j=0;j<2;j++){G[0]=H[0]-65517;for(let R=1;R<15;R++)G[R]=H[R]-65535-(G[R-1]>>16&1),G[R-1]&=65535;G[15]=H[15]-32767-(G[14]>>16&1);const K=G[15]>>16&1;G[14]&=65535,T(H,G,1-K)}for(let j=0;j<16;j++)V[2*j]=255&H[j],V[2*j+1]=H[j]>>8}(D,k),D}function S(V){return w(V,d)}be.Au=function(V){const W=(0,q.randomBytes)(32,V),G=function(V){if(V.length!==be.KS)throw new Error(`x25519: seed must be ${be.KS} bytes`);const W=new Uint8Array(V);return{publicKey:S(W),secretKey:W}}(W);return(0,O.wipe)(W),G},be.gi=function(V,W,G=!1){if(V.length!==be.kz)throw new Error("X25519: incorrect secret key length");if(W.length!==be.kz)throw new Error("X25519: incorrect public key length");const H=w(V,W);if(G){let j=0;for(let K=0;K{"use strict";function Y(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function ie(){const O=Y();return O.subtle||O.webkitSubtle}Object.defineProperty(be,"__esModule",{value:!0}),be.isBrowserCryptoAvailable=be.getSubtleCrypto=be.getBrowerCrypto=void 0,be.getBrowerCrypto=Y,be.getSubtleCrypto=ie,be.isBrowserCryptoAvailable=function(){return!!Y()&&!!ie()}},69537:(bt,be)=>{"use strict";function Y(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function ie(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(be,"__esModule",{value:!0}),be.isBrowser=be.isNode=be.isReactNative=void 0,be.isReactNative=Y,be.isNode=ie,be.isBrowser=function(){return!Y()&&!ie()}},38572:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(33172);ie.__exportStar(Y(5158),be),ie.__exportStar(Y(69537),be)},52399:(bt,be,Y)=>{"use strict";Y.d(be,{q:()=>ie});class ie{}},1577:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{IEvents:()=>ie.q});var ie=Y(52399)},63029:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.HEARTBEAT_EVENTS=be.HEARTBEAT_INTERVAL=void 0;const ie=Y(14611);be.HEARTBEAT_INTERVAL=ie.FIVE_SECONDS,be.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},76505:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),Y(83411).__exportStar(Y(63029),be)},33435:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.HeartBeat=void 0;const ie=Y(83411),q=Y(93105),O=Y(14611),E=Y(76157),d=Y(76505);class x extends E.IHeartBeat{constructor(T){super(T),this.events=new q.EventEmitter,this.interval=d.HEARTBEAT_INTERVAL,this.interval=(null==T?void 0:T.interval)||d.HEARTBEAT_INTERVAL}static init(T){return ie.__awaiter(this,void 0,void 0,function*(){const g=new x(T);return yield g.init(),g})}init(){return ie.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(T,g){this.events.on(T,g)}once(T,g){this.events.once(T,g)}off(T,g){this.events.off(T,g)}removeListener(T,g){this.events.removeListener(T,g)}initialize(){return ie.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),O.toMiliseconds(this.interval))})}pulse(){this.events.emit(d.HEARTBEAT_EVENTS.pulse)}}be.HeartBeat=x},38960:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(83411);ie.__exportStar(Y(33435),be),ie.__exportStar(Y(76157),be),ie.__exportStar(Y(76505),be)},41760:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.IHeartBeat=void 0;const ie=Y(1577);be.IHeartBeat=class extends ie.IEvents{constructor(E){super()}}},76157:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),Y(83411).__exportStar(Y(41760),be)},6930:(bt,be,Y)=>{"use strict";Y.d(be,{k:()=>m,Z:()=>w});var ie=Y(34553),q=Y(93105),O=Y(75630),E=Y.n(O);function T(S){return"string"==typeof S?S:(S=>JSON.stringify(S,(I,P)=>"bigint"==typeof P?P.toString()+"n":P))(S)||""}var g=Y(22339);const h={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class m{constructor(I,P=!1){if(this.url=I,this.disableProviderPing=P,this.events=new q.EventEmitter,this.isAvailable=!1,this.registering=!1,!(0,g.isHttpUrl)(I))throw new Error(`Provided URL is not compatible with HTTP connection: ${I}`);this.url=I,this.disableProviderPing=P}get connected(){return this.isAvailable}get connecting(){return this.registering}on(I,P){this.events.on(I,P)}once(I,P){this.events.once(I,P)}off(I,P){this.events.off(I,P)}removeListener(I,P){this.events.removeListener(I,P)}open(I=this.url){var P=this;return(0,ie.Z)(function*(){yield P.register(I)})()}close(){var I=this;return(0,ie.Z)(function*(){if(!I.isAvailable)throw new Error("Connection already closed");I.onClose()})()}send(I,P){var L=this;return(0,ie.Z)(function*(){L.isAvailable||(yield L.register());try{const V=T(I),G=yield(yield E()(L.url,Object.assign(Object.assign({},h),{body:V}))).json();L.onPayload({data:G})}catch(V){L.onError(I.id,V)}})()}register(I=this.url){var P=this;return(0,ie.Z)(function*(){if(!(0,g.isHttpUrl)(I))throw new Error(`Provided URL is not compatible with HTTP connection: ${I}`);if(P.registering){const L=P.events.getMaxListeners();return(P.events.listenerCount("register_error")>=L||P.events.listenerCount("open")>=L)&&P.events.setMaxListeners(L+1),new Promise((V,W)=>{P.events.once("register_error",G=>{P.resetMaxListeners(),W(G)}),P.events.once("open",()=>{if(P.resetMaxListeners(),void 0===P.isAvailable)return W(new Error("HTTP connection is missing or invalid"));V()})})}P.url=I,P.registering=!0;try{if(!P.disableProviderPing){const L=T({id:1,jsonrpc:"2.0",method:"test",params:[]});yield E()(I,Object.assign(Object.assign({},h),{body:L}))}P.onOpen()}catch(L){const V=P.parseError(L);throw P.events.emit("register_error",V),P.onClose(),V}})()}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(I){if(void 0===I.data)return;const P="string"==typeof I.data?function(S){if("string"!=typeof S)throw new Error("Cannot safe json parse value of type "+typeof S);try{return(S=>{const P=S.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(P,(L,V)=>"string"==typeof V&&V.match(/^\d+n$/)?BigInt(V.substring(0,V.length-1)):V)})(S)}catch{return S}}(I.data):I.data;this.events.emit("payload",P)}onError(I,P){const L=this.parseError(P),V=L.message||L.toString(),W=(0,g.formatJsonRpcError)(I,V);this.events.emit("payload",W)}parseError(I,P=this.url){return(0,g.CX)(I,P,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const w=m},10321:(bt,be,Y)=>{"use strict";Y.d(be,{r:()=>E});var ie=Y(34553),q=Y(93105),O=Y(22339);class E extends O.IJsonRpcProvider{constructor(T){super(T),this.events=new q.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(T),this.connection.connected&&this.registerEventListeners()}connect(T=this.connection){var g=this;return(0,ie.Z)(function*(){yield g.open(T)})()}disconnect(){var T=this;return(0,ie.Z)(function*(){yield T.close()})()}on(T,g){this.events.on(T,g)}once(T,g){this.events.once(T,g)}off(T,g){this.events.off(T,g)}removeListener(T,g){this.events.removeListener(T,g)}request(T,g){var b=this;return(0,ie.Z)(function*(){return b.requestStrict((0,O.formatJsonRpcRequest)(T.method,T.params||[],T.id||(0,O.getBigIntRpcId)().toString()),g)})()}requestStrict(T,g){var b=this;return(0,ie.Z)(function*(){return new Promise(function(){var l=(0,ie.Z)(function*(h,u){if(!b.connection.connected)try{yield b.open()}catch(m){u(m)}b.events.on(`${T.id}`,m=>{(0,O.isJsonRpcError)(m)?u(m.error):h(m.result)});try{yield b.connection.send(T,g)}catch(m){u(m)}});return function(h,u){return l.apply(this,arguments)}}())})()}setConnection(T=this.connection){return T}onPayload(T){this.events.emit("payload",T),(0,O.isJsonRpcResponse)(T)?this.events.emit(`${T.id}`,T):this.events.emit("message",{type:T.method,data:T.params})}onClose(T){T&&3e3===T.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${T.code} ${T.reason?`(${T.reason})`:""}`)),this.events.emit("disconnect")}open(T=this.connection){var g=this;return(0,ie.Z)(function*(){g.connection===T&&g.connection.connected||(g.connection.connected&&g.close(),"string"==typeof T&&(yield g.connection.open(T),T=g.connection),g.connection=g.setConnection(T),yield g.connection.open(),g.registerEventListeners(),g.events.emit("connect"))})()}close(){var T=this;return(0,ie.Z)(function*(){yield T.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",T=>this.onPayload(T)),this.connection.on("close",T=>this.onClose(T)),this.connection.on("error",T=>this.events.emit("error",T)),this.connection.on("register_error",T=>this.onClose()),this.hasRegisteredEventListeners=!0)}}},52885:(bt,be,Y)=>{"use strict";Y.d(be,{O4:()=>d,CA:()=>x,dQ:()=>f,xK:()=>g,JV:()=>b});const d="INTERNAL_ERROR",x="SERVER_ERROR",f=[-32700,-32600,-32601,-32602,-32603],g={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"},[d]:{code:-32603,message:"Internal error"},[x]:{code:-32e3,message:"Server error"}},b=x},84275:(bt,be,Y)=>{"use strict";var ie=Y(38572);Y.o(ie,"IJsonRpcProvider")&&Y.d(be,{IJsonRpcProvider:function(){return ie.IJsonRpcProvider}}),Y.o(ie,"formatJsonRpcError")&&Y.d(be,{formatJsonRpcError:function(){return ie.formatJsonRpcError}}),Y.o(ie,"formatJsonRpcRequest")&&Y.d(be,{formatJsonRpcRequest:function(){return ie.formatJsonRpcRequest}}),Y.o(ie,"formatJsonRpcResult")&&Y.d(be,{formatJsonRpcResult:function(){return ie.formatJsonRpcResult}}),Y.o(ie,"getBigIntRpcId")&&Y.d(be,{getBigIntRpcId:function(){return ie.getBigIntRpcId}}),Y.o(ie,"isHttpUrl")&&Y.d(be,{isHttpUrl:function(){return ie.isHttpUrl}}),Y.o(ie,"isJsonRpcError")&&Y.d(be,{isJsonRpcError:function(){return ie.isJsonRpcError}}),Y.o(ie,"isJsonRpcRequest")&&Y.d(be,{isJsonRpcRequest:function(){return ie.isJsonRpcRequest}}),Y.o(ie,"isJsonRpcResponse")&&Y.d(be,{isJsonRpcResponse:function(){return ie.isJsonRpcResponse}}),Y.o(ie,"isJsonRpcResult")&&Y.d(be,{isJsonRpcResult:function(){return ie.isJsonRpcResult}}),Y.o(ie,"isLocalhostUrl")&&Y.d(be,{isLocalhostUrl:function(){return ie.isLocalhostUrl}}),Y.o(ie,"isReactNative")&&Y.d(be,{isReactNative:function(){return ie.isReactNative}}),Y.o(ie,"isWsUrl")&&Y.d(be,{isWsUrl:function(){return ie.isWsUrl}}),Y.o(ie,"payloadId")&&Y.d(be,{payloadId:function(){return ie.payloadId}})},93938:(bt,be,Y)=>{"use strict";Y.d(be,{i5:()=>O,by:()=>d,L2:()=>x,CX:()=>T});var ie=Y(52885);function O(g){return ie.dQ.includes(g)}function d(g){return Object.keys(ie.xK).includes(g)?ie.xK[g]:ie.xK[ie.JV]}function x(g){return Object.values(ie.xK).find(l=>l.code===g)||ie.xK[ie.JV]}function T(g,b,l){return g.message.includes("getaddrinfo ENOTFOUND")||g.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${l} RPC url at ${b}`):g}},90863:(bt,be,Y)=>{"use strict";Y.d(be,{o0:()=>O,CS:()=>E,sT:()=>d,tm:()=>x,RI:()=>f});var ie=Y(93938),q=Y(52885);function O(g=3){return Date.now()*Math.pow(10,g)+Math.floor(Math.random()*Math.pow(10,g))}function E(g=6){return BigInt(O(g))}function d(g,b,l){return{id:l||O(),jsonrpc:"2.0",method:g,params:b}}function x(g,b){return{id:g,jsonrpc:"2.0",result:b}}function f(g,b,l){return{id:g,jsonrpc:"2.0",error:T(b,l)}}function T(g,b){return void 0===g?(0,ie.by)(q.O4):("string"==typeof g&&(g=Object.assign(Object.assign({},(0,ie.by)(q.CA)),{message:g})),void 0!==b&&(g.data=b),(0,ie.i5)(g.code)&&(g=(0,ie.L2)(g.code)),g)}},22339:(bt,be,Y)=>{"use strict";Y.d(be,{CX:()=>q.CX,formatJsonRpcError:()=>E.RI,formatJsonRpcRequest:()=>E.sT,formatJsonRpcResult:()=>E.tm,getBigIntRpcId:()=>E.CS,payloadId:()=>E.o0,IJsonRpcProvider:()=>d.x0,isHttpUrl:()=>x.jK,isLocalhostUrl:()=>x.JF,isWsUrl:()=>x.UZ,isJsonRpcError:()=>f.jg,isJsonRpcRequest:()=>f.DW,isJsonRpcResponse:()=>f.u,isJsonRpcResult:()=>f.k4}),Y(52885);var q=Y(93938),O=Y(84275);Y.o(O,"IJsonRpcProvider")&&Y.d(be,{IJsonRpcProvider:function(){return O.IJsonRpcProvider}}),Y.o(O,"formatJsonRpcError")&&Y.d(be,{formatJsonRpcError:function(){return O.formatJsonRpcError}}),Y.o(O,"formatJsonRpcRequest")&&Y.d(be,{formatJsonRpcRequest:function(){return O.formatJsonRpcRequest}}),Y.o(O,"formatJsonRpcResult")&&Y.d(be,{formatJsonRpcResult:function(){return O.formatJsonRpcResult}}),Y.o(O,"getBigIntRpcId")&&Y.d(be,{getBigIntRpcId:function(){return O.getBigIntRpcId}}),Y.o(O,"isHttpUrl")&&Y.d(be,{isHttpUrl:function(){return O.isHttpUrl}}),Y.o(O,"isJsonRpcError")&&Y.d(be,{isJsonRpcError:function(){return O.isJsonRpcError}}),Y.o(O,"isJsonRpcRequest")&&Y.d(be,{isJsonRpcRequest:function(){return O.isJsonRpcRequest}}),Y.o(O,"isJsonRpcResponse")&&Y.d(be,{isJsonRpcResponse:function(){return O.isJsonRpcResponse}}),Y.o(O,"isJsonRpcResult")&&Y.d(be,{isJsonRpcResult:function(){return O.isJsonRpcResult}}),Y.o(O,"isLocalhostUrl")&&Y.d(be,{isLocalhostUrl:function(){return O.isLocalhostUrl}}),Y.o(O,"isReactNative")&&Y.d(be,{isReactNative:function(){return O.isReactNative}}),Y.o(O,"isWsUrl")&&Y.d(be,{isWsUrl:function(){return O.isWsUrl}}),Y.o(O,"payloadId")&&Y.d(be,{payloadId:function(){return O.payloadId}});var E=Y(90863),d=Y(57572),x=Y(96796),f=Y(9087)},57572:(bt,be,Y)=>{"use strict";Y.d(be,{x0:()=>E});class E extends class extends class{}{constructor(){super()}}{constructor(x){super()}}},96796:(bt,be,Y)=>{"use strict";function E(T,g){const b=function(T){const g=T.match(new RegExp(/^\w+:/,"gi"));if(g&&g.length)return g[0]}(T);return void 0!==b&&new RegExp(g).test(b)}function d(T){return E(T,"^https?:")}function x(T){return E(T,"^wss?:")}function f(T){return new RegExp("wss?://localhost(:d{2,5})?").test(T)}Y.d(be,{jK:()=>d,UZ:()=>x,JF:()=>f})},9087:(bt,be,Y)=>{"use strict";function ie(f){return"object"==typeof f&&"id"in f&&"jsonrpc"in f&&"2.0"===f.jsonrpc}function q(f){return ie(f)&&"method"in f}function O(f){return ie(f)&&(E(f)||d(f))}function E(f){return"result"in f}function d(f){return"error"in f}Y.d(be,{DW:()=>q,u:()=>O,k4:()=>E,jg:()=>d})},57808:(bt,be,Y)=>{"use strict";Y.d(be,{Z:()=>w});var ie=Y(34553),q=Y(93105);var f=Y(22339);const l=S=>S.split("?")[0],u="undefined"!=typeof WebSocket?WebSocket:"undefined"!=typeof global&&void 0!==global.WebSocket?global.WebSocket:"undefined"!=typeof window&&void 0!==window.WebSocket?window.WebSocket:"undefined"!=typeof self&&void 0!==self.WebSocket?self.WebSocket:Y(98164),w=class{constructor(I){if(this.url=I,this.events=new q.EventEmitter,this.registering=!1,!(0,f.isWsUrl)(I))throw new Error(`Provided URL is not compatible with WebSocket connection: ${I}`);this.url=I}get connected(){return void 0!==this.socket}get connecting(){return this.registering}on(I,P){this.events.on(I,P)}once(I,P){this.events.once(I,P)}off(I,P){this.events.off(I,P)}removeListener(I,P){this.events.removeListener(I,P)}open(I=this.url){var P=this;return(0,ie.Z)(function*(){yield P.register(I)})()}close(){var I=this;return(0,ie.Z)(function*(){return new Promise((P,L)=>{void 0!==I.socket?(I.socket.onclose=V=>{I.onClose(V),P()},I.socket.close()):L(new Error("Connection already closed"))})})()}send(I,P){var L=this;return(0,ie.Z)(function*(){void 0===L.socket&&(L.socket=yield L.register());try{L.socket.send("string"==typeof(S=I)?S:(S=>JSON.stringify(S,(I,P)=>"bigint"==typeof P?P.toString()+"n":P))(S)||"")}catch(V){L.onError(I.id,V)}var S})()}register(I=this.url){if(!(0,f.isWsUrl)(I))throw new Error(`Provided URL is not compatible with WebSocket connection: ${I}`);if(this.registering){const P=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=P||this.events.listenerCount("open")>=P)&&this.events.setMaxListeners(P+1),new Promise((L,V)=>{this.events.once("register_error",W=>{this.resetMaxListeners(),V(W)}),this.events.once("open",()=>{if(this.resetMaxListeners(),void 0===this.socket)return V(new Error("WebSocket connection is missing or invalid"));L(this.socket)})})}return this.url=I,this.registering=!0,new Promise((P,L)=>{const V=(0,f.isReactNative)()?void 0:{rejectUnauthorized:!(0,f.isLocalhostUrl)(I)},W=new u(I,[],V);"undefined"!=typeof WebSocket||"undefined"!=typeof global&&void 0!==global.WebSocket||"undefined"!=typeof window&&void 0!==window.WebSocket||"undefined"!=typeof self&&void 0!==self.WebSocket?W.onerror=G=>{L(this.emitError(G.error))}:W.on("error",G=>{L(this.emitError(G))}),W.onopen=()=>{this.onOpen(W),P(W)}})}onOpen(I){I.onmessage=P=>this.onPayload(P),I.onclose=P=>this.onClose(P),this.socket=I,this.registering=!1,this.events.emit("open")}onClose(I){this.socket=void 0,this.registering=!1,this.events.emit("close",I)}onPayload(I){if(void 0===I.data)return;const P="string"==typeof I.data?function(S){if("string"!=typeof S)throw new Error("Cannot safe json parse value of type "+typeof S);try{return(S=>{const P=S.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(P,(L,V)=>"string"==typeof V&&V.match(/^\d+n$/)?BigInt(V.substring(0,V.length-1)):V)})(S)}catch{return S}}(I.data):I.data;this.events.emit("payload",P)}onError(I,P){const L=this.parseError(P),V=L.message||L.toString(),W=(0,f.formatJsonRpcError)(I,V);this.events.emit("payload",W)}parseError(I,P=this.url){return(0,f.CX)(I,l(P),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(I){const P=this.parseError(new Error((null==I?void 0:I.message)||`WebSocket connection failed for host: ${l(this.url)}`));return this.events.emit("register_error",P),P}}},98164:bt=>{"use strict";bt.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},3226:(bt,be,Y)=>{"use strict";const q=Y(57436),O=Y(28898),E=q.__importDefault(Y(87733)),d=Y(54653);be.ZP=class{constructor(){this.localStorage=E.default}getKeys(){return q.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return q.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(d.parseEntry)})}getItem(T){return q.__awaiter(this,void 0,void 0,function*(){const g=this.localStorage.getItem(T);if(null!==g)return O.safeJsonParse(g)})}setItem(T,g){return q.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(T,O.safeJsonStringify(g))})}removeItem(T){return q.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(T)})}}},87733:bt=>{"use strict";!function(){let be;function Y(){}be=Y,be.prototype.getItem=function(ie){return this.hasOwnProperty(ie)?String(this[ie]):null},be.prototype.setItem=function(ie,q){this[ie]=String(q)},be.prototype.removeItem=function(ie){delete this[ie]},be.prototype.clear=function(){const ie=this;Object.keys(ie).forEach(function(q){ie[q]=void 0,delete ie[q]})},be.prototype.key=function(ie){return ie=ie||0,Object.keys(this)[ie]},be.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),bt.exports="undefined"!=typeof global&&global.localStorage?global.localStorage:"undefined"!=typeof window&&window.localStorage?window.localStorage:new Y}()},54653:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(57436);ie.__exportStar(Y(87402),be),ie.__exportStar(Y(94164),be)},87402:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.IKeyValueStorage=void 0,be.IKeyValueStorage=class{}},94164:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.parseEntry=void 0;const ie=Y(28898);be.parseEntry=function(O){var E;return[O[0],ie.safeJsonParse(null!==(E=O[1])&&void 0!==E?E:"")]}},73671:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.PINO_CUSTOM_CONTEXT_KEY=be.PINO_LOGGER_DEFAULTS=void 0,be.PINO_LOGGER_DEFAULTS={level:"info"},be.PINO_CUSTOM_CONTEXT_KEY="custom_context"},66486:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.pino=void 0;const ie=Y(17978),q=ie.__importDefault(Y(22694));Object.defineProperty(be,"pino",{enumerable:!0,get:function(){return q.default}}),ie.__exportStar(Y(73671),be),ie.__exportStar(Y(70769),be)},70769:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.generateChildLogger=be.formatChildLoggerContext=be.getLoggerContext=be.setBrowserLoggerContext=be.getBrowserLoggerContext=be.getDefaultLoggerOptions=void 0;const ie=Y(73671);function O(T,g=ie.PINO_CUSTOM_CONTEXT_KEY){return T[g]||""}function E(T,g,b=ie.PINO_CUSTOM_CONTEXT_KEY){return T[b]=g,T}function d(T,g=ie.PINO_CUSTOM_CONTEXT_KEY){let b="";return b=void 0===T.bindings?O(T,g):T.bindings().context||"",b}function x(T,g,b=ie.PINO_CUSTOM_CONTEXT_KEY){const l=d(T,b);return l.trim()?`${l}/${g}`:g}be.getDefaultLoggerOptions=function(T){return Object.assign(Object.assign({},T),{level:(null==T?void 0:T.level)||ie.PINO_LOGGER_DEFAULTS.level})},be.getBrowserLoggerContext=O,be.setBrowserLoggerContext=E,be.getLoggerContext=d,be.formatChildLoggerContext=x,be.generateChildLogger=function(T,g,b=ie.PINO_CUSTOM_CONTEXT_KEY){const l=x(T,g,b);return E(T.child({context:l}),l,b)}},9964:(bt,be,Y)=>{"use strict";Y.d(be,{RELAY_JSONRPC:()=>q}),Y(45785);const q={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}}},45785:()=>{},62757:(bt,be,Y)=>{"use strict";Y.d(be,{encodeIss:()=>o,generateKeyPair:()=>a,signJWT:()=>B});var ie=Y(34553),q=Y(47903),O=Y(52632),E=Y(14611);const d="EdDSA",T="base64url",h="did",u="key",m="base58btc";var P=Y(15703),L=Y(88838),V=Y(47366);function R(we){return(0,L.B)((0,V.m)(function(we){return"string"==typeof we?we:(we=>JSON.stringify(we,(ae,Te)=>"bigint"==typeof Te?Te.toString()+"n":Te))(we)||""}(we),"utf8"),T)}function o(we){const ae=(0,V.m)("K36",m),Te="z"+(0,L.B)((0,P.z)([ae,we]),m);return[h,u,Te].join(":")}function M(we){return(0,L.B)(we,T)}function k(we){return(0,V.m)([R(we.header),R(we.payload)].join("."),"utf8")}function N(we){return[R(we.header),R(we.payload),M(we.signature)].join(".")}function a(we=(0,O.randomBytes)(32)){return q._w(we)}function B(we,ae,Te,le){return Q.apply(this,arguments)}function Q(){return(Q=(0,ie.Z)(function*(we,ae,Te,le,X=(0,E.fromMiliseconds)(Date.now())){const ne={alg:d,typ:"JWT"},xe={iss:o(le.publicKey),sub:we,aud:ae,iat:X,exp:X+Te},Ce=k({header:ne,payload:xe});return N({header:ne,payload:xe,signature:q.Xx(le.secretKey,Ce)})})).apply(this,arguments)}Y(58083)},58083:()=>{},78847:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(80017);ie.__exportStar(Y(77662),be),ie.__exportStar(Y(28456),be)},77662:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ONE_THOUSAND=be.ONE_HUNDRED=void 0,be.ONE_HUNDRED=100,be.ONE_THOUSAND=1e3},28456:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ONE_YEAR=be.FOUR_WEEKS=be.THREE_WEEKS=be.TWO_WEEKS=be.ONE_WEEK=be.THIRTY_DAYS=be.SEVEN_DAYS=be.FIVE_DAYS=be.THREE_DAYS=be.ONE_DAY=be.TWENTY_FOUR_HOURS=be.TWELVE_HOURS=be.SIX_HOURS=be.THREE_HOURS=be.ONE_HOUR=be.SIXTY_MINUTES=be.THIRTY_MINUTES=be.TEN_MINUTES=be.FIVE_MINUTES=be.ONE_MINUTE=be.SIXTY_SECONDS=be.THIRTY_SECONDS=be.TEN_SECONDS=be.FIVE_SECONDS=be.ONE_SECOND=void 0,be.ONE_SECOND=1,be.FIVE_SECONDS=5,be.TEN_SECONDS=10,be.THIRTY_SECONDS=30,be.SIXTY_SECONDS=60,be.ONE_MINUTE=be.SIXTY_SECONDS,be.FIVE_MINUTES=5*be.ONE_MINUTE,be.TEN_MINUTES=10*be.ONE_MINUTE,be.THIRTY_MINUTES=30*be.ONE_MINUTE,be.SIXTY_MINUTES=60*be.ONE_MINUTE,be.ONE_HOUR=be.SIXTY_MINUTES,be.THREE_HOURS=3*be.ONE_HOUR,be.SIX_HOURS=6*be.ONE_HOUR,be.TWELVE_HOURS=12*be.ONE_HOUR,be.TWENTY_FOUR_HOURS=24*be.ONE_HOUR,be.ONE_DAY=be.TWENTY_FOUR_HOURS,be.THREE_DAYS=3*be.ONE_DAY,be.FIVE_DAYS=5*be.ONE_DAY,be.SEVEN_DAYS=7*be.ONE_DAY,be.THIRTY_DAYS=30*be.ONE_DAY,be.ONE_WEEK=be.SEVEN_DAYS,be.TWO_WEEKS=2*be.ONE_WEEK,be.THREE_WEEKS=3*be.ONE_WEEK,be.FOUR_WEEKS=4*be.ONE_WEEK,be.ONE_YEAR=365*be.ONE_DAY},14611:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(80017);ie.__exportStar(Y(47344),be),ie.__exportStar(Y(1429),be),ie.__exportStar(Y(40214),be),ie.__exportStar(Y(78847),be)},40214:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),Y(80017).__exportStar(Y(47997),be)},47997:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.IWatch=void 0,be.IWatch=class{}},45442:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.fromMiliseconds=be.toMiliseconds=void 0;const ie=Y(78847);be.toMiliseconds=function(E){return E*ie.ONE_THOUSAND},be.fromMiliseconds=function(E){return Math.floor(E/ie.ONE_THOUSAND)}},67406:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.delay=void 0,be.delay=function(ie){return new Promise(q=>{setTimeout(()=>{q(!0)},ie)})}},47344:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});const ie=Y(80017);ie.__exportStar(Y(67406),be),ie.__exportStar(Y(45442),be)},1429:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Watch=void 0;class Y{constructor(){this.timestamps=new Map}start(q){if(this.timestamps.has(q))throw new Error(`Watch already started for label: ${q}`);this.timestamps.set(q,{started:Date.now()})}stop(q){const O=this.get(q);if(void 0!==O.elapsed)throw new Error(`Watch already stopped for label: ${q}`);const E=Date.now()-O.started;this.timestamps.set(q,{started:O.started,elapsed:E})}get(q){const O=this.timestamps.get(q);if(void 0===O)throw new Error(`No timestamp found for label: ${q}`);return O}elapsed(q){const O=this.get(q);return O.elapsed||Date.now()-O.started}}be.Watch=Y,be.default=Y},75274:(bt,be,Y)=>{"use strict";Y.d(be,{O$:()=>h,g$:()=>S});var ie=Y(16440),q=Y.n(ie),O=Y(57966),E=Y(87686),x=q().BN;const f=new E.Yd("bignumber/5.5.0"),T={},g=9007199254740991;let l=!1;class h{constructor(L,V){f.checkNew(new.target,h),L!==T&&f.throwError("cannot call constructor directly; use BigNumber.from",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=V,this._isBigNumber=!0,Object.freeze(this)}fromTwos(L){return m(_(this).fromTwos(L))}toTwos(L){return m(_(this).toTwos(L))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(L){return m(_(this).add(_(L)))}sub(L){return m(_(this).sub(_(L)))}div(L){return h.from(L).isZero()&&w("division by zero","div"),m(_(this).div(_(L)))}mul(L){return m(_(this).mul(_(L)))}mod(L){const V=_(L);return V.isNeg()&&w("cannot modulo negative values","mod"),m(_(this).umod(V))}pow(L){const V=_(L);return V.isNeg()&&w("cannot raise to negative values","pow"),m(_(this).pow(V))}and(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("cannot 'and' negative values","and"),m(_(this).and(V))}or(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("cannot 'or' negative values","or"),m(_(this).or(V))}xor(L){const V=_(L);return(this.isNegative()||V.isNeg())&&w("cannot 'xor' negative values","xor"),m(_(this).xor(V))}mask(L){return(this.isNegative()||L<0)&&w("cannot mask negative values","mask"),m(_(this).maskn(L))}shl(L){return(this.isNegative()||L<0)&&w("cannot shift negative values","shl"),m(_(this).shln(L))}shr(L){return(this.isNegative()||L<0)&&w("cannot shift negative values","shr"),m(_(this).shrn(L))}eq(L){return _(this).eq(_(L))}lt(L){return _(this).lt(_(L))}lte(L){return _(this).lte(_(L))}gt(L){return _(this).gt(_(L))}gte(L){return _(this).gte(_(L))}isNegative(){return"-"===this._hex[0]}isZero(){return _(this).isZero()}toNumber(){try{return _(this).toNumber()}catch{w("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return f.throwError("this platform does not support BigInt",E.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?l||(l=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):f.throwError(16===arguments[0]?"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()":"BigNumber.toString does not accept parameters",E.Yd.errors.UNEXPECTED_ARGUMENT,{})),_(this).toString(10)}toHexString(){return this._hex}toJSON(L){return{type:"BigNumber",hex:this.toHexString()}}static from(L){if(L instanceof h)return L;if("string"==typeof L)return L.match(/^-?0x[0-9a-f]+$/i)?new h(T,u(L)):L.match(/^-?[0-9]+$/)?new h(T,u(new x(L))):f.throwArgumentError("invalid BigNumber string","value",L);if("number"==typeof L)return L%1&&w("underflow","BigNumber.from",L),(L>=g||L<=-g)&&w("overflow","BigNumber.from",L),h.from(String(L));const V=L;if("bigint"==typeof V)return h.from(V.toString());if((0,O._t)(V))return h.from((0,O.Dv)(V));if(V)if(V.toHexString){const W=V.toHexString();if("string"==typeof W)return h.from(W)}else{let W=V._hex;if(null==W&&"BigNumber"===V.type&&(W=V.hex),"string"==typeof W&&((0,O.A7)(W)||"-"===W[0]&&(0,O.A7)(W.substring(1))))return h.from(W)}return f.throwArgumentError("invalid BigNumber value","value",L)}static isBigNumber(L){return!(!L||!L._isBigNumber)}}function u(P){if("string"!=typeof P)return u(P.toString(16));if("-"===P[0])return"-"===(P=P.substring(1))[0]&&f.throwArgumentError("invalid hex","value",P),"0x00"===(P=u(P))?P:"-"+P;if("0x"!==P.substring(0,2)&&(P="0x"+P),"0x"===P)return"0x00";for(P.length%2&&(P="0x0"+P.substring(2));P.length>4&&"0x00"===P.substring(0,4);)P="0x"+P.substring(4);return P}function m(P){return h.from(u(P))}function _(P){const L=h.from(P).toHexString();return new x("-"===L[0]?"-"+L.substring(3):L.substring(2),16)}function w(P,L,V){const W={fault:P,operation:L};return null!=V&&(W.value=V),f.throwError(P,E.Yd.errors.NUMERIC_FAULT,W)}function S(P){return new x(P,36).toString(16)}},57966:(bt,be,Y)=>{"use strict";Y.d(be,{lE:()=>g,zo:()=>b,xs:()=>I,E1:()=>w,p3:()=>S,$P:()=>P,$m:()=>V,Dv:()=>_,_t:()=>T,Zq:()=>x,A7:()=>u,N:()=>W,G1:()=>l});const O=new(Y(87686).Yd)("bytes/5.5.0");function E(H){return!!H.toHexString}function d(H){return H.slice||(H.slice=function(){const j=Array.prototype.slice.call(arguments);return d(new Uint8Array(Array.prototype.slice.apply(H,j)))}),H}function x(H){return u(H)&&!(H.length%2)||T(H)}function f(H){return"number"==typeof H&&H==H&&H%1==0}function T(H){if(null==H)return!1;if(H.constructor===Uint8Array)return!0;if("string"==typeof H||!f(H.length)||H.length<0)return!1;for(let j=0;j=256)return!1}return!0}function g(H,j){if(j||(j={}),"number"==typeof H){O.checkSafeUint53(H,"invalid arrayify value");const K=[];for(;H;)K.unshift(255&H),H=parseInt(String(H/256));return 0===K.length&&K.push(0),d(new Uint8Array(K))}if(j.allowMissingPrefix&&"string"==typeof H&&"0x"!==H.substring(0,2)&&(H="0x"+H),E(H)&&(H=H.toHexString()),u(H)){let K=H.substring(2);K.length%2&&("left"===j.hexPad?K="0x0"+K.substring(2):"right"===j.hexPad?K+="0":O.throwArgumentError("hex data is odd-length","value",H));const R=[];for(let o=0;og(o)),K=j.reduce((o,y)=>o+y.length,0),R=new Uint8Array(K);return j.reduce((o,y)=>(R.set(y,o),o+y.length),0),d(R)}function l(H){let j=g(H);if(0===j.length)return j;let K=0;for(;K>4]+m[15&o]}return K}return O.throwArgumentError("invalid hexlify value","value",H)}function w(H){if("string"!=typeof H)H=_(H);else if(!u(H)||H.length%2)return null;return(H.length-2)/2}function S(H,j,K){return"string"!=typeof H?H=_(H):(!u(H)||H.length%2)&&O.throwArgumentError("invalid hexData","value",H),j=2+2*j,null!=K?"0x"+H.substring(j,2+2*K):"0x"+H.substring(j)}function I(H){let j="0x";return H.forEach(K=>{j+=_(K).substring(2)}),j}function P(H){const j=function(H){"string"!=typeof H&&(H=_(H)),u(H)||O.throwArgumentError("invalid hex string","value",H),H=H.substring(2);let j=0;for(;j2*j+2&&O.throwArgumentError("value out of range","value",arguments[1]);H.length<2*j+2;)H="0x0"+H.substring(2);return H}function W(H){const j={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(x(H)){const K=g(H);65!==K.length&&O.throwArgumentError("invalid signature string; must be 65 bytes","signature",H),j.r=_(K.slice(0,32)),j.s=_(K.slice(32,64)),j.v=K[64],j.v<27&&(0===j.v||1===j.v?j.v+=27:O.throwArgumentError("signature invalid v byte","signature",H)),j.recoveryParam=1-j.v%2,j.recoveryParam&&(K[32]|=128),j._vs=_(K.slice(32,64))}else{if(j.r=H.r,j.s=H.s,j.v=H.v,j.recoveryParam=H.recoveryParam,j._vs=H._vs,null!=j._vs){const o=function(H,j){(H=g(H)).length>j&&O.throwArgumentError("value out of range","value",arguments[0]);const K=new Uint8Array(j);return K.set(H,j-H.length),d(K)}(g(j._vs),32);j._vs=_(o);const y=o[0]>=128?1:0;null==j.recoveryParam?j.recoveryParam=y:j.recoveryParam!==y&&O.throwArgumentError("signature recoveryParam mismatch _vs","signature",H),o[0]&=127;const M=_(o);null==j.s?j.s=M:j.s!==M&&O.throwArgumentError("signature v mismatch _vs","signature",H)}null==j.recoveryParam?null==j.v?O.throwArgumentError("signature missing v and recoveryParam","signature",H):j.recoveryParam=0===j.v||1===j.v?j.v:1-j.v%2:null==j.v?j.v=27+j.recoveryParam:j.recoveryParam!==(0===j.v||1===j.v?j.v:1-j.v%2)&&O.throwArgumentError("signature recoveryParam mismatch v","signature",H),null!=j.r&&u(j.r)?j.r=V(j.r,32):O.throwArgumentError("signature missing or invalid r","signature",H),null!=j.s&&u(j.s)?j.s=V(j.s,32):O.throwArgumentError("signature missing or invalid s","signature",H);const K=g(j.s);K[0]>=128&&O.throwArgumentError("signature s out of range","signature",H),j.recoveryParam&&(K[0]|=128);const R=_(K);j._vs&&(u(j._vs)||O.throwArgumentError("signature invalid _vs","signature",H),j._vs=V(j._vs,32)),null==j._vs?j._vs=R:j._vs!==R&&O.throwArgumentError("signature _vs mismatch v and s","signature",H)}return j}},87686:(bt,be,Y)=>{"use strict";Y.d(be,{Yd:()=>h});let q=!1,O=!1;const E={debug:1,default:2,info:2,warning:3,error:4,off:5};let d=E.default,x=null;const T=function(){try{const u=[];if(["NFD","NFC","NFKD","NFKC"].forEach(m=>{try{if("test"!=="test".normalize(m))throw new Error("bad normalize")}catch{u.push(m)}}),u.length)throw new Error("missing "+u.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(u){return u.message}return null}();var g=(()=>{return(u=g||(g={})).DEBUG="DEBUG",u.INFO="INFO",u.WARNING="WARNING",u.ERROR="ERROR",u.OFF="OFF",g;var u})(),b=(()=>{return(u=b||(b={})).UNKNOWN_ERROR="UNKNOWN_ERROR",u.NOT_IMPLEMENTED="NOT_IMPLEMENTED",u.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",u.NETWORK_ERROR="NETWORK_ERROR",u.SERVER_ERROR="SERVER_ERROR",u.TIMEOUT="TIMEOUT",u.BUFFER_OVERRUN="BUFFER_OVERRUN",u.NUMERIC_FAULT="NUMERIC_FAULT",u.MISSING_NEW="MISSING_NEW",u.INVALID_ARGUMENT="INVALID_ARGUMENT",u.MISSING_ARGUMENT="MISSING_ARGUMENT",u.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",u.CALL_EXCEPTION="CALL_EXCEPTION",u.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",u.NONCE_EXPIRED="NONCE_EXPIRED",u.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",u.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",u.TRANSACTION_REPLACED="TRANSACTION_REPLACED",b;var u})();const l="0123456789abcdef";let h=(()=>{class u{constructor(_){Object.defineProperty(this,"version",{enumerable:!0,value:_,writable:!1})}_log(_,w){const S=_.toLowerCase();null==E[S]&&this.throwArgumentError("invalid log level name","logLevel",_),!(d>E[S])&&console.log.apply(console,w)}debug(..._){this._log(u.levels.DEBUG,_)}info(..._){this._log(u.levels.INFO,_)}warn(..._){this._log(u.levels.WARNING,_)}makeError(_,w,S){if(O)return this.makeError("censored error",w,{});w||(w=u.errors.UNKNOWN_ERROR),S||(S={});const I=[];Object.keys(S).forEach(V=>{const W=S[V];try{if(W instanceof Uint8Array){let G="";for(let H=0;H>4],G+=l[15&W[H]];I.push(V+"=Uint8Array(0x"+G+")")}else I.push(V+"="+JSON.stringify(W))}catch{I.push(V+"="+JSON.stringify(S[V].toString()))}}),I.push(`code=${w}`),I.push(`version=${this.version}`);const P=_;I.length&&(_+=" ("+I.join(", ")+")");const L=new Error(_);return L.reason=P,L.code=w,Object.keys(S).forEach(function(V){L[V]=S[V]}),L}throwError(_,w,S){throw this.makeError(_,w,S)}throwArgumentError(_,w,S){return this.throwError(_,u.errors.INVALID_ARGUMENT,{argument:w,value:S})}assert(_,w,S,I){_||this.throwError(w,S,I)}assertArgument(_,w,S,I){_||this.throwArgumentError(w,S,I)}checkNormalize(_){null==_&&(_="platform missing String.prototype.normalize"),T&&this.throwError("platform missing String.prototype.normalize",u.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:T})}checkSafeUint53(_,w){"number"==typeof _&&(null==w&&(w="value not safe"),(_<0||_>=9007199254740991)&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:_}),_%1&&this.throwError(w,u.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:_}))}checkArgumentCount(_,w,S){S=S?": "+S:"",_w&&this.throwError("too many arguments"+S,u.errors.UNEXPECTED_ARGUMENT,{count:_,expectedCount:w})}checkNew(_,w){(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}checkAbstract(_,w){_===w?this.throwError("cannot instantiate abstract class "+JSON.stringify(w.name)+" directly; use a sub-class",u.errors.UNSUPPORTED_OPERATION,{name:_.name,operation:"new"}):(_===Object||null==_)&&this.throwError("missing new",u.errors.MISSING_NEW,{name:w.name})}static globalLogger(){return x||(x=new u("logger/5.5.0")),x}static setCensorship(_,w){if(!_&&w&&this.globalLogger().throwError("cannot permanently disable censorship",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),q){if(!_)return;this.globalLogger().throwError("error censorship permanent",u.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}O=!!_,q=!!w}static setLogLevel(_){const w=E[_.toLowerCase()];null!=w?d=w:u.globalLogger().warn("invalid log level - "+_)}static from(_){return new u(_)}}return u.errors=b,u.levels=g,u})()},16440:function(bt,be,Y){!function(ie,q){"use strict";function O(R,o){if(!R)throw new Error(o||"Assertion failed")}function E(R,o){R.super_=o;var y=function(){};y.prototype=o.prototype,R.prototype=new y,R.prototype.constructor=R}function d(R,o,y){if(d.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,null!==R&&(("le"===o||"be"===o)&&(y=o,o=10),this._init(R||0,o||10,y||"be"))}var x;"object"==typeof ie?ie.exports=d:q.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(5612).Buffer}catch{}function f(R,o){var y=R.charCodeAt(o);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Jr=0|k[3],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|k[4],zn=8191&Wr,bn=Wr>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,zn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,zn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,zn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,zn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,zn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,zn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,zn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,zn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,zn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,zn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,zn),a=(a=Math.imul(St,bn))+Math.imul(Wt,zn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},94654:(bt,be,Y)=>{"use strict";Y.d(be,{X:()=>q});var ie=Y(6704);class q extends ie.x{constructor(E){super(),this._value=E}get value(){return this.getValue()}_subscribe(E){const d=super._subscribe(E);return!d.closed&&E.next(this._value),d}getValue(){const{hasError:E,thrownError:d,_value:x}=this;if(E)throw d;return this._throwIfClosed(),x}next(E){super.next(this._value=E)}}},96837:(bt,be,Y)=>{"use strict";Y.d(be,{y:()=>b});var ie=Y(70598),q=Y(72095),O=Y(41385),E=Y(62594);var f=Y(78951),T=Y(23854),g=Y(72752);let b=(()=>{class m{constructor(w){w&&(this._subscribe=w)}lift(w){const S=new m;return S.source=this,S.operator=w,S}subscribe(w,S,I){const P=function(m){return m&&m instanceof ie.Lv||function(m){return m&&(0,T.m)(m.next)&&(0,T.m)(m.error)&&(0,T.m)(m.complete)}(m)&&(0,q.Nn)(m)}(w)?w:new ie.Hp(w,S,I);return(0,g.x)(()=>{const{operator:L,source:V}=this;P.add(L?L.call(P,V):V?this._subscribe(P):this._trySubscribe(P))}),P}_trySubscribe(w){try{return this._subscribe(w)}catch(S){w.error(S)}}forEach(w,S){return new(S=l(S))((I,P)=>{const L=new ie.Hp({next:V=>{try{w(V)}catch(W){P(W),L.unsubscribe()}},error:P,complete:I});this.subscribe(L)})}_subscribe(w){var S;return null===(S=this.source)||void 0===S?void 0:S.subscribe(w)}[O.L](){return this}pipe(...w){return function(m){return 0===m.length?E.y:1===m.length?m[0]:function(w){return m.reduce((S,I)=>I(S),w)}}(w)(this)}toPromise(w){return new(w=l(w))((S,I)=>{let P;this.subscribe(L=>P=L,L=>I(L),()=>S(P))})}}return m.create=_=>new m(_),m})();function l(m){var _;return null!==(_=m??f.v.Promise)&&void 0!==_?_:Promise}},6704:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>f});var ie=Y(96837),q=Y(72095);const E=(0,Y(79526).d)(g=>function(){g(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var d=Y(36821),x=Y(72752);let f=(()=>{class g extends ie.y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(l){const h=new T(this,this);return h.operator=l,h}_throwIfClosed(){if(this.closed)throw new E}next(l){(0,x.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const h of this.currentObservers)h.next(l)}})}error(l){(0,x.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=l;const{observers:h}=this;for(;h.length;)h.shift().error(l)}})}complete(){(0,x.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:l}=this;for(;l.length;)l.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var l;return(null===(l=this.observers)||void 0===l?void 0:l.length)>0}_trySubscribe(l){return this._throwIfClosed(),super._trySubscribe(l)}_subscribe(l){return this._throwIfClosed(),this._checkFinalizedStatuses(l),this._innerSubscribe(l)}_innerSubscribe(l){const{hasError:h,isStopped:u,observers:m}=this;return h||u?q.Lc:(this.currentObservers=null,m.push(l),new q.w0(()=>{this.currentObservers=null,(0,d.P)(m,l)}))}_checkFinalizedStatuses(l){const{hasError:h,thrownError:u,isStopped:m}=this;h?l.error(u):m&&l.complete()}asObservable(){const l=new ie.y;return l.source=this,l}}return g.create=(b,l)=>new T(b,l),g})();class T extends f{constructor(b,l){super(),this.destination=b,this.source=l}next(b){var l,h;null===(h=null===(l=this.destination)||void 0===l?void 0:l.next)||void 0===h||h.call(l,b)}error(b){var l,h;null===(h=null===(l=this.destination)||void 0===l?void 0:l.error)||void 0===h||h.call(l,b)}complete(){var b,l;null===(l=null===(b=this.destination)||void 0===b?void 0:b.complete)||void 0===l||l.call(b)}_subscribe(b){var l,h;return null!==(h=null===(l=this.source)||void 0===l?void 0:l.subscribe(b))&&void 0!==h?h:q.Lc}}},70598:(bt,be,Y)=>{"use strict";Y.d(be,{Hp:()=>w,Lv:()=>h});var ie=Y(23854),q=Y(72095),O=Y(78951),E=Y(77833),d=Y(72556);const x=g("C",void 0,void 0);function g(V,W,G){return{kind:V,value:W,error:G}}var b=Y(35888),l=Y(72752);class h extends q.w0{constructor(W){super(),this.isStopped=!1,W?(this.destination=W,(0,q.Nn)(W)&&W.add(this)):this.destination=L}static create(W,G,H){return new w(W,G,H)}next(W){this.isStopped?P(g("N",W,void 0),this):this._next(W)}error(W){this.isStopped?P(g("E",void 0,W),this):(this.isStopped=!0,this._error(W))}complete(){this.isStopped?P(x,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(W){this.destination.next(W)}_error(W){try{this.destination.error(W)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const u=Function.prototype.bind;function m(V,W){return u.call(V,W)}class _{constructor(W){this.partialObserver=W}next(W){const{partialObserver:G}=this;if(G.next)try{G.next(W)}catch(H){S(H)}}error(W){const{partialObserver:G}=this;if(G.error)try{G.error(W)}catch(H){S(H)}else S(W)}complete(){const{partialObserver:W}=this;if(W.complete)try{W.complete()}catch(G){S(G)}}}class w extends h{constructor(W,G,H){let j;if(super(),(0,ie.m)(W)||!W)j={next:W??void 0,error:G??void 0,complete:H??void 0};else{let K;this&&O.v.useDeprecatedNextContext?(K=Object.create(W),K.unsubscribe=()=>this.unsubscribe(),j={next:W.next&&m(W.next,K),error:W.error&&m(W.error,K),complete:W.complete&&m(W.complete,K)}):j=W}this.destination=new _(j)}}function S(V){O.v.useDeprecatedSynchronousErrorHandling?(0,l.O)(V):(0,E.h)(V)}function P(V,W){const{onStoppedNotification:G}=O.v;G&&b.z.setTimeout(()=>G(V,W))}const L={closed:!0,next:d.Z,error:function(V){throw V},complete:d.Z}},72095:(bt,be,Y)=>{"use strict";Y.d(be,{Lc:()=>x,w0:()=>d,Nn:()=>f});var ie=Y(23854);const O=(0,Y(79526).d)(g=>function(l){g(this),this.message=l?`${l.length} errors occurred during unsubscription:\n${l.map((h,u)=>`${u+1}) ${h.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=l});var E=Y(36821);class d{constructor(b){this.initialTeardown=b,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let b;if(!this.closed){this.closed=!0;const{_parentage:l}=this;if(l)if(this._parentage=null,Array.isArray(l))for(const m of l)m.remove(this);else l.remove(this);const{initialTeardown:h}=this;if((0,ie.m)(h))try{h()}catch(m){b=m instanceof O?m.errors:[m]}const{_finalizers:u}=this;if(u){this._finalizers=null;for(const m of u)try{T(m)}catch(_){b=b??[],_ instanceof O?b=[...b,..._.errors]:b.push(_)}}if(b)throw new O(b)}}add(b){var l;if(b&&b!==this)if(this.closed)T(b);else{if(b instanceof d){if(b.closed||b._hasParent(this))return;b._addParent(this)}(this._finalizers=null!==(l=this._finalizers)&&void 0!==l?l:[]).push(b)}}_hasParent(b){const{_parentage:l}=this;return l===b||Array.isArray(l)&&l.includes(b)}_addParent(b){const{_parentage:l}=this;this._parentage=Array.isArray(l)?(l.push(b),l):l?[l,b]:b}_removeParent(b){const{_parentage:l}=this;l===b?this._parentage=null:Array.isArray(l)&&(0,E.P)(l,b)}remove(b){const{_finalizers:l}=this;l&&(0,E.P)(l,b),b instanceof d&&b._removeParent(this)}}d.EMPTY=(()=>{const g=new d;return g.closed=!0,g})();const x=d.EMPTY;function f(g){return g instanceof d||g&&"closed"in g&&(0,ie.m)(g.remove)&&(0,ie.m)(g.add)&&(0,ie.m)(g.unsubscribe)}function T(g){(0,ie.m)(g)?g():g.unsubscribe()}},78951:(bt,be,Y)=>{"use strict";Y.d(be,{v:()=>ie});const ie={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},67379:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>q});const q=new(Y(96837).y)(d=>d.complete())},19475:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>H});var ie=Y(44298),q=Y(14926),O=Y(51665),E=Y(74661);function d(j,K=0){return(0,O.e)((R,o)=>{R.subscribe((0,E.x)(o,y=>(0,q.f)(o,j,()=>o.next(y),K),()=>(0,q.f)(o,j,()=>o.complete(),K),y=>(0,q.f)(o,j,()=>o.error(y),K)))})}function x(j,K=0){return(0,O.e)((R,o)=>{o.add(j.schedule(()=>R.subscribe(o),K))})}var g=Y(96837),l=Y(82902),h=Y(23854);function m(j,K){if(!j)throw new Error("Iterable cannot be null");return new g.y(R=>{(0,q.f)(R,K,()=>{const o=j[Symbol.asyncIterator]();(0,q.f)(R,K,()=>{o.next().then(y=>{y.done?R.complete():R.next(y.value)})},0,!0)})})}var _=Y(92119),w=Y(54529),S=Y(27251),I=Y(49054),P=Y(98045),L=Y(56689),V=Y(51080);function H(j,K){return K?function(j,K){if(null!=j){if((0,_.c)(j))return function(j,K){return(0,ie.Xf)(j).pipe(x(K),d(K))}(j,K);if((0,S.z)(j))return function(j,K){return new g.y(R=>{let o=0;return K.schedule(function(){o===j.length?R.complete():(R.next(j[o++]),R.closed||this.schedule())})})}(j,K);if((0,w.t)(j))return function(j,K){return(0,ie.Xf)(j).pipe(x(K),d(K))}(j,K);if((0,P.D)(j))return m(j,K);if((0,I.T)(j))return function(j,K){return new g.y(R=>{let o;return(0,q.f)(R,K,()=>{o=j[l.h](),(0,q.f)(R,K,()=>{let y,M;try{({value:y,done:M}=o.next())}catch(v){return void R.error(v)}M?R.complete():R.next(y)},0,!0)}),()=>(0,h.m)(null==o?void 0:o.return)&&o.return()})}(j,K);if((0,V.L)(j))return function(j,K){return m((0,V.Q)(j),K)}(j,K)}throw(0,L.z)(j)}(j,K):(0,ie.Xf)(j)}},44298:(bt,be,Y)=>{"use strict";Y.d(be,{Xf:()=>u});var ie=Y(97582),q=Y(27251),O=Y(54529),E=Y(96837),d=Y(92119),x=Y(98045),f=Y(56689),T=Y(49054),g=Y(51080),b=Y(23854),l=Y(77833),h=Y(41385);function u(V){if(V instanceof E.y)return V;if(null!=V){if((0,d.c)(V))return function(V){return new E.y(W=>{const G=V[h.L]();if((0,b.m)(G.subscribe))return G.subscribe(W);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(V);if((0,q.z)(V))return function(V){return new E.y(W=>{for(let G=0;G{V.then(G=>{W.closed||(W.next(G),W.complete())},G=>W.error(G)).then(null,l.h)})}(V);if((0,x.D)(V))return I(V);if((0,T.T)(V))return function(V){return new E.y(W=>{for(const G of V)if(W.next(G),W.closed)return;W.complete()})}(V);if((0,g.L)(V))return function(V){return I((0,g.Q)(V))}(V)}throw(0,f.z)(V)}function I(V){return new E.y(W=>{(function(V,W){var G,H,j,K;return(0,ie.__awaiter)(this,void 0,void 0,function*(){try{for(G=(0,ie.__asyncValues)(V);!(H=yield G.next()).done;)if(W.next(H.value),W.closed)return}catch(R){j={error:R}}finally{try{H&&!H.done&&(K=G.return)&&(yield K.call(G))}finally{if(j)throw j.error}}W.complete()})})(V,W).catch(G=>W.error(G))})}},74661:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>q});var ie=Y(70598);function q(E,d,x,f,T){return new O(E,d,x,f,T)}class O extends ie.Lv{constructor(d,x,f,T,g,b){super(d),this.onFinalize=g,this.shouldUnsubscribe=b,this._next=x?function(l){try{x(l)}catch(h){d.error(h)}}:super._next,this._error=T?function(l){try{T(l)}catch(h){d.error(h)}finally{this.unsubscribe()}}:super._error,this._complete=f?function(){try{f()}catch(l){d.error(l)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var d;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:x}=this;super.unsubscribe(),!x&&(null===(d=this.onFinalize)||void 0===d||d.call(this))}}}},83005:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>E});var ie=Y(62594),q=Y(51665),O=Y(74661);function E(x,f=ie.y){return x=x??d,(0,q.e)((T,g)=>{let b,l=!0;T.subscribe((0,O.x)(g,h=>{const u=f(h);(l||!x(b,u))&&(l=!1,b=u,g.next(h))}))})}function d(x,f){return x===f}},80909:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>O});var ie=Y(51665),q=Y(74661);function O(E,d){return(0,ie.e)((x,f)=>{let T=0;x.subscribe((0,q.x)(f,g=>E.call(d,g,T++)&&f.next(g)))})}},81163:(bt,be,Y)=>{"use strict";Y.d(be,{U:()=>O});var ie=Y(51665),q=Y(74661);function O(E,d){return(0,ie.e)((x,f)=>{let T=0;x.subscribe((0,q.x)(f,g=>{f.next(E.call(d,g,T++))}))})}},74204:(bt,be,Y)=>{"use strict";Y.d(be,{J:()=>O});var ie=Y(260),q=Y(62594);function O(E=1/0){return(0,ie.z)(q.y,E)}},260:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>T});var ie=Y(81163),q=Y(44298),O=Y(51665),d=(Y(14926),Y(74661)),f=Y(23854);function T(g,b,l=1/0){return(0,f.m)(b)?T((h,u)=>(0,ie.U)((m,_)=>b(h,m,u,_))((0,q.Xf)(g(h,u))),l):("number"==typeof b&&(l=b),(0,O.e)((h,u)=>function(g,b,l,h,u,m,_,w){const S=[];let I=0,P=0,L=!1;const V=()=>{L&&!S.length&&!I&&b.complete()},W=H=>I{I++;let j=!1;(0,q.Xf)(l(H,P++)).subscribe((0,d.x)(b,K=>{b.next(K)},()=>{j=!0},void 0,()=>{if(j)try{for(I--;S.length&&I{L=!0,V()})),()=>{}}(h,u,g,l)))}},45898:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>d});var ie=Y(44298),q=Y(6704),O=Y(70598),E=Y(51665);function d(f={}){const{connector:T=(()=>new q.x),resetOnError:g=!0,resetOnComplete:b=!0,resetOnRefCountZero:l=!0}=f;return h=>{let u,m,_,w=0,S=!1,I=!1;const P=()=>{null==m||m.unsubscribe(),m=void 0},L=()=>{P(),u=_=void 0,S=I=!1},V=()=>{const W=u;L(),null==W||W.unsubscribe()};return(0,E.e)((W,G)=>{w++,!I&&!S&&P();const H=_=_??T();G.add(()=>{w--,0===w&&!I&&!S&&(m=x(V,l))}),H.subscribe(G),!u&&w>0&&(u=new O.Hp({next:j=>H.next(j),error:j=>{I=!0,P(),m=x(L,g,j),H.error(j)},complete:()=>{S=!0,P(),m=x(L,b),H.complete()}}),(0,ie.Xf)(W).subscribe(u))})(h)}}function x(f,T,...g){if(!0===T)return void f();if(!1===T)return;const b=new O.Hp({next:()=>{b.unsubscribe(),f()}});return(0,ie.Xf)(T(...g)).subscribe(b)}},5677:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>d});var ie=Y(6704),q=Y(50150);class O extends ie.x{constructor(f=1/0,T=1/0,g=q.l){super(),this._bufferSize=f,this._windowTime=T,this._timestampProvider=g,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=T===1/0,this._bufferSize=Math.max(1,f),this._windowTime=Math.max(1,T)}next(f){const{isStopped:T,_buffer:g,_infiniteTimeWindow:b,_timestampProvider:l,_windowTime:h}=this;T||(g.push(f),!b&&g.push(l.now()+h)),this._trimBuffer(),super.next(f)}_subscribe(f){this._throwIfClosed(),this._trimBuffer();const T=this._innerSubscribe(f),{_infiniteTimeWindow:g,_buffer:b}=this,l=b.slice();for(let h=0;hnew O(g,f,T),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:b})}},36645:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>f});var ie=Y(74204),O=Y(66279),E=Y(19475);function d(...T){return(0,ie.J)(1)((0,E.D)(T,(0,O.yG)(T)))}var x=Y(51665);function f(...T){const g=(0,O.yG)(T);return(0,x.e)((b,l)=>{(g?d(T,b,g):d(T,b)).subscribe(l)})}},50150:(bt,be,Y)=>{"use strict";Y.d(be,{l:()=>ie});const ie={now:()=>(ie.delegate||Date).now(),delegate:void 0}},35888:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>ie});const ie={setTimeout(q,O,...E){const{delegate:d}=ie;return(null==d?void 0:d.setTimeout)?d.setTimeout(q,O,...E):setTimeout(q,O,...E)},clearTimeout(q){const{delegate:O}=ie;return((null==O?void 0:O.clearTimeout)||clearTimeout)(q)},delegate:void 0}},82902:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>q});const q="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},41385:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>ie});const ie="function"==typeof Symbol&&Symbol.observable||"@@observable"},66279:(bt,be,Y)=>{"use strict";Y.d(be,{_6:()=>x,jO:()=>E,yG:()=>d});var ie=Y(23854);function O(f){return f[f.length-1]}function E(f){return(0,ie.m)(O(f))?f.pop():void 0}function d(f){return function(f){return f&&(0,ie.m)(f.schedule)}(O(f))?f.pop():void 0}function x(f,T){return"number"==typeof O(f)?f.pop():T}},36821:(bt,be,Y)=>{"use strict";function ie(q,O){if(q){const E=q.indexOf(O);0<=E&&q.splice(E,1)}}Y.d(be,{P:()=>ie})},79526:(bt,be,Y)=>{"use strict";function ie(q){const E=q(d=>{Error.call(d),d.stack=(new Error).stack});return E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,E}Y.d(be,{d:()=>ie})},72752:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>O,O:()=>E});var ie=Y(78951);let q=null;function O(d){if(ie.v.useDeprecatedSynchronousErrorHandling){const x=!q;if(x&&(q={errorThrown:!1,error:null}),d(),x){const{errorThrown:f,error:T}=q;if(q=null,f)throw T}}else d()}function E(d){ie.v.useDeprecatedSynchronousErrorHandling&&q&&(q.errorThrown=!0,q.error=d)}},14926:(bt,be,Y)=>{"use strict";function ie(q,O,E,d=0,x=!1){const f=O.schedule(function(){E(),x?q.add(this.schedule(null,d)):this.unsubscribe()},d);if(q.add(f),!x)return f}Y.d(be,{f:()=>ie})},62594:(bt,be,Y)=>{"use strict";function ie(q){return q}Y.d(be,{y:()=>ie})},27251:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>ie});const ie=q=>q&&"number"==typeof q.length&&"function"!=typeof q},98045:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>q});var ie=Y(23854);function q(O){return Symbol.asyncIterator&&(0,ie.m)(null==O?void 0:O[Symbol.asyncIterator])}},23854:(bt,be,Y)=>{"use strict";function ie(q){return"function"==typeof q}Y.d(be,{m:()=>ie})},92119:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>O});var ie=Y(41385),q=Y(23854);function O(E){return(0,q.m)(E[ie.L])}},49054:(bt,be,Y)=>{"use strict";Y.d(be,{T:()=>O});var ie=Y(82902),q=Y(23854);function O(E){return(0,q.m)(null==E?void 0:E[ie.h])}},54529:(bt,be,Y)=>{"use strict";Y.d(be,{t:()=>q});var ie=Y(23854);function q(O){return(0,ie.m)(null==O?void 0:O.then)}},51080:(bt,be,Y)=>{"use strict";Y.d(be,{Q:()=>O,L:()=>E});var ie=Y(97582),q=Y(23854);function O(d){return(0,ie.__asyncGenerator)(this,arguments,function*(){const f=d.getReader();try{for(;;){const{value:T,done:g}=yield(0,ie.__await)(f.read());if(g)return yield(0,ie.__await)(void 0);yield yield(0,ie.__await)(T)}}finally{f.releaseLock()}})}function E(d){return(0,q.m)(null==d?void 0:d.getReader)}},51665:(bt,be,Y)=>{"use strict";Y.d(be,{e:()=>O});var ie=Y(23854);function O(E){return d=>{if(function(E){return(0,ie.m)(null==E?void 0:E.lift)}(d))return d.lift(function(x){try{return E(x,this)}catch(f){this.error(f)}});throw new TypeError("Unable to lift unknown Observable type")}}},72556:(bt,be,Y)=>{"use strict";function ie(){}Y.d(be,{Z:()=>ie})},77833:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>O});var ie=Y(78951),q=Y(35888);function O(E){q.z.setTimeout(()=>{const{onUnhandledError:d}=ie.v;if(!d)throw E;d(E)})}},56689:(bt,be,Y)=>{"use strict";function ie(q){return new TypeError(`You provided ${null!==q&&"object"==typeof q?"an invalid object":`'${q}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}Y.d(be,{z:()=>ie})},69337:(bt,be,Y)=>{"use strict";const ie=Y(96434),q=Y(12658),O="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;be.Buffer=f,be.SlowBuffer=function(st){return+st!=st&&(st=0),f.alloc(+st)},be.INSPECT_MAX_BYTES=50;const E=2147483647;function x(st){if(st>E)throw new RangeError('The value "'+st+'" is invalid for option "size"');const Ye=new Uint8Array(st);return Object.setPrototypeOf(Ye,f.prototype),Ye}function f(st,Ye,gt){if("number"==typeof st){if("string"==typeof Ye)throw new TypeError('The "string" argument must be of type string. Received type number');return l(st)}return T(st,Ye,gt)}function T(st,Ye,gt){if("string"==typeof st)return function(st,Ye){if(("string"!=typeof Ye||""===Ye)&&(Ye="utf8"),!f.isEncoding(Ye))throw new TypeError("Unknown encoding: "+Ye);const gt=0|P(st,Ye);let St=x(gt);const Wt=St.write(st,Ye);return Wt!==gt&&(St=St.slice(0,Wt)),St}(st,Ye);if(ArrayBuffer.isView(st))return function(st){if(tt(st,Uint8Array)){const Ye=new Uint8Array(st);return _(Ye.buffer,Ye.byteOffset,Ye.byteLength)}return u(st)}(st);if(null==st)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof st);if(tt(st,ArrayBuffer)||st&&tt(st.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(tt(st,SharedArrayBuffer)||st&&tt(st.buffer,SharedArrayBuffer)))return _(st,Ye,gt);if("number"==typeof st)throw new TypeError('The "value" argument must not be of type number. Received type number');const St=st.valueOf&&st.valueOf();if(null!=St&&St!==st)return f.from(St,Ye,gt);const Wt=function(st){if(f.isBuffer(st)){const Ye=0|S(st.length),gt=x(Ye);return 0===gt.length||st.copy(gt,0,0,Ye),gt}return void 0!==st.length?"number"!=typeof st.length||mt(st.length)?x(0):u(st):"Buffer"===st.type&&Array.isArray(st.data)?u(st.data):void 0}(st);if(Wt)return Wt;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof st[Symbol.toPrimitive])return f.from(st[Symbol.toPrimitive]("string"),Ye,gt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof st)}function g(st){if("number"!=typeof st)throw new TypeError('"size" argument must be of type number');if(st<0)throw new RangeError('The value "'+st+'" is invalid for option "size"')}function l(st){return g(st),x(st<0?0:0|S(st))}function u(st){const Ye=st.length<0?0:0|S(st.length),gt=x(Ye);for(let St=0;St=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return 0|st}function P(st,Ye){if(f.isBuffer(st))return st.length;if(ArrayBuffer.isView(st)||tt(st,ArrayBuffer))return st.byteLength;if("string"!=typeof st)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof st);const gt=st.length,St=arguments.length>2&&!0===arguments[2];if(!St&&0===gt)return 0;let Wt=!1;for(;;)switch(Ye){case"ascii":case"latin1":case"binary":return gt;case"utf8":case"utf-8":return me(st).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*gt;case"hex":return gt>>>1;case"base64":return Ve(st).length;default:if(Wt)return St?-1:me(st).length;Ye=(""+Ye).toLowerCase(),Wt=!0}}function L(st,Ye,gt){let St=!1;if((void 0===Ye||Ye<0)&&(Ye=0),Ye>this.length||((void 0===gt||gt>this.length)&&(gt=this.length),gt<=0)||(gt>>>=0)<=(Ye>>>=0))return"";for(st||(st="utf8");;)switch(st){case"hex":return C(this,Ye,gt);case"utf8":case"utf-8":return M(this,Ye,gt);case"ascii":return D(this,Ye,gt);case"latin1":case"binary":return N(this,Ye,gt);case"base64":return y(this,Ye,gt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,Ye,gt);default:if(St)throw new TypeError("Unknown encoding: "+st);st=(st+"").toLowerCase(),St=!0}}function V(st,Ye,gt){const St=st[Ye];st[Ye]=st[gt],st[gt]=St}function W(st,Ye,gt,St,Wt){if(0===st.length)return-1;if("string"==typeof gt?(St=gt,gt=0):gt>2147483647?gt=2147483647:gt<-2147483648&&(gt=-2147483648),mt(gt=+gt)&&(gt=Wt?0:st.length-1),gt<0&&(gt=st.length+gt),gt>=st.length){if(Wt)return-1;gt=st.length-1}else if(gt<0){if(!Wt)return-1;gt=0}if("string"==typeof Ye&&(Ye=f.from(Ye,St)),f.isBuffer(Ye))return 0===Ye.length?-1:G(st,Ye,gt,St,Wt);if("number"==typeof Ye)return Ye&=255,"function"==typeof Uint8Array.prototype.indexOf?Wt?Uint8Array.prototype.indexOf.call(st,Ye,gt):Uint8Array.prototype.lastIndexOf.call(st,Ye,gt):G(st,[Ye],gt,St,Wt);throw new TypeError("val must be string, number or Buffer")}function G(st,Ye,gt,St,Wt){let jt,dn=1,Nt=st.length,It=Ye.length;if(void 0!==St&&("ucs2"===(St=String(St).toLowerCase())||"ucs-2"===St||"utf16le"===St||"utf-16le"===St)){if(st.length<2||Ye.length<2)return-1;dn=2,Nt/=2,It/=2,gt/=2}function qt(Yt,Wn){return 1===dn?Yt[Wn]:Yt.readUInt16BE(Wn*dn)}if(Wt){let Yt=-1;for(jt=gt;jtNt&&(gt=Nt-It),jt=gt;jt>=0;jt--){let Yt=!0;for(let Wn=0;WnWt&&(St=Wt):St=Wt;const dn=Ye.length;let Nt;for(St>dn/2&&(St=dn/2),Nt=0;Nt>8,Wt=gt%256,dn.push(Wt),dn.push(St);return dn}(Ye,st.length-gt),st,gt,St)}function y(st,Ye,gt){return ie.fromByteArray(0===Ye&>===st.length?st:st.slice(Ye,gt))}function M(st,Ye,gt){gt=Math.min(st.length,gt);const St=[];let Wt=Ye;for(;Wt239?4:dn>223?3:dn>191?2:1;if(Wt+It<=gt){let qt,jt,Yt,Wn;switch(It){case 1:dn<128&&(Nt=dn);break;case 2:qt=st[Wt+1],128==(192&qt)&&(Wn=(31&dn)<<6|63&qt,Wn>127&&(Nt=Wn));break;case 3:qt=st[Wt+1],jt=st[Wt+2],128==(192&qt)&&128==(192&jt)&&(Wn=(15&dn)<<12|(63&qt)<<6|63&jt,Wn>2047&&(Wn<55296||Wn>57343)&&(Nt=Wn));break;case 4:qt=st[Wt+1],jt=st[Wt+2],Yt=st[Wt+3],128==(192&qt)&&128==(192&jt)&&128==(192&Yt)&&(Wn=(15&dn)<<18|(63&qt)<<12|(63&jt)<<6|63&Yt,Wn>65535&&Wn<1114112&&(Nt=Wn))}}null===Nt?(Nt=65533,It=1):Nt>65535&&(Nt-=65536,St.push(Nt>>>10&1023|55296),Nt=56320|1023&Nt),St.push(Nt),Wt+=It}return function(st){const Ye=st.length;if(Ye<=v)return String.fromCharCode.apply(String,st);let gt="",St=0;for(;StWt.length?(f.isBuffer(Nt)||(Nt=f.from(Nt)),Nt.copy(Wt,dn)):Uint8Array.prototype.set.call(Wt,Nt,dn);else{if(!f.isBuffer(Nt))throw new TypeError('"list" argument must be an Array of Buffers');Nt.copy(Wt,dn)}dn+=Nt.length}return Wt},f.byteLength=P,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const Ye=this.length;if(Ye%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let gt=0;gtgt&&(Ye+=" ... "),""},O&&(f.prototype[O]=f.prototype.inspect),f.prototype.compare=function(Ye,gt,St,Wt,dn){if(tt(Ye,Uint8Array)&&(Ye=f.from(Ye,Ye.offset,Ye.byteLength)),!f.isBuffer(Ye))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ye);if(void 0===gt&&(gt=0),void 0===St&&(St=Ye?Ye.length:0),void 0===Wt&&(Wt=0),void 0===dn&&(dn=this.length),gt<0||St>Ye.length||Wt<0||dn>this.length)throw new RangeError("out of range index");if(Wt>=dn&>>=St)return 0;if(Wt>=dn)return-1;if(gt>=St)return 1;if(this===Ye)return 0;let Nt=(dn>>>=0)-(Wt>>>=0),It=(St>>>=0)-(gt>>>=0);const qt=Math.min(Nt,It),jt=this.slice(Wt,dn),Yt=Ye.slice(gt,St);for(let Wn=0;Wn>>=0,isFinite(St)?(St>>>=0,void 0===Wt&&(Wt="utf8")):(Wt=St,St=void 0)}const dn=this.length-gt;if((void 0===St||St>dn)&&(St=dn),Ye.length>0&&(St<0||gt<0)||gt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Wt||(Wt="utf8");let Nt=!1;for(;;)switch(Wt){case"hex":return H(this,Ye,gt,St);case"utf8":case"utf-8":return j(this,Ye,gt,St);case"ascii":case"latin1":case"binary":return K(this,Ye,gt,St);case"base64":return R(this,Ye,gt,St);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,Ye,gt,St);default:if(Nt)throw new TypeError("Unknown encoding: "+Wt);Wt=(""+Wt).toLowerCase(),Nt=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const v=4096;function D(st,Ye,gt){let St="";gt=Math.min(st.length,gt);for(let Wt=Ye;WtSt)&&(gt=St);let Wt="";for(let dn=Ye;dngt)throw new RangeError("Trying to access beyond buffer length")}function Q(st,Ye,gt,St,Wt,dn){if(!f.isBuffer(st))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ye>Wt||Yest.length)throw new RangeError("Index out of range")}function ee(st,Ye,gt,St,Wt){pe(Ye,St,Wt,st,gt,7);let dn=Number(Ye&BigInt(4294967295));st[gt++]=dn,dn>>=8,st[gt++]=dn,dn>>=8,st[gt++]=dn,dn>>=8,st[gt++]=dn;let Nt=Number(Ye>>BigInt(32)&BigInt(4294967295));return st[gt++]=Nt,Nt>>=8,st[gt++]=Nt,Nt>>=8,st[gt++]=Nt,Nt>>=8,st[gt++]=Nt,gt}function ce(st,Ye,gt,St,Wt){pe(Ye,St,Wt,st,gt,7);let dn=Number(Ye&BigInt(4294967295));st[gt+7]=dn,dn>>=8,st[gt+6]=dn,dn>>=8,st[gt+5]=dn,dn>>=8,st[gt+4]=dn;let Nt=Number(Ye>>BigInt(32)&BigInt(4294967295));return st[gt+3]=Nt,Nt>>=8,st[gt+2]=Nt,Nt>>=8,st[gt+1]=Nt,Nt>>=8,st[gt]=Nt,gt+8}function ue(st,Ye,gt,St,Wt,dn){if(gt+St>st.length)throw new RangeError("Index out of range");if(gt<0)throw new RangeError("Index out of range")}function we(st,Ye,gt,St,Wt){return Ye=+Ye,gt>>>=0,Wt||ue(st,0,gt,4),q.write(st,Ye,gt,St,23,4),gt+4}function ae(st,Ye,gt,St,Wt){return Ye=+Ye,gt>>>=0,Wt||ue(st,0,gt,8),q.write(st,Ye,gt,St,52,8),gt+8}f.prototype.slice=function(Ye,gt){const St=this.length;(Ye=~~Ye)<0?(Ye+=St)<0&&(Ye=0):Ye>St&&(Ye=St),(gt=void 0===gt?St:~~gt)<0?(gt+=St)<0&&(gt=0):gt>St&&(gt=St),gt>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=this[Ye],dn=1,Nt=0;for(;++Nt>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=this[Ye+--gt],dn=1;for(;gt>0&&(dn*=256);)Wt+=this[Ye+--gt]*dn;return Wt},f.prototype.readUint8=f.prototype.readUInt8=function(Ye,gt){return Ye>>>=0,gt||B(Ye,1,this.length),this[Ye]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,2,this.length),this[Ye]|this[Ye+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,2,this.length),this[Ye]<<8|this[Ye+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),(this[Ye]|this[Ye+1]<<8|this[Ye+2]<<16)+16777216*this[Ye+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),16777216*this[Ye]+(this[Ye+1]<<16|this[Ye+2]<<8|this[Ye+3])},f.prototype.readBigUInt64LE=wt(function(Ye){_e(Ye>>>=0,"offset");const gt=this[Ye],St=this[Ye+7];(void 0===gt||void 0===St)&&xe(Ye,this.length-8);const Wt=gt+256*this[++Ye]+65536*this[++Ye]+this[++Ye]*2**24,dn=this[++Ye]+256*this[++Ye]+65536*this[++Ye]+St*2**24;return BigInt(Wt)+(BigInt(dn)<>>=0,"offset");const gt=this[Ye],St=this[Ye+7];(void 0===gt||void 0===St)&&xe(Ye,this.length-8);const Wt=gt*2**24+65536*this[++Ye]+256*this[++Ye]+this[++Ye],dn=this[++Ye]*2**24+65536*this[++Ye]+256*this[++Ye]+St;return(BigInt(Wt)<>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=this[Ye],dn=1,Nt=0;for(;++Nt=dn&&(Wt-=Math.pow(2,8*gt)),Wt},f.prototype.readIntBE=function(Ye,gt,St){Ye>>>=0,gt>>>=0,St||B(Ye,gt,this.length);let Wt=gt,dn=1,Nt=this[Ye+--Wt];for(;Wt>0&&(dn*=256);)Nt+=this[Ye+--Wt]*dn;return dn*=128,Nt>=dn&&(Nt-=Math.pow(2,8*gt)),Nt},f.prototype.readInt8=function(Ye,gt){return Ye>>>=0,gt||B(Ye,1,this.length),128&this[Ye]?-1*(255-this[Ye]+1):this[Ye]},f.prototype.readInt16LE=function(Ye,gt){Ye>>>=0,gt||B(Ye,2,this.length);const St=this[Ye]|this[Ye+1]<<8;return 32768&St?4294901760|St:St},f.prototype.readInt16BE=function(Ye,gt){Ye>>>=0,gt||B(Ye,2,this.length);const St=this[Ye+1]|this[Ye]<<8;return 32768&St?4294901760|St:St},f.prototype.readInt32LE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),this[Ye]|this[Ye+1]<<8|this[Ye+2]<<16|this[Ye+3]<<24},f.prototype.readInt32BE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),this[Ye]<<24|this[Ye+1]<<16|this[Ye+2]<<8|this[Ye+3]},f.prototype.readBigInt64LE=wt(function(Ye){_e(Ye>>>=0,"offset");const gt=this[Ye],St=this[Ye+7];return(void 0===gt||void 0===St)&&xe(Ye,this.length-8),(BigInt(this[Ye+4]+256*this[Ye+5]+65536*this[Ye+6]+(St<<24))<>>=0,"offset");const gt=this[Ye],St=this[Ye+7];(void 0===gt||void 0===St)&&xe(Ye,this.length-8);const Wt=(gt<<24)+65536*this[++Ye]+256*this[++Ye]+this[++Ye];return(BigInt(Wt)<>>=0,gt||B(Ye,4,this.length),q.read(this,Ye,!0,23,4)},f.prototype.readFloatBE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,4,this.length),q.read(this,Ye,!1,23,4)},f.prototype.readDoubleLE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,8,this.length),q.read(this,Ye,!0,52,8)},f.prototype.readDoubleBE=function(Ye,gt){return Ye>>>=0,gt||B(Ye,8,this.length),q.read(this,Ye,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(Ye,gt,St,Wt){Ye=+Ye,gt>>>=0,St>>>=0,Wt||Q(this,Ye,gt,St,Math.pow(2,8*St)-1,0);let dn=1,Nt=0;for(this[gt]=255&Ye;++Nt>>=0,St>>>=0,Wt||Q(this,Ye,gt,St,Math.pow(2,8*St)-1,0);let dn=St-1,Nt=1;for(this[gt+dn]=255&Ye;--dn>=0&&(Nt*=256);)this[gt+dn]=Ye/Nt&255;return gt+St},f.prototype.writeUint8=f.prototype.writeUInt8=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,1,255,0),this[gt]=255&Ye,gt+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,65535,0),this[gt]=255&Ye,this[gt+1]=Ye>>>8,gt+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,65535,0),this[gt]=Ye>>>8,this[gt+1]=255&Ye,gt+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,4294967295,0),this[gt+3]=Ye>>>24,this[gt+2]=Ye>>>16,this[gt+1]=Ye>>>8,this[gt]=255&Ye,gt+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,4294967295,0),this[gt]=Ye>>>24,this[gt+1]=Ye>>>16,this[gt+2]=Ye>>>8,this[gt+3]=255&Ye,gt+4},f.prototype.writeBigUInt64LE=wt(function(Ye,gt=0){return ee(this,Ye,gt,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=wt(function(Ye,gt=0){return ce(this,Ye,gt,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(Ye,gt,St,Wt){if(Ye=+Ye,gt>>>=0,!Wt){const qt=Math.pow(2,8*St-1);Q(this,Ye,gt,St,qt-1,-qt)}let dn=0,Nt=1,It=0;for(this[gt]=255&Ye;++dn>0)-It&255;return gt+St},f.prototype.writeIntBE=function(Ye,gt,St,Wt){if(Ye=+Ye,gt>>>=0,!Wt){const qt=Math.pow(2,8*St-1);Q(this,Ye,gt,St,qt-1,-qt)}let dn=St-1,Nt=1,It=0;for(this[gt+dn]=255&Ye;--dn>=0&&(Nt*=256);)Ye<0&&0===It&&0!==this[gt+dn+1]&&(It=1),this[gt+dn]=(Ye/Nt>>0)-It&255;return gt+St},f.prototype.writeInt8=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,1,127,-128),Ye<0&&(Ye=255+Ye+1),this[gt]=255&Ye,gt+1},f.prototype.writeInt16LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,32767,-32768),this[gt]=255&Ye,this[gt+1]=Ye>>>8,gt+2},f.prototype.writeInt16BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,2,32767,-32768),this[gt]=Ye>>>8,this[gt+1]=255&Ye,gt+2},f.prototype.writeInt32LE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,2147483647,-2147483648),this[gt]=255&Ye,this[gt+1]=Ye>>>8,this[gt+2]=Ye>>>16,this[gt+3]=Ye>>>24,gt+4},f.prototype.writeInt32BE=function(Ye,gt,St){return Ye=+Ye,gt>>>=0,St||Q(this,Ye,gt,4,2147483647,-2147483648),Ye<0&&(Ye=4294967295+Ye+1),this[gt]=Ye>>>24,this[gt+1]=Ye>>>16,this[gt+2]=Ye>>>8,this[gt+3]=255&Ye,gt+4},f.prototype.writeBigInt64LE=wt(function(Ye,gt=0){return ee(this,Ye,gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=wt(function(Ye,gt=0){return ce(this,Ye,gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(Ye,gt,St){return we(this,Ye,gt,!0,St)},f.prototype.writeFloatBE=function(Ye,gt,St){return we(this,Ye,gt,!1,St)},f.prototype.writeDoubleLE=function(Ye,gt,St){return ae(this,Ye,gt,!0,St)},f.prototype.writeDoubleBE=function(Ye,gt,St){return ae(this,Ye,gt,!1,St)},f.prototype.copy=function(Ye,gt,St,Wt){if(!f.isBuffer(Ye))throw new TypeError("argument should be a Buffer");if(St||(St=0),!Wt&&0!==Wt&&(Wt=this.length),gt>=Ye.length&&(gt=Ye.length),gt||(gt=0),Wt>0&&Wt=this.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("sourceEnd out of bounds");Wt>this.length&&(Wt=this.length),Ye.length-gt>>=0,St=void 0===St?this.length:St>>>0,Ye||(Ye=0),"number"==typeof Ye)for(dn=gt;dn=St+4;gt-=3)Ye=`_${st.slice(gt-3,gt)}${Ye}`;return`${st.slice(0,gt)}${Ye}`}function pe(st,Ye,gt,St,Wt,dn){if(st>gt||st3?0===Ye||Ye===BigInt(0)?`>= 0${Nt} and < 2${Nt} ** ${8*(dn+1)}${Nt}`:`>= -(2${Nt} ** ${8*(dn+1)-1}${Nt}) and < 2 ** ${8*(dn+1)-1}${Nt}`:`>= ${Ye}${Nt} and <= ${gt}${Nt}`,new Te.ERR_OUT_OF_RANGE("value",It,st)}!function(st,Ye,gt){_e(Ye,"offset"),(void 0===st[Ye]||void 0===st[Ye+gt])&&xe(Ye,st.length-(gt+1))}(St,Wt,dn)}function _e(st,Ye){if("number"!=typeof st)throw new Te.ERR_INVALID_ARG_TYPE(Ye,"number",st)}function xe(st,Ye,gt){throw Math.floor(st)!==st?(_e(st,gt),new Te.ERR_OUT_OF_RANGE(gt||"offset","an integer",st)):Ye<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(gt||"offset",`>= ${gt?1:0} and <= ${Ye}`,st)}le("ERR_BUFFER_OUT_OF_BOUNDS",function(st){return st?`${st} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),le("ERR_INVALID_ARG_TYPE",function(st,Ye){return`The "${st}" argument must be of type number. Received type ${typeof Ye}`},TypeError),le("ERR_OUT_OF_RANGE",function(st,Ye,gt){let St=`The value of "${st}" is out of range.`,Wt=gt;return Number.isInteger(gt)&&Math.abs(gt)>2**32?Wt=X(String(gt)):"bigint"==typeof gt&&(Wt=String(gt),(gt>BigInt(2)**BigInt(32)||gt<-(BigInt(2)**BigInt(32)))&&(Wt=X(Wt)),Wt+="n"),St+=` It must be ${Ye}. Received ${Wt}`,St},RangeError);const Ce=/[^+/0-9A-Za-z-_]/g;function me(st,Ye){let gt;Ye=Ye||1/0;const St=st.length;let Wt=null;const dn=[];for(let Nt=0;Nt55295&><57344){if(!Wt){if(gt>56319){(Ye-=3)>-1&&dn.push(239,191,189);continue}if(Nt+1===St){(Ye-=3)>-1&&dn.push(239,191,189);continue}Wt=gt;continue}if(gt<56320){(Ye-=3)>-1&&dn.push(239,191,189),Wt=gt;continue}gt=65536+(Wt-55296<<10|gt-56320)}else Wt&&(Ye-=3)>-1&&dn.push(239,191,189);if(Wt=null,gt<128){if((Ye-=1)<0)break;dn.push(gt)}else if(gt<2048){if((Ye-=2)<0)break;dn.push(gt>>6|192,63>|128)}else if(gt<65536){if((Ye-=3)<0)break;dn.push(gt>>12|224,gt>>6&63|128,63>|128)}else{if(!(gt<1114112))throw new Error("Invalid code point");if((Ye-=4)<0)break;dn.push(gt>>18|240,gt>>12&63|128,gt>>6&63|128,63>|128)}}return dn}function Ve(st){return ie.toByteArray(function(st){if((st=(st=st.split("=")[0]).trim().replace(Ce,"")).length<2)return"";for(;st.length%4!=0;)st+="=";return st}(st))}function nt(st,Ye,gt,St){let Wt;for(Wt=0;Wt=Ye.length||Wt>=st.length);++Wt)Ye[Wt+gt]=st[Wt];return Wt}function tt(st,Ye){return st instanceof Ye||null!=st&&null!=st.constructor&&null!=st.constructor.name&&st.constructor.name===Ye.name}function mt(st){return st!=st}const ht=function(){const st="0123456789abcdef",Ye=new Array(256);for(let gt=0;gt<16;++gt){const St=16*gt;for(let Wt=0;Wt<16;++Wt)Ye[St+Wt]=st[gt]+st[Wt]}return Ye}();function wt(st){return"undefined"==typeof BigInt?Pt:st}function Pt(){throw new Error("BigInt not supported")}},98983:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{EthereumProvider:()=>Ec,OPTIONAL_EVENTS:()=>C0,OPTIONAL_METHODS:()=>ys,REQUIRED_EVENTS:()=>bs,REQUIRED_METHODS:()=>qf,default:()=>Ps});var ie=Y(34553),q=Y(93105),O=Y.n(q),E=Y(91573),d=Y(37651),x=Y(52632),f=Y(41027),T=Y(72180),g=Y(81361),b=function(Ot,De,Me){if(Me||2===arguments.length)for(var Dt,pt=0,vt=De.length;pt"u")throw new Error("missing sender public key");if(typeof Ot?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:De,senderPublicKey:Ot?.senderPublicKey,receiverPublicKey:Ot?.receiverPublicKey}}function $n(Ot){return 1===Ot.type&&"string"==typeof Ot.senderPublicKey&&"string"==typeof Ot.receiverPublicKey}var Jr=Object.defineProperty,Ln=Object.getOwnPropertySymbols,Bn=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,zn=(Ot,De,Me)=>De in Ot?Jr(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,bn=(Ot,De)=>{for(var Me in De||(De={}))Bn.call(De,Me)&&zn(Ot,Me,De[Me]);if(Ln)for(var Me of Ln(De))Wr.call(De,Me)&&zn(Ot,Me,De[Me]);return Ot};const Tn="js";function Qn(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Vi(){return!(0,y.getDocument)()&&!!(0,y.getNavigator)()&&"ReactNative"===navigator.product}function ar(){return!Qn()&&!!(0,y.getNavigator)()}function br(){return Vi()?"react-native":Qn()?"node":ar()?"browser":"unknown"}function wi(Ot,De,Me){const pt=function(){if("react-native"===br()&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:Me,Version:pt}=global.Platform;return[Me,pt].join("-")}const Ot=function(Ot){return Ot?H(Ot):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new _:"undefined"!=typeof navigator?H(navigator.userAgent):"undefined"!=typeof process&&process.version?new h(process.version.slice(1)):null}();if(null===Ot)return"unknown";const De=Ot.os?Ot.os.replace(" ","").toLowerCase():"unknown";return"browser"===Ot.type?[De,Ot.name,Ot.version].join("-"):[De,Ot.version].join("-")}(),vt=function(){var Ot;const De=br();return"browser"===De?[De,(null==(Ot=(0,y.getLocation)())?void 0:Ot.host)||"unknown"].join(":"):De}();return[[Ot,De].join("-"),[Tn,Me].join("-"),pt,vt].join("/")}function is(Ot,De){return Ot.filter(Me=>De.includes(Me)).length===Ot.length}function ji(Ot){return Object.fromEntries(Ot.entries())}function so(Ot){return new Map(Object.entries(Ot))}function _s(Ot=o.FIVE_MINUTES,De){const Me=(0,o.toMiliseconds)(Ot||o.FIVE_MINUTES);let pt,vt,Dt;return{resolve:nn=>{Dt&&pt&&(clearTimeout(Dt),pt(nn))},reject:nn=>{Dt&&vt&&(clearTimeout(Dt),vt(nn))},done:()=>new Promise((nn,Nn)=>{Dt=setTimeout(()=>{Nn(new Error(De))},Me),pt=nn,vt=Nn})}}function Ao(Ot,De,Me){return new Promise(function(){var pt=(0,ie.Z)(function*(vt,Dt){const nn=setTimeout(()=>Dt(new Error(Me)),De);try{vt(yield Ot)}catch(Nn){Dt(Nn)}clearTimeout(nn)});return function(vt,Dt){return pt.apply(this,arguments)}}())}function zi(Ot,De){if("string"==typeof De&&De.startsWith(`${Ot}:`))return De;if("topic"===Ot.toLowerCase()){if("string"!=typeof De)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${De}`}if("id"===Ot.toLowerCase()){if("number"!=typeof De)throw new Error('Value must be "number" for expirer target type: id');return`id:${De}`}throw new Error(`Unknown expirer target type: ${Ot}`)}function Lu(Ot){const[De,Me]=Ot.split(":"),pt={id:void 0,topic:void 0};if("topic"===De&&"string"==typeof Me)pt.topic=Me;else{if("id"!==De||!Number.isInteger(Number(Me)))throw new Error(`Invalid target, expected id:number or topic:string, got ${De}:${Me}`);pt.id=Number(Me)}return pt}function Qa(Ot,De){return(0,o.fromMiliseconds)((De||Date.now())+(0,o.toMiliseconds)(Ot))}function ja(Ot){return Date.now()>=(0,o.toMiliseconds)(Ot)}function xa(Ot,De){return`${Ot}${De?`:${De}`:""}`}function Du(Ot=[],De=[]){return[...new Set([...Ot,...De])]}function Va(){return(Va=(0,ie.Z)(function*({id:Ot,topic:De,wcDeepLink:Me}){try{if(!Me)return;let vt=("string"==typeof Me?JSON.parse(Me):Me)?.href;if("string"!=typeof vt)return;vt.endsWith("/")&&(vt=vt.slice(0,-1));const Dt=`${vt}/wc?requestId=${Ot}&sessionTopic=${De}`,nn=br();"browser"===nn?Dt.startsWith("https://")?window.open(Dt,"_blank","noreferrer noopener"):window.open(Dt,"_self","noreferrer noopener"):"react-native"===nn&&typeof(null==global?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(Dt))}catch(pt){console.error(pt)}})).apply(this,arguments)}function Eu(Ot){return Ot?.relay||{protocol:"irn"}}function jo(Ot){const De=k.RELAY_JSONRPC[Ot];if(typeof De>"u")throw new Error(`Relay Protocol not supported: ${Ot}`);return De}var yo=Object.defineProperty,Vc=Object.getOwnPropertySymbols,El=Object.prototype.hasOwnProperty,ec=Object.prototype.propertyIsEnumerable,kc=(Ot,De,Me)=>De in Ot?yo(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me;function eu(Ot,De="-"){const Me={},pt="relay"+De;return Object.keys(Ot).forEach(vt=>{if(vt.startsWith(pt)){const Dt=vt.replace(pt,"");Me[Dt]=Ot[vt]}}),Me}function aa(Ot){return Ot.startsWith("//")?Ot.substring(2):Ot}function Wa(Ot){const De=[];return Ot.forEach(Me=>{const[pt,vt]=Me.split(":");De.push(`${pt}:${vt}`)}),De}function oc(Ot){return Ot.includes(":")}function po(Ot){return oc(Ot)?Ot.split(":")[0]:Ot}const rr={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},hn={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Cn(Ot,De){const{message:Me,code:pt}=hn[Ot];return{message:De?`${Me} ${De}`:Me,code:pt}}function Ir(Ot,De){const{message:Me,code:pt}=rr[Ot];return{message:De?`${Me} ${De}`:Me,code:pt}}function Ei(Ot,De){return!!Array.isArray(Ot)&&(!(typeof De<"u"&&Ot.length)||Ot.every(De))}function Os(Ot){return Object.getPrototypeOf(Ot)===Object.prototype&&Object.keys(Ot).length}function Cs(Ot){return typeof Ot>"u"}function zs(Ot,De){return!(!De||!Cs(Ot))||"string"==typeof Ot&&!!Ot.trim().length}function Rs(Ot,De){return!(!De||!Cs(Ot))||"number"==typeof Ot&&!isNaN(Ot)}function Vo(Ot){return!(!zs(Ot,!1)||!Ot.includes(":"))&&2===Ot.split(":").length}function ru(Ot){let De=!0;return Ei(Ot)?Ot.length&&(De=Ot.every(Me=>zs(Me,!1))):De=!1,De}function Ut(Ot,De){let Me=null;return Object.values(Ot).forEach(pt=>{if(Me)return;const vt=function(Ot,De){let Me=null;return ru(Ot?.methods)?ru(Ot?.events)||(Me=Ir("UNSUPPORTED_EVENTS",`${De}, events should be an array of strings or empty array for no events`)):Me=Ir("UNSUPPORTED_METHODS",`${De}, methods should be an array of strings or empty array for no methods`),Me}(pt,`${De}, namespace`);vt&&(Me=vt)}),Me}function et(Ot,De){let Me=null;if(Ot&&Os(Ot)){const pt=Ut(Ot,De);pt&&(Me=pt);const vt=function(Ot,De){let Me=null;return Object.values(Ot).forEach(pt=>{if(Me)return;const vt=function(Ot,De){let Me=null;return Ei(Ot)?Ot.forEach(pt=>{Me||function(Ot){if(zs(Ot,!1)&&Ot.includes(":")){const De=Ot.split(":");if(3===De.length){const Me=De[0]+":"+De[1];return!!De[2]&&Vo(Me)}}return!1}(pt)||(Me=Ir("UNSUPPORTED_ACCOUNTS",`${De}, account ${pt} should be a string and conform to "namespace:chainId:address" format`))}):Me=Ir("UNSUPPORTED_ACCOUNTS",`${De}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),Me}(pt?.accounts,`${De} namespace`);vt&&(Me=vt)}),Me}(Ot,De);vt&&(Me=vt)}else Me=Cn("MISSING_OR_INVALID",`${De}, namespaces should be an object with data`);return Me}function zt(Ot){return zs(Ot.protocol,!0)}function nr(Ot){return typeof Ot<"u"&&null!==typeof Ot}function As(Ot,De){return!(!Vo(De)||!function(Ot){const De=[];return Object.values(Ot).forEach(Me=>{De.push(...Wa(Me.accounts))}),De}(Ot).includes(De))}function lo(Ot,De,Me){let pt=null;const vt=function(Ot){const De={};return Object.keys(Ot).forEach(Me=>{var pt;Me.includes(":")?De[Me]=Ot[Me]:null==(pt=Ot[Me].chains)||pt.forEach(vt=>{De[vt]={methods:Ot[Me].methods,events:Ot[Me].events}})}),De}(Ot),Dt=function(Ot){const De={};return Object.keys(Ot).forEach(Me=>{Me.includes(":")?De[Me]=Ot[Me]:Wa(Ot[Me].accounts)?.forEach(vt=>{De[vt]={accounts:Ot[Me].accounts.filter(Dt=>Dt.includes(`${vt}:`)),methods:Ot[Me].methods,events:Ot[Me].events}})}),De}(De),nn=Object.keys(vt),Nn=Object.keys(Dt),Mr=Ka(Object.keys(Ot)),Vr=Ka(Object.keys(De)),Si=Mr.filter(ls=>!Vr.includes(ls));return Si.length&&(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces keys don't satisfy requiredNamespaces.\n Required: ${Si.toString()}\n Received: ${Object.keys(De).toString()}`)),is(nn,Nn)||(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces chains don't satisfy required namespaces.\n Required: ${nn.toString()}\n Approved: ${Nn.toString()}`)),Object.keys(De).forEach(ls=>{if(!ls.includes(":")||pt)return;const Oo=Wa(De[ls].accounts);Oo.includes(ls)||(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces accounts don't satisfy namespace accounts for ${ls}\n Required: ${ls}\n Approved: ${Oo.toString()}`))}),nn.forEach(ls=>{pt||(is(vt[ls].methods,Dt[ls].methods)?is(vt[ls].events,Dt[ls].events)||(pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces events don't satisfy namespace events for ${ls}`)):pt=Cn("NON_CONFORMING_NAMESPACES",`${Me} namespaces methods don't satisfy namespace methods for ${ls}`))}),pt}function Ka(Ot){return[...new Set(Ot.map(De=>De.includes(":")?De.split(":")[0]:De))]}function Gc(){const Ot=br();return new Promise(De=>{switch(Ot){case"browser":De(ar()&&navigator?.onLine);break;case"react-native":De(function(){return ga.apply(this,arguments)}());break;default:De(!0)}})}function ga(){return(ga=(0,ie.Z)(function*(){return!(Vi()&&typeof global<"u"&&null!=global&&global.NetInfo)||(yield null==global?void 0:global.NetInfo.fetch())?.isConnected})).apply(this,arguments)}const fu={};class ka{static get(De){return fu[De]}static set(De,Me){fu[De]=Me}static delete(De){delete fu[De]}}var Dr=Y(3226),Eo=Y(38960),Io=Y(66486),Ho=Y(52399);class $o extends Ho.q{constructor(De){super(),this.opts=De,this.protocol="wc",this.version=2}}class Bo extends Ho.q{constructor(De,Me){super(),this.core=De,this.logger=Me,this.records=new Map}}class la extends Ho.q{constructor(De,Me){super(),this.relayer=De,this.logger=Me}}class tc extends Ho.q{constructor(De){super()}}class rd extends Ho.q{constructor(De,Me){super(),this.relayer=De,this.logger=Me}}class Nc extends Ho.q{constructor(De,Me){super(),this.core=De,this.logger=Me}}var Hc=Y(62757),fd=Y(10321),Ca=Y(22339),Or=Y(57808),Ti=Y(6856),ii=Y.n(Ti),iu=function(Ot,De){if(Ot.length>=255)throw new TypeError("Alphabet too long");for(var Me=new Uint8Array(256),pt=0;pt>>0,Bc=new Uint8Array(mc);uo[Jo];){var zu=Me[uo.charCodeAt(Jo)];if(255===zu)return;for(var Ru=0,gc=mc-1;(0!==zu||Ru>>0)%256>>>0,zu=zu/256>>>0;if(0!==zu)throw new Error("Non-zero carry");ul=Ru,Jo++}if(" "!==uo[Jo]){for(var Tc=mc-ul;Tc!==mc&&0===Bc[Tc];)Tc++;for(var _d=new Uint8Array(Lo+(mc-Tc)),Y0=Lo;Tc!==mc;)_d[Y0++]=Bc[Tc++];return _d}}}return{encode:function(uo){if(uo instanceof Uint8Array||(ArrayBuffer.isView(uo)?uo=new Uint8Array(uo.buffer,uo.byteOffset,uo.byteLength):Array.isArray(uo)&&(uo=Uint8Array.from(uo))),!(uo instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===uo.length)return"";for(var Jo=0,Lo=0,ul=0,mc=uo.length;ul!==mc&&0===uo[ul];)ul++,Jo++;for(var Bc=(mc-ul)*Si+1>>>0,zu=new Uint8Array(Bc);ul!==mc;){for(var Ru=uo[ul],gc=0,Tc=Bc-1;(0!==Ru||gc>>0)%Nn>>>0,Ru=Ru/Nn>>>0;if(0!==Ru)throw new Error("Non-zero carry");Lo=gc,ul++}for(var _d=Bc-Lo;_d!==Bc&&0===zu[_d];)_d++;for(var Y0=Mr.repeat(Jo);_d{if(Ot instanceof Uint8Array&&"Uint8Array"===Ot.constructor.name)return Ot;if(Ot instanceof ArrayBuffer)return new Uint8Array(Ot);if(ArrayBuffer.isView(Ot))return new Uint8Array(Ot.buffer,Ot.byteOffset,Ot.byteLength);throw new Error("Unknown type, must be binary type")};class Lt{constructor(De,Me,pt){this.name=De,this.prefix=Me,this.baseEncode=pt}encode(De){if(De instanceof Uint8Array)return`${this.prefix}${this.baseEncode(De)}`;throw Error("Unknown type, must be binary type")}}class en{constructor(De,Me,pt){if(this.name=De,this.prefix=Me,void 0===Me.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=Me.codePointAt(0),this.baseDecode=pt}decode(De){if("string"==typeof De){if(De.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(De)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(De.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(De){return cr(this,De)}}class Dn{constructor(De){this.decoders=De}or(De){return cr(this,De)}decode(De){const pt=this.decoders[De[0]];if(pt)return pt.decode(De);throw RangeError(`Unable to decode multibase string ${JSON.stringify(De)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const cr=(Ot,De)=>new Dn({...Ot.decoders||{[Ot.prefix]:Ot},...De.decoders||{[De.prefix]:De}});class Gr{constructor(De,Me,pt,vt){this.name=De,this.prefix=Me,this.baseEncode=pt,this.baseDecode=vt,this.encoder=new Lt(De,Me,pt),this.decoder=new en(De,Me,vt)}encode(De){return this.encoder.encode(De)}decode(De){return this.decoder.decode(De)}}const Bi=({name:Ot,prefix:De,encode:Me,decode:pt})=>new Gr(Ot,De,Me,pt),Ai=({prefix:Ot,name:De,alphabet:Me})=>{const{encode:pt,decode:vt}=iu(Me,De);return Bi({prefix:Ot,name:De,encode:pt,decode:Dt=>hu(vt(Dt))})},Ns=({name:Ot,prefix:De,bitsPerChar:Me,alphabet:pt})=>Bi({prefix:De,name:Ot,encode:vt=>((Ot,De,Me)=>{const pt="="===De[De.length-1],vt=(1<Me;)nn-=Me,Dt+=De[vt&Nn>>nn];if(nn&&(Dt+=De[vt&Nn<((Ot,De,Me,pt)=>{const vt={};for(let Si=0;Si=8&&(Nn-=8,nn[Vr++]=255&Mr>>Nn)}if(Nn>=Me||255&Mr<<8-Nn)throw new SyntaxError("Unexpected end of data");return nn})(vt,pt,Me,Ot)}),ha=Bi({prefix:"\0",name:"identity",encode:Ot=>(Ot=>(new TextDecoder).decode(Ot))(Ot),decode:Ot=>(Ot=>(new TextEncoder).encode(Ot))(Ot)});var Fo=Object.freeze({__proto__:null,identity:ha});const Sa=Ns({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Zo=Object.freeze({__proto__:null,base2:Sa});const Ma=Ns({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var $u=Object.freeze({__proto__:null,base8:Ma});const vu=Ai({prefix:"9",name:"base10",alphabet:"0123456789"});var au=Object.freeze({__proto__:null,base10:vu});const zl=Ns({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),sl=Ns({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var id=Object.freeze({__proto__:null,base16:zl,base16upper:sl});const Lf=Ns({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Uf=Ns({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),zc=Ns({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Mc=Ns({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Yu=Ns({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),pu=Ns({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),b1=Ns({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),yh=Ns({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),hd=Ns({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ad=Object.freeze({__proto__:null,base32:Lf,base32upper:Uf,base32pad:zc,base32padupper:Mc,base32hex:Yu,base32hexupper:pu,base32hexpad:b1,base32hexpadupper:yh,base32z:hd});const Vh=Ai({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),j0=Ai({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var lf=Object.freeze({__proto__:null,base36:Vh,base36upper:j0});const bh=Ai({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Hh=Ai({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var nc=Object.freeze({__proto__:null,base58btc:bh,base58flickr:Hh});const Al=Ns({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),V0=Ns({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),v1=Ns({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),df=Ns({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Zd=Object.freeze({__proto__:null,base64:Al,base64pad:V0,base64url:v1,base64urlpad:df});const Qs=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),t0=Qs.reduce((Ot,De,Me)=>(Ot[Me]=De,Ot),[]),jf=Qs.reduce((Ot,De,Me)=>(Ot[De.codePointAt(0)]=Me,Ot),[]),H0=Bi({prefix:"\u{1f680}",name:"base256emoji",encode:function(Ot){return Ot.reduce((De,Me)=>De+t0[Me],"")},decode:function(Ot){const De=[];for(const Me of Ot){const pt=jf[Me.codePointAt(0)];if(void 0===pt)throw new Error(`Non-base256emoji character: ${Me}`);De.push(pt)}return new Uint8Array(De)}});var ac=Object.freeze({__proto__:null,base256emoji:H0}),r0=Math.pow(2,31),$0=Math.pow(2,7),Cd=Math.pow(2,14),sd=Math.pow(2,21),_u=Math.pow(2,28),pd=Math.pow(2,35),fo=Math.pow(2,42),ff=Math.pow(2,49),s0=Math.pow(2,56),_1=Math.pow(2,63),$h={encode:function Yd(Ot,De,Me){De=De||[];for(var pt=Me=Me||0;Ot>=r0;)De[Me++]=255&Ot|128,Ot/=128;for(;-128&Ot;)De[Me++]=255&Ot|128,Ot>>>=7;return De[Me]=0|Ot,Yd.bytes=Me-pt+1,De},decode:function mn(Ot,De){var Dt,Me=0,pt=0,vt=De=De||0,nn=Ot.length;do{if(vt>=nn)throw mn.bytes=0,new RangeError("Could not decode varint");Dt=Ot[vt++],Me+=pt<28?(127&Dt)<=128);return mn.bytes=vt-De,Me},encodingLength:function(Ot){return Ot<$0?1:Ot(Vf.encode(Ot,De,Me),De),pf=Ot=>Vf.encodingLength(Ot),Md=(Ot,De)=>{const Me=De.byteLength,pt=pf(Ot),vt=pt+pf(Me),Dt=new Uint8Array(vt+Me);return hf(Ot,Dt,0),hf(Me,Dt,pt),Dt.set(De,vt),new tm(Ot,Me,De,Dt)};class tm{constructor(De,Me,pt,vt){this.code=De,this.size=Me,this.digest=pt,this.bytes=vt}}const Kp=({name:Ot,code:De,encode:Me})=>new o0(Ot,De,Me);class o0{constructor(De,Me,pt){this.name=De,this.code=Me,this.encode=pt}digest(De){if(De instanceof Uint8Array){const Me=this.encode(De);return Me instanceof Uint8Array?Md(this.code,Me):Me.then(pt=>Md(this.code,pt))}throw Error("Unknown type, must be binary type")}}const Zp=Ot=>function(){var De=(0,ie.Z)(function*(Me){return new Uint8Array(yield crypto.subtle.digest(Ot,Me))});return function(Me){return De.apply(this,arguments)}}(),Iu=Kp({name:"sha2-256",code:18,encode:Zp("SHA-256")}),Tf=Kp({name:"sha2-512",code:19,encode:Zp("SHA-512")});Object.freeze({__proto__:null,sha256:Iu,sha512:Tf});const Od=hu;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:Od,digest:Ot=>Md(0,Od(Ot))}}),new TextEncoder,new TextDecoder;const pl={...Fo,...Zo,...$u,...au,...id,...Ad,...lf,...nc,...Zd,...ac};function Yp(Ot){return null!=globalThis.Buffer?new Uint8Array(Ot.buffer,Ot.byteOffset,Ot.byteLength):Ot}function md(Ot,De,Me,pt){return{name:Ot,prefix:De,encoder:{name:Ot,prefix:De,encode:Me},decoder:{decode:pt}}}const If=md("utf8","u",Ot=>"u"+new TextDecoder("utf8").decode(Ot),Ot=>(new TextEncoder).encode(Ot.substring(1))),bp=md("ascii","a",Ot=>{let De="a";for(let Me=0;Me{const De=function(Ot=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Yp(globalThis.Buffer.allocUnsafe(Ot)):new Uint8Array(Ot)}((Ot=Ot.substring(1)).length);for(let Me=0;Me(this.isInitialized(),this.keychain.has(vt)),this.set=function(){var vt=(0,ie.Z)(function*(Dt,nn){pt.isInitialized(),pt.keychain.set(Dt,nn),yield pt.persist()});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.get=vt=>{this.isInitialized();const Dt=this.keychain.get(vt);if(typeof Dt>"u"){const{message:nn}=Cn("NO_MATCHING_KEY",`${this.name}: ${vt}`);throw new Error(nn)}return Dt},this.del=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),pt.keychain.delete(Dt),yield pt.persist()});return function(Dt){return vt.apply(this,arguments)}}(),this.core=De,this.logger=(0,Io.generateChildLogger)(Me,this.name)}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setKeyChain(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,ji(De))})()}getKeyChain(){var De=this;return(0,ie.Z)(function*(){const Me=yield De.core.storage.getItem(De.storageKey);return typeof Me<"u"?so(Me):void 0})()}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setKeyChain(De.keychain)})()}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class xh{constructor(De,Me,pt){var vt=this;this.core=De,this.logger=Me,this.name="crypto",this.initialized=!1,this.init=(0,ie.Z)(function*(){vt.initialized||(yield vt.keychain.init(),vt.initialized=!0)}),this.hasKeys=Dt=>(this.isInitialized(),this.keychain.has(Dt)),this.getClientId=(0,ie.Z)(function*(){vt.isInitialized();const Dt=yield vt.getClientSeed(),nn=Hc.generateKeyPair(Dt);return Hc.encodeIss(nn.publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const Dt=function(){const Ot=T.Au();return{privateKey:(0,g.BB)(Ot.secretKey,Ee),publicKey:(0,g.BB)(Ot.publicKey,Ee)}}();return this.setPrivateKey(Dt.publicKey,Dt.privateKey)},this.signJWT=function(){var Dt=(0,ie.Z)(function*(nn){vt.isInitialized();const Nn=yield vt.getClientSeed(),Mr=Hc.generateKeyPair(Nn),Vr=Ye(),Si=Hf;return yield Hc.signJWT(Vr,nn,Si,Mr)});return function(nn){return Dt.apply(this,arguments)}}(),this.generateSharedKey=(Dt,nn,Nn)=>{this.isInitialized();const Vr=function(Ot,De){const Me=T.gi((0,g.mL)(Ot,Ee),(0,g.mL)(De,Ee),!0),pt=new d.t(f.mE,Me).expand(32);return(0,g.BB)(pt,Ee)}(this.getPrivateKey(Dt),nn);return this.setSymKey(Vr,Nn)},this.setSymKey=function(){var Dt=(0,ie.Z)(function*(nn,Nn){vt.isInitialized();const Mr=Nn||function(Ot){const De=(0,f.vp)((0,g.mL)(Ot,Ee));return(0,g.BB)(De,Ee)}(nn);return yield vt.keychain.set(Mr,nn),Mr});return function(nn,Nn){return Dt.apply(this,arguments)}}(),this.deleteKeyPair=function(){var Dt=(0,ie.Z)(function*(nn){vt.isInitialized(),yield vt.keychain.del(nn)});return function(nn){return Dt.apply(this,arguments)}}(),this.deleteSymKey=function(){var Dt=(0,ie.Z)(function*(nn){vt.isInitialized(),yield vt.keychain.del(nn)});return function(nn){return Dt.apply(this,arguments)}}(),this.encode=function(){var Dt=(0,ie.Z)(function*(nn,Nn,Mr){vt.isInitialized();const Vr=fn(Mr),Si=function(Ot){return"string"==typeof Ot?Ot:(Ot=>JSON.stringify(Ot,(De,Me)=>"bigint"==typeof Me?Me.toString()+"n":Me))(Ot)||""}(Nn);if($n(Vr)){const uo=Vr.senderPublicKey,Jo=Vr.receiverPublicKey;nn=yield vt.generateSharedKey(uo,Jo)}const ls=vt.getSymKey(nn),{type:Oo,senderPublicKey:Yo}=Vr;return function(Ot){const De=function(Ot){return(0,g.mL)(`${Ot}`,"base10")}(typeof Ot.type<"u"?Ot.type:0);if(1===Nt(De)&&typeof Ot.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const Me=typeof Ot.senderPublicKey<"u"?(0,g.mL)(Ot.senderPublicKey,Ee):void 0,pt=typeof Ot.iv<"u"?(0,g.mL)(Ot.iv,Ee):(0,x.randomBytes)(12);return function(Ot){if(1===Nt(Ot.type)){if(typeof Ot.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,g.BB)((0,g.zo)([Ot.type,Ot.senderPublicKey,Ot.iv,Ot.sealed]),ze)}return(0,g.BB)((0,g.zo)([Ot.type,Ot.iv,Ot.sealed]),ze)}({type:De,sealed:new E.OK((0,g.mL)(Ot.symKey,Ee)).seal(pt,(0,g.mL)(Ot.message,Ve)),iv:pt,senderPublicKey:Me})}({type:Oo,symKey:ls,message:Si,senderPublicKey:Yo})});return function(nn,Nn,Mr){return Dt.apply(this,arguments)}}(),this.decode=function(){var Dt=(0,ie.Z)(function*(nn,Nn,Mr){vt.isInitialized();const Vr=function(Ot,De){const Me=Yt(Ot);return fn({type:Nt(Me.type),senderPublicKey:typeof Me.senderPublicKey<"u"?(0,g.BB)(Me.senderPublicKey,Ee):void 0,receiverPublicKey:De?.receiverPublicKey})}(Nn,Mr);if($n(Vr)){const Si=Vr.receiverPublicKey,ls=Vr.senderPublicKey;nn=yield vt.generateSharedKey(Si,ls)}try{const ls=function(Ot){const De=new E.OK((0,g.mL)(Ot.symKey,Ee)),{sealed:Me,iv:pt}=Yt(Ot.encoded),vt=De.open(pt,Me);if(null===vt)throw new Error("Failed to decrypt");return(0,g.BB)(vt,Ve)}({symKey:vt.getSymKey(nn),encoded:Nn});return function(Ot){if("string"!=typeof Ot)throw new Error("Cannot safe json parse value of type "+typeof Ot);try{return(Ot=>{const Me=Ot.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(Me,(pt,vt)=>"string"==typeof vt&&vt.match(/^\d+n$/)?BigInt(vt.substring(0,vt.length-1)):vt)})(Ot)}catch{return Ot}}(ls)}catch(Si){vt.logger.error(`Failed to decode message from topic: '${nn}', clientId: '${yield vt.getClientId()}'`),vt.logger.error(Si)}});return function(nn,Nn,Mr){return Dt.apply(this,arguments)}}(),this.getPayloadType=Dt=>Nt(Yt(Dt).type),this.getPayloadSenderPublicKey=Dt=>{const nn=Yt(Dt);return nn.senderPublicKey?(0,g.BB)(nn.senderPublicKey,Ee):void 0},this.core=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.keychain=pt||new xp(this.core,this.logger)}get context(){return(0,Io.getLoggerContext)(this.logger)}setPrivateKey(De,Me){var pt=this;return(0,ie.Z)(function*(){return yield pt.keychain.set(De,Me),De})()}getPrivateKey(De){return this.keychain.get(De)}getClientSeed(){var De=this;return(0,ie.Z)(function*(){let Me="";try{Me=De.keychain.get(Xp)}catch{Me=Ye(),yield De.keychain.set(Xp,Me)}return function(Ot,De="utf8"){const Me=Jp[De];if(!Me)throw new Error(`Unsupported encoding "${De}"`);return"utf8"!==De&&"utf-8"!==De||null==globalThis.Buffer||null==globalThis.Buffer.from?Me.decoder.decode(`${Me.prefix}${Ot}`):Yp(globalThis.Buffer.from(Ot,"utf-8"))}(Me,"base16")})()}getSymKey(De){return this.keychain.get(De)}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class f0 extends class{constructor(De,Me){this.logger=De,this.core=Me}}{constructor(De,Me){var pt;super(De,Me),pt=this,this.logger=De,this.core=Me,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){if(!pt.initialized){pt.logger.trace("Initialized");try{const vt=yield pt.getRelayerMessages();typeof vt<"u"&&(pt.messages=vt),pt.logger.debug(`Successfully Restored records for ${pt.name}`),pt.logger.trace({type:"method",method:"restore",size:pt.messages.size})}catch(vt){pt.logger.debug(`Failed to Restore records for ${pt.name}`),pt.logger.error(vt)}finally{pt.initialized=!0}}}),this.set=function(){var vt=(0,ie.Z)(function*(Dt,nn){pt.isInitialized();const Nn=Wt(nn);let Mr=pt.messages.get(Dt);return typeof Mr>"u"&&(Mr={}),typeof Mr[Nn]<"u"||(Mr[Nn]=nn,pt.messages.set(Dt,Mr),yield pt.persist()),Nn});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.get=vt=>{this.isInitialized();let Dt=this.messages.get(vt);return typeof Dt>"u"&&(Dt={}),Dt},this.has=(vt,Dt)=>(this.isInitialized(),typeof this.get(vt)[Wt(Dt)]<"u"),this.del=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),pt.messages.delete(Dt),yield pt.persist()});return function(Dt){return vt.apply(this,arguments)}}(),this.logger=(0,Io.generateChildLogger)(De,this.name),this.core=Me}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setRelayerMessages(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,ji(De))})()}getRelayerMessages(){var De=this;return(0,ie.Z)(function*(){const Me=yield De.core.storage.getItem(De.storageKey);return typeof Me<"u"?so(Me):void 0})()}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setRelayerMessages(De.messages)})()}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class Gf extends la{constructor(De,Me){var pt;super(De,Me),pt=this,this.relayer=De,this.logger=Me,this.events=new q.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,o.toMiliseconds)(o.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){var Mr;pt.logger.debug("Publishing Payload"),pt.logger.trace({type:"method",method:"publish",params:{topic:Dt,message:nn,opts:Nn}});try{const Vr=Nn?.ttl||Pd,Si=Eu(Nn),ls=Nn?.prompt||!1,Oo=Nn?.tag||0,Yo=Nn?.id||(0,Ca.getBigIntRpcId)().toString(),uo={topic:Dt,message:nn,opts:{ttl:Vr,relay:Si,prompt:ls,tag:Oo,id:Yo}},Jo=setTimeout(()=>pt.queue.set(Yo,uo),pt.publishTimeout);try{yield yield Ao(pt.rpcPublish(Dt,nn,Vr,Si,ls,Oo,Yo),pt.publishTimeout,"Failed to publish payload, please try again."),pt.removeRequestFromQueue(Yo),pt.relayer.events.emit("relayer_publish",uo)}catch(Lo){if(pt.logger.debug("Publishing Payload stalled"),pt.needsTransportRestart=!0,null!=(Mr=Nn?.internal)&&Mr.throwOnFailedPublish)throw pt.removeRequestFromQueue(Yo),Lo;return}finally{clearTimeout(Jo)}pt.logger.debug("Successfully Published Payload"),pt.logger.trace({type:"method",method:"publish",params:{topic:Dt,message:nn,opts:Nn}})}catch(Vr){throw pt.logger.debug("Failed to Publish Payload"),pt.logger.error(Vr),Vr}});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.relayer=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.registerEventListeners()}get context(){return(0,Io.getLoggerContext)(this.logger)}rpcPublish(De,Me,pt,vt,Dt,nn,Nn){var Mr,Vr,Si,ls;const Oo={method:jo(vt.protocol).publish,params:{topic:De,message:Me,ttl:pt,prompt:Dt,tag:nn},id:Nn};return Cs(null==(Mr=Oo.params)?void 0:Mr.prompt)&&(null==(Vr=Oo.params)||delete Vr.prompt),Cs(null==(Si=Oo.params)?void 0:Si.tag)&&(null==(ls=Oo.params)||delete ls.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:Oo}),this.relayer.request(Oo)}removeRequestFromQueue(De){this.queue.delete(De)}checkQueue(){var De=this;this.queue.forEach(function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,message:Dt,opts:nn}=pt;yield De.publish(vt,Dt,nn)});return function(pt){return Me.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit("relayer_connection_stalled");this.checkQueue()}),this.relayer.on("relayer_message_ack",De=>{this.removeRequestFromQueue(De.id.toString())})}}class E1{constructor(){this.map=new Map,this.set=(De,Me)=>{const pt=this.get(De);this.exists(De,Me)||this.map.set(De,[...pt,Me])},this.get=De=>this.map.get(De)||[],this.exists=(De,Me)=>this.get(De).includes(Me),this.delete=(De,Me)=>{if(typeof Me>"u")return void this.map.delete(De);if(!this.map.has(De))return;const pt=this.get(De);if(!this.exists(De,Me))return;const vt=pt.filter(Dt=>Dt!==Me);vt.length?this.map.set(De,vt):this.map.delete(De)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var kf=Object.defineProperty,kl=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Bd=Object.getOwnPropertySymbols,q0=Object.prototype.hasOwnProperty,T1=Object.prototype.propertyIsEnumerable,Eh=(Ot,De,Me)=>De in Ot?kf(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Cf=(Ot,De)=>{for(var Me in De||(De={}))q0.call(De,Me)&&Eh(Ot,Me,De[Me]);if(Bd)for(var Me of Bd(De))T1.call(De,Me)&&Eh(Ot,Me,De[Me]);return Ot},ml=(Ot,De)=>kl(Ot,qh(De));class Ep extends rd{constructor(De,Me){var pt;super(De,Me),pt=this,this.relayer=De,this.logger=Me,this.subscriptions=new Map,this.topicMap=new E1,this.events=new q.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=rc,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=(0,ie.Z)(function*(){pt.initialized||(pt.logger.trace("Initialized"),pt.registerEventListeners(),pt.clientId=yield pt.relayer.core.crypto.getClientId())}),this.subscribe=function(){var vt=(0,ie.Z)(function*(Dt,nn){yield pt.restartToComplete(),pt.isInitialized(),pt.logger.debug("Subscribing Topic"),pt.logger.trace({type:"method",method:"subscribe",params:{topic:Dt,opts:nn}});try{const Nn=Eu(nn),Mr={topic:Dt,relay:Nn};pt.pending.set(Dt,Mr);const Vr=yield pt.rpcSubscribe(Dt,Nn);return pt.onSubscribe(Vr,Mr),pt.logger.debug("Successfully Subscribed Topic"),pt.logger.trace({type:"method",method:"subscribe",params:{topic:Dt,opts:nn}}),Vr}catch(Nn){throw pt.logger.debug("Failed to Subscribe Topic"),pt.logger.error(Nn),Nn}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.unsubscribe=function(){var vt=(0,ie.Z)(function*(Dt,nn){yield pt.restartToComplete(),pt.isInitialized(),typeof nn?.id<"u"?yield pt.unsubscribeById(Dt,nn.id,nn):yield pt.unsubscribeByTopic(Dt,nn)});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.isSubscribed=function(){var vt=(0,ie.Z)(function*(Dt){return!!pt.topics.includes(Dt)||(yield new Promise((nn,Nn)=>{const Mr=new o.Watch;Mr.start(pt.pendingSubscriptionWatchLabel);const Vr=setInterval(()=>{!pt.pending.has(Dt)&&pt.topics.includes(Dt)&&(clearInterval(Vr),Mr.stop(pt.pendingSubscriptionWatchLabel),nn(!0)),Mr.elapsed(pt.pendingSubscriptionWatchLabel)>=uc&&(clearInterval(Vr),Mr.stop(pt.pendingSubscriptionWatchLabel),Nn(new Error("Subscription resolution timeout")))},pt.pollingInterval)}).catch(()=>!1))});return function(Dt){return vt.apply(this,arguments)}}(),this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.restart=(0,ie.Z)(function*(){pt.restartInProgress=!0,yield pt.restore(),yield pt.reset(),pt.restartInProgress=!1}),this.relayer=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.clientId=""}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(De,Me){let pt=!1;try{pt=this.getSubscription(De).topic===Me}catch{}return pt}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(De,Me){var pt=this;return(0,ie.Z)(function*(){const vt=pt.topicMap.get(De);yield Promise.all(vt.map(function(){var Dt=(0,ie.Z)(function*(nn){return yield pt.unsubscribeById(De,nn,Me)});return function(nn){return Dt.apply(this,arguments)}}()))})()}unsubscribeById(De,Me,pt){var vt=this;return(0,ie.Z)(function*(){vt.logger.debug("Unsubscribing Topic"),vt.logger.trace({type:"method",method:"unsubscribe",params:{topic:De,id:Me,opts:pt}});try{const Dt=Eu(pt);yield vt.rpcUnsubscribe(De,Me,Dt);const nn=Ir("USER_DISCONNECTED",`${vt.name}, ${De}`);yield vt.onUnsubscribe(De,Me,nn),vt.logger.debug("Successfully Unsubscribed Topic"),vt.logger.trace({type:"method",method:"unsubscribe",params:{topic:De,id:Me,opts:pt}})}catch(Dt){throw vt.logger.debug("Failed to Unsubscribe Topic"),vt.logger.error(Dt),Dt}})()}rpcSubscribe(De,Me){var pt=this;return(0,ie.Z)(function*(){const vt={method:jo(Me.protocol).subscribe,params:{topic:De}};pt.logger.debug("Outgoing Relay Payload"),pt.logger.trace({type:"payload",direction:"outgoing",request:vt});try{yield yield Ao(pt.relayer.request(vt),pt.subscribeTimeout)}catch{pt.logger.debug("Outgoing Relay Subscribe Payload stalled"),pt.relayer.events.emit("relayer_connection_stalled")}return Wt(De+pt.clientId)})()}rpcBatchSubscribe(De){var Me=this;return(0,ie.Z)(function*(){if(!De.length)return;const vt={method:jo(De[0].relay.protocol).batchSubscribe,params:{topics:De.map(Dt=>Dt.topic)}};Me.logger.debug("Outgoing Relay Payload"),Me.logger.trace({type:"payload",direction:"outgoing",request:vt});try{return yield yield Ao(Me.relayer.request(vt),Me.subscribeTimeout)}catch{Me.logger.debug("Outgoing Relay Payload stalled"),Me.relayer.events.emit("relayer_connection_stalled")}})()}rpcUnsubscribe(De,Me,pt){const vt={method:jo(pt.protocol).unsubscribe,params:{topic:De,id:Me}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:vt}),this.relayer.request(vt)}onSubscribe(De,Me){this.setSubscription(De,ml(Cf({},Me),{id:De})),this.pending.delete(Me.topic)}onBatchSubscribe(De){De.length&&De.forEach(Me=>{this.setSubscription(Me.id,Cf({},Me)),this.pending.delete(Me.topic)})}onUnsubscribe(De,Me,pt){var vt=this;return(0,ie.Z)(function*(){vt.events.removeAllListeners(Me),vt.hasSubscription(Me,De)&&vt.deleteSubscription(Me,pt),yield vt.relayer.messages.del(De)})()}setRelayerSubscriptions(De){var Me=this;return(0,ie.Z)(function*(){yield Me.relayer.core.storage.setItem(Me.storageKey,De)})()}getRelayerSubscriptions(){var De=this;return(0,ie.Z)(function*(){return yield De.relayer.core.storage.getItem(De.storageKey)})()}setSubscription(De,Me){this.subscriptions.has(De)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:De,subscription:Me}),this.addSubscription(De,Me))}addSubscription(De,Me){this.subscriptions.set(De,Cf({},Me)),this.topicMap.set(Me.topic,De),this.events.emit(bd_created,Me)}getSubscription(De){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:De});const Me=this.subscriptions.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw new Error(pt)}return Me}deleteSubscription(De,Me){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:De,reason:Me});const pt=this.getSubscription(De);this.subscriptions.delete(De),this.topicMap.delete(pt.topic,De),this.events.emit(bd_deleted,ml(Cf({},pt),{reason:Me}))}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setRelayerSubscriptions(De.values),De.events.emit("subscription_sync")})()}reset(){var De=this;return(0,ie.Z)(function*(){if(De.cached.length){const Me=Math.ceil(De.cached.length/De.batchSubscribeTopicsLimit);for(let pt=0;pt"u"||!Me.length)return;if(De.subscriptions.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),De.logger.error(`${De.name}: ${JSON.stringify(De.values)}`),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored subscriptions for ${De.name}`),De.logger.trace({type:"method",method:"restore",subscriptions:De.values})}catch(Me){De.logger.debug(`Failed to Restore subscriptions for ${De.name}`),De.logger.error(Me)}})()}batchSubscribe(De){var Me=this;return(0,ie.Z)(function*(){if(!De.length)return;const pt=yield Me.rpcBatchSubscribe(De);Ei(pt)&&Me.onBatchSubscribe(pt.map((vt,Dt)=>ml(Cf({},De[Dt]),{id:vt})))})()}onConnect(){var De=this;return(0,ie.Z)(function*(){De.restartInProgress||(yield De.restart(),De.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var De=this;return(0,ie.Z)(function*(){if(!De.initialized||De.relayer.transportExplicitlyClosed)return;const Me=[];De.pending.forEach(pt=>{Me.push(pt)}),yield De.batchSubscribe(Me)})()}registerEventListeners(){var De=this;this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,(0,ie.Z)(function*(){yield De.checkPending()})),this.relayer.on("relayer_connect",(0,ie.Z)(function*(){yield De.onConnect()})),this.relayer.on("relayer_disconnect",()=>{this.onDisconnect()}),this.events.on(bd_created,function(){var Me=(0,ie.Z)(function*(pt){const vt=bd_created;De.logger.info(`Emitting ${vt}`),De.logger.debug({type:"event",event:vt,data:pt}),yield De.persist()});return function(pt){return Me.apply(this,arguments)}}()),this.events.on(bd_deleted,function(){var Me=(0,ie.Z)(function*(pt){const vt=bd_deleted;De.logger.info(`Emitting ${vt}`),De.logger.debug({type:"event",event:vt,data:pt}),yield De.persist()});return function(pt){return Me.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}restartToComplete(){var De=this;return(0,ie.Z)(function*(){De.restartInProgress&&(yield new Promise(Me=>{const pt=setInterval(()=>{De.restartInProgress||(clearInterval(pt),Me())},De.pollingInterval)}))})()}}var Tp=Object.defineProperty,K0=Object.getOwnPropertySymbols,Fl=Object.prototype.hasOwnProperty,zf=Object.prototype.propertyIsEnumerable,Ja=(Ot,De,Me)=>De in Ot?Tp(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me;class e1 extends tc{constructor(De){var Me;super(De),Me=this,this.protocol="wc",this.version=2,this.events=new q.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=function(){var pt=(0,ie.Z)(function*(vt){Me.logger.debug("Publishing Request Payload");try{return yield Me.toEstablishConnection(),yield Me.provider.request(vt)}catch(Dt){throw Me.logger.debug("Failed to Publish Request"),Me.logger.error(Dt),Dt}});return function(vt){return pt.apply(this,arguments)}}(),this.onPayloadHandler=pt=>{this.onProviderPayload(pt)},this.onConnectHandler=()=>{this.events.emit("relayer_connect")},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=pt=>{this.logger.error(pt),this.events.emit("relayer_error",pt),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on("payload",this.onPayloadHandler),this.provider.on("connect",this.onConnectHandler),this.provider.on("disconnect",this.onDisconnectHandler),this.provider.on("error",this.onProviderErrorHandler)},this.core=De.core,this.logger=typeof De.logger<"u"&&"string"!=typeof De.logger?(0,Io.generateChildLogger)(De.logger,this.name):(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De.logger||"error"})),this.messages=new f0(this.logger,De.core),this.subscriber=new Ep(this,this.logger),this.publisher=new Gf(this,this.logger),this.relayUrl=De?.relayUrl||vp,this.projectId=De.projectId,this.provider={}}init(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized"),De.registerEventListeners(),yield De.createProvider(),yield Promise.all([De.messages.init(),De.subscriber.init()]);try{yield De.transportOpen()}catch{De.logger.warn(`Connection via ${De.relayUrl} failed, attempting to connect via failover domain ${c0}...`),yield De.restartTransport(c0)}De.initialized=!0,setTimeout((0,ie.Z)(function*(){0===De.subscriber.topics.length&&(De.logger.info("No topics subscribed to after init, closing transport"),yield De.transportClose(),De.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return(0,Io.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(De,Me,pt){var vt=this;return(0,ie.Z)(function*(){vt.isInitialized(),yield vt.publisher.publish(De,Me,pt),yield vt.recordMessageEvent({topic:De,message:Me,publishedAt:Date.now()})})()}subscribe(De,Me){var pt=this;return(0,ie.Z)(function*(){var vt;pt.isInitialized();let Dt=(null==(vt=pt.subscriber.topicMap.get(De))?void 0:vt[0])||"";return Dt||(yield Promise.all([new Promise(nn=>{pt.subscriber.once(bd_created,Nn=>{Nn.topic===De&&nn()})}),new Promise(function(){var nn=(0,ie.Z)(function*(Nn){Dt=yield pt.subscriber.subscribe(De,Me),Nn()});return function(Nn){return nn.apply(this,arguments)}}())]),Dt)})()}unsubscribe(De,Me){var pt=this;return(0,ie.Z)(function*(){pt.isInitialized(),yield pt.subscriber.unsubscribe(De,Me)})()}on(De,Me){this.events.on(De,Me)}once(De,Me){this.events.once(De,Me)}off(De,Me){this.events.off(De,Me)}removeListener(De,Me){this.events.removeListener(De,Me)}transportClose(){var De=this;return(0,ie.Z)(function*(){De.transportExplicitlyClosed=!0,De.hasExperiencedNetworkDisruption&&De.connected?yield Ao(De.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>De.onProviderDisconnect()):De.connected&&(yield De.provider.disconnect())})()}transportOpen(De){var Me=this;return(0,ie.Z)(function*(){if(Me.transportExplicitlyClosed=!1,yield Me.confirmOnlineStateOrThrow(),!Me.connectionAttemptInProgress){De&&De!==Me.relayUrl&&(Me.relayUrl=De,yield Me.transportClose(),yield Me.createProvider()),Me.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(pt=>{if(!Me.initialized)return pt();Me.subscriber.once("subscription_resubscribed",()=>{pt()})}),new Promise(function(){var pt=(0,ie.Z)(function*(vt,Dt){try{yield Ao(Me.provider.connect(),1e4,`Socket stalled when trying to connect to ${Me.relayUrl}`)}catch(nn){return void Dt(nn)}vt()});return function(vt,Dt){return pt.apply(this,arguments)}}())])}catch(pt){if(Me.logger.error(pt),!Me.isConnectionStalled(pt.message))throw pt;Me.provider.events.emit("disconnect")}finally{Me.connectionAttemptInProgress=!1,Me.hasExperiencedNetworkDisruption=!1}}})()}restartTransport(De){var Me=this;return(0,ie.Z)(function*(){yield Me.confirmOnlineStateOrThrow(),!Me.connectionAttemptInProgress&&(Me.relayUrl=De||Me.relayUrl,yield Me.transportClose(),yield Me.createProvider(),yield Me.transportOpen())})()}confirmOnlineStateOrThrow(){return(0,ie.Z)(function*(){if(!(yield Gc()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}isConnectionStalled(De){return this.staleConnectionErrors.some(Me=>De.includes(Me))}createProvider(){var De=this;return(0,ie.Z)(function*(){De.provider.connection&&De.unregisterProviderListeners();const Me=yield De.core.crypto.signJWT(De.relayUrl);De.provider=new fd.r(new Or.Z(function({protocol:Ot,version:De,relayUrl:Me,sdkVersion:pt,auth:vt,projectId:Dt,useOnCloseEvent:nn}){const Nn=Me.split("?"),Mr=wi(Ot,De,pt),Si=function(Ot,De){let Me=v.parse(Ot);return Me=bn(bn({},Me),De),v.stringify(Me)}(Nn[1]||"",{auth:vt,ua:Mr,projectId:Dt,useOnCloseEvent:nn||void 0});return Nn[0]+"?"+Si}({sdkVersion:"2.10.1",protocol:De.protocol,version:De.version,relayUrl:De.relayUrl,projectId:De.projectId,auth:Me,useOnCloseEvent:!0}))),De.registerProviderListeners()})()}recordMessageEvent(De){var Me=this;return(0,ie.Z)(function*(){const{topic:pt,message:vt}=De;yield Me.messages.set(pt,vt)})()}shouldIgnoreMessageEvent(De){var Me=this;return(0,ie.Z)(function*(){const{topic:pt,message:vt}=De;if(!vt||0===vt.length)return Me.logger.debug(`Ignoring invalid/empty message: ${vt}`),!0;if(!(yield Me.subscriber.isSubscribed(pt)))return Me.logger.debug(`Ignoring message for non-subscribed topic ${pt}`),!0;const Dt=Me.messages.has(pt,vt);return Dt&&Me.logger.debug(`Ignoring duplicate message: ${vt}`),Dt})()}onProviderPayload(De){var Me=this;return(0,ie.Z)(function*(){if(Me.logger.debug("Incoming Relay Payload"),Me.logger.trace({type:"payload",direction:"incoming",payload:De}),(0,Ca.isJsonRpcRequest)(De)){if(!De.method.endsWith("_subscription"))return;const pt=De.params,{topic:vt,message:Dt,publishedAt:nn}=pt.data,Nn={topic:vt,message:Dt,publishedAt:nn};Me.logger.debug("Emitting Relayer Payload"),Me.logger.trace(((Ot,De)=>{for(var Me in De||(De={}))Fl.call(De,Me)&&Ja(Ot,Me,De[Me]);if(K0)for(var Me of K0(De))zf.call(De,Me)&&Ja(Ot,Me,De[Me]);return Ot})({type:"event",event:pt.id},Nn)),Me.events.emit(pt.id,Nn),yield Me.acknowledgePayload(De),yield Me.onMessageEvent(Nn)}else(0,Ca.isJsonRpcResponse)(De)&&Me.events.emit("relayer_message_ack",De)})()}onMessageEvent(De){var Me=this;return(0,ie.Z)(function*(){(yield Me.shouldIgnoreMessageEvent(De))||(Me.events.emit("relayer_message",De),yield Me.recordMessageEvent(De))})()}acknowledgePayload(De){var Me=this;return(0,ie.Z)(function*(){const pt=(0,Ca.formatJsonRpcResult)(De.id,!0);yield Me.provider.connection.send(pt)})()}unregisterProviderListeners(){this.provider.off("payload",this.onPayloadHandler),this.provider.off("connect",this.onConnectHandler),this.provider.off("disconnect",this.onDisconnectHandler),this.provider.off("error",this.onProviderErrorHandler)}registerEventListeners(){var De=this;return(0,ie.Z)(function*(){De.events.on("relayer_connection_stalled",()=>{De.restartTransport().catch(pt=>De.logger.error(pt))});let Me=yield Gc();!function(Ot){switch(br()){case"browser":!function(Ot){ar()&&(window.addEventListener("online",()=>Ot(!0)),window.addEventListener("offline",()=>Ot(!1)))}(Ot);break;case"react-native":!function(Ot){Vi()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(De=>Ot(De?.isConnected))}(Ot)}}(function(){var pt=(0,ie.Z)(function*(vt){De.initialized&&Me!==vt&&(Me=vt,vt?yield De.restartTransport().catch(Dt=>De.logger.error(Dt)):(De.hasExperiencedNetworkDisruption=!0,yield De.transportClose().catch(Dt=>De.logger.error(Dt))))});return function(vt){return pt.apply(this,arguments)}}())})()}onProviderDisconnect(){this.events.emit("relayer_disconnect"),this.attemptToReconnect()}attemptToReconnect(){var De=this;this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((0,ie.Z)(function*(){yield De.restartTransport().catch(Me=>De.logger.error(Me))}),(0,o.toMiliseconds)(Wf)))}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}toEstablishConnection(){var De=this;return(0,ie.Z)(function*(){if(yield De.confirmOnlineStateOrThrow(),!De.connected){if(De.connectionAttemptInProgress)return yield new Promise(Me=>{const pt=setInterval(()=>{De.connected&&(clearInterval(pt),Me())},De.connectionStatusPollingInterval)});yield De.restartTransport()}})()}}var Je=Object.defineProperty,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,We=(Ot,De,Me)=>De in Ot?Je(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Xe=(Ot,De)=>{for(var Me in De||(De={}))Pe.call(De,Me)&&We(Ot,Me,De[Me]);if(oe)for(var Me of oe(De))He.call(De,Me)&&We(Ot,Me,De[Me]);return Ot};class at extends class{constructor(De,Me,pt,vt){this.core=De,this.logger=Me,this.name=pt}}{constructor(De,Me,pt,vt=rc,Dt){var nn;super(De,Me,pt,vt),nn=this,this.core=De,this.logger=Me,this.name=pt,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){nn.initialized||(nn.logger.trace("Initialized"),yield nn.restore(),nn.cached.forEach(Nn=>{nn.getKey&&null!==Nn&&!Cs(Nn)?nn.map.set(nn.getKey(Nn),Nn):function(Ot){var De;return null==(De=Ot?.proposer)?void 0:De.publicKey}(Nn)?nn.map.set(Nn.id,Nn):Nn?.topic&&nn.map.set(Nn.topic,Nn)}),nn.cached=[],nn.initialized=!0)}),this.set=function(){var Nn=(0,ie.Z)(function*(Mr,Vr){nn.isInitialized(),nn.map.has(Mr)?yield nn.update(Mr,Vr):(nn.logger.debug("Setting value"),nn.logger.trace({type:"method",method:"set",key:Mr,value:Vr}),nn.map.set(Mr,Vr),yield nn.persist())});return function(Mr,Vr){return Nn.apply(this,arguments)}}(),this.get=Nn=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:Nn}),this.getData(Nn)),this.getAll=Nn=>(this.isInitialized(),Nn?this.values.filter(Mr=>Object.keys(Nn).every(Vr=>ii()(Mr[Vr],Nn[Vr]))):this.values),this.update=function(){var Nn=(0,ie.Z)(function*(Mr,Vr){nn.isInitialized(),nn.logger.debug("Updating value"),nn.logger.trace({type:"method",method:"update",key:Mr,update:Vr});const Si=Xe(Xe({},nn.getData(Mr)),Vr);nn.map.set(Mr,Si),yield nn.persist()});return function(Mr,Vr){return Nn.apply(this,arguments)}}(),this.delete=function(){var Nn=(0,ie.Z)(function*(Mr,Vr){nn.isInitialized(),nn.map.has(Mr)&&(nn.logger.debug("Deleting value"),nn.logger.trace({type:"method",method:"delete",key:Mr,reason:Vr}),nn.map.delete(Mr),yield nn.persist())});return function(Mr,Vr){return Nn.apply(this,arguments)}}(),this.logger=(0,Io.generateChildLogger)(Me,this.name),this.storagePrefix=vt,this.getKey=Dt}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,De)})()}getDataStore(){var De=this;return(0,ie.Z)(function*(){return yield De.core.storage.getItem(De.storageKey)})()}getData(De){const Me=this.map.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw this.logger.error(pt),new Error(pt)}return Me}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setDataStore(De.values)})()}restore(){var De=this;return(0,ie.Z)(function*(){try{const Me=yield De.getDataStore();if(typeof Me>"u"||!Me.length)return;if(De.map.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored value for ${De.name}`),De.logger.trace({type:"method",method:"restore",value:De.values})}catch(Me){De.logger.debug(`Failed to Restore value for ${De.name}`),De.logger.error(Me)}})()}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class _t{constructor(De,Me){var pt=this;this.core=De,this.logger=Me,this.name="pairing",this.version="0.3",this.events=new(O()),this.initialized=!1,this.storagePrefix=rc,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=(0,ie.Z)(function*(){pt.initialized||(yield pt.pairings.init(),yield pt.cleanup(),pt.registerRelayerEvents(),pt.registerExpirerEvents(),pt.initialized=!0,pt.logger.trace("Initialized"))}),this.register=({methods:vt})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...vt])]},this.create=(0,ie.Z)(function*(){pt.isInitialized();const vt=Ye(),Dt=yield pt.core.crypto.setSymKey(vt),nn=Qa(o.FIVE_MINUTES),Nn={protocol:"irn"},Mr={topic:Dt,expiry:nn,relay:Nn,active:!1},Vr=function(Ot){return`${Ot.protocol}:${Ot.topic}@${Ot.version}?`+v.stringify(((Ot,De)=>{for(var Me in De||(De={}))El.call(De,Me)&&kc(Ot,Me,De[Me]);if(Vc)for(var Me of Vc(De))ec.call(De,Me)&&kc(Ot,Me,De[Me]);return Ot})({symKey:Ot.symKey},function(Ot,De="-"){const pt={};return Object.keys(Ot).forEach(vt=>{Ot[vt]&&(pt["relay"+De+vt]=Ot[vt])}),pt}(Ot.relay)))}({protocol:pt.core.protocol,version:pt.core.version,topic:Dt,symKey:vt,relay:Nn});return yield pt.pairings.set(Dt,Mr),yield pt.core.relayer.subscribe(Dt),pt.core.expirer.set(Dt,nn),{topic:Dt,uri:Vr}}),this.pair=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),pt.isValidPair(Dt);const{topic:nn,symKey:Nn,relay:Mr}=function(Ot){const De=Ot.indexOf(":"),Me=-1!==Ot.indexOf("?")?Ot.indexOf("?"):void 0,pt=Ot.substring(0,De),vt=Ot.substring(De+1,Me).split("@"),Dt=typeof Me<"u"?Ot.substring(Me):"",nn=v.parse(Dt);return{protocol:pt,topic:aa(vt[0]),version:parseInt(vt[1],10),symKey:nn.symKey,relay:eu(nn)}}(Dt.uri);let Vr;if(pt.pairings.keys.includes(nn)&&(Vr=pt.pairings.get(nn),Vr.active))throw new Error(`Pairing already exists: ${nn}. Please try again with a new connection URI.`);pt.core.crypto.keychain.has(nn)||(yield pt.core.crypto.setSymKey(Nn,nn),yield pt.core.relayer.subscribe(nn,{relay:Mr}));const Si=Qa(o.FIVE_MINUTES),ls={topic:nn,relay:Mr,expiry:Si,active:!1};return yield pt.pairings.set(nn,ls),pt.core.expirer.set(nn,Si),Dt.activatePairing&&(yield pt.activate({topic:nn})),pt.events.emit("pairing_create",ls),ls});return function(Dt){return vt.apply(this,arguments)}}(),this.activate=function(){var vt=(0,ie.Z)(function*({topic:Dt}){pt.isInitialized();const nn=Qa(o.THIRTY_DAYS);yield pt.pairings.update(Dt,{active:!0,expiry:nn}),pt.core.expirer.set(Dt,nn)});return function(Dt){return vt.apply(this,arguments)}}(),this.ping=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),yield pt.isValidPing(Dt);const{topic:nn}=Dt;if(pt.pairings.keys.includes(nn)){const Nn=yield pt.sendRequest(nn,"wc_pairingPing",{}),{done:Mr,resolve:Vr,reject:Si}=_s();pt.events.once(xa("pairing_ping",Nn),({error:ls})=>{ls?Si(ls):Vr()}),yield Mr()}});return function(Dt){return vt.apply(this,arguments)}}(),this.updateExpiry=function(){var vt=(0,ie.Z)(function*({topic:Dt,expiry:nn}){pt.isInitialized(),yield pt.pairings.update(Dt,{expiry:nn})});return function(Dt){return vt.apply(this,arguments)}}(),this.updateMetadata=function(){var vt=(0,ie.Z)(function*({topic:Dt,metadata:nn}){pt.isInitialized(),yield pt.pairings.update(Dt,{peerMetadata:nn})});return function(Dt){return vt.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var vt=(0,ie.Z)(function*(Dt){pt.isInitialized(),yield pt.isValidDisconnect(Dt);const{topic:nn}=Dt;pt.pairings.keys.includes(nn)&&(yield pt.sendRequest(nn,"wc_pairingDelete",Ir("USER_DISCONNECTED")),yield pt.deletePairing(nn))});return function(Dt){return vt.apply(this,arguments)}}(),this.sendRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){const Mr=(0,Ca.formatJsonRpcRequest)(nn,Nn),Vr=yield pt.core.crypto.encode(Dt,Mr),Si=qc[nn].req;return pt.core.history.set(Dt,Mr),pt.core.relayer.publish(Dt,Vr,Si),Mr.id});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.sendResult=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){const Mr=(0,Ca.formatJsonRpcResult)(Dt,Nn),Vr=yield pt.core.crypto.encode(nn,Mr),Si=yield pt.core.history.get(nn,Dt),ls=qc[Si.request.method].res;yield pt.core.relayer.publish(nn,Vr,ls),yield pt.core.history.resolve(Mr)});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.sendError=function(){var vt=(0,ie.Z)(function*(Dt,nn,Nn){const Mr=(0,Ca.formatJsonRpcError)(Dt,Nn),Vr=yield pt.core.crypto.encode(nn,Mr),Si=yield pt.core.history.get(nn,Dt),ls=qc[Si.request.method]?qc[Si.request.method].res:qc.unregistered_method.res;yield pt.core.relayer.publish(nn,Vr,ls),yield pt.core.history.resolve(Mr)});return function(Dt,nn,Nn){return vt.apply(this,arguments)}}(),this.deletePairing=function(){var vt=(0,ie.Z)(function*(Dt,nn){yield pt.core.relayer.unsubscribe(Dt),yield Promise.all([pt.pairings.delete(Dt,Ir("USER_DISCONNECTED")),pt.core.crypto.deleteSymKey(Dt),nn?Promise.resolve():pt.core.expirer.del(Dt)])});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.cleanup=(0,ie.Z)(function*(){const vt=pt.pairings.getAll().filter(Dt=>ja(Dt.expiry));yield Promise.all(vt.map(Dt=>pt.deletePairing(Dt.topic)))}),this.onRelayEventRequest=vt=>{const{topic:Dt,payload:nn}=vt;switch(nn.method){case"wc_pairingPing":return this.onPairingPingRequest(Dt,nn);case"wc_pairingDelete":return this.onPairingDeleteRequest(Dt,nn);default:return this.onUnknownRpcMethodRequest(Dt,nn)}},this.onRelayEventResponse=function(){var vt=(0,ie.Z)(function*(Dt){const{topic:nn,payload:Nn}=Dt,Mr=(yield pt.core.history.get(nn,Nn.id)).request.method;return"wc_pairingPing"===Mr?pt.onPairingPingResponse(nn,Nn):pt.onUnknownRpcMethodResponse(Mr)});return function(Dt){return vt.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn){const{id:Nn}=nn;try{pt.isValidPing({topic:Dt}),yield pt.sendResult(Nn,Dt,!0),pt.events.emit("pairing_ping",{id:Nn,topic:Dt})}catch(Mr){yield pt.sendError(Nn,Dt,Mr),pt.logger.error(Mr)}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.onPairingPingResponse=(vt,Dt)=>{const{id:nn}=Dt;setTimeout(()=>{(0,Ca.isJsonRpcResult)(Dt)?this.events.emit(xa("pairing_ping",nn),{}):(0,Ca.isJsonRpcError)(Dt)&&this.events.emit(xa("pairing_ping",nn),{error:Dt.error})},500)},this.onPairingDeleteRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn){const{id:Nn}=nn;try{pt.isValidDisconnect({topic:Dt}),yield pt.deletePairing(Dt),pt.events.emit("pairing_delete",{id:Nn,topic:Dt})}catch(Mr){yield pt.sendError(Nn,Dt,Mr),pt.logger.error(Mr)}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var vt=(0,ie.Z)(function*(Dt,nn){const{id:Nn,method:Mr}=nn;try{if(pt.registeredMethods.includes(Mr))return;const Vr=Ir("WC_METHOD_UNSUPPORTED",Mr);yield pt.sendError(Nn,Dt,Vr),pt.logger.error(Vr)}catch(Vr){yield pt.sendError(Nn,Dt,Vr),pt.logger.error(Vr)}});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=vt=>{this.registeredMethods.includes(vt)||this.logger.error(Ir("WC_METHOD_UNSUPPORTED",vt))},this.isValidPair=vt=>{if(!nr(vt)){const{message:Dt}=Cn("MISSING_OR_INVALID",`pair() params: ${vt}`);throw new Error(Dt)}if(!function(Ot){if(zs(Ot,!1))try{return typeof new URL(Ot)<"u"}catch{return!1}return!1}(vt.uri)){const{message:Dt}=Cn("MISSING_OR_INVALID",`pair() uri: ${vt.uri}`);throw new Error(Dt)}},this.isValidPing=function(){var vt=(0,ie.Z)(function*(Dt){if(!nr(Dt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`ping() params: ${Dt}`);throw new Error(Nn)}const{topic:nn}=Dt;yield pt.isValidPairingTopic(nn)});return function(Dt){return vt.apply(this,arguments)}}(),this.isValidDisconnect=function(){var vt=(0,ie.Z)(function*(Dt){if(!nr(Dt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`disconnect() params: ${Dt}`);throw new Error(Nn)}const{topic:nn}=Dt;yield pt.isValidPairingTopic(nn)});return function(Dt){return vt.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var vt=(0,ie.Z)(function*(Dt){if(!zs(Dt,!1)){const{message:nn}=Cn("MISSING_OR_INVALID",`pairing topic should be a string: ${Dt}`);throw new Error(nn)}if(!pt.pairings.keys.includes(Dt)){const{message:nn}=Cn("NO_MATCHING_KEY",`pairing topic doesn't exist: ${Dt}`);throw new Error(nn)}if(ja(pt.pairings.get(Dt).expiry)){yield pt.deletePairing(Dt);const{message:nn}=Cn("EXPIRED",`pairing topic: ${Dt}`);throw new Error(nn)}});return function(Dt){return vt.apply(this,arguments)}}(),this.core=De,this.logger=(0,Io.generateChildLogger)(Me,this.name),this.pairings=new at(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Io.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}registerRelayerEvents(){var De=this;this.core.relayer.on("relayer_message",function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,message:Dt}=pt;if(!De.pairings.keys.includes(vt)||De.ignoredPayloadTypes.includes(De.core.crypto.getPayloadType(Dt)))return;const nn=yield De.core.crypto.decode(vt,Dt);try{(0,Ca.isJsonRpcRequest)(nn)?(De.core.history.set(vt,nn),De.onRelayEventRequest({topic:vt,payload:nn})):(0,Ca.isJsonRpcResponse)(nn)&&(yield De.core.history.resolve(nn),yield De.onRelayEventResponse({topic:vt,payload:nn}),De.core.history.delete(vt,nn.id))}catch(Nn){De.logger.error(Nn)}});return function(pt){return Me.apply(this,arguments)}}())}registerExpirerEvents(){var De=this;this.core.expirer.on(Nd_expired,function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt}=Lu(pt.target);vt&&De.pairings.keys.includes(vt)&&(yield De.deletePairing(vt,!0),De.events.emit("pairing_expire",{topic:vt}))});return function(pt){return Me.apply(this,arguments)}}())}}class xt extends Bo{constructor(De,Me){var pt;super(De,Me),pt=this,this.core=De,this.logger=Me,this.records=new Map,this.events=new q.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){pt.initialized||(pt.logger.trace("Initialized"),yield pt.restore(),pt.cached.forEach(vt=>pt.records.set(vt.id,vt)),pt.cached=[],pt.registerEventListeners(),pt.initialized=!0)}),this.set=(vt,Dt,nn)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:vt,request:Dt,chainId:nn}),this.records.has(Dt.id))return;const Nn={id:Dt.id,topic:vt,request:{method:Dt.method,params:Dt.params||null},chainId:nn,expiry:Qa(o.THIRTY_DAYS)};this.records.set(Nn.id,Nn),this.events.emit("history_created",Nn)},this.resolve=function(){var vt=(0,ie.Z)(function*(Dt){if(pt.isInitialized(),pt.logger.debug("Updating JSON-RPC response history record"),pt.logger.trace({type:"method",method:"update",response:Dt}),!pt.records.has(Dt.id))return;const nn=yield pt.getRecord(Dt.id);typeof nn.response>"u"&&(nn.response=(0,Ca.isJsonRpcError)(Dt)?{error:Dt.error}:{result:Dt.result},pt.records.set(nn.id,nn),pt.events.emit("history_updated",nn))});return function(Dt){return vt.apply(this,arguments)}}(),this.get=function(){var vt=(0,ie.Z)(function*(Dt,nn){return pt.isInitialized(),pt.logger.debug("Getting record"),pt.logger.trace({type:"method",method:"get",topic:Dt,id:nn}),yield pt.getRecord(nn)});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.delete=(vt,Dt)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:Dt}),this.values.forEach(nn=>{if(nn.topic===vt){if(typeof Dt<"u"&&nn.id!==Dt)return;this.records.delete(nn.id),this.events.emit("history_deleted",nn)}})},this.exists=function(){var vt=(0,ie.Z)(function*(Dt,nn){return pt.isInitialized(),!!pt.records.has(nn)&&(yield pt.getRecord(nn)).topic===Dt});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.logger=(0,Io.generateChildLogger)(Me,this.name)}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const De=[];return this.values.forEach(Me=>{if(typeof Me.response<"u")return;const pt={topic:Me.topic,request:(0,Ca.formatJsonRpcRequest)(Me.request.method,Me.request.params,Me.id),chainId:Me.chainId};return De.push(pt)}),De}setJsonRpcRecords(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,De)})()}getJsonRpcRecords(){var De=this;return(0,ie.Z)(function*(){return yield De.core.storage.getItem(De.storageKey)})()}getRecord(De){this.isInitialized();const Me=this.records.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw new Error(pt)}return Me}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setJsonRpcRecords(De.values),De.events.emit("history_sync")})()}restore(){var De=this;return(0,ie.Z)(function*(){try{const Me=yield De.getJsonRpcRecords();if(typeof Me>"u"||!Me.length)return;if(De.records.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored records for ${De.name}`),De.logger.trace({type:"method",method:"restore",records:De.values})}catch(Me){De.logger.debug(`Failed to Restore records for ${De.name}`),De.logger.error(Me)}})()}registerEventListeners(){this.events.on("history_created",De=>{const Me="history_created";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,record:De}),this.persist()}),this.events.on("history_updated",De=>{const Me="history_updated";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,record:De}),this.persist()}),this.events.on("history_deleted",De=>{const Me="history_deleted";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,record:De}),this.persist()}),this.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(De=>{(0,o.toMiliseconds)(De.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${De.id}`),this.delete(De.topic,De.id))})}catch(De){this.logger.warn(De)}}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class $t extends Nc{constructor(De,Me){var pt;super(De,Me),pt=this,this.core=De,this.logger=Me,this.expirations=new Map,this.events=new q.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=rc,this.init=(0,ie.Z)(function*(){pt.initialized||(pt.logger.trace("Initialized"),yield pt.restore(),pt.cached.forEach(vt=>pt.expirations.set(vt.target,vt)),pt.cached=[],pt.registerEventListeners(),pt.initialized=!0)}),this.has=vt=>{try{const Dt=this.formatTarget(vt);return typeof this.getExpiration(Dt)<"u"}catch{return!1}},this.set=(vt,Dt)=>{this.isInitialized();const nn=this.formatTarget(vt),Nn={target:nn,expiry:Dt};this.expirations.set(nn,Nn),this.checkExpiry(nn,Nn),this.events.emit("expirer_created",{target:nn,expiration:Nn})},this.get=vt=>{this.isInitialized();const Dt=this.formatTarget(vt);return this.getExpiration(Dt)},this.del=vt=>{if(this.isInitialized(),this.has(vt)){const Dt=this.formatTarget(vt),nn=this.getExpiration(Dt);this.expirations.delete(Dt),this.events.emit("expirer_deleted",{target:Dt,expiration:nn})}},this.on=(vt,Dt)=>{this.events.on(vt,Dt)},this.once=(vt,Dt)=>{this.events.once(vt,Dt)},this.off=(vt,Dt)=>{this.events.off(vt,Dt)},this.removeListener=(vt,Dt)=>{this.events.removeListener(vt,Dt)},this.logger=(0,Io.generateChildLogger)(Me,this.name)}get context(){return(0,Io.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(De){if("string"==typeof De)return zi("topic",De);if("number"==typeof De)return function(Ot){return zi("id",Ot)}(De);const{message:Me}=Cn("UNKNOWN_TYPE","Target type: "+typeof De);throw new Error(Me)}setExpirations(De){var Me=this;return(0,ie.Z)(function*(){yield Me.core.storage.setItem(Me.storageKey,De)})()}getExpirations(){var De=this;return(0,ie.Z)(function*(){return yield De.core.storage.getItem(De.storageKey)})()}persist(){var De=this;return(0,ie.Z)(function*(){yield De.setExpirations(De.values),De.events.emit("expirer_sync")})()}restore(){var De=this;return(0,ie.Z)(function*(){try{const Me=yield De.getExpirations();if(typeof Me>"u"||!Me.length)return;if(De.expirations.size){const{message:pt}=Cn("RESTORE_WILL_OVERRIDE",De.name);throw De.logger.error(pt),new Error(pt)}De.cached=Me,De.logger.debug(`Successfully Restored expirations for ${De.name}`),De.logger.trace({type:"method",method:"restore",expirations:De.values})}catch(Me){De.logger.debug(`Failed to Restore expirations for ${De.name}`),De.logger.error(Me)}})()}getExpiration(De){const Me=this.expirations.get(De);if(!Me){const{message:pt}=Cn("NO_MATCHING_KEY",`${this.name}: ${De}`);throw this.logger.error(pt),new Error(pt)}return Me}checkExpiry(De,Me){const{expiry:pt}=Me;(0,o.toMiliseconds)(pt)-Date.now()<=0&&this.expire(De,Me)}expire(De,Me){this.expirations.delete(De),this.events.emit(Nd_expired,{target:De,expiration:Me})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((De,Me)=>this.checkExpiry(Me,De))}registerEventListeners(){this.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on("expirer_created",De=>{const Me="expirer_created";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,data:De}),this.persist()}),this.events.on(Nd_expired,De=>{const Me=Nd_expired;this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,data:De}),this.persist()}),this.events.on("expirer_deleted",De=>{const Me="expirer_deleted";this.logger.info(`Emitting ${Me}`),this.logger.debug({type:"event",event:Me,data:De}),this.persist()})}isInitialized(){if(!this.initialized){const{message:De}=Cn("NOT_INITIALIZED",this.name);throw new Error(De)}}}class cn extends class{constructor(De,Me){this.projectId=De,this.logger=Me}}{constructor(De,Me){var pt;super(De,Me),pt=this,this.projectId=De,this.logger=Me,this.name=I0,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var vt=(0,ie.Z)(function*(Dt){if(pt.verifyDisabled||Vi()||!ar())return;const nn=Dt?.verifyUrl||z0;pt.verifyUrl!==nn&&pt.removeIframe(),pt.verifyUrl=nn;try{yield pt.createIframe()}catch(Nn){pt.logger.info(`Verify iframe failed to load: ${pt.verifyUrl}`),pt.logger.info(Nn)}if(!pt.initialized){pt.removeIframe(),pt.verifyUrl=zh;try{yield pt.createIframe()}catch(Nn){pt.logger.info(`Verify iframe failed to load: ${pt.verifyUrl}`),pt.logger.info(Nn),pt.verifyDisabled=!0}}});return function(Dt){return vt.apply(this,arguments)}}(),this.register=function(){var vt=(0,ie.Z)(function*(Dt){pt.initialized?pt.sendPost(Dt.attestationId):(pt.addToQueue(Dt.attestationId),yield pt.init())});return function(Dt){return vt.apply(this,arguments)}}(),this.resolve=function(){var vt=(0,ie.Z)(function*(Dt){if(pt.isDevEnv)return"";const nn=Dt?.verifyUrl||z0;let Nn;try{Nn=yield pt.fetchAttestation(Dt.attestationId,nn)}catch(Mr){pt.logger.info(`failed to resolve attestation: ${Dt.attestationId} from url: ${nn}`),pt.logger.info(Mr),Nn=yield pt.fetchAttestation(Dt.attestationId,zh)}return Nn});return function(Dt){return vt.apply(this,arguments)}}(),this.fetchAttestation=function(){var vt=(0,ie.Z)(function*(Dt,nn){pt.logger.info(`resolving attestation: ${Dt} from url: ${nn}`);const Nn=pt.startAbortTimer(2*o.ONE_SECOND),Mr=yield fetch(`${nn}/attestation/${Dt}`,{signal:pt.abortController.signal});return clearTimeout(Nn),200===Mr.status?yield Mr.json():void 0});return function(Dt,nn){return vt.apply(this,arguments)}}(),this.addToQueue=vt=>{this.queue.push(vt)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(vt=>this.sendPost(vt)),this.queue=[])},this.sendPost=vt=>{var Dt;try{if(!this.iframe)return;null==(Dt=this.iframe.contentWindow)||Dt.postMessage(vt,"*"),this.logger.info(`postMessage sent: ${vt} ${this.verifyUrl}`)}catch{}},this.createIframe=(0,ie.Z)(function*(){let vt;const Dt=nn=>{"verify_ready"===nn.data&&(pt.initialized=!0,pt.processQueue(),window.removeEventListener("message",Dt),vt())};yield Promise.race([new Promise(nn=>{if(document.getElementById(I0))return nn();window.addEventListener("message",Dt);const Nn=document.createElement("iframe");Nn.id=I0,Nn.src=`${pt.verifyUrl}/${pt.projectId}`,Nn.style.display="none",document.body.append(Nn),pt.iframe=Nn,vt=nn}),new Promise((nn,Nn)=>setTimeout(()=>{window.removeEventListener("message",Dt),Nn("verify iframe load timeout")},(0,o.toMiliseconds)(o.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.logger=(0,Io.generateChildLogger)(Me,this.name),this.verifyUrl=z0,this.abortController=new AbortController,this.isDevEnv=Qn()&&process.env.IS_VITEST}get context(){return(0,Io.getLoggerContext)(this.logger)}startAbortTimer(De){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,o.toMiliseconds)(De))}}var In=Object.defineProperty,Rn=Object.getOwnPropertySymbols,hr=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,ni=(Ot,De,Me)=>De in Ot?In(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Fi=(Ot,De)=>{for(var Me in De||(De={}))hr.call(De,Me)&&ni(Ot,Me,De[Me]);if(Rn)for(var Me of Rn(De))jr.call(De,Me)&&ni(Ot,Me,De[Me]);return Ot};class Nr extends $o{constructor(De){super(De),this.protocol="wc",this.version=2,this.name="core",this.events=new q.EventEmitter,this.initialized=!1,this.on=(pt,vt)=>this.events.on(pt,vt),this.once=(pt,vt)=>this.events.once(pt,vt),this.off=(pt,vt)=>this.events.off(pt,vt),this.removeListener=(pt,vt)=>this.events.removeListener(pt,vt),this.projectId=De?.projectId,this.relayUrl=De?.relayUrl||vp;const Me=typeof De?.logger<"u"&&"string"!=typeof De?.logger?De.logger:(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De?.logger||"error"}));this.logger=(0,Io.generateChildLogger)(Me,this.name),this.heartbeat=new Eo.HeartBeat,this.crypto=new xh(this,this.logger,De?.keychain),this.history=new xt(this,this.logger),this.expirer=new $t(this,this.logger),this.storage=null!=De&&De.storage?De.storage:new Dr.ZP(Fi(Fi({},rm),De?.storageOptions)),this.relayer=new e1({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new _t(this,this.logger),this.verify=new cn(this.projectId||"",this.logger)}static init(De){return(0,ie.Z)(function*(){const Me=new Nr(De);yield Me.initialize();const pt=yield Me.crypto.getClientId();return yield Me.storage.setItem("WALLETCONNECT_CLIENT_ID",pt),Me})()}get context(){return(0,Io.getLoggerContext)(this.logger)}start(){var De=this;return(0,ie.Z)(function*(){De.initialized||(yield De.initialize())})()}initialize(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized");try{yield De.crypto.init(),yield De.history.init(),yield De.expirer.init(),yield De.relayer.init(),yield De.heartbeat.init(),yield De.pairing.init(),De.initialized=!0,De.logger.info("Core Initialization Success")}catch(Me){throw De.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,Me),De.logger.error(Me.message),Me}})()}}const Ci=Nr,Ba="wc@2:client:",di="WALLETCONNECT_DEEPLINK_CHOICE",Ke="Proposal expired",Mt=o.SEVEN_DAYS,Ht={wc_sessionPropose:{req:{ttl:o.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:o.ONE_DAY,prompt:!1,tag:1104},res:{ttl:o.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:o.ONE_DAY,prompt:!1,tag:1106},res:{ttl:o.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:o.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:o.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:o.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:o.ONE_DAY,prompt:!1,tag:1112},res:{ttl:o.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:o.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:o.THIRTY_SECONDS,prompt:!1,tag:1115}}},un={min:o.FIVE_MINUTES,max:o.SEVEN_DAYS},Zn=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var fr=Object.defineProperty,zr=Object.defineProperties,ci=Object.getOwnPropertyDescriptors,ai=Object.getOwnPropertySymbols,li=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,os=(Ot,De,Me)=>De in Ot?fr(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,es=(Ot,De)=>{for(var Me in De||(De={}))li.call(De,Me)&&os(Ot,Me,De[Me]);if(ai)for(var Me of ai(De))bi.call(De,Me)&&os(Ot,Me,De[Me]);return Ot},Ds=(Ot,De)=>zr(Ot,ci(De));class ws extends class{constructor(De){this.client=De}}{constructor(De){var Me;super(De),Me=this,this.name="engine",this.events=new(O()),this.initialized=!1,this.ignoredPayloadTypes=[1],this.requestQueue={state:"IDLE",queue:[]},this.sessionRequestQueue={state:"IDLE",queue:[]},this.requestQueueDelay=o.ONE_SECOND,this.init=(0,ie.Z)(function*(){Me.initialized||(yield Me.cleanup(),Me.registerRelayerEvents(),Me.registerExpirerEvents(),Me.registerPairingEvents(),Me.client.core.pairing.register({methods:Object.keys(Ht)}),Me.initialized=!0,setTimeout(()=>{Me.sessionRequestQueue.queue=Me.getPendingSessionRequests(),Me.processSessionRequestQueue()},(0,o.toMiliseconds)(Me.requestQueueDelay)))}),this.connect=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized();const Dt=Ds(es({},vt),{requiredNamespaces:vt.requiredNamespaces||{},optionalNamespaces:vt.optionalNamespaces||{}});yield Me.isValidConnect(Dt);const{pairingTopic:nn,requiredNamespaces:Nn,optionalNamespaces:Mr,sessionProperties:Vr,relays:Si}=Dt;let Oo,ls=nn,Yo=!1;if(ls&&(Yo=Me.client.core.pairing.pairings.get(ls).active),!ls||!Yo){const{topic:Ru,uri:gc}=yield Me.client.core.pairing.create();ls=Ru,Oo=gc}const uo=yield Me.client.core.crypto.generateKeyPair(),Jo=es({requiredNamespaces:Nn,optionalNamespaces:Mr,relays:Si??[{protocol:"irn"}],proposer:{publicKey:uo,metadata:Me.client.metadata}},Vr&&{sessionProperties:Vr}),{reject:Lo,resolve:ul,done:mc}=_s(o.FIVE_MINUTES,Ke);if(Me.events.once(xa("session_connect"),function(){var Ru=(0,ie.Z)(function*({error:gc,session:Tc}){if(gc)Lo(gc);else if(Tc){Tc.self.publicKey=uo;const _d=Ds(es({},Tc),{requiredNamespaces:Tc.requiredNamespaces,optionalNamespaces:Tc.optionalNamespaces});yield Me.client.session.set(Tc.topic,_d),yield Me.setExpiry(Tc.topic,Tc.expiry),ls&&(yield Me.client.core.pairing.updateMetadata({topic:ls,metadata:Tc.peer.metadata})),ul(_d)}});return function(gc){return Ru.apply(this,arguments)}}()),!ls){const{message:Ru}=Cn("NO_MATCHING_KEY",`connect() pairing topic: ${ls}`);throw new Error(Ru)}const Bc=yield Me.sendRequest({topic:ls,method:"wc_sessionPropose",params:Jo}),zu=Qa(o.FIVE_MINUTES);return yield Me.setProposal(Bc,es({id:Bc,expiry:zu},Jo)),{uri:Oo,approval:mc}});return function(vt){return pt.apply(this,arguments)}}(),this.pair=function(){var pt=(0,ie.Z)(function*(vt){return yield Me.isInitialized(),yield Me.client.core.pairing.pair(vt)});return function(vt){return pt.apply(this,arguments)}}(),this.approve=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidApprove(vt);const{id:Dt,relayProtocol:nn,namespaces:Nn,sessionProperties:Mr}=vt,Vr=Me.client.proposal.get(Dt);let{pairingTopic:Si,proposer:ls,requiredNamespaces:Oo,optionalNamespaces:Yo}=Vr;Si=Si||"",Os(Oo)||(Oo=function(Ot,De){const Me=et(Ot,"approve()");if(Me)throw new Error(Me.message);const pt={};for(const[vt,Dt]of Object.entries(Ot))pt[vt]={methods:Dt.methods,events:Dt.events,chains:Dt.accounts.map(nn=>`${nn.split(":")[0]}:${nn.split(":")[1]}`)};return pt}(Nn));const uo=yield Me.client.core.crypto.generateKeyPair(),Jo=ls.publicKey,Lo=yield Me.client.core.crypto.generateSharedKey(uo,Jo);Si&&Dt&&(yield Me.client.core.pairing.updateMetadata({topic:Si,metadata:ls.metadata}),yield Me.sendResult({id:Dt,topic:Si,result:{relay:{protocol:nn??"irn"},responderPublicKey:uo}}),yield Me.client.proposal.delete(Dt,Ir("USER_DISCONNECTED")),yield Me.client.core.pairing.activate({topic:Si}));const ul=es({relay:{protocol:nn??"irn"},namespaces:Nn,requiredNamespaces:Oo,optionalNamespaces:Yo,pairingTopic:Si,controller:{publicKey:uo,metadata:Me.client.metadata},expiry:Qa(Mt)},Mr&&{sessionProperties:Mr});yield Me.client.core.relayer.subscribe(Lo),yield Me.sendRequest({topic:Lo,method:"wc_sessionSettle",params:ul,throwOnFailedPublish:!0});const mc=Ds(es({},ul),{topic:Lo,pairingTopic:Si,acknowledged:!1,self:ul.controller,peer:{publicKey:ls.publicKey,metadata:ls.metadata},controller:uo});return yield Me.client.session.set(Lo,mc),yield Me.setExpiry(Lo,Qa(Mt)),{topic:Lo,acknowledged:()=>new Promise(Bc=>setTimeout(()=>Bc(Me.client.session.get(Lo)),500))}});return function(vt){return pt.apply(this,arguments)}}(),this.reject=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidReject(vt);const{id:Dt,reason:nn}=vt,{pairingTopic:Nn}=Me.client.proposal.get(Dt);Nn&&(yield Me.sendError(Dt,Nn,nn),yield Me.client.proposal.delete(Dt,Ir("USER_DISCONNECTED")))});return function(vt){return pt.apply(this,arguments)}}(),this.update=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidUpdate(vt);const{topic:Dt,namespaces:nn}=vt,Nn=yield Me.sendRequest({topic:Dt,method:"wc_sessionUpdate",params:{namespaces:nn}}),{done:Mr,resolve:Vr,reject:Si}=_s();return Me.events.once(xa("session_update",Nn),({error:ls})=>{ls?Si(ls):Vr()}),yield Me.client.session.update(Dt,{namespaces:nn}),{acknowledged:Mr}});return function(vt){return pt.apply(this,arguments)}}(),this.extend=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidExtend(vt);const{topic:Dt}=vt,nn=yield Me.sendRequest({topic:Dt,method:"wc_sessionExtend",params:{}}),{done:Nn,resolve:Mr,reject:Vr}=_s();return Me.events.once(xa("session_extend",nn),({error:Si})=>{Si?Vr(Si):Mr()}),yield Me.setExpiry(Dt,Qa(Mt)),{acknowledged:Nn}});return function(vt){return pt.apply(this,arguments)}}(),this.request=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidRequest(vt);const{chainId:Dt,request:nn,topic:Nn,expiry:Mr}=vt,Vr=(0,Ca.payloadId)(),{done:Si,resolve:ls,reject:Oo}=_s(Mr);return Me.events.once(xa("session_request",Vr),({error:Yo,result:uo})=>{Yo?Oo(Yo):ls(uo)}),yield Promise.all([new Promise(function(){var Yo=(0,ie.Z)(function*(uo){yield Me.sendRequest({clientRpcId:Vr,topic:Nn,method:"wc_sessionRequest",params:{request:nn,chainId:Dt},expiry:Mr,throwOnFailedPublish:!0}).catch(Jo=>Oo(Jo)),Me.client.events.emit("session_request_sent",{topic:Nn,request:nn,chainId:Dt,id:Vr}),uo()});return function(uo){return Yo.apply(this,arguments)}}()),new Promise(function(){var Yo=(0,ie.Z)(function*(uo){const Jo=yield Me.client.core.storage.getItem(di);(function(Ot){Va.apply(this,arguments)})({id:Vr,topic:Nn,wcDeepLink:Jo}),uo()});return function(uo){return Yo.apply(this,arguments)}}()),Si()]).then(Yo=>Yo[2])});return function(vt){return pt.apply(this,arguments)}}(),this.respond=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidRespond(vt);const{topic:Dt,response:nn}=vt,{id:Nn}=nn;(0,Ca.isJsonRpcResult)(nn)?yield Me.sendResult({id:Nn,topic:Dt,result:nn.result,throwOnFailedPublish:!0}):(0,Ca.isJsonRpcError)(nn)&&(yield Me.sendError(Nn,Dt,nn.error)),Me.cleanupAfterResponse(vt)});return function(vt){return pt.apply(this,arguments)}}(),this.ping=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidPing(vt);const{topic:Dt}=vt;if(Me.client.session.keys.includes(Dt)){const nn=yield Me.sendRequest({topic:Dt,method:"wc_sessionPing",params:{}}),{done:Nn,resolve:Mr,reject:Vr}=_s();Me.events.once(xa("session_ping",nn),({error:Si})=>{Si?Vr(Si):Mr()}),yield Nn()}else Me.client.core.pairing.pairings.keys.includes(Dt)&&(yield Me.client.core.pairing.ping({topic:Dt}))});return function(vt){return pt.apply(this,arguments)}}(),this.emit=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidEmit(vt);const{topic:Dt,event:nn,chainId:Nn}=vt;yield Me.sendRequest({topic:Dt,method:"wc_sessionEvent",params:{event:nn,chainId:Nn}})});return function(vt){return pt.apply(this,arguments)}}(),this.disconnect=function(){var pt=(0,ie.Z)(function*(vt){yield Me.isInitialized(),yield Me.isValidDisconnect(vt);const{topic:Dt}=vt;Me.client.session.keys.includes(Dt)?(yield Me.sendRequest({topic:Dt,method:"wc_sessionDelete",params:Ir("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield Me.deleteSession(Dt)):yield Me.client.core.pairing.disconnect({topic:Dt})});return function(vt){return pt.apply(this,arguments)}}(),this.find=pt=>(this.isInitialized(),this.client.session.getAll().filter(vt=>function(Ot,De){const{requiredNamespaces:Me}=De,pt=Object.keys(Ot.namespaces),vt=Object.keys(Me);let Dt=!0;return!!is(vt,pt)&&(pt.forEach(nn=>{const{accounts:Nn,methods:Mr,events:Vr}=Ot.namespaces[nn],Si=Wa(Nn),ls=Me[nn];is(ne(nn,ls),Si)&&is(ls.methods,Mr)&&is(ls.events,Vr)||(Dt=!1)}),Dt)}(vt,pt))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=function(){var pt=(0,ie.Z)(function*(vt){if(vt.pairingTopic)try{const Dt=Me.client.core.pairing.pairings.get(vt.pairingTopic),nn=Me.client.core.pairing.pairings.getAll().filter(Nn=>{var Mr,Vr;return(null==(Mr=Nn.peerMetadata)?void 0:Mr.url)&&(null==(Vr=Nn.peerMetadata)?void 0:Vr.url)===vt.peer.metadata.url&&Nn.topic&&Nn.topic!==Dt.topic});if(0===nn.length)return;Me.client.logger.info(`Cleaning up ${nn.length} duplicate pairing(s)`),yield Promise.all(nn.map(Nn=>Me.client.core.pairing.disconnect({topic:Nn.topic}))),Me.client.logger.info("Duplicate pairings clean up finished")}catch(Dt){Me.client.logger.error(Dt)}});return function(vt){return pt.apply(this,arguments)}}(),this.deleteSession=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{self:nn}=Me.client.session.get(vt);yield Me.client.core.relayer.unsubscribe(vt),Me.client.session.delete(vt,Ir("USER_DISCONNECTED")),Me.client.core.crypto.keychain.has(nn.publicKey)&&(yield Me.client.core.crypto.deleteKeyPair(nn.publicKey)),Me.client.core.crypto.keychain.has(vt)&&(yield Me.client.core.crypto.deleteSymKey(vt)),Dt||Me.client.core.expirer.del(vt),Me.client.core.storage.removeItem(di).catch(Nn=>Me.client.logger.warn(Nn))});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.deleteProposal=function(){var pt=(0,ie.Z)(function*(vt,Dt){yield Promise.all([Me.client.proposal.delete(vt,Ir("USER_DISCONNECTED")),Dt?Promise.resolve():Me.client.core.expirer.del(vt)])});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt,nn=!1){yield Promise.all([Me.client.pendingRequest.delete(vt,Dt),nn?Promise.resolve():Me.client.core.expirer.del(vt)]),Me.sessionRequestQueue.queue=Me.sessionRequestQueue.queue.filter(Nn=>Nn.id!==vt),nn&&(Me.sessionRequestQueue.state="IDLE")});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.setExpiry=function(){var pt=(0,ie.Z)(function*(vt,Dt){Me.client.session.keys.includes(vt)&&(yield Me.client.session.update(vt,{expiry:Dt})),Me.client.core.expirer.set(vt,Dt)});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.setProposal=function(){var pt=(0,ie.Z)(function*(vt,Dt){yield Me.client.proposal.set(vt,Dt),Me.client.core.expirer.set(vt,Dt.expiry)});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var pt=(0,ie.Z)(function*(vt){const Dt=Ht.wc_sessionRequest.req.ttl,{id:nn,topic:Nn,params:Mr,verifyContext:Vr}=vt;yield Me.client.pendingRequest.set(nn,{id:nn,topic:Nn,params:Mr,verifyContext:Vr}),Dt&&Me.client.core.expirer.set(nn,Qa(Dt))});return function(vt){return pt.apply(this,arguments)}}(),this.sendRequest=function(){var pt=(0,ie.Z)(function*(vt){const{topic:Dt,method:nn,params:Nn,expiry:Mr,relayRpcId:Vr,clientRpcId:Si,throwOnFailedPublish:ls}=vt,Oo=(0,Ca.formatJsonRpcRequest)(nn,Nn,Si);if(ar()&&Zn.includes(nn)){const Jo=Wt(JSON.stringify(Oo));Me.client.core.verify.register({attestationId:Jo})}const Yo=yield Me.client.core.crypto.encode(Dt,Oo),uo=Ht[nn].req;return Mr&&(uo.ttl=Mr),Vr&&(uo.id=Vr),Me.client.core.history.set(Dt,Oo),ls?(uo.internal=Ds(es({},uo.internal),{throwOnFailedPublish:!0}),yield Me.client.core.relayer.publish(Dt,Yo,uo)):Me.client.core.relayer.publish(Dt,Yo,uo).catch(Jo=>Me.client.logger.error(Jo)),Oo.id});return function(vt){return pt.apply(this,arguments)}}(),this.sendResult=function(){var pt=(0,ie.Z)(function*(vt){const{id:Dt,topic:nn,result:Nn,throwOnFailedPublish:Mr}=vt,Vr=(0,Ca.formatJsonRpcResult)(Dt,Nn),Si=yield Me.client.core.crypto.encode(nn,Vr),ls=yield Me.client.core.history.get(nn,Dt),Oo=Ht[ls.request.method].res;Mr?(Oo.internal=Ds(es({},Oo.internal),{throwOnFailedPublish:!0}),yield Me.client.core.relayer.publish(nn,Si,Oo)):Me.client.core.relayer.publish(nn,Si,Oo).catch(Yo=>Me.client.logger.error(Yo)),yield Me.client.core.history.resolve(Vr)});return function(vt){return pt.apply(this,arguments)}}(),this.sendError=function(){var pt=(0,ie.Z)(function*(vt,Dt,nn){const Nn=(0,Ca.formatJsonRpcError)(vt,nn),Mr=yield Me.client.core.crypto.encode(Dt,Nn),Vr=yield Me.client.core.history.get(Dt,vt);Me.client.core.relayer.publish(Dt,Mr,Ht[Vr.request.method].res),yield Me.client.core.history.resolve(Nn)});return function(vt,Dt,nn){return pt.apply(this,arguments)}}(),this.cleanup=(0,ie.Z)(function*(){const pt=[],vt=[];Me.client.session.getAll().forEach(Dt=>{ja(Dt.expiry)&&pt.push(Dt.topic)}),Me.client.proposal.getAll().forEach(Dt=>{ja(Dt.expiry)&&vt.push(Dt.id)}),yield Promise.all([...pt.map(Dt=>Me.deleteSession(Dt)),...vt.map(Dt=>Me.deleteProposal(Dt))])}),this.onRelayEventRequest=function(){var pt=(0,ie.Z)(function*(vt){Me.requestQueue.queue.push(vt),yield Me.processRequestsQueue()});return function(vt){return pt.apply(this,arguments)}}(),this.processRequestsQueue=(0,ie.Z)(function*(){if("ACTIVE"!==Me.requestQueue.state){for(Me.client.logger.info(`Request queue starting with ${Me.requestQueue.queue.length} requests`);Me.requestQueue.queue.length>0;){Me.requestQueue.state="ACTIVE";const pt=Me.requestQueue.queue.shift();if(pt)try{Me.processRequest(pt),yield new Promise(vt=>setTimeout(vt,300))}catch(vt){Me.client.logger.warn(vt)}}Me.requestQueue.state="IDLE"}else Me.client.logger.info("Request queue already active, skipping...")}),this.processRequest=pt=>{const{topic:vt,payload:Dt}=pt,nn=Dt.method;switch(nn){case"wc_sessionPropose":return this.onSessionProposeRequest(vt,Dt);case"wc_sessionSettle":return this.onSessionSettleRequest(vt,Dt);case"wc_sessionUpdate":return this.onSessionUpdateRequest(vt,Dt);case"wc_sessionExtend":return this.onSessionExtendRequest(vt,Dt);case"wc_sessionPing":return this.onSessionPingRequest(vt,Dt);case"wc_sessionDelete":return this.onSessionDeleteRequest(vt,Dt);case"wc_sessionRequest":return this.onSessionRequest(vt,Dt);case"wc_sessionEvent":return this.onSessionEventRequest(vt,Dt);default:return this.client.logger.info(`Unsupported request method ${nn}`)}},this.onRelayEventResponse=function(){var pt=(0,ie.Z)(function*(vt){const{topic:Dt,payload:nn}=vt,Nn=(yield Me.client.core.history.get(Dt,nn.id)).request.method;switch(Nn){case"wc_sessionPropose":return Me.onSessionProposeResponse(Dt,nn);case"wc_sessionSettle":return Me.onSessionSettleResponse(Dt,nn);case"wc_sessionUpdate":return Me.onSessionUpdateResponse(Dt,nn);case"wc_sessionExtend":return Me.onSessionExtendResponse(Dt,nn);case"wc_sessionPing":return Me.onSessionPingResponse(Dt,nn);case"wc_sessionRequest":return Me.onSessionRequestResponse(Dt,nn);default:return Me.client.logger.info(`Unsupported response method ${Nn}`)}});return function(vt){return pt.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=pt=>{const{topic:vt}=pt,{message:Dt}=Cn("MISSING_OR_INVALID",`Decoded payload on topic ${vt} is not identifiable as a JSON-RPC request or a response.`);throw new Error(Dt)},this.onSessionProposeRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{params:nn,id:Nn}=Dt;try{Me.isValidConnect(es({},Dt.params));const Mr=Qa(o.FIVE_MINUTES),Vr=es({id:Nn,pairingTopic:vt,expiry:Mr},nn);yield Me.setProposal(Nn,Vr);const Si=Wt(JSON.stringify(Dt)),ls=yield Me.getVerifyContext(Si,Vr.proposer.metadata);Me.client.events.emit("session_proposal",{id:Nn,params:Vr,verifyContext:ls})}catch(Mr){yield Me.sendError(Nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;if((0,Ca.isJsonRpcResult)(Dt)){const{result:Nn}=Dt;Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:Nn});const Mr=Me.client.proposal.get(nn);Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:Mr});const Vr=Mr.proposer.publicKey;Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:Vr});const Si=Nn.responderPublicKey;Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:Si});const ls=yield Me.client.core.crypto.generateSharedKey(Vr,Si);Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:ls});const Oo=yield Me.client.core.relayer.subscribe(ls);Me.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:Oo}),yield Me.client.core.pairing.activate({topic:vt})}else(0,Ca.isJsonRpcError)(Dt)&&(yield Me.client.proposal.delete(nn,Ir("USER_DISCONNECTED")),Me.events.emit(xa("session_connect"),{error:Dt.error}))});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn,params:Nn}=Dt;try{Me.isValidSessionSettleRequest(Nn);const{relay:Mr,controller:Vr,expiry:Si,namespaces:ls,requiredNamespaces:Oo,optionalNamespaces:Yo,sessionProperties:uo,pairingTopic:Jo}=Dt.params,Lo=es({topic:vt,relay:Mr,expiry:Si,namespaces:ls,acknowledged:!0,pairingTopic:Jo,requiredNamespaces:Oo,optionalNamespaces:Yo,controller:Vr.publicKey,self:{publicKey:"",metadata:Me.client.metadata},peer:{publicKey:Vr.publicKey,metadata:Vr.metadata}},uo&&{sessionProperties:uo});yield Me.sendResult({id:Dt.id,topic:vt,result:!0}),Me.events.emit(xa("session_connect"),{session:Lo}),Me.cleanupDuplicatePairings(Lo)}catch(Mr){yield Me.sendError(nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;(0,Ca.isJsonRpcResult)(Dt)?(yield Me.client.session.update(vt,{acknowledged:!0}),Me.events.emit(xa("session_approve",nn),{})):(0,Ca.isJsonRpcError)(Dt)&&(yield Me.client.session.delete(vt,Ir("USER_DISCONNECTED")),Me.events.emit(xa("session_approve",nn),{error:Dt.error}))});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{params:nn,id:Nn}=Dt;try{const Mr=`${vt}_session_update`,Vr=ka.get(Mr);if(Vr&&Me.isRequestOutOfSync(Vr,Nn))return void Me.client.logger.info(`Discarding out of sync request - ${Nn}`);Me.isValidUpdate(es({topic:vt},nn)),yield Me.client.session.update(vt,{namespaces:nn.namespaces}),yield Me.sendResult({id:Nn,topic:vt,result:!0}),Me.client.events.emit("session_update",{id:Nn,topic:vt,params:nn}),ka.set(Mr,Nn)}catch(Mr){yield Me.sendError(Nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.isRequestOutOfSync=(pt,vt)=>parseInt(vt.toString().slice(0,-3))<=parseInt(pt.toString().slice(0,-3)),this.onSessionUpdateResponse=(pt,vt)=>{const{id:Dt}=vt;(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_update",Dt),{}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_update",Dt),{error:vt.error})},this.onSessionExtendRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;try{Me.isValidExtend({topic:vt}),yield Me.setExpiry(vt,Qa(Mt)),yield Me.sendResult({id:nn,topic:vt,result:!0}),Me.client.events.emit("session_extend",{id:nn,topic:vt})}catch(Nn){yield Me.sendError(nn,vt,Nn),Me.client.logger.error(Nn)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionExtendResponse=(pt,vt)=>{const{id:Dt}=vt;(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_extend",Dt),{}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_extend",Dt),{error:vt.error})},this.onSessionPingRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;try{Me.isValidPing({topic:vt}),yield Me.sendResult({id:nn,topic:vt,result:!0}),Me.client.events.emit("session_ping",{id:nn,topic:vt})}catch(Nn){yield Me.sendError(nn,vt,Nn),Me.client.logger.error(Nn)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionPingResponse=(pt,vt)=>{const{id:Dt}=vt;setTimeout(()=>{(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_ping",Dt),{}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_ping",Dt),{error:vt.error})},500)},this.onSessionDeleteRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn}=Dt;try{Me.isValidDisconnect({topic:vt,reason:Dt.params}),yield Promise.all([new Promise(Nn=>{Me.client.core.relayer.once("relayer_publish",(0,ie.Z)(function*(){Nn(yield Me.deleteSession(vt))}))}),Me.sendResult({id:nn,topic:vt,result:!0})]),Me.client.events.emit("session_delete",{id:nn,topic:vt})}catch(Nn){Me.client.logger.error(Nn)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn,params:Nn}=Dt;try{Me.isValidRequest(es({topic:vt},Nn));const Mr=Wt(JSON.stringify((0,Ca.formatJsonRpcRequest)("wc_sessionRequest",Nn,nn))),Vr=Me.client.session.get(vt),ls={id:nn,topic:vt,params:Nn,verifyContext:yield Me.getVerifyContext(Mr,Vr.peer.metadata)};yield Me.setPendingSessionRequest(ls),Me.addSessionRequestToSessionRequestQueue(ls),Me.processSessionRequestQueue()}catch(Mr){yield Me.sendError(nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.onSessionRequestResponse=(pt,vt)=>{const{id:Dt}=vt;(0,Ca.isJsonRpcResult)(vt)?this.events.emit(xa("session_request",Dt),{result:vt.result}):(0,Ca.isJsonRpcError)(vt)&&this.events.emit(xa("session_request",Dt),{error:vt.error})},this.onSessionEventRequest=function(){var pt=(0,ie.Z)(function*(vt,Dt){const{id:nn,params:Nn}=Dt;try{const Mr=`${vt}_session_event_${Nn.event.name}`,Vr=ka.get(Mr);if(Vr&&Me.isRequestOutOfSync(Vr,nn))return void Me.client.logger.info(`Discarding out of sync request - ${nn}`);Me.isValidEmit(es({topic:vt},Nn)),Me.client.events.emit("session_event",{id:nn,topic:vt,params:Nn}),ka.set(Mr,nn)}catch(Mr){yield Me.sendError(nn,vt,Mr),Me.client.logger.error(Mr)}});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=pt=>{this.sessionRequestQueue.queue.push(pt)},this.cleanupAfterResponse=pt=>{this.deletePendingSessionRequest(pt.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state="IDLE",this.processSessionRequestQueue()},(0,o.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if("ACTIVE"===this.sessionRequestQueue.state)return void this.client.logger.info("session request queue is already active.");const pt=this.sessionRequestQueue.queue[0];if(pt)try{this.sessionRequestQueue.state="ACTIVE",this.client.events.emit("session_request",pt)}catch(vt){this.client.logger.error(vt)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=pt=>{if(pt.active)return;const vt=this.client.proposal.getAll().find(Dt=>Dt.pairingTopic===pt.topic);vt&&this.onSessionProposeRequest(pt.topic,(0,Ca.formatJsonRpcRequest)("wc_sessionPropose",{requiredNamespaces:vt.requiredNamespaces,optionalNamespaces:vt.optionalNamespaces,relays:vt.relays,proposer:vt.proposer},vt.id))},this.isValidConnect=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:Si}=Cn("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(vt)}`);throw new Error(Si)}const{pairingTopic:Dt,requiredNamespaces:nn,optionalNamespaces:Nn,sessionProperties:Mr,relays:Vr}=vt;if(Cs(Dt)||(yield Me.isValidPairingTopic(Dt)),!function(Ot,De){let Me=!1;return Ot?Ot&&Ei(Ot)&&Ot.length&&Ot.forEach(pt=>{Me=zt(pt)}):Me=!0,Me}(Vr)){const{message:Si}=Cn("MISSING_OR_INVALID",`connect() relays: ${Vr}`);throw new Error(Si)}!Cs(nn)&&0!==Os(nn)&&Me.validateNamespaces(nn,"requiredNamespaces"),!Cs(Nn)&&0!==Os(Nn)&&Me.validateNamespaces(Nn,"optionalNamespaces"),Cs(Mr)||Me.validateSessionProps(Mr,"sessionProperties")});return function(vt){return pt.apply(this,arguments)}}(),this.validateNamespaces=(pt,vt)=>{const Dt=function(Ot,De,Me){let pt=null;if(Ot&&Os(Ot)){const vt=Ut(Ot,De);vt&&(pt=vt);const Dt=function(Ot,De,Me){let pt=null;return Object.entries(Ot).forEach(([vt,Dt])=>{if(pt)return;const nn=function(Ot,De,Me){let pt=null;return Ei(De)&&De.length?De.forEach(vt=>{pt||Vo(vt)||(pt=Ir("UNSUPPORTED_CHAINS",`${Me}, chain ${vt} should be a string and conform to "namespace:chainId" format`))}):Vo(Ot)||(pt=Ir("UNSUPPORTED_CHAINS",`${Me}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),pt}(vt,ne(vt,Dt),`${De} ${Me}`);nn&&(pt=nn)}),pt}(Ot,De,Me);Dt&&(pt=Dt)}else pt=Cn("MISSING_OR_INVALID",`${De}, ${Me} should be an object with data`);return pt}(pt,"connect()",vt);if(Dt)throw new Error(Dt.message)},this.isValidApprove=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt))throw new Error(Cn("MISSING_OR_INVALID",`approve() params: ${vt}`).message);const{id:Dt,namespaces:nn,relayProtocol:Nn,sessionProperties:Mr}=vt;yield Me.isValidProposalId(Dt);const Vr=Me.client.proposal.get(Dt),Si=et(nn,"approve()");if(Si)throw new Error(Si.message);const ls=lo(Vr.requiredNamespaces,nn,"approve()");if(ls)throw new Error(ls.message);if(!zs(Nn,!0)){const{message:Oo}=Cn("MISSING_OR_INVALID",`approve() relayProtocol: ${Nn}`);throw new Error(Oo)}Cs(Mr)||Me.validateSessionProps(Mr,"sessionProperties")});return function(vt){return pt.apply(this,arguments)}}(),this.isValidReject=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`reject() params: ${vt}`);throw new Error(Nn)}const{id:Dt,reason:nn}=vt;if(yield Me.isValidProposalId(Dt),!((Ot=nn)&&"object"==typeof Ot&&Ot.code&&Rs(Ot.code,!1)&&Ot.message&&zs(Ot.message,!1))){const{message:Nn}=Cn("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(nn)}`);throw new Error(Nn)}var Ot});return function(vt){return pt.apply(this,arguments)}}(),this.isValidSessionSettleRequest=pt=>{if(!nr(pt)){const{message:Si}=Cn("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${pt}`);throw new Error(Si)}const{relay:vt,controller:Dt,namespaces:nn,expiry:Nn}=pt;if(!zt(vt)){const{message:Si}=Cn("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(Si)}const Mr=function(Ot,De){let Me=null;return zs(Ot?.publicKey,!1)||(Me=Cn("MISSING_OR_INVALID","onSessionSettleRequest() controller public key should be a string")),Me}(Dt);if(Mr)throw new Error(Mr.message);const Vr=et(nn,"onSessionSettleRequest()");if(Vr)throw new Error(Vr.message);if(ja(Nn)){const{message:Si}=Cn("EXPIRED","onSessionSettleRequest()");throw new Error(Si)}},this.isValidUpdate=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:Si}=Cn("MISSING_OR_INVALID",`update() params: ${vt}`);throw new Error(Si)}const{topic:Dt,namespaces:nn}=vt;yield Me.isValidSessionTopic(Dt);const Nn=Me.client.session.get(Dt),Mr=et(nn,"update()");if(Mr)throw new Error(Mr.message);const Vr=lo(Nn.requiredNamespaces,nn,"update()");if(Vr)throw new Error(Vr.message)});return function(vt){return pt.apply(this,arguments)}}(),this.isValidExtend=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:nn}=Cn("MISSING_OR_INVALID",`extend() params: ${vt}`);throw new Error(nn)}const{topic:Dt}=vt;yield Me.isValidSessionTopic(Dt)});return function(vt){return pt.apply(this,arguments)}}(),this.isValidRequest=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() params: ${vt}`);throw new Error(Si)}const{topic:Dt,request:nn,chainId:Nn,expiry:Mr}=vt;yield Me.isValidSessionTopic(Dt);const{namespaces:Vr}=Me.client.session.get(Dt);if(!As(Vr,Nn)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() chainId: ${Nn}`);throw new Error(Si)}if(Cs(Ot=nn)||!zs(Ot.method,!1)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() ${JSON.stringify(nn)}`);throw new Error(Si)}var Ot;if(!function(Ot,De,Me){return!!zs(Me,!1)&&function(Ot,De){const Me=[];return Object.values(Ot).forEach(pt=>{Wa(pt.accounts).includes(De)&&Me.push(...pt.methods)}),Me}(Ot,De).includes(Me)}(Vr,Nn,nn.method)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() method: ${nn.method}`);throw new Error(Si)}if(Mr&&!function(Ot,De){return Rs(Ot,!1)&&Ot<=De.max&&Ot>=De.min}(Mr,un)){const{message:Si}=Cn("MISSING_OR_INVALID",`request() expiry: ${Mr}. Expiry must be a number (in seconds) between ${un.min} and ${un.max}`);throw new Error(Si)}});return function(vt){return pt.apply(this,arguments)}}(),this.isValidRespond=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:Nn}=Cn("MISSING_OR_INVALID",`respond() params: ${vt}`);throw new Error(Nn)}const{topic:Dt,response:nn}=vt;if(yield Me.isValidSessionTopic(Dt),Cs(Ot=nn)||Cs(Ot.result)&&Cs(Ot.error)||!Rs(Ot.id,!1)||!zs(Ot.jsonrpc,!1)){const{message:Nn}=Cn("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(nn)}`);throw new Error(Nn)}var Ot});return function(vt){return pt.apply(this,arguments)}}(),this.isValidPing=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:nn}=Cn("MISSING_OR_INVALID",`ping() params: ${vt}`);throw new Error(nn)}const{topic:Dt}=vt;yield Me.isValidSessionOrPairingTopic(Dt)});return function(vt){return pt.apply(this,arguments)}}(),this.isValidEmit=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() params: ${vt}`);throw new Error(Vr)}const{topic:Dt,event:nn,chainId:Nn}=vt;yield Me.isValidSessionTopic(Dt);const{namespaces:Mr}=Me.client.session.get(Dt);if(!As(Mr,Nn)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() chainId: ${Nn}`);throw new Error(Vr)}if(Cs(Ot=nn)||!zs(Ot.name,!1)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(nn)}`);throw new Error(Vr)}var Ot;if(!function(Ot,De,Me){return!!zs(Me,!1)&&function(Ot,De){const Me=[];return Object.values(Ot).forEach(pt=>{Wa(pt.accounts).includes(De)&&Me.push(...pt.events)}),Me}(Ot,De).includes(Me)}(Mr,Nn,nn.name)){const{message:Vr}=Cn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(nn)}`);throw new Error(Vr)}});return function(vt){return pt.apply(this,arguments)}}(),this.isValidDisconnect=function(){var pt=(0,ie.Z)(function*(vt){if(!nr(vt)){const{message:nn}=Cn("MISSING_OR_INVALID",`disconnect() params: ${vt}`);throw new Error(nn)}const{topic:Dt}=vt;yield Me.isValidSessionOrPairingTopic(Dt)});return function(vt){return pt.apply(this,arguments)}}(),this.getVerifyContext=function(){var pt=(0,ie.Z)(function*(vt,Dt){const nn={verified:{verifyUrl:Dt.verifyUrl||z0,validation:"UNKNOWN",origin:Dt.url||""}};try{const Nn=yield Me.client.core.verify.resolve({attestationId:vt,verifyUrl:Dt.verifyUrl});Nn&&(nn.verified.origin=Nn.origin,nn.verified.isScam=Nn.isScam,nn.verified.validation=Nn.origin===new URL(Dt.url).origin?"VALID":"INVALID")}catch(Nn){Me.client.logger.info(Nn)}return Me.client.logger.info(`Verify context: ${JSON.stringify(nn)}`),nn});return function(vt,Dt){return pt.apply(this,arguments)}}(),this.validateSessionProps=(pt,vt)=>{Object.values(pt).forEach(Dt=>{if(!zs(Dt,!1)){const{message:nn}=Cn("MISSING_OR_INVALID",`${vt} must be in Record format. Received: ${JSON.stringify(Dt)}`);throw new Error(nn)}})}}isInitialized(){var De=this;return(0,ie.Z)(function*(){if(!De.initialized){const{message:Me}=Cn("NOT_INITIALIZED",De.name);throw new Error(Me)}yield De.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var De=this;this.client.core.relayer.on("relayer_message",function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,message:Dt}=pt;if(De.ignoredPayloadTypes.includes(De.client.core.crypto.getPayloadType(Dt)))return;const nn=yield De.client.core.crypto.decode(vt,Dt);try{(0,Ca.isJsonRpcRequest)(nn)?(De.client.core.history.set(vt,nn),De.onRelayEventRequest({topic:vt,payload:nn})):(0,Ca.isJsonRpcResponse)(nn)?(yield De.client.core.history.resolve(nn),yield De.onRelayEventResponse({topic:vt,payload:nn}),De.client.core.history.delete(vt,nn.id)):De.onRelayEventUnknownPayload({topic:vt,payload:nn})}catch(Nn){De.client.logger.error(Nn)}});return function(pt){return Me.apply(this,arguments)}}())}registerExpirerEvents(){var De=this;this.client.core.expirer.on(Nd_expired,function(){var Me=(0,ie.Z)(function*(pt){const{topic:vt,id:Dt}=Lu(pt.target);if(Dt&&De.client.pendingRequest.keys.includes(Dt))return yield De.deletePendingSessionRequest(Dt,Cn("EXPIRED"),!0);vt?De.client.session.keys.includes(vt)&&(yield De.deleteSession(vt,!0),De.client.events.emit("session_expire",{topic:vt})):Dt&&(yield De.deleteProposal(Dt,!0),De.client.events.emit("proposal_expire",{id:Dt}))});return function(pt){return Me.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on("pairing_create",De=>this.onPairingCreated(De))}isValidPairingTopic(De){if(!zs(De,!1)){const{message:Me}=Cn("MISSING_OR_INVALID",`pairing topic should be a string: ${De}`);throw new Error(Me)}if(!this.client.core.pairing.pairings.keys.includes(De)){const{message:Me}=Cn("NO_MATCHING_KEY",`pairing topic doesn't exist: ${De}`);throw new Error(Me)}if(ja(this.client.core.pairing.pairings.get(De).expiry)){const{message:Me}=Cn("EXPIRED",`pairing topic: ${De}`);throw new Error(Me)}}isValidSessionTopic(De){var Me=this;return(0,ie.Z)(function*(){if(!zs(De,!1)){const{message:pt}=Cn("MISSING_OR_INVALID",`session topic should be a string: ${De}`);throw new Error(pt)}if(!Me.client.session.keys.includes(De)){const{message:pt}=Cn("NO_MATCHING_KEY",`session topic doesn't exist: ${De}`);throw new Error(pt)}if(ja(Me.client.session.get(De).expiry)){yield Me.deleteSession(De);const{message:pt}=Cn("EXPIRED",`session topic: ${De}`);throw new Error(pt)}})()}isValidSessionOrPairingTopic(De){var Me=this;return(0,ie.Z)(function*(){if(Me.client.session.keys.includes(De))yield Me.isValidSessionTopic(De);else{if(!Me.client.core.pairing.pairings.keys.includes(De)){if(zs(De,!1)){const{message:pt}=Cn("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${De}`);throw new Error(pt)}{const{message:pt}=Cn("MISSING_OR_INVALID",`session or pairing topic should be a string: ${De}`);throw new Error(pt)}}Me.isValidPairingTopic(De)}})()}isValidProposalId(De){var Me=this;return(0,ie.Z)(function*(){if("number"!=typeof De){const{message:pt}=Cn("MISSING_OR_INVALID",`proposal id should be a number: ${De}`);throw new Error(pt)}if(!Me.client.proposal.keys.includes(De)){const{message:pt}=Cn("NO_MATCHING_KEY",`proposal id doesn't exist: ${De}`);throw new Error(pt)}if(ja(Me.client.proposal.get(De).expiry)){yield Me.deleteProposal(De);const{message:pt}=Cn("EXPIRED",`proposal id: ${De}`);throw new Error(pt)}})()}}class Zs extends at{constructor(De,Me){super(De,Me,"proposal",Ba),this.core=De,this.logger=Me}}class Us extends at{constructor(De,Me){super(De,Me,"session",Ba),this.core=De,this.logger=Me}}class io extends at{constructor(De,Me){super(De,Me,"request",Ba,pt=>pt.id),this.core=De,this.logger=Me}}class Xs extends class{constructor(De){this.opts=De,this.protocol="wc",this.version=2}}{constructor(De){var Me;super(De),Me=this,this.protocol="wc",this.version=2,this.name="client",this.events=new q.EventEmitter,this.on=(vt,Dt)=>this.events.on(vt,Dt),this.once=(vt,Dt)=>this.events.once(vt,Dt),this.off=(vt,Dt)=>this.events.off(vt,Dt),this.removeListener=(vt,Dt)=>this.events.removeListener(vt,Dt),this.removeAllListeners=vt=>this.events.removeAllListeners(vt),this.connect=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.connect(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.pair=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.pair(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.approve=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.approve(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.reject=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.reject(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.update=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.update(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.extend=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.extend(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.request=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.request(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.respond=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.respond(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.ping=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.ping(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.emit=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.emit(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.disconnect=function(){var vt=(0,ie.Z)(function*(Dt){try{return yield Me.engine.disconnect(Dt)}catch(nn){throw Me.logger.error(nn.message),nn}});return function(Dt){return vt.apply(this,arguments)}}(),this.find=vt=>{try{return this.engine.find(vt)}catch(Dt){throw this.logger.error(Dt.message),Dt}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(vt){throw this.logger.error(vt.message),vt}},this.name=De?.name||"client",this.metadata=De?.metadata||(0,M.D)()||{name:"",description:"",url:"",icons:[""]};const pt=typeof De?.logger<"u"&&"string"!=typeof De?.logger?De.logger:(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De?.logger||"error"}));this.core=De?.core||new Ci(De),this.logger=(0,Io.generateChildLogger)(pt,this.name),this.session=new Us(this.core,this.logger),this.proposal=new Zs(this.core,this.logger),this.pendingRequest=new io(this.core,this.logger),this.engine=new ws(this)}static init(De){return(0,ie.Z)(function*(){const Me=new Xs(De);return yield Me.initialize(),Me})()}get context(){return(0,Io.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized");try{yield De.core.start(),yield De.session.init(),yield De.proposal.init(),yield De.pendingRequest.init(),yield De.engine.init(),De.core.verify.init({verifyUrl:De.metadata.verifyUrl}),De.logger.info("SignClient Initialization Success")}catch(Me){throw De.logger.info("SignClient Initialization Failure"),De.logger.error(Me.message),Me}})()}}var ia=Y(6930);const vd="wc@2:universal_provider:";var Ot,De,S0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Z0={exports:{}};Ot=Z0,De=Z0.exports,function(){var Me,nn="Expected a function",Mr="__lodash_hash_undefined__",Si="__lodash_placeholder__",fs=1/0,ko=9007199254740991,Cl=4294967295,Oc=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],Gi="[object Arguments]",Ls="[object Array]",Kh="[object Boolean]",r1="[object Date]",Zh="[object Error]",kp="[object Function]",Jb="[object GeneratorFunction]",Yh="[object Map]",Q2="[object Number]",ct="[object Object]",ju="[object Promise]",Ta="[object RegExp]",Jh="[object Set]",bl="[object String]",Ul="[object Symbol]",I1="[object WeakMap]",Xh="[object ArrayBuffer]",S1="[object DataView]",k1="[object Float32Array]",Xb="[object Float64Array]",Mp="[object Int8Array]",C1="[object Int16Array]",Op="[object Int32Array]",eg="[object Uint8Array]",Qb="[object Uint8ClampedArray]",Rm="[object Uint16Array]",Wg="[object Uint32Array]",Ev=/\b__p \+= '';/g,e6=/\b(__p \+=) '' \+/g,Tv=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Uy=/&(?:amp|lt|gt|quot|#39);/g,jy=/[&<>"']/g,Av=RegExp(Uy.source),Vy=RegExp(jy.source),Hy=/<%-([\s\S]+?)%>/g,v8=/<%([\s\S]+?)%>/g,t6=/<%=([\s\S]+?)%>/g,_8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Iv=/^\w*$/,Sv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n6=/[\\^$.*+?()[\]{}|]/g,w8=RegExp(n6.source),$y=/^\s+/,x8=/\s/,r6=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,M1=/\{\n\/\* \[wrapped with (.+)\] \*/,O1=/,? & /,i6=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gg=/[()=,{}\[\]\/\s]/,zg=/\\(\\)?/g,tg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ng=/\w*$/,s6=/^[-+]0x[0-9a-f]+$/i,D1=/^0b[01]+$/i,qg=/^\[object .+?Constructor\]$/,kv=/^0o[0-7]+$/i,E8=/^(?:0|[1-9]\d*)$/,Wy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nm=/($^)/,rg=/['\n\r\u2028\u2029\\]/g,ig="\\ud800-\\udfff",Kg="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",P1="\\u2700-\\u27bf",d2="a-z\\xdf-\\xf6\\xf8-\\xff",Zg="A-Z\\xc0-\\xd6\\xd8-\\xde",Yg="\\ufe0e\\ufe0f",qy="\\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",o6="["+ig+"]",Ah="["+qy+"]",Ky="["+Kg+"]",Zy="\\d+",um="["+P1+"]",xu="["+d2+"]",Jg="[^"+ig+qy+Zy+P1+d2+Zg+"]",m0="\\ud83c[\\udffb-\\udfff]",X0="[^"+ig+"]",i1="(?:\\ud83c[\\udde6-\\uddff]){2}",Yy="[\\ud800-\\udbff][\\udc00-\\udfff]",Lm="["+Zg+"]",Jy="(?:"+xu+"|"+Jg+")",Ov="(?:"+Lm+"|"+Jg+")",cm="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",p2="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Dp="(?:"+Ky+"|"+m0+")?",m2="["+Yg+"]?",sg=m2+Dp+"(?:\\u200d(?:"+[X0,i1,Yy].join("|")+")"+m2+Dp+")*",a6="(?:"+[um,i1,Yy].join("|")+")"+sg,u6="(?:"+[X0+Ky+"?",Ky,i1,Yy,o6].join("|")+")",Dv=RegExp("['\u2019]","g"),c6=RegExp(Ky,"g"),Qg=RegExp(m0+"(?="+m0+")|"+u6+sg,"g"),Pv=RegExp([Lm+"?"+xu+"+"+cm+"(?="+[Ah,Lm,"$"].join("|")+")",Ov+"+"+p2+"(?="+[Ah,Lm+Jy,"$"].join("|")+")",Lm+"?"+Jy+"+"+cm,Lm+"+"+p2,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zy,a6].join("|"),"g"),Qh=RegExp("[\\u200d"+ig+Kg+Yg+"]"),lm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ey=["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"],Xy=-1,jl={};jl[k1]=jl[Xb]=jl[Mp]=jl[C1]=jl[Op]=jl[eg]=jl[Qb]=jl[Rm]=jl[Wg]=!0,jl[Gi]=jl[Ls]=jl[Xh]=jl[Kh]=jl[S1]=jl[r1]=jl[Zh]=jl[kp]=jl[Yh]=jl[Q2]=jl[ct]=jl[Ta]=jl[Jh]=jl[bl]=jl[I1]=!1;var Zc={};Zc[Gi]=Zc[Ls]=Zc[Xh]=Zc[S1]=Zc[Kh]=Zc[r1]=Zc[k1]=Zc[Xb]=Zc[Mp]=Zc[C1]=Zc[Op]=Zc[Yh]=Zc[Q2]=Zc[ct]=Zc[Ta]=Zc[Jh]=Zc[bl]=Zc[Ul]=Zc[eg]=Zc[Qb]=Zc[Rm]=Zc[Wg]=!0,Zc[Zh]=Zc[kp]=Zc[I1]=!1;var og={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Rv=parseFloat,Nv=parseInt,ag="object"==typeof S0&&S0&&S0.Object===Object&&S0,ty="object"==typeof self&&self&&self.Object===Object&&self,Dl=ag||ty||Function("return this")(),gu=De&&!De.nodeType&&De,s1=gu&&Ot&&!Ot.nodeType&&Ot,g0=s1&&s1.exports===gu,y2=g0&&ag.process,Q0=function(){try{return s1&&s1.require&&s1.require("util").types||y2&&y2.binding&&y2.binding("util")}catch{}}(),yc=Q0&&Q0.isArrayBuffer,ny=Q0&&Q0.isDate,ug=Q0&&Q0.isMap,Um=Q0&&Q0.isRegExp,Qy=Q0&&Q0.isSet,eb=Q0&&Q0.isTypedArray;function eh(ei,ss,Mi){switch(Mi.length){case 0:return ei.call(ss);case 1:return ei.call(ss,Mi[0]);case 2:return ei.call(ss,Mi[0],Mi[1]);case 3:return ei.call(ss,Mi[0],Mi[1],Mi[2])}return ei.apply(ss,Mi)}function ry(ei,ss,Mi,Uo){for(var ku=-1,Yc=null==ei?0:ei.length;++ku-1}function a1(ei,ss,Mi){for(var Uo=-1,ku=null==ei?0:ei.length;++Uo-1;);return Mi}function oy(ei,ss){for(var Mi=ei.length;Mi--&&jd(ss,ei[Mi],0)>-1;);return Mi}function ib(ei,ss){for(var Mi=ei.length,Uo=0;Mi--;)ei[Mi]===ss&&++Uo;return Uo}var th=rb({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),sb=rb({"&":"&","<":"<",">":">",'"':""","'":"'"});function ob(ei){return"\\"+og[ei]}function T2(ei){return Qh.test(ei)}function hg(ei){var ss=-1,Mi=Array(ei.size);return ei.forEach(function(Uo,ku){Mi[++ss]=[ku,Uo]}),Mi}function ub(ei,ss){return function(Mi){return ei(ss(Mi))}}function N1(ei,ss){for(var Mi=-1,Uo=ei.length,ku=0,Yc=[];++Mi",""":'"',"'":"'"}),fm=function ei(ss){var ve,Mi=(ss=null==ss?Dl:fm.defaults(Dl.Object(),ss,fm.pick(Dl,ey))).Array,Uo=ss.Date,ku=ss.Error,Yc=ss.Function,wd=ss.Math,vl=ss.Object,cy=ss.RegExp,p6=ss.String,Of=ss.TypeError,M0=Mi.prototype,mg=vl.prototype,gg=ss["__core-js_shared__"],yg=Yc.prototype.toString,Fc=mg.hasOwnProperty,m6=0,g6=(ve=/[^.]+$/.exec(gg&&gg.keys&&gg.keys.IE_PROTO||""))?"Symbol(src)_1."+ve:"",lb=mg.toString,O0=yg.call(vl),ya=Dl._,Wv=cy("^"+yg.call(Fc).replace(n6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A2=g0?ss.Buffer:Me,hm=ss.Symbol,ly=ss.Uint8Array,bg=A2?A2.allocUnsafe:Me,dy=ub(vl.getPrototypeOf,vl),fy=vl.create,db=mg.propertyIsEnumerable,$m=M0.splice,Wm=hm?hm.isConcatSpreadable:Me,I2=hm?hm.iterator:Me,Df=hm?hm.toStringTag:Me,pm=function(){try{var ve=wb(vl,"defineProperty");return ve({},"",{}),ve}catch{}}(),y6=ss.clearTimeout!==Dl.clearTimeout&&ss.clearTimeout,Gv=Uo&&Uo.now!==Dl.Date.now&&Uo.now,vg=ss.setTimeout!==Dl.setTimeout&&ss.setTimeout,D0=wd.ceil,mm=wd.floor,gf=vl.getOwnPropertySymbols,gm=A2?A2.isBuffer:Me,_g=ss.isFinite,Ch=M0.join,Cu=ub(vl.keys,vl),Xl=wd.max,Vd=wd.min,S2=Uo.now,k2=ss.parseInt,Gm=wd.random,C2=M0.reverse,F1=wb(ss,"DataView"),u1=wb(ss,"Map"),ym=wb(ss,"Promise"),zm=wb(ss,"Set"),M2=wb(ss,"WeakMap"),qm=wb(vl,"create"),wg=M2&&new M2,bm={},fb=C6(F1),ye=C6(u1),Be=C6(ym),lt=C6(zm),Gt=C6(M2),it=hm?hm.prototype:Me,Fn=it?it.valueOf:Me,tr=it?it.toString:Me;function rn(ve){if(Ql(ve)&&!Ku(ve)&&!(ve instanceof Ri)){if(ve instanceof ns)return ve;if(Fc.call(ve,"__wrapped__"))return KI(ve)}return new ns(ve)}var Qr=function(){function ve(){}return function(Fe){if(!Wd(Fe))return{};if(fy)return fy(Fe);ve.prototype=Fe;var dt=new ve;return ve.prototype=Me,dt}}();function ms(){}function ns(ve,Fe){this.__wrapped__=ve,this.__actions__=[],this.__chain__=!!Fe,this.__index__=0,this.__values__=Me}function Ri(ve){this.__wrapped__=ve,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Cl,this.__views__=[]}function uu(ve){var Fe=-1,dt=null==ve?0:ve.length;for(this.clear();++Fe=Fe?ve:Fe)),ve}function np(ve,Fe,dt,Kt,_n,jn){var xr,Rr=1&Fe,si=2&Fe,xs=4&Fe;if(dt&&(xr=_n?dt(ve,Kt,_n,jn):dt(ve)),xr!==Me)return xr;if(!Wd(ve))return ve;var Es=Ku(ve);if(Es){if(xr=function(ve){var Fe=ve.length,dt=new ve.constructor(Fe);return Fe&&"string"==typeof ve[0]&&Fc.call(ve,"index")&&(dt.index=ve.index,dt.input=ve.input),dt}(ve),!Rr)return $d(ve,xr)}else{var js=B0(ve),gs=js==kp||js==Jb;if(Ym(ve))return kt(ve,Rr);if(js==ct||js==Gi||gs&&!_n){if(xr=si||gs?{}:L9(ve),!Rr)return si?function(ve,Fe){return rp(ve,l3(ve),Fe)}(ve,function(ve,Fe){return ve&&rp(Fe,d1(Fe),ve)}(xr,ve)):function(ve,Fe){return rp(ve,g4(ve),Fe)}(ve,k8(xr,ve))}else{if(!Zc[js])return _n?ve:{};xr=function(ve,Fe,dt){var Kt=ve.constructor;switch(Fe){case Xh:return bc(ve);case Kh:case r1:return new Kt(+ve);case S1:return function(ve,Fe){var dt=Fe?bc(ve.buffer):ve.buffer;return new ve.constructor(dt,ve.byteOffset,ve.byteLength)}(ve,dt);case k1:case Xb:case Mp:case C1:case Op:case eg:case Qb:case Rm:case Wg:return $l(ve,dt);case Yh:return new Kt;case Q2:case bl:return new Kt(ve);case Ta:return function(ve){var Fe=new ve.constructor(ve.source,ng.exec(ve));return Fe.lastIndex=ve.lastIndex,Fe}(ve);case Jh:return new Kt;case Ul:return function(ve){return Fn?vl(Fn.call(ve)):{}}(ve)}}(ve,js,Rr)}}jn||(jn=new rh);var Ro=jn.get(ve);if(Ro)return Ro;jn.set(ve,xr),N4(ve)?ve.forEach(function(lu){xr.add(np(lu,Fe,dt,lu,ve,jn))}):KS(ve)&&ve.forEach(function(lu,Sc){xr.set(Sc,np(lu,Fe,dt,Sc,ve,jn))});var ho=Es?Me:(xs?si?F9:Mh:si?d1:uh)(ve);return ef(ho||ve,function(lu,Sc){ho&&(lu=ve[Sc=lu]),pb(xr,Sc,np(lu,Fe,dt,Sc,ve,jn))}),xr}function u4(ve,Fe,dt){var Kt=dt.length;if(null==ve)return!Kt;for(ve=vl(ve);Kt--;){var _n=dt[Kt],xr=ve[_n];if(xr===Me&&!(_n in ve)||!(0,Fe[_n])(xr))return!1}return!0}function Xt(ve,Fe,dt){if("function"!=typeof ve)throw new Of(nn);return k6(function(){ve.apply(Me,dt)},Fe)}function py(ve,Fe,dt,Kt){var _n=-1,jn=v2,xr=!0,Rr=ve.length,si=[],xs=Fe.length;if(!Rr)return si;dt&&(Fe=Vl(Fe,kh(dt))),Kt?(jn=a1,xr=!1):Fe.length>=200&&(jn=E2,xr=!1,Fe=new O2(Fe));e:for(;++_n-1},tf.prototype.set=function(ve,Fe){var dt=this.__data__,Kt=mb(dt,ve);return Kt<0?(++this.size,dt.push([ve,Fe])):dt[Kt][1]=Fe,this},U1.prototype.clear=function(){this.size=0,this.__data__={hash:new uu,map:new(u1||tf),string:new uu}},U1.prototype.delete=function(ve){var Fe=U8(this,ve).delete(ve);return this.size-=Fe?1:0,Fe},U1.prototype.get=function(ve){return U8(this,ve).get(ve)},U1.prototype.has=function(ve){return U8(this,ve).has(ve)},U1.prototype.set=function(ve,Fe){var dt=U8(this,ve),Kt=dt.size;return dt.set(ve,Fe),this.size+=dt.size==Kt?0:1,this},O2.prototype.add=O2.prototype.push=function(ve){return this.__data__.set(ve,Mr),this},O2.prototype.has=function(ve){return this.__data__.has(ve)},rh.prototype.clear=function(){this.__data__=new tf,this.size=0},rh.prototype.delete=function(ve){var Fe=this.__data__,dt=Fe.delete(ve);return this.size=Fe.size,dt},rh.prototype.get=function(ve){return this.__data__.get(ve)},rh.prototype.has=function(ve){return this.__data__.has(ve)},rh.prototype.set=function(ve,Fe){var dt=this.__data__;if(dt instanceof tf){var Kt=dt.__data__;if(!u1||Kt.length<199)return Kt.push([ve,Fe]),this.size=++dt.size,this;dt=this.__data__=new U1(Kt)}return dt.set(ve,Fe),this.size=dt.size,this};var Ct=k9($r),gb=k9(R0,!0);function c4(ve,Fe){var dt=!0;return Ct(ve,function(Kt,_n,jn){return dt=!!Fe(Kt,_n,jn)}),dt}function Ae(ve,Fe,dt){for(var Kt=-1,_n=ve.length;++Kt<_n;){var jn=ve[Kt],xr=Fe(jn);if(null!=xr&&(Rr===Me?xr==xr&&!oh(xr):dt(xr,Rr)))var Rr=xr,si=jn}return si}function Gn(ve,Fe){var dt=[];return Ct(ve,function(Kt,_n,jn){Fe(Kt,_n,jn)&&dt.push(Kt)}),dt}function P0(ve,Fe,dt,Kt,_n){var jn=-1,xr=ve.length;for(dt||(dt=V9),_n||(_n=[]);++jn0&&dt(Rr)?Fe>1?P0(Rr,Fe-1,dt,Kt,_n):Sh(_n,Rr):Kt||(_n[_n.length]=Rr)}return _n}var _6=C9(),Zr=C9(!0);function $r(ve,Fe){return ve&&_6(ve,Fe,uh)}function R0(ve,Fe){return ve&&Zr(ve,Fe,uh)}function Di(ve,Fe){return o1(Fe,function(dt){return Ey(ve[dt])})}function j1(ve,Fe){for(var dt=0,Kt=(Fe=Km(Fe,ve)).length;null!=ve&&dtFe}function Jv(ve,Fe){return null!=ve&&Fc.call(ve,Fe)}function l4(ve,Fe){return null!=ve&&Fe in vl(ve)}function my(ve,Fe,dt){for(var Kt=dt?a1:v2,_n=ve[0].length,jn=ve.length,xr=jn,Rr=Mi(jn),si=1/0,xs=[];xr--;){var Es=ve[xr];xr&&Fe&&(Es=Vl(Es,kh(Fe))),si=Vd(Es.length,si),Rr[xr]=!dt&&(Fe||_n>=120&&Es.length>=120)?new O2(xr&&Es):Me}Es=ve[0];var js=-1,gs=Rr[0];e:for(;++js<_n&&xs.length=Rr?si:si*("desc"==dt[Kt]?-1:1)}return ve.index-Fe.index}(jn,xr,dt)});Mi--;)ei[Mi]=ei[Mi].value;return ei}(de(ve,function(jn,xr,Rr){return{criteria:Vl(Fe,function(xs){return xs(jn)}),index:++Kt,value:jn}}))}function ln(ve,Fe,dt){for(var Kt=-1,_n=Fe.length,jn={};++Kt<_n;){var xr=Fe[Kt],Rr=j1(ve,xr);dt(Rr,xr)&&Hs(jn,Km(xr,ve),Rr)}return jn}function vn(ve,Fe,dt,Kt){var _n=Kt?d6:jd,jn=-1,xr=Fe.length,Rr=ve;for(ve===Fe&&(Fe=$d(Fe)),dt&&(Rr=Vl(ve,kh(dt)));++jn-1;)Rr!==ve&&$m.call(Rr,si,1),$m.call(ve,si,1);return ve}function Mn(ve,Fe){for(var dt=ve?Fe.length:0,Kt=dt-1;dt--;){var _n=Fe[dt];if(dt==Kt||_n!==jn){var jn=_n;B2(_n)?$m.call(ve,_n,1):P2(ve,_n)}}return ve}function Hn(ve,Fe){return ve+mm(Gm()*(Fe-ve+1))}function Ar(ve,Fe){var dt="";if(!ve||Fe<1||Fe>ko)return dt;do{Fe%2&&(dt+=ve),(Fe=mm(Fe/2))&&(ve+=ve)}while(Fe);return dt}function Yr(ve,Fe){return V8(S6(ve,Fe,F0),ve+"")}function ri(ve){return v6(B6(ve))}function Ks(ve,Fe){var dt=B6(ve);return H8(dt,xg(Fe,0,dt.length))}function Hs(ve,Fe,dt,Kt){if(!Wd(ve))return ve;for(var _n=-1,jn=(Fe=Km(Fe,ve)).length,xr=jn-1,Rr=ve;null!=Rr&&++_n_n?0:_n+Fe),(dt=dt>_n?_n:dt)<0&&(dt+=_n),_n=Fe>dt?0:dt-Fe>>>0,Fe>>>=0;for(var jn=Mi(_n);++Kt<_n;)jn[Kt]=ve[Kt+Fe];return jn}function Xc(ve,Fe){var dt;return Ct(ve,function(Kt,_n,jn){return!(dt=Fe(Kt,_n,jn))}),!!dt}function nf(ve,Fe,dt){var Kt=0,_n=null==ve?Kt:ve.length;if("number"==typeof Fe&&Fe==Fe&&_n<=2147483647){for(;Kt<_n;){var jn=Kt+_n>>>1,xr=ve[jn];null!==xr&&!oh(xr)&&(dt?xr<=Fe:xr=200){var xs=Fe?null:N9(ve);if(xs)return ay(xs);xr=!1,_n=E2,si=new O2}else si=Fe?[]:Rr;e:for(;++Kt=Kt?ve:Ss(ve,Fe,dt)}var n3=y6||function(ve){return Dl.clearTimeout(ve)};function kt(ve,Fe){if(Fe)return ve.slice();var dt=ve.length,Kt=bg?bg(dt):new ve.constructor(dt);return ve.copy(Kt),Kt}function bc(ve){var Fe=new ve.constructor(ve.byteLength);return new ly(Fe).set(new ly(ve)),Fe}function $l(ve,Fe){var dt=Fe?bc(ve.buffer):ve.buffer;return new ve.constructor(dt,ve.byteOffset,ve.length)}function Bp(ve,Fe){if(ve!==Fe){var dt=ve!==Me,Kt=null===ve,_n=ve==ve,jn=oh(ve),xr=Fe!==Me,Rr=null===Fe,si=Fe==Fe,xs=oh(Fe);if(!Rr&&!xs&&!jn&&ve>Fe||jn&&xr&&si&&!Rr&&!xs||Kt&&xr&&si||!dt&&si||!_n)return 1;if(!Kt&&!jn&&!xs&&ve1?dt[_n-1]:Me,xr=_n>2?dt[2]:Me;for(jn=ve.length>3&&"function"==typeof jn?(_n--,jn):Me,xr&&Fp(dt[0],dt[1],xr)&&(jn=_n<3?Me:jn,_n=1),Fe=vl(Fe);++Kt<_n;){var Rr=dt[Kt];Rr&&ve(Fe,Rr,Kt,jn)}return Fe})}function k9(ve,Fe){return function(dt,Kt){if(null==dt)return dt;if(!Lp(dt))return ve(dt,Kt);for(var _n=dt.length,jn=Fe?_n:-1,xr=vl(dt);(Fe?jn--:++jn<_n)&&!1!==Kt(xr[jn],jn,xr););return dt}}function C9(ve){return function(Fe,dt,Kt){for(var _n=-1,jn=vl(Fe),xr=Kt(Fe),Rr=xr.length;Rr--;){var si=xr[ve?Rr:++_n];if(!1===dt(jn[si],si,jn))break}return Fe}}function M9(ve){return function(Fe){var dt=T2(Fe=wl(Fe))?ep(Fe):Me,Kt=dt?dt[0]:Fe.charAt(0),_n=dt?R2(dt,1).join(""):Fe.slice(1);return Kt[ve]()+_n}}function A6(ve){return function(Fe){return jm(z4(Hx(Fe).replace(Dv,"")),ve,"")}}function s3(ve){return function(){var Fe=arguments;switch(Fe.length){case 0:return new ve;case 1:return new ve(Fe[0]);case 2:return new ve(Fe[0],Fe[1]);case 3:return new ve(Fe[0],Fe[1],Fe[2]);case 4:return new ve(Fe[0],Fe[1],Fe[2],Fe[3]);case 5:return new ve(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4]);case 6:return new ve(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5]);case 7:return new ve(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6])}var dt=Qr(ve.prototype),Kt=ve.apply(dt,Fe);return Wd(Kt)?Kt:dt}}function O9(ve){return function(Fe,dt,Kt){var _n=vl(Fe);if(!Lp(Fe)){var jn=ps(dt,3);Fe=uh(Fe),dt=function(Rr){return jn(_n[Rr],Rr,_n)}}var xr=ve(Fe,dt,Kt);return xr>-1?_n[jn?Fe[xr]:xr]:Me}}function D9(ve){return vy(function(Fe){var dt=Fe.length,Kt=dt,_n=ns.prototype.thru;for(ve&&Fe.reverse();Kt--;){var jn=Fe[Kt];if("function"!=typeof jn)throw new Of(nn);if(_n&&!xr&&"wrapper"==u3(jn))var xr=new ns([],!0)}for(Kt=xr?Kt:dt;++Kt1&&Uc.reverse(),Es&&siRr))return!1;var xs=jn.get(ve),Es=jn.get(Fe);if(xs&&Es)return xs==Fe&&Es==ve;var js=-1,gs=!0,Ro=2&dt?new O2:Me;for(jn.set(ve,Fe),jn.set(Fe,ve);++js-1&&ve%1==0&&ve1?"& ":"")+Fe[Kt],Fe=Fe.join(dt>2?", ":" "),ve.replace(r6,"{\n/* [wrapped with "+Fe+"] */\n")}(Kt,function(ve,Fe){return ef(Oc,function(dt){var Kt="_."+dt[0];Fe&dt[1]&&!v2(ve,Kt)&&ve.push(Kt)}),ve.sort()}(function(ve){var Fe=ve.match(M1);return Fe?Fe[1].split(O1):[]}(Kt),dt)))}function E4(ve){var Fe=0,dt=0;return function(){var Kt=S2(),_n=16-(Kt-dt);if(dt=Kt,_n>0){if(++Fe>=800)return arguments[0]}else Fe=0;return ve.apply(Me,arguments)}}function H8(ve,Fe){var dt=-1,Kt=ve.length,_n=Kt-1;for(Fe=Fe===Me?Kt:Fe;++dt1?ve[Fe-1]:Me;return dt="function"==typeof dt?(ve.pop(),dt):Me,ax(ve,dt)});function ES(ve){var Fe=rn(ve);return Fe.__chain__=!0,Fe}function Eb(ve,Fe){return Fe(ve)}var TS=vy(function(ve){var Fe=ve.length,dt=Fe?ve[0]:0,Kt=this.__wrapped__,_n=function(jn){return hy(jn,ve)};return!(Fe>1||this.__actions__.length)&&Kt instanceof Ri&&B2(dt)?((Kt=Kt.slice(dt,+dt+(Fe?1:0))).__actions__.push({func:Eb,args:[_n],thisArg:Me}),new ns(Kt,this.__chain__).thru(function(jn){return Fe&&!jn.length&&jn.push(Me),jn})):this.thru(_n)}),Ig=i3(function(ve,Fe,dt){Fc.call(ve,dt)?++ve[dt]:vm(ve,dt,1)}),EP=O9(T4),kS=O9(Z9);function Sg(ve,Fe){return(Ku(ve)?ef:Ct)(ve,ps(Fe,3))}function P4(ve,Fe){return(Ku(ve)?b2:gb)(ve,ps(Fe,3))}var fx=i3(function(ve,Fe,dt){Fc.call(ve,dt)?ve[dt].push(Fe):vm(ve,dt,[Fe])}),TP=Yr(function(ve,Fe,dt){var Kt=-1,_n="function"==typeof Fe,jn=Lp(ve)?Mi(ve.length):[];return Ct(ve,function(xr){jn[++Kt]=_n?eh(Fe,xr,dt):an(xr,Fe,dt)}),jn}),DS=i3(function(ve,Fe,dt){vm(ve,dt,Fe)});function W8(ve,Fe){return(Ku(ve)?Vl:de)(ve,ps(Fe,3))}var hx=i3(function(ve,Fe,dt){ve[dt?0:1].push(Fe)},function(){return[[],[]]}),P6=Yr(function(ve,Fe){if(null==ve)return[];var dt=Fe.length;return dt>1&&Fp(ve,Fe[0],Fe[1])?Fe=[]:dt>2&&Fp(Fe[0],Fe[1],Fe[2])&&(Fe=[Fe[0]]),Bt(ve,P0(Fe,1),[])}),Tb=Gv||function(){return Dl.Date.now()};function bx(ve,Fe,dt){return Fe=dt?Me:Fe,N2(ve,128,Me,Me,Me,Me,Fe=ve&&null==Fe?ve.length:Fe)}function vx(ve,Fe){var dt;if("function"!=typeof Fe)throw new Of(nn);return ve=Xu(ve),function(){return--ve>0&&(dt=Fe.apply(this,arguments)),ve<=1&&(Fe=Me),dt}}var _x=Yr(function(ve,Fe,dt){var Kt=1;if(dt.length){var _n=N1(dt,c3(_x));Kt|=32}return N2(ve,Kt,Fe,dt,_n)}),wx=Yr(function(ve,Fe,dt){var Kt=3;if(dt.length){var _n=N1(dt,c3(wx));Kt|=32}return N2(Fe,Kt,ve,dt,_n)});function Ex(ve,Fe,dt){var Kt,_n,jn,xr,Rr,si,xs=0,Es=!1,js=!1,gs=!0;if("function"!=typeof ve)throw new Of(nn);function Ro(b0){var Gd=Kt,f1=_n;return Kt=_n=Me,xs=b0,xr=ve.apply(f1,Gd)}function wo(b0){return xs=b0,Rr=k6(Sc,Fe),Es?Ro(b0):xr}function lu(b0){var Gd=b0-si;return si===Me||Gd>=Fe||Gd<0||js&&b0-xs>=jn}function Sc(){var b0=Tb();if(lu(b0))return Uc(b0);Rr=k6(Sc,function(b0){var r7=Fe-(b0-si);return js?Vd(r7,jn-(b0-xs)):r7}(b0))}function Uc(b0){return Rr=Me,gs&&Kt?Ro(b0):(Kt=_n=Me,xr)}function du(){var b0=Tb(),Gd=lu(b0);if(Kt=arguments,_n=this,si=b0,Gd){if(Rr===Me)return wo(si);if(js)return n3(Rr),Rr=k6(Sc,Fe),Ro(si)}return Rr===Me&&(Rr=k6(Sc,Fe)),xr}return Fe=xm(Fe)||0,Wd(dt)&&(Es=!!dt.leading,jn=(js="maxWait"in dt)?Xl(xm(dt.maxWait)||0,Fe):jn,gs="trailing"in dt?!!dt.trailing:gs),du.cancel=function(){Rr!==Me&&n3(Rr),xs=0,Kt=si=_n=Rr=Me},du.flush=function(){return Rr===Me?xr:Uc(Tb())},du}var FS=Yr(function(ve,Fe){return Xt(ve,1,Fe)}),LS=Yr(function(ve,Fe,dt){return Xt(ve,xm(Fe)||0,dt)});function G8(ve,Fe){if("function"!=typeof ve||null!=Fe&&"function"!=typeof Fe)throw new Of(nn);var dt=function(){var Kt=arguments,_n=Fe?Fe.apply(this,Kt):Kt[0],jn=dt.cache;if(jn.has(_n))return jn.get(_n);var xr=ve.apply(this,Kt);return dt.cache=jn.set(_n,xr)||jn,xr};return dt.cache=new(G8.Cache||U1),dt}function z8(ve){if("function"!=typeof ve)throw new Of(nn);return function(){var Fe=arguments;switch(Fe.length){case 0:return!ve.call(this);case 1:return!ve.call(this,Fe[0]);case 2:return!ve.call(this,Fe[0],Fe[1]);case 3:return!ve.call(this,Fe[0],Fe[1],Fe[2])}return!ve.apply(this,Fe)}}G8.Cache=U1;var jS=E6(function(ve,Fe){var dt=(Fe=1==Fe.length&&Ku(Fe[0])?Vl(Fe[0],kh(ps())):Vl(P0(Fe,1),kh(ps()))).length;return Yr(function(Kt){for(var _n=-1,jn=Vd(Kt.length,dt);++_n=Fe}),_y=gy(function(){return arguments}())?gy:function(ve){return Ql(ve)&&Fc.call(ve,"callee")&&!db.call(ve,"callee")},Ku=Mi.isArray,qS=yc?kh(yc):function(ve){return Ql(ve)&&y0(ve)==Xh};function Lp(ve){return null!=ve&&Up(ve.length)&&!Ey(ve)}function Yf(ve){return Ql(ve)&&Lp(ve)}var Ym=gm||Sb,K8=ny?kh(ny):function(ve){return Ql(ve)&&y0(ve)==r1};function xy(ve){if(!Ql(ve))return!1;var Fe=y0(ve);return Fe==Zh||"[object DOMException]"==Fe||"string"==typeof ve.message&&"string"==typeof ve.name&&!jp(ve)}function Ey(ve){if(!Wd(ve))return!1;var Fe=y0(ve);return Fe==kp||Fe==Jb||"[object AsyncFunction]"==Fe||"[object Proxy]"==Fe}function Bu(ve){return"number"==typeof ve&&ve==Xu(ve)}function Up(ve){return"number"==typeof ve&&ve>-1&&ve%1==0&&ve<=ko}function Wd(ve){var Fe=typeof ve;return null!=ve&&("object"==Fe||"function"==Fe)}function Ql(ve){return null!=ve&&"object"==typeof ve}var KS=ug?kh(ug):function(ve){return Ql(ve)&&B0(ve)==Yh};function rf(ve){return"number"==typeof ve||Ql(ve)&&y0(ve)==Q2}function jp(ve){if(!Ql(ve)||y0(ve)!=ct)return!1;var Fe=dy(ve);if(null===Fe)return!0;var dt=Fc.call(Fe,"constructor")&&Fe.constructor;return"function"==typeof dt&&dt instanceof dt&&yg.call(dt)==O0}var Z8=Um?kh(Um):function(ve){return Ql(ve)&&y0(ve)==Ta},N4=Qy?kh(Qy):function(ve){return Ql(ve)&&B0(ve)==Jh};function R6(ve){return"string"==typeof ve||!Ku(ve)&&Ql(ve)&&y0(ve)==bl}function oh(ve){return"symbol"==typeof ve||Ql(ve)&&y0(ve)==Ul}var L2=eb?kh(eb):function(ve){return Ql(ve)&&Up(ve.length)&&!!jl[y0(ve)]},Ox=a3(re),B4=a3(function(ve,Fe){return ve<=Fe});function N6(ve){if(!ve)return[];if(Lp(ve))return R6(ve)?ep(ve):$d(ve);if(I2&&ve[I2])return function(ei){for(var ss,Mi=[];!(ss=ei.next()).done;)Mi.push(ss.value);return Mi}(ve[I2]());var Fe=B0(ve);return(Fe==Yh?hg:Fe==Jh?ay:B6)(ve)}function Jm(ve){return ve?(ve=xm(ve))===fs||ve===-fs?17976931348623157e292*(ve<0?-1:1):ve==ve?ve:0:0===ve?ve:0}function Xu(ve){var Fe=Jm(ve),dt=Fe%1;return Fe==Fe?dt?Fe-dt:Fe:0}function Ib(ve){return ve?xg(Xu(ve),0,Cl):0}function xm(ve){if("number"==typeof ve)return ve;if(oh(ve))return NaN;if(Wd(ve)){var Fe="function"==typeof ve.valueOf?ve.valueOf():ve;ve=Wd(Fe)?Fe+"":Fe}if("string"!=typeof ve)return 0===ve?ve:+ve;ve=x2(ve);var dt=D1.test(ve);return dt||kv.test(ve)?Nv(ve.slice(2),dt?2:8):s6.test(ve)?NaN:+ve}function _3(ve){return rp(ve,d1(ve))}function wl(ve){return null==ve?"":N0(ve)}var Px=T6(function(ve,Fe){if(d3(Fe)||Lp(Fe))rp(Fe,uh(Fe),ve);else for(var dt in Fe)Fc.call(Fe,dt)&&pb(ve,dt,Fe[dt])}),w3=T6(function(ve,Fe){rp(Fe,d1(Fe),ve)}),Y8=T6(function(ve,Fe,dt,Kt){rp(Fe,d1(Fe),ve,Kt)}),F4=T6(function(ve,Fe,dt,Kt){rp(Fe,uh(Fe),ve,Kt)}),L4=vy(hy),MP=Yr(function(ve,Fe){ve=vl(ve);var dt=-1,Kt=Fe.length,_n=Kt>2?Fe[2]:Me;for(_n&&Fp(Fe[0],Fe[1],_n)&&(Kt=1);++dt1),jn}),rp(ve,F9(ve),dt),Kt&&(dt=np(dt,7,_b));for(var _n=Fe.length;_n--;)P2(dt,Fe[_n]);return dt}),H4=vy(function(ve,Fe){return null==ve?{}:function(ve,Fe){return ln(ve,Fe,function(dt,Kt){return U4(ve,Kt)})}(ve,Fe)});function Bx(ve,Fe){if(null==ve)return{};var dt=Vl(F9(ve),function(Kt){return[Kt]});return Fe=ps(Fe),ln(ve,dt,function(Kt,_n){return Fe(Kt,_n[0])})}var Fx=p4(uh),Lx=p4(d1);function B6(ve){return null==ve?[]:sy(ve,uh(ve))}var mk=A6(function(ve,Fe,dt){return Fe=Fe.toLowerCase(),ve+(dt?Vx(Fe):Fe)});function Vx(ve){return J8(wl(ve).toLowerCase())}function Hx(ve){return(ve=wl(ve))&&ve.replace(Wy,th).replace(c6,"")}var bk=A6(function(ve,Fe,dt){return ve+(dt?"-":"")+Fe.toLowerCase()}),vk=A6(function(ve,Fe,dt){return ve+(dt?" ":"")+Fe.toLowerCase()}),BP=M9("toLowerCase"),Ek=A6(function(ve,Fe,dt){return ve+(dt?"_":"")+Fe.toLowerCase()}),Ak=A6(function(ve,Fe,dt){return ve+(dt?" ":"")+J8(Fe)}),zx=A6(function(ve,Fe,dt){return ve+(dt?" ":"")+Fe.toUpperCase()}),J8=M9("toUpperCase");function z4(ve,Fe,dt){return ve=wl(ve),(Fe=dt?Me:Fe)===Me?function(ei){return lm.test(ei)}(ve)?function(ei){return ei.match(Pv)||[]}(ve):function(ei){return ei.match(i6)||[]}(ve):ve.match(Fe)||[]}var qx=Yr(function(ve,Fe){try{return eh(ve,Me,Fe)}catch(dt){return xy(dt)?dt:new ku(dt)}}),kk=vy(function(ve,Fe){return ef(Fe,function(dt){dt=Ag(dt),vm(ve,dt,_x(ve[dt],ve))}),ve});function q4(ve){return function(){return ve}}var Mk=D9(),Ok=D9(!0);function F0(ve){return ve}function Zx(ve){return e3("function"==typeof ve?ve:np(ve,1))}var jP=Yr(function(ve,Fe){return function(dt){return an(dt,ve,Fe)}}),Jx=Yr(function(ve,Fe){return function(dt){return an(ve,dt,Fe)}});function K4(ve,Fe,dt){var Kt=uh(Fe),_n=Di(Fe,Kt);null==dt&&(!Wd(Fe)||!_n.length&&Kt.length)&&(dt=Fe,Fe=ve,ve=this,_n=Di(Fe,uh(Fe)));var jn=!(Wd(dt)&&"chain"in dt&&!dt.chain),xr=Ey(ve);return ef(_n,function(Rr){var si=Fe[Rr];ve[Rr]=si,xr&&(ve.prototype[Rr]=function(){var xs=this.__chain__;if(jn||xs){var Es=ve(this.__wrapped__),js=Es.__actions__=$d(this.__actions__);return js.push({func:si,args:arguments,thisArg:ve}),Es.__chain__=xs,Es}return si.apply(ve,Sh([this.value()],arguments))})}),ve}function sf(){}var vc=d4(Vl),X8=d4(tb),Pk=d4(dm);function Y4(ve){return v4(ve)?lg(Ag(ve)):function(ve){return function(Fe){return j1(Fe,ve)}}(ve)}var Nk=f4(),Bk=f4(!0);function J4(){return[]}function Sb(){return!1}var Fk=N8(function(ve,Fe){return ve+Fe},0),X4=B8("ceil"),Lk=N8(function(ve,Fe){return ve/Fe},1),Q8=B8("floor"),mo=N8(function(ve,Fe){return ve*Fe},1),Hk=B8("round"),e5=N8(function(ve,Fe){return ve-Fe},0);return rn.after=function(ve,Fe){if("function"!=typeof Fe)throw new Of(nn);return ve=Xu(ve),function(){if(--ve<1)return Fe.apply(this,arguments)}},rn.ary=bx,rn.assign=Px,rn.assignIn=w3,rn.assignInWith=Y8,rn.assignWith=F4,rn.at=L4,rn.before=vx,rn.bind=_x,rn.bindAll=kk,rn.bindKey=wx,rn.castArray=function(){if(!arguments.length)return[];var ve=arguments[0];return Ku(ve)?ve:[ve]},rn.chain=ES,rn.chunk=function(ve,Fe,dt){Fe=(dt?Fp(ve,Fe,dt):Fe===Me)?1:Xl(Xu(Fe),0);var Kt=null==ve?0:ve.length;if(!Kt||Fe<1)return[];for(var _n=0,jn=0,xr=Mi(D0(Kt/Fe));_n_n?0:_n+dt),(Kt=Kt===Me||Kt>_n?_n:Xu(Kt))<0&&(Kt+=_n),Kt=dt>Kt?0:Ib(Kt);dt>>0)?(ve=wl(ve))&&("string"==typeof Fe||null!=Fe&&!Z8(Fe))&&!(Fe=N0(Fe))&&T2(ve)?R2(ep(ve),0,dt):ve.split(Fe,dt):[]},rn.spread=function(ve,Fe){if("function"!=typeof ve)throw new Of(nn);return Fe=null==Fe?0:Xl(Xu(Fe),0),Yr(function(dt){var Kt=dt[Fe],_n=R2(dt,0,Fe);return Kt&&Sh(_n,Kt),eh(ve,this,_n)})},rn.tail=function(ve){var Fe=null==ve?0:ve.length;return Fe?Ss(ve,1,Fe):[]},rn.take=function(ve,Fe,dt){return ve&&ve.length?Ss(ve,0,(Fe=dt||Fe===Me?1:Xu(Fe))<0?0:Fe):[]},rn.takeRight=function(ve,Fe,dt){var Kt=null==ve?0:ve.length;return Kt?Ss(ve,(Fe=Kt-(Fe=dt||Fe===Me?1:Xu(Fe)))<0?0:Fe,Kt):[]},rn.takeRightWhile=function(ve,Fe){return ve&&ve.length?Rp(ve,ps(Fe,3),!1,!0):[]},rn.takeWhile=function(ve,Fe){return ve&&ve.length?Rp(ve,ps(Fe,3)):[]},rn.tap=function(ve,Fe){return Fe(ve),ve},rn.throttle=function(ve,Fe,dt){var Kt=!0,_n=!0;if("function"!=typeof ve)throw new Of(nn);return Wd(dt)&&(Kt="leading"in dt?!!dt.leading:Kt,_n="trailing"in dt?!!dt.trailing:_n),Ex(ve,Fe,{leading:Kt,maxWait:Fe,trailing:_n})},rn.thru=Eb,rn.toArray=N6,rn.toPairs=Fx,rn.toPairsIn=Lx,rn.toPath=function(ve){return Ku(ve)?Vl(ve,Ag):oh(ve)?[ve]:$d(z9(wl(ve)))},rn.toPlainObject=_3,rn.transform=function(ve,Fe,dt){var Kt=Ku(ve),_n=Kt||Ym(ve)||L2(ve);if(Fe=ps(Fe,4),null==dt){var jn=ve&&ve.constructor;dt=_n?Kt?new jn:[]:Wd(ve)&&Ey(jn)?Qr(dy(ve)):{}}return(_n?ef:$r)(ve,function(xr,Rr,si){return Fe(dt,xr,Rr,si)}),dt},rn.unary=function(ve){return bx(ve,1)},rn.union=k4,rn.unionBy=C4,rn.unionWith=ox,rn.uniq=function(ve){return ve&&ve.length?H1(ve):[]},rn.uniqBy=function(ve,Fe){return ve&&ve.length?H1(ve,ps(Fe,2)):[]},rn.uniqWith=function(ve,Fe){return Fe="function"==typeof Fe?Fe:Me,ve&&ve.length?H1(ve,Me,Fe):[]},rn.unset=function(ve,Fe){return null==ve||P2(ve,Fe)},rn.unzip=g3,rn.unzipWith=ax,rn.update=function(ve,Fe,dt){return null==ve?ve:t3(ve,Fe,Eg(dt))},rn.updateWith=function(ve,Fe,dt,Kt){return Kt="function"==typeof Kt?Kt:Me,null==ve?ve:t3(ve,Fe,Eg(dt),Kt)},rn.values=B6,rn.valuesIn=function(ve){return null==ve?[]:sy(ve,d1(ve))},rn.without=Ya,rn.words=z4,rn.wrap=function(ve,Fe){return Ac(Eg(Fe),ve)},rn.xor=wS,rn.xorBy=ux,rn.xorWith=cx,rn.zip=lx,rn.zipObject=function(ve,Fe){return bb(ve||[],Fe||[],pb)},rn.zipObjectDeep=function(ve,Fe){return bb(ve||[],Fe||[],Hs)},rn.zipWith=l1,rn.entries=Fx,rn.entriesIn=Lx,rn.extend=w3,rn.extendWith=Y8,K4(rn,rn),rn.add=Fk,rn.attempt=qx,rn.camelCase=mk,rn.capitalize=Vx,rn.ceil=X4,rn.clamp=function(ve,Fe,dt){return dt===Me&&(dt=Fe,Fe=Me),dt!==Me&&(dt=(dt=xm(dt))==dt?dt:0),Fe!==Me&&(Fe=(Fe=xm(Fe))==Fe?Fe:0),xg(xm(ve),Fe,dt)},rn.clone=function(ve){return np(ve,4)},rn.cloneDeep=function(ve){return np(ve,5)},rn.cloneDeepWith=function(ve,Fe){return np(ve,5,Fe="function"==typeof Fe?Fe:Me)},rn.cloneWith=function(ve,Fe){return np(ve,4,Fe="function"==typeof Fe?Fe:Me)},rn.conformsTo=function(ve,Fe){return null==Fe||u4(ve,Fe,uh(Fe))},rn.deburr=Hx,rn.defaultTo=function(ve,Fe){return null==ve||ve!=ve?Fe:ve},rn.divide=Lk,rn.endsWith=function(ve,Fe,dt){ve=wl(ve),Fe=N0(Fe);var Kt=ve.length,_n=dt=dt===Me?Kt:xg(Xu(dt),0,Kt);return(dt-=Fe.length)>=0&&ve.slice(dt,_n)==Fe},rn.eq=_m,rn.escape=function(ve){return(ve=wl(ve))&&Vy.test(ve)?ve.replace(jy,sb):ve},rn.escapeRegExp=function(ve){return(ve=wl(ve))&&w8.test(ve)?ve.replace(n6,"\\$&"):ve},rn.every=function(ve,Fe,dt){var Kt=Ku(ve)?tb:c4;return dt&&Fp(ve,Fe,dt)&&(Fe=Me),Kt(ve,ps(Fe,3))},rn.find=EP,rn.findIndex=T4,rn.findKey=function(ve,Fe){return iy(ve,ps(Fe,3),$r)},rn.findLast=kS,rn.findLastIndex=Z9,rn.findLastKey=function(ve,Fe){return iy(ve,ps(Fe,3),R0)},rn.floor=Q8,rn.forEach=Sg,rn.forEachRight=P4,rn.forIn=function(ve,Fe){return null==ve?ve:_6(ve,ps(Fe,3),d1)},rn.forInRight=function(ve,Fe){return null==ve?ve:Zr(ve,ps(Fe,3),d1)},rn.forOwn=function(ve,Fe){return ve&&$r(ve,ps(Fe,3))},rn.forOwnRight=function(ve,Fe){return ve&&R0(ve,ps(Fe,3))},rn.get=ah,rn.gt=R4,rn.gte=Sx,rn.has=function(ve,Fe){return null!=ve&&y4(ve,Fe,Jv)},rn.hasIn=U4,rn.head=X9,rn.identity=F0,rn.includes=function(ve,Fe,dt,Kt){ve=Lp(ve)?ve:B6(ve),dt=dt&&!Kt?Xu(dt):0;var _n=ve.length;return dt<0&&(dt=Xl(_n+dt,0)),R6(ve)?dt<=_n&&ve.indexOf(Fe,dt)>-1:!!_n&&jd(ve,Fe,dt)>-1},rn.indexOf=function(ve,Fe,dt){var Kt=null==ve?0:ve.length;if(!Kt)return-1;var _n=null==dt?0:Xu(dt);return _n<0&&(_n=Xl(Kt+_n,0)),jd(ve,Fe,_n)},rn.inRange=function(ve,Fe,dt){return Fe=Jm(Fe),dt===Me?(dt=Fe,Fe=0):dt=Jm(dt),function(ve,Fe,dt){return ve>=Vd(Fe,dt)&&ve=-ko&&ve<=ko},rn.isSet=N4,rn.isString=R6,rn.isSymbol=oh,rn.isTypedArray=L2,rn.isUndefined=function(ve){return ve===Me},rn.isWeakMap=function(ve){return Ql(ve)&&B0(ve)==I1},rn.isWeakSet=function(ve){return Ql(ve)&&"[object WeakSet]"==y0(ve)},rn.join=function(ve,Fe){return null==ve?"":Ch.call(ve,Fe)},rn.kebabCase=bk,rn.last=$1,rn.lastIndexOf=function(ve,Fe,dt){var Kt=null==ve?0:ve.length;if(!Kt)return-1;var _n=Kt;return dt!==Me&&(_n=(_n=Xu(dt))<0?Xl(Kt+_n,0):Vd(_n,Kt-1)),Fe==Fe?function(ei,ss,Mi){for(var Uo=Mi+1;Uo--;)if(ei[Uo]===ss)return Uo;return Uo}(ve,Fe,_n):Hl(ve,cg,_n,!0)},rn.lowerCase=vk,rn.lowerFirst=BP,rn.lt=Ox,rn.lte=B4,rn.max=function(ve){return ve&&ve.length?Ae(ve,F0,dr):Me},rn.maxBy=function(ve,Fe){return ve&&ve.length?Ae(ve,ps(Fe,2),dr):Me},rn.mean=function(ve){return Hm(ve,F0)},rn.meanBy=function(ve,Fe){return Hm(ve,ps(Fe,2))},rn.min=function(ve){return ve&&ve.length?Ae(ve,F0,re):Me},rn.minBy=function(ve,Fe){return ve&&ve.length?Ae(ve,ps(Fe,2),re):Me},rn.stubArray=J4,rn.stubFalse=Sb,rn.stubObject=function(){return{}},rn.stubString=function(){return""},rn.stubTrue=function(){return!0},rn.multiply=mo,rn.nth=function(ve,Fe){return ve&&ve.length?Rt(ve,Xu(Fe)):Me},rn.noConflict=function(){return Dl._===this&&(Dl._=ya),this},rn.noop=sf,rn.now=Tb,rn.pad=function(ve,Fe,dt){ve=wl(ve);var Kt=(Fe=Xu(Fe))?B1(ve):0;if(!Fe||Kt>=Fe)return ve;var _n=(Fe-Kt)/2;return o3(mm(_n),dt)+ve+o3(D0(_n),dt)},rn.padEnd=function(ve,Fe,dt){ve=wl(ve);var Kt=(Fe=Xu(Fe))?B1(ve):0;return Fe&&KtFe){var Kt=ve;ve=Fe,Fe=Kt}if(dt||ve%1||Fe%1){var _n=Gm();return Vd(ve+_n*(Fe-ve+Rv("1e-"+((_n+"").length-1))),Fe)}return Hn(ve,Fe)},rn.reduce=function(ve,Fe,dt){var Kt=Ku(ve)?jm:f6,_n=arguments.length<3;return Kt(ve,ps(Fe,4),dt,_n,Ct)},rn.reduceRight=function(ve,Fe,dt){var Kt=Ku(ve)?_2:f6,_n=arguments.length<3;return Kt(ve,ps(Fe,4),dt,_n,gb)},rn.repeat=function(ve,Fe,dt){return Fe=(dt?Fp(ve,Fe,dt):Fe===Me)?1:Xu(Fe),Ar(wl(ve),Fe)},rn.replace=function(){var ve=arguments,Fe=wl(ve[0]);return ve.length<3?Fe:Fe.replace(ve[1],ve[2])},rn.result=function(ve,Fe,dt){var Kt=-1,_n=(Fe=Km(Fe,ve)).length;for(_n||(_n=1,ve=Me);++Kt<_n;){var jn=null==ve?Me:ve[Ag(Fe[Kt])];jn===Me&&(Kt=_n,jn=dt),ve=Ey(jn)?jn.call(ve):jn}return ve},rn.round=Hk,rn.runInContext=ei,rn.sample=function(ve){return(Ku(ve)?v6:ri)(ve)},rn.size=function(ve){if(null==ve)return 0;if(Lp(ve))return R6(ve)?B1(ve):ve.length;var Fe=B0(ve);return Fe==Yh||Fe==Jh?ve.size:se(ve).length},rn.snakeCase=Ek,rn.some=function(ve,Fe,dt){var Kt=Ku(ve)?dm:Xc;return dt&&Fp(ve,Fe,dt)&&(Fe=Me),Kt(ve,ps(Fe,3))},rn.sortedIndex=function(ve,Fe){return nf(ve,Fe)},rn.sortedIndexBy=function(ve,Fe,dt){return Kf(ve,Fe,ps(dt,2))},rn.sortedIndexOf=function(ve,Fe){var dt=null==ve?0:ve.length;if(dt){var Kt=nf(ve,Fe);if(Ktko)return[];var dt=Cl,Kt=Vd(ve,Cl);Fe=ps(Fe),ve-=Cl;for(var _n=fg(Kt,Fe);++dt=jn)return ve;var Rr=dt-B1(Kt);if(Rr<1)return Kt;var si=xr?R2(xr,0,Rr).join(""):ve.slice(0,Rr);if(_n===Me)return si+Kt;if(xr&&(Rr+=si.length-Rr),Z8(_n)){if(ve.slice(Rr).search(_n)){var xs,Es=si;for(_n.global||(_n=cy(_n.source,wl(ng.exec(_n))+"g")),_n.lastIndex=0;xs=_n.exec(Es);)var js=xs.index;si=si.slice(0,js===Me?Rr:js)}}else if(ve.indexOf(N0(_n),Rr)!=Rr){var gs=si.lastIndexOf(_n);gs>-1&&(si=si.slice(0,gs))}return si+Kt},rn.unescape=function(ve){return(ve=wl(ve))&&Av.test(ve)?ve.replace(Uy,h6):ve},rn.uniqueId=function(ve){var Fe=++m6;return wl(ve)+Fe},rn.upperCase=zx,rn.upperFirst=J8,rn.each=Sg,rn.eachRight=P4,rn.first=X9,K4(rn,function(){var ve={};return $r(rn,function(Fe,dt){Fc.call(rn.prototype,dt)||(ve[dt]=Fe)}),ve}(),{chain:!1}),rn.VERSION="4.17.21",ef(["bind","bindKey","curry","curryRight","partial","partialRight"],function(ve){rn[ve].placeholder=rn}),ef(["drop","take"],function(ve,Fe){Ri.prototype[ve]=function(dt){dt=dt===Me?1:Xl(Xu(dt),0);var Kt=this.__filtered__&&!Fe?new Ri(this):this.clone();return Kt.__filtered__?Kt.__takeCount__=Vd(dt,Kt.__takeCount__):Kt.__views__.push({size:Vd(dt,Cl),type:ve+(Kt.__dir__<0?"Right":"")}),Kt},Ri.prototype[ve+"Right"]=function(dt){return this.reverse()[ve](dt).reverse()}}),ef(["filter","map","takeWhile"],function(ve,Fe){var dt=Fe+1,Kt=1==dt||3==dt;Ri.prototype[ve]=function(_n){var jn=this.clone();return jn.__iteratees__.push({iteratee:ps(_n,3),type:dt}),jn.__filtered__=jn.__filtered__||Kt,jn}}),ef(["head","last"],function(ve,Fe){var dt="take"+(Fe?"Right":"");Ri.prototype[ve]=function(){return this[dt](1).value()[0]}}),ef(["initial","tail"],function(ve,Fe){var dt="drop"+(Fe?"":"Right");Ri.prototype[ve]=function(){return this.__filtered__?new Ri(this):this[dt](1)}}),Ri.prototype.compact=function(){return this.filter(F0)},Ri.prototype.find=function(ve){return this.filter(ve).head()},Ri.prototype.findLast=function(ve){return this.reverse().find(ve)},Ri.prototype.invokeMap=Yr(function(ve,Fe){return"function"==typeof ve?new Ri(this):this.map(function(dt){return an(dt,ve,Fe)})}),Ri.prototype.reject=function(ve){return this.filter(z8(ps(ve)))},Ri.prototype.slice=function(ve,Fe){ve=Xu(ve);var dt=this;return dt.__filtered__&&(ve>0||Fe<0)?new Ri(dt):(ve<0?dt=dt.takeRight(-ve):ve&&(dt=dt.drop(ve)),Fe!==Me&&(dt=(Fe=Xu(Fe))<0?dt.dropRight(-Fe):dt.take(Fe-ve)),dt)},Ri.prototype.takeRightWhile=function(ve){return this.reverse().takeWhile(ve).reverse()},Ri.prototype.toArray=function(){return this.take(Cl)},$r(Ri.prototype,function(ve,Fe){var dt=/^(?:filter|find|map|reject)|While$/.test(Fe),Kt=/^(?:head|last)$/.test(Fe),_n=rn[Kt?"take"+("last"==Fe?"Right":""):Fe],jn=Kt||/^find/.test(Fe);_n&&(rn.prototype[Fe]=function(){var xr=this.__wrapped__,Rr=Kt?[1]:arguments,si=xr instanceof Ri,xs=Rr[0],Es=si||Ku(xr),js=function(Sc){var Uc=_n.apply(rn,Sh([Sc],Rr));return Kt&&gs?Uc[0]:Uc};Es&&dt&&"function"==typeof xs&&1!=xs.length&&(si=Es=!1);var gs=this.__chain__,Ro=!!this.__actions__.length,wo=jn&&!gs,ho=si&&!Ro;if(!jn&&Es){xr=ho?xr:new Ri(this);var lu=ve.apply(xr,Rr);return lu.__actions__.push({func:Eb,args:[js],thisArg:Me}),new ns(lu,gs)}return wo&&ho?ve.apply(this,Rr):(lu=this.thru(js),wo?Kt?lu.value()[0]:lu.value():lu)})}),ef(["pop","push","shift","sort","splice","unshift"],function(ve){var Fe=M0[ve],dt=/^(?:push|sort|unshift)$/.test(ve)?"tap":"thru",Kt=/^(?:pop|shift)$/.test(ve);rn.prototype[ve]=function(){var _n=arguments;if(Kt&&!this.__chain__){var jn=this.value();return Fe.apply(Ku(jn)?jn:[],_n)}return this[dt](function(xr){return Fe.apply(Ku(xr)?xr:[],_n)})}}),$r(Ri.prototype,function(ve,Fe){var dt=rn[Fe];if(dt){var Kt=dt.name+"";Fc.call(bm,Kt)||(bm[Kt]=[]),bm[Kt].push({name:Fe,func:dt})}}),bm[R8(Me,2).name]=[{name:"wrapper",func:Me}],Ri.prototype.clone=function(){var ve=new Ri(this.__wrapped__);return ve.__actions__=$d(this.__actions__),ve.__dir__=this.__dir__,ve.__filtered__=this.__filtered__,ve.__iteratees__=$d(this.__iteratees__),ve.__takeCount__=this.__takeCount__,ve.__views__=$d(this.__views__),ve},Ri.prototype.reverse=function(){if(this.__filtered__){var ve=new Ri(this);ve.__dir__=-1,ve.__filtered__=!0}else(ve=this.clone()).__dir__*=-1;return ve},Ri.prototype.value=function(){var ve=this.__wrapped__.value(),Fe=this.__dir__,dt=Ku(ve),Kt=Fe<0,_n=dt?ve.length:0,jn=function(ve,Fe,dt){for(var Kt=-1,_n=dt.length;++Kt<_n;){var jn=dt[Kt],xr=jn.size;switch(jn.type){case"drop":ve+=xr;break;case"dropRight":Fe-=xr;break;case"take":Fe=Vd(Fe,ve+xr);break;case"takeRight":ve=Xl(ve,Fe-xr)}}return{start:ve,end:Fe}}(0,_n,this.__views__),xr=jn.start,Rr=jn.end,si=Rr-xr,xs=Kt?Rr:xr-1,Es=this.__iteratees__,js=Es.length,gs=0,Ro=Vd(si,this.__takeCount__);if(!dt||!Kt&&_n==si&&Ro==si)return Np(ve,this.__actions__);var wo=[];e:for(;si--&&gs=this.__values__.length;return{done:ve,value:ve?Me:this.__values__[this.__index__++]}},rn.prototype.plant=function(ve){for(var Fe,dt=this;dt instanceof ms;){var Kt=KI(dt);Kt.__index__=0,Kt.__values__=Me,Fe?_n.__wrapped__=Kt:Fe=Kt;var _n=Kt;dt=dt.__wrapped__}return _n.__wrapped__=ve,Fe},rn.prototype.reverse=function(){var ve=this.__wrapped__;if(ve instanceof Ri){var Fe=ve;return this.__actions__.length&&(Fe=new Ri(this)),(Fe=Fe.reverse()).__actions__.push({func:Eb,args:[S4],thisArg:Me}),new ns(Fe,this.__chain__)}return this.thru(S4)},rn.prototype.toJSON=rn.prototype.valueOf=rn.prototype.value=function(){return Np(this.__wrapped__,this.__actions__)},rn.prototype.first=rn.prototype.head,I2&&(rn.prototype[I2]=function(){return this}),rn}();s1?((s1.exports=fm)._=fm,gu._=fm):Dl._=fm}.call(S0);var u2=Object.defineProperty,om=Object.defineProperties,Ll=Object.getOwnPropertyDescriptors,Ap=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Le=(Ot,De,Me)=>De in Ot?u2(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,Qe=(Ot,De)=>{for(var Me in De||(De={}))Se.call(De,Me)&&Le(Ot,Me,De[Me]);if(Ap)for(var Me of Ap(De))Ue.call(De,Me)&&Le(Ot,Me,De[Me]);return Ot},ut=(Ot,De)=>om(Ot,Ll(De));function At(Ot,De,Me){var pt;const vt=function(Ot){const[De,Me]=Ot.split(":");return{namespace:De,reference:Me}}(Ot);return(null==(pt=De.rpcMap)?void 0:pt[vt.reference])||`https://rpc.walletconnect.com/v1/?chainId=${vt.namespace}:${vt.reference}&projectId=${Me}`}function Zt(Ot){return Ot.includes(":")?Ot.split(":")[1]:Ot}function Jt(Ot){return Ot.map(De=>`${De.split(":")[0]}:${De.split(":")[1]}`)}function Xn(Ot){var De,Me,pt,vt;const Dt={};if(!Os(Ot))return Dt;for(const[nn,Nn]of Object.entries(Ot)){const Mr=oc(nn)?[nn]:Nn.chains,Vr=Nn.methods||[],Si=Nn.events||[],ls=Nn.rpcMap||{},Oo=po(nn);Dt[Oo]=ut(Qe(Qe({},Dt[Oo]),Nn),{chains:Du(Mr,null==(De=Dt[Oo])?void 0:De.chains),methods:Du(Vr,null==(Me=Dt[Oo])?void 0:Me.methods),events:Du(Si,null==(pt=Dt[Oo])?void 0:pt.events),rpcMap:Qe(Qe({},ls),null==(vt=Dt[Oo])?void 0:vt.rpcMap)})}return Dt}function or(Ot){return Ot.includes(":")?Ot.split(":")[2]:Ot}function Er(Ot){const De={};for(const[Me,pt]of Object.entries(Ot)){const vt=pt.methods||[],Dt=pt.events||[],nn=pt.accounts||[],Nn=oc(Me)?[Me]:pt.chains?pt.chains:Jt(pt.accounts);De[Me]={chains:Nn,methods:vt,events:Dt,accounts:nn}}return De}function Hr(Ot){return"number"==typeof Ot?Ot:Ot.includes("0x")?parseInt(Ot,16):Ot.includes(":")?Number(Ot.split(":")[1]):Number(Ot)}const oi={},vi=Ot=>oi[Ot],Zi=(Ot,De)=>{oi[Ot]=De};class Fs{constructor(De){this.name="polkadot",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getAccounts(){const De=this.namespace.accounts;return De&&De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2])||[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class vo{constructor(De){this.name="eip155",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}request(De){var Me=this;return(0,ie.Z)(function*(){switch(De.request.method){case"eth_requestAccounts":case"eth_accounts":return Me.getAccounts();case"wallet_switchEthereumChain":return yield Me.handleSwitchChain(De);case"eth_chainId":return parseInt(Me.getDefaultChain())}return Me.namespace.methods.includes(De.request.method)?yield Me.client.request(De):Me.getHttpProvider().request(De.request)})()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(parseInt(De),Me),this.chainId=parseInt(De),this.events.emit("default_chain_changed",`${this.name}:${De}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}createHttpProvider(De,Me){const pt=Me||At(`${this.name}:${De}`,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.k(pt,vi("disableProviderPing")))}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=parseInt(Zt(Me));De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}getHttpProvider(){const De=this.chainId,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}handleSwitchChain(De){var Me=this;return(0,ie.Z)(function*(){var pt,vt;let Dt=De.request.params?null==(pt=De.request.params[0])?void 0:pt.chainId:"0x0";Dt=Dt.startsWith("0x")?Dt:`0x${Dt}`;const nn=parseInt(Dt,16);if(Me.isChainApproved(nn))Me.setDefaultChain(`${nn}`);else{if(!Me.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${nn}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);yield Me.client.request({topic:De.topic,request:{method:De.request.method,params:[{chainId:Dt}]},chainId:null==(vt=Me.namespace.chains)?void 0:vt[0]}),Me.setDefaultChain(`${nn}`)}return null})()}isChainApproved(De){return this.namespace.chains.includes(`${this.name}:${De}`)}}class Za{constructor(De){this.name="solana",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class Da{constructor(De){this.name="cosmos",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class eo{constructor(De){this.name="cip34",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{const pt=this.getCardanoRPCUrl(Me),vt=Zt(Me);De[vt]=this.createHttpProvider(vt,pt)}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}getCardanoRPCUrl(De){const Me=this.namespace.rpcMap;if(Me)return Me[De]}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||this.getCardanoRPCUrl(De);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class Wu{constructor(De){this.name="elrond",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}class fl{constructor(De){this.name="multiversx",this.namespace=De.namespace,this.events=vi("events"),this.client=vi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(De){this.namespace=Object.assign(this.namespace,De)}requestAccounts(){return this.getAccounts()}request(De){return this.namespace.methods.includes(De.request.method)?this.client.request(De):this.getHttpProvider().request(De.request)}setDefaultChain(De,Me){this.httpProviders[De]||this.setHttpProvider(De,Me),this.chainId=De,this.events.emit("default_chain_changed",`${this.name}:${De}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const De=this.namespace.chains[0];if(!De)throw new Error("ChainId not found");return De.split(":")[1]}getAccounts(){const De=this.namespace.accounts;return De?[...new Set(De.filter(Me=>Me.split(":")[1]===this.chainId.toString()).map(Me=>Me.split(":")[2]))]:[]}createHttpProviders(){const De={};return this.namespace.chains.forEach(Me=>{var pt;const vt=Zt(Me);De[vt]=this.createHttpProvider(vt,null==(pt=this.namespace.rpcMap)?void 0:pt[Me])}),De}getHttpProvider(){const De=`${this.name}:${this.chainId}`,Me=this.httpProviders[De];if(typeof Me>"u")throw new Error(`JSON-RPC provider for ${De} not found`);return Me}setHttpProvider(De,Me){const pt=this.createHttpProvider(De,Me);pt&&(this.httpProviders[De]=pt)}createHttpProvider(De,Me){const pt=Me||At(De,this.namespace,this.client.core.projectId);if(!pt)throw new Error(`No RPC url provided for chainId: ${De}`);return new fd.r(new ia.Z(pt,vi("disableProviderPing")))}}var Kc=Object.defineProperty,Xd=Object.defineProperties,Yl=Object.getOwnPropertyDescriptors,Jl=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,wu=Object.prototype.propertyIsEnumerable,al=(Ot,De,Me)=>De in Ot?Kc(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,k0=(Ot,De)=>{for(var Me in De||(De={}))Is.call(De,Me)&&al(Ot,Me,De[Me]);if(Jl)for(var Me of Jl(De))wu.call(De,Me)&&al(Ot,Me,De[Me]);return Ot},Ip=(Ot,De)=>Xd(Ot,Yl(De));class Dm{constructor(De){this.events=new(O()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=De,this.logger=typeof De?.logger<"u"&&"string"!=typeof De?.logger?De.logger:(0,Io.pino)((0,Io.getDefaultLoggerOptions)({level:De?.logger||"error"})),this.disableProviderPing=De?.disableProviderPing||!1}static init(De){return(0,ie.Z)(function*(){const Me=new Dm(De);return yield Me.initialize(),Me})()}request(De,Me){var pt=this;return(0,ie.Z)(function*(){const[vt,Dt]=pt.validateChain(Me);if(!pt.session)throw new Error("Please call connect() before request()");return yield pt.getProvider(vt).request({request:k0({},De),chainId:`${vt}:${Dt}`,topic:pt.session.topic})})()}sendAsync(De,Me,pt){this.request(De,pt).then(vt=>Me(null,vt)).catch(vt=>Me(vt,void 0))}enable(){var De=this;return(0,ie.Z)(function*(){if(!De.client)throw new Error("Sign Client not initialized");return De.session||(yield De.connect({namespaces:De.namespaces,optionalNamespaces:De.optionalNamespaces,sessionProperties:De.sessionProperties})),yield De.requestAccounts()})()}disconnect(){var De=this;return(0,ie.Z)(function*(){var Me;if(!De.session)throw new Error("Please call connect() before enable()");yield De.client.disconnect({topic:null==(Me=De.session)?void 0:Me.topic,reason:Ir("USER_DISCONNECTED")}),yield De.cleanup()})()}connect(De){var Me=this;return(0,ie.Z)(function*(){if(!Me.client)throw new Error("Sign Client not initialized");if(Me.setNamespaces(De),yield Me.cleanupPendingPairings(),!De.skipPairing)return yield Me.pair(De.pairingTopic)})()}on(De,Me){this.events.on(De,Me)}once(De,Me){this.events.once(De,Me)}removeListener(De,Me){this.events.removeListener(De,Me)}off(De,Me){this.events.off(De,Me)}get isWalletConnect(){return!0}pair(De){var Me=this;return(0,ie.Z)(function*(){Me.shouldAbortPairingAttempt=!1;let pt=0;do{if(Me.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(pt>=Me.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:vt,approval:Dt}=yield Me.client.connect({pairingTopic:De,requiredNamespaces:Me.namespaces,optionalNamespaces:Me.optionalNamespaces,sessionProperties:Me.sessionProperties});vt&&(Me.uri=vt,Me.events.emit("display_uri",vt)),yield Dt().then(nn=>{Me.session=nn,Me.namespaces||(Me.namespaces=Er(nn.namespaces),Me.persist("namespaces",Me.namespaces))}).catch(nn=>{if(nn.message!==Ke)throw nn;pt++})}while(!Me.session);return Me.onConnect(),Me.session})()}setDefaultChain(De,Me){try{if(!this.session)return;const[pt,vt]=this.validateChain(De);this.getProvider(pt).setDefaultChain(vt,Me)}catch(pt){if(!/Please call connect/.test(pt.message))throw pt}}cleanupPendingPairings(De={}){var Me=this;return(0,ie.Z)(function*(){Me.logger.info("Cleaning up inactive pairings...");const pt=Me.client.pairing.getAll();if(Ei(pt)){for(const vt of pt)De.deletePairings?Me.client.core.expirer.set(vt.topic,0):yield Me.client.core.relayer.subscriber.unsubscribe(vt.topic);Me.logger.info(`Inactive pairings cleared: ${pt.length}`)}})()}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}checkStorage(){var De=this;return(0,ie.Z)(function*(){De.namespaces=yield De.getFromStore("namespaces"),De.optionalNamespaces=(yield De.getFromStore("optionalNamespaces"))||{},De.client.session.length&&(De.session=De.client.session.get(De.client.session.keys[De.client.session.keys.length-1]),De.createProviders())})()}initialize(){var De=this;return(0,ie.Z)(function*(){De.logger.trace("Initialized"),yield De.createClient(),yield De.checkStorage(),De.registerEventListeners()})()}createClient(){var De=this;return(0,ie.Z)(function*(){De.client=De.providerOpts.client||(yield Xs.init({logger:De.providerOpts.logger||"error",relayUrl:De.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:De.providerOpts.projectId,metadata:De.providerOpts.metadata,storageOptions:De.providerOpts.storageOptions,storage:De.providerOpts.storage,name:De.providerOpts.name})),De.logger.trace("SignClient Initialized")})()}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const De=[...new Set(Object.keys(this.session.namespaces).map(Me=>po(Me)))];Zi("client",this.client),Zi("events",this.events),Zi("disableProviderPing",this.disableProviderPing),De.forEach(Me=>{if(!this.session)return;const pt=function(Ot,De){const Me=Object.keys(De.namespaces).filter(vt=>vt.includes(Ot));if(!Me.length)return[];const pt=[];return Me.forEach(vt=>{pt.push(...De.namespaces[vt].accounts)}),pt}(Me,this.session),vt=Jt(pt),Dt=function(Ot={},De={}){const Me=Xn(Ot),pt=Xn(De);return Z0.exports.merge(Me,pt)}(this.namespaces,this.optionalNamespaces),nn=Ip(k0({},Dt[Me]),{accounts:pt,chains:vt});switch(Me){case"eip155":this.rpcProviders[Me]=new vo({namespace:nn});break;case"solana":this.rpcProviders[Me]=new Za({namespace:nn});break;case"cosmos":this.rpcProviders[Me]=new Da({namespace:nn});break;case"polkadot":this.rpcProviders[Me]=new Fs({namespace:nn});break;case"cip34":this.rpcProviders[Me]=new eo({namespace:nn});break;case"elrond":this.rpcProviders[Me]=new Wu({namespace:nn});break;case"multiversx":this.rpcProviders[Me]=new fl({namespace:nn})}})}registerEventListeners(){var De=this;if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",Me=>{this.events.emit("session_ping",Me)}),this.client.on("session_event",Me=>{const{params:pt}=Me,{event:vt}=pt;if("accountsChanged"===vt.name){const Dt=vt.data;Dt&&Ei(Dt)&&this.events.emit("accountsChanged",Dt.map(or))}else if("chainChanged"===vt.name){const Dt=pt.chainId,nn=pt.event.data,Nn=po(Dt),Mr=Hr(Dt)!==Hr(nn)?`${Nn}:${Hr(nn)}`:Dt;this.onChainChanged(Mr)}else this.events.emit(vt.name,vt.data);this.events.emit("session_event",Me)}),this.client.on("session_update",({topic:Me,params:pt})=>{var vt;const{namespaces:Dt}=pt,nn=null==(vt=this.client)?void 0:vt.session.get(Me);this.session=Ip(k0({},nn),{namespaces:Dt}),this.onSessionUpdate(),this.events.emit("session_update",{topic:Me,params:pt})}),this.client.on("session_delete",function(){var Me=(0,ie.Z)(function*(pt){yield De.cleanup(),De.events.emit("session_delete",pt),De.events.emit("disconnect",Ip(k0({},Ir("USER_DISCONNECTED")),{data:pt.topic}))});return function(pt){return Me.apply(this,arguments)}}()),this.on("default_chain_changed",Me=>{this.onChainChanged(Me,!0)})}getProvider(De){if(!this.rpcProviders[De])throw new Error(`Provider not found: ${De}`);return this.rpcProviders[De]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(De=>{var Me;this.getProvider(De).updateNamespace(null==(Me=this.session)?void 0:Me.namespaces[De])})}setNamespaces(De){const{namespaces:Me,optionalNamespaces:pt,sessionProperties:vt}=De;Me&&Object.keys(Me).length&&(this.namespaces=Me),pt&&Object.keys(pt).length&&(this.optionalNamespaces=pt),this.sessionProperties=vt,this.persist("namespaces",Me),this.persist("optionalNamespaces",pt)}validateChain(De){const[Me,pt]=De?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[Me,pt];if(Me&&!Object.keys(this.namespaces||{}).map(nn=>po(nn)).includes(Me))throw new Error(`Namespace '${Me}' is not configured. Please call connect() first with namespace config.`);if(Me&&pt)return[Me,pt];const vt=po(Object.keys(this.namespaces)[0]);return[vt,this.rpcProviders[vt].getDefaultChain()]}requestAccounts(){var De=this;return(0,ie.Z)(function*(){const[Me]=De.validateChain();return yield De.getProvider(Me).requestAccounts()})()}onChainChanged(De,Me=!1){var pt;if(!this.namespaces)return;const[vt,Dt]=this.validateChain(De);Me||this.getProvider(vt).setDefaultChain(Dt),(null!=(pt=this.namespaces[vt])?pt:this.namespaces[`${vt}:${Dt}`]).defaultChain=Dt,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",Dt)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}cleanup(){var De=this;return(0,ie.Z)(function*(){De.session=void 0,De.namespaces=void 0,De.optionalNamespaces=void 0,De.sessionProperties=void 0,De.persist("namespaces",void 0),De.persist("optionalNamespaces",void 0),De.persist("sessionProperties",void 0),yield De.cleanupPendingPairings({deletePairings:!0})})()}persist(De,Me){this.client.core.storage.setItem(`${vd}/${De}`,Me)}getFromStore(De){var Me=this;return(0,ie.Z)(function*(){return yield Me.client.core.storage.getItem(`${vd}/${De}`)})()}}const p0=Dm,qf=["eth_sendTransaction","personal_sign"],ys=["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"],bs=["chainChanged","accountsChanged"],C0=["chainChanged","accountsChanged","message","disconnect","connect"];var Hi=Object.defineProperty,n1=Object.defineProperties,_a=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,cc=Object.prototype.hasOwnProperty,Qd=Object.prototype.propertyIsEnumerable,Ui=(Ot,De,Me)=>De in Ot?Hi(Ot,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ot[De]=Me,vr=(Ot,De)=>{for(var Me in De||(De={}))cc.call(De,Me)&&Ui(Ot,Me,De[Me]);if(ro)for(var Me of ro(De))Qd.call(De,Me)&&Ui(Ot,Me,De[Me]);return Ot},So=(Ot,De)=>n1(Ot,_a(De));function Pi(Ot){return Number(Ot[0].split(":")[1])}function Fa(Ot){return`0x${Ot.toString(16)}`}class Ps{constructor(){this.events=new q.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(De,Me)=>(this.events.on(De,Me),this),this.once=(De,Me)=>(this.events.once(De,Me),this),this.removeListener=(De,Me)=>(this.events.removeListener(De,Me),this),this.off=(De,Me)=>(this.events.off(De,Me),this),this.parseAccount=De=>this.isCompatibleChainId(De)?this.parseAccountId(De).address:De,this.signer={},this.rpc={}}static init(De){return(0,ie.Z)(function*(){const Me=new Ps;return yield Me.initialize(De),Me})()}request(De){var Me=this;return(0,ie.Z)(function*(){return yield Me.signer.request(De,Me.formatChainId(Me.chainId))})()}sendAsync(De,Me){this.signer.sendAsync(De,Me,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){var De=this;return(0,ie.Z)(function*(){return De.session||(yield De.connect()),yield De.request({method:"eth_requestAccounts"})})()}connect(De){var Me=this;return(0,ie.Z)(function*(){if(!Me.signer.client)throw new Error("Provider not initialized. Call init() first");Me.loadConnectOpts(De);const{required:pt,optional:vt}=function(Ot){const{chains:De,optionalChains:Me,methods:pt,optionalMethods:vt,events:Dt,optionalEvents:nn,rpcMap:Nn}=Ot;if(!Ei(De))throw new Error("Invalid chains");const Mr={chains:De,methods:pt||qf,events:Dt||bs,rpcMap:vr({},De.length?{[Pi(De)]:Nn[Pi(De)]}:{})},Vr=Dt?.filter(Yo=>!bs.includes(Yo)),Si=pt?.filter(Yo=>!qf.includes(Yo));if(!(Me||nn||vt||null!=Vr&&Vr.length||null!=Si&&Si.length))return{required:De.length?Mr:void 0};const Oo={chains:[...new Set(Vr?.length&&Si?.length||!Me?Mr.chains.concat(Me||[]):Me)],methods:[...new Set(Mr.methods.concat(null!=vt&&vt.length?vt:ys))],events:[...new Set(Mr.events.concat(null!=nn&&nn.length?nn:C0))],rpcMap:Nn};return{required:De.length?Mr:void 0,optional:Me.length?Oo:void 0}}(Me.rpc);try{const Dt=yield new Promise(function(){var Nn=(0,ie.Z)(function*(Mr,Vr){var Si;Me.rpc.showQrModal&&(null==(Si=Me.modal)||Si.subscribeModal(ls=>{!ls.open&&!Me.signer.session&&(Me.signer.abortPairingAttempt(),Vr(new Error("Connection request reset. Please try again.")))})),yield Me.signer.connect(So(vr({namespaces:vr({},pt&&{[Me.namespace]:pt})},vt&&{optionalNamespaces:{[Me.namespace]:vt}}),{pairingTopic:De?.pairingTopic})).then(ls=>{Mr(ls)}).catch(ls=>{Vr(new Error(ls.message))})});return function(Mr,Vr){return Nn.apply(this,arguments)}}());if(!Dt)return;const nn=function(Ot,De=[]){const Me=[];return Object.keys(Ot).forEach(pt=>{De.length&&!De.includes(pt)||Me.push(...Ot[pt].accounts)}),Me}(Dt.namespaces,[Me.namespace]);Me.setChainIds(Me.rpc.chains.length?Me.rpc.chains:nn),Me.setAccounts(nn),Me.events.emit("connect",{chainId:Fa(Me.chainId)})}catch(Dt){throw Me.signer.logger.error(Dt),Dt}finally{Me.modal&&Me.modal.closeModal()}})()}disconnect(){var De=this;return(0,ie.Z)(function*(){De.session&&(yield De.signer.disconnect()),De.reset()})()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",De=>{const{params:Me}=De,{event:pt}=Me;"accountsChanged"===pt.name?(this.accounts=this.parseAccounts(pt.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===pt.name?this.setChainId(this.formatChainId(pt.data)):this.events.emit(pt.name,pt.data),this.events.emit("session_event",De)}),this.signer.on("chainChanged",De=>{const Me=parseInt(De);this.chainId=Me,this.events.emit("chainChanged",Fa(this.chainId)),this.persist()}),this.signer.on("session_update",De=>{this.events.emit("session_update",De)}),this.signer.on("session_delete",De=>{this.reset(),this.events.emit("session_delete",De),this.events.emit("disconnect",So(vr({},Ir("USER_DISCONNECTED")),{data:De.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",De=>{var Me,pt;this.rpc.showQrModal&&(null==(Me=this.modal)||Me.closeModal(),null==(pt=this.modal)||pt.openModal({uri:De})),this.events.emit("display_uri",De)})}switchEthereumChain(De){this.request({method:"wallet_switchEthereumChain",params:[{chainId:De.toString(16)}]})}isCompatibleChainId(De){return"string"==typeof De&&De.startsWith(`${this.namespace}:`)}formatChainId(De){return`${this.namespace}:${De}`}parseChainId(De){return Number(De.split(":")[1])}setChainIds(De){const Me=De.filter(pt=>this.isCompatibleChainId(pt)).map(pt=>this.parseChainId(pt));Me.length&&(this.chainId=Me[0],this.events.emit("chainChanged",Fa(this.chainId)),this.persist())}setChainId(De){if(this.isCompatibleChainId(De)){const Me=this.parseChainId(De);this.chainId=Me,this.switchEthereumChain(Me)}}parseAccountId(De){const[Me,pt,vt]=De.split(":");return{chainId:`${Me}:${pt}`,address:vt}}setAccounts(De){this.accounts=De.filter(Me=>this.parseChainId(this.parseAccountId(Me).chainId)===this.chainId).map(Me=>this.parseAccountId(Me).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(De){var Me,pt;const vt=null!=(Me=De?.chains)?Me:[],Dt=null!=(pt=De?.optionalChains)?pt:[],nn=vt.concat(Dt);if(!nn.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const Nn=vt.length?De?.methods||qf:[],Mr=vt.length?De?.events||bs:[],Vr=De?.optionalMethods||[],Si=De?.optionalEvents||[],ls=De?.rpcMap||this.buildRpcMap(nn,De.projectId),Oo=De?.qrModalOptions||void 0;return{chains:vt?.map(Yo=>this.formatChainId(Yo)),optionalChains:Dt.map(Yo=>this.formatChainId(Yo)),methods:Nn,events:Mr,optionalMethods:Vr,optionalEvents:Si,rpcMap:ls,showQrModal:!(null==De||!De.showQrModal),qrModalOptions:Oo,projectId:De.projectId,metadata:De.metadata}}buildRpcMap(De,Me){const pt={};return De.forEach(vt=>{pt[vt]=this.getRpcUrl(vt,Me)}),pt}initialize(De){var Me=this;return(0,ie.Z)(function*(){if(Me.rpc=Me.getRpcConfig(De),Me.chainId=Pi(Me.rpc.chains.length?Me.rpc.chains:Me.rpc.optionalChains),Me.signer=yield p0.init({projectId:Me.rpc.projectId,metadata:Me.rpc.metadata,disableProviderPing:De.disableProviderPing,relayUrl:De.relayUrl,storageOptions:De.storageOptions}),Me.registerEventListeners(),yield Me.loadPersistedSession(),Me.rpc.showQrModal){let pt;try{const{WalletConnectModal:vt}=yield Y.e(2687).then(Y.bind(Y,52687));pt=vt}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(pt)try{Me.modal=new pt(vr({walletConnectVersion:2,projectId:Me.rpc.projectId,standaloneChains:Me.rpc.chains},Me.rpc.qrModalOptions))}catch(vt){throw Me.signer.logger.error(vt),new Error("Could not generate WalletConnectModal Instance")}}})()}loadConnectOpts(De){if(!De)return;const{chains:Me,optionalChains:pt,rpcMap:vt}=De;Me&&Ei(Me)&&(this.rpc.chains=Me.map(Dt=>this.formatChainId(Dt)),Me.forEach(Dt=>{this.rpc.rpcMap[Dt]=vt?.[Dt]||this.getRpcUrl(Dt)})),pt&&Ei(pt)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=pt?.map(Dt=>this.formatChainId(Dt)),pt.forEach(Dt=>{this.rpc.rpcMap[Dt]=vt?.[Dt]||this.getRpcUrl(Dt)}))}getRpcUrl(De,Me){var pt;return(null==(pt=this.rpc.rpcMap)?void 0:pt[De])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${De}&projectId=${Me||this.rpc.projectId}`}loadPersistedSession(){var De=this;return(0,ie.Z)(function*(){if(!De.session)return;const Me=yield De.signer.client.core.storage.getItem(`${De.STORAGE_KEY}/chainId`),pt=De.session.namespaces[`${De.namespace}:${Me}`]?De.session.namespaces[`${De.namespace}:${Me}`]:De.session.namespaces[De.namespace];De.setChainIds(Me?[De.formatChainId(Me)]:pt?.accounts),De.setAccounts(pt?.accounts)})()}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(De){return"string"==typeof De||De instanceof String?[this.parseAccount(De)]:De.map(Me=>this.parseAccount(Me))}}const Ec=Ps},53685:(bt,be)=>{"use strict";function Y(h){let u;return"undefined"!=typeof window&&void 0!==window[h]&&(u=window[h]),u}function ie(h){const u=Y(h);if(!u)throw new Error(`${h} is not defined in Window`);return u}Object.defineProperty(be,"__esModule",{value:!0}),be.getLocalStorage=be.getLocalStorageOrThrow=be.getCrypto=be.getCryptoOrThrow=be.getLocation=be.getLocationOrThrow=be.getNavigator=be.getNavigatorOrThrow=be.getDocument=be.getDocumentOrThrow=be.getFromWindowOrThrow=be.getFromWindow=void 0,be.getFromWindow=Y,be.getFromWindowOrThrow=ie,be.getDocumentOrThrow=function(){return ie("document")},be.getDocument=function(){return Y("document")},be.getNavigatorOrThrow=function(){return ie("navigator")},be.getNavigator=function(){return Y("navigator")},be.getLocationOrThrow=function(){return ie("location")},be.getLocation=function(){return Y("location")},be.getCryptoOrThrow=function(){return ie("crypto")},be.getCrypto=function(){return Y("crypto")},be.getLocalStorageOrThrow=function(){return ie("localStorage")},be.getLocalStorage=function(){return Y("localStorage")}},58165:(bt,be,Y)=>{"use strict";be.D=void 0;const q=Y(53685);be.D=function(){let E,d;try{E=q.getDocumentOrThrow(),d=q.getLocationOrThrow()}catch{return null}function f(..._){const w=E.getElementsByTagName("meta");for(let S=0;SI.getAttribute(L)).filter(L=>!!L&&_.includes(L));if(P.length&&P){const L=I.getAttribute("content");if(L)return L}}return""}const b=function(){let _=f("name","og:site_name","og:title","twitter:title");return _||(_=E.title),_}();return{description:f("description","og:description","twitter:description","keywords"),url:d.origin,icons:function(){const _=E.getElementsByTagName("link"),w=[];for(let S=0;S<_.length;S++){const I=_[S],P=I.getAttribute("rel");if(P&&P.toLowerCase().indexOf("icon")>-1){const L=I.getAttribute("href");if(L)if(-1===L.toLowerCase().indexOf("https:")&&-1===L.toLowerCase().indexOf("http:")&&0!==L.indexOf("//")){let V=d.protocol+"//"+d.host;if(0===L.indexOf("/"))V+=L;else{const W=d.pathname.split("/");W.pop(),V+=W.join("/")+"/"+L}w.push(V)}else 0===L.indexOf("//")?w.push(d.protocol+L):w.push(L)}}return w}(),name:b}}},15463:(bt,be,Y)=>{"use strict";const ie=Y(82915),q=Y(65361),O=Y(95967),E=Y(10979),x=Symbol("encodeFragmentIdentifier");function g(I){if("string"!=typeof I||1!==I.length)throw new TypeError("arrayFormatSeparator must be single character string")}function b(I,P){return P.encode?P.strict?ie(I):encodeURIComponent(I):I}function l(I,P){return P.decode?q(I):I}function h(I){return Array.isArray(I)?I.sort():"object"==typeof I?h(Object.keys(I)).sort((P,L)=>Number(P)-Number(L)).map(P=>I[P]):I}function u(I){const P=I.indexOf("#");return-1!==P&&(I=I.slice(0,P)),I}function _(I){const P=(I=u(I)).indexOf("?");return-1===P?"":I.slice(P+1)}function w(I,P){return P.parseNumbers&&!Number.isNaN(Number(I))&&"string"==typeof I&&""!==I.trim()?I=Number(I):P.parseBooleans&&null!==I&&("true"===I.toLowerCase()||"false"===I.toLowerCase())&&(I="true"===I.toLowerCase()),I}function S(I,P){g((P=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},P)).arrayFormatSeparator);const L=function(I){let P;switch(I.arrayFormat){case"index":return(L,V,W)=>{P=/\[(\d*)\]$/.exec(L),L=L.replace(/\[\d*\]$/,""),P?(void 0===W[L]&&(W[L]={}),W[L][P[1]]=V):W[L]=V};case"bracket":return(L,V,W)=>{P=/(\[\])$/.exec(L),W[L=L.replace(/\[\]$/,"")]=P?void 0!==W[L]?[].concat(W[L],V):[V]:V};case"colon-list-separator":return(L,V,W)=>{P=/(:list)$/.exec(L),W[L=L.replace(/:list$/,"")]=P?void 0!==W[L]?[].concat(W[L],V):[V]:V};case"comma":case"separator":return(L,V,W)=>{const G="string"==typeof V&&V.includes(I.arrayFormatSeparator),H="string"==typeof V&&!G&&l(V,I).includes(I.arrayFormatSeparator);V=H?l(V,I):V;const j=G||H?V.split(I.arrayFormatSeparator).map(K=>l(K,I)):null===V?V:l(V,I);W[L]=j};case"bracket-separator":return(L,V,W)=>{const G=/(\[\])$/.test(L);if(L=L.replace(/\[\]$/,""),!G)return void(W[L]=V&&l(V,I));const H=null===V?[]:V.split(I.arrayFormatSeparator).map(j=>l(j,I));W[L]=void 0!==W[L]?[].concat(W[L],H):H};default:return(L,V,W)=>{W[L]=void 0!==W[L]?[].concat(W[L],V):V}}}(P),V=Object.create(null);if("string"!=typeof I||!(I=I.trim().replace(/^[?#&]/,"")))return V;for(const W of I.split("&")){if(""===W)continue;let[G,H]=O(P.decode?W.replace(/\+/g," "):W,"=");H=void 0===H?null:["comma","separator","bracket-separator"].includes(P.arrayFormat)?H:l(H,P),L(l(G,P),H,V)}for(const W of Object.keys(V)){const G=V[W];if("object"==typeof G&&null!==G)for(const H of Object.keys(G))G[H]=w(G[H],P);else V[W]=w(G,P)}return!1===P.sort?V:(!0===P.sort?Object.keys(V).sort():Object.keys(V).sort(P.sort)).reduce((W,G)=>{const H=V[G];return W[G]=Boolean(H)&&"object"==typeof H&&!Array.isArray(H)?h(H):H,W},Object.create(null))}be.extract=_,be.parse=S,be.stringify=(I,P)=>{if(!I)return"";g((P=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},P)).arrayFormatSeparator);const L=H=>P.skipNull&&(I=>null==I)(I[H])||P.skipEmptyString&&""===I[H],V=function(I){switch(I.arrayFormat){case"index":return P=>(L,V)=>{const W=L.length;return void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,[b(P,I),"[",W,"]"].join("")]:[...L,[b(P,I),"[",b(W,I),"]=",b(V,I)].join("")]};case"bracket":return P=>(L,V)=>void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,[b(P,I),"[]"].join("")]:[...L,[b(P,I),"[]=",b(V,I)].join("")];case"colon-list-separator":return P=>(L,V)=>void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,[b(P,I),":list="].join("")]:[...L,[b(P,I),":list=",b(V,I)].join("")];case"comma":case"separator":case"bracket-separator":{const P="bracket-separator"===I.arrayFormat?"[]=":"=";return L=>(V,W)=>void 0===W||I.skipNull&&null===W||I.skipEmptyString&&""===W?V:(W=null===W?"":W,0===V.length?[[b(L,I),P,b(W,I)].join("")]:[[V,b(W,I)].join(I.arrayFormatSeparator)])}default:return P=>(L,V)=>void 0===V||I.skipNull&&null===V||I.skipEmptyString&&""===V?L:null===V?[...L,b(P,I)]:[...L,[b(P,I),"=",b(V,I)].join("")]}}(P),W={};for(const H of Object.keys(I))L(H)||(W[H]=I[H]);const G=Object.keys(W);return!1!==P.sort&&G.sort(P.sort),G.map(H=>{const j=I[H];return void 0===j?"":null===j?b(H,P):Array.isArray(j)?0===j.length&&"bracket-separator"===P.arrayFormat?b(H,P)+"[]":j.reduce(V(H),[]).join("&"):b(H,P)+"="+b(j,P)}).filter(H=>H.length>0).join("&")},be.parseUrl=(I,P)=>{P=Object.assign({decode:!0},P);const[L,V]=O(I,"#");return Object.assign({url:L.split("?")[0]||"",query:S(_(I),P)},P&&P.parseFragmentIdentifier&&V?{fragmentIdentifier:l(V,P)}:{})},be.stringifyUrl=(I,P)=>{P=Object.assign({encode:!0,strict:!0,[x]:!0},P);const L=u(I.url).split("?")[0]||"",V=be.extract(I.url),W=be.parse(V,{sort:!1}),G=Object.assign(W,I.query);let H=be.stringify(G,P);H&&(H=`?${H}`);let j=function(I){let P="";const L=I.indexOf("#");return-1!==L&&(P=I.slice(L)),P}(I.url);return I.fragmentIdentifier&&(j=`#${P[x]?b(I.fragmentIdentifier,P):I.fragmentIdentifier}`),`${L}${H}${j}`},be.pick=(I,P,L)=>{L=Object.assign({parseFragmentIdentifier:!0,[x]:!1},L);const{url:V,query:W,fragmentIdentifier:G}=be.parseUrl(I,L);return be.stringifyUrl({url:V,query:E(W,P),fragmentIdentifier:G},L)},be.exclude=(I,P,L)=>{const V=Array.isArray(P)?W=>!P.includes(W):(W,G)=>!P(W,G);return be.pick(I,V,L)}},52280:function(bt){"use strict";!function(be){function Y(N){return parseInt(N)===N}function ie(N){if(!Y(N.length))return!1;for(var C=0;C255)return!1;return!0}function q(N,C){if(N.buffer&&ArrayBuffer.isView(N)&&"Uint8Array"===N.name)return C&&(N=N.slice?N.slice():Array.prototype.slice.call(N)),N;if(Array.isArray(N)){if(!ie(N))throw new Error("Array contains invalid value: "+N);return new Uint8Array(N)}if(Y(N.length)&&ie(N))return new Uint8Array(N);throw new Error("unsupported array-like object")}function O(N){return new Uint8Array(N)}function E(N,C,a,B,Q){(null!=B||null!=Q)&&(N=N.slice?N.slice(B,Q):Array.prototype.slice.call(N,B,Q)),C.set(N,a)}var C,d={toBytes:function(a){var B=[],Q=0;for(a=encodeURI(a);Q191&&ee<224?(B.push(String.fromCharCode((31&ee)<<6|63&a[Q+1])),Q+=2):(B.push(String.fromCharCode((15&ee)<<12|(63&a[Q+1])<<6|63&a[Q+2])),Q+=3)}return B.join("")}},x=(C="0123456789abcdef",{toBytes:function(B){for(var Q=[],ee=0;ee>4]+C[15&ce])}return Q.join("")}}),f={16:10,24:12,32:14},T=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],g=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],b=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],l=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],h=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],u=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],_=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],S=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],I=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],P=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],L=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],V=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],W=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function G(N){for(var C=[],a=0;a>2][C%4]=Q[C],this._Kd[N-ee][C%4]=Q[C];for(var we,ce=0,ue=B;ue>16&255]<<24^g[we>>8&255]<<16^g[255&we]<<8^g[we>>24&255]^T[ce]<<24,ce+=1,8!=B)for(C=1;C>8&255]<<8^g[we>>16&255]<<16^g[we>>24&255]<<24,C=B/2+1;C>2][Te=ue%4]=Q[C],this._Kd[N-ae][Te]=Q[C++],ue++}for(var ae=1;ae>24&255]^L[we>>16&255]^V[we>>8&255]^W[255&we]},H.prototype.encrypt=function(N){if(16!=N.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var C=this._Ke.length-1,a=[0,0,0,0],B=G(N),Q=0;Q<4;Q++)B[Q]^=this._Ke[0][Q];for(var ee=1;ee>24&255]^h[B[(Q+1)%4]>>16&255]^u[B[(Q+2)%4]>>8&255]^m[255&B[(Q+3)%4]]^this._Ke[ee][Q];B=a.slice()}var ue,ce=O(16);for(Q=0;Q<4;Q++)ce[4*Q]=255&(g[B[Q]>>24&255]^(ue=this._Ke[C][Q])>>24),ce[4*Q+1]=255&(g[B[(Q+1)%4]>>16&255]^ue>>16),ce[4*Q+2]=255&(g[B[(Q+2)%4]>>8&255]^ue>>8),ce[4*Q+3]=255&(g[255&B[(Q+3)%4]]^ue);return ce},H.prototype.decrypt=function(N){if(16!=N.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var C=this._Kd.length-1,a=[0,0,0,0],B=G(N),Q=0;Q<4;Q++)B[Q]^=this._Kd[0][Q];for(var ee=1;ee>24&255]^w[B[(Q+3)%4]>>16&255]^S[B[(Q+2)%4]>>8&255]^I[255&B[(Q+1)%4]]^this._Kd[ee][Q];B=a.slice()}var ue,ce=O(16);for(Q=0;Q<4;Q++)ce[4*Q]=255&(b[B[Q]>>24&255]^(ue=this._Kd[C][Q])>>24),ce[4*Q+1]=255&(b[B[(Q+3)%4]>>16&255]^ue>>16),ce[4*Q+2]=255&(b[B[(Q+2)%4]>>8&255]^ue>>8),ce[4*Q+3]=255&(b[255&B[(Q+1)%4]]^ue);return ce};var j=function(N){if(!(this instanceof j))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new H(N)};j.prototype.encrypt=function(N){if((N=q(N)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var C=O(N.length),a=O(16),B=0;B=0;--C)this._counter[C]=N%256,N>>=8},y.prototype.setBytes=function(N){if(16!=(N=q(N,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=N},y.prototype.increment=function(){for(var N=15;N>=0;N--){if(255!==this._counter[N]){this._counter[N]++;break}this._counter[N]=0}};var M=function(N,C){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",C instanceof y||(C=new y(C)),this._counter=C,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new H(N)};M.prototype.encrypt=function(N){for(var C=q(N,!0),a=0;a16)throw new Error("PKCS#7 padding byte out of range");for(var a=N.length-C,B=0;B{"use strict";const ie=be;ie.bignum=Y(32260),ie.define=Y(37738).define,ie.base=Y(38384),ie.constants=Y(82779),ie.decoders=Y(41274),ie.encoders=Y(7549)},37738:(bt,be,Y)=>{"use strict";const ie=Y(7549),q=Y(41274),O=Y(59879);function d(x,f){this.name=x,this.body=f,this.decoders={},this.encoders={}}be.define=function(f,T){return new d(f,T)},d.prototype._createNamed=function(f){const T=this.name;function g(b){this._initNamed(b,T)}return O(g,f),g.prototype._initNamed=function(l,h){f.call(this,l,h)},new g(this)},d.prototype._getDecoder=function(f){return this.decoders.hasOwnProperty(f=f||"der")||(this.decoders[f]=this._createNamed(q[f])),this.decoders[f]},d.prototype.decode=function(f,T,g){return this._getDecoder(T).decode(f,g)},d.prototype._getEncoder=function(f){return this.encoders.hasOwnProperty(f=f||"der")||(this.encoders[f]=this._createNamed(ie[f])),this.encoders[f]},d.prototype.encode=function(f,T,g){return this._getEncoder(T).encode(f,g)}},12227:(bt,be,Y)=>{"use strict";const ie=Y(59879),q=Y(24475).b,O=Y(88114).Buffer;function E(x,f){q.call(this,f),O.isBuffer(x)?(this.base=x,this.offset=0,this.length=x.length):this.error("Input not Buffer")}function d(x,f){if(Array.isArray(x))this.length=0,this.value=x.map(function(T){return d.isEncoderBuffer(T)||(T=new d(T,f)),this.length+=T.length,T},this);else if("number"==typeof x){if(!(0<=x&&x<=255))return f.error("non-byte EncoderBuffer value");this.value=x,this.length=1}else if("string"==typeof x)this.value=x,this.length=O.byteLength(x);else{if(!O.isBuffer(x))return f.error("Unsupported type: "+typeof x);this.value=x,this.length=x.length}}ie(E,q),be.C=E,E.isDecoderBuffer=function(f){return f instanceof E||"object"==typeof f&&O.isBuffer(f.base)&&"DecoderBuffer"===f.constructor.name&&"number"==typeof f.offset&&"number"==typeof f.length&&"function"==typeof f.save&&"function"==typeof f.restore&&"function"==typeof f.isEmpty&&"function"==typeof f.readUInt8&&"function"==typeof f.skip&&"function"==typeof f.raw},E.prototype.save=function(){return{offset:this.offset,reporter:q.prototype.save.call(this)}},E.prototype.restore=function(f){const T=new E(this.base);return T.offset=f.offset,T.length=this.offset,this.offset=f.offset,q.prototype.restore.call(this,f.reporter),T},E.prototype.isEmpty=function(){return this.offset===this.length},E.prototype.readUInt8=function(f){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(f||"DecoderBuffer overrun")},E.prototype.skip=function(f,T){if(!(this.offset+f<=this.length))return this.error(T||"DecoderBuffer overrun");const g=new E(this.base);return g._reporterState=this._reporterState,g.offset=this.offset,g.length=this.offset+f,this.offset+=f,g},E.prototype.raw=function(f){return this.base.slice(f?f.offset:this.offset,this.length)},be.R=d,d.isEncoderBuffer=function(f){return f instanceof d||"object"==typeof f&&"EncoderBuffer"===f.constructor.name&&"number"==typeof f.length&&"function"==typeof f.join},d.prototype.join=function(f,T){return f||(f=O.alloc(this.length)),T||(T=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(g){g.join(f,T),T+=g.length}):("number"==typeof this.value?f[T]=this.value:"string"==typeof this.value?f.write(this.value,T):O.isBuffer(this.value)&&this.value.copy(f,T),T+=this.length)),f}},38384:(bt,be,Y)=>{"use strict";const ie=be;ie.Reporter=Y(24475).b,ie.DecoderBuffer=Y(12227).C,ie.EncoderBuffer=Y(12227).R,ie.Node=Y(14652)},14652:(bt,be,Y)=>{"use strict";const ie=Y(24475).b,q=Y(12227).R,O=Y(12227).C,E=Y(86055),d=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],x=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(d);function T(b,l,h){const u={};this._baseState=u,u.name=h,u.enc=b,u.parent=l||null,u.children=null,u.tag=null,u.args=null,u.reverseArgs=null,u.choice=null,u.optional=!1,u.any=!1,u.obj=!1,u.use=null,u.useDecoder=null,u.key=null,u.default=null,u.explicit=null,u.implicit=null,u.contains=null,u.parent||(u.children=[],this._wrap())}bt.exports=T;const g=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];T.prototype.clone=function(){const l=this._baseState,h={};g.forEach(function(m){h[m]=l[m]});const u=new this.constructor(h.parent);return u._baseState=h,u},T.prototype._wrap=function(){const l=this._baseState;x.forEach(function(h){this[h]=function(){const m=new this.constructor(this);return l.children.push(m),m[h].apply(m,arguments)}},this)},T.prototype._init=function(l){const h=this._baseState;E(null===h.parent),l.call(this),h.children=h.children.filter(function(u){return u._baseState.parent===this},this),E.equal(h.children.length,1,"Root node can have only one child")},T.prototype._useArgs=function(l){const h=this._baseState,u=l.filter(function(m){return m instanceof this.constructor},this);l=l.filter(function(m){return!(m instanceof this.constructor)},this),0!==u.length&&(E(null===h.children),h.children=u,u.forEach(function(m){m._baseState.parent=this},this)),0!==l.length&&(E(null===h.args),h.args=l,h.reverseArgs=l.map(function(m){if("object"!=typeof m||m.constructor!==Object)return m;const _={};return Object.keys(m).forEach(function(w){w==(0|w)&&(w|=0),_[m[w]]=w}),_}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(b){T.prototype[b]=function(){throw new Error(b+" not implemented for encoding: "+this._baseState.enc)}}),d.forEach(function(b){T.prototype[b]=function(){const h=this._baseState,u=Array.prototype.slice.call(arguments);return E(null===h.tag),h.tag=b,this._useArgs(u),this}}),T.prototype.use=function(l){E(l);const h=this._baseState;return E(null===h.use),h.use=l,this},T.prototype.optional=function(){return this._baseState.optional=!0,this},T.prototype.def=function(l){const h=this._baseState;return E(null===h.default),h.default=l,h.optional=!0,this},T.prototype.explicit=function(l){const h=this._baseState;return E(null===h.explicit&&null===h.implicit),h.explicit=l,this},T.prototype.implicit=function(l){const h=this._baseState;return E(null===h.explicit&&null===h.implicit),h.implicit=l,this},T.prototype.obj=function(){const l=this._baseState,h=Array.prototype.slice.call(arguments);return l.obj=!0,0!==h.length&&this._useArgs(h),this},T.prototype.key=function(l){const h=this._baseState;return E(null===h.key),h.key=l,this},T.prototype.any=function(){return this._baseState.any=!0,this},T.prototype.choice=function(l){const h=this._baseState;return E(null===h.choice),h.choice=l,this._useArgs(Object.keys(l).map(function(u){return l[u]})),this},T.prototype.contains=function(l){const h=this._baseState;return E(null===h.use),h.contains=l,this},T.prototype._decode=function(l,h){const u=this._baseState;if(null===u.parent)return l.wrapResult(u.children[0]._decode(l,h));let S,m=u.default,_=!0,w=null;if(null!==u.key&&(w=l.enterKey(u.key)),u.optional){let I=null;if(null!==u.explicit?I=u.explicit:null!==u.implicit?I=u.implicit:null!==u.tag&&(I=u.tag),null!==I||u.any){if(_=this._peekTag(l,I,u.any),l.isError(_))return _}else{const P=l.save();try{null===u.choice?this._decodeGeneric(u.tag,l,h):this._decodeChoice(l,h),_=!0}catch{_=!1}l.restore(P)}}if(u.obj&&_&&(S=l.enterObject()),_){if(null!==u.explicit){const P=this._decodeTag(l,u.explicit);if(l.isError(P))return P;l=P}const I=l.offset;if(null===u.use&&null===u.choice){let P;u.any&&(P=l.save());const L=this._decodeTag(l,null!==u.implicit?u.implicit:u.tag,u.any);if(l.isError(L))return L;u.any?m=l.raw(P):l=L}if(h&&h.track&&null!==u.tag&&h.track(l.path(),I,l.length,"tagged"),h&&h.track&&null!==u.tag&&h.track(l.path(),l.offset,l.length,"content"),u.any||(m=null===u.choice?this._decodeGeneric(u.tag,l,h):this._decodeChoice(l,h)),l.isError(m))return m;if(!u.any&&null===u.choice&&null!==u.children&&u.children.forEach(function(L){L._decode(l,h)}),u.contains&&("octstr"===u.tag||"bitstr"===u.tag)){const P=new O(m);m=this._getUse(u.contains,l._reporterState.obj)._decode(P,h)}}return u.obj&&_&&(m=l.leaveObject(S)),null===u.key||null===m&&!0!==_?null!==w&&l.exitKey(w):l.leaveKey(w,u.key,m),m},T.prototype._decodeGeneric=function(l,h,u){const m=this._baseState;return"seq"===l||"set"===l?null:"seqof"===l||"setof"===l?this._decodeList(h,l,m.args[0],u):/str$/.test(l)?this._decodeStr(h,l,u):"objid"===l&&m.args?this._decodeObjid(h,m.args[0],m.args[1],u):"objid"===l?this._decodeObjid(h,null,null,u):"gentime"===l||"utctime"===l?this._decodeTime(h,l,u):"null_"===l?this._decodeNull(h,u):"bool"===l?this._decodeBool(h,u):"objDesc"===l?this._decodeStr(h,l,u):"int"===l||"enum"===l?this._decodeInt(h,m.args&&m.args[0],u):null!==m.use?this._getUse(m.use,h._reporterState.obj)._decode(h,u):h.error("unknown tag: "+l)},T.prototype._getUse=function(l,h){const u=this._baseState;return u.useDecoder=this._use(l,h),E(null===u.useDecoder._baseState.parent),u.useDecoder=u.useDecoder._baseState.children[0],u.implicit!==u.useDecoder._baseState.implicit&&(u.useDecoder=u.useDecoder.clone(),u.useDecoder._baseState.implicit=u.implicit),u.useDecoder},T.prototype._decodeChoice=function(l,h){const u=this._baseState;let m=null,_=!1;return Object.keys(u.choice).some(function(w){const S=l.save(),I=u.choice[w];try{const P=I._decode(l,h);if(l.isError(P))return!1;m={type:w,value:P},_=!0}catch{return l.restore(S),!1}return!0},this),_?m:l.error("Choice not matched")},T.prototype._createEncoderBuffer=function(l){return new q(l,this.reporter)},T.prototype._encode=function(l,h,u){const m=this._baseState;if(null!==m.default&&m.default===l)return;const _=this._encodeValue(l,h,u);return void 0===_||this._skipDefault(_,h,u)?void 0:_},T.prototype._encodeValue=function(l,h,u){const m=this._baseState;if(null===m.parent)return m.children[0]._encode(l,h||new ie);let _=null;if(this.reporter=h,m.optional&&void 0===l){if(null===m.default)return;l=m.default}let w=null,S=!1;if(m.any)_=this._createEncoderBuffer(l);else if(m.choice)_=this._encodeChoice(l,h);else if(m.contains)w=this._getUse(m.contains,u)._encode(l,h),S=!0;else if(m.children)w=m.children.map(function(I){if("null_"===I._baseState.tag)return I._encode(null,h,l);if(null===I._baseState.key)return h.error("Child should have a key");const P=h.enterKey(I._baseState.key);if("object"!=typeof l)return h.error("Child expected, but input is not object");const L=I._encode(l[I._baseState.key],h,l);return h.leaveKey(P),L},this).filter(function(I){return I}),w=this._createEncoderBuffer(w);else if("seqof"===m.tag||"setof"===m.tag){if(!m.args||1!==m.args.length)return h.error("Too many args for : "+m.tag);if(!Array.isArray(l))return h.error("seqof/setof, but data is not Array");const I=this.clone();I._baseState.implicit=null,w=this._createEncoderBuffer(l.map(function(P){return this._getUse(this._baseState.args[0],l)._encode(P,h)},I))}else null!==m.use?_=this._getUse(m.use,u)._encode(l,h):(w=this._encodePrimitive(m.tag,l),S=!0);if(!m.any&&null===m.choice){const I=null!==m.implicit?m.implicit:m.tag,P=null===m.implicit?"universal":"context";null===I?null===m.use&&h.error("Tag could be omitted only for .use()"):null===m.use&&(_=this._encodeComposite(I,S,P,w))}return null!==m.explicit&&(_=this._encodeComposite(m.explicit,!1,"context",_)),_},T.prototype._encodeChoice=function(l,h){const u=this._baseState,m=u.choice[l.type];return m||E(!1,l.type+" not found in "+JSON.stringify(Object.keys(u.choice))),m._encode(l.value,h)},T.prototype._encodePrimitive=function(l,h){const u=this._baseState;if(/str$/.test(l))return this._encodeStr(h,l);if("objid"===l&&u.args)return this._encodeObjid(h,u.reverseArgs[0],u.args[1]);if("objid"===l)return this._encodeObjid(h,null,null);if("gentime"===l||"utctime"===l)return this._encodeTime(h,l);if("null_"===l)return this._encodeNull();if("int"===l||"enum"===l)return this._encodeInt(h,u.args&&u.reverseArgs[0]);if("bool"===l)return this._encodeBool(h);if("objDesc"===l)return this._encodeStr(h,l);throw new Error("Unsupported tag: "+l)},T.prototype._isNumstr=function(l){return/^[0-9 ]*$/.test(l)},T.prototype._isPrintstr=function(l){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(l)}},24475:(bt,be,Y)=>{"use strict";const ie=Y(59879);function q(E){this._reporterState={obj:null,path:[],options:E||{},errors:[]}}function O(E,d){this.path=E,this.rethrow(d)}be.b=q,q.prototype.isError=function(d){return d instanceof O},q.prototype.save=function(){const d=this._reporterState;return{obj:d.obj,pathLen:d.path.length}},q.prototype.restore=function(d){const x=this._reporterState;x.obj=d.obj,x.path=x.path.slice(0,d.pathLen)},q.prototype.enterKey=function(d){return this._reporterState.path.push(d)},q.prototype.exitKey=function(d){const x=this._reporterState;x.path=x.path.slice(0,d-1)},q.prototype.leaveKey=function(d,x,f){const T=this._reporterState;this.exitKey(d),null!==T.obj&&(T.obj[x]=f)},q.prototype.path=function(){return this._reporterState.path.join("/")},q.prototype.enterObject=function(){const d=this._reporterState,x=d.obj;return d.obj={},x},q.prototype.leaveObject=function(d){const x=this._reporterState,f=x.obj;return x.obj=d,f},q.prototype.error=function(d){let x;const f=this._reporterState,T=d instanceof O;if(x=T?d:new O(f.path.map(function(g){return"["+JSON.stringify(g)+"]"}).join(""),d.message||d,d.stack),!f.options.partial)throw x;return T||f.errors.push(x),x},q.prototype.wrapResult=function(d){const x=this._reporterState;return x.options.partial?{result:this.isError(d)?null:d,errors:x.errors}:d},ie(O,Error),O.prototype.rethrow=function(d){if(this.message=d+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,O),!this.stack)try{throw new Error(this.message)}catch(x){this.stack=x.stack}return this}},32953:(bt,be)=>{"use strict";function Y(ie){const q={};return Object.keys(ie).forEach(function(O){(0|O)==O&&(O|=0),q[ie[O]]=O}),q}be.tagClass={0:"universal",1:"application",2:"context",3:"private"},be.tagClassByName=Y(be.tagClass),be.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},be.tagByName=Y(be.tag)},82779:(bt,be,Y)=>{"use strict";const ie=be;ie._reverse=function(O){const E={};return Object.keys(O).forEach(function(d){(0|d)==d&&(d|=0),E[O[d]]=d}),E},ie.der=Y(32953)},14163:(bt,be,Y)=>{"use strict";const ie=Y(59879),q=Y(32260),O=Y(12227).C,E=Y(14652),d=Y(32953);function x(b){this.enc="der",this.name=b.name,this.entity=b,this.tree=new f,this.tree._init(b.body)}function f(b){E.call(this,"der",b)}function T(b,l){let h=b.readUInt8(l);if(b.isError(h))return h;const u=d.tagClass[h>>6],m=0==(32&h);if(31==(31&h)){let w=h;for(h=0;128==(128&w);){if(w=b.readUInt8(l),b.isError(w))return w;h<<=7,h|=127&w}}else h&=31;return{cls:u,primitive:m,tag:h,tagStr:d.tag[h]}}function g(b,l,h){let u=b.readUInt8(h);if(b.isError(u))return u;if(!l&&128===u)return null;if(0==(128&u))return u;const m=127&u;if(m>4)return b.error("length octect is too long");u=0;for(let _=0;_{"use strict";const ie=be;ie.der=Y(14163),ie.pem=Y(60773)},60773:(bt,be,Y)=>{"use strict";const ie=Y(59879),q=Y(88114).Buffer,O=Y(14163);function E(d){O.call(this,d),this.enc="pem"}ie(E,O),bt.exports=E,E.prototype.decode=function(x,f){const T=x.toString().split(/[\r\n]+/g),g=f.label.toUpperCase(),b=/^-----(BEGIN|END) ([^-]+)-----$/;let l=-1,h=-1;for(let _=0;_{"use strict";const ie=Y(59879),q=Y(88114).Buffer,O=Y(14652),E=Y(32953);function d(g){this.enc="der",this.name=g.name,this.entity=g,this.tree=new x,this.tree._init(g.body)}function x(g){O.call(this,"der",g)}function f(g){return g<10?"0"+g:g}bt.exports=d,d.prototype.encode=function(b,l){return this.tree._encode(b,l).join()},ie(x,O),x.prototype._encodeComposite=function(b,l,h,u){const m=function(g,b,l,h){let u;if("seqof"===g?g="seq":"setof"===g&&(g="set"),E.tagByName.hasOwnProperty(g))u=E.tagByName[g];else{if("number"!=typeof g||(0|g)!==g)return h.error("Unknown tag: "+g);u=g}return u>=31?h.error("Multi-octet tag encoding unsupported"):(b||(u|=32),u|=E.tagClassByName[l||"universal"]<<6,u)}(b,l,h,this.reporter);if(u.length<128){const S=q.alloc(2);return S[0]=m,S[1]=u.length,this._createEncoderBuffer([S,u])}let _=1;for(let S=u.length;S>=256;S>>=8)_++;const w=q.alloc(2+_);w[0]=m,w[1]=128|_;for(let S=1+_,I=u.length;I>0;S--,I>>=8)w[S]=255&I;return this._createEncoderBuffer([w,u])},x.prototype._encodeStr=function(b,l){if("bitstr"===l)return this._createEncoderBuffer([0|b.unused,b.data]);if("bmpstr"===l){const h=q.alloc(2*b.length);for(let u=0;u=40)return this.reporter.error("Second objid identifier OOB");b.splice(0,2,40*b[0]+b[1])}let u=0;for(let w=0;w=128;S>>=7)u++}const m=q.alloc(u);let _=m.length-1;for(let w=b.length-1;w>=0;w--){let S=b[w];for(m[_--]=127&S;(S>>=7)>0;)m[_--]=128|127&S}return this._createEncoderBuffer(m)},x.prototype._encodeTime=function(b,l){let h;const u=new Date(b);return"gentime"===l?h=[f(u.getUTCFullYear()),f(u.getUTCMonth()+1),f(u.getUTCDate()),f(u.getUTCHours()),f(u.getUTCMinutes()),f(u.getUTCSeconds()),"Z"].join(""):"utctime"===l?h=[f(u.getUTCFullYear()%100),f(u.getUTCMonth()+1),f(u.getUTCDate()),f(u.getUTCHours()),f(u.getUTCMinutes()),f(u.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+l+" time is not supported yet"),this._encodeStr(h,"octstr")},x.prototype._encodeNull=function(){return this._createEncoderBuffer("")},x.prototype._encodeInt=function(b,l){if("string"==typeof b){if(!l)return this.reporter.error("String int or enum given, but no values map");if(!l.hasOwnProperty(b))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(b));b=l[b]}if("number"!=typeof b&&!q.isBuffer(b)){const m=b.toArray();!b.sign&&128&m[0]&&m.unshift(0),b=q.from(m)}if(q.isBuffer(b)){let m=b.length;0===b.length&&m++;const _=q.alloc(m);return b.copy(_),0===b.length&&(_[0]=0),this._createEncoderBuffer(_)}if(b<128)return this._createEncoderBuffer(b);if(b<256)return this._createEncoderBuffer([0,b]);let h=1;for(let m=b;m>=256;m>>=8)h++;const u=new Array(h);for(let m=u.length-1;m>=0;m--)u[m]=255&b,b>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(q.from(u))},x.prototype._encodeBool=function(b){return this._createEncoderBuffer(b?255:0)},x.prototype._use=function(b,l){return"function"==typeof b&&(b=b(l)),b._getEncoder("der").tree},x.prototype._skipDefault=function(b,l,h){const u=this._baseState;let m;if(null===u.default)return!1;const _=b.join();if(void 0===u.defaultBuffer&&(u.defaultBuffer=this._encodeValue(u.default,l,h).join()),_.length!==u.defaultBuffer.length)return!1;for(m=0;m<_.length;m++)if(_[m]!==u.defaultBuffer[m])return!1;return!0}},7549:(bt,be,Y)=>{"use strict";const ie=be;ie.der=Y(75079),ie.pem=Y(76163)},76163:(bt,be,Y)=>{"use strict";const ie=Y(59879),q=Y(75079);function O(E){q.call(this,E),this.enc="pem"}ie(O,q),bt.exports=O,O.prototype.encode=function(d,x){const T=q.prototype.encode.call(this,d).toString("base64"),g=["-----BEGIN "+x.label+"-----"];for(let b=0;b=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Jr=0|k[3],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|k[4],zn=8191&Wr,bn=Wr>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,zn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,zn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,zn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,zn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,zn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,zn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,zn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,zn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,zn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,zn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,zn),a=(a=Math.imul(St,bn))+Math.imul(Wt,zn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},28686:(bt,be,Y)=>{bt.exports=Y(15454)},44054:(bt,be,Y)=>{"use strict";var ie=Y(59471),q=Y(5650),O=Y(10300),E=Y(97790),d=Y(34634),x=Y(71929),f=Y(32984),T=Y(15886),g=Y(62567),b=Y(88728);bt.exports=function(h){return new Promise(function(m,_){var P,w=h.data,S=h.headers,I=h.responseType;function L(){h.cancelToken&&h.cancelToken.unsubscribe(P),h.signal&&h.signal.removeEventListener("abort",P)}ie.isFormData(w)&&delete S["Content-Type"];var V=new XMLHttpRequest;if(h.auth){var W=h.auth.username||"",G=h.auth.password?unescape(encodeURIComponent(h.auth.password)):"";S.Authorization="Basic "+btoa(W+":"+G)}var H=d(h.baseURL,h.url);function j(){if(V){var R="getAllResponseHeaders"in V?x(V.getAllResponseHeaders()):null;q(function(v){m(v),L()},function(v){_(v),L()},{data:I&&"text"!==I&&"json"!==I?V.response:V.responseText,status:V.status,statusText:V.statusText,headers:R,config:h,request:V}),V=null}}if(V.open(h.method.toUpperCase(),E(H,h.params,h.paramsSerializer),!0),V.timeout=h.timeout,"onloadend"in V?V.onloadend=j:V.onreadystatechange=function(){!V||4!==V.readyState||0===V.status&&(!V.responseURL||0!==V.responseURL.indexOf("file:"))||setTimeout(j)},V.onabort=function(){!V||(_(T("Request aborted",h,"ECONNABORTED",V)),V=null)},V.onerror=function(){_(T("Network Error",h,null,V)),V=null},V.ontimeout=function(){var o=h.timeout?"timeout of "+h.timeout+"ms exceeded":"timeout exceeded";h.timeoutErrorMessage&&(o=h.timeoutErrorMessage),_(T(o,h,(h.transitional||g.transitional).clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",V)),V=null},ie.isStandardBrowserEnv()){var K=(h.withCredentials||f(H))&&h.xsrfCookieName?O.read(h.xsrfCookieName):void 0;K&&(S[h.xsrfHeaderName]=K)}"setRequestHeader"in V&&ie.forEach(S,function(o,y){void 0===w&&"content-type"===y.toLowerCase()?delete S[y]:V.setRequestHeader(y,o)}),ie.isUndefined(h.withCredentials)||(V.withCredentials=!!h.withCredentials),I&&"json"!==I&&(V.responseType=h.responseType),"function"==typeof h.onDownloadProgress&&V.addEventListener("progress",h.onDownloadProgress),"function"==typeof h.onUploadProgress&&V.upload&&V.upload.addEventListener("progress",h.onUploadProgress),(h.cancelToken||h.signal)&&(P=function(R){!V||(_(!R||R&&R.type?new b("canceled"):R),V.abort(),V=null)},h.cancelToken&&h.cancelToken.subscribe(P),h.signal&&(h.signal.aborted?P():h.signal.addEventListener("abort",P))),w||(w=null),V.send(w)})}},15454:(bt,be,Y)=>{"use strict";var ie=Y(59471),q=Y(81533),O=Y(53227),E=Y(4018),f=function x(T){var g=new O(T),b=q(O.prototype.request,g);return ie.extend(b,O.prototype,g),ie.extend(b,g),b.create=function(h){return x(E(T,h))},b}(Y(62567));f.Axios=O,f.Cancel=Y(88728),f.CancelToken=Y(40701),f.isCancel=Y(32130),f.VERSION=Y(15370).version,f.all=function(g){return Promise.all(g)},f.spread=Y(28908),f.isAxiosError=Y(99541),bt.exports=f,bt.exports.default=f},88728:bt=>{"use strict";function be(Y){this.message=Y}be.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},be.prototype.__CANCEL__=!0,bt.exports=be},40701:(bt,be,Y)=>{"use strict";var ie=Y(88728);function q(O){if("function"!=typeof O)throw new TypeError("executor must be a function.");var E;this.promise=new Promise(function(f){E=f});var d=this;this.promise.then(function(x){if(d._listeners){var f,T=d._listeners.length;for(f=0;f{"use strict";bt.exports=function(Y){return!(!Y||!Y.__CANCEL__)}},53227:(bt,be,Y)=>{"use strict";var ie=Y(59471),q=Y(97790),O=Y(93976),E=Y(36764),d=Y(4018),x=Y(43558),f=x.validators;function T(g){this.defaults=g,this.interceptors={request:new O,response:new O}}T.prototype.request=function(b){"string"==typeof b?(b=arguments[1]||{}).url=arguments[0]:b=b||{},(b=d(this.defaults,b)).method=b.method?b.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var l=b.transitional;void 0!==l&&x.assertOptions(l,{silentJSONParsing:f.transitional(f.boolean),forcedJSONParsing:f.transitional(f.boolean),clarifyTimeoutError:f.transitional(f.boolean)},!1);var h=[],u=!0;this.interceptors.request.forEach(function(V){"function"==typeof V.runWhen&&!1===V.runWhen(b)||(u=u&&V.synchronous,h.unshift(V.fulfilled,V.rejected))});var _,m=[];if(this.interceptors.response.forEach(function(V){m.push(V.fulfilled,V.rejected)}),!u){var w=[E,void 0];for(Array.prototype.unshift.apply(w,h),w=w.concat(m),_=Promise.resolve(b);w.length;)_=_.then(w.shift(),w.shift());return _}for(var S=b;h.length;){var I=h.shift(),P=h.shift();try{S=I(S)}catch(L){P(L);break}}try{_=E(S)}catch(L){return Promise.reject(L)}for(;m.length;)_=_.then(m.shift(),m.shift());return _},T.prototype.getUri=function(b){return b=d(this.defaults,b),q(b.url,b.params,b.paramsSerializer).replace(/^\?/,"")},ie.forEach(["delete","get","head","options"],function(b){T.prototype[b]=function(l,h){return this.request(d(h||{},{method:b,url:l,data:(h||{}).data}))}}),ie.forEach(["post","put","patch"],function(b){T.prototype[b]=function(l,h,u){return this.request(d(u||{},{method:b,url:l,data:h}))}}),bt.exports=T},93976:(bt,be,Y)=>{"use strict";var ie=Y(59471);function q(){this.handlers=[]}q.prototype.use=function(E,d,x){return this.handlers.push({fulfilled:E,rejected:d,synchronous:!!x&&x.synchronous,runWhen:x?x.runWhen:null}),this.handlers.length-1},q.prototype.eject=function(E){this.handlers[E]&&(this.handlers[E]=null)},q.prototype.forEach=function(E){ie.forEach(this.handlers,function(x){null!==x&&E(x)})},bt.exports=q},34634:(bt,be,Y)=>{"use strict";var ie=Y(95164),q=Y(31540);bt.exports=function(E,d){return E&&!ie(d)?q(E,d):d}},15886:(bt,be,Y)=>{"use strict";var ie=Y(29570);bt.exports=function(O,E,d,x,f){var T=new Error(O);return ie(T,E,d,x,f)}},36764:(bt,be,Y)=>{"use strict";var ie=Y(59471),q=Y(64284),O=Y(32130),E=Y(62567),d=Y(88728);function x(f){if(f.cancelToken&&f.cancelToken.throwIfRequested(),f.signal&&f.signal.aborted)throw new d("canceled")}bt.exports=function(T){return x(T),T.headers=T.headers||{},T.data=q.call(T,T.data,T.headers,T.transformRequest),T.headers=ie.merge(T.headers.common||{},T.headers[T.method]||{},T.headers),ie.forEach(["delete","get","head","post","put","patch","common"],function(l){delete T.headers[l]}),(T.adapter||E.adapter)(T).then(function(l){return x(T),l.data=q.call(T,l.data,l.headers,T.transformResponse),l},function(l){return O(l)||(x(T),l&&l.response&&(l.response.data=q.call(T,l.response.data,l.response.headers,T.transformResponse))),Promise.reject(l)})}},29570:bt=>{"use strict";bt.exports=function(Y,ie,q,O,E){return Y.config=ie,q&&(Y.code=q),Y.request=O,Y.response=E,Y.isAxiosError=!0,Y.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},Y}},4018:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=function(O,E){E=E||{};var d={};function x(h,u){return ie.isPlainObject(h)&&ie.isPlainObject(u)?ie.merge(h,u):ie.isPlainObject(u)?ie.merge({},u):ie.isArray(u)?u.slice():u}function f(h){return ie.isUndefined(E[h])?ie.isUndefined(O[h])?void 0:x(void 0,O[h]):x(O[h],E[h])}function T(h){if(!ie.isUndefined(E[h]))return x(void 0,E[h])}function g(h){return ie.isUndefined(E[h])?ie.isUndefined(O[h])?void 0:x(void 0,O[h]):x(void 0,E[h])}function b(h){return h in E?x(O[h],E[h]):h in O?x(void 0,O[h]):void 0}var l={url:T,method:T,data:T,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:b};return ie.forEach(Object.keys(O).concat(Object.keys(E)),function(u){var m=l[u]||f,_=m(u);ie.isUndefined(_)&&m!==b||(d[u]=_)}),d}},5650:(bt,be,Y)=>{"use strict";var ie=Y(15886);bt.exports=function(O,E,d){var x=d.config.validateStatus;d.status&&x&&!x(d.status)?E(ie("Request failed with status code "+d.status,d.config,null,d.request,d)):O(d)}},64284:(bt,be,Y)=>{"use strict";var ie=Y(59471),q=Y(62567);bt.exports=function(E,d,x){var f=this||q;return ie.forEach(x,function(g){E=g.call(f,E,d)}),E}},62567:(bt,be,Y)=>{"use strict";var ie=Y(59471),q=Y(12196),O=Y(29570),E={"Content-Type":"application/x-www-form-urlencoded"};function d(g,b){!ie.isUndefined(g)&&ie.isUndefined(g["Content-Type"])&&(g["Content-Type"]=b)}var g,T={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(g=Y(44054)),g),transformRequest:[function(b,l){return q(l,"Accept"),q(l,"Content-Type"),ie.isFormData(b)||ie.isArrayBuffer(b)||ie.isBuffer(b)||ie.isStream(b)||ie.isFile(b)||ie.isBlob(b)?b:ie.isArrayBufferView(b)?b.buffer:ie.isURLSearchParams(b)?(d(l,"application/x-www-form-urlencoded;charset=utf-8"),b.toString()):ie.isObject(b)||l&&"application/json"===l["Content-Type"]?(d(l,"application/json"),function(g,b,l){if(ie.isString(g))try{return(0,JSON.parse)(g),ie.trim(g)}catch(h){if("SyntaxError"!==h.name)throw h}return(0,JSON.stringify)(g)}(b)):b}],transformResponse:[function(b){var l=this.transitional||T.transitional,m=!(l&&l.silentJSONParsing)&&"json"===this.responseType;if(m||l&&l.forcedJSONParsing&&ie.isString(b)&&b.length)try{return JSON.parse(b)}catch(_){if(m)throw"SyntaxError"===_.name?O(_,this,"E_JSON_PARSE"):_}return b}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(b){return b>=200&&b<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ie.forEach(["delete","get","head"],function(b){T.headers[b]={}}),ie.forEach(["post","put","patch"],function(b){T.headers[b]=ie.merge(E)}),bt.exports=T},15370:bt=>{bt.exports={version:"0.24.0"}},81533:bt=>{"use strict";bt.exports=function(Y,ie){return function(){for(var O=new Array(arguments.length),E=0;E{"use strict";var ie=Y(59471);function q(O){return encodeURIComponent(O).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}bt.exports=function(E,d,x){if(!d)return E;var f;if(x)f=x(d);else if(ie.isURLSearchParams(d))f=d.toString();else{var T=[];ie.forEach(d,function(l,h){null==l||(ie.isArray(l)?h+="[]":l=[l],ie.forEach(l,function(m){ie.isDate(m)?m=m.toISOString():ie.isObject(m)&&(m=JSON.stringify(m)),T.push(q(h)+"="+q(m))}))}),f=T.join("&")}if(f){var g=E.indexOf("#");-1!==g&&(E=E.slice(0,g)),E+=(-1===E.indexOf("?")?"?":"&")+f}return E}},31540:bt=>{"use strict";bt.exports=function(Y,ie){return ie?Y.replace(/\/+$/,"")+"/"+ie.replace(/^\/+/,""):Y}},10300:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=ie.isStandardBrowserEnv()?{write:function(E,d,x,f,T,g){var b=[];b.push(E+"="+encodeURIComponent(d)),ie.isNumber(x)&&b.push("expires="+new Date(x).toGMTString()),ie.isString(f)&&b.push("path="+f),ie.isString(T)&&b.push("domain="+T),!0===g&&b.push("secure"),document.cookie=b.join("; ")},read:function(E){var d=document.cookie.match(new RegExp("(^|;\\s*)("+E+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove:function(E){this.write(E,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},95164:bt=>{"use strict";bt.exports=function(Y){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(Y)}},99541:bt=>{"use strict";bt.exports=function(Y){return"object"==typeof Y&&!0===Y.isAxiosError}},32984:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=ie.isStandardBrowserEnv()?function(){var d,O=/(msie|trident)/i.test(navigator.userAgent),E=document.createElement("a");function x(f){var T=f;return O&&(E.setAttribute("href",T),T=E.href),E.setAttribute("href",T),{href:E.href,protocol:E.protocol?E.protocol.replace(/:$/,""):"",host:E.host,search:E.search?E.search.replace(/^\?/,""):"",hash:E.hash?E.hash.replace(/^#/,""):"",hostname:E.hostname,port:E.port,pathname:"/"===E.pathname.charAt(0)?E.pathname:"/"+E.pathname}}return d=x(window.location.href),function(T){var g=ie.isString(T)?x(T):T;return g.protocol===d.protocol&&g.host===d.host}}():function(){return!0}},12196:(bt,be,Y)=>{"use strict";var ie=Y(59471);bt.exports=function(O,E){ie.forEach(O,function(x,f){f!==E&&f.toUpperCase()===E.toUpperCase()&&(O[E]=x,delete O[f])})}},71929:(bt,be,Y)=>{"use strict";var ie=Y(59471),q=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];bt.exports=function(E){var x,f,T,d={};return E&&ie.forEach(E.split("\n"),function(b){if(T=b.indexOf(":"),x=ie.trim(b.substr(0,T)).toLowerCase(),f=ie.trim(b.substr(T+1)),x){if(d[x]&&q.indexOf(x)>=0)return;d[x]="set-cookie"===x?(d[x]?d[x]:[]).concat([f]):d[x]?d[x]+", "+f:f}}),d}},28908:bt=>{"use strict";bt.exports=function(Y){return function(q){return Y.apply(null,q)}}},43558:(bt,be,Y)=>{"use strict";var ie=Y(15370).version,q={};["object","boolean","number","function","string","symbol"].forEach(function(d,x){q[d]=function(T){return typeof T===d||"a"+(x<1?"n ":" ")+d}});var O={};q.transitional=function(x,f,T){function g(b,l){return"[Axios v"+ie+"] Transitional option '"+b+"'"+l+(T?". "+T:"")}return function(b,l,h){if(!1===x)throw new Error(g(l," has been removed"+(f?" in "+f:"")));return f&&!O[l]&&(O[l]=!0,console.warn(g(l," has been deprecated since v"+f+" and will be removed in the near future"))),!x||x(b,l,h)}},bt.exports={assertOptions:function(d,x,f){if("object"!=typeof d)throw new TypeError("options must be an object");for(var T=Object.keys(d),g=T.length;g-- >0;){var b=T[g],l=x[b];if(l){var h=d[b],u=void 0===h||l(h,b,d);if(!0!==u)throw new TypeError("option "+b+" must be "+u)}else if(!0!==f)throw Error("Unknown option "+b)}},validators:q}},59471:(bt,be,Y)=>{"use strict";var ie=Y(81533),q=Object.prototype.toString;function O(j){return"[object Array]"===q.call(j)}function E(j){return void 0===j}function l(j){return null!==j&&"object"==typeof j}function h(j){if("[object Object]"!==q.call(j))return!1;var K=Object.getPrototypeOf(j);return null===K||K===Object.prototype}function w(j){return"[object Function]"===q.call(j)}function V(j,K){if(null!=j)if("object"!=typeof j&&(j=[j]),O(j))for(var R=0,o=j.length;R{"use strict";be.byteLength=function(u){var m=x(u),w=m[1];return 3*(m[0]+w)/4-w},be.toByteArray=function(u){var m,V,_=x(u),w=_[0],S=_[1],I=new q(function(u,m,_){return 3*(m+_)/4-_}(0,w,S)),P=0,L=S>0?w-4:w;for(V=0;V>16&255,I[P++]=m>>8&255,I[P++]=255&m;return 2===S&&(m=ie[u.charCodeAt(V)]<<2|ie[u.charCodeAt(V+1)]>>4,I[P++]=255&m),1===S&&(m=ie[u.charCodeAt(V)]<<10|ie[u.charCodeAt(V+1)]<<4|ie[u.charCodeAt(V+2)]>>2,I[P++]=m>>8&255,I[P++]=255&m),I},be.fromByteArray=function(u){for(var m,_=u.length,w=_%3,S=[],I=16383,P=0,L=_-w;PL?L:P+I));return 1===w?S.push(Y[(m=u[_-1])>>2]+Y[m<<4&63]+"=="):2===w&&S.push(Y[(m=(u[_-2]<<8)+u[_-1])>>10]+Y[m>>4&63]+Y[m<<2&63]+"="),S.join("")};for(var Y=[],ie=[],q="undefined"!=typeof Uint8Array?Uint8Array:Array,O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=0,d=O.length;E0)throw new Error("Invalid string. Length must be a multiple of 4");var _=u.indexOf("=");return-1===_&&(_=m),[_,_===m?0:4-_%4]}function b(u){return Y[u>>18&63]+Y[u>>12&63]+Y[u>>6&63]+Y[63&u]}function l(u,m,_){for(var S=[],I=m;I<_;I+=3)S.push(b((u[I]<<16&16711680)+(u[I+1]<<8&65280)+(255&u[I+2])));return S.join("")}ie["-".charCodeAt(0)]=62,ie["_".charCodeAt(0)]=63},29901:bt=>{"use strict";for(var be="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Y={},ie=0;ie>25;return(33554431&m)<<5^996825010&-(_>>0&1)^642813549&-(_>>1&1)^513874426&-(_>>2&1)^1027748829&-(_>>3&1)^705979059&-(_>>4&1)}function E(m){for(var _=1,w=0;w126)return"Invalid prefix ("+m+")";_=O(_)^S>>5}for(_=O(_),w=0;w(_=_||90))return"Exceeds length limit";var w=m.toLowerCase(),S=m.toUpperCase();if(m!==w&&m!==S)return"Mixed-case string "+m;var I=(m=w).lastIndexOf("1");if(-1===I)return"No separator character for "+m;if(0===I)return"Missing prefix for "+m;var P=m.slice(0,I),L=m.slice(I+1);if(L.length<6)return"Data too short";var V=E(P);if("string"==typeof V)return V;for(var W=[],G=0;G=L.length)&&W.push(j)}return 1!==V?"Invalid checksum for "+m:{prefix:P,words:W}}function g(m,_,w,S){for(var I=0,P=0,L=(1<=w;)V.push(I>>(P-=w)&L);if(S)P>0&&V.push(I<=_)return"Excess padding";if(I<(w=w||90))throw new TypeError("Exceeds length limit");var S=E(m=m.toLowerCase());if("string"==typeof S)throw new Error(S);for(var I=m+"1",P=0;P<_.length;++P){var L=_[P];if(L>>5!=0)throw new Error("Non 5-bit word");S=O(S)^L,I+=be.charAt(L)}for(P=0;P<6;++P)S=O(S);for(S^=1,P=0;P<6;++P)I+=be.charAt(S>>5*(5-P)&31);return I},toWordsUnsafe:function(m){var _=g(m,8,5,!0);if(Array.isArray(_))return _},toWords:function(m){var _=g(m,8,5,!0);if(Array.isArray(_))return _;throw new Error(_)},fromWordsUnsafe:function(m){var _=g(m,5,8,!1);if(Array.isArray(_))return _},fromWords:function(m){var _=g(m,5,8,!1);if(Array.isArray(_))return _;throw new Error(_)}}},46821:function(bt,be,Y){var ie;!function(q){"use strict";var O,x=1e6,f=1e6,b="[big.js] ",l=b+"Invalid ",h=l+"decimal places",u=l+"rounding mode",m=b+"Division by zero",_={},w=void 0,S=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function L(W,G,H,j){var K=W.c,R=W.e+G+1;if(R=5;else if(2===H)j=K[R]>5||5==K[R]&&(j||R<0||K[R+1]!==w||1&K[R-1]);else if(3===H)j=j||!!K[0];else if(j=!1,0!==H)throw Error(u);if(R<1)K.length=1,j?(W.e=-G,K[0]=1):K[0]=W.e=0;else{if(K.length=R--,j)for(;++K[R]>9;)K[R]=0,R--||(++W.e,K.unshift(1));for(R=K.length;!K[--R];)K.pop()}}else if(H<0||H>3||H!==~~H)throw Error(u);return W}function V(W,G,H,j){var K,R,o=W.constructor,y=!W.c[0];if(H!==w){if(H!==~~H||H<(3==G)||H>x)throw Error(3==G?l+"precision":h);for(H=j-(W=new o(W)).e,W.c.length>++j&&L(W,H,o.RM),2==G&&(j=W.e+H+1);W.c.length=o.PE))R=R.charAt(0)+(H>1?"."+R.slice(1):"")+(K<0?"e":"e+")+K;else if(K<0){for(;++K;)R="0"+R;R="0."+R}else if(K>0)if(++K>H)for(K-=H;K--;)R+="0";else K1&&(R=R.charAt(0)+"."+R.slice(1));return W.s<0&&(!y||4==G)?"-"+R:R}_.abs=function(){var W=new this.constructor(this);return W.s=1,W},_.cmp=function(W){var G,H=this,j=H.c,K=(W=new H.constructor(W)).c,R=H.s,o=W.s,y=H.e,M=W.e;if(!j[0]||!K[0])return j[0]?R:K[0]?-o:0;if(R!=o)return R;if(G=R<0,y!=M)return y>M^G?1:-1;for(o=(y=j.length)<(M=K.length)?y:M,R=-1;++RK[R]^G?1:-1;return y==M?0:y>M^G?1:-1},_.div=function(W){var G=this,H=G.constructor,j=G.c,K=(W=new H(W)).c,R=G.s==W.s?1:-1,o=H.DP;if(o!==~~o||o<0||o>x)throw Error(h);if(!K[0])throw Error(m);if(!j[0])return new H(0*R);var y,M,v,k,D,N=K.slice(),C=y=K.length,a=j.length,B=j.slice(0,y),Q=B.length,ee=W,ce=ee.c=[],ue=0,we=o+(ee.e=G.e-W.e)+1;for(ee.s=R,R=we<0?0:we,N.unshift(0);Q++Q?1:-1;else for(D=-1,k=0;++DB[D]?1:-1;break}if(!(k<0))break;for(M=Q==y?K:N;Q;){if(B[--Q]we&&L(ee,o,H.RM,B[0]!==w),ee},_.eq=function(W){return!this.cmp(W)},_.gt=function(W){return this.cmp(W)>0},_.gte=function(W){return this.cmp(W)>-1},_.lt=function(W){return this.cmp(W)<0},_.lte=function(W){return this.cmp(W)<1},_.minus=_.sub=function(W){var G,H,j,K,R=this,o=R.constructor,y=R.s,M=(W=new o(W)).s;if(y!=M)return W.s=-M,R.plus(W);var v=R.c.slice(),k=R.e,D=W.c,N=W.e;if(!v[0]||!D[0])return D[0]?(W.s=-M,W):new o(v[0]?R:0);if(y=k-N){for((K=y<0)?(y=-y,j=v):(N=k,j=D),j.reverse(),M=y;M--;)j.push(0);j.reverse()}else for(H=((K=v.length0)for(;M--;)v[G++]=0;for(M=G;H>y;){if(v[--H]0?(M=o,G=v):(K=-K,G=y),G.reverse();K--;)G.push(0);G.reverse()}for(y.length-v.length<0&&(G=v,v=y,y=G),K=v.length,R=0;K;y[K]%=10)R=(y[--K]=y[K]+v[K]+R)/10|0;for(R&&(y.unshift(R),++M),K=y.length;0===y[--K];)y.pop();return W.c=y,W.e=M,W},_.pow=function(W){var G=this,H=new G.constructor(1),j=H,K=W<0;if(W!==~~W||W<-f||W>f)throw Error(l+"exponent");for(K&&(W=-W);1&W&&(j=j.times(G)),W>>=1;)G=G.times(G);return K?H.div(j):j},_.round=function(W,G){var H=this.constructor;if(W===w)W=0;else if(W!==~~W||W<-x||W>x)throw Error(h);return L(new H(this),W,G===w?H.RM:G)},_.sqrt=function(){var W,G,H,j=this,K=j.constructor,R=j.s,o=j.e,y=new K(.5);if(!j.c[0])return new K(j);if(R<0)throw Error(b+"No square root");0===(R=Math.sqrt(j+""))||R===1/0?((G=j.c.join("")).length+o&1||(G+="0"),o=((o+1)/2|0)-(o<0||1&o),W=new K(((R=Math.sqrt(G))==1/0?"1e":(R=R.toExponential()).slice(0,R.indexOf("e")+1))+o)):W=new K(R),o=W.e+(K.DP+=4);do{W=y.times((H=W).plus(j.div(H)))}while(H.c.slice(0,o).join("")!==W.c.slice(0,o).join(""));return L(W,K.DP-=4,K.RM)},_.times=_.mul=function(W){var G,H=this,j=H.constructor,K=H.c,R=(W=new j(W)).c,o=K.length,y=R.length,M=H.e,v=W.e;if(W.s=H.s==W.s?1:-1,!K[0]||!R[0])return new j(0*W.s);for(W.e=M+v,oM;)y=G[v]+R[M]*K[v-M-1]+y,G[v--]=y%10,y=y/10|0;G[v]=(G[v]+y)%10}for(y?++W.e:G.shift(),M=G.length;!G[--M];)G.pop();return W.c=G,W},_.toExponential=function(W){return V(this,1,W,W)},_.toFixed=function(W){return V(this,2,W,this.e+W)},_.toPrecision=function(W){return V(this,3,W,W-1)},_.toString=function(){return V(this)},_.valueOf=_.toJSON=function(){return V(this,4)},(O=function I(){function W(G){var H=this;if(!(H instanceof W))return G===w?I():new W(G);G instanceof W?(H.s=G.s,H.e=G.e,H.c=G.c.slice()):function(W,G){var H,j,K;if(0===G&&1/G<0)G="-0";else if(!S.test(G+=""))throw Error(l+"number");for(W.s="-"==G.charAt(0)?(G=G.slice(1),-1):1,(H=G.indexOf("."))>-1&&(G=G.replace(".","")),(j=G.search(/e/i))>0?(H<0&&(H=j),H+=+G.slice(j+1),G=G.substring(0,j)):H<0&&(H=G.length),K=G.length,j=0;j0&&"0"==G.charAt(--K););for(W.e=H-j-1,W.c=[],H=0;j<=K;)W.c[H++]=+G.charAt(j++)}}(H,G),H.constructor=W}return W.prototype=_,W.DP=20,W.RM=1,W.NE=-7,W.PE=21,W.version="5.2.2",W}()).default=O.Big=O,void 0!==(ie=function(){return O}.call(be,Y,be,bt))&&(bt.exports=ie)}()},62630:function(bt,be,Y){!function(ie,q){"use strict";function O(M,v){if(!M)throw new Error(v||"Assertion failed")}function E(M,v){M.super_=v;var k=function(){};k.prototype=v.prototype,M.prototype=new k,M.prototype.constructor=M}function d(M,v,k){if(d.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,null!==M&&(("le"===v||"be"===v)&&(k=v,v=10),this._init(M||0,v||10,k||"be"))}var x;"object"==typeof ie?ie.exports=d:q.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(46601).Buffer}catch{}function f(M,v){var k=M.charCodeAt(v);return k>=48&&k<=57?k-48:k>=65&&k<=70?k-55:k>=97&&k<=102?k-87:void O(!1,"Invalid character in "+M)}function T(M,v,k){var D=f(M,k);return k-1>=v&&(D|=f(M,k-1)<<4),D}function g(M,v,k,D){for(var N=0,C=0,a=Math.min(M.length,k),B=v;B=49?Q-49+10:Q>=17?Q-17+10:Q,O(Q>=0&&C0?v:k},d.min=function(v,k){return v.cmp(k)<0?v:k},d.prototype._init=function(v,k,D){if("number"==typeof v)return this._initNumber(v,k,D);if("object"==typeof v)return this._initArray(v,k,D);"hex"===k&&(k=16),O(k===(0|k)&&k>=2&&k<=36);var N=0;"-"===(v=v.toString().replace(/\s+/g,""))[0]&&(N++,this.negative=1),N=0;N-=3)this.words[C]|=(a=v[N]|v[N-1]<<8|v[N-2]<<16)<>>26-B&67108863,(B+=24)>=26&&(B-=26,C++);else if("le"===D)for(N=0,C=0;N>>26-B&67108863,(B+=24)>=26&&(B-=26,C++);return this._strip()},d.prototype._parseHex=function(v,k,D){this.length=Math.ceil((v.length-k)/6),this.words=new Array(this.length);for(var N=0;N=k;N-=2)B=T(v,k,N)<=18?(C-=18,this.words[a+=1]|=B>>>26):C+=8;else for(N=(v.length-k)%2==0?k+1:k;N=18?(C-=18,this.words[a+=1]|=B>>>26):C+=8;this._strip()},d.prototype._parseBase=function(v,k,D){this.words=[0],this.length=1;for(var N=0,C=1;C<=67108863;C*=k)N++;N--,C=C/k|0;for(var a=v.length-D,B=a%N,Q=Math.min(a,a-B)+D,ee=0,ce=D;ce1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{d.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch{d.prototype.inspect=l}else d.prototype.inspect=l;function l(){return(this.red?""}var 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"],u=[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],m=[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 S(M,v,k){k.negative=v.negative^M.negative;var D=M.length+v.length|0;k.length=D,D=D-1|0;var N=0|M.words[0],C=0|v.words[0],a=N*C,Q=a/67108864|0;k.words[0]=67108863&a;for(var ee=1;ee>>26,ue=67108863&Q,we=Math.min(ee,v.length-1),ae=Math.max(0,ee-M.length+1);ae<=we;ae++)ce+=(a=(N=0|M.words[ee-ae|0])*(C=0|v.words[ae])+ue)/67108864|0,ue=67108863&a;k.words[ee]=0|ue,Q=0|ce}return 0!==Q?k.words[ee]=0|Q:k.length--,k._strip()}d.prototype.toString=function(v,k){var D;if(k=0|k||1,16===(v=v||10)||"hex"===v){D="";for(var N=0,C=0,a=0;a>>24-N&16777215,(N+=2)>=26&&(N-=26,a--),D=0!==C||a!==this.length-1?h[6-Q.length]+Q+D:Q+D}for(0!==C&&(D=C.toString(16)+D);D.length%k!=0;)D="0"+D;return 0!==this.negative&&(D="-"+D),D}if(v===(0|v)&&v>=2&&v<=36){var ee=u[v],ce=m[v];D="";var ue=this.clone();for(ue.negative=0;!ue.isZero();){var we=ue.modrn(ce).toString(v);D=(ue=ue.idivn(ce)).isZero()?we+D:h[ee-we.length]+we+D}for(this.isZero()&&(D="0"+D);D.length%k!=0;)D="0"+D;return 0!==this.negative&&(D="-"+D),D}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var v=this.words[0];return 2===this.length?v+=67108864*this.words[1]:3===this.length&&1===this.words[2]?v+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-v:v},d.prototype.toJSON=function(){return this.toString(16,2)},x&&(d.prototype.toBuffer=function(v,k){return this.toArrayLike(x,v,k)}),d.prototype.toArray=function(v,k){return this.toArrayLike(Array,v,k)},d.prototype.toArrayLike=function(v,k,D){this._strip();var N=this.byteLength(),C=D||Math.max(1,N);O(N<=C,"byte array longer than desired length"),O(C>0,"Requested array length <= 0");var a=function(v,k){return v.allocUnsafe?v.allocUnsafe(k):new v(k)}(v,C);return this["_toArrayLike"+("le"===k?"LE":"BE")](a,N),a},d.prototype._toArrayLikeLE=function(v,k){for(var D=0,N=0,C=0,a=0;C>8&255),D>16&255),6===a?(D>24&255),N=0,a=0):(N=B>>>24,a+=2)}if(D=0&&(v[D--]=B>>8&255),D>=0&&(v[D--]=B>>16&255),6===a?(D>=0&&(v[D--]=B>>24&255),N=0,a=0):(N=B>>>24,a+=2)}if(D>=0)for(v[D--]=N;D>=0;)v[D--]=0},d.prototype._countBits=Math.clz32?function(v){return 32-Math.clz32(v)}:function(v){var k=v,D=0;return k>=4096&&(D+=13,k>>>=13),k>=64&&(D+=7,k>>>=7),k>=8&&(D+=4,k>>>=4),k>=2&&(D+=2,k>>>=2),D+k},d.prototype._zeroBits=function(v){if(0===v)return 26;var k=v,D=0;return 0==(8191&k)&&(D+=13,k>>>=13),0==(127&k)&&(D+=7,k>>>=7),0==(15&k)&&(D+=4,k>>>=4),0==(3&k)&&(D+=2,k>>>=2),0==(1&k)&&D++,D},d.prototype.bitLength=function(){var k=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+k},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,k=0;kv.length?this.clone().ior(v):v.clone().ior(this)},d.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},d.prototype.iuand=function(v){var k;k=this.length>v.length?v:this;for(var D=0;Dv.length?this.clone().iand(v):v.clone().iand(this)},d.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},d.prototype.iuxor=function(v){var k,D;this.length>v.length?(k=this,D=v):(k=v,D=this);for(var N=0;Nv.length?this.clone().ixor(v):v.clone().ixor(this)},d.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},d.prototype.inotn=function(v){O("number"==typeof v&&v>=0);var k=0|Math.ceil(v/26),D=v%26;this._expand(k),D>0&&k--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-D),this._strip()},d.prototype.notn=function(v){return this.clone().inotn(v)},d.prototype.setn=function(v,k){O("number"==typeof v&&v>=0);var D=v/26|0,N=v%26;return this._expand(D+1),this.words[D]=k?this.words[D]|1<v.length?(D=this,N=v):(D=v,N=this);for(var C=0,a=0;a>>26;for(;0!==C&&a>>26;if(this.length=D.length,0!==C)this.words[this.length]=C,this.length++;else if(D!==this)for(;av.length?this.clone().iadd(v):v.clone().iadd(this)},d.prototype.isub=function(v){if(0!==v.negative){v.negative=0;var k=this.iadd(v);return v.negative=1,k._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var N,C,D=this.cmp(v);if(0===D)return this.negative=0,this.length=1,this.words[0]=0,this;D>0?(N=this,C=v):(N=v,C=this);for(var a=0,B=0;B>26,this.words[B]=67108863&k;for(;0!==a&&B>26,this.words[B]=67108863&k;if(0===a&&B>>13,Te=0|N[1],le=8191&Te,X=Te>>>13,ne=0|N[2],pe=8191&ne,_e=ne>>>13,xe=0|N[3],Ce=8191&xe,ke=xe>>>13,me=0|N[4],Ee=8191&me,ze=me>>>13,Ve=0|N[5],nt=8191&Ve,tt=Ve>>>13,mt=0|N[6],ht=8191&mt,wt=mt>>>13,Pt=0|N[7],st=8191&Pt,Ye=Pt>>>13,gt=0|N[8],St=8191>,Wt=gt>>>13,dn=0|N[9],Nt=8191&dn,It=dn>>>13,qt=0|C[0],jt=8191&qt,Yt=qt>>>13,Wn=0|C[1],fn=8191&Wn,$n=Wn>>>13,Jr=0|C[2],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|C[3],zn=8191&Wr,bn=Wr>>>13,Lr=0|C[4],Kn=8191&Lr,sr=Lr>>>13,Ii=0|C[5],Un=8191&Ii,ir=Ii>>>13,ts=0|C[6],Tn=8191&ts,Qn=ts>>>13,Vi=0|C[7],ar=8191&Vi,br=Vi>>>13,ki=0|C[8],ur=8191&ki,mr=ki>>>13,Fr=0|C[9],hi=8191&Fr,wi=Fr>>>13;D.negative=v.negative^k.negative,D.length=19;var cs=(B+(Q=Math.imul(we,jt))|0)+((8191&(ee=(ee=Math.imul(we,Yt))+Math.imul(ae,jt)|0))<<13)|0;B=((ce=Math.imul(ae,Yt))+(ee>>>13)|0)+(cs>>>26)|0,cs&=67108863,Q=Math.imul(le,jt),ee=(ee=Math.imul(le,Yt))+Math.imul(X,jt)|0,ce=Math.imul(X,Yt);var $i=(B+(Q=Q+Math.imul(we,fn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,$n)|0)+(ee>>>13)|0)+($i>>>26)|0,$i&=67108863,Q=Math.imul(pe,jt),ee=(ee=Math.imul(pe,Yt))+Math.imul(_e,jt)|0,ce=Math.imul(_e,Yt),Q=Q+Math.imul(le,fn)|0,ee=(ee=ee+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,ce=ce+Math.imul(X,$n)|0;var rs=(B+(Q=Q+Math.imul(we,Ln)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0))<<13)|0;B=((ce=ce+Math.imul(ae,Bn)|0)+(ee>>>13)|0)+(rs>>>26)|0,rs&=67108863,Q=Math.imul(Ce,jt),ee=(ee=Math.imul(Ce,Yt))+Math.imul(ke,jt)|0,ce=Math.imul(ke,Yt),Q=Q+Math.imul(pe,fn)|0,ee=(ee=ee+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,ce=ce+Math.imul(_e,$n)|0,Q=Q+Math.imul(le,Ln)|0,ee=(ee=ee+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,ce=ce+Math.imul(X,Bn)|0;var Xi=(B+(Q=Q+Math.imul(we,zn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,bn)|0)+(ee>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,Q=Math.imul(Ee,jt),ee=(ee=Math.imul(Ee,Yt))+Math.imul(ze,jt)|0,ce=Math.imul(ze,Yt),Q=Q+Math.imul(Ce,fn)|0,ee=(ee=ee+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,ce=ce+Math.imul(ke,$n)|0,Q=Q+Math.imul(pe,Ln)|0,ee=(ee=ee+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,ce=ce+Math.imul(_e,Bn)|0,Q=Q+Math.imul(le,zn)|0,ee=(ee=ee+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,ce=ce+Math.imul(X,bn)|0;var $s=(B+(Q=Q+Math.imul(we,Kn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,sr)|0)+(ee>>>13)|0)+($s>>>26)|0,$s&=67108863,Q=Math.imul(nt,jt),ee=(ee=Math.imul(nt,Yt))+Math.imul(tt,jt)|0,ce=Math.imul(tt,Yt),Q=Q+Math.imul(Ee,fn)|0,ee=(ee=ee+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,ce=ce+Math.imul(ze,$n)|0,Q=Q+Math.imul(Ce,Ln)|0,ee=(ee=ee+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,ce=ce+Math.imul(ke,Bn)|0,Q=Q+Math.imul(pe,zn)|0,ee=(ee=ee+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,ce=ce+Math.imul(_e,bn)|0,Q=Q+Math.imul(le,Kn)|0,ee=(ee=ee+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,ce=ce+Math.imul(X,sr)|0;var is=(B+(Q=Q+Math.imul(we,Un)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0))<<13)|0;B=((ce=ce+Math.imul(ae,ir)|0)+(ee>>>13)|0)+(is>>>26)|0,is&=67108863,Q=Math.imul(ht,jt),ee=(ee=Math.imul(ht,Yt))+Math.imul(wt,jt)|0,ce=Math.imul(wt,Yt),Q=Q+Math.imul(nt,fn)|0,ee=(ee=ee+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,ce=ce+Math.imul(tt,$n)|0,Q=Q+Math.imul(Ee,Ln)|0,ee=(ee=ee+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,ce=ce+Math.imul(ze,Bn)|0,Q=Q+Math.imul(Ce,zn)|0,ee=(ee=ee+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,ce=ce+Math.imul(ke,bn)|0,Q=Q+Math.imul(pe,Kn)|0,ee=(ee=ee+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,ce=ce+Math.imul(_e,sr)|0,Q=Q+Math.imul(le,Un)|0,ee=(ee=ee+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,ce=ce+Math.imul(X,ir)|0;var go=(B+(Q=Q+Math.imul(we,Tn)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0))<<13)|0;B=((ce=ce+Math.imul(ae,Qn)|0)+(ee>>>13)|0)+(go>>>26)|0,go&=67108863,Q=Math.imul(st,jt),ee=(ee=Math.imul(st,Yt))+Math.imul(Ye,jt)|0,ce=Math.imul(Ye,Yt),Q=Q+Math.imul(ht,fn)|0,ee=(ee=ee+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,ce=ce+Math.imul(wt,$n)|0,Q=Q+Math.imul(nt,Ln)|0,ee=(ee=ee+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,ce=ce+Math.imul(tt,Bn)|0,Q=Q+Math.imul(Ee,zn)|0,ee=(ee=ee+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,ce=ce+Math.imul(ze,bn)|0,Q=Q+Math.imul(Ce,Kn)|0,ee=(ee=ee+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,ce=ce+Math.imul(ke,sr)|0,Q=Q+Math.imul(pe,Un)|0,ee=(ee=ee+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,ce=ce+Math.imul(_e,ir)|0,Q=Q+Math.imul(le,Tn)|0,ee=(ee=ee+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,ce=ce+Math.imul(X,Qn)|0;var ji=(B+(Q=Q+Math.imul(we,ar)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,br)|0)+Math.imul(ae,ar)|0))<<13)|0;B=((ce=ce+Math.imul(ae,br)|0)+(ee>>>13)|0)+(ji>>>26)|0,ji&=67108863,Q=Math.imul(St,jt),ee=(ee=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,ce=Math.imul(Wt,Yt),Q=Q+Math.imul(st,fn)|0,ee=(ee=ee+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,ce=ce+Math.imul(Ye,$n)|0,Q=Q+Math.imul(ht,Ln)|0,ee=(ee=ee+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,ce=ce+Math.imul(wt,Bn)|0,Q=Q+Math.imul(nt,zn)|0,ee=(ee=ee+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,ce=ce+Math.imul(tt,bn)|0,Q=Q+Math.imul(Ee,Kn)|0,ee=(ee=ee+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,ce=ce+Math.imul(ze,sr)|0,Q=Q+Math.imul(Ce,Un)|0,ee=(ee=ee+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,ce=ce+Math.imul(ke,ir)|0,Q=Q+Math.imul(pe,Tn)|0,ee=(ee=ee+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,ce=ce+Math.imul(_e,Qn)|0,Q=Q+Math.imul(le,ar)|0,ee=(ee=ee+Math.imul(le,br)|0)+Math.imul(X,ar)|0,ce=ce+Math.imul(X,br)|0;var so=(B+(Q=Q+Math.imul(we,ur)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;B=((ce=ce+Math.imul(ae,mr)|0)+(ee>>>13)|0)+(so>>>26)|0,so&=67108863,Q=Math.imul(Nt,jt),ee=(ee=Math.imul(Nt,Yt))+Math.imul(It,jt)|0,ce=Math.imul(It,Yt),Q=Q+Math.imul(St,fn)|0,ee=(ee=ee+Math.imul(St,$n)|0)+Math.imul(Wt,fn)|0,ce=ce+Math.imul(Wt,$n)|0,Q=Q+Math.imul(st,Ln)|0,ee=(ee=ee+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,ce=ce+Math.imul(Ye,Bn)|0,Q=Q+Math.imul(ht,zn)|0,ee=(ee=ee+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,ce=ce+Math.imul(wt,bn)|0,Q=Q+Math.imul(nt,Kn)|0,ee=(ee=ee+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,ce=ce+Math.imul(tt,sr)|0,Q=Q+Math.imul(Ee,Un)|0,ee=(ee=ee+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,ce=ce+Math.imul(ze,ir)|0,Q=Q+Math.imul(Ce,Tn)|0,ee=(ee=ee+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,ce=ce+Math.imul(ke,Qn)|0,Q=Q+Math.imul(pe,ar)|0,ee=(ee=ee+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,ce=ce+Math.imul(_e,br)|0,Q=Q+Math.imul(le,ur)|0,ee=(ee=ee+Math.imul(le,mr)|0)+Math.imul(X,ur)|0,ce=ce+Math.imul(X,mr)|0;var oo=(B+(Q=Q+Math.imul(we,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(we,wi)|0)+Math.imul(ae,hi)|0))<<13)|0;B=((ce=ce+Math.imul(ae,wi)|0)+(ee>>>13)|0)+(oo>>>26)|0,oo&=67108863,Q=Math.imul(Nt,fn),ee=(ee=Math.imul(Nt,$n))+Math.imul(It,fn)|0,ce=Math.imul(It,$n),Q=Q+Math.imul(St,Ln)|0,ee=(ee=ee+Math.imul(St,Bn)|0)+Math.imul(Wt,Ln)|0,ce=ce+Math.imul(Wt,Bn)|0,Q=Q+Math.imul(st,zn)|0,ee=(ee=ee+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,ce=ce+Math.imul(Ye,bn)|0,Q=Q+Math.imul(ht,Kn)|0,ee=(ee=ee+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,ce=ce+Math.imul(wt,sr)|0,Q=Q+Math.imul(nt,Un)|0,ee=(ee=ee+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,ce=ce+Math.imul(tt,ir)|0,Q=Q+Math.imul(Ee,Tn)|0,ee=(ee=ee+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,ce=ce+Math.imul(ze,Qn)|0,Q=Q+Math.imul(Ce,ar)|0,ee=(ee=ee+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,ce=ce+Math.imul(ke,br)|0,Q=Q+Math.imul(pe,ur)|0,ee=(ee=ee+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0,ce=ce+Math.imul(_e,mr)|0;var zo=(B+(Q=Q+Math.imul(le,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(le,wi)|0)+Math.imul(X,hi)|0))<<13)|0;B=((ce=ce+Math.imul(X,wi)|0)+(ee>>>13)|0)+(zo>>>26)|0,zo&=67108863,Q=Math.imul(Nt,Ln),ee=(ee=Math.imul(Nt,Bn))+Math.imul(It,Ln)|0,ce=Math.imul(It,Bn),Q=Q+Math.imul(St,zn)|0,ee=(ee=ee+Math.imul(St,bn)|0)+Math.imul(Wt,zn)|0,ce=ce+Math.imul(Wt,bn)|0,Q=Q+Math.imul(st,Kn)|0,ee=(ee=ee+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,ce=ce+Math.imul(Ye,sr)|0,Q=Q+Math.imul(ht,Un)|0,ee=(ee=ee+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,ce=ce+Math.imul(wt,ir)|0,Q=Q+Math.imul(nt,Tn)|0,ee=(ee=ee+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,ce=ce+Math.imul(tt,Qn)|0,Q=Q+Math.imul(Ee,ar)|0,ee=(ee=ee+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,ce=ce+Math.imul(ze,br)|0,Q=Q+Math.imul(Ce,ur)|0,ee=(ee=ee+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0,ce=ce+Math.imul(ke,mr)|0;var Wi=(B+(Q=Q+Math.imul(pe,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(pe,wi)|0)+Math.imul(_e,hi)|0))<<13)|0;B=((ce=ce+Math.imul(_e,wi)|0)+(ee>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,Q=Math.imul(Nt,zn),ee=(ee=Math.imul(Nt,bn))+Math.imul(It,zn)|0,ce=Math.imul(It,bn),Q=Q+Math.imul(St,Kn)|0,ee=(ee=ee+Math.imul(St,sr)|0)+Math.imul(Wt,Kn)|0,ce=ce+Math.imul(Wt,sr)|0,Q=Q+Math.imul(st,Un)|0,ee=(ee=ee+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,ce=ce+Math.imul(Ye,ir)|0,Q=Q+Math.imul(ht,Tn)|0,ee=(ee=ee+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,ce=ce+Math.imul(wt,Qn)|0,Q=Q+Math.imul(nt,ar)|0,ee=(ee=ee+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,ce=ce+Math.imul(tt,br)|0,Q=Q+Math.imul(Ee,ur)|0,ee=(ee=ee+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0,ce=ce+Math.imul(ze,mr)|0;var bo=(B+(Q=Q+Math.imul(Ce,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,wi)|0)+Math.imul(ke,hi)|0))<<13)|0;B=((ce=ce+Math.imul(ke,wi)|0)+(ee>>>13)|0)+(bo>>>26)|0,bo&=67108863,Q=Math.imul(Nt,Kn),ee=(ee=Math.imul(Nt,sr))+Math.imul(It,Kn)|0,ce=Math.imul(It,sr),Q=Q+Math.imul(St,Un)|0,ee=(ee=ee+Math.imul(St,ir)|0)+Math.imul(Wt,Un)|0,ce=ce+Math.imul(Wt,ir)|0,Q=Q+Math.imul(st,Tn)|0,ee=(ee=ee+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,ce=ce+Math.imul(Ye,Qn)|0,Q=Q+Math.imul(ht,ar)|0,ee=(ee=ee+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,ce=ce+Math.imul(wt,br)|0,Q=Q+Math.imul(nt,ur)|0,ee=(ee=ee+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0,ce=ce+Math.imul(tt,mr)|0;var _s=(B+(Q=Q+Math.imul(Ee,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ee,wi)|0)+Math.imul(ze,hi)|0))<<13)|0;B=((ce=ce+Math.imul(ze,wi)|0)+(ee>>>13)|0)+(_s>>>26)|0,_s&=67108863,Q=Math.imul(Nt,Un),ee=(ee=Math.imul(Nt,ir))+Math.imul(It,Un)|0,ce=Math.imul(It,ir),Q=Q+Math.imul(St,Tn)|0,ee=(ee=ee+Math.imul(St,Qn)|0)+Math.imul(Wt,Tn)|0,ce=ce+Math.imul(Wt,Qn)|0,Q=Q+Math.imul(st,ar)|0,ee=(ee=ee+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,ce=ce+Math.imul(Ye,br)|0,Q=Q+Math.imul(ht,ur)|0,ee=(ee=ee+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0,ce=ce+Math.imul(wt,mr)|0;var Ao=(B+(Q=Q+Math.imul(nt,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(nt,wi)|0)+Math.imul(tt,hi)|0))<<13)|0;B=((ce=ce+Math.imul(tt,wi)|0)+(ee>>>13)|0)+(Ao>>>26)|0,Ao&=67108863,Q=Math.imul(Nt,Tn),ee=(ee=Math.imul(Nt,Qn))+Math.imul(It,Tn)|0,ce=Math.imul(It,Qn),Q=Q+Math.imul(St,ar)|0,ee=(ee=ee+Math.imul(St,br)|0)+Math.imul(Wt,ar)|0,ce=ce+Math.imul(Wt,br)|0,Q=Q+Math.imul(st,ur)|0,ee=(ee=ee+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0,ce=ce+Math.imul(Ye,mr)|0;var zi=(B+(Q=Q+Math.imul(ht,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(ht,wi)|0)+Math.imul(wt,hi)|0))<<13)|0;B=((ce=ce+Math.imul(wt,wi)|0)+(ee>>>13)|0)+(zi>>>26)|0,zi&=67108863,Q=Math.imul(Nt,ar),ee=(ee=Math.imul(Nt,br))+Math.imul(It,ar)|0,ce=Math.imul(It,br),Q=Q+Math.imul(St,ur)|0,ee=(ee=ee+Math.imul(St,mr)|0)+Math.imul(Wt,ur)|0,ce=ce+Math.imul(Wt,mr)|0;var Ms=(B+(Q=Q+Math.imul(st,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(st,wi)|0)+Math.imul(Ye,hi)|0))<<13)|0;B=((ce=ce+Math.imul(Ye,wi)|0)+(ee>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,Q=Math.imul(Nt,ur),ee=(ee=Math.imul(Nt,mr))+Math.imul(It,ur)|0,ce=Math.imul(It,mr);var Oi=(B+(Q=Q+Math.imul(St,hi)|0)|0)+((8191&(ee=(ee=ee+Math.imul(St,wi)|0)+Math.imul(Wt,hi)|0))<<13)|0;B=((ce=ce+Math.imul(Wt,wi)|0)+(ee>>>13)|0)+(Oi>>>26)|0,Oi&=67108863;var Lu=(B+(Q=Math.imul(Nt,hi))|0)+((8191&(ee=(ee=Math.imul(Nt,wi))+Math.imul(It,hi)|0))<<13)|0;return B=((ce=Math.imul(It,wi))+(ee>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,a[0]=cs,a[1]=$i,a[2]=rs,a[3]=Xi,a[4]=$s,a[5]=is,a[6]=go,a[7]=ji,a[8]=so,a[9]=oo,a[10]=zo,a[11]=Wi,a[12]=bo,a[13]=_s,a[14]=Ao,a[15]=zi,a[16]=Ms,a[17]=Oi,a[18]=Lu,0!==B&&(a[19]=B,D.length++),D};function P(M,v,k){k.negative=v.negative^M.negative,k.length=M.length+v.length;for(var D=0,N=0,C=0;C>>26)|0)>>>26,a&=67108863}k.words[C]=B,D=a,a=N}return 0!==D?k.words[C]=D:k.length--,k._strip()}function L(M,v,k){return P(M,v,k)}function V(M,v){this.x=M,this.y=v}Math.imul||(I=S),d.prototype.mulTo=function(v,k){var N=this.length+v.length;return 10===this.length&&10===v.length?I(this,v,k):N<63?S(this,v,k):N<1024?P(this,v,k):L(this,v,k)},V.prototype.makeRBT=function(v){for(var k=new Array(v),D=d.prototype._countBits(v)-1,N=0;N>=1;return N},V.prototype.permute=function(v,k,D,N,C,a){for(var B=0;B>>=1)C++;return 1<>>=13),C>>>=13;for(a=2*k;a>=26,D+=C/67108864|0,D+=a>>>26,this.words[N]=67108863&a}return 0!==D&&(this.words[N]=D,this.length++),k?this.ineg():this},d.prototype.muln=function(v){return this.clone().imuln(v)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(v){var k=function(M){for(var v=new Array(M.bitLength()),k=0;k>>k%26&1;return v}(v);if(0===k.length)return new d(1);for(var D=this,N=0;N=0);var C,k=v%26,D=(v-k)/26,N=67108863>>>26-k<<26-k;if(0!==k){var a=0;for(C=0;C>>26-k}a&&(this.words[C]=a,this.length++)}if(0!==D){for(C=this.length-1;C>=0;C--)this.words[C+D]=this.words[C];for(C=0;C=0),N=k?(k-k%26)/26:0;var C=v%26,a=Math.min((v-C)/26,this.length),B=67108863^67108863>>>C<a)for(this.length-=a,ee=0;ee=0&&(0!==ce||ee>=N);ee--){var ue=0|this.words[ee];this.words[ee]=ce<<26-C|ue>>>C,ce=ue&B}return Q&&0!==ce&&(Q.words[Q.length++]=ce),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},d.prototype.ishrn=function(v,k,D){return O(0===this.negative),this.iushrn(v,k,D)},d.prototype.shln=function(v){return this.clone().ishln(v)},d.prototype.ushln=function(v){return this.clone().iushln(v)},d.prototype.shrn=function(v){return this.clone().ishrn(v)},d.prototype.ushrn=function(v){return this.clone().iushrn(v)},d.prototype.testn=function(v){O("number"==typeof v&&v>=0);var k=v%26,D=(v-k)/26;return!(this.length<=D||!(this.words[D]&1<=0);var k=v%26,D=(v-k)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=D?this:(0!==k&&D++,this.length=Math.min(D,this.length),0!==k&&(this.words[this.length-1]&=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},d.prototype.isubn=function(v){if(O("number"==typeof v),O(v<67108864),v<0)return this.iaddn(-v);if(0!==this.negative)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(Q/67108864|0),this.words[C+D]=67108863&a}for(;C>26,this.words[C+D]=67108863&a;if(0===B)return this._strip();for(O(-1===B),B=0,C=0;C>26,this.words[C]=67108863&a;return this.negative=1,this._strip()},d.prototype._wordDiv=function(v,k){var D,N=this.clone(),C=v,a=0|C.words[C.length-1];0!=(D=26-this._countBits(a))&&(C=C.ushln(D),N.iushln(D),a=0|C.words[C.length-1]);var ee,Q=N.length-C.length;if("mod"!==k){(ee=new d(null)).length=Q+1,ee.words=new Array(ee.length);for(var ce=0;ce=0;we--){var ae=67108864*(0|N.words[C.length+we])+(0|N.words[C.length+we-1]);for(ae=Math.min(ae/a|0,67108863),N._ishlnsubmul(C,ae,we);0!==N.negative;)ae--,N.negative=0,N._ishlnsubmul(C,1,we),N.isZero()||(N.negative^=1);ee&&(ee.words[we]=ae)}return ee&&ee._strip(),N._strip(),"div"!==k&&0!==D&&N.iushrn(D),{div:ee||null,mod:N}},d.prototype.divmod=function(v,k,D){return O(!v.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===v.negative?(a=this.neg().divmod(v,k),"mod"!==k&&(N=a.div.neg()),"div"!==k&&(C=a.mod.neg(),D&&0!==C.negative&&C.iadd(v)),{div:N,mod:C}):0===this.negative&&0!==v.negative?(a=this.divmod(v.neg(),k),"mod"!==k&&(N=a.div.neg()),{div:N,mod:a.mod}):0!=(this.negative&v.negative)?(a=this.neg().divmod(v.neg(),k),"div"!==k&&(C=a.mod.neg(),D&&0!==C.negative&&C.isub(v)),{div:a.div,mod:C}):v.length>this.length||this.cmp(v)<0?{div:new d(0),mod:this}:1===v.length?"div"===k?{div:this.divn(v.words[0]),mod:null}:"mod"===k?{div:null,mod:new d(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new d(this.modrn(v.words[0]))}:this._wordDiv(v,k);var N,C,a},d.prototype.div=function(v){return this.divmod(v,"div",!1).div},d.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},d.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},d.prototype.divRound=function(v){var k=this.divmod(v);if(k.mod.isZero())return k.div;var D=0!==k.div.negative?k.mod.isub(v):k.mod,N=v.ushrn(1),C=v.andln(1),a=D.cmp(N);return a<0||1===C&&0===a?k.div:0!==k.div.negative?k.div.isubn(1):k.div.iaddn(1)},d.prototype.modrn=function(v){var k=v<0;k&&(v=-v),O(v<=67108863);for(var D=(1<<26)%v,N=0,C=this.length-1;C>=0;C--)N=(D*N+(0|this.words[C]))%v;return k?-N:N},d.prototype.modn=function(v){return this.modrn(v)},d.prototype.idivn=function(v){var k=v<0;k&&(v=-v),O(v<=67108863);for(var D=0,N=this.length-1;N>=0;N--){var C=(0|this.words[N])+67108864*D;this.words[N]=C/v|0,D=C%v}return this._strip(),k?this.ineg():this},d.prototype.divn=function(v){return this.clone().idivn(v)},d.prototype.egcd=function(v){O(0===v.negative),O(!v.isZero());var k=this,D=v.clone();k=0!==k.negative?k.umod(v):k.clone();for(var N=new d(1),C=new d(0),a=new d(0),B=new d(1),Q=0;k.isEven()&&D.isEven();)k.iushrn(1),D.iushrn(1),++Q;for(var ee=D.clone(),ce=k.clone();!k.isZero();){for(var ue=0,we=1;0==(k.words[0]&we)&&ue<26;++ue,we<<=1);if(ue>0)for(k.iushrn(ue);ue-- >0;)(N.isOdd()||C.isOdd())&&(N.iadd(ee),C.isub(ce)),N.iushrn(1),C.iushrn(1);for(var ae=0,Te=1;0==(D.words[0]&Te)&&ae<26;++ae,Te<<=1);if(ae>0)for(D.iushrn(ae);ae-- >0;)(a.isOdd()||B.isOdd())&&(a.iadd(ee),B.isub(ce)),a.iushrn(1),B.iushrn(1);k.cmp(D)>=0?(k.isub(D),N.isub(a),C.isub(B)):(D.isub(k),a.isub(N),B.isub(C))}return{a,b:B,gcd:D.iushln(Q)}},d.prototype._invmp=function(v){O(0===v.negative),O(!v.isZero());var ue,k=this,D=v.clone();k=0!==k.negative?k.umod(v):k.clone();for(var N=new d(1),C=new d(0),a=D.clone();k.cmpn(1)>0&&D.cmpn(1)>0;){for(var B=0,Q=1;0==(k.words[0]&Q)&&B<26;++B,Q<<=1);if(B>0)for(k.iushrn(B);B-- >0;)N.isOdd()&&N.iadd(a),N.iushrn(1);for(var ee=0,ce=1;0==(D.words[0]&ce)&&ee<26;++ee,ce<<=1);if(ee>0)for(D.iushrn(ee);ee-- >0;)C.isOdd()&&C.iadd(a),C.iushrn(1);k.cmp(D)>=0?(k.isub(D),N.isub(C)):(D.isub(k),C.isub(N))}return(ue=0===k.cmpn(1)?N:C).cmpn(0)<0&&ue.iadd(v),ue},d.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var k=this.clone(),D=v.clone();k.negative=0,D.negative=0;for(var N=0;k.isEven()&&D.isEven();N++)k.iushrn(1),D.iushrn(1);for(;;){for(;k.isEven();)k.iushrn(1);for(;D.isEven();)D.iushrn(1);var C=k.cmp(D);if(C<0){var a=k;k=D,D=a}else if(0===C||0===D.cmpn(1))break;k.isub(D)}return D.iushln(N)},d.prototype.invm=function(v){return this.egcd(v).a.umod(v)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(v){return this.words[0]&v},d.prototype.bincn=function(v){O("number"==typeof v);var k=v%26,D=(v-k)/26,N=1<>>26,this.words[a]=B&=67108863}return 0!==C&&(this.words[a]=C,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(v){var D,k=v<0;if(0!==this.negative&&!k)return-1;if(0===this.negative&&k)return 1;if(this._strip(),this.length>1)D=1;else{k&&(v=-v),O(v<=67108863,"Number is too big");var N=0|this.words[0];D=N===v?0:Nv.length)return 1;if(this.length=0;D--){var N=0|this.words[D],C=0|v.words[D];if(N!==C){NC&&(k=1);break}}return k},d.prototype.gtn=function(v){return 1===this.cmpn(v)},d.prototype.gt=function(v){return 1===this.cmp(v)},d.prototype.gten=function(v){return this.cmpn(v)>=0},d.prototype.gte=function(v){return this.cmp(v)>=0},d.prototype.ltn=function(v){return-1===this.cmpn(v)},d.prototype.lt=function(v){return-1===this.cmp(v)},d.prototype.lten=function(v){return this.cmpn(v)<=0},d.prototype.lte=function(v){return this.cmp(v)<=0},d.prototype.eqn=function(v){return 0===this.cmpn(v)},d.prototype.eq=function(v){return 0===this.cmp(v)},d.red=function(v){return new o(v)},d.prototype.toRed=function(v){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),v.convertTo(this)._forceRed(v)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(v){return this.red=v,this},d.prototype.forceRed=function(v){return O(!this.red,"Already a number in reduction context"),this._forceRed(v)},d.prototype.redAdd=function(v){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},d.prototype.redIAdd=function(v){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},d.prototype.redSub=function(v){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},d.prototype.redISub=function(v){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},d.prototype.redShl=function(v){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},d.prototype.redMul=function(v){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},d.prototype.redIMul=function(v){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(v){return O(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var W={k256:null,p224:null,p192:null,p25519:null};function G(M,v){this.name=M,this.p=new d(v,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function H(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function j(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function K(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function R(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function o(M){if("string"==typeof M){var v=d._prime(M);this.m=v.p,this.prime=v}else O(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}function y(M){o.call(this,M),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}G.prototype._tmp=function(){var v=new d(null);return v.words=new Array(Math.ceil(this.n/13)),v},G.prototype.ireduce=function(v){var D,k=v;do{this.split(k,this.tmp),D=(k=(k=this.imulK(k)).iadd(this.tmp)).bitLength()}while(D>this.n);var N=D0?k.isub(this.p):void 0!==k.strip?k.strip():k._strip(),k},G.prototype.split=function(v,k){v.iushrn(this.n,0,k)},G.prototype.imulK=function(v){return v.imul(this.k)},E(H,G),H.prototype.split=function(v,k){for(var D=4194303,N=Math.min(v.length,9),C=0;C>>22,a=B}v.words[C-10]=a>>>=22,v.length-=0===a&&v.length>10?10:9},H.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var k=0,D=0;D>>=26,v.words[D]=C,k=N}return 0!==k&&(v.words[v.length++]=k),v},d._prime=function(v){if(W[v])return W[v];var k;if("k256"===v)k=new H;else if("p224"===v)k=new j;else if("p192"===v)k=new K;else{if("p25519"!==v)throw new Error("Unknown prime "+v);k=new R}return W[v]=k,k},o.prototype._verify1=function(v){O(0===v.negative,"red works only with positives"),O(v.red,"red works only with red numbers")},o.prototype._verify2=function(v,k){O(0==(v.negative|k.negative),"red works only with positives"),O(v.red&&v.red===k.red,"red works only with red numbers")},o.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(b(v,v.umod(this.m)._forceRed(this)),v)},o.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},o.prototype.add=function(v,k){this._verify2(v,k);var D=v.add(k);return D.cmp(this.m)>=0&&D.isub(this.m),D._forceRed(this)},o.prototype.iadd=function(v,k){this._verify2(v,k);var D=v.iadd(k);return D.cmp(this.m)>=0&&D.isub(this.m),D},o.prototype.sub=function(v,k){this._verify2(v,k);var D=v.sub(k);return D.cmpn(0)<0&&D.iadd(this.m),D._forceRed(this)},o.prototype.isub=function(v,k){this._verify2(v,k);var D=v.isub(k);return D.cmpn(0)<0&&D.iadd(this.m),D},o.prototype.shl=function(v,k){return this._verify1(v),this.imod(v.ushln(k))},o.prototype.imul=function(v,k){return this._verify2(v,k),this.imod(v.imul(k))},o.prototype.mul=function(v,k){return this._verify2(v,k),this.imod(v.mul(k))},o.prototype.isqr=function(v){return this.imul(v,v.clone())},o.prototype.sqr=function(v){return this.mul(v,v)},o.prototype.sqrt=function(v){if(v.isZero())return v.clone();var k=this.m.andln(3);if(O(k%2==1),3===k){var D=this.m.add(new d(1)).iushrn(2);return this.pow(v,D)}for(var N=this.m.subn(1),C=0;!N.isZero()&&0===N.andln(1);)C++,N.iushrn(1);O(!N.isZero());var a=new d(1).toRed(this),B=a.redNeg(),Q=this.m.subn(1).iushrn(1),ee=this.m.bitLength();for(ee=new d(2*ee*ee).toRed(this);0!==this.pow(ee,Q).cmp(B);)ee.redIAdd(B);for(var ce=this.pow(ee,N),ue=this.pow(v,N.addn(1).iushrn(1)),we=this.pow(v,N),ae=C;0!==we.cmp(a);){for(var Te=we,le=0;0!==Te.cmp(a);le++)Te=Te.redSqr();O(le=0;C--){for(var ce=k.words[C],ue=ee-1;ue>=0;ue--){var we=ce>>ue&1;a!==N[0]&&(a=this.sqr(a)),0!==we||0!==B?(B<<=1,B|=we,(4==++Q||0===C&&0===ue)&&(a=this.mul(a,N[B]),Q=0,B=0)):Q=0}ee=26}return a},o.prototype.convertTo=function(v){var k=v.umod(this.m);return k===v?k.clone():k},o.prototype.convertFrom=function(v){var k=v.clone();return k.red=null,k},d.mont=function(v){return new y(v)},E(y,o),y.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},y.prototype.convertFrom=function(v){var k=this.imod(v.mul(this.rinv));return k.red=null,k},y.prototype.imul=function(v,k){if(v.isZero()||k.isZero())return v.words[0]=0,v.length=1,v;var D=v.imul(k),N=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=D.isub(N).iushrn(this.shift),a=C;return C.cmp(this.m)>=0?a=C.isub(this.m):C.cmpn(0)<0&&(a=C.iadd(this.m)),a._forceRed(this)},y.prototype.mul=function(v,k){if(v.isZero()||k.isZero())return new d(0)._forceRed(this);var D=v.mul(k),N=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=D.isub(N).iushrn(this.shift),a=C;return C.cmp(this.m)>=0?a=C.isub(this.m):C.cmpn(0)<0&&(a=C.iadd(this.m)),a._forceRed(this)},y.prototype.invm=function(v){return this.imod(v._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},23845:function(bt){bt.exports=function(be){var Y={};function ie(q){if(Y[q])return Y[q].exports;var O=Y[q]={i:q,l:!1,exports:{}};return be[q].call(O.exports,O,O.exports,ie),O.l=!0,O.exports}return ie.m=be,ie.c=Y,ie.d=function(q,O,E){ie.o(q,O)||Object.defineProperty(q,O,{enumerable:!0,get:E})},ie.r=function(q){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(q,"__esModule",{value:!0})},ie.t=function(q,O){if(1&O&&(q=ie(q)),8&O||4&O&&"object"==typeof q&&q&&q.__esModule)return q;var E=Object.create(null);if(ie.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:q}),2&O&&"string"!=typeof q)for(var d in q)ie.d(E,d,function(x){return q[x]}.bind(null,d));return E},ie.n=function(q){var O=q&&q.__esModule?function(){return q.default}:function(){return q};return ie.d(O,"a",O),O},ie.o=function(q,O){return Object.prototype.hasOwnProperty.call(q,O)},ie.p="",ie(ie.s=90)}({17:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var q=ie(18),O=function(){function E(){}return E.getFirstMatch=function(d,x){var f=x.match(d);return f&&f.length>0&&f[1]||""},E.getSecondMatch=function(d,x){var f=x.match(d);return f&&f.length>1&&f[2]||""},E.matchAndReturnConst=function(d,x,f){if(d.test(x))return f},E.getWindowsVersionName=function(d){switch(d){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},E.getMacOSVersionName=function(d){var x=d.split(".").splice(0,2).map(function(f){return parseInt(f,10)||0});if(x.push(0),10===x[0])switch(x[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},E.getAndroidVersionName=function(d){var x=d.split(".").splice(0,2).map(function(f){return parseInt(f,10)||0});if(x.push(0),!(1===x[0]&&x[1]<5))return 1===x[0]&&x[1]<6?"Cupcake":1===x[0]&&x[1]>=6?"Donut":2===x[0]&&x[1]<2?"Eclair":2===x[0]&&2===x[1]?"Froyo":2===x[0]&&x[1]>2?"Gingerbread":3===x[0]?"Honeycomb":4===x[0]&&x[1]<1?"Ice Cream Sandwich":4===x[0]&&x[1]<4?"Jelly Bean":4===x[0]&&x[1]>=4?"KitKat":5===x[0]?"Lollipop":6===x[0]?"Marshmallow":7===x[0]?"Nougat":8===x[0]?"Oreo":9===x[0]?"Pie":void 0},E.getVersionPrecision=function(d){return d.split(".").length},E.compareVersions=function(d,x,f){void 0===f&&(f=!1);var T=E.getVersionPrecision(d),g=E.getVersionPrecision(x),b=Math.max(T,g),l=0,h=E.map([d,x],function(u){var m=b-E.getVersionPrecision(u),_=u+new Array(m+1).join(".0");return E.map(_.split("."),function(w){return new Array(20-w.length).join("0")+w}).reverse()});for(f&&(l=b-Math.min(T,g)),b-=1;b>=l;){if(h[0][b]>h[1][b])return 1;if(h[0][b]===h[1][b]){if(b===l)return 0;b-=1}else if(h[0][b]1?g-1:0),l=1;l0){var S=Object.keys(u),I=x.default.find(S,function(H){return h.isOS(H)});if(I){var P=this.satisfies(u[I]);if(void 0!==P)return P}var L=x.default.find(S,function(H){return h.isPlatform(H)});if(L){var V=this.satisfies(u[L]);if(void 0!==V)return V}}if(w>0){var W=Object.keys(_),G=x.default.find(W,function(H){return h.isBrowser(H,!0)});if(void 0!==G)return this.compareVersion(_[G])}},b.isBrowser=function(l,h){void 0===h&&(h=!1);var u=this.getBrowserName().toLowerCase(),m=l.toLowerCase(),_=x.default.getBrowserTypeByAlias(m);return h&&_&&(m=_.toLowerCase()),m===u},b.compareVersion=function(l){var h=[0],u=l,m=!1,_=this.getBrowserVersion();if("string"==typeof _)return">"===l[0]||"<"===l[0]?(u=l.substr(1),"="===l[1]?(m=!0,u=l.substr(2)):h=[],h.push(">"===l[0]?1:-1)):"="===l[0]?u=l.substr(1):"~"===l[0]&&(m=!0,u=l.substr(1)),h.indexOf(x.default.compareVersions(_,u,m))>-1},b.isOS=function(l){return this.getOSName(!0)===String(l).toLowerCase()},b.isPlatform=function(l){return this.getPlatformType(!0)===String(l).toLowerCase()},b.isEngine=function(l){return this.getEngineName(!0)===String(l).toLowerCase()},b.is=function(l,h){return void 0===h&&(h=!1),this.isBrowser(l,h)||this.isOS(l)||this.isPlatform(l)},b.some=function(l){var h=this;return void 0===l&&(l=[]),l.some(function(u){return h.is(u)})},g}();Y.default=T,be.exports=Y.default},92:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var q,O=(q=ie(17))&&q.__esModule?q:{default:q},E=/version\/(\d+(\.?_?\d+)+)/i;Y.default=[{test:[/googlebot/i],describe:function(x){var f={name:"Googlebot"},T=O.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/opera/i],describe:function(x){var f={name:"Opera"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/opr\/|opios/i],describe:function(x){var f={name:"Opera"},T=O.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/SamsungBrowser/i],describe:function(x){var f={name:"Samsung Internet for Android"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/Whale/i],describe:function(x){var f={name:"NAVER Whale Browser"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/MZBrowser/i],describe:function(x){var f={name:"MZ Browser"},T=O.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/focus/i],describe:function(x){var f={name:"Focus"},T=O.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/swing/i],describe:function(x){var f={name:"Swing"},T=O.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/coast/i],describe:function(x){var f={name:"Opera Coast"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(x){var f={name:"Opera Touch"},T=O.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/yabrowser/i],describe:function(x){var f={name:"Yandex Browser"},T=O.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/ucbrowser/i],describe:function(x){var f={name:"UC Browser"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/Maxthon|mxios/i],describe:function(x){var f={name:"Maxthon"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/epiphany/i],describe:function(x){var f={name:"Epiphany"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/puffin/i],describe:function(x){var f={name:"Puffin"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/sleipnir/i],describe:function(x){var f={name:"Sleipnir"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/k-meleon/i],describe:function(x){var f={name:"K-Meleon"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/micromessenger/i],describe:function(x){var f={name:"WeChat"},T=O.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/qqbrowser/i],describe:function(x){var f={name:/qqbrowserlite/i.test(x)?"QQ Browser Lite":"QQ Browser"},T=O.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/msie|trident/i],describe:function(x){var f={name:"Internet Explorer"},T=O.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/\sedg\//i],describe:function(x){var f={name:"Microsoft Edge"},T=O.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/edg([ea]|ios)/i],describe:function(x){var f={name:"Microsoft Edge"},T=O.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/vivaldi/i],describe:function(x){var f={name:"Vivaldi"},T=O.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/seamonkey/i],describe:function(x){var f={name:"SeaMonkey"},T=O.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/sailfish/i],describe:function(x){var f={name:"Sailfish"},T=O.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,x);return T&&(f.version=T),f}},{test:[/silk/i],describe:function(x){var f={name:"Amazon Silk"},T=O.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/phantom/i],describe:function(x){var f={name:"PhantomJS"},T=O.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/slimerjs/i],describe:function(x){var f={name:"SlimerJS"},T=O.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(x){var f={name:"BlackBerry"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/(web|hpw)[o0]s/i],describe:function(x){var f={name:"WebOS Browser"},T=O.default.getFirstMatch(E,x)||O.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/bada/i],describe:function(x){var f={name:"Bada"},T=O.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/tizen/i],describe:function(x){var f={name:"Tizen"},T=O.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/qupzilla/i],describe:function(x){var f={name:"QupZilla"},T=O.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/firefox|iceweasel|fxios/i],describe:function(x){var f={name:"Firefox"},T=O.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/electron/i],describe:function(x){var f={name:"Electron"},T=O.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/MiuiBrowser/i],describe:function(x){var f={name:"Miui"},T=O.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/chromium/i],describe:function(x){var f={name:"Chromium"},T=O.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,x)||O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/chrome|crios|crmo/i],describe:function(x){var f={name:"Chrome"},T=O.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/GSA/i],describe:function(x){var f={name:"Google Search"},T=O.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:function(x){var f=!x.test(/like android/i),T=x.test(/android/i);return f&&T},describe:function(x){var f={name:"Android Browser"},T=O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/playstation 4/i],describe:function(x){var f={name:"PlayStation 4"},T=O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/safari|applewebkit/i],describe:function(x){var f={name:"Safari"},T=O.default.getFirstMatch(E,x);return T&&(f.version=T),f}},{test:[/.*/i],describe:function(x){var f=-1!==x.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:O.default.getFirstMatch(f,x),version:O.default.getSecondMatch(f,x)}}}],be.exports=Y.default},93:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var q,O=(q=ie(17))&&q.__esModule?q:{default:q},E=ie(18);Y.default=[{test:[/Roku\/DVP/],describe:function(x){var f=O.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,x);return{name:E.OS_MAP.Roku,version:f}}},{test:[/windows phone/i],describe:function(x){var f=O.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.WindowsPhone,version:f}}},{test:[/windows /i],describe:function(x){var f=O.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,x),T=O.default.getWindowsVersionName(f);return{name:E.OS_MAP.Windows,version:f,versionName:T}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(x){var f={name:E.OS_MAP.iOS},T=O.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,x);return T&&(f.version=T),f}},{test:[/macintosh/i],describe:function(x){var f=O.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,x).replace(/[_\s]/g,"."),T=O.default.getMacOSVersionName(f),g={name:E.OS_MAP.MacOS,version:f};return T&&(g.versionName=T),g}},{test:[/(ipod|iphone|ipad)/i],describe:function(x){var f=O.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,x).replace(/[_\s]/g,".");return{name:E.OS_MAP.iOS,version:f}}},{test:function(x){var f=!x.test(/like android/i),T=x.test(/android/i);return f&&T},describe:function(x){var f=O.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,x),T=O.default.getAndroidVersionName(f),g={name:E.OS_MAP.Android,version:f};return T&&(g.versionName=T),g}},{test:[/(web|hpw)[o0]s/i],describe:function(x){var f=O.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,x),T={name:E.OS_MAP.WebOS};return f&&f.length&&(T.version=f),T}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(x){var f=O.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,x)||O.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,x)||O.default.getFirstMatch(/\bbb(\d+)/i,x);return{name:E.OS_MAP.BlackBerry,version:f}}},{test:[/bada/i],describe:function(x){var f=O.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.Bada,version:f}}},{test:[/tizen/i],describe:function(x){var f=O.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.Tizen,version:f}}},{test:[/linux/i],describe:function(){return{name:E.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:E.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(x){var f=O.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,x);return{name:E.OS_MAP.PlayStation4,version:f}}}],be.exports=Y.default},94:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var q,O=(q=ie(17))&&q.__esModule?q:{default:q},E=ie(18);Y.default=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(x){var f=O.default.getFirstMatch(/(can-l01)/i,x)&&"Nova",T={type:E.PLATFORMS_MAP.mobile,vendor:"Huawei"};return f&&(T.model=f),T}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet}}},{test:function(x){var f=x.test(/ipod|iphone/i),T=x.test(/like (ipod|iphone)/i);return f&&!T},describe:function(x){var f=O.default.getFirstMatch(/(ipod|iphone)/i,x);return{type:E.PLATFORMS_MAP.mobile,vendor:"Apple",model:f}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(x){return"blackberry"===x.getBrowserName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(x){return"bada"===x.getBrowserName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(x){return"windows phone"===x.getBrowserName()},describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(x){var f=Number(String(x.getOSVersion()).split(".")[0]);return"android"===x.getOSName(!0)&&f>=3},describe:function(){return{type:E.PLATFORMS_MAP.tablet}}},{test:function(x){return"android"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(x){return"macos"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(x){return"windows"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop}}},{test:function(x){return"linux"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop}}},{test:function(x){return"playstation 4"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.tv}}},{test:function(x){return"roku"===x.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.tv}}}],be.exports=Y.default},95:function(be,Y,ie){"use strict";Y.__esModule=!0,Y.default=void 0;var q,O=(q=ie(17))&&q.__esModule?q:{default:q},E=ie(18);Y.default=[{test:function(x){return"microsoft edge"===x.getBrowserName(!0)},describe:function(x){if(/\sedg\//i.test(x))return{name:E.ENGINE_MAP.Blink};var f=O.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,x);return{name:E.ENGINE_MAP.EdgeHTML,version:f}}},{test:[/trident/i],describe:function(x){var f={name:E.ENGINE_MAP.Trident},T=O.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:function(x){return x.test(/presto/i)},describe:function(x){var f={name:E.ENGINE_MAP.Presto},T=O.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:function(x){var f=x.test(/gecko/i),T=x.test(/like gecko/i);return f&&!T},describe:function(x){var f={name:E.ENGINE_MAP.Gecko},T=O.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:E.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(x){var f={name:E.ENGINE_MAP.WebKit},T=O.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,x);return T&&(f.version=T),f}}],be.exports=Y.default}})},34761:(bt,be,Y)=>{var ie;function q(E){this.rand=E}if(bt.exports=function(d){return ie||(ie=new q(null)),ie.generate(d)},bt.exports.Rand=q,q.prototype.generate=function(d){return this._rand(d)},q.prototype._rand=function(d){if(this.rand.getBytes)return this.rand.getBytes(d);for(var x=new Uint8Array(d),f=0;f{var ie=Y(55859).Buffer;function q(T){ie.isBuffer(T)||(T=ie.from(T));for(var g=T.length/4|0,b=new Array(g),l=0;l>>24]^m[I>>>16&255]^_[P>>>8&255]^w[255&L]^g[j++],W=u[I>>>24]^m[P>>>16&255]^_[L>>>8&255]^w[255&S]^g[j++],G=u[P>>>24]^m[L>>>16&255]^_[S>>>8&255]^w[255&I]^g[j++],H=u[L>>>24]^m[S>>>16&255]^_[I>>>8&255]^w[255&P]^g[j++],S=V,I=W,P=G,L=H;return V=(l[S>>>24]<<24|l[I>>>16&255]<<16|l[P>>>8&255]<<8|l[255&L])^g[j++],W=(l[I>>>24]<<24|l[P>>>16&255]<<16|l[L>>>8&255]<<8|l[255&S])^g[j++],G=(l[P>>>24]<<24|l[L>>>16&255]<<16|l[S>>>8&255]<<8|l[255&I])^g[j++],H=(l[L>>>24]<<24|l[S>>>16&255]<<16|l[I>>>8&255]<<8|l[255&P])^g[j++],[V>>>=0,W>>>=0,G>>>=0,H>>>=0]}var d=[0,1,2,4,8,16,32,64,128,27,54],x=function(){for(var T=new Array(256),g=0;g<256;g++)T[g]=g<128?g<<1:g<<1^283;for(var b=[],l=[],h=[[],[],[],[]],u=[[],[],[],[]],m=0,_=0,w=0;w<256;++w){var S=_^_<<1^_<<2^_<<3^_<<4;b[m]=S=S>>>8^255&S^99,l[S]=m;var I=T[m],P=T[I],L=T[P],V=257*T[S]^16843008*S;h[0][m]=V<<24|V>>>8,h[1][m]=V<<16|V>>>16,h[2][m]=V<<8|V>>>24,h[3][m]=V,u[0][S]=(V=16843009*L^65537*P^257*I^16843008*m)<<24|V>>>8,u[1][S]=V<<16|V>>>16,u[2][S]=V<<8|V>>>24,u[3][S]=V,0===m?m=_=1:(m=I^T[T[T[L^I]]],_^=T[T[_]])}return{SBOX:b,INV_SBOX:l,SUB_MIX:h,INV_SUB_MIX:u}}();function f(T){this._key=q(T),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var T=this._key,g=T.length,b=g+6,l=4*(b+1),h=[],u=0;u>>24)>>>24]<<24|x.SBOX[m>>>16&255]<<16|x.SBOX[m>>>8&255]<<8|x.SBOX[255&m],m^=d[u/g|0]<<24):g>6&&u%g==4&&(m=x.SBOX[m>>>24]<<24|x.SBOX[m>>>16&255]<<16|x.SBOX[m>>>8&255]<<8|x.SBOX[255&m]),h[u]=h[u-g]^m}for(var _=[],w=0;w>>24]]^x.INV_SUB_MIX[1][x.SBOX[I>>>16&255]]^x.INV_SUB_MIX[2][x.SBOX[I>>>8&255]]^x.INV_SUB_MIX[3][x.SBOX[255&I]]}this._nRounds=b,this._keySchedule=h,this._invKeySchedule=_},f.prototype.encryptBlockRaw=function(T){return E(T=q(T),this._keySchedule,x.SUB_MIX,x.SBOX,this._nRounds)},f.prototype.encryptBlock=function(T){var g=this.encryptBlockRaw(T),b=ie.allocUnsafe(16);return b.writeUInt32BE(g[0],0),b.writeUInt32BE(g[1],4),b.writeUInt32BE(g[2],8),b.writeUInt32BE(g[3],12),b},f.prototype.decryptBlock=function(T){var g=(T=q(T))[1];T[1]=T[3],T[3]=g;var b=E(T,this._invKeySchedule,x.INV_SUB_MIX,x.INV_SBOX,this._nRounds),l=ie.allocUnsafe(16);return l.writeUInt32BE(b[0],0),l.writeUInt32BE(b[3],4),l.writeUInt32BE(b[2],8),l.writeUInt32BE(b[1],12),l},f.prototype.scrub=function(){O(this._keySchedule),O(this._invKeySchedule),O(this._key)},bt.exports.AES=f},90295:(bt,be,Y)=>{var ie=Y(30875),q=Y(55859).Buffer,O=Y(65834),E=Y(59879),d=Y(24504),x=Y(33910),f=Y(61643);function b(l,h,u,m){O.call(this);var _=q.alloc(4,0);this._cipher=new ie.AES(h);var w=this._cipher.encryptBlock(_);this._ghash=new d(w),u=function(l,h,u){if(12===h.length)return l._finID=q.concat([h,q.from([0,0,0,1])]),q.concat([h,q.from([0,0,0,2])]);var m=new d(u),_=h.length,w=_%16;m.update(h),w&&m.update(q.alloc(w=16-w,0)),m.update(q.alloc(8,0));var S=8*_,I=q.alloc(8);I.writeUIntBE(S,0,8),m.update(I),l._finID=m.state;var P=q.from(l._finID);return f(P),P}(this,u,w),this._prev=q.from(u),this._cache=q.allocUnsafe(0),this._secCache=q.allocUnsafe(0),this._decrypt=m,this._alen=0,this._len=0,this._mode=l,this._authTag=null,this._called=!1}E(b,O),b.prototype._update=function(l){if(!this._called&&this._alen){var h=16-this._alen%16;h<16&&(h=q.alloc(h,0),this._ghash.update(h))}this._called=!0;var u=this._mode.encrypt(this,l);return this._ghash.update(this._decrypt?l:u),this._len+=l.length,u},b.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var l=x(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(l,h){var u=0;l.length!==h.length&&u++;for(var m=Math.min(l.length,h.length),_=0;_{var ie=Y(66481),q=Y(63617),O=Y(44946);be.createCipher=be.Cipher=ie.createCipher,be.createCipheriv=be.Cipheriv=ie.createCipheriv,be.createDecipher=be.Decipher=q.createDecipher,be.createDecipheriv=be.Decipheriv=q.createDecipheriv,be.listCiphers=be.getCiphers=function(){return Object.keys(O)}},63617:(bt,be,Y)=>{var ie=Y(90295),q=Y(55859).Buffer,O=Y(49396),E=Y(49223),d=Y(65834),x=Y(30875),f=Y(92367);function g(m,_,w){d.call(this),this._cache=new b,this._last=void 0,this._cipher=new x.AES(_),this._prev=q.from(w),this._mode=m,this._autopadding=!0}function b(){this.cache=q.allocUnsafe(0)}function h(m,_,w){var S=O[m.toLowerCase()];if(!S)throw new TypeError("invalid suite type");if("string"==typeof w&&(w=q.from(w)),"GCM"!==S.mode&&w.length!==S.iv)throw new TypeError("invalid iv length "+w.length);if("string"==typeof _&&(_=q.from(_)),_.length!==S.key/8)throw new TypeError("invalid key length "+_.length);return"stream"===S.type?new E(S.module,_,w,!0):"auth"===S.type?new ie(S.module,_,w,!0):new g(S.module,_,w)}Y(59879)(g,d),g.prototype._update=function(m){this._cache.add(m);for(var _,w,S=[];_=this._cache.get(this._autopadding);)w=this._mode.decrypt(this,_),S.push(w);return q.concat(S)},g.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return function(m){var _=m[15];if(_<1||_>16)throw new Error("unable to decrypt data");for(var w=-1;++w<_;)if(m[w+(16-_)]!==_)throw new Error("unable to decrypt data");if(16!==_)return m.slice(0,16-_)}(this._mode.decrypt(this,m));if(m)throw new Error("data not multiple of block length")},g.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this},b.prototype.add=function(m){this.cache=q.concat([this.cache,m])},b.prototype.get=function(m){var _;if(m){if(this.cache.length>16)return _=this.cache.slice(0,16),this.cache=this.cache.slice(16),_}else if(this.cache.length>=16)return _=this.cache.slice(0,16),this.cache=this.cache.slice(16),_;return null},b.prototype.flush=function(){if(this.cache.length)return this.cache},be.createDecipher=function(m,_){var w=O[m.toLowerCase()];if(!w)throw new TypeError("invalid suite type");var S=f(_,!1,w.key,w.iv);return h(m,S.key,S.iv)},be.createDecipheriv=h},66481:(bt,be,Y)=>{var ie=Y(49396),q=Y(90295),O=Y(55859).Buffer,E=Y(49223),d=Y(65834),x=Y(30875),f=Y(92367);function g(m,_,w){d.call(this),this._cache=new l,this._cipher=new x.AES(_),this._prev=O.from(w),this._mode=m,this._autopadding=!0}Y(59879)(g,d),g.prototype._update=function(m){this._cache.add(m);for(var _,w,S=[];_=this._cache.get();)w=this._mode.encrypt(this,_),S.push(w);return O.concat(S)};var b=O.alloc(16,16);function l(){this.cache=O.allocUnsafe(0)}function h(m,_,w){var S=ie[m.toLowerCase()];if(!S)throw new TypeError("invalid suite type");if("string"==typeof _&&(_=O.from(_)),_.length!==S.key/8)throw new TypeError("invalid key length "+_.length);if("string"==typeof w&&(w=O.from(w)),"GCM"!==S.mode&&w.length!==S.iv)throw new TypeError("invalid iv length "+w.length);return"stream"===S.type?new E(S.module,_,w):"auth"===S.type?new q(S.module,_,w):new g(S.module,_,w)}g.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return m=this._mode.encrypt(this,m),this._cipher.scrub(),m;if(!m.equals(b))throw this._cipher.scrub(),new Error("data not multiple of block length")},g.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this},l.prototype.add=function(m){this.cache=O.concat([this.cache,m])},l.prototype.get=function(){if(this.cache.length>15){var m=this.cache.slice(0,16);return this.cache=this.cache.slice(16),m}return null},l.prototype.flush=function(){for(var m=16-this.cache.length,_=O.allocUnsafe(m),w=-1;++w{var ie=Y(55859).Buffer,q=ie.alloc(16,0);function E(x){var f=ie.allocUnsafe(16);return f.writeUInt32BE(x[0]>>>0,0),f.writeUInt32BE(x[1]>>>0,4),f.writeUInt32BE(x[2]>>>0,8),f.writeUInt32BE(x[3]>>>0,12),f}function d(x){this.h=x,this.state=ie.alloc(16,0),this.cache=ie.allocUnsafe(0)}d.prototype.ghash=function(x){for(var f=-1;++f0;T--)x[T]=x[T]>>>1|(1&x[T-1])<<31;x[0]=x[0]>>>1,b&&(x[0]=x[0]^225<<24)}this.state=E(f)},d.prototype.update=function(x){this.cache=ie.concat([this.cache,x]);for(var f;this.cache.length>=16;)f=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(f)},d.prototype.final=function(x,f){return this.cache.length&&this.ghash(ie.concat([this.cache,q],16)),this.ghash(E([0,x,0,f])),this.state},bt.exports=d},61643:bt=>{bt.exports=function(Y){for(var q,ie=Y.length;ie--;){if(255!==(q=Y.readUInt8(ie))){q++,Y.writeUInt8(q,ie);break}Y.writeUInt8(0,ie)}}},64552:(bt,be,Y)=>{var ie=Y(33910);be.encrypt=function(q,O){var E=ie(O,q._prev);return q._prev=q._cipher.encryptBlock(E),q._prev},be.decrypt=function(q,O){var E=q._prev;q._prev=O;var d=q._cipher.decryptBlock(O);return ie(d,E)}},97606:(bt,be,Y)=>{var ie=Y(55859).Buffer,q=Y(33910);function O(E,d,x){var f=d.length,T=q(d,E._cache);return E._cache=E._cache.slice(f),E._prev=ie.concat([E._prev,x?d:T]),T}be.encrypt=function(E,d,x){for(var T,f=ie.allocUnsafe(0);d.length;){if(0===E._cache.length&&(E._cache=E._cipher.encryptBlock(E._prev),E._prev=ie.allocUnsafe(0)),!(E._cache.length<=d.length)){f=ie.concat([f,O(E,d,x)]);break}f=ie.concat([f,O(E,d.slice(0,T=E._cache.length),x)]),d=d.slice(T)}return f}},47850:(bt,be,Y)=>{var ie=Y(55859).Buffer;function q(E,d,x){for(var l,h,T=-1,b=0;++T<8;)b+=(128&(h=E._cipher.encryptBlock(E._prev)[0]^(l=d&1<<7-T?128:0)))>>T%8,E._prev=O(E._prev,x?l:h);return b}function O(E,d){var x=E.length,f=-1,T=ie.allocUnsafe(E.length);for(E=ie.concat([E,ie.from([d])]);++f>7;return T}be.encrypt=function(E,d,x){for(var f=d.length,T=ie.allocUnsafe(f),g=-1;++g{var ie=Y(55859).Buffer;function q(O,E,d){var f=O._cipher.encryptBlock(O._prev)[0]^E;return O._prev=ie.concat([O._prev.slice(1),ie.from([d?E:f])]),f}be.encrypt=function(O,E,d){for(var x=E.length,f=ie.allocUnsafe(x),T=-1;++T{var ie=Y(33910),q=Y(55859).Buffer,O=Y(61643);function E(x){var f=x._cipher.encryptBlockRaw(x._prev);return O(x._prev),f}be.encrypt=function(x,f){var T=Math.ceil(f.length/16),g=x._cache.length;x._cache=q.concat([x._cache,q.allocUnsafe(16*T)]);for(var b=0;b{be.encrypt=function(Y,ie){return Y._cipher.encryptBlock(ie)},be.decrypt=function(Y,ie){return Y._cipher.decryptBlock(ie)}},49396:(bt,be,Y)=>{var ie={ECB:Y(48562),CBC:Y(64552),CFB:Y(97606),CFB8:Y(56377),CFB1:Y(47850),OFB:Y(87461),CTR:Y(29306),GCM:Y(29306)},q=Y(44946);for(var O in q)q[O].module=ie[q[O].mode];bt.exports=q},87461:(bt,be,Y)=>{var ie=Y(33910);function q(O){return O._prev=O._cipher.encryptBlock(O._prev),O._prev}be.encrypt=function(O,E){for(;O._cache.length{var ie=Y(30875),q=Y(55859).Buffer,O=Y(65834);function d(x,f,T,g){O.call(this),this._cipher=new ie.AES(f),this._prev=q.from(T),this._cache=q.allocUnsafe(0),this._secCache=q.allocUnsafe(0),this._decrypt=g,this._mode=x}Y(59879)(d,O),d.prototype._update=function(x){return this._mode.encrypt(this,x,this._decrypt)},d.prototype._final=function(){this._cipher.scrub()},bt.exports=d},37991:(bt,be,Y)=>{var ie=Y(33796),q=Y(39586),O=Y(49396),E=Y(83908),d=Y(92367);function T(l,h,u){if(l=l.toLowerCase(),O[l])return q.createCipheriv(l,h,u);if(E[l])return new ie({key:h,iv:u,mode:l});throw new TypeError("invalid suite type")}function g(l,h,u){if(l=l.toLowerCase(),O[l])return q.createDecipheriv(l,h,u);if(E[l])return new ie({key:h,iv:u,mode:l,decrypt:!0});throw new TypeError("invalid suite type")}be.createCipher=be.Cipher=function(l,h){var u,m;if(l=l.toLowerCase(),O[l])u=O[l].key,m=O[l].iv;else{if(!E[l])throw new TypeError("invalid suite type");u=8*E[l].key,m=E[l].iv}var _=d(h,!1,u,m);return T(l,_.key,_.iv)},be.createCipheriv=be.Cipheriv=T,be.createDecipher=be.Decipher=function(l,h){var u,m;if(l=l.toLowerCase(),O[l])u=O[l].key,m=O[l].iv;else{if(!E[l])throw new TypeError("invalid suite type");u=8*E[l].key,m=E[l].iv}var _=d(h,!1,u,m);return g(l,_.key,_.iv)},be.createDecipheriv=be.Decipheriv=g,be.listCiphers=be.getCiphers=function(){return Object.keys(E).concat(q.getCiphers())}},33796:(bt,be,Y)=>{var ie=Y(65834),q=Y(68534),O=Y(59879),E=Y(55859).Buffer,d={"des-ede3-cbc":q.CBC.instantiate(q.EDE),"des-ede3":q.EDE,"des-ede-cbc":q.CBC.instantiate(q.EDE),"des-ede":q.EDE,"des-cbc":q.CBC.instantiate(q.DES),"des-ecb":q.DES};function x(f){ie.call(this);var b,T=f.mode.toLowerCase(),g=d[T];b=f.decrypt?"decrypt":"encrypt";var l=f.key;E.isBuffer(l)||(l=E.from(l)),("des-ede"===T||"des-ede-cbc"===T)&&(l=E.concat([l,l.slice(0,8)]));var h=f.iv;E.isBuffer(h)||(h=E.from(h)),this._des=g.create({key:l,iv:h,type:b})}d.des=d["des-cbc"],d.des3=d["des-ede3-cbc"],bt.exports=x,O(x,ie),x.prototype._update=function(f){return E.from(this._des.update(f))},x.prototype._final=function(){return E.from(this._des.final())}},83908:(bt,be)=>{be["des-ecb"]={key:8,iv:0},be["des-cbc"]=be.des={key:8,iv:8},be["des-ede3-cbc"]=be.des3={key:24,iv:8},be["des-ede3"]={key:24,iv:0},be["des-ede-cbc"]={key:16,iv:8},be["des-ede"]={key:16,iv:0}},85842:(bt,be,Y)=>{var ie=Y(62630),q=Y(16589);function E(x){var T,f=x.modulus.byteLength();do{T=new ie(q(f))}while(T.cmp(x.modulus)>=0||!T.umod(x.prime1)||!T.umod(x.prime2));return T}function d(x,f){var T=function(x){var f=E(x);return{blinder:f.toRed(ie.mont(x.modulus)).redPow(new ie(x.publicExponent)).fromRed(),unblinder:f.invm(x.modulus)}}(f),g=f.modulus.byteLength(),b=new ie(x).mul(T.blinder).umod(f.modulus),l=b.toRed(ie.mont(f.prime1)),h=b.toRed(ie.mont(f.prime2)),u=f.coefficient,m=f.prime1,_=f.prime2,w=l.redPow(f.exponent1).fromRed(),S=h.redPow(f.exponent2).fromRed(),I=w.isub(S).imul(u).umod(m).imul(_);return S.iadd(I).imul(T.unblinder).umod(f.modulus).toArrayLike(Buffer,"be",g)}d.getr=E,bt.exports=d},6380:(bt,be,Y)=>{bt.exports=Y(8770)},23566:(bt,be,Y)=>{var ie=Y(55859).Buffer,q=Y(12506),O=Y(18300),E=Y(59879),d=Y(7052),x=Y(48022),f=Y(8770);function T(h){O.Writable.call(this);var u=f[h];if(!u)throw new Error("Unknown message digest");this._hashType=u.hash,this._hash=q(u.hash),this._tag=u.id,this._signType=u.sign}function g(h){O.Writable.call(this);var u=f[h];if(!u)throw new Error("Unknown message digest");this._hash=q(u.hash),this._tag=u.id,this._signType=u.sign}function b(h){return new T(h)}function l(h){return new g(h)}Object.keys(f).forEach(function(h){f[h].id=ie.from(f[h].id,"hex"),f[h.toLowerCase()]=f[h]}),E(T,O.Writable),T.prototype._write=function(u,m,_){this._hash.update(u),_()},T.prototype.update=function(u,m){return"string"==typeof u&&(u=ie.from(u,m)),this._hash.update(u),this},T.prototype.sign=function(u,m){this.end();var _=this._hash.digest(),w=d(_,u,this._hashType,this._signType,this._tag);return m?w.toString(m):w},E(g,O.Writable),g.prototype._write=function(u,m,_){this._hash.update(u),_()},g.prototype.update=function(u,m){return"string"==typeof u&&(u=ie.from(u,m)),this._hash.update(u),this},g.prototype.verify=function(u,m,_){"string"==typeof m&&(m=ie.from(m,_)),this.end();var w=this._hash.digest();return x(m,w,u,this._signType,this._tag)},bt.exports={Sign:b,Verify:l,createSign:b,createVerify:l}},7052:(bt,be,Y)=>{var ie=Y(55859).Buffer,q=Y(85903),O=Y(85842),E=Y(5247).ec,d=Y(62630),x=Y(81997),f=Y(1308);function h(S,I,P,L){if((S=ie.from(S.toArray())).length0&&P.ishrn(L),P}function _(S,I,P){var L,V;do{for(L=ie.alloc(0);8*L.length{var ie=Y(55859).Buffer,q=Y(62630),O=Y(5247).ec,E=Y(81997),d=Y(1308);function g(b,l){if(b.cmpn(0)<=0)throw new Error("invalid sig");if(b.cmp(l)>=l)throw new Error("invalid sig")}bt.exports=function(b,l,h,u,m){var _=E(h);if("ec"===_.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(b,l,h){var u=d[h.data.algorithm.curve.join(".")];if(!u)throw new Error("unknown curve "+h.data.algorithm.curve.join("."));return new O(u).verify(l,b,h.data.subjectPrivateKey.data)}(b,l,_)}if("dsa"===_.type){if("dsa"!==u)throw new Error("wrong public key type");return function(b,l,h){var u=h.data.p,m=h.data.q,_=h.data.g,w=h.data.pub_key,S=E.signature.decode(b,"der"),I=S.s,P=S.r;g(I,m),g(P,m);var L=q.mont(u),V=I.invm(m);return 0===_.toRed(L).redPow(new q(l).mul(V).mod(m)).fromRed().mul(w.toRed(L).redPow(P.mul(V).mod(m)).fromRed()).mod(u).mod(m).cmp(P)}(b,l,_)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");l=ie.concat([m,l]);for(var w=_.modulus.byteLength(),S=[1],I=0;l.length+S.length+2{bt.exports=function(Y,ie){for(var q=Math.min(Y.length,ie.length),O=new Buffer(q),E=0;E{"use strict";var ie=Y(96434),q=Y(12658),O="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;be.Buffer=f,be.SlowBuffer=function(ke){return+ke!=ke&&(ke=0),f.alloc(+ke)},be.INSPECT_MAX_BYTES=50;var E=2147483647;function x(ke){if(ke>E)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var me=new Uint8Array(ke);return Object.setPrototypeOf(me,f.prototype),me}function f(ke,me,Ee){if("number"==typeof ke){if("string"==typeof me)throw new TypeError('The "string" argument must be of type string. Received type number');return l(ke)}return T(ke,me,Ee)}function T(ke,me,Ee){if("string"==typeof ke)return function(ke,me){if(("string"!=typeof me||""===me)&&(me="utf8"),!f.isEncoding(me))throw new TypeError("Unknown encoding: "+me);var Ee=0|P(ke,me),ze=x(Ee),Ve=ze.write(ke,me);return Ve!==Ee&&(ze=ze.slice(0,Ve)),ze}(ke,me);if(ArrayBuffer.isView(ke))return function(ke){if(_e(ke,Uint8Array)){var me=new Uint8Array(ke);return _(me.buffer,me.byteOffset,me.byteLength)}return u(ke)}(ke);if(null==ke)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(_e(ke,ArrayBuffer)||ke&&_e(ke.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(_e(ke,SharedArrayBuffer)||ke&&_e(ke.buffer,SharedArrayBuffer)))return _(ke,me,Ee);if("number"==typeof ke)throw new TypeError('The "value" argument must not be of type number. Received type number');var ze=ke.valueOf&&ke.valueOf();if(null!=ze&&ze!==ke)return f.from(ze,me,Ee);var Ve=function(ke){if(f.isBuffer(ke)){var me=0|S(ke.length),Ee=x(me);return 0===Ee.length||ke.copy(Ee,0,0,me),Ee}return void 0!==ke.length?"number"!=typeof ke.length||xe(ke.length)?x(0):u(ke):"Buffer"===ke.type&&Array.isArray(ke.data)?u(ke.data):void 0}(ke);if(Ve)return Ve;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof ke[Symbol.toPrimitive])return f.from(ke[Symbol.toPrimitive]("string"),me,Ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}function g(ke){if("number"!=typeof ke)throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function l(ke){return g(ke),x(ke<0?0:0|S(ke))}function u(ke){for(var me=ke.length<0?0:0|S(ke.length),Ee=x(me),ze=0;ze=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return 0|ke}function P(ke,me){if(f.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||_e(ke,ArrayBuffer))return ke.byteLength;if("string"!=typeof ke)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var Ee=ke.length,ze=arguments.length>2&&!0===arguments[2];if(!ze&&0===Ee)return 0;for(var Ve=!1;;)switch(me){case"ascii":case"latin1":case"binary":return Ee;case"utf8":case"utf-8":return Te(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ee;case"hex":return Ee>>>1;case"base64":return ne(ke).length;default:if(Ve)return ze?-1:Te(ke).length;me=(""+me).toLowerCase(),Ve=!0}}function L(ke,me,Ee){var ze=!1;if((void 0===me||me<0)&&(me=0),me>this.length||((void 0===Ee||Ee>this.length)&&(Ee=this.length),Ee<=0)||(Ee>>>=0)<=(me>>>=0))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return C(this,me,Ee);case"utf8":case"utf-8":return M(this,me,Ee);case"ascii":return D(this,me,Ee);case"latin1":case"binary":return N(this,me,Ee);case"base64":return y(this,me,Ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,me,Ee);default:if(ze)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ze=!0}}function V(ke,me,Ee){var ze=ke[me];ke[me]=ke[Ee],ke[Ee]=ze}function W(ke,me,Ee,ze,Ve){if(0===ke.length)return-1;if("string"==typeof Ee?(ze=Ee,Ee=0):Ee>2147483647?Ee=2147483647:Ee<-2147483648&&(Ee=-2147483648),xe(Ee=+Ee)&&(Ee=Ve?0:ke.length-1),Ee<0&&(Ee=ke.length+Ee),Ee>=ke.length){if(Ve)return-1;Ee=ke.length-1}else if(Ee<0){if(!Ve)return-1;Ee=0}if("string"==typeof me&&(me=f.from(me,ze)),f.isBuffer(me))return 0===me.length?-1:G(ke,me,Ee,ze,Ve);if("number"==typeof me)return me&=255,"function"==typeof Uint8Array.prototype.indexOf?Ve?Uint8Array.prototype.indexOf.call(ke,me,Ee):Uint8Array.prototype.lastIndexOf.call(ke,me,Ee):G(ke,[me],Ee,ze,Ve);throw new TypeError("val must be string, number or Buffer")}function G(ke,me,Ee,ze,Ve){var wt,nt=1,tt=ke.length,mt=me.length;if(void 0!==ze&&("ucs2"===(ze=String(ze).toLowerCase())||"ucs-2"===ze||"utf16le"===ze||"utf-16le"===ze)){if(ke.length<2||me.length<2)return-1;nt=2,tt/=2,mt/=2,Ee/=2}function ht(gt,St){return 1===nt?gt[St]:gt.readUInt16BE(St*nt)}if(Ve){var Pt=-1;for(wt=Ee;wttt&&(Ee=tt-mt),wt=Ee;wt>=0;wt--){for(var st=!0,Ye=0;YeVe&&(ze=Ve):ze=Ve;var nt=me.length;ze>nt/2&&(ze=nt/2);for(var tt=0;tt>8,nt.push(Ee%256),nt.push(ze);return nt}(me,ke.length-Ee),ke,Ee,ze)}function y(ke,me,Ee){return ie.fromByteArray(0===me&&Ee===ke.length?ke:ke.slice(me,Ee))}function M(ke,me,Ee){Ee=Math.min(ke.length,Ee);for(var ze=[],Ve=me;Ve239?4:nt>223?3:nt>191?2:1;if(Ve+mt<=Ee)switch(mt){case 1:nt<128&&(tt=nt);break;case 2:128==(192&(ht=ke[Ve+1]))&&(st=(31&nt)<<6|63&ht)>127&&(tt=st);break;case 3:wt=ke[Ve+2],128==(192&(ht=ke[Ve+1]))&&128==(192&wt)&&(st=(15&nt)<<12|(63&ht)<<6|63&wt)>2047&&(st<55296||st>57343)&&(tt=st);break;case 4:wt=ke[Ve+2],Pt=ke[Ve+3],128==(192&(ht=ke[Ve+1]))&&128==(192&wt)&&128==(192&Pt)&&(st=(15&nt)<<18|(63&ht)<<12|(63&wt)<<6|63&Pt)>65535&&st<1114112&&(tt=st)}null===tt?(tt=65533,mt=1):tt>65535&&(ze.push((tt-=65536)>>>10&1023|55296),tt=56320|1023&tt),ze.push(tt),Ve+=mt}return function(ke){var me=ke.length;if(me<=v)return String.fromCharCode.apply(String,ke);for(var Ee="",ze=0;zeVe.length?f.from(tt).copy(Ve,nt):Uint8Array.prototype.set.call(Ve,tt,nt);else{if(!f.isBuffer(tt))throw new TypeError('"list" argument must be an Array of Buffers');tt.copy(Ve,nt)}nt+=tt.length}return Ve},f.byteLength=P,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var me=this.length;if(me%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ee=0;EeEe&&(me+=" ... "),""},O&&(f.prototype[O]=f.prototype.inspect),f.prototype.compare=function(me,Ee,ze,Ve,nt){if(_e(me,Uint8Array)&&(me=f.from(me,me.offset,me.byteLength)),!f.isBuffer(me))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof me);if(void 0===Ee&&(Ee=0),void 0===ze&&(ze=me?me.length:0),void 0===Ve&&(Ve=0),void 0===nt&&(nt=this.length),Ee<0||ze>me.length||Ve<0||nt>this.length)throw new RangeError("out of range index");if(Ve>=nt&&Ee>=ze)return 0;if(Ve>=nt)return-1;if(Ee>=ze)return 1;if(this===me)return 0;for(var tt=(nt>>>=0)-(Ve>>>=0),mt=(ze>>>=0)-(Ee>>>=0),ht=Math.min(tt,mt),wt=this.slice(Ve,nt),Pt=me.slice(Ee,ze),st=0;st>>=0,isFinite(ze)?(ze>>>=0,void 0===Ve&&(Ve="utf8")):(Ve=ze,ze=void 0)}var nt=this.length-Ee;if((void 0===ze||ze>nt)&&(ze=nt),me.length>0&&(ze<0||Ee<0)||Ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");for(var tt=!1;;)switch(Ve){case"hex":return H(this,me,Ee,ze);case"utf8":case"utf-8":return j(this,me,Ee,ze);case"ascii":case"latin1":case"binary":return K(this,me,Ee,ze);case"base64":return R(this,me,Ee,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,me,Ee,ze);default:if(tt)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).toLowerCase(),tt=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var v=4096;function D(ke,me,Ee){var ze="";Ee=Math.min(ke.length,Ee);for(var Ve=me;Veze)&&(Ee=ze);for(var Ve="",nt=me;ntEe)throw new RangeError("Trying to access beyond buffer length")}function Q(ke,me,Ee,ze,Ve,nt){if(!f.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(me>Ve||meke.length)throw new RangeError("Index out of range")}function ee(ke,me,Ee,ze,Ve,nt){if(Ee+ze>ke.length)throw new RangeError("Index out of range");if(Ee<0)throw new RangeError("Index out of range")}function ce(ke,me,Ee,ze,Ve){return me=+me,Ee>>>=0,Ve||ee(ke,0,Ee,4),q.write(ke,me,Ee,ze,23,4),Ee+4}function ue(ke,me,Ee,ze,Ve){return me=+me,Ee>>>=0,Ve||ee(ke,0,Ee,8),q.write(ke,me,Ee,ze,52,8),Ee+8}f.prototype.slice=function(me,Ee){var ze=this.length;(me=~~me)<0?(me+=ze)<0&&(me=0):me>ze&&(me=ze),(Ee=void 0===Ee?ze:~~Ee)<0?(Ee+=ze)<0&&(Ee=0):Ee>ze&&(Ee=ze),Ee>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=this[me],nt=1,tt=0;++tt>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=this[me+--Ee],nt=1;Ee>0&&(nt*=256);)Ve+=this[me+--Ee]*nt;return Ve},f.prototype.readUint8=f.prototype.readUInt8=function(me,Ee){return me>>>=0,Ee||B(me,1,this.length),this[me]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(me,Ee){return me>>>=0,Ee||B(me,2,this.length),this[me]|this[me+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(me,Ee){return me>>>=0,Ee||B(me,2,this.length),this[me]<<8|this[me+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),(this[me]|this[me+1]<<8|this[me+2]<<16)+16777216*this[me+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),16777216*this[me]+(this[me+1]<<16|this[me+2]<<8|this[me+3])},f.prototype.readIntLE=function(me,Ee,ze){me>>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=this[me],nt=1,tt=0;++tt=(nt*=128)&&(Ve-=Math.pow(2,8*Ee)),Ve},f.prototype.readIntBE=function(me,Ee,ze){me>>>=0,Ee>>>=0,ze||B(me,Ee,this.length);for(var Ve=Ee,nt=1,tt=this[me+--Ve];Ve>0&&(nt*=256);)tt+=this[me+--Ve]*nt;return tt>=(nt*=128)&&(tt-=Math.pow(2,8*Ee)),tt},f.prototype.readInt8=function(me,Ee){return me>>>=0,Ee||B(me,1,this.length),128&this[me]?-1*(255-this[me]+1):this[me]},f.prototype.readInt16LE=function(me,Ee){me>>>=0,Ee||B(me,2,this.length);var ze=this[me]|this[me+1]<<8;return 32768&ze?4294901760|ze:ze},f.prototype.readInt16BE=function(me,Ee){me>>>=0,Ee||B(me,2,this.length);var ze=this[me+1]|this[me]<<8;return 32768&ze?4294901760|ze:ze},f.prototype.readInt32LE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),this[me]|this[me+1]<<8|this[me+2]<<16|this[me+3]<<24},f.prototype.readInt32BE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),this[me]<<24|this[me+1]<<16|this[me+2]<<8|this[me+3]},f.prototype.readFloatLE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),q.read(this,me,!0,23,4)},f.prototype.readFloatBE=function(me,Ee){return me>>>=0,Ee||B(me,4,this.length),q.read(this,me,!1,23,4)},f.prototype.readDoubleLE=function(me,Ee){return me>>>=0,Ee||B(me,8,this.length),q.read(this,me,!0,52,8)},f.prototype.readDoubleBE=function(me,Ee){return me>>>=0,Ee||B(me,8,this.length),q.read(this,me,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(me,Ee,ze,Ve){me=+me,Ee>>>=0,ze>>>=0,Ve||Q(this,me,Ee,ze,Math.pow(2,8*ze)-1,0);var tt=1,mt=0;for(this[Ee]=255&me;++mt>>=0,ze>>>=0,Ve||Q(this,me,Ee,ze,Math.pow(2,8*ze)-1,0);var tt=ze-1,mt=1;for(this[Ee+tt]=255&me;--tt>=0&&(mt*=256);)this[Ee+tt]=me/mt&255;return Ee+ze},f.prototype.writeUint8=f.prototype.writeUInt8=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,1,255,0),this[Ee]=255&me,Ee+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,65535,0),this[Ee]=255&me,this[Ee+1]=me>>>8,Ee+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,65535,0),this[Ee]=me>>>8,this[Ee+1]=255&me,Ee+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,4294967295,0),this[Ee+3]=me>>>24,this[Ee+2]=me>>>16,this[Ee+1]=me>>>8,this[Ee]=255&me,Ee+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,4294967295,0),this[Ee]=me>>>24,this[Ee+1]=me>>>16,this[Ee+2]=me>>>8,this[Ee+3]=255&me,Ee+4},f.prototype.writeIntLE=function(me,Ee,ze,Ve){if(me=+me,Ee>>>=0,!Ve){var nt=Math.pow(2,8*ze-1);Q(this,me,Ee,ze,nt-1,-nt)}var tt=0,mt=1,ht=0;for(this[Ee]=255&me;++tt>0)-ht&255;return Ee+ze},f.prototype.writeIntBE=function(me,Ee,ze,Ve){if(me=+me,Ee>>>=0,!Ve){var nt=Math.pow(2,8*ze-1);Q(this,me,Ee,ze,nt-1,-nt)}var tt=ze-1,mt=1,ht=0;for(this[Ee+tt]=255&me;--tt>=0&&(mt*=256);)me<0&&0===ht&&0!==this[Ee+tt+1]&&(ht=1),this[Ee+tt]=(me/mt>>0)-ht&255;return Ee+ze},f.prototype.writeInt8=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,1,127,-128),me<0&&(me=255+me+1),this[Ee]=255&me,Ee+1},f.prototype.writeInt16LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,32767,-32768),this[Ee]=255&me,this[Ee+1]=me>>>8,Ee+2},f.prototype.writeInt16BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,2,32767,-32768),this[Ee]=me>>>8,this[Ee+1]=255&me,Ee+2},f.prototype.writeInt32LE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,2147483647,-2147483648),this[Ee]=255&me,this[Ee+1]=me>>>8,this[Ee+2]=me>>>16,this[Ee+3]=me>>>24,Ee+4},f.prototype.writeInt32BE=function(me,Ee,ze){return me=+me,Ee>>>=0,ze||Q(this,me,Ee,4,2147483647,-2147483648),me<0&&(me=4294967295+me+1),this[Ee]=me>>>24,this[Ee+1]=me>>>16,this[Ee+2]=me>>>8,this[Ee+3]=255&me,Ee+4},f.prototype.writeFloatLE=function(me,Ee,ze){return ce(this,me,Ee,!0,ze)},f.prototype.writeFloatBE=function(me,Ee,ze){return ce(this,me,Ee,!1,ze)},f.prototype.writeDoubleLE=function(me,Ee,ze){return ue(this,me,Ee,!0,ze)},f.prototype.writeDoubleBE=function(me,Ee,ze){return ue(this,me,Ee,!1,ze)},f.prototype.copy=function(me,Ee,ze,Ve){if(!f.isBuffer(me))throw new TypeError("argument should be a Buffer");if(ze||(ze=0),!Ve&&0!==Ve&&(Ve=this.length),Ee>=me.length&&(Ee=me.length),Ee||(Ee=0),Ve>0&&Ve=this.length)throw new RangeError("Index out of range");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),me.length-Ee>>=0,ze=void 0===ze?this.length:ze>>>0,me||(me=0),"number"==typeof me)for(tt=Ee;tt55295&&Ee<57344){if(!Ve){if(Ee>56319){(me-=3)>-1&&nt.push(239,191,189);continue}if(tt+1===ze){(me-=3)>-1&&nt.push(239,191,189);continue}Ve=Ee;continue}if(Ee<56320){(me-=3)>-1&&nt.push(239,191,189),Ve=Ee;continue}Ee=65536+(Ve-55296<<10|Ee-56320)}else Ve&&(me-=3)>-1&&nt.push(239,191,189);if(Ve=null,Ee<128){if((me-=1)<0)break;nt.push(Ee)}else if(Ee<2048){if((me-=2)<0)break;nt.push(Ee>>6|192,63&Ee|128)}else if(Ee<65536){if((me-=3)<0)break;nt.push(Ee>>12|224,Ee>>6&63|128,63&Ee|128)}else{if(!(Ee<1114112))throw new Error("Invalid code point");if((me-=4)<0)break;nt.push(Ee>>18|240,Ee>>12&63|128,Ee>>6&63|128,63&Ee|128)}}return nt}function ne(ke){return ie.toByteArray(function(ke){if((ke=(ke=ke.split("=")[0]).trim().replace(we,"")).length<2)return"";for(;ke.length%4!=0;)ke+="=";return ke}(ke))}function pe(ke,me,Ee,ze){for(var Ve=0;Ve=me.length||Ve>=ke.length);++Ve)me[Ve+Ee]=ke[Ve];return Ve}function _e(ke,me){return ke instanceof me||null!=ke&&null!=ke.constructor&&null!=ke.constructor.name&&ke.constructor.name===me.name}function xe(ke){return ke!=ke}var Ce=function(){for(var ke="0123456789abcdef",me=new Array(256),Ee=0;Ee<16;++Ee)for(var ze=16*Ee,Ve=0;Ve<16;++Ve)me[ze+Ve]=ke[Ee]+ke[Ve];return me}()},19568:(bt,be,Y)=>{"use strict";var ie=Y(18540),q=Y(60044),O=q(ie("String.prototype.indexOf"));bt.exports=function(d,x){var f=ie(d,!!x);return"function"==typeof f&&O(d,".prototype.")>-1?q(f):f}},60044:(bt,be,Y)=>{"use strict";var ie=Y(75396),q=Y(18540),O=q("%Function.prototype.apply%"),E=q("%Function.prototype.call%"),d=q("%Reflect.apply%",!0)||ie.call(E,O),x=q("%Object.getOwnPropertyDescriptor%",!0),f=q("%Object.defineProperty%",!0),T=q("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}bt.exports=function(l){var h=d(ie,E,arguments);if(x&&f){var u=x(h,"length");u.configurable&&f(h,"length",{value:1+T(0,l.length-(arguments.length-1))})}return h};var g=function(){return d(ie,O,arguments)};f?f(bt.exports,"apply",{value:g}):bt.exports.apply=g},65834:(bt,be,Y)=>{var ie=Y(55859).Buffer,q=Y(36917).Transform,O=Y(32519).s;function d(x){q.call(this),this.hashMode="string"==typeof x,this.hashMode?this[x]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Y(59879)(d,q),d.prototype.update=function(x,f,T){"string"==typeof x&&(x=ie.from(x,f));var g=this._update(x);return this.hashMode?this:(T&&(g=this._toString(g,T)),g)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(x,f,T){var g;try{this.hashMode?this._update(x):this.push(this._update(x))}catch(b){g=b}finally{T(g)}},d.prototype._flush=function(x){var f;try{this.push(this.__final())}catch(T){f=T}x(f)},d.prototype._finalOrDigest=function(x){var f=this.__final()||ie.alloc(0);return x&&(f=this._toString(f,x,!0)),f},d.prototype._toString=function(x,f,T){if(this._decoder||(this._decoder=new O(f),this._encoding=f),this._encoding!==f)throw new Error("can't switch encodings");var g=this._decoder.write(x);return T&&(g+=this._decoder.end()),g},bt.exports=d},84892:(bt,be,Y)=>{var ie=Y(5247),q=Y(96479);bt.exports=function(f){return new E(f)};var O={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function E(x){this.curveType=O[x],this.curveType||(this.curveType={name:x}),this.curve=new ie.ec(this.curveType.name),this.keys=void 0}function d(x,f,T){Array.isArray(x)||(x=x.toArray());var g=new Buffer(x);if(T&&g.length=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Jr=0|k[3],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|k[4],zn=8191&Wr,bn=Wr>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,zn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,zn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,zn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,zn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,zn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,zn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,zn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,zn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,zn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,zn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,zn),a=(a=Math.imul(St,bn))+Math.imul(Wt,zn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},12506:(bt,be,Y)=>{"use strict";var ie=Y(59879),q=Y(53264),O=Y(75207),E=Y(45829),d=Y(65834);function x(f){d.call(this,"digest"),this._hash=f}ie(x,d),x.prototype._update=function(f){this._hash.update(f)},x.prototype._final=function(){return this._hash.digest()},bt.exports=function(T){return"md5"===(T=T.toLowerCase())?new q:"rmd160"===T||"ripemd160"===T?new O:new x(E(T))}},84464:(bt,be,Y)=>{var ie=Y(53264);bt.exports=function(q){return(new ie).update(q).digest()}},85903:(bt,be,Y)=>{"use strict";var ie=Y(59879),q=Y(43715),O=Y(65834),E=Y(55859).Buffer,d=Y(84464),x=Y(75207),f=Y(45829),T=E.alloc(128);function g(b,l){O.call(this,"digest"),"string"==typeof l&&(l=E.from(l));var h="sha512"===b||"sha384"===b?128:64;this._alg=b,this._key=l,l.length>h?l=("rmd160"===b?new x:f(b)).update(l).digest():l.length{"use strict";var ie=Y(59879),q=Y(55859).Buffer,O=Y(65834),E=q.alloc(128),d=64;function x(f,T){O.call(this,"digest"),"string"==typeof T&&(T=q.from(T)),this._alg=f,this._key=T,T.length>d?T=f(T):T.length-1};function b(y){if("string"!=typeof y&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function l(y){return"string"!=typeof y&&(y=String(y)),y}function h(y){var M={next:function(){var v=y.shift();return{done:void 0===v,value:v}}};return x_iterable&&(M[Symbol.iterator]=function(){return M}),M}function u(y){this.map={},y instanceof u?y.forEach(function(M,v){this.append(v,M)},this):Array.isArray(y)?y.forEach(function(M){this.append(M[0],M[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(M){this.append(M,y[M])},this)}function m(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function _(y){return new Promise(function(M,v){y.onload=function(){M(y.result)},y.onerror=function(){v(y.error)}})}function w(y){var M=new FileReader,v=_(M);return M.readAsArrayBuffer(y),v}function P(y){if(y.slice)return y.slice(0);var M=new Uint8Array(y.byteLength);return M.set(new Uint8Array(y)),M.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(y){this._bodyInit=y,y?"string"==typeof y?this._bodyText=y:x_blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:x_formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:x_searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():x_arrayBuffer&&x_blob&&function(y){return y&&DataView.prototype.isPrototypeOf(y)}(y)?(this._bodyArrayBuffer=P(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):x_arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||g(y))?this._bodyArrayBuffer=P(y):this._bodyText=y=Object.prototype.toString.call(y):this._bodyText="",this.headers.get("content-type")||("string"==typeof y?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):x_searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},x_blob&&(this.blob=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(w)}),this.text=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return function(y){var M=new FileReader,v=_(M);return M.readAsText(y),v}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(y){for(var M=new Uint8Array(y),v=new Array(M.length),k=0;k-1?M:y}(M.method||this.method||"GET"),this.mode=M.mode||this.mode||null,this.signal=M.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&v)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(v)}function H(y){var M=new FormData;return y.trim().split("&").forEach(function(v){if(v){var k=v.split("="),D=k.shift().replace(/\+/g," "),N=k.join("=").replace(/\+/g," ");M.append(decodeURIComponent(D),decodeURIComponent(N))}}),M}function j(y){var M=new u;return y.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(k){var D=k.split(":"),N=D.shift().trim();if(N){var C=D.join(":").trim();M.append(N,C)}}),M}function K(y,M){M||(M={}),this.type="default",this.status=void 0===M.status?200:M.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in M?M.statusText:"OK",this.headers=new u(M.headers),this.url=M.url||"",this._initBody(y)}G.prototype.clone=function(){return new G(this,{body:this._bodyInit})},L.call(G.prototype),L.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},K.error=function(){var y=new K(null,{status:0,statusText:""});return y.type="error",y};var R=[301,302,303,307,308];K.redirect=function(y,M){if(-1===R.indexOf(M))throw new RangeError("Invalid status code");return new K(null,{status:M,headers:{location:y}})},d.DOMException=O.DOMException;try{new d.DOMException}catch{d.DOMException=function(M,v){this.message=M,this.name=v;var k=Error(M);this.stack=k.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function o(y,M){return new Promise(function(v,k){var D=new G(y,M);if(D.signal&&D.signal.aborted)return k(new d.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function C(){N.abort()}N.onload=function(){var a={status:N.status,statusText:N.statusText,headers:j(N.getAllResponseHeaders()||"")};a.url="responseURL"in N?N.responseURL:a.headers.get("X-Request-URL"),v(new K("response"in N?N.response:N.responseText,a))},N.onerror=function(){k(new TypeError("Network request failed"))},N.ontimeout=function(){k(new TypeError("Network request failed"))},N.onabort=function(){k(new d.DOMException("Aborted","AbortError"))},N.open(D.method,D.url,!0),"include"===D.credentials?N.withCredentials=!0:"omit"===D.credentials&&(N.withCredentials=!1),"responseType"in N&&x_blob&&(N.responseType="blob"),D.headers.forEach(function(a,B){N.setRequestHeader(B,a)}),D.signal&&(D.signal.addEventListener("abort",C),N.onreadystatechange=function(){4===N.readyState&&D.signal.removeEventListener("abort",C)}),N.send(void 0===D._bodyInit?null:D._bodyInit)})}o.polyfill=!0,O.fetch||(O.fetch=o,O.Headers=u,O.Request=G,O.Response=K),d.Headers=u,d.Request=G,d.Response=K,d.fetch=o,Object.defineProperty(d,"__esModule",{value:!0})}({}),ie.fetch.ponyfill=!0,delete ie.fetch.polyfill;var q=ie;(be=q.fetch).default=q.fetch,be.fetch=q.fetch,be.Headers=q.Headers,be.Request=q.Request,be.Response=q.Response,bt.exports=be},19726:(bt,be,Y)=>{"use strict";be.randomBytes=be.rng=be.pseudoRandomBytes=be.prng=Y(16589),be.createHash=be.Hash=Y(12506),be.createHmac=be.Hmac=Y(85903);var ie=Y(6380),q=Object.keys(ie),O=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(q);be.getHashes=function(){return O};var E=Y(14161);be.pbkdf2=E.pbkdf2,be.pbkdf2Sync=E.pbkdf2Sync;var d=Y(37991);be.Cipher=d.Cipher,be.createCipher=d.createCipher,be.Cipheriv=d.Cipheriv,be.createCipheriv=d.createCipheriv,be.Decipher=d.Decipher,be.createDecipher=d.createDecipher,be.Decipheriv=d.Decipheriv,be.createDecipheriv=d.createDecipheriv,be.getCiphers=d.getCiphers,be.listCiphers=d.listCiphers;var x=Y(52322);be.DiffieHellmanGroup=x.DiffieHellmanGroup,be.createDiffieHellmanGroup=x.createDiffieHellmanGroup,be.getDiffieHellman=x.getDiffieHellman,be.createDiffieHellman=x.createDiffieHellman,be.DiffieHellman=x.DiffieHellman;var f=Y(23566);be.createSign=f.createSign,be.Sign=f.Sign,be.createVerify=f.createVerify,be.Verify=f.Verify,be.createECDH=Y(84892);var T=Y(37537);be.publicEncrypt=T.publicEncrypt,be.privateEncrypt=T.privateEncrypt,be.publicDecrypt=T.publicDecrypt,be.privateDecrypt=T.privateDecrypt;var g=Y(43594);be.randomFill=g.randomFill,be.randomFillSync=g.randomFillSync,be.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},be.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},79748:function(bt,be,Y){var ie;!function(q){"use strict";var h,O=1e9,E={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},d=!0,x="[DecimalError] ",f=x+"Invalid argument: ",T=x+"Exponent out of range: ",g=Math.floor,b=Math.pow,l=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,u=1e7,_=9007199254740991,w=g(_/7),S={};function I(N,C){var a,B,Q,ee,ce,ue,we,ae,Te=N.constructor,le=Te.precision;if(!N.s||!C.s)return C.s||(C=new Te(N)),d?o(C,le):C;if(ae=C.d,ce=N.e,Q=C.e,we=(we=N.d).slice(),ee=ce-Q){for(ee<0?(B=we,ee=-ee,ue=ae.length):(B=ae,Q=ce,ue=we.length),ee>(ue=(ce=Math.ceil(le/7))>ue?ce+1:ue+1)&&(ee=ue,B.length=1),B.reverse();ee--;)B.push(0);B.reverse()}for((ue=we.length)-(ee=ae.length)<0&&(ee=ue,B=ae,ae=we,we=B),a=0;ee;)a=(we[--ee]=we[ee]+ae[ee]+a)/u|0,we[ee]%=u;for(a&&(we.unshift(a),++Q),ue=we.length;0==we[--ue];)we.pop();return C.d=we,C.e=Q,d?o(C,le):C}function P(N,C,a){if(N!==~~N||Na)throw Error(f+N)}function L(N){var C,a,B,Q=N.length-1,ee="",ce=N[0];if(Q>0){for(ee+=ce,C=1;CN.e^ee.s<0?1:-1;for(C=0,a=(B=ee.d.length)<(Q=N.d.length)?B:Q;CN.d[C]^ee.s<0?1:-1;return B===Q?0:B>Q^ee.s<0?1:-1},S.decimalPlaces=S.dp=function(){var N=this,C=N.d.length-1,a=7*(C-N.e);if(C=N.d[C])for(;C%10==0;C/=10)a--;return a<0?0:a},S.dividedBy=S.div=function(N){return V(this,new this.constructor(N))},S.dividedToIntegerBy=S.idiv=function(N){var a=this.constructor;return o(V(this,new a(N),0,1),a.precision)},S.equals=S.eq=function(N){return!this.cmp(N)},S.exponent=function(){return G(this)},S.greaterThan=S.gt=function(N){return this.cmp(N)>0},S.greaterThanOrEqualTo=S.gte=function(N){return this.cmp(N)>=0},S.isInteger=S.isint=function(){return this.e>this.d.length-2},S.isNegative=S.isneg=function(){return this.s<0},S.isPositive=S.ispos=function(){return this.s>0},S.isZero=function(){return 0===this.s},S.lessThan=S.lt=function(N){return this.cmp(N)<0},S.lessThanOrEqualTo=S.lte=function(N){return this.cmp(N)<1},S.logarithm=S.log=function(N){var C,a=this,B=a.constructor,Q=B.precision,ee=Q+5;if(void 0===N)N=new B(10);else if((N=new B(N)).s<1||N.eq(h))throw Error(x+"NaN");if(a.s<1)throw Error(x+(a.s?"NaN":"-Infinity"));return a.eq(h)?new B(0):(d=!1,C=V(K(a,ee),K(N,ee),ee),d=!0,o(C,Q))},S.minus=S.sub=function(N){var C=this;return N=new C.constructor(N),C.s==N.s?y(C,N):I(C,(N.s=-N.s,N))},S.modulo=S.mod=function(N){var C,a=this,B=a.constructor,Q=B.precision;if(!(N=new B(N)).s)throw Error(x+"NaN");return a.s?(d=!1,C=V(a,N,0,1).times(N),d=!0,a.minus(C)):o(new B(a),Q)},S.naturalExponential=S.exp=function(){return W(this)},S.naturalLogarithm=S.ln=function(){return K(this)},S.negated=S.neg=function(){var N=new this.constructor(this);return N.s=-N.s||0,N},S.plus=S.add=function(N){var C=this;return N=new C.constructor(N),C.s==N.s?I(C,N):y(C,(N.s=-N.s,N))},S.precision=S.sd=function(N){var C,a,B,Q=this;if(void 0!==N&&N!==!!N&&1!==N&&0!==N)throw Error(f+N);if(C=G(Q)+1,a=7*(B=Q.d.length-1)+1,B=Q.d[B]){for(;B%10==0;B/=10)a--;for(B=Q.d[0];B>=10;B/=10)a++}return N&&C>a?C:a},S.squareRoot=S.sqrt=function(){var N,C,a,B,Q,ee,ce,ue=this,we=ue.constructor;if(ue.s<1){if(!ue.s)return new we(0);throw Error(x+"NaN")}for(N=G(ue),d=!1,0==(Q=Math.sqrt(+ue))||Q==1/0?(((C=L(ue.d)).length+N)%2==0&&(C+="0"),Q=Math.sqrt(C),N=g((N+1)/2)-(N<0||N%2),B=new we(C=Q==1/0?"5e"+N:(C=Q.toExponential()).slice(0,C.indexOf("e")+1)+N)):B=new we(Q.toString()),Q=ce=(a=we.precision)+3;;)if(B=(ee=B).plus(V(ue,ee,ce+2)).times(.5),L(ee.d).slice(0,ce)===(C=L(B.d)).slice(0,ce)){if(C=C.slice(ce-3,ce+1),Q==ce&&"4999"==C){if(o(ee,a+1,0),ee.times(ee).eq(ue)){B=ee;break}}else if("9999"!=C)break;ce+=4}return d=!0,o(B,a)},S.times=S.mul=function(N){var C,a,B,Q,ee,ce,ue,we,ae,Te=this,le=Te.constructor,X=Te.d,ne=(N=new le(N)).d;if(!Te.s||!N.s)return new le(0);for(N.s*=Te.s,a=Te.e+N.e,(we=X.length)<(ae=ne.length)&&(ee=X,X=ne,ne=ee,ce=we,we=ae,ae=ce),ee=[],B=ce=we+ae;B--;)ee.push(0);for(B=ae;--B>=0;){for(C=0,Q=we+B;Q>B;)ue=ee[Q]+ne[B]*X[Q-B-1]+C,ee[Q--]=ue%u|0,C=ue/u|0;ee[Q]=(ee[Q]+C)%u|0}for(;!ee[--ce];)ee.pop();return C?++a:ee.shift(),N.d=ee,N.e=a,d?o(N,le.precision):N},S.toDecimalPlaces=S.todp=function(N,C){var a=this,B=a.constructor;return a=new B(a),void 0===N?a:(P(N,0,O),void 0===C?C=B.rounding:P(C,0,8),o(a,N+G(a)+1,C))},S.toExponential=function(N,C){var a,B=this,Q=B.constructor;return void 0===N?a=M(B,!0):(P(N,0,O),void 0===C?C=Q.rounding:P(C,0,8),a=M(B=o(new Q(B),N+1,C),!0,N+1)),a},S.toFixed=function(N,C){var a,B,Q=this,ee=Q.constructor;return void 0===N?M(Q):(P(N,0,O),void 0===C?C=ee.rounding:P(C,0,8),a=M((B=o(new ee(Q),N+G(Q)+1,C)).abs(),!1,N+G(B)+1),Q.isneg()&&!Q.isZero()?"-"+a:a)},S.toInteger=S.toint=function(){var N=this,C=N.constructor;return o(new C(N),G(N)+1,C.rounding)},S.toNumber=function(){return+this},S.toPower=S.pow=function(N){var C,a,B,Q,ee,ue=this,we=ue.constructor,Te=+(N=new we(N));if(!N.s)return new we(h);if(!(ue=new we(ue)).s){if(N.s<1)throw Error(x+"Infinity");return ue}if(ue.eq(h))return ue;if(B=we.precision,N.eq(h))return o(ue,B);if(ee=ue.s,(C=N.e)>=(a=N.d.length-1)){if((a=Te<0?-Te:Te)<=_){for(Q=new we(h),C=Math.ceil(B/7+4),d=!1;a%2&&v((Q=Q.times(ue)).d,C),0!==(a=g(a/2));)v((ue=ue.times(ue)).d,C);return d=!0,N.s<0?new we(h).div(Q):o(Q,B)}}else if(ee<0)throw Error(x+"NaN");return ee=ee<0&&1&N.d[Math.max(C,a)]?-1:1,ue.s=1,d=!1,Q=N.times(K(ue,B+12)),d=!0,(Q=W(Q)).s=ee,Q},S.toPrecision=function(N,C){var a,B,Q=this,ee=Q.constructor;return void 0===N?B=M(Q,(a=G(Q))<=ee.toExpNeg||a>=ee.toExpPos):(P(N,1,O),void 0===C?C=ee.rounding:P(C,0,8),B=M(Q=o(new ee(Q),N,C),N<=(a=G(Q))||a<=ee.toExpNeg,N)),B},S.toSignificantDigits=S.tosd=function(N,C){var B=this.constructor;return void 0===N?(N=B.precision,C=B.rounding):(P(N,1,O),void 0===C?C=B.rounding:P(C,0,8)),o(new B(this),N,C)},S.toString=S.valueOf=S.val=S.toJSON=function(){var N=this,C=G(N),a=N.constructor;return M(N,C<=a.toExpNeg||C>=a.toExpPos)};var V=function(){function N(B,Q){var ee,ce=0,ue=B.length;for(B=B.slice();ue--;)B[ue]=(ee=B[ue]*Q+ce)%u|0,ce=ee/u|0;return ce&&B.unshift(ce),B}function C(B,Q,ee,ce){var ue,we;if(ee!=ce)we=ee>ce?1:-1;else for(ue=we=0;ueQ[ue]?1:-1;break}return we}function a(B,Q,ee){for(var ce=0;ee--;)B[ee]-=ce,B[ee]=(ce=B[ee]1;)B.shift()}return function(B,Q,ee,ce){var ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt=B.constructor,ht=B.s==Q.s?1:-1,wt=B.d,Pt=Q.d;if(!B.s)return new mt(B);if(!Q.s)throw Error(x+"Division by zero");for(we=B.e-Q.e,nt=Pt.length,ze=wt.length,pe=(ne=new mt(ht)).d=[],ae=0;Pt[ae]==(wt[ae]||0);)++ae;if(Pt[ae]>(wt[ae]||0)&&--we,(ke=null==ee?ee=mt.precision:ce?ee+(G(B)-G(Q))+1:ee)<0)return new mt(0);if(ke=ke/7+2|0,ae=0,1==nt)for(Te=0,Pt=Pt[0],ke++;(ae1&&(Pt=N(Pt,Te),wt=N(wt,Te),nt=Pt.length,ze=wt.length),Ee=nt,xe=(_e=wt.slice(0,nt)).length;xe=u/2&&++Ve;do{Te=0,(ue=C(Pt,_e,nt,xe))<0?(Ce=_e[0],nt!=xe&&(Ce=Ce*u+(_e[1]||0)),(Te=Ce/Ve|0)>1?(Te>=u&&(Te=u-1),1==(ue=C(le=N(Pt,Te),_e,X=le.length,xe=_e.length))&&(Te--,a(le,nt16)throw Error(T+G(N));if(!N.s)return new Te(h);for(null==C?(d=!1,ue=le):ue=C,ce=new Te(.03125);N.abs().gte(.1);)N=N.times(ce),ae+=5;for(ue+=Math.log(b(2,ae))/Math.LN10*2+5|0,a=Q=ee=new Te(h),Te.precision=ue;;){if(Q=o(Q.times(N),ue),a=a.times(++we),L((ce=ee.plus(V(Q,a,ue))).d).slice(0,ue)===L(ee.d).slice(0,ue)){for(;ae--;)ee=o(ee.times(ee),ue);return Te.precision=le,null==C?(d=!0,o(ee,le)):ee}ee=ce}}function G(N){for(var C=7*N.e,a=N.d[0];a>=10;a/=10)C++;return C}function H(N,C,a){if(C>N.LN10.sd())throw d=!0,a&&(N.precision=a),Error(x+"LN10 precision limit exceeded");return o(new N(N.LN10),C)}function j(N){for(var C="";N--;)C+="0";return C}function K(N,C){var a,B,Q,ee,ce,ue,we,ae,Te,le=1,ne=N,pe=ne.d,_e=ne.constructor,xe=_e.precision;if(ne.s<1)throw Error(x+(ne.s?"NaN":"-Infinity"));if(ne.eq(h))return new _e(0);if(null==C?(d=!1,ae=xe):ae=C,ne.eq(10))return null==C&&(d=!0),H(_e,ae);if(_e.precision=ae+=10,B=(a=L(pe)).charAt(0),ee=G(ne),!(Math.abs(ee)<15e14))return we=H(_e,ae+2,xe).times(ee+""),ne=K(new _e(B+"."+a.slice(1)),ae-10).plus(we),_e.precision=xe,null==C?(d=!0,o(ne,xe)):ne;for(;B<7&&1!=B||1==B&&a.charAt(1)>3;)B=(a=L((ne=ne.times(N)).d)).charAt(0),le++;for(ee=G(ne),B>1?(ne=new _e("0."+a),ee++):ne=new _e(B+"."+a.slice(1)),ue=ce=ne=V(ne.minus(h),ne.plus(h),ae),Te=o(ne.times(ne),ae),Q=3;;){if(ce=o(ce.times(Te),ae),L((we=ue.plus(V(ce,new _e(Q),ae))).d).slice(0,ae)===L(ue.d).slice(0,ae))return ue=ue.times(2),0!==ee&&(ue=ue.plus(H(_e,ae+2,xe).times(ee+""))),ue=V(ue,new _e(le),ae),_e.precision=xe,null==C?(d=!0,o(ue,xe)):ue;ue=we,Q+=2}}function R(N,C){var a,B,Q;for((a=C.indexOf("."))>-1&&(C=C.replace(".","")),(B=C.search(/e/i))>0?(a<0&&(a=B),a+=+C.slice(B+1),C=C.substring(0,B)):a<0&&(a=C.length),B=0;48===C.charCodeAt(B);)++B;for(Q=C.length;48===C.charCodeAt(Q-1);)--Q;if(C=C.slice(B,Q)){if(Q-=B,N.e=g((a=a-B-1)/7),N.d=[],B=(a+1)%7,a<0&&(B+=7),Bw||N.e<-w))throw Error(T+a)}else N.s=0,N.e=0,N.d=[0];return N}function o(N,C,a){var B,Q,ee,ce,ue,we,ae,Te,le=N.d;for(ce=1,ee=le[0];ee>=10;ee/=10)ce++;if((B=C-ce)<0)B+=7,Q=C,ae=le[Te=0];else{if((Te=Math.ceil((B+1)/7))>=(ee=le.length))return N;for(ae=ee=le[Te],ce=1;ee>=10;ee/=10)ce++;Q=(B%=7)-7+ce}if(void 0!==a&&(ue=ae/(ee=b(10,ce-Q-1))%10|0,we=C<0||void 0!==le[Te+1]||ae%ee,we=a<4?(ue||we)&&(0==a||a==(N.s<0?3:2)):ue>5||5==ue&&(4==a||we||6==a&&(B>0?Q>0?ae/b(10,ce-Q):0:le[Te-1])%10&1||a==(N.s<0?8:7))),C<1||!le[0])return we?(ee=G(N),le.length=1,le[0]=b(10,(7-(C=C-ee-1)%7)%7),N.e=g(-C/7)||0):(le.length=1,le[0]=N.e=N.s=0),N;if(0==B?(le.length=Te,ee=1,Te--):(le.length=Te+1,ee=b(10,7-B),le[Te]=Q>0?(ae/b(10,ce-Q)%b(10,Q)|0)*ee:0),we)for(;;){if(0==Te){(le[0]+=ee)==u&&(le[0]=1,++N.e);break}if(le[Te]+=ee,le[Te]!=u)break;le[Te--]=0,ee=1}for(B=le.length;0===le[--B];)le.pop();if(d&&(N.e>w||N.e<-w))throw Error(T+G(N));return N}function y(N,C){var a,B,Q,ee,ce,ue,we,ae,Te,le,X=N.constructor,ne=X.precision;if(!N.s||!C.s)return C.s?C.s=-C.s:C=new X(N),d?o(C,ne):C;if(le=C.d,B=C.e,ae=N.e,we=(we=N.d).slice(),ce=ae-B){for((Te=ce<0)?(a=we,ce=-ce,ue=le.length):(a=le,B=ae,ue=we.length),ce>(Q=Math.max(Math.ceil(ne/7),ue)+2)&&(ce=Q,a.length=1),a.reverse(),Q=ce;Q--;)a.push(0);a.reverse()}else{for((Te=(Q=we.length)<(ue=le.length))&&(ue=Q),Q=0;Q0;--Q)we[ue++]=0;for(Q=le.length;Q>ce;){if(we[--Q]0?ee=ee.charAt(0)+"."+ee.slice(1)+j(B):ce>1&&(ee=ee.charAt(0)+"."+ee.slice(1)),ee=ee+(Q<0?"e":"e+")+Q):Q<0?(ee="0."+j(-Q-1)+ee,a&&(B=a-ce)>0&&(ee+=j(B))):Q>=ce?(ee+=j(Q+1-ce),a&&(B=a-Q-1)>0&&(ee=ee+"."+j(B))):((B=Q+1)0&&(Q+1===ce&&(ee+="."),ee+=j(B))),N.s<0?"-"+ee:ee}function v(N,C){if(N.length>C)return N.length=C,!0}function D(N){if(!N||"object"!=typeof N)throw Error(x+"Object expected");var C,a,B,Q=["precision",1,O,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(C=0;C=Q[C+1]&&B<=Q[C+2]))throw Error(f+a+": "+B);this[a]=B}if(void 0!==(B=N[a="LN10"])){if(B!=Math.LN10)throw Error(f+a+": "+B);this[a]=new this(B)}return this}(E=function k(N){var C,a,B;function Q(ee){var ce=this;if(!(ce instanceof Q))return new Q(ee);if(ce.constructor=Q,ee instanceof Q)return ce.s=ee.s,ce.e=ee.e,void(ce.d=(ee=ee.d)?ee.slice():ee);if("number"==typeof ee){if(0*ee!=0)throw Error(f+ee);if(ee>0)ce.s=1;else{if(!(ee<0))return ce.s=0,ce.e=0,void(ce.d=[0]);ee=-ee,ce.s=-1}return ee===~~ee&&ee<1e7?(ce.e=0,void(ce.d=[ee])):R(ce,ee.toString())}if("string"!=typeof ee)throw Error(f+ee);if(45===ee.charCodeAt(0)?(ee=ee.slice(1),ce.s=-1):ce.s=1,!l.test(ee))throw Error(f+ee);R(ce,ee)}if(Q.prototype=S,Q.ROUND_UP=0,Q.ROUND_DOWN=1,Q.ROUND_CEIL=2,Q.ROUND_FLOOR=3,Q.ROUND_HALF_UP=4,Q.ROUND_HALF_DOWN=5,Q.ROUND_HALF_EVEN=6,Q.ROUND_HALF_CEIL=7,Q.ROUND_HALF_FLOOR=8,Q.clone=k,Q.config=Q.set=D,void 0===N&&(N={}),N)for(B=["precision","rounding","toExpNeg","toExpPos","LN10"],C=0;C{"use strict";var be="%[a-f0-9]{2}",Y=new RegExp("("+be+")|([^%]+?)","gi"),ie=new RegExp("("+be+")+","gi");function q(d,x){try{return[decodeURIComponent(d.join(""))]}catch{}if(1===d.length)return d;var f=d.slice(0,x=x||1),T=d.slice(x);return Array.prototype.concat.call([],q(f),q(T))}function O(d){try{return decodeURIComponent(d)}catch{for(var x=d.match(Y)||[],f=1;f{"use strict";var be=function(S){return!(!(w=S)||"object"!=typeof w||function(w){var S=Object.prototype.toString.call(w);return"[object RegExp]"===S||"[object Date]"===S||function(w){return w.$$typeof===O}(w)}(S));var w},O="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function x(w,S){return!1!==S.clone&&S.isMergeableObject(w)?m(function(w){return Array.isArray(w)?[]:{}}(w),w,S):w}function f(w,S,I){return w.concat(S).map(function(P){return x(P,I)})}function b(w){return Object.keys(w).concat(function(w){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(w).filter(function(S){return Object.propertyIsEnumerable.call(w,S)}):[]}(w))}function l(w,S){try{return S in w}catch{return!1}}function m(w,S,I){(I=I||{}).arrayMerge=I.arrayMerge||f,I.isMergeableObject=I.isMergeableObject||be,I.cloneUnlessOtherwiseSpecified=x;var P=Array.isArray(S);return P===Array.isArray(w)?P?I.arrayMerge(w,S,I):function(w,S,I){var P={};return I.isMergeableObject(w)&&b(w).forEach(function(L){P[L]=x(w[L],I)}),b(S).forEach(function(L){(function(w,S){return l(w,S)&&!(Object.hasOwnProperty.call(w,S)&&Object.propertyIsEnumerable.call(w,S))})(w,L)||(P[L]=l(w,L)&&I.isMergeableObject(S[L])?function(w,S){if(!S.customMerge)return m;var I=S.customMerge(w);return"function"==typeof I?I:m}(L,I)(w[L],S[L],I):x(S[L],I))}),P}(w,S,I):x(S,I)}m.all=function(S,I){if(!Array.isArray(S))throw new Error("first argument should be an array");return S.reduce(function(P,L){return m(P,L,I)},{})},bt.exports=m},68534:(bt,be,Y)=>{"use strict";be.utils=Y(86157),be.Cipher=Y(82243),be.DES=Y(62917),be.CBC=Y(78029),be.EDE=Y(81082)},78029:(bt,be,Y)=>{"use strict";var ie=Y(86055),q=Y(59879),O={};function E(x){ie.equal(x.length,8,"Invalid IV length"),this.iv=new Array(8);for(var f=0;f{"use strict";var ie=Y(86055);function q(O){this.options=O,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==O.padding}bt.exports=q,q.prototype._init=function(){},q.prototype.update=function(E){return 0===E.length?[]:"decrypt"===this.type?this._updateDecrypt(E):this._updateEncrypt(E)},q.prototype._buffer=function(E,d){for(var x=Math.min(this.buffer.length-this.bufferOff,E.length-d),f=0;f0;f--)d+=this._buffer(E,d),x+=this._flushBuffer(T,x);return d+=this._buffer(E,d),T},q.prototype.final=function(E){var d,x;return E&&(d=this.update(E)),x="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),d?d.concat(x):x},q.prototype._pad=function(E,d){if(0===d)return!1;for(;d{"use strict";var ie=Y(86055),q=Y(59879),O=Y(86157),E=Y(82243);function d(){this.tmp=new Array(2),this.keys=null}function x(T){E.call(this,T);var g=new d;this._desState=g,this.deriveKeys(g,T.key)}q(x,E),bt.exports=x,x.create=function(g){return new x(g)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];x.prototype.deriveKeys=function(g,b){g.keys=new Array(32),ie.equal(b.length,this.blockSize,"Invalid key length");var l=O.readUInt32BE(b,0),h=O.readUInt32BE(b,4);O.pc1(l,h,g.tmp,0),l=g.tmp[0],h=g.tmp[1];for(var u=0;u>>1];l=O.r28shl(l,m),h=O.r28shl(h,m),O.pc2(l,h,g.keys,u)}},x.prototype._update=function(g,b,l,h){var u=this._desState,m=O.readUInt32BE(g,b),_=O.readUInt32BE(g,b+4);O.ip(m,_,u.tmp,0),m=u.tmp[0],_=u.tmp[1],"encrypt"===this.type?this._encrypt(u,m,_,u.tmp,0):this._decrypt(u,m,_,u.tmp,0),_=u.tmp[1],O.writeUInt32BE(l,m=u.tmp[0],h),O.writeUInt32BE(l,_,h+4)},x.prototype._pad=function(g,b){if(!1===this.padding)return!1;for(var l=g.length-b,h=b;h>>0,m=V}O.rip(_,m,h,u)},x.prototype._decrypt=function(g,b,l,h,u){for(var m=l,_=b,w=g.keys.length-2;w>=0;w-=2){var S=g.keys[w],I=g.keys[w+1];O.expand(m,g.tmp,0);var P=O.substitute(S^=g.tmp[0],I^=g.tmp[1]),V=m;m=(_^O.permute(P))>>>0,_=V}O.rip(m,_,h,u)}},81082:(bt,be,Y)=>{"use strict";var ie=Y(86055),q=Y(59879),O=Y(82243),E=Y(62917);function d(f,T){ie.equal(T.length,24,"Invalid key length");var g=T.slice(0,8),b=T.slice(8,16),l=T.slice(16,24);this.ciphers="encrypt"===f?[E.create({type:"encrypt",key:g}),E.create({type:"decrypt",key:b}),E.create({type:"encrypt",key:l})]:[E.create({type:"decrypt",key:l}),E.create({type:"encrypt",key:b}),E.create({type:"decrypt",key:g})]}function x(f){O.call(this,f);var T=new d(this.type,this.options.key);this._edeState=T}q(x,O),bt.exports=x,x.create=function(T){return new x(T)},x.prototype._update=function(T,g,b,l){var h=this._edeState;h.ciphers[0]._update(T,g,b,l),h.ciphers[1]._update(b,l,b,l),h.ciphers[2]._update(b,l,b,l)},x.prototype._pad=E.prototype._pad,x.prototype._unpad=E.prototype._unpad},86157:(bt,be)=>{"use strict";be.readUInt32BE=function(E,d){return(E[0+d]<<24|E[1+d]<<16|E[2+d]<<8|E[3+d])>>>0},be.writeUInt32BE=function(E,d,x){E[0+x]=d>>>24,E[1+x]=d>>>16&255,E[2+x]=d>>>8&255,E[3+x]=255&d},be.ip=function(E,d,x,f){for(var T=0,g=0,b=6;b>=0;b-=2){for(var l=0;l<=24;l+=8)T<<=1,T|=d>>>l+b&1;for(l=0;l<=24;l+=8)T<<=1,T|=E>>>l+b&1}for(b=6;b>=0;b-=2){for(l=1;l<=25;l+=8)g<<=1,g|=d>>>l+b&1;for(l=1;l<=25;l+=8)g<<=1,g|=E>>>l+b&1}x[f+0]=T>>>0,x[f+1]=g>>>0},be.rip=function(E,d,x,f){for(var T=0,g=0,b=0;b<4;b++)for(var l=24;l>=0;l-=8)T<<=1,T|=d>>>l+b&1,T<<=1,T|=E>>>l+b&1;for(b=4;b<8;b++)for(l=24;l>=0;l-=8)g<<=1,g|=d>>>l+b&1,g<<=1,g|=E>>>l+b&1;x[f+0]=T>>>0,x[f+1]=g>>>0},be.pc1=function(E,d,x,f){for(var T=0,g=0,b=7;b>=5;b--){for(var l=0;l<=24;l+=8)T<<=1,T|=d>>l+b&1;for(l=0;l<=24;l+=8)T<<=1,T|=E>>l+b&1}for(l=0;l<=24;l+=8)T<<=1,T|=d>>l+b&1;for(b=1;b<=3;b++){for(l=0;l<=24;l+=8)g<<=1,g|=d>>l+b&1;for(l=0;l<=24;l+=8)g<<=1,g|=E>>l+b&1}for(l=0;l<=24;l+=8)g<<=1,g|=E>>l+b&1;x[f+0]=T>>>0,x[f+1]=g>>>0},be.r28shl=function(E,d){return E<>>28-d};var Y=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];be.pc2=function(E,d,x,f){for(var T=0,g=0,b=Y.length>>>1,l=0;l>>Y[l]&1;for(l=b;l>>Y[l]&1;x[f+0]=T>>>0,x[f+1]=g>>>0},be.expand=function(E,d,x){var f=0,T=0;f=(1&E)<<5|E>>>27;for(var g=23;g>=15;g-=4)f<<=6,f|=E>>>g&63;for(g=11;g>=3;g-=4)T|=E>>>g&63,T<<=6;T|=(31&E)<<1|E>>>31,d[x+0]=f>>>0,d[x+1]=T>>>0};var ie=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];be.substitute=function(E,d){for(var x=0,f=0;f<4;f++)x<<=4,x|=ie[64*f+(E>>>18-6*f&63)];for(f=0;f<4;f++)x<<=4,x|=ie[256+64*f+(d>>>18-6*f&63)];return x>>>0};var q=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];be.permute=function(E){for(var d=0,x=0;x>>q[x]&1;return d>>>0},be.padSplit=function(E,d,x){for(var f=E.toString(2);f.length{var ie=Y(84069),q=Y(29799),O=Y(26374),d={binary:!0,hex:!0,base64:!0};be.DiffieHellmanGroup=be.createDiffieHellmanGroup=be.getDiffieHellman=function(f){var T=new Buffer(q[f].prime,"hex"),g=new Buffer(q[f].gen,"hex");return new O(T,g)},be.createDiffieHellman=be.DiffieHellman=function x(f,T,g,b){return Buffer.isBuffer(T)||void 0===d[T]?x(f,"binary",T,g):(T=T||"binary",b=b||"binary",g=g||new Buffer([2]),Buffer.isBuffer(g)||(g=new Buffer(g,b)),"number"==typeof f?new O(ie(f,g),g,!0):(Buffer.isBuffer(f)||(f=new Buffer(f,T)),new O(f,g,!0)))}},26374:(bt,be,Y)=>{var ie=Y(74980),O=new(Y(14398)),E=new ie(24),d=new ie(11),x=new ie(10),f=new ie(3),T=new ie(7),g=Y(84069),b=Y(16589);function l(S,I){return I=I||"utf8",Buffer.isBuffer(S)||(S=new Buffer(S,I)),this._pub=new ie(S),this}function h(S,I){return I=I||"utf8",Buffer.isBuffer(S)||(S=new Buffer(S,I)),this._priv=new ie(S),this}bt.exports=_;var u={};function _(S,I,P){this.setGenerator(I),this.__prime=new ie(S),this._prime=ie.mont(this.__prime),this._primeLen=S.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,P?(this.setPublicKey=l,this.setPrivateKey=h):this._primeCode=8}function w(S,I){var P=new Buffer(S.toArray());return I?P.toString(I):P}Object.defineProperty(_.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(S,I){var P=I.toString("hex"),L=[P,S.toString(16)].join("_");if(L in u)return u[L];var W,V=0;if(S.isEven()||!g.simpleSieve||!g.fermatTest(S)||!O.test(S))return V+=1,u[L]=V+="02"===P||"05"===P?8:4,V;switch(O.test(S.shrn(1))||(V+=2),P){case"02":S.mod(E).cmp(d)&&(V+=8);break;case"05":(W=S.mod(x)).cmp(f)&&W.cmp(T)&&(V+=8);break;default:V+=4}return u[L]=V,V}(this.__prime,this.__gen)),this._primeCode}}),_.prototype.generateKeys=function(){return this._priv||(this._priv=new ie(b(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},_.prototype.computeSecret=function(S){var I=(S=(S=new ie(S)).toRed(this._prime)).redPow(this._priv).fromRed(),P=new Buffer(I.toArray()),L=this.getPrime();if(P.length{var ie=Y(16589);bt.exports=V,V.simpleSieve=P,V.fermatTest=L;var q=Y(74980),O=new q(24),d=new(Y(14398)),x=new q(1),f=new q(2),T=new q(5),l=(new q(16),new q(8),new q(10)),h=new q(3),m=(new q(7),new q(11)),_=new q(4),S=(new q(12),null);function P(W){for(var G=function(){if(null!==S)return S;var G=[];G[0]=2;for(var H=1,j=3;j<1048576;j+=2){for(var K=Math.ceil(Math.sqrt(j)),R=0;RW;)H.ishrn(1);if(H.isEven()&&H.iadd(x),H.testn(1)||H.iadd(f),G.cmp(f)){if(!G.cmp(T))for(;H.mod(l).cmp(h);)H.iadd(_)}else for(;H.mod(O).cmp(m);)H.iadd(_);if(P(j=H.shrn(1))&&P(H)&&L(j)&&L(H)&&d.test(j)&&d.test(H))return H}}},74980:function(bt,be,Y){!function(ie,q){"use strict";function O(R,o){if(!R)throw new Error(o||"Assertion failed")}function E(R,o){R.super_=o;var y=function(){};y.prototype=o.prototype,R.prototype=new y,R.prototype.constructor=R}function d(R,o,y){if(d.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,null!==R&&(("le"===o||"be"===o)&&(y=o,o=10),this._init(R||0,o||10,y||"be"))}var x;"object"==typeof ie?ie.exports=d:q.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(7748).Buffer}catch{}function f(R,o){var y=R.charCodeAt(o);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Jr=0|k[3],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|k[4],zn=8191&Wr,bn=Wr>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,zn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,zn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,zn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,zn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,zn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,zn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,zn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,zn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,zn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,zn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,zn),a=(a=Math.imul(St,bn))+Math.imul(Wt,zn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},5247:(bt,be,Y)=>{"use strict";var ie=be;ie.version=Y(18597).i8,ie.utils=Y(22946),ie.rand=Y(34761),ie.curve=Y(93868),ie.curves=Y(73346),ie.ec=Y(17237),ie.eddsa=Y(61615)},10780:(bt,be,Y)=>{"use strict";var ie=Y(24584),q=Y(22946),O=q.getNAF,E=q.getJSF,d=q.assert;function x(T,g){this.type=T,this.p=new ie(g.p,16),this.red=g.prime?ie.red(g.prime):ie.mont(this.p),this.zero=new ie(0).toRed(this.red),this.one=new ie(1).toRed(this.red),this.two=new ie(2).toRed(this.red),this.n=g.n&&new ie(g.n,16),this.g=g.g&&this.pointFromJSON(g.g,g.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var b=this.n&&this.p.div(this.n);!b||b.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(T,g){this.curve=T,this.type=g,this.precomputed=null}bt.exports=x,x.prototype.point=function(){throw new Error("Not implemented")},x.prototype.validate=function(){throw new Error("Not implemented")},x.prototype._fixedNafMul=function(g,b){d(g.precomputed);var l=g._getDoubles(),h=O(b,1,this._bitLength),u=(1<=_;S--)w=(w<<1)+h[S];m.push(w)}for(var I=this.jpoint(null,null,null),P=this.jpoint(null,null,null),L=u;L>0;L--){for(_=0;_=0;w--){for(var S=0;w>=0&&0===m[w];w--)S++;if(w>=0&&S++,_=_.dblp(S),w<0)break;var I=m[w];d(0!==I),_="affine"===g.type?_.mixedAdd(I>0?u[I-1>>1]:u[-I-1>>1].neg()):_.add(I>0?u[I-1>>1]:u[-I-1>>1].neg())}return"affine"===g.type?_.toP():_},x.prototype._wnafMulAdd=function(g,b,l,h,u){var I,P,L,m=this._wnafT1,_=this._wnafT2,w=this._wnafT3,S=0;for(I=0;I=1;I-=2){var W=I-1,G=I;if(1===m[W]&&1===m[G]){var H=[b[W],null,null,b[G]];0===b[W].y.cmp(b[G].y)?(H[1]=b[W].add(b[G]),H[2]=b[W].toJ().mixedAdd(b[G].neg())):0===b[W].y.cmp(b[G].y.redNeg())?(H[1]=b[W].toJ().mixedAdd(b[G]),H[2]=b[W].add(b[G].neg())):(H[1]=b[W].toJ().mixedAdd(b[G]),H[2]=b[W].toJ().mixedAdd(b[G].neg()));var j=[-3,-1,-5,-7,0,7,5,1,3],K=E(l[W],l[G]);for(S=Math.max(K[0].length,S),w[W]=new Array(S),w[G]=new Array(S),P=0;P=0;I--){for(var v=0;I>=0;){var k=!0;for(P=0;P=0&&v++,y=y.dblp(v),I<0)break;for(P=0;P0?L=_[P][D-1>>1]:D<0&&(L=_[P][-D-1>>1].neg()),y="affine"===L.type?y.mixedAdd(L):y.add(L))}}for(I=0;I=Math.ceil((g.bitLength()+1)/b.step)},f.prototype._getDoubles=function(g,b){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var l=[this],h=this,u=0;u{"use strict";var ie=Y(22946),q=Y(24584),O=Y(59879),E=Y(10780),d=ie.assert;function x(T){this.twisted=1!=(0|T.a),this.mOneA=this.twisted&&-1==(0|T.a),this.extended=this.mOneA,E.call(this,"edwards",T),this.a=new q(T.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new q(T.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new q(T.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),d(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|T.c)}function f(T,g,b,l,h){E.BasePoint.call(this,T,"projective"),null===g&&null===b&&null===l?(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 q(g,16),this.y=new q(b,16),this.z=l?new q(l,16):this.curve.one,this.t=h&&new q(h,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()))))}O(x,E),bt.exports=x,x.prototype._mulA=function(g){return this.mOneA?g.redNeg():this.a.redMul(g)},x.prototype._mulC=function(g){return this.oneC?g:this.c.redMul(g)},x.prototype.jpoint=function(g,b,l,h){return this.point(g,b,l,h)},x.prototype.pointFromX=function(g,b){(g=new q(g,16)).red||(g=g.toRed(this.red));var l=g.redSqr(),h=this.c2.redSub(this.a.redMul(l)),u=this.one.redSub(this.c2.redMul(this.d).redMul(l)),m=h.redMul(u.redInvm()),_=m.redSqrt();if(0!==_.redSqr().redSub(m).cmp(this.zero))throw new Error("invalid point");var w=_.fromRed().isOdd();return(b&&!w||!b&&w)&&(_=_.redNeg()),this.point(g,_)},x.prototype.pointFromY=function(g,b){(g=new q(g,16)).red||(g=g.toRed(this.red));var l=g.redSqr(),h=l.redSub(this.c2),u=l.redMul(this.d).redMul(this.c2).redSub(this.a),m=h.redMul(u.redInvm());if(0===m.cmp(this.zero)){if(b)throw new Error("invalid point");return this.point(this.zero,g)}var _=m.redSqrt();if(0!==_.redSqr().redSub(m).cmp(this.zero))throw new Error("invalid point");return _.fromRed().isOdd()!==b&&(_=_.redNeg()),this.point(_,g)},x.prototype.validate=function(g){if(g.isInfinity())return!0;g.normalize();var b=g.x.redSqr(),l=g.y.redSqr(),h=b.redMul(this.a).redAdd(l),u=this.c2.redMul(this.one.redAdd(this.d.redMul(b).redMul(l)));return 0===h.cmp(u)},O(f,E.BasePoint),x.prototype.pointFromJSON=function(g){return f.fromJSON(this,g)},x.prototype.point=function(g,b,l,h){return new f(this,g,b,l,h)},f.fromJSON=function(g,b){return new f(g,b[0],b[1],b[2])},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var g=this.x.redSqr(),b=this.y.redSqr(),l=this.z.redSqr();l=l.redIAdd(l);var h=this.curve._mulA(g),u=this.x.redAdd(this.y).redSqr().redISub(g).redISub(b),m=h.redAdd(b),_=m.redSub(l),w=h.redSub(b),S=u.redMul(_),I=m.redMul(w),P=u.redMul(w),L=_.redMul(m);return this.curve.point(S,I,L,P)},f.prototype._projDbl=function(){var h,u,m,_,w,S,g=this.x.redAdd(this.y).redSqr(),b=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var I=(_=this.curve._mulA(b)).redAdd(l);this.zOne?(h=g.redSub(b).redSub(l).redMul(I.redSub(this.curve.two)),u=I.redMul(_.redSub(l)),m=I.redSqr().redSub(I).redSub(I)):(w=this.z.redSqr(),S=I.redSub(w).redISub(w),h=g.redSub(b).redISub(l).redMul(S),u=I.redMul(_.redSub(l)),m=I.redMul(S))}else _=b.redAdd(l),w=this.curve._mulC(this.z).redSqr(),S=_.redSub(w).redSub(w),h=this.curve._mulC(g.redISub(_)).redMul(S),u=this.curve._mulC(_).redMul(b.redISub(l)),m=_.redMul(S);return this.curve.point(h,u,m)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(g){var b=this.y.redSub(this.x).redMul(g.y.redSub(g.x)),l=this.y.redAdd(this.x).redMul(g.y.redAdd(g.x)),h=this.t.redMul(this.curve.dd).redMul(g.t),u=this.z.redMul(g.z.redAdd(g.z)),m=l.redSub(b),_=u.redSub(h),w=u.redAdd(h),S=l.redAdd(b),I=m.redMul(_),P=w.redMul(S),L=m.redMul(S),V=_.redMul(w);return this.curve.point(I,P,V,L)},f.prototype._projAdd=function(g){var P,L,b=this.z.redMul(g.z),l=b.redSqr(),h=this.x.redMul(g.x),u=this.y.redMul(g.y),m=this.curve.d.redMul(h).redMul(u),_=l.redSub(m),w=l.redAdd(m),S=this.x.redAdd(this.y).redMul(g.x.redAdd(g.y)).redISub(h).redISub(u),I=b.redMul(_).redMul(S);return this.curve.twisted?(P=b.redMul(w).redMul(u.redSub(this.curve._mulA(h))),L=_.redMul(w)):(P=b.redMul(w).redMul(u.redSub(h)),L=this.curve._mulC(_).redMul(w)),this.curve.point(I,P,L)},f.prototype.add=function(g){return this.isInfinity()?g:g.isInfinity()?this:this.curve.extended?this._extAdd(g):this._projAdd(g)},f.prototype.mul=function(g){return this._hasDoubles(g)?this.curve._fixedNafMul(this,g):this.curve._wnafMul(this,g)},f.prototype.mulAdd=function(g,b,l){return this.curve._wnafMulAdd(1,[this,b],[g,l],2,!1)},f.prototype.jmulAdd=function(g,b,l){return this.curve._wnafMulAdd(1,[this,b],[g,l],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var g=this.z.redInvm();return this.x=this.x.redMul(g),this.y=this.y.redMul(g),this.t&&(this.t=this.t.redMul(g)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(g){return this===g||0===this.getX().cmp(g.getX())&&0===this.getY().cmp(g.getY())},f.prototype.eqXToP=function(g){var b=g.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(b))return!0;for(var l=g.clone(),h=this.curve.redN.redMul(this.z);;){if(l.iadd(this.curve.n),l.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(h),0===this.x.cmp(b))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},93868:(bt,be,Y)=>{"use strict";var ie=be;ie.base=Y(10780),ie.short=Y(29918),ie.mont=Y(52218),ie.edwards=Y(86121)},52218:(bt,be,Y)=>{"use strict";var ie=Y(24584),q=Y(59879),O=Y(10780),E=Y(22946);function d(f){O.call(this,"mont",f),this.a=new ie(f.a,16).toRed(this.red),this.b=new ie(f.b,16).toRed(this.red),this.i4=new ie(4).toRed(this.red).redInvm(),this.two=new ie(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function x(f,T,g){O.BasePoint.call(this,f,"projective"),null===T&&null===g?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new ie(T,16),this.z=new ie(g,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}q(d,O),bt.exports=d,d.prototype.validate=function(T){var g=T.normalize().x,b=g.redSqr(),l=b.redMul(g).redAdd(b.redMul(this.a)).redAdd(g);return 0===l.redSqrt().redSqr().cmp(l)},q(x,O.BasePoint),d.prototype.decodePoint=function(T,g){return this.point(E.toArray(T,g),1)},d.prototype.point=function(T,g){return new x(this,T,g)},d.prototype.pointFromJSON=function(T){return x.fromJSON(this,T)},x.prototype.precompute=function(){},x.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},x.fromJSON=function(T,g){return new x(T,g[0],g[1]||T.one)},x.prototype.inspect=function(){return this.isInfinity()?"":""},x.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},x.prototype.dbl=function(){var g=this.x.redAdd(this.z).redSqr(),l=this.x.redSub(this.z).redSqr(),h=g.redSub(l),u=g.redMul(l),m=h.redMul(l.redAdd(this.curve.a24.redMul(h)));return this.curve.point(u,m)},x.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},x.prototype.diffAdd=function(T,g){var b=this.x.redAdd(this.z),l=this.x.redSub(this.z),h=T.x.redAdd(T.z),m=T.x.redSub(T.z).redMul(b),_=h.redMul(l),w=g.z.redMul(m.redAdd(_).redSqr()),S=g.x.redMul(m.redISub(_).redSqr());return this.curve.point(w,S)},x.prototype.mul=function(T){for(var g=T.clone(),b=this,l=this.curve.point(null,null),u=[];0!==g.cmpn(0);g.iushrn(1))u.push(g.andln(1));for(var m=u.length-1;m>=0;m--)0===u[m]?(b=b.diffAdd(l,this),l=l.dbl()):(l=b.diffAdd(l,this),b=b.dbl());return l},x.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},x.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},x.prototype.eq=function(T){return 0===this.getX().cmp(T.getX())},x.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},x.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},29918:(bt,be,Y)=>{"use strict";var ie=Y(22946),q=Y(24584),O=Y(59879),E=Y(10780),d=ie.assert;function x(g){E.call(this,"short",g),this.a=new q(g.a,16).toRed(this.red),this.b=new q(g.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(g),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(g,b,l,h){E.BasePoint.call(this,g,"affine"),null===b&&null===l?(this.x=null,this.y=null,this.inf=!0):(this.x=new q(b,16),this.y=new q(l,16),h&&(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 T(g,b,l,h){E.BasePoint.call(this,g,"jacobian"),null===b&&null===l&&null===h?(this.x=this.curve.one,this.y=this.curve.one,this.z=new q(0)):(this.x=new q(b,16),this.y=new q(l,16),this.z=new q(h,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}O(x,E),bt.exports=x,x.prototype._getEndomorphism=function(b){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var l,h;if(b.beta)l=new q(b.beta,16).toRed(this.red);else{var u=this._getEndoRoots(this.p);l=(l=u[0].cmp(u[1])<0?u[0]:u[1]).toRed(this.red)}if(b.lambda)h=new q(b.lambda,16);else{var m=this._getEndoRoots(this.n);0===this.g.mul(m[0]).x.cmp(this.g.x.redMul(l))?h=m[0]:d(0===this.g.mul(h=m[1]).x.cmp(this.g.x.redMul(l)))}return{beta:l,lambda:h,basis:b.basis?b.basis.map(function(w){return{a:new q(w.a,16),b:new q(w.b,16)}}):this._getEndoBasis(h)}}},x.prototype._getEndoRoots=function(b){var l=b===this.p?this.red:q.mont(b),h=new q(2).toRed(l).redInvm(),u=h.redNeg(),m=new q(3).toRed(l).redNeg().redSqrt().redMul(h);return[u.redAdd(m).fromRed(),u.redSub(m).fromRed()]},x.prototype._getEndoBasis=function(b){for(var I,P,L,V,W,G,H,K,R,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=b,u=this.n.clone(),m=new q(1),_=new q(0),w=new q(0),S=new q(1),j=0;0!==h.cmpn(0);){var o=u.div(h);K=u.sub(o.mul(h)),R=w.sub(o.mul(m));var y=S.sub(o.mul(_));if(!L&&K.cmp(l)<0)I=H.neg(),P=m,L=K.neg(),V=R;else if(L&&2==++j)break;H=K,u=h,h=K,w=m,m=R,S=_,_=y}W=K.neg(),G=R;var M=L.sqr().add(V.sqr());return W.sqr().add(G.sqr()).cmp(M)>=0&&(W=I,G=P),L.negative&&(L=L.neg(),V=V.neg()),W.negative&&(W=W.neg(),G=G.neg()),[{a:L,b:V},{a:W,b:G}]},x.prototype._endoSplit=function(b){var l=this.endo.basis,h=l[0],u=l[1],m=u.b.mul(b).divRound(this.n),_=h.b.neg().mul(b).divRound(this.n),w=m.mul(h.a),S=_.mul(u.a),I=m.mul(h.b),P=_.mul(u.b);return{k1:b.sub(w).sub(S),k2:I.add(P).neg()}},x.prototype.pointFromX=function(b,l){(b=new q(b,16)).red||(b=b.toRed(this.red));var h=b.redSqr().redMul(b).redIAdd(b.redMul(this.a)).redIAdd(this.b),u=h.redSqrt();if(0!==u.redSqr().redSub(h).cmp(this.zero))throw new Error("invalid point");var m=u.fromRed().isOdd();return(l&&!m||!l&&m)&&(u=u.redNeg()),this.point(b,u)},x.prototype.validate=function(b){if(b.inf)return!0;var l=b.x,h=b.y,u=this.a.redMul(l),m=l.redSqr().redMul(l).redIAdd(u).redIAdd(this.b);return 0===h.redSqr().redISub(m).cmpn(0)},x.prototype._endoWnafMulAdd=function(b,l,h){for(var u=this._endoWnafT1,m=this._endoWnafT2,_=0;_":""},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(b){if(this.inf)return b;if(b.inf)return this;if(this.eq(b))return this.dbl();if(this.neg().eq(b))return this.curve.point(null,null);if(0===this.x.cmp(b.x))return this.curve.point(null,null);var l=this.y.redSub(b.y);0!==l.cmpn(0)&&(l=l.redMul(this.x.redSub(b.x).redInvm()));var h=l.redSqr().redISub(this.x).redISub(b.x),u=l.redMul(this.x.redSub(h)).redISub(this.y);return this.curve.point(h,u)},f.prototype.dbl=function(){if(this.inf)return this;var b=this.y.redAdd(this.y);if(0===b.cmpn(0))return this.curve.point(null,null);var l=this.curve.a,h=this.x.redSqr(),u=b.redInvm(),m=h.redAdd(h).redIAdd(h).redIAdd(l).redMul(u),_=m.redSqr().redISub(this.x.redAdd(this.x)),w=m.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,w)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(b){return b=new q(b,16),this.isInfinity()?this:this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve.endo?this.curve._endoWnafMulAdd([this],[b]):this.curve._wnafMul(this,b)},f.prototype.mulAdd=function(b,l,h){var u=[this,l],m=[b,h];return this.curve.endo?this.curve._endoWnafMulAdd(u,m):this.curve._wnafMulAdd(1,u,m,2)},f.prototype.jmulAdd=function(b,l,h){var u=[this,l],m=[b,h];return this.curve.endo?this.curve._endoWnafMulAdd(u,m,!0):this.curve._wnafMulAdd(1,u,m,2,!0)},f.prototype.eq=function(b){return this===b||this.inf===b.inf&&(this.inf||0===this.x.cmp(b.x)&&0===this.y.cmp(b.y))},f.prototype.neg=function(b){if(this.inf)return this;var l=this.curve.point(this.x,this.y.redNeg());if(b&&this.precomputed){var h=this.precomputed,u=function(m){return m.neg()};l.precomputed={naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(u)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(u)}}}return l},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},O(T,E.BasePoint),x.prototype.jpoint=function(b,l,h){return new T(this,b,l,h)},T.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var b=this.z.redInvm(),l=b.redSqr(),h=this.x.redMul(l),u=this.y.redMul(l).redMul(b);return this.curve.point(h,u)},T.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},T.prototype.add=function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var l=b.z.redSqr(),h=this.z.redSqr(),u=this.x.redMul(l),m=b.x.redMul(h),_=this.y.redMul(l.redMul(b.z)),w=b.y.redMul(h.redMul(this.z)),S=u.redSub(m),I=_.redSub(w);if(0===S.cmpn(0))return 0!==I.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var P=S.redSqr(),L=P.redMul(S),V=u.redMul(P),W=I.redSqr().redIAdd(L).redISub(V).redISub(V),G=I.redMul(V.redISub(W)).redISub(_.redMul(L)),H=this.z.redMul(b.z).redMul(S);return this.curve.jpoint(W,G,H)},T.prototype.mixedAdd=function(b){if(this.isInfinity())return b.toJ();if(b.isInfinity())return this;var l=this.z.redSqr(),h=this.x,u=b.x.redMul(l),m=this.y,_=b.y.redMul(l).redMul(this.z),w=h.redSub(u),S=m.redSub(_);if(0===w.cmpn(0))return 0!==S.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var I=w.redSqr(),P=I.redMul(w),L=h.redMul(I),V=S.redSqr().redIAdd(P).redISub(L).redISub(L),W=S.redMul(L.redISub(V)).redISub(m.redMul(P)),G=this.z.redMul(w);return this.curve.jpoint(V,W,G)},T.prototype.dblp=function(b){if(0===b)return this;if(this.isInfinity())return this;if(!b)return this.dbl();var l;if(this.curve.zeroA||this.curve.threeA){var h=this;for(l=0;l=0)return!1;if(h.redIAdd(m),0===this.x.cmp(h))return!0}},T.prototype.inspect=function(){return this.isInfinity()?"":""},T.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},73346:(bt,be,Y)=>{"use strict";var T,ie=be,q=Y(37909),O=Y(93868),d=Y(22946).assert;function x(g){this.curve="short"===g.type?new O.short(g):"edwards"===g.type?new O.edwards(g):new O.mont(g),this.g=this.curve.g,this.n=this.curve.n,this.hash=g.hash,d(this.g.validate(),"Invalid curve"),d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(g,b){Object.defineProperty(ie,g,{configurable:!0,enumerable:!0,get:function(){var l=new x(b);return Object.defineProperty(ie,g,{configurable:!0,enumerable:!0,value:l}),l}})}ie.PresetCurve=x,f("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:q.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("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:q.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("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:q.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("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:q.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"]}),f("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:q.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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:q.sha256,gRed:!1,g:["9"]}),f("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:q.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{T=Y(5503)}catch{T=void 0}f("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:q.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",T]})},17237:(bt,be,Y)=>{"use strict";var ie=Y(24584),q=Y(72730),O=Y(22946),E=Y(73346),d=Y(34761),x=O.assert,f=Y(12806),T=Y(46799);function g(b){if(!(this instanceof g))return new g(b);"string"==typeof b&&(x(Object.prototype.hasOwnProperty.call(E,b),"Unknown curve "+b),b=E[b]),b instanceof E.PresetCurve&&(b={curve:b}),this.curve=b.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=b.curve.g,this.g.precompute(b.curve.n.bitLength()+1),this.hash=b.hash||b.curve.hash}bt.exports=g,g.prototype.keyPair=function(l){return new f(this,l)},g.prototype.keyFromPrivate=function(l,h){return f.fromPrivate(this,l,h)},g.prototype.keyFromPublic=function(l,h){return f.fromPublic(this,l,h)},g.prototype.genKeyPair=function(l){l||(l={});for(var h=new q({hash:this.hash,pers:l.pers,persEnc:l.persEnc||"utf8",entropy:l.entropy||d(this.hash.hmacStrength),entropyEnc:l.entropy&&l.entropyEnc||"utf8",nonce:this.n.toArray()}),u=this.n.byteLength(),m=this.n.sub(new ie(2));;){var _=new ie(h.generate(u));if(!(_.cmp(m)>0))return _.iaddn(1),this.keyFromPrivate(_)}},g.prototype._truncateToN=function(l,h){var u=8*l.byteLength()-this.n.bitLength();return u>0&&(l=l.ushrn(u)),!h&&l.cmp(this.n)>=0?l.sub(this.n):l},g.prototype.sign=function(l,h,u,m){"object"==typeof u&&(m=u,u=null),m||(m={}),h=this.keyFromPrivate(h,u),l=this._truncateToN(new ie(l,16));for(var _=this.n.byteLength(),w=h.getPrivate().toArray("be",_),S=l.toArray("be",_),I=new q({hash:this.hash,entropy:w,nonce:S,pers:m.pers,persEnc:m.persEnc||"utf8"}),P=this.n.sub(new ie(1)),L=0;;L++){var V=m.k?m.k(L):new ie(I.generate(this.n.byteLength()));if(!((V=this._truncateToN(V,!0)).cmpn(1)<=0||V.cmp(P)>=0)){var W=this.g.mul(V);if(!W.isInfinity()){var G=W.getX(),H=G.umod(this.n);if(0!==H.cmpn(0)){var j=V.invm(this.n).mul(H.mul(h.getPrivate()).iadd(l));if(0!==(j=j.umod(this.n)).cmpn(0)){var K=(W.getY().isOdd()?1:0)|(0!==G.cmp(H)?2:0);return m.canonical&&j.cmp(this.nh)>0&&(j=this.n.sub(j),K^=1),new T({r:H,s:j,recoveryParam:K})}}}}}},g.prototype.verify=function(l,h,u,m){l=this._truncateToN(new ie(l,16)),u=this.keyFromPublic(u,m);var _=(h=new T(h,"hex")).r,w=h.s;if(_.cmpn(1)<0||_.cmp(this.n)>=0||w.cmpn(1)<0||w.cmp(this.n)>=0)return!1;var L,S=w.invm(this.n),I=S.mul(l).umod(this.n),P=S.mul(_).umod(this.n);return this.curve._maxwellTrick?!(L=this.g.jmulAdd(I,u.getPublic(),P)).isInfinity()&&L.eqXToP(_):!(L=this.g.mulAdd(I,u.getPublic(),P)).isInfinity()&&0===L.getX().umod(this.n).cmp(_)},g.prototype.recoverPubKey=function(b,l,h,u){x((3&h)===h,"The recovery param is more than two bits"),l=new T(l,u);var m=this.n,_=new ie(b),w=l.r,S=l.s,I=1&h,P=h>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&P)throw new Error("Unable to find sencond key candinate");w=this.curve.pointFromX(P?w.add(this.curve.n):w,I);var L=l.r.invm(m),V=m.sub(_).mul(L).umod(m),W=S.mul(L).umod(m);return this.g.mulAdd(V,w,W)},g.prototype.getKeyRecoveryParam=function(b,l,h,u){if(null!==(l=new T(l,u)).recoveryParam)return l.recoveryParam;for(var m=0;m<4;m++){var _;try{_=this.recoverPubKey(b,l,m)}catch{continue}if(_.eq(h))return m}throw new Error("Unable to find valid recovery factor")}},12806:(bt,be,Y)=>{"use strict";var ie=Y(24584),O=Y(22946).assert;function E(d,x){this.ec=d,this.priv=null,this.pub=null,x.priv&&this._importPrivate(x.priv,x.privEnc),x.pub&&this._importPublic(x.pub,x.pubEnc)}bt.exports=E,E.fromPublic=function(x,f,T){return f instanceof E?f:new E(x,{pub:f,pubEnc:T})},E.fromPrivate=function(x,f,T){return f instanceof E?f:new E(x,{priv:f,privEnc:T})},E.prototype.validate=function(){var x=this.getPublic();return x.isInfinity()?{result:!1,reason:"Invalid public key"}:x.validate()?x.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"}},E.prototype.getPublic=function(x,f){return"string"==typeof x&&(f=x,x=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),f?this.pub.encode(f,x):this.pub},E.prototype.getPrivate=function(x){return"hex"===x?this.priv.toString(16,2):this.priv},E.prototype._importPrivate=function(x,f){this.priv=new ie(x,f||16),this.priv=this.priv.umod(this.ec.curve.n)},E.prototype._importPublic=function(x,f){if(x.x||x.y)return"mont"===this.ec.curve.type?O(x.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&O(x.x&&x.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(x.x,x.y));this.pub=this.ec.curve.decodePoint(x,f)},E.prototype.derive=function(x){return x.validate()||O(x.validate(),"public point not validated"),x.mul(this.priv).getX()},E.prototype.sign=function(x,f,T){return this.ec.sign(x,this,f,T)},E.prototype.verify=function(x,f){return this.ec.verify(x,f,this)},E.prototype.inspect=function(){return""}},46799:(bt,be,Y)=>{"use strict";var ie=Y(24584),q=Y(22946),O=q.assert;function E(g,b){if(g instanceof E)return g;this._importDER(g,b)||(O(g.r&&g.s,"Signature without r or s"),this.r=new ie(g.r,16),this.s=new ie(g.s,16),this.recoveryParam=void 0===g.recoveryParam?null:g.recoveryParam)}function d(){this.place=0}function x(g,b){var l=g[b.place++];if(!(128&l))return l;var h=15&l;if(0===h||h>4)return!1;for(var u=0,m=0,_=b.place;m>>=0;return!(u<=127)&&(b.place=_,u)}function f(g){for(var b=0,l=g.length-1;!g[b]&&!(128&g[b+1])&&b>>3);for(g.push(128|l);--l;)g.push(b>>>(l<<3)&255);g.push(b)}}bt.exports=E,E.prototype._importDER=function(b,l){b=q.toArray(b,l);var h=new d;if(48!==b[h.place++])return!1;var u=x(b,h);if(!1===u||u+h.place!==b.length||2!==b[h.place++])return!1;var m=x(b,h);if(!1===m)return!1;var _=b.slice(h.place,m+h.place);if(h.place+=m,2!==b[h.place++])return!1;var w=x(b,h);if(!1===w||b.length!==w+h.place)return!1;var S=b.slice(h.place,w+h.place);if(0===_[0]){if(!(128&_[1]))return!1;_=_.slice(1)}if(0===S[0]){if(!(128&S[1]))return!1;S=S.slice(1)}return this.r=new ie(_),this.s=new ie(S),this.recoveryParam=null,!0},E.prototype.toDER=function(b){var l=this.r.toArray(),h=this.s.toArray();for(128&l[0]&&(l=[0].concat(l)),128&h[0]&&(h=[0].concat(h)),l=f(l),h=f(h);!(h[0]||128&h[1]);)h=h.slice(1);var u=[2];T(u,l.length),(u=u.concat(l)).push(2),T(u,h.length);var m=u.concat(h),_=[48];return T(_,m.length),_=_.concat(m),q.encode(_,b)}},61615:(bt,be,Y)=>{"use strict";var ie=Y(37909),q=Y(73346),O=Y(22946),E=O.assert,d=O.parseBytes,x=Y(46014),f=Y(36317);function T(g){if(E("ed25519"===g,"only tested with ed25519 so far"),!(this instanceof T))return new T(g);this.curve=g=q[g].curve,this.g=g.g,this.g.precompute(g.n.bitLength()+1),this.pointClass=g.point().constructor,this.encodingLength=Math.ceil(g.n.bitLength()/8),this.hash=ie.sha512}bt.exports=T,T.prototype.sign=function(b,l){b=d(b);var h=this.keyFromSecret(l),u=this.hashInt(h.messagePrefix(),b),m=this.g.mul(u),_=this.encodePoint(m),w=this.hashInt(_,h.pubBytes(),b).mul(h.priv()),S=u.add(w).umod(this.curve.n);return this.makeSignature({R:m,S,Rencoded:_})},T.prototype.verify=function(b,l,h){b=d(b),l=this.makeSignature(l);var u=this.keyFromPublic(h),m=this.hashInt(l.Rencoded(),u.pubBytes(),b),_=this.g.mul(l.S());return l.R().add(u.pub().mul(m)).eq(_)},T.prototype.hashInt=function(){for(var b=this.hash(),l=0;l{"use strict";var ie=Y(22946),q=ie.assert,O=ie.parseBytes,E=ie.cachedProperty;function d(x,f){this.eddsa=x,this._secret=O(f.secret),x.isPoint(f.pub)?this._pub=f.pub:this._pubBytes=O(f.pub)}d.fromPublic=function(f,T){return T instanceof d?T:new d(f,{pub:T})},d.fromSecret=function(f,T){return T instanceof d?T:new d(f,{secret:T})},d.prototype.secret=function(){return this._secret},E(d,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),E(d,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),E(d,"privBytes",function(){var f=this.eddsa,T=this.hash(),g=f.encodingLength-1,b=T.slice(0,f.encodingLength);return b[0]&=248,b[g]&=127,b[g]|=64,b}),E(d,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),E(d,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),E(d,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),d.prototype.sign=function(f){return q(this._secret,"KeyPair can only verify"),this.eddsa.sign(f,this)},d.prototype.verify=function(f,T){return this.eddsa.verify(f,T,this)},d.prototype.getSecret=function(f){return q(this._secret,"KeyPair is public only"),ie.encode(this.secret(),f)},d.prototype.getPublic=function(f){return ie.encode(this.pubBytes(),f)},bt.exports=d},36317:(bt,be,Y)=>{"use strict";var ie=Y(24584),q=Y(22946),O=q.assert,E=q.cachedProperty,d=q.parseBytes;function x(f,T){this.eddsa=f,"object"!=typeof T&&(T=d(T)),Array.isArray(T)&&(T={R:T.slice(0,f.encodingLength),S:T.slice(f.encodingLength)}),O(T.R&&T.S,"Signature without R or S"),f.isPoint(T.R)&&(this._R=T.R),T.S instanceof ie&&(this._S=T.S),this._Rencoded=Array.isArray(T.R)?T.R:T.Rencoded,this._Sencoded=Array.isArray(T.S)?T.S:T.Sencoded}E(x,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),E(x,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),E(x,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),E(x,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),x.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},x.prototype.toHex=function(){return q.encode(this.toBytes(),"hex").toUpperCase()},bt.exports=x},5503:bt=>{bt.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"]]}}},22946:(bt,be,Y)=>{"use strict";var ie=be,q=Y(24584),O=Y(86055),E=Y(14869);ie.assert=O,ie.toArray=E.toArray,ie.zero2=E.zero2,ie.toHex=E.toHex,ie.encode=E.encode,ie.getNAF=function(b,l,h){var u=new Array(Math.max(b.bitLength(),h)+1);u.fill(0);for(var m=1<(m>>1)-1?(m>>1)-I:I):S=0,u[w]=S,_.iushrn(1)}return u},ie.getJSF=function(b,l){var h=[[],[]];b=b.clone(),l=l.clone();for(var _,u=0,m=0;b.cmpn(-u)>0||l.cmpn(-m)>0;){var I,P,w=b.andln(3)+u&3,S=l.andln(3)+m&3;3===w&&(w=-1),3===S&&(S=-1),I=0==(1&w)?0:3!=(_=b.andln(7)+u&7)&&5!==_||2!==S?w:-w,h[0].push(I),P=0==(1&S)?0:3!=(_=l.andln(7)+m&7)&&5!==_||2!==w?S:-S,h[1].push(P),2*u===I+1&&(u=1-u),2*m===P+1&&(m=1-m),b.iushrn(1),l.iushrn(1)}return h},ie.cachedProperty=function(b,l,h){var u="_"+l;b.prototype[l]=function(){return void 0!==this[u]?this[u]:this[u]=h.call(this)}},ie.parseBytes=function(b){return"string"==typeof b?ie.toArray(b,"hex"):b},ie.intFromLE=function(b){return new q(b,"hex","le")}},24584:function(bt,be,Y){!function(ie,q){"use strict";function O(R,o){if(!R)throw new Error(o||"Assertion failed")}function E(R,o){R.super_=o;var y=function(){};y.prototype=o.prototype,R.prototype=new y,R.prototype.constructor=R}function d(R,o,y){if(d.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,null!==R&&(("le"===o||"be"===o)&&(y=o,o=10),this._init(R||0,o||10,y||"be"))}var x;"object"==typeof ie?ie.exports=d:q.BN=d,d.BN=d,d.wordSize=26;try{x="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Y(85568).Buffer}catch{}function f(R,o){var y=R.charCodeAt(o);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Jr=0|k[3],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|k[4],zn=8191&Wr,bn=Wr>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,zn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,zn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,zn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,zn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,zn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,zn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,zn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,zn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,zn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,zn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,zn),a=(a=Math.imul(St,bn))+Math.imul(Wt,zn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},94464:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{BaseContract:()=>O.BaseContract,BigNumber:()=>E.O$,Contract:()=>O.Contract,ContractFactory:()=>O.ContractFactory,FixedNumber:()=>d.xs,Signer:()=>x.Signer,VoidSigner:()=>x.VoidSigner,Wallet:()=>f.Wallet,Wordlist:()=>l.D,constants:()=>T,errors:()=>R.ErrorCode,ethers:()=>q,getDefaultProvider:()=>g.getDefaultProvider,logger:()=>ae,providers:()=>g,utils:()=>ie,version:()=>we,wordlists:()=>b.E});var ie={};Y.r(ie),Y.d(ie,{AbiCoder:()=>h.R,ConstructorFragment:()=>u.Xg,ErrorFragment:()=>u.IC,EventFragment:()=>u.QV,FormatTypes:()=>u.pc,Fragment:()=>u.HY,FunctionFragment:()=>u.YW,HDNode:()=>H.HDNode,Indexed:()=>_.Hk,Interface:()=>_.vU,LogDescription:()=>_.CC,Logger:()=>R.Logger,ParamType:()=>u._R,RLP:()=>D,SigningKey:()=>N.SigningKey,SupportedAlgorithm:()=>ue.p,TransactionDescription:()=>_.vk,TransactionTypes:()=>Q.TransactionTypes,UnicodeNormalizationForm:()=>a.Uj,Utf8ErrorFuncs:()=>a.te,Utf8ErrorReason:()=>a.Uw,_TypedDataEncoder:()=>G.E,_fetchData:()=>ce._fetchData,_toEscapedUtf8String:()=>a.U$,accessListify:()=>Q.accessListify,arrayify:()=>P.arrayify,base58:()=>I.Base58,base64:()=>S,checkProperties:()=>k.checkProperties,checkResultErrors:()=>m.BR,commify:()=>ee.commify,computeAddress:()=>Q.computeAddress,computeHmac:()=>o.Gy,computePublicKey:()=>N.computePublicKey,concat:()=>P.concat,deepCopy:()=>k.deepCopy,defaultAbiCoder:()=>h.$,defaultPath:()=>H.defaultPath,defineReadOnly:()=>k.defineReadOnly,dnsEncode:()=>L.Kn,entropyToMnemonic:()=>H.entropyToMnemonic,fetchJson:()=>ce.fetchJson,formatBytes32String:()=>B.s,formatEther:()=>ee.formatEther,formatUnits:()=>ee.formatUnits,getAccountPath:()=>H.getAccountPath,getAddress:()=>w.getAddress,getContractAddress:()=>w.getContractAddress,getCreate2Address:()=>w.getCreate2Address,getIcapAddress:()=>w.getIcapAddress,getJsonWalletAddress:()=>j.Rb,getStatic:()=>k.getStatic,hashMessage:()=>V.r,hexConcat:()=>P.hexConcat,hexDataLength:()=>P.hexDataLength,hexDataSlice:()=>P.hexDataSlice,hexStripZeros:()=>P.hexStripZeros,hexValue:()=>P.hexValue,hexZeroPad:()=>P.hexZeroPad,hexlify:()=>P.hexlify,id:()=>W.id,isAddress:()=>w.isAddress,isBytes:()=>P.isBytes,isBytesLike:()=>P.isBytesLike,isHexString:()=>P.isHexString,isValidMnemonic:()=>H.isValidMnemonic,isValidName:()=>L.r1,joinSignature:()=>P.joinSignature,keccak256:()=>K.keccak256,mnemonicToEntropy:()=>H.mnemonicToEntropy,mnemonicToSeed:()=>H.mnemonicToSeed,namehash:()=>L.VM,nameprep:()=>C.Ll,parseBytes32String:()=>B.F,parseEther:()=>ee.parseEther,parseTransaction:()=>Q.parse,parseUnits:()=>ee.parseUnits,poll:()=>ce.poll,randomBytes:()=>M.O,recoverAddress:()=>Q.recoverAddress,recoverPublicKey:()=>N.recoverPublicKey,resolveProperties:()=>k.resolveProperties,ripemd160:()=>o.bP,serializeTransaction:()=>Q.serialize,sha256:()=>o.JQ,sha512:()=>o.o,shallowCopy:()=>k.shallowCopy,shuffled:()=>v.y,solidityKeccak256:()=>y.keccak256,solidityPack:()=>y.pack,soliditySha256:()=>y.sha256,splitSignature:()=>P.splitSignature,stripZeros:()=>P.stripZeros,toUtf8Bytes:()=>a.Y0,toUtf8CodePoints:()=>a.XL,toUtf8String:()=>a.ZN,verifyMessage:()=>f.verifyMessage,verifyTypedData:()=>f.verifyTypedData,zeroPad:()=>P.zeroPad});var q={};Y.r(q),Y.d(q,{BaseContract:()=>O.BaseContract,BigNumber:()=>E.O$,Contract:()=>O.Contract,ContractFactory:()=>O.ContractFactory,FixedNumber:()=>d.xs,Signer:()=>x.Signer,VoidSigner:()=>x.VoidSigner,Wallet:()=>f.Wallet,Wordlist:()=>l.D,constants:()=>T,errors:()=>R.ErrorCode,getDefaultProvider:()=>g.getDefaultProvider,logger:()=>ae,providers:()=>g,utils:()=>ie,version:()=>we,wordlists:()=>b.E});var O=Y(36776),E=Y(2024),d=Y(71677),x=Y(11221),f=Y(6846),T=Y(11843),g=Y(80831),b=Y(33692),l=Y(14667),h=Y(53941),u=Y(55586),m=Y(91125),_=Y(20886),w=Y(2885),S=Y(67711),I=Y(53744),P=Y(61488),L=Y(21),V=Y(78429),W=Y(67475),G=Y(72072),H=Y(49593),j=Y(87989),K=Y(28518),R=Y(53898),o=Y(15614),y=Y(37979),M=Y(42563),v=Y(34820),k=Y(92275),D=Y(29276),N=Y(99596),C=Y(17188),a=Y(8822),B=Y(44688),Q=Y(32701),ee=Y(2519),ce=Y(51838),ue=Y(83389);const we="ethers/5.7.2",ae=new R.Logger(we);try{const Te=window;null==Te._ethers&&(Te._ethers=q)}catch{}},92673:function(bt,be,Y){"use strict";var ie=this&&this.__createBinding||(Object.create?function(R,o,y,M){void 0===M&&(M=y),Object.defineProperty(R,M,{enumerable:!0,get:function(){return o[y]}})}:function(R,o,y,M){void 0===M&&(M=y),R[M]=o[y]}),q=this&&this.__setModuleDefault||(Object.create?function(R,o){Object.defineProperty(R,"default",{enumerable:!0,value:o})}:function(R,o){R.default=o}),O=this&&this.__importStar||function(R){if(R&&R.__esModule)return R;var o={};if(null!=R)for(var y in R)"default"!==y&&Object.prototype.hasOwnProperty.call(R,y)&&ie(o,R,y);return q(o,R),o};Object.defineProperty(be,"__esModule",{value:!0}),be.formatBytes32String=be.Utf8ErrorFuncs=be.toUtf8String=be.toUtf8CodePoints=be.toUtf8Bytes=be._toEscapedUtf8String=be.nameprep=be.hexDataSlice=be.hexDataLength=be.hexZeroPad=be.hexValue=be.hexStripZeros=be.hexConcat=be.isHexString=be.hexlify=be.base64=be.base58=be.TransactionDescription=be.LogDescription=be.Interface=be.SigningKey=be.HDNode=be.defaultPath=be.isBytesLike=be.isBytes=be.zeroPad=be.stripZeros=be.concat=be.arrayify=be.shallowCopy=be.resolveProperties=be.getStatic=be.defineReadOnly=be.deepCopy=be.checkProperties=be.poll=be.fetchJson=be._fetchData=be.RLP=be.Logger=be.checkResultErrors=be.FormatTypes=be.ParamType=be.FunctionFragment=be.EventFragment=be.ErrorFragment=be.ConstructorFragment=be.Fragment=be.defaultAbiCoder=be.AbiCoder=void 0,be.Indexed=be.Utf8ErrorReason=be.UnicodeNormalizationForm=be.SupportedAlgorithm=be.mnemonicToSeed=be.isValidMnemonic=be.entropyToMnemonic=be.mnemonicToEntropy=be.getAccountPath=be.verifyTypedData=be.verifyMessage=be.recoverPublicKey=be.computePublicKey=be.recoverAddress=be.computeAddress=be.getJsonWalletAddress=be.TransactionTypes=be.serializeTransaction=be.parseTransaction=be.accessListify=be.joinSignature=be.splitSignature=be.soliditySha256=be.solidityKeccak256=be.solidityPack=be.shuffled=be.randomBytes=be.sha512=be.sha256=be.ripemd160=be.keccak256=be.computeHmac=be.commify=be.parseUnits=be.formatUnits=be.parseEther=be.formatEther=be.isAddress=be.getCreate2Address=be.getContractAddress=be.getIcapAddress=be.getAddress=be._TypedDataEncoder=be.id=be.isValidName=be.namehash=be.hashMessage=be.dnsEncode=be.parseBytes32String=void 0;var E=Y(7910);Object.defineProperty(be,"AbiCoder",{enumerable:!0,get:function(){return E.AbiCoder}}),Object.defineProperty(be,"checkResultErrors",{enumerable:!0,get:function(){return E.checkResultErrors}}),Object.defineProperty(be,"ConstructorFragment",{enumerable:!0,get:function(){return E.ConstructorFragment}}),Object.defineProperty(be,"defaultAbiCoder",{enumerable:!0,get:function(){return E.defaultAbiCoder}}),Object.defineProperty(be,"ErrorFragment",{enumerable:!0,get:function(){return E.ErrorFragment}}),Object.defineProperty(be,"EventFragment",{enumerable:!0,get:function(){return E.EventFragment}}),Object.defineProperty(be,"FormatTypes",{enumerable:!0,get:function(){return E.FormatTypes}}),Object.defineProperty(be,"Fragment",{enumerable:!0,get:function(){return E.Fragment}}),Object.defineProperty(be,"FunctionFragment",{enumerable:!0,get:function(){return E.FunctionFragment}}),Object.defineProperty(be,"Indexed",{enumerable:!0,get:function(){return E.Indexed}}),Object.defineProperty(be,"Interface",{enumerable:!0,get:function(){return E.Interface}}),Object.defineProperty(be,"LogDescription",{enumerable:!0,get:function(){return E.LogDescription}}),Object.defineProperty(be,"ParamType",{enumerable:!0,get:function(){return E.ParamType}}),Object.defineProperty(be,"TransactionDescription",{enumerable:!0,get:function(){return E.TransactionDescription}});var d=Y(2885);Object.defineProperty(be,"getAddress",{enumerable:!0,get:function(){return d.getAddress}}),Object.defineProperty(be,"getCreate2Address",{enumerable:!0,get:function(){return d.getCreate2Address}}),Object.defineProperty(be,"getContractAddress",{enumerable:!0,get:function(){return d.getContractAddress}}),Object.defineProperty(be,"getIcapAddress",{enumerable:!0,get:function(){return d.getIcapAddress}}),Object.defineProperty(be,"isAddress",{enumerable:!0,get:function(){return d.isAddress}});var x=O(Y(67711));be.base64=x;var f=Y(53744);Object.defineProperty(be,"base58",{enumerable:!0,get:function(){return f.Base58}});var T=Y(61488);Object.defineProperty(be,"arrayify",{enumerable:!0,get:function(){return T.arrayify}}),Object.defineProperty(be,"concat",{enumerable:!0,get:function(){return T.concat}}),Object.defineProperty(be,"hexConcat",{enumerable:!0,get:function(){return T.hexConcat}}),Object.defineProperty(be,"hexDataSlice",{enumerable:!0,get:function(){return T.hexDataSlice}}),Object.defineProperty(be,"hexDataLength",{enumerable:!0,get:function(){return T.hexDataLength}}),Object.defineProperty(be,"hexlify",{enumerable:!0,get:function(){return T.hexlify}}),Object.defineProperty(be,"hexStripZeros",{enumerable:!0,get:function(){return T.hexStripZeros}}),Object.defineProperty(be,"hexValue",{enumerable:!0,get:function(){return T.hexValue}}),Object.defineProperty(be,"hexZeroPad",{enumerable:!0,get:function(){return T.hexZeroPad}}),Object.defineProperty(be,"isBytes",{enumerable:!0,get:function(){return T.isBytes}}),Object.defineProperty(be,"isBytesLike",{enumerable:!0,get:function(){return T.isBytesLike}}),Object.defineProperty(be,"isHexString",{enumerable:!0,get:function(){return T.isHexString}}),Object.defineProperty(be,"joinSignature",{enumerable:!0,get:function(){return T.joinSignature}}),Object.defineProperty(be,"zeroPad",{enumerable:!0,get:function(){return T.zeroPad}}),Object.defineProperty(be,"splitSignature",{enumerable:!0,get:function(){return T.splitSignature}}),Object.defineProperty(be,"stripZeros",{enumerable:!0,get:function(){return T.stripZeros}});var g=Y(778);Object.defineProperty(be,"_TypedDataEncoder",{enumerable:!0,get:function(){return g._TypedDataEncoder}}),Object.defineProperty(be,"dnsEncode",{enumerable:!0,get:function(){return g.dnsEncode}}),Object.defineProperty(be,"hashMessage",{enumerable:!0,get:function(){return g.hashMessage}}),Object.defineProperty(be,"id",{enumerable:!0,get:function(){return g.id}}),Object.defineProperty(be,"isValidName",{enumerable:!0,get:function(){return g.isValidName}}),Object.defineProperty(be,"namehash",{enumerable:!0,get:function(){return g.namehash}});var b=Y(49593);Object.defineProperty(be,"defaultPath",{enumerable:!0,get:function(){return b.defaultPath}}),Object.defineProperty(be,"entropyToMnemonic",{enumerable:!0,get:function(){return b.entropyToMnemonic}}),Object.defineProperty(be,"getAccountPath",{enumerable:!0,get:function(){return b.getAccountPath}}),Object.defineProperty(be,"HDNode",{enumerable:!0,get:function(){return b.HDNode}}),Object.defineProperty(be,"isValidMnemonic",{enumerable:!0,get:function(){return b.isValidMnemonic}}),Object.defineProperty(be,"mnemonicToEntropy",{enumerable:!0,get:function(){return b.mnemonicToEntropy}}),Object.defineProperty(be,"mnemonicToSeed",{enumerable:!0,get:function(){return b.mnemonicToSeed}});var l=Y(53746);Object.defineProperty(be,"getJsonWalletAddress",{enumerable:!0,get:function(){return l.getJsonWalletAddress}});var h=Y(28518);Object.defineProperty(be,"keccak256",{enumerable:!0,get:function(){return h.keccak256}});var u=Y(53898);Object.defineProperty(be,"Logger",{enumerable:!0,get:function(){return u.Logger}});var m=Y(67591);Object.defineProperty(be,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(be,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(be,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(be,"sha512",{enumerable:!0,get:function(){return m.sha512}});var _=Y(37979);Object.defineProperty(be,"solidityKeccak256",{enumerable:!0,get:function(){return _.keccak256}}),Object.defineProperty(be,"solidityPack",{enumerable:!0,get:function(){return _.pack}}),Object.defineProperty(be,"soliditySha256",{enumerable:!0,get:function(){return _.sha256}});var w=Y(8859);Object.defineProperty(be,"randomBytes",{enumerable:!0,get:function(){return w.randomBytes}}),Object.defineProperty(be,"shuffled",{enumerable:!0,get:function(){return w.shuffled}});var S=Y(92275);Object.defineProperty(be,"checkProperties",{enumerable:!0,get:function(){return S.checkProperties}}),Object.defineProperty(be,"deepCopy",{enumerable:!0,get:function(){return S.deepCopy}}),Object.defineProperty(be,"defineReadOnly",{enumerable:!0,get:function(){return S.defineReadOnly}}),Object.defineProperty(be,"getStatic",{enumerable:!0,get:function(){return S.getStatic}}),Object.defineProperty(be,"resolveProperties",{enumerable:!0,get:function(){return S.resolveProperties}}),Object.defineProperty(be,"shallowCopy",{enumerable:!0,get:function(){return S.shallowCopy}});var I=O(Y(29276));be.RLP=I;var P=Y(99596);Object.defineProperty(be,"computePublicKey",{enumerable:!0,get:function(){return P.computePublicKey}}),Object.defineProperty(be,"recoverPublicKey",{enumerable:!0,get:function(){return P.recoverPublicKey}}),Object.defineProperty(be,"SigningKey",{enumerable:!0,get:function(){return P.SigningKey}});var L=Y(46956);Object.defineProperty(be,"formatBytes32String",{enumerable:!0,get:function(){return L.formatBytes32String}}),Object.defineProperty(be,"nameprep",{enumerable:!0,get:function(){return L.nameprep}}),Object.defineProperty(be,"parseBytes32String",{enumerable:!0,get:function(){return L.parseBytes32String}}),Object.defineProperty(be,"_toEscapedUtf8String",{enumerable:!0,get:function(){return L._toEscapedUtf8String}}),Object.defineProperty(be,"toUtf8Bytes",{enumerable:!0,get:function(){return L.toUtf8Bytes}}),Object.defineProperty(be,"toUtf8CodePoints",{enumerable:!0,get:function(){return L.toUtf8CodePoints}}),Object.defineProperty(be,"toUtf8String",{enumerable:!0,get:function(){return L.toUtf8String}}),Object.defineProperty(be,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return L.Utf8ErrorFuncs}});var V=Y(32701);Object.defineProperty(be,"accessListify",{enumerable:!0,get:function(){return V.accessListify}}),Object.defineProperty(be,"computeAddress",{enumerable:!0,get:function(){return V.computeAddress}}),Object.defineProperty(be,"parseTransaction",{enumerable:!0,get:function(){return V.parse}}),Object.defineProperty(be,"recoverAddress",{enumerable:!0,get:function(){return V.recoverAddress}}),Object.defineProperty(be,"serializeTransaction",{enumerable:!0,get:function(){return V.serialize}}),Object.defineProperty(be,"TransactionTypes",{enumerable:!0,get:function(){return V.TransactionTypes}});var W=Y(2519);Object.defineProperty(be,"commify",{enumerable:!0,get:function(){return W.commify}}),Object.defineProperty(be,"formatEther",{enumerable:!0,get:function(){return W.formatEther}}),Object.defineProperty(be,"parseEther",{enumerable:!0,get:function(){return W.parseEther}}),Object.defineProperty(be,"formatUnits",{enumerable:!0,get:function(){return W.formatUnits}}),Object.defineProperty(be,"parseUnits",{enumerable:!0,get:function(){return W.parseUnits}});var G=Y(6846);Object.defineProperty(be,"verifyMessage",{enumerable:!0,get:function(){return G.verifyMessage}}),Object.defineProperty(be,"verifyTypedData",{enumerable:!0,get:function(){return G.verifyTypedData}});var H=Y(51838);Object.defineProperty(be,"_fetchData",{enumerable:!0,get:function(){return H._fetchData}}),Object.defineProperty(be,"fetchJson",{enumerable:!0,get:function(){return H.fetchJson}}),Object.defineProperty(be,"poll",{enumerable:!0,get:function(){return H.poll}});var j=Y(67591);Object.defineProperty(be,"SupportedAlgorithm",{enumerable:!0,get:function(){return j.SupportedAlgorithm}});var K=Y(46956);Object.defineProperty(be,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return K.UnicodeNormalizationForm}}),Object.defineProperty(be,"Utf8ErrorReason",{enumerable:!0,get:function(){return K.Utf8ErrorReason}})},67711:(bt,be,Y)=>{"use strict";Y.r(be),Y.d(be,{decode:()=>q,encode:()=>O});var ie=Y(61488);function q(E){E=atob(E);const d=[];for(let x=0;x{"use strict";var be=Object.prototype.hasOwnProperty,Y="~";function ie(){}function q(x,f,T){this.fn=x,this.context=f,this.once=T||!1}function O(x,f,T,g,b){if("function"!=typeof T)throw new TypeError("The listener must be a function");var l=new q(T,g||x,b),h=Y?Y+f:f;return x._events[h]?x._events[h].fn?x._events[h]=[x._events[h],l]:x._events[h].push(l):(x._events[h]=l,x._eventsCount++),x}function E(x,f){0==--x._eventsCount?x._events=new ie:delete x._events[f]}function d(){this._events=new ie,this._eventsCount=0}Object.create&&(ie.prototype=Object.create(null),(new ie).__proto__||(Y=!1)),d.prototype.eventNames=function(){var T,g,f=[];if(0===this._eventsCount)return f;for(g in T=this._events)be.call(T,g)&&f.push(Y?g.slice(1):g);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(T)):f},d.prototype.listeners=function(f){var g=this._events[Y?Y+f:f];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,l=g.length,h=new Array(l);b{"use strict";var ie,be="object"==typeof Reflect?Reflect:null,Y=be&&"function"==typeof be.apply?be.apply:function(L,V,W){return Function.prototype.apply.call(L,V,W)};ie=be&&"function"==typeof be.ownKeys?be.ownKeys:Object.getOwnPropertySymbols?function(L){return Object.getOwnPropertyNames(L).concat(Object.getOwnPropertySymbols(L))}:function(L){return Object.getOwnPropertyNames(L)};var O=Number.isNaN||function(L){return L!=L};function E(){E.init.call(this)}bt.exports=E,bt.exports.once=function(P,L){return new Promise(function(V,W){function G(j){P.removeListener(L,H),W(j)}function H(){"function"==typeof P.removeListener&&P.removeListener("error",G),V([].slice.call(arguments))}I(P,L,H,{once:!0}),"error"!==L&&function(P,L,V){"function"==typeof P.on&&I(P,"error",L,{once:!0})}(P,G)})},E.EventEmitter=E,E.prototype._events=void 0,E.prototype._eventsCount=0,E.prototype._maxListeners=void 0;var d=10;function x(P){if("function"!=typeof P)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}function f(P){return void 0===P._maxListeners?E.defaultMaxListeners:P._maxListeners}function T(P,L,V,W){var G,H,j;if(x(V),void 0===(H=P._events)?(H=P._events=Object.create(null),P._eventsCount=0):(void 0!==H.newListener&&(P.emit("newListener",L,V.listener?V.listener:V),H=P._events),j=H[L]),void 0===j)j=H[L]=V,++P._eventsCount;else if("function"==typeof j?j=H[L]=W?[V,j]:[j,V]:W?j.unshift(V):j.push(V),(G=f(P))>0&&j.length>G&&!j.warned){j.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=P,K.type=L,K.count=j.length,function(P){console&&console.warn&&console.warn(P)}(K)}return P}function g(){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 b(P,L,V){var W={fired:!1,wrapFn:void 0,target:P,type:L,listener:V},G=g.bind(W);return G.listener=V,W.wrapFn=G,G}function l(P,L,V){var W=P._events;if(void 0===W)return[];var G=W[L];return void 0===G?[]:"function"==typeof G?V?[G.listener||G]:[G]:V?function(P){for(var L=new Array(P.length),V=0;V0&&(j=V[0]),j instanceof Error)throw j;var K=new Error("Unhandled error."+(j?" ("+j.message+")":""));throw K.context=j,K}var R=H[L];if(void 0===R)return!1;if("function"==typeof R)Y(R,this,V);else{var o=R.length,y=u(R,o);for(W=0;W=0;j--)if(W[j]===V||W[j].listener===V){K=W[j].listener,H=j;break}if(H<0)return this;0===H?W.shift():function(P,L){for(;L+1=0;G--)this.removeListener(L,V[G]);return this},E.prototype.listeners=function(L){return l(this,L,!0)},E.prototype.rawListeners=function(L){return l(this,L,!1)},E.listenerCount=function(P,L){return"function"==typeof P.listenerCount?P.listenerCount(L):h.call(P,L)},E.prototype.listenerCount=h,E.prototype.eventNames=function(){return this._eventsCount>0?ie(this._events):[]}},92367:(bt,be,Y)=>{var ie=Y(55859).Buffer,q=Y(53264);bt.exports=function(E,d,x,f){if(ie.isBuffer(E)||(E=ie.from(E,"binary")),d&&(ie.isBuffer(d)||(d=ie.from(d,"binary")),8!==d.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var T=x/8,g=ie.alloc(T),b=ie.alloc(f||0),l=ie.alloc(0);T>0||f>0;){var h=new q;h.update(l),h.update(E),d&&h.update(d),l=h.digest();var u=0;if(T>0){var m=g.length-T;u=Math.min(T,l.length),l.copy(g,m,0,u),T-=u}if(u0){var _=b.length-f,w=Math.min(f,l.length-u);l.copy(b,_,u,u+w),f-=w}}return l.fill(0),{key:g,iv:b}}},51669:bt=>{"use strict";bt.exports=function(Y){var q=Y.name,O=Y.type;this.uri=Y.uri,this.name=q,this.type=O}},66795:(bt,be,Y)=>{"use strict";var ie=Y(26046);bt.exports=function q(O,E,d){void 0===E&&(E=""),void 0===d&&(d=ie);var x,f=new Map;function T(h,u){var m=f.get(u);m?m.push.apply(m,h):f.set(u,h)}if(d(O))x=null,T([E],O);else{var g=E?E+".":"";if("undefined"!=typeof FileList&&O instanceof FileList)x=Array.prototype.map.call(O,function(h,u){return T([""+g+u],h),null});else if(Array.isArray(O))x=O.map(function(h,u){var m=q(h,""+g+u,d);return m.files.forEach(T),m.clone});else if(O&&O.constructor===Object)for(var b in x={},O){var l=q(O[b],""+g+b,d);l.files.forEach(T),x[b]=l.clone}else x=O}return{clone:x,files:f}}},58673:(bt,be,Y)=>{"use strict";be.ReactNativeFile=Y(51669),be.extractFiles=Y(66795),be.isExtractableFile=Y(26046)},26046:(bt,be,Y)=>{"use strict";var ie=Y(51669);bt.exports=function(O){return"undefined"!=typeof File&&O instanceof File||"undefined"!=typeof Blob&&O instanceof Blob||O instanceof ie}},10979:bt=>{"use strict";bt.exports=function(be,Y){for(var ie={},q=Object.keys(be),O=Array.isArray(Y),E=0;E{bt.exports="object"==typeof self?self.FormData:window.FormData},31609:bt=>{"use strict";var be="Function.prototype.bind called on incompatible ",Y=Array.prototype.slice,ie=Object.prototype.toString,q="[object Function]";bt.exports=function(E){var d=this;if("function"!=typeof d||ie.call(d)!==q)throw new TypeError(be+d);for(var f,x=Y.call(arguments,1),T=function(){if(this instanceof f){var u=d.apply(this,x.concat(Y.call(arguments)));return Object(u)===u?u:this}return d.apply(E,x.concat(Y.call(arguments)))},g=Math.max(0,d.length-x.length),b=[],l=0;l{"use strict";var ie=Y(31609);bt.exports=Function.prototype.bind||ie},18540:(bt,be,Y)=>{"use strict";var ie,q=SyntaxError,O=Function,E=TypeError,d=function(y){try{return O('"use strict"; return ('+y+").constructor;")()}catch{}},x=Object.getOwnPropertyDescriptor;if(x)try{x({},"")}catch{x=null}var f=function(){throw new E},T=x?function(){try{return f}catch{try{return x(arguments,"callee").get}catch{return f}}}():f,g=Y(59326)(),b=Y(41606)(),l=Object.getPrototypeOf||(b?function(y){return y.__proto__}:null),h={},u="undefined"!=typeof Uint8Array&&l?l(Uint8Array):ie,m={"%AggregateError%":"undefined"==typeof AggregateError?ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ie:ArrayBuffer,"%ArrayIteratorPrototype%":g&&l?l([][Symbol.iterator]()):ie,"%AsyncFromSyncIteratorPrototype%":ie,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?ie:Atomics,"%BigInt%":"undefined"==typeof BigInt?ie:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?ie:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?ie:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ie:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ie:FinalizationRegistry,"%Function%":O,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?ie:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ie:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&l?l(l([][Symbol.iterator]())):ie,"%JSON%":"object"==typeof JSON?JSON:ie,"%Map%":"undefined"==typeof Map?ie:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&l?l((new Map)[Symbol.iterator]()):ie,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ie:Promise,"%Proxy%":"undefined"==typeof Proxy?ie:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?ie:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ie:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&l?l((new Set)[Symbol.iterator]()):ie,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&l?l(""[Symbol.iterator]()):ie,"%Symbol%":g?Symbol:ie,"%SyntaxError%":q,"%ThrowTypeError%":T,"%TypedArray%":u,"%TypeError%":E,"%Uint8Array%":"undefined"==typeof Uint8Array?ie:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ie:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ie:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ie:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?ie:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ie:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ie:WeakSet};if(l)try{null.error}catch(y){var _=l(l(y));m["%Error.prototype%"]=_}var w=function y(M){var v;if("%AsyncFunction%"===M)v=d("async function () {}");else if("%GeneratorFunction%"===M)v=d("function* () {}");else if("%AsyncGeneratorFunction%"===M)v=d("async function* () {}");else if("%AsyncGenerator%"===M){var k=y("%AsyncGeneratorFunction%");k&&(v=k.prototype)}else if("%AsyncIteratorPrototype%"===M){var D=y("%AsyncGenerator%");D&&l&&(v=l(D.prototype))}return m[M]=v,v},S={"%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"]},I=Y(75396),P=Y(57709),L=I.call(Function.call,Array.prototype.concat),V=I.call(Function.apply,Array.prototype.splice),W=I.call(Function.call,String.prototype.replace),G=I.call(Function.call,String.prototype.slice),H=I.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,R=function(M){var v=G(M,0,1),k=G(M,-1);if("%"===v&&"%"!==k)throw new q("invalid intrinsic syntax, expected closing `%`");if("%"===k&&"%"!==v)throw new q("invalid intrinsic syntax, expected opening `%`");var D=[];return W(M,j,function(N,C,a,B){D[D.length]=a?W(B,K,"$1"):C||N}),D},o=function(M,v){var D,k=M;if(P(S,k)&&(k="%"+(D=S[k])[0]+"%"),P(m,k)){var N=m[k];if(N===h&&(N=w(k)),void 0===N&&!v)throw new E("intrinsic "+M+" exists, but is not available. Please file an issue!");return{alias:D,name:k,value:N}}throw new q("intrinsic "+M+" does not exist!")};bt.exports=function(M,v){if("string"!=typeof M||0===M.length)throw new E("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof v)throw new E('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,M))throw new q("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var k=R(M),D=k.length>0?k[0]:"",N=o("%"+D+"%",v),C=N.name,a=N.value,B=!1,Q=N.alias;Q&&(D=Q[0],V(k,L([0,1],Q)));for(var ee=1,ce=!0;ee=k.length){var Te=x(a,ue);a=(ce=!!Te)&&"get"in Te&&!("originalValue"in Te.get)?Te.get:a[ue]}else ce=P(a,ue),a=a[ue];ce&&!B&&(m[C]=a)}}return a}},72353:function(bt,be,Y){"use strict";var ie=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(be,"__esModule",{value:!0});var q=Y(58673),O=ie(Y(27012)),E=Y(30212),d=function(f){return q.isExtractableFile(f)||null!==f&&"object"==typeof f&&"function"==typeof f.pipe};be.default=function(f,T,g,b){void 0===b&&(b=E.defaultJsonSerializer);var l=q.extractFiles({query:f,variables:T,operationName:g},"",d),h=l.clone,u=l.files;if(0===u.size){if(!Array.isArray(f))return b.stringify(h);if(void 0!==T&&!Array.isArray(T))throw new Error("Cannot create request body with given variable type, array expected");var m=f.reduce(function(P,L,V){return P.push({query:L,variables:T?T[V]:void 0}),P},[]);return b.stringify(m)}var w=new("undefined"==typeof FormData?O.default:FormData);w.append("operations",b.stringify(h));var S={},I=0;return u.forEach(function(P){S[++I]=P}),w.append("map",b.stringify(S)),I=0,u.forEach(function(P,L){w.append(""+ ++I,L)}),w}},30212:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.defaultJsonSerializer=void 0,be.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify}},24145:function(bt,be,Y){"use strict";var ie=this&&this.__assign||function(){return ie=Object.assign||function(W){for(var G,H=1,j=arguments.length;H0&&R[R.length-1])&&(6===v[0]||2===v[0])){H=0;continue}if(3===v[0]&&(!R||v[1]>R[0]&&v[1]0&&ee[ee.length-1])&&(6===ae[0]||2===ae[0])){a=0;continue}if(3===ae[0]&&(!ee||ae[1]>ee[0]&&ae[1]{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.parseBatchRequestsExtendedArgs=be.parseRawRequestExtendedArgs=be.parseRequestExtendedArgs=be.parseBatchRequestArgs=be.parseRawRequestArgs=be.parseRequestArgs=void 0,be.parseRequestArgs=function(x,f,T){return x.document?x:{document:x,variables:f,requestHeaders:T,signal:void 0}},be.parseRawRequestArgs=function(x,f,T){return x.query?x:{query:x,variables:f,requestHeaders:T,signal:void 0}},be.parseBatchRequestArgs=function(x,f){return x.documents?x:{documents:x,requestHeaders:f,signal:void 0}},be.parseRequestExtendedArgs=function(x,f,T,g){return x.document?x:{url:x,document:f,variables:T,requestHeaders:g,signal:void 0}},be.parseRawRequestExtendedArgs=function(x,f,T,g){return x.query?x:{url:x,query:f,variables:T,requestHeaders:g,signal:void 0}},be.parseBatchRequestsExtendedArgs=function(x,f,T){return x.documents?x:{url:x,documents:f,requestHeaders:T,signal:void 0}}},37439:function(bt,be){"use strict";var q,Y=this&&this.__extends||(q=function(O,E){return(q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,x){d.__proto__=x}||function(d,x){for(var f in x)Object.prototype.hasOwnProperty.call(x,f)&&(d[f]=x[f])})(O,E)},function(O,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function d(){this.constructor=O}q(O,E),O.prototype=null===E?Object.create(E):(d.prototype=E.prototype,new d)});Object.defineProperty(be,"__esModule",{value:!0}),be.ClientError=void 0;var ie=function(q){function O(E,d){var x=this,f=O.extractMessage(E)+": "+JSON.stringify({response:E,request:d});return x=q.call(this,f)||this,Object.setPrototypeOf(x,O.prototype),x.response=E,x.request=d,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(x,O),x}return Y(O,q),O.extractMessage=function(E){try{return E.errors[0].message}catch{return"GraphQL Error (Code: "+E.status+")"}},O}(Error);be.ClientError=ie},41606:bt=>{"use strict";var be={foo:{}},Y=Object;bt.exports=function(){return{__proto__:be}.foo===be.foo&&!({__proto__:null}instanceof Y)}},59326:(bt,be,Y)=>{"use strict";var ie="undefined"!=typeof Symbol&&Symbol,q=Y(79045);bt.exports=function(){return"function"==typeof ie&&"function"==typeof Symbol&&"symbol"==typeof ie("foo")&&"symbol"==typeof Symbol("bar")&&q()}},79045:bt=>{"use strict";bt.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var Y={},ie=Symbol("test"),q=Object(ie);if("string"==typeof ie||"[object Symbol]"!==Object.prototype.toString.call(ie)||"[object Symbol]"!==Object.prototype.toString.call(q))return!1;for(ie in Y[ie]=42,Y)return!1;if("function"==typeof Object.keys&&0!==Object.keys(Y).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(Y).length)return!1;var E=Object.getOwnPropertySymbols(Y);if(1!==E.length||E[0]!==ie||!Object.prototype.propertyIsEnumerable.call(Y,ie))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var d=Object.getOwnPropertyDescriptor(Y,ie);if(42!==d.value||!0!==d.enumerable)return!1}return!0}},57709:(bt,be,Y)=>{"use strict";var ie=Y(75396);bt.exports=ie.call(Function.call,Object.prototype.hasOwnProperty)},5414:(bt,be,Y)=>{"use strict";var ie=Y(55859).Buffer,q=Y(18300).Transform;function d(x){q.call(this),this._block=ie.allocUnsafe(x),this._blockSize=x,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Y(59879)(d,q),d.prototype._transform=function(x,f,T){var g=null;try{this.update(x,f)}catch(b){g=b}T(g)},d.prototype._flush=function(x){var f=null;try{this.push(this.digest())}catch(T){f=T}x(f)},d.prototype.update=function(x,f){if(function(x,f){if(!ie.isBuffer(x)&&"string"!=typeof x)throw new TypeError("Data must be a string or a buffer")}(x),this._finalized)throw new Error("Digest already called");ie.isBuffer(x)||(x=ie.from(x,f));for(var T=this._block,g=0;this._blockOffset+x.length-g>=this._blockSize;){for(var b=this._blockOffset;b0;++l)this._length[l]+=h,(h=this._length[l]/4294967296|0)>0&&(this._length[l]-=4294967296*h);return this},d.prototype._update=function(){throw new Error("_update is not implemented")},d.prototype.digest=function(x){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var f=this._digest();void 0!==x&&(f=f.toString(x)),this._block.fill(0),this._blockOffset=0;for(var T=0;T<4;++T)this._length[T]=0;return f},d.prototype._digest=function(){throw new Error("_digest is not implemented")},bt.exports=d},37909:(bt,be,Y)=>{var ie=be;ie.utils=Y(8291),ie.common=Y(21393),ie.sha=Y(72221),ie.ripemd=Y(41960),ie.hmac=Y(51905),ie.sha1=ie.sha.sha1,ie.sha256=ie.sha.sha256,ie.sha224=ie.sha.sha224,ie.sha384=ie.sha.sha384,ie.sha512=ie.sha.sha512,ie.ripemd160=ie.ripemd.ripemd160},21393:(bt,be,Y)=>{"use strict";var ie=Y(8291),q=Y(86055);function O(){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}be.BlockHash=O,O.prototype.update=function(d,x){if(d=ie.toArray(d,x),this.pending=this.pending?this.pending.concat(d):d,this.pendingTotal+=d.length,this.pending.length>=this._delta8){var f=(d=this.pending).length%this._delta8;this.pending=d.slice(d.length-f,d.length),0===this.pending.length&&(this.pending=null),d=ie.join32(d,0,d.length-f,this.endian);for(var T=0;T>>24&255,T[g++]=d>>>16&255,T[g++]=d>>>8&255,T[g++]=255&d}else for(T[g++]=255&d,T[g++]=d>>>8&255,T[g++]=d>>>16&255,T[g++]=d>>>24&255,T[g++]=0,T[g++]=0,T[g++]=0,T[g++]=0,b=8;b{"use strict";var ie=Y(8291),q=Y(86055);function O(E,d,x){if(!(this instanceof O))return new O(E,d,x);this.Hash=E,this.blockSize=E.blockSize/8,this.outSize=E.outSize/8,this.inner=null,this.outer=null,this._init(ie.toArray(d,x))}bt.exports=O,O.prototype._init=function(d){d.length>this.blockSize&&(d=(new this.Hash).update(d).digest()),q(d.length<=this.blockSize);for(var x=d.length;x{"use strict";var ie=Y(8291),q=Y(21393),O=ie.rotl32,E=ie.sum32,d=ie.sum32_3,x=ie.sum32_4,f=q.BlockHash;function T(){if(!(this instanceof T))return new T;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function g(w,S,I,P){return w<=15?S^I^P:w<=31?S&I|~S&P:w<=47?(S|~I)^P:w<=63?S&P|I&~P:S^(I|~P)}function l(w){return w<=15?1352829926:w<=31?1548603684:w<=47?1836072691:w<=63?2053994217:0}ie.inherits(T,f),be.ripemd160=T,T.blockSize=512,T.outSize=160,T.hmacStrength=192,T.padLength=64,T.prototype._update=function(S,I){for(var P=this.h[0],L=this.h[1],V=this.h[2],W=this.h[3],G=this.h[4],H=P,j=L,K=V,R=W,o=G,y=0;y<80;y++){var M=E(O(x(P,g(y,L,V,W),S[h[y]+I],(w=y)<=15?0:w<=31?1518500249:w<=47?1859775393:w<=63?2400959708:2840853838),m[y]),G);P=G,G=W,W=O(V,10),V=L,L=M,M=E(O(x(H,g(79-y,j,K,R),S[u[y]+I],l(y)),_[y]),o),H=o,o=R,R=O(K,10),K=j,j=M}var w;M=d(this.h[1],V,R),this.h[1]=d(this.h[2],W,o),this.h[2]=d(this.h[3],G,H),this.h[3]=d(this.h[4],P,j),this.h[4]=d(this.h[0],L,K),this.h[0]=M},T.prototype._digest=function(S){return"hex"===S?ie.toHex32(this.h,"little"):ie.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],u=[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],m=[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],_=[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]},72221:(bt,be,Y)=>{"use strict";be.sha1=Y(63605),be.sha224=Y(29643),be.sha256=Y(66021),be.sha384=Y(3513),be.sha512=Y(54958)},63605:(bt,be,Y)=>{"use strict";var ie=Y(8291),q=Y(21393),O=Y(48491),E=ie.rotl32,d=ie.sum32,x=ie.sum32_5,f=O.ft_1,T=q.BlockHash,g=[1518500249,1859775393,2400959708,3395469782];function b(){if(!(this instanceof b))return new b;T.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ie.inherits(b,T),bt.exports=b,b.blockSize=512,b.outSize=160,b.hmacStrength=80,b.padLength=64,b.prototype._update=function(h,u){for(var m=this.W,_=0;_<16;_++)m[_]=h[u+_];for(;_{"use strict";var ie=Y(8291),q=Y(66021);function O(){if(!(this instanceof O))return new O;q.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ie.inherits(O,q),bt.exports=O,O.blockSize=512,O.outSize=224,O.hmacStrength=192,O.padLength=64,O.prototype._digest=function(d){return"hex"===d?ie.toHex32(this.h.slice(0,7),"big"):ie.split32(this.h.slice(0,7),"big")}},66021:(bt,be,Y)=>{"use strict";var ie=Y(8291),q=Y(21393),O=Y(48491),E=Y(86055),d=ie.sum32,x=ie.sum32_4,f=ie.sum32_5,T=O.ch32,g=O.maj32,b=O.s0_256,l=O.s1_256,h=O.g0_256,u=O.g1_256,m=q.BlockHash,_=[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 w(){if(!(this instanceof w))return new w;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=_,this.W=new Array(64)}ie.inherits(w,m),bt.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(I,P){for(var L=this.W,V=0;V<16;V++)L[V]=I[P+V];for(;V{"use strict";var ie=Y(8291),q=Y(54958);function O(){if(!(this instanceof O))return new O;q.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}ie.inherits(O,q),bt.exports=O,O.blockSize=1024,O.outSize=384,O.hmacStrength=192,O.padLength=128,O.prototype._digest=function(d){return"hex"===d?ie.toHex32(this.h.slice(0,12),"big"):ie.split32(this.h.slice(0,12),"big")}},54958:(bt,be,Y)=>{"use strict";var ie=Y(8291),q=Y(21393),O=Y(86055),E=ie.rotr64_hi,d=ie.rotr64_lo,x=ie.shr64_hi,f=ie.shr64_lo,T=ie.sum64,g=ie.sum64_hi,b=ie.sum64_lo,l=ie.sum64_4_hi,h=ie.sum64_4_lo,u=ie.sum64_5_hi,m=ie.sum64_5_lo,_=q.BlockHash,w=[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 S(){if(!(this instanceof S))return new S;_.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}function I(M,v,k,D,N){var C=M&k^~M&N;return C<0&&(C+=4294967296),C}function P(M,v,k,D,N,C){var a=v&D^~v&C;return a<0&&(a+=4294967296),a}function L(M,v,k,D,N){var C=M&k^M&N^k&N;return C<0&&(C+=4294967296),C}function V(M,v,k,D,N,C){var a=v&D^v&C^D&C;return a<0&&(a+=4294967296),a}function W(M,v){var C=E(M,v,28)^E(v,M,2)^E(v,M,7);return C<0&&(C+=4294967296),C}function G(M,v){var C=d(M,v,28)^d(v,M,2)^d(v,M,7);return C<0&&(C+=4294967296),C}function H(M,v){var C=E(M,v,14)^E(M,v,18)^E(v,M,9);return C<0&&(C+=4294967296),C}function j(M,v){var C=d(M,v,14)^d(M,v,18)^d(v,M,9);return C<0&&(C+=4294967296),C}function K(M,v){var C=E(M,v,1)^E(M,v,8)^x(M,v,7);return C<0&&(C+=4294967296),C}function R(M,v){var C=d(M,v,1)^d(M,v,8)^f(M,v,7);return C<0&&(C+=4294967296),C}function o(M,v){var C=E(M,v,19)^E(v,M,29)^x(M,v,6);return C<0&&(C+=4294967296),C}function y(M,v){var C=d(M,v,19)^d(v,M,29)^f(M,v,6);return C<0&&(C+=4294967296),C}ie.inherits(S,_),bt.exports=S,S.blockSize=1024,S.outSize=512,S.hmacStrength=192,S.padLength=128,S.prototype._prepareBlock=function(v,k){for(var D=this.W,N=0;N<32;N++)D[N]=v[k+N];for(;N{"use strict";var q=Y(8291).rotr32;function E(l,h,u){return l&h^~l&u}function d(l,h,u){return l&h^l&u^h&u}function x(l,h,u){return l^h^u}be.ft_1=function(l,h,u,m){return 0===l?E(h,u,m):1===l||3===l?x(h,u,m):2===l?d(h,u,m):void 0},be.ch32=E,be.maj32=d,be.p32=x,be.s0_256=function(l){return q(l,2)^q(l,13)^q(l,22)},be.s1_256=function(l){return q(l,6)^q(l,11)^q(l,25)},be.g0_256=function(l){return q(l,7)^q(l,18)^l>>>3},be.g1_256=function(l){return q(l,17)^q(l,19)^l>>>10}},8291:(bt,be,Y)=>{"use strict";var ie=Y(86055),q=Y(59879);function O(y,M){return!(55296!=(64512&y.charCodeAt(M))||M<0||M+1>=y.length)&&56320==(64512&y.charCodeAt(M+1))}function x(y){return(y>>>24|y>>>8&65280|y<<8&16711680|(255&y)<<24)>>>0}function T(y){return 1===y.length?"0"+y:y}function g(y){return 7===y.length?"0"+y:6===y.length?"00"+y:5===y.length?"000"+y:4===y.length?"0000"+y:3===y.length?"00000"+y:2===y.length?"000000"+y:1===y.length?"0000000"+y:y}be.inherits=q,be.toArray=function(y,M){if(Array.isArray(y))return y.slice();if(!y)return[];var v=[];if("string"==typeof y)if(M){if("hex"===M)for((y=y.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(y="0"+y),D=0;D>6|192,v[k++]=63&N|128):O(y,D)?(N=65536+((1023&N)<<10)+(1023&y.charCodeAt(++D)),v[k++]=N>>18|240,v[k++]=N>>12&63|128,v[k++]=N>>6&63|128,v[k++]=63&N|128):(v[k++]=N>>12|224,v[k++]=N>>6&63|128,v[k++]=63&N|128)}else for(D=0;D>>0;return N},be.split32=function(y,M){for(var v=new Array(4*y.length),k=0,D=0;k>>24,v[D+1]=N>>>16&255,v[D+2]=N>>>8&255,v[D+3]=255&N):(v[D+3]=N>>>24,v[D+2]=N>>>16&255,v[D+1]=N>>>8&255,v[D]=255&N)}return v},be.rotr32=function(y,M){return y>>>M|y<<32-M},be.rotl32=function(y,M){return y<>>32-M},be.sum32=function(y,M){return y+M>>>0},be.sum32_3=function(y,M,v){return y+M+v>>>0},be.sum32_4=function(y,M,v,k){return y+M+v+k>>>0},be.sum32_5=function(y,M,v,k,D){return y+M+v+k+D>>>0},be.sum64=function(y,M,v,k){var C=k+y[M+1]>>>0;y[M]=(C>>0,y[M+1]=C},be.sum64_hi=function(y,M,v,k){return(M+k>>>0>>0},be.sum64_lo=function(y,M,v,k){return M+k>>>0},be.sum64_4_hi=function(y,M,v,k,D,N,C,a){var B=0,Q=M;return B+=(Q=Q+k>>>0)>>0)>>0)>>0},be.sum64_4_lo=function(y,M,v,k,D,N,C,a){return M+k+N+a>>>0},be.sum64_5_hi=function(y,M,v,k,D,N,C,a,B,Q){var ee=0,ce=M;return ee+=(ce=ce+k>>>0)>>0)>>0)>>0)>>0},be.sum64_5_lo=function(y,M,v,k,D,N,C,a,B,Q){return M+k+N+a+Q>>>0},be.rotr64_hi=function(y,M,v){return(M<<32-v|y>>>v)>>>0},be.rotr64_lo=function(y,M,v){return(y<<32-v|M>>>v)>>>0},be.shr64_hi=function(y,M,v){return y>>>v},be.shr64_lo=function(y,M,v){return(y<<32-v|M>>>v)>>>0}},72730:(bt,be,Y)=>{"use strict";var ie=Y(37909),q=Y(14869),O=Y(86055);function E(d){if(!(this instanceof E))return new E(d);this.hash=d.hash,this.predResist=!!d.predResist,this.outLen=this.hash.outSize,this.minEntropy=d.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var x=q.toArray(d.entropy,d.entropyEnc||"hex"),f=q.toArray(d.nonce,d.nonceEnc||"hex"),T=q.toArray(d.pers,d.persEnc||"hex");O(x.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(x,f,T)}bt.exports=E,E.prototype._init=function(x,f,T){var g=x.concat(f).concat(T);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var b=0;b=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(x.concat(T||[])),this._reseed=1},E.prototype.generate=function(x,f,T,g){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof f&&(g=T,T=f,f=null),T&&(T=q.toArray(T,g||"hex"),this._update(T));for(var b=[];b.length{be.read=function(Y,ie,q,O,E){var d,x,f=8*E-O-1,T=(1<>1,b=-7,l=q?E-1:0,h=q?-1:1,u=Y[ie+l];for(l+=h,d=u&(1<<-b)-1,u>>=-b,b+=f;b>0;d=256*d+Y[ie+l],l+=h,b-=8);for(x=d&(1<<-b)-1,d>>=-b,b+=O;b>0;x=256*x+Y[ie+l],l+=h,b-=8);if(0===d)d=1-g;else{if(d===T)return x?NaN:1/0*(u?-1:1);x+=Math.pow(2,O),d-=g}return(u?-1:1)*x*Math.pow(2,d-O)},be.write=function(Y,ie,q,O,E,d){var x,f,T,g=8*d-E-1,b=(1<>1,h=23===E?Math.pow(2,-24)-Math.pow(2,-77):0,u=O?0:d-1,m=O?1:-1,_=ie<0||0===ie&&1/ie<0?1:0;for(ie=Math.abs(ie),isNaN(ie)||ie===1/0?(f=isNaN(ie)?1:0,x=b):(x=Math.floor(Math.log(ie)/Math.LN2),ie*(T=Math.pow(2,-x))<1&&(x--,T*=2),(ie+=x+l>=1?h/T:h*Math.pow(2,1-l))*T>=2&&(x++,T/=2),x+l>=b?(f=0,x=b):x+l>=1?(f=(ie*T-1)*Math.pow(2,E),x+=l):(f=ie*Math.pow(2,l-1)*Math.pow(2,E),x=0));E>=8;Y[q+u]=255&f,u+=m,f/=256,E-=8);for(x=x<0;Y[q+u]=255&x,u+=m,x/=256,g-=8);Y[q+u-m]|=128*_}},59879:bt=>{bt.exports="function"==typeof Object.create?function(Y,ie){ie&&(Y.super_=ie,Y.prototype=Object.create(ie.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}))}:function(Y,ie){if(ie){Y.super_=ie;var q=function(){};q.prototype=ie.prototype,Y.prototype=new q,Y.prototype.constructor=Y}}},18560:(bt,be,Y)=>{var ie=Y(31325).default;self,bt.exports=(()=>{return q={7629:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(9474),b=x(1687),l=x(8652),h=x(8160),u=x(3292),m=x(6354),_=x(8901),w=x(9708),S=x(6914),I=x(2294),P=x(6133),L=x(1152),V=x(8863),W=x(2036),G={Base:class{constructor(H){this.type=H,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new I.Ids,this._preferences=null,this._refs=new P.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return f("function"==typeof w.describe,"Manifest functionality disabled"),w.describe(this)}allow(){for(var H=arguments.length,j=new Array(H),K=0;K1&&void 0!==arguments[1]?arguments[1]:{};return f(void 0!==H,"Missing example"),h.assertOptions(j,["override"]),this._inner("examples",H,{single:!0,override:j.override})}external(H,j){return"object"==typeof H&&(f(!j,"Cannot combine options with description"),j=H.description,H=H.method),f("function"==typeof H,"Method must be a function"),f(void 0===j||j&&"string"==typeof j,"Description must be a non-empty string"),this._inner("externals",{method:H,description:j},{single:!0})}failover(H,j){return this._default("failover",H,j)}forbidden(){return this.presence("forbidden")}id(H){return H?(f("string"==typeof H,"id must be a non-empty string"),f(/^[^\.]+$/.test(H),"id cannot contain period character"),this.$_setFlag("id",H)):this.$_setFlag("id",void 0)}invalid(){for(var H=arguments.length,j=new Array(H),K=0;K0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof H,"Invalid mode:",H),this.$_setFlag("only",H)}optional(){return this.presence("optional")}prefs(H){f(H,"Missing preferences"),f(void 0===H.context,"Cannot override context"),f(void 0===H.externals,"Cannot override externals"),f(void 0===H.warnings,"Cannot override warnings"),f(void 0===H.debug,"Cannot override debug"),h.checkPreferences(H);const j=this.clone();return j._preferences=h.preferences(j._preferences,H),j}presence(H){return f(["optional","required","forbidden"].includes(H),"Unknown presence mode",H),this.$_setFlag("presence",H)}raw(){return this.$_setFlag("result",arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?void 0:"raw")}result(H){return f(["raw","strip"].includes(H),"Unknown result mode",H),this.$_setFlag("result",H)}required(){return this.presence("required")}strict(H){const j=this.clone();return j._preferences=h.preferences(j._preferences,{convert:void 0!==H&&!H}),j}strip(){return this.$_setFlag("result",arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?void 0:"strip")}tag(){for(var H=arguments.length,j=new Array(H),K=0;KR.keep||R.name!==K),j._singleRules.delete(K));for(const K of H._rules)H._definition.rules[K.method].multi||j._singleRules.set(K.name,K),j._rules.push(K);if(j._flags.empty&&H._flags.empty){j._flags.empty=j._flags.empty.concat(H._flags.empty);const K=Object.assign({},H._flags);delete K.empty,b(j._flags,K)}else if(H._flags.empty){j._flags.empty=H._flags.empty;const K=Object.assign({},H._flags);delete K.empty,b(j._flags,K)}else b(j._flags,H._flags);for(const K in H.$_terms){const R=H.$_terms[K];R?j.$_terms[K]=j.$_terms[K]?j.$_terms[K].concat(R):R.slice():j.$_terms[K]||(j.$_terms[K]=R)}return this.$_root._tracer&&this.$_root._tracer._combine(j,[this,H]),j.$_mutateRebuild()}extend(H){return f(!H.base,"Cannot extend type with another base"),_.type(this,H)}extract(H){return H=Array.isArray(H)?H:H.split("."),this._ids.reach(H)}fork(H,j){f(!this._inRuleset(),"Cannot fork inside a ruleset");let K=this;for(let R of[].concat(H))R=Array.isArray(R)?R:R.split("."),K=K._ids.fork(R,j,K);return K.$_temp.ruleset=!1,K}rule(H){const j=this._definition;h.assertOptions(H,Object.keys(j.modifiers)),f(!1!==this.$_temp.ruleset,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const K=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;f(K>=0&&KK.tailor(H),ref:!1}),j.$_temp.ruleset=!1,j.$_mutateRebuild()}tracer(){return L.location?L.location(this):this}validate(H,j){return V.entry(H,this,j)}validateAsync(H,j){return V.entryAsync(H,this,j)}$_addRule(H){"string"==typeof H&&(H={name:H}),f(H&&"object"==typeof H,"Invalid options"),f(H.name&&"string"==typeof H.name,"Invalid rule name");for(const y in H)f("_"!==y[0],"Cannot set private rule properties");const j=Object.assign({},H);j._resolve=[],j.method=j.method||j.name;const K=this._definition.rules[j.method],R=j.args;f(K,"Unknown rule",j.method);const o=this.clone();if(R){f(1===Object.keys(R).length||Object.keys(R).length===this._definition.rules[j.name].args.length,"Invalid rule definition for",this.type,j.name);for(const y in R){let M=R[y];if(K.argsByName){const v=K.argsByName.get(y);if(v.ref&&h.isResolvable(M))j._resolve.push(y),o.$_mutateRegister(M);else if(v.normalize&&(M=v.normalize(M),R[y]=M),v.assert){const k=h.validateArg(M,y,v);f(!k,k,"or reference")}}void 0!==M?R[y]=M:delete R[y]}}return K.multi||(o._ruleRemove(j.name,{clone:!1}),o._singleRules.set(j.name,j)),!1===o.$_temp.ruleset&&(o.$_temp.ruleset=null),K.priority?o._rules.unshift(j):o._rules.push(j),o}$_compile(H,j){return u.schema(this.$_root,H,j)}$_createError(H,j,K,R,o){let y=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const M=!1!==y.flags?this._flags:{},v=y.messages?S.merge(this._definition.messages,y.messages):this._definition.messages;return new m.Report(H,j,K,M,v,R,o)}$_getFlag(H){return this._flags[H]}$_getRule(H){return this._singleRules.get(H)}$_mapLabels(H){return H=Array.isArray(H)?H:H.split("."),this._ids.labels(H)}$_match(H,j,K,R){(K=Object.assign({},K)).abortEarly=!0,K._externals=!1,j.snapshot();const o=!V.validate(H,this,j,K,R).errors;return j.restore(),o}$_modify(H){return h.assertOptions(H,["each","once","ref","schema"]),I.schema(this,H)||this}$_mutateRebuild(){return f(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(H,j)=>{let{source:K,name:R,key:y}=j;const M=this._definition[K][R]&&this._definition[K][R].register;!1!==M&&this.$_mutateRegister(H,{family:M,key:y})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(H){let{family:j,key:K}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._refs.register(H,j),this._ids.register(H,{key:K})}$_property(H){return this._definition.properties[H]}$_reach(H){return this._ids.reach(H)}$_rootReferences(){return this._refs.roots()}$_setFlag(H,j){let K=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(f("_"===H[0]||!this._inRuleset(),"Cannot set flag inside a ruleset"),g(j,(this._definition.flags[H]||{}).default)&&(j=void 0),g(j,this._flags[H]))return this;const o=!1!==K.clone?this.clone():this;return void 0!==j?(o._flags[H]=j,o.$_mutateRegister(j)):delete o._flags[H],"_"!==H[0]&&(o.$_temp.ruleset=!1),o}$_parent(H){for(var j=arguments.length,K=new Array(j>1?j-1:0),R=1;R2&&void 0!==arguments[2]?arguments[2]:{};return h.assertOptions(K,"literal"),f(void 0!==j,"Missing",H,"value"),f("function"==typeof j||!K.literal,"Only function value supports literal option"),"function"==typeof j&&K.literal&&(j={[h.symbols.literal]:!0,literal:j}),this.$_setFlag(H,j)}_generate(H,j,K){if(!this.$_terms.whens)return{schema:this};const R=[],o=[];for(let v=0;vC)break}const y=o.join(", ");if(j.mainstay.tracer.debug(j,"rule","when",y),!y)return{schema:this};if(!j.mainstay.tracer.active&&this.$_temp.whens[y])return{schema:this.$_temp.whens[y],id:y};let M=this;this._definition.generate&&(M=this._definition.generate(this,H,j,K));for(const v of R)M=M.concat(v);return this.$_root._tracer&&this.$_root._tracer._combine(M,[this,...R]),this.$_temp.whens[y]=M,{schema:M,id:y}}_inner(H,j){let K=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(!this._inRuleset(),`Cannot set ${H} inside a ruleset`);const R=this.clone();return R.$_terms[H]&&!K.override||(R.$_terms[H]=[]),K.single?R.$_terms[H].push(j):R.$_terms[H].push(...j),R.$_temp.ruleset=!1,R}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(H){let j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._singleRules.has(H))return this;const K=!1!==j.clone?this.clone():this;K._singleRules.delete(H);const R=[];for(let o=0;o{"use strict";const f=x(375),T=x(8571),g=x(8160),b={max:1e3,supported:new Set(["undefined","boolean","number","string"])};d.provider={provision:l=>new b.Cache(l)},b.Cache=class{constructor(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};g.assertOptions(l,["max"]),f(void 0===l.max||l.max&&l.max>0&&isFinite(l.max),"Invalid max cache size"),this._max=l.max||b.max,this._map=new Map,this._list=new b.List}get length(){return this._map.size}set(l,h){if(null!==l&&!b.supported.has(typeof l))return;let u=this._map.get(l);if(u)return u.value=h,void this._list.first(u);u=this._list.unshift({key:l,value:h}),this._map.set(l,u),this._compact()}get(l){const h=this._map.get(l);if(h)return this._list.first(h),T(h.value)}_compact(){if(this._map.size>this._max){const l=this._list.pop();this._map.delete(l.key)}}},b.List=class{constructor(){this.tail=null,this.head=null}unshift(l){return l.next=null,l.prev=this.head,this.head&&(this.head.next=l),this.head=l,this.tail||(this.tail=l),l}first(l){l!==this.head&&(this._remove(l),this.unshift(l))}pop(){return this._remove(this.tail)}_remove(l){const{next:h,prev:u}=l;return h.prev=u,u&&(u.next=h),l===this.tail&&(this.tail=h),l.prev=null,l.next=null,l}}},8160:(E,d,x)=>{"use strict";const f=x(375),T=x(7916),g=x(5934);let b,l;const h={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};d.version=g.version,d.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},d.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},d.assertOptions=function(u,m){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Options";f(u&&"object"==typeof u&&!Array.isArray(u),"Options must be of type object");const w=Object.keys(u).filter(S=>!m.includes(S));f(0===w.length,`${_} contain unknown keys: ${w}`)},d.checkPreferences=function(u){l=l||x(3378);const m=l.preferences.validate(u);if(m.error)throw new T([m.error.details[0].message])},d.compare=function(u,m,_){switch(_){case"=":return u===m;case">":return u>m;case"<":return u=":return u>=m;case"<=":return u<=m}},d.default=function(u,m){return void 0===u?m:u},d.isIsoDate=function(u){return h.isoDate.test(u)},d.isNumber=function(u){return"number"==typeof u&&!isNaN(u)},d.isResolvable=function(u){return!!u&&(u[d.symbols.ref]||u[d.symbols.template])},d.isSchema=function(u){let m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const _=u&&u[d.symbols.any];return!!_&&(f(m.legacy||_.version===d.version,"Cannot mix different versions of joi schemas"),!0)},d.isValues=function(u){return u[d.symbols.values]},d.limit=function(u){return Number.isSafeInteger(u)&&u>=0},d.preferences=function(u,m){b=b||x(6914),u=u||{},m=m||{};const _=Object.assign({},u,m);return m.errors&&u.errors&&(_.errors=Object.assign({},u.errors,m.errors),_.errors.wrap=Object.assign({},u.errors.wrap,m.errors.wrap)),m.messages&&(_.messages=b.compile(m.messages,u.messages)),delete _[d.symbols.prefs],_},d.tryWithPath=function(u,m){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return u()}catch(w){throw w.path=void 0!==w.path?m+"."+w.path:m,_.append&&(w.message=`${w.message} (${w.path})`),w}},d.validateArg=function(u,m,_){let{assert:w,message:S}=_;if(d.isSchema(w)){const I=w.validate(u);return I.error?I.error.message:void 0}if(!w(u))return m?`${m} ${S}`:S},d.verifyFlat=function(u,m){for(const _ of u)f(!Array.isArray(_),"Method no longer accepts array arguments:",m)}},3292:(E,d,x)=>{"use strict";const f=x(375),T=x(8160),g=x(6133),b={};d.schema=function(l,h){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};T.assertOptions(u,["appendPath","override"]);try{return b.schema(l,h,u)}catch(m){throw u.appendPath&&void 0!==m.path&&(m.message=`${m.message} (${m.path})`),m}},b.schema=function(l,h,u){f(void 0!==h,"Invalid undefined schema"),Array.isArray(h)&&(f(h.length,"Invalid empty array schema"),1===h.length&&(h=h[0]));const m=function(_){for(var w=arguments.length,S=new Array(w>1?w-1:0),I=1;I2&&void 0!==arguments[2]?arguments[2]:{};T.assertOptions(u,["legacy"]);const m=h&&h[T.symbols.any];if(m)return f(u.legacy||m.version===T.version,"Cannot mix different versions of joi schemas:",m.version,T.version),h;if("object"!=typeof h||!u.legacy)return d.schema(l,h,{appendPath:!0});const _=b.walk(h);return _?_.compile(_.root,h):d.schema(l,h,{appendPath:!0})},b.walk=function(l){if("object"!=typeof l)return null;if(Array.isArray(l)){for(const u of l){const m=b.walk(u);if(m)return m}return null}const h=l[T.symbols.any];if(h)return{root:l[h.root],compile:h.compile};f(Object.getPrototypeOf(l)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const u in l){const m=b.walk(l[u]);if(m)return m}return null},b.simple=function(l){return null===l||["boolean","string","number"].includes(typeof l)},d.when=function(l,h,u){if(void 0===u&&(f(h&&"object"==typeof h,"Missing options"),u=h,h=g.create(".")),Array.isArray(u)&&(u={switch:u}),T.assertOptions(u,["is","not","then","otherwise","switch","break"]),T.isSchema(h))return f(void 0===u.is,'"is" can not be used with a schema condition'),f(void 0===u.not,'"not" can not be used with a schema condition'),f(void 0===u.switch,'"switch" can not be used with a schema condition'),b.condition(l,{is:h,then:u.then,otherwise:u.otherwise,break:u.break});if(f(g.isRef(h)||"string"==typeof h,"Invalid condition:",h),f(void 0===u.not||void 0===u.is,'Cannot combine "is" with "not"'),void 0===u.switch){let _=u;void 0!==u.not&&(_={is:u.not,then:u.otherwise,otherwise:u.then,break:u.break});let w=void 0!==_.is?l.$_compile(_.is):l.$_root.invalid(null,!1,0,"").required();return f(void 0!==_.then||void 0!==_.otherwise,'options must have at least one of "then", "otherwise", or "switch"'),f(void 0===_.break||void 0===_.then||void 0===_.otherwise,"Cannot specify then, otherwise, and break all together"),void 0===u.is||g.isRef(u.is)||T.isSchema(u.is)||(w=w.required()),b.condition(l,{ref:d.ref(h),is:w,then:_.then,otherwise:_.otherwise,break:_.break})}f(Array.isArray(u.switch),'"switch" must be an array'),f(void 0===u.is,'Cannot combine "switch" with "is"'),f(void 0===u.not,'Cannot combine "switch" with "not"'),f(void 0===u.then,'Cannot combine "switch" with "then"');const m={ref:d.ref(h),switch:[],break:u.break};for(let _=0;_{"use strict";const f=x(5688),T=x(8160),g=x(3328);d.Report=class{constructor(b,l,h,u,m,_,w){if(this.code=b,this.flags=u,this.messages=m,this.path=_.path,this.prefs=w,this.state=_,this.value=l,this.message=null,this.template=null,this.local=h||{},this.local.label=d.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const S=this.path[this.path.length-1];"object"!=typeof S&&(this.local.key=S)}}_setTemplate(b){if(this.template=b,!this.flags.label&&0===this.path.length){const l=this._template(this.template,"root");l&&(this.local.label=l)}}toString(){if(this.message)return this.message;const b=this.code;if(!this.prefs.errors.render)return this.code;const l=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===l?`Error code "${b}" is not defined, your custom type is missing the correct messages definition`:(this.message=l.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(b,l){return d.template(this.value,b,l||this.code,this.state,this.prefs)}},d.path=function(b){let l="";for(const h of b)"object"!=typeof h&&("string"==typeof h?(l&&(l+="."),l+=h):l+=`[${h}]`);return l},d.template=function(b,l,h,u,m){if(!l)return;if(g.isTemplate(l))return"root"!==h?l:null;let _=m.errors.language;if(T.isResolvable(_)&&(_=_.resolve(b,u,m)),_&&l[_]){if(void 0!==l[_][h])return l[_][h];if(void 0!==l[_]["*"])return l[_]["*"]}return l[h]?l[h]:l["*"]},d.label=function(b,l,h,u){if(b.label)return b.label;if(!h.errors.label)return"";let m=l.path;return"key"===h.errors.label&&l.path.length>1&&(m=l.path.slice(-1)),d.path(m)||d.template(null,h.messages,"root",l,h)||u&&d.template(null,u,"root",l,h)||"value"},d.process=function(b,l,h){if(!b)return null;const{override:u,message:m,details:_}=d.details(b);if(u)return u;if(h.errors.stack)return new d.ValidationError(m,_,l);const w=Error.stackTraceLimit;Error.stackTraceLimit=0;const S=new d.ValidationError(m,_,l);return Error.stackTraceLimit=w,S},d.details=function(b){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=[];const u=[];for(const m of b){if(m instanceof Error){if(!1!==l.override)return{override:m};const w=m.toString();h.push(w),u.push({message:w,type:"override",context:{error:m}});continue}const _=m.toString();h.push(_),u.push({message:_,path:m.path.filter(w=>"object"!=typeof w),type:m.code,context:m.local})}return h.length>1&&(h=[...new Set(h)]),{message:h.join(". "),details:u}},d.ValidationError=class extends Error{constructor(b,l,h){super(b),this._original=h,this.details=l}static isError(b){return b instanceof d.ValidationError}},d.ValidationError.prototype.isJoi=!0,d.ValidationError.prototype.name="ValidationError",d.ValidationError.prototype.annotate=f.error},8901:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(8160),b=x(6914),l={};d.type=function(h,u){const m=Object.getPrototypeOf(h),_=T(m),w=h._assign(Object.create(_)),S=Object.assign({},u);delete S.base,_._definition=S;const I=m._definition||{};S.messages=b.merge(I.messages,S.messages),S.properties=Object.assign({},I.properties,S.properties),w.type=S.type,S.flags=Object.assign({},I.flags,S.flags);const P=Object.assign({},I.terms);if(S.terms)for(const G in S.terms){const H=S.terms[G];f(void 0===w.$_terms[G],"Invalid term override for",S.type,G),w.$_terms[G]=H.init,P[G]=H}S.terms=P,S.args||(S.args=I.args),S.prepare=l.prepare(S.prepare,I.prepare),S.coerce&&("function"==typeof S.coerce&&(S.coerce={method:S.coerce}),S.coerce.from&&!Array.isArray(S.coerce.from)&&(S.coerce={method:S.coerce.method,from:[].concat(S.coerce.from)})),S.coerce=l.coerce(S.coerce,I.coerce),S.validate=l.validate(S.validate,I.validate);const L=Object.assign({},I.rules);if(S.rules)for(const G in S.rules){const H=S.rules[G];f("object"==typeof H,"Invalid rule definition for",S.type,G);let j=H.method;if(void 0===j&&(j=function(){return this.$_addRule(G)}),j&&(f(!_[G],"Rule conflict in",S.type,G),_[G]=j),f(!L[G],"Rule conflict in",S.type,G),L[G]=H,H.alias){const K=[].concat(H.alias);for(const R of K)_[R]=H.method}H.args&&(H.argsByName=new Map,H.args=H.args.map(K=>("string"==typeof K&&(K={name:K}),f(!H.argsByName.has(K.name),"Duplicated argument name",K.name),g.isSchema(K.assert)&&(K.assert=K.assert.strict().label(K.name)),H.argsByName.set(K.name,K),K)))}S.rules=L;const V=Object.assign({},I.modifiers);if(S.modifiers)for(const G in S.modifiers){f(!_[G],"Rule conflict in",S.type,G);const H=S.modifiers[G];f("function"==typeof H,"Invalid modifier definition for",S.type,G),_[G]=function(K){return this.rule({[G]:K})},V[G]=H}if(S.modifiers=V,S.overrides){_._super=m,w.$_super={};for(const G in S.overrides)f(m[G],"Cannot override missing",G),S.overrides[G][g.symbols.parent]=m[G],w.$_super[G]=m[G].bind(w);Object.assign(_,S.overrides)}S.cast=Object.assign({},I.cast,S.cast);const W=Object.assign({},I.manifest,S.manifest);return W.build=l.build(S.manifest&&S.manifest.build,I.manifest&&I.manifest.build),S.manifest=W,S.rebuild=l.rebuild(S.rebuild,I.rebuild),w},l.build=function(h,u){return h&&u?function(m,_){return u(h(m,_),_)}:h||u},l.coerce=function(h,u){return h&&u?{from:h.from&&u.from?[...new Set([...h.from,...u.from])]:null,method(m,_){let w;if((!u.from||u.from.includes(typeof m))&&(w=u.method(m,_),w)){if(w.errors||void 0===w.value)return w;m=w.value}if(!h.from||h.from.includes(typeof m)){const S=h.method(m,_);if(S)return S}return w}}:h||u},l.prepare=function(h,u){return h&&u?function(m,_){const w=h(m,_);if(w){if(w.errors||void 0===w.value)return w;m=w.value}return u(m,_)||w}:h||u},l.rebuild=function(h,u){return h&&u?function(m){u(m),h(m)}:h||u},l.validate=function(h,u){return h&&u?function(m,_){const w=u(m,_);if(w){if(w.errors&&(!Array.isArray(w.errors)||w.errors.length))return w;m=w.value}return h(m,_)||w}:h||u}},5107:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(8652),b=x(8160),l=x(3292),h=x(6354),u=x(8901),m=x(9708),_=x(6133),w=x(3328),S=x(1152);let I;const P={types:{alternatives:x(4946),any:x(8068),array:x(546),boolean:x(4937),date:x(7500),function:x(390),link:x(8785),number:x(3832),object:x(8966),string:x(7417),symbol:x(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const L={_types:new Set(Object.keys(P.types))};for(const V of L._types)L[V]=function(){for(var W=arguments.length,G=new Array(W),H=0;H2?W-2:0),H=2;H2?W-2:0),H=2;H{"use strict";const f=x(375),T=x(8571),g=x(3328);d.compile=function(b,l){if("string"==typeof b)return f(!l,"Cannot set single message string"),new g(b);if(g.isTemplate(b))return f(!l,"Cannot set single message template"),b;f("object"==typeof b&&!Array.isArray(b),"Invalid message options"),l=l?T(l):{};for(let h in b){const u=b[h];if("root"===h||g.isTemplate(u)){l[h]=u;continue}if("string"==typeof u){l[h]=new g(u);continue}f("object"==typeof u&&!Array.isArray(u),"Invalid message for",h);const m=h;for(h in l[m]=l[m]||{},u){const _=u[h];"root"===h||g.isTemplate(_)?l[m][h]=_:(f("string"==typeof _,"Invalid message for",h,"in",m),l[m][h]=new g(_))}}return l},d.decompile=function(b){const l={};for(let h in b){const u=b[h];if("root"===h){l.root=u;continue}if(g.isTemplate(u)){l[h]=u.describe({compact:!0});continue}const m=h;for(h in l[m]={},u){const _=u[h];"root"!==h?l[m][h]=_.describe({compact:!0}):l[m].root=_}}return l},d.merge=function(b,l){if(!b)return d.compile(l);if(!l)return b;if("string"==typeof l)return new g(l);if(g.isTemplate(l))return l;const h=T(b);for(let u in l){const m=l[u];if("root"===u||g.isTemplate(m)){h[u]=m;continue}if("string"==typeof m){h[u]=new g(m);continue}f("object"==typeof m&&!Array.isArray(m),"Invalid message for",u);const _=u;for(u in h[_]=h[_]||{},m){const w=m[u];"root"===u||g.isTemplate(w)?h[_][u]=w:(f("string"==typeof w,"Invalid message for",u,"in",_),h[_][u]=new g(w))}}return h}},2294:(E,d,x)=>{"use strict";const f=x(375),T=x(8160),g=x(6133),b={};d.Ids=b.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const l=new b.Ids;return l._byId=new Map(this._byId),l._byKey=new Map(this._byKey),l._schemaChain=this._schemaChain,l}concat(l){l._schemaChain&&(this._schemaChain=!0);for(const[h,u]of l._byId.entries())f(!this._byKey.has(h),"Schema id conflicts with existing key:",h),this._byId.set(h,u);for(const[h,u]of l._byKey.entries())f(!this._byId.has(h),"Schema key conflicts with existing id:",h),this._byKey.set(h,u)}fork(l,h,u){const m=this._collect(l);m.push({schema:u});const _=m.shift();let w={id:_.id,schema:h(_.schema)};f(T.isSchema(w.schema),"adjuster function failed to return a joi schema type");for(const S of m)w={id:S.id,schema:b.fork(S.schema,w.id,w.schema)};return w.schema}labels(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const u=l[0],m=this._get(u);if(!m)return[...h,...l].join(".");const _=l.slice(1);return h=[...h,m.schema._flags.label||u],_.length?m.schema._ids.labels(_,h):h.join(".")}reach(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const u=l[0],m=this._get(u);f(m,"Schema does not contain path",[...h,...l].join("."));const _=l.slice(1);return _.length?m.schema._ids.reach(_,[...h,u]):m.schema}register(l){let{key:h}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!l||!T.isSchema(l))return;(l.$_property("schemaChain")||l._ids._schemaChain)&&(this._schemaChain=!0);const u=l._flags.id;if(u){const m=this._byId.get(u);f(!m||m.schema===l,"Cannot add different schemas with the same id:",u),f(!this._byKey.has(u),"Schema id conflicts with existing key:",u),this._byId.set(u,{schema:l,id:u})}h&&(f(!this._byKey.has(h),"Schema already contains key:",h),f(!this._byId.has(h),"Schema key conflicts with existing id:",h),this._byKey.set(h,{schema:l,id:h}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const m=l[0],_=this._get(m);f(_,"Schema does not contain path",[...h,...l].join(".")),u=[_,...u];const w=l.slice(1);return w.length?_.schema._ids._collect(w,[...h,m],u):u}_get(l){return this._byId.get(l)||this._byKey.get(l)}},b.fork=function(l,h,u){const m=d.schema(l,{each:(_,w)=>{let{key:S}=w;if(h===(_._flags.id||S))return u},ref:!1});return m?m.$_mutateRebuild():l},d.schema=function(l,h){let u;for(const m in l._flags){if("_"===m[0])continue;const _=b.scan(l._flags[m],{source:"flags",name:m},h);void 0!==_&&(u=u||l.clone(),u._flags[m]=_)}for(let m=0;m{"use strict";const f=x(375),T=x(8571),g=x(9621),b=x(8160);let l;const h={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};d.create=function(u){let m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f("string"==typeof u,"Invalid reference key:",u),b.assertOptions(m,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),f(!m.prefix||"object"==typeof m.prefix,"options.prefix must be of type object");const _=Object.assign({},h.defaults,m);delete _.prefix;const w=_.separator,S=h.context(u,w,m.prefix);if(_.type=S.type,u=S.key,"value"===_.type)if(S.root&&(f(!w||u[0]!==w,"Cannot specify relative path with root prefix"),_.ancestor="root",u||(u=null)),w&&w===u)u=null,_.ancestor=0;else if(void 0!==_.ancestor)f(!w||!u||u[0]!==w,"Cannot combine prefix with ancestor option");else{const[I,P]=h.ancestor(u,w);P&&""===(u=u.slice(P))&&(u=null),_.ancestor=I}return _.path=w?null===u?[]:u.split(w):[u],new h.Ref(_)},d.in=function(u){let m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.create(u,{...m,in:!0})},d.isRef=function(u){return!!u&&!!u[b.symbols.ref]},h.Ref=class{constructor(u){f("object"==typeof u,"Invalid reference construction"),b.assertOptions(u,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),f([!1,void 0].includes(u.separator)||"string"==typeof u.separator&&1===u.separator.length,"Invalid separator"),f(!u.adjust||"function"==typeof u.adjust,"options.adjust must be a function"),f(!u.map||Array.isArray(u.map),"options.map must be an array"),f(!u.map||!u.adjust,"Cannot set both map and adjust options"),Object.assign(this,h.defaults,u),f("value"===this.type||void 0===this.ancestor,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(u,m,_,w){let S=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return f(!this.in||S.in,"Invalid in() reference usage"),"global"===this.type?this._resolve(_.context,m,S):"local"===this.type?this._resolve(w,m,S):this.ancestor?"root"===this.ancestor?this._resolve(m.ancestors[m.ancestors.length-1],m,S):(f(this.ancestor<=m.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(m.ancestors[this.ancestor-1],m,S)):this._resolve(u,m,S)}_resolve(u,m,_){let w;if("value"===this.type&&m.mainstay.shadow&&!1!==_.shadow&&(w=m.mainstay.shadow.get(this.absolute(m))),void 0===w&&(w=g(u,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(w=this.adjust(w)),this.map){const S=this.map.get(w);void 0!==S&&(w=S)}return m.mainstay&&m.mainstay.tracer.resolve(m,this,w),w}toString(){return this.display}absolute(u){return[...u.path.slice(0,-this.ancestor),...this.path]}clone(){return new h.Ref(this)}describe(){const u={path:this.path};"value"!==this.type&&(u.type=this.type),"."!==this.separator&&(u.separator=this.separator),"value"===this.type&&1!==this.ancestor&&(u.ancestor=this.ancestor),this.map&&(u.map=[...this.map]);for(const m of["adjust","iterables","render"])null!=this[m]&&(u[m]=this[m]);return!1!==this.in&&(u.in=!0),{ref:u}}updateDisplay(){const u=null!==this.key?this.key:"";if("value"!==this.type)return void(this.display=`ref:${this.type}:${u}`);if(!this.separator)return void(this.display=`ref:${u}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${u}`);if("root"===this.ancestor)return void(this.display=`ref:root:${u}`);if(1===this.ancestor)return void(this.display=`ref:${u||".."}`);const m=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${m}${u||""}`}},h.Ref.prototype[b.symbols.ref]=!0,d.build=function(u){return"value"===(u=Object.assign({},h.defaults,u)).type&&void 0===u.ancestor&&(u.ancestor=1),new h.Ref(u)},h.context=function(u,m){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u=u.trim(),_){const w=void 0===_.global?"$":_.global;if(w!==m&&u.startsWith(w))return{key:u.slice(w.length),type:"global"};const S=void 0===_.local?"#":_.local;if(S!==m&&u.startsWith(S))return{key:u.slice(S.length),type:"local"};const I=void 0===_.root?"/":_.root;if(I!==m&&u.startsWith(I))return{key:u.slice(I.length),type:"value",root:!0}}return{key:u,type:"value"}},h.ancestor=function(u,m){if(!m)return[1,0];if(u[0]!==m)return[1,0];if(u[1]!==m)return[0,1];let _=2;for(;u[_]===m;)++_;return[_-1,_]},d.toSibling=0,d.toParent=1,d.Manager=class{constructor(){this.refs=[]}register(u,m){if(u)if(m=void 0===m?d.toParent:m,Array.isArray(u))for(const _ of u)this.register(_,m);else if(b.isSchema(u))for(const _ of u._refs.refs)_.ancestor-m>=0&&this.refs.push({ancestor:_.ancestor-m,root:_.root});else d.isRef(u)&&"value"===u.type&&u.ancestor-m>=0&&this.refs.push({ancestor:u.ancestor-m,root:u.root}),l=l||x(3328),l.isTemplate(u)&&this.register(u.refs(),m)}get length(){return this.refs.length}clone(){const u=new d.Manager;return u.refs=T(this.refs),u}reset(){this.refs=[]}roots(){return this.refs.filter(u=>!u.ancestor).map(u=>u.root)}}},3378:(E,d,x)=>{"use strict";const f=x(5107),T={};T.wrap=f.string().min(1).max(2).allow(!1),d.preferences=f.object({allowUnknown:f.boolean(),abortEarly:f.boolean(),artifacts:f.boolean(),cache:f.boolean(),context:f.object(),convert:f.boolean(),dateFormat:f.valid("date","iso","string","time","utc"),debug:f.boolean(),errors:{escapeHtml:f.boolean(),label:f.valid("path","key",!1),language:[f.string(),f.object().ref()],render:f.boolean(),stack:f.boolean(),wrap:{label:T.wrap,array:T.wrap,string:T.wrap}},externals:f.boolean(),messages:f.object(),noDefaults:f.boolean(),nonEnumerables:f.boolean(),presence:f.valid("required","optional","forbidden"),skipFunctions:f.boolean(),stripUnknown:f.object({arrays:f.boolean(),objects:f.boolean()}).or("arrays","objects").allow(!0,!1),warnings:f.boolean()}).strict(),T.nameRx=/^[a-zA-Z0-9]\w*$/,T.rule=f.object({alias:f.array().items(f.string().pattern(T.nameRx)).single(),args:f.array().items(f.string(),f.object({name:f.string().pattern(T.nameRx).required(),ref:f.boolean(),assert:f.alternatives([f.function(),f.object().schema()]).conditional("ref",{is:!0,then:f.required()}),normalize:f.function(),message:f.string().when("assert",{is:f.function(),then:f.required()})})),convert:f.boolean(),manifest:f.boolean(),method:f.function().allow(!1),multi:f.boolean(),validate:f.function()}),d.extension=f.object({type:f.alternatives([f.string(),f.object().regex()]).required(),args:f.function(),cast:f.object().pattern(T.nameRx,f.object({from:f.function().maxArity(1).required(),to:f.function().minArity(1).maxArity(2).required()})),base:f.object().schema().when("type",{is:f.object().regex(),then:f.forbidden()}),coerce:[f.function().maxArity(3),f.object({method:f.function().maxArity(3).required(),from:f.array().items(f.string()).single()})],flags:f.object().pattern(T.nameRx,f.object({setter:f.string(),default:f.any()})),manifest:{build:f.function().arity(2)},messages:[f.object(),f.string()],modifiers:f.object().pattern(T.nameRx,f.function().minArity(1).maxArity(2)),overrides:f.object().pattern(T.nameRx,f.function()),prepare:f.function().maxArity(3),rebuild:f.function().arity(1),rules:f.object().pattern(T.nameRx,T.rule),terms:f.object().pattern(T.nameRx,f.object({init:f.array().allow(null).required(),manifest:f.object().pattern(/.+/,[f.valid("schema","single"),f.object({mapped:f.object({from:f.string().required(),to:f.string().required()}).required()})])})),validate:f.function().maxArity(3)}).strict(),d.extensions=f.array().items(f.object(),f.function().arity(1)).strict(),T.desc={buffer:f.object({buffer:f.string()}),func:f.object({function:f.function().required(),options:{literal:!0}}),override:f.object({override:!0}),ref:f.object({ref:f.object({type:f.valid("value","global","local"),path:f.array().required(),separator:f.string().length(1).allow(!1),ancestor:f.number().min(0).integer().allow("root"),map:f.array().items(f.array().length(2)).min(1),adjust:f.function(),iterables:f.boolean(),in:f.boolean(),render:f.boolean()}).required()}),regex:f.object({regex:f.string().min(3)}),special:f.object({special:f.valid("deep").required()}),template:f.object({template:f.string().required(),options:f.object()}),value:f.object({value:f.alternatives([f.object(),f.array()]).required()})},T.desc.entity=f.alternatives([f.array().items(f.link("...")),f.boolean(),f.function(),f.number(),f.string(),T.desc.buffer,T.desc.func,T.desc.ref,T.desc.regex,T.desc.special,T.desc.template,T.desc.value,f.link("/")]),T.desc.values=f.array().items(null,f.boolean(),f.function(),f.number().allow(1/0,-1/0),f.string().allow(""),f.symbol(),T.desc.buffer,T.desc.func,T.desc.override,T.desc.ref,T.desc.regex,T.desc.template,T.desc.value),T.desc.messages=f.object().pattern(/.+/,[f.string(),T.desc.template,f.object().pattern(/.+/,[f.string(),T.desc.template])]),d.description=f.object({type:f.string().required(),flags:f.object({cast:f.string(),default:f.any(),description:f.string(),empty:f.link("/"),failover:T.desc.entity,id:f.string(),label:f.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:f.boolean(),unit:f.string()}).unknown(),preferences:{allowUnknown:f.boolean(),abortEarly:f.boolean(),artifacts:f.boolean(),cache:f.boolean(),convert:f.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:f.boolean(),label:["path","key"],language:[f.string(),T.desc.ref],wrap:{label:T.wrap,array:T.wrap}},externals:f.boolean(),messages:T.desc.messages,noDefaults:f.boolean(),nonEnumerables:f.boolean(),presence:["required","optional","forbidden"],skipFunctions:f.boolean(),stripUnknown:f.object({arrays:f.boolean(),objects:f.boolean()}).or("arrays","objects").allow(!0,!1),warnings:f.boolean()},allow:T.desc.values,invalid:T.desc.values,rules:f.array().min(1).items({name:f.string().required(),args:f.object().min(1),keep:f.boolean(),message:[f.string(),T.desc.messages],warn:f.boolean()}),keys:f.object().pattern(/.*/,f.link("/")),link:T.desc.ref}).pattern(/^[a-z]\w*$/,f.any())},493:(E,d,x)=>{"use strict";const f=x(8571),T=x(9621),g=x(8160),b={value:Symbol("value")};E.exports=b.State=class{constructor(l,h,u){this.path=l,this.ancestors=h,this.mainstay=u.mainstay,this.schemas=u.schemas,this.debug=null}localize(l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const m=new b.State(l,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this);return u&&m.schemas&&(m.schemas=[b.schemas(u),...m.schemas]),m}nest(l,h){const u=new b.State(this.path,this.ancestors,this);return u.schemas=u.schemas&&[b.schemas(l),...u.schemas],u.debug=h,u}shadow(l,h){this.mainstay.shadow=this.mainstay.shadow||new b.Shadow,this.mainstay.shadow.set(this.path,l,h)}snapshot(){this.mainstay.shadow&&(this._snapshot=f(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}},b.schemas=function(l){return g.isSchema(l)?{schema:l}:l},b.Shadow=class{constructor(){this._values=null}set(l,h,u){if(!l.length||"strip"===u&&"number"==typeof l[l.length-1])return;this._values=this._values||new Map;let m=this._values;for(let _=0;_{"use strict";const f=x(375),T=x(8571),g=x(5277),b=x(1447),l=x(8160),h=x(6354),u=x(6133),m={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join("\x01"),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};E.exports=m.Template=class{constructor(_,w){f("string"==typeof _,"Template source must be a string"),f(!_.includes("\0")&&!_.includes("\x01"),"Template source cannot contain reserved control characters"),this.source=_,this.rendered=_,this._template=null,this._settings=T(w),this._parse()}_parse(){if(!this.source.includes("{"))return;const _=m.encode(this.source),w=m.split(_);let S=!1;const I=[],P=w.shift();P&&I.push(P);for(const L of w){const V="{"!==L[0],W=V?"}":"}}",G=L.indexOf(W);if(-1===G||"{"===L[1]){I.push(`{${m.decode(L)}`);continue}let H=L.slice(V?0:1,G);const j=":"===H[0];j&&(H=H.slice(1));const K=this._ref(m.decode(H),{raw:V,wrapped:j});I.push(K),"string"!=typeof K&&(S=!0);const R=L.slice(G+W.length);R&&I.push(m.decode(R))}S?this._template=I:this.rendered=I.join("")}static date(_,w){return m.dateFormat[w.dateFormat].call(_)}describe(){if(!this._settings&&(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).compact)return this.source;const w={template:this.source};return this._settings&&(w.options=this._settings),w}static build(_){return new m.Template(_.template,_.options)}isDynamic(){return!!this._template}static isTemplate(_){return!!_&&!!_[l.symbols.template]}refs(){if(!this._template)return;const _=[];for(const w of this._template)"string"!=typeof w&&_.push(...w.refs);return _}resolve(_,w,S,I){return this._template&&1===this._template.length?this._part(this._template[0],_,w,S,I,{}):this.render(_,w,S,I)}_part(_){for(var w=arguments.length,S=new Array(w>1?w-1:0),I=1;I4&&void 0!==arguments[4]?arguments[4]:{};if(!this.isDynamic())return this.rendered;const L=[];for(const V of this._template)if("string"==typeof V)L.push(V);else{const W=this._part(V,_,w,S,I,P),G=m.stringify(W,_,w,S,I,P);if(void 0!==G){const H=V.raw||!1===(P.errors&&P.errors.escapeHtml)?G:g(G);L.push(m.wrap(H,V.wrapped&&S.errors.wrap.label))}}return L.join("")}_ref(_,w){let{raw:S,wrapped:I}=w;const P=[],L=W=>{const G=u.create(W,this._settings);return P.push(G),H=>G.resolve(...H)};try{var V=new b.Parser(_,{reference:L,functions:m.functions,constants:m.constants})}catch(W){throw W.message=`Invalid template variable "${_}" fails due to: ${W.message}`,W}if(V.single){if("reference"===V.single.type){const W=P[0];return{ref:W,raw:S,refs:P,wrapped:I||"local"===W.type&&"label"===W.key}}return m.stringify(V.single.value)}return{formula:V,raw:S,refs:P}}toString(){return this.source}},m.Template.prototype[l.symbols.template]=!0,m.Template.prototype.isImmutable=!0,m.encode=function(_){return _.replace(/\\(\{+)/g,(w,S)=>m.opens.slice(0,S.length)).replace(/\\(\}+)/g,(w,S)=>m.closes.slice(0,S.length))},m.decode=function(_){return _.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},m.split=function(_){const w=[];let S="";for(let I=0;I<_.length;++I){const P=_[I];if("{"===P){let L="";for(;I+1<_.length&&"{"===_[I+1];)L+="{",++I;w.push(S),S=L}else S+=P}return w.push(S),w},m.wrap=function(_,w){return w?1===w.length?`${w}${_}${w}`:`${w[0]}${_}${w[1]}`:_},m.stringify=function(_,w,S,I,P){let L=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const V=typeof _,W=I&&I.errors&&I.errors.wrap||{};let G=!1;if(u.isRef(_)&&_.render&&(G=_.in,_=_.resolve(w,S,I,P,{in:_.in,...L})),null===_)return"null";if("string"===V)return m.wrap(_,L.arrayItems&&W.string);if("number"===V||"function"===V||"symbol"===V)return _.toString();if("object"!==V)return JSON.stringify(_);if(_ instanceof Date)return m.Template.date(_,I);if(_ instanceof Map){const j=[];for(const[K,R]of _.entries())j.push(`${K.toString()} -> ${R.toString()}`);_=j}if(!Array.isArray(_))return _.toString();const H=[];for(const j of _)H.push(m.stringify(j,w,S,I,P,{arrayItems:!0,...L}));return m.wrap(H.join(", "),!G&&W.array)},m.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},m.functions={if:(_,w,S)=>_?w:S,length:_=>"string"==typeof _?_.length:_&&"object"==typeof _?Array.isArray(_)?_.length:Object.keys(_).length:null,msg(_){const[w,S,I,P,L]=this,V=L.messages;if(!V)return"";const W=h.template(w,V[0],_,S,I)||h.template(w,V[1],_,S,I);return W?W.render(w,S,I,P,L):""},number:_=>"number"==typeof _?_:"string"==typeof _?parseFloat(_):"boolean"==typeof _?_?1:0:_ instanceof Date?_.getTime():null}},4946:(E,d,x)=>{"use strict";const f=x(375),T=x(1687),g=x(8068),b=x(8160),l=x(3292),h=x(6354),u=x(6133),m={};E.exports=g.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:u.toSibling}},args(_){for(var w=arguments.length,S=new Array(w>1?w-1:0),I=1;Ih.details(j,{override:!1}))})};if("one"===S._flags.match)return 1===W.length?{value:W[0]}:{errors:I("alternatives.one")};if(W.length!==S.$_terms.matches.length)return{errors:I("alternatives.all",{details:G.map(j=>h.details(j,{override:!1}))})};const H=j=>j.$_terms.matches.some(K=>"object"===K.schema.type||"alternatives"===K.schema.type&&H(K.schema));return H(S)?{value:W.reduce((j,K)=>T(j,K,{mergeArrays:!1}))}:{value:W[W.length-1]}}const V=[];for(let W=0;W"is"!==S.path[0]?w.label(_):void 0,ref:!1})}},rebuild(_){_.$_modify({each:w=>{b.isSchema(w)&&"array"===w.type&&_.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(_,w){if(w.matches)for(const S of w.matches){const{schema:I,ref:P,is:L,not:V,then:W,otherwise:G}=S;_=I?_.try(I):P?_.conditional(P,{is:L,then:W,not:V,otherwise:G,switch:S.switch}):_.conditional(L,{then:W,otherwise:G})}return _}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),m.errors=function(_,w){let{error:S,state:I}=w;if(!_.length)return{errors:S("alternatives.any")};if(1===_.length)return{errors:_[0].reports};const P=new Set,L=[];for(const{reports:V,schema:W}of _){if(V.length>1)return m.unmatched(_,S);const G=V[0];if(G instanceof h.Report==0)return m.unmatched(_,S);if(G.state.path.length!==I.path.length){L.push({type:W.type,report:G});continue}if("any.only"===G.code){for(const K of G.local.valids)P.add(K);continue}const[H,j]=G.code.split(".");"base"===j?P.add(H):L.push({type:W.type,report:G})}return L.length?1===L.length?{errors:L[0].report}:m.unmatched(_,S):{errors:S("alternatives.types",{types:[...P]})}},m.unmatched=function(_,w){const S=[];for(const I of _)S.push(...I.reports);return{errors:w("alternatives.match",h.details(S,{override:!1}))}}},8068:(E,d,x)=>{"use strict";const f=x(375),T=x(7629),g=x(8160),b=x(6914);E.exports=T.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(l,h){return f("function"==typeof l,"Method must be a function"),f(void 0===h||h&&"string"==typeof h,"Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:l,description:h}})},validate(l,h,u){let{method:m}=u;try{return m(l,h)}catch(_){return h.error("any.custom",{error:_})}},args:["method","description"],multi:!0},messages:{method(l){return this.prefs({messages:l})}},shared:{method(l){f(g.isSchema(l)&&l._flags.id,"Schema must be a schema with an id");const h=this.clone();return h.$_terms.shared=h.$_terms.shared||[],h.$_terms.shared.push(l),h.$_mutateRegister(l),h}},warning:{method(l,h){return f(l&&"string"==typeof l,"Invalid warning code"),this.$_addRule({name:"warning",args:{code:l,local:h},warn:!0})},validate(l,h,u){let{code:m,local:_}=u;return h.error(m,_)},args:["code","local"],multi:!0}},modifiers:{keep(l){l.keep=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]},message(l,h){l.message=b.compile(h)},warn(l){l.warn=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]}},manifest:{build(l,h){for(const u in h){const m=h[u];if(["examples","externals","metas","notes","tags"].includes(u))for(const _ of m)l=l[u.slice(0,-1)](_);else if("alterations"!==u)if("whens"!==u){if("shared"===u)for(const _ of m)l=l.shared(_)}else for(const _ of m){const{ref:w,is:S,not:I,then:P,otherwise:L,concat:V}=_;l=V?l.concat(V):w?l.when(w,{is:S,not:I,then:P,otherwise:L,switch:_.switch,break:_.break}):l.when(S,{then:P,otherwise:L,break:_.break})}else{const _={};for(const{target:w,adjuster:S}of m)_[w]=S;l=l.alter(_)}}return l}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(E,d,x)=>{"use strict";const f=x(375),T=x(9474),g=x(9621),b=x(8068),l=x(8160),h=x(3292),u={};E.exports=b.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(m,_){let{schema:w,state:S,prefs:I}=_;if(!Array.isArray(m))return;const P=w.$_getRule("sort");return P?u.sort(w,m,P.args.options,S,I):void 0}},validate(m,_){let{schema:w,error:S}=_;if(!Array.isArray(m)){if(w._flags.single){const I=[m];return I[l.symbols.arraySingle]=!0,{value:I}}return{errors:S("array.base")}}if(w.$_getRule("items")||w.$_terms.externals)return{value:m.slice()}},rules:{has:{method(m){m=this.$_compile(m,{appendPath:!0});const _=this.$_addRule({name:"has",args:{schema:m}});return _.$_mutateRegister(m),_},validate(m,_,w){let{state:S,prefs:I,error:P}=_,{schema:L}=w;const V=[m,...S.ancestors];for(let G=0;Gthis.$_compile(_[I]),I,{append:!0});S.$_terms.items.push(P)}return S.$_mutateRebuild()},validate(m,_){let{schema:w,error:S,state:I,prefs:P,errorsArray:L}=_;const V=w.$_terms._requireds.slice(),W=w.$_terms.ordered.slice(),G=[...w.$_terms._inclusions,...V],H=!m[l.symbols.arraySingle];delete m[l.symbols.arraySingle];const j=L();let K=m.length;for(let R=0;R="})}},ordered:{method(){for(var m=arguments.length,_=new Array(m),w=0;wthis.$_compile(_[I]),I,{append:!0});u.validateSingle(P,S),S.$_mutateRegister(P),S.$_terms.ordered.push(P)}return S.$_mutateRebuild()}},single:{method(m){const _=void 0===m||!!m;return f(!_||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",_)}},sort:{method(){let m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.assertOptions(m,["by","order"]);const _={order:m.order||"ascending"};return m.by&&(_.by=h.ref(m.by,{ancestor:0}),f(!_.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:_}})},validate(m,_,w){let{error:S,state:I,prefs:P,schema:L}=_,{options:V}=w;const{value:W,errors:G}=u.sort(L,m,V,I,P);if(G)return G;for(let H=0;H1&&void 0!==arguments[1]?arguments[1]:{};f(!m||"function"==typeof m||"string"==typeof m,"comparator must be a function or a string"),l.assertOptions(_,["ignoreUndefined","separator"]);const w={name:"unique",args:{options:_,comparator:m}};if(m)if("string"==typeof m){const S=l.default(_.separator,".");w.path=S?m.split(S):[m]}else w.comparator=m;return this.$_addRule(w)},validate(m,_,w,S){let{state:I,error:P}=_,{comparator:V,options:W}=w,{comparator:G,path:H}=S;const j={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},K=G||T,R=W.ignoreUndefined;for(let o=0;onew Set(m)}},rebuild(m){m.$_terms._inclusions=[],m.$_terms._exclusions=[],m.$_terms._requireds=[];for(const _ of m.$_terms.items)u.validateSingle(_,m),"required"===_._flags.presence?m.$_terms._requireds.push(_):"forbidden"===_._flags.presence?m.$_terms._exclusions.push(_):m.$_terms._inclusions.push(_);for(const _ of m.$_terms.ordered)u.validateSingle(_,m)},manifest:{build:(m,_)=>(_.items&&(m=m.items(..._.items)),_.ordered&&(m=m.ordered(..._.ordered)),m)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),u.fillMissedErrors=function(m,_,w,S,I,P){const L=[];let V=0;for(const W of w){const G=W._flags.label;G?L.push(G):++V}_.push(L.length?V?m.$_createError("array.includesRequiredBoth",S,{knownMisses:L,unknownMisses:V},I,P):m.$_createError("array.includesRequiredKnowns",S,{knownMisses:L},I,P):m.$_createError("array.includesRequiredUnknowns",S,{unknownMisses:V},I,P))},u.fillOrderedErrors=function(m,_,w,S,I,P){const L=[];for(const V of w)"required"===V._flags.presence&&L.push(V);L.length&&u.fillMissedErrors(m,_,L,S,I,P)},u.fillDefault=function(m,_,w,S){const I=[];let P=!0;for(let L=m.length-1;L>=0;--L){const V=m[L],W=[_,...w.ancestors],G=V.$_validate(void 0,w.localize(w.path,W,V),S).value;if(P){if(void 0===G)continue;P=!1}I.unshift(G)}I.length&&_.push(...I)},u.fastSplice=function(m,_){let w=_;for(;w{let j=u.compare(G,H,L,V);if(null!==j||(w.by&&(G=w.by.resolve(G,S,I),H=w.by.resolve(H,S,I)),j=u.compare(G,H,L,V),null!==j))return j;const K=typeof G;if(K!==typeof H)throw m.$_createError("array.sort.mismatching",_,null,S,I);if("number"!==K&&"string"!==K)throw m.$_createError("array.sort.unsupported",_,{type:K},S,I);return"number"===K?(G-H)*P:G{"use strict";const f=x(375),T=x(8068),g=x(8160),b=x(2036),l={isBool:function(h){return"boolean"==typeof h}};E.exports=T.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(h,u){let{schema:m}=u;if("boolean"!=typeof h){if("string"==typeof h){const _=m._flags.sensitive?h:h.toLowerCase();h="true"===_||"false"!==_&&h}return"boolean"!=typeof h&&(h=m.$_terms.truthy&&m.$_terms.truthy.has(h,null,null,!m._flags.sensitive)||(!m.$_terms.falsy||!m.$_terms.falsy.has(h,null,null,!m._flags.sensitive))&&h),{value:h}}},validate(h,u){let{error:m}=u;if("boolean"!=typeof h)return{value:h,errors:m("boolean.base")}},rules:{truthy:{method(){for(var h=arguments.length,u=new Array(h),m=0;m0&&void 0!==arguments[0])||arguments[0])}}},cast:{number:{from:l.isBool,to:(h,u)=>h?1:0},string:{from:l.isBool,to:(h,u)=>h?"true":"false"}},manifest:{build:(h,u)=>(u.truthy&&(h=h.truthy(...u.truthy)),u.falsy&&(h=h.falsy(...u.falsy)),h)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(E,d,x)=>{"use strict";const f=x(375),T=x(8068),g=x(8160),b=x(3328),l={isDate:function(h){return h instanceof Date}};E.exports=T.extend({type:"date",coerce:{from:["number","string"],method(h,u){let{schema:m}=u;return{value:l.parse(h,m._flags.format)||h}}},validate(h,u){let{schema:m,error:_,prefs:w}=u;if(h instanceof Date&&!isNaN(h.getTime()))return;const S=m._flags.format;return w.convert&&S&&"string"==typeof h?{value:h,errors:_("date.format",{format:S})}:{value:h,errors:_("date.base")}},rules:{compare:{method:!1,validate(h,u,m,_){let{date:w}=m,{name:S,operator:I,args:P}=_;const L="now"===w?Date.now():w.getTime();return g.compare(h.getTime(),L,I)?h:u.error("date."+S,{limit:P.date,value:h})},args:[{name:"date",ref:!0,normalize:h=>"now"===h?h:l.parse(h),assert:h=>null!==h,message:"must have a valid date format"}]},format:{method(h){return f(["iso","javascript","unix"].includes(h),"Unknown date format",h),this.$_setFlag("format",h)}},greater:{method(h){return this.$_addRule({name:"greater",method:"compare",args:{date:h},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(h){return this.$_addRule({name:"less",method:"compare",args:{date:h},operator:"<"})}},max:{method(h){return this.$_addRule({name:"max",method:"compare",args:{date:h},operator:"<="})}},min:{method(h){return this.$_addRule({name:"min",method:"compare",args:{date:h},operator:">="})}},timestamp:{method(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript";return f(["javascript","unix"].includes(h),'"type" must be one of "javascript, unix"'),this.format(h)}}},cast:{number:{from:l.isDate,to:(h,u)=>h.getTime()},string:{from:l.isDate,to(h,u){let{prefs:m}=u;return b.date(h,m)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),l.parse=function(h,u){if(h instanceof Date)return h;if("string"!=typeof h&&(isNaN(h)||!isFinite(h))||/^\s*$/.test(h))return null;if("iso"===u)return g.isIsoDate(h)?l.date(h.toString()):null;const m=h;if("string"==typeof h&&/^[+-]?\d+(\.\d+)?$/.test(h)&&(h=parseFloat(h)),u){if("javascript"===u)return l.date(1*h);if("unix"===u)return l.date(1e3*h);if("string"==typeof m)return null}return l.date(h)},l.date=function(h){const u=new Date(h);return isNaN(u.getTime())?null:u}},390:(E,d,x)=>{"use strict";const f=x(375),T=x(7824);E.exports=T.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(g){return f(Number.isSafeInteger(g)&&g>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:g}})},validate(g,b,l){let{n:h}=l;return g.length===h?g:b.error("function.arity",{n:h})}},class:{method(){return this.$_addRule("class")},validate:(g,b)=>/^\s*class\s/.test(g.toString())?g:b.error("function.class",{value:g})},minArity:{method(g){return f(Number.isSafeInteger(g)&&g>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:g}})},validate(g,b,l){let{n:h}=l;return g.length>=h?g:b.error("function.minArity",{n:h})}},maxArity:{method(g){return f(Number.isSafeInteger(g)&&g>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:g}})},validate(g,b,l){let{n:h}=l;return g.length<=h?g:b.error("function.maxArity",{n:h})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(E,d,x)=>{"use strict";const f=x(978),T=x(375),g=x(8571),b=x(3652),l=x(8068),h=x(8160),u=x(3292),m=x(6354),_=x(6133),w=x(3328),S={renameDefaults:{alias:!1,multiple:!1,override:!1}};E.exports=l.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(I,P)=>I.keys(P),validate(I,P){let{schema:L,error:V,state:W,prefs:G}=P;if(!I||typeof I!==L.$_property("typeof")||Array.isArray(I))return{value:I,errors:V("object.base",{type:L.$_property("typeof")})};if(!(L.$_terms.renames||L.$_terms.dependencies||L.$_terms.keys||L.$_terms.patterns||L.$_terms.externals))return;I=S.clone(I,G);const H=[];if(L.$_terms.renames&&!S.rename(L,I,W,G,H))return{value:I,errors:H};if(!L.$_terms.keys&&!L.$_terms.patterns&&!L.$_terms.dependencies)return{value:I,errors:H};const j=new Set(Object.keys(I));if(L.$_terms.keys){const K=[I,...W.ancestors];for(const R of L.$_terms.keys){const o=R.key,y=I[o];j.delete(o);const M=W.localize([...W.path,o],K,R),v=R.schema.$_validate(y,M,G);if(v.errors){if(G.abortEarly)return{value:I,errors:v.errors};void 0!==v.value&&(I[o]=v.value),H.push(...v.errors)}else"strip"===R.schema._flags.result||void 0===v.value&&void 0!==y?delete I[o]:void 0!==v.value&&(I[o]=v.value)}}if(j.size||L._flags._hasPatternMatch){const K=S.unknown(L,I,j,H,W,G);if(K)return K}if(L.$_terms.dependencies)for(const K of L.$_terms.dependencies){if(null!==K.key&&!1===S.isPresent(K.options)(K.key.resolve(I,W,G,null,{shadow:!1})))continue;const R=S.dependencies[K.rel](L,K,I,W,G);if(R){const o=L.$_createError(R.code,I,R.context,W,G);if(G.abortEarly)return{value:I,errors:o};H.push(o)}}return{value:I,errors:H}},rules:{and:{method(){for(var I=arguments.length,P=new Array(I),L=0;L!I.hasOwnProperty(L.key)):new S.Keys;for(const L in I)h.tryWithPath(()=>P.$_terms.keys.push({key:L,schema:this.$_compile(I[L])}),L)}else P.$_terms.keys=new S.Keys;else P.$_terms.keys=null;return P.$_mutateRebuild()}},length:{method(I){return this.$_addRule({name:"length",args:{limit:I},operator:"="})},validate(I,P,L,V){let{limit:W}=L,{name:G,operator:H,args:j}=V;return h.compare(Object.keys(I).length,W,H)?I:P.error("object."+G,{limit:j.limit,value:I})},args:[{name:"limit",ref:!0,assert:h.limit,message:"must be a positive integer"}]},max:{method(I){return this.$_addRule({name:"max",method:"length",args:{limit:I},operator:"<="})}},min:{method(I){return this.$_addRule({name:"min",method:"length",args:{limit:I},operator:">="})}},nand:{method(){for(var I=arguments.length,P=new Array(I),L=0;L2&&void 0!==arguments[2]?arguments[2]:{};const V=I instanceof RegExp;V||(I=this.$_compile(I,{appendPath:!0})),T(void 0!==P,"Invalid rule"),h.assertOptions(L,["fallthrough","matches"]),V&&T(!I.flags.includes("g")&&!I.flags.includes("y"),"pattern should not use global or sticky mode"),P=this.$_compile(P,{appendPath:!0});const W=this.clone();W.$_terms.patterns=W.$_terms.patterns||[];const G={[V?"regex":"schema"]:I,rule:P};return L.matches&&(G.matches=this.$_compile(L.matches),"array"!==G.matches.type&&(G.matches=G.matches.$_root.array().items(G.matches)),W.$_mutateRegister(G.matches),W.$_setFlag("_hasPatternMatch",!0,{clone:!1})),L.fallthrough&&(G.fallthrough=!0),W.$_terms.patterns.push(G),W.$_mutateRegister(P),W}},ref:{method(){return this.$_addRule("ref")},validate:(I,P)=>_.isRef(I)?I:P.error("object.refType",{value:I})},regex:{method(){return this.$_addRule("regex")},validate:(I,P)=>I instanceof RegExp?I:P.error("object.regex",{value:I})},rename:{method(I,P){let L=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};T("string"==typeof I||I instanceof RegExp,"Rename missing the from argument"),T("string"==typeof P||P instanceof w,"Invalid rename to argument"),T(P!==I,"Cannot rename key to same name:",I),h.assertOptions(L,["alias","ignoreUndefined","override","multiple"]);const V=this.clone();V.$_terms.renames=V.$_terms.renames||[];for(const W of V.$_terms.renames)T(W.from!==I,"Cannot rename the same key multiple times");return P instanceof w&&V.$_mutateRegister(P),V.$_terms.renames.push({from:I,to:P,options:f(S.renameDefaults,L)}),V}},schema:{method(){return this.$_addRule({name:"schema",args:{type:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any"}})},validate(I,P,L){let{type:V}=L;return!h.isSchema(I)||"any"!==V&&I.type!==V?P.error("object.schema",{type:V}):I}},unknown:{method(I){return this.$_setFlag("unknown",!1!==I)}},with:{method(I,P){return S.dependency(this,"with",I,P,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}},without:{method(I,P){return S.dependency(this,"without",I,P,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}},xor:{method(){for(var I=arguments.length,P=new Array(I),L=0;LP.add(L,{after:L.schema.$_rootReferences(),group:L.key}),L.key);I.$_terms.keys=new S.Keys(...P.nodes)}},manifest:{build(I,P){if(P.keys&&(I=I.keys(P.keys)),P.dependencies)for(const{rel:L,key:V=null,peers:W,options:G}of P.dependencies)I=S.dependency(I,L,V,W,G);if(P.patterns)for(const{regex:L,schema:V,rule:W,fallthrough:G,matches:H}of P.patterns)I=I.pattern(L||V,W,{fallthrough:G,matches:H});if(P.renames)for(const{from:L,to:V,options:W}of P.renames)I=I.rename(L,V,W);return I}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),S.clone=function(I,P){if("object"==typeof I){if(P.nonEnumerables)return g(I,{shallow:!0});const V=Object.create(Object.getPrototypeOf(I));return Object.assign(V,I),V}const L=function(){for(var V=arguments.length,W=new Array(V),G=0;G1&&"object"==typeof V[V.length-1]?V.pop():{}),h.assertOptions(W,["separator","isPresent"]),V=[].concat(V);const G=h.default(W.separator,"."),H=[];for(const K of V)T("string"==typeof K,P,"peers must be strings"),H.push(u.ref(K,{separator:G,ancestor:0,prefix:!1}));null!==L&&(L=u.ref(L,{separator:G,ancestor:0,prefix:!1}));const j=I.clone();return j.$_terms.dependencies=j.$_terms.dependencies||[],j.$_terms.dependencies.push(new S.Dependency(P,L,H,V,W)),j},S.dependencies={and(I,P,L,V,W){const G=[],H=[],j=P.peers.length,K=S.isPresent(P.options);for(const R of P.peers)!1===K(R.resolve(L,V,W,null,{shadow:!1}))?G.push(R.key):H.push(R.key);if(G.length!==j&&H.length!==j)return{code:"object.and",context:{present:H,presentWithLabels:S.keysToLabels(I,H),missing:G,missingWithLabels:S.keysToLabels(I,G)}}},nand(I,P,L,V,W){const G=[],H=S.isPresent(P.options);for(const R of P.peers)H(R.resolve(L,V,W,null,{shadow:!1}))&&G.push(R.key);if(G.length!==P.peers.length)return;const j=P.paths[0],K=P.paths.slice(1);return{code:"object.nand",context:{main:j,mainWithLabel:S.keysToLabels(I,j),peers:K,peersWithLabels:S.keysToLabels(I,K)}}},or(I,P,L,V,W){const G=S.isPresent(P.options);for(const H of P.peers)if(G(H.resolve(L,V,W,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:P.paths,peersWithLabels:S.keysToLabels(I,P.paths)}}},oxor(I,P,L,V,W){const G=[],H=S.isPresent(P.options);for(const K of P.peers)H(K.resolve(L,V,W,null,{shadow:!1}))&&G.push(K.key);if(!G.length||1===G.length)return;const j={peers:P.paths,peersWithLabels:S.keysToLabels(I,P.paths)};return j.present=G,j.presentWithLabels=S.keysToLabels(I,G),{code:"object.oxor",context:j}},with(I,P,L,V,W){const G=S.isPresent(P.options);for(const H of P.peers)if(!1===G(H.resolve(L,V,W,null,{shadow:!1})))return{code:"object.with",context:{main:P.key.key,mainWithLabel:S.keysToLabels(I,P.key.key),peer:H.key,peerWithLabel:S.keysToLabels(I,H.key)}}},without(I,P,L,V,W){const G=S.isPresent(P.options);for(const H of P.peers)if(G(H.resolve(L,V,W,null,{shadow:!1})))return{code:"object.without",context:{main:P.key.key,mainWithLabel:S.keysToLabels(I,P.key.key),peer:H.key,peerWithLabel:S.keysToLabels(I,H.key)}}},xor(I,P,L,V,W){const G=[],H=S.isPresent(P.options);for(const K of P.peers)H(K.resolve(L,V,W,null,{shadow:!1}))&&G.push(K.key);if(1===G.length)return;const j={peers:P.paths,peersWithLabels:S.keysToLabels(I,P.paths)};return 0===G.length?{code:"object.missing",context:j}:(j.present=G,j.presentWithLabels=S.keysToLabels(I,G),{code:"object.xor",context:j})}},S.keysToLabels=function(I,P){return Array.isArray(P)?P.map(L=>I.$_mapLabels(L)):I.$_mapLabels(P)},S.isPresent=function(I){return"function"==typeof I.isPresent?I.isPresent:P=>void 0!==P},S.rename=function(I,P,L,V,W){const G={};for(const H of I.$_terms.renames){const j=[],K="string"!=typeof H.from;if(K)for(const R in P){if(void 0===P[R]&&H.options.ignoreUndefined||R===H.to)continue;const o=H.from.exec(R);o&&j.push({from:R,to:H.to,match:o})}else!Object.prototype.hasOwnProperty.call(P,H.from)||void 0===P[H.from]&&H.options.ignoreUndefined||j.push(H);for(const R of j){const o=R.from;let y=R.to;if(y instanceof w&&(y=y.render(P,L,V,R.match)),o!==y){if(!H.options.multiple&&G[y]&&(W.push(I.$_createError("object.rename.multiple",P,{from:o,to:y,pattern:K},L,V)),V.abortEarly)||Object.prototype.hasOwnProperty.call(P,y)&&!H.options.override&&!G[y]&&(W.push(I.$_createError("object.rename.override",P,{from:o,to:y,pattern:K},L,V)),V.abortEarly))return!1;void 0===P[o]?delete P[y]:P[y]=P[o],G[y]=!0,H.options.alias||delete P[o]}}}return!0},S.unknown=function(I,P,L,V,W,G){if(I.$_terms.patterns){let H=!1;const j=I.$_terms.patterns.map(R=>{if(R.matches)return H=!0,[]}),K=[P,...W.ancestors];for(const R of L){const o=P[R],y=[...W.path,R];for(let M=0;M{"use strict";const f=x(375),T=x(8068),g=x(8160),b=x(3292),l=x(6354),h={};E.exports=T.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(u,m)=>u.ref(m),validate(u,m){let{schema:_,state:w,prefs:S}=m;f(_.$_terms.link,"Uninitialized link schema");const I=h.generate(_,u,w,S);return I.$_validate(u,w.nest(I,`link:${_.$_terms.link[0].ref.display}:${I.type}`),S)},generate:(u,m,_,w)=>h.generate(u,m,_,w),rules:{ref:{method(u){f(!this.$_terms.link,"Cannot reinitialize schema"),u=b.ref(u),f("value"===u.type||"local"===u.type,"Invalid reference type:",u.type),f("local"===u.type||"root"===u.ancestor||u.ancestor>0,"Link cannot reference itself");const m=this.clone();return m.$_terms.link=[{ref:u}],m}},relative:{method(){return this.$_setFlag("relative",!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}}},overrides:{concat(u){f(this.$_terms.link,"Uninitialized link schema"),f(g.isSchema(u),"Invalid schema object"),f("link"!==u.type,"Cannot merge type link with another link");const m=this.clone();return m.$_terms.whens||(m.$_terms.whens=[]),m.$_terms.whens.push({concat:u}),m.$_mutateRebuild()}},manifest:{build:(u,m)=>(f(m.link,"Invalid link description missing link"),u.ref(m.link))}}),h.generate=function(u,m,_,w){let S=_.mainstay.links.get(u);if(S)return S._generate(m,_,w).schema;const I=u.$_terms.link[0].ref,{perspective:P,path:L}=h.perspective(I,_);h.assert(P,"which is outside of schema boundaries",I,u,_,w);try{S=L.length?P.$_reach(L):P}catch{h.assert(!1,"to non-existing schema",I,u,_,w)}return h.assert("link"!==S.type,"which is another link",I,u,_,w),u._flags.relative||_.mainstay.links.set(u,S),S._generate(m,_,w).schema},h.perspective=function(u,m){if("local"===u.type){for(const{schema:_,key:w}of m.schemas){if((_._flags.id||w)===u.path[0])return{perspective:_,path:u.path.slice(1)};if(_.$_terms.shared)for(const S of _.$_terms.shared)if(S._flags.id===u.path[0])return{perspective:S,path:u.path.slice(1)}}return{perspective:null,path:null}}return"root"===u.ancestor?{perspective:m.schemas[m.schemas.length-1].schema,path:u.path}:{perspective:m.schemas[u.ancestor]&&m.schemas[u.ancestor].schema,path:u.path}},h.assert=function(u,m,_,w,S,I){u||f(!1,`"${l.label(w._flags,S,I)}" contains link reference "${_.display}" ${m}`)}},3832:(E,d,x)=>{"use strict";const f=x(375),T=x(8068),g=x(8160),b={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};E.exports=T.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(l,h){let{schema:u,error:m}=h;if(!l.match(b.numberRx))return;l=l.trim();const _={value:parseFloat(l)};if(0===_.value&&(_.value=0),!u._flags.unsafe)if(l.match(/e/i)){if(b.extractSignificantDigits(l)!==b.extractSignificantDigits(String(_.value)))return _.errors=m("number.unsafe"),_}else{const w=_.value.toString();if(w.match(/e/i))return _;if(w!==b.normalizeDecimal(l))return _.errors=m("number.unsafe"),_}return _}},validate(l,h){let{schema:u,error:m,prefs:_}=h;if(l===1/0||l===-1/0)return{value:l,errors:m("number.infinity")};if(!g.isNumber(l))return{value:l,errors:m("number.base")};const w={value:l};if(_.convert){const S=u.$_getRule("precision");if(S){const I=Math.pow(10,S.args.limit);w.value=Math.round(w.value*I)/I}}return 0===w.value&&(w.value=0),!u._flags.unsafe&&(l>Number.MAX_SAFE_INTEGER||l"})}},integer:{method(){return this.$_addRule("integer")},validate:(l,h)=>Math.trunc(l)-l==0?l:h.error("number.integer")},less:{method(l){return this.$_addRule({name:"less",method:"compare",args:{limit:l},operator:"<"})}},max:{method(l){return this.$_addRule({name:"max",method:"compare",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"compare",args:{limit:l},operator:">="})}},multiple:{method(l){return this.$_addRule({name:"multiple",args:{base:l}})},validate(l,h,u,m){let{base:_}=u;return l*(1/_)%1==0?l:h.error("number.multiple",{multiple:m.args.base,value:l})},args:[{name:"base",ref:!0,assert:l=>"number"==typeof l&&isFinite(l)&&l>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(l,h)=>Number.isSafeInteger(l)&&l>=0&&l<=65535?l:h.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(l){return f(Number.isSafeInteger(l),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:l}})},validate(l,h,u){let{limit:m}=u;const _=l.toString().match(b.precisionRx);return Math.max((_[1]?_[1].length:0)-(_[2]?parseInt(_[2],10):0),0)<=m?l:h.error("number.precision",{limit:m,value:l})},convert:!0},sign:{method(l){return f(["negative","positive"].includes(l),"Invalid sign",l),this.$_addRule({name:"sign",args:{sign:l}})},validate(l,h,u){let{sign:m}=u;return"negative"===m&&l<0||"positive"===m&&l>0?l:h.error(`number.${m}`)}},unsafe:{method(){let l=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof l,"enabled must be a boolean"),this.$_setFlag("unsafe",l)}}},cast:{string:{from:l=>"number"==typeof l,to:(l,h)=>l.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),b.extractSignificantDigits=function(l){return l.replace(b.exponentialPartRegex,"").replace(b.dotRegex,"").replace(b.trailingZerosRegex,"").replace(b.leadingSignAndZerosRegex,"")},b.normalizeDecimal=function(l){return(l=l.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&l.endsWith("0")&&(l=l.replace(/0+$/,"")),"-0"===l?"0":l}},8966:(E,d,x)=>{"use strict";const f=x(7824);E.exports=f.extend({type:"object",cast:{map:{from:T=>T&&"object"==typeof T,to:(T,g)=>new Map(Object.entries(T))}}})},7417:(E,d,x)=>{"use strict";const f=x(375),T=x(5380),g=x(1745),b=x(9959),l=x(6064),h=x(9926),u=x(5752),m=x(8068),_=x(8160),w={tlds:h instanceof Set&&{tlds:{allow:h,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:b.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};E.exports=m.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(S,I){let{schema:P,state:L,prefs:V}=I;const W=P.$_getRule("normalize");W&&(S=S.normalize(W.args.form));const G=P.$_getRule("case");G&&(S="upper"===G.args.direction?S.toLocaleUpperCase():S.toLocaleLowerCase());const H=P.$_getRule("trim");if(H&&H.args.enabled&&(S=S.trim()),P.$_terms.replacements)for(const K of P.$_terms.replacements)S=S.replace(K.pattern,K.replacement);const j=P.$_getRule("hex");if(j&&j.args.options.byteAligned&&S.length%2!=0&&(S=`0${S}`),P.$_getRule("isoDate")){const K=w.isoDate(S);K&&(S=K)}if(P._flags.truncate){const K=P.$_getRule("max");if(K){let R=K.args.limit;if(_.isResolvable(R)&&(R=R.resolve(S,L,V),!_.limit(R)))return{value:S,errors:P.$_createError("any.ref",R,{ref:K.args.limit,arg:"limit",reason:"must be a positive integer"},L,V)};S=S.slice(0,R)}}return{value:S}}},validate(S,I){let{schema:P,error:L}=I;if("string"!=typeof S)return{value:S,errors:L("string.base")};if(""===S){const V=P.$_getRule("min");return V&&0===V.args.limit?void 0:{value:S,errors:L("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(S,I)=>/^[a-zA-Z0-9]+$/.test(S)?S:I.error("string.alphanum")},base64:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _.assertOptions(S,["paddingRequired","urlSafe"]),S={urlSafe:!1,paddingRequired:!0,...S},f("boolean"==typeof S.paddingRequired,"paddingRequired must be boolean"),f("boolean"==typeof S.urlSafe,"urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:S}})},validate(S,I,P){let{options:L}=P;return w.base64Regex[L.paddingRequired][L.urlSafe].test(S)?S:I.error("string.base64")}},case:{method(S){return f(["lower","upper"].includes(S),"Invalid case:",S),this.$_addRule({name:"case",args:{direction:S}})},validate(S,I,P){let{direction:L}=P;return"lower"===L&&S===S.toLocaleLowerCase()||"upper"===L&&S===S.toLocaleUpperCase()?S:I.error(`string.${L}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(S,I){let P=S.length,L=0,V=1;for(;P--;){const W=S.charAt(P)*V;L+=W-9*(W>9),V^=3}return L>0&&L%10==0?S:I.error("string.creditCard")}},dataUri:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _.assertOptions(S,["paddingRequired"]),S={paddingRequired:!0,...S},f("boolean"==typeof S.paddingRequired,"paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:S}})},validate(S,I,P){let{options:L}=P;const V=S.match(w.dataUriRegex);return!V||V[2]&&"base64"===V[2]&&!w.base64Regex[L.paddingRequired].false.test(V[3])?I.error("string.dataUri"):S}},domain:{method(S){S&&_.assertOptions(S,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const I=w.addressOptions(S);return this.$_addRule({name:"domain",args:{options:S},address:I})},validate(S,I,P,L){let{address:V}=L;return T.isValid(S,V)?S:I.error("string.domain")}},email:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),f(void 0===S.multiple||"boolean"==typeof S.multiple,"multiple option must be an boolean");const I=w.addressOptions(S),P=new RegExp(`\\s*[${S.separator?l(S.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:S},regex:P,address:I})},validate(S,I,P,L){let{options:V}=P,{regex:W,address:G}=L;const H=V.multiple?S.split(W):[S],j=[];for(const K of H)g.isValid(K,G)||j.push(K);return j.length?I.error("string.email",{value:S,invalids:j}):S}},guid:{alias:"uuid",method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["version","separator"]);let I="";if(S.version){const V=[].concat(S.version);f(V.length>=1,"version must have at least 1 valid version specified");const W=new Set;for(let G=0;G0&&void 0!==arguments[0]?arguments[0]:{};return _.assertOptions(S,["byteAligned"]),S={byteAligned:!1,...S},f("boolean"==typeof S.byteAligned,"byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:S}})},validate(S,I,P){let{options:L}=P;return w.hexRegex.test(S)?L.byteAligned&&S.length%2!=0?I.error("string.hexAlign"):S:I.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(S,I)=>T.isValid(S,{minDomainSegments:1})||w.ipRegex.test(S)?S:I.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["cidr","version"]);const{cidr:I,versions:P,regex:L}=b.regex(S);return this.$_addRule({name:"ip",args:{options:{cidr:I,version:S.version?P:void 0}},regex:L})},validate(S,I,P,L){let{options:V}=P,{regex:W}=L;return W.test(S)?S:V.version?I.error("string.ipVersion",{value:S,cidr:V.cidr,version:V.version}):I.error("string.ip",{value:S,cidr:V.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(S,I){let{error:P}=I;return w.isoDate(S)?S:P("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(S,I)=>w.isoDurationRegex.test(S)?S:I.error("string.isoDuration")},length:{method(S,I){return w.length(this,"length",S,"=",I)},validate(S,I,P,L){let{limit:V,encoding:W}=P,{name:G,operator:H,args:j}=L;return _.compare(!W&&S.length,V,H)?S:I.error("string."+G,{limit:j.limit,value:S,encoding:W})},args:[{name:"limit",ref:!0,assert:_.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(S,I){return w.length(this,"max",S,"<=",I)},args:["limit","encoding"]},min:{method(S,I){return w.length(this,"min",S,">=",I)},args:["limit","encoding"]},normalize:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"NFC";return f(w.normalizationForms.includes(S),"normalization form must be one of "+w.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:S}})},validate(S,I,P){let{error:L}=I,{form:V}=P;return S===S.normalize(V)?S:L("string.normalize",{value:S,form:V})},convert:!0},pattern:{alias:"regex",method(S){let I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(S instanceof RegExp,"regex must be a RegExp"),f(!S.flags.includes("g")&&!S.flags.includes("y"),"regex should not use global or sticky mode"),"string"==typeof I&&(I={name:I}),_.assertOptions(I,["invert","name"]);const P=["string.pattern",I.invert?".invert":"",I.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:S,options:I},errorCode:P})},validate(S,I,P,L){let{regex:V,options:W}=P,{errorCode:G}=L;return V.test(S)^W.invert?S:I.error(G,{name:W.name,regex:V,value:S})},args:["regex","options"],multi:!0},replace:{method(S,I){"string"==typeof S&&(S=new RegExp(l(S),"g")),f(S instanceof RegExp,"pattern must be a RegExp"),f("string"==typeof I,"replacement must be a String");const P=this.clone();return P.$_terms.replacements||(P.$_terms.replacements=[]),P.$_terms.replacements.push({pattern:S,replacement:I}),P}},token:{method(){return this.$_addRule("token")},validate:(S,I)=>/^\w+$/.test(S)?S:I.error("string.token")},trim:{method(){let S=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof S,"enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:S}})},validate(S,I,P){let{enabled:L}=P;return L&&S!==S.trim()?I.error("string.trim"):S},convert:!0},truncate:{method(){let S=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return f("boolean"==typeof S,"enabled must be a boolean"),this.$_setFlag("truncate",S)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_.assertOptions(S,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),S.domain&&_.assertOptions(S.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:I,scheme:P}=u.regex(S),L=S.domain?w.addressOptions(S.domain):null;return this.$_addRule({name:"uri",args:{options:S},regex:I,domain:L,scheme:P})},validate(S,I,P,L){let{options:V}=P,{regex:W,domain:G,scheme:H}=L;if(["http:/","https:/"].includes(S))return I.error("string.uri");const j=W.exec(S);if(j){const K=j[1]||j[2];return!G||V.allowRelative&&!K||T.isValid(K,G)?S:I.error("string.domain",{value:K})}return V.relativeOnly?I.error("string.uriRelativeOnly"):V.scheme?I.error("string.uriCustomScheme",{scheme:H,value:S}):I.error("string.uri")}}},manifest:{build(S,I){if(I.replacements)for(const{pattern:P,replacement:L}of I.replacements)S=S.replace(P,L);return S}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),w.addressOptions=function(S){if(!S||(f(void 0===S.minDomainSegments||Number.isSafeInteger(S.minDomainSegments)&&S.minDomainSegments>0,"minDomainSegments must be a positive integer"),f(void 0===S.maxDomainSegments||Number.isSafeInteger(S.maxDomainSegments)&&S.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),!1===S.tlds))return S;if(!0===S.tlds||void 0===S.tlds)return f(w.tlds,"Built-in TLD list disabled"),Object.assign({},S,w.tlds);f("object"==typeof S.tlds,"tlds must be true, false, or an object");const I=S.tlds.deny;if(I)return Array.isArray(I)&&(S=Object.assign({},S,{tlds:{deny:new Set(I)}})),f(S.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),f(!S.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),w.validateTlds(S.tlds.deny,"tlds.deny"),S;const P=S.tlds.allow;return P?!0===P?(f(w.tlds,"Built-in TLD list disabled"),Object.assign({},S,w.tlds)):(Array.isArray(P)&&(S=Object.assign({},S,{tlds:{allow:new Set(P)}})),f(S.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),w.validateTlds(S.tlds.allow,"tlds.allow"),S):S},w.validateTlds=function(S,I){for(const P of S)f(T.isValid(P,{minDomainSegments:1,maxDomainSegments:1}),`${I} must contain valid top level domain names`)},w.isoDate=function(S){if(!_.isIsoDate(S))return null;/.*T.*[+-]\d\d$/.test(S)&&(S+="00");const I=new Date(S);return isNaN(I.getTime())?null:I.toISOString()},w.length=function(S,I,P,L,V){return f(!V||!1,"Invalid encoding:",V),S.$_addRule({name:I,method:"length",args:{limit:P,encoding:V},operator:L})}},8826:(E,d,x)=>{"use strict";const f=x(375),T=x(8068),g={};g.Map=class extends Map{slice(){return new g.Map(this)}},E.exports=T.extend({type:"symbol",terms:{map:{init:new g.Map}},coerce:{method(b,l){let{schema:h,error:u}=l;const m=h.$_terms.map.get(b);return m&&(b=m),h._flags.only&&"symbol"!=typeof b?{value:b,errors:u("symbol.map",{map:h.$_terms.map})}:{value:b}}},validate(b,l){let{error:h}=l;if("symbol"!=typeof b)return{value:b,errors:h("symbol.base")}},rules:{map:{method(b){b&&!b[Symbol.iterator]&&"object"==typeof b&&(b=Object.entries(b)),f(b&&b[Symbol.iterator],"Iterable must be an iterable or object");const l=this.clone(),h=[];for(const u of b){f(u&&u[Symbol.iterator],"Entry must be an iterable");const[m,_]=u;f("object"!=typeof m&&"function"!=typeof m&&"symbol"!=typeof m,"Key must not be of type object, function, or Symbol"),f("symbol"==typeof _,"Value must be a Symbol"),l.$_terms.map.set(m,_),h.push(_)}return l.valid(...h)}}},manifest:{build:(b,l)=>(l.map&&(b=b.map(l.map)),b)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(738),b=x(9621),l=x(8160),h=x(6354),u=x(493),m={result:Symbol("result")};d.entry=function(_,w,S){let I=l.defaults;S&&(f(void 0===S.warnings,"Cannot override warnings preference in synchronous validation"),f(void 0===S.artifacts,"Cannot override artifacts preference in synchronous validation"),I=l.preferences(l.defaults,S));const P=m.entry(_,w,I);f(!P.mainstay.externals.length,"Schema with external rules must use validateAsync()");const L={value:P.value};return P.error&&(L.error=P.error),P.mainstay.warnings.length&&(L.warning=h.details(P.mainstay.warnings)),P.mainstay.debug&&(L.debug=P.mainstay.debug),P.mainstay.artifacts&&(L.artifacts=P.mainstay.artifacts),L},d.entryAsync=function(){var _=ie(function*(w,S,I){let P=l.defaults;I&&(P=l.preferences(l.defaults,I));const L=m.entry(w,S,P),V=L.mainstay;if(L.error)throw V.debug&&(L.error.debug=V.debug),L.error;if(V.externals.length){let G=L.value;const H=[];for(const j of V.externals){const K=j.state.path,R="link"===j.schema.type?V.links.get(j.schema):null;let o,y,M=G;const v=K.length?[G]:[],k=K.length?b(w,K):w;if(K.length){o=K[K.length-1];let D=G;for(const N of K.slice(0,-1))D=D[N],v.unshift(D);y=v[0],M=y[o]}try{const D=(C,a)=>(R||j.schema).$_createError(C,M,a,j.state,P),N=yield j.method(M,{schema:j.schema,linked:R,state:j.state,prefs:I,original:k,error:D,errorsArray:m.errorsArray,warn:(C,a)=>V.warnings.push((R||j.schema).$_createError(C,M,a,j.state,P)),message:(C,a)=>(R||j.schema).$_createError("external",M,a,j.state,P,{messages:C})});if(void 0===N||N===M)continue;if(N instanceof h.Report){if(V.tracer.log(j.schema,j.state,"rule","external","error"),H.push(N),P.abortEarly)break;continue}if(Array.isArray(N)&&N[l.symbols.errors]){if(V.tracer.log(j.schema,j.state,"rule","external","error"),H.push(...N),P.abortEarly)break;continue}y?(V.tracer.value(j.state,"rule",M,N,"external"),y[o]=N):(V.tracer.value(j.state,"rule",G,N,"external"),G=N)}catch(D){throw P.errors.label&&(D.message+=` (${j.label})`),D}}if(L.value=G,H.length)throw L.error=h.process(H,w,P),V.debug&&(L.error.debug=V.debug),L.error}if(!P.warnings&&!P.debug&&!P.artifacts)return L.value;const W={value:L.value};return V.warnings.length&&(W.warning=h.details(V.warnings)),V.debug&&(W.debug=V.debug),V.artifacts&&(W.artifacts=V.artifacts),W});return function(w,S,I){return _.apply(this,arguments)}}(),m.Mainstay=class{constructor(_,w,S){this.externals=[],this.warnings=[],this.tracer=_,this.debug=w,this.links=S,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const _=this._snapshots.pop();this.externals=_.externals,this.warnings=_.warnings}},m.entry=function(_,w,S){const{tracer:I,cleanup:P}=m.tracer(w,S),L=S.debug?[]:null,V=w._ids._schemaChain?new Map:null,W=new m.Mainstay(I,L,V),H=new u([],[],{mainstay:W,schemas:w._ids._schemaChain?[{schema:w}]:null}),j=d.validate(_,w,H,S);P&&w.$_root.untrace();const K=h.process(j.errors,_,S);return{value:j.value,error:K,mainstay:W}},m.tracer=function(_,w){return _.$_root._tracer?{tracer:_.$_root._tracer._register(_)}:w.debug?(f(_.$_root.trace,"Debug mode not supported"),{tracer:_.$_root.trace()._register(_),cleanup:!0}):{tracer:m.ignore}},d.validate=function(_,w,S,I){let P=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(w.$_terms.whens&&(w=w._generate(_,S,I).schema),w._preferences&&(I=m.prefs(w,I)),w._cache&&I.cache){const K=w._cache.get(_);if(S.mainstay.tracer.debug(S,"validate","cached",!!K),K)return K}const L=(K,R,o)=>w.$_createError(K,_,R,o||S,I),V={original:_,prefs:I,schema:w,state:S,error:L,errorsArray:m.errorsArray,warn:(K,R,o)=>S.mainstay.warnings.push(L(K,R,o)),message:(K,R)=>w.$_createError("custom",_,R,S,I,{messages:K})};S.mainstay.tracer.entry(w,S);const W=w._definition;if(W.prepare&&void 0!==_&&I.convert){const K=W.prepare(_,V);if(K){if(S.mainstay.tracer.value(S,"prepare",_,K.value),K.errors)return m.finalize(K.value,[].concat(K.errors),V);_=K.value}}if(W.coerce&&void 0!==_&&I.convert&&(!W.coerce.from||W.coerce.from.includes(typeof _))){const K=W.coerce.method(_,V);if(K){if(S.mainstay.tracer.value(S,"coerced",_,K.value),K.errors)return m.finalize(K.value,[].concat(K.errors),V);_=K.value}}const G=w._flags.empty;G&&G.$_match(m.trim(_,w),S.nest(G),l.defaults)&&(S.mainstay.tracer.value(S,"empty",_,void 0),_=void 0);const H=P.presence||w._flags.presence||(w._flags._endedSwitch?null:I.presence);if(void 0===_){if("forbidden"===H)return m.finalize(_,null,V);if("required"===H)return m.finalize(_,[w.$_createError("any.required",_,null,S,I)],V);if("optional"===H){if(w._flags.default!==l.symbols.deepDefault)return m.finalize(_,null,V);S.mainstay.tracer.value(S,"default",_,{}),_={}}}else if("forbidden"===H)return m.finalize(_,[w.$_createError("any.unknown",_,null,S,I)],V);const j=[];if(w._valids){const K=w._valids.get(_,S,I,w._flags.insensitive);if(K)return I.convert&&(S.mainstay.tracer.value(S,"valids",_,K.value),_=K.value),S.mainstay.tracer.filter(w,S,"valid",K),m.finalize(_,null,V);if(w._flags.only){const R=w.$_createError("any.only",_,{valids:w._valids.values({display:!0})},S,I);if(I.abortEarly)return m.finalize(_,[R],V);j.push(R)}}if(w._invalids){const K=w._invalids.get(_,S,I,w._flags.insensitive);if(K){S.mainstay.tracer.filter(w,S,"invalid",K);const R=w.$_createError("any.invalid",_,{invalids:w._invalids.values({display:!0})},S,I);if(I.abortEarly)return m.finalize(_,[R],V);j.push(R)}}if(W.validate){const K=W.validate(_,V);if(K&&(S.mainstay.tracer.value(S,"base",_,K.value),_=K.value,K.errors)){if(!Array.isArray(K.errors))return j.push(K.errors),m.finalize(_,j,V);if(K.errors.length)return j.push(...K.errors),m.finalize(_,j,V)}}return w._rules.length?m.rules(_,j,V):m.finalize(_,j,V)},m.rules=function(_,w,S){const{schema:I,state:P,prefs:L}=S;for(const V of I._rules){const W=I._definition.rules[V.method];if(W.convert&&L.convert){P.mainstay.tracer.log(I,P,"rule",V.name,"full");continue}let G,H=V.args;if(V._resolve.length){H=Object.assign({},H);for(const K of V._resolve){const R=W.argsByName.get(K),o=H[K].resolve(_,P,L),y=R.normalize?R.normalize(o):o,M=l.validateArg(y,null,R);if(M){G=I.$_createError("any.ref",o,{arg:K,ref:H[K],reason:M},P,L);break}H[K]=y}}G=G||W.validate(_,S,H,V);const j=m.rule(G,V);if(j.errors){if(P.mainstay.tracer.log(I,P,"rule",V.name,"error"),V.warn){P.mainstay.warnings.push(...j.errors);continue}if(L.abortEarly)return m.finalize(_,j.errors,S);w.push(...j.errors)}else P.mainstay.tracer.log(I,P,"rule",V.name,"pass"),P.mainstay.tracer.value(P,"rule",_,j.value,V.name),_=j.value}return m.finalize(_,w,S)},m.rule=function(_,w){return _ instanceof h.Report?(m.error(_,w),{errors:[_],value:null}):Array.isArray(_)&&_[l.symbols.errors]?(_.forEach(S=>m.error(S,w)),{errors:_,value:null}):{errors:null,value:_}},m.error=function(_,w){return w.message&&_._setTemplate(w.message),_},m.finalize=function(_,w,S){w=w||[];const{schema:I,state:P,prefs:L}=S;if(w.length){const W=m.default("failover",void 0,w,S);void 0!==W&&(P.mainstay.tracer.value(P,"failover",_,W),_=W,w=[])}if(w.length&&I._flags.error)if("function"==typeof I._flags.error){w=I._flags.error(w),Array.isArray(w)||(w=[w]);for(const W of w)f(W instanceof Error||W instanceof h.Report,"error() must return an Error object")}else w=[I._flags.error];if(void 0===_){const W=m.default("default",_,w,S);P.mainstay.tracer.value(P,"default",_,W),_=W}if(I._flags.cast&&void 0!==_){const W=I._definition.cast[I._flags.cast];if(W.from(_)){const G=W.to(_,S);P.mainstay.tracer.value(P,"cast",_,G,I._flags.cast),_=G}}if(I.$_terms.externals&&L.externals&&!1!==L._externals)for(const{method:W}of I.$_terms.externals)P.mainstay.externals.push({method:W,schema:I,state:P,label:h.label(I._flags,P,L)});const V={value:_,errors:w.length?w:null};return I._flags.result&&(V.value="strip"===I._flags.result?void 0:S.original,P.mainstay.tracer.value(P,I._flags.result,_,V.value),P.shadow(_,I._flags.result)),I._cache&&!1!==L.cache&&!I._refs.length&&I._cache.set(S.original,V),void 0===_||V.errors||void 0===I._flags.artifact||(P.mainstay.artifacts=P.mainstay.artifacts||new Map,P.mainstay.artifacts.has(I._flags.artifact)||P.mainstay.artifacts.set(I._flags.artifact,[]),P.mainstay.artifacts.get(I._flags.artifact).push(P.path)),V},m.prefs=function(_,w){const S=w===l.defaults;return S&&_._preferences[l.symbols.prefs]?_._preferences[l.symbols.prefs]:(w=l.preferences(w,_._preferences),S&&(_._preferences[l.symbols.prefs]=w),w)},m.default=function(_,w,S,I){const{schema:P,state:L,prefs:V}=I,W=P._flags[_];if(V.noDefaults||void 0===W)return w;if(L.mainstay.tracer.log(P,L,"rule",_,"full"),!W)return W;if("function"==typeof W){const G=W.length?[T(L.ancestors[0]),I]:[];try{return W(...G)}catch(H){return void S.push(P.$_createError(`any.${_}`,null,{error:H},L,V))}}return"object"!=typeof W?W:W[l.symbols.literal]?W.literal:l.isResolvable(W)?W.resolve(w,L,V):T(W)},m.trim=function(_,w){if("string"!=typeof _)return _;const S=w.$_getRule("trim");return S&&S.args.enabled?_.trim():_},m.ignore={active:!1,debug:g,entry:g,filter:g,log:g,resolve:g,value:g},m.errorsArray=function(){const _=[];return _[l.symbols.errors]=!0,_}},2036:(E,d,x)=>{"use strict";const f=x(375),T=x(9474),g=x(8160),b={};E.exports=b.Values=class{constructor(l,h){this._values=new Set(l),this._refs=new Set(h),this._lowercase=b.lowercases(l),this._override=!1}get length(){return this._values.size+this._refs.size}add(l,h){g.isResolvable(l)?this._refs.has(l)||(this._refs.add(l),h&&h.register(l)):this.has(l,null,null,!1)||(this._values.add(l),"string"==typeof l&&this._lowercase.set(l.toLowerCase(),l))}static merge(l,h,u){if(l=l||new b.Values,h){if(h._override)return h.clone();for(const m of[...h._values,...h._refs])l.add(m)}if(u)for(const m of[...u._values,...u._refs])l.remove(m);return l.length?l:null}remove(l){g.isResolvable(l)?this._refs.delete(l):(this._values.delete(l),"string"==typeof l&&this._lowercase.delete(l.toLowerCase()))}has(l,h,u,m){return!!this.get(l,h,u,m)}get(l,h,u,m){if(!this.length)return!1;if(this._values.has(l))return{value:l};if("string"==typeof l&&l&&m){const _=this._lowercase.get(l.toLowerCase());if(_)return{value:_}}if(!this._refs.size&&"object"!=typeof l)return!1;if("object"==typeof l)for(const _ of this._values)if(T(_,l))return{value:_};if(h)for(const _ of this._refs){const w=_.resolve(l,h,u,null,{in:!0});if(void 0===w)continue;const S=_.in&&"object"==typeof w?Array.isArray(w)?w:Object.keys(w):[w];for(const I of S)if(typeof I==typeof l)if(m&&l&&"string"==typeof l){if(I.toLowerCase()===l.toLowerCase())return{value:I,ref:_}}else if(T(I,l))return{value:I,ref:_}}return!1}override(){this._override=!0}values(l){if(l&&l.display){const h=[];for(const u of[...this._values,...this._refs])void 0!==u&&h.push(u);return h}return Array.from([...this._values,...this._refs])}clone(){const l=new b.Values(this._values,this._refs);return l._override=this._override,l}concat(l){f(!l._override,"Cannot concat override set of values");const h=new b.Values([...this._values,...l._values],[...this._refs,...l._refs]);return h._override=this._override,h}describe(){const l=[];this._override&&l.push({override:!0});for(const h of this._values.values())l.push(h&&"object"==typeof h?{value:h}:h);for(const h of this._refs.values())l.push(h.describe());return l}},b.Values.prototype[g.symbols.values]=!0,b.Values.prototype.slice=b.Values.prototype.clone,b.lowercases=function(l){const h=new Map;if(l)for(const u of l)"string"==typeof u&&h.set(u.toLowerCase(),u);return h}},978:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(1687),b=x(9621),l={};E.exports=function(h,u){let m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(f(h&&"object"==typeof h,"Invalid defaults value: must be an object"),f(!u||!0===u||"object"==typeof u,"Invalid source value: must be true, falsy or an object"),f("object"==typeof m,"Invalid options: must be an object"),!u)return null;if(m.shallow)return l.applyToDefaultsWithShallow(h,u,m);const _=T(h);if(!0===u)return _;const w=void 0!==m.nullOverride&&m.nullOverride;return g(_,u,{nullOverride:w,mergeArrays:!1})},l.applyToDefaultsWithShallow=function(h,u,m){const _=m.shallow;f(Array.isArray(_),"Invalid keys");const w=new Map,S=!0===u?null:new Set;for(let L of _){L=Array.isArray(L)?L:L.split(".");const V=b(h,L);V&&"object"==typeof V?w.set(V,S&&b(u,L)||V):S&&S.add(L)}const I=T(h,{},w);if(!S)return I;for(const L of S)l.reachCopy(I,u,L);return g(I,u,{nullOverride:void 0!==m.nullOverride&&m.nullOverride,mergeArrays:!1})},l.reachCopy=function(h,u,m){for(const S of m){if(!(S in u))return;const I=u[S];if("object"!=typeof I||null===I)return;u=I}const _=u;let w=h;for(let S=0;S{"use strict";const f=x(7916);E.exports=function(T){if(!T){for(var g=arguments.length,b=new Array(g>1?g-1:0),l=1;l{"use strict";const f=x(9621),T=x(4277),g=x(7043),b={needsProtoHack:new Set([T.set,T.map,T.weakSet,T.weakMap])};E.exports=b.clone=function(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("object"!=typeof l||null===l)return l;let m=b.clone,_=u;if(h.shallow){if(!0!==h.shallow)return b.cloneWithShallow(l,h);m=P=>P}else if(_){const P=_.get(l);if(P)return P}else _=new Map;const w=T.getInternalProto(l);if(w===T.buffer)return!1;if(w===T.date)return new Date(l.getTime());if(w===T.regex)return new RegExp(l);const S=b.base(l,w,h);if(S===l)return l;if(_&&_.set(l,S),w===T.set)for(const P of l)S.add(m(P,h,_));else if(w===T.map)for(const[P,L]of l)S.set(P,m(L,h,_));const I=g.keys(l,h);for(const P of I){if("__proto__"===P)continue;if(w===T.array&&"length"===P){S.length=l.length;continue}const L=Object.getOwnPropertyDescriptor(l,P);L?L.get||L.set?Object.defineProperty(S,P,L):L.enumerable?S[P]=m(l[P],h,_):Object.defineProperty(S,P,{enumerable:!1,writable:!0,configurable:!0,value:m(l[P],h,_)}):Object.defineProperty(S,P,{enumerable:!0,writable:!0,configurable:!0,value:m(l[P],h,_)})}return S},b.cloneWithShallow=function(l,h){const u=h.shallow;(h=Object.assign({},h)).shallow=!1;const m=new Map;for(const _ of u){const w=f(l,_);"object"!=typeof w&&"function"!=typeof w||m.set(w,w)}return b.clone(l,h,m)},b.base=function(l,h,u){if(!1===u.prototype)return b.needsProtoHack.has(h)?new h.constructor:h===T.array?[]:{};const m=Object.getPrototypeOf(l);if(m&&m.isImmutable)return l;if(h===T.array){const _=[];return m!==h&&Object.setPrototypeOf(_,m),_}if(b.needsProtoHack.has(h)){const _=new m.constructor;return m!==h&&Object.setPrototypeOf(_,m),_}return Object.create(m)}},9474:(E,d,x)=>{"use strict";const f=x(4277),T={mismatched:null};E.exports=function(g,b,l){return l=Object.assign({prototype:!0},l),!!T.isDeepEqual(g,b,l,[])},T.isDeepEqual=function(g,b,l,h){if(g===b)return 0!==g||1/g==1/b;const u=typeof g;if(u!==typeof b||null===g||null===b)return!1;if("function"===u){if(!l.deepFunction||g.toString()!==b.toString())return!1}else if("object"!==u)return g!=g&&b!=b;const m=T.getSharedType(g,b,!!l.prototype);switch(m){case f.buffer:return!1;case f.promise:return g===b;case f.regex:return g.toString()===b.toString();case T.mismatched:return!1}for(let _=h.length-1;_>=0;--_)if(h[_].isSame(g,b))return!0;h.push(new T.SeenEntry(g,b));try{return!!T.isDeepEqualObj(m,g,b,l,h)}finally{h.pop()}},T.getSharedType=function(g,b,l){if(l)return Object.getPrototypeOf(g)!==Object.getPrototypeOf(b)?T.mismatched:f.getInternalProto(g);const h=f.getInternalProto(g);return h!==f.getInternalProto(b)?T.mismatched:h},T.valueOf=function(g){const b=g.valueOf;if(void 0===b)return g;try{return b.call(g)}catch(l){return l}},T.hasOwnEnumerableProperty=function(g,b){return Object.prototype.propertyIsEnumerable.call(g,b)},T.isSetSimpleEqual=function(g,b){for(const l of Set.prototype.values.call(g))if(!Set.prototype.has.call(b,l))return!1;return!0},T.isDeepEqualObj=function(g,b,l,h,u){const{isDeepEqual:m,valueOf:_,hasOwnEnumerableProperty:w}=T,{keys:S,getOwnPropertySymbols:I}=Object;if(g===f.array){if(!h.part){if(b.length!==l.length)return!1;for(let G=0;G{"use strict";const f=x(8761);E.exports=class extends Error{constructor(T){super(T.filter(g=>""!==g).map(g=>"string"==typeof g?g:g instanceof Error?g.message:f(g)).join(" ")||"Unknown error"),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,d.assert)}}},5277:E=>{"use strict";const d={};E.exports=function(x){if(!x)return"";let f="";for(let T=0;T=256?"&#"+x+";":`&#x${x.toString(16).padStart(2,"0")};`)},d.isSafe=function(x){return d.safeCharCodes.has(x)},d.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),d.safeCharCodes=function(){const x=new Set;for(let f=32;f<123;++f)(f>=97||f>=65&&f<=90||f>=48&&f<=57||32===f||46===f||44===f||45===f||58===f||95===f)&&x.add(f);return x}()},6064:E=>{"use strict";E.exports=function(d){return d.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:E=>{"use strict";E.exports=function(){}},1687:(E,d,x)=>{"use strict";const f=x(375),T=x(8571),g=x(7043),b={};E.exports=b.merge=function(l,h,u){if(f(l&&"object"==typeof l,"Invalid target value: must be an object"),f(null==h||"object"==typeof h,"Invalid source value: must be null, undefined, or an object"),!h)return l;if(u=Object.assign({nullOverride:!0,mergeArrays:!0},u),Array.isArray(h)){f(Array.isArray(l),"Cannot merge array onto an object"),u.mergeArrays||(l.length=0);for(let _=0;_{"use strict";const f=x(375),T={};E.exports=function(g,b,l){if(!1===b||null==b)return g;"string"==typeof(l=l||{})&&(l={separator:l});const h=Array.isArray(b);f(!h||!l.separator,"Separator option is not valid for array-based chain");const u=h?b:b.split(l.separator||".");let m=g;for(let _=0;_{"use strict";E.exports=function(){try{return JSON.stringify(...arguments)}catch(d){return"[Cannot display object: "+d.message+"]"}}},4277:(E,d)=>{"use strict";const x={};d=E.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},x.typeMap=new Map([["[object Error]",d.error],["[object Map]",d.map],["[object Promise]",d.promise],["[object Set]",d.set],["[object WeakMap]",d.weakMap],["[object WeakSet]",d.weakSet]]),d.getInternalProto=function(f){if(Array.isArray(f))return d.array;if(f instanceof Date)return d.date;if(f instanceof RegExp)return d.regex;if(f instanceof Error)return d.error;const T=Object.prototype.toString.call(f);return x.typeMap.get(T)||d.generic}},7043:(E,d)=>{"use strict";d.keys=function(x){return!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).symbols?Reflect.ownKeys(x):Object.getOwnPropertyNames(x)}},3652:(E,d,x)=>{"use strict";const f=x(375),T={};d.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(g,b){const l=[].concat((b=b||{}).before||[]),h=[].concat(b.after||[]),u=b.group||"?",m=b.sort||0;f(!l.includes(u),`Item cannot come before itself: ${u}`),f(!l.includes("?"),"Item cannot come before unassociated items"),f(!h.includes(u),`Item cannot come after itself: ${u}`),f(!h.includes("?"),"Item cannot come after unassociated items"),Array.isArray(g)||(g=[g]);for(const _ of g)this._items.push({seq:this._items.length,sort:m,before:l,after:h,group:u,node:_});if(!b.manual){const _=this._sort();f(_,"item","?"!==u?`added into group ${u}`:"","created a dependencies error")}return this.nodes}merge(g){Array.isArray(g)||(g=[g]);for(const l of g)if(l)for(const h of l._items)this._items.push(Object.assign({},h));this._items.sort(T.mergeSort);for(let l=0;lg.sort===b.sort?0:g.sort{"use strict";const f=x(443),T=x(2178),g={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:f.URL||URL};d.analyze=function(b){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!b)return T.code("DOMAIN_NON_EMPTY_STRING");if("string"!=typeof b)throw new Error("Invalid input: domain must be a string");if(b.length>256)return T.code("DOMAIN_TOO_LONG");if(g.nonAsciiRx.test(b)){if(!1===l.allowUnicode)return T.code("DOMAIN_INVALID_UNICODE_CHARS");b=b.normalize("NFC")}if(g.domainControlRx.test(b))return T.code("DOMAIN_INVALID_CHARS");b=g.punycode(b),l.allowFullyQualified&&"."===b[b.length-1]&&(b=b.slice(0,-1));const h=l.minDomainSegments||g.minDomainSegments,u=b.split(".");if(u.lengthl.maxDomainSegments)return T.code("DOMAIN_SEGMENTS_COUNT_MAX");const m=l.tlds;if(m){const _=u[u.length-1].toLowerCase();if(m.deny&&m.deny.has(_)||m.allow&&!m.allow.has(_))return T.code("DOMAIN_FORBIDDEN_TLDS")}for(let _=0;_63)return T.code("DOMAIN_LONG_SEGMENT");if(_{"use strict";const f=x(9848),T=x(5380),g=x(2178),b={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(f.TextEncoder||TextEncoder)};d.analyze=function(l,h){return b.email(l,h)},d.isValid=function(l,h){return!b.email(l,h)},b.email=function(l){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof l)throw new Error("Invalid input: email must be a string");if(!l)return g.code("EMPTY_STRING");const u=!b.nonAsciiRx.test(l);if(!u){if(!1===h.allowUnicode)return g.code("FORBIDDEN_UNICODE");l=l.normalize("NFC")}const m=l.split("@");if(2!==m.length)return g.code(m.length>2?"MULTIPLE_AT_CHAR":"MISSING_AT_CHAR");const[_,w]=m;if(!_)return g.code("EMPTY_LOCAL");if(!h.ignoreLength){if(l.length>254)return g.code("ADDRESS_TOO_LONG");if(b.encoder.encode(_).length>64)return g.code("LOCAL_TOO_LONG")}return b.local(_,u)||T.analyze(w,h)},b.local=function(l,h){const u=l.split(".");for(const m of u){if(!m.length)return g.code("EMPTY_LOCAL_SEGMENT");if(h){if(!b.atextRx.test(m))return g.code("INVALID_LOCAL_CHARS")}else for(const _ of m){if(b.atextRx.test(_))continue;const w=b.binary(_);if(!b.atomRx.test(w))return g.code("INVALID_LOCAL_CHARS")}}},b.binary=function(l){return Array.from(b.encoder.encode(l)).map(h=>String.fromCharCode(h)).join("")},b.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,b.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(E,d)=>{"use strict";d.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},d.code=function(x){return{code:x,error:d.codes[x]}}},9959:(E,d,x)=>{"use strict";const f=x(375),T=x(5752);d.regex=function(){let g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(void 0===g.cidr||"string"==typeof g.cidr,"options.cidr must be a string");const b=g.cidr?g.cidr.toLowerCase():"optional";f(["required","optional","forbidden"].includes(b),"options.cidr must be one of required, optional, forbidden"),f(void 0===g.version||"string"==typeof g.version||Array.isArray(g.version),"options.version must be a string or an array of string");let l=g.version||["ipv4","ipv6","ipvfuture"];Array.isArray(l)||(l=[l]),f(l.length>=1,"options.version must have at least 1 version specified");for(let m=0;m{if("forbidden"===b)return T.ip[m];const _=`\\/${"ipv4"===m?T.ip.v4Cidr:T.ip.v6Cidr}`;return"required"===b?`${T.ip[m]}${_}`:`${T.ip[m]}(?:${_})?`}).join("|")})`,u=new RegExp(`^${h}$`);return{cidr:b,versions:l,regex:u,raw:h}}},5752:(E,d,x)=>{"use strict";const f=x(375),T=x(6064),g={generate:function(){const b={},l="\\dA-Fa-f",h="["+l+"]",u="\\w-\\.~",m="!\\$&'\\(\\)\\*\\+,;=",_="%"+l,w=u+_+m+":@",S="["+w+"]",I="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";b.ipv4address="(?:"+I+"\\.){3}"+I;const P=h+"{1,4}",L="(?:"+P+":"+P+"|"+b.ipv4address+")",V="(?:"+P+":){6}"+L,W="::(?:"+P+":){5}"+L,G="(?:"+P+")?::(?:"+P+":){4}"+L,H="(?:(?:"+P+":){0,1}"+P+")?::(?:"+P+":){3}"+L,j="(?:(?:"+P+":){0,2}"+P+")?::(?:"+P+":){2}"+L,K="(?:(?:"+P+":){0,3}"+P+")?::"+P+":"+L,R="(?:(?:"+P+":){0,4}"+P+")?::"+L;b.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",b.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",b.ipv6address="(?:"+V+"|"+W+"|"+G+"|"+H+"|"+j+"|"+K+"|"+R+"|(?:(?:[\\dA-Fa-f]{1,4}:){0,5}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}|(?:(?:[\\dA-Fa-f]{1,4}:){0,6}[\\dA-Fa-f]{1,4})?::)",b.ipvFuture="v"+h+"+\\.["+u+m+":]+",b.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",b.schemeRegex=new RegExp(b.scheme);const M="["+u+_+m+":]*",k="(?:\\[(?:"+b.ipv6address+"|"+b.ipvFuture+")\\]|"+b.ipv4address+"|[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=]{1,255})",D="(?:"+M+"@)?"+k+"(?::\\d*)?",N="(?:"+M+"@)?("+k+")(?::\\d*)?",a=S+"+",B="(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*",Q="\\/(?:"+a+B+")?",ee=a+B,ce="["+u+_+m+"@]+"+B;return b.hierPart="(?:(?:\\/\\/"+D+B+")|"+Q+"|"+ee+"|(?:\\/\\/\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*))",b.hierPartCapture="(?:(?:\\/\\/"+N+B+")|"+Q+"|"+ee+")",b.relativeRef="(?:(?:\\/\\/"+D+B+")|"+Q+"|"+ce+"|)",b.relativeRefCapture="(?:(?:\\/\\/"+N+B+")|"+Q+"|"+ce+"|)",b.query="["+w+"\\/\\?]*(?=#|$)",b.queryWithSquareBrackets="["+w+"\\[\\]\\/\\?]*(?=#|$)",b.fragment="["+w+"\\/\\?]*",b}};g.rfc3986=g.generate(),d.ip={v4Cidr:g.rfc3986.ipv4Cidr,v6Cidr:g.rfc3986.ipv6Cidr,ipv4:g.rfc3986.ipv4address,ipv6:g.rfc3986.ipv6address,ipvfuture:g.rfc3986.ipvFuture},g.createRegex=function(b){const l=g.rfc3986,h="(?:\\?"+(b.allowQuerySquareBrackets?l.queryWithSquareBrackets:l.query)+")?(?:#"+l.fragment+")?",u=b.domain?l.relativeRefCapture:l.relativeRef;if(b.relativeOnly)return g.wrap(u+h);let m="";if(b.scheme){f(b.scheme instanceof RegExp||"string"==typeof b.scheme||Array.isArray(b.scheme),"scheme must be a RegExp, String, or Array");const S=[].concat(b.scheme);f(S.length>=1,"scheme must have at least 1 scheme specified");const I=[];for(let P=0;P0&&void 0!==arguments[0]?arguments[0]:{};return b.scheme||b.allowRelative||b.relativeOnly||b.allowQuerySquareBrackets||b.domain?g.createRegex(b):g.uriRegex}},1447:(E,d)=>{"use strict";const x={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};d.Parser=class{constructor(f){let T=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!T[x.settings]&&T.constants)for(const g in T.constants){const b=T.constants[g];if(null!==b&&!["boolean","number","string"].includes(typeof b))throw new Error(`Formula constant ${g} contains invalid ${typeof b} value type`)}this.settings=T[x.settings]?T:Object.assign({[x.settings]:!0,constants:{},functions:{}},T),this.single=null,this._parts=null,this._parse(f)}_parse(f){let T=[],g="",b=0,l=!1;const h=m=>{if(b)throw new Error("Formula missing closing parenthesis");const _=T.length?T[T.length-1]:null;if(l||g||m){if(_&&"reference"===_.type&&")"===m)return _.type="function",_.value=this._subFormula(g,_.value),void(g="");if(")"===m){const w=new d.Parser(g,this.settings);T.push({type:"segment",value:w})}else if(l){if("]"===l)return T.push({type:"reference",value:g}),void(g="");T.push({type:"literal",value:g})}else if(x.operatorCharacters.includes(g))_&&"operator"===_.type&&x.operators.includes(_.value+g)?_.value+=g:T.push({type:"operator",value:g});else if(g.match(x.numberRx))T.push({type:"constant",value:parseFloat(g)});else if(void 0!==this.settings.constants[g])T.push({type:"constant",value:this.settings.constants[g]});else{if(!g.match(x.tokenRx))throw new Error(`Formula contains invalid token: ${g}`);T.push({type:"reference",value:g})}g=""}};for(const m of f)l?m===l?(h(),l=!1):g+=m:b?"("===m?(g+=m,++b):")"===m?(--b,b?g+=m:h(m)):g+=m:m in x.literals?l=x.literals[m]:"("===m?(h(),++b):x.operatorCharacters.includes(m)?(h(),g=m,h()):" "!==m?g+=m:h();h(),T=T.map((m,_)=>"operator"!==m.type||"-"!==m.value||_&&"operator"!==T[_-1].type?m:{type:"operator",value:"n"});let u=!1;for(const m of T){if("operator"===m.type){if(x.operatorsPrefix.includes(m.value))continue;if(!u)throw new Error("Formula contains an operator in invalid position");if(!x.operators.includes(m.value))throw new Error(`Formula contains an unknown operator ${m.value}`)}else if(u)throw new Error("Formula missing expected operator");u=!u}if(!u)throw new Error("Formula contains invalid trailing operator");1===T.length&&["reference","literal","constant"].includes(T[0].type)&&(this.single={type:"reference"===T[0].type?"reference":"value",value:T[0].value}),this._parts=T.map(m=>{if("operator"===m.type)return x.operatorsPrefix.includes(m.value)?m:m.value;if("reference"!==m.type)return m.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(m.value))throw new Error(`Formula contains invalid reference ${m.value}`);return this.settings.reference?this.settings.reference(m.value):x.reference(m.value)})}_subFormula(f,T){const g=this.settings.functions[T];if("function"!=typeof g)throw new Error(`Formula contains unknown function ${T}`);let b=[];if(f){let l="",h=0,u=!1;const m=()=>{if(!l)throw new Error(`Formula contains function ${T} with invalid arguments ${f}`);b.push(l),l=""};for(let _=0;_new d.Parser(l,this.settings)),function(l){const h=[];for(const u of b)h.push(u.evaluate(l));return g.call(l,...h)}}evaluate(f){const T=this._parts.slice();for(let g=T.length-2;g>=0;--g){const b=T[g];if(b&&"operator"===b.type){const l=T[g+1];T.splice(g+1,1);const h=x.evaluate(l,f);T[g]=x.single(b.value,h)}}return x.operatorsOrder.forEach(g=>{for(let b=1;b":return T>g;case">=":return T>=g;case"==":return T===g;case"!=":return T!==g;case"&&":return T&&g;case"||":return T||g}return null},x.exists=function(f){return null!=f}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:E=>{"use strict";E.exports={version:"17.9.1"}}},O={},function E(d){var x=O[d];if(void 0!==x)return x.exports;var f=O[d]={exports:{}};return q[d](f,f.exports,E),f.exports}(5107);var q,O})()},37109:(bt,be,Y)=>{var ie;!function(){"use strict";var q="input is invalid type",E="object"==typeof window,d=E?window:{};d.JS_SHA3_NO_WINDOW&&(E=!1);var x=!E&&"object"==typeof self;!d.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?d=global:x&&(d=self);var T=!d.JS_SHA3_NO_COMMON_JS&&bt.exports,g=Y.amdO,b=!d.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),u=[4,1024,262144,67108864],w=[0,8,16,24],S=[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],I=[224,256,384,512],P=[128,256],L=["hex","buffer","arrayBuffer","array","digest"],V={128:168,256:136};(d.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ae){return"[object Array]"===Object.prototype.toString.call(ae)}),b&&(d.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ae){return"object"==typeof ae&&ae.buffer&&ae.buffer.constructor===ArrayBuffer});for(var W=function(ae,Te,le){return function(X){return new ce(ae,Te,ae).update(X)[le]()}},G=function(ae,Te,le){return function(X,ne){return new ce(ae,Te,ne).update(X)[le]()}},H=function(ae,Te,le){return function(X,ne,pe,_e){return k["cshake"+ae].update(X,ne,pe,_e)[le]()}},j=function(ae,Te,le){return function(X,ne,pe,_e){return k["kmac"+ae].update(X,ne,pe,_e)[le]()}},K=function(ae,Te,le,X){for(var ne=0;ne>5,this.byteCount=this.blockCount<<2,this.outputBlocks=le>>5,this.extraBytes=(31&le)>>3;for(var X=0;X<50;++X)this.s[X]=0}function ue(ae,Te,le){ce.call(this,ae,Te,le)}ce.prototype.update=function(ae){if(this.finalized)throw new Error("finalize already called");var Te,le=typeof ae;if("string"!==le){if("object"!==le)throw new Error(q);if(null===ae)throw new Error(q);if(b&&ae.constructor===ArrayBuffer)ae=new Uint8Array(ae);else if(!(Array.isArray(ae)||b&&ArrayBuffer.isView(ae)))throw new Error(q);Te=!0}for(var ke,me,X=this.blocks,ne=this.byteCount,pe=ae.length,_e=this.blockCount,xe=0,Ce=this.s;xe>2]|=ae[xe]<>2]|=me<>2]|=(192|me>>6)<>2]|=(128|63&me)<=57344?(X[ke>>2]|=(224|me>>12)<>2]|=(128|me>>6&63)<>2]|=(128|63&me)<>2]|=(240|me>>18)<>2]|=(128|me>>12&63)<>2]|=(128|me>>6&63)<>2]|=(128|63&me)<=ne){for(this.start=ke-ne,this.block=X[_e],ke=0;ke<_e;++ke)Ce[ke]^=X[ke];we(Ce),this.reset=!0}else this.start=ke}return this},ce.prototype.encode=function(ae,Te){var le=255&ae,X=1,ne=[le];for(le=255&(ae>>=8);le>0;)ne.unshift(le),le=255&(ae>>=8),++X;return Te?ne.push(X):ne.unshift(X),this.update(ne),ne.length},ce.prototype.encodeString=function(ae){var Te,le=typeof ae;if("string"!==le){if("object"!==le)throw new Error(q);if(null===ae)throw new Error(q);if(b&&ae.constructor===ArrayBuffer)ae=new Uint8Array(ae);else if(!(Array.isArray(ae)||b&&ArrayBuffer.isView(ae)))throw new Error(q);Te=!0}var X=0;if(Te)X=ae.length;else for(var pe=0;pe=57344?X+=3:(_e=65536+((1023&_e)<<10|1023&ae.charCodeAt(++pe)),X+=4)}return X+=this.encode(8*X),this.update(ae),X},ce.prototype.bytepad=function(ae,Te){for(var le=this.encode(Te),X=0;X>2]|=this.padding[3&Te],this.lastByteIndex===this.byteCount)for(ae[0]=ae[le],Te=1;Te>4&15]+l[15&xe]+l[xe>>12&15]+l[xe>>8&15]+l[xe>>20&15]+l[xe>>16&15]+l[xe>>28&15]+l[xe>>24&15];pe%ae==0&&(we(Te),ne=0)}return X&&(_e+=l[(xe=Te[ne])>>4&15]+l[15&xe],X>1&&(_e+=l[xe>>12&15]+l[xe>>8&15]),X>2&&(_e+=l[xe>>20&15]+l[xe>>16&15])),_e},ce.prototype.buffer=ce.prototype.arrayBuffer=function(){this.finalize();var xe,ae=this.blockCount,Te=this.s,le=this.outputBlocks,X=this.extraBytes,ne=0,pe=0,_e=this.outputBits>>3;xe=X?new ArrayBuffer(le+1<<2):new ArrayBuffer(_e);for(var Ce=new Uint32Array(xe);pe>8&255,_e[xe+2]=Ce>>16&255,_e[xe+3]=Ce>>24&255;pe%ae==0&&we(Te)}return X&&(_e[xe=pe<<2]=255&(Ce=Te[ne]),X>1&&(_e[xe+1]=Ce>>8&255),X>2&&(_e[xe+2]=Ce>>16&255)),_e},(ue.prototype=new ce).finalize=function(){return this.encode(this.outputBits,!0),ce.prototype.finalize.call(this)};var we=function(ae){var Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Jr,Ln,Bn,Wr,zn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn,Qn,Vi,ar,br,ki,ur,mr,Fr,hi,wi,cs,$i,rs,Xi,$s,is;for(X=0;X<48;X+=2)ne=ae[0]^ae[10]^ae[20]^ae[30]^ae[40],pe=ae[1]^ae[11]^ae[21]^ae[31]^ae[41],Ce=ae[4]^ae[14]^ae[24]^ae[34]^ae[44],ke=ae[5]^ae[15]^ae[25]^ae[35]^ae[45],me=ae[6]^ae[16]^ae[26]^ae[36]^ae[46],Ee=ae[7]^ae[17]^ae[27]^ae[37]^ae[47],le=(Ve=ae[9]^ae[19]^ae[29]^ae[39]^ae[49])^((xe=ae[3]^ae[13]^ae[23]^ae[33]^ae[43])<<1|(_e=ae[2]^ae[12]^ae[22]^ae[32]^ae[42])>>>31),ae[0]^=Te=(ze=ae[8]^ae[18]^ae[28]^ae[38]^ae[48])^(_e<<1|xe>>>31),ae[1]^=le,ae[10]^=Te,ae[11]^=le,ae[20]^=Te,ae[21]^=le,ae[30]^=Te,ae[31]^=le,ae[40]^=Te,ae[41]^=le,le=pe^(ke<<1|Ce>>>31),ae[2]^=Te=ne^(Ce<<1|ke>>>31),ae[3]^=le,ae[12]^=Te,ae[13]^=le,ae[22]^=Te,ae[23]^=le,ae[32]^=Te,ae[33]^=le,ae[42]^=Te,ae[43]^=le,le=xe^(Ee<<1|me>>>31),ae[4]^=Te=_e^(me<<1|Ee>>>31),ae[5]^=le,ae[14]^=Te,ae[15]^=le,ae[24]^=Te,ae[25]^=le,ae[34]^=Te,ae[35]^=le,ae[44]^=Te,ae[45]^=le,le=ke^(Ve<<1|ze>>>31),ae[6]^=Te=Ce^(ze<<1|Ve>>>31),ae[7]^=le,ae[16]^=Te,ae[17]^=le,ae[26]^=Te,ae[27]^=le,ae[36]^=Te,ae[37]^=le,ae[46]^=Te,ae[47]^=le,le=Ee^(pe<<1|ne>>>31),ae[8]^=Te=me^(ne<<1|pe>>>31),ae[9]^=le,ae[18]^=Te,ae[19]^=le,ae[28]^=Te,ae[29]^=le,ae[38]^=Te,ae[39]^=le,ae[48]^=Te,ae[49]^=le,tt=ae[1],ts=ae[11]<<4|ae[10]>>>28,Tn=ae[10]<<4|ae[11]>>>28,qt=ae[20]<<3|ae[21]>>>29,jt=ae[21]<<3|ae[20]>>>29,rs=ae[31]<<9|ae[30]>>>23,Xi=ae[30]<<9|ae[31]>>>23,sr=ae[40]<<18|ae[41]>>>14,Ii=ae[41]<<18|ae[40]>>>14,Jr=ae[2]<<1|ae[3]>>>31,Ln=ae[3]<<1|ae[2]>>>31,ht=ae[12]<<12|ae[13]>>>20,Qn=ae[22]<<10|ae[23]>>>22,Vi=ae[23]<<10|ae[22]>>>22,Yt=ae[33]<<13|ae[32]>>>19,Wn=ae[32]<<13|ae[33]>>>19,$s=ae[42]<<2|ae[43]>>>30,is=ae[43]<<2|ae[42]>>>30,mr=ae[5]<<30|ae[4]>>>2,Fr=ae[4]<<30|ae[5]>>>2,Bn=ae[14]<<6|ae[15]>>>26,Wr=ae[15]<<6|ae[14]>>>26,Pt=ae[24]<<11|ae[25]>>>21,ar=ae[34]<<15|ae[35]>>>17,br=ae[35]<<15|ae[34]>>>17,fn=ae[45]<<29|ae[44]>>>3,$n=ae[44]<<29|ae[45]>>>3,Wt=ae[6]<<28|ae[7]>>>4,dn=ae[7]<<28|ae[6]>>>4,hi=ae[17]<<23|ae[16]>>>9,wi=ae[16]<<23|ae[17]>>>9,zn=ae[26]<<25|ae[27]>>>7,bn=ae[27]<<25|ae[26]>>>7,st=ae[36]<<21|ae[37]>>>11,Ye=ae[37]<<21|ae[36]>>>11,ki=ae[47]<<24|ae[46]>>>8,ur=ae[46]<<24|ae[47]>>>8,Un=ae[8]<<27|ae[9]>>>5,ir=ae[9]<<27|ae[8]>>>5,Nt=ae[18]<<20|ae[19]>>>12,It=ae[19]<<20|ae[18]>>>12,cs=ae[29]<<7|ae[28]>>>25,$i=ae[28]<<7|ae[29]>>>25,Lr=ae[38]<<8|ae[39]>>>24,Kn=ae[39]<<8|ae[38]>>>24,gt=ae[48]<<14|ae[49]>>>18,St=ae[49]<<14|ae[48]>>>18,ae[0]=(nt=ae[0])^~(mt=ae[13]<<12|ae[12]>>>20)&(wt=ae[25]<<11|ae[24]>>>21),ae[1]=tt^~ht&Pt,ae[10]=Wt^~Nt&qt,ae[11]=dn^~It&jt,ae[20]=Jr^~Bn&zn,ae[21]=Ln^~Wr&bn,ae[30]=Un^~ts&Qn,ae[31]=ir^~Tn&Vi,ae[40]=mr^~hi&cs,ae[41]=Fr^~wi&$i,ae[2]=mt^~wt&st,ae[3]=ht^~Pt&Ye,ae[12]=Nt^~qt&Yt,ae[13]=It^~jt&Wn,ae[22]=Bn^~zn&Lr,ae[23]=Wr^~bn&Kn,ae[32]=ts^~Qn&ar,ae[33]=Tn^~Vi&br,ae[42]=hi^~cs&rs,ae[43]=wi^~$i&Xi,ae[4]=wt^~st>,ae[5]=Pt^~Ye&St,ae[14]=qt^~Yt&fn,ae[15]=jt^~Wn&$n,ae[24]=zn^~Lr&sr,ae[25]=bn^~Kn&Ii,ae[34]=Qn^~ar&ki,ae[35]=Vi^~br&ur,ae[44]=cs^~rs&$s,ae[45]=$i^~Xi&is,ae[6]=st^~gt&nt,ae[7]=Ye^~St&tt,ae[16]=Yt^~fn&Wt,ae[17]=Wn^~$n&dn,ae[26]=Lr^~sr&Jr,ae[27]=Kn^~Ii&Ln,ae[36]=ar^~ki&Un,ae[37]=br^~ur&ir,ae[46]=rs^~$s&mr,ae[47]=Xi^~is&Fr,ae[8]=gt^~nt&mt,ae[9]=St^~tt&ht,ae[18]=fn^~Wt&Nt,ae[19]=$n^~dn&It,ae[28]=sr^~Jr&Bn,ae[29]=Ii^~Ln&Wr,ae[38]=ki^~Un&ts,ae[39]=ur^~ir&Tn,ae[48]=$s^~mr&hi,ae[49]=is^~Fr&wi,ae[0]^=S[X],ae[1]^=S[X+1]};if(T)bt.exports=k;else{for(N=0;NE.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(x){var f=Number.isFinite;if("number"==typeof x){if(0===x)return E.__zero();if(E.__isOneDigitInt(x))return 0>x?E.__oneDigit(-x,!0):E.__oneDigit(x,!1);if(!f(x)||O(x)!==x)throw new RangeError("The number "+x+" cannot be converted to BigInt because it is not an integer");return E.__fromDouble(x)}if("string"==typeof x){const T=E.__fromString(x);if(null===T)throw new SyntaxError("Cannot convert "+x+" to a BigInt");return T}if("boolean"==typeof x)return!0===x?E.__oneDigit(1,!1):E.__zero();if("object"==typeof x){if(x.constructor===E)return x;const T=E.__toPrimitive(x);return E.BigInt(T)}throw new TypeError("Cannot convert "+x+" to a BigInt")}toDebugString(){const x=["BigInt["];for(const f of this)x.push((f&&(f>>>0).toString(16))+", ");return x.push("]"),x.join("")}toString(x=10){if(2>x||36>>=12;const w=m-12;let S=12<=m?0:h<<20+m,I=20+m;for(0>>30-w,S=h<>>30-I,I-=30;const P=E.__decideRounding(x,I,u,h);return(1===P||0===P&&1==(1&S))&&(S=S+1>>>0,0===S&&(_++,_>>>20!=0&&(_=0,l++,1023=E.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===x.length&&2===x.__digit(0)){const l=1+(0|T/30),u=new E(l,x.sign&&0!=(1&T));return u.__initializeDigits(),u.__setDigit(l-1,1<>=1;0!==T;T>>=1)b=E.multiply(b,b),0!=(1&T)&&(g=null===g?b:E.multiply(g,b));return g}static multiply(x,f){if(0===x.length)return x;if(0===f.length)return f;let T=x.length+f.length;30<=x.__clzmsd()+f.__clzmsd()&&T--;const g=new E(T,x.sign!==f.sign);g.__initializeDigits();for(let b=0;bE.__absoluteCompare(x,f))return E.__zero();const T=x.sign!==f.sign,g=f.__unsignedDigit(0);let b;if(1===f.length&&32767>=g){if(1===g)return T===x.sign?x:E.unaryMinus(x);b=E.__absoluteDivSmall(x,g,null)}else b=E.__absoluteDivLarge(x,f,!0,!1);return b.sign=T,b.__trim()}static remainder(x,f){if(0===f.length)throw new RangeError("Division by zero");if(0>E.__absoluteCompare(x,f))return x;const T=f.__unsignedDigit(0);if(1===f.length&&32767>=T){if(1===T)return E.__zero();const b=E.__absoluteModSmall(x,T);return 0===b?E.__zero():E.__oneDigit(b,x.sign)}const g=E.__absoluteDivLarge(x,f,!1,!0);return g.sign=x.sign,g.__trim()}static add(x,f){const T=x.sign;return T===f.sign?E.__absoluteAdd(x,f,T):0<=E.__absoluteCompare(x,f)?E.__absoluteSub(x,f,T):E.__absoluteSub(f,x,!T)}static subtract(x,f){const T=x.sign;return T===f.sign?0<=E.__absoluteCompare(x,f)?E.__absoluteSub(x,f,T):E.__absoluteSub(f,x,!T):E.__absoluteAdd(x,f,T)}static leftShift(x,f){return 0===f.length||0===x.length?x:f.sign?E.__rightShiftByAbsolute(x,f):E.__leftShiftByAbsolute(x,f)}static signedRightShift(x,f){return 0===f.length||0===x.length?x:f.sign?E.__leftShiftByAbsolute(x,f):E.__rightShiftByAbsolute(x,f)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(x,f){return 0>E.__compareToBigInt(x,f)}static lessThanOrEqual(x,f){return 0>=E.__compareToBigInt(x,f)}static greaterThan(x,f){return 0(x=O(x)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===x)return E.__zero();if(x>=E.__kMaxLengthBits)return f;const T=0|(x+29)/30;if(f.length(x=O(x)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===x)return E.__zero();if(f.sign){if(x>E.__kMaxLengthBits)throw new RangeError("BigInt too big");return E.__truncateAndSubFromPowerOfTwo(x,f,!1)}if(x>=E.__kMaxLengthBits)return f;const T=0|(x+29)/30;if(f.length>>g!=0?E.__truncateToNBits(x,f):f}static ADD(x,f){if(x=E.__toPrimitive(x),f=E.__toPrimitive(f),"string"==typeof x)return"string"!=typeof f&&(f=f.toString()),x+f;if("string"==typeof f)return x.toString()+f;if(x=E.__toNumeric(x),f=E.__toNumeric(f),E.__isBigInt(x)&&E.__isBigInt(f))return E.add(x,f);if("number"==typeof x&&"number"==typeof f)return x+f;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(x,f){return E.__compare(x,f,0)}static LE(x,f){return E.__compare(x,f,1)}static GT(x,f){return E.__compare(x,f,2)}static GE(x,f){return E.__compare(x,f,3)}static EQ(x,f){for(;;){if(E.__isBigInt(x))return E.__isBigInt(f)?E.equal(x,f):E.EQ(f,x);if("number"==typeof x){if(E.__isBigInt(f))return E.__equalToNumber(f,x);if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else if("string"==typeof x){if(E.__isBigInt(f))return null!==(x=E.__fromString(x))&&E.equal(x,f);if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else if("boolean"==typeof x){if(E.__isBigInt(f))return E.__equalToNumber(f,+x);if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else if("symbol"==typeof x){if(E.__isBigInt(f))return!1;if("object"!=typeof f)return x==f;f=E.__toPrimitive(f)}else{if("object"!=typeof x)return x==f;if("object"==typeof f&&f.constructor!==E)return x==f;x=E.__toPrimitive(x)}}}static NE(x,f){return!E.EQ(x,f)}static __zero(){return new E(0,!1)}static __oneDigit(x,f){const T=new E(1,f);return T.__setDigit(0,x),T}__copy(){const x=new E(this.length,this.sign);for(let f=0;ff)b=-f-1;else{if(0===T)return-1;T--,g=x.__digit(T),b=29}let l=1<>>20)-1023,g=1+(0|T/30),b=new E(g,0>x);let l=1048575&E.__kBitConversionInts[1]|1048576,h=E.__kBitConversionInts[0];const m=T%30;let _,w=0;if(20>m){const S=20-m;w=S+32,_=l>>>S,l=l<<32-S|h>>>S,h<<=32-S}else if(20===m)w=32,_=l,l=h,h=0;else{const S=m-20;w=32-S,_=l<>>32-S,l=h<>>2,l=l<<30|h>>>2,h<<=30):_=0,b.__setDigit(S,_);return b.__trim()}static __isWhitespace(x){return 13>=x&&9<=x||(159>=x?32==x:131071>=x?160==x||5760==x:196607>=x?10>=(x&=131071)||40==x||41==x||47==x||95==x||4096==x:65279==x)}static __fromString(x,f=0){let T=0;const g=x.length;let b=0;if(b===g)return E.__zero();let l=x.charCodeAt(b);for(;E.__isWhitespace(l);){if(++b===g)return E.__zero();l=x.charCodeAt(b)}if(43===l){if(++b===g)return null;l=x.charCodeAt(b),T=1}else if(45===l){if(++b===g)return null;l=x.charCodeAt(b),T=-1}if(0===f){if(f=10,48===l){if(++b===g)return E.__zero();if(l=x.charCodeAt(b),88===l||120===l){if(f=16,++b===g)return null;l=x.charCodeAt(b)}else if(79===l||111===l){if(f=8,++b===g)return null;l=x.charCodeAt(b)}else if(66===l||98===l){if(f=2,++b===g)return null;l=x.charCodeAt(b)}}}else if(16===f&&48===l){if(++b===g)return E.__zero();if(l=x.charCodeAt(b),88===l||120===l){if(++b===g)return null;l=x.charCodeAt(b)}}if(0!=T&&10!==f)return null;for(;48===l;){if(++b===g)return E.__zero();l=x.charCodeAt(b)}const h=g-b;let u=E.__kMaxBitsPerChar[f],m=E.__kBitsPerCharTableMultiplier-1;if(h>1073741824/u)return null;const w=new E(0|(29+(u*h+m>>>E.__kBitsPerCharTableShift))/30,!1),S=10>f?f:10,I=10>=E.__kBitsPerCharTableShift;const P=[],L=[];let V=!1;do{let W=0,G=0;for(;;){let H;if(l-48>>>0>>0>>0>>0>>E.__kBitsPerCharTableShift)/30)}while(!P)}if(b!==g){if(!E.__isWhitespace(l))return null;for(b++;b>>m-l)}if(0!==b){if(g>=x.length)throw new Error("implementation bug");x.__setDigit(g++,b)}for(;g>>1)+(85&g),g=(51&g>>>2)+(51&g),g=(15&g>>>4)+(15&g);const b=g,l=f-1,h=x.__digit(T-1);let m=0|(30*T-E.__clz30(h)+b-1)/b;if(x.sign&&m++,268435456>>G,I=30-G;I>=b;)_[w--]=E.__kConversionChars[S&l],S>>>=b,I-=b}for(_[w--]=E.__kConversionChars[(S|h<>>b-I;0!==S;)_[w--]=E.__kConversionChars[S&l],S>>>=b;if(x.sign&&(_[w--]="-"),-1!=w)throw new Error("implementation bug");return _.join("")}static __toStringGeneric(x,f,T){const g=x.length;if(0===g)return"";if(1===g){let L=x.__unsignedDigit(0).toString(f);return!1===T&&x.sign&&(L="-"+L),L}const b=30*g-E.__clz30(x.__digit(g-1)),h=E.__kMaxBitsPerChar[f]-1;let u=b*E.__kBitsPerCharTableMultiplier;u+=h-1,u=0|u/h;const m=u+1>>1,_=E.exponentiate(E.__oneDigit(f,!1),E.__oneDigit(m,!1));let w,S;const I=_.__unsignedDigit(0);if(1===_.length&&32767>=I){w=new E(x.length,!1),w.__initializeDigits();let L=0;for(let V=2*x.length-1;0<=V;V--){const W=L<<15|x.__halfDigit(V);w.__setHalfDigit(V,0|W/I),L=0|W%I}S=L.toString(f)}else{const L=E.__absoluteDivLarge(x,_,!0,!0);w=L.quotient;const V=L.remainder.__trim();S=E.__toStringGeneric(V,f,!0)}w.__trim();let P=E.__toStringGeneric(w,f,!0);for(;S.lengthg?E.__absoluteLess(T):0}static __compareToNumber(x,f){if(E.__isOneDigitInt(f)){const T=x.sign,g=0>f;if(T!==g)return E.__unequalSign(T);if(0===x.length){if(g)throw new Error("implementation bug");return 0===f?0:-1}if(1b?E.__absoluteGreater(T):lf)return E.__unequalSign(T);if(0===f)throw new Error("implementation bug: should be handled elsewhere");if(0===x.length)return-1;E.__kBitConversionDouble[0]=f;const g=2047&E.__kBitConversionInts[1]>>>20;if(2047==g)throw new Error("implementation bug: handled elsewhere");const b=g-1023;if(0>b)return E.__absoluteGreater(T);const l=x.length;let h=x.__digit(l-1);const u=E.__clz30(h),m=30*l-u,_=b+1;if(m<_)return E.__absoluteLess(T);if(m>_)return E.__absoluteGreater(T);let w=1048576|1048575&E.__kBitConversionInts[1],S=E.__kBitConversionInts[0];const P=29-u;if(P!==(0|(m-1)%30))throw new Error("implementation bug");let L,V=0;if(20>P){const W=20-P;V=W+32,L=w>>>W,w=w<<32-W|S>>>W,S<<=32-W}else if(20===P)V=32,L=w,w=S,S=0;else{const W=P-20;V=32-W,L=w<>>32-W,w=S<>>=0,L>>>=0,h>L)return E.__absoluteGreater(T);if(h>>2,w=w<<30|S>>>2,S<<=30):L=0;const G=x.__unsignedDigit(W);if(G>L)return E.__absoluteGreater(T);if(Gf&&x.__unsignedDigit(0)===ie(f):0===E.__compareToDouble(x,f)}static __comparisonResultToBool(x,f){return 0===f?0>x:1===f?0>=x:2===f?0f;case 3:return x>=f}if(E.__isBigInt(x)&&"string"==typeof f)return null!==(f=E.__fromString(f))&&E.__comparisonResultToBool(E.__compareToBigInt(x,f),T);if("string"==typeof x&&E.__isBigInt(f))return null!==(x=E.__fromString(x))&&E.__comparisonResultToBool(E.__compareToBigInt(x,f),T);if(x=E.__toNumeric(x),f=E.__toNumeric(f),E.__isBigInt(x)){if(E.__isBigInt(f))return E.__comparisonResultToBool(E.__compareToBigInt(x,f),T);if("number"!=typeof f)throw new Error("implementation bug");return E.__comparisonResultToBool(E.__compareToNumber(x,f),T)}if("number"!=typeof x)throw new Error("implementation bug");if(E.__isBigInt(f))return E.__comparisonResultToBool(E.__compareToNumber(f,x),2^T);if("number"!=typeof f)throw new Error("implementation bug");return 0===T?xf:3===T?x>=f:void 0}__clzmsd(){return E.__clz30(this.__digit(this.length-1))}static __absoluteAdd(x,f,T){if(x.length>>30,b.__setDigit(h,1073741823&u)}for(;h>>30,b.__setDigit(h,1073741823&u)}return h>>30,g.__setDigit(l,1073741823&h)}for(;l>>30,g.__setDigit(l,1073741823&h)}return g.__trim()}static __absoluteAddOne(x,f,T=null){const g=x.length;null===T?T=new E(g,f):T.sign=f;let b=1;for(let l=0;l>>30,T.__setDigit(l,1073741823&h)}return 0!=b&&T.__setDigitGrow(g,1),T}static __absoluteSubOne(x,f){const T=x.length,g=new E(f=f||T,!1);let b=1;for(let l=0;l>>30,g.__setDigit(l,1073741823&h)}if(0!=b)throw new Error("implementation bug");for(let l=T;lg?0:x.__unsignedDigit(g)>f.__unsignedDigit(g)?1:-1}static __multiplyAccumulate(x,f,T,g){if(0===f)return;const b=32767&f,l=f>>>15;let h=0,u=0;for(let m,_=0;_>>15,P=E.__imul(S,b),L=E.__imul(S,l),V=E.__imul(I,b),W=E.__imul(I,l);m+=u+P+h,h=m>>>30,m&=1073741823,m+=((32767&L)<<15)+((32767&V)<<15),h+=m>>>30,u=W+(L>>>15)+(V>>>15),T.__setDigit(g,1073741823&m)}for(;0!=h||0!==u;g++){let m=T.__digit(g);m+=h+u,u=0,h=m>>>30,T.__setDigit(g,1073741823&m)}}static __internalMultiplyAdd(x,f,T,g,b){let l=T,h=0;for(let u=0;u>>15,f),S=_+((32767&w)<<15)+h+l;l=S>>>30,h=w>>>15,b.__setDigit(u,1073741823&S)}if(b.length>g)for(b.__setDigit(g++,l+h);gthis.length&&(T=this.length);const g=32767&x,b=x>>>15;let l=0,h=f;for(let u=0;u>>15,S=E.__imul(_,g),I=E.__imul(_,b),P=E.__imul(w,g),L=E.__imul(w,b);let V=h+S+l;l=V>>>30,V&=1073741823,V+=((32767&I)<<15)+((32767&P)<<15),l+=V>>>30,h=L+(I>>>15)+(P>>>15),this.__setDigit(u,1073741823&V)}if(0!=l||0!==h)throw new Error("implementation bug")}static __absoluteDivSmall(x,f,T=null){null===T&&(T=new E(x.length,!1));let g=0;for(let b,l=2*x.length-1;0<=l;l-=2){b=(g<<15|x.__halfDigit(l))>>>0;const h=0|b/f;g=0|b%f,b=(g<<15|x.__halfDigit(l-1))>>>0,g=0|b%f,T.__setDigit(l>>>1,h<<15|0|b/f)}return T}static __absoluteModSmall(x,f){let T=0;for(let g=2*x.length-1;0<=g;g--)T=0|((T<<15|x.__halfDigit(g))>>>0)%f;return T}static __absoluteDivLarge(x,f,T,g){const b=f.__halfDigitLength(),l=f.length,h=x.__halfDigitLength()-b;let u=null;T&&(u=new E(h+2>>>1,!1),u.__initializeDigits());const m=new E(b+2>>>1,!1);m.__initializeDigits();const _=E.__clz15(f.__halfDigit(b-1));0<_&&(f=E.__specialLeftShift(f,_,0));const w=E.__specialLeftShift(x,_,1),S=f.__halfDigit(b-1);let I=0;for(let P,L=h;0<=L;L--){P=32767;const V=w.__halfDigit(L+b);if(V!==S){const G=(V<<15|w.__halfDigit(L+b-1))>>>0;P=0|G/S;let H=0|G%S;const j=f.__halfDigit(b-2),K=w.__halfDigit(L+b-2);for(;E.__imul(P,j)>>>0>(H<<16|K)>>>0&&(P--,H+=S,!(32767>>1,I|P))}if(g)return w.__inplaceRightShift(_),T?{quotient:u,remainder:w}:w;if(T)return u;throw new Error("unreachable")}static __clz15(x){return E.__clz30(x)-15}__inplaceAdd(x,f,T){let g=0;for(let b=0;b>>15,this.__setHalfDigit(f+b,32767&l)}return g}__inplaceSub(x,f,T){let g=0;if(1&f){let b=this.__digit(f>>=1),l=32767&b,h=0;for(;h>>1;h++){const _=x.__digit(h),w=(b>>>15)-(32767&_)-g;g=1&w>>>15,this.__setDigit(f+h,(32767&w)<<15|32767&l),b=this.__digit(f+h+1),l=(32767&b)-(_>>>15)-g,g=1&l>>>15}const u=x.__digit(h),m=(b>>>15)-(32767&u)-g;if(g=1&m>>>15,this.__setDigit(f+h,(32767&m)<<15|32767&l),f+h+1>=this.length)throw new RangeError("out of bounds");0==(1&T)&&(b=this.__digit(f+h+1),l=(32767&b)-(u>>>15)-g,g=1&l>>>15,this.__setDigit(f+x.length,1073709056&b|32767&l))}else{f>>=1;let b=0;for(;b>>15;const I=(_>>>15)-(w>>>15)-g;g=1&I>>>15,this.__setDigit(f+b,(32767&I)<<15|32767&S)}const l=this.__digit(f+b),h=x.__digit(b),u=(32767&l)-(32767&h)-g;g=1&u>>>15;let m=0;0==(1&T)&&(m=(l>>>15)-(h>>>15)-g,g=1&m>>>15),this.__setDigit(f+b,(32767&m)<<15|32767&u)}return g}__inplaceRightShift(x){if(0===x)return;let f=this.__digit(0)>>>x;const T=this.length-1;for(let g=0;g>>x}this.__setDigit(T,f)}static __specialLeftShift(x,f,T){const g=x.length,b=new E(g+T,!1);if(0===f){for(let h=0;h>>30-f}return 0T)throw new RangeError("BigInt too big");const g=0|T/30,b=T%30,l=x.length,h=0!==b&&x.__digit(l-1)>>>30-b!=0,u=l+g+(h?1:0),m=new E(u,x.sign);if(0===b){let _=0;for(;_>>30-b}if(h)m.__setDigit(l+g,_);else if(0!==_)throw new Error("implementation bug")}return m.__trim()}static __rightShiftByAbsolute(x,f){const T=x.length,g=x.sign,b=E.__toShiftAmount(f);if(0>b)return E.__rightShiftByMaximum(g);const l=0|b/30,h=b%30;let u=T-l;if(0>=u)return E.__rightShiftByMaximum(g);let m=!1;if(g)if(0!=(x.__digit(l)&(1<>>h;const S=T-l-1;for(let I=0;I>>h}_.__setDigit(S,w)}return m&&(_=E.__absoluteAddOne(_,!0,_)),_.__trim()}static __rightShiftByMaximum(x){return x?E.__oneDigit(1,!0):E.__zero()}static __toShiftAmount(x){if(1E.__kMaxLengthBits?-1:f}static __toPrimitive(x,f="default"){if("object"!=typeof x||x.constructor===E)return x;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const b=x[Symbol.toPrimitive];if(b){const l=b(f);if("object"!=typeof l)return l;throw new TypeError("Cannot convert object to primitive value")}}const T=x.valueOf;if(T){const b=T.call(x);if("object"!=typeof b)return b}const g=x.toString;if(g){const b=g.call(x);if("object"!=typeof b)return b}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(x){return E.__isBigInt(x)?x:+x}static __isBigInt(x){return"object"==typeof x&&null!==x&&x.constructor===E}static __truncateToNBits(x,f){const T=0|(x+29)/30,g=new E(T,f.sign),b=T-1;for(let h=0;h>>h}return g.__setDigit(b,l),g.__trim()}static __truncateAndSubFromPowerOfTwo(x,f,T){var g=Math.min;const b=0|(x+29)/30,l=new E(b,T);let h=0;const u=b-1;let m=0;for(const I=g(u,f.length);h>>30,l.__setDigit(h,1073741823&P)}for(;h>>I;const P=1<<32-I;S=P-_-m,S&=P-1}return l.__setDigit(u,S),l.__trim()}__digit(x){return this[x]}__unsignedDigit(x){return this[x]>>>0}__setDigit(x,f){this[x]=0|f}__setDigitGrow(x,f){this[x]=0|f}__halfDigitLength(){const x=this.length;return 32767>=this.__unsignedDigit(x-1)?2*x-1:2*x}__halfDigit(x){return 32767&this[x>>>1]>>>15*(1&x)}__setHalfDigit(x,f){const T=x>>>1,g=this.__digit(T);this.__setDigit(T,1&x?32767&g|f<<15:1073709056&g|32767&f)}static __digitPow(x,f){let T=1;for(;0>>=1,x*=x;return T}static __isOneDigitInt(x){return(1073741823&x)===x}}return E.__kMaxLength=33554432,E.__kMaxLengthBits=E.__kMaxLength<<5,E.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],E.__kBitsPerCharTableShift=5,E.__kBitsPerCharTableMultiplier=1<>>0)/x)},E.__imul=be||function(d,x){return 0|d*x},E}()},80233:function(bt,be,Y){"use strict";var ie=this&&this.__createBinding||(Object.create?function(d,x,f,T){void 0===T&&(T=f),Object.defineProperty(d,T,{enumerable:!0,get:function(){return x[f]}})}:function(d,x,f,T){void 0===T&&(T=f),d[T]=x[f]}),q=this&&this.__exportStar||function(d,x){for(var f in d)"default"!==f&&!Object.prototype.hasOwnProperty.call(x,f)&&ie(x,d,f)};Object.defineProperty(be,"__esModule",{value:!0}),be.VariableType=be.EnumType=void 0,q(Y(45262),be);var O=Y(17854);Object.defineProperty(be,"EnumType",{enumerable:!0,get:function(){return O.EnumType}});var E=Y(68668);Object.defineProperty(be,"VariableType",{enumerable:!0,get:function(){return E.VariableType}})},45262:(bt,be,Y)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.jsonToGraphQLQuery=be.configFields=void 0;var ie=Y(17854),q=Y(68668);function O(l){if(l instanceof ie.EnumType)return l.value;if(l instanceof q.VariableType)return"$".concat(l.value);if("object"!=typeof l||null===l)return JSON.stringify(l);if(Array.isArray(l))return"[".concat(l.map(function(u){return O(u)}).join(", "),"]");var h=Object.keys(l).map(function(u){return"".concat(u,": ").concat(O(l[u]))}).join(", ");return"{".concat(h,"}")}function T(l,h){return-1==be.configFields.indexOf(l)&&-1==h.indexOf(l)}function g(l,h,u,m){Object.keys(l).filter(function(_){return T(_,m.ignoreFields)}).forEach(function(_){var w=l[_];if("object"==typeof w){if(Array.isArray(w)&&!(w=w.find(function(o){return o&&"object"==typeof o})))return void u.push(["".concat(_),h]);if(w&&0===Object.keys(w).filter(function(o){return!1!==w[o]||m.includeFalsyKeys}).length)return;var I=Object.keys(w).filter(function(o){return T(o,m.ignoreFields)}).length>0,P="object"==typeof w.__args&&Object.keys(w.__args).length>0,L="object"==typeof w.__directives,V=w.__all_on instanceof Array,W="object"==typeof w.__on,G="".concat(_);if("string"==typeof w.__name&&(G="".concat(G," ").concat(w.__name)),"string"==typeof w.__aliasFor&&(G="".concat(G,": ").concat(w.__aliasFor)),"object"==typeof w.__variables&&Object.keys(w.__variables).length>0)G="".concat(G," (").concat(function(l){var h=[];for(var u in l)h.push("$".concat(u,": ").concat(l[u]));return h.join(", ")}(w.__variables),")");else if(P||L){var H="",j="";L&&(j=Object.entries(w.__directives).map(function(o){var y;return"@".concat(function(l){var h=Object.keys(l)[0],u=l[h];if("boolean"==typeof u||"object"==typeof u&&0===Object.keys(u).length)return h;if("object"==typeof u){var m=[];for(var _ in u){var w=O(u[_]).replace(/"/g,"");m.push("".concat(_,": ").concat(w))}return"".concat(h,"(").concat(m.join(", "),")")}throw new Error("Unsupported type for directive: ".concat(typeof u,". Types allowed: object, boolean.\n")+"Offending object: ".concat(JSON.stringify(l)))}(((y={})[o[0]]=o[1],y)))}).join(" ")),P&&(H="(".concat(function(l){var h=[];for(var u in l)h.push("".concat(u,": ").concat(O(l[u])));return h.join(", ")}(w.__args),")"));var K=L&&P?" ":"";G="".concat(G," ").concat(H).concat(K).concat(j)}u.push([G+(I||W||V?" {":""),h]),g(w,h+1,u,m),V&&w.__all_on.forEach(function(o){u.push(["...".concat(o),h+1])}),W&&(w.__on instanceof Array?w.__on:[w.__on]).forEach(function(o){u.push(["... on ".concat(o.__typeName," {"),h+1]),g(o,h+2,u,m),u.push(["}",h+1])}),(I||W||V)&&u.push(["}",h])}else(!0===m.includeFalsyKeys||w)&&u.push(["".concat(_),h])})}be.configFields=["__args","__alias","__aliasFor","__variables","__directives","__on","__all_on","__typeName","__name"],be.jsonToGraphQLQuery=function(l,h){if(void 0===h&&(h={}),!l||"object"!=typeof l)throw new Error("query object not specified");if(0==Object.keys(l).length)throw new Error("query object has no data");h.ignoreFields instanceof Array||(h.ignoreFields=[]);var u=[];g(l,0,u,h);var m="";return u.forEach(function(_){var w=_[0];h.pretty?(m&&(m+="\n"),m+=function(l){return Array(4*l+1).join(" ")}(_[1])+w):(m&&(m+=" "),m+=w)}),m}},17854:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.EnumType=void 0,be.EnumType=function(q){this.value=q}},68668:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.VariableType=void 0;var Y=function(){function ie(q){this.value=q}return ie.prototype.toJSON=function(){return"$".concat(this.value)},ie}();be.VariableType=Y},6856:(bt,be,Y)=>{bt=Y.nmd(bt);var q="__lodash_hash_undefined__",d=9007199254740991,x="[object Arguments]",f="[object Array]",g="[object Boolean]",b="[object Date]",l="[object Error]",h="[object Function]",m="[object Map]",_="[object Number]",S="[object Object]",I="[object Promise]",L="[object RegExp]",V="[object Set]",W="[object String]",j="[object WeakMap]",K="[object ArrayBuffer]",R="[object DataView]",Q=/^\[object .+?Constructor\]$/,ee=/^(?:0|[1-9]\d*)$/,ce={};ce["[object Float32Array]"]=ce["[object Float64Array]"]=ce["[object Int8Array]"]=ce["[object Int16Array]"]=ce["[object Int32Array]"]=ce["[object Uint8Array]"]=ce["[object Uint8ClampedArray]"]=ce["[object Uint16Array]"]=ce["[object Uint32Array]"]=!0,ce[x]=ce[f]=ce[K]=ce[g]=ce[R]=ce[b]=ce[l]=ce[h]=ce[m]=ce[_]=ce[S]=ce[L]=ce[V]=ce[W]=ce[j]=!1;var ue="object"==typeof global&&global&&global.Object===Object&&global,we="object"==typeof self&&self&&self.Object===Object&&self,ae=ue||we||Function("return this")(),Te=be&&!be.nodeType&&be,le=Te&&bt&&!bt.nodeType&&bt,X=le&&le.exports===Te,ne=X&&ue.process,pe=function(){try{return ne&&ne.binding&&ne.binding("util")}catch{}}(),_e=pe&&pe.isTypedArray;function ke(Sn,rr){for(var hn=-1,Cn=null==Sn?0:Sn.length;++hnCs))return!1;var Rs=Ei.get(Sn);if(Rs&&Ei.get(rr))return Rs==rr;var co=-1,Vo=!0,sa=2&hn?new so:void 0;for(Ei.set(Sn,rr),Ei.set(rr,Sn);++co-1},mr.prototype.set=function(Sn,rr){var hn=this.__data__,Cn=Lu(hn,Sn);return Cn<0?(++this.size,hn.push([Sn,rr])):hn[Cn][1]=rr,this},rs.prototype.clear=function(){this.size=0,this.__data__={hash:new Qn,map:new(Bn||mr),string:new Qn}},rs.prototype.delete=function(Sn){var rr=ec(this,Sn).delete(Sn);return this.size-=rr?1:0,rr},rs.prototype.get=function(Sn){return ec(this,Sn).get(Sn)},rs.prototype.has=function(Sn){return ec(this,Sn).has(Sn)},rs.prototype.set=function(Sn,rr){var hn=ec(this,Sn),Cn=hn.size;return hn.set(Sn,rr),this.size+=hn.size==Cn?0:1,this},so.prototype.add=so.prototype.push=function(Sn){return this.__data__.set(Sn,q),this},so.prototype.has=function(Sn){return this.__data__.has(Sn)},Wi.prototype.clear=function(){this.__data__=new mr,this.size=0},Wi.prototype.delete=function(Sn){var rr=this.__data__,hn=rr.delete(Sn);return this.size=rr.size,hn},Wi.prototype.get=function(Sn){return this.__data__.get(Sn)},Wi.prototype.has=function(Sn){return this.__data__.has(Sn)},Wi.prototype.set=function(Sn,rr){var hn=this.__data__;if(hn instanceof mr){var Cn=hn.__data__;if(!Bn||Cn.length<199)return Cn.push([Sn,rr]),this.size=++hn.size,this;hn=this.__data__=new rs(Cn)}return hn.set(Sn,rr),this.size=hn.size,this};var eu=fn?function(Sn){return null==Sn?[]:(Sn=Object(Sn),function(Sn,rr){for(var hn=-1,Cn=null==Sn?0:Sn.length,Ir=0,Ei=[];++hn-1&&Sn%1==0&&Sn-1&&Sn%1==0&&Sn<=d}function ou(Sn){var rr=typeof Sn;return null!=Sn&&("object"==rr||"function"==rr)}function Vu(Sn){return null!=Sn&&"object"==typeof Sn}var ua=_e?function(Sn){return function(rr){return Sn(rr)}}(_e):function(Sn){return Vu(Sn)&&na(Sn.length)&&!!ce[ja(Sn)]};function Pu(Sn){return function(Sn){return null!=Sn&&na(Sn.length)&&!Wa(Sn)}(Sn)?function(Sn,rr){var hn=ta(Sn),Cn=!hn&&_o(Sn),Ir=!hn&&!Cn&&qo(Sn),Ei=!hn&&!Cn&&!Ir&&ua(Sn),Os=hn||Cn||Ir||Ei,Cs=Os?function(Sn,rr){for(var hn=-1,Cn=Array(Sn);++hn{bt=Y.nmd(bt);var q="__lodash_hash_undefined__",d=9007199254740991,x="[object Arguments]",h="[object Function]",S="[object Object]",a=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,Q={};Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q[x]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object Boolean]"]=Q["[object DataView]"]=Q["[object Date]"]=Q["[object Error]"]=Q[h]=Q["[object Map]"]=Q["[object Number]"]=Q[S]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object WeakMap]"]=!1;var ee="object"==typeof global&&global&&global.Object===Object&&global,ce="object"==typeof self&&self&&self.Object===Object&&self,ue=ee||ce||Function("return this")(),we=be&&!be.nodeType&&be,ae=we&&bt&&!bt.nodeType&&bt,Te=ae&&ae.exports===we,le=Te&&ee.process,X=function(){try{return ae&&ae.require&&ae.require("util").types||le&&le.binding&&le.binding("util")}catch{}}(),ne=X&&X.isTypedArray;function pe(hn,Cn,Ir){switch(Ir.length){case 0:return hn.call(Cn);case 1:return hn.call(Cn,Ir[0]);case 2:return hn.call(Cn,Ir[0],Ir[1]);case 3:return hn.call(Cn,Ir[0],Ir[1],Ir[2])}return hn.apply(Cn,Ir)}var hn,me=Array.prototype,ze=Object.prototype,Ve=ue["__core-js_shared__"],nt=Function.prototype.toString,tt=ze.hasOwnProperty,mt=(hn=/[^.]+$/.exec(Ve&&Ve.keys&&Ve.keys.IE_PROTO||""))?"Symbol(src)_1."+hn:"",ht=ze.toString,wt=nt.call(Object),Pt=RegExp("^"+nt.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=Te?ue.Buffer:void 0,Ye=ue.Symbol,gt=ue.Uint8Array,Wt=function(hn,Cn){return function(Ir){return hn(Cn(Ir))}}(Object.getPrototypeOf,Object),dn=Object.create,Nt=ze.propertyIsEnumerable,It=me.splice,qt=Ye?Ye.toStringTag:void 0,jt=function(){try{var hn=Uu(Object,"defineProperty");return hn({},"",{}),hn}catch{}}(),Yt=st?st.isBuffer:void 0,Wn=Math.max,fn=Date.now,$n=Uu(ue,"Map"),Jr=Uu(Object,"create"),Ln=function(){function hn(){}return function(Cn){if(!Wa(Cn))return{};if(dn)return dn(Cn);hn.prototype=Cn;var Ir=new hn;return hn.prototype=void 0,Ir}}();function Bn(hn){var Cn=-1,Ir=null==hn?0:hn.length;for(this.clear();++Cn-1},sr.prototype.set=function(hn,Cn){var Ir=this.__data__,Ei=is(Ir,hn);return Ei<0?(++this.size,Ir.push([hn,Cn])):Ir[Ei][1]=Cn,this},Qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Bn,map:new($n||sr),string:new Bn}},Qn.prototype.delete=function(hn){var Cn=Va(this,hn).delete(hn);return this.size-=Cn?1:0,Cn},Qn.prototype.get=function(hn){return Va(this,hn).get(hn)},Qn.prototype.has=function(hn){return Va(this,hn).has(hn)},Qn.prototype.set=function(hn,Cn){var Ir=Va(this,hn),Ei=Ir.size;return Ir.set(hn,Cn),this.size+=Ir.size==Ei?0:1,this},mr.prototype.clear=function(){this.__data__=new sr,this.size=0},mr.prototype.delete=function(hn){var Cn=this.__data__,Ir=Cn.delete(hn);return this.size=Cn.size,Ir},mr.prototype.get=function(hn){return this.__data__.get(hn)},mr.prototype.has=function(hn){return this.__data__.has(hn)},mr.prototype.set=function(hn,Cn){var Ir=this.__data__;if(Ir instanceof sr){var Ei=Ir.__data__;if(!$n||Ei.length<199)return Ei.push([hn,Cn]),this.size=++Ir.size,this;Ir=this.__data__=new Qn(Ei)}return Ir.set(hn,Cn),this.size=Ir.size,this};var ji=function(Cn,Ir,Ei){for(var Os=-1,Cs=Object(Cn),zs=Ei(Cn),Rs=zs.length;Rs--;){var co=zs[++Os];if(!1===Ir(Cs[co],co,Cs))break}return Cn};function so(hn){return null==hn?void 0===hn?"[object Undefined]":"[object Null]":qt&&qt in Object(hn)?function(hn){var Cn=tt.call(hn,qt),Ir=hn[qt];try{hn[qt]=void 0;var Ei=!0}catch{}var Os=ht.call(hn);return Ei&&(Cn?hn[qt]=Ir:delete hn[qt]),Os}(hn):function(hn){return ht.call(hn)}(hn)}function oo(hn){return na(hn)&&so(hn)==x}function _s(hn,Cn,Ir,Ei,Os){hn!==Cn&&ji(Cn,function(Cs,zs){if(Os||(Os=new mr),Wa(Cs))!function(hn,Cn,Ir,Ei,Os,Cs,zs){var Rs=aa(hn,Ir),co=aa(Cn,Ir),Vo=zs.get(co);if(Vo)Xi(hn,Ir,Vo);else{var sa=Cs?Cs(Rs,co,Ir+"",hn,Cn,zs):void 0,nu=void 0===sa;if(nu){var Po=Vs(co),Hu=!Po&&Tu(co),Pc=!Po&&!Hu&&Vu(co);sa=co,Po||Hu||Pc?Vs(Rs)?sa=Rs:function(hn){return na(hn)&&_o(hn)}(Rs)?sa=function(hn,Cn){var Ir=-1,Ei=hn.length;for(Cn||(Cn=Array(Ei));++Ir-1&&hn%1==0&&hn0){if(++Cn>=800)return arguments[0]}else Cn=0;return hn.apply(void 0,arguments)}}(Ms);function Sr(hn,Cn){return hn===Cn||hn!=hn&&Cn!=Cn}var Qi=oo(function(){return arguments}())?oo:function(hn){return na(hn)&&tt.call(hn,"callee")&&!Nt.call(hn,"callee")},Vs=Array.isArray;function _o(hn){return null!=hn&&xo(hn.length)&&!qo(hn)}var Tu=Yt||function(){return!1};function qo(hn){if(!Wa(hn))return!1;var Cn=so(hn);return Cn==h||"[object GeneratorFunction]"==Cn||"[object AsyncFunction]"==Cn||"[object Proxy]"==Cn}function xo(hn){return"number"==typeof hn&&hn>-1&&hn%1==0&&hn<=d}function Wa(hn){var Cn=typeof hn;return null!=hn&&("object"==Cn||"function"==Cn)}function na(hn){return null!=hn&&"object"==typeof hn}var Vu=ne?function(hn){return function(Cn){return hn(Cn)}}(ne):function(hn){return na(hn)&&xo(hn.length)&&!!Q[so(hn)]};function Pu(hn){return _o(hn)?function(hn,Cn){var Ir=Vs(hn),Ei=!Ir&&Qi(hn),Os=!Ir&&!Ei&&Tu(hn),Cs=!Ir&&!Ei&&!Os&&Vu(hn),zs=Ir||Ei||Os||Cs,Rs=zs?function(hn,Cn){for(var Ir=-1,Ei=Array(hn);++Ir1?Ir[Os-1]:void 0,zs=Os>2?Ir[2]:void 0;for(Cs=hn.length>3&&"function"==typeof Cs?(Os--,Cs):void 0,zs&&function(hn,Cn,Ir){if(!Wa(Ir))return!1;var Ei=typeof Cn;return!!("number"==Ei?_o(Ir)&&yo(Cn,Ir.length):"string"==Ei&&Cn in Ir)&&Sr(Ir[Cn],hn)}(Ir[0],Ir[1],zs)&&(Cs=Os<3?void 0:Cs,Os=1),Cn=Object(Cn);++Ei{bt=Y.nmd(bt);var O="__lodash_hash_undefined__",x=1/0,f=9007199254740991,T="[object Arguments]",g="[object Array]",b="[object Boolean]",l="[object Date]",h="[object Error]",u="[object Function]",_="[object Map]",w="[object Number]",S="[object Object]",I="[object Promise]",P="[object RegExp]",L="[object Set]",V="[object String]",W="[object Symbol]",G="[object WeakMap]",H="[object ArrayBuffer]",j="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,B=/^\./,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=/^\[object .+?Constructor\]$/,we=/^(?:0|[1-9]\d*)$/,ae={};ae["[object Float32Array]"]=ae["[object Float64Array]"]=ae["[object Int8Array]"]=ae["[object Int16Array]"]=ae["[object Int32Array]"]=ae["[object Uint8Array]"]=ae["[object Uint8ClampedArray]"]=ae["[object Uint16Array]"]=ae["[object Uint32Array]"]=!0,ae[T]=ae[g]=ae[H]=ae[b]=ae[j]=ae[l]=ae[h]=ae[u]=ae[_]=ae[w]=ae[S]=ae[P]=ae[L]=ae[V]=ae[G]=!1;var Te="object"==typeof global&&global&&global.Object===Object&&global,le="object"==typeof self&&self&&self.Object===Object&&self,X=Te||le||Function("return this")(),ne=be&&!be.nodeType&&be,pe=ne&&bt&&!bt.nodeType&&bt,xe=pe&&pe.exports===ne&&Te.process,Ce=function(){try{return xe&&xe.binding("util")}catch{}}(),ke=Ce&&Ce.isTypedArray;function me(En,Ut,xn,et){for(var zt=-1,gn=En?En.length:0;++zt-1},mr.prototype.set=function(En,Ut){var xn=this.__data__,et=Lu(xn,En);return et<0?xn.push([En,Ut]):xn[et][1]=Ut,this},rs.prototype.clear=function(){this.__data__={hash:new Qn,map:new(Ln||mr),string:new Qn}},rs.prototype.delete=function(En){return ta(this,En).delete(En)},rs.prototype.get=function(En){return ta(this,En).get(En)},rs.prototype.has=function(En){return ta(this,En).has(En)},rs.prototype.set=function(En,Ut){return ta(this,En).set(En,Ut),this},so.prototype.add=so.prototype.push=function(En){return this.__data__.set(En,O),this},so.prototype.has=function(En){return this.__data__.has(En)},Wi.prototype.clear=function(){this.__data__=new mr},Wi.prototype.delete=function(En){return this.__data__.delete(En)},Wi.prototype.get=function(En){return this.__data__.get(En)},Wi.prototype.has=function(En){return this.__data__.has(En)},Wi.prototype.set=function(En,Ut){var xn=this.__data__;if(xn instanceof mr){var et=xn.__data__;if(!Ln||et.length<199)return et.push([En,Ut]),this;xn=this.__data__=new rs(et)}return xn.set(En,Ut),this};var ja=function(xn,et){if(null==xn)return xn;if(!zs(xn))return function(En,Ut){return En&&xa(En,Ut,Wc)}(xn,et);for(var zt=xn.length,gn=-1,kn=Object(xn);++gnnr))return!1;var xi=gn.get(En);if(xi&&gn.get(Ut))return xi==Ut;var hs=-1,Ws=!0,As=1&zt?new so:void 0;for(gn.set(En,Ut),gn.set(Ut,En);++hs-1&&En%1==0&&En-1&&En%1==0&&En<=f}function sa(En){var Ut=typeof En;return!!En&&("object"==Ut||"function"==Ut)}function nu(En){return!!En&&"object"==typeof En}function Po(En){return"symbol"==typeof En||nu(En)&&It.call(En)==W}var Hu=ke?function(En){return function(Ut){return En(Ut)}}(ke):function(En){return nu(En)&&Vo(En.length)&&!!ae[It.call(En)]};function Wc(En){return zs(En)?function(En,Ut){var xn=Cs(En)||Os(En)?function(En,Ut){for(var xn=-1,et=Array(En);++xn{bt=Y.nmd(bt);var O="__lodash_hash_undefined__",x=1/0,f=9007199254740991,T="[object Arguments]",g="[object Array]",b="[object Boolean]",l="[object Date]",h="[object Error]",u="[object Function]",_="[object Map]",w="[object Number]",S="[object Object]",I="[object Promise]",P="[object RegExp]",L="[object Set]",V="[object String]",W="[object Symbol]",G="[object WeakMap]",H="[object ArrayBuffer]",j="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,B=/^\./,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=/^\[object .+?Constructor\]$/,we=/^(?:0|[1-9]\d*)$/,ae={};ae["[object Float32Array]"]=ae["[object Float64Array]"]=ae["[object Int8Array]"]=ae["[object Int16Array]"]=ae["[object Int32Array]"]=ae["[object Uint8Array]"]=ae["[object Uint8ClampedArray]"]=ae["[object Uint16Array]"]=ae["[object Uint32Array]"]=!0,ae[T]=ae[g]=ae[H]=ae[b]=ae[j]=ae[l]=ae[h]=ae[u]=ae[_]=ae[w]=ae[S]=ae[P]=ae[L]=ae[V]=ae[G]=!1;var Te="object"==typeof global&&global&&global.Object===Object&&global,le="object"==typeof self&&self&&self.Object===Object&&self,X=Te||le||Function("return this")(),ne=be&&!be.nodeType&&be,pe=ne&&bt&&!bt.nodeType&&bt,xe=pe&&pe.exports===ne&&Te.process,Ce=function(){try{return xe&&xe.binding("util")}catch{}}(),ke=Ce&&Ce.isTypedArray;function me(Ut,xn){return!(!Ut||!Ut.length)&&function(Ut,xn,et){if(xn!=xn)return function(Ut,xn,et,zt){for(var gn=Ut.length,kn=-1;++kn-1}function ze(Ut,xn){for(var et=-1,zt=Ut?Ut.length:0;++et-1},$i.prototype.set=function(Ut,xn){var et=this.__data__,zt=Na(et,Ut);return zt<0?et.push([Ut,xn]):et[zt][1]=xn,this},ji.prototype.clear=function(){this.__data__={hash:new ur,map:new(Lr||$i),string:new ur}},ji.prototype.delete=function(Ut){return ta(this,Ut).delete(Ut)},ji.prototype.get=function(Ut){return ta(this,Ut).get(Ut)},ji.prototype.has=function(Ut){return ta(this,Ut).has(Ut)},ji.prototype.set=function(Ut,xn){return ta(this,Ut).set(Ut,xn),this},_s.prototype.add=_s.prototype.push=function(Ut){return this.__data__.set(Ut,O),this},_s.prototype.has=function(Ut){return this.__data__.has(Ut)},Ms.prototype.clear=function(){this.__data__=new $i},Ms.prototype.delete=function(Ut){return this.__data__.delete(Ut)},Ms.prototype.get=function(Ut){return this.__data__.get(Ut)},Ms.prototype.has=function(Ut){return this.__data__.has(Ut)},Ms.prototype.set=function(Ut,xn){var et=this.__data__;if(et instanceof $i){var zt=et.__data__;if(!Lr||zt.length<199)return zt.push([Ut,xn]),this;et=this.__data__=new ji(zt)}return et.set(Ut,xn),this};var Sr=sr&&1/Wt(new sr([,-0]))[1]==x?function(Ut){return new sr(Ut)}:function(){};function Qi(Ut,xn,et,zt,gn,kn){var nr=2&gn,pi=Ut.length,xi=xn.length;if(pi!=xi&&!(nr&&xi>pi))return!1;var hs=kn.get(Ut);if(hs&&kn.get(xn))return hs==xn;var Ws=-1,As=!0,Ni=1&gn?new _s:void 0;for(kn.set(Ut,xn),kn.set(xn,Ut);++Ws-1&&Ut%1==0&&Ut-1&&Ut%1==0&&Ut<=f}function sa(Ut){var xn=typeof Ut;return!!Ut&&("object"==xn||"function"==xn)}function nu(Ut){return!!Ut&&"object"==typeof Ut}function Po(Ut){return"symbol"==typeof Ut||nu(Ut)&&fn.call(Ut)==W}var Hu=ke?function(Ut){return function(xn){return Ut(xn)}}(ke):function(Ut){return nu(Ut)&&Vo(Ut.length)&&!!ae[fn.call(Ut)]};function Wc(Ut){return zs(Ut)?function(Ut,xn){var et=Cs(Ut)||Os(Ut)?function(Ut,xn){for(var et=-1,zt=Array(Ut);++et=200){var hs=xn?null:Sr(Ut);if(hs)return Wt(hs);nr=!1,gn=Pt,xi=new _s}else xi=xn?[]:pi;e:for(;++zt"']/g,Bn=RegExp(Jr.source),Wr=RegExp(Ln.source),zn=/<%-([\s\S]+?)%>/g,bn=/<%([\s\S]+?)%>/g,Lr=/<%=([\s\S]+?)%>/g,Kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sr=/^\w*$/,Ii=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Un=/[\\^$.*+?()[\]{}|]/g,ir=RegExp(Un.source),ts=/^\s+/,Tn=/\s/,Qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vi=/\{\n\/\* \[wrapped with (.+)\] \*/,ar=/,? & /,br=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ki=/[()=,{}\[\]\/\s]/,ur=/\\(\\)?/g,mr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fr=/\w*$/,hi=/^[-+]0x[0-9a-f]+$/i,wi=/^0b[01]+$/i,cs=/^\[object .+?Constructor\]$/,$i=/^0o[0-7]+$/i,rs=/^(?:0|[1-9]\d*)$/,Xi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$s=/($^)/,is=/['\n\r\u2028\u2029\\]/g,go="\\ud800-\\udfff",zo="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Wi="\\u2700-\\u27bf",bo="a-z\\xdf-\\xf6\\xf8-\\xff",Oi="A-Z\\xc0-\\xd6\\xd8-\\xde",Lu="\\ufe0e\\ufe0f",Qa="\\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",xa="["+go+"]",Du="["+Qa+"]",Na="["+zo+"]",Va="\\d+",Uu="["+Wi+"]",Eu="["+bo+"]",jo="[^"+go+Qa+Va+Wi+bo+Oi+"]",yo="\\ud83c[\\udffb-\\udfff]",El="[^"+go+"]",ec="(?:\\ud83c[\\udde6-\\uddff]){2}",kc="[\\ud800-\\udbff][\\udc00-\\udfff]",Cc="["+Oi+"]",tu="(?:"+Eu+"|"+jo+")",aa="(?:"+Cc+"|"+jo+")",rl="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xr="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Cr="(?:"+Na+"|"+yo+")?",Sr="["+Lu+"]?",ta=Sr+Cr+"(?:\\u200d(?:"+[El,ec,kc].join("|")+")"+Sr+Cr+")*",Tu="(?:"+[Uu,ec,kc].join("|")+")"+ta,qo="(?:"+[El+Na+"?",Na,ec,kc,xa].join("|")+")",xo=RegExp("['\u2019]","g"),Wa=RegExp(Na,"g"),na=RegExp(yo+"(?="+yo+")|"+qo+ta,"g"),ou=RegExp([Cc+"?"+Eu+"+"+rl+"(?="+[Du,Cc,"$"].join("|")+")",aa+"+"+Xr+"(?="+[Du,Cc+tu,"$"].join("|")+")",Cc+"?"+tu+"+"+rl,Cc+"+"+Xr,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Va,Tu].join("|"),"g"),Vu=RegExp("[\\u200d"+go+zo+Lu+"]"),ua=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pu=["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"],oc=-1,po={};po[gt]=po[St]=po[Wt]=po[dn]=po[Nt]=po[It]=po[qt]=po[jt]=po[Yt]=!0,po[ue]=po[we]=po[st]=po[Te]=po[Ye]=po[le]=po[ne]=po[pe]=po[xe]=po[Ce]=po[me]=po[Ve]=po[nt]=po[tt]=po[wt]=!1;var Sn={};Sn[ue]=Sn[we]=Sn[st]=Sn[Ye]=Sn[Te]=Sn[le]=Sn[gt]=Sn[St]=Sn[Wt]=Sn[dn]=Sn[Nt]=Sn[xe]=Sn[Ce]=Sn[me]=Sn[Ve]=Sn[nt]=Sn[tt]=Sn[mt]=Sn[It]=Sn[qt]=Sn[jt]=Sn[Yt]=!0,Sn[ne]=Sn[pe]=Sn[wt]=!1;var Ir={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ei=parseFloat,Os=parseInt,Cs="object"==typeof global&&global&&global.Object===Object&&global,zs="object"==typeof self&&self&&self.Object===Object&&self,Rs=Cs||zs||Function("return this")(),co=be&&!be.nodeType&&be,Vo=co&&bt&&!bt.nodeType&&bt,sa=Vo&&Vo.exports===co,nu=sa&&Cs.process,Po=function(){try{return Vo&&Vo.require&&Vo.require("util").types||nu&&nu.binding&&nu.binding("util")}catch{}}(),Hu=Po&&Po.isArrayBuffer,Pc=Po&&Po.isDate,ru=Po&&Po.isMap,qd=Po&&Po.isRegExp,Wc=Po&&Po.isSet,nd=Po&&Po.isTypedArray;function Ea(Or,Ti,ii){switch(ii.length){case 0:return Or.call(Ti);case 1:return Or.call(Ti,ii[0]);case 2:return Or.call(Ti,ii[0],ii[1]);case 3:return Or.call(Ti,ii[0],ii[1],ii[2])}return Or.apply(Ti,ii)}function En(Or,Ti,ii,to){for(var da=-1,iu=null==Or?0:Or.length;++da-1}function kn(Or,Ti,ii){for(var to=-1,da=null==Or?0:Or.length;++to-1;);return ii}function Ho(Or,Ti){for(var ii=Or.length;ii--&&Ka(Ti,Or[ii],0)>-1;);return ii}function $o(Or,Ti){for(var ii=Or.length,to=0;ii--;)Or[ii]===Ti&&++to;return to}var oa=Ki({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),Bo=Ki({"&":"&","<":"<",">":">",'"':""","'":"'"});function xf(Or){return"\\"+Ir[Or]}function tc(Or){return Vu.test(Or)}function rd(Or){var Ti=-1,ii=Array(Or.size);return Or.forEach(function(to,da){ii[++Ti]=[da,to]}),ii}function e0(Or,Ti){return function(ii){return Or(Ti(ii))}}function Nc(Or,Ti){for(var ii=-1,to=Or.length,da=0,iu=[];++ii",""":'"',"'":"'"}),Ca=function Or(Ti){var ye,ii=(Ti=null==Ti?Rs:Ca.defaults(Rs.Object(),Ti,Ca.pick(Rs,Pu))).Array,to=Ti.Date,da=Ti.Error,iu=Ti.Function,hu=Ti.Math,Ia=Ti.Object,jh=Ti.RegExp,Lt=Ti.String,en=Ti.TypeError,Dn=ii.prototype,Gr=Ia.prototype,Bi=Ti["__core-js_shared__"],Ai=iu.prototype.toString,gi=Gr.hasOwnProperty,Bs=0,Ns=(ye=/[^.]+$/.exec(Bi&&Bi.keys&&Bi.keys.IE_PROTO||""))?"Symbol(src)_1."+ye:"",ha=Gr.toString,Fo=Ai.call(Ia),Sa=Rs._,Zo=jh("^"+Ai.call(gi).replace(Un,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ma=sa?Ti.Buffer:q,$u=Ti.Symbol,vu=Ti.Uint8Array,au=Ma?Ma.allocUnsafe:q,zl=e0(Ia.getPrototypeOf,Ia),sl=Ia.create,id=Gr.propertyIsEnumerable,Lf=Dn.splice,Uf=$u?$u.isConcatSpreadable:q,zc=$u?$u.iterator:q,Mc=$u?$u.toStringTag:q,Yu=function(){try{var ye=Jt(Ia,"defineProperty");return ye({},"",{}),ye}catch{}}(),pu=Ti.clearTimeout!==Rs.clearTimeout&&Ti.clearTimeout,b1=to&&to.now!==Rs.Date.now&&to.now,yh=Ti.setTimeout!==Rs.setTimeout&&Ti.setTimeout,hd=hu.ceil,Ad=hu.floor,Vh=Ia.getOwnPropertySymbols,j0=Ma?Ma.isBuffer:q,lf=Ti.isFinite,bh=Dn.join,Hh=e0(Ia.keys,Ia),nc=hu.max,Al=hu.min,V0=to.now,v1=Ti.parseInt,df=hu.random,Zd=Dn.reverse,Qs=Jt(Ti,"DataView"),t0=Jt(Ti,"Map"),jf=Jt(Ti,"Promise"),hc=Jt(Ti,"Set"),n0=Jt(Ti,"WeakMap"),H0=Jt(Ia,"create"),ac=n0&&new n0,Id={},Au=ro(Qs),x0=ro(t0),Sd=ro(jf),r0=ro(hc),Yd=ro(n0),kd=$u?$u.prototype:q,ql=kd?kd.valueOf:q,Ef=kd?kd.toString:q;function mn(ye){if(ad(ye)&&!xu(ye)&&!(ye instanceof _u)){if(ye instanceof sd)return ye;if(gi.call(ye,"__wrapped__"))return Qd(ye)}return new sd(ye)}var $0=function(){function ye(){}return function(Be){if(!Ol(Be))return{};if(sl)return sl(Be);ye.prototype=Be;var lt=new ye;return ye.prototype=q,lt}}();function Cd(){}function sd(ye,Be){this.__wrapped__=ye,this.__actions__=[],this.__chain__=!!Be,this.__index__=0,this.__values__=q}function _u(ye){this.__wrapped__=ye,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=B,this.__views__=[]}function s0(ye){var Be=-1,lt=null==ye?0:ye.length;for(this.clear();++Be=Be?ye:Be)),ye}function Sl(ye,Be,lt,Gt,it,Fn){var tr,rn=1&Be,Qr=2&Be,ms=4&Be;if(lt&&(tr=it?lt(ye,Gt,it,Fn):lt(ye)),tr!==q)return tr;if(!Ol(ye))return ye;var ns=xu(ye);if(ns){if(tr=function(ye){var Be=ye.length,lt=new ye.constructor(Be);return Be&&"string"==typeof ye[0]&&gi.call(ye,"index")&&(lt.index=ye.index,lt.input=ye.input),lt}(ye),!rn)return Mt(ye,tr)}else{var Ri=or(ye),Co=Ri==pe||Ri==_e;if(i1(ye))return lr(ye,rn);if(Ri==me||Ri==ue||Co&&!it){if(tr=Qr||Co?{}:Zi(ye),!rn)return Qr?function(ye,Be){return Vt(ye,Xn(ye),Be)}(ye,function(ye,Be){return ye&&Vt(Be,jd(Be),ye)}(tr,ye)):function(ye,Be){return Vt(ye,Pn(ye),Be)}(ye,Dd(tr,ye))}else{if(!Sn[Ri])return it?ye:{};tr=function(ye,Be,lt){var Gt=ye.constructor;switch(Be){case st:return Tr(ye);case Te:case le:return new Gt(+ye);case Ye:return function(ye,Be){var lt=Be?Tr(ye.buffer):ye.buffer;return new ye.constructor(lt,ye.byteOffset,ye.byteLength)}(ye,lt);case gt:case St:case Wt:case dn:case Nt:case It:case qt:case jt:case Yt:return qe(ye,lt);case xe:return new Gt;case Ce:case tt:return new Gt(ye);case Ve:return function(ye){var Be=new ye.constructor(ye.source,Fr.exec(ye));return Be.lastIndex=ye.lastIndex,Be}(ye);case nt:return new Gt;case mt:return function(ye){return ql?Ia(ql.call(ye)):{}}(ye)}}(ye,Ri,rn)}}Fn||(Fn=new pl);var ea=Fn.get(ye);if(ea)return ea;Fn.set(ye,tr),jl(ye)?ye.forEach(function(za){tr.add(Sl(za,Be,lt,za,ye,Fn))}):sg(ye)&&ye.forEach(function(za,Ju){tr.set(Ju,Sl(za,Be,lt,Ju,ye,Fn))});var uu=ns?q:(ms?Qr?Se:Ap:Qr?jd:Hl)(ye);return Ut(uu||ye,function(za,Ju){uu&&(za=ye[Ju=za]),rc(tr,Ju,Sl(za,Be,lt,Ju,ye,Fn))}),tr}function Pd(ye,Be,lt){var Gt=lt.length;if(null==ye)return!Gt;for(ye=Ia(ye);Gt--;){var it=lt[Gt],tr=ye[it];if(tr===q&&!(it in ye)||!(0,Be[it])(tr))return!1}return!0}function T0(ye,Be,lt){if("function"!=typeof ye)throw new en(x);return qf(function(){ye.apply(q,lt)},Be)}function gd(ye,Be,lt,Gt){var it=-1,Fn=gn,tr=!0,rn=ye.length,Qr=[],ms=Be.length;if(!rn)return Qr;lt&&(Be=nr(Be,ka(lt))),Gt?(Fn=kn,tr=!1):Be.length>=200&&(Fn=Eo,tr=!1,Be=new ol(Be));e:for(;++it-1},pf.prototype.set=function(ye,Be){var lt=this.__data__,Gt=_h(lt,ye);return Gt<0?(++this.size,lt.push([ye,Be])):lt[Gt][1]=Be,this},Iu.prototype.clear=function(){this.size=0,this.__data__={hash:new s0,map:new(t0||pf),string:new s0}},Iu.prototype.delete=function(ye){var Be=At(this,ye).delete(ye);return this.size-=Be?1:0,Be},Iu.prototype.get=function(ye){return At(this,ye).get(ye)},Iu.prototype.has=function(ye){return At(this,ye).has(ye)},Iu.prototype.set=function(ye,Be){var lt=At(this,ye),Gt=lt.size;return lt.set(ye,Be),this.size+=lt.size==Gt?0:1,this},ol.prototype.add=ol.prototype.push=function(ye){return this.__data__.set(ye,T),this},ol.prototype.has=function(ye){return this.__data__.has(ye)},pl.prototype.clear=function(){this.__data__=new pf,this.size=0},pl.prototype.delete=function(ye){var Be=this.__data__,lt=Be.delete(ye);return this.size=Be.size,lt},pl.prototype.get=function(ye){return this.__data__.get(ye)},pl.prototype.has=function(ye){return this.__data__.has(ye)},pl.prototype.set=function(ye,Be){var lt=this.__data__;if(lt instanceof pf){var Gt=lt.__data__;if(!t0||Gt.length<199)return Gt.push([ye,Be]),this.size=++lt.size,this;lt=this.__data__=new Iu(Gt)}return lt.set(ye,Be),this.size=lt.size,this};var $f=Zn(Yn),vp=Zn(Jd,!0);function c0(ye,Be){var lt=!0;return $f(ye,function(Gt,it,Fn){return lt=!!Be(Gt,it,Fn)}),lt}function yr(ye,Be,lt){for(var Gt=-1,it=ye.length;++Gt0&<(rn)?Be>1?pc(rn,Be-1,lt,Gt,it):pi(it,rn):Gt||(it[it.length]=rn)}return it}var Wf=fr(),w1=fr(!0);function Yn(ye,Be){return ye&&Wf(ye,Be,Hl)}function Jd(ye,Be){return ye&&w1(ye,Be,Hl)}function Mo(ye,Be){return zt(Be,function(lt){return Dp(ye[lt])})}function yd(ye,Be){for(var lt=0,Gt=(Be=Go(Be,ye)).length;null!=ye&<Be}function No(ye,Be){return null!=ye&&gi.call(ye,Be)}function uc(ye,Be){return null!=ye&&Be in Ia(ye)}function Bl(ye,Be,lt){for(var Gt=lt?kn:gn,it=ye[0].length,Fn=ye.length,tr=Fn,rn=ii(Fn),Qr=1/0,ms=[];tr--;){var ns=ye[tr];tr&&Be&&(ns=nr(ns,ka(Be))),Qr=Al(ns.length,Qr),rn[tr]=!lt&&(Be||it>=120&&ns.length>=120)?new ol(tr&&ns):q}ns=ye[0];var Ri=-1,Co=rn[0];e:for(;++Ri=rn?Qr:Qr*("desc"==lt[Gt]?-1:1)}return ye.index-Be.index}(Fn,tr,lt)});ii--;)Or[ii]=Or[ii].value;return Or}(E1(ye,function(Fn,tr,rn){return{criteria:nr(Be,function(ms){return ms(Fn)}),index:++Gt,value:Fn}}))}function Cf(ye,Be,lt){for(var Gt=-1,it=Be.length,Fn={};++Gt-1;)rn!==ye&&Lf.call(rn,Qr,1),Lf.call(ye,Qr,1);return ye}function Tp(ye,Be){for(var lt=ye?Be.length:0,Gt=lt-1;lt--;){var it=Be[lt];if(lt==Gt||it!==Fn){var Fn=it;Da(it)?Lf.call(ye,it,1):Rn(ye,it)}}return ye}function K0(ye,Be){return ye+Ad(df()*(Be-ye+1))}function zf(ye,Be){var lt="";if(!ye||Be<1||Be>N)return lt;do{Be%2&&(lt+=ye),(Be=Ad(Be/2))&&(ye+=ye)}while(Be);return lt}function Ja(ye,Be){return ys(p0(ye,Be,O0),ye+"")}function im(ye){return Il(th(ye))}function e1(ye,Be){var lt=th(ye);return Hi(lt,Kl(Be,0,lt.length))}function Je(ye,Be,lt,Gt){if(!Ol(ye))return ye;for(var it=-1,Fn=(Be=Go(Be,ye)).length,tr=Fn-1,rn=ye;null!=rn&&++itit?0:it+Be),(lt=lt>it?it:lt)<0&&(lt+=it),it=Be>lt?0:lt-Be>>>0,Be>>>=0;for(var Fn=ii(it);++Gt>>1,tr=ye[Fn];null!==tr&&!Ih(tr)&&(lt?tr<=Be:tr=200){var ms=Be?null:sm(ye);if(ms)return Kd(ms);tr=!1,it=Eo,Qr=new ol}else Qr=Be?[]:rn;e:for(;++Gt=Gt?ye:We(ye,Be,lt)}var Vn=pu||function(ye){return Rs.clearTimeout(ye)};function lr(ye,Be){if(Be)return ye.slice();var lt=ye.length,Gt=au?au(lt):new ye.constructor(lt);return ye.copy(Gt),Gt}function Tr(ye){var Be=new ye.constructor(ye.byteLength);return new vu(Be).set(new vu(ye)),Be}function qe(ye,Be){var lt=Be?Tr(ye.buffer):ye.buffer;return new ye.constructor(lt,ye.byteOffset,ye.length)}function ge(ye,Be){if(ye!==Be){var lt=ye!==q,Gt=null===ye,it=ye==ye,Fn=Ih(ye),tr=Be!==q,rn=null===Be,Qr=Be==Be,ms=Ih(Be);if(!rn&&!ms&&!Fn&&ye>Be||Fn&&tr&&Qr&&!rn&&!ms||Gt&&tr&&Qr||!lt&&Qr||!it)return 1;if(!Gt&&!Fn&&!ms&&ye1?lt[it-1]:q,tr=it>2?lt[2]:q;for(Fn=ye.length>3&&"function"==typeof Fn?(it--,Fn):q,tr&&eo(lt[0],lt[1],tr)&&(Fn=it<3?q:Fn,it=1),Be=Ia(Be);++Gt-1?it[Fn?Be[tr]:tr]:q}}function es(ye){return Ll(function(Be){var lt=Be.length,Gt=lt,it=sd.prototype.thru;for(ye&&Be.reverse();Gt--;){var Fn=Be[Gt];if("function"!=typeof Fn)throw new en(x);if(it&&!tr&&"wrapper"==Le(Fn))var tr=new sd([],!0)}for(Gt=tr?Gt:lt;++Gt1&&lc.reverse(),ns&&Qrrn))return!1;var ms=Fn.get(ye),ns=Fn.get(Be);if(ms&&ns)return ms==Be&&ns==ye;var Ri=-1,Co=!0,ea=2<?new ol:q;for(Fn.set(ye,Be),Fn.set(Be,ye);++Ri-1&&ye%1==0&&ye1?"& ":"")+Be[Gt],Be=Be.join(lt>2?", ":" "),ye.replace(Qn,"{\n/* [wrapped with "+Be+"] */\n")}(Gt,function(ye,Be){return Ut(ce,function(lt){var Gt="_."+lt[0];Be<[1]&&!gn(ye,Gt)&&ye.push(Gt)}),ye.sort()}(function(ye){var Be=ye.match(Vi);return Be?Be[1].split(ar):[]}(Gt),lt)))}function C0(ye){var Be=0,lt=0;return function(){var Gt=V0(),it=16-(Gt-lt);if(lt=Gt,it>0){if(++Be>=800)return arguments[0]}else Be=0;return ye.apply(q,arguments)}}function Hi(ye,Be){var lt=-1,Gt=ye.length,it=Gt-1;for(Be=Be===q?Gt:Be;++lt1?ye[Be-1]:q;return lt="function"==typeof lt?(ye.pop(),lt):q,Zh(ye,lt)});function Ta(ye){var Be=mn(ye);return Be.__chain__=!0,Be}function bl(ye,Be){return Be(ye)}var Ul=Ll(function(ye){var Be=ye.length,lt=Be?ye[0]:0,Gt=this.__wrapped__,it=function(Fn){return wh(Fn,ye)};return!(Be>1||this.__actions__.length)&&Gt instanceof _u&&Da(lt)?((Gt=Gt.slice(lt,+lt+(Be?1:0))).__actions__.push({func:bl,args:[it],thisArg:q}),new sd(Gt,this.__chain__).thru(function(Fn){return Be&&!Fn.length&&Fn.push(q),Fn})):this.thru(it)}),Mp=pn(function(ye,Be,lt){gi.call(ye,lt)?++ye[lt]:Hf(ye,lt,1)}),eg=os(pt),Qb=os(vt);function e6(ye,Be){return(xu(ye)?Ut:$f)(ye,ut(Be,3))}function Tv(ye,Be){return(xu(ye)?xn:vp)(ye,ut(Be,3))}var Uy=pn(function(ye,Be,lt){gi.call(ye,lt)?ye[lt].push(Be):Hf(ye,lt,[Be])}),Av=Ja(function(ye,Be,lt){var Gt=-1,it="function"==typeof Be,Fn=m0(ye)?ii(ye.length):[];return $f(ye,function(tr){Fn[++Gt]=it?Ea(Be,tr,lt):qc(tr,Be,lt)}),Fn}),Vy=pn(function(ye,Be,lt){Hf(ye,lt,Be)});function Hy(ye,Be){return(xu(ye)?nr:E1)(ye,ut(Be,3))}var t6=pn(function(ye,Be,lt){ye[lt?0:1].push(Be)},function(){return[[],[]]}),M1=Ja(function(ye,Be){if(null==ye)return[];var lt=Be.length;return lt>1&&eo(ye,Be[0],Be[1])?Be=[]:lt>2&&eo(Be[0],Be[1],Be[2])&&(Be=[Be[0]]),T1(ye,pc(Be,1),[])}),O1=b1||function(){return Rs.Date.now()};function Gg(ye,Be,lt){return Be=lt?q:Be,vd(ye,G,q,q,q,q,Be=ye&&null==Be?ye.length:Be)}function zg(ye,Be){var lt;if("function"!=typeof Be)throw new en(x);return ye=gu(ye),function(){return--ye>0&&(lt=Be.apply(this,arguments)),ye<=1&&(Be=q),lt}}var tg=Ja(function(ye,Be,lt){var Gt=1;if(lt.length){var it=Nc(lt,Qe(tg));Gt|=V}return vd(ye,Gt,Be,lt,it)}),ng=Ja(function(ye,Be,lt){var Gt=3;if(lt.length){var it=Nc(lt,Qe(ng));Gt|=V}return vd(Be,Gt,ye,lt,it)});function qg(ye,Be,lt){var Gt,it,Fn,tr,rn,Qr,ms=0,ns=!1,Ri=!1,Co=!0;if("function"!=typeof ye)throw new en(x);function ea(Hd){var c1=Gt,L1=it;return Gt=it=q,ms=Hd,tr=ye.apply(L1,c1)}function Ga(Hd){return ms=Hd,rn=qf(Ju,Be),ns?ea(Hd):tr}function za(Hd){var c1=Hd-Qr;return Qr===q||c1>=Be||c1<0||Ri&&Hd-ms>=Fn}function Ju(){var Hd=O1();if(za(Hd))return lc(Hd);rn=qf(Ju,function(Hd){var b6=Be-(Hd-Qr);return Ri?Al(b6,Fn-(Hd-ms)):b6}(Hd))}function lc(Hd){return rn=q,Co&&Gt?ea(Hd):(Gt=it=q,tr)}function tf(){var Hd=O1(),c1=za(Hd);if(Gt=arguments,it=this,Qr=Hd,c1){if(rn===q)return Ga(Qr);if(Ri)return Vn(rn),rn=qf(Ju,Be),ea(Qr)}return rn===q&&(rn=qf(Ju,Be)),tr}return Be=g0(Be)||0,Ol(lt)&&(ns=!!lt.leading,Fn=(Ri="maxWait"in lt)?nc(g0(lt.maxWait)||0,Be):Fn,Co="trailing"in lt?!!lt.trailing:Co),tf.cancel=function(){rn!==q&&Vn(rn),ms=0,Gt=Qr=it=rn=q},tf.flush=function(){return rn===q?tr:lc(O1())},tf}var kv=Ja(function(ye,Be){return T0(ye,1,Be)}),E8=Ja(function(ye,Be,lt){return T0(ye,g0(Be)||0,lt)});function Nm(ye,Be){if("function"!=typeof ye||null!=Be&&"function"!=typeof Be)throw new en(x);var lt=function(){var Gt=arguments,it=Be?Be.apply(this,Gt):Gt[0],Fn=lt.cache;if(Fn.has(it))return Fn.get(it);var tr=ye.apply(this,Gt);return lt.cache=Fn.set(it,tr)||Fn,tr};return lt.cache=new(Nm.Cache||Iu),lt}function rg(ye){if("function"!=typeof ye)throw new en(x);return function(){var Be=arguments;switch(Be.length){case 0:return!ye.call(this);case 1:return!ye.call(this,Be[0]);case 2:return!ye.call(this,Be[0],Be[1]);case 3:return!ye.call(this,Be[0],Be[1],Be[2])}return!ye.apply(this,Be)}}Nm.Cache=Iu;var Cv=Ha(function(ye,Be){var lt=(Be=1==Be.length&&xu(Be[0])?nr(Be[0],ka(ut())):nr(pc(Be,1),ka(ut()))).length;return Ja(function(Gt){for(var it=-1,Fn=Al(Gt.length,lt);++it=Be}),um=Sf(function(){return arguments}())?Sf:function(ye){return ad(ye)&&gi.call(ye,"callee")&&!id.call(ye,"callee")},xu=ii.isArray,Jg=Hu?ka(Hu):function(ye){return ad(ye)&&Zl(ye)==st};function m0(ye){return null!=ye&&R1(ye.length)&&!Dp(ye)}function Ud(ye){return ad(ye)&&m0(ye)}var i1=j0||D0,Yy=Pc?ka(Pc):function(ye){return ad(ye)&&Zl(ye)==le};function cm(ye){if(!ad(ye))return!1;var Be=Zl(ye);return Be==ne||"[object DOMException]"==Be||"string"==typeof ye.message&&"string"==typeof ye.name&&!lm(ye)}function Dp(ye){if(!Ol(ye))return!1;var Be=Zl(ye);return Be==pe||Be==_e||"[object AsyncFunction]"==Be||"[object Proxy]"==Be}function m2(ye){return"number"==typeof ye&&ye==gu(ye)}function R1(ye){return"number"==typeof ye&&ye>-1&&ye%1==0&&ye<=N}function Ol(ye){var Be=typeof ye;return null!=ye&&("object"==Be||"function"==Be)}function ad(ye){return null!=ye&&"object"==typeof ye}var sg=ru?ka(ru):function(ye){return ad(ye)&&or(ye)==xe};function Qh(ye){return"number"==typeof ye||ad(ye)&&Zl(ye)==Ce}function lm(ye){if(!ad(ye)||Zl(ye)!=me)return!1;var Be=zl(ye);if(null===Be)return!0;var lt=gi.call(Be,"constructor")&&Be.constructor;return"function"==typeof lt&< instanceof lt&&Ai.call(lt)==Fo}var ey=qd?ka(qd):function(ye){return ad(ye)&&Zl(ye)==Ve},jl=Wc?ka(Wc):function(ye){return ad(ye)&&or(ye)==nt};function Zc(ye){return"string"==typeof ye||!xu(ye)&&ad(ye)&&Zl(ye)==tt}function Ih(ye){return"symbol"==typeof ye||ad(ye)&&Zl(ye)==mt}var g2=nd?ka(nd):function(ye){return ad(ye)&&R1(ye.length)&&!!po[Zl(ye)]},Nv=ia(Gf),ag=ia(function(ye,Be){return ye<=Be});function ty(ye){if(!ye)return[];if(m0(ye))return Zc(ye)?Tl(ye):Mt(ye);if(zc&&ye[zc])return function(Or){for(var Ti,ii=[];!(Ti=Or.next()).done;)ii.push(Ti.value);return ii}(ye[zc]());var Be=or(ye);return(Be==xe?rd:Be==nt?Kd:th)(ye)}function Dl(ye){return ye?(ye=g0(ye))===D||ye===-D?17976931348623157e292*(ye<0?-1:1):ye==ye?ye:0:0===ye?ye:0}function gu(ye){var Be=Dl(ye),lt=Be%1;return Be==Be?lt?Be-lt:Be:0}function s1(ye){return ye?Kl(gu(ye),0,B):0}function g0(ye){if("number"==typeof ye)return ye;if(Ih(ye))return a;if(Ol(ye)){var Be="function"==typeof ye.valueOf?ye.valueOf():ye;ye=Ol(Be)?Be+"":Be}if("string"!=typeof ye)return 0===ye?ye:+ye;ye=fu(ye);var lt=wi.test(ye);return lt||$i.test(ye)?Os(ye.slice(2),lt?2:8):hi.test(ye)?a:+ye}function y2(ye){return Vt(ye,jd(ye))}function yc(ye){return null==ye?"":cn(ye)}var ny=yn(function(ye,Be){if(Jl(Be)||m0(Be))Vt(Be,Hl(Be),ye);else for(var lt in Be)gi.call(Be,lt)&&rc(ye,lt,Be[lt])}),ug=yn(function(ye,Be){Vt(Be,jd(Be),ye)}),Um=yn(function(ye,Be,lt,Gt){Vt(Be,jd(Be),ye,Gt)}),Qy=yn(function(ye,Be,lt,Gt){Vt(Be,Hl(Be),ye,Gt)}),eb=Ll(wh),ry=Ja(function(ye,Be){ye=Ia(ye);var lt=-1,Gt=Be.length,it=Gt>2?Be[2]:q;for(it&&eo(Be[0],Be[1],it)&&(Gt=1);++lt1),Fn}),Vt(ye,Se(ye),lt),Gt&&(lt=Sl(lt,7,S0));for(var it=Be.length;it--;)Rn(lt,Be[it]);return lt}),w2=Ll(function(ye,Be){return null==ye?{}:function(ye,Be){return Cf(ye,Be,function(lt,Gt){return Vm(ye,Gt)})}(ye,Be)});function dg(ye,Be){if(null==ye)return{};var lt=nr(Se(ye),function(Gt){return[Gt]});return Be=ut(Be),Cf(ye,lt,function(Gt,it){return Be(Gt,it[0])})}var kh=h0(Hl),sy=h0(jd);function th(ye){return null==ye?[]:Dr(ye,Hl(ye))}var Fv=ai(function(ye,Be,lt){return Be=Be.toLowerCase(),ye+(lt?ab(Be):Be)});function ab(ye){return Of(yc(ye).toLowerCase())}function hg(ye){return(ye=yc(ye))&&ye.replace(Xi,oa).replace(Wa,"")}var Lv=ai(function(ye,Be,lt){return ye+(lt?"-":"")+Be.toLowerCase()}),pg=ai(function(ye,Be,lt){return ye+(lt?" ":"")+Be.toLowerCase()}),cb=ci("toLowerCase"),Vv=ai(function(ye,Be,lt){return ye+(lt?"_":"")+Be.toLowerCase()}),fm=ai(function(ye,Be,lt){return ye+(lt?" ":"")+Of(Be)}),p6=ai(function(ye,Be,lt){return ye+(lt?" ":"")+Be.toUpperCase()}),Of=ci("toUpperCase");function M0(ye,Be,lt){return ye=yc(ye),(Be=lt?q:Be)===q?function(Or){return ua.test(Or)}(ye)?function(Or){return Or.match(ou)||[]}(ye):function(Or){return Or.match(br)||[]}(ye):ye.match(Be)||[]}var $v=Ja(function(ye,Be){try{return Ea(ye,q,Be)}catch(lt){return cm(lt)?lt:new da(lt)}}),mg=Ll(function(ye,Be){return Ut(Be,function(lt){lt=_a(lt),Hf(ye,lt,tg(ye[lt],ye))}),ye});function Fc(ye){return function(){return ye}}var g6=es(),lb=es(!0);function O0(ye){return ye}function ya(ye){return xp("function"==typeof ye?ye:Sl(ye,1))}var hm=Ja(function(ye,Be){return function(lt){return qc(lt,ye,Be)}}),ly=Ja(function(ye,Be){return function(lt){return qc(ye,lt,Be)}});function bg(ye,Be,lt){var Gt=Hl(Be),it=Mo(Be,Gt);null==lt&&(!Ol(Be)||!it.length&&Gt.length)&&(lt=Be,Be=ye,ye=this,it=Mo(Be,Hl(Be)));var Fn=!(Ol(lt)&&"chain"in lt&&!lt.chain),tr=Dp(ye);return Ut(it,function(rn){var Qr=Be[rn];ye[rn]=Qr,tr&&(ye.prototype[rn]=function(){var ms=this.__chain__;if(Fn||ms){var ns=ye(this.__wrapped__),Ri=ns.__actions__=Mt(this.__actions__);return Ri.push({func:Qr,args:arguments,thisArg:ye}),ns.__chain__=ms,ns}return Qr.apply(ye,pi([this.value()],arguments))})}),ye}function fy(){}var $m=Us(nr),Wm=Us(et),I2=Us(Ws);function Df(ye){return Wu(ye)?Rc(_a(ye)):function(ye){return function(Be){return yd(Be,ye)}}(ye)}var y6=ao(),Gv=ao(!0);function vg(){return[]}function D0(){return!1}var Xl=Zs(function(ye,Be){return ye+Be},0),Vd=od("ceil"),S2=Zs(function(ye,Be){return ye/Be},1),k2=od("floor"),M2=Zs(function(ye,Be){return ye*Be},1),qm=od("round"),wg=Zs(function(ye,Be){return ye-Be},0);return mn.after=function(ye,Be){if("function"!=typeof Be)throw new en(x);return ye=gu(ye),function(){if(--ye<1)return Be.apply(this,arguments)}},mn.ary=Gg,mn.assign=ny,mn.assignIn=ug,mn.assignInWith=Um,mn.assignWith=Qy,mn.at=eb,mn.before=zg,mn.bind=tg,mn.bindAll=mg,mn.bindKey=ng,mn.castArray=function(){if(!arguments.length)return[];var ye=arguments[0];return xu(ye)?ye:[ye]},mn.chain=Ta,mn.chunk=function(ye,Be,lt){Be=(lt?eo(ye,Be,lt):Be===q)?1:nc(gu(Be),0);var Gt=null==ye?0:ye.length;if(!Gt||Be<1)return[];for(var it=0,Fn=0,tr=ii(hd(Gt/Be));itit?0:it+lt),(Gt=Gt===q||Gt>it?it:gu(Gt))<0&&(Gt+=it),Gt=lt>Gt?0:s1(Gt);lt>>0)?(ye=yc(ye))&&("string"==typeof Be||null!=Be&&!ey(Be))&&!(Be=cn(Be))&&tc(ye)?Ba(Tl(ye),0,lt):ye.split(Be,lt):[]},mn.spread=function(ye,Be){if("function"!=typeof ye)throw new en(x);return Be=null==Be?0:nc(gu(Be),0),Ja(function(lt){var Gt=lt[Be],it=Ba(lt,0,Be);return Gt&&pi(it,Gt),Ea(ye,this,it)})},mn.tail=function(ye){var Be=null==ye?0:ye.length;return Be?We(ye,1,Be):[]},mn.take=function(ye,Be,lt){return ye&&ye.length?We(ye,0,(Be=lt||Be===q?1:gu(Be))<0?0:Be):[]},mn.takeRight=function(ye,Be,lt){var Gt=null==ye?0:ye.length;return Gt?We(ye,(Be=Gt-(Be=lt||Be===q?1:gu(Be)))<0?0:Be,Gt):[]},mn.takeRightWhile=function(ye,Be){return ye&&ye.length?jr(ye,ut(Be,3),!1,!0):[]},mn.takeWhile=function(ye,Be){return ye&&ye.length?jr(ye,ut(Be,3)):[]},mn.tap=function(ye,Be){return Be(ye),ye},mn.throttle=function(ye,Be,lt){var Gt=!0,it=!0;if("function"!=typeof ye)throw new en(x);return Ol(lt)&&(Gt="leading"in lt?!!lt.leading:Gt,it="trailing"in lt?!!lt.trailing:it),qg(ye,Be,{leading:Gt,maxWait:Be,trailing:it})},mn.thru=bl,mn.toArray=ty,mn.toPairs=kh,mn.toPairsIn=sy,mn.toPath=function(ye){return xu(ye)?nr(ye,_a):Ih(ye)?[ye]:Mt(n1(yc(ye)))},mn.toPlainObject=y2,mn.transform=function(ye,Be,lt){var Gt=xu(ye),it=Gt||i1(ye)||g2(ye);if(Be=ut(Be,4),null==lt){var Fn=ye&&ye.constructor;lt=it?Gt?new Fn:[]:Ol(ye)&&Dp(Fn)?$0(zl(ye)):{}}return(it?Ut:Yn)(ye,function(tr,rn,Qr){return Be(lt,tr,rn,Qr)}),lt},mn.unary=function(ye){return Gg(ye,1)},mn.union=Oc,mn.unionBy=Gi,mn.unionWith=Ls,mn.uniq=function(ye){return ye&&ye.length?In(ye):[]},mn.uniqBy=function(ye,Be){return ye&&ye.length?In(ye,ut(Be,2)):[]},mn.uniqWith=function(ye,Be){return Be="function"==typeof Be?Be:q,ye&&ye.length?In(ye,q,Be):[]},mn.unset=function(ye,Be){return null==ye||Rn(ye,Be)},mn.unzip=X2,mn.unzipWith=Zh,mn.update=function(ye,Be,lt){return null==ye?ye:hr(ye,Be,Wo(lt))},mn.updateWith=function(ye,Be,lt,Gt){return Gt="function"==typeof Gt?Gt:q,null==ye?ye:hr(ye,Be,Wo(lt),Gt)},mn.values=th,mn.valuesIn=function(ye){return null==ye?[]:Dr(ye,jd(ye))},mn.without=kp,mn.words=M0,mn.wrap=function(ye,Be){return Bm(Wo(Be),ye)},mn.xor=Jb,mn.xorBy=Yh,mn.xorWith=Q2,mn.zip=mu,mn.zipObject=function(ye,Be){return Nr(ye||[],Be||[],rc)},mn.zipObjectDeep=function(ye,Be){return Nr(ye||[],Be||[],Je)},mn.zipWith=Su,mn.entries=kh,mn.entriesIn=sy,mn.extend=ug,mn.extendWith=Um,bg(mn,mn),mn.add=Xl,mn.attempt=$v,mn.camelCase=Fv,mn.capitalize=ab,mn.ceil=Vd,mn.clamp=function(ye,Be,lt){return lt===q&&(lt=Be,Be=q),lt!==q&&(lt=(lt=g0(lt))==lt?lt:0),Be!==q&&(Be=(Be=g0(Be))==Be?Be:0),Kl(g0(ye),Be,lt)},mn.clone=function(ye){return Sl(ye,4)},mn.cloneDeep=function(ye){return Sl(ye,5)},mn.cloneDeepWith=function(ye,Be){return Sl(ye,5,Be="function"==typeof Be?Be:q)},mn.cloneWith=function(ye,Be){return Sl(ye,4,Be="function"==typeof Be?Be:q)},mn.conformsTo=function(ye,Be){return null==Be||Pd(ye,Be,Hl(Be))},mn.deburr=hg,mn.defaultTo=function(ye,Be){return null==ye||ye!=ye?Be:ye},mn.divide=S2,mn.endsWith=function(ye,Be,lt){ye=yc(ye),Be=cn(Be);var Gt=ye.length,it=lt=lt===q?Gt:Kl(gu(lt),0,Gt);return(lt-=Be.length)>=0&&ye.slice(lt,it)==Be},mn.eq=Ah,mn.escape=function(ye){return(ye=yc(ye))&&Wr.test(ye)?ye.replace(Ln,Bo):ye},mn.escapeRegExp=function(ye){return(ye=yc(ye))&&ir.test(ye)?ye.replace(Un,"\\$&"):ye},mn.every=function(ye,Be,lt){var Gt=xu(ye)?et:c0;return lt&&eo(ye,Be,lt)&&(Be=q),Gt(ye,ut(Be,3))},mn.find=eg,mn.findIndex=pt,mn.findKey=function(ye,Be){return lo(ye,ut(Be,3),Yn)},mn.findLast=Qb,mn.findLastIndex=vt,mn.findLastKey=function(ye,Be){return lo(ye,ut(Be,3),Jd)},mn.floor=k2,mn.forEach=e6,mn.forEachRight=Tv,mn.forIn=function(ye,Be){return null==ye?ye:Wf(ye,ut(Be,3),jd)},mn.forInRight=function(ye,Be){return null==ye?ye:w1(ye,ut(Be,3),jd)},mn.forOwn=function(ye,Be){return ye&&Yn(ye,ut(Be,3))},mn.forOwnRight=function(ye,Be){return ye&&Jd(ye,ut(Be,3))},mn.get=_2,mn.gt=Ky,mn.gte=Zy,mn.has=function(ye,Be){return null!=ye&&oi(ye,Be,No)},mn.hasIn=Vm,mn.head=Vr,mn.identity=O0,mn.includes=function(ye,Be,lt,Gt){ye=m0(ye)?ye:th(ye),lt=lt&&!Gt?gu(lt):0;var it=ye.length;return lt<0&&(lt=nc(it+lt,0)),Zc(ye)?lt<=it&&ye.indexOf(Be,lt)>-1:!!it&&Ka(ye,Be,lt)>-1},mn.indexOf=function(ye,Be,lt){var Gt=null==ye?0:ye.length;if(!Gt)return-1;var it=null==lt?0:gu(lt);return it<0&&(it=nc(Gt+it,0)),Ka(ye,Be,it)},mn.inRange=function(ye,Be,lt){return Be=Dl(Be),lt===q?(lt=Be,Be=0):lt=Dl(lt),function(ye,Be,lt){return ye>=Al(Be,lt)&&ye=-N&&ye<=N},mn.isSet=jl,mn.isString=Zc,mn.isSymbol=Ih,mn.isTypedArray=g2,mn.isUndefined=function(ye){return ye===q},mn.isWeakMap=function(ye){return ad(ye)&&or(ye)==wt},mn.isWeakSet=function(ye){return ad(ye)&&"[object WeakSet]"==Zl(ye)},mn.join=function(ye,Be){return null==ye?"":bh.call(ye,Be)},mn.kebabCase=Lv,mn.last=Lo,mn.lastIndexOf=function(ye,Be,lt){var Gt=null==ye?0:ye.length;if(!Gt)return-1;var it=Gt;return lt!==q&&(it=(it=gu(lt))<0?nc(Gt+it,0):Al(it,Gt-1)),Be==Be?function(Or,Ti,ii){for(var to=ii+1;to--;)if(Or[to]===Ti)return to;return to}(ye,Be,it):qs(ye,dl,it,!0)},mn.lowerCase=pg,mn.lowerFirst=cb,mn.lt=Nv,mn.lte=ag,mn.max=function(ye){return ye&&ye.length?yr(ye,O0,A0):q},mn.maxBy=function(ye,Be){return ye&&ye.length?yr(ye,ut(Be,2),A0):q},mn.mean=function(ye){return Gc(ye,O0)},mn.meanBy=function(ye,Be){return Gc(ye,ut(Be,2))},mn.min=function(ye){return ye&&ye.length?yr(ye,O0,Gf):q},mn.minBy=function(ye,Be){return ye&&ye.length?yr(ye,ut(Be,2),Gf):q},mn.stubArray=vg,mn.stubFalse=D0,mn.stubObject=function(){return{}},mn.stubString=function(){return""},mn.stubTrue=function(){return!0},mn.multiply=M2,mn.nth=function(ye,Be){return ye&&ye.length?q0(ye,gu(Be)):q},mn.noConflict=function(){return Rs._===this&&(Rs._=Sa),this},mn.noop=fy,mn.now=O1,mn.pad=function(ye,Be,lt){ye=yc(ye);var Gt=(Be=gu(Be))?dd(ye):0;if(!Be||Gt>=Be)return ye;var it=(Be-Gt)/2;return io(Ad(it),lt)+ye+io(hd(it),lt)},mn.padEnd=function(ye,Be,lt){ye=yc(ye);var Gt=(Be=gu(Be))?dd(ye):0;return Be&&GtBe){var Gt=ye;ye=Be,Be=Gt}if(lt||ye%1||Be%1){var it=df();return Al(ye+it*(Be-ye+Ei("1e-"+((it+"").length-1))),Be)}return K0(ye,Be)},mn.reduce=function(ye,Be,lt){var Gt=xu(ye)?xi:ga,it=arguments.length<3;return Gt(ye,ut(Be,4),lt,it,$f)},mn.reduceRight=function(ye,Be,lt){var Gt=xu(ye)?hs:ga,it=arguments.length<3;return Gt(ye,ut(Be,4),lt,it,vp)},mn.repeat=function(ye,Be,lt){return Be=(lt?eo(ye,Be,lt):Be===q)?1:gu(Be),zf(yc(ye),Be)},mn.replace=function(){var ye=arguments,Be=yc(ye[0]);return ye.length<3?Be:Be.replace(ye[1],ye[2])},mn.result=function(ye,Be,lt){var Gt=-1,it=(Be=Go(Be,ye)).length;for(it||(it=1,ye=q);++GtN)return[];var lt=B,Gt=Al(ye,B);Be=ut(Be),ye-=B;for(var it=wf(Gt,Be);++lt=Fn)return ye;var rn=lt-dd(Gt);if(rn<1)return Gt;var Qr=tr?Ba(tr,0,rn).join(""):ye.slice(0,rn);if(it===q)return Qr+Gt;if(tr&&(rn+=Qr.length-rn),ey(it)){if(ye.slice(rn).search(it)){var ms,ns=Qr;for(it.global||(it=jh(it.source,yc(Fr.exec(it))+"g")),it.lastIndex=0;ms=it.exec(ns);)var Ri=ms.index;Qr=Qr.slice(0,Ri===q?rn:Ri)}}else if(ye.indexOf(cn(it),rn)!=rn){var Co=Qr.lastIndexOf(it);Co>-1&&(Qr=Qr.slice(0,Co))}return Qr+Gt},mn.unescape=function(ye){return(ye=yc(ye))&&Bn.test(ye)?ye.replace(Jr,gh):ye},mn.uniqueId=function(ye){var Be=++Bs;return yc(ye)+Be},mn.upperCase=p6,mn.upperFirst=Of,mn.each=e6,mn.eachRight=Tv,mn.first=Vr,bg(mn,function(){var ye={};return Yn(mn,function(Be,lt){gi.call(mn.prototype,lt)||(ye[lt]=Be)}),ye}(),{chain:!1}),mn.VERSION="4.17.21",Ut(["bind","bindKey","curry","curryRight","partial","partialRight"],function(ye){mn[ye].placeholder=mn}),Ut(["drop","take"],function(ye,Be){_u.prototype[ye]=function(lt){lt=lt===q?1:nc(gu(lt),0);var Gt=this.__filtered__&&!Be?new _u(this):this.clone();return Gt.__filtered__?Gt.__takeCount__=Al(lt,Gt.__takeCount__):Gt.__views__.push({size:Al(lt,B),type:ye+(Gt.__dir__<0?"Right":"")}),Gt},_u.prototype[ye+"Right"]=function(lt){return this.reverse()[ye](lt).reverse()}}),Ut(["filter","map","takeWhile"],function(ye,Be){var lt=Be+1,Gt=1==lt||3==lt;_u.prototype[ye]=function(it){var Fn=this.clone();return Fn.__iteratees__.push({iteratee:ut(it,3),type:lt}),Fn.__filtered__=Fn.__filtered__||Gt,Fn}}),Ut(["head","last"],function(ye,Be){var lt="take"+(Be?"Right":"");_u.prototype[ye]=function(){return this[lt](1).value()[0]}}),Ut(["initial","tail"],function(ye,Be){var lt="drop"+(Be?"":"Right");_u.prototype[ye]=function(){return this.__filtered__?new _u(this):this[lt](1)}}),_u.prototype.compact=function(){return this.filter(O0)},_u.prototype.find=function(ye){return this.filter(ye).head()},_u.prototype.findLast=function(ye){return this.reverse().find(ye)},_u.prototype.invokeMap=Ja(function(ye,Be){return"function"==typeof ye?new _u(this):this.map(function(lt){return qc(lt,ye,Be)})}),_u.prototype.reject=function(ye){return this.filter(rg(ut(ye)))},_u.prototype.slice=function(ye,Be){ye=gu(ye);var lt=this;return lt.__filtered__&&(ye>0||Be<0)?new _u(lt):(ye<0?lt=lt.takeRight(-ye):ye&&(lt=lt.drop(ye)),Be!==q&&(lt=(Be=gu(Be))<0?lt.dropRight(-Be):lt.take(Be-ye)),lt)},_u.prototype.takeRightWhile=function(ye){return this.reverse().takeWhile(ye).reverse()},_u.prototype.toArray=function(){return this.take(B)},Yn(_u.prototype,function(ye,Be){var lt=/^(?:filter|find|map|reject)|While$/.test(Be),Gt=/^(?:head|last)$/.test(Be),it=mn[Gt?"take"+("last"==Be?"Right":""):Be],Fn=Gt||/^find/.test(Be);!it||(mn.prototype[Be]=function(){var tr=this.__wrapped__,rn=Gt?[1]:arguments,Qr=tr instanceof _u,ms=rn[0],ns=Qr||xu(tr),Ri=function(Ju){var lc=it.apply(mn,pi([Ju],rn));return Gt&&Co?lc[0]:lc};ns&<&&"function"==typeof ms&&1!=ms.length&&(Qr=ns=!1);var Co=this.__chain__,ea=!!this.__actions__.length,Ga=Fn&&!Co,uu=Qr&&!ea;if(!Fn&&ns){tr=uu?tr:new _u(this);var za=ye.apply(tr,rn);return za.__actions__.push({func:bl,args:[Ri],thisArg:q}),new sd(za,Co)}return Ga&&uu?ye.apply(this,rn):(za=this.thru(Ri),Ga?Gt?za.value()[0]:za.value():za)})}),Ut(["pop","push","shift","sort","splice","unshift"],function(ye){var Be=Dn[ye],lt=/^(?:push|sort|unshift)$/.test(ye)?"tap":"thru",Gt=/^(?:pop|shift)$/.test(ye);mn.prototype[ye]=function(){var it=arguments;if(Gt&&!this.__chain__){var Fn=this.value();return Be.apply(xu(Fn)?Fn:[],it)}return this[lt](function(tr){return Be.apply(xu(tr)?tr:[],it)})}}),Yn(_u.prototype,function(ye,Be){var lt=mn[Be];if(lt){var Gt=lt.name+"";gi.call(Id,Gt)||(Id[Gt]=[]),Id[Gt].push({name:Be,func:lt})}}),Id[Ds(q,2).name]=[{name:"wrapper",func:q}],_u.prototype.clone=function(){var ye=new _u(this.__wrapped__);return ye.__actions__=Mt(this.__actions__),ye.__dir__=this.__dir__,ye.__filtered__=this.__filtered__,ye.__iteratees__=Mt(this.__iteratees__),ye.__takeCount__=this.__takeCount__,ye.__views__=Mt(this.__views__),ye},_u.prototype.reverse=function(){if(this.__filtered__){var ye=new _u(this);ye.__dir__=-1,ye.__filtered__=!0}else(ye=this.clone()).__dir__*=-1;return ye},_u.prototype.value=function(){var ye=this.__wrapped__.value(),Be=this.__dir__,lt=xu(ye),Gt=Be<0,it=lt?ye.length:0,Fn=function(ye,Be,lt){for(var Gt=-1,it=lt.length;++Gt=this.__values__.length;return{done:ye,value:ye?q:this.__values__[this.__index__++]}},mn.prototype.plant=function(ye){for(var Be,lt=this;lt instanceof Cd;){var Gt=Qd(lt);Gt.__index__=0,Gt.__values__=q,Be?it.__wrapped__=Gt:Be=Gt;var it=Gt;lt=lt.__wrapped__}return it.__wrapped__=ye,Be},mn.prototype.reverse=function(){var ye=this.__wrapped__;if(ye instanceof _u){var Be=ye;return this.__actions__.length&&(Be=new _u(this)),(Be=Be.reverse()).__actions__.push({func:bl,args:[Y0],thisArg:q}),new sd(Be,this.__chain__)}return this.thru(Y0)},mn.prototype.toJSON=mn.prototype.valueOf=mn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},mn.prototype.first=mn.prototype.head,zc&&(mn.prototype[zc]=function(){return this}),mn}();Rs._=Ca,(ie=function(){return Ca}.call(be,Y,be,bt))!==q&&(bt.exports=ie)}.call(this)},53264:(bt,be,Y)=>{"use strict";var ie=Y(59879),q=Y(5414),O=Y(55859).Buffer,E=new Array(16);function d(){q.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function x(l,h){return l<>>32-h}function f(l,h,u,m,_,w,S){return x(l+(h&u|~h&m)+_+w|0,S)+h|0}function T(l,h,u,m,_,w,S){return x(l+(h&m|u&~m)+_+w|0,S)+h|0}function g(l,h,u,m,_,w,S){return x(l+(h^u^m)+_+w|0,S)+h|0}function b(l,h,u,m,_,w,S){return x(l+(u^(h|~m))+_+w|0,S)+h|0}ie(d,q),d.prototype._update=function(){for(var l=E,h=0;h<16;++h)l[h]=this._block.readInt32LE(4*h);var u=this._a,m=this._b,_=this._c,w=this._d;u=f(u,m,_,w,l[0],3614090360,7),w=f(w,u,m,_,l[1],3905402710,12),_=f(_,w,u,m,l[2],606105819,17),m=f(m,_,w,u,l[3],3250441966,22),u=f(u,m,_,w,l[4],4118548399,7),w=f(w,u,m,_,l[5],1200080426,12),_=f(_,w,u,m,l[6],2821735955,17),m=f(m,_,w,u,l[7],4249261313,22),u=f(u,m,_,w,l[8],1770035416,7),w=f(w,u,m,_,l[9],2336552879,12),_=f(_,w,u,m,l[10],4294925233,17),m=f(m,_,w,u,l[11],2304563134,22),u=f(u,m,_,w,l[12],1804603682,7),w=f(w,u,m,_,l[13],4254626195,12),_=f(_,w,u,m,l[14],2792965006,17),u=T(u,m=f(m,_,w,u,l[15],1236535329,22),_,w,l[1],4129170786,5),w=T(w,u,m,_,l[6],3225465664,9),_=T(_,w,u,m,l[11],643717713,14),m=T(m,_,w,u,l[0],3921069994,20),u=T(u,m,_,w,l[5],3593408605,5),w=T(w,u,m,_,l[10],38016083,9),_=T(_,w,u,m,l[15],3634488961,14),m=T(m,_,w,u,l[4],3889429448,20),u=T(u,m,_,w,l[9],568446438,5),w=T(w,u,m,_,l[14],3275163606,9),_=T(_,w,u,m,l[3],4107603335,14),m=T(m,_,w,u,l[8],1163531501,20),u=T(u,m,_,w,l[13],2850285829,5),w=T(w,u,m,_,l[2],4243563512,9),_=T(_,w,u,m,l[7],1735328473,14),u=g(u,m=T(m,_,w,u,l[12],2368359562,20),_,w,l[5],4294588738,4),w=g(w,u,m,_,l[8],2272392833,11),_=g(_,w,u,m,l[11],1839030562,16),m=g(m,_,w,u,l[14],4259657740,23),u=g(u,m,_,w,l[1],2763975236,4),w=g(w,u,m,_,l[4],1272893353,11),_=g(_,w,u,m,l[7],4139469664,16),m=g(m,_,w,u,l[10],3200236656,23),u=g(u,m,_,w,l[13],681279174,4),w=g(w,u,m,_,l[0],3936430074,11),_=g(_,w,u,m,l[3],3572445317,16),m=g(m,_,w,u,l[6],76029189,23),u=g(u,m,_,w,l[9],3654602809,4),w=g(w,u,m,_,l[12],3873151461,11),_=g(_,w,u,m,l[15],530742520,16),u=b(u,m=g(m,_,w,u,l[2],3299628645,23),_,w,l[0],4096336452,6),w=b(w,u,m,_,l[7],1126891415,10),_=b(_,w,u,m,l[14],2878612391,15),m=b(m,_,w,u,l[5],4237533241,21),u=b(u,m,_,w,l[12],1700485571,6),w=b(w,u,m,_,l[3],2399980690,10),_=b(_,w,u,m,l[10],4293915773,15),m=b(m,_,w,u,l[1],2240044497,21),u=b(u,m,_,w,l[8],1873313359,6),w=b(w,u,m,_,l[15],4264355552,10),_=b(_,w,u,m,l[6],2734768916,15),m=b(m,_,w,u,l[13],1309151649,21),u=b(u,m,_,w,l[4],4149444226,6),w=b(w,u,m,_,l[11],3174756917,10),_=b(_,w,u,m,l[2],718787259,15),m=b(m,_,w,u,l[9],3951481745,21),this._a=this._a+u|0,this._b=this._b+m|0,this._c=this._c+_|0,this._d=this._d+w|0},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var l=O.allocUnsafe(16);return l.writeInt32LE(this._a,0),l.writeInt32LE(this._b,4),l.writeInt32LE(this._c,8),l.writeInt32LE(this._d,12),l},bt.exports=d},14398:(bt,be,Y)=>{var ie=Y(31770),q=Y(34761);function O(E){this.rand=E||new q.Rand}bt.exports=O,O.create=function(d){return new O(d)},O.prototype._randbelow=function(d){var x=d.bitLength(),f=Math.ceil(x/8);do{var T=new ie(this.rand.generate(f))}while(T.cmp(d)>=0);return T},O.prototype._randrange=function(d,x){var f=x.sub(d);return d.add(this._randbelow(f))},O.prototype.test=function(d,x,f){var T=d.bitLength(),g=ie.mont(d),b=new ie(1).toRed(g);x||(x=Math.max(1,T/48|0));for(var l=d.subn(1),h=0;!l.testn(h);h++);for(var u=d.shrn(h),m=l.toRed(g);x>0;x--){var w=this._randrange(new ie(2),l);f&&f(w);var S=w.toRed(g).redPow(u);if(0!==S.cmp(b)&&0!==S.cmp(m)){for(var I=1;I0;x--){var m=this._randrange(new ie(2),b),_=d.gcd(m);if(0!==_.cmpn(1))return _;var w=m.toRed(T).redPow(h);if(0!==w.cmp(g)&&0!==w.cmp(u)){for(var S=1;S=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Jr=0|k[3],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|k[4],zn=8191&Wr,bn=Wr>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,zn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,zn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,zn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,zn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,zn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,zn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,zn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,zn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,zn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,zn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,zn),a=(a=Math.imul(St,bn))+Math.imul(Wt,zn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},86055:bt=>{function be(Y,ie){if(!Y)throw new Error(ie||"Assertion failed")}bt.exports=be,be.equal=function(ie,q,O){if(ie!=q)throw new Error(O||"Assertion failed: "+ie+" != "+q)}},14869:(bt,be)=>{"use strict";var Y=be;function q(E){return 1===E.length?"0"+E:E}function O(E){for(var d="",x=0;x>8,b=255&T;g?x.push(g,b):x.push(b)}return x},Y.zero2=q,Y.toHex=O,Y.encode=function(d,x){return"hex"===x?O(d):d}},81380:(bt,be,Y)=>{var ie="function"==typeof Map&&Map.prototype,q=Object.getOwnPropertyDescriptor&&ie?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,O=ie&&q&&"function"==typeof q.get?q.get:null,E=ie&&Map.prototype.forEach,d="function"==typeof Set&&Set.prototype,x=Object.getOwnPropertyDescriptor&&d?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,f=d&&x&&"function"==typeof x.get?x.get:null,T=d&&Set.prototype.forEach,b="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,w=Object.prototype.toString,S=Function.prototype.toString,I=String.prototype.match,P=String.prototype.slice,L=String.prototype.replace,V=String.prototype.toUpperCase,W=String.prototype.toLowerCase,G=RegExp.prototype.test,H=Array.prototype.concat,j=Array.prototype.join,K=Array.prototype.slice,R=Math.floor,o="function"==typeof BigInt?BigInt.prototype.valueOf:null,y=Object.getOwnPropertySymbols,M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,v="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol,1)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(It){return It.__proto__}:null);function C(It,qt){if(It===1/0||It===-1/0||It!=It||It&&It>-1e3&&It<1e3||G.call(/e/,qt))return qt;var jt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof It){var Yt=It<0?-R(-It):R(It);if(Yt!==It){var Wn=String(Yt),fn=P.call(qt,Wn.length+1);return L.call(Wn,jt,"$&_")+"."+L.call(L.call(fn,/([0-9]{3})/g,"$&_"),/_$/,"")}}return L.call(qt,jt,"$&_")}var a=Y(24654),B=a.custom,Q=pe(B)?B:null;function ee(It,qt,jt){var Yt="double"===(jt.quoteStyle||qt)?'"':"'";return Yt+It+Yt}function ce(It){return L.call(String(It),/"/g,""")}function ue(It){return!("[object Array]"!==ke(It)||k&&"object"==typeof It&&k in It)}function ae(It){return!("[object RegExp]"!==ke(It)||k&&"object"==typeof It&&k in It)}function pe(It){if(v)return It&&"object"==typeof It&&It instanceof Symbol;if("symbol"==typeof It)return!0;if(!It||"object"!=typeof It||!M)return!1;try{return M.call(It),!0}catch{}return!1}bt.exports=function It(qt,jt,Yt,Wn){var fn=jt||{};if(Ce(fn,"quoteStyle")&&"single"!==fn.quoteStyle&&"double"!==fn.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ce(fn,"maxStringLength")&&("number"==typeof fn.maxStringLength?fn.maxStringLength<0&&fn.maxStringLength!==1/0:null!==fn.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var $n=!Ce(fn,"customInspect")||fn.customInspect;if("boolean"!=typeof $n&&"symbol"!==$n)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ce(fn,"indent")&&null!==fn.indent&&"\t"!==fn.indent&&!(parseInt(fn.indent,10)===fn.indent&&fn.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ce(fn,"numericSeparator")&&"boolean"!=typeof fn.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Jr=fn.numericSeparator;if(void 0===qt)return"undefined";if(null===qt)return"null";if("boolean"==typeof qt)return qt?"true":"false";if("string"==typeof qt)return wt(qt,fn);if("number"==typeof qt){if(0===qt)return 1/0/qt>0?"0":"-0";var Ln=String(qt);return Jr?C(qt,Ln):Ln}if("bigint"==typeof qt){var Bn=String(qt)+"n";return Jr?C(qt,Bn):Bn}var Wr=void 0===fn.depth?5:fn.depth;if(void 0===Yt&&(Yt=0),Yt>=Wr&&Wr>0&&"object"==typeof qt)return ue(qt)?"[Array]":"[Object]";var zn=function(It,qt){var jt;if("\t"===It.indent)jt="\t";else{if(!("number"==typeof It.indent&&It.indent>0))return null;jt=j.call(Array(It.indent+1)," ")}return{base:jt,prev:j.call(Array(qt+1),jt)}}(fn,Yt);if(void 0===Wn)Wn=[];else if(Ee(Wn,qt)>=0)return"[Circular]";function bn(hi,wi,cs){if(wi&&(Wn=K.call(Wn)).push(wi),cs){var $i={depth:fn.depth};return Ce(fn,"quoteStyle")&&($i.quoteStyle=fn.quoteStyle),It(hi,$i,Yt+1,Wn)}return It(hi,fn,Yt+1,Wn)}if("function"==typeof qt&&!ae(qt)){var Lr=function(It){if(It.name)return It.name;var qt=I.call(S.call(It),/^function\s*([\w$]+)/);return qt?qt[1]:null}(qt),Kn=Nt(qt,bn);return"[Function"+(Lr?": "+Lr:" (anonymous)")+"]"+(Kn.length>0?" { "+j.call(Kn,", ")+" }":"")}if(pe(qt)){var sr=v?L.call(String(qt),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(qt);return"object"!=typeof qt||v?sr:st(sr)}if(function(It){return!(!It||"object"!=typeof It)&&("undefined"!=typeof HTMLElement&&It instanceof HTMLElement||"string"==typeof It.nodeName&&"function"==typeof It.getAttribute)}(qt)){for(var Ii="<"+W.call(String(qt.nodeName)),Un=qt.attributes||[],ir=0;ir"}if(ue(qt)){if(0===qt.length)return"[]";var ts=Nt(qt,bn);return zn&&!function(It){for(var qt=0;qt=0)return!1;return!0}(ts)?"["+dn(ts,zn)+"]":"[ "+j.call(ts,", ")+" ]"}if(function(It){return!("[object Error]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt)){var Tn=Nt(qt,bn);return"cause"in Error.prototype||!("cause"in qt)||D.call(qt,"cause")?0===Tn.length?"["+String(qt)+"]":"{ ["+String(qt)+"] "+j.call(Tn,", ")+" }":"{ ["+String(qt)+"] "+j.call(H.call("[cause]: "+bn(qt.cause),Tn),", ")+" }"}if("object"==typeof qt&&$n){if(Q&&"function"==typeof qt[Q]&&a)return a(qt,{depth:Wr-Yt});if("symbol"!==$n&&"function"==typeof qt.inspect)return qt.inspect()}if(function(It){if(!O||!It||"object"!=typeof It)return!1;try{O.call(It);try{f.call(It)}catch{return!0}return It instanceof Map}catch{}return!1}(qt)){var Qn=[];return E&&E.call(qt,function(hi,wi){Qn.push(bn(wi,qt,!0)+" => "+bn(hi,qt))}),gt("Map",O.call(qt),Qn,zn)}if(function(It){if(!f||!It||"object"!=typeof It)return!1;try{f.call(It);try{O.call(It)}catch{return!0}return It instanceof Set}catch{}return!1}(qt)){var Vi=[];return T&&T.call(qt,function(hi){Vi.push(bn(hi,qt))}),gt("Set",f.call(qt),Vi,zn)}if(function(It){if(!b||!It||"object"!=typeof It)return!1;try{b.call(It,b);try{h.call(It,h)}catch{return!0}return It instanceof WeakMap}catch{}return!1}(qt))return Ye("WeakMap");if(function(It){if(!h||!It||"object"!=typeof It)return!1;try{h.call(It,h);try{b.call(It,b)}catch{return!0}return It instanceof WeakSet}catch{}return!1}(qt))return Ye("WeakSet");if(function(It){if(!m||!It||"object"!=typeof It)return!1;try{return m.call(It),!0}catch{}return!1}(qt))return Ye("WeakRef");if(function(It){return!("[object Number]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt))return st(bn(Number(qt)));if(function(It){if(!It||"object"!=typeof It||!o)return!1;try{return o.call(It),!0}catch{}return!1}(qt))return st(bn(o.call(qt)));if(function(It){return!("[object Boolean]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt))return st(_.call(qt));if(function(It){return!("[object String]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt))return st(bn(String(qt)));if(!function(It){return!("[object Date]"!==ke(It)||k&&"object"==typeof It&&k in It)}(qt)&&!ae(qt)){var ar=Nt(qt,bn),br=N?N(qt)===Object.prototype:qt instanceof Object||qt.constructor===Object,ki=qt instanceof Object?"":"null prototype",ur=!br&&k&&Object(qt)===qt&&k in qt?P.call(ke(qt),8,-1):ki?"Object":"",Fr=(br||"function"!=typeof qt.constructor?"":qt.constructor.name?qt.constructor.name+" ":"")+(ur||ki?"["+j.call(H.call([],ur||[],ki||[]),": ")+"] ":"");return 0===ar.length?Fr+"{}":zn?Fr+"{"+dn(ar,zn)+"}":Fr+"{ "+j.call(ar,", ")+" }"}return String(qt)};var xe=Object.prototype.hasOwnProperty||function(It){return It in this};function Ce(It,qt){return xe.call(It,qt)}function ke(It){return w.call(It)}function Ee(It,qt){if(It.indexOf)return It.indexOf(qt);for(var jt=0,Yt=It.length;jtqt.maxStringLength){var jt=It.length-qt.maxStringLength,Yt="... "+jt+" more character"+(jt>1?"s":"");return wt(P.call(It,0,qt.maxStringLength),qt)+Yt}return ee(L.call(L.call(It,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Pt),"single",qt)}function Pt(It){var qt=It.charCodeAt(0),jt={8:"b",9:"t",10:"n",12:"f",13:"r"}[qt];return jt?"\\"+jt:"\\x"+(qt<16?"0":"")+V.call(qt.toString(16))}function st(It){return"Object("+It+")"}function Ye(It){return It+" { ? }"}function gt(It,qt,jt,Yt){return It+" ("+qt+") {"+(Yt?dn(jt,Yt):j.call(jt,", "))+"}"}function dn(It,qt){if(0===It.length)return"";var jt="\n"+qt.prev+qt.base;return jt+j.call(It,","+jt)+"\n"+qt.prev}function Nt(It,qt){var jt=ue(It),Yt=[];if(jt){Yt.length=It.length;for(var Wn=0;Wn{"use strict";var ie=Y(62016);be.certificate=Y(96240);var q=ie.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});be.RSAPrivateKey=q;var O=ie.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});be.RSAPublicKey=O;var E=ie.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(d),this.key("subjectPublicKey").bitstr())});be.PublicKey=E;var d=ie.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),x=ie.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(d),this.key("subjectPrivateKey").octstr())});be.PrivateKey=x;var f=ie.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});be.EncryptedPrivateKey=f;var T=ie.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});be.DSAPrivateKey=T,be.DSAparam=ie.define("DSAparam",function(){this.int()});var g=ie.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(b),this.key("publicKey").optional().explicit(1).bitstr())});be.ECPrivateKey=g;var b=ie.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});be.signature=ie.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},96240:(bt,be,Y)=>{"use strict";var ie=Y(62016),q=ie.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),O=ie.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),E=ie.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),d=ie.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(E),this.key("subjectPublicKey").bitstr())}),x=ie.define("RelativeDistinguishedName",function(){this.setof(O)}),f=ie.define("RDNSequence",function(){this.seqof(x)}),T=ie.define("Name",function(){this.choice({rdnSequence:this.use(f)})}),g=ie.define("Validity",function(){this.seq().obj(this.key("notBefore").use(q),this.key("notAfter").use(q))}),b=ie.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),l=ie.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(E),this.key("issuer").use(T),this.key("validity").use(g),this.key("subject").use(T),this.key("subjectPublicKeyInfo").use(d),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(b).optional())}),h=ie.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(E),this.key("signatureValue").bitstr())});bt.exports=h},61553:(bt,be,Y)=>{var ie=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,q=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,O=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,E=Y(92367),d=Y(39586),x=Y(55859).Buffer;bt.exports=function(f,T){var l,g=f.toString(),b=g.match(ie);if(b){var u="aes"+b[1],m=x.from(b[2],"hex"),_=x.from(b[3].replace(/[\r\n]/g,""),"base64"),w=E(T,m.slice(0,8),parseInt(b[1],10)).key,S=[],I=d.createDecipheriv(u,w,m);S.push(I.update(_)),S.push(I.final()),l=x.concat(S)}else{var h=g.match(O);l=x.from(h[2].replace(/[\r\n]/g,""),"base64")}return{tag:g.match(q)[1],data:l}}},81997:(bt,be,Y)=>{var ie=Y(44673),q=Y(22562),O=Y(61553),E=Y(39586),d=Y(14161),x=Y(55859).Buffer;function f(g){var b;"object"==typeof g&&!x.isBuffer(g)&&(b=g.passphrase,g=g.key),"string"==typeof g&&(g=x.from(g));var m,_,l=O(g,b),h=l.tag,u=l.data;switch(h){case"CERTIFICATE":_=ie.certificate.decode(u,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(_||(_=ie.PublicKey.decode(u,"der")),m=_.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return ie.RSAPublicKey.decode(_.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return _.subjectPrivateKey=_.subjectPublicKey,{type:"ec",data:_};case"1.2.840.10040.4.1":return _.algorithm.params.pub_key=ie.DSAparam.decode(_.subjectPublicKey.data,"der"),{type:"dsa",data:_.algorithm.params};default:throw new Error("unknown key id "+m)}case"ENCRYPTED PRIVATE KEY":u=function(g,b){var l=g.algorithm.decrypt.kde.kdeparams.salt,h=parseInt(g.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=q[g.algorithm.decrypt.cipher.algo.join(".")],m=g.algorithm.decrypt.cipher.iv,_=g.subjectPrivateKey,w=parseInt(u.split("-")[1],10)/8,S=d.pbkdf2Sync(b,l,h,w,"sha1"),I=E.createDecipheriv(u,S,m),P=[];return P.push(I.update(_)),P.push(I.final()),x.concat(P)}(u=ie.EncryptedPrivateKey.decode(u,"der"),b);case"PRIVATE KEY":switch(m=(_=ie.PrivateKey.decode(u,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return ie.RSAPrivateKey.decode(_.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:_.algorithm.curve,privateKey:ie.ECPrivateKey.decode(_.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return _.algorithm.params.priv_key=ie.DSAparam.decode(_.subjectPrivateKey,"der"),{type:"dsa",params:_.algorithm.params};default:throw new Error("unknown key id "+m)}case"RSA PUBLIC KEY":return ie.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return ie.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:ie.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return{curve:(u=ie.ECPrivateKey.decode(u,"der")).parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+h)}}bt.exports=f,f.signature=ie.signature},14161:(bt,be,Y)=>{be.pbkdf2=Y(51898),be.pbkdf2Sync=Y(205)},51898:(bt,be,Y)=>{var x,l,ie=Y(55859).Buffer,q=Y(79024),O=Y(85657),E=Y(205),d=Y(16933),f=global.crypto&&global.crypto.subtle,T={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},g=[];function h(){return l||(l=global.process&&global.process.nextTick?global.process.nextTick:global.queueMicrotask?global.queueMicrotask:global.setImmediate?global.setImmediate:global.setTimeout)}function u(_,w,S,I,P){return f.importKey("raw",_,{name:"PBKDF2"},!1,["deriveBits"]).then(function(L){return f.deriveBits({name:"PBKDF2",salt:w,iterations:S,hash:{name:P}},L,I<<3)}).then(function(L){return ie.from(L)})}bt.exports=function(_,w,S,I,P,L){"function"==typeof P&&(L=P,P=void 0);var V=T[(P=P||"sha1").toLowerCase()];if(V&&"function"==typeof global.Promise){if(q(S,I),_=d(_,O,"Password"),w=d(w,O,"Salt"),"function"!=typeof L)throw new Error("No callback provided to pbkdf2");!function(_,w){_.then(function(S){h()(function(){w(null,S)})},function(S){h()(function(){w(S)})})}(function(_){if(global.process&&!global.process.browser||!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==g[_])return g[_];var w=u(x=x||ie.alloc(8),x,10,128,_).then(function(){return!0}).catch(function(){return!1});return g[_]=w,w}(V).then(function(W){return W?u(_,w,S,I,V):E(_,w,S,I,P)}),L)}else h()(function(){var W;try{W=E(_,w,S,I,P)}catch(G){return L(G)}L(null,W)})}},85657:bt=>{var be;be=global.process&&global.process.browser?"utf-8":global.process&&global.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",bt.exports=be},79024:bt=>{var be=Math.pow(2,30)-1;bt.exports=function(Y,ie){if("number"!=typeof Y)throw new TypeError("Iterations not a number");if(Y<0)throw new TypeError("Bad iterations");if("number"!=typeof ie)throw new TypeError("Key length not a number");if(ie<0||ie>be||ie!=ie)throw new TypeError("Bad key length")}},205:(bt,be,Y)=>{var ie=Y(84464),q=Y(75207),O=Y(45829),E=Y(55859).Buffer,d=Y(79024),x=Y(85657),f=Y(16933),T=E.alloc(128),g={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function b(u,m,_){var w=function(u){return"rmd160"===u||"ripemd160"===u?function(w){return(new q).update(w).digest()}:"md5"===u?ie:function(w){return O(u).update(w).digest()}}(u),S="sha512"===u||"sha384"===u?128:64;m.length>S?m=w(m):m.length{var ie=Y(55859).Buffer;bt.exports=function(q,O,E){if(ie.isBuffer(q))return q;if("string"==typeof q)return ie.from(q,O);if(ArrayBuffer.isView(q))return ie.from(q.buffer);throw new TypeError(E+" must be a string, a Buffer, a typed array or a DataView")}},37537:(bt,be,Y)=>{be.publicEncrypt=Y(74760),be.privateDecrypt=Y(31548),be.privateEncrypt=function(q,O){return be.publicEncrypt(q,O,!0)},be.publicDecrypt=function(q,O){return be.privateDecrypt(q,O,!0)}},30444:(bt,be,Y)=>{var ie=Y(12506),q=Y(55859).Buffer;function O(E){var d=q.allocUnsafe(4);return d.writeUInt32BE(E,0),d}bt.exports=function(E,d){for(var T,x=q.alloc(0),f=0;x.length=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function T(R,o,y){var M=f(R,y);return y-1>=o&&(M|=f(R,y-1)<<4),M}function g(R,o,y,M){for(var v=0,k=Math.min(R.length,y),D=o;D=49?N-49+10:N>=17?N-17+10:N}return v}d.isBN=function(o){return o instanceof d||null!==o&&"object"==typeof o&&o.constructor.wordSize===d.wordSize&&Array.isArray(o.words)},d.max=function(o,y){return o.cmp(y)>0?o:y},d.min=function(o,y){return o.cmp(y)<0?o:y},d.prototype._init=function(o,y,M){if("number"==typeof o)return this._initNumber(o,y,M);if("object"==typeof o)return this._initArray(o,y,M);"hex"===y&&(y=16),O(y===(0|y)&&y>=2&&y<=36);var v=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(v++,this.negative=1),v=0;v-=3)this.words[k]|=(D=o[v]|o[v-1]<<8|o[v-2]<<16)<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if("le"===M)for(v=0,k=0;v>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},d.prototype._parseHex=function(o,y,M){this.length=Math.ceil((o.length-y)/6),this.words=new Array(this.length);for(var v=0;v=y;v-=2)N=T(o,y,v)<=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;else for(v=(o.length-y)%2==0?y+1:y;v=18?(k-=18,this.words[D+=1]|=N>>>26):k+=8;this.strip()},d.prototype._parseBase=function(o,y,M){this.words=[0],this.length=1;for(var v=0,k=1;k<=67108863;k*=y)v++;v--,k=k/y|0;for(var D=o.length-M,N=D%v,C=Math.min(D,D-N)+M,a=0,B=M;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","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"],l=[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 m(R,o,y){y.negative=o.negative^R.negative;var M=R.length+o.length|0;y.length=M,M=M-1|0;var v=0|R.words[0],k=0|o.words[0],D=v*k,C=D/67108864|0;y.words[0]=67108863&D;for(var a=1;a>>26,Q=67108863&C,ee=Math.min(a,o.length-1),ce=Math.max(0,a-R.length+1);ce<=ee;ce++)B+=(D=(v=0|R.words[a-ce|0])*(k=0|o.words[ce])+Q)/67108864|0,Q=67108863&D;y.words[a]=0|Q,C=0|B}return 0!==C?y.words[a]=0|C:y.length--,y.strip()}d.prototype.toString=function(o,y){var M;if(y=0|y||1,16===(o=o||10)||"hex"===o){M="";for(var v=0,k=0,D=0;D>>24-v&16777215)||D!==this.length-1?b[6-C.length]+C+M:C+M,(v+=2)>=26&&(v-=26,D--)}for(0!==k&&(M=k.toString(16)+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}if(o===(0|o)&&o>=2&&o<=36){var a=l[o],B=h[o];M="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ee=Q.modn(B).toString(o);M=(Q=Q.idivn(B)).isZero()?ee+M:b[a-ee.length]+ee+M}for(this.isZero()&&(M="0"+M);M.length%y!=0;)M="0"+M;return 0!==this.negative&&(M="-"+M),M}O(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&O(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(o,y){return O(void 0!==x),this.toArrayLike(x,o,y)},d.prototype.toArray=function(o,y){return this.toArrayLike(Array,o,y)},d.prototype.toArrayLike=function(o,y,M){var v=this.byteLength(),k=M||Math.max(1,v);O(v<=k,"byte array longer than desired length"),O(k>0,"Requested array length <= 0"),this.strip();var C,a,D="le"===y,N=new o(k),B=this.clone();if(D){for(a=0;!B.isZero();a++)C=B.andln(255),B.iushrn(8),N[a]=C;for(;a=4096&&(M+=13,y>>>=13),y>=64&&(M+=7,y>>>=7),y>=8&&(M+=4,y>>>=4),y>=2&&(M+=2,y>>>=2),M+y},d.prototype._zeroBits=function(o){if(0===o)return 26;var y=o,M=0;return 0==(8191&y)&&(M+=13,y>>>=13),0==(127&y)&&(M+=7,y>>>=7),0==(15&y)&&(M+=4,y>>>=4),0==(3&y)&&(M+=2,y>>>=2),0==(1&y)&&M++,M},d.prototype.bitLength=function(){var y=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+y},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,y=0;yo.length?this.clone().ior(o):o.clone().ior(this)},d.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},d.prototype.iuand=function(o){var y;y=this.length>o.length?o:this;for(var M=0;Mo.length?this.clone().iand(o):o.clone().iand(this)},d.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},d.prototype.iuxor=function(o){var y,M;this.length>o.length?(y=this,M=o):(y=o,M=this);for(var v=0;vo.length?this.clone().ixor(o):o.clone().ixor(this)},d.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},d.prototype.inotn=function(o){O("number"==typeof o&&o>=0);var y=0|Math.ceil(o/26),M=o%26;this._expand(y),M>0&&y--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-M),this.strip()},d.prototype.notn=function(o){return this.clone().inotn(o)},d.prototype.setn=function(o,y){O("number"==typeof o&&o>=0);var M=o/26|0,v=o%26;return this._expand(M+1),this.words[M]=y?this.words[M]|1<o.length?(M=this,v=o):(M=o,v=this);for(var k=0,D=0;D>>26;for(;0!==k&&D>>26;if(this.length=M.length,0!==k)this.words[this.length]=k,this.length++;else if(M!==this)for(;Do.length?this.clone().iadd(o):o.clone().iadd(this)},d.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var y=this.iadd(o);return o.negative=1,y._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var v,k,M=this.cmp(o);if(0===M)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(v=this,k=o):(v=o,k=this);for(var D=0,N=0;N>26,this.words[N]=67108863&y;for(;0!==D&&N>26,this.words[N]=67108863&y;if(0===D&&N>>13,ue=0|v[1],we=8191&ue,ae=ue>>>13,Te=0|v[2],le=8191&Te,X=Te>>>13,ne=0|v[3],pe=8191&ne,_e=ne>>>13,xe=0|v[4],Ce=8191&xe,ke=xe>>>13,me=0|v[5],Ee=8191&me,ze=me>>>13,Ve=0|v[6],nt=8191&Ve,tt=Ve>>>13,mt=0|v[7],ht=8191&mt,wt=mt>>>13,Pt=0|v[8],st=8191&Pt,Ye=Pt>>>13,gt=0|v[9],St=8191>,Wt=gt>>>13,dn=0|k[0],Nt=8191&dn,It=dn>>>13,qt=0|k[1],jt=8191&qt,Yt=qt>>>13,Wn=0|k[2],fn=8191&Wn,$n=Wn>>>13,Jr=0|k[3],Ln=8191&Jr,Bn=Jr>>>13,Wr=0|k[4],zn=8191&Wr,bn=Wr>>>13,Lr=0|k[5],Kn=8191&Lr,sr=Lr>>>13,Ii=0|k[6],Un=8191&Ii,ir=Ii>>>13,ts=0|k[7],Tn=8191&ts,Qn=ts>>>13,Vi=0|k[8],ar=8191&Vi,br=Vi>>>13,ki=0|k[9],ur=8191&ki,mr=ki>>>13;M.negative=o.negative^y.negative,M.length=19;var Fr=(N+(C=Math.imul(ee,Nt))|0)+((8191&(a=(a=Math.imul(ee,It))+Math.imul(ce,Nt)|0))<<13)|0;N=((B=Math.imul(ce,It))+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(we,Nt),a=(a=Math.imul(we,It))+Math.imul(ae,Nt)|0,B=Math.imul(ae,It);var hi=(N+(C=C+Math.imul(ee,jt)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Yt)|0)+Math.imul(ce,jt)|0))<<13)|0;N=((B=B+Math.imul(ce,Yt)|0)+(a>>>13)|0)+(hi>>>26)|0,hi&=67108863,C=Math.imul(le,Nt),a=(a=Math.imul(le,It))+Math.imul(X,Nt)|0,B=Math.imul(X,It),C=C+Math.imul(we,jt)|0,a=(a=a+Math.imul(we,Yt)|0)+Math.imul(ae,jt)|0,B=B+Math.imul(ae,Yt)|0;var wi=(N+(C=C+Math.imul(ee,fn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,$n)|0)+Math.imul(ce,fn)|0))<<13)|0;N=((B=B+Math.imul(ce,$n)|0)+(a>>>13)|0)+(wi>>>26)|0,wi&=67108863,C=Math.imul(pe,Nt),a=(a=Math.imul(pe,It))+Math.imul(_e,Nt)|0,B=Math.imul(_e,It),C=C+Math.imul(le,jt)|0,a=(a=a+Math.imul(le,Yt)|0)+Math.imul(X,jt)|0,B=B+Math.imul(X,Yt)|0,C=C+Math.imul(we,fn)|0,a=(a=a+Math.imul(we,$n)|0)+Math.imul(ae,fn)|0,B=B+Math.imul(ae,$n)|0;var cs=(N+(C=C+Math.imul(ee,Ln)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Bn)|0)+Math.imul(ce,Ln)|0))<<13)|0;N=((B=B+Math.imul(ce,Bn)|0)+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,C=Math.imul(Ce,Nt),a=(a=Math.imul(Ce,It))+Math.imul(ke,Nt)|0,B=Math.imul(ke,It),C=C+Math.imul(pe,jt)|0,a=(a=a+Math.imul(pe,Yt)|0)+Math.imul(_e,jt)|0,B=B+Math.imul(_e,Yt)|0,C=C+Math.imul(le,fn)|0,a=(a=a+Math.imul(le,$n)|0)+Math.imul(X,fn)|0,B=B+Math.imul(X,$n)|0,C=C+Math.imul(we,Ln)|0,a=(a=a+Math.imul(we,Bn)|0)+Math.imul(ae,Ln)|0,B=B+Math.imul(ae,Bn)|0;var $i=(N+(C=C+Math.imul(ee,zn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,bn)|0)+Math.imul(ce,zn)|0))<<13)|0;N=((B=B+Math.imul(ce,bn)|0)+(a>>>13)|0)+($i>>>26)|0,$i&=67108863,C=Math.imul(Ee,Nt),a=(a=Math.imul(Ee,It))+Math.imul(ze,Nt)|0,B=Math.imul(ze,It),C=C+Math.imul(Ce,jt)|0,a=(a=a+Math.imul(Ce,Yt)|0)+Math.imul(ke,jt)|0,B=B+Math.imul(ke,Yt)|0,C=C+Math.imul(pe,fn)|0,a=(a=a+Math.imul(pe,$n)|0)+Math.imul(_e,fn)|0,B=B+Math.imul(_e,$n)|0,C=C+Math.imul(le,Ln)|0,a=(a=a+Math.imul(le,Bn)|0)+Math.imul(X,Ln)|0,B=B+Math.imul(X,Bn)|0,C=C+Math.imul(we,zn)|0,a=(a=a+Math.imul(we,bn)|0)+Math.imul(ae,zn)|0,B=B+Math.imul(ae,bn)|0;var rs=(N+(C=C+Math.imul(ee,Kn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,sr)|0)+Math.imul(ce,Kn)|0))<<13)|0;N=((B=B+Math.imul(ce,sr)|0)+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,C=Math.imul(nt,Nt),a=(a=Math.imul(nt,It))+Math.imul(tt,Nt)|0,B=Math.imul(tt,It),C=C+Math.imul(Ee,jt)|0,a=(a=a+Math.imul(Ee,Yt)|0)+Math.imul(ze,jt)|0,B=B+Math.imul(ze,Yt)|0,C=C+Math.imul(Ce,fn)|0,a=(a=a+Math.imul(Ce,$n)|0)+Math.imul(ke,fn)|0,B=B+Math.imul(ke,$n)|0,C=C+Math.imul(pe,Ln)|0,a=(a=a+Math.imul(pe,Bn)|0)+Math.imul(_e,Ln)|0,B=B+Math.imul(_e,Bn)|0,C=C+Math.imul(le,zn)|0,a=(a=a+Math.imul(le,bn)|0)+Math.imul(X,zn)|0,B=B+Math.imul(X,bn)|0,C=C+Math.imul(we,Kn)|0,a=(a=a+Math.imul(we,sr)|0)+Math.imul(ae,Kn)|0,B=B+Math.imul(ae,sr)|0;var Xi=(N+(C=C+Math.imul(ee,Un)|0)|0)+((8191&(a=(a=a+Math.imul(ee,ir)|0)+Math.imul(ce,Un)|0))<<13)|0;N=((B=B+Math.imul(ce,ir)|0)+(a>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,C=Math.imul(ht,Nt),a=(a=Math.imul(ht,It))+Math.imul(wt,Nt)|0,B=Math.imul(wt,It),C=C+Math.imul(nt,jt)|0,a=(a=a+Math.imul(nt,Yt)|0)+Math.imul(tt,jt)|0,B=B+Math.imul(tt,Yt)|0,C=C+Math.imul(Ee,fn)|0,a=(a=a+Math.imul(Ee,$n)|0)+Math.imul(ze,fn)|0,B=B+Math.imul(ze,$n)|0,C=C+Math.imul(Ce,Ln)|0,a=(a=a+Math.imul(Ce,Bn)|0)+Math.imul(ke,Ln)|0,B=B+Math.imul(ke,Bn)|0,C=C+Math.imul(pe,zn)|0,a=(a=a+Math.imul(pe,bn)|0)+Math.imul(_e,zn)|0,B=B+Math.imul(_e,bn)|0,C=C+Math.imul(le,Kn)|0,a=(a=a+Math.imul(le,sr)|0)+Math.imul(X,Kn)|0,B=B+Math.imul(X,sr)|0,C=C+Math.imul(we,Un)|0,a=(a=a+Math.imul(we,ir)|0)+Math.imul(ae,Un)|0,B=B+Math.imul(ae,ir)|0;var $s=(N+(C=C+Math.imul(ee,Tn)|0)|0)+((8191&(a=(a=a+Math.imul(ee,Qn)|0)+Math.imul(ce,Tn)|0))<<13)|0;N=((B=B+Math.imul(ce,Qn)|0)+(a>>>13)|0)+($s>>>26)|0,$s&=67108863,C=Math.imul(st,Nt),a=(a=Math.imul(st,It))+Math.imul(Ye,Nt)|0,B=Math.imul(Ye,It),C=C+Math.imul(ht,jt)|0,a=(a=a+Math.imul(ht,Yt)|0)+Math.imul(wt,jt)|0,B=B+Math.imul(wt,Yt)|0,C=C+Math.imul(nt,fn)|0,a=(a=a+Math.imul(nt,$n)|0)+Math.imul(tt,fn)|0,B=B+Math.imul(tt,$n)|0,C=C+Math.imul(Ee,Ln)|0,a=(a=a+Math.imul(Ee,Bn)|0)+Math.imul(ze,Ln)|0,B=B+Math.imul(ze,Bn)|0,C=C+Math.imul(Ce,zn)|0,a=(a=a+Math.imul(Ce,bn)|0)+Math.imul(ke,zn)|0,B=B+Math.imul(ke,bn)|0,C=C+Math.imul(pe,Kn)|0,a=(a=a+Math.imul(pe,sr)|0)+Math.imul(_e,Kn)|0,B=B+Math.imul(_e,sr)|0,C=C+Math.imul(le,Un)|0,a=(a=a+Math.imul(le,ir)|0)+Math.imul(X,Un)|0,B=B+Math.imul(X,ir)|0,C=C+Math.imul(we,Tn)|0,a=(a=a+Math.imul(we,Qn)|0)+Math.imul(ae,Tn)|0,B=B+Math.imul(ae,Qn)|0;var is=(N+(C=C+Math.imul(ee,ar)|0)|0)+((8191&(a=(a=a+Math.imul(ee,br)|0)+Math.imul(ce,ar)|0))<<13)|0;N=((B=B+Math.imul(ce,br)|0)+(a>>>13)|0)+(is>>>26)|0,is&=67108863,C=Math.imul(St,Nt),a=(a=Math.imul(St,It))+Math.imul(Wt,Nt)|0,B=Math.imul(Wt,It),C=C+Math.imul(st,jt)|0,a=(a=a+Math.imul(st,Yt)|0)+Math.imul(Ye,jt)|0,B=B+Math.imul(Ye,Yt)|0,C=C+Math.imul(ht,fn)|0,a=(a=a+Math.imul(ht,$n)|0)+Math.imul(wt,fn)|0,B=B+Math.imul(wt,$n)|0,C=C+Math.imul(nt,Ln)|0,a=(a=a+Math.imul(nt,Bn)|0)+Math.imul(tt,Ln)|0,B=B+Math.imul(tt,Bn)|0,C=C+Math.imul(Ee,zn)|0,a=(a=a+Math.imul(Ee,bn)|0)+Math.imul(ze,zn)|0,B=B+Math.imul(ze,bn)|0,C=C+Math.imul(Ce,Kn)|0,a=(a=a+Math.imul(Ce,sr)|0)+Math.imul(ke,Kn)|0,B=B+Math.imul(ke,sr)|0,C=C+Math.imul(pe,Un)|0,a=(a=a+Math.imul(pe,ir)|0)+Math.imul(_e,Un)|0,B=B+Math.imul(_e,ir)|0,C=C+Math.imul(le,Tn)|0,a=(a=a+Math.imul(le,Qn)|0)+Math.imul(X,Tn)|0,B=B+Math.imul(X,Qn)|0,C=C+Math.imul(we,ar)|0,a=(a=a+Math.imul(we,br)|0)+Math.imul(ae,ar)|0,B=B+Math.imul(ae,br)|0;var go=(N+(C=C+Math.imul(ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ee,mr)|0)+Math.imul(ce,ur)|0))<<13)|0;N=((B=B+Math.imul(ce,mr)|0)+(a>>>13)|0)+(go>>>26)|0,go&=67108863,C=Math.imul(St,jt),a=(a=Math.imul(St,Yt))+Math.imul(Wt,jt)|0,B=Math.imul(Wt,Yt),C=C+Math.imul(st,fn)|0,a=(a=a+Math.imul(st,$n)|0)+Math.imul(Ye,fn)|0,B=B+Math.imul(Ye,$n)|0,C=C+Math.imul(ht,Ln)|0,a=(a=a+Math.imul(ht,Bn)|0)+Math.imul(wt,Ln)|0,B=B+Math.imul(wt,Bn)|0,C=C+Math.imul(nt,zn)|0,a=(a=a+Math.imul(nt,bn)|0)+Math.imul(tt,zn)|0,B=B+Math.imul(tt,bn)|0,C=C+Math.imul(Ee,Kn)|0,a=(a=a+Math.imul(Ee,sr)|0)+Math.imul(ze,Kn)|0,B=B+Math.imul(ze,sr)|0,C=C+Math.imul(Ce,Un)|0,a=(a=a+Math.imul(Ce,ir)|0)+Math.imul(ke,Un)|0,B=B+Math.imul(ke,ir)|0,C=C+Math.imul(pe,Tn)|0,a=(a=a+Math.imul(pe,Qn)|0)+Math.imul(_e,Tn)|0,B=B+Math.imul(_e,Qn)|0,C=C+Math.imul(le,ar)|0,a=(a=a+Math.imul(le,br)|0)+Math.imul(X,ar)|0,B=B+Math.imul(X,br)|0;var ji=(N+(C=C+Math.imul(we,ur)|0)|0)+((8191&(a=(a=a+Math.imul(we,mr)|0)+Math.imul(ae,ur)|0))<<13)|0;N=((B=B+Math.imul(ae,mr)|0)+(a>>>13)|0)+(ji>>>26)|0,ji&=67108863,C=Math.imul(St,fn),a=(a=Math.imul(St,$n))+Math.imul(Wt,fn)|0,B=Math.imul(Wt,$n),C=C+Math.imul(st,Ln)|0,a=(a=a+Math.imul(st,Bn)|0)+Math.imul(Ye,Ln)|0,B=B+Math.imul(Ye,Bn)|0,C=C+Math.imul(ht,zn)|0,a=(a=a+Math.imul(ht,bn)|0)+Math.imul(wt,zn)|0,B=B+Math.imul(wt,bn)|0,C=C+Math.imul(nt,Kn)|0,a=(a=a+Math.imul(nt,sr)|0)+Math.imul(tt,Kn)|0,B=B+Math.imul(tt,sr)|0,C=C+Math.imul(Ee,Un)|0,a=(a=a+Math.imul(Ee,ir)|0)+Math.imul(ze,Un)|0,B=B+Math.imul(ze,ir)|0,C=C+Math.imul(Ce,Tn)|0,a=(a=a+Math.imul(Ce,Qn)|0)+Math.imul(ke,Tn)|0,B=B+Math.imul(ke,Qn)|0,C=C+Math.imul(pe,ar)|0,a=(a=a+Math.imul(pe,br)|0)+Math.imul(_e,ar)|0,B=B+Math.imul(_e,br)|0;var so=(N+(C=C+Math.imul(le,ur)|0)|0)+((8191&(a=(a=a+Math.imul(le,mr)|0)+Math.imul(X,ur)|0))<<13)|0;N=((B=B+Math.imul(X,mr)|0)+(a>>>13)|0)+(so>>>26)|0,so&=67108863,C=Math.imul(St,Ln),a=(a=Math.imul(St,Bn))+Math.imul(Wt,Ln)|0,B=Math.imul(Wt,Bn),C=C+Math.imul(st,zn)|0,a=(a=a+Math.imul(st,bn)|0)+Math.imul(Ye,zn)|0,B=B+Math.imul(Ye,bn)|0,C=C+Math.imul(ht,Kn)|0,a=(a=a+Math.imul(ht,sr)|0)+Math.imul(wt,Kn)|0,B=B+Math.imul(wt,sr)|0,C=C+Math.imul(nt,Un)|0,a=(a=a+Math.imul(nt,ir)|0)+Math.imul(tt,Un)|0,B=B+Math.imul(tt,ir)|0,C=C+Math.imul(Ee,Tn)|0,a=(a=a+Math.imul(Ee,Qn)|0)+Math.imul(ze,Tn)|0,B=B+Math.imul(ze,Qn)|0,C=C+Math.imul(Ce,ar)|0,a=(a=a+Math.imul(Ce,br)|0)+Math.imul(ke,ar)|0,B=B+Math.imul(ke,br)|0;var oo=(N+(C=C+Math.imul(pe,ur)|0)|0)+((8191&(a=(a=a+Math.imul(pe,mr)|0)+Math.imul(_e,ur)|0))<<13)|0;N=((B=B+Math.imul(_e,mr)|0)+(a>>>13)|0)+(oo>>>26)|0,oo&=67108863,C=Math.imul(St,zn),a=(a=Math.imul(St,bn))+Math.imul(Wt,zn)|0,B=Math.imul(Wt,bn),C=C+Math.imul(st,Kn)|0,a=(a=a+Math.imul(st,sr)|0)+Math.imul(Ye,Kn)|0,B=B+Math.imul(Ye,sr)|0,C=C+Math.imul(ht,Un)|0,a=(a=a+Math.imul(ht,ir)|0)+Math.imul(wt,Un)|0,B=B+Math.imul(wt,ir)|0,C=C+Math.imul(nt,Tn)|0,a=(a=a+Math.imul(nt,Qn)|0)+Math.imul(tt,Tn)|0,B=B+Math.imul(tt,Qn)|0,C=C+Math.imul(Ee,ar)|0,a=(a=a+Math.imul(Ee,br)|0)+Math.imul(ze,ar)|0,B=B+Math.imul(ze,br)|0;var zo=(N+(C=C+Math.imul(Ce,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ce,mr)|0)+Math.imul(ke,ur)|0))<<13)|0;N=((B=B+Math.imul(ke,mr)|0)+(a>>>13)|0)+(zo>>>26)|0,zo&=67108863,C=Math.imul(St,Kn),a=(a=Math.imul(St,sr))+Math.imul(Wt,Kn)|0,B=Math.imul(Wt,sr),C=C+Math.imul(st,Un)|0,a=(a=a+Math.imul(st,ir)|0)+Math.imul(Ye,Un)|0,B=B+Math.imul(Ye,ir)|0,C=C+Math.imul(ht,Tn)|0,a=(a=a+Math.imul(ht,Qn)|0)+Math.imul(wt,Tn)|0,B=B+Math.imul(wt,Qn)|0,C=C+Math.imul(nt,ar)|0,a=(a=a+Math.imul(nt,br)|0)+Math.imul(tt,ar)|0,B=B+Math.imul(tt,br)|0;var Wi=(N+(C=C+Math.imul(Ee,ur)|0)|0)+((8191&(a=(a=a+Math.imul(Ee,mr)|0)+Math.imul(ze,ur)|0))<<13)|0;N=((B=B+Math.imul(ze,mr)|0)+(a>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,C=Math.imul(St,Un),a=(a=Math.imul(St,ir))+Math.imul(Wt,Un)|0,B=Math.imul(Wt,ir),C=C+Math.imul(st,Tn)|0,a=(a=a+Math.imul(st,Qn)|0)+Math.imul(Ye,Tn)|0,B=B+Math.imul(Ye,Qn)|0,C=C+Math.imul(ht,ar)|0,a=(a=a+Math.imul(ht,br)|0)+Math.imul(wt,ar)|0,B=B+Math.imul(wt,br)|0;var bo=(N+(C=C+Math.imul(nt,ur)|0)|0)+((8191&(a=(a=a+Math.imul(nt,mr)|0)+Math.imul(tt,ur)|0))<<13)|0;N=((B=B+Math.imul(tt,mr)|0)+(a>>>13)|0)+(bo>>>26)|0,bo&=67108863,C=Math.imul(St,Tn),a=(a=Math.imul(St,Qn))+Math.imul(Wt,Tn)|0,B=Math.imul(Wt,Qn),C=C+Math.imul(st,ar)|0,a=(a=a+Math.imul(st,br)|0)+Math.imul(Ye,ar)|0,B=B+Math.imul(Ye,br)|0;var _s=(N+(C=C+Math.imul(ht,ur)|0)|0)+((8191&(a=(a=a+Math.imul(ht,mr)|0)+Math.imul(wt,ur)|0))<<13)|0;N=((B=B+Math.imul(wt,mr)|0)+(a>>>13)|0)+(_s>>>26)|0,_s&=67108863,C=Math.imul(St,ar),a=(a=Math.imul(St,br))+Math.imul(Wt,ar)|0,B=Math.imul(Wt,br);var Ao=(N+(C=C+Math.imul(st,ur)|0)|0)+((8191&(a=(a=a+Math.imul(st,mr)|0)+Math.imul(Ye,ur)|0))<<13)|0;N=((B=B+Math.imul(Ye,mr)|0)+(a>>>13)|0)+(Ao>>>26)|0,Ao&=67108863;var zi=(N+(C=Math.imul(St,ur))|0)+((8191&(a=(a=Math.imul(St,mr))+Math.imul(Wt,ur)|0))<<13)|0;return N=((B=Math.imul(Wt,mr))+(a>>>13)|0)+(zi>>>26)|0,zi&=67108863,D[0]=Fr,D[1]=hi,D[2]=wi,D[3]=cs,D[4]=$i,D[5]=rs,D[6]=Xi,D[7]=$s,D[8]=is,D[9]=go,D[10]=ji,D[11]=so,D[12]=oo,D[13]=zo,D[14]=Wi,D[15]=bo,D[16]=_s,D[17]=Ao,D[18]=zi,0!==N&&(D[19]=N,M.length++),M};function S(R,o,y){return(new I).mulp(R,o,y)}function I(R,o){this.x=R,this.y=o}Math.imul||(_=m),d.prototype.mulTo=function(o,y){var M,v=this.length+o.length;return M=10===this.length&&10===o.length?_(this,o,y):v<63?m(this,o,y):v<1024?function(R,o,y){y.negative=o.negative^R.negative,y.length=R.length+o.length;for(var M=0,v=0,k=0;k>>26)|0)>>>26,D&=67108863}y.words[k]=N,M=D,D=v}return 0!==M?y.words[k]=M:y.length--,y.strip()}(this,o,y):S(this,o,y),M},I.prototype.makeRBT=function(o){for(var y=new Array(o),M=d.prototype._countBits(o)-1,v=0;v>=1;return v},I.prototype.permute=function(o,y,M,v,k,D){for(var N=0;N>>=1)k++;return 1<>>=13),k>>>=13;for(D=2*y;D>=26,y+=v/67108864|0,y+=k>>>26,this.words[M]=67108863&k}return 0!==y&&(this.words[M]=y,this.length++),this},d.prototype.muln=function(o){return this.clone().imuln(o)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(o){var y=function(R){for(var o=new Array(R.bitLength()),y=0;y>>v}return o}(o);if(0===y.length)return new d(1);for(var M=this,v=0;v=0);var k,y=o%26,M=(o-y)/26,v=67108863>>>26-y<<26-y;if(0!==y){var D=0;for(k=0;k>>26-y}D&&(this.words[k]=D,this.length++)}if(0!==M){for(k=this.length-1;k>=0;k--)this.words[k+M]=this.words[k];for(k=0;k=0),v=y?(y-y%26)/26:0;var k=o%26,D=Math.min((o-k)/26,this.length),N=67108863^67108863>>>k<D)for(this.length-=D,a=0;a=0&&(0!==B||a>=v);a--){var Q=0|this.words[a];this.words[a]=B<<26-k|Q>>>k,B=Q&N}return C&&0!==B&&(C.words[C.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(o,y,M){return O(0===this.negative),this.iushrn(o,y,M)},d.prototype.shln=function(o){return this.clone().ishln(o)},d.prototype.ushln=function(o){return this.clone().iushln(o)},d.prototype.shrn=function(o){return this.clone().ishrn(o)},d.prototype.ushrn=function(o){return this.clone().iushrn(o)},d.prototype.testn=function(o){O("number"==typeof o&&o>=0);var y=o%26,M=(o-y)/26;return!(this.length<=M||!(this.words[M]&1<=0);var y=o%26,M=(o-y)/26;return O(0===this.negative,"imaskn works only with positive numbers"),this.length<=M?this:(0!==y&&M++,this.length=Math.min(M,this.length),0!==y&&(this.words[this.length-1]&=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},d.prototype.isubn=function(o){if(O("number"==typeof o),O(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(C/67108864|0),this.words[k+M]=67108863&D}for(;k>26,this.words[k+M]=67108863&D;if(0===N)return this.strip();for(O(-1===N),N=0,k=0;k>26,this.words[k]=67108863&D;return this.negative=1,this.strip()},d.prototype._wordDiv=function(o,y){var M,v=this.clone(),k=o,D=0|k.words[k.length-1];0!=(M=26-this._countBits(D))&&(k=k.ushln(M),v.iushln(M),D=0|k.words[k.length-1]);var a,C=v.length-k.length;if("mod"!==y){(a=new d(null)).length=C+1,a.words=new Array(a.length);for(var B=0;B=0;ee--){var ce=67108864*(0|v.words[k.length+ee])+(0|v.words[k.length+ee-1]);for(ce=Math.min(ce/D|0,67108863),v._ishlnsubmul(k,ce,ee);0!==v.negative;)ce--,v.negative=0,v._ishlnsubmul(k,1,ee),v.isZero()||(v.negative^=1);a&&(a.words[ee]=ce)}return a&&a.strip(),v.strip(),"div"!==y&&0!==M&&v.iushrn(M),{div:a||null,mod:v}},d.prototype.divmod=function(o,y,M){return O(!o.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===o.negative?(D=this.neg().divmod(o,y),"mod"!==y&&(v=D.div.neg()),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.iadd(o)),{div:v,mod:k}):0===this.negative&&0!==o.negative?(D=this.divmod(o.neg(),y),"mod"!==y&&(v=D.div.neg()),{div:v,mod:D.mod}):0!=(this.negative&o.negative)?(D=this.neg().divmod(o.neg(),y),"div"!==y&&(k=D.mod.neg(),M&&0!==k.negative&&k.isub(o)),{div:D.div,mod:k}):o.length>this.length||this.cmp(o)<0?{div:new d(0),mod:this}:1===o.length?"div"===y?{div:this.divn(o.words[0]),mod:null}:"mod"===y?{div:null,mod:new d(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new d(this.modn(o.words[0]))}:this._wordDiv(o,y);var v,k,D},d.prototype.div=function(o){return this.divmod(o,"div",!1).div},d.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},d.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},d.prototype.divRound=function(o){var y=this.divmod(o);if(y.mod.isZero())return y.div;var M=0!==y.div.negative?y.mod.isub(o):y.mod,v=o.ushrn(1),k=o.andln(1),D=M.cmp(v);return D<0||1===k&&0===D?y.div:0!==y.div.negative?y.div.isubn(1):y.div.iaddn(1)},d.prototype.modn=function(o){O(o<=67108863);for(var y=(1<<26)%o,M=0,v=this.length-1;v>=0;v--)M=(y*M+(0|this.words[v]))%o;return M},d.prototype.idivn=function(o){O(o<=67108863);for(var y=0,M=this.length-1;M>=0;M--){var v=(0|this.words[M])+67108864*y;this.words[M]=v/o|0,y=v%o}return this.strip()},d.prototype.divn=function(o){return this.clone().idivn(o)},d.prototype.egcd=function(o){O(0===o.negative),O(!o.isZero());var y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=new d(0),N=new d(1),C=0;y.isEven()&&M.isEven();)y.iushrn(1),M.iushrn(1),++C;for(var a=M.clone(),B=y.clone();!y.isZero();){for(var Q=0,ee=1;0==(y.words[0]&ee)&&Q<26;++Q,ee<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(v.isOdd()||k.isOdd())&&(v.iadd(a),k.isub(B)),v.iushrn(1),k.iushrn(1);for(var ce=0,ue=1;0==(M.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(M.iushrn(ce);ce-- >0;)(D.isOdd()||N.isOdd())&&(D.iadd(a),N.isub(B)),D.iushrn(1),N.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(D),k.isub(N)):(M.isub(y),D.isub(v),N.isub(k))}return{a:D,b:N,gcd:M.iushln(C)}},d.prototype._invmp=function(o){O(0===o.negative),O(!o.isZero());var Q,y=this,M=o.clone();y=0!==y.negative?y.umod(o):y.clone();for(var v=new d(1),k=new d(0),D=M.clone();y.cmpn(1)>0&&M.cmpn(1)>0;){for(var N=0,C=1;0==(y.words[0]&C)&&N<26;++N,C<<=1);if(N>0)for(y.iushrn(N);N-- >0;)v.isOdd()&&v.iadd(D),v.iushrn(1);for(var a=0,B=1;0==(M.words[0]&B)&&a<26;++a,B<<=1);if(a>0)for(M.iushrn(a);a-- >0;)k.isOdd()&&k.iadd(D),k.iushrn(1);y.cmp(M)>=0?(y.isub(M),v.isub(k)):(M.isub(y),k.isub(v))}return(Q=0===y.cmpn(1)?v:k).cmpn(0)<0&&Q.iadd(o),Q},d.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var y=this.clone(),M=o.clone();y.negative=0,M.negative=0;for(var v=0;y.isEven()&&M.isEven();v++)y.iushrn(1),M.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;M.isEven();)M.iushrn(1);var k=y.cmp(M);if(k<0){var D=y;y=M,M=D}else if(0===k||0===M.cmpn(1))break;y.isub(M)}return M.iushln(v)},d.prototype.invm=function(o){return this.egcd(o).a.umod(o)},d.prototype.isEven=function(){return 0==(1&this.words[0])},d.prototype.isOdd=function(){return 1==(1&this.words[0])},d.prototype.andln=function(o){return this.words[0]&o},d.prototype.bincn=function(o){O("number"==typeof o);var y=o%26,M=(o-y)/26,v=1<>>26,this.words[D]=N&=67108863}return 0!==k&&(this.words[D]=k,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(o){var M,y=o<0;if(0!==this.negative&&!y)return-1;if(0===this.negative&&y)return 1;if(this.strip(),this.length>1)M=1;else{y&&(o=-o),O(o<=67108863,"Number is too big");var v=0|this.words[0];M=v===o?0:vo.length)return 1;if(this.length=0;M--){var v=0|this.words[M],k=0|o.words[M];if(v!==k){vk&&(y=1);break}}return y},d.prototype.gtn=function(o){return 1===this.cmpn(o)},d.prototype.gt=function(o){return 1===this.cmp(o)},d.prototype.gten=function(o){return this.cmpn(o)>=0},d.prototype.gte=function(o){return this.cmp(o)>=0},d.prototype.ltn=function(o){return-1===this.cmpn(o)},d.prototype.lt=function(o){return-1===this.cmp(o)},d.prototype.lten=function(o){return this.cmpn(o)<=0},d.prototype.lte=function(o){return this.cmp(o)<=0},d.prototype.eqn=function(o){return 0===this.cmpn(o)},d.prototype.eq=function(o){return 0===this.cmp(o)},d.red=function(o){return new j(o)},d.prototype.toRed=function(o){return O(!this.red,"Already a number in reduction context"),O(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},d.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(o){return this.red=o,this},d.prototype.forceRed=function(o){return O(!this.red,"Already a number in reduction context"),this._forceRed(o)},d.prototype.redAdd=function(o){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},d.prototype.redIAdd=function(o){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},d.prototype.redSub=function(o){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},d.prototype.redISub=function(o){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},d.prototype.redShl=function(o){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},d.prototype.redMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},d.prototype.redIMul=function(o){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},d.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(o){return O(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var P={k256:null,p224:null,p192:null,p25519:null};function L(R,o){this.name=R,this.p=new d(o,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(R){if("string"==typeof R){var o=d._prime(R);this.m=o.p,this.prime=o}else O(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}function K(R){j.call(this,R),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}L.prototype._tmp=function(){var o=new d(null);return o.words=new Array(Math.ceil(this.n/13)),o},L.prototype.ireduce=function(o){var M,y=o;do{this.split(y,this.tmp),M=(y=(y=this.imulK(y)).iadd(this.tmp)).bitLength()}while(M>this.n);var v=M0?y.isub(this.p):void 0!==y.strip?y.strip():y._strip(),y},L.prototype.split=function(o,y){o.iushrn(this.n,0,y)},L.prototype.imulK=function(o){return o.imul(this.k)},E(V,L),V.prototype.split=function(o,y){for(var M=4194303,v=Math.min(o.length,9),k=0;k>>22,D=N}o.words[k-10]=D>>>=22,o.length-=0===D&&o.length>10?10:9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var y=0,M=0;M>>=26,o.words[M]=k,y=v}return 0!==y&&(o.words[o.length++]=y),o},d._prime=function(o){if(P[o])return P[o];var y;if("k256"===o)y=new V;else if("p224"===o)y=new W;else if("p192"===o)y=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);y=new H}return P[o]=y,y},j.prototype._verify1=function(o){O(0===o.negative,"red works only with positives"),O(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,y){O(0==(o.negative|y.negative),"red works only with positives"),O(o.red&&o.red===y.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,y){this._verify2(o,y);var M=o.add(y);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},j.prototype.iadd=function(o,y){this._verify2(o,y);var M=o.iadd(y);return M.cmp(this.m)>=0&&M.isub(this.m),M},j.prototype.sub=function(o,y){this._verify2(o,y);var M=o.sub(y);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},j.prototype.isub=function(o,y){this._verify2(o,y);var M=o.isub(y);return M.cmpn(0)<0&&M.iadd(this.m),M},j.prototype.shl=function(o,y){return this._verify1(o),this.imod(o.ushln(y))},j.prototype.imul=function(o,y){return this._verify2(o,y),this.imod(o.imul(y))},j.prototype.mul=function(o,y){return this._verify2(o,y),this.imod(o.mul(y))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var y=this.m.andln(3);if(O(y%2==1),3===y){var M=this.m.add(new d(1)).iushrn(2);return this.pow(o,M)}for(var v=this.m.subn(1),k=0;!v.isZero()&&0===v.andln(1);)k++,v.iushrn(1);O(!v.isZero());var D=new d(1).toRed(this),N=D.redNeg(),C=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);0!==this.pow(a,C).cmp(N);)a.redIAdd(N);for(var B=this.pow(a,v),Q=this.pow(o,v.addn(1).iushrn(1)),ee=this.pow(o,v),ce=k;0!==ee.cmp(D);){for(var ue=ee,we=0;0!==ue.cmp(D);we++)ue=ue.redSqr();O(we=0;k--){for(var B=y.words[k],Q=a-1;Q>=0;Q--){var ee=B>>Q&1;D!==v[0]&&(D=this.sqr(D)),0!==ee||0!==N?(N<<=1,N|=ee,(4==++C||0===k&&0===Q)&&(D=this.mul(D,v[N]),C=0,N=0)):C=0}a=26}return D},j.prototype.convertTo=function(o){var y=o.umod(this.m);return y===o?y.clone():y},j.prototype.convertFrom=function(o){var y=o.clone();return y.red=null,y},d.mont=function(o){return new K(o)},E(K,j),K.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},K.prototype.convertFrom=function(o){var y=this.imod(o.mul(this.rinv));return y.red=null,y},K.prototype.imul=function(o,y){if(o.isZero()||y.isZero())return o.words[0]=0,o.length=1,o;var M=o.imul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.mul=function(o,y){if(o.isZero()||y.isZero())return new d(0)._forceRed(this);var M=o.mul(y),v=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=M.isub(v).iushrn(this.shift),D=k;return k.cmp(this.m)>=0?D=k.isub(this.m):k.cmpn(0)<0&&(D=k.iadd(this.m)),D._forceRed(this)},K.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}}(bt=Y.nmd(bt),this)},31548:(bt,be,Y)=>{var ie=Y(81997),q=Y(30444),O=Y(84541),E=Y(46494),d=Y(85842),x=Y(12506),f=Y(6829),T=Y(55859).Buffer;bt.exports=function(u,m,_){var w;w=u.padding?u.padding:_?1:4;var P,S=ie(u),I=S.modulus.byteLength();if(m.length>I||new E(m).cmp(S.modulus)>=0)throw new Error("decryption error");P=_?f(new E(m),S):d(m,S);var L=T.alloc(I-P.length);if(P=T.concat([L,P],I),4===w)return function(h,u){var m=h.modulus.byteLength(),_=x("sha1").update(T.alloc(0)).digest(),w=_.length;if(0!==u[0])throw new Error("decryption error");var S=u.slice(1,w+1),I=u.slice(w+1),P=O(S,q(I,w)),L=O(I,q(P,m-w-1));if(function(h,u){h=T.from(h),u=T.from(u);var m=0,_=h.length;h.length!==u.length&&(m++,_=Math.min(h.length,u.length));for(var w=-1;++w<_;)m+=h[w]^u[w];return m}(_,L.slice(0,w)))throw new Error("decryption error");for(var V=w;0===L[V];)V++;if(1!==L[V++])throw new Error("decryption error");return L.slice(V)}(S,P);if(1===w)return function(h,u,m){for(var _=u.slice(0,2),w=2,S=0;0!==u[w++];)if(w>=u.length){S++;break}var I=u.slice(2,w-1);if(("0002"!==_.toString("hex")&&!m||"0001"!==_.toString("hex")&&m)&&S++,I.length<8&&S++,S)throw new Error("decryption error");return u.slice(w)}(0,P,_);if(3===w)return P;throw new Error("unknown padding")}},74760:(bt,be,Y)=>{var ie=Y(81997),q=Y(16589),O=Y(12506),E=Y(30444),d=Y(84541),x=Y(46494),f=Y(6829),T=Y(85842),g=Y(55859).Buffer;bt.exports=function(m,_,w){var S;S=m.padding?m.padding:w?1:4;var P,I=ie(m);if(4===S)P=function(u,m){var _=u.modulus.byteLength(),w=m.length,S=O("sha1").update(g.alloc(0)).digest(),I=S.length,P=2*I;if(w>_-P-2)throw new Error("message too long");var L=g.alloc(_-w-P-2),V=_-I-1,W=q(I),G=d(g.concat([S,L,g.alloc(1,1),m],V),E(W,V)),H=d(W,E(G,I));return new x(g.concat([g.alloc(1),H,G],_))}(I,_);else if(1===S)P=function(u,m,_){var I,w=m.length,S=u.modulus.byteLength();if(w>S-11)throw new Error("message too long");return I=_?g.alloc(S-w-3,255):function(u){for(var I,m=g.allocUnsafe(u),_=0,w=q(2*u),S=0;_=0)throw new Error("data too long for modulus")}return w?T(P,I):f(P,I)}},6829:(bt,be,Y)=>{var ie=Y(46494),q=Y(55859).Buffer;bt.exports=function(E,d){return q.from(E.toRed(ie.mont(d.modulus)).redPow(new ie(d.publicExponent)).fromRed().toArray())}},84541:bt=>{bt.exports=function(Y,ie){for(var q=Y.length,O=-1;++O{"use strict";var be=String.prototype.replace,Y=/%20/g;bt.exports={default:"RFC3986",formatters:{RFC1738:function(q){return be.call(q,Y,"+")},RFC3986:function(q){return String(q)}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},59009:(bt,be,Y)=>{"use strict";var ie=Y(75672),q=Y(19913),O=Y(8157);bt.exports={formats:O,parse:q,stringify:ie}},19913:(bt,be,Y)=>{"use strict";var ie=Y(16835),q=Object.prototype.hasOwnProperty,O=Array.isArray,E={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ie.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},x=function(u,m){return u&&"string"==typeof u&&m.comma&&u.indexOf(",")>-1?u.split(","):u},l=function(m,_,w,S){if(m){var I=w.allowDots?m.replace(/\.([^.[]+)/g,"[$1]"):m,L=/(\[[^[\]]*])/g,V=w.depth>0&&/(\[[^[\]]*])/.exec(I),W=V?I.slice(0,V.index):I,G=[];if(W){if(!w.plainObjects&&q.call(Object.prototype,W)&&!w.allowPrototypes)return;G.push(W)}for(var H=0;w.depth>0&&null!==(V=L.exec(I))&&H=0;--I){var P,L=u[I];if("[]"===L&&_.parseArrays)P=[].concat(S);else{P=_.plainObjects?Object.create(null):{};var V="["===L.charAt(0)&&"]"===L.charAt(L.length-1)?L.slice(1,-1):L,W=parseInt(V,10);_.parseArrays||""!==V?!isNaN(W)&&L!==V&&String(W)===V&&W>=0&&_.parseArrays&&W<=_.arrayLimit?(P=[])[W]=S:"__proto__"!==V&&(P[V]=S):P={0:S}}S=P}return S}(G,_,w,S)}};bt.exports=function(u,m){var _=function(m){if(!m)return E;if(null!=m.decoder&&"function"!=typeof m.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==m.charset&&"utf-8"!==m.charset&&"iso-8859-1"!==m.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===m.allowDots?E.allowDots:!!m.allowDots,allowPrototypes:"boolean"==typeof m.allowPrototypes?m.allowPrototypes:E.allowPrototypes,allowSparse:"boolean"==typeof m.allowSparse?m.allowSparse:E.allowSparse,arrayLimit:"number"==typeof m.arrayLimit?m.arrayLimit:E.arrayLimit,charset:void 0===m.charset?E.charset:m.charset,charsetSentinel:"boolean"==typeof m.charsetSentinel?m.charsetSentinel:E.charsetSentinel,comma:"boolean"==typeof m.comma?m.comma:E.comma,decoder:"function"==typeof m.decoder?m.decoder:E.decoder,delimiter:"string"==typeof m.delimiter||ie.isRegExp(m.delimiter)?m.delimiter:E.delimiter,depth:"number"==typeof m.depth||!1===m.depth?+m.depth:E.depth,ignoreQueryPrefix:!0===m.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof m.interpretNumericEntities?m.interpretNumericEntities:E.interpretNumericEntities,parameterLimit:"number"==typeof m.parameterLimit?m.parameterLimit:E.parameterLimit,parseArrays:!1!==m.parseArrays,plainObjects:"boolean"==typeof m.plainObjects?m.plainObjects:E.plainObjects,strictNullHandling:"boolean"==typeof m.strictNullHandling?m.strictNullHandling:E.strictNullHandling}}(m);if(""===u||null==u)return _.plainObjects?Object.create(null):{};for(var w="string"==typeof u?function(m,_){var V,w={__proto__:null},P=(_.ignoreQueryPrefix?m.replace(/^\?/,""):m).split(_.delimiter,_.parameterLimit===1/0?void 0:_.parameterLimit),L=-1,W=_.charset;if(_.charsetSentinel)for(V=0;V{"use strict";var ie=Y(11144),q=Y(16835),O=Y(8157),E=Object.prototype.hasOwnProperty,d={brackets:function(S){return S+"[]"},comma:"comma",indices:function(S,I){return S+"["+I+"]"},repeat:function(S){return S}},x=Array.isArray,f=Array.prototype.push,T=function(w,S){f.apply(w,x(S)?S:[S])},g=Date.prototype.toISOString,b=O.default,l={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:q.encode,encodeValuesOnly:!1,format:b,formatter:O.formatters[b],indices:!1,serializeDate:function(S){return g.call(S)},skipNulls:!1,strictNullHandling:!1},u={},m=function w(S,I,P,L,V,W,G,H,j,K,R,o,y,M,v,k){for(var D=S,N=k,C=0,a=!1;void 0!==(N=N.get(u))&&!a;){var B=N.get(S);if(C+=1,void 0!==B){if(B===C)throw new RangeError("Cyclic object value");a=!0}void 0===N.get(u)&&(C=0)}if("function"==typeof H?D=H(I,D):D instanceof Date?D=R(D):"comma"===P&&x(D)&&(D=q.maybeMap(D,function(pe){return pe instanceof Date?R(pe):pe})),null===D){if(V)return G&&!M?G(I,l.encoder,v,"key",o):I;D=""}if(function(S){return"string"==typeof S||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S}(D)||q.isBuffer(D))return G?[y(M?I:G(I,l.encoder,v,"key",o))+"="+y(G(D,l.encoder,v,"value",o))]:[y(I)+"="+y(String(D))];var ce,ee=[];if(void 0===D)return ee;if("comma"===P&&x(D))M&&G&&(D=q.maybeMap(D,G)),ce=[{value:D.length>0?D.join(",")||null:void 0}];else if(x(H))ce=H;else{var ue=Object.keys(D);ce=j?ue.sort(j):ue}for(var we=L&&x(D)&&1===D.length?I+"[]":I,ae=0;ae0?M+y:""}},16835:(bt,be,Y)=>{"use strict";var ie=Y(8157),q=Object.prototype.hasOwnProperty,O=Array.isArray,E=function(){for(var w=[],S=0;S<256;++S)w.push("%"+((S<16?"0":"")+S.toString(16)).toUpperCase());return w}(),x=function(S,I){for(var P=I&&I.plainObjects?Object.create(null):{},L=0;L1;){var I=S.pop(),P=I.obj[I.prop];if(O(P)){for(var L=[],V=0;V=48&&j<=57||j>=65&&j<=90||j>=97&&j<=122||V===ie.RFC1738&&(40===j||41===j)?G+=W.charAt(H):j<128?G+=E[j]:j<2048?G+=E[192|j>>6]+E[128|63&j]:j<55296||j>=57344?G+=E[224|j>>12]+E[128|j>>6&63]+E[128|63&j]:(j=65536+((1023&j)<<10|1023&W.charCodeAt(H+=1)),G+=E[240|j>>18]+E[128|j>>12&63]+E[128|j>>6&63]+E[128|63&j])}return G},isBuffer:function(S){return!(!S||"object"!=typeof S||!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S)))},isRegExp:function(S){return"[object RegExp]"===Object.prototype.toString.call(S)},maybeMap:function(S,I){if(O(S)){for(var P=[],L=0;L{"use strict";function be(ie){try{return JSON.stringify(ie)}catch{return'"[Circular]"'}}bt.exports=function(ie,q,O){var E=O&&O.stringify||be;if("object"==typeof ie&&null!==ie){var x=q.length+1;if(1===x)return ie;var f=new Array(x);f[0]=E(ie);for(var T=1;T-1?h:0,ie.charCodeAt(m+1)){case 100:case 102:if(l>=g||null==q[l])break;h=g||null==q[l])break;h=g||void 0===q[l])break;h",h=m+2,m++;break}b+=E(q[l]),h=m+2,m++;break;case 115:if(l>=g)break;h{"use strict";var E=Y(55859).Buffer,d=global.crypto||global.msCrypto;bt.exports=d&&d.getRandomValues?function(f,T){if(f>4294967295)throw new RangeError("requested too many random bytes");var g=E.allocUnsafe(f);if(f>0)if(f>65536)for(var b=0;b{"use strict";function ie(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var q=Y(55859),O=Y(16589),E=q.Buffer,d=q.kMaxLength,x=global.crypto||global.msCrypto,f=Math.pow(2,32)-1;function T(u,m){if("number"!=typeof u||u!=u)throw new TypeError("offset must be a number");if(u>f||u<0)throw new TypeError("offset must be a uint32");if(u>d||u>m)throw new RangeError("offset out of range")}function g(u,m,_){if("number"!=typeof u||u!=u)throw new TypeError("size must be a number");if(u>f||u<0)throw new TypeError("size must be a uint32");if(u+m>_||u>d)throw new RangeError("buffer too small")}function l(u,m,_,w){if(process.browser){var I=new Uint8Array(u.buffer,m,_);return x.getRandomValues(I),w?void process.nextTick(function(){w(null,u)}):u}if(!w)return O(_).copy(u,m),u;O(_,function(L,V){if(L)return w(L);V.copy(u,m),w(null,u)})}x&&x.getRandomValues||!process.browser?(be.randomFill=function(u,m,_,w){if(!(E.isBuffer(u)||u instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof m)w=m,m=0,_=u.length;else if("function"==typeof _)w=_,_=u.length-m;else if("function"!=typeof w)throw new TypeError('"cb" argument must be a function');return T(m,u.length),g(_,m,u.length),l(u,m,_,w)},be.randomFillSync=function(u,m,_){if(void 0===m&&(m=0),!(E.isBuffer(u)||u instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return T(m,u.length),void 0===_&&(_=u.length-m),g(_,m,u.length),l(u,m,_)}):(be.randomFill=ie,be.randomFillSync=ie)},48230:bt=>{"use strict";var Y={};function ie(x,f,T){T||(T=Error);var b=function(l){function h(u,m,_){return l.call(this,function(l,h,u){return"string"==typeof f?f:f(l,h,u)}(u,m,_))||this}return function(x,f){x.prototype=Object.create(f.prototype),x.prototype.constructor=x,x.__proto__=f}(h,l),h}(T);b.prototype.name=T.name,b.prototype.code=x,Y[x]=b}function q(x,f){if(Array.isArray(x)){var T=x.length;return x=x.map(function(g){return String(g)}),T>2?"one of ".concat(f," ").concat(x.slice(0,T-1).join(", "),", or ")+x[T-1]:2===T?"one of ".concat(f," ").concat(x[0]," or ").concat(x[1]):"of ".concat(f," ").concat(x[0])}return"of ".concat(f," ").concat(String(x))}ie("ERR_INVALID_OPT_VALUE",function(x,f){return'The value "'+f+'" is invalid for option "'+x+'"'},TypeError),ie("ERR_INVALID_ARG_TYPE",function(x,f,T){var g,b;if("string"==typeof f&&function(x,f,T){return x.substr(0,f.length)===f}(f,"not ")?(g="must not be",f=f.replace(/^not /,"")):g="must be",function(x,f,T){return(void 0===T||T>x.length)&&(T=x.length),x.substring(T-f.length,T)===f}(x," argument"))b="The ".concat(x," ").concat(g," ").concat(q(f,"type"));else{var l=function(x,f,T){return"number"!=typeof T&&(T=0),!(T+".".length>x.length)&&-1!==x.indexOf(".",T)}(x)?"property":"argument";b='The "'.concat(x,'" ').concat(l," ").concat(g," ").concat(q(f,"type"))}return b+". Received type ".concat(typeof T)},TypeError),ie("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ie("ERR_METHOD_NOT_IMPLEMENTED",function(x){return"The "+x+" method is not implemented"}),ie("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ie("ERR_STREAM_DESTROYED",function(x){return"Cannot call "+x+" after a stream was destroyed"}),ie("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ie("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ie("ERR_STREAM_WRITE_AFTER_END","write after end"),ie("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ie("ERR_UNKNOWN_ENCODING",function(x){return"Unknown encoding: "+x},TypeError),ie("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),bt.exports.q=Y},20942:(bt,be,Y)=>{"use strict";var ie=Object.keys||function(b){var l=[];for(var h in b)l.push(h);return l};bt.exports=f;var q=Y(32833),O=Y(37807);Y(59879)(f,q);for(var E=ie(O.prototype),d=0;d{"use strict";bt.exports=q;var ie=Y(55431);function q(O){if(!(this instanceof q))return new q(O);ie.call(this,O)}Y(59879)(q,ie),q.prototype._transform=function(O,E,d){d(null,O)}},32833:(bt,be,Y)=>{"use strict";var ie;bt.exports=R,R.ReadableState=K,Y(93105);var b,O=function(xe,Ce){return xe.listeners(Ce).length},E=Y(75112),d=Y(3875).Buffer,x=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},g=Y(94616);b=g&&g.debuglog?g.debuglog("stream"):function(){};var L,V,W,l=Y(39370),h=Y(10806),m=Y(12903).getHighWaterMark,_=Y(48230).q,w=_.ERR_INVALID_ARG_TYPE,S=_.ERR_STREAM_PUSH_AFTER_EOF,I=_.ERR_METHOD_NOT_IMPLEMENTED,P=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Y(59879)(R,E);var G=h.errorOrDestroy,H=["error","close","destroy","pause","resume"];function K(_e,xe,Ce){ie=ie||Y(20942),"boolean"!=typeof Ce&&(Ce=xe instanceof ie),this.objectMode=!!(_e=_e||{}).objectMode,Ce&&(this.objectMode=this.objectMode||!!_e.readableObjectMode),this.highWaterMark=m(this,_e,"readableHighWaterMark",Ce),this.buffer=new l,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&&(L||(L=Y(32519).s),this.decoder=new L(_e.encoding),this.encoding=_e.encoding)}function R(_e){if(ie=ie||Y(20942),!(this instanceof R))return new R(_e);this._readableState=new K(_e,this,this instanceof ie),this.readable=!0,_e&&("function"==typeof _e.read&&(this._read=_e.read),"function"==typeof _e.destroy&&(this._destroy=_e.destroy)),E.call(this)}function o(_e,xe,Ce,ke,me){b("readableAddChunk",xe);var ze,Ee=_e._readableState;if(null===xe)Ee.reading=!1,function(_e,xe){if(b("onEofChunk"),!xe.ended){if(xe.decoder){var Ce=xe.decoder.end();Ce&&Ce.length&&(xe.buffer.push(Ce),xe.length+=xe.objectMode?1:Ce.length)}xe.ended=!0,xe.sync?C(_e):(xe.needReadable=!1,xe.emittedReadable||(xe.emittedReadable=!0,a(_e)))}}(_e,Ee);else if(me||(ze=function(_e,xe){var Ce;return!function(_e){return d.isBuffer(_e)||_e instanceof x}(xe)&&"string"!=typeof xe&&void 0!==xe&&!_e.objectMode&&(Ce=new w("chunk",["string","Buffer","Uint8Array"],xe)),Ce}(Ee,xe)),ze)G(_e,ze);else if(Ee.objectMode||xe&&xe.length>0)if("string"!=typeof xe&&!Ee.objectMode&&Object.getPrototypeOf(xe)!==d.prototype&&(xe=function(_e){return d.from(_e)}(xe)),ke)Ee.endEmitted?G(_e,new P):y(_e,Ee,xe,!0);else if(Ee.ended)G(_e,new S);else{if(Ee.destroyed)return!1;Ee.reading=!1,Ee.decoder&&!Ce?(xe=Ee.decoder.write(xe),Ee.objectMode||0!==xe.length?y(_e,Ee,xe,!1):B(_e,Ee)):y(_e,Ee,xe,!1)}else ke||(Ee.reading=!1,B(_e,Ee));return!Ee.ended&&(Ee.lengthxe.highWaterMark&&(xe.highWaterMark=function(_e){return _e>=v?_e=v:(_e--,_e|=_e>>>1,_e|=_e>>>2,_e|=_e>>>4,_e|=_e>>>8,_e|=_e>>>16,_e++),_e}(_e)),_e<=xe.length?_e:xe.ended?xe.length:(xe.needReadable=!0,0))}function C(_e){var xe=_e._readableState;b("emitReadable",xe.needReadable,xe.emittedReadable),xe.needReadable=!1,xe.emittedReadable||(b("emitReadable",xe.flowing),xe.emittedReadable=!0,process.nextTick(a,_e))}function a(_e){var xe=_e._readableState;b("emitReadable_",xe.destroyed,xe.length,xe.ended),!xe.destroyed&&(xe.length||xe.ended)&&(_e.emit("readable"),xe.emittedReadable=!1),xe.needReadable=!xe.flowing&&!xe.ended&&xe.length<=xe.highWaterMark,Te(_e)}function B(_e,xe){xe.readingMore||(xe.readingMore=!0,process.nextTick(Q,_e,xe))}function Q(_e,xe){for(;!xe.reading&&!xe.ended&&(xe.length0,xe.resumeScheduled&&!xe.paused?xe.flowing=!0:_e.listenerCount("data")>0&&_e.resume()}function ue(_e){b("readable nexttick read 0"),_e.read(0)}function ae(_e,xe){b("resume",xe.reading),xe.reading||_e.read(0),xe.resumeScheduled=!1,_e.emit("resume"),Te(_e),xe.flowing&&!xe.reading&&_e.read(0)}function Te(_e){var xe=_e._readableState;for(b("flow",xe.flowing);xe.flowing&&null!==_e.read(););}function le(_e,xe){return 0===xe.length?null:(xe.objectMode?Ce=xe.buffer.shift():!_e||_e>=xe.length?(Ce=xe.decoder?xe.buffer.join(""):1===xe.buffer.length?xe.buffer.first():xe.buffer.concat(xe.length),xe.buffer.clear()):Ce=xe.buffer.consume(_e,xe.decoder),Ce);var Ce}function X(_e){var xe=_e._readableState;b("endReadable",xe.endEmitted),xe.endEmitted||(xe.ended=!0,process.nextTick(ne,xe,_e))}function ne(_e,xe){if(b("endReadableNT",_e.endEmitted,_e.length),!_e.endEmitted&&0===_e.length&&(_e.endEmitted=!0,xe.readable=!1,xe.emit("end"),_e.autoDestroy)){var Ce=xe._writableState;(!Ce||Ce.autoDestroy&&Ce.finished)&&xe.destroy()}}function pe(_e,xe){for(var Ce=0,ke=_e.length;Ce=xe.highWaterMark:xe.length>0)||xe.ended))return b("read: emitReadable",xe.length,xe.ended),0===xe.length&&xe.ended?X(this):C(this),null;if(0===(_e=D(_e,xe))&&xe.ended)return 0===xe.length&&X(this),null;var me,ke=xe.needReadable;return b("need readable",ke),(0===xe.length||xe.length-_e0?le(_e,xe):null)?(xe.needReadable=xe.length<=xe.highWaterMark,_e=0):(xe.length-=_e,xe.awaitDrain=0),0===xe.length&&(xe.ended||(xe.needReadable=!0),Ce!==_e&&xe.ended&&X(this)),null!==me&&this.emit("data",me),me},R.prototype._read=function(_e){G(this,new I("_read()"))},R.prototype.pipe=function(_e,xe){var Ce=this,ke=this._readableState;switch(ke.pipesCount){case 0:ke.pipes=_e;break;case 1:ke.pipes=[ke.pipes,_e];break;default:ke.pipes.push(_e)}ke.pipesCount+=1,b("pipe count=%d opts=%j",ke.pipesCount,xe);var Ee=xe&&!1===xe.end||_e===process.stdout||_e===process.stderr?Ye:Ve;function Ve(){b("onend"),_e.end()}ke.endEmitted?process.nextTick(Ee):Ce.once("end",Ee),_e.on("unpipe",function ze(gt,St){b("onunpipe"),gt===Ce&&St&&!1===St.hasUnpiped&&(St.hasUnpiped=!0,b("cleanup"),_e.removeListener("close",Pt),_e.removeListener("finish",st),_e.removeListener("drain",nt),_e.removeListener("error",wt),_e.removeListener("unpipe",ze),Ce.removeListener("end",Ve),Ce.removeListener("end",Ye),Ce.removeListener("data",ht),tt=!0,ke.awaitDrain&&(!_e._writableState||_e._writableState.needDrain)&&nt())});var nt=function(_e){return function(){var Ce=_e._readableState;b("pipeOnDrain",Ce.awaitDrain),Ce.awaitDrain&&Ce.awaitDrain--,0===Ce.awaitDrain&&O(_e,"data")&&(Ce.flowing=!0,Te(_e))}}(Ce);_e.on("drain",nt);var tt=!1;function ht(gt){b("ondata");var St=_e.write(gt);b("dest.write",St),!1===St&&((1===ke.pipesCount&&ke.pipes===_e||ke.pipesCount>1&&-1!==pe(ke.pipes,_e))&&!tt&&(b("false write response, pause",ke.awaitDrain),ke.awaitDrain++),Ce.pause())}function wt(gt){b("onerror",gt),Ye(),_e.removeListener("error",wt),0===O(_e,"error")&&G(_e,gt)}function Pt(){_e.removeListener("finish",st),Ye()}function st(){b("onfinish"),_e.removeListener("close",Pt),Ye()}function Ye(){b("unpipe"),Ce.unpipe(_e)}return Ce.on("data",ht),function(_e,xe,Ce){if("function"==typeof _e.prependListener)return _e.prependListener(xe,Ce);_e._events&&_e._events[xe]?Array.isArray(_e._events[xe])?_e._events[xe].unshift(Ce):_e._events[xe]=[Ce,_e._events[xe]]:_e.on(xe,Ce)}(_e,"error",wt),_e.once("close",Pt),_e.once("finish",st),_e.emit("pipe",Ce),ke.flowing||(b("pipe resume"),Ce.resume()),_e},R.prototype.unpipe=function(_e){var xe=this._readableState,Ce={hasUnpiped:!1};if(0===xe.pipesCount)return this;if(1===xe.pipesCount)return _e&&_e!==xe.pipes||(_e||(_e=xe.pipes),xe.pipes=null,xe.pipesCount=0,xe.flowing=!1,_e&&_e.emit("unpipe",this,Ce)),this;if(!_e){var ke=xe.pipes,me=xe.pipesCount;xe.pipes=null,xe.pipesCount=0,xe.flowing=!1;for(var Ee=0;Ee0,!1!==ke.flowing&&this.resume()):"readable"===_e&&!ke.endEmitted&&!ke.readableListening&&(ke.readableListening=ke.needReadable=!0,ke.flowing=!1,ke.emittedReadable=!1,b("on readable",ke.length,ke.reading),ke.length?C(this):ke.reading||process.nextTick(ue,this)),Ce},R.prototype.removeListener=function(_e,xe){var Ce=E.prototype.removeListener.call(this,_e,xe);return"readable"===_e&&process.nextTick(ce,this),Ce},R.prototype.removeAllListeners=function(_e){var xe=E.prototype.removeAllListeners.apply(this,arguments);return("readable"===_e||void 0===_e)&&process.nextTick(ce,this),xe},R.prototype.resume=function(){var _e=this._readableState;return _e.flowing||(b("resume"),_e.flowing=!_e.readableListening,function(_e,xe){xe.resumeScheduled||(xe.resumeScheduled=!0,process.nextTick(ae,_e,xe))}(this,_e)),_e.paused=!1,this},R.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(_e){var xe=this,Ce=this._readableState,ke=!1;for(var me in _e.on("end",function(){if(b("wrapped end"),Ce.decoder&&!Ce.ended){var ze=Ce.decoder.end();ze&&ze.length&&xe.push(ze)}xe.push(null)}),_e.on("data",function(ze){b("wrapped data"),Ce.decoder&&(ze=Ce.decoder.write(ze)),Ce.objectMode&&null==ze||!(Ce.objectMode||ze&&ze.length)||xe.push(ze)||(ke=!0,_e.pause())}),_e)void 0===this[me]&&"function"==typeof _e[me]&&(this[me]=function(Ve){return function(){return _e[Ve].apply(_e,arguments)}}(me));for(var Ee=0;Ee{"use strict";bt.exports=T;var ie=Y(48230).q,q=ie.ERR_METHOD_NOT_IMPLEMENTED,O=ie.ERR_MULTIPLE_CALLBACK,E=ie.ERR_TRANSFORM_ALREADY_TRANSFORMING,d=ie.ERR_TRANSFORM_WITH_LENGTH_0,x=Y(20942);function f(l,h){var u=this._transformState;u.transforming=!1;var m=u.writecb;if(null===m)return this.emit("error",new O);u.writechunk=null,u.writecb=null,null!=h&&this.push(h),m(l);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}function T(l){if(!(this instanceof T))return new T(l);x.call(this,l),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&("function"==typeof l.transform&&(this._transform=l.transform),"function"==typeof l.flush&&(this._flush=l.flush)),this.on("prefinish",g)}function g(){var l=this;"function"!=typeof this._flush||this._readableState.destroyed?b(this,null,null):this._flush(function(h,u){b(l,h,u)})}function b(l,h,u){if(h)return l.emit("error",h);if(null!=u&&l.push(u),l._writableState.length)throw new d;if(l._transformState.transforming)throw new E;return l.push(null)}Y(59879)(T,x),T.prototype.push=function(l,h){return this._transformState.needTransform=!1,x.prototype.push.call(this,l,h)},T.prototype._transform=function(l,h,u){u(new q("_transform()"))},T.prototype._write=function(l,h,u){var m=this._transformState;if(m.writecb=u,m.writechunk=l,m.writeencoding=h,!m.transforming){var _=this._readableState;(m.needTransform||_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}},T.prototype._read=function(l){var h=this._transformState;null===h.writechunk||h.transforming?h.needTransform=!0:(h.transforming=!0,this._transform(h.writechunk,h.writeencoding,h.afterTransform))},T.prototype._destroy=function(l,h){x.prototype._destroy.call(this,l,function(u){h(u)})}},37807:(bt,be,Y)=>{"use strict";function q(Te){var le=this;this.next=null,this.entry=null,this.finish=function(){!function(Te,le,X){var ne=Te.entry;for(Te.entry=null;ne;){var pe=ne.callback;le.pendingcb--,pe(undefined),ne=ne.next}le.corkedRequestsFree.next=Te}(le,Te)}}var O;bt.exports=K,K.WritableState=H;var j,E={deprecate:Y(15822)},d=Y(75112),x=Y(3875).Buffer,f=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},b=Y(10806),h=Y(12903).getHighWaterMark,u=Y(48230).q,m=u.ERR_INVALID_ARG_TYPE,_=u.ERR_METHOD_NOT_IMPLEMENTED,w=u.ERR_MULTIPLE_CALLBACK,S=u.ERR_STREAM_CANNOT_PIPE,I=u.ERR_STREAM_DESTROYED,P=u.ERR_STREAM_NULL_VALUES,L=u.ERR_STREAM_WRITE_AFTER_END,V=u.ERR_UNKNOWN_ENCODING,W=b.errorOrDestroy;function G(){}function H(Te,le,X){O=O||Y(20942),"boolean"!=typeof X&&(X=le instanceof O),this.objectMode=!!(Te=Te||{}).objectMode,X&&(this.objectMode=this.objectMode||!!Te.writableObjectMode),this.highWaterMark=h(this,Te,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===Te.decodeStrings),this.defaultEncoding=Te.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pe){!function(Te,le){var X=Te._writableState,ne=X.sync,pe=X.writecb;if("function"!=typeof pe)throw new w;if(function(Te){Te.writing=!1,Te.writecb=null,Te.length-=Te.writelen,Te.writelen=0}(X),le)!function(Te,le,X,ne,pe){--le.pendingcb,X?(process.nextTick(pe,ne),process.nextTick(ue,Te,le),Te._writableState.errorEmitted=!0,W(Te,ne)):(pe(ne),Te._writableState.errorEmitted=!0,W(Te,ne),ue(Te,le))}(Te,X,ne,le,pe);else{var _e=Q(X)||Te.destroyed;!_e&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest&&B(Te,X),ne?process.nextTick(C,Te,X,_e,pe):C(Te,X,_e,pe)}}(le,pe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==Te.emitClose,this.autoDestroy=!!Te.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new q(this)}function K(Te){var le=this instanceof(O=O||Y(20942));if(!le&&!j.call(K,this))return new K(Te);this._writableState=new H(Te,this,le),this.writable=!0,Te&&("function"==typeof Te.write&&(this._write=Te.write),"function"==typeof Te.writev&&(this._writev=Te.writev),"function"==typeof Te.destroy&&(this._destroy=Te.destroy),"function"==typeof Te.final&&(this._final=Te.final)),d.call(this)}function v(Te,le,X,ne,pe,_e,xe){le.writelen=ne,le.writecb=xe,le.writing=!0,le.sync=!0,le.destroyed?le.onwrite(new I("write")):X?Te._writev(pe,le.onwrite):Te._write(pe,_e,le.onwrite),le.sync=!1}function C(Te,le,X,ne){X||function(Te,le){0===le.length&&le.needDrain&&(le.needDrain=!1,Te.emit("drain"))}(Te,le),le.pendingcb--,ne(),ue(Te,le)}function B(Te,le){le.bufferProcessing=!0;var X=le.bufferedRequest;if(Te._writev&&X&&X.next){var pe=new Array(le.bufferedRequestCount),_e=le.corkedRequestsFree;_e.entry=X;for(var xe=0,Ce=!0;X;)pe[xe]=X,X.isBuf||(Ce=!1),X=X.next,xe+=1;pe.allBuffers=Ce,v(Te,le,!0,le.length,pe,"",_e.finish),le.pendingcb++,le.lastBufferedRequest=null,_e.next?(le.corkedRequestsFree=_e.next,_e.next=null):le.corkedRequestsFree=new q(le),le.bufferedRequestCount=0}else{for(;X;){var ke=X.chunk;if(v(Te,le,!1,le.objectMode?1:ke.length,ke,X.encoding,X.callback),X=X.next,le.bufferedRequestCount--,le.writing)break}null===X&&(le.lastBufferedRequest=null)}le.bufferedRequest=X,le.bufferProcessing=!1}function Q(Te){return Te.ending&&0===Te.length&&null===Te.bufferedRequest&&!Te.finished&&!Te.writing}function ee(Te,le){Te._final(function(X){le.pendingcb--,X&&W(Te,X),le.prefinished=!0,Te.emit("prefinish"),ue(Te,le)})}function ue(Te,le){var X=Q(le);if(X&&(function(Te,le){!le.prefinished&&!le.finalCalled&&("function"!=typeof Te._final||le.destroyed?(le.prefinished=!0,Te.emit("prefinish")):(le.pendingcb++,le.finalCalled=!0,process.nextTick(ee,Te,le)))}(Te,le),0===le.pendingcb&&(le.finished=!0,Te.emit("finish"),le.autoDestroy))){var ne=Te._readableState;(!ne||ne.autoDestroy&&ne.endEmitted)&&Te.destroy()}return X}Y(59879)(K,d),H.prototype.getBuffer=function(){for(var le=this.bufferedRequest,X=[];le;)X.push(le),le=le.next;return X},function(){try{Object.defineProperty(H.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(le){return!!j.call(this,le)||this===K&&le&&le._writableState instanceof H}})):j=function(le){return le instanceof this},K.prototype.pipe=function(){W(this,new S)},K.prototype.write=function(Te,le,X){var ne=this._writableState,pe=!1,_e=!ne.objectMode&&function(Te){return x.isBuffer(Te)||Te instanceof f}(Te);return _e&&!x.isBuffer(Te)&&(Te=function(Te){return x.from(Te)}(Te)),"function"==typeof le&&(X=le,le=null),_e?le="buffer":le||(le=ne.defaultEncoding),"function"!=typeof X&&(X=G),ne.ending?function(Te,le){var X=new L;W(Te,X),process.nextTick(le,X)}(this,X):(_e||function(Te,le,X,ne){var pe;return null===X?pe=new P:"string"!=typeof X&&!le.objectMode&&(pe=new m("chunk",["string","Buffer"],X)),!pe||(W(Te,pe),process.nextTick(ne,pe),!1)}(this,ne,Te,X))&&(ne.pendingcb++,pe=function(Te,le,X,ne,pe,_e){if(!X){var xe=function(Te,le,X){return!Te.objectMode&&!1!==Te.decodeStrings&&"string"==typeof le&&(le=x.from(le,X)),le}(le,ne,pe);ne!==xe&&(X=!0,pe="buffer",ne=xe)}var Ce=le.objectMode?1:ne.length;le.length+=Ce;var ke=le.length-1))throw new V(le);return this._writableState.defaultEncoding=le,this},Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),K.prototype._write=function(Te,le,X){X(new _("_write()"))},K.prototype._writev=null,K.prototype.end=function(Te,le,X){var ne=this._writableState;return"function"==typeof Te?(X=Te,Te=null,le=null):"function"==typeof le&&(X=le,le=null),null!=Te&&this.write(Te,le),ne.corked&&(ne.corked=1,this.uncork()),ne.ending||function(Te,le,X){le.ending=!0,ue(Te,le),X&&(le.finished?process.nextTick(X):Te.once("finish",X)),le.ended=!0,Te.writable=!1}(this,ne,X),this},Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(le){!this._writableState||(this._writableState.destroyed=le)}}),K.prototype.destroy=b.destroy,K.prototype._undestroy=b.undestroy,K.prototype._destroy=function(Te,le){le(Te)}},19983:(bt,be,Y)=>{"use strict";var ie;function q(L,V,W){return V=function(L){var V=function(L,V){if("object"!=typeof L||null===L)return L;var W=L[Symbol.toPrimitive];if(void 0!==W){var G=W.call(L,V);if("object"!=typeof G)return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(L)}(L,"string");return"symbol"==typeof V?V:String(V)}(V),V in L?Object.defineProperty(L,V,{value:W,enumerable:!0,configurable:!0,writable:!0}):L[V]=W,L}var d=Y(6820),x=Symbol("lastResolve"),f=Symbol("lastReject"),T=Symbol("error"),g=Symbol("ended"),b=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function u(L,V){return{value:L,done:V}}function m(L){var V=L[x];if(null!==V){var W=L[h].read();null!==W&&(L[b]=null,L[x]=null,L[f]=null,V(u(W,!1)))}}function _(L){process.nextTick(m,L)}var S=Object.getPrototypeOf(function(){}),I=Object.setPrototypeOf((q(ie={get stream(){return this[h]},next:function(){var V=this,W=this[T];if(null!==W)return Promise.reject(W);if(this[g])return Promise.resolve(u(void 0,!0));if(this[h].destroyed)return new Promise(function(K,R){process.nextTick(function(){V[T]?R(V[T]):K(u(void 0,!0))})});var H,G=this[b];if(G)H=new Promise(function(L,V){return function(W,G){L.then(function(){V[g]?W(u(void 0,!0)):V[l](W,G)},G)}}(G,this));else{var j=this[h].read();if(null!==j)return Promise.resolve(u(j,!1));H=new Promise(this[l])}return this[b]=H,H}},Symbol.asyncIterator,function(){return this}),q(ie,"return",function(){var V=this;return new Promise(function(W,G){V[h].destroy(null,function(H){H?G(H):W(u(void 0,!0))})})}),ie),S);bt.exports=function(V){var W,G=Object.create(I,(q(W={},h,{value:V,writable:!0}),q(W,x,{value:null,writable:!0}),q(W,f,{value:null,writable:!0}),q(W,T,{value:null,writable:!0}),q(W,g,{value:V._readableState.endEmitted,writable:!0}),q(W,l,{value:function(j,K){var R=G[h].read();R?(G[b]=null,G[x]=null,G[f]=null,j(u(R,!1))):(G[x]=j,G[f]=K)},writable:!0}),W));return G[b]=null,d(V,function(H){if(H&&"ERR_STREAM_PREMATURE_CLOSE"!==H.code){var j=G[f];return null!==j&&(G[b]=null,G[x]=null,G[f]=null,j(H)),void(G[T]=H)}var K=G[x];null!==K&&(G[b]=null,G[x]=null,G[f]=null,K(u(void 0,!0))),G[g]=!0}),V.on("readable",_.bind(null,G)),G}},39370:(bt,be,Y)=>{"use strict";function ie(_,w){var S=Object.keys(_);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(_);w&&(I=I.filter(function(P){return Object.getOwnPropertyDescriptor(_,P).enumerable})),S.push.apply(S,I)}return S}function q(_){for(var w=1;w0?this.tail.next=I:this.head=I,this.tail=I,++this.length}},{key:"unshift",value:function(S){var I={data:S,next:this.head};0===this.length&&(this.tail=I),this.head=I,++this.length}},{key:"shift",value:function(){if(0!==this.length){var S=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(0===this.length)return"";for(var I=this.head,P=""+I.data;I=I.next;)P+=S+I.data;return P}},{key:"concat",value:function(S){if(0===this.length)return b.alloc(0);for(var I=b.allocUnsafe(S>>>0),P=this.head,L=0;P;)m(P.data,I,L),L+=P.data.length,P=P.next;return I}},{key:"consume",value:function(S,I){var P;return SV.length?V.length:S;if(L+=W===V.length?V:V.slice(0,S),0==(S-=W)){W===V.length?(++P,this.head=I.next?I.next:this.tail=null):(this.head=I,I.data=V.slice(W));break}++P}return this.length-=P,L}},{key:"_getBuffer",value:function(S){var I=b.allocUnsafe(S),P=this.head,L=1;for(P.data.copy(I),S-=P.data.length;P=P.next;){var V=P.data,W=S>V.length?V.length:S;if(V.copy(I,I.length-S,0,W),0==(S-=W)){W===V.length?(++L,this.head=P.next?P.next:this.tail=null):(this.head=P,P.data=V.slice(W));break}++L}return this.length-=L,I}},{key:u,value:function(S,I){return h(this,q(q({},I),{},{depth:0,customInspect:!1}))}}]),_}()},10806:bt=>{"use strict";function Y(d,x){O(d,x),ie(d)}function ie(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function O(d,x){d.emit("error",x)}bt.exports={destroy:function(d,x){var f=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(x?x(d):d&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(O,this,d)):process.nextTick(O,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(b){!x&&b?f._writableState?f._writableState.errorEmitted?process.nextTick(ie,f):(f._writableState.errorEmitted=!0,process.nextTick(Y,f,b)):process.nextTick(Y,f,b):x?(process.nextTick(ie,f),x(b)):process.nextTick(ie,f)}),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(d,x){var f=d._readableState,T=d._writableState;f&&f.autoDestroy||T&&T.autoDestroy?d.destroy(x):d.emit("error",x)}}},6820:(bt,be,Y)=>{"use strict";var ie=Y(48230).q.ERR_STREAM_PREMATURE_CLOSE;function O(){}bt.exports=function d(x,f,T){if("function"==typeof f)return d(x,null,f);f||(f={}),T=function(x){var f=!1;return function(){if(!f){f=!0;for(var T=arguments.length,g=new Array(T),b=0;b{bt.exports=function(){throw new Error("Readable.from is not available in the browser")}},36076:(bt,be,Y)=>{"use strict";var ie,O=Y(48230).q,E=O.ERR_MISSING_ARGS,d=O.ERR_STREAM_DESTROYED;function x(u){if(u)throw u}function T(u,m,_,w){w=function(u){var m=!1;return function(){m||(m=!0,u.apply(void 0,arguments))}}(w);var S=!1;u.on("close",function(){S=!0}),void 0===ie&&(ie=Y(6820)),ie(u,{readable:m,writable:_},function(P){if(P)return w(P);S=!0,w()});var I=!1;return function(P){if(!S&&!I){if(I=!0,function(u){return u.setHeader&&"function"==typeof u.abort}(u))return u.abort();if("function"==typeof u.destroy)return u.destroy();w(P||new d("pipe"))}}}function g(u){u()}function b(u,m){return u.pipe(m)}function l(u){return u.length&&"function"==typeof u[u.length-1]?u.pop():x}bt.exports=function(){for(var u=arguments.length,m=new Array(u),_=0;_0,function(G){S||(S=G),G&&I.forEach(g),!V&&(I.forEach(g),w(S))})});return m.reduce(b)}},12903:(bt,be,Y)=>{"use strict";var ie=Y(48230).q.ERR_INVALID_OPT_VALUE;bt.exports={getHighWaterMark:function(E,d,x,f){var T=function(E,d,x){return null!=E.highWaterMark?E.highWaterMark:d?E[x]:null}(d,f,x);if(null!=T){if(!isFinite(T)||Math.floor(T)!==T||T<0)throw new ie(f?x:"highWaterMark",T);return Math.floor(T)}return E.objectMode?16:16384}}},75112:(bt,be,Y)=>{bt.exports=Y(93105).EventEmitter},18300:(bt,be,Y)=>{(be=bt.exports=Y(32833)).Stream=be,be.Readable=be,be.Writable=Y(37807),be.Duplex=Y(20942),be.Transform=Y(55431),be.PassThrough=Y(90619),be.finished=Y(6820),be.pipeline=Y(36076)},75207:(bt,be,Y)=>{"use strict";var ie=Y(3875).Buffer,q=Y(59879),O=Y(5414),E=new Array(16),d=[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],x=[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],f=[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],T=[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],g=[0,1518500249,1859775393,2400959708,2840853838],b=[1352829926,1548603684,1836072691,2053994217,0];function l(){O.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(I,P){return I<>>32-P}function u(I,P,L,V,W,G,H,j){return h(I+(P^L^V)+G+H|0,j)+W|0}function m(I,P,L,V,W,G,H,j){return h(I+(P&L|~P&V)+G+H|0,j)+W|0}function _(I,P,L,V,W,G,H,j){return h(I+((P|~L)^V)+G+H|0,j)+W|0}function w(I,P,L,V,W,G,H,j){return h(I+(P&V|L&~V)+G+H|0,j)+W|0}function S(I,P,L,V,W,G,H,j){return h(I+(P^(L|~V))+G+H|0,j)+W|0}q(l,O),l.prototype._update=function(){for(var I=E,P=0;P<16;++P)I[P]=this._block.readInt32LE(4*P);for(var L=0|this._a,V=0|this._b,W=0|this._c,G=0|this._d,H=0|this._e,j=0|this._a,K=0|this._b,R=0|this._c,o=0|this._d,y=0|this._e,M=0;M<80;M+=1){var v,k;M<16?(v=u(L,V,W,G,H,I[d[M]],g[0],f[M]),k=S(j,K,R,o,y,I[x[M]],b[0],T[M])):M<32?(v=m(L,V,W,G,H,I[d[M]],g[1],f[M]),k=w(j,K,R,o,y,I[x[M]],b[1],T[M])):M<48?(v=_(L,V,W,G,H,I[d[M]],g[2],f[M]),k=_(j,K,R,o,y,I[x[M]],b[2],T[M])):M<64?(v=w(L,V,W,G,H,I[d[M]],g[3],f[M]),k=m(j,K,R,o,y,I[x[M]],b[3],T[M])):(v=S(L,V,W,G,H,I[d[M]],g[4],f[M]),k=u(j,K,R,o,y,I[x[M]],b[4],T[M])),L=H,H=G,G=h(W,10),W=V,V=v,j=y,y=o,o=h(R,10),R=K,K=k}var D=this._b+W+o|0;this._b=this._c+G+y|0,this._c=this._d+H+j|0,this._d=this._e+L+K|0,this._e=this._a+V+R|0,this._a=D},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var I=ie.alloc?ie.alloc(20):new ie(20);return I.writeInt32LE(this._a,0),I.writeInt32LE(this._b,4),I.writeInt32LE(this._c,8),I.writeInt32LE(this._d,12),I.writeInt32LE(this._e,16),I},bt.exports=l},26215:(bt,be,Y)=>{"use strict";Y.d(be,{X:()=>O});var ie=Y(79765),q=Y(77971);class O extends ie.xQ{constructor(d){super(),this._value=d}get value(){return this.getValue()}_subscribe(d){const x=super._subscribe(d);return x&&!x.closed&&d.next(this._value),x}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new q.N;return this._value}next(d){super.next(this._value=d)}}},23098:(bt,be,Y)=>{"use strict";Y.d(be,{W:()=>E,P:()=>d});var ie=Y(59193),q=Y(25917),O=Y(40205),E=(()=>{return(x=E||(E={})).NEXT="N",x.ERROR="E",x.COMPLETE="C",E;var x})();class d{constructor(f,T,g){this.kind=f,this.value=T,this.error=g,this.hasValue="N"===f}observe(f){switch(this.kind){case"N":return f.next&&f.next(this.value);case"E":return f.error&&f.error(this.error);case"C":return f.complete&&f.complete()}}do(f,T,g){switch(this.kind){case"N":return f&&f(this.value);case"E":return T&&T(this.error);case"C":return g&&g()}}accept(f,T,g){return f&&"function"==typeof f.next?this.observe(f):this.do(f,T,g)}toObservable(){switch(this.kind){case"N":return(0,q.of)(this.value);case"E":return(0,O._)(this.error);case"C":return(0,ie.c)()}throw new Error("unexpected notification kind value")}static createNext(f){return void 0!==f?new d("N",f):d.undefinedValueNotification}static createError(f){return new d("E",void 0,f)}static createComplete(){return d.completeNotification}}d.completeNotification=new d("C"),d.undefinedValueNotification=new d("N",void 0)},39897:(bt,be,Y)=>{"use strict";Y.d(be,{y:()=>g});var ie=Y(13179),q=Y(77393),O=Y(29181),E=Y(46490),x=Y(16554),f=Y(34022),T=Y(82494);let g=(()=>{class l{constructor(u){this._isScalar=!1,u&&(this._subscribe=u)}lift(u){const m=new l;return m.source=this,m.operator=u,m}subscribe(u,m,_){const{operator:w}=this,S=function(l,h,u){if(l){if(l instanceof q.L)return l;if(l[O.b])return l[O.b]()}return l||h||u?new q.L(l,h,u):new q.L(E.c)}(u,m,_);if(S.add(w?w.call(S,this.source):this.source||T.v.useDeprecatedSynchronousErrorHandling&&!S.syncErrorThrowable?this._subscribe(S):this._trySubscribe(S)),T.v.useDeprecatedSynchronousErrorHandling&&S.syncErrorThrowable&&(S.syncErrorThrowable=!1,S.syncErrorThrown))throw S.syncErrorValue;return S}_trySubscribe(u){try{return this._subscribe(u)}catch(m){T.v.useDeprecatedSynchronousErrorHandling&&(u.syncErrorThrown=!0,u.syncErrorValue=m),(0,ie._)(u)?u.error(m):console.warn(m)}}forEach(u,m){return new(m=b(m))((_,w)=>{let S;S=this.subscribe(I=>{try{u(I)}catch(P){w(P),S&&S.unsubscribe()}},w,_)})}_subscribe(u){const{source:m}=this;return m&&m.subscribe(u)}[x.L](){return this}pipe(...u){return 0===u.length?this:(0,f.U)(u)(this)}toPromise(u){return new(u=b(u))((m,_)=>{let w;this.subscribe(S=>w=S,S=>_(S),()=>m(w))})}}return l.create=h=>new l(h),l})();function b(l){if(l||(l=T.v.Promise||Promise),!l)throw new Error("no Promise impl found");return l}},46490:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>O});var ie=Y(82494),q=Y(54449);const O={closed:!0,next(E){},error(E){if(ie.v.useDeprecatedSynchronousErrorHandling)throw E;(0,q.z)(E)},complete(){}}},55197:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>q});var ie=Y(77393);class q extends ie.L{notifyNext(E,d,x,f,T){this.destination.next(d)}notifyError(E,d){this.destination.error(E)}notifyComplete(E){this.destination.complete()}}},88229:(bt,be,Y)=>{"use strict";Y.d(be,{t:()=>f});var ie=Y(79765),q=Y(57771),O=Y(10826),E=Y(59746),d=Y(77971),x=Y(78858);class f extends ie.xQ{constructor(b=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,h){super(),this.scheduler=h,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=b<1?1:b,this._windowTime=l<1?1:l,l===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(b){if(!this.isStopped){const l=this._events;l.push(b),l.length>this._bufferSize&&l.shift()}super.next(b)}nextTimeWindow(b){this.isStopped||(this._events.push(new T(this._getNow(),b)),this._trimBufferThenGetEvents()),super.next(b)}_subscribe(b){const l=this._infiniteTimeWindow,h=l?this._events:this._trimBufferThenGetEvents(),u=this.scheduler,m=h.length;let _;if(this.closed)throw new d.N;if(this.isStopped||this.hasError?_=O.w.EMPTY:(this.observers.push(b),_=new x.W(this,b)),u&&b.add(b=new E.ht(b,u)),l)for(let w=0;wl&&(_=Math.max(_,m-l)),_>0&&u.splice(0,_),u}}class T{constructor(b,l){this.time=b,this.value=l}}},2217:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>ie});let ie=(()=>{class q{constructor(E,d=q.now){this.SchedulerAction=E,this.now=d}schedule(E,d=0,x){return new this.SchedulerAction(this,E).schedule(x,d)}}return q.now=()=>Date.now(),q})()},79765:(bt,be,Y)=>{"use strict";Y.d(be,{Yc:()=>f,xQ:()=>T});var ie=Y(39897),q=Y(77393),O=Y(10826),E=Y(77971),d=Y(78858),x=Y(29181);class f extends q.L{constructor(l){super(l),this.destination=l}}let T=(()=>{class b extends ie.y{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[x.b](){return new f(this)}lift(h){const u=new g(this,this);return u.operator=h,u}next(h){if(this.closed)throw new E.N;if(!this.isStopped){const{observers:u}=this,m=u.length,_=u.slice();for(let w=0;wnew g(l,h),b})();class g extends T{constructor(l,h){super(),this.destination=l,this.source=h}next(l){const{destination:h}=this;h&&h.next&&h.next(l)}error(l){const{destination:h}=this;h&&h.error&&this.destination.error(l)}complete(){const{destination:l}=this;l&&l.complete&&this.destination.complete()}_subscribe(l){const{source:h}=this;return h?this.source.subscribe(l):O.w.EMPTY}}},78858:(bt,be,Y)=>{"use strict";Y.d(be,{W:()=>q});var ie=Y(10826);class q extends ie.w{constructor(E,d){super(),this.subject=E,this.subscriber=d,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const E=this.subject,d=E.observers;if(this.subject=null,!d||0===d.length||E.isStopped||E.closed)return;const x=d.indexOf(this.subscriber);-1!==x&&d.splice(x,1)}}},77393:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>f});var ie=Y(69105),q=Y(46490),O=Y(10826),E=Y(29181),d=Y(82494),x=Y(54449);class f extends O.w{constructor(b,l,h){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=q.c;break;case 1:if(!b){this.destination=q.c;break}if("object"==typeof b){b instanceof f?(this.syncErrorThrowable=b.syncErrorThrowable,this.destination=b,b.add(this)):(this.syncErrorThrowable=!0,this.destination=new T(this,b));break}default:this.syncErrorThrowable=!0,this.destination=new T(this,b,l,h)}}[E.b](){return this}static create(b,l,h){const u=new f(b,l,h);return u.syncErrorThrowable=!1,u}next(b){this.isStopped||this._next(b)}error(b){this.isStopped||(this.isStopped=!0,this._error(b))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(b){this.destination.next(b)}_error(b){this.destination.error(b),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:b}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=b,this}}class T extends f{constructor(b,l,h,u){super(),this._parentSubscriber=b;let m,_=this;(0,ie.m)(l)?m=l:l&&(m=l.next,h=l.error,u=l.complete,l!==q.c&&(_=Object.create(l),(0,ie.m)(_.unsubscribe)&&this.add(_.unsubscribe.bind(_)),_.unsubscribe=this.unsubscribe.bind(this))),this._context=_,this._next=m,this._error=h,this._complete=u}next(b){if(!this.isStopped&&this._next){const{_parentSubscriber:l}=this;d.v.useDeprecatedSynchronousErrorHandling&&l.syncErrorThrowable?this.__tryOrSetError(l,this._next,b)&&this.unsubscribe():this.__tryOrUnsub(this._next,b)}}error(b){if(!this.isStopped){const{_parentSubscriber:l}=this,{useDeprecatedSynchronousErrorHandling:h}=d.v;if(this._error)h&&l.syncErrorThrowable?(this.__tryOrSetError(l,this._error,b),this.unsubscribe()):(this.__tryOrUnsub(this._error,b),this.unsubscribe());else if(l.syncErrorThrowable)h?(l.syncErrorValue=b,l.syncErrorThrown=!0):(0,x.z)(b),this.unsubscribe();else{if(this.unsubscribe(),h)throw b;(0,x.z)(b)}}}complete(){if(!this.isStopped){const{_parentSubscriber:b}=this;if(this._complete){const l=()=>this._complete.call(this._context);d.v.useDeprecatedSynchronousErrorHandling&&b.syncErrorThrowable?(this.__tryOrSetError(b,l),this.unsubscribe()):(this.__tryOrUnsub(l),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(b,l){try{b.call(this._context,l)}catch(h){if(this.unsubscribe(),d.v.useDeprecatedSynchronousErrorHandling)throw h;(0,x.z)(h)}}__tryOrSetError(b,l,h){if(!d.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{l.call(this._context,h)}catch(u){return d.v.useDeprecatedSynchronousErrorHandling?(b.syncErrorValue=u,b.syncErrorThrown=!0,!0):((0,x.z)(u),!0)}return!1}_unsubscribe(){const{_parentSubscriber:b}=this;this._context=null,this._parentSubscriber=null,b.unsubscribe()}}},10826:(bt,be,Y)=>{"use strict";Y.d(be,{w:()=>d});var f,ie=Y(59796),q=Y(81555),O=Y(69105),E=Y(57744);class d{constructor(T){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,T&&(this._ctorUnsubscribe=!0,this._unsubscribe=T)}unsubscribe(){let T;if(this.closed)return;let{_parentOrParents:g,_ctorUnsubscribe:b,_unsubscribe:l,_subscriptions:h}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,g instanceof d)g.remove(this);else if(null!==g)for(let u=0;uT.concat(g instanceof E.B?g.errors:g),[])}d.EMPTY=((f=new d).closed=!0,f)},82494:(bt,be,Y)=>{"use strict";Y.d(be,{v:()=>q});let ie=!1;const q={Promise:void 0,set useDeprecatedSynchronousErrorHandling(O){if(O){const E=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+E.stack)}else ie&&console.log("RxJS: Back to a better error behavior. Thank you. <3");ie=O},get useDeprecatedSynchronousErrorHandling(){return ie}}},85345:(bt,be,Y)=>{"use strict";Y.d(be,{IY:()=>E,Ds:()=>x,ft:()=>T});var ie=Y(77393),q=Y(39897),O=Y(87444);class E extends ie.L{constructor(b){super(),this.parent=b}_next(b){this.parent.notifyNext(b)}_error(b){this.parent.notifyError(b),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class x extends ie.L{notifyNext(b){this.destination.next(b)}notifyError(b){this.destination.error(b)}notifyComplete(){this.destination.complete()}}function T(g,b){if(b.closed)return;if(g instanceof q.y)return g.subscribe(b);let l;try{l=(0,O.s)(g)(b)}catch(h){b.error(h)}return l}},52441:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>d,N:()=>x});var ie=Y(79765),q=Y(39897),O=Y(10826),E=Y(51307);class d extends q.y{constructor(l,h){super(),this.source=l,this.subjectFactory=h,this._refCount=0,this._isComplete=!1}_subscribe(l){return this.getSubject().subscribe(l)}getSubject(){const l=this._subject;return(!l||l.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let l=this._connection;return l||(this._isComplete=!1,l=this._connection=new O.w,l.add(this.source.subscribe(new f(this.getSubject(),this))),l.closed&&(this._connection=null,l=O.w.EMPTY)),l}refCount(){return(0,E.x)()(this)}}const x=(()=>{const b=d.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:b._subscribe},_isComplete:{value:b._isComplete,writable:!0},getSubject:{value:b.getSubject},connect:{value:b.connect},refCount:{value:b.refCount}}})();class f extends ie.Yc{constructor(l,h){super(l),this.connectable=h}_error(l){this._unsubscribe(),super._error(l)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const l=this.connectable;if(l){this.connectable=null;const h=l._connection;l._refCount=0,l._subject=null,l._connection=null,h&&h.unsubscribe()}}}},9112:(bt,be,Y)=>{"use strict";Y.d(be,{aj:()=>f,Ms:()=>T});var ie=Y(54869),q=Y(59796),O=Y(55197),E=Y(20509),d=Y(56693);const x={};function f(...b){let l,h;return(0,ie.K)(b[b.length-1])&&(h=b.pop()),"function"==typeof b[b.length-1]&&(l=b.pop()),1===b.length&&(0,q.k)(b[0])&&(b=b[0]),(0,d.n)(b,h).lift(new T(l))}class T{constructor(l){this.resultSelector=l}call(l,h){return h.subscribe(new g(l,this.resultSelector))}}class g extends O.L{constructor(l,h){super(l),this.resultSelector=h,this.active=0,this.values=[],this.observables=[]}_next(l){this.values.push(x),this.observables.push(l)}_complete(){const l=this.observables,h=l.length;if(0===h)this.destination.complete();else{this.active=h,this.toRespond=h;for(let u=0;u{"use strict";Y.d(be,{z:()=>O});var ie=Y(25917),q=Y(65766);function O(...E){return(0,q.u)()((0,ie.of)(...E))}},41439:(bt,be,Y)=>{"use strict";Y.d(be,{P:()=>E});var ie=Y(39897),q=Y(69412),O=Y(59193);function E(d){return new ie.y(x=>{let f;try{f=d()}catch(g){return void x.error(g)}return(f?(0,q.D)(f):(0,O.c)()).subscribe(x)})}},59193:(bt,be,Y)=>{"use strict";Y.d(be,{E:()=>q,c:()=>O});var ie=Y(39897);const q=new ie.y(d=>d.complete());function O(d){return d?function(d){return new ie.y(x=>d.schedule(()=>x.complete()))}(d):q}},35758:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>x});var ie=Y(39897),q=Y(59796),O=Y(88002),E=Y(81555),d=Y(69412);function x(...T){if(1===T.length){const g=T[0];if((0,q.k)(g))return f(g,null);if((0,E.K)(g)&&Object.getPrototypeOf(g)===Object.prototype){const b=Object.keys(g);return f(b.map(l=>g[l]),b)}}if("function"==typeof T[T.length-1]){const g=T.pop();return f(T=1===T.length&&(0,q.k)(T[0])?T[0]:T,null).pipe((0,O.U)(b=>g(...b)))}return f(T,null)}function f(T,g){return new ie.y(b=>{const l=T.length;if(0===l)return void b.complete();const h=new Array(l);let u=0,m=0;for(let _=0;_{S||(S=!0,m++),h[_]=I},error:I=>b.error(I),complete:()=>{u++,(u===l||!S)&&(m===l&&b.next(g?g.reduce((I,P,L)=>(I[P]=h[L],I),{}):h),b.complete())}}))}})}},69412:(bt,be,Y)=>{"use strict";Y.d(be,{D:()=>E});var ie=Y(39897),q=Y(87444),O=Y(91115);function E(d,x){return x?(0,O.x)(d,x):d instanceof ie.y?d:new ie.y((0,q.s)(d))}},56693:(bt,be,Y)=>{"use strict";Y.d(be,{n:()=>E});var ie=Y(39897),q=Y(55015),O=Y(94087);function E(d,x){return x?(0,O.r)(d,x):new ie.y((0,q.V)(d))}},22759:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>x});var ie=Y(39897),q=Y(59796),O=Y(69105),E=Y(88002);function x(l,h,u,m){return(0,O.m)(u)&&(m=u,u=void 0),m?x(l,h,u).pipe((0,E.U)(_=>(0,q.k)(_)?m(..._):m(_))):new ie.y(_=>{f(l,h,function(S){_.next(arguments.length>1?Array.prototype.slice.call(arguments):S)},_,u)})}function f(l,h,u,m,_){let w;if(function(l){return l&&"function"==typeof l.addEventListener&&"function"==typeof l.removeEventListener}(l)){const S=l;l.addEventListener(h,u,_),w=()=>S.removeEventListener(h,u,_)}else if(function(l){return l&&"function"==typeof l.on&&"function"==typeof l.off}(l)){const S=l;l.on(h,u),w=()=>S.off(h,u)}else if(function(l){return l&&"function"==typeof l.addListener&&"function"==typeof l.removeListener}(l)){const S=l;l.addListener(h,u),w=()=>S.removeListener(h,u)}else{if(!l||!l.length)throw new TypeError("Invalid event target");for(let S=0,I=l.length;S{"use strict";Y.d(be,{T:()=>d});var ie=Y(39897),q=Y(54869),O=Y(63282),E=Y(56693);function d(...x){let f=Number.POSITIVE_INFINITY,T=null,g=x[x.length-1];return(0,q.K)(g)?(T=x.pop(),x.length>1&&"number"==typeof x[x.length-1]&&(f=x.pop())):"number"==typeof g&&(f=x.pop()),null===T&&1===x.length&&x[0]instanceof ie.y?x[0]:(0,O.J)(f)((0,E.n)(x,T))}},17757:(bt,be,Y)=>{"use strict";Y.d(be,{C:()=>O,F:()=>E});var ie=Y(39897),q=Y(98640);const O=new ie.y(q.Z);function E(){return O}},25917:(bt,be,Y)=>{"use strict";Y.d(be,{of:()=>E});var ie=Y(54869),q=Y(56693),O=Y(94087);function E(...d){let x=d[d.length-1];return(0,ie.K)(x)?(d.pop(),(0,O.r)(d,x)):(0,q.n)(d)}},98085:(bt,be,Y)=>{"use strict";Y.d(be,{S3:()=>d});var ie=Y(59796),q=Y(56693),O=Y(55197),E=Y(20509);function d(...T){if(1===T.length){if(!(0,ie.k)(T[0]))return T[0];T=T[0]}return(0,q.n)(T,void 0).lift(new x)}class x{call(g,b){return b.subscribe(new f(g))}}class f extends O.L{constructor(g){super(g),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(g){this.observables.push(g)}_complete(){const g=this.observables,b=g.length;if(0===b)this.destination.complete();else{for(let l=0;l{"use strict";Y.d(be,{_:()=>q});var ie=Y(39897);function q(E,d){return new ie.y(d?x=>d.schedule(O,0,{error:E,subscriber:x}):x=>x.error(E))}function O({error:E,subscriber:d}){d.error(E)}},46797:(bt,be,Y)=>{"use strict";Y.d(be,{H:()=>d});var ie=Y(39897),q=Y(33637),O=Y(26561),E=Y(54869);function d(f=0,T,g){let b=-1;return(0,O.k)(T)?b=Number(T)<1?1:Number(T):(0,E.K)(T)&&(g=T),(0,E.K)(g)||(g=q.P),new ie.y(l=>{const h=(0,O.k)(f)?f:+f-g.now();return g.schedule(x,h,{index:0,period:b,subscriber:l})})}function x(f){const{index:T,period:g,subscriber:b}=f;if(b.next(T),!b.closed){if(-1===g)return b.complete();f.index=T+1,this.schedule(f,g)}}},21571:(bt,be,Y)=>{"use strict";Y.d(be,{$R:()=>x,mx:()=>f});var ie=Y(56693),q=Y(59796),O=Y(77393),E=Y(20377),d=Y(85345);function x(...h){const u=h[h.length-1];return"function"==typeof u&&h.pop(),(0,ie.n)(h,void 0).lift(new f(u))}class f{constructor(u){this.resultSelector=u}call(u,m){return m.subscribe(new T(u,this.resultSelector))}}class T extends O.L{constructor(u,m,_=Object.create(null)){super(u),this.resultSelector=m,this.iterators=[],this.active=0,this.resultSelector="function"==typeof m?m:void 0}_next(u){const m=this.iterators;(0,q.k)(u)?m.push(new b(u)):m.push("function"==typeof u[E.hZ]?new g(u[E.hZ]()):new l(this.destination,this,u))}_complete(){const u=this.iterators,m=u.length;if(this.unsubscribe(),0!==m){this.active=m;for(let _=0;_this.index}hasCompleted(){return this.array.length===this.index}}class l extends d.Ds{constructor(u,m,_){super(u),this.parent=m,this.observable=_,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[E.hZ](){return this}next(){const u=this.buffer;return 0===u.length&&this.isComplete?{value:null,done:!0}:{value:u.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(u){this.buffer.push(u),this.parent.checkIterators()}subscribe(){return(0,d.ft)(this.observable,new d.IY(this))}}},49732:(bt,be,Y)=>{"use strict";Y.d(be,{U:()=>q});var ie=Y(85345);function q(d){return function(f){return f.lift(new O(d))}}class O{constructor(x){this.durationSelector=x}call(x,f){return f.subscribe(new E(x,this.durationSelector))}}class E extends ie.Ds{constructor(x,f){super(x),this.durationSelector=f,this.hasValue=!1}_next(x){if(this.value=x,this.hasValue=!0,!this.throttled){let f;try{const{durationSelector:g}=this;f=g(x)}catch(g){return this.destination.error(g)}const T=(0,ie.ft)(f,new ie.IY(this));!T||T.closed?this.clearThrottle():this.add(this.throttled=T)}}clearThrottle(){const{value:x,hasValue:f,throttled:T}=this;T&&(this.remove(T),this.throttled=void 0,T.unsubscribe()),f&&(this.value=void 0,this.hasValue=!1,this.destination.next(x))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}},45697:(bt,be,Y)=>{"use strict";Y.d(be,{e:()=>E});var ie=Y(33637),q=Y(49732),O=Y(46797);function E(d,x=ie.P){return(0,q.U)(()=>(0,O.H)(d,x))}},5304:(bt,be,Y)=>{"use strict";Y.d(be,{K:()=>q});var ie=Y(85345);function q(d){return function(f){const T=new O(d),g=f.lift(T);return T.caught=g}}class O{constructor(x){this.selector=x}call(x,f){return f.subscribe(new E(x,this.selector,this.caught))}}class E extends ie.Ds{constructor(x,f,T){super(x),this.selector=f,this.caught=T}error(x){if(!this.isStopped){let f;try{f=this.selector(x,this.caught)}catch(b){return void super.error(b)}this._unsubscribeAndRecycle();const T=new ie.IY(this);this.add(T);const g=(0,ie.ft)(f,T);g!==T&&this.add(g)}}}},65766:(bt,be,Y)=>{"use strict";Y.d(be,{u:()=>q});var ie=Y(63282);function q(){return(0,ie.J)(1)}},94612:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>q});var ie=Y(19773);function q(O,E){return(0,ie.zg)(O,E,1)}},54395:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>O});var ie=Y(77393),q=Y(33637);function O(f,T=q.P){return g=>g.lift(new E(f,T))}class E{constructor(T,g){this.dueTime=T,this.scheduler=g}call(T,g){return g.subscribe(new d(T,this.dueTime,this.scheduler))}}class d extends ie.L{constructor(T,g,b){super(T),this.dueTime=g,this.scheduler=b,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(T){this.clearDebounce(),this.lastValue=T,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(x,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:T}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(T)}}clearDebounce(){const T=this.debouncedSubscription;null!==T&&(this.remove(T),T.unsubscribe(),this.debouncedSubscription=null)}}function x(f){f.debouncedNext()}},95242:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>q});var ie=Y(77393);function q(d=null){return x=>x.lift(new O(d))}class O{constructor(x){this.defaultValue=x}call(x,f){return f.subscribe(new E(x,this.defaultValue))}}class E extends ie.L{constructor(x,f){super(x),this.defaultValue=f,this.isEmpty=!0}_next(x){this.isEmpty=!1,this.destination.next(x)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}},65792:(bt,be,Y)=>{"use strict";Y.d(be,{g:()=>d});var ie=Y(33637),q=Y(39989),O=Y(77393),E=Y(23098);function d(g,b=ie.P){const h=(0,q.J)(g)?+g-b.now():Math.abs(g);return u=>u.lift(new x(h,b))}class x{constructor(b,l){this.delay=b,this.scheduler=l}call(b,l){return l.subscribe(new f(b,this.delay,this.scheduler))}}class f extends O.L{constructor(b,l,h){super(b),this.delay=l,this.scheduler=h,this.queue=[],this.active=!1,this.errored=!1}static dispatch(b){const l=b.source,h=l.queue,u=b.scheduler,m=b.destination;for(;h.length>0&&h[0].time-u.now()<=0;)h.shift().notification.observe(m);if(h.length>0){const _=Math.max(0,h[0].time-u.now());this.schedule(b,_)}else this.unsubscribe(),l.active=!1}_schedule(b){this.active=!0,this.destination.add(b.schedule(f.dispatch,this.delay,{source:this,destination:this.destination,scheduler:b}))}scheduleNotification(b){if(!0===this.errored)return;const l=this.scheduler,h=new T(l.now()+this.delay,b);this.queue.push(h),!1===this.active&&this._schedule(l)}_next(b){this.scheduleNotification(E.P.createNext(b))}_error(b){this.errored=!0,this.queue=[],this.destination.error(b),this.unsubscribe()}_complete(){this.scheduleNotification(E.P.createComplete()),this.unsubscribe()}}class T{constructor(b,l){this.time=b,this.notification=l}}},87519:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>q});var ie=Y(77393);function q(d,x){return f=>f.lift(new O(d,x))}class O{constructor(x,f){this.compare=x,this.keySelector=f}call(x,f){return f.subscribe(new E(x,this.compare,this.keySelector))}}class E extends ie.L{constructor(x,f,T){super(x),this.keySelector=T,this.hasKey=!1,"function"==typeof f&&(this.compare=f)}compare(x,f){return x===f}_next(x){let f;try{const{keySelector:g}=this;f=g?g(x):x}catch(g){return this.destination.error(g)}let T=!1;if(this.hasKey)try{const{compare:g}=this;T=g(this.key,f)}catch(g){return this.destination.error(g)}else this.hasKey=!0;T||(this.key=f,this.destination.next(x))}}},86804:(bt,be,Y)=>{"use strict";Y.d(be,{l:()=>O});var ie=Y(29923),q=Y(25917);function O(...E){return d=>(0,ie.z)(d,(0,q.of)(...E))}},45435:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>q});var ie=Y(77393);function q(d,x){return function(T){return T.lift(new O(d,x))}}class O{constructor(x,f){this.predicate=x,this.thisArg=f}call(x,f){return f.subscribe(new E(x,this.predicate,this.thisArg))}}class E extends ie.L{constructor(x,f,T){super(x),this.predicate=f,this.thisArg=T,this.count=0}_next(x){let f;try{f=this.predicate.call(this.thisArg,x,this.count++)}catch(T){return void this.destination.error(T)}f&&this.destination.next(x)}}},68939:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>O});var ie=Y(77393),q=Y(10826);function O(x){return f=>f.lift(new E(x))}class E{constructor(f){this.callback=f}call(f,T){return T.subscribe(new d(f,this.callback))}}class d extends ie.L{constructor(f,T){super(f),this.add(new q.w(T))}}},28049:(bt,be,Y)=>{"use strict";Y.d(be,{P:()=>f});var ie=Y(13410),q=Y(45435),O=Y(15257),E=Y(95242),d=Y(44635),x=Y(54487);function f(T,g){const b=arguments.length>=2;return l=>l.pipe(T?(0,q.h)((h,u)=>T(h,u,l)):x.y,(0,O.q)(1),b?(0,E.d)(g):(0,d.T)(()=>new ie.K))}},12627:(bt,be,Y)=>{"use strict";Y.d(be,{Z:()=>f});var ie=Y(13410),q=Y(45435),O=Y(548),E=Y(44635),d=Y(95242),x=Y(54487);function f(T,g){const b=arguments.length>=2;return l=>l.pipe(T?(0,q.h)((h,u)=>T(h,u,l)):x.y,(0,O.h)(1),b?(0,d.d)(g):(0,E.T)(()=>new ie.K))}},88002:(bt,be,Y)=>{"use strict";Y.d(be,{U:()=>q});var ie=Y(77393);function q(d,x){return function(T){if("function"!=typeof d)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return T.lift(new O(d,x))}}class O{constructor(x,f){this.project=x,this.thisArg=f}call(x,f){return f.subscribe(new E(x,this.project,this.thisArg))}}class E extends ie.L{constructor(x,f,T){super(x),this.project=f,this.count=0,this.thisArg=T||this}_next(x){let f;try{f=this.project.call(this.thisArg,x,this.count++)}catch(T){return void this.destination.error(T)}this.destination.next(f)}}},63282:(bt,be,Y)=>{"use strict";Y.d(be,{J:()=>O});var ie=Y(19773),q=Y(54487);function O(E=Number.POSITIVE_INFINITY){return(0,ie.zg)(q.y,E)}},19773:(bt,be,Y)=>{"use strict";Y.d(be,{zg:()=>E,VS:()=>f});var ie=Y(88002),q=Y(69412),O=Y(85345);function E(T,g,b=Number.POSITIVE_INFINITY){return"function"==typeof g?l=>l.pipe(E((h,u)=>(0,q.D)(T(h,u)).pipe((0,ie.U)((m,_)=>g(h,m,u,_))),b)):("number"==typeof g&&(b=g),l=>l.lift(new d(T,b)))}class d{constructor(g,b=Number.POSITIVE_INFINITY){this.project=g,this.concurrent=b}call(g,b){return b.subscribe(new x(g,this.project,this.concurrent))}}class x extends O.Ds{constructor(g,b,l=Number.POSITIVE_INFINITY){super(g),this.project=b,this.concurrent=l,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(g){this.active0?this._next(g.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}const f=E},94458:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>q});var ie=Y(52441);function q(E,d){return function(f){let T;if(T="function"==typeof E?E:function(){return E},"function"==typeof d)return f.lift(new O(T,d));const g=Object.create(f,ie.N);return g.source=f,g.subjectFactory=T,g}}class O{constructor(d,x){this.subjectFactory=d,this.selector=x}call(d,x){const{selector:f}=this,T=this.subjectFactory(),g=f(T).subscribe(d);return g.add(x.subscribe(T)),g}}},59746:(bt,be,Y)=>{"use strict";Y.d(be,{QV:()=>O,ht:()=>d});var ie=Y(77393),q=Y(23098);function O(f,T=0){return function(b){return b.lift(new E(f,T))}}class E{constructor(T,g=0){this.scheduler=T,this.delay=g}call(T,g){return g.subscribe(new d(T,this.scheduler,this.delay))}}class d extends ie.L{constructor(T,g,b=0){super(T),this.scheduler=g,this.delay=b}static dispatch(T){const{notification:g,destination:b}=T;g.observe(b),this.unsubscribe()}scheduleMessage(T){this.destination.add(this.scheduler.schedule(d.dispatch,this.delay,new x(T,this.destination)))}_next(T){this.scheduleMessage(q.P.createNext(T))}_error(T){this.scheduleMessage(q.P.createError(T)),this.unsubscribe()}_complete(){this.scheduleMessage(q.P.createComplete()),this.unsubscribe()}}class x{constructor(T,g){this.notification=T,this.destination=g}}},59328:(bt,be,Y)=>{"use strict";Y.d(be,{G:()=>q});var ie=Y(77393);function q(){return d=>d.lift(new O)}class O{call(x,f){return f.subscribe(new E(x))}}class E extends ie.L{constructor(x){super(x),this.hasPrev=!1}_next(x){let f;this.hasPrev?f=[this.prev,x]:this.hasPrev=!0,this.prev=x,f&&this.destination.next(f)}}},51307:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>q});var ie=Y(77393);function q(){return function(x){return x.lift(new O(x))}}class O{constructor(x){this.connectable=x}call(x,f){const{connectable:T}=this;T._refCount++;const g=new E(x,T),b=f.subscribe(g);return g.closed||(g.connection=T.connect()),b}}class E extends ie.L{constructor(x,f){super(x),this.connectable=f}_unsubscribe(){const{connectable:x}=this;if(!x)return void(this.connection=null);this.connectable=null;const f=x._refCount;if(f<=0)return void(this.connection=null);if(x._refCount=f-1,f>1)return void(this.connection=null);const{connection:T}=this,g=x._connection;this.connection=null,g&&(!T||g===T)&&g.unsubscribe()}}},42145:(bt,be,Y)=>{"use strict";Y.d(be,{R:()=>q});var ie=Y(77393);function q(d,x){let f=!1;return arguments.length>=2&&(f=!0),function(g){return g.lift(new O(d,x,f))}}class O{constructor(x,f,T=!1){this.accumulator=x,this.seed=f,this.hasSeed=T}call(x,f){return f.subscribe(new E(x,this.accumulator,this.seed,this.hasSeed))}}class E extends ie.L{constructor(x,f,T,g){super(x),this.accumulator=f,this._seed=T,this.hasSeed=g,this.index=0}get seed(){return this._seed}set seed(x){this.hasSeed=!0,this._seed=x}_next(x){if(this.hasSeed)return this._tryNext(x);this.seed=x,this.destination.next(x)}_tryNext(x){const f=this.index++;let T;try{T=this.accumulator(this.seed,x,f)}catch(g){this.destination.error(g)}this.seed=T,this.destination.next(T)}}},78345:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>d});var ie=Y(94458),q=Y(51307),O=Y(79765);function E(){return new O.xQ}function d(){return x=>(0,q.x)()((0,ie.O)(E)(x))}},47349:(bt,be,Y)=>{"use strict";Y.d(be,{d:()=>q});var ie=Y(88229);function q(E,d,x){let f;return f=E&&"object"==typeof E?E:{bufferSize:E,windowTime:d,refCount:!1,scheduler:x},T=>T.lift(function({bufferSize:E=Number.POSITIVE_INFINITY,windowTime:d=Number.POSITIVE_INFINITY,refCount:x,scheduler:f}){let T,b,g=0,l=!1,h=!1;return function(m){let _;g++,!T||l?(l=!1,T=new ie.t(E,d,f),_=T.subscribe(this),b=m.subscribe({next(w){T.next(w)},error(w){l=!0,T.error(w)},complete(){h=!0,b=void 0,T.complete()}}),h&&(b=void 0)):_=T.subscribe(this),this.add(()=>{g--,_.unsubscribe(),_=void 0,b&&!h&&x&&0===g&&(b.unsubscribe(),b=void 0,T=void 0)})}}(f))}},13653:(bt,be,Y)=>{"use strict";Y.d(be,{T:()=>q});var ie=Y(77393);function q(d){return x=>x.lift(new O(d))}class O{constructor(x){this.total=x}call(x,f){return f.subscribe(new E(x,this.total))}}class E extends ie.L{constructor(x,f){super(x),this.total=f,this.count=0}_next(x){++this.count>this.total&&this.destination.next(x)}}},39761:(bt,be,Y)=>{"use strict";Y.d(be,{O:()=>O});var ie=Y(29923),q=Y(54869);function O(...E){const d=E[E.length-1];return(0,q.K)(d)?(E.pop(),x=>(0,ie.z)(E,x,d)):x=>(0,ie.z)(E,x)}},43190:(bt,be,Y)=>{"use strict";Y.d(be,{w:()=>E});var ie=Y(88002),q=Y(69412),O=Y(85345);function E(f,T){return"function"==typeof T?g=>g.pipe(E((b,l)=>(0,q.D)(f(b,l)).pipe((0,ie.U)((h,u)=>T(b,h,l,u))))):g=>g.lift(new d(f))}class d{constructor(T){this.project=T}call(T,g){return g.subscribe(new x(T,this.project))}}class x extends O.Ds{constructor(T,g){super(T),this.project=g,this.index=0}_next(T){let g;const b=this.index++;try{g=this.project(T,b)}catch(l){return void this.destination.error(l)}this._innerSub(g)}_innerSub(T){const g=this.innerSubscription;g&&g.unsubscribe();const b=new O.IY(this),l=this.destination;l.add(b),this.innerSubscription=(0,O.ft)(T,b),this.innerSubscription!==b&&l.add(this.innerSubscription)}_complete(){const{innerSubscription:T}=this;(!T||T.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(T){this.destination.next(T)}}},15257:(bt,be,Y)=>{"use strict";Y.d(be,{q:()=>E});var ie=Y(77393),q=Y(7108),O=Y(59193);function E(f){return T=>0===f?(0,O.c)():T.lift(new d(f))}class d{constructor(T){if(this.total=T,this.total<0)throw new q.W}call(T,g){return g.subscribe(new x(T,this.total))}}class x extends ie.L{constructor(T,g){super(T),this.total=g,this.count=0}_next(T){const g=this.total,b=++this.count;b<=g&&(this.destination.next(T),b===g&&(this.destination.complete(),this.unsubscribe()))}}},548:(bt,be,Y)=>{"use strict";Y.d(be,{h:()=>E});var ie=Y(77393),q=Y(7108),O=Y(59193);function E(f){return function(g){return 0===f?(0,O.c)():g.lift(new d(f))}}class d{constructor(T){if(this.total=T,this.total<0)throw new q.W}call(T,g){return g.subscribe(new x(T,this.total))}}class x extends ie.L{constructor(T,g){super(T),this.total=g,this.ring=new Array,this.count=0}_next(T){const g=this.ring,b=this.total,l=this.count++;g.length0){const b=this.count>=this.total?this.total:this.count,l=this.ring;for(let h=0;h{"use strict";Y.d(be,{R:()=>q});var ie=Y(85345);function q(d){return x=>x.lift(new O(d))}class O{constructor(x){this.notifier=x}call(x,f){const T=new E(x),g=(0,ie.ft)(this.notifier,new ie.IY(T));return g&&!T.seenValue?(T.add(g),f.subscribe(T)):T}}class E extends ie.Ds{constructor(x){super(x),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},68307:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>E});var ie=Y(77393),q=Y(98640),O=Y(69105);function E(f,T,g){return function(l){return l.lift(new d(f,T,g))}}class d{constructor(T,g,b){this.nextOrObserver=T,this.error=g,this.complete=b}call(T,g){return g.subscribe(new x(T,this.nextOrObserver,this.error,this.complete))}}class x extends ie.L{constructor(T,g,b,l){super(T),this._tapNext=q.Z,this._tapError=q.Z,this._tapComplete=q.Z,this._tapError=b||q.Z,this._tapComplete=l||q.Z,(0,O.m)(g)?(this._context=this,this._tapNext=g):g&&(this._context=g,this._tapNext=g.next||q.Z,this._tapError=g.error||q.Z,this._tapComplete=g.complete||q.Z)}_next(T){try{this._tapNext.call(this._context,T)}catch(g){return void this.destination.error(g)}this.destination.next(T)}_error(T){try{this._tapError.call(this._context,T)}catch(g){return void this.destination.error(g)}this.destination.error(T)}_complete(){try{this._tapComplete.call(this._context)}catch(T){return void this.destination.error(T)}return this.destination.complete()}}},44635:(bt,be,Y)=>{"use strict";Y.d(be,{T:()=>O});var ie=Y(13410),q=Y(77393);function O(f=x){return T=>T.lift(new E(f))}class E{constructor(T){this.errorFactory=T}call(T,g){return g.subscribe(new d(T,this.errorFactory))}}class d extends q.L{constructor(T,g){super(T),this.errorFactory=g,this.hasValue=!1}_next(T){this.hasValue=!0,this.destination.next(T)}_complete(){if(this.hasValue)return this.destination.complete();{let T;try{T=this.errorFactory()}catch(g){T=g}this.destination.error(T)}}}function x(){return new ie.K}},57057:(bt,be,Y)=>{"use strict";Y.d(be,{M:()=>O});var ie=Y(55197),q=Y(20509);function O(...x){return f=>{let T;return"function"==typeof x[x.length-1]&&(T=x.pop()),f.lift(new E(x,T))}}class E{constructor(f,T){this.observables=f,this.project=T}call(f,T){return T.subscribe(new d(f,this.observables,this.project))}}class d extends ie.L{constructor(f,T,g){super(f),this.observables=T,this.project=g,this.toRespond=[];const b=T.length;this.values=new Array(b);for(let l=0;l0){const l=b.indexOf(g);-1!==l&&b.splice(l,1)}}notifyComplete(){}_next(f){if(0===this.toRespond.length){const T=[f,...this.values];this.project?this._tryProject(T):this.destination.next(T)}}_tryProject(f){let T;try{T=this.project.apply(this,f)}catch(g){return void this.destination.error(g)}this.destination.next(T)}}},94087:(bt,be,Y)=>{"use strict";Y.d(be,{r:()=>O});var ie=Y(39897),q=Y(10826);function O(E,d){return new ie.y(x=>{const f=new q.w;let T=0;return f.add(d.schedule(function(){T!==E.length?(x.next(E[T++]),x.closed||f.add(this.schedule())):x.complete()})),f})}},91115:(bt,be,Y)=>{"use strict";Y.d(be,{x:()=>u});var ie=Y(39897),q=Y(10826),O=Y(16554),x=Y(94087),f=Y(20377),b=Y(44072),l=Y(69489);function u(m,_){if(null!=m){if(function(m){return m&&"function"==typeof m[O.L]}(m))return function(m,_){return new ie.y(w=>{const S=new q.w;return S.add(_.schedule(()=>{const I=m[O.L]();S.add(I.subscribe({next(P){S.add(_.schedule(()=>w.next(P)))},error(P){S.add(_.schedule(()=>w.error(P)))},complete(){S.add(_.schedule(()=>w.complete()))}}))})),S})}(m,_);if((0,b.t)(m))return function(m,_){return new ie.y(w=>{const S=new q.w;return S.add(_.schedule(()=>m.then(I=>{S.add(_.schedule(()=>{w.next(I),S.add(_.schedule(()=>w.complete()))}))},I=>{S.add(_.schedule(()=>w.error(I)))}))),S})}(m,_);if((0,l.z)(m))return(0,x.r)(m,_);if(function(m){return m&&"function"==typeof m[f.hZ]}(m)||"string"==typeof m)return function(m,_){if(!m)throw new Error("Iterable cannot be null");return new ie.y(w=>{const S=new q.w;let I;return S.add(()=>{I&&"function"==typeof I.return&&I.return()}),S.add(_.schedule(()=>{I=m[f.hZ](),S.add(_.schedule(function(){if(w.closed)return;let P,L;try{const V=I.next();P=V.value,L=V.done}catch(V){return void w.error(V)}L?w.complete():(w.next(P),this.schedule())}))})),S})}(m,_)}throw new TypeError((null!==m&&typeof m||m)+" is not observable")}},36465:(bt,be,Y)=>{"use strict";Y.d(be,{o:()=>O});var ie=Y(10826);class q extends ie.w{constructor(d,x){super()}schedule(d,x=0){return this}}class O extends q{constructor(d,x){super(d,x),this.scheduler=d,this.work=x,this.pending=!1}schedule(d,x=0){if(this.closed)return this;this.state=d;const f=this.id,T=this.scheduler;return null!=f&&(this.id=this.recycleAsyncId(T,f,x)),this.pending=!0,this.delay=x,this.id=this.id||this.requestAsyncId(T,this.id,x),this}requestAsyncId(d,x,f=0){return setInterval(d.flush.bind(d,this),f)}recycleAsyncId(d,x,f=0){if(null!==f&&this.delay===f&&!1===this.pending)return x;clearInterval(x)}execute(d,x){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const f=this._execute(d,x);if(f)return f;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(d,x){let T,f=!1;try{this.work(d)}catch(g){f=!0,T=!!g&&g||new Error(g)}if(f)return this.unsubscribe(),T}_unsubscribe(){const d=this.id,x=this.scheduler,f=x.actions,T=f.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==T&&f.splice(T,1),null!=d&&(this.id=this.recycleAsyncId(x,d,null)),this.delay=null}}},4548:(bt,be,Y)=>{"use strict";Y.d(be,{v:()=>q});var ie=Y(2217);class q extends ie.b{constructor(E,d=ie.b.now){super(E,()=>q.delegate&&q.delegate!==this?q.delegate.now():d()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(E,d=0,x){return q.delegate&&q.delegate!==this?q.delegate.schedule(E,d,x):super.schedule(E,d,x)}flush(E){const{actions:d}=this;if(this.active)return void d.push(E);let x;this.active=!0;do{if(x=E.execute(E.state,E.delay))break}while(E=d.shift());if(this.active=!1,x){for(;E=d.shift();)E.unsubscribe();throw x}}}},61927:(bt,be,Y)=>{"use strict";Y.d(be,{r:()=>x,Z:()=>d});var ie=Y(36465),O=Y(4548);const d=new class extends O.v{flush(T){this.active=!0,this.scheduled=void 0;const{actions:g}=this;let b,l=-1,h=g.length;T=T||g.shift();do{if(b=T.execute(T.state,T.delay))break}while(++l0?super.requestAsyncId(T,g,b):(T.actions.push(this),T.scheduled||(T.scheduled=requestAnimationFrame(()=>T.flush(null))))}recycleAsyncId(T,g,b=0){if(null!==b&&b>0||null===b&&this.delay>0)return super.recycleAsyncId(T,g,b);0===T.actions.length&&(cancelAnimationFrame(g),T.scheduled=void 0)}}),x=d},64581:(bt,be,Y)=>{"use strict";Y.d(be,{e:()=>h,E:()=>l});let ie=1;const q=Promise.resolve(),O={};function E(u){return u in O&&(delete O[u],!0)}const d={setImmediate(u){const m=ie++;return O[m]=!0,q.then(()=>E(m)&&u()),m},clearImmediate(u){E(u)}};var f=Y(36465),g=Y(4548);const l=new class extends g.v{flush(m){this.active=!0,this.scheduled=void 0;const{actions:_}=this;let w,S=-1,I=_.length;m=m||_.shift();do{if(w=m.execute(m.state,m.delay))break}while(++S0?super.requestAsyncId(m,_,w):(m.actions.push(this),m.scheduled||(m.scheduled=d.setImmediate(m.flush.bind(m,null))))}recycleAsyncId(m,_,w=0){if(null!==w&&w>0||null===w&&this.delay>0)return super.recycleAsyncId(m,_,w);0===m.actions.length&&(d.clearImmediate(_),m.scheduled=void 0)}}),h=l},33637:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>O,P:()=>E});var ie=Y(36465);const O=new(Y(4548).v)(ie.o),E=O},57771:(bt,be,Y)=>{"use strict";Y.d(be,{c:()=>x,N:()=>d});var ie=Y(36465),O=Y(4548);const d=new class extends O.v{}(class extends ie.o{constructor(T,g){super(T,g),this.scheduler=T,this.work=g}schedule(T,g=0){return g>0?super.schedule(T,g):(this.delay=g,this.state=T,this.scheduler.flush(this),this)}execute(T,g){return g>0||this.closed?super.execute(T,g):this._execute(T,g)}requestAsyncId(T,g,b=0){return null!==b&&b>0||null===b&&this.delay>0?super.requestAsyncId(T,g,b):T.flush(this)}}),x=d},20377:(bt,be,Y)=>{"use strict";Y.d(be,{hZ:()=>q});const q="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},16554:(bt,be,Y)=>{"use strict";Y.d(be,{L:()=>ie});const ie="function"==typeof Symbol&&Symbol.observable||"@@observable"},29181:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>ie});const ie="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},7108:(bt,be,Y)=>{"use strict";Y.d(be,{W:()=>q});const q=(()=>{function O(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return O.prototype=Object.create(Error.prototype),O})()},13410:(bt,be,Y)=>{"use strict";Y.d(be,{K:()=>q});const q=(()=>{function O(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return O.prototype=Object.create(Error.prototype),O})()},77971:(bt,be,Y)=>{"use strict";Y.d(be,{N:()=>q});const q=(()=>{function O(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return O.prototype=Object.create(Error.prototype),O})()},57744:(bt,be,Y)=>{"use strict";Y.d(be,{B:()=>q});const q=(()=>{function O(E){return Error.call(this),this.message=E?`${E.length} errors occurred during unsubscription:\n${E.map((d,x)=>`${x+1}) ${d.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=E,this}return O.prototype=Object.create(Error.prototype),O})()},13179:(bt,be,Y)=>{"use strict";Y.d(be,{_:()=>q});var ie=Y(77393);function q(O){for(;O;){const{closed:E,destination:d,isStopped:x}=O;if(E||x)return!1;O=d&&d instanceof ie.L?d:null}return!0}},54449:(bt,be,Y)=>{"use strict";function ie(q){setTimeout(()=>{throw q},0)}Y.d(be,{z:()=>ie})},54487:(bt,be,Y)=>{"use strict";function ie(q){return q}Y.d(be,{y:()=>ie})},59796:(bt,be,Y)=>{"use strict";Y.d(be,{k:()=>ie});const ie=Array.isArray||(q=>q&&"number"==typeof q.length)},69489:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>ie});const ie=q=>q&&"number"==typeof q.length&&"function"!=typeof q},39989:(bt,be,Y)=>{"use strict";function ie(q){return q instanceof Date&&!isNaN(+q)}Y.d(be,{J:()=>ie})},69105:(bt,be,Y)=>{"use strict";function ie(q){return"function"==typeof q}Y.d(be,{m:()=>ie})},26561:(bt,be,Y)=>{"use strict";Y.d(be,{k:()=>q});var ie=Y(59796);function q(O){return!(0,ie.k)(O)&&O-parseFloat(O)+1>=0}},81555:(bt,be,Y)=>{"use strict";function ie(q){return null!==q&&"object"==typeof q}Y.d(be,{K:()=>ie})},95639:(bt,be,Y)=>{"use strict";Y.d(be,{b:()=>q});var ie=Y(39897);function q(O){return!!O&&(O instanceof ie.y||"function"==typeof O.lift&&"function"==typeof O.subscribe)}},44072:(bt,be,Y)=>{"use strict";function ie(q){return!!q&&"function"!=typeof q.subscribe&&"function"==typeof q.then}Y.d(be,{t:()=>ie})},54869:(bt,be,Y)=>{"use strict";function ie(q){return q&&"function"==typeof q.schedule}Y.d(be,{K:()=>ie})},98640:(bt,be,Y)=>{"use strict";function ie(){}Y.d(be,{Z:()=>ie})},34022:(bt,be,Y)=>{"use strict";Y.d(be,{z:()=>q,U:()=>O});var ie=Y(54487);function q(...E){return O(E)}function O(E){return 0===E.length?ie.y:1===E.length?E[0]:function(x){return E.reduce((f,T)=>T(f),x)}}},87444:(bt,be,Y)=>{"use strict";Y.d(be,{s:()=>l});var ie=Y(55015),q=Y(54449),E=Y(20377),x=Y(16554),T=Y(69489),g=Y(44072),b=Y(81555);const l=h=>{if(h&&"function"==typeof h[x.L])return(h=>u=>{const m=h[x.L]();if("function"!=typeof m.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return m.subscribe(u)})(h);if((0,T.z)(h))return(0,ie.V)(h);if((0,g.t)(h))return(h=>u=>(h.then(m=>{u.closed||(u.next(m),u.complete())},m=>u.error(m)).then(null,q.z),u))(h);if(h&&"function"==typeof h[E.hZ])return(h=>u=>{const m=h[E.hZ]();for(;;){let _;try{_=m.next()}catch(w){return u.error(w),u}if(_.done){u.complete();break}if(u.next(_.value),u.closed)break}return"function"==typeof m.return&&u.add(()=>{m.return&&m.return()}),u})(h);{const m=`You provided ${(0,b.K)(h)?"an invalid object":`'${h}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(m)}}},55015:(bt,be,Y)=>{"use strict";Y.d(be,{V:()=>ie});const ie=q=>O=>{for(let E=0,d=q.length;E{"use strict";Y.d(be,{D:()=>d});var ie=Y(77393);class q extends ie.L{constructor(f,T,g){super(),this.parent=f,this.outerValue=T,this.outerIndex=g,this.index=0}_next(f){this.parent.notifyNext(this.outerValue,f,this.outerIndex,this.index++,this)}_error(f){this.parent.notifyError(f,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var O=Y(87444),E=Y(39897);function d(x,f,T,g,b=new q(x,T,g)){if(!b.closed)return f instanceof E.y?f.subscribe(b):(0,O.s)(f)(b)}},55859:(bt,be,Y)=>{var ie=Y(3875),q=ie.Buffer;function O(d,x){for(var f in d)x[f]=d[f]}function E(d,x,f){return q(d,x,f)}q.from&&q.alloc&&q.allocUnsafe&&q.allocUnsafeSlow?bt.exports=ie:(O(ie,be),be.Buffer=E),E.prototype=Object.create(q.prototype),O(q,E),E.from=function(d,x,f){if("number"==typeof d)throw new TypeError("Argument must not be a number");return q(d,x,f)},E.alloc=function(d,x,f){if("number"!=typeof d)throw new TypeError("Argument must be a number");var T=q(d);return void 0!==x?"string"==typeof f?T.fill(x,f):T.fill(x):T.fill(0),T},E.allocUnsafe=function(d){if("number"!=typeof d)throw new TypeError("Argument must be a number");return q(d)},E.allocUnsafeSlow=function(d){if("number"!=typeof d)throw new TypeError("Argument must be a number");return ie.SlowBuffer(d)}},28898:(bt,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.safeJsonParse=function(q){if("string"!=typeof q)throw new Error("Cannot safe json parse value of type "+typeof q);try{return JSON.parse(q)}catch{return q}},be.safeJsonStringify=function(q){return"string"==typeof q?q:JSON.stringify(q,(O,E)=>void 0===E?null:E)}},88114:(bt,be,Y)=>{"use strict";var E,ie=Y(3875),q=ie.Buffer,O={};for(E in ie)!ie.hasOwnProperty(E)||"SlowBuffer"===E||"Buffer"===E||(O[E]=ie[E]);var d=O.Buffer={};for(E in q)!q.hasOwnProperty(E)||"allocUnsafe"===E||"allocUnsafeSlow"===E||(d[E]=q[E]);if(O.Buffer.prototype=q.prototype,(!d.from||d.from===Uint8Array.from)&&(d.from=function(x,f,T){if("number"==typeof x)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof x);if(x&&void 0===x.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);return q(x,f,T)}),d.alloc||(d.alloc=function(x,f,T){if("number"!=typeof x)throw new TypeError('The "size" argument must be of type number. Received type '+typeof x);if(x<0||x>=2*(1<<30))throw new RangeError('The value "'+x+'" is invalid for option "size"');var g=q(x);return f&&0!==f.length?"string"==typeof T?g.fill(f,T):g.fill(f):g.fill(0),g}),!O.kStringMaxLength)try{O.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}O.constants||(O.constants={MAX_LENGTH:O.kMaxLength},O.kStringMaxLength&&(O.constants.MAX_STRING_LENGTH=O.kStringMaxLength)),bt.exports=O},21719:function(bt){"use strict";!function(be){const Y=2147483647;function ie(h){const 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]);let m=1779033703,_=3144134277,w=1013904242,S=2773480762,I=1359893119,P=2600822924,L=528734635,V=1541459225;const W=new Uint32Array(64);function G(M){let v=0,k=M.length;for(;k>=64;){let ue,we,ae,Te,le,D=m,N=_,C=w,a=S,B=I,Q=P,ee=L,ce=V;for(we=0;we<16;we++)ae=v+4*we,W[we]=(255&M[ae])<<24|(255&M[ae+1])<<16|(255&M[ae+2])<<8|255&M[ae+3];for(we=16;we<64;we++)ue=W[we-2],Te=(ue>>>17|ue<<15)^(ue>>>19|ue<<13)^ue>>>10,ue=W[we-15],le=(ue>>>7|ue<<25)^(ue>>>18|ue<<14)^ue>>>3,W[we]=(Te+W[we-7]|0)+(le+W[we-16]|0)|0;for(we=0;we<64;we++)Te=(((B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7))+(B&Q^~B&ee)|0)+(ce+(u[we]+W[we]|0)|0)|0,le=((D>>>2|D<<30)^(D>>>13|D<<19)^(D>>>22|D<<10))+(D&N^D&C^N&C)|0,ce=ee,ee=Q,Q=B,B=a+Te|0,a=C,C=N,N=D,D=Te+le|0;m=m+D|0,_=_+N|0,w=w+C|0,S=S+a|0,I=I+B|0,P=P+Q|0,L=L+ee|0,V=V+ce|0,v+=64,k-=64}}G(h);let H,j=h.length%64,K=h.length/536870912|0,R=h.length<<3,o=j<56?56:120,y=h.slice(h.length-j,h.length);for(y.push(128),H=j+1;H>>24&255),y.push(K>>>16&255),y.push(K>>>8&255),y.push(K>>>0&255),y.push(R>>>24&255),y.push(R>>>16&255),y.push(R>>>8&255),y.push(R>>>0&255),G(y),[m>>>24&255,m>>>16&255,m>>>8&255,m>>>0&255,_>>>24&255,_>>>16&255,_>>>8&255,_>>>0&255,w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,V>>>24&255,V>>>16&255,V>>>8&255,V>>>0&255]}function q(h,u,m){h=h.length<=64?h:ie(h);const _=64+u.length+4,w=new Array(_),S=new Array(64);let I,P=[];for(I=0;I<64;I++)w[I]=54;for(I=0;I=_-4;V--){if(w[V]++,w[V]<=255)return;w[V]=0}}for(;m>=32;)L(),P=P.concat(ie(S.concat(ie(w)))),m-=32;return m>0&&(L(),P=P.concat(ie(S.concat(ie(w))).slice(0,m))),P}function O(h,u,m,_,w){let S;for(f(h,16*(2*m-1),w,0,16),S=0;S<2*m;S++)x(h,16*S,w,16),d(w,_),f(w,0,h,u+16*S,16);for(S=0;S>>32-u}function d(h,u){f(h,0,u,0,16);for(let m=8;m>0;m-=2)u[4]^=E(u[0]+u[12],7),u[8]^=E(u[4]+u[0],9),u[12]^=E(u[8]+u[4],13),u[0]^=E(u[12]+u[8],18),u[9]^=E(u[5]+u[1],7),u[13]^=E(u[9]+u[5],9),u[1]^=E(u[13]+u[9],13),u[5]^=E(u[1]+u[13],18),u[14]^=E(u[10]+u[6],7),u[2]^=E(u[14]+u[10],9),u[6]^=E(u[2]+u[14],13),u[10]^=E(u[6]+u[2],18),u[3]^=E(u[15]+u[11],7),u[7]^=E(u[3]+u[15],9),u[11]^=E(u[7]+u[3],13),u[15]^=E(u[11]+u[7],18),u[1]^=E(u[0]+u[3],7),u[2]^=E(u[1]+u[0],9),u[3]^=E(u[2]+u[1],13),u[0]^=E(u[3]+u[2],18),u[6]^=E(u[5]+u[4],7),u[7]^=E(u[6]+u[5],9),u[4]^=E(u[7]+u[6],13),u[5]^=E(u[4]+u[7],18),u[11]^=E(u[10]+u[9],7),u[8]^=E(u[11]+u[10],9),u[9]^=E(u[8]+u[11],13),u[10]^=E(u[9]+u[8],18),u[12]^=E(u[15]+u[14],7),u[13]^=E(u[12]+u[15],9),u[14]^=E(u[13]+u[12],13),u[15]^=E(u[14]+u[13],18);for(let m=0;m<16;++m)h[m]+=u[m]}function x(h,u,m,_){for(let w=0;w<_;w++)m[w]^=h[u+w]}function f(h,u,m,_,w){for(;w--;)m[_++]=h[u++]}function T(h){if(!h||"number"!=typeof h.length)return!1;for(let u=0;u=256)return!1}return!0}function g(h,u){if("number"!=typeof h||h%1)throw new Error("invalid "+u);return h}function b(h,u,m,_,w,S,I){if(m=g(m,"N"),_=g(_,"r"),w=g(w,"p"),S=g(S,"dkLen"),0===m||0!=(m&m-1))throw new Error("N must be power of 2");if(m>Y/128/_)throw new Error("N too large");if(_>Y/128/w)throw new Error("r too large");if(!T(h))throw new Error("password must be an array or buffer");if(h=Array.prototype.slice.call(h),!T(u))throw new Error("salt must be an array or buffer");u=Array.prototype.slice.call(u);let P=q(h,u,128*w*_);const L=new Uint32Array(32*w*_);for(let B=0;BN&&(B=N);for(let ee=0;eeN&&(B=N);for(let ee=0;ee>0&255),P.push(L[ee]>>8&255),P.push(L[ee]>>16&255),P.push(L[ee]>>24&255);const Q=q(h,P,S);return I&&I(null,1,Q),Q}I&&C(a)};if(!I)for(;;){const B=a();if(null!=B)return B}a()}bt.exports={scrypt:function(h,u,m,_,w,S,I){return new Promise(function(P,L){let V=0;I&&I(0),b(h,u,m,_,w,S,function(W,G,H){if(W)L(W);else if(H)I&&1!==V&&I(1),P(new Uint8Array(H));else if(I&&G!==V)return V=G,I(G)})})},syncScrypt:function(h,u,m,_,w,S){return new Uint8Array(b(h,u,m,_,w,S))}}}()},93437:(bt,be,Y)=>{var ie=Y(55859).Buffer;function q(O,E){this._block=ie.alloc(O),this._finalSize=E,this._blockSize=O,this._len=0}q.prototype.update=function(O,E){"string"==typeof O&&(O=ie.from(O,E=E||"utf8"));for(var d=this._block,x=this._blockSize,f=O.length,T=this._len,g=0;g=this._finalSize&&(this._update(this._block),this._block.fill(0));var d=8*this._len;if(d<=4294967295)this._block.writeUInt32BE(d,this._blockSize-4);else{var x=(4294967295&d)>>>0;this._block.writeUInt32BE((d-x)/4294967296,this._blockSize-8),this._block.writeUInt32BE(x,this._blockSize-4)}this._update(this._block);var T=this._hash();return O?T.toString(O):T},q.prototype._update=function(){throw new Error("_update must be implemented by subclass")},bt.exports=q},45829:(bt,be,Y)=>{var ie=bt.exports=function(O){O=O.toLowerCase();var E=ie[O];if(!E)throw new Error(O+" is not supported (we accept pull requests)");return new E};ie.sha=Y(16356),ie.sha1=Y(37338),ie.sha224=Y(4280),ie.sha256=Y(80857),ie.sha384=Y(76203),ie.sha512=Y(65976)},16356:(bt,be,Y)=>{var ie=Y(59879),q=Y(93437),O=Y(55859).Buffer,E=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);function x(){this.init(),this._w=d,q.call(this,64,56)}function f(b){return b<<5|b>>>27}function T(b){return b<<30|b>>>2}function g(b,l,h,u){return 0===b?l&h|~l&u:2===b?l&h|l&u|h&u:l^h^u}ie(x,q),x.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},x.prototype._update=function(b){for(var l=this._w,h=0|this._a,u=0|this._b,m=0|this._c,_=0|this._d,w=0|this._e,S=0;S<16;++S)l[S]=b.readInt32BE(4*S);for(;S<80;++S)l[S]=l[S-3]^l[S-8]^l[S-14]^l[S-16];for(var I=0;I<80;++I){var P=~~(I/20),L=f(h)+g(P,u,m,_)+w+l[I]+E[P]|0;w=_,_=m,m=T(u),u=h,h=L}this._a=h+this._a|0,this._b=u+this._b|0,this._c=m+this._c|0,this._d=_+this._d|0,this._e=w+this._e|0},x.prototype._hash=function(){var b=O.allocUnsafe(20);return b.writeInt32BE(0|this._a,0),b.writeInt32BE(0|this._b,4),b.writeInt32BE(0|this._c,8),b.writeInt32BE(0|this._d,12),b.writeInt32BE(0|this._e,16),b},bt.exports=x},37338:(bt,be,Y)=>{var ie=Y(59879),q=Y(93437),O=Y(55859).Buffer,E=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);function x(){this.init(),this._w=d,q.call(this,64,56)}function f(l){return l<<1|l>>>31}function T(l){return l<<5|l>>>27}function g(l){return l<<30|l>>>2}function b(l,h,u,m){return 0===l?h&u|~h&m:2===l?h&u|h&m|u&m:h^u^m}ie(x,q),x.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},x.prototype._update=function(l){for(var h=this._w,u=0|this._a,m=0|this._b,_=0|this._c,w=0|this._d,S=0|this._e,I=0;I<16;++I)h[I]=l.readInt32BE(4*I);for(;I<80;++I)h[I]=f(h[I-3]^h[I-8]^h[I-14]^h[I-16]);for(var P=0;P<80;++P){var L=~~(P/20),V=T(u)+b(L,m,_,w)+S+h[P]+E[L]|0;S=w,w=_,_=g(m),m=u,u=V}this._a=u+this._a|0,this._b=m+this._b|0,this._c=_+this._c|0,this._d=w+this._d|0,this._e=S+this._e|0},x.prototype._hash=function(){var l=O.allocUnsafe(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},bt.exports=x},4280:(bt,be,Y)=>{var ie=Y(59879),q=Y(80857),O=Y(93437),E=Y(55859).Buffer,d=new Array(64);function x(){this.init(),this._w=d,O.call(this,64,56)}ie(x,q),x.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},x.prototype._hash=function(){var f=E.allocUnsafe(28);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f},bt.exports=x},80857:(bt,be,Y)=>{var ie=Y(59879),q=Y(93437),O=Y(55859).Buffer,E=[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],d=new Array(64);function x(){this.init(),this._w=d,q.call(this,64,56)}function f(u,m,_){return _^u&(m^_)}function T(u,m,_){return u&m|_&(u|m)}function g(u){return(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10)}function b(u){return(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7)}function l(u){return(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3}function h(u){return(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10}ie(x,q),x.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},x.prototype._update=function(u){for(var m=this._w,_=0|this._a,w=0|this._b,S=0|this._c,I=0|this._d,P=0|this._e,L=0|this._f,V=0|this._g,W=0|this._h,G=0;G<16;++G)m[G]=u.readInt32BE(4*G);for(;G<64;++G)m[G]=h(m[G-2])+m[G-7]+l(m[G-15])+m[G-16]|0;for(var H=0;H<64;++H){var j=W+b(P)+f(P,L,V)+E[H]+m[H]|0,K=g(_)+T(_,w,S)|0;W=V,V=L,L=P,P=I+j|0,I=S,S=w,w=_,_=j+K|0}this._a=_+this._a|0,this._b=w+this._b|0,this._c=S+this._c|0,this._d=I+this._d|0,this._e=P+this._e|0,this._f=L+this._f|0,this._g=V+this._g|0,this._h=W+this._h|0},x.prototype._hash=function(){var u=O.allocUnsafe(32);return u.writeInt32BE(this._a,0),u.writeInt32BE(this._b,4),u.writeInt32BE(this._c,8),u.writeInt32BE(this._d,12),u.writeInt32BE(this._e,16),u.writeInt32BE(this._f,20),u.writeInt32BE(this._g,24),u.writeInt32BE(this._h,28),u},bt.exports=x},76203:(bt,be,Y)=>{var ie=Y(59879),q=Y(65976),O=Y(93437),E=Y(55859).Buffer,d=new Array(160);function x(){this.init(),this._w=d,O.call(this,128,112)}ie(x,q),x.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},x.prototype._hash=function(){var f=E.allocUnsafe(48);function T(g,b,l){f.writeInt32BE(g,l),f.writeInt32BE(b,l+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),f},bt.exports=x},65976:(bt,be,Y)=>{var ie=Y(59879),q=Y(93437),O=Y(55859).Buffer,E=[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],d=new Array(160);function x(){this.init(),this._w=d,q.call(this,128,112)}function f(w,S,I){return I^w&(S^I)}function T(w,S,I){return w&S|I&(w|S)}function g(w,S){return(w>>>28|S<<4)^(S>>>2|w<<30)^(S>>>7|w<<25)}function b(w,S){return(w>>>14|S<<18)^(w>>>18|S<<14)^(S>>>9|w<<23)}function l(w,S){return(w>>>1|S<<31)^(w>>>8|S<<24)^w>>>7}function h(w,S){return(w>>>1|S<<31)^(w>>>8|S<<24)^(w>>>7|S<<25)}function u(w,S){return(w>>>19|S<<13)^(S>>>29|w<<3)^w>>>6}function m(w,S){return(w>>>19|S<<13)^(S>>>29|w<<3)^(w>>>6|S<<26)}function _(w,S){return w>>>0>>0?1:0}ie(x,q),x.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},x.prototype._update=function(w){for(var S=this._w,I=0|this._ah,P=0|this._bh,L=0|this._ch,V=0|this._dh,W=0|this._eh,G=0|this._fh,H=0|this._gh,j=0|this._hh,K=0|this._al,R=0|this._bl,o=0|this._cl,y=0|this._dl,M=0|this._el,v=0|this._fl,k=0|this._gl,D=0|this._hl,N=0;N<32;N+=2)S[N]=w.readInt32BE(4*N),S[N+1]=w.readInt32BE(4*N+4);for(;N<160;N+=2){var C=S[N-30],a=S[N-30+1],B=l(C,a),Q=h(a,C),ee=u(C=S[N-4],a=S[N-4+1]),ce=m(a,C),ae=S[N-32],Te=S[N-32+1],le=Q+S[N-14+1]|0,X=B+S[N-14]+_(le,Q)|0;X=(X=X+ee+_(le=le+ce|0,ce)|0)+ae+_(le=le+Te|0,Te)|0,S[N]=X,S[N+1]=le}for(var ne=0;ne<160;ne+=2){X=S[ne],le=S[ne+1];var pe=T(I,P,L),_e=T(K,R,o),xe=g(I,K),Ce=g(K,I),ke=b(W,M),me=b(M,W),Ee=E[ne],ze=E[ne+1],Ve=f(W,G,H),nt=f(M,v,k),tt=D+me|0,mt=j+ke+_(tt,D)|0;mt=(mt=(mt=mt+Ve+_(tt=tt+nt|0,nt)|0)+Ee+_(tt=tt+ze|0,ze)|0)+X+_(tt=tt+le|0,le)|0;var ht=Ce+_e|0,wt=xe+pe+_(ht,Ce)|0;j=H,D=k,H=G,k=v,G=W,v=M,W=V+mt+_(M=y+tt|0,y)|0,V=L,y=o,L=P,o=R,P=I,R=K,I=mt+wt+_(K=tt+ht|0,tt)|0}this._al=this._al+K|0,this._bl=this._bl+R|0,this._cl=this._cl+o|0,this._dl=this._dl+y|0,this._el=this._el+M|0,this._fl=this._fl+v|0,this._gl=this._gl+k|0,this._hl=this._hl+D|0,this._ah=this._ah+I+_(this._al,K)|0,this._bh=this._bh+P+_(this._bl,R)|0,this._ch=this._ch+L+_(this._cl,o)|0,this._dh=this._dh+V+_(this._dl,y)|0,this._eh=this._eh+W+_(this._el,M)|0,this._fh=this._fh+G+_(this._fl,v)|0,this._gh=this._gh+H+_(this._gl,k)|0,this._hh=this._hh+j+_(this._hl,D)|0},x.prototype._hash=function(){var w=O.allocUnsafe(64);function S(I,P,L){w.writeInt32BE(I,L),w.writeInt32BE(P,L+4)}return S(this._ah,this._al,0),S(this._bh,this._bl,8),S(this._ch,this._cl,16),S(this._dh,this._dl,24),S(this._eh,this._el,32),S(this._fh,this._fl,40),S(this._gh,this._gl,48),S(this._hh,this._hl,56),w},bt.exports=x},11144:(bt,be,Y)=>{"use strict";var ie=Y(18540),q=Y(19568),O=Y(81380),E=ie("%TypeError%"),d=ie("%WeakMap%",!0),x=ie("%Map%",!0),f=q("WeakMap.prototype.get",!0),T=q("WeakMap.prototype.set",!0),g=q("WeakMap.prototype.has",!0),b=q("Map.prototype.get",!0),l=q("Map.prototype.set",!0),h=q("Map.prototype.has",!0),u=function(S,I){for(var L,P=S;null!==(L=P.next);P=L)if(L.key===I)return P.next=L.next,L.next=S.next,S.next=L,L};bt.exports=function(){var I,P,L,V={assert:function(W){if(!V.has(W))throw new E("Side channel does not contain "+O(W))},get:function(W){if(d&&W&&("object"==typeof W||"function"==typeof W)){if(I)return f(I,W)}else if(x){if(P)return b(P,W)}else if(L)return function(S,I){var P=u(S,I);return P&&P.value}(L,W)},has:function(W){if(d&&W&&("object"==typeof W||"function"==typeof W)){if(I)return g(I,W)}else if(x){if(P)return h(P,W)}else if(L)return function(S,I){return!!u(S,I)}(L,W);return!1},set:function(W,G){d&&W&&("object"==typeof W||"function"==typeof W)?(I||(I=new d),T(I,W,G)):x?(P||(P=new x),l(P,W,G)):(L||(L={key:{},next:null}),function(S,I,P){var L=u(S,I);L?L.value=P:S.next={key:I,next:S.next,value:P}}(L,W,G))}};return V}},95967:bt=>{"use strict";bt.exports=(be,Y)=>{if("string"!=typeof be||"string"!=typeof Y)throw new TypeError("Expected the arguments to be of type `string`");if(""===Y)return[be];const ie=be.indexOf(Y);return-1===ie?[be]:[be.slice(0,ie),be.slice(ie+Y.length)]}},36917:(bt,be,Y)=>{bt.exports=O;var ie=Y(93105).EventEmitter;function O(){ie.call(this)}Y(59879)(O,ie),O.Readable=Y(32833),O.Writable=Y(37807),O.Duplex=Y(20942),O.Transform=Y(55431),O.PassThrough=Y(90619),O.finished=Y(6820),O.pipeline=Y(36076),O.Stream=O,O.prototype.pipe=function(E,d){var x=this;function f(m){E.writable&&!1===E.write(m)&&x.pause&&x.pause()}function T(){x.readable&&x.resume&&x.resume()}x.on("data",f),E.on("drain",T),!E._isStdio&&(!d||!1!==d.end)&&(x.on("end",b),x.on("close",l));var g=!1;function b(){g||(g=!0,E.end())}function l(){g||(g=!0,"function"==typeof E.destroy&&E.destroy())}function h(m){if(u(),0===ie.listenerCount(this,"error"))throw m}function u(){x.removeListener("data",f),E.removeListener("drain",T),x.removeListener("end",b),x.removeListener("close",l),x.removeListener("error",h),E.removeListener("error",h),x.removeListener("end",u),x.removeListener("close",u),E.removeListener("close",u)}return x.on("error",h),E.on("error",h),x.on("end",u),x.on("close",u),E.on("close",u),E.emit("pipe",x),E}},82915:bt=>{"use strict";bt.exports=be=>encodeURIComponent(be).replace(/[!'()*]/g,Y=>`%${Y.charCodeAt(0).toString(16).toUpperCase()}`)},32519:(bt,be,Y)=>{"use strict";var ie=Y(55859).Buffer,q=ie.isEncoding||function(I){switch((I=""+I)&&I.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 d(I){var P;switch(this.encoding=function(I){var P=function(I){if(!I)return"utf8";for(var P;;)switch(I){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 I;default:if(P)return;I=(""+I).toLowerCase(),P=!0}}(I);if("string"!=typeof P&&(ie.isEncoding===q||!q(I)))throw new Error("Unknown encoding: "+I);return P||I}(I),this.encoding){case"utf16le":this.text=h,this.end=u,P=4;break;case"utf8":this.fillLast=g,P=4;break;case"base64":this.text=m,this.end=_,P=3;break;default:return this.write=w,void(this.end=S)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ie.allocUnsafe(P)}function x(I){return I<=127?0:I>>5==6?2:I>>4==14?3:I>>3==30?4:I>>6==2?-1:-2}function g(I){var P=this.lastTotal-this.lastNeed,L=function(I,P,L){if(128!=(192&P[0]))return I.lastNeed=0,"\ufffd";if(I.lastNeed>1&&P.length>1){if(128!=(192&P[1]))return I.lastNeed=1,"\ufffd";if(I.lastNeed>2&&P.length>2&&128!=(192&P[2]))return I.lastNeed=2,"\ufffd"}}(this,I);return void 0!==L?L:this.lastNeed<=I.length?(I.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(I.copy(this.lastChar,P,0,I.length),void(this.lastNeed-=I.length))}function h(I,P){if((I.length-P)%2==0){var L=I.toString("utf16le",P);if(L){var V=L.charCodeAt(L.length-1);if(V>=55296&&V<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1],L.slice(0,-1)}return L}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=I[I.length-1],I.toString("utf16le",P,I.length-1)}function u(I){var P=I&&I.length?this.write(I):"";return this.lastNeed?P+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):P}function m(I,P){var L=(I.length-P)%3;return 0===L?I.toString("base64",P):(this.lastNeed=3-L,this.lastTotal=3,1===L?this.lastChar[0]=I[I.length-1]:(this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1]),I.toString("base64",P,I.length-L))}function _(I){var P=I&&I.length?this.write(I):"";return this.lastNeed?P+this.lastChar.toString("base64",0,3-this.lastNeed):P}function w(I){return I.toString(this.encoding)}function S(I){return I&&I.length?this.write(I):""}be.s=d,d.prototype.write=function(I){if(0===I.length)return"";var P,L;if(this.lastNeed){if(void 0===(P=this.fillLast(I)))return"";L=this.lastNeed,this.lastNeed=0}else L=0;return L=0?(W>0&&(I.lastNeed=W-1),W):--V=0?(W>0&&(I.lastNeed=W-2),W):--V=0?(W>0&&(2===W?W=0:I.lastNeed=W-3),W):0}(this,I,P);if(!this.lastNeed)return I.toString("utf8",P);this.lastTotal=L;var V=I.length-(L-this.lastNeed);return I.copy(this.lastChar,0,V),I.toString("utf8",P,V)},d.prototype.fillLast=function(I){if(this.lastNeed<=I.length)return I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,I.length),this.lastNeed-=I.length}},1238:(bt,be,Y)=>{"use strict";Y.d(be,{_:()=>ru,m6:()=>go,F5:()=>na,S1:()=>jo,SP:()=>ta});var ie=Y(92280),q=Y(89225),O=Y.n(q),E=Y(97582),d=(()=>{return(et=d||(d={}))[et.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",et[et.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",et[et.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",et[et.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",et[et.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",et[et.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",et[et.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",et[et.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",et[et.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",et[et.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",et[et.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",et[et.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",et[et.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",et[et.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",et[et.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",et[et.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",et[et.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",et[et.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",et[et.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",et[et.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",et[et.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",et[et.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",et[et.INVALID_TAG=23]="INVALID_TAG",et[et.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",et[et.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",et[et.UNCLOSED_TAG=27]="UNCLOSED_TAG",d;var et})(),x=(()=>{return(et=x||(x={}))[et.literal=0]="literal",et[et.argument=1]="argument",et[et.number=2]="number",et[et.date=3]="date",et[et.time=4]="time",et[et.select=5]="select",et[et.plural=6]="plural",et[et.pound=7]="pound",et[et.tag=8]="tag",x;var et})(),f=(()=>{return(et=f||(f={}))[et.number=0]="number",et[et.dateTime=1]="dateTime",f;var et})();function T(et){return et.type===x.literal}function g(et){return et.type===x.argument}function b(et){return et.type===x.number}function l(et){return et.type===x.date}function h(et){return et.type===x.time}function u(et){return et.type===x.select}function m(et){return et.type===x.plural}function _(et){return et.type===x.pound}function w(et){return et.type===x.tag}function S(et){return!(!et||"object"!=typeof et||et.type!==f.number)}function I(et){return!(!et||"object"!=typeof et||et.type!==f.dateTime)}var V=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,G=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function H(et){var zt={};return et.replace(G,function(gn){var kn=gn.length;switch(gn[0]){case"G":zt.era=4===kn?"long":5===kn?"narrow":"short";break;case"y":zt.year=2===kn?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":zt.month=["numeric","2-digit","short","long","narrow"][kn-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":zt.day=["numeric","2-digit"][kn-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":zt.weekday=4===kn?"short":5===kn?"narrow":"short";break;case"e":if(kn<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");zt.weekday=["short","long","narrow","short"][kn-4];break;case"c":if(kn<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");zt.weekday=["short","long","narrow","short"][kn-4];break;case"a":zt.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":zt.hourCycle="h12",zt.hour=["numeric","2-digit"][kn-1];break;case"H":zt.hourCycle="h23",zt.hour=["numeric","2-digit"][kn-1];break;case"K":zt.hourCycle="h11",zt.hour=["numeric","2-digit"][kn-1];break;case"k":zt.hourCycle="h24",zt.hour=["numeric","2-digit"][kn-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":zt.minute=["numeric","2-digit"][kn-1];break;case"s":zt.second=["numeric","2-digit"][kn-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":zt.timeZoneName=kn<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),zt}var j=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function R(et){return et.replace(/^(.*?)-/,"")}var o=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,y=/^(@+)?(\+|#+)?[rs]?$/g,M=/(\*)(0+)|(#+)(0+)|(0+)/g,v=/^(0+)$/;function k(et){var zt={};return"r"===et[et.length-1]?zt.roundingPriority="morePrecision":"s"===et[et.length-1]&&(zt.roundingPriority="lessPrecision"),et.replace(y,function(gn,kn,nr){return"string"!=typeof nr?(zt.minimumSignificantDigits=kn.length,zt.maximumSignificantDigits=kn.length):"+"===nr?zt.minimumSignificantDigits=kn.length:"#"===kn[0]?zt.maximumSignificantDigits=kn.length:(zt.minimumSignificantDigits=kn.length,zt.maximumSignificantDigits=kn.length+("string"==typeof nr?nr.length:0)),""}),zt}function D(et){switch(et){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function N(et){var zt;if("E"===et[0]&&"E"===et[1]?(zt={notation:"engineering"},et=et.slice(2)):"E"===et[0]&&(zt={notation:"scientific"},et=et.slice(1)),zt){var gn=et.slice(0,2);if("+!"===gn?(zt.signDisplay="always",et=et.slice(2)):"+?"===gn&&(zt.signDisplay="exceptZero",et=et.slice(2)),!v.test(et))throw new Error("Malformed concise eng/scientific notation");zt.minimumIntegerDigits=et.length}return zt}function C(et){return D(et)||{}}function a(et){for(var zt={},gn=0,kn=et;gn1)throw new RangeError("integer-width stems only accept a single optional option");nr.options[0].replace(M,function(Ws,As,Ni,Ji,lo,qs){if(As)zt.minimumIntegerDigits=Ni.length;else{if(Ji&&lo)throw new Error("We currently do not support maximum integer digits");if(qs)throw new Error("We currently do not support exact integer digits")}return""});continue}if(v.test(nr.stem))zt.minimumIntegerDigits=nr.stem.length;else if(o.test(nr.stem)){if(nr.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");nr.stem.replace(o,function(Ws,As,Ni,Ji,lo,qs){return"*"===Ni?zt.minimumFractionDigits=As.length:Ji&&"#"===Ji[0]?zt.maximumFractionDigits=Ji.length:lo&&qs?(zt.minimumFractionDigits=lo.length,zt.maximumFractionDigits=lo.length+qs.length):(zt.minimumFractionDigits=As.length,zt.maximumFractionDigits=As.length),""});var pi=nr.options[0];"w"===pi?zt=(0,E.__assign)((0,E.__assign)({},zt),{trailingZeroDisplay:"stripIfInteger"}):pi&&(zt=(0,E.__assign)((0,E.__assign)({},zt),k(pi)))}else if(y.test(nr.stem))zt=(0,E.__assign)((0,E.__assign)({},zt),k(nr.stem));else{var xi=D(nr.stem);xi&&(zt=(0,E.__assign)((0,E.__assign)({},zt),xi));var hs=N(nr.stem);hs&&(zt=(0,E.__assign)((0,E.__assign)({},zt),hs))}}return zt}var B={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ee(et){var zt=et.hourCycle;if(void 0===zt&&et.hourCycles&&et.hourCycles.length&&(zt=et.hourCycles[0]),zt)switch(zt){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var kn,gn=et.language;return"root"!==gn&&(kn=et.maximize().region),(B[kn||""]||B[gn||""]||B["".concat(gn,"-001")]||B["001"])[0]}var ce,ue=new RegExp("^".concat(V.source,"*")),we=new RegExp("".concat(V.source,"*$"));function ae(et,zt){return{start:et,end:zt}}var Te=!!String.prototype.startsWith,le=!!String.fromCodePoint,X=!!Object.fromEntries,ne=!!String.prototype.codePointAt,pe=!!String.prototype.trimStart,_e=!!String.prototype.trimEnd,Ce=Number.isSafeInteger?Number.isSafeInteger:function(et){return"number"==typeof et&&isFinite(et)&&Math.floor(et)===et&&Math.abs(et)<=9007199254740991},ke=!0;try{ke="a"===(null===(ce=ht("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===ce?void 0:ce[0])}catch{ke=!1}var wt,Ee=Te?function(zt,gn,kn){return zt.startsWith(gn,kn)}:function(zt,gn,kn){return zt.slice(kn,kn+gn.length)===gn},ze=le?String.fromCodePoint:function(){for(var zt=[],gn=0;gnpi;){if((xi=zt[pi++])>1114111)throw RangeError(xi+" is not a valid code point");kn+=xi<65536?String.fromCharCode(xi):String.fromCharCode(55296+((xi-=65536)>>10),xi%1024+56320)}return kn},Ve=X?Object.fromEntries:function(zt){for(var gn={},kn=0,nr=zt;kn=kn)){var pi,nr=zt.charCodeAt(gn);return nr<55296||nr>56319||gn+1===kn||(pi=zt.charCodeAt(gn+1))<56320||pi>57343?nr:pi-56320+(nr-55296<<10)+65536}},tt=pe?function(zt){return zt.trimStart()}:function(zt){return zt.replace(ue,"")},mt=_e?function(zt){return zt.trimEnd()}:function(zt){return zt.replace(we,"")};function ht(et,zt){return new RegExp(et,zt)}if(ke){var Pt=ht("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wt=function(zt,gn){var kn;return Pt.lastIndex=gn,null!==(kn=Pt.exec(zt)[1])&&void 0!==kn?kn:""}}else wt=function(zt,gn){for(var kn=[];;){var nr=nt(zt,gn);if(void 0===nr||Wt(nr)||(et=nr)>=33&&et<=35||36===et||et>=37&&et<=39||40===et||41===et||42===et||43===et||44===et||45===et||et>=46&&et<=47||et>=58&&et<=59||et>=60&&et<=62||et>=63&&et<=64||91===et||92===et||93===et||94===et||96===et||123===et||124===et||125===et||126===et||161===et||et>=162&&et<=165||166===et||167===et||169===et||171===et||172===et||174===et||176===et||177===et||182===et||187===et||191===et||215===et||247===et||et>=8208&&et<=8213||et>=8214&&et<=8215||8216===et||8217===et||8218===et||et>=8219&&et<=8220||8221===et||8222===et||8223===et||et>=8224&&et<=8231||et>=8240&&et<=8248||8249===et||8250===et||et>=8251&&et<=8254||et>=8257&&et<=8259||8260===et||8261===et||8262===et||et>=8263&&et<=8273||8274===et||8275===et||et>=8277&&et<=8286||et>=8592&&et<=8596||et>=8597&&et<=8601||et>=8602&&et<=8603||et>=8604&&et<=8607||8608===et||et>=8609&&et<=8610||8611===et||et>=8612&&et<=8613||8614===et||et>=8615&&et<=8621||8622===et||et>=8623&&et<=8653||et>=8654&&et<=8655||et>=8656&&et<=8657||8658===et||8659===et||8660===et||et>=8661&&et<=8691||et>=8692&&et<=8959||et>=8960&&et<=8967||8968===et||8969===et||8970===et||8971===et||et>=8972&&et<=8991||et>=8992&&et<=8993||et>=8994&&et<=9e3||9001===et||9002===et||et>=9003&&et<=9083||9084===et||et>=9085&&et<=9114||et>=9115&&et<=9139||et>=9140&&et<=9179||et>=9180&&et<=9185||et>=9186&&et<=9254||et>=9255&&et<=9279||et>=9280&&et<=9290||et>=9291&&et<=9311||et>=9472&&et<=9654||9655===et||et>=9656&&et<=9664||9665===et||et>=9666&&et<=9719||et>=9720&&et<=9727||et>=9728&&et<=9838||9839===et||et>=9840&&et<=10087||10088===et||10089===et||10090===et||10091===et||10092===et||10093===et||10094===et||10095===et||10096===et||10097===et||10098===et||10099===et||10100===et||10101===et||et>=10132&&et<=10175||et>=10176&&et<=10180||10181===et||10182===et||et>=10183&&et<=10213||10214===et||10215===et||10216===et||10217===et||10218===et||10219===et||10220===et||10221===et||10222===et||10223===et||et>=10224&&et<=10239||et>=10240&&et<=10495||et>=10496&&et<=10626||10627===et||10628===et||10629===et||10630===et||10631===et||10632===et||10633===et||10634===et||10635===et||10636===et||10637===et||10638===et||10639===et||10640===et||10641===et||10642===et||10643===et||10644===et||10645===et||10646===et||10647===et||10648===et||et>=10649&&et<=10711||10712===et||10713===et||10714===et||10715===et||et>=10716&&et<=10747||10748===et||10749===et||et>=10750&&et<=11007||et>=11008&&et<=11055||et>=11056&&et<=11076||et>=11077&&et<=11078||et>=11079&&et<=11084||et>=11085&&et<=11123||et>=11124&&et<=11125||et>=11126&&et<=11157||11158===et||et>=11159&&et<=11263||et>=11776&&et<=11777||11778===et||11779===et||11780===et||11781===et||et>=11782&&et<=11784||11785===et||11786===et||11787===et||11788===et||11789===et||et>=11790&&et<=11798||11799===et||et>=11800&&et<=11801||11802===et||11803===et||11804===et||11805===et||et>=11806&&et<=11807||11808===et||11809===et||11810===et||11811===et||11812===et||11813===et||11814===et||11815===et||11816===et||11817===et||et>=11818&&et<=11822||11823===et||et>=11824&&et<=11833||et>=11834&&et<=11835||et>=11836&&et<=11839||11840===et||11841===et||11842===et||et>=11843&&et<=11855||et>=11856&&et<=11857||11858===et||et>=11859&&et<=11903||et>=12289&&et<=12291||12296===et||12297===et||12298===et||12299===et||12300===et||12301===et||12302===et||12303===et||12304===et||12305===et||et>=12306&&et<=12307||12308===et||12309===et||12310===et||12311===et||12312===et||12313===et||12314===et||12315===et||12316===et||12317===et||et>=12318&&et<=12319||12320===et||12336===et||64830===et||64831===et||et>=65093&&et<=65094)break;kn.push(nr),gn+=nr>=65536?2:1}var et;return ze.apply(void 0,kn)};var st=function(){function et(zt,gn){void 0===gn&&(gn={}),this.message=zt,this.position={offset:0,line:1,column:1},this.ignoreTag=!!gn.ignoreTag,this.locale=gn.locale,this.requiresOtherClause=!!gn.requiresOtherClause,this.shouldParseSkeletons=!!gn.shouldParseSkeletons}return et.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},et.prototype.parseMessage=function(zt,gn,kn){for(var nr=[];!this.isEOF();){var pi=this.char();if(123===pi){if((xi=this.parseArgument(zt,kn)).err)return xi;nr.push(xi.val)}else{if(125===pi&&zt>0)break;if(35!==pi||"plural"!==gn&&"selectordinal"!==gn){if(60===pi&&!this.ignoreTag&&47===this.peek()){if(kn)break;return this.error(d.UNMATCHED_CLOSING_TAG,ae(this.clonePosition(),this.clonePosition()))}if(60===pi&&!this.ignoreTag&&Ye(this.peek()||0)){if((xi=this.parseTag(zt,gn)).err)return xi;nr.push(xi.val)}else{var xi;if((xi=this.parseLiteral(zt,gn)).err)return xi;nr.push(xi.val)}}else{var hs=this.clonePosition();this.bump(),nr.push({type:x.pound,location:ae(hs,this.clonePosition())})}}}return{val:nr,err:null}},et.prototype.parseTag=function(zt,gn){var kn=this.clonePosition();this.bump();var nr=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:x.literal,value:"<".concat(nr,"/>"),location:ae(kn,this.clonePosition())},err:null};if(this.bumpIf(">")){var pi=this.parseMessage(zt+1,gn,!0);if(pi.err)return pi;var xi=pi.val,hs=this.clonePosition();if(this.bumpIf("")?{val:{type:x.tag,value:nr,children:xi,location:ae(kn,this.clonePosition())},err:null}:this.error(d.INVALID_TAG,ae(hs,this.clonePosition())))}return this.error(d.UNCLOSED_TAG,ae(kn,this.clonePosition()))}return this.error(d.INVALID_TAG,ae(kn,this.clonePosition()))},et.prototype.parseTagName=function(){var zt=this.offset();for(this.bump();!this.isEOF()&&St(this.char());)this.bump();return this.message.slice(zt,this.offset())},et.prototype.parseLiteral=function(zt,gn){for(var kn=this.clonePosition(),nr="";;){var pi=this.tryParseQuote(gn);if(pi)nr+=pi;else{var xi=this.tryParseUnquoted(zt,gn);if(xi)nr+=xi;else{var hs=this.tryParseLeftAngleBracket();if(!hs)break;nr+=hs}}}var Ws=ae(kn,this.clonePosition());return{val:{type:x.literal,value:nr,location:Ws},err:null}},et.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&function(et){return Ye(et)||47===et}(this.peek()||0)?null:(this.bump(),"<")},et.prototype.tryParseQuote=function(zt){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===zt||"selectordinal"===zt)break;return null;default:return null}this.bump();var gn=[this.char()];for(this.bump();!this.isEOF();){var kn=this.char();if(39===kn){if(39!==this.peek()){this.bump();break}gn.push(39),this.bump()}else gn.push(kn);this.bump()}return ze.apply(void 0,gn)},et.prototype.tryParseUnquoted=function(zt,gn){if(this.isEOF())return null;var kn=this.char();return 60===kn||123===kn||35===kn&&("plural"===gn||"selectordinal"===gn)||125===kn&&zt>0?null:(this.bump(),ze(kn))},et.prototype.parseArgument=function(zt,gn){var kn=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(kn,this.clonePosition()));if(125===this.char())return this.bump(),this.error(d.EMPTY_ARGUMENT,ae(kn,this.clonePosition()));var nr=this.parseIdentifierIfPossible().value;if(!nr)return this.error(d.MALFORMED_ARGUMENT,ae(kn,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(kn,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:x.argument,value:nr,location:ae(kn,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(kn,this.clonePosition())):this.parseArgumentOptions(zt,gn,nr,kn);default:return this.error(d.MALFORMED_ARGUMENT,ae(kn,this.clonePosition()))}},et.prototype.parseIdentifierIfPossible=function(){var zt=this.clonePosition(),gn=this.offset(),kn=wt(this.message,gn);return this.bumpTo(gn+kn.length),{value:kn,location:ae(zt,this.clonePosition())}},et.prototype.parseArgumentOptions=function(zt,gn,kn,nr){var pi,xi=this.clonePosition(),hs=this.parseIdentifierIfPossible().value,Ws=this.clonePosition();switch(hs){case"":return this.error(d.EXPECT_ARGUMENT_TYPE,ae(xi,Ws));case"number":case"date":case"time":this.bumpSpace();var As=null;if(this.bumpIf(",")){this.bumpSpace();var Ni=this.clonePosition();if((Ji=this.parseSimpleArgStyleIfPossible()).err)return Ji;if(0===(lo=mt(Ji.val)).length)return this.error(d.EXPECT_ARGUMENT_STYLE,ae(this.clonePosition(),this.clonePosition()));As={style:lo,styleLocation:ae(Ni,this.clonePosition())}}if((Ka=this.tryParseArgumentClose(nr)).err)return Ka;var Ko=ae(nr,this.clonePosition());if(As&&Ee(null==As?void 0:As.style,"::",0)){var dl=tt(As.style.slice(2));if("number"===hs)return(Ji=this.parseNumberSkeletonFromString(dl,As.styleLocation)).err?Ji:{val:{type:x.number,value:kn,location:Ko,style:Ji.val},err:null};if(0===dl.length)return this.error(d.EXPECT_DATE_TIME_SKELETON,Ko);var Gc=dl;this.locale&&(Gc=function(et,zt){for(var gn="",kn=0;kn>1),As=ee(zt);for(("H"==As||"k"==As)&&(hs=0);hs-- >0;)gn+="a";for(;xi-- >0;)gn=As+gn}else gn+="J"===nr?"H":nr}return gn}(dl,this.locale));var lo={type:f.dateTime,pattern:Gc,location:As.styleLocation,parsedOptions:this.shouldParseSkeletons?H(Gc):{}};return{val:{type:"date"===hs?x.date:x.time,value:kn,location:Ko,style:lo},err:null}}return{val:{type:"number"===hs?x.number:"date"===hs?x.date:x.time,value:kn,location:Ko,style:null!==(pi=null==As?void 0:As.style)&&void 0!==pi?pi:null},err:null};case"plural":case"selectordinal":case"select":var Ki=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(d.EXPECT_SELECT_ARGUMENT_OPTIONS,ae(Ki,(0,E.__assign)({},Ki)));this.bumpSpace();var ga=this.parseIdentifierIfPossible(),Ur=0;if("select"!==hs&&"offset"===ga.value){if(!this.bumpIf(":"))return this.error(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ae(this.clonePosition(),this.clonePosition()));var Ji;if(this.bumpSpace(),(Ji=this.tryParseDecimalInteger(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,d.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return Ji;this.bumpSpace(),ga=this.parseIdentifierIfPossible(),Ur=Ji.val}var Ka,ca=this.tryParsePluralOrSelectOptions(zt,hs,gn,ga);if(ca.err)return ca;if((Ka=this.tryParseArgumentClose(nr)).err)return Ka;var wf=ae(nr,this.clonePosition());return"select"===hs?{val:{type:x.select,value:kn,options:Ve(ca.val),location:wf},err:null}:{val:{type:x.plural,value:kn,options:Ve(ca.val),offset:Ur,pluralType:"plural"===hs?"cardinal":"ordinal",location:wf},err:null};default:return this.error(d.INVALID_ARGUMENT_TYPE,ae(xi,Ws))}},et.prototype.tryParseArgumentClose=function(zt){return this.isEOF()||125!==this.char()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,ae(zt,this.clonePosition())):(this.bump(),{val:!0,err:null})},et.prototype.parseSimpleArgStyleIfPossible=function(){for(var zt=0,gn=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var nr=this.clonePosition();if(!this.bumpUntil("'"))return this.error(d.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ae(nr,this.clonePosition()));this.bump();break;case 123:zt+=1,this.bump();break;case 125:if(!(zt>0))return{val:this.message.slice(gn.offset,this.offset()),err:null};zt-=1;break;default:this.bump()}return{val:this.message.slice(gn.offset,this.offset()),err:null}},et.prototype.parseNumberSkeletonFromString=function(zt,gn){var kn=[];try{kn=function(et){if(0===et.length)throw new Error("Number skeleton cannot be empty");for(var gn=[],kn=0,nr=et.split(j).filter(function(lo){return lo.length>0});kn=48&&hs<=57))break;pi=!0,xi=10*xi+(hs-48),this.bump()}var Ws=ae(nr,this.clonePosition());return pi?Ce(xi*=kn)?{val:xi,err:null}:this.error(gn,Ws):this.error(zt,Ws)},et.prototype.offset=function(){return this.position.offset},et.prototype.isEOF=function(){return this.offset()===this.message.length},et.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},et.prototype.char=function(){var zt=this.position.offset;if(zt>=this.message.length)throw Error("out of bound");var gn=nt(this.message,zt);if(void 0===gn)throw Error("Offset ".concat(zt," is at invalid UTF-16 code unit boundary"));return gn},et.prototype.error=function(zt,gn){return{val:null,err:{kind:zt,message:this.message,location:gn}}},et.prototype.bump=function(){if(!this.isEOF()){var zt=this.char();10===zt?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=zt<65536?1:2)}},et.prototype.bumpIf=function(zt){if(Ee(this.message,zt,this.offset())){for(var gn=0;gn=0?(this.bumpTo(kn),!0):(this.bumpTo(this.message.length),!1)},et.prototype.bumpTo=function(zt){if(this.offset()>zt)throw Error("targetOffset ".concat(zt," must be greater than or equal to the current offset ").concat(this.offset()));for(zt=Math.min(zt,this.message.length);;){var gn=this.offset();if(gn===zt)break;if(gn>zt)throw Error("targetOffset ".concat(zt," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},et.prototype.bumpSpace=function(){for(;!this.isEOF()&&Wt(this.char());)this.bump()},et.prototype.peek=function(){if(this.isEOF())return null;var zt=this.char(),gn=this.offset();return this.message.charCodeAt(gn+(zt>=65536?2:1))??null},et}();function Ye(et){return et>=97&&et<=122||et>=65&&et<=90}function St(et){return 45===et||46===et||et>=48&&et<=57||95===et||et>=97&&et<=122||et>=65&&et<=90||183==et||et>=192&&et<=214||et>=216&&et<=246||et>=248&&et<=893||et>=895&&et<=8191||et>=8204&&et<=8205||et>=8255&&et<=8256||et>=8304&&et<=8591||et>=11264&&et<=12271||et>=12289&&et<=55295||et>=63744&&et<=64975||et>=65008&&et<=65533||et>=65536&&et<=983039}function Wt(et){return et>=9&&et<=13||32===et||133===et||et>=8206&&et<=8207||8232===et||8233===et}function Nt(et){et.forEach(function(zt){if(delete zt.location,u(zt)||m(zt))for(var gn in zt.options)delete zt.options[gn].location,Nt(zt.options[gn].value);else b(zt)&&S(zt.style)||(l(zt)||h(zt))&&I(zt.style)?delete zt.style.location:w(zt)&&Nt(zt.children)})}function It(et,zt){void 0===zt&&(zt={}),zt=(0,E.__assign)({shouldParseSkeletons:!0,requiresOtherClause:!0},zt);var gn=new st(et,zt).parse();if(gn.err){var kn=SyntaxError(d[gn.err.kind]);throw kn.location=gn.err.location,kn.originalMessage=gn.err.message,kn}return(null==zt?void 0:zt.captureLocation)||Nt(gn.val),gn.val}function qt(et,zt){return(zt&&zt.strategy?zt.strategy:$n)(et,{cache:zt&&zt.cache?zt.cache:zn,serializer:zt&&zt.serializer?zt.serializer:Bn})}function Yt(et,zt,gn,kn){var nr=function(et){return null==et||"number"==typeof et||"boolean"==typeof et}(kn)?kn:gn(kn),pi=zt.get(nr);return void 0===pi&&(pi=et.call(this,kn),zt.set(nr,pi)),pi}function Wn(et,zt,gn){var kn=Array.prototype.slice.call(arguments,3),nr=gn(kn),pi=zt.get(nr);return void 0===pi&&(pi=et.apply(this,kn),zt.set(nr,pi)),pi}function fn(et,zt,gn,kn,nr){return gn.bind(zt,et,kn,nr)}function $n(et,zt){return fn(et,this,1===et.length?Yt:Wn,zt.cache.create(),zt.serializer)}var Bn=function(){return JSON.stringify(arguments)};function Wr(){this.cache=Object.create(null)}Wr.prototype.get=function(et){return this.cache[et]},Wr.prototype.set=function(et,zt){this.cache[et]=zt};var zn={create:function(){return new Wr}},bn={variadic:function(et,zt){return fn(et,this,Wn,zt.cache.create(),zt.serializer)},monadic:function(et,zt){return fn(et,this,Yt,zt.cache.create(),zt.serializer)}},Lr=(()=>{return(et=Lr||(Lr={})).MISSING_VALUE="MISSING_VALUE",et.INVALID_VALUE="INVALID_VALUE",et.MISSING_INTL_API="MISSING_INTL_API",Lr;var et})(),Kn=function(et){function zt(gn,kn,nr){var pi=et.call(this,gn)||this;return pi.code=kn,pi.originalMessage=nr,pi}return(0,E.__extends)(zt,et),zt.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},zt}(Error),sr=function(et){function zt(gn,kn,nr,pi){return et.call(this,'Invalid values for "'.concat(gn,'": "').concat(kn,'". Options are "').concat(Object.keys(nr).join('", "'),'"'),Lr.INVALID_VALUE,pi)||this}return(0,E.__extends)(zt,et),zt}(Kn),Ii=function(et){function zt(gn,kn,nr){return et.call(this,'Value for "'.concat(gn,'" must be of type ').concat(kn),Lr.INVALID_VALUE,nr)||this}return(0,E.__extends)(zt,et),zt}(Kn),Un=function(et){function zt(gn,kn){return et.call(this,'The intl string context variable "'.concat(gn,'" was not provided to the string "').concat(kn,'"'),Lr.MISSING_VALUE,kn)||this}return(0,E.__extends)(zt,et),zt}(Kn),ir=(()=>{return(et=ir||(ir={}))[et.literal=0]="literal",et[et.object=1]="object",ir;var et})();function Tn(et){return"function"==typeof et}function Qn(et,zt,gn,kn,nr,pi,xi){if(1===et.length&&T(et[0]))return[{type:ir.literal,value:et[0].value}];for(var hs=[],Ws=0,As=et;Ws0?new Intl.Locale(gn[0]):new Intl.Locale("string"==typeof zt?zt:zt[0])},et.__parse=It,et.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},et}();const Fr={},hi=(et,zt,gn)=>gn&&(zt in Fr||(Fr[zt]={}),et in Fr[zt]||(Fr[zt][et]=gn),gn),wi=(et,zt)=>{if(null==zt)return;if(zt in Fr&&et in Fr[zt])return Fr[zt][et];const gn=Qi(zt);for(let kn=0;kn0){const pi=gn.slice(nr,gn.length).join(".");if(pi in kn){kn=kn[pi];break}}kn=kn[gn[nr]]}else kn=void 0;return kn}(gn,zt)}function go(et,...zt){delete Fr[et],$i.update(gn=>(gn[et]=O().all([gn[et]||{},...zt]),gn))}(0,ie.nK)([$i],([et])=>Object.keys(et)),$i.subscribe(et=>cs=et);const so={};function Wi(et){return so[et]}function _s(et){return null!=et&&Qi(et).some(zt=>{var gn;return null==(gn=Wi(zt))?void 0:gn.size})}const zi={};function Ms(et){if(!_s(et))return et in zi?zi[et]:Promise.resolve();const zt=function(et){return Qi(et).map(zt=>{const gn=Wi(zt);return[zt,gn?[...gn]:[]]}).filter(([,zt])=>zt.length>0)}(et);return zi[et]=Promise.all(zt.map(([gn,kn])=>function(et,zt){return Promise.all(zt.map(kn=>(function(et,zt){so[et].delete(zt),0===so[et].size&&delete so[et]}(et,kn),kn().then(nr=>nr.default||nr)))).then(kn=>go(et,...kn))}(gn,kn))).then(()=>{if(_s(et))return Ms(et);delete zi[et]}),zi[et]}var Lu=Object.getOwnPropertySymbols,Qa=Object.prototype.hasOwnProperty,ja=Object.prototype.propertyIsEnumerable;function Na({locale:et,id:zt}){console.warn(`[svelte-i18n] The message "${zt}" was not found in "${Qi(et).join('", "')}".${_s(Vs())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`)}const Uu={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Eu(){return Uu}function jo(et){const zt=et,{formats:gn}=zt,kn=((et,zt)=>{var gn={};for(var kn in et)Qa.call(et,kn)&&zt.indexOf(kn)<0&&(gn[kn]=et[kn]);if(null!=et&&Lu)for(var kn of Lu(et))zt.indexOf(kn)<0&&ja.call(et,kn)&&(gn[kn]=et[kn]);return gn})(zt,["formats"]);let nr=et.fallbackLocale;if(et.initialLocale)try{ur.resolveLocale(et.initialLocale)&&(nr=et.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${et.initialLocale}" is not a valid locale.`)}return kn.warnOnMissingMessages&&(delete kn.warnOnMissingMessages,null==kn.handleMissingMessage?kn.handleMissingMessage=Na:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(Uu,kn,{initialLocale:nr}),gn&&("number"in gn&&Object.assign(Uu.formats.number,gn.number),"date"in gn&&Object.assign(Uu.formats.date,gn.date),"time"in gn&&Object.assign(Uu.formats.time,gn.time)),ta.set(nr)}const yo=(0,ie.fZ)(!1);var Vc=Object.defineProperty,El=Object.defineProperties,ec=Object.getOwnPropertyDescriptors,kc=Object.getOwnPropertySymbols,Cc=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,tu=(et,zt,gn)=>zt in et?Vc(et,zt,{enumerable:!0,configurable:!0,writable:!0,value:gn}):et[zt]=gn;let Xr;const Cr=(0,ie.fZ)(null);function Sr(et){return et.split("-").map((zt,gn,kn)=>kn.slice(0,gn+1).join("-")).reverse()}function Qi(et,zt=Eu().fallbackLocale){const gn=Sr(et);return zt?[...new Set([...gn,...Sr(zt)])]:gn}function Vs(){return Xr??void 0}Cr.subscribe(et=>{Xr=et??void 0,"undefined"!=typeof window&&null!=et&&document.documentElement.setAttribute("lang",et)});const ta=(et=((et,zt)=>{for(var gn in zt||(zt={}))Cc.call(zt,gn)&&tu(et,gn,zt[gn]);if(kc)for(var gn of kc(zt))eu.call(zt,gn)&&tu(et,gn,zt[gn]);return et})({},Cr),zt={set:et=>{if(et&&function(et){if(null==et)return;const zt=Qi(et);for(let gn=0;gnyo.set(!0),zt):yo.set(!0),Ms(et).then(()=>{Cr.set(et)}).finally(()=>{clearTimeout(gn),yo.set(!1)})}return Cr.set(et)}},El(et,ec(zt))),na=()=>"undefined"==typeof window?null:window.navigator.language||window.navigator.languages[0],ua=et=>{const zt=Object.create(null);return kn=>{const nr=JSON.stringify(kn);return nr in zt?zt[nr]:zt[nr]=et(kn)}};var et,zt,Pu=Object.defineProperty,oc=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable,rr=(et,zt,gn)=>zt in et?Pu(et,zt,{enumerable:!0,configurable:!0,writable:!0,value:gn}):et[zt]=gn,hn=(et,zt)=>{for(var gn in zt||(zt={}))po.call(zt,gn)&&rr(et,gn,zt[gn]);if(oc)for(var gn of oc(zt))Sn.call(zt,gn)&&rr(et,gn,zt[gn]);return et},Cn=(et,zt)=>{var gn={};for(var kn in et)po.call(et,kn)&&zt.indexOf(kn)<0&&(gn[kn]=et[kn]);if(null!=et&&oc)for(var kn of oc(et))zt.indexOf(kn)<0&&Sn.call(et,kn)&&(gn[kn]=et[kn]);return gn};const Ir=(et,zt)=>{const{formats:gn}=Eu();if(et in gn&&zt in gn[et])return gn[et][zt];throw new Error(`[svelte-i18n] Unknown "${zt}" ${et} format.`)},Ei=ua(et=>{var zt=et,{locale:gn,format:kn}=zt,nr=Cn(zt,["locale","format"]);if(null==gn)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return kn&&(nr=Ir("number",kn)),new Intl.NumberFormat(gn,nr)}),Os=ua(et=>{var zt=et,{locale:gn,format:kn}=zt,nr=Cn(zt,["locale","format"]);if(null==gn)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return kn?nr=Ir("date",kn):0===Object.keys(nr).length&&(nr=Ir("date","short")),new Intl.DateTimeFormat(gn,nr)}),Cs=ua(et=>{var zt=et,{locale:gn,format:kn}=zt,nr=Cn(zt,["locale","format"]);if(null==gn)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return kn?nr=Ir("time",kn):0===Object.keys(nr).length&&(nr=Ir("time","short")),new Intl.DateTimeFormat(gn,nr)}),Vo=ua((et,zt=Vs())=>new ur(et,zt,Eu().formats,{ignoreTag:Eu().ignoreTag})),sa=(et,zt={})=>{var gn,kn,nr,pi;let xi=zt;"object"==typeof et&&(xi=et,et=xi.id);const{values:hs,locale:Ws=Vs(),default:As}=xi;if(null==Ws)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let Ni=wi(et,Ws);if(Ni){if("string"!=typeof Ni)return console.warn(`[svelte-i18n] Message with id "${et}" must be of type "string", found: "${typeof Ni}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),Ni}else Ni=null!=(pi=null!=(nr=null==(kn=(gn=Eu()).handleMissingMessage)?void 0:kn.call(gn,{locale:Ws,id:et,defaultValue:As}))?nr:As)?pi:et;if(!hs)return Ni;let Ji=Ni;try{Ji=Vo(Ni,Ws).format(hs)}catch(lo){lo instanceof Error&&console.warn(`[svelte-i18n] Message "${et}" has syntax error:`,lo.message)}return Ji},nu=(et,zt)=>((et={})=>{var zt=et,{locale:gn=Vs()}=zt,kn=Cn(zt,["locale"]);return Cs(hn({locale:gn},kn))})(zt).format(et),Po=(et,zt)=>((et={})=>{var zt=et,{locale:gn=Vs()}=zt,kn=Cn(zt,["locale"]);return Os(hn({locale:gn},kn))})(zt).format(et),Hu=(et,zt)=>((et={})=>{var zt=et,{locale:gn=Vs()}=zt,kn=Cn(zt,["locale"]);return Ei(hn({locale:gn},kn))})(zt).format(et),Pc=(et,zt=Vs())=>wi(et,zt),ru=(0,ie.nK)([ta,$i],()=>sa);(0,ie.nK)([ta],()=>nu),(0,ie.nK)([ta],()=>Po),(0,ie.nK)([ta],()=>Hu),(0,ie.nK)([ta,$i],()=>Pc)},55892:bt=>{bt.exports&&(bt.exports=function(Y){"use strict";return Y.prototype.toFormat=function(q,O,E){if(!this.e&&0!==this.e)return this.toString();var d,x,f,T,g,b,l,h,u,m,_,w,S,I,P,L=this.format||{},V=this.constructor.format||{};if(q!=g?"object"==typeof q?(E=q,q=g):O!=g?"object"==typeof O?(E=O,O=g):"object"!=typeof E&&(E={}):E={}:E={},h=(d=this.toFixed(q,O).split("."))[0],u=d[1],b=(l=this.s<0?h.slice(1):h).length,(m=E.decimalSeparator)==g&&(m=L.decimalSeparator)==g&&(m=V.decimalSeparator)==g&&(m="."),(_=E.groupSeparator)==g&&(_=L.groupSeparator)==g&&(_=V.groupSeparator),_&&((w=E.groupSize)==g&&(w=L.groupSize)==g&&(w=V.groupSize)==g&&(w=0),(S=E.secondaryGroupSize)==g&&(S=L.secondaryGroupSize)==g&&(S=V.secondaryGroupSize)==g&&(S=0),S?(x=+S,b-=f=+w):(x=+w,f=+S),x>0&&b>0)){for(h=l.substr(0,T=b%x||x);T0&&(h+=_+l.slice(T)),this.s<0&&(h="-"+h)}return u?((I=E.fractionGroupSeparator)==g&&(I=L.fractionGroupSeparator)==g&&(I=V.fractionGroupSeparator),I&&((P=E.fractionGroupSize)==g&&(P=L.fractionGroupSize)==g&&(P=V.fractionGroupSize)==g&&(P=0),(P=+P)&&(u=u.replace(new RegExp("\\d{"+P+"}\\B","g"),"$&"+I))),h+m+u):h},Y.format={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0},Y})},15822:bt=>{function Y(ie){try{if(!global.localStorage)return!1}catch{return!1}var q=global.localStorage[ie];return null!=q&&"true"===String(q).toLowerCase()}bt.exports=function(ie,q){if(Y("noDeprecation"))return ie;var O=!1;return function(){if(!O){if(Y("throwDeprecation"))throw new Error(q);Y("traceDeprecation")?console.trace(q):console.warn(q),O=!0}return ie.apply(this,arguments)}}},53642:bt=>{self,bt.exports=(()=>(()=>{var be={81645:(q,O,E)=>{"use strict";var x=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(O,"__esModule",{value:!0}),O.chains=O._getInitializedChains=void 0;var f=x(E(87295)),T=x(E(31227)),g=x(E(40439)),b=x(E(37098)),l=x(E(17687));function h(u){var m,_,w={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli"},S={mainnet:f.default,ropsten:T.default,rinkeby:g.default,kovan:b.default,goerli:l.default};if(u)try{for(var I=function(u){var m="function"==typeof Symbol&&Symbol.iterator,_=m&&u[m],w=0;if(_)return _.call(u);if(u&&"number"==typeof u.length)return{next:function(){return u&&w>=u.length&&(u=void 0),{value:u&&u[w++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),P=I.next();!P.done;P=I.next()){var L=P.value,V=L.name;w[L.chainId.toString()]=V,S[V]=L}}catch(W){m={error:W}}finally{try{P&&!P.done&&(_=I.return)&&_.call(I)}finally{if(m)throw m.error}}return S.names=w,S}O._getInitializedChains=h,O.chains=h()},425:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.EIPs=void 0,O.EIPs={1559:E(77523),2315:E(83339),2537:E(26769),2565:E(17897),2718:E(62170),2929:E(88436),2930:E(96213),3198:E(25491),3529:E(20070),3541:E(21871),3554:E(47225),3675:E(98571)}},7002:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.hardforks=void 0,O.hardforks=[["chainstart",E(60114)],["homestead",E(62800)],["dao",E(7197)],["tangerineWhistle",E(22302)],["spuriousDragon",E(90716)],["byzantium",E(26985)],["constantinople",E(35993)],["petersburg",E(4064)],["istanbul",E(83166)],["muirGlacier",E(42946)],["berlin",E(20015)],["london",E(61250)],["shanghai",E(5553)],["merge",E(88648)]]},3863:(q,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=E(28847)(E(3355)),T=(d=function(G,H){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,K){j.__proto__=K}||function(j,K){for(var R in K)Object.prototype.hasOwnProperty.call(K,R)&&(j[R]=K[R])})(G,H)},function(G,H){if("function"!=typeof H&&null!==H)throw new TypeError("Class extends value "+String(H)+" is not a constructor or null");function j(){this.constructor=G}d(G,H),G.prototype=null===H?Object.create(H):(j.prototype=H.prototype,new j)}),g=function(){return g=Object.assign||function(G){for(var H,j=1,K=arguments.length;j=G.length&&(G=void 0),{value:G&&G[K++],done:!G}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(O,"__esModule",{value:!0}),O.ConsensusAlgorithm=O.ConsensusType=O.Hardfork=O.Chain=O.CustomChain=void 0;var l,h,u,m,_,G,w=E(38291),S=E(64628),I=E(33062),P=E(81645),L=E(7002),V=E(425);(G=l=O.CustomChain||(O.CustomChain={})).PolygonMainnet="polygon-mainnet",G.PolygonMumbai="polygon-mumbai",G.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",G.xDaiChain="x-dai-chain",(_=O.Chain||(O.Chain={}))[_.Mainnet=1]="Mainnet",_[_.Ropsten=3]="Ropsten",_[_.Rinkeby=4]="Rinkeby",_[_.Kovan=42]="Kovan",_[_.Goerli=5]="Goerli",function(G){G.Chainstart="chainstart",G.Homestead="homestead",G.Dao="dao",G.TangerineWhistle="tangerineWhistle",G.SpuriousDragon="spuriousDragon",G.Byzantium="byzantium",G.Constantinople="constantinople",G.Petersburg="petersburg",G.Istanbul="istanbul",G.MuirGlacier="muirGlacier",G.Berlin="berlin",G.London="london",G.Shanghai="shanghai",G.Merge="merge"}(h=O.Hardfork||(O.Hardfork={})),(m=O.ConsensusType||(O.ConsensusType={})).ProofOfStake="pos",m.ProofOfWork="pow",m.ProofOfAuthority="poa",(u=O.ConsensusAlgorithm||(O.ConsensusAlgorithm={})).Ethash="ethash",u.Clique="clique",u.Casper="casper";var W=function(G){function H(j){var K,R,o,y,M=G.call(this)||this;M._supportedHardforks=[],M._eips=[],M._customChains=null!==(o=j.customChains)&&void 0!==o?o:[],M._chainParams=M.setChain(j.chain),M.DEFAULT_HARDFORK=null!==(y=M._chainParams.defaultHardfork)&&void 0!==y?y:h.Istanbul;try{for(var v=b(M._chainParams.hardforks),k=v.next();!k.done;k=v.next()){var D=k.value;D.forkHash||(D.forkHash=M._calcForkHash(D.name))}}catch(N){K={error:N}}finally{try{k&&!k.done&&(R=v.return)&&R.call(v)}finally{if(K)throw K.error}}return M._hardfork=M.DEFAULT_HARDFORK,j.supportedHardforks&&(M._supportedHardforks=j.supportedHardforks),j.hardfork&&M.setHardfork(j.hardfork),j.eips&&M.setEIPs(j.eips),M}return T(H,G),H.custom=function(j,K){var R;void 0===K&&(K={});var o=null!==(R=K.baseChain)&&void 0!==R?R:"mainnet",y=g({},H._getChainParams(o));if(y.name="custom-chain","string"!=typeof j)return new H(g({chain:g(g({},y),j)},K));if(j===l.PolygonMainnet)return H.custom({name:l.PolygonMainnet,chainId:137,networkId:137});if(j===l.PolygonMumbai)return H.custom({name:l.PolygonMumbai,chainId:80001,networkId:80001});if(j===l.ArbitrumRinkebyTestnet)return H.custom({name:l.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(j===l.xDaiChain)return H.custom({name:l.xDaiChain,chainId:100,networkId:100});throw new Error("Custom chain "+j+" not supported")},H.forCustomChain=function(j,K,R,o){var y=H._getChainParams(j);return new H({chain:g(g({},y),K),hardfork:R,supportedHardforks:o})},H.isSupportedChainId=function(j){var K=(0,P._getInitializedChains)();return Boolean(K.names[j.toString()])},H._getChainParams=function(j,K){var R=(0,P._getInitializedChains)(K);if("number"==typeof j||I.BN.isBN(j)){if(j=j.toString(),R.names[j])return R[R.names[j]];throw new Error("Chain with ID "+j+" not supported")}if(R[j])return R[j];throw new Error("Chain with name "+j+" not supported")},H.prototype.setChain=function(j){var K,R;if("number"==typeof j||"string"==typeof j||I.BN.isBN(j)){var o;o=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map(function(k){return k[0]}):this._customChains,this._chainParams=H._getChainParams(j,o)}else{if("object"!==(0,f.default)(j))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var y=b(["networkId","genesis","hardforks","bootstrapNodes"]),M=y.next();!M.done;M=y.next()){var v=M.value;if(void 0===j[v])throw new Error("Missing required chain parameter: "+v)}}catch(k){K={error:k}}finally{try{M&&!M.done&&(R=y.return)&&R.call(y)}finally{if(K)throw K.error}}this._chainParams=j}return this._chainParams},H.prototype.setHardfork=function(j){var K,R;if(!this._isSupportedHardfork(j))throw new Error("Hardfork "+j+" not set as supported in supportedHardforks");var o=!1;try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next())M.value[0]===j&&(this._hardfork!==j&&(this._hardfork=j,this.emit("hardforkChanged",j)),o=!0)}catch(v){K={error:v}}finally{try{M&&!M.done&&(R=y.return)&&R.call(y)}finally{if(K)throw K.error}}if(!o)throw new Error("Hardfork with name "+j+" not supported")},H.prototype.getHardforkByBlockNumber=function(j,K){var R,o;j=(0,I.toType)(j,I.TypeOutput.BN),K=K?(0,I.toType)(K,I.TypeOutput.BN):void 0;var y,M,v,k=h.Chainstart;try{for(var D=b(this.hardforks()),N=D.next();!N.done;N=D.next()){var C=N.value;if(null!==C.block)j.gte(new I.BN(C.block))&&(k=C.name),K&&C.td&&(K.gten(C.td)?y=C.name:M=v),v=C.name;else if(K&&C.td&&K.gten(C.td))return C.name}}catch(Q){R={error:Q}}finally{try{N&&!N.done&&(o=D.return)&&o.call(D)}finally{if(R)throw R.error}}if(K){var a="block number: "+j+" (-> "+k+"), ";if(y&&!this.hardforkGteHardfork(k,y)){var B="HF determined by block number is lower than the minimum total difficulty HF";throw a+="total difficulty: "+K+" (-> "+y+")",new Error(B+": "+a)}if(M&&!this.hardforkGteHardfork(M,k))throw B="Maximum HF determined by total difficulty is lower than the block number HF",a+="total difficulty: "+K+" (-> "+M+")",new Error(B+": "+a)}return k},H.prototype.setHardforkByBlockNumber=function(j,K){var R=this.getHardforkByBlockNumber(j,K);return this.setHardfork(R),R},H.prototype._chooseHardfork=function(j,K){if(void 0===K&&(K=!0),j){if(K&&!this._isSupportedHardfork(j))throw new Error("Hardfork "+j+" not set as supported in supportedHardforks")}else j=this._hardfork;return j},H.prototype._getHardfork=function(j){var K,R,o=this.hardforks();try{for(var y=b(o),M=y.next();!M.done;M=y.next()){var v=M.value;if(v.name===j)return v}}catch(k){K={error:k}}finally{try{M&&!M.done&&(R=y.return)&&R.call(y)}finally{if(K)throw K.error}}throw new Error("Hardfork "+j+" not defined for chain "+this.chainName())},H.prototype._isSupportedHardfork=function(j){var K,R;if(!(this._supportedHardforks.length>0))return!0;try{for(var o=b(this._supportedHardforks),y=o.next();!y.done;y=o.next())if(j===y.value)return!0}catch(M){K={error:M}}finally{try{y&&!y.done&&(R=o.return)&&R.call(o)}finally{if(K)throw K.error}}return!1},H.prototype.setEIPs=function(j){var K,R,o=this;void 0===j&&(j=[]);var y=function(D){if(!(D in V.EIPs))throw new Error(D+" not supported");var N=M.gteHardfork(V.EIPs[D].minimumHardfork);if(!N)throw new Error(D+" cannot be activated on hardfork "+M.hardfork()+", minimumHardfork: "+N);V.EIPs[D].requiredEIPs&&V.EIPs[D].requiredEIPs.forEach(function(C){if(!j.includes(C)&&!o.isActivatedEIP(C))throw new Error(D+" requires EIP "+C+", but is not included in the EIP list")})},M=this;try{for(var v=b(j),k=v.next();!k.done;k=v.next())y(k.value)}catch(D){K={error:D}}finally{try{k&&!k.done&&(R=v.return)&&R.call(v)}finally{if(K)throw K.error}}this._eips=j},H.prototype.param=function(j,K){var R,o,y=null;try{for(var M=b(this._eips),v=M.next();!v.done;v=M.next())if(null!==(y=this.paramByEIP(j,K,v.value)))return y}catch(D){R={error:D}}finally{try{v&&!v.done&&(o=M.return)&&o.call(M)}finally{if(R)throw R.error}}return this.paramByHardfork(j,K,this._hardfork)},H.prototype.paramByHardfork=function(j,K,R){var o,y,M,v;R=this._chooseHardfork(R);var k=null;try{for(var D=b(L.hardforks),N=D.next();!N.done;N=D.next()){var C=N.value;if("eips"in C[1]){var a=C[1].eips;try{for(var B=(M=void 0,b(a)),Q=B.next();!Q.done;Q=B.next()){var ce=this.paramByEIP(j,K,Q.value);k=null!==ce?ce:k}}catch(ue){M={error:ue}}finally{try{Q&&!Q.done&&(v=B.return)&&v.call(B)}finally{if(M)throw M.error}}}else{if(!C[1][j])throw new Error("Topic "+j+" not defined");void 0!==C[1][j][K]&&(k=C[1][j][K].v)}if(C[0]===R)break}}catch(ue){o={error:ue}}finally{try{N&&!N.done&&(y=D.return)&&y.call(D)}finally{if(o)throw o.error}}return k},H.prototype.paramByEIP=function(j,K,R){if(!(R in V.EIPs))throw new Error(R+" not supported");var o=V.EIPs[R];if(!(j in o))throw new Error("Topic "+j+" not defined");return void 0===o[j][K]?null:o[j][K].v},H.prototype.paramByBlock=function(j,K,R){var o=this.activeHardforks(R);return this.paramByHardfork(j,K,o[o.length-1].name)},H.prototype.isActivatedEIP=function(j){var K,R;if(this.eips().includes(j))return!0;try{for(var o=b(L.hardforks),y=o.next();!y.done;y=o.next()){var M=y.value[1];if(this.gteHardfork(M.name)&&"eips"in M&&M.eips.includes(j))return!0}}catch(v){K={error:v}}finally{try{y&&!y.done&&(R=o.return)&&R.call(o)}finally{if(K)throw K.error}}return!1},H.prototype.hardforkIsActiveOnBlock=function(j,K,R){var o;void 0===R&&(R={}),K=(0,I.toType)(K,I.TypeOutput.BN);var y=null!==(o=R.onlySupported)&&void 0!==o&&o;j=this._chooseHardfork(j,y);var M=this.hardforkBlockBN(j);return!(!M||!K.gte(M))},H.prototype.activeOnBlock=function(j,K){return this.hardforkIsActiveOnBlock(null,j,K)},H.prototype.hardforkGteHardfork=function(j,K,R){var o,y;void 0===R&&(R={});var M,v=void 0!==R.onlyActive&&R.onlyActive;j=this._chooseHardfork(j,R.onlySupported),M=v?this.activeHardforks(null,R):this.hardforks();var k=-1,D=-1,N=0;try{for(var C=b(M),a=C.next();!a.done;a=C.next()){var B=a.value;B.name===j&&(k=N),B.name===K&&(D=N),N+=1}}catch(Q){o={error:Q}}finally{try{a&&!a.done&&(y=C.return)&&y.call(C)}finally{if(o)throw o.error}}return k>=D&&-1!==D},H.prototype.gteHardfork=function(j,K){return this.hardforkGteHardfork(null,j,K)},H.prototype.hardforkIsActiveOnChain=function(j,K){var R,o,y;void 0===K&&(K={});var M=null!==(y=K.onlySupported)&&void 0!==y&&y;j=this._chooseHardfork(j,M);try{for(var v=b(this.hardforks()),k=v.next();!k.done;k=v.next()){var D=k.value;if(D.name===j&&null!==D.block)return!0}}catch(N){R={error:N}}finally{try{k&&!k.done&&(o=v.return)&&o.call(v)}finally{if(R)throw R.error}}return!1},H.prototype.activeHardforks=function(j,K){var R,o;void 0===K&&(K={});var y=[],M=this.hardforks();try{for(var v=b(M),k=v.next();!k.done;k=v.next()){var D=k.value;if(null!==D.block){if(null!=j&&j0)return R[R.length-1].name;throw new Error("No (supported) active hardfork found")},H.prototype.hardforkBlock=function(j){var K=this.hardforkBlockBN(j);return K?(0,I.toType)(K,I.TypeOutput.Number):null},H.prototype.hardforkBlockBN=function(j){j=this._chooseHardfork(j,!1);var K=this._getHardfork(j).block;return null==K?null:new I.BN(K)},H.prototype.hardforkTD=function(j){j=this._chooseHardfork(j,!1);var K=this._getHardfork(j).td;return null==K?null:new I.BN(K)},H.prototype.isHardforkBlock=function(j,K){j=(0,I.toType)(j,I.TypeOutput.BN),K=this._chooseHardfork(K,!1);var R=this.hardforkBlockBN(K);return!!R&&R.eq(j)},H.prototype.nextHardforkBlock=function(j){var K=this.nextHardforkBlockBN(j);return null===K?null:(0,I.toType)(K,I.TypeOutput.Number)},H.prototype.nextHardforkBlockBN=function(j){j=this._chooseHardfork(j,!1);var K=this.hardforkBlockBN(j);return null===K?null:this.hardforks().reduce(function(R,o){var y=new I.BN(o.block);return y.gt(K)&&null===R?y:R},null)},H.prototype.isNextHardforkBlock=function(j,K){j=(0,I.toType)(j,I.TypeOutput.BN),K=this._chooseHardfork(K,!1);var R=this.nextHardforkBlockBN(K);return null!==R&&R.eq(j)},H.prototype._calcForkHash=function(j){var K,R,o=x.from(this.genesis().hash.substr(2),"hex"),y=x.alloc(0),M=0;try{for(var v=b(this.hardforks()),k=v.next();!k.done;k=v.next()){var D=k.value,N=D.block;if(0!==N&&null!==N&&N!==M){var C=x.from(N.toString(16).padStart(16,"0"),"hex");y=x.concat([y,C])}if(D.name===j)break;null!==N&&(M=N)}}catch(B){K={error:B}}finally{try{k&&!k.done&&(R=v.return)&&R.call(v)}finally{if(K)throw K.error}}var a=x.concat([o,y]);return"0x"+(0,I.intToBuffer)((0,S.buf)(a)>>>0).toString("hex")},H.prototype.forkHash=function(j){j=this._chooseHardfork(j,!1);var K=this._getHardfork(j);if(null===K.block)throw new Error("No fork hash calculation possible for non-applied or future hardfork");return void 0!==K.forkHash?K.forkHash:this._calcForkHash(j)},H.prototype.hardforkForForkHash=function(j){var K=this.hardforks().filter(function(R){return R.forkHash===j});return K.length>=1?K[K.length-1]:null},H.prototype.genesis=function(){return this._chainParams.genesis},H.prototype.genesisState=function(){var j,K;switch(this.chainName()){case"mainnet":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/mainnet.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"ropsten":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/ropsten.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"rinkeby":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/rinkeby.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"kovan":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/kovan.json'");throw M.code="MODULE_NOT_FOUND",M}()));case"goerli":return E(Object(function(){var M=new Error("Cannot find module './genesisStates/goerli.json'");throw M.code="MODULE_NOT_FOUND",M}()))}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var R=b(this._customChains),o=R.next();!o.done;o=R.next()){var y=o.value;if(y[0].name===this.chainName())return y[1]}}catch(M){j={error:M}}finally{try{o&&!o.done&&(K=R.return)&&K.call(R)}finally{if(j)throw j.error}}return{}},H.prototype.hardforks=function(){return this._chainParams.hardforks},H.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},H.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},H.prototype.hardfork=function(){return this._hardfork},H.prototype.chainId=function(){return(0,I.toType)(this.chainIdBN(),I.TypeOutput.Number)},H.prototype.chainIdBN=function(){return new I.BN(this._chainParams.chainId)},H.prototype.chainName=function(){return this._chainParams.name},H.prototype.networkId=function(){return(0,I.toType)(this.networkIdBN(),I.TypeOutput.Number)},H.prototype.networkIdBN=function(){return new I.BN(this._chainParams.networkId)},H.prototype.eips=function(){return this._eips},H.prototype.consensusType=function(){var j,K,R,o=this.hardfork();try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next()){var v=M.value;if("consensus"in v[1]&&(R=v[1].consensus.type),v[0]===o)break}}catch(k){j={error:k}}finally{try{M&&!M.done&&(K=y.return)&&K.call(y)}finally{if(j)throw j.error}}return R||this._chainParams.consensus.type},H.prototype.consensusAlgorithm=function(){var j,K,R,o=this.hardfork();try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next()){var v=M.value;if("consensus"in v[1]&&(R=v[1].consensus.algorithm),v[0]===o)break}}catch(k){j={error:k}}finally{try{M&&!M.done&&(K=y.return)&&K.call(y)}finally{if(j)throw j.error}}return R||this._chainParams.consensus.algorithm},H.prototype.consensusConfig=function(){var j,K,R,o=this.hardfork();try{for(var y=b(L.hardforks),M=y.next();!M.done;M=y.next()){var v=M.value;if("consensus"in v[1]&&(R=v[1].consensus[v[1].consensus.algorithm]),v[0]===o)break}}catch(D){j={error:D}}finally{try{M&&!M.done&&(K=y.return)&&K.call(y)}finally{if(j)throw j.error}}if(R)return R;var k=this.consensusAlgorithm();return this._chainParams.consensus[k]},H.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},H}(w.EventEmitter);O.default=W},89658:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));function x(V){if(Array.isArray(V)){for(var W=[],G=0,H=0;HV.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return V.slice(W,G)}function T(V){if(0===V[0])throw new Error("invalid RLP: extra zeros");return m(u(V))}function g(V,W){if(V<56)return Uint8Array.from([V+W]);var G=I(V),H=I(W+55+G.length/2);return Uint8Array.from(_(H+G))}function b(V){var W=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==V||0===V.length)return Uint8Array.from([]);var G=l(L(V));if(W)return G;if(0!==G.remainder.length)throw new Error("invalid RLP: remainder must be zero");return G.data}function l(V){var W,G,H,j,K,R=[],o=V[0];if(o<=127)return{data:V.slice(0,1),remainder:V.slice(1)};if(o<=183){if(W=o-127,H=128===o?Uint8Array.from([]):f(V,1,W),2===W&&H[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:H,remainder:V.slice(W)}}if(o<=191){if(V.length-1<(G=o-182))throw new Error("invalid RLP: not enough bytes for string length");if((W=T(f(V,1,G)))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return{data:H=f(V,G,W+G),remainder:V.slice(W+G)}}if(o<=247){for(j=f(V,1,W=o-191);j.length;)K=l(j),R.push(K.data),j=K.remainder;return{data:R,remainder:V.slice(W)}}if((W=T(f(V,1,G=o-246)))<56)throw new Error("invalid RLP: encoded list too short");var y=G+W;if(y>V.length)throw new Error("invalid RLP: total length is larger than the data");for(j=f(V,G,y);j.length;)K=l(j),R.push(K.data),j=K.remainder;return{data:R,remainder:V.slice(y)}}Object.defineProperty(O,"__esModule",{value:!0}),O.RLP=O.utils=O.decode=O.encode=void 0,O.encode=x,O.decode=b;var h=Array.from({length:256},function(V,W){return W.toString(16).padStart(2,"0")});function u(V){for(var W="",G=0;G=2&&"0"===V[0]&&"x"===V[1]}function L(V){if(V instanceof Uint8Array)return V;if("string"==typeof V)return P(V)?_((W="string"!=typeof(G=V)?G:P(G)?G.slice(2):G).length%2?"0".concat(W):W):S(V);var W,G;if("number"==typeof V||"bigint"==typeof V)return V?_(I(V)):Uint8Array.from([]);if(null==V)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+(0,d.default)(V))}O.utils={bytesToHex:u,concatBytes:w,hexToBytes:_,utf8ToBytes:S},O.RLP={encode:x,decode:b}},75058:(q,O,E)=>{"use strict";var d=Object.create?function(h,u,m,_){void 0===_&&(_=m),Object.defineProperty(h,_,{enumerable:!0,get:function(){return u[m]}})}:function(h,u,m,_){void 0===_&&(_=m),h[_]=u[m]},x=Object.create?function(h,u){Object.defineProperty(h,"default",{enumerable:!0,value:u})}:function(h,u){h.default=u},f=function(h,u){var m="function"==typeof Symbol&&h[Symbol.iterator];if(!m)return h;var _,w,S=m.call(h),I=[];try{for(;(void 0===u||u-- >0)&&!(_=S.next()).done;)I.push(_.value)}catch(P){w={error:P}}finally{try{_&&!_.done&&(m=S.return)&&m.call(S)}finally{if(w)throw w.error}}return I};Object.defineProperty(O,"__esModule",{value:!0}),O.BaseTransaction=void 0;var T=function(h){if(h&&h.__esModule)return h;var u={};if(null!=h)for(var m in h)"default"!==m&&Object.prototype.hasOwnProperty.call(h,m)&&d(u,h,m);return x(u,h),u}(E(3863)),g=E(33062),b=E(87325),l=function(){function h(u){this.cache={hash:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=T.Chain.Mainnet,this.DEFAULT_HARDFORK=T.Hardfork.Istanbul;var m=u.nonce,_=u.gasLimit,w=u.to,S=u.value,I=u.data,P=u.v,L=u.r,V=u.s;this._type=new g.BN((0,g.toBuffer)(u.type)).toNumber();var G=(0,g.toBuffer)(""===w?"0x":w),H=(0,g.toBuffer)(""===P?"0x":P),j=(0,g.toBuffer)(""===L?"0x":L),K=(0,g.toBuffer)(""===V?"0x":V);this.nonce=new g.BN((0,g.toBuffer)(""===m?"0x":m)),this.gasLimit=new g.BN((0,g.toBuffer)(""===_?"0x":_)),this.to=G.length>0?new g.Address(G):void 0,this.value=new g.BN((0,g.toBuffer)(""===S?"0x":S)),this.data=(0,g.toBuffer)(""===I?"0x":I),this.v=H.length>0?new g.BN(H):void 0,this.r=j.length>0?new g.BN(j):void 0,this.s=K.length>0?new g.BN(K):void 0,this._validateCannotExceedMaxInteger({nonce:this.nonce,gasLimit:this.gasLimit,value:this.value,r:this.r,s:this.s})}return Object.defineProperty(h.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),h.prototype.supports=function(u){return this.activeCapabilities.includes(u)},h.prototype.validate=function(u){void 0===u&&(u=!1);var m=[];return this.getBaseFee().gt(this.gasLimit)&&m.push("gasLimit is too low. given "+this.gasLimit+", need at least "+this.getBaseFee()),this.isSigned()&&!this.verifySignature()&&m.push("Invalid Signature"),u?m:0===m.length},h.prototype.getBaseFee=function(){var u=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&u.iaddn(this.common.param("gasPrices","txCreation")),u},h.prototype.getDataFee=function(){for(var u=this.common.param("gasPrices","txDataZero"),m=this.common.param("gasPrices","txDataNonZero"),_=0,w=0;w-1&&this.activeCapabilities.splice(V,1)}return L},h.prototype._getCommon=function(u,m){var _;if(m){var w=new g.BN((0,g.toBuffer)(m));if(u){if(!u.chainIdBN().eq(w))throw new Error("The chain ID does not match the chain ID of Common");return u.copy()}return T.default.isSupportedChainId(w)?new T.default({chain:w,hardfork:this.DEFAULT_HARDFORK}):T.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:w,chainId:w},this.DEFAULT_HARDFORK)}return null!==(_=null==u?void 0:u.copy())&&void 0!==_?_:new T.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},h.prototype._validateCannotExceedMaxInteger=function(u,m){var _,w;void 0===m&&(m=53);try{for(var S=function(W){var G="function"==typeof Symbol&&Symbol.iterator,H=G&&W[G],j=0;if(H)return H.call(W);if(W&&"number"==typeof W.length)return{next:function(){return W&&j>=W.length&&(W=void 0),{value:W&&W[j++],done:!W}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(u)),I=S.next();!I.done;I=S.next()){var P=f(I.value,2),L=P[0],V=P[1];if(53===m){if(null==V?void 0:V.gt(g.MAX_INTEGER))throw new Error(L+" cannot exceed MAX_INTEGER, given "+V)}else{if(256!==m)throw new Error("unimplemented bits value");if(null==V?void 0:V.gte(g.TWO_POW256))throw new Error(L+" must be less than 2^256, given "+V)}}}catch(W){_={error:W}}finally{try{I&&!I.done&&(w=S.return)&&w.call(S)}finally{if(_)throw _.error}}},h}();O.BaseTransaction=l},660:(q,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=(d=function(_,w){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,I){S.__proto__=I}||function(S,I){for(var P in I)Object.prototype.hasOwnProperty.call(I,P)&&(S[P]=I[P])})(_,w)},function(_,w){if("function"!=typeof w&&null!==w)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function S(){this.constructor=_}d(_,w),_.prototype=null===w?Object.create(w):(S.prototype=w.prototype,new S)}),T=function(){return T=Object.assign||function(_){for(var w,S=1,I=arguments.length;S0)&&!(C=B.next()).done;)Q.push(C.value)}catch(ee){a={error:ee}}finally{try{C&&!C.done&&(N=B.return)&&N.call(B)}finally{if(a)throw a.error}}return Q}(S,12),V=P[1],W=P[2],G=P[3],H=P[4],j=P[5],K=P[6],R=P[7],o=P[8],y=P[9],M=P[10],v=P[11];return new w({chainId:new g.BN(P[0]),nonce:V,maxPriorityFeePerGas:W,maxFeePerGas:G,gasLimit:H,to:j,value:K,data:R,accessList:o??[],v:void 0!==y?new g.BN(y):void 0,r:M,s:v},I)},w.prototype.getDataFee=function(){var S=_.prototype.getDataFee.call(this);return S.iaddn(h.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),S},w.prototype.getUpfrontCost=function(S){void 0===S&&(S=new g.BN(0));var I=g.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(S)).add(S);return this.gasLimit.mul(I).add(this.value)},w.prototype.raw=function(){return[(0,g.bnToUnpaddedBuffer)(this.chainId),(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,g.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,g.bnToUnpaddedBuffer)(this.v):x.from([]),void 0!==this.r?(0,g.bnToUnpaddedBuffer)(this.r):x.from([]),void 0!==this.s?(0,g.bnToUnpaddedBuffer)(this.s):x.from([])]},w.prototype.serialize=function(){var S=this.raw();return x.concat([u,g.rlp.encode(S)])},w.prototype.getMessageToSign=function(S){void 0===S&&(S=!0);var I=this.raw().slice(0,9),P=x.concat([u,g.rlp.encode(I)]);return S?(0,g.keccak256)(P):P},w.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,g.keccak256)(this.serialize())),this.cache.hash):(0,g.keccak256)(this.serialize())},w.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},w.prototype.getSenderPublicKey=function(){var S;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var I=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(S=this.s)||void 0===S?void 0:S.gt(l.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var P=this,L=P.v,V=P.r,W=P.s;try{return(0,g.ecrecover)(I,L.addn(27),(0,g.bnToUnpaddedBuffer)(V),(0,g.bnToUnpaddedBuffer)(W))}catch{throw new Error("Invalid Signature")}},w.prototype._processSignature=function(S,I,P){var L={common:this.common};return w.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new g.BN(S-27),r:new g.BN(I),s:new g.BN(P)},L)},w.prototype.toJSON=function(){var S=h.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,g.bnToHex)(this.chainId),nonce:(0,g.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,g.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,g.bnToHex)(this.maxFeePerGas),gasLimit:(0,g.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,g.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:S,v:void 0!==this.v?(0,g.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,g.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,g.bnToHex)(this.s):void 0}},w}(b.BaseTransaction);O.default=m},97613:(q,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=(d=function(_,w){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,I){S.__proto__=I}||function(S,I){for(var P in I)Object.prototype.hasOwnProperty.call(I,P)&&(S[P]=I[P])})(_,w)},function(_,w){if("function"!=typeof w&&null!==w)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function S(){this.constructor=_}d(_,w),_.prototype=null===w?Object.create(w):(S.prototype=w.prototype,new S)}),T=function(){return T=Object.assign||function(_){for(var w,S=1,I=arguments.length;S0)&&!(N=a.next()).done;)B.push(N.value)}catch(Q){C={error:Q}}finally{try{N&&!N.done&&(D=a.return)&&D.call(a)}finally{if(C)throw C.error}}return B}(S,11),V=P[1],W=P[2],G=P[3],H=P[4],j=P[5],K=P[6],R=P[7],o=P[8],y=P[9],M=P[10];return new w({chainId:new g.BN(P[0]),nonce:V,gasPrice:W,gasLimit:G,to:H,value:j,data:K,accessList:R??[],v:void 0!==o?new g.BN(o):void 0,r:y,s:M},I)},w.prototype.getDataFee=function(){var S=_.prototype.getDataFee.call(this);return S.iaddn(h.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),S},w.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},w.prototype.raw=function(){return[(0,g.bnToUnpaddedBuffer)(this.chainId),(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.gasPrice),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,g.bnToUnpaddedBuffer)(this.v):x.from([]),void 0!==this.r?(0,g.bnToUnpaddedBuffer)(this.r):x.from([]),void 0!==this.s?(0,g.bnToUnpaddedBuffer)(this.s):x.from([])]},w.prototype.serialize=function(){var S=this.raw();return x.concat([u,g.rlp.encode(S)])},w.prototype.getMessageToSign=function(S){void 0===S&&(S=!0);var I=this.raw().slice(0,8),P=x.concat([u,g.rlp.encode(I)]);return S?(0,g.keccak256)(P):P},w.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,g.keccak256)(this.serialize())),this.cache.hash):(0,g.keccak256)(this.serialize())},w.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},w.prototype.getSenderPublicKey=function(){var S;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var I=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(S=this.s)||void 0===S?void 0:S.gt(l.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var P=this,L=P.yParity,V=P.r,W=P.s;try{return(0,g.ecrecover)(I,L.addn(27),(0,g.bnToUnpaddedBuffer)(V),(0,g.bnToUnpaddedBuffer)(W))}catch{throw new Error("Invalid Signature")}},w.prototype._processSignature=function(S,I,P){var L={common:this.common};return w.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new g.BN(S-27),r:new g.BN(I),s:new g.BN(P)},L)},w.prototype.toJSON=function(){var S=h.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,g.bnToHex)(this.chainId),nonce:(0,g.bnToHex)(this.nonce),gasPrice:(0,g.bnToHex)(this.gasPrice),gasLimit:(0,g.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,g.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:S,v:void 0!==this.v?(0,g.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,g.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,g.bnToHex)(this.s):void 0}},w}(b.BaseTransaction);O.default=m},42339:(q,O,E)=>{"use strict";var d=Object.create?function(l,h,u,m){void 0===m&&(m=u),Object.defineProperty(l,m,{enumerable:!0,get:function(){return h[u]}})}:function(l,h,u,m){void 0===m&&(m=u),l[m]=h[u]},x=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(O,"__esModule",{value:!0}),O.FeeMarketEIP1559Transaction=O.TransactionFactory=O.AccessListEIP2930Transaction=O.Transaction=void 0;var f=E(53088);Object.defineProperty(O,"Transaction",{enumerable:!0,get:function(){return x(f).default}});var T=E(97613);Object.defineProperty(O,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return x(T).default}});var g=E(89562);Object.defineProperty(O,"TransactionFactory",{enumerable:!0,get:function(){return x(g).default}});var b=E(660);Object.defineProperty(O,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return x(b).default}}),function(l,h){for(var u in l)"default"===u||Object.prototype.hasOwnProperty.call(h,u)||d(h,l,u)}(E(87325),O)},53088:(q,O,E)=>{"use strict";var d,x=E(29033).Buffer,f=(d=function(h,u){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,_){m.__proto__=_}||function(m,_){for(var w in _)Object.prototype.hasOwnProperty.call(_,w)&&(m[w]=_[w])})(h,u)},function(h,u){if("function"!=typeof u&&null!==u)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function m(){this.constructor=h}d(h,u),h.prototype=null===u?Object.create(u):(m.prototype=u.prototype,new m)}),T=function(){return T=Object.assign||function(h){for(var u,m=1,_=arguments.length;m<_;m++)for(var w in u=arguments[m])Object.prototype.hasOwnProperty.call(u,w)&&(h[w]=u[w]);return h},T.apply(this,arguments)};Object.defineProperty(O,"__esModule",{value:!0});var g=E(33062),b=E(87325),l=function(h){function u(m,_){var w;void 0===_&&(_={});var S=h.call(this,T(T({},m),{type:0}))||this;if(S.common=S._validateTxV(S.v,_.common),S.gasPrice=new g.BN((0,g.toBuffer)(""===m.gasPrice?"0x":m.gasPrice)),S._validateCannotExceedMaxInteger({gasPrice:S.gasPrice}),S.common.gteHardfork("spuriousDragon"))if(S.isSigned()){var I=S.v,P=S.common.chainIdBN().muln(2);(I.eq(P.addn(35))||I.eq(P.addn(36)))&&S.activeCapabilities.push(b.Capability.EIP155ReplayProtection)}else S.activeCapabilities.push(b.Capability.EIP155ReplayProtection);return(null===(w=null==_?void 0:_.freeze)||void 0===w||w)&&Object.freeze(S),S}return f(u,h),u.fromTxData=function(m,_){return void 0===_&&(_={}),new u(m,_)},u.fromSerializedTx=function(m,_){void 0===_&&(_={});var w=g.rlp.decode(m);if(!Array.isArray(w))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(w,_)},u.fromRlpSerializedTx=function(m,_){return void 0===_&&(_={}),u.fromSerializedTx(m,_)},u.fromValuesArray=function(m,_){if(void 0===_&&(_={}),6!==m.length&&9!==m.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");var w=function(S,I){var P="function"==typeof Symbol&&S[Symbol.iterator];if(!P)return S;var L,V,W=P.call(S),G=[];try{for(;(void 0===I||I-- >0)&&!(L=W.next()).done;)G.push(L.value)}catch(H){V={error:H}}finally{try{L&&!L.done&&(P=W.return)&&P.call(W)}finally{if(V)throw V.error}}return G}(m,9);return new u({nonce:w[0],gasPrice:w[1],gasLimit:w[2],to:w[3],value:w[4],data:w[5],v:w[6],r:w[7],s:w[8]},_)},u.prototype.raw=function(){return[(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.gasPrice),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,g.bnToUnpaddedBuffer)(this.v):x.from([]),void 0!==this.r?(0,g.bnToUnpaddedBuffer)(this.r):x.from([]),void 0!==this.s?(0,g.bnToUnpaddedBuffer)(this.s):x.from([])]},u.prototype.serialize=function(){return g.rlp.encode(this.raw())},u.prototype._getMessageToSign=function(){var m=[(0,g.bnToUnpaddedBuffer)(this.nonce),(0,g.bnToUnpaddedBuffer)(this.gasPrice),(0,g.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:x.from([]),(0,g.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(b.Capability.EIP155ReplayProtection)&&(m.push((0,g.toBuffer)(this.common.chainIdBN())),m.push((0,g.unpadBuffer)((0,g.toBuffer)(0))),m.push((0,g.unpadBuffer)((0,g.toBuffer)(0)))),m},u.prototype.getMessageToSign=function(m){void 0===m&&(m=!0);var _=this._getMessageToSign();return m?(0,g.rlphash)(_):_},u.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},u.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,g.rlphash)(this.raw())),this.cache.hash):(0,g.rlphash)(this.raw())},u.prototype.getMessageToVerifySignature=function(){if(!this.isSigned())throw Error("This transaction is not signed");var m=this._getMessageToSign();return(0,g.rlphash)(m)},u.prototype.getSenderPublicKey=function(){var m,_=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(m=this.s)||void 0===m?void 0:m.gt(b.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var w=this,S=w.v,I=w.r,P=w.s;try{return(0,g.ecrecover)(_,S,(0,g.bnToUnpaddedBuffer)(I),(0,g.bnToUnpaddedBuffer)(P),this.supports(b.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch{throw new Error("Invalid Signature")}},u.prototype._processSignature=function(m,_,w){var S=new g.BN(m);this.supports(b.Capability.EIP155ReplayProtection)&&S.iadd(this.common.chainIdBN().muln(2).addn(8));var I={common:this.common};return u.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:S,r:new g.BN(_),s:new g.BN(w)},I)},u.prototype.toJSON=function(){return{nonce:(0,g.bnToHex)(this.nonce),gasPrice:(0,g.bnToHex)(this.gasPrice),gasLimit:(0,g.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,g.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,g.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,g.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,g.bnToHex)(this.s):void 0}},u.prototype._validateTxV=function(m,_){var w;if(void 0!==m&&!m.eqn(0)&&(!_||_.gteHardfork("spuriousDragon"))&&!m.eqn(27)&&!m.eqn(28))if(_){var S=_.chainIdBN().muln(2);if(!m.eq(S.addn(35))&&!m.eq(S.addn(36)))throw new Error("Incompatible EIP155-based V "+m.toString()+" and chain id "+_.chainIdBN().toString()+". See the Common parameter of the Transaction constructor to set the chain id.")}else{var I;I=m.subn(35).isEven()?35:36,w=m.subn(I).divn(2)}return this._getCommon(_,w)},u.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},u.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned())throw Error("This transaction is not signed");var m=this.common.gteHardfork("spuriousDragon"),_=this.v,w=this.common.chainIdBN().muln(2);return(_.eq(w.addn(35))||_.eq(w.addn(36)))&&m},u}(E(75058).BaseTransaction);O.default=l},89562:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0});var x=E(33062),f=E(42339),T=function(){function g(){}return g.fromTxData=function(b,l){if(void 0===l&&(l={}),"type"in b&&void 0!==b.type){var h=new x.BN((0,x.toBuffer)(b.type)).toNumber();if(0===h)return f.Transaction.fromTxData(b,l);if(1===h)return f.AccessListEIP2930Transaction.fromTxData(b,l);if(2===h)return f.FeeMarketEIP1559Transaction.fromTxData(b,l);throw new Error("Tx instantiation with type "+h+" not supported")}return f.Transaction.fromTxData(b,l)},g.fromSerializedData=function(b,l){if(void 0===l&&(l={}),b[0]<=127){var h=void 0;switch(b[0]){case 1:h=2930;break;case 2:h=1559;break;default:throw new Error("TypedTransaction with ID "+b[0]+" unknown")}return 1559===h?f.FeeMarketEIP1559Transaction.fromSerializedTx(b,l):f.AccessListEIP2930Transaction.fromSerializedTx(b,l)}return f.Transaction.fromSerializedTx(b,l)},g.fromBlockBodyData=function(b,l){if(void 0===l&&(l={}),d.isBuffer(b))return this.fromSerializedData(b,l);if(Array.isArray(b))return f.Transaction.fromValuesArray(b,l);throw new Error("Cannot decode transaction: unknown type input")},g.getTransactionClass=function(b,l){if(void 0===b&&(b=0),0==b||b>=128&&b<=255)return f.Transaction;switch(b){case 1:return f.AccessListEIP2930Transaction;case 2:return f.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID "+b+" unknown")}},g}();O.default=T},87325:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.N_DIV_2=O.isAccessList=O.isAccessListBuffer=O.Capability=void 0;var d,x=E(33062);function f(T){return 0===T.length||!!Array.isArray(T[0])}(d=O.Capability||(O.Capability={}))[d.EIP155ReplayProtection=155]="EIP155ReplayProtection",d[d.EIP1559FeeMarket=1559]="EIP1559FeeMarket",d[d.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",d[d.EIP2930AccessLists=2930]="EIP2930AccessLists",O.isAccessListBuffer=f,O.isAccessList=function(T){return!f(T)},O.N_DIV_2=new x.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},53789:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.AccessLists=void 0;var d=E(33062),x=E(87325),f=function(){function T(){}return T.getAccessListData=function(g){var b,l;if(g&&(0,x.isAccessList)(g)){b=g;for(var h=[],u=0;u{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(74519)),T=x(E(69721)),g=x(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.accountBodyToRLP=O.accountBodyToSlim=O.accountBodyFromSlim=O.isZeroAddress=O.zeroAddress=O.importPublic=O.privateToAddress=O.privateToPublic=O.publicToAddress=O.pubToAddress=O.isValidPublic=O.isValidPrivate=O.generateAddress2=O.generateAddress=O.isValidChecksumAddress=O.toChecksumAddress=O.isValidAddress=O.Account=void 0;var b=E(89658),l=E(1243),h=E(86992),u=E(40890),m=E(55803),_=E(21449),w=E(99047),S=E(72560),I=BigInt(0),P=function(){function W(){var G=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,H=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I,j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.KECCAK256_RLP,K=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_.KECCAK256_NULL;(0,T.default)(this,W),this.nonce=G,this.balance=H,this.storageRoot=j,this.codeHash=K,this._validate()}return(0,g.default)(W,[{key:"_validate",value:function(){if(this.nonce=8?o+=H[y].toUpperCase():o+=H[y];return o},O.isValidChecksumAddress=function(W,G){return(0,O.isValidAddress)(W)&&(0,O.toChecksumAddress)(W,G)===W},O.generateAddress=function(W,G){return(0,w.assertIsBuffer)(W),(0,w.assertIsBuffer)(G),(0,m.bufferToBigInt)(G)===BigInt(0)?d.from((0,l.keccak256)(b.RLP.encode((0,m.bufArrToArr)([W,null])))).slice(-20):d.from((0,l.keccak256)(b.RLP.encode((0,m.bufArrToArr)([W,G])))).slice(-20)},O.generateAddress2=function(W,G,H){if((0,w.assertIsBuffer)(W),(0,w.assertIsBuffer)(G),(0,w.assertIsBuffer)(H),20!==W.length)throw new Error("Expected from to be of length 20");if(32!==G.length)throw new Error("Expected salt to be of length 32");var j=(0,l.keccak256)(d.concat([d.from("ff","hex"),W,G,(0,l.keccak256)(H)]));return(0,m.toBuffer)(j).slice(-20)},O.isValidPrivate=function(W){return h.secp256k1.utils.isValidPrivateKey(W)},O.isValidPublic=function(W){var G=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,w.assertIsBuffer)(W),64===W.length)try{return h.secp256k1.ProjectivePoint.fromHex(d.concat([d.from([4]),W])),!0}catch{return!1}if(!G)return!1;try{return h.secp256k1.ProjectivePoint.fromHex(W),!0}catch{return!1}},O.pubToAddress=function(W){var G=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,w.assertIsBuffer)(W),G&&64!==W.length&&(W=d.from(h.secp256k1.ProjectivePoint.fromHex(W).toRawBytes(!1).slice(1))),64!==W.length)throw new Error("Expected pubKey to be of length 64");return d.from((0,l.keccak256)(W)).slice(-20)},O.publicToAddress=O.pubToAddress,O.privateToPublic=function(W){return(0,w.assertIsBuffer)(W),d.from(h.secp256k1.ProjectivePoint.fromPrivateKey(W).toRawBytes(!1).slice(1))},O.privateToAddress=function(W){return(0,O.publicToAddress)((0,O.privateToPublic)(W))},O.importPublic=function(W){return(0,w.assertIsBuffer)(W),64!==W.length&&(W=d.from(h.secp256k1.ProjectivePoint.fromHex(W).toRawBytes(!1).slice(1))),W},O.zeroAddress=function(){var W=(0,m.zeros)(20);return(0,m.bufferToHex)(W)},O.isZeroAddress=function(W){try{(0,w.assertIsString)(W)}catch{return!1}return(0,O.zeroAddress)()===W},O.accountBodyFromSlim=L;var V=new Uint8Array(0);O.accountBodyToSlim=function(W){var G=(0,f.default)(W,4),K=G[2],R=G[3];return[G[0],G[1],(0,m.arrToBufArr)(K).equals(_.KECCAK256_RLP)?V:K,(0,m.arrToBufArr)(R).equals(_.KECCAK256_NULL)?V:R]},O.accountBodyToRLP=function(W){var G=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?W:L(W);return(0,m.arrToBufArr)(b.RLP.encode(G))}},78718:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(69721)),T=x(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.Address=void 0;var g=E(59786),b=E(55803),l=function(){function h(u){if((0,f.default)(this,h),20!==u.length)throw new Error("Invalid address length");this.buf=u}return(0,T.default)(h,[{key:"equals",value:function(u){return this.buf.equals(u.buf)}},{key:"isZero",value:function(){return this.equals(h.zero())}},{key:"isPrecompileOrSystemAddress",value:function(){var u=(0,b.bufferToBigInt)(this.buf),m=BigInt(0),_=BigInt("0xffff");return u>=m&&u<=_}},{key:"toString",value:function(){return"0x"+this.buf.toString("hex")}},{key:"toBuffer",value:function(){return d.from(this.buf)}}],[{key:"zero",value:function(){return new h((0,b.zeros)(20))}},{key:"fromString",value:function(u){if(!(0,g.isValidAddress)(u))throw new Error("Invalid address");return new h((0,b.toBuffer)(u))}},{key:"fromPublicKey",value:function(u){if(!d.isBuffer(u))throw new Error("Public key should be Buffer");return new h((0,g.pubToAddress)(u))}},{key:"fromPrivateKey",value:function(u){if(!d.isBuffer(u))throw new Error("Private key should be Buffer");return new h((0,g.privateToAddress)(u))}},{key:"generate",value:function(u,m){if("bigint"!=typeof m)throw new Error("Expected nonce to be a bigint");return new h((0,g.generateAddress)(u.buf,(0,b.bigIntToBuffer)(m)))}},{key:"generate2",value:function(u,m,_){if(!d.isBuffer(m))throw new Error("Expected salt to be a Buffer");if(!d.isBuffer(_))throw new Error("Expected initCode to be a Buffer");return new h((0,g.generateAddress2)(u.buf,m,_))}}]),h}();O.Address=l},77692:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(69721)),T=d(E(58985)),g=d(E(119)),b=d(E(15163)),l=d(E(34650)),h=d(E(21949)),u=d(E(94571));function m(I){var P,L,V,W=2;for("undefined"!=typeof Symbol&&(L=Symbol.asyncIterator,V=Symbol.iterator);W--;){if(L&&null!=(P=I[L]))return P.call(I);if(V&&null!=(P=I[V]))return new _(P.call(I));L="@@asyncIterator",V="@@iterator"}throw new TypeError("Object is not async iterable")}function _(I){function P(L){if(Object(L)!==L)return Promise.reject(new TypeError(L+" is not an object."));var V=L.done;return Promise.resolve(L.value).then(function(W){return{value:W,done:V}})}return(_=function(L){this.s=L,this.n=L.next}).prototype={s:null,n:null,next:function(){return P(this.n.apply(this.s,arguments))},return:function(L){var V=this.s.return;return void 0===V?Promise.resolve({value:L,done:!0}):P(V.apply(this.s,arguments))},throw:function(L){var V=this.s.return;return void 0===V?Promise.reject(L):P(V.apply(this.s,arguments))}},new _(I)}function w(){return(w=(0,u.default)(x.default.mark(function I(P,L,V){var W,G,H,j,K,R,o;return x.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:G=!1,H=!1,y.prev=2,K=x.default.mark(function M(){var v;return x.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(v=o.value,k.prev=1,!(v.length<2)){k.next=6;break}v.call(P,V),k.next=8;break;case 6:return k.next=8,new Promise(function(D,N){v.call(P,V,function(C){C?N(C):D()})});case 8:k.next=13;break;case 10:k.prev=10,k.t0=k.catch(1),W=k.t0;case 13:case"end":return k.stop()}},M,null,[[1,10]])}),R=m(L);case 5:return y.next=7,R.next();case 7:if(!(G=!(o=y.sent).done)){y.next=12;break}return y.delegateYield(K(),"t0",9);case 9:G=!1,y.next=5;break;case 12:y.next=18;break;case 14:y.prev=14,y.t1=y.catch(2),H=!0,j=y.t1;case 18:if(y.prev=18,y.prev=19,!G||null==R.return){y.next=23;break}return y.next=23,R.return();case 23:if(y.prev=23,!H){y.next=26;break}throw j;case 26:return y.finish(23);case 27:return y.finish(18);case 28:if(!W){y.next=30;break}throw W;case 30:case"end":return y.stop()}},I,null,[[2,14,18,28],[19,,23,27]])}))).apply(this,arguments)}Object.defineProperty(O,"__esModule",{value:!0}),O.AsyncEventEmitter=void 0;var S=function(I){(0,b.default)(W,I);var P,L,V=(P=W,L=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var G,H=(0,h.default)(P);if(L){var j=(0,h.default)(this).constructor;G=Reflect.construct(H,arguments,j)}else G=H.apply(this,arguments);return(0,l.default)(this,G)});function W(){return(0,f.default)(this,W),V.apply(this,arguments)}return(0,T.default)(W,[{key:"emit",value:function(G){for(var H,j=arguments.length,K=new Array(j>1?j-1:0),R=1;R0}},{key:"once",value:function(G,H){var j,K=this;if("function"!=typeof H)throw new TypeError("listener must be a function");return j=H.length>=2?function(R,o){K.removeListener(G,j),H(R,o)}:function(R){K.removeListener(G,j),H(R,j)},K.on(G,j),K}},{key:"first",value:function(G,H){var j,K=null!==(j=this._events[G])&&void 0!==j?j:[];if("function"!=typeof H)throw new TypeError("listener must be a function");return Array.isArray(K)||(this._events[G]=K=[K]),K.unshift(H),this}},{key:"before",value:function(G,H,j){return this.beforeOrAfter(G,H,j)}},{key:"after",value:function(G,H,j){return this.beforeOrAfter(G,H,j,"after")}},{key:"beforeOrAfter",value:function(G,H,j,K){var R,o,y,M=null!==(R=this._events[G])&&void 0!==R?R:[],v="after"===K?1:0;if("function"!=typeof j)throw new TypeError("listener must be a function");if("function"!=typeof H)throw new TypeError("target must be a function");for(Array.isArray(M)||(this._events[G]=M=[M]),y=M.length,o=M.length;o--;)if(M[o]===H){y=o+v;break}return M.splice(y,0,j),this}},{key:"on",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"on",this).call(this,G,H)}},{key:"addListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"addListener",this).call(this,G,H)}},{key:"prependListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"prependListener",this).call(this,G,H)}},{key:"prependOnceListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"prependOnceListener",this).call(this,G,H)}},{key:"removeAllListeners",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"removeAllListeners",this).call(this,G)}},{key:"removeListener",value:function(G,H){return(0,g.default)((0,h.default)(W.prototype),"removeListener",this).call(this,G,H)}},{key:"eventNames",value:function(){return(0,g.default)((0,h.default)(W.prototype),"eventNames",this).call(this)}},{key:"listeners",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"listeners",this).call(this,G)}},{key:"listenerCount",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"listenerCount",this).call(this,G)}},{key:"getMaxListeners",value:function(){return(0,g.default)((0,h.default)(W.prototype),"getMaxListeners",this).call(this)}},{key:"setMaxListeners",value:function(G){return(0,g.default)((0,h.default)(W.prototype),"setMaxListeners",this).call(this,G)}}]),W}(E(38291).EventEmitter);O.AsyncEventEmitter=S},55803:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(74519));Object.defineProperty(O,"__esModule",{value:!0}),O.intToUnpaddedBuffer=O.bigIntToUnpaddedBuffer=O.bigIntToHex=O.bufArrToArr=O.arrToBufArr=O.validateNoLeadingZeroes=O.baToJSON=O.toUtf8=O.short=O.addHexPrefix=O.toUnsigned=O.fromSigned=O.bufferToInt=O.bigIntToBuffer=O.bufferToBigInt=O.bufferToHex=O.toBuffer=O.unpadHexString=O.unpadArray=O.unpadBuffer=O.setLengthRight=O.setLengthLeft=O.zeros=O.intToBuffer=O.intToHex=void 0;var f=E(99047),T=E(72560);O.intToHex=function(u){if(!Number.isSafeInteger(u)||u<0)throw new Error("Received an invalid integer type: ".concat(u));return"0x".concat(u.toString(16))},O.intToBuffer=function(u){var m=(0,O.intToHex)(u);return d.from((0,T.padToEven)(m.slice(2)),"hex")},O.zeros=function(u){return d.allocUnsafe(u).fill(0)};var g=function(u,m,_){var w=(0,O.zeros)(m);return _?u.length0&&"0"===m.toString();)m=(u=u.slice(1))[0];return u};function l(u){var m=(0,O.bufferToHex)(u);return BigInt("0x"===m?0:m)}function h(u){return(0,O.toBuffer)("0x"+u.toString(16))}O.unpadBuffer=function(u){return(0,f.assertIsBuffer)(u),b(u)},O.unpadArray=function(u){return(0,f.assertIsArray)(u),b(u)},O.unpadHexString=function(u){return(0,f.assertIsHexString)(u),u=(0,T.stripHexPrefix)(u),"0x"+b(u)},O.toBuffer=function(u){if(null==u)return d.allocUnsafe(0);if(d.isBuffer(u)||Array.isArray(u)||u instanceof Uint8Array)return d.from(u);if("string"==typeof u){if(!(0,T.isHexString)(u))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(u));return d.from((0,T.padToEven)((0,T.stripHexPrefix)(u)),"hex")}if("number"==typeof u)return(0,O.intToBuffer)(u);if("bigint"==typeof u){if(u1&&void 0!==arguments[1]?arguments[1]:50,_=d.isBuffer(u)?u.toString("hex"):u;return _.length<=m?_:_.slice(0,m)+"\u2026"},O.toUtf8=function(u){if((u=(0,T.stripHexPrefix)(u)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return d.from(u.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},O.baToJSON=function(u){if(d.isBuffer(u))return"0x".concat(u.toString("hex"));if(u instanceof Array){for(var m=[],_=0;_0&&0===I[0])throw new Error("".concat(w[0]," cannot have leading zeroes, received: ").concat(I.toString("hex")))}},O.arrToBufArr=function u(m){return Array.isArray(m)?m.map(function(_){return u(_)}):d.from(m)},O.bufArrToArr=function u(m){return Array.isArray(m)?m.map(function(_){return u(_)}):Uint8Array.from(m??[])},O.bigIntToHex=function(u){return"0x"+u.toString(16)},O.bigIntToUnpaddedBuffer=function(u){return(0,O.unpadBuffer)(h(u))},O.intToUnpaddedBuffer=function(u){return(0,O.unpadBuffer)((0,O.intToBuffer)(u))}},21449:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.MAX_WITHDRAWALS_PER_PAYLOAD=O.RLP_EMPTY_STRING=O.KECCAK256_RLP=O.KECCAK256_RLP_S=O.KECCAK256_RLP_ARRAY=O.KECCAK256_RLP_ARRAY_S=O.KECCAK256_NULL=O.KECCAK256_NULL_S=O.TWO_POW256=O.SECP256K1_ORDER_DIV_2=O.SECP256K1_ORDER=O.MAX_INTEGER_BIGINT=O.MAX_INTEGER=O.MAX_UINT64=void 0;var d=E(29033),x=E(86992);O.MAX_UINT64=BigInt("0xffffffffffffffff"),O.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),O.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),O.SECP256K1_ORDER=x.secp256k1.CURVE.n,O.SECP256K1_ORDER_DIV_2=x.secp256k1.CURVE.n/BigInt(2),O.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),O.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",O.KECCAK256_NULL=d.Buffer.from(O.KECCAK256_NULL_S,"hex"),O.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",O.KECCAK256_RLP_ARRAY=d.Buffer.from(O.KECCAK256_RLP_ARRAY_S,"hex"),O.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",O.KECCAK256_RLP=d.Buffer.from(O.KECCAK256_RLP_S,"hex"),O.RLP_EMPTY_STRING=d.Buffer.from([128]),O.MAX_WITHDRAWALS_PER_PAYLOAD=16},89890:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.compactBytesToNibbles=O.bytesToNibbles=O.nibblesToCompactBytes=O.nibblesToBytes=O.hasTerminator=void 0,O.hasTerminator=function(E){return E.length>0&&16===E[E.length-1]},O.nibblesToBytes=function(E,d){for(var x=0,f=0;f{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.assertIsString=O.assertIsArray=O.assertIsBuffer=O.assertIsHexString=void 0;var x=E(72560);O.assertIsHexString=function(f){if(!(0,x.isHexString)(f)){var T="This method only supports 0x-prefixed hex strings but input was: ".concat(f);throw new Error(T)}},O.assertIsBuffer=function(f){if(!d.isBuffer(f)){var T="This method only supports Buffer but input was: ".concat(f);throw new Error(T)}},O.assertIsArray=function(f){if(!Array.isArray(f)){var T="This method only supports number arrays but input was: ".concat(f);throw new Error(T)}},O.assertIsString=function(f){if("string"!=typeof f){var T="This method only supports strings but input was: ".concat(f);throw new Error(T)}}},65907:(q,O,E)=>{"use strict";var d=Object.create?function(T,g,b,l){void 0===l&&(l=b);var h=Object.getOwnPropertyDescriptor(g,b);h&&!("get"in h?!g.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return g[b]}}),Object.defineProperty(T,l,h)}:function(T,g,b,l){void 0===l&&(l=b),T[l]=g[b]},x=function(T,g){for(var b in T)"default"===b||Object.prototype.hasOwnProperty.call(g,b)||d(g,T,b)};Object.defineProperty(O,"__esModule",{value:!0}),O.toAscii=O.stripHexPrefix=O.padToEven=O.isHexString=O.isHexPrefixed=O.getKeys=O.getBinarySize=O.fromUtf8=O.fromAscii=O.arrayContainsArray=void 0,x(E(21449),O),x(E(44205),O),x(E(59786),O),x(E(78718),O),x(E(1313),O),x(E(65404),O),x(E(55803),O),x(E(62198),O),x(E(89890),O),x(E(77692),O);var f=E(72560);Object.defineProperty(O,"arrayContainsArray",{enumerable:!0,get:function(){return f.arrayContainsArray}}),Object.defineProperty(O,"fromAscii",{enumerable:!0,get:function(){return f.fromAscii}}),Object.defineProperty(O,"fromUtf8",{enumerable:!0,get:function(){return f.fromUtf8}}),Object.defineProperty(O,"getBinarySize",{enumerable:!0,get:function(){return f.getBinarySize}}),Object.defineProperty(O,"getKeys",{enumerable:!0,get:function(){return f.getKeys}}),Object.defineProperty(O,"isHexPrefixed",{enumerable:!0,get:function(){return f.isHexPrefixed}}),Object.defineProperty(O,"isHexString",{enumerable:!0,get:function(){return f.isHexString}}),Object.defineProperty(O,"padToEven",{enumerable:!0,get:function(){return f.padToEven}}),Object.defineProperty(O,"stripHexPrefix",{enumerable:!0,get:function(){return f.stripHexPrefix}}),Object.defineProperty(O,"toAscii",{enumerable:!0,get:function(){return f.toAscii}}),x(E(35651),O),x(E(6449),O)},72560:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(3355));function f(g){if("string"!=typeof g)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,x.default)(g)));return"0"===g[0]&&"x"===g[1]}function T(g){var b=g;if("string"!=typeof b)throw new Error("[padToEven] value must be type 'string', received ".concat((0,x.default)(b)));return b.length%2&&(b="0".concat(b)),b}Object.defineProperty(O,"__esModule",{value:!0}),O.isHexString=O.getKeys=O.fromAscii=O.fromUtf8=O.toAscii=O.arrayContainsArray=O.getBinarySize=O.padToEven=O.stripHexPrefix=O.isHexPrefixed=void 0,O.isHexPrefixed=f,O.stripHexPrefix=function(g){if("string"!=typeof g)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,x.default)(g)));return f(g)?g.slice(2):g},O.padToEven=T,O.getBinarySize=function(g){if("string"!=typeof g)throw new Error("[getBinarySize] method requires input type 'string', received ".concat((0,x.default)(g)));return d.byteLength(g,"utf8")},O.arrayContainsArray=function(g,b,l){if(!0!==Array.isArray(g))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,x.default)(g),"'"));if(!0!==Array.isArray(b))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,x.default)(b),"'"));return b[!0===l?"some":"every"](function(h){return g.indexOf(h)>=0})},O.toAscii=function(g){var b="",l=0,h=g.length;for("0x"===g.substring(0,2)&&(l=2);l0&&g.length!==2+2*b)}},35651:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(94571)),T=d(E(69721)),g=d(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.Lock=void 0;var b=function(){function l(){(0,T.default)(this,l),this.permits=1,this.promiseResolverQueue=[]}var h;return(0,g.default)(l,[{key:"acquire",value:(h=(0,f.default)(x.default.mark(function u(){var m=this;return x.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!(this.permits>0)){_.next=3;break}return this.permits-=1,_.abrupt("return",Promise.resolve(!0));case 3:return _.abrupt("return",new Promise(function(w){return m.promiseResolverQueue.push(w)}));case 4:case"end":return _.stop()}},u,this)})),function(){return h.apply(this,arguments)})},{key:"release",value:function(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;var u=this.promiseResolverQueue.shift();u&&u(!0)}}}]),l}();O.Lock=b},6449:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(94571));Object.defineProperty(O,"__esModule",{value:!0}),O.getProvider=O.fetchFromProvider=void 0;var b,T=E(37441),g=(b=(0,f.default)(x.default.mark(function l(h,u){return x.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,(0,T.default)(h,{headers:{"content-type":"application/json"},type:"json",data:{method:u.method,params:u.params,jsonrpc:"2.0",id:1}});case 2:return _.abrupt("return",_.sent.result);case 4:case"end":return _.stop()}},l)})),function(l,h){return b.apply(this,arguments)});O.fetchFromProvider=g,O.getProvider=function(b){var l;if("string"==typeof b)return b;if(void 0!==(null==b||null===(l=b.connection)||void 0===l?void 0:l.url))return b.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},65404:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.hashPersonalMessage=O.isValidSignature=O.fromRpcSig=O.toCompactSig=O.toRpcSig=O.ecrecover=O.ecsign=void 0;var x=E(1243),f=E(86992),T=E(55803),g=E(21449),b=E(99047);function l(u,m){return u===BigInt(0)||u===BigInt(1)?u:void 0===m?u-BigInt(27):u-(m*BigInt(2)+BigInt(35))}function h(u){return u===BigInt(0)||u===BigInt(1)}O.ecsign=function(u,m,_){var w=f.secp256k1.sign(u,m),S=w.toCompactRawBytes();return{r:d.from(S.slice(0,32)),s:d.from(S.slice(32,64)),v:void 0===_?BigInt(w.recovery+27):BigInt(w.recovery+35)+BigInt(_)*BigInt(2)}},O.ecrecover=function(u,m,_,w,S){var I=d.concat([(0,T.setLengthLeft)(_,32),(0,T.setLengthLeft)(w,32)],64),P=l(m,S);if(!h(P))throw new Error("Invalid signature v value");var L=f.secp256k1.Signature.fromCompact(I).addRecoveryBit(Number(P)).recoverPublicKey(u);return d.from(L.toRawBytes(!1).slice(1))},O.toRpcSig=function(u,m,_,w){if(!h(l(u,w)))throw new Error("Invalid signature v value");return(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(m,32),(0,T.setLengthLeft)(_,32),(0,T.toBuffer)(u)]))},O.toCompactSig=function(u,m,_,w){if(!h(l(u,w)))throw new Error("Invalid signature v value");var S=_;return(u>BigInt(28)&&u%BigInt(2)===BigInt(1)||u===BigInt(1)||u===BigInt(28))&&((S=d.from(_))[0]|=128),(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(m,32),(0,T.setLengthLeft)(S,32)]))},O.fromRpcSig=function(u){var m,_,w,S=(0,T.toBuffer)(u);if(S.length>=65)m=S.slice(0,32),_=S.slice(32,64),w=(0,T.bufferToBigInt)(S.slice(64));else{if(64!==S.length)throw new Error("Invalid signature length");m=S.slice(0,32),_=S.slice(32,64),w=BigInt((0,T.bufferToInt)(S.slice(32,33))>>7),_[0]&=127}return w<27&&(w+=BigInt(27)),{v:w,r:m,s:_}},O.isValidSignature=function(u,m,_){var w=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],S=arguments.length>4?arguments[4]:void 0;if(32!==m.length||32!==_.length||!h(l(u,S)))return!1;var I=(0,T.bufferToBigInt)(m),P=(0,T.bufferToBigInt)(_);return!(I===BigInt(0)||I>=g.SECP256K1_ORDER||P===BigInt(0)||P>=g.SECP256K1_ORDER||w&&P>=g.SECP256K1_ORDER_DIV_2)},O.hashPersonalMessage=function(u){(0,b.assertIsBuffer)(u);var m=d.from("\x19Ethereum Signed Message:\n".concat(u.length),"utf-8");return d.from((0,x.keccak256)(d.concat([m,u])))}},62198:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.toType=O.TypeOutput=void 0;var d,T,x=E(55803),f=E(72560);(T=d=O.TypeOutput||(O.TypeOutput={}))[T.Number=0]="Number",T[T.BigInt=1]="BigInt",T[T.Buffer=2]="Buffer",T[T.PrefixedHexString=3]="PrefixedHexString",O.toType=function(T,g){if(null===T)return null;if(void 0!==T){if("string"==typeof T&&!(0,f.isHexString)(T))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(T));if("number"==typeof T&&!Number.isSafeInteger(T))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var b=(0,x.toBuffer)(T);switch(g){case d.Buffer:return b;case d.BigInt:return(0,x.bufferToBigInt)(b);case d.Number:var l=(0,x.bufferToBigInt)(b);if(l>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(l);case d.PrefixedHexString:return(0,x.bufferToHex)(b);default:throw new Error("unknown outputType")}}}},44205:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.GWEI_TO_WEI=void 0,O.GWEI_TO_WEI=BigInt(1e9)},1313:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(74519)),T=x(E(69721)),g=x(E(58985));Object.defineProperty(O,"__esModule",{value:!0}),O.Withdrawal=void 0;var b=E(78718),l=E(55803),h=E(62198),u=function(){function m(_,w,S,I){(0,T.default)(this,m),this.index=_,this.validatorIndex=w,this.address=S,this.amount=I}return(0,g.default)(m,[{key:"raw",value:function(){return m.toBufferArray(this)}},{key:"toValue",value:function(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}},{key:"toJSON",value:function(){return{index:(0,l.bigIntToHex)(this.index),validatorIndex:(0,l.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,l.bigIntToHex)(this.amount)}}}],[{key:"fromWithdrawalData",value:function(_){var S=_.validatorIndex,I=_.address,P=_.amount;return new m((0,h.toType)(_.index,h.TypeOutput.BigInt),(0,h.toType)(S,h.TypeOutput.BigInt),new b.Address((0,h.toType)(I,h.TypeOutput.Buffer)),(0,h.toType)(P,h.TypeOutput.BigInt))}},{key:"fromValuesArray",value:function(_){if(4!==_.length)throw Error("Invalid withdrawalArray length expected=4 actual=".concat(_.length));var w=(0,f.default)(_,4);return m.fromWithdrawalData({index:w[0],validatorIndex:w[1],address:w[2],amount:w[3]})}},{key:"toBufferArray",value:function(_){var w=_.index,S=_.validatorIndex,I=_.address,P=_.amount;return[(0,h.toType)(w,h.TypeOutput.BigInt)===BigInt(0)?d.alloc(0):(0,h.toType)(w,h.TypeOutput.Buffer),(0,h.toType)(S,h.TypeOutput.BigInt)===BigInt(0)?d.alloc(0):(0,h.toType)(S,h.TypeOutput.Buffer),I instanceof b.Address?I.buf:(0,h.toType)(I,h.TypeOutput.Buffer),(0,h.toType)(P,h.TypeOutput.BigInt)===BigInt(0)?d.alloc(0):(0,h.toType)(P,h.TypeOutput.Buffer)]}}]),m}();O.Withdrawal=u},98067:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="abi/5.7.0"},44937:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.defaultAbiCoder=O.AbiCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=E(908),g=E(23694),b=E(64327),l=E(98067),h=E(17316),u=E(49146),m=E(4341),_=E(30024),w=E(53861),S=E(90028),I=E(4522),P=E(88287),L=E(48040),V=E(52010),W=E(60800),G=new b.Logger(l.version),H=new RegExp(/^bytes([0-9]*)$/),j=new RegExp(/^(u?int)([0-9]*)$/),K=function(){function o(y){(0,x.default)(this,o),(0,g.defineReadOnly)(this,"coerceFunc",y||null)}return(0,f.default)(o,[{key:"_getCoder",value:function(y){var M=this;switch(y.baseType){case"address":return new u.AddressCoder(y.name);case"bool":return new _.BooleanCoder(y.name);case"string":return new L.StringCoder(y.name);case"bytes":return new w.BytesCoder(y.name);case"array":return new m.ArrayCoder(this._getCoder(y.arrayChildren),y.arrayLength,y.name);case"tuple":return new V.TupleCoder((y.components||[]).map(function(N){return M._getCoder(N)}),y.name);case"":return new I.NullCoder(y.name)}var v=y.type.match(j);if(v){var k=parseInt(v[2]||"256");return(0===k||k>256||k%8!=0)&&G.throwArgumentError("invalid "+v[1]+" bit length","param",y),new P.NumberCoder(k/8,"int"===v[1],y.name)}if(v=y.type.match(H)){var D=parseInt(v[1]);return(0===D||D>32)&&G.throwArgumentError("invalid bytes length","param",y),new S.FixedBytesCoder(D,y.name)}return G.throwArgumentError("invalid type","type",y.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(y,M){return new h.Reader(y,this._getWordSize(),this.coerceFunc,M)}},{key:"_getWriter",value:function(){return new h.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(y){var M=this,v=y.map(function(k){return M._getCoder(W.ParamType.from(k))});return new V.TupleCoder(v,"_").defaultValue()}},{key:"encode",value:function(y,M){var v=this;y.length!==M.length&&G.throwError("types/values length mismatch",b.Logger.errors.INVALID_ARGUMENT,{count:{types:y.length,values:M.length},value:{types:y,values:M}});var k=y.map(function(C){return v._getCoder(W.ParamType.from(C))}),D=new V.TupleCoder(k,"_"),N=this._getWriter();return D.encode(N,M),N.data}},{key:"decode",value:function(y,M,v){var k=this,D=y.map(function(N){return k._getCoder(W.ParamType.from(N))});return new V.TupleCoder(D,"_").decode(this._getReader((0,T.arrayify)(M),v))}}]),o}();O.AbiCoder=K;var R=new K;O.defaultAbiCoder=R},17316:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.Writer=O.Reader=O.Coder=void 0,O.checkResultErrors=function(S){var I=[];return function P(L,V){if(Array.isArray(V))for(var W in V){var G=L.slice();G.push(W);try{P(G,V[W])}catch(H){I.push({path:G,error:H})}}}([],S),I};var x=d(E(69721)),f=d(E(58985)),T=E(908),g=E(34952),b=E(23694),l=E(64327),h=E(98067),u=new l.Logger(h.version),m=function(){function S(I,P,L,V){(0,x.default)(this,S),this.name=I,this.type=P,this.localName=L,this.dynamic=V}return(0,f.default)(S,[{key:"_throwError",value:function(I,P){u.throwArgumentError(I,this.localName,P)}}]),S}();O.Coder=m;var _=function(){function S(I){(0,x.default)(this,S),(0,b.defineReadOnly)(this,"wordSize",I||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(I)}return(0,f.default)(S,[{key:"data",get:function(){return(0,T.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(I){return this._data.push(I),this._dataLength+=I.length,I.length}},{key:"appendWriter",value:function(I){return this._writeData((0,T.concat)(I._data))}},{key:"writeBytes",value:function(I){var P=(0,T.arrayify)(I),L=P.length%this.wordSize;return L&&(P=(0,T.concat)([P,this._padding.slice(L)])),this._writeData(P)}},{key:"_getValue",value:function(I){var P=(0,T.arrayify)(g.BigNumber.from(I));return P.length>this.wordSize&&u.throwError("value out-of-bounds",l.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:P.length}),P.length%this.wordSize&&(P=(0,T.concat)([this._padding.slice(P.length%this.wordSize),P])),P}},{key:"writeValue",value:function(I){return this._writeData(this._getValue(I))}},{key:"writeUpdatableValue",value:function(){var I=this,P=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(L){I._data[P]=I._getValue(L)}}}]),S}();O.Writer=_;var w=function(){function S(I,P,L,V){(0,x.default)(this,S),(0,b.defineReadOnly)(this,"_data",(0,T.arrayify)(I)),(0,b.defineReadOnly)(this,"wordSize",P||32),(0,b.defineReadOnly)(this,"_coerceFunc",L),(0,b.defineReadOnly)(this,"allowLoose",V),this._offset=0}return(0,f.default)(S,[{key:"data",get:function(){return(0,T.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(I,P){return this._coerceFunc?this._coerceFunc(I,P):S.coerce(I,P)}},{key:"_peekBytes",value:function(I,P,L){var V=Math.ceil(P/this.wordSize)*this.wordSize;return this._offset+V>this._data.length&&(this.allowLoose&&L&&this._offset+P<=this._data.length?V=P:u.throwError("data out-of-bounds",l.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+V})),this._data.slice(this._offset,this._offset+V)}},{key:"subReader",value:function(I){return new S(this._data.slice(this._offset+I),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(I,P){var L=this._peekBytes(0,I,!!P);return this._offset+=L.length,L.slice(0,I)}},{key:"readValue",value:function(){return g.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(I,P){var L=I.match("^u?int([0-9]+)$");return L&&parseInt(L[1])<=48&&(P=P.toNumber()),P}}]),S}();O.Reader=w},49146:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.AddressCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(77921),h=E(908),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P){return(0,x.default)(this,I),S.call(this,"address","address",P,!1)}return(0,f.default)(I,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(P,L){try{L=(0,l.getAddress)(L)}catch(V){this._throwError(V.message,L)}return P.writeValue(L)}},{key:"decode",value:function(P){return(0,l.getAddress)((0,h.hexZeroPad)(P.readValue().toHexString(),20))}}]),I}(E(17316).Coder);O.AddressCoder=u},58090:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.AnonymousCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=function(h){(0,T.default)(w,h);var u,m,_=(u=w,m=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var S,I=(0,b.default)(u);if(m){var P=(0,b.default)(this).constructor;S=Reflect.construct(I,arguments,P)}else S=I.apply(this,arguments);return(0,g.default)(this,S)});function w(S){var I;return(0,x.default)(this,w),(I=_.call(this,S.name,S.type,void 0,S.dynamic)).coder=S,I}return(0,f.default)(w,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(S,I){return this.coder.encode(S,I)}},{key:"decode",value:function(S){return this.coder.decode(S)}}]),w}(E(17316).Coder);O.AnonymousCoder=l},4341:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.ArrayCoder=void 0,O.pack=S,O.unpack=I;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=d(E(3355)),h=E(64327),u=E(98067),m=E(17316),_=E(58090),w=new h.Logger(u.version);function S(L,V,W){var G=null;if(Array.isArray(W))G=W;else if(W&&"object"===(0,l.default)(W)){var H={};G=V.map(function(o){var y=o.localName;return y||w.throwError("cannot encode object for signature with missing names",h.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:o,value:W}),H[y]&&w.throwError("cannot encode object for signature with duplicate names",h.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:o,value:W}),H[y]=!0,W[y]})}else w.throwArgumentError("invalid tuple value","tuple",W);V.length!==G.length&&w.throwArgumentError("types/value length mismatch","tuple",W);var j=new m.Writer(L.wordSize),K=new m.Writer(L.wordSize),R=[];return V.forEach(function(o,y){var M=G[y];if(o.dynamic){var v=K.length;o.encode(K,M);var k=j.writeUpdatableValue();R.push(function(D){k(D+v)})}else o.encode(j,M)}),R.forEach(function(o){o(j.length)}),L.appendWriter(j)+L.appendWriter(K)}function I(L,V){var W=[],G=L.subReader(0);V.forEach(function(R){var o=null;if(R.dynamic){var y=L.readValue(),M=G.subReader(y.toNumber());try{o=R.decode(M)}catch(v){if(v.code===h.Logger.errors.BUFFER_OVERRUN)throw v;(o=v).baseType=R.name,o.name=R.localName,o.type=R.type}}else try{o=R.decode(L)}catch(v){if(v.code===h.Logger.errors.BUFFER_OVERRUN)throw v;(o=v).baseType=R.name,o.name=R.localName,o.type=R.type}null!=o&&W.push(o)});var H=V.reduce(function(R,o){var y=o.localName;return y&&(R[y]||(R[y]=0),R[y]++),R},{});V.forEach(function(R,o){var y=R.localName;if(y&&1===H[y]&&("length"===y&&(y="_length"),null==W[y])){var M=W[o];M instanceof Error?Object.defineProperty(W,y,{enumerable:!0,get:function(){throw M}}):W[y]=M}});for(var j=function(R){var o=W[R];o instanceof Error&&Object.defineProperty(W,R,{enumerable:!0,get:function(){throw o}})},K=0;K=0?K:"")+"]",R,-1===K||j.dynamic)).coder=j,o.length=K,o}return(0,f.default)(H,[{key:"defaultValue",value:function(){for(var j=this.coder.defaultValue(),K=[],R=0;Rj._data.length&&w.throwError("insufficient data length",h.Logger.errors.BUFFER_OVERRUN,{length:j._data.length,count:K});for(var R=[],o=0;o{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.BooleanCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=function(h){(0,T.default)(w,h);var u,m,_=(u=w,m=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var S,I=(0,b.default)(u);if(m){var P=(0,b.default)(this).constructor;S=Reflect.construct(I,arguments,P)}else S=I.apply(this,arguments);return(0,g.default)(this,S)});function w(S){return(0,x.default)(this,w),_.call(this,"bool","bool",S,!1)}return(0,f.default)(w,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(S,I){return S.writeValue(I?1:0)}},{key:"decode",value:function(S){return S.coerce(this.type,!S.readValue().isZero())}}]),w}(E(17316).Coder);O.BooleanCoder=l},53861:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.DynamicBytesCoder=O.BytesCoder=void 0;var x=d(E(119)),f=d(E(69721)),T=d(E(58985)),g=d(E(15163)),b=d(E(34650)),l=d(E(21949)),h=E(908);function u(w){var S=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var I,P=(0,l.default)(w);if(S){var L=(0,l.default)(this).constructor;I=Reflect.construct(P,arguments,L)}else I=P.apply(this,arguments);return(0,b.default)(this,I)}}var m=function(w){(0,g.default)(I,w);var S=u(I);function I(P,L){return(0,f.default)(this,I),S.call(this,P,P,L,!0)}return(0,T.default)(I,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(P,L){return L=(0,h.arrayify)(L),P.writeValue(L.length)+P.writeBytes(L)}},{key:"decode",value:function(P){return P.readBytes(P.readValue().toNumber(),!0)}}]),I}(E(17316).Coder);O.DynamicBytesCoder=m;var _=function(w){(0,g.default)(I,w);var S=u(I);function I(P){return(0,f.default)(this,I),S.call(this,"bytes",P)}return(0,T.default)(I,[{key:"decode",value:function(P){return P.coerce(this.name,(0,h.hexlify)((0,x.default)((0,l.default)(I.prototype),"decode",this).call(this,P)))}}]),I}(m);O.BytesCoder=_},90028:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.FixedBytesCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(908),h=function(u){(0,T.default)(S,u);var m,_,w=(m=S,_=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var I,P=(0,b.default)(m);if(_){var L=(0,b.default)(this).constructor;I=Reflect.construct(P,arguments,L)}else I=P.apply(this,arguments);return(0,g.default)(this,I)});function S(I,P){var L;(0,x.default)(this,S);var V="bytes"+String(I);return(L=w.call(this,V,V,P,!1)).size=I,L}return(0,f.default)(S,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(I,P){var L=(0,l.arrayify)(P);return L.length!==this.size&&this._throwError("incorrect data length",P),I.writeBytes(L)}},{key:"decode",value:function(I){return I.coerce(this.name,(0,l.hexlify)(I.readBytes(this.size)))}}]),S}(E(17316).Coder);O.FixedBytesCoder=h},4522:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.NullCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=function(h){(0,T.default)(w,h);var u,m,_=(u=w,m=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var S,I=(0,b.default)(u);if(m){var P=(0,b.default)(this).constructor;S=Reflect.construct(I,arguments,P)}else S=I.apply(this,arguments);return(0,g.default)(this,S)});function w(S){return(0,x.default)(this,w),_.call(this,"null","",S,!1)}return(0,f.default)(w,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(S,I){return null!=I&&this._throwError("not null",I),S.writeBytes([])}},{key:"decode",value:function(S){return S.readBytes(0),S.coerce(this.name,null)}}]),w}(E(17316).Coder);O.NullCoder=l},88287:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.NumberCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(34952),h=E(5465),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P,L,V){var W;(0,x.default)(this,I);var G=(L?"int":"uint")+8*P;return(W=S.call(this,G,G,V,!1)).size=P,W.signed=L,W}return(0,f.default)(I,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(P,L){var V=l.BigNumber.from(L),W=h.MaxUint256.mask(8*P.wordSize);if(this.signed){var G=W.mask(8*this.size-1);(V.gt(G)||V.lt(G.add(h.One).mul(h.NegativeOne)))&&this._throwError("value out-of-bounds",L)}else(V.lt(h.Zero)||V.gt(W.mask(8*this.size)))&&this._throwError("value out-of-bounds",L);return V=V.toTwos(8*this.size).mask(8*this.size),this.signed&&(V=V.fromTwos(8*this.size).toTwos(8*P.wordSize)),P.writeValue(V)}},{key:"decode",value:function(P){var L=P.readValue().mask(8*this.size);return this.signed&&(L=L.fromTwos(8*this.size)),P.coerce(this.name,L)}}]),I}(E(17316).Coder);O.NumberCoder=u},48040:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.StringCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(119)),g=d(E(15163)),b=d(E(34650)),l=d(E(21949)),h=E(78627),u=function(m){(0,g.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,l.default)(_);if(w){var V=(0,l.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,b.default)(this,P)});function I(P){return(0,x.default)(this,I),S.call(this,"string",P)}return(0,f.default)(I,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(P,L){return(0,T.default)((0,l.default)(I.prototype),"encode",this).call(this,P,(0,h.toUtf8Bytes)(L))}},{key:"decode",value:function(P){return(0,h.toUtf8String)((0,T.default)((0,l.default)(I.prototype),"decode",this).call(this,P))}}]),I}(E(53861).DynamicBytesCoder);O.StringCoder=u},52010:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.TupleCoder=void 0;var x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(17316),h=E(4341),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P,L){var V;(0,x.default)(this,I);var W=!1,G=[];P.forEach(function(j){j.dynamic&&(W=!0),G.push(j.type)});var H="tuple("+G.join(",")+")";return(V=S.call(this,"tuple",H,L,W)).coders=P,V}return(0,f.default)(I,[{key:"defaultValue",value:function(){var P=[];this.coders.forEach(function(V){P.push(V.defaultValue())});var L=this.coders.reduce(function(V,W){var G=W.localName;return G&&(V[G]||(V[G]=0),V[G]++),V},{});return this.coders.forEach(function(V,W){var G=V.localName;G&&1===L[G]&&("length"===G&&(G="_length"),null==P[G]&&(P[G]=P[W]))}),Object.freeze(P)}},{key:"encode",value:function(P,L){return(0,h.pack)(P,this.coders,L)}},{key:"decode",value:function(P){return P.coerce(this.name,(0,h.unpack)(P,this.coders))}}]),I}(l.Coder);O.TupleCoder=u},60800:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.ParamType=O.FunctionFragment=O.Fragment=O.FormatTypes=O.EventFragment=O.ErrorFragment=O.ConstructorFragment=void 0;var x=d(E(15163)),f=d(E(34650)),T=d(E(21949)),g=d(E(69721)),b=d(E(58985)),l=E(34952),h=E(23694),u=E(64327),m=E(98067);function _(ee){var ce=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ue,we=(0,T.default)(ee);if(ce){var ae=(0,T.default)(this).constructor;ue=Reflect.construct(we,arguments,ae)}else ue=we.apply(this,arguments);return(0,f.default)(this,ue)}}var w=new u.Logger(m.version),S={},I={calldata:!0,memory:!0,storage:!0},P={calldata:!0,memory:!0};function L(ee,ce){if("bytes"===ee||"string"===ee){if(I[ce])return!0}else if("address"===ee){if("payable"===ce)return!0}else if((ee.indexOf("[")>=0||"tuple"===ee)&&P[ce])return!0;return(I[ce]||"payable"===ce)&&w.throwArgumentError("invalid modifier","name",ce),!1}function V(ee,ce){for(var ue in ce)(0,h.defineReadOnly)(ee,ue,ce[ue])}var W=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});O.FormatTypes=W;var G=new RegExp(/^(.*)\[([0-9]*)\]$/),H=function(){function ee(ce,ue){(0,g.default)(this,ee),ce!==S&&w.throwError("use fromString",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),V(this,ue);var we=this.type.match(G);V(this,we?{arrayLength:parseInt(we[2]||"-1"),arrayChildren:ee.fromObject({type:we[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,b.default)(ee,[{key:"format",value:function(ce){if(ce||(ce=W.sighash),W[ce]||w.throwArgumentError("invalid format type","format",ce),ce===W.json){var ue={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(ue.indexed=this.indexed),this.components&&(ue.components=this.components.map(function(ae){return JSON.parse(ae.format(ce))})),JSON.stringify(ue)}var we="";return"array"===this.baseType?(we+=this.arrayChildren.format(ce),we+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(ce!==W.sighash&&(we+=this.type),we+="("+this.components.map(function(ae){return ae.format(ce)}).join(ce===W.full?", ":",")+")"):we+=this.type,ce!==W.sighash&&(!0===this.indexed&&(we+=" indexed"),ce===W.full&&this.name&&(we+=" "+this.name)),we}}],[{key:"from",value:function(ce,ue){return"string"==typeof ce?ee.fromString(ce,ue):ee.fromObject(ce)}},{key:"fromObject",value:function(ce){return ee.isParamType(ce)?ce:new ee(S,{name:ce.name||null,type:C(ce.type),indexed:null==ce.indexed?null:!!ce.indexed,components:ce.components?ce.components.map(ee.fromObject):null})}},{key:"fromString",value:function(ce,ue){return we=function(ae,Te){var le=ae;function X(Ee){w.throwArgumentError("unexpected character at position ".concat(Ee),"param",ae)}function ne(Ee){var ze={type:"",name:"",parent:Ee,state:{allowType:!0}};return Te&&(ze.indexed=!1),ze}ae=ae.replace(/\s/g," ");for(var pe={type:"",name:"",state:{allowType:!0}},_e=pe,xe=0;xe2&&w.throwArgumentError("invalid human-readable ABI signature","value",ee),ue[1].match(/^[0-9]+$/)||w.throwArgumentError("invalid human-readable ABI signature gas","value",ee),ce.gas=l.BigNumber.from(ue[1]),ue[0]):ee}function y(ee,ce){ce.constant=!1,ce.payable=!1,ce.stateMutability="nonpayable",ee.split(" ").forEach(function(ue){switch(ue.trim()){case"constant":ce.constant=!0;break;case"payable":ce.payable=!0,ce.stateMutability="payable";break;case"nonpayable":ce.payable=!1,ce.stateMutability="nonpayable";break;case"pure":ce.constant=!0,ce.stateMutability="pure";break;case"view":ce.constant=!0,ce.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+ue)}})}function M(ee){var ce={constant:!1,payable:!0,stateMutability:"payable"};return null!=ee.stateMutability?(ce.stateMutability=ee.stateMutability,ce.constant="view"===ce.stateMutability||"pure"===ce.stateMutability,null!=ee.constant&&!!ee.constant!==ce.constant&&w.throwArgumentError("cannot have constant function with mutability "+ce.stateMutability,"value",ee),ce.payable="payable"===ce.stateMutability,null!=ee.payable&&!!ee.payable!==ce.payable&&w.throwArgumentError("cannot have payable function with mutability "+ce.stateMutability,"value",ee)):null!=ee.payable?(ce.payable=!!ee.payable,null!=ee.constant||ce.payable||"constructor"===ee.type||w.throwArgumentError("unable to determine stateMutability","value",ee),ce.constant=!!ee.constant,ce.stateMutability=ce.constant?"view":ce.payable?"payable":"nonpayable",ce.payable&&ce.constant&&w.throwArgumentError("cannot have constant payable function","value",ee)):null!=ee.constant?(ce.constant=!!ee.constant,ce.payable=!ce.constant,ce.stateMutability=ce.constant?"view":"payable"):"constructor"!==ee.type&&w.throwArgumentError("unable to determine stateMutability","value",ee),ce}O.EventFragment=R;var v=function(ee){(0,x.default)(ue,ee);var ce=_(ue);function ue(){return(0,g.default)(this,ue),ce.apply(this,arguments)}return(0,b.default)(ue,[{key:"format",value:function(we){if(we||(we=W.sighash),W[we]||w.throwArgumentError("invalid format type","format",we),we===W.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(function(Te){return JSON.parse(Te.format(we))})});we===W.sighash&&w.throwError("cannot format a constructor for sighash",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var ae="constructor("+this.inputs.map(function(Te){return Te.format(we)}).join(we===W.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(ae+=this.stateMutability+" "),ae.trim()}}],[{key:"from",value:function(we){return"string"==typeof we?ue.fromString(we):ue.fromObject(we)}},{key:"fromObject",value:function(we){if(ue.isConstructorFragment(we))return we;"constructor"!==we.type&&w.throwArgumentError("invalid constructor object","value",we);var ae=M(we);ae.constant&&w.throwArgumentError("constructor cannot be constant","value",we);var Te={name:null,type:we.type,inputs:we.inputs?we.inputs.map(H.fromObject):[],payable:ae.payable,stateMutability:ae.stateMutability,gas:we.gas?l.BigNumber.from(we.gas):null};return new ue(S,Te)}},{key:"fromString",value:function(we){var ae={type:"constructor"},Te=(we=o(we,ae)).match(Q);return Te&&"constructor"===Te[1].trim()||w.throwArgumentError("invalid constructor string","value",we),ae.inputs=j(Te[2].trim(),!1),y(Te[3].trim(),ae),ue.fromObject(ae)}},{key:"isConstructorFragment",value:function(we){return we&&we._isFragment&&"constructor"===we.type}}]),ue}(K);O.ConstructorFragment=v;var k=function(ee){(0,x.default)(ue,ee);var ce=_(ue);function ue(){return(0,g.default)(this,ue),ce.apply(this,arguments)}return(0,b.default)(ue,[{key:"format",value:function(we){if(we||(we=W.sighash),W[we]||w.throwArgumentError("invalid format type","format",we),we===W.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(function(Te){return JSON.parse(Te.format(we))}),outputs:this.outputs.map(function(Te){return JSON.parse(Te.format(we))})});var ae="";return we!==W.sighash&&(ae+="function "),ae+=this.name+"("+this.inputs.map(function(Te){return Te.format(we)}).join(we===W.full?", ":",")+") ",we!==W.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(ae+=this.stateMutability+" "):this.constant&&(ae+="view "),this.outputs&&this.outputs.length&&(ae+="returns ("+this.outputs.map(function(Te){return Te.format(we)}).join(", ")+") "),null!=this.gas&&(ae+="@"+this.gas.toString()+" ")),ae.trim()}}],[{key:"from",value:function(we){return"string"==typeof we?ue.fromString(we):ue.fromObject(we)}},{key:"fromObject",value:function(we){if(ue.isFunctionFragment(we))return we;"function"!==we.type&&w.throwArgumentError("invalid function object","value",we);var ae=M(we),Te={type:we.type,name:B(we.name),constant:ae.constant,inputs:we.inputs?we.inputs.map(H.fromObject):[],outputs:we.outputs?we.outputs.map(H.fromObject):[],payable:ae.payable,stateMutability:ae.stateMutability,gas:we.gas?l.BigNumber.from(we.gas):null};return new ue(S,Te)}},{key:"fromString",value:function(we){var ae={type:"function"},Te=(we=o(we,ae)).split(" returns ");Te.length>2&&w.throwArgumentError("invalid function string","value",we);var le=Te[0].match(Q);if(le||w.throwArgumentError("invalid function signature","value",we),ae.name=le[1].trim(),ae.name&&B(ae.name),ae.inputs=j(le[2],!1),y(le[3].trim(),ae),Te.length>1){var X=Te[1].match(Q);""==X[1].trim()&&""==X[3].trim()||w.throwArgumentError("unexpected tokens","value",we),ae.outputs=j(X[2],!1)}else ae.outputs=[];return ue.fromObject(ae)}},{key:"isFunctionFragment",value:function(we){return we&&we._isFragment&&"function"===we.type}}]),ue}(v);function D(ee){var ce=ee.format();return"Error(string)"!==ce&&"Panic(uint256)"!==ce||w.throwArgumentError("cannot specify user defined ".concat(ce," error"),"fragment",ee),ee}O.FunctionFragment=k;var N=function(ee){(0,x.default)(ue,ee);var ce=_(ue);function ue(){return(0,g.default)(this,ue),ce.apply(this,arguments)}return(0,b.default)(ue,[{key:"format",value:function(we){if(we||(we=W.sighash),W[we]||w.throwArgumentError("invalid format type","format",we),we===W.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(function(Te){return JSON.parse(Te.format(we))})});var ae="";return we!==W.sighash&&(ae+="error "),(ae+=this.name+"("+this.inputs.map(function(Te){return Te.format(we)}).join(we===W.full?", ":",")+") ").trim()}}],[{key:"from",value:function(we){return"string"==typeof we?ue.fromString(we):ue.fromObject(we)}},{key:"fromObject",value:function(we){if(ue.isErrorFragment(we))return we;"error"!==we.type&&w.throwArgumentError("invalid error object","value",we);var ae={type:we.type,name:B(we.name),inputs:we.inputs?we.inputs.map(H.fromObject):[]};return D(new ue(S,ae))}},{key:"fromString",value:function(we){var ae={type:"error"},Te=we.match(Q);return Te||w.throwArgumentError("invalid error signature","value",we),ae.name=Te[1].trim(),ae.name&&B(ae.name),ae.inputs=j(Te[2],!1),D(ue.fromObject(ae))}},{key:"isErrorFragment",value:function(we){return we&&we._isFragment&&"error"===we.type}}]),ue}(K);function C(ee){return ee.match(/^uint($|[^1-9])/)?ee="uint256"+ee.substring(4):ee.match(/^int($|[^1-9])/)&&(ee="int256"+ee.substring(3)),ee}O.ErrorFragment=N;var a=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function B(ee){return ee&&ee.match(a)||w.throwArgumentError('invalid identifier "'.concat(ee,'"'),"value",ee),ee}var Q=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},62914:(q,O,E)=>{"use strict";Object.defineProperty(O,"RQ",{enumerable:!0,get:function(){return x.AbiCoder}}),Object.defineProperty(O,"_R",{enumerable:!0,get:function(){return d.ParamType}});var d=E(60800),x=E(44937);E(69044)},69044:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.TransactionDescription=O.LogDescription=O.Interface=O.Indexed=O.ErrorDescription=void 0,Object.defineProperty(O,"checkResultErrors",{enumerable:!0,get:function(){return I.checkResultErrors}});var x=d(E(58985)),f=d(E(69721)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=E(77921),h=E(34952),u=E(908),m=E(37515),_=E(64642),w=E(23694),S=E(44937),I=E(17316),P=E(60800),L=E(64327),V=E(98067);function W(v){var k=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var D,N=(0,b.default)(v);if(k){var C=(0,b.default)(this).constructor;D=Reflect.construct(N,arguments,C)}else D=N.apply(this,arguments);return(0,g.default)(this,D)}}var G=new L.Logger(V.version),H=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D)}(w.Description);O.LogDescription=H;var j=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D)}(w.Description);O.TransactionDescription=j;var K=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D)}(w.Description);O.ErrorDescription=K;var R=function(v){(0,T.default)(D,v);var k=W(D);function D(){return(0,f.default)(this,D),k.apply(this,arguments)}return(0,x.default)(D,null,[{key:"isIndexed",value:function(N){return!(!N||!N._isIndexed)}}]),D}(w.Description);O.Indexed=R;var o={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function y(v,k){var D=new Error("deferred error during ABI decoding triggered accessing ".concat(v));return D.error=k,D}var M=function(){function v(k){var D=this;(0,f.default)(this,v);var N=[];N="string"==typeof k?JSON.parse(k):k,(0,w.defineReadOnly)(this,"fragments",N.map(function(C){return P.Fragment.from(C)}).filter(function(C){return null!=C})),(0,w.defineReadOnly)(this,"_abiCoder",(0,w.getStatic)(this instanceof v?this.constructor:void 0,"getAbiCoder")()),(0,w.defineReadOnly)(this,"functions",{}),(0,w.defineReadOnly)(this,"errors",{}),(0,w.defineReadOnly)(this,"events",{}),(0,w.defineReadOnly)(this,"structs",{}),this.fragments.forEach(function(C){var a=null;switch(C.type){case"constructor":return D.deploy?void G.warn("duplicate definition - constructor"):void(0,w.defineReadOnly)(D,"deploy",C);case"function":a=D.functions;break;case"event":a=D.events;break;case"error":a=D.errors;break;default:return}var B=C.format();a[B]?G.warn("duplicate definition - "+B):a[B]=C}),this.deploy||(0,w.defineReadOnly)(this,"deploy",P.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,w.defineReadOnly)(this,"_isInterface",!0)}return(0,x.default)(v,[{key:"format",value:function(k){k||(k=P.FormatTypes.full),k===P.FormatTypes.sighash&&G.throwArgumentError("interface does not support formatting sighash","format",k);var D=this.fragments.map(function(N){return N.format(k)});return k===P.FormatTypes.json?JSON.stringify(D.map(function(N){return JSON.parse(N)})):D}},{key:"getFunction",value:function(k){if((0,u.isHexString)(k)){for(var D in this.functions)if(k===this.getSighash(D))return this.functions[D];G.throwArgumentError("no matching function","sighash",k)}if(-1===k.indexOf("(")){var N=k.trim(),C=Object.keys(this.functions).filter(function(B){return B.split("(")[0]===N});return 0===C.length?G.throwArgumentError("no matching function","name",N):C.length>1&&G.throwArgumentError("multiple matching functions","name",N),this.functions[C[0]]}var a=this.functions[P.FunctionFragment.fromString(k).format()];return a||G.throwArgumentError("no matching function","signature",k),a}},{key:"getEvent",value:function(k){if((0,u.isHexString)(k)){var D=k.toLowerCase();for(var N in this.events)if(D===this.getEventTopic(N))return this.events[N];G.throwArgumentError("no matching event","topichash",D)}if(-1===k.indexOf("(")){var C=k.trim(),a=Object.keys(this.events).filter(function(Q){return Q.split("(")[0]===C});return 0===a.length?G.throwArgumentError("no matching event","name",C):a.length>1&&G.throwArgumentError("multiple matching events","name",C),this.events[a[0]]}var B=this.events[P.EventFragment.fromString(k).format()];return B||G.throwArgumentError("no matching event","signature",k),B}},{key:"getError",value:function(k){if((0,u.isHexString)(k)){var D=(0,w.getStatic)(this.constructor,"getSighash");for(var N in this.errors)if(k===D(this.errors[N]))return this.errors[N];G.throwArgumentError("no matching error","sighash",k)}if(-1===k.indexOf("(")){var C=k.trim(),a=Object.keys(this.errors).filter(function(Q){return Q.split("(")[0]===C});return 0===a.length?G.throwArgumentError("no matching error","name",C):a.length>1&&G.throwArgumentError("multiple matching errors","name",C),this.errors[a[0]]}var B=this.errors[P.FunctionFragment.fromString(k).format()];return B||G.throwArgumentError("no matching error","signature",k),B}},{key:"getSighash",value:function(k){if("string"==typeof k)try{k=this.getFunction(k)}catch(D){try{k=this.getError(k)}catch{throw D}}return(0,w.getStatic)(this.constructor,"getSighash")(k)}},{key:"getEventTopic",value:function(k){return"string"==typeof k&&(k=this.getEvent(k)),(0,w.getStatic)(this.constructor,"getEventTopic")(k)}},{key:"_decodeParams",value:function(k,D){return this._abiCoder.decode(k,D)}},{key:"_encodeParams",value:function(k,D){return this._abiCoder.encode(k,D)}},{key:"encodeDeploy",value:function(k){return this._encodeParams(this.deploy.inputs,k||[])}},{key:"decodeErrorResult",value:function(k,D){"string"==typeof k&&(k=this.getError(k));var N=(0,u.arrayify)(D);return(0,u.hexlify)(N.slice(0,4))!==this.getSighash(k)&&G.throwArgumentError("data signature does not match error ".concat(k.name,"."),"data",(0,u.hexlify)(N)),this._decodeParams(k.inputs,N.slice(4))}},{key:"encodeErrorResult",value:function(k,D){return"string"==typeof k&&(k=this.getError(k)),(0,u.hexlify)((0,u.concat)([this.getSighash(k),this._encodeParams(k.inputs,D||[])]))}},{key:"decodeFunctionData",value:function(k,D){"string"==typeof k&&(k=this.getFunction(k));var N=(0,u.arrayify)(D);return(0,u.hexlify)(N.slice(0,4))!==this.getSighash(k)&&G.throwArgumentError("data signature does not match function ".concat(k.name,"."),"data",(0,u.hexlify)(N)),this._decodeParams(k.inputs,N.slice(4))}},{key:"encodeFunctionData",value:function(k,D){return"string"==typeof k&&(k=this.getFunction(k)),(0,u.hexlify)((0,u.concat)([this.getSighash(k),this._encodeParams(k.inputs,D||[])]))}},{key:"decodeFunctionResult",value:function(k,D){"string"==typeof k&&(k=this.getFunction(k));var N=(0,u.arrayify)(D),C=null,a="",B=null,Q=null,ee=null;switch(N.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(k.outputs,N)}catch{}break;case 4:var ce=(0,u.hexlify)(N.slice(0,4)),ue=o[ce];if(ue)B=this._abiCoder.decode(ue.inputs,N.slice(4)),ee=ue.signature,ue.reason&&(C=B[0]),"Error"===(Q=ue.name)?a="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(B[0])):"Panic"===Q&&(a="; VM Exception while processing transaction: reverted with panic code ".concat(B[0]));else try{var we=this.getError(ce);B=this._abiCoder.decode(we.inputs,N.slice(4)),Q=we.name,ee=we.format()}catch{}}return G.throwError("call revert exception"+a,L.Logger.errors.CALL_EXCEPTION,{method:k.format(),data:(0,u.hexlify)(D),errorArgs:B,errorName:Q,errorSignature:ee,reason:C})}},{key:"encodeFunctionResult",value:function(k,D){return"string"==typeof k&&(k=this.getFunction(k)),(0,u.hexlify)(this._abiCoder.encode(k.outputs,D||[]))}},{key:"encodeFilterTopics",value:function(k,D){var N=this;"string"==typeof k&&(k=this.getEvent(k)),D.length>k.inputs.length&&G.throwError("too many arguments for "+k.format(),L.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:D});var C=[];k.anonymous||C.push(this.getEventTopic(k));var a=function(B,Q){return"string"===B.type?(0,m.id)(Q):"bytes"===B.type?(0,_.keccak256)((0,u.hexlify)(Q)):("bool"===B.type&&"boolean"==typeof Q&&(Q=Q?"0x01":"0x00"),B.type.match(/^u?int/)&&(Q=h.BigNumber.from(Q).toHexString()),"address"===B.type&&N._abiCoder.encode(["address"],[Q]),(0,u.hexZeroPad)((0,u.hexlify)(Q),32))};for(D.forEach(function(B,Q){var ee=k.inputs[Q];ee.indexed?null==B?C.push(null):"array"===ee.baseType||"tuple"===ee.baseType?G.throwArgumentError("filtering with tuples or arrays not supported","contract."+ee.name,B):Array.isArray(B)?C.push(B.map(function(ce){return a(ee,ce)})):C.push(a(ee,B)):null!=B&&G.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+ee.name,B)});C.length&&null===C[C.length-1];)C.pop();return C}},{key:"encodeEventLog",value:function(k,D){var N=this;"string"==typeof k&&(k=this.getEvent(k));var C=[],a=[],B=[];return k.anonymous||C.push(this.getEventTopic(k)),D.length!==k.inputs.length&&G.throwArgumentError("event arguments/values mismatch","values",D),k.inputs.forEach(function(Q,ee){var ce=D[ee];if(Q.indexed)if("string"===Q.type)C.push((0,m.id)(ce));else if("bytes"===Q.type)C.push((0,_.keccak256)(ce));else{if("tuple"===Q.baseType||"array"===Q.baseType)throw new Error("not implemented");C.push(N._abiCoder.encode([Q.type],[ce]))}else a.push(Q),B.push(ce)}),{data:this._abiCoder.encode(a,B),topics:C}}},{key:"decodeEventLog",value:function(k,D,N){if("string"==typeof k&&(k=this.getEvent(k)),null!=N&&!k.anonymous){var C=this.getEventTopic(k);(0,u.isHexString)(N[0],32)&&N[0].toLowerCase()===C||G.throwError("fragment/topic mismatch",L.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:N[0]}),N=N.slice(1)}var a=[],B=[],Q=[];k.inputs.forEach(function(X,ne){X.indexed?"string"===X.type||"bytes"===X.type||"tuple"===X.baseType||"array"===X.baseType?(a.push(P.ParamType.fromObject({type:"bytes32",name:X.name})),Q.push(!0)):(a.push(X),Q.push(!1)):(B.push(X),Q.push(!1))});var ee=null!=N?this._abiCoder.decode(a,(0,u.concat)(N)):null,ce=this._abiCoder.decode(B,D,!0),ue=[],we=0,ae=0;k.inputs.forEach(function(X,ne){if(X.indexed)if(null==ee)ue[ne]=new R({_isIndexed:!0,hash:null});else if(Q[ne])ue[ne]=new R({_isIndexed:!0,hash:ee[ae++]});else try{ue[ne]=ee[ae++]}catch(_e){ue[ne]=_e}else try{ue[ne]=ce[we++]}catch(_e){ue[ne]=_e}if(X.name&&null==ue[X.name]){var pe=ue[ne];pe instanceof Error?Object.defineProperty(ue,X.name,{enumerable:!0,get:function(){throw y("property ".concat(JSON.stringify(X.name)),pe)}}):ue[X.name]=pe}});for(var Te=function(X){var ne=ue[X];ne instanceof Error&&Object.defineProperty(ue,X,{enumerable:!0,get:function(){throw y("index ".concat(X),ne)}})},le=0;le{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="address/5.7.0"},77921:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.getAddress=P,O.getContractAddress=function(L){var V=null;try{V=P(L.from)}catch{l.throwArgumentError("missing from address","transaction",L)}var W=(0,d.stripZeros)((0,d.arrayify)(x.BigNumber.from(L.nonce).toHexString()));return P((0,d.hexDataSlice)((0,f.keccak256)((0,T.encode)([V,W])),12))},O.getCreate2Address=function(L,V,W){return 32!==(0,d.hexDataLength)(V)&&l.throwArgumentError("salt must be 32 bytes","salt",V),32!==(0,d.hexDataLength)(W)&&l.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",W),P((0,d.hexDataSlice)((0,f.keccak256)((0,d.concat)(["0xff",P(L),V,W])),12))},O.getIcapAddress=function(L){for(var V=(0,x._base16To36)(P(L).substring(2)).toUpperCase();V.length<30;)V="0"+V;return"XE"+I("XE00"+V)+V},O.isAddress=function(L){try{return P(L),!0}catch{}return!1};var d=E(908),x=E(34952),f=E(64642),T=E(55265),g=E(64327),b=E(88222),l=new g.Logger(b.version);function h(L){(0,d.isHexString)(L,20)||l.throwArgumentError("invalid address","address",L);for(var V=(L=L.toLowerCase()).substring(2).split(""),W=new Uint8Array(40),G=0;G<40;G++)W[G]=V[G].charCodeAt(0);for(var H=(0,d.arrayify)((0,f.keccak256)(W)),j=0;j<40;j+=2)H[j>>1]>>4>=8&&(V[j]=V[j].toUpperCase()),(15&H[j>>1])>=8&&(V[j+1]=V[j+1].toUpperCase());return"0x"+V.join("")}for(var u={},m=0;m<10;m++)u[String(m)]=String(m);for(var _=0;_<26;_++)u[String.fromCharCode(65+_)]=String(10+_);var w,S=Math.floor((w=9007199254740991,Math.log10?Math.log10(w):Math.log(w)/Math.LN10));function I(L){for(var V=(L=(L=L.toUpperCase()).substring(4)+L.substring(0,2)+"00").split("").map(function(H){return u[H]}).join("");V.length>=S;){var W=V.substring(0,S);V=parseInt(W,10)%97+V.substring(W.length)}for(var G=String(98-parseInt(V,10)%97);G.length<2;)G="0"+G;return G}function P(L){var V=null;if("string"!=typeof L&&l.throwArgumentError("invalid address","address",L),L.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==L.substring(0,2)&&(L="0x"+L),V=h(L),L.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&V!==L&&l.throwArgumentError("bad address checksum","address",L);else if(L.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(L.substring(2,4)!==I(L)&&l.throwArgumentError("bad icap checksum","address",L),V=(0,x._base36To16)(L.substring(4));V.length<40;)V="0"+V;V=h("0x"+V)}else l.throwArgumentError("invalid address","address",L);return V}},75798:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.decode=function(x){x=atob(x);for(var f=[],T=0;T{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"decode",{enumerable:!0,get:function(){return d.decode}}),Object.defineProperty(O,"encode",{enumerable:!0,get:function(){return d.encode}});var d=E(75798)},3042:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="bignumber/5.7.0"},1872:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.BigNumber=void 0,O._base16To36=function(W){return new h(W,16).toString(36)},O._base36To16=function(W){return new h(W,36).toString(16)},O.isBigNumberish=function(W){return null!=W&&(S.isBigNumber(W)||"number"==typeof W&&W%1==0||"string"==typeof W&&!!W.match(/^-?[0-9]+$/)||(0,g.isHexString)(W)||"bigint"==typeof W||(0,g.isBytes)(W))};var x=d(E(69721)),f=d(E(58985)),T=d(E(31734)),g=E(908),b=E(64327),l=E(3042),h=T.default.BN,u=new b.Logger(l.version),m={},_=9007199254740991,w=!1,S=function(){function W(G,H){(0,x.default)(this,W),G!==m&&u.throwError("cannot call constructor directly; use BigNumber.from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=H,this._isBigNumber=!0,Object.freeze(this)}return(0,f.default)(W,[{key:"fromTwos",value:function(G){return P(L(this).fromTwos(G))}},{key:"toTwos",value:function(G){return P(L(this).toTwos(G))}},{key:"abs",value:function(){return"-"===this._hex[0]?W.from(this._hex.substring(1)):this}},{key:"add",value:function(G){return P(L(this).add(L(G)))}},{key:"sub",value:function(G){return P(L(this).sub(L(G)))}},{key:"div",value:function(G){return W.from(G).isZero()&&V("division-by-zero","div"),P(L(this).div(L(G)))}},{key:"mul",value:function(G){return P(L(this).mul(L(G)))}},{key:"mod",value:function(G){var H=L(G);return H.isNeg()&&V("division-by-zero","mod"),P(L(this).umod(H))}},{key:"pow",value:function(G){var H=L(G);return H.isNeg()&&V("negative-power","pow"),P(L(this).pow(H))}},{key:"and",value:function(G){var H=L(G);return(this.isNegative()||H.isNeg())&&V("unbound-bitwise-result","and"),P(L(this).and(H))}},{key:"or",value:function(G){var H=L(G);return(this.isNegative()||H.isNeg())&&V("unbound-bitwise-result","or"),P(L(this).or(H))}},{key:"xor",value:function(G){var H=L(G);return(this.isNegative()||H.isNeg())&&V("unbound-bitwise-result","xor"),P(L(this).xor(H))}},{key:"mask",value:function(G){return(this.isNegative()||G<0)&&V("negative-width","mask"),P(L(this).maskn(G))}},{key:"shl",value:function(G){return(this.isNegative()||G<0)&&V("negative-width","shl"),P(L(this).shln(G))}},{key:"shr",value:function(G){return(this.isNegative()||G<0)&&V("negative-width","shr"),P(L(this).shrn(G))}},{key:"eq",value:function(G){return L(this).eq(L(G))}},{key:"lt",value:function(G){return L(this).lt(L(G))}},{key:"lte",value:function(G){return L(this).lte(L(G))}},{key:"gt",value:function(G){return L(this).gt(L(G))}},{key:"gte",value:function(G){return L(this).gte(L(G))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return L(this).isZero()}},{key:"toNumber",value:function(){try{return L(this).toNumber()}catch{V("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch{}return u.throwError("this platform does not support BigInt",b.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?w||(w=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):u.throwError(16===arguments[0]?"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()":"BigNumber.toString does not accept parameters",b.Logger.errors.UNEXPECTED_ARGUMENT,{})),L(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(G){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(G){if(G instanceof W)return G;if("string"==typeof G)return G.match(/^-?0x[0-9a-f]+$/i)?new W(m,I(G)):G.match(/^-?[0-9]+$/)?new W(m,I(new h(G))):u.throwArgumentError("invalid BigNumber string","value",G);if("number"==typeof G)return G%1&&V("underflow","BigNumber.from",G),(G>=_||G<=-_)&&V("overflow","BigNumber.from",G),W.from(String(G));var H=G;if("bigint"==typeof H)return W.from(H.toString());if((0,g.isBytes)(H))return W.from((0,g.hexlify)(H));if(H)if(H.toHexString){var j=H.toHexString();if("string"==typeof j)return W.from(j)}else{var K=H._hex;if(null==K&&"BigNumber"===H.type&&(K=H.hex),"string"==typeof K&&((0,g.isHexString)(K)||"-"===K[0]&&(0,g.isHexString)(K.substring(1))))return W.from(K)}return u.throwArgumentError("invalid BigNumber value","value",G)}},{key:"isBigNumber",value:function(G){return!(!G||!G._isBigNumber)}}]),W}();function I(W){if("string"!=typeof W)return I(W.toString(16));if("-"===W[0])return"-"===(W=W.substring(1))[0]&&u.throwArgumentError("invalid hex","value",W),"0x00"===(W=I(W))?W:"-"+W;if("0x"!==W.substring(0,2)&&(W="0x"+W),"0x"===W)return"0x00";for(W.length%2&&(W="0x0"+W.substring(2));W.length>4&&"0x00"===W.substring(0,4);)W="0x"+W.substring(4);return W}function P(W){return S.from(I(W))}function L(W){var G=S.from(W).toHexString();return new h("-"===G[0]?"-"+G.substring(3):G.substring(2),16)}function V(W,G,H){var j={fault:W,operation:G};return null!=H&&(j.value=H),u.throwError(W,b.Logger.errors.NUMERIC_FAULT,j)}O.BigNumber=S},68390:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.FixedNumber=O.FixedFormat=void 0,O.formatFixed=L,O.parseFixed=V;var x=d(E(3355)),f=d(E(69721)),T=d(E(58985)),g=E(908),b=E(64327),l=E(3042),h=E(1872),u=new b.Logger(l.version),m={},_=h.BigNumber.from(0),w=h.BigNumber.from(-1);function S(K,R,o,y){var M={fault:R,operation:o};return void 0!==y&&(M.value=y),u.throwError(K,b.Logger.errors.NUMERIC_FAULT,M)}for(var I="0";I.length<256;)I+=I;function P(K){if("number"!=typeof K)try{K=h.BigNumber.from(K).toNumber()}catch{}return"number"==typeof K&&K>=0&&K<=256&&!(K%1)?"1"+I.substring(0,K):u.throwArgumentError("invalid decimal size","decimals",K)}function L(K,R){null==R&&(R=0);var o=P(R),y=(K=h.BigNumber.from(K)).lt(_);y&&(K=K.mul(w));for(var M=K.mod(o).toString();M.length2&&u.throwArgumentError("too many decimal points","value",K);var v=M[0],k=M[1];for(v||(v="0"),k||(k="0");"0"===k[k.length-1];)k=k.substring(0,k.length-1);for(k.length>o.length-1&&S("fractional component exceeds decimals","underflow","parseFixed"),""===k&&(k="0");k.length80&&u.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",M),new K(m,o,y,M)}}]),K}();O.FixedFormat=W;var G=function(){function K(R,o,y,M){(0,f.default)(this,K),R!==m&&u.throwError("cannot use FixedNumber constructor; use FixedNumber.from",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=M,this._hex=o,this._value=y,this._isFixedNumber=!0,Object.freeze(this)}return(0,T.default)(K,[{key:"_checkFormat",value:function(R){this.format.name!==R.format.name&&u.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",R)}},{key:"addUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.add(y),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.sub(y),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.mul(y).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(R){this._checkFormat(R);var o=V(this._value,this.format.decimals),y=V(R._value,R.format.decimals);return K.fromValue(o.mul(this.format._multiplier).div(y),this.format.decimals,this.format)}},{key:"floor",value:function(){var R=this.toString().split(".");1===R.length&&R.push("0");var o=K.from(R[0],this.format),y=!R[1].match(/^(0*)$/);return this.isNegative()&&y&&(o=o.subUnsafe(H.toFormat(o.format))),o}},{key:"ceiling",value:function(){var R=this.toString().split(".");1===R.length&&R.push("0");var o=K.from(R[0],this.format),y=!R[1].match(/^(0*)$/);return!this.isNegative()&&y&&(o=o.addUnsafe(H.toFormat(o.format))),o}},{key:"round",value:function(R){null==R&&(R=0);var o=this.toString().split(".");if(1===o.length&&o.push("0"),(R<0||R>80||R%1)&&u.throwArgumentError("invalid decimal count","decimals",R),o[1].length<=R)return this;var y=K.from("1"+I.substring(0,R),this.format),M=j.toFormat(this.format);return this.mulUnsafe(y).addUnsafe(M).floor().divUnsafe(y)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(R){if(null==R)return this._hex;R%8&&u.throwArgumentError("invalid byte width","width",R);var o=h.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(R).toHexString();return(0,g.hexZeroPad)(o,R/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(R){return K.fromString(this._value,R)}}],[{key:"fromValue",value:function(R,o,y){return null!=y||null==o||(0,h.isBigNumberish)(o)||(y=o,o=null),null==o&&(o=0),null==y&&(y="fixed"),K.fromString(L(R,o),W.from(y))}},{key:"fromString",value:function(R,o){null==o&&(o="fixed");var y=W.from(o),M=V(R,y.decimals);!y.signed&&M.lt(_)&&S("unsigned value cannot be negative","overflow","value",R);var v=null;y.signed?v=M.toTwos(y.width).toHexString():(v=M.toHexString(),v=(0,g.hexZeroPad)(v,y.width/8));var k=L(M,y.decimals);return new K(m,v,k,y)}},{key:"fromBytes",value:function(R,o){null==o&&(o="fixed");var y=W.from(o);if((0,g.arrayify)(R).length>y.width/8)throw new Error("overflow");var M=h.BigNumber.from(R);y.signed&&(M=M.fromTwos(y.width));var v=M.toTwos((y.signed?0:1)+y.width).toHexString(),k=L(M,y.decimals);return new K(m,v,k,y)}},{key:"from",value:function(R,o){if("string"==typeof R)return K.fromString(R,o);if((0,g.isBytes)(R))return K.fromBytes(R,o);try{return K.fromValue(R,0,o)}catch(y){if(y.code!==b.Logger.errors.INVALID_ARGUMENT)throw y}return u.throwArgumentError("invalid FixedNumber value","value",R)}},{key:"isFixedNumber",value:function(R){return!(!R||!R._isFixedNumber)}}]),K}();O.FixedNumber=G;var H=G.from(1),j=G.from("0.5")},34952:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"BigNumber",{enumerable:!0,get:function(){return d.BigNumber}}),Object.defineProperty(O,"FixedFormat",{enumerable:!0,get:function(){return x.FixedFormat}}),Object.defineProperty(O,"FixedNumber",{enumerable:!0,get:function(){return x.FixedNumber}}),Object.defineProperty(O,"_base16To36",{enumerable:!0,get:function(){return d._base16To36}}),Object.defineProperty(O,"_base36To16",{enumerable:!0,get:function(){return d._base36To16}}),Object.defineProperty(O,"formatFixed",{enumerable:!0,get:function(){return x.formatFixed}}),Object.defineProperty(O,"parseFixed",{enumerable:!0,get:function(){return x.parseFixed}});var d=E(1872),x=E(68390)},8729:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="bytes/5.7.0"},908:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.arrayify=u,O.concat=m,O.hexConcat=function(W){var G="0x";return W.forEach(function(H){G+=I(H).substring(2)}),G},O.hexDataLength=function(W){if("string"!=typeof W)W=I(W);else if(!w(W)||W.length%2)return null;return(W.length-2)/2},O.hexDataSlice=function(W,G,H){return"string"!=typeof W?W=I(W):(!w(W)||W.length%2)&&f.throwArgumentError("invalid hexData","value",W),G=2+2*G,null!=H?"0x"+W.substring(G,2+2*H):"0x"+W.substring(G)},O.hexStripZeros=P,O.hexValue=function(W){var G=P(I(W,{hexPad:"left"}));return"0x"===G?"0x0":G},O.hexZeroPad=L,O.hexlify=I,O.isBytes=h,O.isBytesLike=b,O.isHexString=w,O.joinSignature=function(W){return I(m([(W=V(W)).r,W.s,W.recoveryParam?"0x1c":"0x1b"]))},O.splitSignature=V,O.stripZeros=function(W){var G=u(W);if(0===G.length)return G;for(var H=0;H=256)return!1}return!0}function u(W,G){if(G||(G={}),"number"==typeof W){f.checkSafeUint53(W,"invalid arrayify value");for(var H=[];W;)H.unshift(255&W),W=parseInt(String(W/256));return 0===H.length&&H.push(0),g(new Uint8Array(H))}if(G.allowMissingPrefix&&"string"==typeof W&&"0x"!==W.substring(0,2)&&(W="0x"+W),T(W)&&(W=W.toHexString()),w(W)){var j=W.substring(2);j.length%2&&("left"===G.hexPad?j="0"+j:"right"===G.hexPad?j+="0":f.throwArgumentError("hex data is odd-length","value",W));for(var K=[],R=0;RG&&f.throwArgumentError("value out of range","value",arguments[0]);var H=new Uint8Array(G);return H.set(W,G-W.length),g(H)}function w(W,G){return!("string"!=typeof W||!W.match(/^0x[0-9A-Fa-f]*$/)||G&&W.length!==2+2*G)}var S="0123456789abcdef";function I(W,G){if(G||(G={}),"number"==typeof W){f.checkSafeUint53(W,"invalid hexlify value");for(var H="";W;)H=S[15&W]+H,W=Math.floor(W/16);return H.length?(H.length%2&&(H="0"+H),"0x"+H):"0x00"}if("bigint"==typeof W)return(W=W.toString(16)).length%2?"0x0"+W:"0x"+W;if(G.allowMissingPrefix&&"string"==typeof W&&"0x"!==W.substring(0,2)&&(W="0x"+W),T(W))return W.toHexString();if(w(W))return W.length%2&&("left"===G.hexPad?W="0x0"+W.substring(2):"right"===G.hexPad?W+="0":f.throwArgumentError("hex data is odd-length","value",W)),W.toLowerCase();if(h(W)){for(var j="0x",K=0;K>4]+S[15&R]}return j}return f.throwArgumentError("invalid hexlify value","value",W)}function P(W){"string"!=typeof W&&(W=I(W)),w(W)||f.throwArgumentError("invalid hex string","value",W),W=W.substring(2);for(var G=0;G2*G+2&&f.throwArgumentError("value out of range","value",arguments[1]);W.length<2*G+2;)W="0x0"+W.substring(2);return W}function V(W){var G={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(b(W)){var H=u(W);64===H.length?(G.v=27+(H[32]>>7),H[32]&=127,G.r=I(H.slice(0,32)),G.s=I(H.slice(32,64))):65===H.length?(G.r=I(H.slice(0,32)),G.s=I(H.slice(32,64)),G.v=H[64]):f.throwArgumentError("invalid signature string","signature",W),G.v<27&&(0===G.v||1===G.v?G.v+=27:f.throwArgumentError("signature invalid v byte","signature",W)),G.recoveryParam=1-G.v%2,G.recoveryParam&&(H[32]|=128),G._vs=I(H.slice(32,64))}else{if(G.r=W.r,G.s=W.s,G.v=W.v,G.recoveryParam=W.recoveryParam,G._vs=W._vs,null!=G._vs){var j=_(u(G._vs),32);G._vs=I(j);var K=j[0]>=128?1:0;null==G.recoveryParam?G.recoveryParam=K:G.recoveryParam!==K&&f.throwArgumentError("signature recoveryParam mismatch _vs","signature",W),j[0]&=127;var R=I(j);null==G.s?G.s=R:G.s!==R&&f.throwArgumentError("signature v mismatch _vs","signature",W)}null==G.recoveryParam?null==G.v?f.throwArgumentError("signature missing v and recoveryParam","signature",W):G.recoveryParam=0===G.v||1===G.v?G.v:1-G.v%2:null==G.v?G.v=27+G.recoveryParam:G.recoveryParam!==(0===G.v||1===G.v?G.v:1-G.v%2)&&f.throwArgumentError("signature recoveryParam mismatch v","signature",W),null!=G.r&&w(G.r)?G.r=L(G.r,32):f.throwArgumentError("signature missing or invalid r","signature",W),null!=G.s&&w(G.s)?G.s=L(G.s,32):f.throwArgumentError("signature missing or invalid s","signature",W);var y=u(G.s);y[0]>=128&&f.throwArgumentError("signature s out of range","signature",W),G.recoveryParam&&(y[0]|=128);var M=I(y);G._vs&&(w(G._vs)||f.throwArgumentError("signature invalid _vs","signature",W),G._vs=L(G._vs,32)),null==G._vs?G._vs=M:G._vs!==M&&f.throwArgumentError("signature _vs mismatch v and s","signature",W)}return G.yParityAndS=G._vs,G.compact=G.r+G.yParityAndS.substring(2),G}},48721:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.AddressZero=void 0,O.AddressZero="0x0000000000000000000000000000000000000000"},22997:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.Zero=O.WeiPerEther=O.Two=O.One=O.NegativeOne=O.MinInt256=O.MaxUint256=O.MaxInt256=void 0;var d=E(34952),x=d.BigNumber.from(-1);O.NegativeOne=x;var f=d.BigNumber.from(0);O.Zero=f;var T=d.BigNumber.from(1);O.One=T;var g=d.BigNumber.from(2);O.Two=g;var b=d.BigNumber.from("1000000000000000000");O.WeiPerEther=b;var l=d.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");O.MaxUint256=l;var h=d.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");O.MinInt256=h;var u=d.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");O.MaxInt256=u},90396:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.HashZero=void 0,O.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},5465:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"AddressZero",{enumerable:!0,get:function(){return d.AddressZero}}),Object.defineProperty(O,"EtherSymbol",{enumerable:!0,get:function(){return T.EtherSymbol}}),Object.defineProperty(O,"HashZero",{enumerable:!0,get:function(){return f.HashZero}}),Object.defineProperty(O,"MaxInt256",{enumerable:!0,get:function(){return x.MaxInt256}}),Object.defineProperty(O,"MaxUint256",{enumerable:!0,get:function(){return x.MaxUint256}}),Object.defineProperty(O,"MinInt256",{enumerable:!0,get:function(){return x.MinInt256}}),Object.defineProperty(O,"NegativeOne",{enumerable:!0,get:function(){return x.NegativeOne}}),Object.defineProperty(O,"One",{enumerable:!0,get:function(){return x.One}}),Object.defineProperty(O,"Two",{enumerable:!0,get:function(){return x.Two}}),Object.defineProperty(O,"WeiPerEther",{enumerable:!0,get:function(){return x.WeiPerEther}}),Object.defineProperty(O,"Zero",{enumerable:!0,get:function(){return x.Zero}});var d=E(48721),x=E(22997),f=E(90396),T=E(68347)},68347:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.EtherSymbol=void 0,O.EtherSymbol="\u039e"},33989:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="hash/5.7.0"},33731:(q,O)=>{"use strict";function E(_,w){null==w&&(w=1);var S=[],I=S.forEach;return function P(L,V){I.call(L,function(W){V>0&&Array.isArray(W)?P(W,V-1):S.push(W)})}(_,w),S}function d(_){var w=0;function S(){return _[w++]<<8|_[w++]}for(var I=S(),P=1,L=[0,1],V=1;V>--H&1}for(var R=Math.pow(2,31),o=R>>>1,y=o>>1,M=R-1,v=0,k=0;k<31;k++)v=v<<1|K();for(var D=[],N=0,C=R;;){for(var a=Math.floor(((v-N+1)*P-1)/C),B=0,Q=I;Q-B>1;){var ee=B+Q>>>1;a>>1|K(),ce=ce<<1^o,ue=(ue^o)<<1|o|1;N=ce,C=1+ue-ce}var we=I-4;return D.map(function(ae){switch(ae-we){case 3:return we+65792+(_[G++]<<16|_[G++]<<8|_[G++]);case 2:return we+256+(_[G++]<<8|_[G++]);case 1:return we+_[G++];default:return ae-1}})}function x(_){var w=0;return function(){return _[w++]}}function f(_){return 1&_?~_>>1:_>>1}function T(_,w){for(var S=Array(_),I=0,P=-1;I<_;I++)S[I]=P+=1+w();return S}function g(_,w){for(var S=Array(_),I=0,P=0;I<_;I++)S[I]=P+=f(w());return S}function b(_,w){for(var S=T(_(),_),I=_(),P=T(I,_),L=function(G,H){for(var j=Array(G),K=0;K>=1),check:2==L}}()},O.read_mapped_map=function(_){for(var w=[];;){var S=_();if(0==S)break;w.push(u(S,_))}for(;;){var I=_()-1;if(I<0)break;w.push(m(I,_))}return function(P){for(var L={},V=0;V{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.getData=function(){return(0,x.read_compressed_payload)((0,d.decode)("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=="))};var d=E(80997),x=E(33731)},17032:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.ens_normalize=function(W){return L(function(G,H){for(var j=I(G).reverse(),K=[];j.length;){var R=V(j);if(R)K.push.apply(K,(0,x.default)(H(R)));else{var o=j.pop();if(h.has(o))K.push(o);else if(!u.has(o)){var y=m[o];if(!y)throw new Error("Disallowed codepoint: 0x".concat(o.toString(16).toUpperCase()));K.push.apply(K,(0,x.default)(y))}}}return L(String.fromCodePoint.apply(String,K).normalize("NFC"))}(W,P))},O.ens_normalize_post_check=L;var x=d(E(93106)),f=E(78627),T=E(63961),g=E(33731);function b(W,G){(null==G||G>W.length)&&(G=W.length);for(var H=0,j=new Array(G);H=o.length?{done:!0}:{done:!1,value:o[v++]}},e:function(a){throw a},f:k}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var D,N=!0,C=!1;return{s:function(){M=M.call(o)},n:function(){var a=M.next();return N=a.done,a},e:function(a){C=!0,D=a},f:function(){try{N||null==M.return||M.return()}finally{if(C)throw D}}}}(W.split("."));try{for(H.s();!(G=H.n()).done;){var j=G.value,K=I(j);try{for(var R=K.lastIndexOf(95)-1;R>=0;R--)if(95!==K[R])throw new Error("underscore only allowed at start");if(K.length>=4&&K.every(function(o){return o<128})&&45===K[2]&&45===K[3])throw new Error("invalid label extension")}catch(o){throw new Error('Invalid label "'.concat(j,'": ').concat(o.message))}}}catch(o){H.e(o)}finally{H.f()}return W}function V(W,G){var H,j,K,R=_,o=[],y=W.length;G&&(G.length=0);for(var M=function(){var v=W[--y];if(!(R=null===(H=R.branches.find(function(k){return k.set.has(v)}))||void 0===H?void 0:H.node))return"break";if(R.save)K=v;else if(R.check&&v===K)return"break";o.push(v),R.fe0f&&(o.push(65039),y>0&&65039==W[y-1]&&y--),R.valid&&(j=o.slice(),2==R.valid&&j.splice(1,1),G&&G.push.apply(G,(0,x.default)(W.slice(y).reverse())),W.length=y)};y&&"break"!==M(););return j}},57901:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.id=function(f){return(0,d.keccak256)((0,x.toUtf8Bytes)(f))};var d=E(64642),x=E(78627)},37515:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"_TypedDataEncoder",{enumerable:!0,get:function(){return T.TypedDataEncoder}}),Object.defineProperty(O,"dnsEncode",{enumerable:!0,get:function(){return x.dnsEncode}}),Object.defineProperty(O,"ensNormalize",{enumerable:!0,get:function(){return x.ensNormalize}}),Object.defineProperty(O,"hashMessage",{enumerable:!0,get:function(){return f.hashMessage}}),Object.defineProperty(O,"id",{enumerable:!0,get:function(){return d.id}}),Object.defineProperty(O,"isValidName",{enumerable:!0,get:function(){return x.isValidName}}),Object.defineProperty(O,"messagePrefix",{enumerable:!0,get:function(){return f.messagePrefix}}),Object.defineProperty(O,"namehash",{enumerable:!0,get:function(){return x.namehash}});var d=E(57901),x=E(84898),f=E(34443),T=E(12171)},34443:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.hashMessage=function(g){return"string"==typeof g&&(g=(0,f.toUtf8Bytes)(g)),(0,x.keccak256)((0,d.concat)([(0,f.toUtf8Bytes)(T),(0,f.toUtf8Bytes)(String(g.length)),g]))},O.messagePrefix=void 0;var d=E(908),x=E(64642),f=E(78627),T="\x19Ethereum Signed Message:\n";O.messagePrefix=T},84898:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.dnsEncode=function(_){return(0,d.hexlify)((0,d.concat)(m(_).map(function(w){if(w.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var S=new Uint8Array(w.length+1);return S.set(w,1),S[0]=S.length-1,S})))+"00"},O.ensNormalize=function(_){return m(_).map(function(w){return(0,x.toUtf8String)(w)}).join(".")},O.isValidName=function(_){try{return 0!==m(_).length}catch{}return!1},O.namehash=function(_){"string"!=typeof _&&l.throwArgumentError("invalid ENS name; not a string","name",_);for(var w=h,S=m(_);S.length;)w=(0,f.keccak256)((0,d.concat)([w,(0,f.keccak256)(S.pop())]));return(0,d.hexlify)(w)};var d=E(908),x=E(78627),f=E(64642),T=E(64327),g=E(33989),b=E(17032),l=new T.Logger(g.version),h=new Uint8Array(32);function u(_){if(0===_.length)throw new Error("invalid ENS name; empty component");return _}function m(_){var w=(0,x.toUtf8Bytes)((0,b.ens_normalize)(_)),S=[];if(0===_.length)return S;for(var I=0,P=0;P=w.length)throw new Error("invalid ENS name; empty component");return S.push(u(w.slice(I))),S}h.fill(0)},12171:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.TypedDataEncoder=void 0;var x=d(E(82247)),f=d(E(69721)),T=d(E(58985)),g=E(77921),b=E(34952),l=E(908),h=E(64642),u=E(23694),m=E(64327),_=E(33989),w=E(57901),S=new m.Logger(_.version),I=new Uint8Array(32);I.fill(0);var P=b.BigNumber.from(-1),L=b.BigNumber.from(0),V=b.BigNumber.from(1),W=b.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),G=(0,l.hexZeroPad)(V.toHexString(),32),H=(0,l.hexZeroPad)(L.toHexString(),32),j={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},K=["name","version","chainId","verifyingContract","salt"];function R(k){return function(D){return"string"!=typeof D&&S.throwArgumentError("invalid domain value for ".concat(JSON.stringify(k)),"domain.".concat(k),D),D}}var o={name:R("name"),version:R("version"),chainId:function(k){try{return b.BigNumber.from(k).toString()}catch{}return S.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",k)},verifyingContract:function(k){try{return(0,g.getAddress)(k).toLowerCase()}catch{}return S.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",k)},salt:function(k){try{var D=(0,l.arrayify)(k);if(32!==D.length)throw new Error("bad length");return(0,l.hexlify)(D)}catch{}return S.throwArgumentError('invalid domain value "salt"',"domain.salt",k)}};function y(k){var D=k.match(/^(u?)int(\d*)$/);if(D){var N=""===D[1],C=parseInt(D[2]||"256");(C%8!=0||C>256||D[2]&&D[2]!==String(C))&&S.throwArgumentError("invalid numeric width","type",k);var a=W.mask(N?C-1:C),B=N?a.add(V).mul(P):L;return function(ce){var ue=b.BigNumber.from(ce);return(ue.lt(B)||ue.gt(a))&&S.throwArgumentError("value out-of-bounds for ".concat(k),"value",ce),(0,l.hexZeroPad)(ue.toTwos(256).toHexString(),32)}}var Q=k.match(/^bytes(\d+)$/);if(Q){var ee=parseInt(Q[1]);return(0===ee||ee>32||Q[1]!==String(ee))&&S.throwArgumentError("invalid bytes width","type",k),function(ce){return(0,l.arrayify)(ce).length!==ee&&S.throwArgumentError("invalid length for ".concat(k),"value",ce),(ae=(we=(0,l.arrayify)(ce)).length%32)?(0,l.hexConcat)([we,I.slice(ae)]):(0,l.hexlify)(we);var we,ae}}switch(k){case"address":return function(ce){return(0,l.hexZeroPad)((0,g.getAddress)(ce),32)};case"bool":return function(ce){return ce?G:H};case"bytes":return function(ce){return(0,h.keccak256)(ce)};case"string":return function(ce){return(0,w.id)(ce)}}return null}function M(k,D){return"".concat(k,"(").concat(D.map(function(N){return N.type+" "+N.name}).join(","),")")}var v=function(){function k(D){(0,f.default)(this,k),(0,u.defineReadOnly)(this,"types",Object.freeze((0,u.deepCopy)(D))),(0,u.defineReadOnly)(this,"_encoderCache",{}),(0,u.defineReadOnly)(this,"_types",{});var N={},C={},a={};Object.keys(D).forEach(function(we){N[we]={},C[we]=[],a[we]={}});var B=function(we){var ae={};D[we].forEach(function(Te){ae[Te.name]&&S.throwArgumentError("duplicate variable name ".concat(JSON.stringify(Te.name)," in ").concat(JSON.stringify(we)),"types",D),ae[Te.name]=!0;var le=Te.type.match(/^([^\x5b]*)(\x5b|$)/)[1];le===we&&S.throwArgumentError("circular type reference to ".concat(JSON.stringify(le)),"types",D),y(le)||(C[le]||S.throwArgumentError("unknown type ".concat(JSON.stringify(le)),"types",D),C[le].push(we),N[we][le]=!0)})};for(var Q in D)B(Q);var ee=Object.keys(C).filter(function(we){return 0===C[we].length});for(var ce in 0===ee.length?S.throwArgumentError("missing primary type","types",D):ee.length>1&&S.throwArgumentError("ambiguous primary types or unused types: ".concat(ee.map(function(we){return JSON.stringify(we)}).join(", ")),"types",D),(0,u.defineReadOnly)(this,"primaryType",ee[0]),function we(ae,Te){Te[ae]&&S.throwArgumentError("circular type reference to ".concat(JSON.stringify(ae)),"types",D),Te[ae]=!0,Object.keys(N[ae]).forEach(function(le){C[le]&&(we(le,Te),Object.keys(Te).forEach(function(X){a[X][le]=!0}))}),delete Te[ae]}(this.primaryType,{}),a){var ue=Object.keys(a[ce]);ue.sort(),this._types[ce]=M(ce,D[ce])+ue.map(function(we){return M(we,D[we])}).join("")}}return(0,T.default)(k,[{key:"getEncoder",value:function(D){var N=this._encoderCache[D];return N||(N=this._encoderCache[D]=this._getEncoder(D)),N}},{key:"_getEncoder",value:function(D){var N=this,C=y(D);if(C)return C;var a=D.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){var B=a[1],Q=this.getEncoder(B),ee=parseInt(a[3]);return function(we){ee>=0&&we.length!==ee&&S.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",we);var ae=we.map(Q);return N._types[B]&&(ae=ae.map(h.keccak256)),(0,h.keccak256)((0,l.hexConcat)(ae))}}var ce=this.types[D];if(ce){var ue=(0,w.id)(this._types[D]);return function(we){var ae=ce.map(function(Te){var le=Te.name,X=Te.type,ne=N.getEncoder(X)(we[le]);return N._types[X]?(0,h.keccak256)(ne):ne});return ae.unshift(ue),(0,l.hexConcat)(ae)}}return S.throwArgumentError("unknown type: ".concat(D),"type",D)}},{key:"encodeType",value:function(D){var N=this._types[D];return N||S.throwArgumentError("unknown type: ".concat(JSON.stringify(D)),"name",D),N}},{key:"encodeData",value:function(D,N){return this.getEncoder(D)(N)}},{key:"hashStruct",value:function(D,N){return(0,h.keccak256)(this.encodeData(D,N))}},{key:"encode",value:function(D){return this.encodeData(this.primaryType,D)}},{key:"hash",value:function(D){return this.hashStruct(this.primaryType,D)}},{key:"_visit",value:function(D,N,C){var a=this;if(y(D))return C(D,N);var B=D.match(/^(.*)(\x5b(\d*)\x5d)$/);if(B){var Q=B[1],ee=parseInt(B[3]);return ee>=0&&N.length!==ee&&S.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",N),N.map(function(ue){return a._visit(Q,ue,C)})}var ce=this.types[D];return ce?ce.reduce(function(ue,we){var ae=we.name;return ue[ae]=a._visit(we.type,N[ae],C),ue},{}):S.throwArgumentError("unknown type: ".concat(D),"type",D)}},{key:"visit",value:function(D,N){return this._visit(this.primaryType,D,N)}}],[{key:"from",value:function(D){return new k(D)}},{key:"getPrimaryType",value:function(D){return k.from(D).primaryType}},{key:"hashStruct",value:function(D,N,C){return k.from(N).hashStruct(D,C)}},{key:"hashDomain",value:function(D){var N=[];for(var C in D){var a=j[C];a||S.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(C)),"domain",D),N.push({name:C,type:a})}return N.sort(function(B,Q){return K.indexOf(B.name)-K.indexOf(Q.name)}),k.hashStruct("EIP712Domain",{EIP712Domain:N},D)}},{key:"encode",value:function(D,N,C){return(0,l.hexConcat)(["0x1901",k.hashDomain(D),k.from(N).hash(C)])}},{key:"hash",value:function(D,N,C){return(0,h.keccak256)(k.encode(D,N,C))}},{key:"resolveNames",value:function(D,N,C,a){return B=this,ee=void 0,ce=x.default.mark(function ue(){var we,ae,Te;return x.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:D=(0,u.shallowCopy)(D),we={},D.verifyingContract&&!(0,l.isHexString)(D.verifyingContract,20)&&(we[D.verifyingContract]="0x"),(ae=k.from(N)).visit(C,function(X,ne){return"address"!==X||(0,l.isHexString)(ne,20)||(we[ne]="0x"),ne}),le.t0=x.default.keys(we);case 6:if((le.t1=le.t0()).done){le.next=13;break}return Te=le.t1.value,le.next=10,a(Te);case 10:we[Te]=le.sent,le.next=6;break;case 13:return D.verifyingContract&&we[D.verifyingContract]&&(D.verifyingContract=we[D.verifyingContract]),C=ae.visit(C,function(X,ne){return"address"===X&&we[ne]?we[ne]:ne}),le.abrupt("return",{domain:D,value:C});case 16:case"end":return le.stop()}},ue)}),new(ee||(ee=Promise))(function(ue,we){function ae(X){try{le(ce.next(X))}catch(ne){we(ne)}}function Te(X){try{le(ce.throw(X))}catch(ne){we(ne)}}function le(X){var ne;X.done?ue(X.value):(ne=X.value,ne instanceof ee?ne:new ee(function(pe){pe(ne)})).then(ae,Te)}le((ce=ce.apply(B,[])).next())});var B,ee,ce}},{key:"getPayload",value:function(D,N,C){k.hashDomain(D);var a={},B=[];K.forEach(function(ce){var ue=D[ce];null!=ue&&(a[ce]=o[ce](ue),B.push({name:ce,type:j[ce]}))});var Q=k.from(N),ee=(0,u.shallowCopy)(N);return ee.EIP712Domain?S.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",N):ee.EIP712Domain=B,Q.encode(C),{types:ee,domain:a,primaryType:Q.primaryType,message:Q.visit(C,function(ce,ue){if(ce.match(/^bytes(\d*)/))return(0,l.hexlify)((0,l.arrayify)(ue));if(ce.match(/^u?int/))return b.BigNumber.from(ue).toString();switch(ce){case"address":return ue.toLowerCase();case"bool":return!!ue;case"string":return"string"!=typeof ue&&S.throwArgumentError("invalid string","value",ue),ue}return S.throwArgumentError("unsupported type","type",ce)})}}}]),k}();O.TypedDataEncoder=v},64642:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.keccak256=function(T){return"0x"+x.default.keccak_256((0,f.arrayify)(T))};var x=d(E(95975)),f=E(908)},95975:(q,O,E)=>{"use strict";q=E.nmd(q);var d,x=E(19142),f=E(28847)(E(3355));!function(){var T="input is invalid type",g="object"===("undefined"==typeof window?"undefined":(0,f.default)(window)),b=g?window:{};b.JS_SHA3_NO_WINDOW&&(g=!1);var l=!g&&"object"===("undefined"==typeof self?"undefined":(0,f.default)(self));!b.JS_SHA3_NO_NODE_JS&&"object"===(void 0===x?"undefined":(0,f.default)(x))&&x.versions&&x.versions.node?b=E.g:l&&(b=self);var h=!b.JS_SHA3_NO_COMMON_JS&&"object"===(0,f.default)(q)&&q.exports,u=E.amdO,m=!b.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,_="0123456789abcdef".split(""),w=[4,1024,262144,67108864],S=[0,8,16,24],I=[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],P=[224,256,384,512],L=[128,256],V=["hex","buffer","arrayBuffer","array","digest"],W={128:168,256:136};!b.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(ue){return"[object Array]"===Object.prototype.toString.call(ue)}),!m||!b.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(ue){return"object"===(0,f.default)(ue)&&ue.buffer&&ue.buffer.constructor===ArrayBuffer});for(var G=function(ue,we,ae){return function(Te){return new Q(ue,we,ue).update(Te)[ae]()}},H=function(ue,we,ae){return function(Te,le){return new Q(ue,we,le).update(Te)[ae]()}},j=function(ue,we,ae){return function(Te,le,X,ne){return M["cshake"+ue].update(Te,le,X,ne)[ae]()}},K=function(ue,we,ae){return function(Te,le,X,ne){return M["kmac"+ue].update(Te,le,X,ne)[ae]()}},R=function(ue,we,ae,Te){for(var le=0;le>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(31&ae)>>3;for(var Te=0;Te<50;++Te)this.s[Te]=0}function ee(ue,we,ae){Q.call(this,ue,we,ae)}Q.prototype.update=function(ue){if(this.finalized)throw new Error("finalize already called");var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}for(var Te,le,X=this.blocks,ne=this.byteCount,pe=ue.length,_e=this.blockCount,xe=0,Ce=this.s;xe>2]|=ue[xe]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|63&le)<=57344?(X[Te>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<=ne){for(this.start=Te-ne,this.block=X[_e],Te=0;Te<_e;++Te)Ce[Te]^=X[Te];ce(Ce),this.reset=!0}else this.start=Te}return this},Q.prototype.encode=function(ue,we){var ae=255&ue,Te=1,le=[ae];for(ae=255&(ue>>=8);ae>0;)le.unshift(ae),ae=255&(ue>>=8),++Te;return we?le.push(Te):le.unshift(Te),this.update(le),le.length},Q.prototype.encodeString=function(ue){var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}var Te=0;if(we)Te=ue.length;else for(var X=0;X=57344?Te+=3:(ne=65536+((1023&ne)<<10|1023&ue.charCodeAt(++X)),Te+=4)}return Te+=this.encode(8*Te),this.update(ue),Te},Q.prototype.bytepad=function(ue,we){for(var ae=this.encode(we),Te=0;Te>2]|=this.padding[3&we],this.lastByteIndex===this.byteCount)for(ue[0]=ue[ae],we=1;we>4&15]+_[15&ue]+_[ue>>12&15]+_[ue>>8&15]+_[ue>>20&15]+_[ue>>16&15]+_[ue>>28&15]+_[ue>>24&15];ne%we==0&&(ce(ae),X=0)}return le&&(pe+=_[(ue=ae[X])>>4&15]+_[15&ue],le>1&&(pe+=_[ue>>12&15]+_[ue>>8&15]),le>2&&(pe+=_[ue>>20&15]+_[ue>>16&15])),pe},Q.prototype.buffer=Q.prototype.arrayBuffer=function(){this.finalize();var ue,we=this.blockCount,ae=this.s,Te=this.outputBlocks,le=this.extraBytes,X=0,ne=0,pe=this.outputBits>>3;ue=le?new ArrayBuffer(Te+1<<2):new ArrayBuffer(pe);for(var _e=new Uint32Array(ue);ne>8&255,_e[ue+2]=we>>16&255,_e[ue+3]=we>>24&255;pe%ae==0&&ce(Te)}return X&&(_e[ue=pe<<2]=255&(we=Te[ne]),X>1&&(_e[ue+1]=we>>8&255),X>2&&(_e[ue+2]=we>>16&255)),_e},(ee.prototype=new Q).finalize=function(){return this.encode(this.outputBits,!0),Q.prototype.finalize.call(this)};var ce=function(ue){var we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Jr,Ln,Bn,Wr,zn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn,Qn,Vi,ar,br,ki,ur,mr,Fr,hi,wi,cs,$i,rs,Xi;for(Te=0;Te<48;Te+=2)le=ue[0]^ue[10]^ue[20]^ue[30]^ue[40],X=ue[1]^ue[11]^ue[21]^ue[31]^ue[41],_e=ue[4]^ue[14]^ue[24]^ue[34]^ue[44],xe=ue[5]^ue[15]^ue[25]^ue[35]^ue[45],Ce=ue[6]^ue[16]^ue[26]^ue[36]^ue[46],ke=ue[7]^ue[17]^ue[27]^ue[37]^ue[47],we=(me=ue[8]^ue[18]^ue[28]^ue[38]^ue[48])^((ne=ue[2]^ue[12]^ue[22]^ue[32]^ue[42])<<1|(pe=ue[3]^ue[13]^ue[23]^ue[33]^ue[43])>>>31),ae=(Ee=ue[9]^ue[19]^ue[29]^ue[39]^ue[49])^(pe<<1|ne>>>31),ue[0]^=we,ue[1]^=ae,ue[10]^=we,ue[11]^=ae,ue[20]^=we,ue[21]^=ae,ue[30]^=we,ue[31]^=ae,ue[40]^=we,ue[41]^=ae,ae=X^(xe<<1|_e>>>31),ue[2]^=we=le^(_e<<1|xe>>>31),ue[3]^=ae,ue[12]^=we,ue[13]^=ae,ue[22]^=we,ue[23]^=ae,ue[32]^=we,ue[33]^=ae,ue[42]^=we,ue[43]^=ae,ae=pe^(ke<<1|Ce>>>31),ue[4]^=we=ne^(Ce<<1|ke>>>31),ue[5]^=ae,ue[14]^=we,ue[15]^=ae,ue[24]^=we,ue[25]^=ae,ue[34]^=we,ue[35]^=ae,ue[44]^=we,ue[45]^=ae,ae=xe^(Ee<<1|me>>>31),ue[6]^=we=_e^(me<<1|Ee>>>31),ue[7]^=ae,ue[16]^=we,ue[17]^=ae,ue[26]^=we,ue[27]^=ae,ue[36]^=we,ue[37]^=ae,ue[46]^=we,ue[47]^=ae,ae=ke^(X<<1|le>>>31),ue[8]^=we=Ce^(le<<1|X>>>31),ue[9]^=ae,ue[18]^=we,ue[19]^=ae,ue[28]^=we,ue[29]^=ae,ue[38]^=we,ue[39]^=ae,ue[48]^=we,ue[49]^=ae,Ve=ue[1],Un=ue[11]<<4|ue[10]>>>28,ir=ue[10]<<4|ue[11]>>>28,Nt=ue[20]<<3|ue[21]>>>29,It=ue[21]<<3|ue[20]>>>29,cs=ue[31]<<9|ue[30]>>>23,$i=ue[30]<<9|ue[31]>>>23,Lr=ue[40]<<18|ue[41]>>>14,Kn=ue[41]<<18|ue[40]>>>14,fn=ue[2]<<1|ue[3]>>>31,$n=ue[3]<<1|ue[2]>>>31,tt=ue[12]<<12|ue[13]>>>20,ts=ue[22]<<10|ue[23]>>>22,Tn=ue[23]<<10|ue[22]>>>22,qt=ue[33]<<13|ue[32]>>>19,jt=ue[32]<<13|ue[33]>>>19,rs=ue[42]<<2|ue[43]>>>30,Xi=ue[43]<<2|ue[42]>>>30,ki=ue[5]<<30|ue[4]>>>2,ur=ue[4]<<30|ue[5]>>>2,Jr=ue[14]<<6|ue[15]>>>26,Ln=ue[15]<<6|ue[14]>>>26,ht=ue[24]<<11|ue[25]>>>21,Qn=ue[34]<<15|ue[35]>>>17,Vi=ue[35]<<15|ue[34]>>>17,Yt=ue[45]<<29|ue[44]>>>3,Wn=ue[44]<<29|ue[45]>>>3,gt=ue[6]<<28|ue[7]>>>4,St=ue[7]<<28|ue[6]>>>4,mr=ue[17]<<23|ue[16]>>>9,Fr=ue[16]<<23|ue[17]>>>9,Bn=ue[26]<<25|ue[27]>>>7,Wr=ue[27]<<25|ue[26]>>>7,wt=ue[36]<<21|ue[37]>>>11,Pt=ue[37]<<21|ue[36]>>>11,ar=ue[47]<<24|ue[46]>>>8,br=ue[46]<<24|ue[47]>>>8,sr=ue[8]<<27|ue[9]>>>5,Ii=ue[9]<<27|ue[8]>>>5,Wt=ue[18]<<20|ue[19]>>>12,dn=ue[19]<<20|ue[18]>>>12,hi=ue[29]<<7|ue[28]>>>25,wi=ue[28]<<7|ue[29]>>>25,zn=ue[38]<<8|ue[39]>>>24,bn=ue[39]<<8|ue[38]>>>24,st=ue[48]<<14|ue[49]>>>18,Ye=ue[49]<<14|ue[48]>>>18,ue[0]=(ze=ue[0])^~(nt=ue[13]<<12|ue[12]>>>20)&(mt=ue[25]<<11|ue[24]>>>21),ue[1]=Ve^~tt&ht,ue[10]=gt^~Wt&Nt,ue[11]=St^~dn&It,ue[20]=fn^~Jr&Bn,ue[21]=$n^~Ln&Wr,ue[30]=sr^~Un&ts,ue[31]=Ii^~ir&Tn,ue[40]=ki^~mr&hi,ue[41]=ur^~Fr&wi,ue[2]=nt^~mt&wt,ue[3]=tt^~ht&Pt,ue[12]=Wt^~Nt&qt,ue[13]=dn^~It&jt,ue[22]=Jr^~Bn&zn,ue[23]=Ln^~Wr&bn,ue[32]=Un^~ts&Qn,ue[33]=ir^~Tn&Vi,ue[42]=mr^~hi&cs,ue[43]=Fr^~wi&$i,ue[4]=mt^~wt&st,ue[5]=ht^~Pt&Ye,ue[14]=Nt^~qt&Yt,ue[15]=It^~jt&Wn,ue[24]=Bn^~zn&Lr,ue[25]=Wr^~bn&Kn,ue[34]=ts^~Qn&ar,ue[35]=Tn^~Vi&br,ue[44]=hi^~cs&rs,ue[45]=wi^~$i&Xi,ue[6]=wt^~st&ze,ue[7]=Pt^~Ye&Ve,ue[16]=qt^~Yt>,ue[17]=jt^~Wn&St,ue[26]=zn^~Lr&fn,ue[27]=bn^~Kn&$n,ue[36]=Qn^~ar&sr,ue[37]=Vi^~br&Ii,ue[46]=cs^~rs&ki,ue[47]=$i^~Xi&ur,ue[8]=st^~ze&nt,ue[9]=Ye^~Ve&tt,ue[18]=Yt^~gt&Wt,ue[19]=Wn^~St&dn,ue[28]=Lr^~fn&Jr,ue[29]=Kn^~$n&Ln,ue[38]=ar^~sr&Un,ue[39]=br^~Ii&ir,ue[48]=rs^~ki&mr,ue[49]=Xi^~ur&Fr,ue[0]^=I[Te],ue[1]^=I[Te+1]};if(h)q.exports=M;else{for(k=0;k{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="logger/5.7.0"},64327:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.Logger=O.LogLevel=O.ErrorCode=void 0;var x,f,P,T=d(E(69721)),g=d(E(58985)),b=E(37252),l=!1,h=!1,u={debug:1,default:2,info:2,warning:3,error:4,off:5},m=u.default,_=null,w=function(){try{var P=[];if(["NFD","NFC","NFKD","NFKC"].forEach(function(L){try{if("test"!=="test".normalize(L))throw new Error("bad normalize")}catch{P.push(L)}}),P.length)throw new Error("missing "+P.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(L){return L.message}return null}();O.LogLevel=x,(P=x||(O.LogLevel=x={})).DEBUG="DEBUG",P.INFO="INFO",P.WARNING="WARNING",P.ERROR="ERROR",P.OFF="OFF",O.ErrorCode=f,function(P){P.UNKNOWN_ERROR="UNKNOWN_ERROR",P.NOT_IMPLEMENTED="NOT_IMPLEMENTED",P.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",P.NETWORK_ERROR="NETWORK_ERROR",P.SERVER_ERROR="SERVER_ERROR",P.TIMEOUT="TIMEOUT",P.BUFFER_OVERRUN="BUFFER_OVERRUN",P.NUMERIC_FAULT="NUMERIC_FAULT",P.MISSING_NEW="MISSING_NEW",P.INVALID_ARGUMENT="INVALID_ARGUMENT",P.MISSING_ARGUMENT="MISSING_ARGUMENT",P.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",P.CALL_EXCEPTION="CALL_EXCEPTION",P.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",P.NONCE_EXPIRED="NONCE_EXPIRED",P.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",P.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",P.TRANSACTION_REPLACED="TRANSACTION_REPLACED",P.ACTION_REJECTED="ACTION_REJECTED"}(f||(O.ErrorCode=f={}));var S="0123456789abcdef",I=function(){function P(L){(0,T.default)(this,P),Object.defineProperty(this,"version",{enumerable:!0,value:L,writable:!1})}return(0,g.default)(P,[{key:"_log",value:function(L,V){var W=L.toLowerCase();null==u[W]&&this.throwArgumentError("invalid log level name","logLevel",L),m>u[W]||console.log.apply(console,V)}},{key:"debug",value:function(){for(var L=arguments.length,V=new Array(L),W=0;W>4],M+=S[15&y[v]];G.push(o+"=Uint8Array(0x"+M+")")}else G.push(o+"="+JSON.stringify(y))}catch{G.push(o+"="+JSON.stringify(W[o].toString()))}}),G.push("code=".concat(V)),G.push("version=".concat(this.version));var H=L,j="";switch(V){case f.NUMERIC_FAULT:j="NUMERIC_FAULT";var K=L;switch(K){case"overflow":case"underflow":case"division-by-zero":j+="-"+K;break;case"negative-power":case"negative-width":j+="-unsupported";break;case"unbound-bitwise-result":j+="-unbound-result"}break;case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:j=V}j&&(L+=" [ See: https://links.ethers.org/v5-errors-"+j+" ]"),G.length&&(L+=" ("+G.join(", ")+")");var R=new Error(L);return R.reason=H,R.code=V,Object.keys(W).forEach(function(o){R[o]=W[o]}),R}},{key:"throwError",value:function(L,V,W){throw this.makeError(L,V,W)}},{key:"throwArgumentError",value:function(L,V,W){return this.throwError(L,P.errors.INVALID_ARGUMENT,{argument:V,value:W})}},{key:"assert",value:function(L,V,W,G){L||this.throwError(V,W,G)}},{key:"assertArgument",value:function(L,V,W,G){L||this.throwArgumentError(V,W,G)}},{key:"checkNormalize",value:function(L){null==L&&(L="platform missing String.prototype.normalize"),w&&this.throwError("platform missing String.prototype.normalize",P.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:w})}},{key:"checkSafeUint53",value:function(L,V){"number"==typeof L&&(null==V&&(V="value not safe"),(L<0||L>=9007199254740991)&&this.throwError(V,P.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:L}),L%1&&this.throwError(V,P.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:L}))}},{key:"checkArgumentCount",value:function(L,V,W){W=W?": "+W:"",LV&&this.throwError("too many arguments"+W,P.errors.UNEXPECTED_ARGUMENT,{count:L,expectedCount:V})}},{key:"checkNew",value:function(L,V){L!==Object&&null!=L||this.throwError("missing new",P.errors.MISSING_NEW,{name:V.name})}},{key:"checkAbstract",value:function(L,V){L===V?this.throwError("cannot instantiate abstract class "+JSON.stringify(V.name)+" directly; use a sub-class",P.errors.UNSUPPORTED_OPERATION,{name:L.name,operation:"new"}):L!==Object&&null!=L||this.throwError("missing new",P.errors.MISSING_NEW,{name:V.name})}}],[{key:"globalLogger",value:function(){return _||(_=new P(b.version)),_}},{key:"setCensorship",value:function(L,V){if(!L&&V&&this.globalLogger().throwError("cannot permanently disable censorship",P.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),l){if(!L)return;this.globalLogger().throwError("error censorship permanent",P.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}h=!!L,l=!!V}},{key:"setLogLevel",value:function(L){var V=u[L.toLowerCase()];null!=V?m=V:P.globalLogger().warn("invalid log level - "+L)}},{key:"from",value:function(L){return new P(L)}}]),P}();O.Logger=I,I.errors=f,I.levels=x},64071:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="properties/5.7.0"},23694:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.Description=void 0,O.checkProperties=function(L,V){L&&"object"===(0,g.default)(L)||u.throwArgumentError("invalid object","object",L),Object.keys(L).forEach(function(W){V[W]||u.throwArgumentError("invalid object key - "+W,"transaction:"+W,L)})},O.deepCopy=I,O.defineReadOnly=m,O.getStatic=function(L,V){for(var W=0;W<32;W++){if(L[V])return L[V];if(!L.prototype||"object"!==(0,g.default)(L.prototype))break;L=Object.getPrototypeOf(L.prototype).constructor}return null},O.resolveProperties=function(L){return h(this,void 0,void 0,x.default.mark(function V(){var W;return x.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return W=Object.keys(L).map(function(j){return Promise.resolve(L[j]).then(function(R){return{key:j,value:R}})}),H.next=3,Promise.all(W);case 3:return H.abrupt("return",H.sent.reduce(function(j,K){return j[K.key]=K.value,j},{}));case 5:case"end":return H.stop()}},V)}))},O.shallowCopy=function(L){var V={};for(var W in L)V[W]=L[W];return V};var x=d(E(82247)),f=d(E(58985)),T=d(E(69721)),g=d(E(3355)),b=E(64327),l=E(64071),h=function(L,V,W,G){return new(W||(W=Promise))(function(H,j){function K(y){try{o(G.next(y))}catch(M){j(M)}}function R(y){try{o(G.throw(y))}catch(M){j(M)}}function o(y){var M;y.done?H(y.value):(M=y.value,M instanceof W?M:new W(function(v){v(M)})).then(K,R)}o((G=G.apply(L,V||[])).next())})},u=new b.Logger(l.version);function m(L,V,W){Object.defineProperty(L,V,{enumerable:!0,value:W,writable:!1})}var _={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function w(L){if(null==L||_[(0,g.default)(L)])return!0;if(Array.isArray(L)||"object"===(0,g.default)(L)){if(!Object.isFrozen(L))return!1;for(var V=Object.keys(L),W=0;W{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="rlp/5.7.0"},55265:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.decode=function(m){var _=(0,d.arrayify)(m),w=u(_,0);return w.consumed!==_.length&&T.throwArgumentError("invalid rlp data","data",m),w.result},O.encode=function(m){return(0,d.hexlify)(l(m))};var d=E(908),x=E(64327),f=E(61466),T=new x.Logger(f.version);function g(m){for(var _=[];m;)_.unshift(255&m),m>>=8;return _}function b(m,_,w){for(var S=0,I=0;I_+1+S&&T.throwError("child data too short",x.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+S,result:I}}function u(m,_){if(0===m.length&&T.throwError("data too short",x.Logger.errors.BUFFER_OVERRUN,{}),m[_]>=248){var w=m[_]-247;_+1+w>m.length&&T.throwError("data short segment too short",x.Logger.errors.BUFFER_OVERRUN,{});var S=b(m,_+1,w);return _+1+w+S>m.length&&T.throwError("data long segment too short",x.Logger.errors.BUFFER_OVERRUN,{}),h(m,_,_+1+w,w+S)}if(m[_]>=192){var I=m[_]-192;return _+1+I>m.length&&T.throwError("data array too short",x.Logger.errors.BUFFER_OVERRUN,{}),h(m,_,_+1,I)}if(m[_]>=184){var P=m[_]-183;_+1+P>m.length&&T.throwError("data array too short",x.Logger.errors.BUFFER_OVERRUN,{});var L=b(m,_+1,P);return _+1+P+L>m.length&&T.throwError("data array too short",x.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+P+L,result:(0,d.hexlify)(m.slice(_+1+P,_+1+P+L))}}if(m[_]>=128){var V=m[_]-128;return _+1+V>m.length&&T.throwError("data too short",x.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+V,result:(0,d.hexlify)(m.slice(_+1,_+1+V))}}return{consumed:1,result:(0,d.hexlify)(m[_])}}},48100:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="signing-key/5.7.0"},36918:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.EC=void 0;var x=d(E(3355)),f=d(E(31734)),T=d(E(37198));function g(X,ne,pe){return X(pe={path:ne,exports:{},require:function(_e,xe){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},pe.exports),pe.exports}var b=l;function l(X,ne){if(!X)throw new Error(ne||"Assertion failed")}l.equal=function(X,ne,pe){if(X!=ne)throw new Error(pe||"Assertion failed: "+X+" != "+ne)};var h=g(function(X,ne){var pe=ne;function _e(Ce){return 1===Ce.length?"0"+Ce:Ce}function xe(Ce){for(var ke="",me=0;me>8,nt=255&ze;Ve?me.push(Ve,nt):me.push(nt)}return me},pe.zero2=_e,pe.toHex=xe,pe.encode=function(Ce,ke){return"hex"===ke?xe(Ce):Ce}}),u=g(function(X,ne){var pe=ne;pe.assert=b,pe.toArray=h.toArray,pe.zero2=h.zero2,pe.toHex=h.toHex,pe.encode=h.encode,pe.getNAF=function(_e,xe,Ce){var ke=new Array(Math.max(_e.bitLength(),Ce)+1);ke.fill(0);for(var me=1<(me>>1)-1?(me>>1)-nt:nt):Ve=0,ke[ze]=Ve,Ee.iushrn(1)}return ke},pe.getJSF=function(_e,xe){var Ce=[[],[]];_e=_e.clone(),xe=xe.clone();for(var ke,me=0,Ee=0;_e.cmpn(-me)>0||xe.cmpn(-Ee)>0;){var ze,Ve,nt=_e.andln(3)+me&3,tt=xe.andln(3)+Ee&3;3===nt&&(nt=-1),3===tt&&(tt=-1),ze=0==(1&nt)?0:3!=(ke=_e.andln(7)+me&7)&&5!==ke||2!==tt?nt:-nt,Ce[0].push(ze),Ve=0==(1&tt)?0:3!=(ke=xe.andln(7)+Ee&7)&&5!==ke||2!==nt?tt:-tt,Ce[1].push(Ve),2*me===ze+1&&(me=1-me),2*Ee===Ve+1&&(Ee=1-Ee),_e.iushrn(1),xe.iushrn(1)}return Ce},pe.cachedProperty=function(_e,xe,Ce){var ke="_"+xe;_e.prototype[xe]=function(){return void 0!==this[ke]?this[ke]:this[ke]=Ce.call(this)}},pe.parseBytes=function(_e){return"string"==typeof _e?pe.toArray(_e,"hex"):_e},pe.intFromLE=function(_e){return new f.default(_e,"hex","le")}}),m=u.getNAF,_=u.getJSF,w=u.assert;function S(X,ne){this.type=X,this.p=new f.default(ne.p,16),this.red=ne.prime?f.default.red(ne.prime):f.default.mont(this.p),this.zero=new f.default(0).toRed(this.red),this.one=new f.default(1).toRed(this.red),this.two=new f.default(2).toRed(this.red),this.n=ne.n&&new f.default(ne.n,16),this.g=ne.g&&this.pointFromJSON(ne.g,ne.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var pe=this.n&&this.p.div(this.n);!pe||pe.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var I=S;function P(X,ne){this.curve=X,this.type=ne,this.precomputed=null}S.prototype.point=function(){throw new Error("Not implemented")},S.prototype.validate=function(){throw new Error("Not implemented")},S.prototype._fixedNafMul=function(X,ne){w(X.precomputed);var pe=X._getDoubles(),_e=m(ne,1,this._bitLength),xe=(1<=Ce;Ee--)ke=(ke<<1)+_e[Ee];me.push(ke)}for(var ze=this.jpoint(null,null,null),Ve=this.jpoint(null,null,null),nt=xe;nt>0;nt--){for(Ce=0;Ce=0;me--){for(var Ee=0;me>=0&&0===Ce[me];me--)Ee++;if(me>=0&&Ee++,ke=ke.dblp(Ee),me<0)break;var ze=Ce[me];w(0!==ze),ke="affine"===X.type?ke.mixedAdd(ze>0?xe[ze-1>>1]:xe[-ze-1>>1].neg()):ke.add(ze>0?xe[ze-1>>1]:xe[-ze-1>>1].neg())}return"affine"===X.type?ke.toP():ke},S.prototype._wnafMulAdd=function(X,ne,pe,_e,xe){var Ce,ke,me,Ee=this._wnafT1,ze=this._wnafT2,Ve=this._wnafT3,nt=0;for(Ce=0;Ce<_e;Ce++){var tt=(me=ne[Ce])._getNAFPoints(X);Ee[Ce]=tt.wnd,ze[Ce]=tt.points}for(Ce=_e-1;Ce>=1;Ce-=2){var mt=Ce-1,ht=Ce;if(1===Ee[mt]&&1===Ee[ht]){var wt=[ne[mt],null,null,ne[ht]];0===ne[mt].y.cmp(ne[ht].y)?(wt[1]=ne[mt].add(ne[ht]),wt[2]=ne[mt].toJ().mixedAdd(ne[ht].neg())):0===ne[mt].y.cmp(ne[ht].y.redNeg())?(wt[1]=ne[mt].toJ().mixedAdd(ne[ht]),wt[2]=ne[mt].add(ne[ht].neg())):(wt[1]=ne[mt].toJ().mixedAdd(ne[ht]),wt[2]=ne[mt].toJ().mixedAdd(ne[ht].neg()));var Pt=[-3,-1,-5,-7,0,7,5,1,3],st=_(pe[mt],pe[ht]);for(nt=Math.max(st[0].length,nt),Ve[mt]=new Array(nt),Ve[ht]=new Array(nt),ke=0;ke=0;Ce--){for(var dn=0;Ce>=0;){var Nt=!0;for(ke=0;ke<_e;ke++)Wt[ke]=0|Ve[ke][Ce],0!==Wt[ke]&&(Nt=!1);if(!Nt)break;dn++,Ce--}if(Ce>=0&&dn++,St=St.dblp(dn),Ce<0)break;for(ke=0;ke<_e;ke++){var It=Wt[ke];0!==It&&(It>0?me=ze[ke][It-1>>1]:It<0&&(me=ze[ke][-It-1>>1].neg()),St="affine"===me.type?St.mixedAdd(me):St.add(me))}}for(Ce=0;Ce<_e;Ce++)ze[Ce]=null;return xe?St:St.toP()},S.BasePoint=P,P.prototype.eq=function(){throw new Error("Not implemented")},P.prototype.validate=function(){return this.curve.validate(this)},S.prototype.decodePoint=function(X,ne){X=u.toArray(X,ne);var pe=this.p.byteLength();if((4===X[0]||6===X[0]||7===X[0])&&X.length-1==2*pe)return 6===X[0]?w(X[X.length-1]%2==0):7===X[0]&&w(X[X.length-1]%2==1),this.point(X.slice(1,1+pe),X.slice(1+pe,1+2*pe));if((2===X[0]||3===X[0])&&X.length-1===pe)return this.pointFromX(X.slice(1,1+pe),3===X[0]);throw new Error("Unknown point format")},P.prototype.encodeCompressed=function(X){return this.encode(X,!0)},P.prototype._encode=function(X){var ne=this.curve.p.byteLength(),pe=this.getX().toArray("be",ne);return X?[this.getY().isEven()?2:3].concat(pe):[4].concat(pe,this.getY().toArray("be",ne))},P.prototype.encode=function(X,ne){return u.encode(this._encode(ne),X)},P.prototype.precompute=function(X){if(this.precomputed)return this;var ne={doubles:null,naf:null,beta:null};return ne.naf=this._getNAFPoints(8),ne.doubles=this._getDoubles(4,X),ne.beta=this._getBeta(),this.precomputed=ne,this},P.prototype._hasDoubles=function(X){if(!this.precomputed)return!1;var ne=this.precomputed.doubles;return!!ne&&ne.points.length>=Math.ceil((X.bitLength()+1)/ne.step)},P.prototype._getDoubles=function(X,ne){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var pe=[this],_e=this,xe=0;xe=0&&(Ce=ne,ke=pe),_e.negative&&(_e=_e.neg(),xe=xe.neg()),Ce.negative&&(Ce=Ce.neg(),ke=ke.neg()),[{a:_e,b:xe},{a:Ce,b:ke}]},W.prototype._endoSplit=function(X){var ne=this.endo.basis,pe=ne[0],_e=ne[1],xe=_e.b.mul(X).divRound(this.n),Ce=pe.b.neg().mul(X).divRound(this.n),ke=xe.mul(pe.a),me=Ce.mul(_e.a),Ee=xe.mul(pe.b),ze=Ce.mul(_e.b);return{k1:X.sub(ke).sub(me),k2:Ee.add(ze).neg()}},W.prototype.pointFromX=function(X,ne){(X=new f.default(X,16)).red||(X=X.toRed(this.red));var pe=X.redSqr().redMul(X).redIAdd(X.redMul(this.a)).redIAdd(this.b),_e=pe.redSqrt();if(0!==_e.redSqr().redSub(pe).cmp(this.zero))throw new Error("invalid point");var xe=_e.fromRed().isOdd();return(ne&&!xe||!ne&&xe)&&(_e=_e.redNeg()),this.point(X,_e)},W.prototype.validate=function(X){if(X.inf)return!0;var ne=X.x,pe=X.y,_e=this.a.redMul(ne),xe=ne.redSqr().redMul(ne).redIAdd(_e).redIAdd(this.b);return 0===pe.redSqr().redISub(xe).cmpn(0)},W.prototype._endoWnafMulAdd=function(X,ne,pe){for(var _e=this._endoWnafT1,xe=this._endoWnafT2,Ce=0;Ce":""},H.prototype.isInfinity=function(){return this.inf},H.prototype.add=function(X){if(this.inf)return X;if(X.inf)return this;if(this.eq(X))return this.dbl();if(this.neg().eq(X))return this.curve.point(null,null);if(0===this.x.cmp(X.x))return this.curve.point(null,null);var ne=this.y.redSub(X.y);0!==ne.cmpn(0)&&(ne=ne.redMul(this.x.redSub(X.x).redInvm()));var pe=ne.redSqr().redISub(this.x).redISub(X.x),_e=ne.redMul(this.x.redSub(pe)).redISub(this.y);return this.curve.point(pe,_e)},H.prototype.dbl=function(){if(this.inf)return this;var X=this.y.redAdd(this.y);if(0===X.cmpn(0))return this.curve.point(null,null);var ne=this.curve.a,pe=this.x.redSqr(),_e=X.redInvm(),xe=pe.redAdd(pe).redIAdd(pe).redIAdd(ne).redMul(_e),Ce=xe.redSqr().redISub(this.x.redAdd(this.x)),ke=xe.redMul(this.x.redSub(Ce)).redISub(this.y);return this.curve.point(Ce,ke)},H.prototype.getX=function(){return this.x.fromRed()},H.prototype.getY=function(){return this.y.fromRed()},H.prototype.mul=function(X){return X=new f.default(X,16),this.isInfinity()?this:this._hasDoubles(X)?this.curve._fixedNafMul(this,X):this.curve.endo?this.curve._endoWnafMulAdd([this],[X]):this.curve._wnafMul(this,X)},H.prototype.mulAdd=function(X,ne,pe){var _e=[this,ne],xe=[X,pe];return this.curve.endo?this.curve._endoWnafMulAdd(_e,xe):this.curve._wnafMulAdd(1,_e,xe,2)},H.prototype.jmulAdd=function(X,ne,pe){var _e=[this,ne],xe=[X,pe];return this.curve.endo?this.curve._endoWnafMulAdd(_e,xe,!0):this.curve._wnafMulAdd(1,_e,xe,2,!0)},H.prototype.eq=function(X){return this===X||this.inf===X.inf&&(this.inf||0===this.x.cmp(X.x)&&0===this.y.cmp(X.y))},H.prototype.neg=function(X){if(this.inf)return this;var ne=this.curve.point(this.x,this.y.redNeg());if(X&&this.precomputed){var pe=this.precomputed,_e=function(xe){return xe.neg()};ne.precomputed={naf:pe.naf&&{wnd:pe.naf.wnd,points:pe.naf.points.map(_e)},doubles:pe.doubles&&{step:pe.doubles.step,points:pe.doubles.points.map(_e)}}}return ne},H.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},L(j,I.BasePoint),W.prototype.jpoint=function(X,ne,pe){return new j(this,X,ne,pe)},j.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var X=this.z.redInvm(),ne=X.redSqr(),pe=this.x.redMul(ne),_e=this.y.redMul(ne).redMul(X);return this.curve.point(pe,_e)},j.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},j.prototype.add=function(X){if(this.isInfinity())return X;if(X.isInfinity())return this;var ne=X.z.redSqr(),pe=this.z.redSqr(),_e=this.x.redMul(ne),xe=X.x.redMul(pe),Ce=this.y.redMul(ne.redMul(X.z)),ke=X.y.redMul(pe.redMul(this.z)),me=_e.redSub(xe),Ee=Ce.redSub(ke);if(0===me.cmpn(0))return 0!==Ee.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ze=me.redSqr(),Ve=ze.redMul(me),nt=_e.redMul(ze),tt=Ee.redSqr().redIAdd(Ve).redISub(nt).redISub(nt),mt=Ee.redMul(nt.redISub(tt)).redISub(Ce.redMul(Ve)),ht=this.z.redMul(X.z).redMul(me);return this.curve.jpoint(tt,mt,ht)},j.prototype.mixedAdd=function(X){if(this.isInfinity())return X.toJ();if(X.isInfinity())return this;var ne=this.z.redSqr(),pe=this.x,_e=X.x.redMul(ne),xe=this.y,Ce=X.y.redMul(ne).redMul(this.z),ke=pe.redSub(_e),me=xe.redSub(Ce);if(0===ke.cmpn(0))return 0!==me.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var Ee=ke.redSqr(),ze=Ee.redMul(ke),Ve=pe.redMul(Ee),nt=me.redSqr().redIAdd(ze).redISub(Ve).redISub(Ve),tt=me.redMul(Ve.redISub(nt)).redISub(xe.redMul(ze)),mt=this.z.redMul(ke);return this.curve.jpoint(nt,tt,mt)},j.prototype.dblp=function(X){if(0===X)return this;if(this.isInfinity())return this;if(!X)return this.dbl();var ne;if(this.curve.zeroA||this.curve.threeA){var pe=this;for(ne=0;ne=0)return!1;if(pe.redIAdd(xe),0===this.x.cmp(pe))return!0}},j.prototype.inspect=function(){return this.isInfinity()?"":""},j.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var K=g(function(X,ne){var pe=ne;pe.base=I,pe.short=G,pe.mont=null,pe.edwards=null}),R=g(function(X,ne){var pe,_e=ne,xe=u.assert;function Ce(me){this.curve="short"===me.type?new K.short(me):"edwards"===me.type?new K.edwards(me):new K.mont(me),this.g=this.curve.g,this.n=this.curve.n,this.hash=me.hash,xe(this.g.validate(),"Invalid curve"),xe(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function ke(me,Ee){Object.defineProperty(_e,me,{configurable:!0,enumerable:!0,get:function(){var ze=new Ce(Ee);return Object.defineProperty(_e,me,{configurable:!0,enumerable:!0,value:ze}),ze}})}_e.PresetCurve=Ce,ke("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:T.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),ke("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:T.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),ke("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:T.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),ke("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:T.default.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"]}),ke("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:T.default.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"]}),ke("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:T.default.sha256,gRed:!1,g:["9"]}),ke("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:T.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pe=null.crash()}catch{pe=void 0}ke("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:T.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pe]})});function o(X){if(!(this instanceof o))return new o(X);this.hash=X.hash,this.predResist=!!X.predResist,this.outLen=this.hash.outSize,this.minEntropy=X.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var ne=h.toArray(X.entropy,X.entropyEnc||"hex"),pe=h.toArray(X.nonce,X.nonceEnc||"hex"),_e=h.toArray(X.pers,X.persEnc||"hex");b(ne.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(ne,pe,_e)}var y=o;o.prototype._init=function(X,ne,pe){var _e=X.concat(ne).concat(pe);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var xe=0;xe=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(X.concat(pe||[])),this._reseed=1},o.prototype.generate=function(X,ne,pe,_e){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof ne&&(_e=pe,pe=ne,ne=null),pe&&(pe=h.toArray(pe,_e||"hex"),this._update(pe));for(var xe=[];xe.length"};var D=u.assert;function N(X,ne){if(X instanceof N)return X;this._importDER(X,ne)||(D(X.r&&X.s,"Signature without r or s"),this.r=new f.default(X.r,16),this.s=new f.default(X.s,16),this.recoveryParam=void 0===X.recoveryParam?null:X.recoveryParam)}var C=N;function a(){this.place=0}function B(X,ne){var pe=X[ne.place++];if(!(128&pe))return pe;var _e=15&pe;if(0===_e||_e>4)return!1;for(var xe=0,Ce=0,ke=ne.place;Ce<_e;Ce++,ke++)xe<<=8,xe|=X[ke],xe>>>=0;return!(xe<=127)&&(ne.place=ke,xe)}function Q(X){for(var ne=0,pe=X.length-1;!X[ne]&&!(128&X[ne+1])&&ne>>3);for(X.push(128|pe);--pe;)X.push(ne>>>(pe<<3)&255);X.push(ne)}}N.prototype._importDER=function(X,ne){X=u.toArray(X,ne);var pe=new a;if(48!==X[pe.place++])return!1;var _e=B(X,pe);if(!1===_e||_e+pe.place!==X.length||2!==X[pe.place++])return!1;var xe=B(X,pe);if(!1===xe)return!1;var Ce=X.slice(pe.place,xe+pe.place);if(pe.place+=xe,2!==X[pe.place++])return!1;var ke=B(X,pe);if(!1===ke||X.length!==ke+pe.place)return!1;var me=X.slice(pe.place,ke+pe.place);if(0===Ce[0]){if(!(128&Ce[1]))return!1;Ce=Ce.slice(1)}if(0===me[0]){if(!(128&me[1]))return!1;me=me.slice(1)}return this.r=new f.default(Ce),this.s=new f.default(me),this.recoveryParam=null,!0},N.prototype.toDER=function(X){var ne=this.r.toArray(),pe=this.s.toArray();for(128&ne[0]&&(ne=[0].concat(ne)),128&pe[0]&&(pe=[0].concat(pe)),ne=Q(ne),pe=Q(pe);!(pe[0]||128&pe[1]);)pe=pe.slice(1);var _e=[2];ee(_e,ne.length),(_e=_e.concat(ne)).push(2),ee(_e,pe.length);var xe=_e.concat(pe),Ce=[48];return ee(Ce,xe.length),Ce=Ce.concat(xe),u.encode(Ce,X)};var ce=function(){throw new Error("unsupported")},ue=u.assert;function we(X){if(!(this instanceof we))return new we(X);"string"==typeof X&&(ue(Object.prototype.hasOwnProperty.call(R,X),"Unknown curve "+X),X=R[X]),X instanceof R.PresetCurve&&(X={curve:X}),this.curve=X.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=X.curve.g,this.g.precompute(X.curve.n.bitLength()+1),this.hash=X.hash||X.curve.hash}var ae=we;we.prototype.keyPair=function(X){return new k(this,X)},we.prototype.keyFromPrivate=function(X,ne){return k.fromPrivate(this,X,ne)},we.prototype.keyFromPublic=function(X,ne){return k.fromPublic(this,X,ne)},we.prototype.genKeyPair=function(X){X||(X={});for(var ne=new y({hash:this.hash,pers:X.pers,persEnc:X.persEnc||"utf8",entropy:X.entropy||ce(),entropyEnc:X.entropy&&X.entropyEnc||"utf8",nonce:this.n.toArray()}),pe=this.n.byteLength(),_e=this.n.sub(new f.default(2));;){var xe=new f.default(ne.generate(pe));if(!(xe.cmp(_e)>0))return xe.iaddn(1),this.keyFromPrivate(xe)}},we.prototype._truncateToN=function(X,ne){var pe=8*X.byteLength()-this.n.bitLength();return pe>0&&(X=X.ushrn(pe)),!ne&&X.cmp(this.n)>=0?X.sub(this.n):X},we.prototype.sign=function(X,ne,pe,_e){"object"===(0,x.default)(pe)&&(_e=pe,pe=null),_e||(_e={}),ne=this.keyFromPrivate(ne,pe),X=this._truncateToN(new f.default(X,16));for(var xe=this.n.byteLength(),Ce=ne.getPrivate().toArray("be",xe),ke=X.toArray("be",xe),me=new y({hash:this.hash,entropy:Ce,nonce:ke,pers:_e.pers,persEnc:_e.persEnc||"utf8"}),Ee=this.n.sub(new f.default(1)),ze=0;;ze++){var Ve=_e.k?_e.k(ze):new f.default(me.generate(this.n.byteLength()));if(!((Ve=this._truncateToN(Ve,!0)).cmpn(1)<=0||Ve.cmp(Ee)>=0)){var nt=this.g.mul(Ve);if(!nt.isInfinity()){var tt=nt.getX(),mt=tt.umod(this.n);if(0!==mt.cmpn(0)){var ht=Ve.invm(this.n).mul(mt.mul(ne.getPrivate()).iadd(X));if(0!==(ht=ht.umod(this.n)).cmpn(0)){var wt=(nt.getY().isOdd()?1:0)|(0!==tt.cmp(mt)?2:0);return _e.canonical&&ht.cmp(this.nh)>0&&(ht=this.n.sub(ht),wt^=1),new C({r:mt,s:ht,recoveryParam:wt})}}}}}},we.prototype.verify=function(X,ne,pe,_e){X=this._truncateToN(new f.default(X,16)),pe=this.keyFromPublic(pe,_e);var xe=(ne=new C(ne,"hex")).r,Ce=ne.s;if(xe.cmpn(1)<0||xe.cmp(this.n)>=0||Ce.cmpn(1)<0||Ce.cmp(this.n)>=0)return!1;var ke,me=Ce.invm(this.n),Ee=me.mul(X).umod(this.n),ze=me.mul(xe).umod(this.n);return this.curve._maxwellTrick?!(ke=this.g.jmulAdd(Ee,pe.getPublic(),ze)).isInfinity()&&ke.eqXToP(xe):!(ke=this.g.mulAdd(Ee,pe.getPublic(),ze)).isInfinity()&&0===ke.getX().umod(this.n).cmp(xe)},we.prototype.recoverPubKey=function(X,ne,pe,_e){ue((3&pe)===pe,"The recovery param is more than two bits"),ne=new C(ne,_e);var xe=this.n,Ce=new f.default(X),ke=ne.r,me=ne.s,Ee=1&pe,ze=pe>>1;if(ke.cmp(this.curve.p.umod(this.curve.n))>=0&&ze)throw new Error("Unable to find sencond key candinate");ke=this.curve.pointFromX(ze?ke.add(this.curve.n):ke,Ee);var Ve=ne.r.invm(xe),nt=xe.sub(Ce).mul(Ve).umod(xe),tt=me.mul(Ve).umod(xe);return this.g.mulAdd(nt,ke,tt)},we.prototype.getKeyRecoveryParam=function(X,ne,pe,_e){if(null!==(ne=new C(ne,_e)).recoveryParam)return ne.recoveryParam;for(var xe=0;xe<4;xe++){var Ce;try{Ce=this.recoverPubKey(X,ne,xe)}catch{continue}if(Ce.eq(pe))return xe}throw new Error("Unable to find valid recovery factor")};var Te=g(function(X,ne){var pe=ne;pe.version="6.5.4",pe.utils=u,pe.rand=function(){throw new Error("unsupported")},pe.curve=K,pe.curves=R,pe.ec=ae,pe.eddsa=null});O.EC=Te.ec},17612:(q,O,E)=>{"use strict";var d=E(28847);Object.defineProperty(O,"__esModule",{value:!0}),O.SigningKey=void 0,O.computePublicKey=S,O.recoverPublicKey=function(I,P){var L=(0,g.splitSignature)(P),V={r:(0,g.arrayify)(L.r),s:(0,g.arrayify)(L.s)};return"0x"+_().recoverPubKey((0,g.arrayify)(I),V,L.recoveryParam).encode("hex",!1)};var x=d(E(69721)),f=d(E(58985)),T=E(36918),g=E(908),b=E(23694),l=E(64327),h=E(48100),u=new l.Logger(h.version),m=null;function _(){return m||(m=new T.EC("secp256k1")),m}var w=function(){function I(P){(0,x.default)(this,I),(0,b.defineReadOnly)(this,"curve","secp256k1"),(0,b.defineReadOnly)(this,"privateKey",(0,g.hexlify)(P)),32!==(0,g.hexDataLength)(this.privateKey)&&u.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var L=_().keyFromPrivate((0,g.arrayify)(this.privateKey));(0,b.defineReadOnly)(this,"publicKey","0x"+L.getPublic(!1,"hex")),(0,b.defineReadOnly)(this,"compressedPublicKey","0x"+L.getPublic(!0,"hex")),(0,b.defineReadOnly)(this,"_isSigningKey",!0)}return(0,f.default)(I,[{key:"_addPoint",value:function(P){var L=_().keyFromPublic((0,g.arrayify)(this.publicKey)),V=_().keyFromPublic((0,g.arrayify)(P));return"0x"+L.pub.add(V.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(P){var L=_().keyFromPrivate((0,g.arrayify)(this.privateKey)),V=(0,g.arrayify)(P);32!==V.length&&u.throwArgumentError("bad digest length","digest",P);var W=L.sign(V,{canonical:!0});return(0,g.splitSignature)({recoveryParam:W.recoveryParam,r:(0,g.hexZeroPad)("0x"+W.r.toString(16),32),s:(0,g.hexZeroPad)("0x"+W.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(P){var L=_().keyFromPrivate((0,g.arrayify)(this.privateKey)),V=_().keyFromPublic((0,g.arrayify)(S(P)));return(0,g.hexZeroPad)("0x"+L.derive(V.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(P){return!(!P||!P._isSigningKey)}}]),I}();function S(I,P){var L=(0,g.arrayify)(I);if(32===L.length){var V=new w(L);return P?"0x"+_().keyFromPrivate(L).getPublic(!0,"hex"):V.publicKey}return 33===L.length?P?(0,g.hexlify)(L):"0x"+_().keyFromPublic(L).getPublic(!1,"hex"):65===L.length?P?"0x"+_().keyFromPublic(L).getPublic(!0,"hex"):(0,g.hexlify)(L):u.throwArgumentError("invalid public or private key","key","[REDACTED]")}O.SigningKey=w},56518:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="strings/5.7.0"},95856:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.formatBytes32String=function(T){var g=(0,f.toUtf8Bytes)(T);if(g.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,x.hexlify)((0,x.concat)([g,d.HashZero]).slice(0,32))},O.parseBytes32String=function(T){var g=(0,x.arrayify)(T);if(32!==g.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==g[31])throw new Error("invalid bytes32 string - no null terminator");for(var b=31;0===g[b-1];)b--;return(0,f.toUtf8String)(g.slice(0,b))};var d=E(5465),x=E(908),f=E(34997)},68645:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O._nameprepTableA1=w,O._nameprepTableB2=S,O._nameprepTableC=I,O.nameprep=function(P){if(P.match(/^[a-z0-9-]*$/i)&&P.length<=59)return P.toLowerCase();var L,V=(0,d.toUtf8CodePoints)(P);L=V.map(function(G){return b.indexOf(G)>=0||G>=65024&&G<=65039?[]:S(G)||[G]}),V=L.reduce(function(G,H){return H.forEach(function(j){G.push(j)}),G},[]),(V=(0,d.toUtf8CodePoints)((0,d._toUtf8String)(V),d.UnicodeNormalizationForm.NFKC)).forEach(function(G){if(I(G))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),V.forEach(function(G){if(w(G))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});var W=(0,d._toUtf8String)(V);if("-"===W.substring(0,1)||"--"===W.substring(2,4)||"-"===W.substring(W.length-1))throw new Error("invalid hyphen");return W};var d=E(34997);function x(P,L){L||(L=function(G){return[parseInt(G,16)]});var V=0,W={};return P.split(",").forEach(function(G){var H=G.split(":");V+=parseInt(H[0],16),W[V]=L(H[1])}),W}function f(P){var L=0;return P.split(",").map(function(V){var W=V.split("-");return 1===W.length?W[1]="0":""===W[1]&&(W[1]="1"),{l:L+parseInt(W[0],16),h:L=parseInt(W[1],16)}})}function T(P,L){for(var V=0,W=0;W=(V+=G.l)&&P<=V+G.h&&(P-V)%(G.d||1)==0){if(G.e&&-1!==G.e.indexOf(P-V))continue;return G}}return null}var g=f("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),b="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function(P){return parseInt(P,16)}),l=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],h=x("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),u=x("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),m=x("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function(P){if(P.length%4!=0)throw new Error("bad data");for(var L=[],V=0;V{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return f.UnicodeNormalizationForm}}),Object.defineProperty(O,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return f.Utf8ErrorFuncs}}),Object.defineProperty(O,"Utf8ErrorReason",{enumerable:!0,get:function(){return f.Utf8ErrorReason}}),Object.defineProperty(O,"_toEscapedUtf8String",{enumerable:!0,get:function(){return f._toEscapedUtf8String}}),Object.defineProperty(O,"formatBytes32String",{enumerable:!0,get:function(){return d.formatBytes32String}}),Object.defineProperty(O,"nameprep",{enumerable:!0,get:function(){return x.nameprep}}),Object.defineProperty(O,"parseBytes32String",{enumerable:!0,get:function(){return d.parseBytes32String}}),Object.defineProperty(O,"toUtf8Bytes",{enumerable:!0,get:function(){return f.toUtf8Bytes}}),Object.defineProperty(O,"toUtf8CodePoints",{enumerable:!0,get:function(){return f.toUtf8CodePoints}}),Object.defineProperty(O,"toUtf8String",{enumerable:!0,get:function(){return f.toUtf8String}});var d=E(95856),x=E(68645),f=E(34997)},34997:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.Utf8ErrorReason=O.Utf8ErrorFuncs=O.UnicodeNormalizationForm=void 0,O._toEscapedUtf8String=function(S,I){return'"'+u(S,I).map(function(P){if(P<256){switch(P){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(P>=32&&P<127)return String.fromCharCode(P)}return P<=65535?_(P):_(55296+((P-=65536)>>10&1023))+_(56320+(1023&P))}).join("")+'"'},O._toUtf8String=w,O.toUtf8Bytes=m,O.toUtf8CodePoints=function(S){return u(m(S,arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.current))},O.toUtf8String=function(S,I){return w(u(S,I))};var d,x,S,f=E(908),T=E(64327),g=E(56518),b=new T.Logger(g.version);function l(S,I,P,L,V){if(S===x.BAD_PREFIX||S===x.UNEXPECTED_CONTINUE){for(var W=0,G=I+1;G>6==2;G++)W++;return W}return S===x.OVERRUN?P.length-I-1:0}O.UnicodeNormalizationForm=d,(S=d||(O.UnicodeNormalizationForm=d={})).current="",S.NFC="NFC",S.NFD="NFD",S.NFKC="NFKC",S.NFKD="NFKD",O.Utf8ErrorReason=x,function(S){S.UNEXPECTED_CONTINUE="unexpected continuation byte",S.BAD_PREFIX="bad codepoint prefix",S.OVERRUN="string overrun",S.MISSING_CONTINUE="missing continuation byte",S.OUT_OF_RANGE="out of UTF-8 range",S.UTF16_SURROGATE="UTF-16 surrogate",S.OVERLONG="overlong representation"}(x||(O.Utf8ErrorReason=x={}));var h=Object.freeze({error:function(S,I,P,L,V){return b.throwArgumentError("invalid codepoint at offset ".concat(I,"; ").concat(S),"bytes",P)},ignore:l,replace:function(S,I,P,L,V){return S===x.OVERLONG?(L.push(V),0):(L.push(65533),l(S,I,P))}});function u(S,I){null==I&&(I=h.error),S=(0,f.arrayify)(S);for(var P=[],L=0;L>7!=0){var W=null,G=null;if(192==(224&V))W=1,G=127;else if(224==(240&V))W=2,G=2047;else{if(240!=(248&V)){L+=I(128==(192&V)?x.UNEXPECTED_CONTINUE:x.BAD_PREFIX,L-1,S,P);continue}W=3,G=65535}if(L-1+W>=S.length)L+=I(x.OVERRUN,L-1,S,P);else{for(var H=V&(1<<8-W-1)-1,j=0;j1114111?L+=I(x.OUT_OF_RANGE,L-1-W,S,P,H):H>=55296&&H<=57343?L+=I(x.UTF16_SURROGATE,L-1-W,S,P,H):H<=G?L+=I(x.OVERLONG,L-1-W,S,P,H):P.push(H))}}else P.push(V)}return P}function m(S){var I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.current;I!=d.current&&(b.checkNormalize(),S=S.normalize(I));for(var P=[],L=0;L>6|192),P.push(63&V|128);else if(55296==(64512&V)){L++;var W=S.charCodeAt(L);if(L>=S.length||56320!=(64512&W))throw new Error("invalid utf-8 string");var G=65536+((1023&V)<<10)+(1023&W);P.push(G>>18|240),P.push(G>>12&63|128),P.push(G>>6&63|128),P.push(63&G|128)}else P.push(V>>12|224),P.push(V>>6&63|128),P.push(63&V|128)}return(0,f.arrayify)(P)}function _(S){var I="0000"+S.toString(16);return"\\u"+I.substring(I.length-4)}function w(S){return S.map(function(I){return I<=65535?String.fromCharCode(I):(I-=65536,String.fromCharCode(55296+(I>>10&1023),56320+(1023&I)))}).join("")}O.Utf8ErrorFuncs=h},96783:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.version=void 0,O.version="transactions/5.7.0"},21936:(q,O,E)=>{"use strict";var d=E(3355);Object.defineProperty(O,"__esModule",{value:!0}),O.TransactionTypes=void 0,O.accessListify=R,O.computeAddress=G,O.parse=function(k){var D=(0,T.arrayify)(k);if(D[0]>127)return function(N){var C=h.decode(N);9!==C.length&&6!==C.length&&I.throwArgumentError("invalid raw transaction","rawTransaction",N);var a={nonce:L(C[0]).toNumber(),gasPrice:L(C[1]),gasLimit:L(C[2]),to:P(C[3]),value:L(C[4]),data:C[5],chainId:0};if(6===C.length)return a;try{a.v=f.BigNumber.from(C[6]).toNumber()}catch{return a}if(a.r=(0,T.hexZeroPad)(C[7],32),a.s=(0,T.hexZeroPad)(C[8],32),f.BigNumber.from(a.r).isZero()&&f.BigNumber.from(a.s).isZero())a.chainId=a.v,a.v=0;else{a.chainId=Math.floor((a.v-35)/2),a.chainId<0&&(a.chainId=0);var B=a.v-27,Q=C.slice(0,6);0!==a.chainId&&(Q.push((0,T.hexlify)(a.chainId)),Q.push("0x"),Q.push("0x"),B-=2*a.chainId+8);var ee=(0,b.keccak256)(h.encode(Q));try{a.from=H(ee,{r:(0,T.hexlify)(a.r),s:(0,T.hexlify)(a.s),recoveryParam:B})}catch{}a.hash=(0,b.keccak256)(N)}return a.type=null,a}(D);switch(D[0]){case 1:return function(N){var C=h.decode(N.slice(1));8!==C.length&&11!==C.length&&I.throwArgumentError("invalid component count for transaction type: 1","payload",(0,T.hexlify)(N));var a={type:1,chainId:L(C[0]).toNumber(),nonce:L(C[1]).toNumber(),gasPrice:L(C[2]),gasLimit:L(C[3]),to:P(C[4]),value:L(C[5]),data:C[6],accessList:R(C[7])};return 8===C.length||(a.hash=(0,b.keccak256)(N),v(a,C.slice(8),M)),a}(D);case 2:return function(N){var C=h.decode(N.slice(1));9!==C.length&&12!==C.length&&I.throwArgumentError("invalid component count for transaction type: 2","payload",(0,T.hexlify)(N));var a=L(C[2]),B=L(C[3]),Q={type:2,chainId:L(C[0]).toNumber(),nonce:L(C[1]).toNumber(),maxPriorityFeePerGas:a,maxFeePerGas:B,gasPrice:null,gasLimit:L(C[4]),to:P(C[5]),value:L(C[6]),data:C[7],accessList:R(C[8])};return 9===C.length||(Q.hash=(0,b.keccak256)(N),v(Q,C.slice(9),y)),Q}(D)}return I.throwError("unsupported transaction type: ".concat(D[0]),m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:D[0]})},O.recoverAddress=H,O.serialize=function(k,D){if(null==k.type||0===k.type)return null!=k.accessList&&I.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",k),function(N,C){(0,l.checkProperties)(N,W);var a=[];V.forEach(function(ce){var ue=N[ce.name]||[],we={};ce.numeric&&(we.hexPad="left"),ue=(0,T.arrayify)((0,T.hexlify)(ue,we)),ce.length&&ue.length!==ce.length&&ue.length>0&&I.throwArgumentError("invalid length for "+ce.name,"transaction:"+ce.name,ue),ce.maxLength&&(ue=(0,T.stripZeros)(ue)).length>ce.maxLength&&I.throwArgumentError("invalid length for "+ce.name,"transaction:"+ce.name,ue),a.push((0,T.hexlify)(ue))});var B=0;if(null!=N.chainId?"number"!=typeof(B=N.chainId)&&I.throwArgumentError("invalid transaction.chainId","transaction",N):C&&!(0,T.isBytesLike)(C)&&C.v>28&&(B=Math.floor((C.v-35)/2)),0!==B&&(a.push((0,T.hexlify)(B)),a.push("0x"),a.push("0x")),!C)return h.encode(a);var Q=(0,T.splitSignature)(C),ee=27+Q.recoveryParam;return 0!==B?(a.pop(),a.pop(),a.pop(),ee+=2*B+8,Q.v>28&&Q.v!==ee&&I.throwArgumentError("transaction.chainId/signature.v mismatch","signature",C)):Q.v!==ee&&I.throwArgumentError("transaction.chainId/signature.v mismatch","signature",C),a.push((0,T.hexlify)(ee)),a.push((0,T.stripZeros)((0,T.arrayify)(Q.r))),a.push((0,T.stripZeros)((0,T.arrayify)(Q.s))),h.encode(a)}(k,D);switch(k.type){case 1:return M(k,D);case 2:return y(k,D)}return I.throwError("unsupported transaction type: ".concat(k.type),m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:k.type})};var x=E(77921),f=E(34952),T=E(908),g=E(5465),b=E(64642),l=E(23694),h=function(k,D){if(k&&k.__esModule)return k;if(null===k||"object"!==d(k)&&"function"!=typeof k)return{default:k};var N=w(void 0);if(N&&N.has(k))return N.get(k);var C={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var B in k)if("default"!==B&&Object.prototype.hasOwnProperty.call(k,B)){var Q=a?Object.getOwnPropertyDescriptor(k,B):null;Q&&(Q.get||Q.set)?Object.defineProperty(C,B,Q):C[B]=k[B]}return C.default=k,N&&N.set(k,C),C}(E(55265)),u=E(17612),m=E(64327),_=E(96783);function w(k){if("function"!=typeof WeakMap)return null;var D=new WeakMap,N=new WeakMap;return(w=function(C){return C?N:D})(k)}var S,k,I=new m.Logger(_.version);function P(k){return"0x"===k?null:(0,x.getAddress)(k)}function L(k){return"0x"===k?g.Zero:f.BigNumber.from(k)}O.TransactionTypes=S,(k=S||(O.TransactionTypes=S={}))[k.legacy=0]="legacy",k[k.eip2930=1]="eip2930",k[k.eip1559=2]="eip1559";var V=[{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"}],W={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function G(k){var D=(0,u.computePublicKey)(k);return(0,x.getAddress)((0,T.hexDataSlice)((0,b.keccak256)((0,T.hexDataSlice)(D,1)),12))}function H(k,D){return G((0,u.recoverPublicKey)((0,T.arrayify)(k),D))}function j(k,D){var N=(0,T.stripZeros)(f.BigNumber.from(k).toHexString());return N.length>32&&I.throwArgumentError("invalid length for "+D,"transaction:"+D,k),N}function K(k,D){return{address:(0,x.getAddress)(k),storageKeys:(D||[]).map(function(N,C){return 32!==(0,T.hexDataLength)(N)&&I.throwArgumentError("invalid access list storageKey","accessList[".concat(k,":").concat(C,"]"),N),N.toLowerCase()})}}function R(k){if(Array.isArray(k))return k.map(function(N,C){return Array.isArray(N)?(N.length>2&&I.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(C,"]"),N),K(N[0],N[1])):K(N.address,N.storageKeys)});var D=Object.keys(k).map(function(N){var C=k[N].reduce(function(a,B){return a[B]=!0,a},{});return K(N,Object.keys(C).sort())});return D.sort(function(N,C){return N.address.localeCompare(C.address)}),D}function o(k){return R(k).map(function(D){return[D.address,D.storageKeys]})}function y(k,D){if(null!=k.gasPrice){var N=f.BigNumber.from(k.gasPrice),C=f.BigNumber.from(k.maxFeePerGas||0);N.eq(C)||I.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:N,maxFeePerGas:C})}var a=[j(k.chainId||0,"chainId"),j(k.nonce||0,"nonce"),j(k.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),j(k.maxFeePerGas||0,"maxFeePerGas"),j(k.gasLimit||0,"gasLimit"),null!=k.to?(0,x.getAddress)(k.to):"0x",j(k.value||0,"value"),k.data||"0x",o(k.accessList||[])];if(D){var B=(0,T.splitSignature)(D);a.push(j(B.recoveryParam,"recoveryParam")),a.push((0,T.stripZeros)(B.r)),a.push((0,T.stripZeros)(B.s))}return(0,T.hexConcat)(["0x02",h.encode(a)])}function M(k,D){var N=[j(k.chainId||0,"chainId"),j(k.nonce||0,"nonce"),j(k.gasPrice||0,"gasPrice"),j(k.gasLimit||0,"gasLimit"),null!=k.to?(0,x.getAddress)(k.to):"0x",j(k.value||0,"value"),k.data||"0x",o(k.accessList||[])];if(D){var C=(0,T.splitSignature)(D);N.push(j(C.recoveryParam,"recoveryParam")),N.push((0,T.stripZeros)(C.r)),N.push((0,T.stripZeros)(C.s))}return(0,T.hexConcat)(["0x01",h.encode(N)])}function v(k,D,N){try{var C=L(D[0]).toNumber();if(0!==C&&1!==C)throw new Error("bad recid");k.v=C}catch{I.throwArgumentError("invalid v for transaction type: 1","v",D[0])}k.r=(0,T.hexZeroPad)(D[1],32),k.s=(0,T.hexZeroPad)(D[2],32);try{var a=(0,b.keccak256)(N(k));k.from=H(a,{r:k.r,s:k.s,recoveryParam:k.v})}catch{}}},96546:(q,O,E)=>{"use strict";var d=E(28847)(E(90775));function x(h,u){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(h);u&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),m.push.apply(m,_)}return m}function f(h){for(var u=1;u1?m-1:0),w=1;w{"use strict";var d=E(28847)(E(90775));function x(h,u){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(h);u&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),m.push.apply(m,_)}return m}function f(h){for(var u=1;ub;)S&l&&(I=I.add(P)),P=P.double(),S>>=l;return I},precomputeWindow:function(w,S){for(var I=_(S),P=I.windows,L=I.windowSize,V=[],W=w,G=W,H=0;H>=K,y>V&&(y-=j,I+=l);var M=o,v=o+Math.abs(y)-1,D=y<0;0===y?G=G.add(m(R%2!=0,S[M])):W=W.add(m(D,S[v]))}return{p:W,f:G}},wNAFCached:function(w,S,I,P){var L=w._WINDOW_SIZE||1,V=S.get(w);return V||(V=this.precomputeWindow(w,L),1!==L&&S.set(w,P(V))),this.wNAF(L,V,I)}}},O.validateBasic=function(h){return(0,T.validateField)(h.Fp),(0,g.validateObject)(h,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(f(f(f({},(0,T.nLength)(h.n,h.nBitLength)),h),{p:h.Fp.ORDER}))}},19751:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(90775)),f=d(E(74519));function T(L,V){var W=Object.keys(L);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(L);V&&(G=G.filter(function(H){return Object.getOwnPropertyDescriptor(L,H).enumerable})),W.push.apply(W,G)}return W}function g(L){for(var V=1;V=1<<8*V)throw new Error("bad I2OSP call: value=".concat(L," length=").concat(V));for(var W=Array.from({length:V}).fill(0),G=V-1;G>=0;G--)W[G]=255&L,L>>>=8;return new Uint8Array(W)}function m(L,V){for(var W=new Uint8Array(L.length),G=0;G255&&(V=G((0,l.concatBytes)((0,l.utf8ToBytes)("H2C-OVERSIZE-DST-"),V)));var j=G.blockLen,K=Math.ceil(W/G.outputLen);if(K>255)throw new Error("Invalid xmd length");var R=(0,l.concatBytes)(V,u(V.length,1)),o=u(0,j),y=u(W,2),M=new Array(K),v=G((0,l.concatBytes)(o,L,y,u(0,1),R));M[0]=G((0,l.concatBytes)(v,u(1,1),R));for(var k=1;k<=K;k++){var D=[m(v,M[k-1]),u(k+1,1),R];M[k]=G(l.concatBytes.apply(void 0,D))}return l.concatBytes.apply(void 0,M).slice(0,W)}function I(L,V,W,G,H){if(_(L),_(V),w(W),V.length>255){var j=Math.ceil(2*G/8);V=H.create({dkLen:j}).update((0,l.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(V).digest()}if(W>65535||V.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return H.create({dkLen:W}).update(L).update(u(W,2)).update(V).update(u(V.length,1)).digest()}function P(L,V,W){(0,l.validateObject)(W,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});var G=W.p,H=W.k,j=W.m,K=W.hash,R=W.expand,o=W.DST;_(L),w(V);var y,M=function(ce){if(ce instanceof Uint8Array)return ce;if("string"==typeof ce)return(0,l.utf8ToBytes)(ce);throw new Error("DST must be Uint8Array or string")}(o),v=G.toString(2).length,k=Math.ceil((v+H)/8),D=V*j*k;if("xmd"===R)y=S(L,M,D,K);else if("xof"===R)y=I(L,M,D,H,K);else{if("_internal_pass"!==R)throw new Error('expand must be "xmd" or "xof"');y=L}for(var N=new Array(V),C=0;C{"use strict";var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.hashToPrivateScalar=O.FpSqrtEven=O.FpSqrtOdd=O.Field=O.nLength=O.FpIsSquare=O.FpDiv=O.FpInvertBatch=O.FpPow=O.validateField=O.isNegativeLE=O.FpSqrt=O.tonelliShanks=O.invert=O.pow2=O.pow=O.mod=void 0;var x=E(46928),f=BigInt(0),T=BigInt(1),g=BigInt(2),b=BigInt(3),l=BigInt(4),h=BigInt(5),u=BigInt(8);function m(G,H){var j=G%H;return j>=f?j:H+j}function _(G,H,j){if(j<=f||H 0");if(j===T)return f;for(var K=T;H>f;)H&T&&(K=K*G%j),G=G*G%j,H>>=T;return K}function w(G,H){if(G===f||H<=f)throw new Error("invert: expected positive integers, got n=".concat(G," mod=").concat(H));for(var j=m(G,H),K=H,R=f,o=T,y=T,M=f;j!==f;){var v=K/j,k=K%j,D=R-y*v,N=o-M*v;K=j,j=k,R=y,o=M,y=D,M=N}if(K!==T)throw new Error("invert: does not exist");return m(R,H)}function S(G){var H,j,K,R=(G-T)/g;for(H=G-T,j=0;H%g===f;H/=g,j++);for(K=g;Kf;)K*=K,K%=j;return K},O.invert=w,O.tonelliShanks=S,O.FpSqrt=I,O.isNegativeLE=function(G,H){return(m(G,H)&T)===T};var P=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function L(G,H,j){if(j 0");if(j===f)return G.ONE;if(j===T)return H;for(var K=G.ONE,R=H;j>f;)j&T&&(K=G.mul(K,R)),R=G.sqr(R),j>>=T;return K}function V(G,H){var j=new Array(H.length),K=H.reduce(function(o,y,M){return G.is0(y)?o:(j[M]=o,G.mul(o,y))},G.ONE),R=G.inv(K);return H.reduceRight(function(o,y,M){return G.is0(y)?o:(j[M]=G.mul(o,j[M]),G.mul(o,y))},R),j}function W(G,H){var j=void 0!==H?H:G.toString(2).length;return{nBitLength:j,nByteLength:Math.ceil(j/8)}}O.validateField=function(G){var H=P.reduce(function(j,K){return j[K]="function",j},{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,x.validateObject)(G,H)},O.FpPow=L,O.FpInvertBatch=V,O.FpDiv=function(G,H,j){return G.mul(H,"bigint"==typeof j?w(j,G.ORDER):G.inv(j))},O.FpIsSquare=function(G){var H=(G.ORDER-T)/g;return function(j){var K=G.pow(j,H);return G.eql(K,G.ZERO)||G.eql(K,G.ONE)}},O.nLength=W,O.Field=function(G,H){var j=arguments.length>2&&void 0!==arguments[2]&&arguments[2],K=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(G<=f)throw new Error("Expected Fp ORDER > 0, got ".concat(G));var R=W(G,H),o=R.nBitLength,y=R.nByteLength;if(y>2048)throw new Error("Field lengths over 2048 bytes are not supported");var M=I(G),v=Object.freeze({ORDER:G,BITS:o,BYTES:y,MASK:(0,x.bitMask)(o),ZERO:f,ONE:T,create:function(k){return m(k,G)},isValid:function(k){if("bigint"!=typeof k)throw new Error("Invalid field element: expected bigint, got ".concat((0,d.default)(k)));return f<=k&&k2&&void 0!==arguments[2]&&arguments[2],K=(G=(0,x.ensureBytes)("privateHash",G)).length,R=W(H).nByteLength+8;if(R<24||K1024)throw new Error("hashToPrivateScalar: expected ".concat(R,"-1024 bytes of input, got ").concat(K));return m(j?(0,x.bytesToNumberLE)(G):(0,x.bytesToNumberBE)(G),H-T)+T}},46928:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(74519)),f=d(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.validateObject=O.createHmacDrbg=O.bitMask=O.bitSet=O.bitGet=O.bitLen=O.utf8ToBytes=O.equalBytes=O.concatBytes=O.ensureBytes=O.numberToVarBytesBE=O.numberToBytesLE=O.numberToBytesBE=O.bytesToNumberLE=O.bytesToNumberBE=O.hexToBytes=O.hexToNumber=O.numberToHexUnpadded=O.bytesToHex=void 0;var T=BigInt(0),g=BigInt(1),b=BigInt(2),l=function(W){return W instanceof Uint8Array},h=Array.from({length:256},function(W,G){return G.toString(16).padStart(2,"0")});function u(W){if(!l(W))throw new Error("Uint8Array expected");for(var G="",H=0;HT;W>>=g,G+=1);return G},O.bitGet=function(W,G){return W>>BigInt(G)&g},O.bitSet=function(W,G,H){return W|(H?g:T)<0&&void 0!==arguments[0]?arguments[0]:P();K=y(L([0]),k),j=y(),0!==k.length&&(K=y(L([1]),k),j=y())},v=function(){if(R++>=1e3)throw new Error("drbg: tried 1000 values");for(var k=0,D=[];k2&&void 0!==arguments[2]?arguments[2]:{},j=function(k,D,N){var C=V[D];if("function"!=typeof C)throw new Error('Invalid validator "'.concat(D,'", expected function'));var a=W[k];if(!(N&&void 0===a||C(a,W)))throw new Error("Invalid param ".concat(String(k),"=").concat(a," (").concat((0,f.default)(a),"), expected ").concat(D))},K=0,R=Object.entries(G);K{"use strict";var d=E(28847),x=d(E(58985)),f=d(E(69721)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=d(E(22940)),h=d(E(90775)),u=d(E(3355));function m(y,M){var v=Object.keys(y);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(y);M&&(k=k.filter(function(D){return Object.getOwnPropertyDescriptor(y,D).enumerable})),v.push.apply(v,k)}return v}function _(y){for(var M=1;M0&&void 0!==arguments[0]?arguments[0]:"";return(0,f.default)(this,D),k.call(this,N)}return(0,x.default)(D)}((0,l.default)(Error)),_parseInt:function(y){var M=O.DER.Err;if(y.length<2||2!==y[0])throw new M("Invalid signature integer tag");var v=y[1],k=y.subarray(2,v+2);if(!v||k.length!==v)throw new M("Invalid signature integer: wrong length");if(128&k[0])throw new M("Invalid signature integer: negative");if(0===k[0]&&!(128&k[1]))throw new M("Invalid signature integer: unnecessary leading zero");return{d:L(k),l:y.subarray(v+2)}},toSig:function(y){var M=O.DER.Err,v="string"==typeof y?V(y):y;if(!(v instanceof Uint8Array))throw new Error("ui8a expected");var k=v.length;if(k<2||48!=v[0])throw new M("Invalid signature tag");if(v[1]!==k-2)throw new M("Invalid signature: incorrect length");var D=O.DER._parseInt(v.subarray(2)),N=D.d,a=O.DER._parseInt(D.l),B=a.d;if(a.l.length)throw new M("Invalid signature: left bytes after parsing");return{r:N,s:B}},hexFromSig:function(y){var M=function(Q){return 8&Number.parseInt(Q[0],16)?"00"+Q:Q},v=function(Q){var ee=Q.toString(16);return 1&ee.length?"0".concat(ee):ee},k=M(v(y.s)),D=M(v(y.r)),N=k.length/2,C=D.length/2,a=v(N),B=v(C);return"30".concat(v(C+N+4),"02").concat(B).concat(D,"02").concat(a).concat(k)}};var W=BigInt(0),G=BigInt(1),H=BigInt(2),j=BigInt(3),K=BigInt(4);function R(y){var M=function(ae){var Te=(0,P.validateBasic)(ae);S.validateObject(Te,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});var le=Te.endo,X=Te.Fp;if(le){if(!X.eql(Te.a,X.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==(0,u.default)(le)||"bigint"!=typeof le.beta||"function"!=typeof le.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(_({},Te))}(y),v=M.Fp,k=M.toBytes||function(ae,Te,le){var X=Te.toAffine();return S.concatBytes(Uint8Array.from([4]),v.toBytes(X.x),v.toBytes(X.y))},D=M.fromBytes||function(ae){var Te=ae.subarray(1);return{x:v.fromBytes(Te.subarray(0,v.BYTES)),y:v.fromBytes(Te.subarray(v.BYTES,2*v.BYTES))}};function N(ae){var Te=M.a,le=M.b,X=v.sqr(ae),ne=v.mul(X,ae);return v.add(v.add(ne,v.mul(ae,Te)),le)}if(!v.eql(v.sqr(M.Gy),N(M.Gx)))throw new Error("bad generator point: equation left != right");function C(ae){return"bigint"==typeof ae&&WW||Ce>W;)_e&G&&(ke=ke.add(Ee)),Ce&G&&(me=me.add(Ee)),Ee=Ee.double(),_e>>=G,Ce>>=G;return pe&&(ke=ke.negate()),xe&&(me=me.negate()),me=new ae(v.mul(me.px,X.beta),me.py,me.pz),ke.add(me)}},{key:"multiply",value:function(Te){a(Te);var le,X,ne=Te,pe=M.endo;if(pe){var _e=pe.splitScalar(ne),xe=_e.k1neg,ke=_e.k2neg,me=_e.k2,Ee=this.wNAF(_e.k1),ze=Ee.p,Ve=Ee.f,nt=this.wNAF(me),tt=nt.p,mt=nt.f;ze=we.constTimeNegate(xe,ze),tt=we.constTimeNegate(ke,tt),tt=new ae(v.mul(tt.px,pe.beta),tt.py,tt.pz),le=ze.add(tt),X=Ve.add(mt)}else{var ht=this.wNAF(ne);le=ht.p,X=ht.f}return ae.normalizeZ([le,X])[0]}},{key:"multiplyAndAddUnsafe",value:function(Te,le,X){var ne=ae.BASE,pe=function(xe,Ce){return Ce!==W&&Ce!==G&&xe.equals(ne)?xe.multiply(Ce):xe.multiplyUnsafe(Ce)},_e=pe(this,le).add(pe(Te,X));return _e.is0()?void 0:_e}},{key:"toAffine",value:function(Te){var le=this.px,X=this.py,ne=this.pz,pe=this.is0();null==Te&&(Te=pe?v.ONE:v.inv(ne));var _e=v.mul(le,Te),xe=v.mul(X,Te),Ce=v.mul(ne,Te);if(pe)return{x:v.ZERO,y:v.ZERO};if(!v.eql(Ce,v.ONE))throw new Error("invZ was invalid");return{x:_e,y:xe}}},{key:"isTorsionFree",value:function(){var le=M.isTorsionFree;if(M.h===G)return!0;if(le)return le(ae,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}},{key:"clearCofactor",value:function(){var le=M.clearCofactor;return M.h===G?this:le?le(ae,this):this.multiplyUnsafe(M.h)}},{key:"toRawBytes",value:function(){var Te=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),k(ae,this,Te)}},{key:"toHex",value:function(){var Te=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return S.bytesToHex(this.toRawBytes(Te))}}],[{key:"fromAffine",value:function(Te){var le=Te||{},X=le.x,ne=le.y;if(!Te||!v.isValid(X)||!v.isValid(ne))throw new Error("invalid affine point");if(Te instanceof ae)throw new Error("projective point not allowed");var pe=function(_e){return v.eql(_e,v.ZERO)};return pe(X)&&pe(ne)?ae.ZERO:new ae(X,ne,v.ONE)}},{key:"normalizeZ",value:function(Te){var le=v.invertBatch(Te.map(function(X){return X.pz}));return Te.map(function(X,ne){return X.toAffine(le[ne])}).map(ae.fromAffine)}},{key:"fromHex",value:function(Te){var le=ae.fromAffine(D((0,I.ensureBytes)("pointHex",Te)));return le.assertValidity(),le}},{key:"fromPrivateKey",value:function(Te){return ae.BASE.multiply(B(Te))}}]),ae}();ce.BASE=new ce(M.Gx,M.Gy,v.ONE),ce.ZERO=new ce(v.ZERO,v.ONE,v.ZERO);var ue=M.nBitLength,we=(0,P.wNAF)(ce,M.endo?Math.ceil(ue/2):ue);return{CURVE:M,ProjectivePoint:ce,normPrivateKeyToScalar:B,weierstrassEquation:N,isWithinCurveOrder:C}}function o(y,M){for(var v=y.ORDER,k=W,D=v-G;D%H===W;D/=H)k+=G;var N=k,C=H<G;Ee--){var ze=Ee-H,Ve=y.pow(ke,ze=H<N>>G}var X=function(Ve,nt,tt){return S.bytesToNumberBE(Ve.slice(nt,tt))},ne=function(){function Ve(nt,tt,mt){(0,f.default)(this,Ve),this.r=nt,this.s=tt,this.recovery=mt,this.assertValidity()}return(0,x.default)(Ve,[{key:"assertValidity",value:function(){if(!ae(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!ae(this.s))throw new Error("s must be 0 < s < CURVE.n")}},{key:"addRecoveryBit",value:function(nt){return new Ve(this.r,this.s,nt)}},{key:"recoverPublicKey",value:function(nt){var tt=this.r,mt=this.s,ht=this.recovery,wt=Ce((0,I.ensureBytes)("msgHash",nt));if(null==ht||![0,1,2,3].includes(ht))throw new Error("recovery id invalid");var Pt=2===ht||3===ht?tt+k.n:tt;if(Pt>=D.ORDER)throw new Error("recovery id 2 or 3 invalid");var Ye=ce.fromHex((0==(1&ht)?"02":"03")+Te(Pt)),gt=Q(Pt),St=B(-wt*gt),Wt=B(mt*gt),dn=ce.BASE.multiplyAndAddUnsafe(Ye,St,Wt);if(!dn)throw new Error("point at infinify");return dn.assertValidity(),dn}},{key:"hasHighS",value:function(){return le(this.s)}},{key:"normalizeS",value:function(){return this.hasHighS()?new Ve(this.r,B(-this.s),this.recovery):this}},{key:"toDERRawBytes",value:function(){return S.hexToBytes(this.toDERHex())}},{key:"toDERHex",value:function(){return O.DER.hexFromSig({r:this.r,s:this.s})}},{key:"toCompactRawBytes",value:function(){return S.hexToBytes(this.toCompactHex())}},{key:"toCompactHex",value:function(){return Te(this.r)+Te(this.s)}}],[{key:"fromCompact",value:function(nt){var tt=k.nByteLength;return nt=(0,I.ensureBytes)("compactSignature",nt,2*tt),new Ve(X(nt,0,tt),X(nt,tt,2*tt))}},{key:"fromDER",value:function(nt){var tt=O.DER.toSig((0,I.ensureBytes)("DER",nt));return new Ve(tt.r,tt.s)}}]),Ve}(),pe={isValidPrivateKey:function(Ve){try{return ue(Ve),!0}catch{return!1}},normPrivateKeyToScalar:ue,randomPrivateKey:function(){var Ve=k.randomBytes(D.BYTES+8),nt=w.hashToPrivateScalar(Ve,N);return S.numberToBytesBE(nt,k.nByteLength)},precompute:function(){var Ve=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,nt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce.BASE;return nt._setWindowSize(Ve),nt.multiply(BigInt(3)),nt}};function _e(Ve){var nt=Ve instanceof Uint8Array,tt="string"==typeof Ve,mt=(nt||tt)&&Ve.length;return nt?mt===C||mt===a:tt?mt===2*C||mt===2*a:Ve instanceof ce}var xe=k.bits2int||function(Ve){var nt=S.bytesToNumberBE(Ve),tt=8*Ve.length-k.nBitLength;return tt>0?nt>>BigInt(tt):nt},Ce=k.bits2int_modN||function(Ve){return B(xe(Ve))},ke=S.bitMask(k.nBitLength);function me(Ve){if("bigint"!=typeof Ve)throw new Error("bigint expected");if(!(W<=Ve&&Ve1&&void 0!==arguments[1])||arguments[1];return ce.fromPrivateKey(Ve).toRawBytes(nt)},getSharedSecret:function(Ve,nt){var tt=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(_e(Ve))throw new Error("first arg must be private key");if(!_e(nt))throw new Error("second arg must be public key");return ce.fromHex(nt).multiply(ue(Ve)).toRawBytes(tt)},sign:function(Ve,nt){var tt=function(Pt,st){var Ye=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee;if(["recovered","canonical"].some(function($n){return $n in Ye}))throw new Error("sign() legacy options not supported");var gt=k.hash,St=k.randomBytes,Wt=Ye.lowS,dn=Ye.prehash,Nt=Ye.extraEntropy;null==Wt&&(Wt=!0),Pt=(0,I.ensureBytes)("msgHash",Pt),dn&&(Pt=(0,I.ensureBytes)("prehashed msgHash",gt(Pt)));var It=Ce(Pt),qt=ue(st),jt=[me(qt),me(It)];if(null!=Nt){var Yt=!0===Nt?St(D.BYTES):Nt;jt.push((0,I.ensureBytes)("extraEntropy",Yt,D.BYTES))}var Wn=S.concatBytes.apply(S,jt),fn=It;return{seed:Wn,k2sig:function($n){var Kn,Jr=xe($n);if(ae(Jr)){var Ln=Q(Jr),Bn=ce.BASE.multiply(Jr).toAffine(),Wr=B(Bn.x);if(Wr!==W){var zn=B(Ln*B(fn+Wr*qt));if(zn!==W){var bn=(Bn.x===Wr?0:2)|Number(Bn.y&G),Lr=zn;return Wt&&le(zn)&&(Lr=le(Kn=zn)?B(-Kn):Kn,bn^=1),new ne(Wr,Lr,bn)}}}}}}(Ve,nt,arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee),mt=tt.seed,ht=tt.k2sig,wt=k;return S.createHmacDrbg(wt.hash.outputLen,wt.nByteLength,wt.hmac)(mt,ht)},verify:function(Ve,nt,tt){var mt,ht=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ze,wt=Ve;if(nt=(0,I.ensureBytes)("msgHash",nt),tt=(0,I.ensureBytes)("publicKey",tt),"strict"in ht)throw new Error("options.strict was renamed to lowS");var Pt,st=ht.lowS,Ye=ht.prehash,gt=void 0;try{if("string"==typeof wt||wt instanceof Uint8Array)try{gt=ne.fromDER(wt)}catch($n){if(!($n instanceof O.DER.Err))throw $n;gt=ne.fromCompact(wt)}else{if("object"!==(0,u.default)(wt)||"bigint"!=typeof wt.r||"bigint"!=typeof wt.s)throw new Error("PARSE");var St=wt.r,Wt=wt.s;gt=new ne(St,Wt)}Pt=ce.fromHex(tt)}catch($n){if("PARSE"===$n.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(st&>.hasHighS())return!1;Ye&&(nt=k.hash(nt));var dn=gt,Nt=dn.r,It=dn.s,qt=Ce(nt),jt=Q(It),Yt=B(qt*jt),Wn=B(Nt*jt),fn=null===(mt=ce.BASE.multiplyAndAddUnsafe(Pt,Yt,Wn))||void 0===mt?void 0:mt.toAffine();return!!fn&&B(fn.x)===Nt},ProjectivePoint:ce,Signature:ne,utils:pe}},O.SWUFpSqrtRatio=o,O.mapToCurveSimpleSWU=function(y,M){if(w.validateField(y),!y.isValid(M.A)||!y.isValid(M.B)||!y.isValid(M.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");var v=o(y,M.Z);if(!y.isOdd)throw new Error("Fp.isOdd is not implemented!");return function(k){var D,N,C,a,B,Q,ee,ce;D=y.sqr(k),D=y.mul(D,M.Z),N=y.sqr(D),N=y.add(N,D),C=y.add(N,y.ONE),C=y.mul(C,M.B),a=y.cmov(M.Z,y.neg(N),!y.eql(N,y.ZERO)),a=y.mul(a,M.A),N=y.sqr(C),Q=y.sqr(a),B=y.mul(Q,M.A),N=y.add(N,B),N=y.mul(N,C),Q=y.mul(Q,a),B=y.mul(Q,M.B),N=y.add(N,B),ee=y.mul(D,C);var ue=v(N,Q),we=ue.isValid,ae=ue.value;ce=y.mul(D,k),ce=y.mul(ce,ae),ee=y.cmov(ee,C,we),ce=y.cmov(ce,ae,we);var Te=y.isOdd(k)===y.isOdd(ce);return ce=y.cmov(y.neg(ce),ce,Te),{x:ee=y.div(ee,a),y:ce}}}},4158:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.encodeToCurve=O.hashToCurve=O.schnorr=O.secp256k1=void 0;var d=E(61241),x=E(72434),f=E(3970),T=E(16573),g=E(46928),b=E(19751),l=E(96546),h=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),u=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),m=BigInt(1),_=BigInt(2),w=function(B,Q){return(B+Q/_)/Q};function S(B){var Q=h,ee=BigInt(3),ce=BigInt(6),ue=BigInt(11),we=BigInt(22),ae=BigInt(23),Te=BigInt(44),le=BigInt(88),X=B*B*B%Q,ne=X*X*B%Q,pe=(0,f.pow2)(ne,ee,Q)*ne%Q,_e=(0,f.pow2)(pe,ee,Q)*ne%Q,xe=(0,f.pow2)(_e,_,Q)*X%Q,Ce=(0,f.pow2)(xe,ue,Q)*xe%Q,ke=(0,f.pow2)(Ce,we,Q)*Ce%Q,me=(0,f.pow2)(ke,Te,Q)*ke%Q,Ee=(0,f.pow2)(me,le,Q)*me%Q,ze=(0,f.pow2)(Ee,Te,Q)*ke%Q,Ve=(0,f.pow2)(ze,ee,Q)*ne%Q,nt=(0,f.pow2)(Ve,ae,Q)*Ce%Q,tt=(0,f.pow2)(nt,ce,Q)*X%Q,mt=(0,f.pow2)(tt,_,Q);if(!I.eql(I.sqr(mt),B))throw new Error("Cannot find square root");return mt}var I=(0,f.Field)(h,void 0,void 0,{sqrt:S});O.secp256k1=(0,l.createCurve)({a:BigInt(0),b:BigInt(7),Fp:I,n:u,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:function(B){var Q=u,ee=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),ce=-m*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),ue=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),we=ee,ae=BigInt("0x100000000000000000000000000000000"),Te=w(we*B,Q),le=w(-ce*B,Q),X=(0,f.mod)(B-Te*ee-le*ue,Q),ne=(0,f.mod)(-Te*ce-le*we,Q),pe=X>ae,_e=ne>ae;if(pe&&(X=Q-X),_e&&(ne=Q-ne),X>ae||ne>ae)throw new Error("splitScalar: Endomorphism failed, k="+B);return{k1neg:pe,k1:X,k2neg:_e,k2:ne}}}},d.sha256);var P=BigInt(0),L=function(B){return"bigint"==typeof B&&P1?ce-1:0),we=1;we2&&void 0!==arguments[2]?arguments[2]:(0,x.randomBytes)(32),ce=(0,g.ensureBytes)("message",B),ue=M(Q),we=ue.bytes,ae=ue.scalar,Te=(0,g.ensureBytes)("auxRand",ee,32),le=j(ae^(0,g.bytesToNumberBE)(G("BIP0340/aux",Te))),X=G("BIP0340/nonce",le,we,ce),ne=R((0,g.bytesToNumberBE)(X));if(ne===P)throw new Error("sign failed: k is zero");var pe=M(ne),_e=pe.bytes,xe=pe.scalar,Ce=k(_e,we,ce),ke=new Uint8Array(64);if(ke.set(_e,0),ke.set(j(R(xe+Ce*ae)),32),!D(ke,ce,we))throw new Error("sign: Invalid signature produced");return ke},verify:D,utils:{randomPrivateKey:O.secp256k1.utils.randomPrivateKey,lift_x:v,pointToBytes:H,numberToBytesBE:g.numberToBytesBE,bytesToNumberBE:g.bytesToNumberBE,taggedHash:G,mod:f.mod}};var N=(0,b.isogenyMap)(I,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(function(B){return B.map(function(Q){return BigInt(Q)})})),C=(0,T.mapToCurveSimpleSWU)(I,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:I.create(BigInt("-11"))}),a=(0,b.createHasher)(O.secp256k1.ProjectivePoint,function(B){var Q=C(I.create(B[0]));return N(Q.x,Q.y)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:I.ORDER,m:1,k:128,expand:"xmd",hash:d.sha256});O.hashToCurve=a.hashToCurve,O.encodeToCurve=a.encodeToCurve},96822:(q,O)=>{"use strict";function E(l){if(!Number.isSafeInteger(l)||l<0)throw new Error("Wrong positive integer: ".concat(l))}function d(l){if("boolean"!=typeof l)throw new Error("Expected boolean, not ".concat(l))}function x(l){if(!(l instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var h=arguments.length,u=new Array(h>1?h-1:0),m=1;m0&&!u.includes(l.length))throw new Error("Expected Uint8Array of length ".concat(u,", not of length=").concat(l.length))}function f(l){if("function"!=typeof l||"function"!=typeof l.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");E(l.outputLen),E(l.blockLen)}function T(l){var h=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(l.destroyed)throw new Error("Hash instance has been destroyed");if(h&&l.finished)throw new Error("Hash#digest() has already been called")}function g(l,h){x(l);var u=h.outputLen;if(l.length{"use strict";var d=E(28847),x=d(E(93106)),f=d(E(69721)),T=d(E(58985)),g=d(E(15163)),b=d(E(34650)),l=d(E(21949));Object.defineProperty(O,"__esModule",{value:!0}),O.SHA2=void 0;var h=E(96822),u=E(72434),m=function(_){(0,g.default)(P,_);var w,S,I=(w=P,S=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var L,V=(0,l.default)(w);if(S){var W=(0,l.default)(this).constructor;L=Reflect.construct(V,arguments,W)}else L=V.apply(this,arguments);return(0,b.default)(this,L)});function P(L,V,W,G){var H;return(0,f.default)(this,P),(H=I.call(this)).blockLen=L,H.outputLen=V,H.padOffset=W,H.isLE=G,H.finished=!1,H.length=0,H.pos=0,H.destroyed=!1,H.buffer=new Uint8Array(L),H.view=(0,u.createView)(H.buffer),H}return(0,T.default)(P,[{key:"update",value:function(L){h.default.exists(this);for(var V=this.view,W=this.buffer,G=this.blockLen,H=(L=(0,u.toBytes)(L)).length,j=0;jG-j&&(this.process(W,0),j=0);for(var K=j;K>a&B),ee=Number(N&B),ue=C?0:4;k.setUint32(D+(C?4:0),Q,C),k.setUint32(D+ue,ee,C)})(W,G-8,BigInt(8*this.length),H),this.process(W,0);var R=(0,u.createView)(L),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var y=o/4,M=this.get();if(y>M.length)throw new Error("_sha2: outputLen bigger than state");for(var v=0;v{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.add=O.toBig=O.split=O.fromBig=void 0;var E=BigInt(Math.pow(2,32)-1),d=BigInt(32);function x(b){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(b&E),l:Number(b>>d&E)}:{h:0|Number(b>>d&E),l:0|Number(b&E)}}function f(b){for(var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=new Uint32Array(b.length),u=new Uint32Array(b.length),m=0;m>>0)+(u>>>0);return{h:b+h+(m/Math.pow(2,32)|0)|0,l:0|m}}O.fromBig=x,O.split=f,O.toBig=function(b,l){return BigInt(b>>>0)<>>0)},O.add=T,O.default={fromBig:x,split:f,toBig:O.toBig,shrSH:function(b,l,h){return b>>>h},shrSL:function(b,l,h){return b<<32-h|l>>>h},rotrSH:function(b,l,h){return b>>>h|l<<32-h},rotrSL:function(b,l,h){return b<<32-h|l>>>h},rotrBH:function(b,l,h){return b<<64-h|l>>>h-32},rotrBL:function(b,l,h){return b>>>h-32|l<<64-h},rotr32H:function(b,l){return l},rotr32L:function(b,l){return b},rotlSH:function(b,l,h){return b<>>32-h},rotlSL:function(b,l,h){return l<>>32-h},rotlBH:function(b,l,h){return l<>>64-h},rotlBL:function(b,l,h){return b<>>64-h},add:T,add3L:function(b,l,h){return(b>>>0)+(l>>>0)+(h>>>0)},add3H:function(b,l,h,u){return l+h+u+(b/Math.pow(2,32)|0)|0},add4L:function(b,l,h,u){return(b>>>0)+(l>>>0)+(h>>>0)+(u>>>0)},add4H:function(b,l,h,u,m){return l+h+u+m+(b/Math.pow(2,32)|0)|0},add5H:function(b,l,h,u,m,_){return l+h+u+m+_+(b/Math.pow(2,32)|0)|0},add5L:function(b,l,h,u,m){return(b>>>0)+(l>>>0)+(h>>>0)+(u>>>0)+(m>>>0)}}},39712:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.crypto=void 0,O.crypto="object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))&&"crypto"in globalThis?globalThis.crypto:void 0},45896:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949));Object.defineProperty(O,"__esModule",{value:!0}),O.hmac=O.HMAC=void 0;var l=E(96822),h=E(72434),u=function(m){(0,T.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,b.default)(_);if(w){var V=(0,b.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,g.default)(this,P)});function I(P,L){var V;(0,x.default)(this,I),(V=S.call(this)).finished=!1,V.destroyed=!1,l.default.hash(P);var W=(0,h.toBytes)(L);if(V.iHash=P.create(),"function"!=typeof V.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");V.blockLen=V.iHash.blockLen,V.outputLen=V.iHash.outputLen;var G=V.blockLen,H=new Uint8Array(G);H.set(W.length>G?P.create().update(W).digest():W);for(var j=0;j{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949));function l(L){var V=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var W,G=(0,b.default)(L);if(V){var H=(0,b.default)(this).constructor;W=Reflect.construct(G,arguments,H)}else W=G.apply(this,arguments);return(0,g.default)(this,W)}}Object.defineProperty(O,"__esModule",{value:!0}),O.sha224=O.sha256=void 0;var h=E(20330),u=E(72434),m=function(L,V,W){return L&V^L&W^V&W},_=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]),w=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),S=new Uint32Array(64),I=function(L){(0,T.default)(W,L);var V=l(W);function W(){var G;return(0,x.default)(this,W),(G=V.call(this,64,32,8,!1)).A=0|w[0],G.B=0|w[1],G.C=0|w[2],G.D=0|w[3],G.E=0|w[4],G.F=0|w[5],G.G=0|w[6],G.H=0|w[7],G}return(0,f.default)(W,[{key:"get",value:function(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}},{key:"set",value:function(G,H,j,K,R,o,y,M){this.A=0|G,this.B=0|H,this.C=0|j,this.D=0|K,this.E=0|R,this.F=0|o,this.G=0|y,this.H=0|M}},{key:"process",value:function(G,H){for(var j=0;j<16;j++,H+=4)S[j]=G.getUint32(H,!1);for(var K=16;K<64;K++){var R=S[K-15],o=S[K-2],y=(0,u.rotr)(R,7)^(0,u.rotr)(R,18)^R>>>3,M=(0,u.rotr)(o,17)^(0,u.rotr)(o,19)^o>>>10;S[K]=M+S[K-7]+y+S[K-16]|0}var v,k=this.A,D=this.B,N=this.C,C=this.D,a=this.E,B=this.F,Q=this.G,ee=this.H;for(j=0;j<64;j++){var ce=ee+((0,u.rotr)(a,6)^(0,u.rotr)(a,11)^(0,u.rotr)(a,25))+((v=a)&B^~v&Q)+_[j]+S[j]|0,ue=((0,u.rotr)(k,2)^(0,u.rotr)(k,13)^(0,u.rotr)(k,22))+m(k,D,N)|0;ee=Q,Q=B,B=a,a=C+ce|0,C=N,N=D,D=k,k=ce+ue|0}this.set(k=k+this.A|0,D=D+this.B|0,N=N+this.C|0,C=C+this.D|0,a=a+this.E|0,B=B+this.F|0,Q=Q+this.G|0,ee=ee+this.H|0)}},{key:"roundClean",value:function(){S.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),W}(h.SHA2),P=function(L){(0,T.default)(W,L);var V=l(W);function W(){var G;return(0,x.default)(this,W),(G=V.call(this)).A=-1056596264,G.B=914150663,G.C=812702999,G.D=-150054599,G.E=-4191439,G.F=1750603025,G.G=1694076839,G.H=-1090891868,G.outputLen=28,G}return(0,f.default)(W)}(I);O.sha256=(0,u.wrapConstructor)(function(){return new I}),O.sha224=(0,u.wrapConstructor)(function(){return new P})},64376:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=d(E(15163)),g=d(E(34650)),b=d(E(21949)),l=d(E(74519));Object.defineProperty(O,"__esModule",{value:!0}),O.shake256=O.shake128=O.keccak_512=O.keccak_384=O.keccak_256=O.keccak_224=O.sha3_512=O.sha3_384=O.sha3_256=O.sha3_224=O.Keccak=O.keccakP=void 0;for(var h=E(96822),u=E(64356),m=E(72434),_=[],w=[],S=[],I=BigInt(0),P=BigInt(1),L=BigInt(2),V=BigInt(7),W=BigInt(256),G=BigInt(113),H=0,j=P,K=1,R=0;H<24;H++){var o=[R,(2*K+3*R)%5];_.push(2*(5*(R=o[1])+(K=o[0]))),w.push((H+1)*(H+2)/2%64);for(var y=I,M=0;M<7;M++)(j=(j<>V)*G)%W)&L&&(y^=P<<(P<32?u.default.rotlBH(ue,we,ae):u.default.rotlSH(ue,we,ae)},a=function(ue,we,ae){return ae>32?u.default.rotlBL(ue,we,ae):u.default.rotlSL(ue,we,ae)};function B(ue){for(var we=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,ae=new Uint32Array(10),Te=24-we;Te<24;Te++){for(var le=0;le<10;le++)ae[le]=ue[le]^ue[le+10]^ue[le+20]^ue[le+30]^ue[le+40];for(var X=0;X<10;X+=2)for(var ne=(X+8)%10,pe=(X+2)%10,_e=ae[pe],xe=ae[pe+1],Ce=C(_e,xe,1)^ae[ne],ke=a(_e,xe,1)^ae[ne+1],me=0;me<50;me+=10)ue[X+me]^=Ce,ue[X+me+1]^=ke;for(var Ee=ue[2],ze=ue[3],Ve=0;Ve<24;Ve++){var nt=w[Ve],tt=C(Ee,ze,nt),mt=a(Ee,ze,nt),ht=_[Ve];Ee=ue[ht],ze=ue[ht+1],ue[ht]=tt,ue[ht+1]=mt}for(var wt=0;wt<50;wt+=10){for(var Pt=0;Pt<10;Pt++)ae[Pt]=ue[wt+Pt];for(var st=0;st<10;st++)ue[wt+st]^=~ae[(st+2)%10]&ae[(st+4)%10]}ue[0]^=D[Te],ue[1]^=N[Te]}ae.fill(0)}O.keccakP=B;var Q=function(ue){(0,T.default)(le,ue);var we,ae,Te=(we=le,ae=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var X,ne=(0,b.default)(we);if(ae){var pe=(0,b.default)(this).constructor;X=Reflect.construct(ne,arguments,pe)}else X=ne.apply(this,arguments);return(0,g.default)(this,X)});function le(X,ne,pe){var _e,xe=arguments.length>3&&void 0!==arguments[3]&&arguments[3],Ce=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if((0,x.default)(this,le),(_e=Te.call(this)).blockLen=X,_e.suffix=ne,_e.outputLen=pe,_e.enableXOF=xe,_e.rounds=Ce,_e.pos=0,_e.posOut=0,_e.finished=!1,_e.destroyed=!1,h.default.number(pe),0>=_e.blockLen||_e.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return _e.state=new Uint8Array(200),_e.state32=(0,m.u32)(_e.state),_e}return(0,f.default)(le,[{key:"keccak",value:function(){B(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(X){h.default.exists(this);for(var ne=this.blockLen,pe=this.state,_e=(X=(0,m.toBytes)(X)).length,xe=0;xe<_e;){for(var Ce=Math.min(ne-this.pos,_e-xe),ke=0;ke=pe&&this.keccak();var Ce=Math.min(pe-this.posOut,xe-_e);X.set(ne.subarray(this.posOut,this.posOut+Ce),_e),this.posOut+=Ce,_e+=Ce}return X}},{key:"xofInto",value:function(X){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(X)}},{key:"xof",value:function(X){return h.default.number(X),this.xofInto(new Uint8Array(X))}},{key:"digestInto",value:function(X){if(h.default.output(X,this),this.finished)throw new Error("digest() was already called");return this.writeInto(X),this.destroy(),X}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(X){var pe=this.suffix,_e=this.outputLen,xe=this.rounds,Ce=this.enableXOF;return X||(X=new le(this.blockLen,pe,_e,Ce,xe)),X.state32.set(this.state32),X.pos=this.pos,X.posOut=this.posOut,X.finished=this.finished,X.rounds=xe,X.suffix=pe,X.outputLen=_e,X.enableXOF=Ce,X.destroyed=this.destroyed,X}}]),le}(m.Hash);O.Keccak=Q;var ee=function(ue,we,ae){return(0,m.wrapConstructor)(function(){return new Q(we,ue,ae)})};O.sha3_224=ee(6,144,28),O.sha3_256=ee(6,136,32),O.sha3_384=ee(6,104,48),O.sha3_512=ee(6,72,64),O.keccak_224=ee(1,144,28),O.keccak_256=ee(1,136,32),O.keccak_384=ee(1,104,48),O.keccak_512=ee(1,72,64);var ce=function(ue,we,ae){return(0,m.wrapXOFConstructorWithOpts)(function(){var Te=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Q(we,ue,void 0===Te.dkLen?ae:Te.dkLen,!0)})};O.shake128=ce(31,168,16),O.shake256=ce(31,136,32)},72434:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(69721)),T=d(E(58985)),g=d(E(94571)),b=d(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.randomBytes=O.wrapXOFConstructorWithOpts=O.wrapConstructorWithOpts=O.wrapConstructor=O.checkOpts=O.Hash=O.concatBytes=O.toBytes=O.utf8ToBytes=O.asyncLoop=O.nextTick=O.hexToBytes=O.bytesToHex=O.isLE=O.rotr=O.createView=O.u32=O.u8=void 0;var l=E(39712),h=function(P){return P instanceof Uint8Array};if(O.u8=function(P){return new Uint8Array(P.buffer,P.byteOffset,P.byteLength)},O.u32=function(P){return new Uint32Array(P.buffer,P.byteOffset,Math.floor(P.byteLength/4))},O.createView=function(P){return new DataView(P.buffer,P.byteOffset,P.byteLength)},O.rotr=function(P,L){return P<<32-L|P>>>L},O.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!O.isLE)throw new Error("Non little-endian hardware is not supported");var u=Array.from({length:256},function(P,L){return L.toString(16).padStart(2,"0")});O.bytesToHex=function(P){if(!h(P))throw new Error("Uint8Array expected");for(var L="",V=0;V=0&&j0&&void 0!==arguments[0]?arguments[0]:32;if(l.crypto&&"function"==typeof l.crypto.getRandomValues)return l.crypto.getRandomValues(new Uint8Array(P));throw new Error("crypto.getRandomValues must be defined")}},53368:(q,O,E)=>{"use strict";var d,x,f=E(28847)(E(3355));void 0===(x="function"==typeof(d=function(){function T(L,V){if(!(L instanceof V))throw new TypeError("Cannot call a class as a function")}function g(L,V){for(var W=0;W{"use strict";var d=O;d.bignum=E(31734),d.define=E(41568).define,d.base=E(12412),d.constants=E(79387),d.decoders=E(61500),d.encoders=E(47506)},41568:(q,O,E)=>{"use strict";var d=E(47506),x=E(61500),f=E(41736);function T(g,b){this.name=g,this.body=b,this.decoders={},this.encoders={}}O.define=function(g,b){return new T(g,b)},T.prototype._createNamed=function(g){var b=this.name;function l(h){this._initNamed(h,b)}return f(l,g),l.prototype._initNamed=function(h,u){g.call(this,h,u)},new l(this)},T.prototype._getDecoder=function(g){return this.decoders.hasOwnProperty(g=g||"der")||(this.decoders[g]=this._createNamed(x[g])),this.decoders[g]},T.prototype.decode=function(g,b,l){return this._getDecoder(b).decode(g,l)},T.prototype._getEncoder=function(g){return this.encoders.hasOwnProperty(g=g||"der")||(this.encoders[g]=this._createNamed(d[g])),this.encoders[g]},T.prototype.encode=function(g,b,l){return this._getEncoder(b).encode(g,l)}},90585:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(41736),f=E(32719).b,T=E(11755).Buffer;function g(l,h){f.call(this,h),T.isBuffer(l)?(this.base=l,this.offset=0,this.length=l.length):this.error("Input not Buffer")}function b(l,h){if(Array.isArray(l))this.length=0,this.value=l.map(function(u){return b.isEncoderBuffer(u)||(u=new b(u,h)),this.length+=u.length,u},this);else if("number"==typeof l){if(!(0<=l&&l<=255))return h.error("non-byte EncoderBuffer value");this.value=l,this.length=1}else if("string"==typeof l)this.value=l,this.length=T.byteLength(l);else{if(!T.isBuffer(l))return h.error("Unsupported type: "+(0,d.default)(l));this.value=l,this.length=l.length}}x(g,f),O.C=g,g.isDecoderBuffer=function(l){return l instanceof g||"object"===(0,d.default)(l)&&T.isBuffer(l.base)&&"DecoderBuffer"===l.constructor.name&&"number"==typeof l.offset&&"number"==typeof l.length&&"function"==typeof l.save&&"function"==typeof l.restore&&"function"==typeof l.isEmpty&&"function"==typeof l.readUInt8&&"function"==typeof l.skip&&"function"==typeof l.raw},g.prototype.save=function(){return{offset:this.offset,reporter:f.prototype.save.call(this)}},g.prototype.restore=function(l){var h=new g(this.base);return h.offset=l.offset,h.length=this.offset,this.offset=l.offset,f.prototype.restore.call(this,l.reporter),h},g.prototype.isEmpty=function(){return this.offset===this.length},g.prototype.readUInt8=function(l){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(l||"DecoderBuffer overrun")},g.prototype.skip=function(l,h){if(!(this.offset+l<=this.length))return this.error(h||"DecoderBuffer overrun");var u=new g(this.base);return u._reporterState=this._reporterState,u.offset=this.offset,u.length=this.offset+l,this.offset+=l,u},g.prototype.raw=function(l){return this.base.slice(l?l.offset:this.offset,this.length)},O.R=b,b.isEncoderBuffer=function(l){return l instanceof b||"object"===(0,d.default)(l)&&"EncoderBuffer"===l.constructor.name&&"number"==typeof l.length&&"function"==typeof l.join},b.prototype.join=function(l,h){return l||(l=T.alloc(this.length)),h||(h=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(u){u.join(l,h),h+=u.length}):("number"==typeof this.value?l[h]=this.value:"string"==typeof this.value?l.write(this.value,h):T.isBuffer(this.value)&&this.value.copy(l,h),h+=this.length)),l}},12412:(q,O,E)=>{"use strict";var d=O;d.Reporter=E(32719).b,d.DecoderBuffer=E(90585).C,d.EncoderBuffer=E(90585).R,d.Node=E(51371)},51371:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(32719).b,f=E(90585).R,T=E(90585).C,g=E(94504),b=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(b);function h(m,_,w){var S={};this._baseState=S,S.name=w,S.enc=m,S.parent=_||null,S.children=null,S.tag=null,S.args=null,S.reverseArgs=null,S.choice=null,S.optional=!1,S.any=!1,S.obj=!1,S.use=null,S.useDecoder=null,S.key=null,S.default=null,S.explicit=null,S.implicit=null,S.contains=null,S.parent||(S.children=[],this._wrap())}q.exports=h;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){var m=this._baseState,_={};u.forEach(function(S){_[S]=m[S]});var w=new this.constructor(_.parent);return w._baseState=_,w},h.prototype._wrap=function(){var m=this._baseState;l.forEach(function(_){this[_]=function(){var w=new this.constructor(this);return m.children.push(w),w[_].apply(w,arguments)}},this)},h.prototype._init=function(m){var _=this._baseState;g(null===_.parent),m.call(this),_.children=_.children.filter(function(w){return w._baseState.parent===this},this),g.equal(_.children.length,1,"Root node can have only one child")},h.prototype._useArgs=function(m){var _=this._baseState,w=m.filter(function(S){return S instanceof this.constructor},this);m=m.filter(function(S){return!(S instanceof this.constructor)},this),0!==w.length&&(g(null===_.children),_.children=w,w.forEach(function(S){S._baseState.parent=this},this)),0!==m.length&&(g(null===_.args),_.args=m,_.reverseArgs=m.map(function(S){if("object"!==(0,d.default)(S)||S.constructor!==Object)return S;var I={};return Object.keys(S).forEach(function(P){P==(0|P)&&(P|=0),I[S[P]]=P}),I}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(m){h.prototype[m]=function(){throw new Error(m+" not implemented for encoding: "+this._baseState.enc)}}),b.forEach(function(m){h.prototype[m]=function(){var _=this._baseState,w=Array.prototype.slice.call(arguments);return g(null===_.tag),_.tag=m,this._useArgs(w),this}}),h.prototype.use=function(m){g(m);var _=this._baseState;return g(null===_.use),_.use=m,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(m){var _=this._baseState;return g(null===_.default),_.default=m,_.optional=!0,this},h.prototype.explicit=function(m){var _=this._baseState;return g(null===_.explicit&&null===_.implicit),_.explicit=m,this},h.prototype.implicit=function(m){var _=this._baseState;return g(null===_.explicit&&null===_.implicit),_.implicit=m,this},h.prototype.obj=function(){var m=this._baseState,_=Array.prototype.slice.call(arguments);return m.obj=!0,0!==_.length&&this._useArgs(_),this},h.prototype.key=function(m){var _=this._baseState;return g(null===_.key),_.key=m,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(m){var _=this._baseState;return g(null===_.choice),_.choice=m,this._useArgs(Object.keys(m).map(function(w){return m[w]})),this},h.prototype.contains=function(m){var _=this._baseState;return g(null===_.use),_.contains=m,this},h.prototype._decode=function(m,_){var w=this._baseState;if(null===w.parent)return m.wrapResult(w.children[0]._decode(m,_));var S,I=w.default,P=!0,L=null;if(null!==w.key&&(L=m.enterKey(w.key)),w.optional){var V=null;if(null!==w.explicit?V=w.explicit:null!==w.implicit?V=w.implicit:null!==w.tag&&(V=w.tag),null!==V||w.any){if(P=this._peekTag(m,V,w.any),m.isError(P))return P}else{var W=m.save();try{null===w.choice?this._decodeGeneric(w.tag,m,_):this._decodeChoice(m,_),P=!0}catch{P=!1}m.restore(W)}}if(w.obj&&P&&(S=m.enterObject()),P){if(null!==w.explicit){var G=this._decodeTag(m,w.explicit);if(m.isError(G))return G;m=G}var H=m.offset;if(null===w.use&&null===w.choice){var j;w.any&&(j=m.save());var K=this._decodeTag(m,null!==w.implicit?w.implicit:w.tag,w.any);if(m.isError(K))return K;w.any?I=m.raw(j):m=K}if(_&&_.track&&null!==w.tag&&_.track(m.path(),H,m.length,"tagged"),_&&_.track&&null!==w.tag&&_.track(m.path(),m.offset,m.length,"content"),w.any||(I=null===w.choice?this._decodeGeneric(w.tag,m,_):this._decodeChoice(m,_)),m.isError(I))return I;if(w.any||null!==w.choice||null===w.children||w.children.forEach(function(o){o._decode(m,_)}),w.contains&&("octstr"===w.tag||"bitstr"===w.tag)){var R=new T(I);I=this._getUse(w.contains,m._reporterState.obj)._decode(R,_)}}return w.obj&&P&&(I=m.leaveObject(S)),null===w.key||null===I&&!0!==P?null!==L&&m.exitKey(L):m.leaveKey(L,w.key,I),I},h.prototype._decodeGeneric=function(m,_,w){var S=this._baseState;return"seq"===m||"set"===m?null:"seqof"===m||"setof"===m?this._decodeList(_,m,S.args[0],w):/str$/.test(m)?this._decodeStr(_,m,w):"objid"===m&&S.args?this._decodeObjid(_,S.args[0],S.args[1],w):"objid"===m?this._decodeObjid(_,null,null,w):"gentime"===m||"utctime"===m?this._decodeTime(_,m,w):"null_"===m?this._decodeNull(_,w):"bool"===m?this._decodeBool(_,w):"objDesc"===m?this._decodeStr(_,m,w):"int"===m||"enum"===m?this._decodeInt(_,S.args&&S.args[0],w):null!==S.use?this._getUse(S.use,_._reporterState.obj)._decode(_,w):_.error("unknown tag: "+m)},h.prototype._getUse=function(m,_){var w=this._baseState;return w.useDecoder=this._use(m,_),g(null===w.useDecoder._baseState.parent),w.useDecoder=w.useDecoder._baseState.children[0],w.implicit!==w.useDecoder._baseState.implicit&&(w.useDecoder=w.useDecoder.clone(),w.useDecoder._baseState.implicit=w.implicit),w.useDecoder},h.prototype._decodeChoice=function(m,_){var w=this._baseState,S=null,I=!1;return Object.keys(w.choice).some(function(P){var L=m.save(),V=w.choice[P];try{var W=V._decode(m,_);if(m.isError(W))return!1;S={type:P,value:W},I=!0}catch{return m.restore(L),!1}return!0},this),I?S:m.error("Choice not matched")},h.prototype._createEncoderBuffer=function(m){return new f(m,this.reporter)},h.prototype._encode=function(m,_,w){var S=this._baseState;if(null===S.default||S.default!==m){var I=this._encodeValue(m,_,w);if(void 0!==I&&!this._skipDefault(I,_,w))return I}},h.prototype._encodeValue=function(m,_,w){var S=this._baseState;if(null===S.parent)return S.children[0]._encode(m,_||new x);var I=null;if(this.reporter=_,S.optional&&void 0===m){if(null===S.default)return;m=S.default}var P=null,L=!1;if(S.any)I=this._createEncoderBuffer(m);else if(S.choice)I=this._encodeChoice(m,_);else if(S.contains)P=this._getUse(S.contains,w)._encode(m,_),L=!0;else if(S.children)P=S.children.map(function(H){if("null_"===H._baseState.tag)return H._encode(null,_,m);if(null===H._baseState.key)return _.error("Child should have a key");var j=_.enterKey(H._baseState.key);if("object"!==(0,d.default)(m))return _.error("Child expected, but input is not object");var K=H._encode(m[H._baseState.key],_,m);return _.leaveKey(j),K},this).filter(function(H){return H}),P=this._createEncoderBuffer(P);else if("seqof"===S.tag||"setof"===S.tag){if(!S.args||1!==S.args.length)return _.error("Too many args for : "+S.tag);if(!Array.isArray(m))return _.error("seqof/setof, but data is not Array");var V=this.clone();V._baseState.implicit=null,P=this._createEncoderBuffer(m.map(function(H){return this._getUse(this._baseState.args[0],m)._encode(H,_)},V))}else null!==S.use?I=this._getUse(S.use,w)._encode(m,_):(P=this._encodePrimitive(S.tag,m),L=!0);if(!S.any&&null===S.choice){var W=null!==S.implicit?S.implicit:S.tag,G=null===S.implicit?"universal":"context";null===W?null===S.use&&_.error("Tag could be omitted only for .use()"):null===S.use&&(I=this._encodeComposite(W,L,G,P))}return null!==S.explicit&&(I=this._encodeComposite(S.explicit,!1,"context",I)),I},h.prototype._encodeChoice=function(m,_){var w=this._baseState,S=w.choice[m.type];return S||g(!1,m.type+" not found in "+JSON.stringify(Object.keys(w.choice))),S._encode(m.value,_)},h.prototype._encodePrimitive=function(m,_){var w=this._baseState;if(/str$/.test(m))return this._encodeStr(_,m);if("objid"===m&&w.args)return this._encodeObjid(_,w.reverseArgs[0],w.args[1]);if("objid"===m)return this._encodeObjid(_,null,null);if("gentime"===m||"utctime"===m)return this._encodeTime(_,m);if("null_"===m)return this._encodeNull();if("int"===m||"enum"===m)return this._encodeInt(_,w.args&&w.reverseArgs[0]);if("bool"===m)return this._encodeBool(_);if("objDesc"===m)return this._encodeStr(_,m);throw new Error("Unsupported tag: "+m)},h.prototype._isNumstr=function(m){return/^[0-9 ]*$/.test(m)},h.prototype._isPrintstr=function(m){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(m)}},32719:(q,O,E)=>{"use strict";var d=E(41736);function x(T){this._reporterState={obj:null,path:[],options:T||{},errors:[]}}function f(T,g){this.path=T,this.rethrow(g)}O.b=x,x.prototype.isError=function(T){return T instanceof f},x.prototype.save=function(){var T=this._reporterState;return{obj:T.obj,pathLen:T.path.length}},x.prototype.restore=function(T){var g=this._reporterState;g.obj=T.obj,g.path=g.path.slice(0,T.pathLen)},x.prototype.enterKey=function(T){return this._reporterState.path.push(T)},x.prototype.exitKey=function(T){var g=this._reporterState;g.path=g.path.slice(0,T-1)},x.prototype.leaveKey=function(T,g,b){var l=this._reporterState;this.exitKey(T),null!==l.obj&&(l.obj[g]=b)},x.prototype.path=function(){return this._reporterState.path.join("/")},x.prototype.enterObject=function(){var T=this._reporterState,g=T.obj;return T.obj={},g},x.prototype.leaveObject=function(T){var g=this._reporterState,b=g.obj;return g.obj=T,b},x.prototype.error=function(T){var g,b=this._reporterState,l=T instanceof f;if(g=l?T:new f(b.path.map(function(h){return"["+JSON.stringify(h)+"]"}).join(""),T.message||T,T.stack),!b.options.partial)throw g;return l||b.errors.push(g),g},x.prototype.wrapResult=function(T){var g=this._reporterState;return g.options.partial?{result:this.isError(T)?null:T,errors:g.errors}:T},d(f,Error),f.prototype.rethrow=function(T){if(this.message=T+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,f),!this.stack)try{throw new Error(this.message)}catch(g){this.stack=g.stack}return this}},6520:(q,O)=>{"use strict";function E(d){var x={};return Object.keys(d).forEach(function(f){(0|f)==f&&(f|=0),x[d[f]]=f}),x}O.tagClass={0:"universal",1:"application",2:"context",3:"private"},O.tagClassByName=E(O.tagClass),O.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},O.tagByName=E(O.tag)},79387:(q,O,E)=>{"use strict";var d=O;d._reverse=function(x){var f={};return Object.keys(x).forEach(function(T){(0|T)==T&&(T|=0),f[x[T]]=T}),f},d.der=E(6520)},92387:(q,O,E)=>{"use strict";var d=E(41736),x=E(31734),f=E(90585).C,T=E(51371),g=E(6520);function b(m){this.enc="der",this.name=m.name,this.entity=m,this.tree=new l,this.tree._init(m.body)}function l(m){T.call(this,"der",m)}function h(m,_){var w=m.readUInt8(_);if(m.isError(w))return w;var S=g.tagClass[w>>6],I=0==(32&w);if(31==(31&w)){var P=w;for(w=0;128==(128&P);){if(P=m.readUInt8(_),m.isError(P))return P;w<<=7,w|=127&P}}else w&=31;return{cls:S,primitive:I,tag:w,tagStr:g.tag[w]}}function u(m,_,w){var S=m.readUInt8(w);if(m.isError(S))return S;if(!_&&128===S)return null;if(0==(128&S))return S;var I=127&S;if(I>4)return m.error("length octect is too long");S=0;for(var P=0;P{"use strict";var d=O;d.der=E(92387),d.pem=E(50529)},50529:(q,O,E)=>{"use strict";var d=E(41736),x=E(11755).Buffer,f=E(92387);function T(g){f.call(this,g),this.enc="pem"}d(T,f),q.exports=T,T.prototype.decode=function(g,b){for(var l=g.toString().split(/[\r\n]+/g),h=b.label.toUpperCase(),u=/^-----(BEGIN|END) ([^-]+)-----$/,m=-1,_=-1,w=0;w{"use strict";var d=E(41736),x=E(11755).Buffer,f=E(51371),T=E(6520);function g(h){this.enc="der",this.name=h.name,this.entity=h,this.tree=new b,this.tree._init(h.body)}function b(h){f.call(this,"der",h)}function l(h){return h<10?"0"+h:h}q.exports=g,g.prototype.encode=function(h,u){return this.tree._encode(h,u).join()},d(b,f),b.prototype._encodeComposite=function(h,u,m,_){var w=function(G,H,j,K){var R;if("seqof"===G?G="seq":"setof"===G&&(G="set"),T.tagByName.hasOwnProperty(G))R=T.tagByName[G];else{if("number"!=typeof G||(0|G)!==G)return K.error("Unknown tag: "+G);R=G}return R>=31?K.error("Multi-octet tag encoding unsupported"):(H||(R|=32),R|=T.tagClassByName[j||"universal"]<<6)}(h,u,m,this.reporter);if(_.length<128){var S=x.alloc(2);return S[0]=w,S[1]=_.length,this._createEncoderBuffer([S,_])}for(var I=1,P=_.length;P>=256;P>>=8)I++;var L=x.alloc(2+I);L[0]=w,L[1]=128|I;for(var V=1+I,W=_.length;W>0;V--,W>>=8)L[V]=255&W;return this._createEncoderBuffer([L,_])},b.prototype._encodeStr=function(h,u){if("bitstr"===u)return this._createEncoderBuffer([0|h.unused,h.data]);if("bmpstr"===u){for(var m=x.alloc(2*h.length),_=0;_=40)return this.reporter.error("Second objid identifier OOB");h.splice(0,2,40*h[0]+h[1])}for(var S=0,I=0;I=128;P>>=7)S++}for(var L=x.alloc(S),V=L.length-1,W=h.length-1;W>=0;W--){var G=h[W];for(L[V--]=127&G;(G>>=7)>0;)L[V--]=128|127&G}return this._createEncoderBuffer(L)},b.prototype._encodeTime=function(h,u){var m,_=new Date(h);return"gentime"===u?m=[l(_.getUTCFullYear()),l(_.getUTCMonth()+1),l(_.getUTCDate()),l(_.getUTCHours()),l(_.getUTCMinutes()),l(_.getUTCSeconds()),"Z"].join(""):"utctime"===u?m=[l(_.getUTCFullYear()%100),l(_.getUTCMonth()+1),l(_.getUTCDate()),l(_.getUTCHours()),l(_.getUTCMinutes()),l(_.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+u+" time is not supported yet"),this._encodeStr(m,"octstr")},b.prototype._encodeNull=function(){return this._createEncoderBuffer("")},b.prototype._encodeInt=function(h,u){if("string"==typeof h){if(!u)return this.reporter.error("String int or enum given, but no values map");if(!u.hasOwnProperty(h))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(h));h=u[h]}if("number"!=typeof h&&!x.isBuffer(h)){var m=h.toArray();!h.sign&&128&m[0]&&m.unshift(0),h=x.from(m)}if(x.isBuffer(h)){var _=h.length;0===h.length&&_++;var w=x.alloc(_);return h.copy(w),0===h.length&&(w[0]=0),this._createEncoderBuffer(w)}if(h<128)return this._createEncoderBuffer(h);if(h<256)return this._createEncoderBuffer([0,h]);for(var S=1,I=h;I>=256;I>>=8)S++;for(var P=new Array(S),L=P.length-1;L>=0;L--)P[L]=255&h,h>>=8;return 128&P[0]&&P.unshift(0),this._createEncoderBuffer(x.from(P))},b.prototype._encodeBool=function(h){return this._createEncoderBuffer(h?255:0)},b.prototype._use=function(h,u){return"function"==typeof h&&(h=h(u)),h._getEncoder("der").tree},b.prototype._skipDefault=function(h,u,m){var _,w=this._baseState;if(null===w.default)return!1;var S=h.join();if(void 0===w.defaultBuffer&&(w.defaultBuffer=this._encodeValue(w.default,u,m).join()),S.length!==w.defaultBuffer.length)return!1;for(_=0;_{"use strict";var d=O;d.der=E(11068),d.pem=E(38520)},38520:(q,O,E)=>{"use strict";var d=E(41736),x=E(11068);function f(T){x.call(this,T),this.enc="pem"}d(f,x),q.exports=f,f.prototype.encode=function(T,g){for(var b=x.prototype.encode.call(this,T).toString("base64"),l=["-----BEGIN "+g.label+"-----"],h=0;h{"use strict";var d=E(28847)(E(3355)),x=E(33103);function f(R,o){if(R===o)return 0;for(var y=R.length,M=o.length,v=0,k=Math.min(y,M);v=0;ee--)if(ce[ee]!==ue[ee])return!1;for(ee=ce.length-1;ee>=0;ee--)if(!W(k[Q=ce[ee]],D[Q],N,C))return!1;return!0}(R,o,y,M))}return y?R===o:R==o}function G(R){return"[object Arguments]"==Object.prototype.toString.call(R)}function H(R,o){if(!R||!o)return!1;if("[object RegExp]"==Object.prototype.toString.call(o))return o.test(R);try{if(R instanceof o)return!0}catch{}return!Error.isPrototypeOf(o)&&!0===o.call({},R)}function j(R,o,y,M){var v;if("function"!=typeof o)throw new TypeError('"block" argument must be a function');"string"==typeof y&&(M=y,y=null),v=function(N){var C;try{N()}catch(a){C=a}return C}(o),M=(y&&y.name?" ("+y.name+").":".")+(M?" "+M:"."),R&&!v&&L(v,y,"Missing expected exception"+M);var k="string"==typeof M,D=!R&&v&&!y;if((!R&&g.isError(v)&&k&&H(v,y)||D)&&L(v,y,"Got unwanted exception"+M),R&&v&&y&&!H(v,y)||!R&&v)throw v}_.AssertionError=function(R){this.name="AssertionError",this.actual=R.actual,this.expected=R.expected,this.operator=R.operator,R.message?(this.message=R.message,this.generatedMessage=!1):(this.message=I(P(this.actual),128)+" "+this.operator+" "+I(P(this.expected),128),this.generatedMessage=!0);var o=R.stackStartFunction||L;if(Error.captureStackTrace)Error.captureStackTrace(this,o);else{var y=new Error;if(y.stack){var M=y.stack,v=S(o),k=M.indexOf("\n"+v);if(k>=0){var D=M.indexOf("\n",k+1);M=M.substring(D+1)}this.stack=M}}},g.inherits(_.AssertionError,Error),_.fail=L,_.ok=V,_.equal=function(R,o,y){R!=o&&L(R,o,y,"==",_.equal)},_.notEqual=function(R,o,y){R==o&&L(R,o,y,"!=",_.notEqual)},_.deepEqual=function(R,o,y){W(R,o,!1)||L(R,o,y,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(R,o,y){W(R,o,!0)||L(R,o,y,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(R,o,y){W(R,o,!1)&&L(R,o,y,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function R(o,y,M){W(o,y,!0)&&L(o,y,M,"notDeepStrictEqual",R)},_.strictEqual=function(R,o,y){R!==o&&L(R,o,y,"===",_.strictEqual)},_.notStrictEqual=function(R,o,y){R===o&&L(R,o,y,"!==",_.notStrictEqual)},_.throws=function(R,o,y){j(!0,R,o,y)},_.doesNotThrow=function(R,o,y){j(!1,R,o,y)},_.ifError=function(R){if(R)throw R},_.strict=x(function R(o,y){o||L(o,!0,y,"==",R)},_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict;var K=Object.keys||function(R){var o=[];for(var y in R)b.call(R,y)&&o.push(y);return o}},94074:q=>{"use strict";q.exports="function"==typeof Object.create?function(O,E){O.super_=E,O.prototype=Object.create(E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}})}:function(O,E){O.super_=E;var d=function(){};d.prototype=E.prototype,O.prototype=new d,O.prototype.constructor=O}},86732:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));q.exports=function(x){return x&&"object"===(0,d.default)(x)&&"function"==typeof x.copy&&"function"==typeof x.fill&&"function"==typeof x.readUInt8}},69954:(q,O,E)=>{"use strict";var d=E(19142),x=E(28847)(E(3355)),f=/%[sdj%]/g;O.format=function(v){if(!L(v)){for(var k=[],D=0;D=C)return Q;switch(Q){case"%s":return String(N[D++]);case"%d":return Number(N[D++]);case"%j":try{return JSON.stringify(N[D++])}catch{return"[Circular]"}default:return Q}}),B=N[D];D=3&&(D.depth=arguments[2]),arguments.length>=4&&(D.colors=arguments[3]),S(k)?D.showHidden=k:k&&O._extend(D,k),V(D.showHidden)&&(D.showHidden=!1),V(D.depth)&&(D.depth=2),V(D.colors)&&(D.colors=!1),V(D.customInspect)&&(D.customInspect=!0),D.colors&&(D.stylize=l),u(D,v,D.depth)}function l(v,k){var D=b.styles[k];return D?"\x1b["+b.colors[D][0]+"m"+v+"\x1b["+b.colors[D][1]+"m":v}function h(v,k){return v}function u(v,k,D){if(v.customInspect&&k&&K(k.inspect)&&k.inspect!==O.inspect&&(!k.constructor||k.constructor.prototype!==k)){var N=k.inspect(D,v);return L(N)||(N=u(v,N,D)),N}var C=function(ae,Te){if(V(Te))return ae.stylize("undefined","undefined");if(L(Te)){var le="'"+JSON.stringify(Te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ae.stylize(le,"string")}return P(Te)?ae.stylize(""+Te,"number"):S(Te)?ae.stylize(""+Te,"boolean"):I(Te)?ae.stylize("null","null"):void 0}(v,k);if(C)return C;var Te,a=Object.keys(k),B=(Te={},a.forEach(function(le,X){Te[le]=!0}),Te);if(v.showHidden&&(a=Object.getOwnPropertyNames(k)),j(k)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return m(k);if(0===a.length){if(K(k))return v.stylize("[Function"+(k.name?": "+k.name:"")+"]","special");if(W(k))return v.stylize(RegExp.prototype.toString.call(k),"regexp");if(H(k))return v.stylize(Date.prototype.toString.call(k),"date");if(j(k))return m(k)}var ee,ce="",ue=!1,we=["{","}"];return w(k)&&(ue=!0,we=["[","]"]),K(k)&&(ce=" [Function"+(k.name?": "+k.name:"")+"]"),W(k)&&(ce=" "+RegExp.prototype.toString.call(k)),H(k)&&(ce=" "+Date.prototype.toUTCString.call(k)),j(k)&&(ce=" "+m(k)),0!==a.length||ue&&0!=k.length?D<0?W(k)?v.stylize(RegExp.prototype.toString.call(k),"regexp"):v.stylize("[Object]","special"):(v.seen.push(k),ee=ue?function(ae,Te,le,X,ne){for(var pe=[],_e=0,xe=Te.length;_e60?le[0]+(""===Te?"":Te+"\n ")+" "+ae.join(",\n ")+" "+le[1]:le[0]+Te+" "+ae.join(", ")+" "+le[1]}(ee,ce,we)):we[0]+ce+we[1]}function m(v){return"["+Error.prototype.toString.call(v)+"]"}function _(v,k,D,N,C,a){var B,Q,ee;if((ee=Object.getOwnPropertyDescriptor(k,C)||{value:k[C]}).get?Q=v.stylize(ee.set?"[Getter/Setter]":"[Getter]","special"):ee.set&&(Q=v.stylize("[Setter]","special")),M(N,C)||(B="["+C+"]"),Q||(v.seen.indexOf(ee.value)<0?(Q=I(D)?u(v,ee.value,null):u(v,ee.value,D-1)).indexOf("\n")>-1&&(Q=a?Q.split("\n").map(function(ce){return" "+ce}).join("\n").substr(2):"\n"+Q.split("\n").map(function(ce){return" "+ce}).join("\n")):Q=v.stylize("[Circular]","special")),V(B)){if(a&&C.match(/^\d+$/))return Q;(B=JSON.stringify(""+C)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.substr(1,B.length-2),B=v.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=v.stylize(B,"string"))}return B+": "+Q}function w(v){return Array.isArray(v)}function S(v){return"boolean"==typeof v}function I(v){return null===v}function P(v){return"number"==typeof v}function L(v){return"string"==typeof v}function V(v){return void 0===v}function W(v){return G(v)&&"[object RegExp]"===R(v)}function G(v){return"object"===(0,x.default)(v)&&null!==v}function H(v){return G(v)&&"[object Date]"===R(v)}function j(v){return G(v)&&("[object Error]"===R(v)||v instanceof Error)}function K(v){return"function"==typeof v}function R(v){return Object.prototype.toString.call(v)}function o(v){return v<10?"0"+v.toString(10):v.toString(10)}O.debuglog=function(v){if(V(T)&&(T=d.env.NODE_DEBUG||""),v=v.toUpperCase(),!g[v])if(new RegExp("\\b"+v+"\\b","i").test(T)){var k=d.pid;g[v]=function(){var D=O.format.apply(O,arguments);console.error("%s %d: %s",v,k,D)}}else g[v]=function(){};return g[v]},O.inspect=b,b.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]},b.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},O.isArray=w,O.isBoolean=S,O.isNull=I,O.isNullOrUndefined=function(v){return null==v},O.isNumber=P,O.isString=L,O.isSymbol=function(v){return"symbol"===(0,x.default)(v)},O.isUndefined=V,O.isRegExp=W,O.isObject=G,O.isDate=H,O.isError=j,O.isFunction=K,O.isPrimitive=function(v){return null===v||"boolean"==typeof v||"number"==typeof v||"string"==typeof v||"symbol"===(0,x.default)(v)||void 0===v},O.isBuffer=E(86732);var y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(v,k){return Object.prototype.hasOwnProperty.call(v,k)}O.log=function(){var v,k;console.log("%s - %s",(k=[o((v=new Date).getHours()),o(v.getMinutes()),o(v.getSeconds())].join(":"),[v.getDate(),y[v.getMonth()],k].join(" ")),O.format.apply(O,arguments))},O.inherits=E(94074),O._extend=function(v,k){if(!k||!G(k))return v;for(var D=Object.keys(k),N=D.length;N--;)v[D[N]]=k[D[N]];return v}},27548:(q,O,E)=>{"use strict";var d=E(48850).Buffer;q.exports=function(x){if(x.length>=255)throw new TypeError("Alphabet too long");for(var f=new Uint8Array(256),T=0;T>>0,W=new Uint8Array(V);S[I];){var G=f[S.charCodeAt(I)];if(255===G)return;for(var H=0,j=V-1;(0!==G||H>>0)%256>>>0,G=G/256>>>0;if(0!==G)throw new Error("Non-zero carry");L=H,I++}for(var K=V-L;K!==V&&0===W[K];)K++;var R=d.allocUnsafe(P+(V-K));R.fill(0,0,P);for(var o=P;K!==V;)R[o++]=W[K++];return R}return{encode:function(S){if((Array.isArray(S)||S instanceof Uint8Array)&&(S=d.from(S)),!d.isBuffer(S))throw new TypeError("Expected Buffer");if(0===S.length)return"";for(var I=0,P=0,L=0,V=S.length;L!==V&&0===S[L];)L++,I++;for(var W=(V-L)*_+1>>>0,G=new Uint8Array(W);L!==V;){for(var H=S[L],j=0,K=W-1;(0!==H||j>>0)%h>>>0,H=H/h>>>0;if(0!==H)throw new Error("Non-zero carry");P=j,L++}for(var R=W-P;R!==W&&0===G[R];)R++;for(var o=u.repeat(I);R{"use strict";O.byteLength=function(h){var u=b(h),_=u[1];return 3*(u[0]+_)/4-_},O.toByteArray=function(h){var u,m,G,_=b(h),w=_[0],S=_[1],I=new x(3*(w+(G=S))/4-G),P=0,L=S>0?w-4:w;for(m=0;m>16&255,I[P++]=u>>8&255,I[P++]=255&u;return 2===S&&(u=d[h.charCodeAt(m)]<<2|d[h.charCodeAt(m+1)]>>4,I[P++]=255&u),1===S&&(u=d[h.charCodeAt(m)]<<10|d[h.charCodeAt(m+1)]<<4|d[h.charCodeAt(m+2)]>>2,I[P++]=u>>8&255,I[P++]=255&u),I},O.fromByteArray=function(h){for(var u,m=h.length,_=m%3,w=[],S=16383,I=0,P=m-_;IP?P:I+S));return 1===_?w.push(E[(u=h[m-1])>>2]+E[u<<4&63]+"=="):2===_&&w.push(E[(u=(h[m-2]<<8)+h[m-1])>>10]+E[u>>4&63]+E[u<<2&63]+"="),w.join("")};for(var E=[],d=[],x="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=0,g=f.length;T0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");return-1===m&&(m=u),[m,m===u?0:4-m%4]}function l(h,u,m){for(var w,S=[],I=u;I>18&63]+E[w>>12&63]+E[w>>6&63]+E[63&w]);return S.join("")}d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63},31734:(q,O,E)=>{"use strict";q=E.nmd(q);var d=E(28847)(E(3355));!function(x,f){function T(D,N){if(!D)throw new Error(N||"Assertion failed")}function g(D,N){D.super_=N;var C=function(){};C.prototype=N.prototype,D.prototype=new C,D.prototype.constructor=D}function b(D,N,C){if(b.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,null!==D&&("le"!==N&&"be"!==N||(C=N,N=10),this._init(D||0,N||10,C||"be"))}var l;"object"===(0,d.default)(x)?x.exports=b:(void 0).BN=b,b.BN=b,b.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:E(29033).Buffer}catch{}function h(D,N){var C=D.charCodeAt(N);return C>=48&&C<=57?C-48:C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:void T(!1,"Invalid character in "+D)}function u(D,N,C){var a=h(D,C);return C-1>=N&&(a|=h(D,C-1)<<4),a}function m(D,N,C,a){for(var B=0,Q=0,ee=Math.min(D.length,C),ce=N;ce=49?ue-49+10:ue>=17?ue-17+10:ue,T(ue>=0&&Q0?D:N},b.min=function(D,N){return D.cmp(N)<0?D:N},b.prototype._init=function(D,N,C){if("number"==typeof D)return this._initNumber(D,N,C);if("object"===(0,d.default)(D))return this._initArray(D,N,C);"hex"===N&&(N=16),T(N===(0|N)&&N>=2&&N<=36);var a=0;"-"===(D=D.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)this.words[B]|=(Q=D[a]|D[a-1]<<8|D[a-2]<<16)<>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,B++);else if("le"===C)for(a=0,B=0;a>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,B++);return this._strip()},b.prototype._parseHex=function(D,N,C){this.length=Math.ceil((D.length-N)/6),this.words=new Array(this.length);for(var a=0;a=N;a-=2)B=u(D,N,a)<=18?(Q-=18,this.words[ee+=1]|=B>>>26):Q+=8;else for(a=(D.length-N)%2==0?N+1:N;a=18?(Q-=18,this.words[ee+=1]|=B>>>26):Q+=8;this._strip()},b.prototype._parseBase=function(D,N,C){this.words=[0],this.length=1;for(var a=0,B=1;B<=67108863;B*=N)a++;a--,B=B/N|0;for(var Q=D.length-C,ee=Q%a,ce=Math.min(Q,Q-ee)+C,ue=0,we=C;we1&&0===this.words[this.length-1];)this.length--;return this._normSign()},b.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{b.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{b.prototype.inspect=w}else b.prototype.inspect=w;function w(){return(this.red?""}var S=["","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"],I=[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 L(D,N,C){C.negative=N.negative^D.negative;var a=D.length+N.length|0;C.length=a,a=a-1|0;var B=0|D.words[0],Q=0|N.words[0],ee=B*Q,ue=ee/67108864|0;C.words[0]=67108863ⅇfor(var we=1;we>>26,Te=67108863&ue,le=Math.min(we,N.length-1),X=Math.max(0,we-D.length+1);X<=le;X++)ae+=(ee=(B=0|D.words[we-X|0])*(Q=0|N.words[X])+Te)/67108864|0,Te=67108863ⅇC.words[we]=0|Te,ue=0|ae}return 0!==ue?C.words[we]=0|ue:C.length--,C._strip()}b.prototype.toString=function(D,N){var C;if(N=0|N||1,16===(D=D||10)||"hex"===D){C="";for(var a=0,B=0,Q=0;Q>>24-a&16777215,(a+=2)>=26&&(a-=26,Q--),C=0!==B||Q!==this.length-1?S[6-ce.length]+ce+C:ce+C}for(0!==B&&(C=B.toString(16)+C);C.length%N!=0;)C="0"+C;return 0!==this.negative&&(C="-"+C),C}if(D===(0|D)&&D>=2&&D<=36){var ue=I[D],we=P[D];C="";var ae=this.clone();for(ae.negative=0;!ae.isZero();){var Te=ae.modrn(we).toString(D);C=(ae=ae.idivn(we)).isZero()?Te+C:S[ue-Te.length]+Te+C}for(this.isZero()&&(C="0"+C);C.length%N!=0;)C="0"+C;return 0!==this.negative&&(C="-"+C),C}T(!1,"Base should be between 2 and 36")},b.prototype.toNumber=function(){var D=this.words[0];return 2===this.length?D+=67108864*this.words[1]:3===this.length&&1===this.words[2]?D+=4503599627370496+67108864*this.words[1]:this.length>2&&T(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-D:D},b.prototype.toJSON=function(){return this.toString(16,2)},l&&(b.prototype.toBuffer=function(D,N){return this.toArrayLike(l,D,N)}),b.prototype.toArray=function(D,N){return this.toArrayLike(Array,D,N)},b.prototype.toArrayLike=function(D,N,C){this._strip();var a=this.byteLength(),B=C||Math.max(1,a);T(a<=B,"byte array longer than desired length"),T(B>0,"Requested array length <= 0");var ee,ce,Q=(ce=B,(ee=D).allocUnsafe?ee.allocUnsafe(ce):new ee(ce));return this["_toArrayLike"+("le"===N?"LE":"BE")](Q,a),Q},b.prototype._toArrayLikeLE=function(D,N){for(var C=0,a=0,B=0,Q=0;B>8&255),C>16&255),6===Q?(C>24&255),a=0,Q=0):(a=ee>>>24,Q+=2)}if(C=0&&(D[C--]=ee>>8&255),C>=0&&(D[C--]=ee>>16&255),6===Q?(C>=0&&(D[C--]=ee>>24&255),a=0,Q=0):(a=ee>>>24,Q+=2)}if(C>=0)for(D[C--]=a;C>=0;)D[C--]=0},b.prototype._countBits=Math.clz32?function(D){return 32-Math.clz32(D)}:function(D){var N=D,C=0;return N>=4096&&(C+=13,N>>>=13),N>=64&&(C+=7,N>>>=7),N>=8&&(C+=4,N>>>=4),N>=2&&(C+=2,N>>>=2),C+N},b.prototype._zeroBits=function(D){if(0===D)return 26;var N=D,C=0;return 0==(8191&N)&&(C+=13,N>>>=13),0==(127&N)&&(C+=7,N>>>=7),0==(15&N)&&(C+=4,N>>>=4),0==(3&N)&&(C+=2,N>>>=2),0==(1&N)&&C++,C},b.prototype.bitLength=function(){var N=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+N},b.prototype.zeroBits=function(){if(this.isZero())return 0;for(var D=0,N=0;ND.length?this.clone().ior(D):D.clone().ior(this)},b.prototype.uor=function(D){return this.length>D.length?this.clone().iuor(D):D.clone().iuor(this)},b.prototype.iuand=function(D){var N;N=this.length>D.length?D:this;for(var C=0;CD.length?this.clone().iand(D):D.clone().iand(this)},b.prototype.uand=function(D){return this.length>D.length?this.clone().iuand(D):D.clone().iuand(this)},b.prototype.iuxor=function(D){var N,C;this.length>D.length?(N=this,C=D):(N=D,C=this);for(var a=0;aD.length?this.clone().ixor(D):D.clone().ixor(this)},b.prototype.uxor=function(D){return this.length>D.length?this.clone().iuxor(D):D.clone().iuxor(this)},b.prototype.inotn=function(D){T("number"==typeof D&&D>=0);var N=0|Math.ceil(D/26),C=D%26;this._expand(N),C>0&&N--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-C),this._strip()},b.prototype.notn=function(D){return this.clone().inotn(D)},b.prototype.setn=function(D,N){T("number"==typeof D&&D>=0);var C=D/26|0,a=D%26;return this._expand(C+1),this.words[C]=N?this.words[C]|1<D.length?(C=this,a=D):(C=D,a=this);for(var B=0,Q=0;Q>>26;for(;0!==B&&Q>>26;if(this.length=C.length,0!==B)this.words[this.length]=B,this.length++;else if(C!==this)for(;QD.length?this.clone().iadd(D):D.clone().iadd(this)},b.prototype.isub=function(D){if(0!==D.negative){D.negative=0;var N=this.iadd(D);return D.negative=1,N._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(D),this.negative=1,this._normSign();var C,a,B=this.cmp(D);if(0===B)return this.negative=0,this.length=1,this.words[0]=0,this;B>0?(C=this,a=D):(C=D,a=this);for(var Q=0,ee=0;ee>26,this.words[ee]=67108863&N;for(;0!==Q&&ee>26,this.words[ee]=67108863&N;if(0===Q&&ee>>13,X=0|ee[1],ne=8191&X,pe=X>>>13,_e=0|ee[2],xe=8191&_e,Ce=_e>>>13,ke=0|ee[3],me=8191&ke,Ee=ke>>>13,ze=0|ee[4],Ve=8191&ze,nt=ze>>>13,tt=0|ee[5],mt=8191&tt,ht=tt>>>13,wt=0|ee[6],Pt=8191&wt,st=wt>>>13,Ye=0|ee[7],gt=8191&Ye,St=Ye>>>13,Wt=0|ee[8],dn=8191&Wt,Nt=Wt>>>13,It=0|ee[9],qt=8191&It,jt=It>>>13,Yt=0|ce[0],Wn=8191&Yt,fn=Yt>>>13,$n=0|ce[1],Jr=8191&$n,Ln=$n>>>13,Bn=0|ce[2],Wr=8191&Bn,zn=Bn>>>13,bn=0|ce[3],Lr=8191&bn,Kn=bn>>>13,sr=0|ce[4],Ii=8191&sr,Un=sr>>>13,ir=0|ce[5],ts=8191&ir,Tn=ir>>>13,Qn=0|ce[6],Vi=8191&Qn,ar=Qn>>>13,br=0|ce[7],ki=8191&br,ur=br>>>13,mr=0|ce[8],Fr=8191&mr,hi=mr>>>13,wi=0|ce[9],cs=8191&wi,$i=wi>>>13;C.negative=D.negative^N.negative,C.length=19;var rs=(we+(a=Math.imul(Te,Wn))|0)+((8191&(B=(B=Math.imul(Te,fn))+Math.imul(le,Wn)|0))<<13)|0;we=((Q=Math.imul(le,fn))+(B>>>13)|0)+(rs>>>26)|0,rs&=67108863,a=Math.imul(ne,Wn),B=(B=Math.imul(ne,fn))+Math.imul(pe,Wn)|0,Q=Math.imul(pe,fn);var Xi=(we+(a=a+Math.imul(Te,Jr)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Ln)|0)+Math.imul(le,Jr)|0))<<13)|0;we=((Q=Q+Math.imul(le,Ln)|0)+(B>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,a=Math.imul(xe,Wn),B=(B=Math.imul(xe,fn))+Math.imul(Ce,Wn)|0,Q=Math.imul(Ce,fn),a=a+Math.imul(ne,Jr)|0,B=(B=B+Math.imul(ne,Ln)|0)+Math.imul(pe,Jr)|0,Q=Q+Math.imul(pe,Ln)|0;var $s=(we+(a=a+Math.imul(Te,Wr)|0)|0)+((8191&(B=(B=B+Math.imul(Te,zn)|0)+Math.imul(le,Wr)|0))<<13)|0;we=((Q=Q+Math.imul(le,zn)|0)+(B>>>13)|0)+($s>>>26)|0,$s&=67108863,a=Math.imul(me,Wn),B=(B=Math.imul(me,fn))+Math.imul(Ee,Wn)|0,Q=Math.imul(Ee,fn),a=a+Math.imul(xe,Jr)|0,B=(B=B+Math.imul(xe,Ln)|0)+Math.imul(Ce,Jr)|0,Q=Q+Math.imul(Ce,Ln)|0,a=a+Math.imul(ne,Wr)|0,B=(B=B+Math.imul(ne,zn)|0)+Math.imul(pe,Wr)|0,Q=Q+Math.imul(pe,zn)|0;var is=(we+(a=a+Math.imul(Te,Lr)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Kn)|0)+Math.imul(le,Lr)|0))<<13)|0;we=((Q=Q+Math.imul(le,Kn)|0)+(B>>>13)|0)+(is>>>26)|0,is&=67108863,a=Math.imul(Ve,Wn),B=(B=Math.imul(Ve,fn))+Math.imul(nt,Wn)|0,Q=Math.imul(nt,fn),a=a+Math.imul(me,Jr)|0,B=(B=B+Math.imul(me,Ln)|0)+Math.imul(Ee,Jr)|0,Q=Q+Math.imul(Ee,Ln)|0,a=a+Math.imul(xe,Wr)|0,B=(B=B+Math.imul(xe,zn)|0)+Math.imul(Ce,Wr)|0,Q=Q+Math.imul(Ce,zn)|0,a=a+Math.imul(ne,Lr)|0,B=(B=B+Math.imul(ne,Kn)|0)+Math.imul(pe,Lr)|0,Q=Q+Math.imul(pe,Kn)|0;var go=(we+(a=a+Math.imul(Te,Ii)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Un)|0)+Math.imul(le,Ii)|0))<<13)|0;we=((Q=Q+Math.imul(le,Un)|0)+(B>>>13)|0)+(go>>>26)|0,go&=67108863,a=Math.imul(mt,Wn),B=(B=Math.imul(mt,fn))+Math.imul(ht,Wn)|0,Q=Math.imul(ht,fn),a=a+Math.imul(Ve,Jr)|0,B=(B=B+Math.imul(Ve,Ln)|0)+Math.imul(nt,Jr)|0,Q=Q+Math.imul(nt,Ln)|0,a=a+Math.imul(me,Wr)|0,B=(B=B+Math.imul(me,zn)|0)+Math.imul(Ee,Wr)|0,Q=Q+Math.imul(Ee,zn)|0,a=a+Math.imul(xe,Lr)|0,B=(B=B+Math.imul(xe,Kn)|0)+Math.imul(Ce,Lr)|0,Q=Q+Math.imul(Ce,Kn)|0,a=a+Math.imul(ne,Ii)|0,B=(B=B+Math.imul(ne,Un)|0)+Math.imul(pe,Ii)|0,Q=Q+Math.imul(pe,Un)|0;var ji=(we+(a=a+Math.imul(Te,ts)|0)|0)+((8191&(B=(B=B+Math.imul(Te,Tn)|0)+Math.imul(le,ts)|0))<<13)|0;we=((Q=Q+Math.imul(le,Tn)|0)+(B>>>13)|0)+(ji>>>26)|0,ji&=67108863,a=Math.imul(Pt,Wn),B=(B=Math.imul(Pt,fn))+Math.imul(st,Wn)|0,Q=Math.imul(st,fn),a=a+Math.imul(mt,Jr)|0,B=(B=B+Math.imul(mt,Ln)|0)+Math.imul(ht,Jr)|0,Q=Q+Math.imul(ht,Ln)|0,a=a+Math.imul(Ve,Wr)|0,B=(B=B+Math.imul(Ve,zn)|0)+Math.imul(nt,Wr)|0,Q=Q+Math.imul(nt,zn)|0,a=a+Math.imul(me,Lr)|0,B=(B=B+Math.imul(me,Kn)|0)+Math.imul(Ee,Lr)|0,Q=Q+Math.imul(Ee,Kn)|0,a=a+Math.imul(xe,Ii)|0,B=(B=B+Math.imul(xe,Un)|0)+Math.imul(Ce,Ii)|0,Q=Q+Math.imul(Ce,Un)|0,a=a+Math.imul(ne,ts)|0,B=(B=B+Math.imul(ne,Tn)|0)+Math.imul(pe,ts)|0,Q=Q+Math.imul(pe,Tn)|0;var so=(we+(a=a+Math.imul(Te,Vi)|0)|0)+((8191&(B=(B=B+Math.imul(Te,ar)|0)+Math.imul(le,Vi)|0))<<13)|0;we=((Q=Q+Math.imul(le,ar)|0)+(B>>>13)|0)+(so>>>26)|0,so&=67108863,a=Math.imul(gt,Wn),B=(B=Math.imul(gt,fn))+Math.imul(St,Wn)|0,Q=Math.imul(St,fn),a=a+Math.imul(Pt,Jr)|0,B=(B=B+Math.imul(Pt,Ln)|0)+Math.imul(st,Jr)|0,Q=Q+Math.imul(st,Ln)|0,a=a+Math.imul(mt,Wr)|0,B=(B=B+Math.imul(mt,zn)|0)+Math.imul(ht,Wr)|0,Q=Q+Math.imul(ht,zn)|0,a=a+Math.imul(Ve,Lr)|0,B=(B=B+Math.imul(Ve,Kn)|0)+Math.imul(nt,Lr)|0,Q=Q+Math.imul(nt,Kn)|0,a=a+Math.imul(me,Ii)|0,B=(B=B+Math.imul(me,Un)|0)+Math.imul(Ee,Ii)|0,Q=Q+Math.imul(Ee,Un)|0,a=a+Math.imul(xe,ts)|0,B=(B=B+Math.imul(xe,Tn)|0)+Math.imul(Ce,ts)|0,Q=Q+Math.imul(Ce,Tn)|0,a=a+Math.imul(ne,Vi)|0,B=(B=B+Math.imul(ne,ar)|0)+Math.imul(pe,Vi)|0,Q=Q+Math.imul(pe,ar)|0;var oo=(we+(a=a+Math.imul(Te,ki)|0)|0)+((8191&(B=(B=B+Math.imul(Te,ur)|0)+Math.imul(le,ki)|0))<<13)|0;we=((Q=Q+Math.imul(le,ur)|0)+(B>>>13)|0)+(oo>>>26)|0,oo&=67108863,a=Math.imul(dn,Wn),B=(B=Math.imul(dn,fn))+Math.imul(Nt,Wn)|0,Q=Math.imul(Nt,fn),a=a+Math.imul(gt,Jr)|0,B=(B=B+Math.imul(gt,Ln)|0)+Math.imul(St,Jr)|0,Q=Q+Math.imul(St,Ln)|0,a=a+Math.imul(Pt,Wr)|0,B=(B=B+Math.imul(Pt,zn)|0)+Math.imul(st,Wr)|0,Q=Q+Math.imul(st,zn)|0,a=a+Math.imul(mt,Lr)|0,B=(B=B+Math.imul(mt,Kn)|0)+Math.imul(ht,Lr)|0,Q=Q+Math.imul(ht,Kn)|0,a=a+Math.imul(Ve,Ii)|0,B=(B=B+Math.imul(Ve,Un)|0)+Math.imul(nt,Ii)|0,Q=Q+Math.imul(nt,Un)|0,a=a+Math.imul(me,ts)|0,B=(B=B+Math.imul(me,Tn)|0)+Math.imul(Ee,ts)|0,Q=Q+Math.imul(Ee,Tn)|0,a=a+Math.imul(xe,Vi)|0,B=(B=B+Math.imul(xe,ar)|0)+Math.imul(Ce,Vi)|0,Q=Q+Math.imul(Ce,ar)|0,a=a+Math.imul(ne,ki)|0,B=(B=B+Math.imul(ne,ur)|0)+Math.imul(pe,ki)|0,Q=Q+Math.imul(pe,ur)|0;var zo=(we+(a=a+Math.imul(Te,Fr)|0)|0)+((8191&(B=(B=B+Math.imul(Te,hi)|0)+Math.imul(le,Fr)|0))<<13)|0;we=((Q=Q+Math.imul(le,hi)|0)+(B>>>13)|0)+(zo>>>26)|0,zo&=67108863,a=Math.imul(qt,Wn),B=(B=Math.imul(qt,fn))+Math.imul(jt,Wn)|0,Q=Math.imul(jt,fn),a=a+Math.imul(dn,Jr)|0,B=(B=B+Math.imul(dn,Ln)|0)+Math.imul(Nt,Jr)|0,Q=Q+Math.imul(Nt,Ln)|0,a=a+Math.imul(gt,Wr)|0,B=(B=B+Math.imul(gt,zn)|0)+Math.imul(St,Wr)|0,Q=Q+Math.imul(St,zn)|0,a=a+Math.imul(Pt,Lr)|0,B=(B=B+Math.imul(Pt,Kn)|0)+Math.imul(st,Lr)|0,Q=Q+Math.imul(st,Kn)|0,a=a+Math.imul(mt,Ii)|0,B=(B=B+Math.imul(mt,Un)|0)+Math.imul(ht,Ii)|0,Q=Q+Math.imul(ht,Un)|0,a=a+Math.imul(Ve,ts)|0,B=(B=B+Math.imul(Ve,Tn)|0)+Math.imul(nt,ts)|0,Q=Q+Math.imul(nt,Tn)|0,a=a+Math.imul(me,Vi)|0,B=(B=B+Math.imul(me,ar)|0)+Math.imul(Ee,Vi)|0,Q=Q+Math.imul(Ee,ar)|0,a=a+Math.imul(xe,ki)|0,B=(B=B+Math.imul(xe,ur)|0)+Math.imul(Ce,ki)|0,Q=Q+Math.imul(Ce,ur)|0,a=a+Math.imul(ne,Fr)|0,B=(B=B+Math.imul(ne,hi)|0)+Math.imul(pe,Fr)|0,Q=Q+Math.imul(pe,hi)|0;var Wi=(we+(a=a+Math.imul(Te,cs)|0)|0)+((8191&(B=(B=B+Math.imul(Te,$i)|0)+Math.imul(le,cs)|0))<<13)|0;we=((Q=Q+Math.imul(le,$i)|0)+(B>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,a=Math.imul(qt,Jr),B=(B=Math.imul(qt,Ln))+Math.imul(jt,Jr)|0,Q=Math.imul(jt,Ln),a=a+Math.imul(dn,Wr)|0,B=(B=B+Math.imul(dn,zn)|0)+Math.imul(Nt,Wr)|0,Q=Q+Math.imul(Nt,zn)|0,a=a+Math.imul(gt,Lr)|0,B=(B=B+Math.imul(gt,Kn)|0)+Math.imul(St,Lr)|0,Q=Q+Math.imul(St,Kn)|0,a=a+Math.imul(Pt,Ii)|0,B=(B=B+Math.imul(Pt,Un)|0)+Math.imul(st,Ii)|0,Q=Q+Math.imul(st,Un)|0,a=a+Math.imul(mt,ts)|0,B=(B=B+Math.imul(mt,Tn)|0)+Math.imul(ht,ts)|0,Q=Q+Math.imul(ht,Tn)|0,a=a+Math.imul(Ve,Vi)|0,B=(B=B+Math.imul(Ve,ar)|0)+Math.imul(nt,Vi)|0,Q=Q+Math.imul(nt,ar)|0,a=a+Math.imul(me,ki)|0,B=(B=B+Math.imul(me,ur)|0)+Math.imul(Ee,ki)|0,Q=Q+Math.imul(Ee,ur)|0,a=a+Math.imul(xe,Fr)|0,B=(B=B+Math.imul(xe,hi)|0)+Math.imul(Ce,Fr)|0,Q=Q+Math.imul(Ce,hi)|0;var bo=(we+(a=a+Math.imul(ne,cs)|0)|0)+((8191&(B=(B=B+Math.imul(ne,$i)|0)+Math.imul(pe,cs)|0))<<13)|0;we=((Q=Q+Math.imul(pe,$i)|0)+(B>>>13)|0)+(bo>>>26)|0,bo&=67108863,a=Math.imul(qt,Wr),B=(B=Math.imul(qt,zn))+Math.imul(jt,Wr)|0,Q=Math.imul(jt,zn),a=a+Math.imul(dn,Lr)|0,B=(B=B+Math.imul(dn,Kn)|0)+Math.imul(Nt,Lr)|0,Q=Q+Math.imul(Nt,Kn)|0,a=a+Math.imul(gt,Ii)|0,B=(B=B+Math.imul(gt,Un)|0)+Math.imul(St,Ii)|0,Q=Q+Math.imul(St,Un)|0,a=a+Math.imul(Pt,ts)|0,B=(B=B+Math.imul(Pt,Tn)|0)+Math.imul(st,ts)|0,Q=Q+Math.imul(st,Tn)|0,a=a+Math.imul(mt,Vi)|0,B=(B=B+Math.imul(mt,ar)|0)+Math.imul(ht,Vi)|0,Q=Q+Math.imul(ht,ar)|0,a=a+Math.imul(Ve,ki)|0,B=(B=B+Math.imul(Ve,ur)|0)+Math.imul(nt,ki)|0,Q=Q+Math.imul(nt,ur)|0,a=a+Math.imul(me,Fr)|0,B=(B=B+Math.imul(me,hi)|0)+Math.imul(Ee,Fr)|0,Q=Q+Math.imul(Ee,hi)|0;var _s=(we+(a=a+Math.imul(xe,cs)|0)|0)+((8191&(B=(B=B+Math.imul(xe,$i)|0)+Math.imul(Ce,cs)|0))<<13)|0;we=((Q=Q+Math.imul(Ce,$i)|0)+(B>>>13)|0)+(_s>>>26)|0,_s&=67108863,a=Math.imul(qt,Lr),B=(B=Math.imul(qt,Kn))+Math.imul(jt,Lr)|0,Q=Math.imul(jt,Kn),a=a+Math.imul(dn,Ii)|0,B=(B=B+Math.imul(dn,Un)|0)+Math.imul(Nt,Ii)|0,Q=Q+Math.imul(Nt,Un)|0,a=a+Math.imul(gt,ts)|0,B=(B=B+Math.imul(gt,Tn)|0)+Math.imul(St,ts)|0,Q=Q+Math.imul(St,Tn)|0,a=a+Math.imul(Pt,Vi)|0,B=(B=B+Math.imul(Pt,ar)|0)+Math.imul(st,Vi)|0,Q=Q+Math.imul(st,ar)|0,a=a+Math.imul(mt,ki)|0,B=(B=B+Math.imul(mt,ur)|0)+Math.imul(ht,ki)|0,Q=Q+Math.imul(ht,ur)|0,a=a+Math.imul(Ve,Fr)|0,B=(B=B+Math.imul(Ve,hi)|0)+Math.imul(nt,Fr)|0,Q=Q+Math.imul(nt,hi)|0;var Ao=(we+(a=a+Math.imul(me,cs)|0)|0)+((8191&(B=(B=B+Math.imul(me,$i)|0)+Math.imul(Ee,cs)|0))<<13)|0;we=((Q=Q+Math.imul(Ee,$i)|0)+(B>>>13)|0)+(Ao>>>26)|0,Ao&=67108863,a=Math.imul(qt,Ii),B=(B=Math.imul(qt,Un))+Math.imul(jt,Ii)|0,Q=Math.imul(jt,Un),a=a+Math.imul(dn,ts)|0,B=(B=B+Math.imul(dn,Tn)|0)+Math.imul(Nt,ts)|0,Q=Q+Math.imul(Nt,Tn)|0,a=a+Math.imul(gt,Vi)|0,B=(B=B+Math.imul(gt,ar)|0)+Math.imul(St,Vi)|0,Q=Q+Math.imul(St,ar)|0,a=a+Math.imul(Pt,ki)|0,B=(B=B+Math.imul(Pt,ur)|0)+Math.imul(st,ki)|0,Q=Q+Math.imul(st,ur)|0,a=a+Math.imul(mt,Fr)|0,B=(B=B+Math.imul(mt,hi)|0)+Math.imul(ht,Fr)|0,Q=Q+Math.imul(ht,hi)|0;var zi=(we+(a=a+Math.imul(Ve,cs)|0)|0)+((8191&(B=(B=B+Math.imul(Ve,$i)|0)+Math.imul(nt,cs)|0))<<13)|0;we=((Q=Q+Math.imul(nt,$i)|0)+(B>>>13)|0)+(zi>>>26)|0,zi&=67108863,a=Math.imul(qt,ts),B=(B=Math.imul(qt,Tn))+Math.imul(jt,ts)|0,Q=Math.imul(jt,Tn),a=a+Math.imul(dn,Vi)|0,B=(B=B+Math.imul(dn,ar)|0)+Math.imul(Nt,Vi)|0,Q=Q+Math.imul(Nt,ar)|0,a=a+Math.imul(gt,ki)|0,B=(B=B+Math.imul(gt,ur)|0)+Math.imul(St,ki)|0,Q=Q+Math.imul(St,ur)|0,a=a+Math.imul(Pt,Fr)|0,B=(B=B+Math.imul(Pt,hi)|0)+Math.imul(st,Fr)|0,Q=Q+Math.imul(st,hi)|0;var Ms=(we+(a=a+Math.imul(mt,cs)|0)|0)+((8191&(B=(B=B+Math.imul(mt,$i)|0)+Math.imul(ht,cs)|0))<<13)|0;we=((Q=Q+Math.imul(ht,$i)|0)+(B>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,a=Math.imul(qt,Vi),B=(B=Math.imul(qt,ar))+Math.imul(jt,Vi)|0,Q=Math.imul(jt,ar),a=a+Math.imul(dn,ki)|0,B=(B=B+Math.imul(dn,ur)|0)+Math.imul(Nt,ki)|0,Q=Q+Math.imul(Nt,ur)|0,a=a+Math.imul(gt,Fr)|0,B=(B=B+Math.imul(gt,hi)|0)+Math.imul(St,Fr)|0,Q=Q+Math.imul(St,hi)|0;var Oi=(we+(a=a+Math.imul(Pt,cs)|0)|0)+((8191&(B=(B=B+Math.imul(Pt,$i)|0)+Math.imul(st,cs)|0))<<13)|0;we=((Q=Q+Math.imul(st,$i)|0)+(B>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,a=Math.imul(qt,ki),B=(B=Math.imul(qt,ur))+Math.imul(jt,ki)|0,Q=Math.imul(jt,ur),a=a+Math.imul(dn,Fr)|0,B=(B=B+Math.imul(dn,hi)|0)+Math.imul(Nt,Fr)|0,Q=Q+Math.imul(Nt,hi)|0;var Lu=(we+(a=a+Math.imul(gt,cs)|0)|0)+((8191&(B=(B=B+Math.imul(gt,$i)|0)+Math.imul(St,cs)|0))<<13)|0;we=((Q=Q+Math.imul(St,$i)|0)+(B>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,a=Math.imul(qt,Fr),B=(B=Math.imul(qt,hi))+Math.imul(jt,Fr)|0,Q=Math.imul(jt,hi);var Qa=(we+(a=a+Math.imul(dn,cs)|0)|0)+((8191&(B=(B=B+Math.imul(dn,$i)|0)+Math.imul(Nt,cs)|0))<<13)|0;we=((Q=Q+Math.imul(Nt,$i)|0)+(B>>>13)|0)+(Qa>>>26)|0,Qa&=67108863;var ja=(we+(a=Math.imul(qt,cs))|0)+((8191&(B=(B=Math.imul(qt,$i))+Math.imul(jt,cs)|0))<<13)|0;return we=((Q=Math.imul(jt,$i))+(B>>>13)|0)+(ja>>>26)|0,ja&=67108863,ue[0]=rs,ue[1]=Xi,ue[2]=$s,ue[3]=is,ue[4]=go,ue[5]=ji,ue[6]=so,ue[7]=oo,ue[8]=zo,ue[9]=Wi,ue[10]=bo,ue[11]=_s,ue[12]=Ao,ue[13]=zi,ue[14]=Ms,ue[15]=Oi,ue[16]=Lu,ue[17]=Qa,ue[18]=ja,0!==we&&(ue[19]=we,C.length++),C};function W(D,N,C){C.negative=N.negative^D.negative,C.length=D.length+N.length;for(var a=0,B=0,Q=0;Q>>26)|0)>>>26,ee&=67108863}C.words[Q]=ce,a=ee,ee=B}return 0!==a?C.words[Q]=a:C.length--,C._strip()}function G(D,N,C){return W(D,N,C)}function H(D,N){this.x=D,this.y=N}Math.imul||(V=L),b.prototype.mulTo=function(D,N){var C=this.length+D.length;return 10===this.length&&10===D.length?V(this,D,N):C<63?L(this,D,N):C<1024?W(this,D,N):G(this,D,N)},H.prototype.makeRBT=function(D){for(var N=new Array(D),C=b.prototype._countBits(D)-1,a=0;a>=1;return a},H.prototype.permute=function(D,N,C,a,B,Q){for(var ee=0;ee>>=1)B++;return 1<>>=13),B>>>=13;for(Q=2*N;Q>=26,C+=B/67108864|0,C+=Q>>>26,this.words[a]=67108863&Q}return 0!==C&&(this.words[a]=C,this.length++),N?this.ineg():this},b.prototype.muln=function(D){return this.clone().imuln(D)},b.prototype.sqr=function(){return this.mul(this)},b.prototype.isqr=function(){return this.imul(this.clone())},b.prototype.pow=function(D){var N=function(Q){for(var ee=new Array(Q.bitLength()),ce=0;ce>>ce%26&1;return ee}(D);if(0===N.length)return new b(1);for(var C=this,a=0;a=0);var N,C=D%26,a=(D-C)/26,B=67108863>>>26-C<<26-C;if(0!==C){var Q=0;for(N=0;N>>26-C}Q&&(this.words[N]=Q,this.length++)}if(0!==a){for(N=this.length-1;N>=0;N--)this.words[N+a]=this.words[N];for(N=0;N=0),a=N?(N-N%26)/26:0;var B=D%26,Q=Math.min((D-B)/26,this.length),ee=67108863^67108863>>>B<Q)for(this.length-=Q,ue=0;ue=0&&(0!==we||ue>=a);ue--){var ae=0|this.words[ue];this.words[ue]=we<<26-B|ae>>>B,we=ae&ee}return ce&&0!==we&&(ce.words[ce.length++]=we),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},b.prototype.ishrn=function(D,N,C){return T(0===this.negative),this.iushrn(D,N,C)},b.prototype.shln=function(D){return this.clone().ishln(D)},b.prototype.ushln=function(D){return this.clone().iushln(D)},b.prototype.shrn=function(D){return this.clone().ishrn(D)},b.prototype.ushrn=function(D){return this.clone().iushrn(D)},b.prototype.testn=function(D){T("number"==typeof D&&D>=0);var N=D%26,C=(D-N)/26;return!(this.length<=C||!(this.words[C]&1<=0);var N=D%26,C=(D-N)/26;return T(0===this.negative,"imaskn works only with positive numbers"),this.length<=C?this:(0!==N&&C++,this.length=Math.min(C,this.length),0!==N&&(this.words[this.length-1]&=67108863^67108863>>>N<=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},b.prototype.isubn=function(D){if(T("number"==typeof D),T(D<67108864),D<0)return this.iaddn(-D);if(0!==this.negative)return this.negative=0,this.iaddn(D),this.negative=1,this;if(this.words[0]-=D,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N>26)-(ce/67108864|0),this.words[a+C]=67108863&B}for(;a>26,this.words[a+C]=67108863&B;if(0===ee)return this._strip();for(T(-1===ee),ee=0,a=0;a>26,this.words[a]=67108863&B;return this.negative=1,this._strip()},b.prototype._wordDiv=function(D,N){var C,a=this.clone(),B=D,Q=0|B.words[B.length-1];0!=(C=26-this._countBits(Q))&&(B=B.ushln(C),a.iushln(C),Q=0|B.words[B.length-1]);var ee,ce=a.length-B.length;if("mod"!==N){(ee=new b(null)).length=ce+1,ee.words=new Array(ee.length);for(var ue=0;ue=0;ae--){var Te=67108864*(0|a.words[B.length+ae])+(0|a.words[B.length+ae-1]);for(Te=Math.min(Te/Q|0,67108863),a._ishlnsubmul(B,Te,ae);0!==a.negative;)Te--,a.negative=0,a._ishlnsubmul(B,1,ae),a.isZero()||(a.negative^=1);ee&&(ee.words[ae]=Te)}return ee&&ee._strip(),a._strip(),"div"!==N&&0!==C&&a.iushrn(C),{div:ee||null,mod:a}},b.prototype.divmod=function(D,N,C){return T(!D.isZero()),this.isZero()?{div:new b(0),mod:new b(0)}:0!==this.negative&&0===D.negative?(Q=this.neg().divmod(D,N),"mod"!==N&&(a=Q.div.neg()),"div"!==N&&(B=Q.mod.neg(),C&&0!==B.negative&&B.iadd(D)),{div:a,mod:B}):0===this.negative&&0!==D.negative?(Q=this.divmod(D.neg(),N),"mod"!==N&&(a=Q.div.neg()),{div:a,mod:Q.mod}):0!=(this.negative&D.negative)?(Q=this.neg().divmod(D.neg(),N),"div"!==N&&(B=Q.mod.neg(),C&&0!==B.negative&&B.isub(D)),{div:Q.div,mod:B}):D.length>this.length||this.cmp(D)<0?{div:new b(0),mod:this}:1===D.length?"div"===N?{div:this.divn(D.words[0]),mod:null}:"mod"===N?{div:null,mod:new b(this.modrn(D.words[0]))}:{div:this.divn(D.words[0]),mod:new b(this.modrn(D.words[0]))}:this._wordDiv(D,N);var a,B,Q},b.prototype.div=function(D){return this.divmod(D,"div",!1).div},b.prototype.mod=function(D){return this.divmod(D,"mod",!1).mod},b.prototype.umod=function(D){return this.divmod(D,"mod",!0).mod},b.prototype.divRound=function(D){var N=this.divmod(D);if(N.mod.isZero())return N.div;var C=0!==N.div.negative?N.mod.isub(D):N.mod,a=D.ushrn(1),B=D.andln(1),Q=C.cmp(a);return Q<0||1===B&&0===Q?N.div:0!==N.div.negative?N.div.isubn(1):N.div.iaddn(1)},b.prototype.modrn=function(D){var N=D<0;N&&(D=-D),T(D<=67108863);for(var C=(1<<26)%D,a=0,B=this.length-1;B>=0;B--)a=(C*a+(0|this.words[B]))%D;return N?-a:a},b.prototype.modn=function(D){return this.modrn(D)},b.prototype.idivn=function(D){var N=D<0;N&&(D=-D),T(D<=67108863);for(var C=0,a=this.length-1;a>=0;a--){var B=(0|this.words[a])+67108864*C;this.words[a]=B/D|0,C=B%D}return this._strip(),N?this.ineg():this},b.prototype.divn=function(D){return this.clone().idivn(D)},b.prototype.egcd=function(D){T(0===D.negative),T(!D.isZero());var N=this,C=D.clone();N=0!==N.negative?N.umod(D):N.clone();for(var a=new b(1),B=new b(0),Q=new b(0),ee=new b(1),ce=0;N.isEven()&&C.isEven();)N.iushrn(1),C.iushrn(1),++ce;for(var ue=C.clone(),we=N.clone();!N.isZero();){for(var ae=0,Te=1;0==(N.words[0]&Te)&&ae<26;++ae,Te<<=1);if(ae>0)for(N.iushrn(ae);ae-- >0;)(a.isOdd()||B.isOdd())&&(a.iadd(ue),B.isub(we)),a.iushrn(1),B.iushrn(1);for(var le=0,X=1;0==(C.words[0]&X)&&le<26;++le,X<<=1);if(le>0)for(C.iushrn(le);le-- >0;)(Q.isOdd()||ee.isOdd())&&(Q.iadd(ue),ee.isub(we)),Q.iushrn(1),ee.iushrn(1);N.cmp(C)>=0?(N.isub(C),a.isub(Q),B.isub(ee)):(C.isub(N),Q.isub(a),ee.isub(B))}return{a:Q,b:ee,gcd:C.iushln(ce)}},b.prototype._invmp=function(D){T(0===D.negative),T(!D.isZero());var N=this,C=D.clone();N=0!==N.negative?N.umod(D):N.clone();for(var a,B=new b(1),Q=new b(0),ee=C.clone();N.cmpn(1)>0&&C.cmpn(1)>0;){for(var ce=0,ue=1;0==(N.words[0]&ue)&&ce<26;++ce,ue<<=1);if(ce>0)for(N.iushrn(ce);ce-- >0;)B.isOdd()&&B.iadd(ee),B.iushrn(1);for(var we=0,ae=1;0==(C.words[0]&ae)&&we<26;++we,ae<<=1);if(we>0)for(C.iushrn(we);we-- >0;)Q.isOdd()&&Q.iadd(ee),Q.iushrn(1);N.cmp(C)>=0?(N.isub(C),B.isub(Q)):(C.isub(N),Q.isub(B))}return(a=0===N.cmpn(1)?B:Q).cmpn(0)<0&&a.iadd(D),a},b.prototype.gcd=function(D){if(this.isZero())return D.abs();if(D.isZero())return this.abs();var N=this.clone(),C=D.clone();N.negative=0,C.negative=0;for(var a=0;N.isEven()&&C.isEven();a++)N.iushrn(1),C.iushrn(1);for(;;){for(;N.isEven();)N.iushrn(1);for(;C.isEven();)C.iushrn(1);var B=N.cmp(C);if(B<0){var Q=N;N=C,C=Q}else if(0===B||0===C.cmpn(1))break;N.isub(C)}return C.iushln(a)},b.prototype.invm=function(D){return this.egcd(D).a.umod(D)},b.prototype.isEven=function(){return 0==(1&this.words[0])},b.prototype.isOdd=function(){return 1==(1&this.words[0])},b.prototype.andln=function(D){return this.words[0]&D},b.prototype.bincn=function(D){T("number"==typeof D);var N=D%26,C=(D-N)/26,a=1<>>26,this.words[Q]=ee&=67108863}return 0!==B&&(this.words[Q]=B,this.length++),this},b.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},b.prototype.cmpn=function(D){var N,C=D<0;if(0!==this.negative&&!C)return-1;if(0===this.negative&&C)return 1;if(this._strip(),this.length>1)N=1;else{C&&(D=-D),T(D<=67108863,"Number is too big");var a=0|this.words[0];N=a===D?0:aD.length)return 1;if(this.length=0;C--){var a=0|this.words[C],B=0|D.words[C];if(a!==B){aB&&(N=1);break}}return N},b.prototype.gtn=function(D){return 1===this.cmpn(D)},b.prototype.gt=function(D){return 1===this.cmp(D)},b.prototype.gten=function(D){return this.cmpn(D)>=0},b.prototype.gte=function(D){return this.cmp(D)>=0},b.prototype.ltn=function(D){return-1===this.cmpn(D)},b.prototype.lt=function(D){return-1===this.cmp(D)},b.prototype.lten=function(D){return this.cmpn(D)<=0},b.prototype.lte=function(D){return this.cmp(D)<=0},b.prototype.eqn=function(D){return 0===this.cmpn(D)},b.prototype.eq=function(D){return 0===this.cmp(D)},b.red=function(D){return new v(D)},b.prototype.toRed=function(D){return T(!this.red,"Already a number in reduction context"),T(0===this.negative,"red works only with positives"),D.convertTo(this)._forceRed(D)},b.prototype.fromRed=function(){return T(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},b.prototype._forceRed=function(D){return this.red=D,this},b.prototype.forceRed=function(D){return T(!this.red,"Already a number in reduction context"),this._forceRed(D)},b.prototype.redAdd=function(D){return T(this.red,"redAdd works only with red numbers"),this.red.add(this,D)},b.prototype.redIAdd=function(D){return T(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,D)},b.prototype.redSub=function(D){return T(this.red,"redSub works only with red numbers"),this.red.sub(this,D)},b.prototype.redISub=function(D){return T(this.red,"redISub works only with red numbers"),this.red.isub(this,D)},b.prototype.redShl=function(D){return T(this.red,"redShl works only with red numbers"),this.red.shl(this,D)},b.prototype.redMul=function(D){return T(this.red,"redMul works only with red numbers"),this.red._verify2(this,D),this.red.mul(this,D)},b.prototype.redIMul=function(D){return T(this.red,"redMul works only with red numbers"),this.red._verify2(this,D),this.red.imul(this,D)},b.prototype.redSqr=function(){return T(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},b.prototype.redISqr=function(){return T(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},b.prototype.redSqrt=function(){return T(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},b.prototype.redInvm=function(){return T(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},b.prototype.redNeg=function(){return T(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},b.prototype.redPow=function(D){return T(this.red&&!D.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,D)};var j={k256:null,p224:null,p192:null,p25519:null};function K(D,N){this.name=D,this.p=new b(N,16),this.n=this.p.bitLength(),this.k=new b(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function R(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function o(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function y(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function v(D){if("string"==typeof D){var N=b._prime(D);this.m=N.p,this.prime=N}else T(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function k(D){v.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new b(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)}K.prototype._tmp=function(){var D=new b(null);return D.words=new Array(Math.ceil(this.n/13)),D},K.prototype.ireduce=function(D){var N,C=D;do{this.split(C,this.tmp),N=(C=(C=this.imulK(C)).iadd(this.tmp)).bitLength()}while(N>this.n);var a=N0?C.isub(this.p):void 0!==C.strip?C.strip():C._strip(),C},K.prototype.split=function(D,N){D.iushrn(this.n,0,N)},K.prototype.imulK=function(D){return D.imul(this.k)},g(R,K),R.prototype.split=function(D,N){for(var C=4194303,a=Math.min(D.length,9),B=0;B>>22,Q=ee}D.words[B-10]=Q>>>=22,D.length-=0===Q&&D.length>10?10:9},R.prototype.imulK=function(D){D.words[D.length]=0,D.words[D.length+1]=0,D.length+=2;for(var N=0,C=0;C>>=26,D.words[C]=B,N=a}return 0!==N&&(D.words[D.length++]=N),D},b._prime=function(D){if(j[D])return j[D];var N;if("k256"===D)N=new R;else if("p224"===D)N=new o;else if("p192"===D)N=new y;else{if("p25519"!==D)throw new Error("Unknown prime "+D);N=new M}return j[D]=N,N},v.prototype._verify1=function(D){T(0===D.negative,"red works only with positives"),T(D.red,"red works only with red numbers")},v.prototype._verify2=function(D,N){T(0==(D.negative|N.negative),"red works only with positives"),T(D.red&&D.red===N.red,"red works only with red numbers")},v.prototype.imod=function(D){return this.prime?this.prime.ireduce(D)._forceRed(this):(_(D,D.umod(this.m)._forceRed(this)),D)},v.prototype.neg=function(D){return D.isZero()?D.clone():this.m.sub(D)._forceRed(this)},v.prototype.add=function(D,N){this._verify2(D,N);var C=D.add(N);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},v.prototype.iadd=function(D,N){this._verify2(D,N);var C=D.iadd(N);return C.cmp(this.m)>=0&&C.isub(this.m),C},v.prototype.sub=function(D,N){this._verify2(D,N);var C=D.sub(N);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},v.prototype.isub=function(D,N){this._verify2(D,N);var C=D.isub(N);return C.cmpn(0)<0&&C.iadd(this.m),C},v.prototype.shl=function(D,N){return this._verify1(D),this.imod(D.ushln(N))},v.prototype.imul=function(D,N){return this._verify2(D,N),this.imod(D.imul(N))},v.prototype.mul=function(D,N){return this._verify2(D,N),this.imod(D.mul(N))},v.prototype.isqr=function(D){return this.imul(D,D.clone())},v.prototype.sqr=function(D){return this.mul(D,D)},v.prototype.sqrt=function(D){if(D.isZero())return D.clone();var N=this.m.andln(3);if(T(N%2==1),3===N){var C=this.m.add(new b(1)).iushrn(2);return this.pow(D,C)}for(var a=this.m.subn(1),B=0;!a.isZero()&&0===a.andln(1);)B++,a.iushrn(1);T(!a.isZero());var Q=new b(1).toRed(this),ee=Q.redNeg(),ce=this.m.subn(1).iushrn(1),ue=this.m.bitLength();for(ue=new b(2*ue*ue).toRed(this);0!==this.pow(ue,ce).cmp(ee);)ue.redIAdd(ee);for(var we=this.pow(ue,a),ae=this.pow(D,a.addn(1).iushrn(1)),Te=this.pow(D,a),le=B;0!==Te.cmp(Q);){for(var X=Te,ne=0;0!==X.cmp(Q);ne++)X=X.redSqr();T(ne=0;a--){for(var ue=N.words[a],we=ce-1;we>=0;we--){var ae=ue>>we&1;B!==C[0]&&(B=this.sqr(B)),0!==ae||0!==Q?(Q<<=1,Q|=ae,(4==++ee||0===a&&0===we)&&(B=this.mul(B,C[Q]),ee=0,Q=0)):ee=0}ce=26}return B},v.prototype.convertTo=function(D){var N=D.umod(this.m);return N===D?N.clone():N},v.prototype.convertFrom=function(D){var N=D.clone();return N.red=null,N},b.mont=function(D){return new k(D)},g(k,v),k.prototype.convertTo=function(D){return this.imod(D.ushln(this.shift))},k.prototype.convertFrom=function(D){var N=this.imod(D.mul(this.rinv));return N.red=null,N},k.prototype.imul=function(D,N){if(D.isZero()||N.isZero())return D.words[0]=0,D.length=1,D;var C=D.imul(N),a=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=C.isub(a).iushrn(this.shift),Q=B;return B.cmp(this.m)>=0?Q=B.isub(this.m):B.cmpn(0)<0&&(Q=B.iadd(this.m)),Q._forceRed(this)},k.prototype.mul=function(D,N){if(D.isZero()||N.isZero())return new b(0)._forceRed(this);var C=D.mul(N),a=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=C.isub(a).iushrn(this.shift),Q=B;return B.cmp(this.m)>=0?Q=B.isub(this.m):B.cmpn(0)<0&&(Q=B.iadd(this.m)),Q._forceRed(this)},k.prototype.invm=function(D){return this.imod(D._invmp(this.m).mul(this.r2))._forceRed(this)}}(q)},82202:(q,O,E)=>{"use strict";var d,x=E(28847)(E(3355));function f(g){this.rand=g}if(q.exports=function(g){return d||(d=new f(null)),d.generate(g)},q.exports.Rand=f,f.prototype.generate=function(g){return this._rand(g)},f.prototype._rand=function(g){if(this.rand.getBytes)return this.rand.getBytes(g);for(var b=new Uint8Array(g),l=0;l{"use strict";var d=E(48850).Buffer;function x(h){d.isBuffer(h)||(h=d.from(h));for(var u=h.length/4|0,m=new Array(u),_=0;_>>24]^W[K>>>16&255]^G[R>>>8&255]^H[255&o]^u[y++],I=V[K>>>24]^W[R>>>16&255]^G[o>>>8&255]^H[255&j]^u[y++],P=V[R>>>24]^W[o>>>16&255]^G[j>>>8&255]^H[255&K]^u[y++],L=V[o>>>24]^W[j>>>16&255]^G[K>>>8&255]^H[255&R]^u[y++],j=S,K=I,R=P,o=L;return S=(_[j>>>24]<<24|_[K>>>16&255]<<16|_[R>>>8&255]<<8|_[255&o])^u[y++],I=(_[K>>>24]<<24|_[R>>>16&255]<<16|_[o>>>8&255]<<8|_[255&j])^u[y++],P=(_[R>>>24]<<24|_[o>>>16&255]<<16|_[j>>>8&255]<<8|_[255&K])^u[y++],L=(_[o>>>24]<<24|_[j>>>16&255]<<16|_[K>>>8&255]<<8|_[255&R])^u[y++],[S>>>=0,I>>>=0,P>>>=0,L>>>=0]}var g=[0,1,2,4,8,16,32,64,128,27,54],b=function(){for(var h=new Array(256),u=0;u<256;u++)h[u]=u<128?u<<1:u<<1^283;for(var m=[],_=[],w=[[],[],[],[]],S=[[],[],[],[]],I=0,P=0,L=0;L<256;++L){var V=P^P<<1^P<<2^P<<3^P<<4;m[I]=V=V>>>8^255&V^99,_[V]=I;var W=h[I],G=h[W],H=h[G],j=257*h[V]^16843008*V;w[0][I]=j<<24|j>>>8,w[1][I]=j<<16|j>>>16,w[2][I]=j<<8|j>>>24,w[3][I]=j,S[0][V]=(j=16843009*H^65537*G^257*W^16843008*I)<<24|j>>>8,S[1][V]=j<<16|j>>>16,S[2][V]=j<<8|j>>>24,S[3][V]=j,0===I?I=P=1:(I=W^h[h[h[H^W]]],P^=h[h[P]])}return{SBOX:m,INV_SBOX:_,SUB_MIX:w,INV_SUB_MIX:S}}();function l(h){this._key=x(h),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var h=this._key,u=h.length,m=u+6,_=4*(m+1),w=[],S=0;S>>24)>>>24]<<24|b.SBOX[I>>>16&255]<<16|b.SBOX[I>>>8&255]<<8|b.SBOX[255&I],I^=g[S/u|0]<<24):u>6&&S%u==4&&(I=b.SBOX[I>>>24]<<24|b.SBOX[I>>>16&255]<<16|b.SBOX[I>>>8&255]<<8|b.SBOX[255&I]),w[S]=w[S-u]^I}for(var P=[],L=0;L<_;L++){var V=_-L,W=w[V-(L%4?0:4)];P[L]=L<4||V<=4?W:b.INV_SUB_MIX[0][b.SBOX[W>>>24]]^b.INV_SUB_MIX[1][b.SBOX[W>>>16&255]]^b.INV_SUB_MIX[2][b.SBOX[W>>>8&255]]^b.INV_SUB_MIX[3][b.SBOX[255&W]]}this._nRounds=m,this._keySchedule=w,this._invKeySchedule=P},l.prototype.encryptBlockRaw=function(h){return T(h=x(h),this._keySchedule,b.SUB_MIX,b.SBOX,this._nRounds)},l.prototype.encryptBlock=function(h){var u=this.encryptBlockRaw(h),m=d.allocUnsafe(16);return m.writeUInt32BE(u[0],0),m.writeUInt32BE(u[1],4),m.writeUInt32BE(u[2],8),m.writeUInt32BE(u[3],12),m},l.prototype.decryptBlock=function(h){var u=(h=x(h))[1];h[1]=h[3],h[3]=u;var m=T(h,this._invKeySchedule,b.INV_SUB_MIX,b.INV_SBOX,this._nRounds),_=d.allocUnsafe(16);return _.writeUInt32BE(m[0],0),_.writeUInt32BE(m[3],4),_.writeUInt32BE(m[2],8),_.writeUInt32BE(m[1],12),_},l.prototype.scrub=function(){f(this._keySchedule),f(this._invKeySchedule),f(this._key)},q.exports.AES=l},10426:(q,O,E)=>{"use strict";var d=E(37494),x=E(48850).Buffer,f=E(93013),T=E(41736),g=E(26626),b=E(96316),l=E(67557);function h(u,m,_,w){f.call(this);var S=x.alloc(4,0);this._cipher=new d.AES(m);var I=this._cipher.encryptBlock(S);this._ghash=new g(I),_=function(P,L,V){if(12===L.length)return P._finID=x.concat([L,x.from([0,0,0,1])]),x.concat([L,x.from([0,0,0,2])]);var W=new g(V),G=L.length,H=G%16;W.update(L),H&&W.update(x.alloc(H=16-H,0)),W.update(x.alloc(8,0));var j=8*G,K=x.alloc(8);K.writeUIntBE(j,0,8),W.update(K),P._finID=W.state;var R=x.from(P._finID);return l(R),R}(this,_,I),this._prev=x.from(_),this._cache=x.allocUnsafe(0),this._secCache=x.allocUnsafe(0),this._decrypt=w,this._alen=0,this._len=0,this._mode=u,this._authTag=null,this._called=!1}T(h,f),h.prototype._update=function(u){if(!this._called&&this._alen){var m=16-this._alen%16;m<16&&(m=x.alloc(m,0),this._ghash.update(m))}this._called=!0;var _=this._mode.encrypt(this,u);return this._ghash.update(this._decrypt?u:_),this._len+=u.length,_},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var u=b(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(m,_){var w=0;m.length!==_.length&&w++;for(var S=Math.min(m.length,_.length),I=0;I{"use strict";var d=E(85478),x=E(32184),f=E(44946);O.createCipher=O.Cipher=d.createCipher,O.createCipheriv=O.Cipheriv=d.createCipheriv,O.createDecipher=O.Decipher=x.createDecipher,O.createDecipheriv=O.Decipheriv=x.createDecipheriv,O.listCiphers=O.getCiphers=function(){return Object.keys(f)}},32184:(q,O,E)=>{"use strict";var d=E(10426),x=E(48850).Buffer,f=E(58408),T=E(21408),g=E(93013),b=E(37494),l=E(27085);function h(_,w,S){g.call(this),this._cache=new u,this._last=void 0,this._cipher=new b.AES(w),this._prev=x.from(S),this._mode=_,this._autopadding=!0}function u(){this.cache=x.allocUnsafe(0)}function m(_,w,S){var I=f[_.toLowerCase()];if(!I)throw new TypeError("invalid suite type");if("string"==typeof S&&(S=x.from(S)),"GCM"!==I.mode&&S.length!==I.iv)throw new TypeError("invalid iv length "+S.length);if("string"==typeof w&&(w=x.from(w)),w.length!==I.key/8)throw new TypeError("invalid key length "+w.length);return"stream"===I.type?new T(I.module,w,S,!0):"auth"===I.type?new d(I.module,w,S,!0):new h(I.module,w,S)}E(41736)(h,g),h.prototype._update=function(_){var w,S;this._cache.add(_);for(var I=[];w=this._cache.get(this._autopadding);)S=this._mode.decrypt(this,w),I.push(S);return x.concat(I)},h.prototype._final=function(){var _=this._cache.flush();if(this._autopadding)return function(w){var S=w[15];if(S<1||S>16)throw new Error("unable to decrypt data");for(var I=-1;++I16)return w=this.cache.slice(0,16),this.cache=this.cache.slice(16),w}else if(this.cache.length>=16)return w=this.cache.slice(0,16),this.cache=this.cache.slice(16),w;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache},O.createDecipher=function(_,w){var S=f[_.toLowerCase()];if(!S)throw new TypeError("invalid suite type");var I=l(w,!1,S.key,S.iv);return m(_,I.key,I.iv)},O.createDecipheriv=m},85478:(q,O,E)=>{"use strict";var d=E(58408),x=E(10426),f=E(48850).Buffer,T=E(21408),g=E(93013),b=E(37494),l=E(27085);function h(w,S,I){g.call(this),this._cache=new m,this._cipher=new b.AES(S),this._prev=f.from(I),this._mode=w,this._autopadding=!0}E(41736)(h,g),h.prototype._update=function(w){var S,I;this._cache.add(w);for(var P=[];S=this._cache.get();)I=this._mode.encrypt(this,S),P.push(I);return f.concat(P)};var u=f.alloc(16,16);function m(){this.cache=f.allocUnsafe(0)}function _(w,S,I){var P=d[w.toLowerCase()];if(!P)throw new TypeError("invalid suite type");if("string"==typeof S&&(S=f.from(S)),S.length!==P.key/8)throw new TypeError("invalid key length "+S.length);if("string"==typeof I&&(I=f.from(I)),"GCM"!==P.mode&&I.length!==P.iv)throw new TypeError("invalid iv length "+I.length);return"stream"===P.type?new T(P.module,S,I):"auth"===P.type?new x(P.module,S,I):new h(P.module,S,I)}h.prototype._final=function(){var w=this._cache.flush();if(this._autopadding)return w=this._mode.encrypt(this,w),this._cipher.scrub(),w;if(!w.equals(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(w){return this._autopadding=!!w,this},m.prototype.add=function(w){this.cache=f.concat([this.cache,w])},m.prototype.get=function(){if(this.cache.length>15){var w=this.cache.slice(0,16);return this.cache=this.cache.slice(16),w}return null},m.prototype.flush=function(){for(var w=16-this.cache.length,S=f.allocUnsafe(w),I=-1;++I{"use strict";var d=E(48850).Buffer,x=d.alloc(16,0);function f(g){var b=d.allocUnsafe(16);return b.writeUInt32BE(g[0]>>>0,0),b.writeUInt32BE(g[1]>>>0,4),b.writeUInt32BE(g[2]>>>0,8),b.writeUInt32BE(g[3]>>>0,12),b}function T(g){this.h=g,this.state=d.alloc(16,0),this.cache=d.allocUnsafe(0)}T.prototype.ghash=function(g){for(var b=-1;++b0;b--)h[b]=h[b]>>>1|(1&h[b-1])<<31;h[0]=h[0]>>>1,l&&(h[0]=h[0]^225<<24)}this.state=f(u)},T.prototype.update=function(g){var b;for(this.cache=d.concat([this.cache,g]);this.cache.length>=16;)b=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(b)},T.prototype.final=function(g,b){return this.cache.length&&this.ghash(d.concat([this.cache,x],16)),this.ghash(f([0,g,0,b])),this.state},q.exports=T},67557:q=>{"use strict";q.exports=function(O){for(var E,d=O.length;d--;){if(255!==(E=O.readUInt8(d))){E++,O.writeUInt8(E,d);break}O.writeUInt8(0,d)}}},77427:(q,O,E)=>{"use strict";var d=E(96316);O.encrypt=function(x,f){var T=d(f,x._prev);return x._prev=x._cipher.encryptBlock(T),x._prev},O.decrypt=function(x,f){var T=x._prev;x._prev=f;var g=x._cipher.decryptBlock(f);return d(g,T)}},44030:(q,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(96316);function f(T,g,b){var l=g.length,h=x(g,T._cache);return T._cache=T._cache.slice(l),T._prev=d.concat([T._prev,b?g:h]),h}O.encrypt=function(T,g,b){for(var l,h=d.allocUnsafe(0);g.length;){if(0===T._cache.length&&(T._cache=T._cipher.encryptBlock(T._prev),T._prev=d.allocUnsafe(0)),!(T._cache.length<=g.length)){h=d.concat([h,f(T,g,b)]);break}h=d.concat([h,f(T,g.slice(0,l=T._cache.length),b)]),g=g.slice(l)}return h}},13206:(q,O,E)=>{"use strict";var d=E(48850).Buffer;function x(T,g,b){for(var l,h,u=-1,m=0;++u<8;)l=g&1<<7-u?128:0,m+=(128&(h=T._cipher.encryptBlock(T._prev)[0]^l))>>u%8,T._prev=f(T._prev,b?l:h);return m}function f(T,g){var b=T.length,l=-1,h=d.allocUnsafe(T.length);for(T=d.concat([T,d.from([g])]);++l>7;return h}O.encrypt=function(T,g,b){for(var l=g.length,h=d.allocUnsafe(l),u=-1;++u{"use strict";var d=E(48850).Buffer;function x(f,T,g){var b=f._cipher.encryptBlock(f._prev)[0]^T;return f._prev=d.concat([f._prev.slice(1),d.from([g?T:b])]),b}O.encrypt=function(f,T,g){for(var b=T.length,l=d.allocUnsafe(b),h=-1;++h{"use strict";var d=E(96316),x=E(48850).Buffer,f=E(67557);function T(g){var b=g._cipher.encryptBlockRaw(g._prev);return f(g._prev),b}O.encrypt=function(g,b){var l=Math.ceil(b.length/16),h=g._cache.length;g._cache=x.concat([g._cache,x.allocUnsafe(16*l)]);for(var u=0;u{"use strict";O.encrypt=function(E,d){return E._cipher.encryptBlock(d)},O.decrypt=function(E,d){return E._cipher.decryptBlock(d)}},58408:(q,O,E)=>{"use strict";var d={ECB:E(59297),CBC:E(77427),CFB:E(44030),CFB8:E(14726),CFB1:E(13206),OFB:E(91962),CTR:E(32802),GCM:E(32802)},x=E(44946);for(var f in x)x[f].module=d[x[f].mode];q.exports=x},91962:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(96316);function f(T){return T._prev=T._cipher.encryptBlock(T._prev),T._prev}O.encrypt=function(T,g){for(;T._cache.length{"use strict";var d=E(37494),x=E(48850).Buffer,f=E(93013);function T(g,b,l,h){f.call(this),this._cipher=new d.AES(b),this._prev=x.from(l),this._cache=x.allocUnsafe(0),this._secCache=x.allocUnsafe(0),this._decrypt=h,this._mode=g}E(41736)(T,f),T.prototype._update=function(g){return this._mode.encrypt(this,g,this._decrypt)},T.prototype._final=function(){this._cipher.scrub()},q.exports=T},56805:(q,O,E)=>{"use strict";var d=E(19120),x=E(98073),f=E(58408),T=E(30867),g=E(27085);function b(h,u,m){if(h=h.toLowerCase(),f[h])return x.createCipheriv(h,u,m);if(T[h])return new d({key:u,iv:m,mode:h});throw new TypeError("invalid suite type")}function l(h,u,m){if(h=h.toLowerCase(),f[h])return x.createDecipheriv(h,u,m);if(T[h])return new d({key:u,iv:m,mode:h,decrypt:!0});throw new TypeError("invalid suite type")}O.createCipher=O.Cipher=function(h,u){var m,_;if(h=h.toLowerCase(),f[h])m=f[h].key,_=f[h].iv;else{if(!T[h])throw new TypeError("invalid suite type");m=8*T[h].key,_=T[h].iv}var w=g(u,!1,m,_);return b(h,w.key,w.iv)},O.createCipheriv=O.Cipheriv=b,O.createDecipher=O.Decipher=function(h,u){var m,_;if(h=h.toLowerCase(),f[h])m=f[h].key,_=f[h].iv;else{if(!T[h])throw new TypeError("invalid suite type");m=8*T[h].key,_=T[h].iv}var w=g(u,!1,m,_);return l(h,w.key,w.iv)},O.createDecipheriv=O.Decipheriv=l,O.listCiphers=O.getCiphers=function(){return Object.keys(T).concat(x.getCiphers())}},19120:(q,O,E)=>{"use strict";var d=E(93013),x=E(75626),f=E(41736),T=E(48850).Buffer,g={"des-ede3-cbc":x.CBC.instantiate(x.EDE),"des-ede3":x.EDE,"des-ede-cbc":x.CBC.instantiate(x.EDE),"des-ede":x.EDE,"des-cbc":x.CBC.instantiate(x.DES),"des-ecb":x.DES};function b(l){d.call(this);var h,u=l.mode.toLowerCase(),m=g[u];h=l.decrypt?"decrypt":"encrypt";var _=l.key;T.isBuffer(_)||(_=T.from(_)),"des-ede"!==u&&"des-ede-cbc"!==u||(_=T.concat([_,_.slice(0,8)]));var w=l.iv;T.isBuffer(w)||(w=T.from(w)),this._des=m.create({key:_,iv:w,type:h})}g.des=g["des-cbc"],g.des3=g["des-ede3-cbc"],q.exports=b,f(b,d),b.prototype._update=function(l){return T.from(this._des.update(l))},b.prototype._final=function(){return T.from(this._des.final())}},30867:(q,O)=>{"use strict";O["des-ecb"]={key:8,iv:0},O["des-cbc"]=O.des={key:8,iv:8},O["des-ede3-cbc"]=O.des3={key:24,iv:8},O["des-ede3"]={key:24,iv:0},O["des-ede-cbc"]={key:16,iv:8},O["des-ede"]={key:16,iv:0}},99782:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(31734),f=E(75010);function T(b){var l,h=b.modulus.byteLength();do{l=new x(f(h))}while(l.cmp(b.modulus)>=0||!l.umod(b.prime1)||!l.umod(b.prime2));return l}function g(b,l){var G,H,h={blinder:(H=T(G=l)).toRed(x.mont(G.modulus)).redPow(new x(G.publicExponent)).fromRed(),unblinder:H.invm(G.modulus)},u=l.modulus.byteLength(),m=new x(b).mul(h.blinder).umod(l.modulus),_=m.toRed(x.mont(l.prime1)),w=m.toRed(x.mont(l.prime2)),S=l.coefficient,I=l.prime1,P=l.prime2,L=_.redPow(l.exponent1).fromRed(),V=w.redPow(l.exponent2).fromRed(),W=L.isub(V).imul(S).umod(I).imul(P);return V.iadd(W).imul(h.unblinder).umod(l.modulus).toArrayLike(d,"be",u)}g.getr=T,q.exports=g},26561:(q,O,E)=>{"use strict";q.exports=E(75207)},79527:(q,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(35866),f=E(86505),T=E(41736),g=E(11628),b=E(15410),l=E(75207);function h(w){f.Writable.call(this);var S=l[w];if(!S)throw new Error("Unknown message digest");this._hashType=S.hash,this._hash=x(S.hash),this._tag=S.id,this._signType=S.sign}function u(w){f.Writable.call(this);var S=l[w];if(!S)throw new Error("Unknown message digest");this._hash=x(S.hash),this._tag=S.id,this._signType=S.sign}function m(w){return new h(w)}function _(w){return new u(w)}Object.keys(l).forEach(function(w){l[w].id=d.from(l[w].id,"hex"),l[w.toLowerCase()]=l[w]}),T(h,f.Writable),h.prototype._write=function(w,S,I){this._hash.update(w),I()},h.prototype.update=function(w,S){return"string"==typeof w&&(w=d.from(w,S)),this._hash.update(w),this},h.prototype.sign=function(w,S){this.end();var I=this._hash.digest(),P=g(I,w,this._hashType,this._signType,this._tag);return S?P.toString(S):P},T(u,f.Writable),u.prototype._write=function(w,S,I){this._hash.update(w),I()},u.prototype.update=function(w,S){return"string"==typeof w&&(w=d.from(w,S)),this._hash.update(w),this},u.prototype.verify=function(w,S,I){"string"==typeof S&&(S=d.from(S,I)),this.end();var P=this._hash.digest();return b(S,P,w,this._signType,this._tag)},q.exports={Sign:m,Verify:_,createSign:m,createVerify:_}},11628:(q,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(34424),f=E(99782),T=E(36597).ec,g=E(31734),b=E(27552),l=E(1308);function h(w,S,I,P){if((w=d.from(w.toArray())).length0&&I.ishrn(P),I}function m(w,S,I){var P,L;do{for(P=d.alloc(0);8*P.length{"use strict";var d=E(48850).Buffer,x=E(31734),f=E(36597).ec,T=E(27552),g=E(1308);function b(l,h){if(l.cmpn(0)<=0)throw new Error("invalid sig");if(l.cmp(h)>=h)throw new Error("invalid sig")}q.exports=function(l,h,u,m,_){var w=T(u);if("ec"===w.type){if("ecdsa"!==m&&"ecdsa/rsa"!==m)throw new Error("wrong public key type");return function(G,H,j){var K=g[j.data.algorithm.curve.join(".")];if(!K)throw new Error("unknown curve "+j.data.algorithm.curve.join("."));return new f(K).verify(H,G,j.data.subjectPrivateKey.data)}(l,h,w)}if("dsa"===w.type){if("dsa"!==m)throw new Error("wrong public key type");return function(G,H,j){var K=j.data.p,R=j.data.q,o=j.data.g,y=j.data.pub_key,M=T.signature.decode(G,"der"),v=M.s,k=M.r;b(v,R),b(k,R);var D=x.mont(K),N=v.invm(R);return 0===o.toRed(D).redPow(new x(H).mul(N).mod(R)).fromRed().mul(y.toRed(D).redPow(k.mul(N).mod(R)).fromRed()).mod(K).mod(R).cmp(k)}(l,h,w)}if("rsa"!==m&&"ecdsa/rsa"!==m)throw new Error("wrong public key type");h=d.concat([_,h]);for(var S=w.modulus.byteLength(),I=[1],P=0;h.length+I.length+2{"use strict";var d=E(29033).Buffer,x=E(19142),f=E(3894),T=E(47563),g=E(54151),b=E(63534),l=E(29806);for(var h in l)O[h]=l[h];function u(m){if("number"!=typeof m||mO.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=m,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}O.NONE=0,O.DEFLATE=1,O.INFLATE=2,O.GZIP=3,O.GUNZIP=4,O.DEFLATERAW=5,O.INFLATERAW=6,O.UNZIP=7,u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,f(this.init_done,"close before init"),f(this.mode<=O.UNZIP),this.mode===O.DEFLATE||this.mode===O.GZIP||this.mode===O.DEFLATERAW?g.deflateEnd(this.strm):this.mode!==O.INFLATE&&this.mode!==O.GUNZIP&&this.mode!==O.INFLATERAW&&this.mode!==O.UNZIP||b.inflateEnd(this.strm),this.mode=O.NONE,this.dictionary=null)},u.prototype.write=function(m,_,w,S,I,P,L){return this._write(!0,m,_,w,S,I,P,L)},u.prototype.writeSync=function(m,_,w,S,I,P,L){return this._write(!1,m,_,w,S,I,P,L)},u.prototype._write=function(m,_,w,S,I,P,L,V){if(f.equal(arguments.length,8),f(this.init_done,"write before init"),f(this.mode!==O.NONE,"already finalized"),f.equal(!1,this.write_in_progress,"write already in progress"),f.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,f.equal(!1,void 0===_,"must provide flush value"),this.write_in_progress=!0,_!==O.Z_NO_FLUSH&&_!==O.Z_PARTIAL_FLUSH&&_!==O.Z_SYNC_FLUSH&&_!==O.Z_FULL_FLUSH&&_!==O.Z_FINISH&&_!==O.Z_BLOCK)throw new Error("Invalid flush value");if(null==w&&(w=d.alloc(0),I=0,S=0),this.strm.avail_in=I,this.strm.input=w,this.strm.next_in=S,this.strm.avail_out=V,this.strm.output=P,this.strm.next_out=L,this.flush=_,!m)return this._process(),this._checkError()?this._afterSync():void 0;var W=this;return x.nextTick(function(){W._process(),W._after()}),this},u.prototype._afterSync=function(){var m=this.strm.avail_out,_=this.strm.avail_in;return this.write_in_progress=!1,[_,m]},u.prototype._process=function(){var m=null;switch(this.mode){case O.DEFLATE:case O.GZIP:case O.DEFLATERAW:this.err=g.deflate(this.strm,this.flush);break;case O.UNZIP:switch(this.strm.avail_in>0&&(m=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===m)break;if(31!==this.strm.input[m]){this.mode=O.INFLATE;break}if(this.gzip_id_bytes_read=1,m++,1===this.strm.avail_in)break;case 1:if(null===m)break;139===this.strm.input[m]?(this.gzip_id_bytes_read=2,this.mode=O.GUNZIP):this.mode=O.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case O.INFLATE:case O.GUNZIP:case O.INFLATERAW:for(this.err=b.inflate(this.strm,this.flush),this.err===O.Z_NEED_DICT&&this.dictionary&&(this.err=b.inflateSetDictionary(this.strm,this.dictionary),this.err===O.Z_OK?this.err=b.inflate(this.strm,this.flush):this.err===O.Z_DATA_ERROR&&(this.err=O.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===O.GUNZIP&&this.err===O.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=b.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case O.Z_OK:case O.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===O.Z_FINISH)return this._error("unexpected end of file"),!1;break;case O.Z_STREAM_END:break;case O.Z_NEED_DICT:return this._error(null==this.dictionary?"Missing dictionary":"Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var m=this.strm.avail_out,_=this.strm.avail_in;this.write_in_progress=!1,this.callback(_,m),this.pending_close&&this.close()}},u.prototype._error=function(m){this.strm.msg&&(m=this.strm.msg),this.onerror(m,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(m,_,w,S,I){f(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),f(m>=8&&m<=15,"invalid windowBits"),f(_>=-1&&_<=9,"invalid compression level"),f(w>=1&&w<=9,"invalid memlevel"),f(S===O.Z_FILTERED||S===O.Z_HUFFMAN_ONLY||S===O.Z_RLE||S===O.Z_FIXED||S===O.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(_,m,w,S,I),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(m,_,w,S,I){switch(this.level=m,this.windowBits=_,this.memLevel=w,this.strategy=S,this.flush=O.Z_NO_FLUSH,this.err=O.Z_OK,this.mode!==O.GZIP&&this.mode!==O.GUNZIP||(this.windowBits+=16),this.mode===O.UNZIP&&(this.windowBits+=32),this.mode!==O.DEFLATERAW&&this.mode!==O.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new T,this.mode){case O.DEFLATE:case O.GZIP:case O.DEFLATERAW:this.err=g.deflateInit2(this.strm,this.level,O.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case O.INFLATE:case O.GUNZIP:case O.INFLATERAW:case O.UNZIP:this.err=b.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==O.Z_OK&&this._error("Init error"),this.dictionary=I,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=O.Z_OK,this.mode){case O.DEFLATE:case O.DEFLATERAW:this.err=g.deflateSetDictionary(this.strm,this.dictionary)}this.err!==O.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=O.Z_OK,this.mode){case O.DEFLATE:case O.DEFLATERAW:case O.GZIP:this.err=g.deflateReset(this.strm);break;case O.INFLATE:case O.INFLATERAW:case O.GUNZIP:this.err=b.inflateReset(this.strm)}this.err!==O.Z_OK&&this._error("Failed to reset stream")},O.Zlib=u},77611:(q,O,E)=>{"use strict";var d=E(19142),x=E(29033).Buffer,f=E(57245).Transform,T=E(19626),g=E(45058),b=E(3894).ok,l=E(29033).kMaxLength,h="Cannot create final Buffer. It would be larger than 0x"+l.toString(16)+" bytes";T.Z_MIN_WINDOWBITS=8,T.Z_MAX_WINDOWBITS=15,T.Z_DEFAULT_WINDOWBITS=15,T.Z_MIN_CHUNK=64,T.Z_MAX_CHUNK=1/0,T.Z_DEFAULT_CHUNK=16384,T.Z_MIN_MEMLEVEL=1,T.Z_MAX_MEMLEVEL=9,T.Z_DEFAULT_MEMLEVEL=8,T.Z_MIN_LEVEL=-1,T.Z_MAX_LEVEL=9,T.Z_DEFAULT_LEVEL=T.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(T),m=0;m=l?ue=new RangeError(h):ce=x.concat(a,B),a=[],D.close(),C(ue,ce)}D.on("error",function(ce){D.removeListener("end",ee),D.removeListener("readable",Q),C(ce)}),D.on("end",ee),D.end(N),Q()}function V(D,N){if("string"==typeof N&&(N=x.from(N)),!x.isBuffer(N))throw new TypeError("Not a string or buffer");return D._processChunk(N,D._finishFlushFlag)}function W(D){if(!(this instanceof W))return new W(D);M.call(this,D,T.DEFLATE)}function G(D){if(!(this instanceof G))return new G(D);M.call(this,D,T.INFLATE)}function H(D){if(!(this instanceof H))return new H(D);M.call(this,D,T.GZIP)}function j(D){if(!(this instanceof j))return new j(D);M.call(this,D,T.GUNZIP)}function K(D){if(!(this instanceof K))return new K(D);M.call(this,D,T.DEFLATERAW)}function R(D){if(!(this instanceof R))return new R(D);M.call(this,D,T.INFLATERAW)}function o(D){if(!(this instanceof o))return new o(D);M.call(this,D,T.UNZIP)}function y(D){return D===T.Z_NO_FLUSH||D===T.Z_PARTIAL_FLUSH||D===T.Z_SYNC_FLUSH||D===T.Z_FULL_FLUSH||D===T.Z_FINISH||D===T.Z_BLOCK}function M(D,N){var C=this;if(this._opts=D=D||{},this._chunkSize=D.chunkSize||O.Z_DEFAULT_CHUNK,f.call(this,D),D.flush&&!y(D.flush))throw new Error("Invalid flush flag: "+D.flush);if(D.finishFlush&&!y(D.finishFlush))throw new Error("Invalid flush flag: "+D.finishFlush);if(this._flushFlag=D.flush||T.Z_NO_FLUSH,this._finishFlushFlag=void 0!==D.finishFlush?D.finishFlush:T.Z_FINISH,D.chunkSize&&(D.chunkSizeO.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+D.chunkSize);if(D.windowBits&&(D.windowBitsO.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+D.windowBits);if(D.level&&(D.levelO.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+D.level);if(D.memLevel&&(D.memLevelO.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+D.memLevel);if(D.strategy&&D.strategy!=O.Z_FILTERED&&D.strategy!=O.Z_HUFFMAN_ONLY&&D.strategy!=O.Z_RLE&&D.strategy!=O.Z_FIXED&&D.strategy!=O.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+D.strategy);if(D.dictionary&&!x.isBuffer(D.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new T.Zlib(N);var a=this;this._hadError=!1,this._handle.onerror=function(ee,ce){v(a),a._hadError=!0;var ue=new Error(ee);ue.errno=ce,ue.code=O.codes[ce],a.emit("error",ue)};var B=O.Z_DEFAULT_COMPRESSION;"number"==typeof D.level&&(B=D.level);var Q=O.Z_DEFAULT_STRATEGY;"number"==typeof D.strategy&&(Q=D.strategy),this._handle.init(D.windowBits||O.Z_DEFAULT_WINDOWBITS,B,D.memLevel||O.Z_DEFAULT_MEMLEVEL,Q,D.dictionary),this._buffer=x.allocUnsafe(this._chunkSize),this._offset=0,this._level=B,this._strategy=Q,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!C._handle},configurable:!0,enumerable:!0})}function v(D,N){N&&d.nextTick(N),D._handle&&(D._handle.close(),D._handle=null)}function k(D){D.emit("close")}Object.defineProperty(O,"codes",{enumerable:!0,value:Object.freeze(w),writable:!1}),O.Deflate=W,O.Inflate=G,O.Gzip=H,O.Gunzip=j,O.DeflateRaw=K,O.InflateRaw=R,O.Unzip=o,O.createDeflate=function(D){return new W(D)},O.createInflate=function(D){return new G(D)},O.createDeflateRaw=function(D){return new K(D)},O.createInflateRaw=function(D){return new R(D)},O.createGzip=function(D){return new H(D)},O.createGunzip=function(D){return new j(D)},O.createUnzip=function(D){return new o(D)},O.deflate=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new W(N),D,C)},O.deflateSync=function(D,N){return V(new W(N),D)},O.gzip=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new H(N),D,C)},O.gzipSync=function(D,N){return V(new H(N),D)},O.deflateRaw=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new K(N),D,C)},O.deflateRawSync=function(D,N){return V(new K(N),D)},O.unzip=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new o(N),D,C)},O.unzipSync=function(D,N){return V(new o(N),D)},O.inflate=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new G(N),D,C)},O.inflateSync=function(D,N){return V(new G(N),D)},O.gunzip=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new j(N),D,C)},O.gunzipSync=function(D,N){return V(new j(N),D)},O.inflateRaw=function(D,N,C){return"function"==typeof N&&(C=N,N={}),L(new R(N),D,C)},O.inflateRawSync=function(D,N){return V(new R(N),D)},g.inherits(M,f),M.prototype.params=function(D,N,C){if(DO.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+D);if(N!=O.Z_FILTERED&&N!=O.Z_HUFFMAN_ONLY&&N!=O.Z_RLE&&N!=O.Z_FIXED&&N!=O.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+N);if(this._level!==D||this._strategy!==N){var a=this;this.flush(T.Z_SYNC_FLUSH,function(){b(a._handle,"zlib binding closed"),a._handle.params(D,N),a._hadError||(a._level=D,a._strategy=N,C&&C())})}else d.nextTick(C)},M.prototype.reset=function(){return b(this._handle,"zlib binding closed"),this._handle.reset()},M.prototype._flush=function(D){this._transform(x.alloc(0),"",D)},M.prototype.flush=function(D,N){var C=this,a=this._writableState;("function"==typeof D||void 0===D&&!N)&&(N=D,D=T.Z_FULL_FLUSH),a.ended?N&&d.nextTick(N):a.ending?N&&this.once("end",N):a.needDrain?N&&this.once("drain",function(){return C.flush(D,N)}):(this._flushFlag=D,this.write(x.alloc(0),"",N))},M.prototype.close=function(D){v(this,D),d.nextTick(k,this)},M.prototype._transform=function(D,N,C){var a,B=this._writableState,Q=(B.ending||B.ended)&&(!D||B.length===D.length);return null===D||x.isBuffer(D)?this._handle?(Q?a=this._finishFlushFlag:(a=this._flushFlag,D.length>=B.length&&(this._flushFlag=this._opts.flush||T.Z_NO_FLUSH)),void this._processChunk(D,a,C)):C(new Error("zlib binding closed")):C(new Error("invalid input"))},M.prototype._processChunk=function(D,N,C){var a=D&&D.length,B=this._chunkSize-this._offset,Q=0,ee=this,ce="function"==typeof C;if(!ce){var ue,we=[],ae=0;this.on("error",function(pe){ue=pe}),b(this._handle,"zlib binding closed");do{var Te=this._handle.writeSync(N,D,Q,a,this._buffer,this._offset,B)}while(!this._hadError&&ne(Te[0],Te[1]));if(this._hadError)throw ue;if(ae>=l)throw v(this),new RangeError(h);var le=x.concat(we,ae);return v(this),le}b(this._handle,"zlib binding closed");var X=this._handle.write(N,D,Q,a,this._buffer,this._offset,B);function ne(pe,_e){if(this&&(this.buffer=null,this.callback=null),!ee._hadError){var xe=B-_e;if(b(xe>=0,"have should not go down"),xe>0){var Ce=ee._buffer.slice(ee._offset,ee._offset+xe);ee._offset+=xe,ce?ee.push(Ce):(we.push(Ce),ae+=Ce.length)}if((0===_e||ee._offset>=ee._chunkSize)&&(B=ee._chunkSize,ee._offset=0,ee._buffer=x.allocUnsafe(ee._chunkSize)),0===_e){if(Q+=a-pe,a=pe,!ce)return!0;var ke=ee._handle.write(N,D,Q,a,ee._buffer,ee._offset,ee._chunkSize);return ke.callback=ne,void(ke.buffer=D)}if(!ce)return!1;C()}}X.buffer=D,X.callback=ne},g.inherits(W,M),g.inherits(G,M),g.inherits(H,M),g.inherits(j,M),g.inherits(K,M),g.inherits(R,M),g.inherits(o,M)},96316:(q,O,E)=>{"use strict";var d=E(29033).Buffer;q.exports=function(x,f){for(var T=Math.min(x.length,f.length),g=new d(T),b=0;b{"use strict";var d=E(34919),x=E(83226),f=E(39484);function T(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function g(le,X){if(T()=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return 0|le}function w(le,X){if(b.isBuffer(le))return le.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(le)||le instanceof ArrayBuffer))return le.byteLength;"string"!=typeof le&&(le=""+le);var ne=le.length;if(0===ne)return 0;for(var pe=!1;;)switch(X){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":case void 0:return we(le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ne;case"hex":return ne>>>1;case"base64":return ae(le).length;default:if(pe)return we(le).length;X=(""+X).toLowerCase(),pe=!0}}function S(le,X,ne){var pe=!1;if((void 0===X||X<0)&&(X=0),X>this.length||((void 0===ne||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0)<=(X>>>=0))return"";for(le||(le="utf8");;)switch(le){case"hex":return k(this,X,ne);case"utf8":case"utf-8":return o(this,X,ne);case"ascii":return M(this,X,ne);case"latin1":case"binary":return v(this,X,ne);case"base64":return R(this,X,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,X,ne);default:if(pe)throw new TypeError("Unknown encoding: "+le);le=(le+"").toLowerCase(),pe=!0}}function I(le,X,ne){var pe=le[X];le[X]=le[ne],le[ne]=pe}function P(le,X,ne,pe,_e){if(0===le.length)return-1;if("string"==typeof ne?(pe=ne,ne=0):ne>2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,isNaN(ne)&&(ne=_e?0:le.length-1),ne<0&&(ne=le.length+ne),ne>=le.length){if(_e)return-1;ne=le.length-1}else if(ne<0){if(!_e)return-1;ne=0}if("string"==typeof X&&(X=b.from(X,pe)),b.isBuffer(X))return 0===X.length?-1:L(le,X,ne,pe,_e);if("number"==typeof X)return X&=255,b.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?_e?Uint8Array.prototype.indexOf.call(le,X,ne):Uint8Array.prototype.lastIndexOf.call(le,X,ne):L(le,[X],ne,pe,_e);throw new TypeError("val must be string, number or Buffer")}function L(le,X,ne,pe,_e){var xe,Ce=1,ke=le.length,me=X.length;if(void 0!==pe&&("ucs2"===(pe=String(pe).toLowerCase())||"ucs-2"===pe||"utf16le"===pe||"utf-16le"===pe)){if(le.length<2||X.length<2)return-1;Ce=2,ke/=2,me/=2,ne/=2}function Ee(tt,mt){return 1===Ce?tt[mt]:tt.readUInt16BE(mt*Ce)}if(_e){var ze=-1;for(xe=ne;xeke&&(ne=ke-me),xe=ne;xe>=0;xe--){for(var Ve=!0,nt=0;nt_e&&(pe=_e):pe=_e;var xe=X.length;if(xe%2!=0)throw new TypeError("Invalid hex string");pe>xe/2&&(pe=xe/2);for(var Ce=0;Ce>8,Ee.push(Ce%256),Ee.push(ke);return Ee}(X,le.length-ne),le,ne,pe)}function R(le,X,ne){return d.fromByteArray(0===X&&ne===le.length?le:le.slice(X,ne))}function o(le,X,ne){ne=Math.min(le.length,ne);for(var pe=[],_e=X;_e239?4:Ee>223?3:Ee>191?2:1;if(_e+Ve<=ne)switch(Ve){case 1:Ee<128&&(ze=Ee);break;case 2:128==(192&(xe=le[_e+1]))&&(me=(31&Ee)<<6|63&xe)>127&&(ze=me);break;case 3:Ce=le[_e+2],128==(192&(xe=le[_e+1]))&&128==(192&Ce)&&(me=(15&Ee)<<12|(63&xe)<<6|63&Ce)>2047&&(me<55296||me>57343)&&(ze=me);break;case 4:Ce=le[_e+2],ke=le[_e+3],128==(192&(xe=le[_e+1]))&&128==(192&Ce)&&128==(192&ke)&&(me=(15&Ee)<<18|(63&xe)<<12|(63&Ce)<<6|63&ke)>65535&&me<1114112&&(ze=me)}null===ze?(ze=65533,Ve=1):ze>65535&&(pe.push((ze-=65536)>>>10&1023|55296),ze=56320|1023&ze),pe.push(ze),_e+=Ve}return function(nt){var tt=nt.length;if(tt<=y)return String.fromCharCode.apply(String,nt);for(var mt="",ht=0;ht0&&(le=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(le+=" ... ")),""},b.prototype.compare=function(le,X,ne,pe,_e){if(!b.isBuffer(le))throw new TypeError("Argument must be a Buffer");if(void 0===X&&(X=0),void 0===ne&&(ne=le?le.length:0),void 0===pe&&(pe=0),void 0===_e&&(_e=this.length),X<0||ne>le.length||pe<0||_e>this.length)throw new RangeError("out of range index");if(pe>=_e&&X>=ne)return 0;if(pe>=_e)return-1;if(X>=ne)return 1;if(this===le)return 0;for(var xe=(_e>>>=0)-(pe>>>=0),Ce=(ne>>>=0)-(X>>>=0),ke=Math.min(xe,Ce),me=this.slice(pe,_e),Ee=le.slice(X,ne),ze=0;ze_e)&&(ne=_e),le.length>0&&(ne<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");pe||(pe="utf8");for(var xe=!1;;)switch(pe){case"hex":return V(this,le,X,ne);case"utf8":case"utf-8":return W(this,le,X,ne);case"ascii":return G(this,le,X,ne);case"latin1":case"binary":return H(this,le,X,ne);case"base64":return j(this,le,X,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,le,X,ne);default:if(xe)throw new TypeError("Unknown encoding: "+pe);pe=(""+pe).toLowerCase(),xe=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var y=4096;function M(le,X,ne){var pe="";ne=Math.min(le.length,ne);for(var _e=X;_e_e)&&(ne=_e);for(var xe="",Ce=X;Cene)throw new RangeError("Trying to access beyond buffer length")}function C(le,X,ne,pe,_e,xe){if(!b.isBuffer(le))throw new TypeError('"buffer" argument must be a Buffer instance');if(X>_e||Xle.length)throw new RangeError("Index out of range")}function a(le,X,ne,pe){X<0&&(X=65535+X+1);for(var _e=0,xe=Math.min(le.length-ne,2);_e>>8*(pe?_e:1-_e)}function B(le,X,ne,pe){X<0&&(X=4294967295+X+1);for(var _e=0,xe=Math.min(le.length-ne,4);_e>>8*(pe?_e:3-_e)&255}function Q(le,X,ne,pe,_e,xe){if(ne+pe>le.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function ee(le,X,ne,pe,_e){return _e||Q(le,0,ne,4),x.write(le,X,ne,pe,23,4),ne+4}function ce(le,X,ne,pe,_e){return _e||Q(le,0,ne,8),x.write(le,X,ne,pe,52,8),ne+8}b.prototype.slice=function(le,X){var ne,pe=this.length;if((le=~~le)<0?(le+=pe)<0&&(le=0):le>pe&&(le=pe),(X=void 0===X?pe:~~X)<0?(X+=pe)<0&&(X=0):X>pe&&(X=pe),X0&&(_e*=256);)pe+=this[le+--X]*_e;return pe},b.prototype.readUInt8=function(le,X){return X||N(le,1,this.length),this[le]},b.prototype.readUInt16LE=function(le,X){return X||N(le,2,this.length),this[le]|this[le+1]<<8},b.prototype.readUInt16BE=function(le,X){return X||N(le,2,this.length),this[le]<<8|this[le+1]},b.prototype.readUInt32LE=function(le,X){return X||N(le,4,this.length),(this[le]|this[le+1]<<8|this[le+2]<<16)+16777216*this[le+3]},b.prototype.readUInt32BE=function(le,X){return X||N(le,4,this.length),16777216*this[le]+(this[le+1]<<16|this[le+2]<<8|this[le+3])},b.prototype.readIntLE=function(le,X,ne){le|=0,X|=0,ne||N(le,X,this.length);for(var pe=this[le],_e=1,xe=0;++xe=(_e*=128)&&(pe-=Math.pow(2,8*X)),pe},b.prototype.readIntBE=function(le,X,ne){le|=0,X|=0,ne||N(le,X,this.length);for(var pe=X,_e=1,xe=this[le+--pe];pe>0&&(_e*=256);)xe+=this[le+--pe]*_e;return xe>=(_e*=128)&&(xe-=Math.pow(2,8*X)),xe},b.prototype.readInt8=function(le,X){return X||N(le,1,this.length),128&this[le]?-1*(255-this[le]+1):this[le]},b.prototype.readInt16LE=function(le,X){X||N(le,2,this.length);var ne=this[le]|this[le+1]<<8;return 32768&ne?4294901760|ne:ne},b.prototype.readInt16BE=function(le,X){X||N(le,2,this.length);var ne=this[le+1]|this[le]<<8;return 32768&ne?4294901760|ne:ne},b.prototype.readInt32LE=function(le,X){return X||N(le,4,this.length),this[le]|this[le+1]<<8|this[le+2]<<16|this[le+3]<<24},b.prototype.readInt32BE=function(le,X){return X||N(le,4,this.length),this[le]<<24|this[le+1]<<16|this[le+2]<<8|this[le+3]},b.prototype.readFloatLE=function(le,X){return X||N(le,4,this.length),x.read(this,le,!0,23,4)},b.prototype.readFloatBE=function(le,X){return X||N(le,4,this.length),x.read(this,le,!1,23,4)},b.prototype.readDoubleLE=function(le,X){return X||N(le,8,this.length),x.read(this,le,!0,52,8)},b.prototype.readDoubleBE=function(le,X){return X||N(le,8,this.length),x.read(this,le,!1,52,8)},b.prototype.writeUIntLE=function(le,X,ne,pe){le=+le,X|=0,ne|=0,pe||C(this,le,X,ne,Math.pow(2,8*ne)-1,0);var _e=1,xe=0;for(this[X]=255≤++xe=0&&(xe*=256);)this[X+_e]=le/xe&255;return X+ne},b.prototype.writeUInt8=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,1,255,0),b.TYPED_ARRAY_SUPPORT||(le=Math.floor(le)),this[X]=255&le,X+1},b.prototype.writeUInt16LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[X]=255&le,this[X+1]=le>>>8):a(this,le,X,!0),X+2},b.prototype.writeUInt16BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>8,this[X+1]=255&le):a(this,le,X,!1),X+2},b.prototype.writeUInt32LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[X+3]=le>>>24,this[X+2]=le>>>16,this[X+1]=le>>>8,this[X]=255&le):B(this,le,X,!0),X+4},b.prototype.writeUInt32BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>24,this[X+1]=le>>>16,this[X+2]=le>>>8,this[X+3]=255&le):B(this,le,X,!1),X+4},b.prototype.writeIntLE=function(le,X,ne,pe){if(le=+le,X|=0,!pe){var _e=Math.pow(2,8*ne-1);C(this,le,X,ne,_e-1,-_e)}var xe=0,Ce=1,ke=0;for(this[X]=255≤++xe>0)-ke&255;return X+ne},b.prototype.writeIntBE=function(le,X,ne,pe){if(le=+le,X|=0,!pe){var _e=Math.pow(2,8*ne-1);C(this,le,X,ne,_e-1,-_e)}var xe=ne-1,Ce=1,ke=0;for(this[X+xe]=255≤--xe>=0&&(Ce*=256);)le<0&&0===ke&&0!==this[X+xe+1]&&(ke=1),this[X+xe]=(le/Ce>>0)-ke&255;return X+ne},b.prototype.writeInt8=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,1,127,-128),b.TYPED_ARRAY_SUPPORT||(le=Math.floor(le)),le<0&&(le=255+le+1),this[X]=255&le,X+1},b.prototype.writeInt16LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[X]=255&le,this[X+1]=le>>>8):a(this,le,X,!0),X+2},b.prototype.writeInt16BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>8,this[X+1]=255&le):a(this,le,X,!1),X+2},b.prototype.writeInt32LE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[X]=255&le,this[X+1]=le>>>8,this[X+2]=le>>>16,this[X+3]=le>>>24):B(this,le,X,!0),X+4},b.prototype.writeInt32BE=function(le,X,ne){return le=+le,X|=0,ne||C(this,le,X,4,2147483647,-2147483648),le<0&&(le=4294967295+le+1),b.TYPED_ARRAY_SUPPORT?(this[X]=le>>>24,this[X+1]=le>>>16,this[X+2]=le>>>8,this[X+3]=255&le):B(this,le,X,!1),X+4},b.prototype.writeFloatLE=function(le,X,ne){return ee(this,le,X,!0,ne)},b.prototype.writeFloatBE=function(le,X,ne){return ee(this,le,X,!1,ne)},b.prototype.writeDoubleLE=function(le,X,ne){return ce(this,le,X,!0,ne)},b.prototype.writeDoubleBE=function(le,X,ne){return ce(this,le,X,!1,ne)},b.prototype.copy=function(le,X,ne,pe){if(ne||(ne=0),pe||0===pe||(pe=this.length),X>=le.length&&(X=le.length),X||(X=0),pe>0&&pe=this.length)throw new RangeError("sourceStart out of bounds");if(pe<0)throw new RangeError("sourceEnd out of bounds");pe>this.length&&(pe=this.length),le.length-X=0;--_e)le[_e+X]=this[_e+ne];else if(xe<1e3||!b.TYPED_ARRAY_SUPPORT)for(_e=0;_e>>=0,ne=void 0===ne?this.length:ne>>>0,le||(le=0),"number"==typeof le)for(xe=X;xe55295&&ne<57344){if(!_e){if(ne>56319){(X-=3)>-1&&xe.push(239,191,189);continue}if(Ce+1===pe){(X-=3)>-1&&xe.push(239,191,189);continue}_e=ne;continue}if(ne<56320){(X-=3)>-1&&xe.push(239,191,189),_e=ne;continue}ne=65536+(_e-55296<<10|ne-56320)}else _e&&(X-=3)>-1&&xe.push(239,191,189);if(_e=null,ne<128){if((X-=1)<0)break;xe.push(ne)}else if(ne<2048){if((X-=2)<0)break;xe.push(ne>>6|192,63&ne|128)}else if(ne<65536){if((X-=3)<0)break;xe.push(ne>>12|224,ne>>6&63|128,63&ne|128)}else{if(!(ne<1114112))throw new Error("Invalid code point");if((X-=4)<0)break;xe.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,63&ne|128)}}return xe}function ae(le){return d.toByteArray(function(X){if((X=(ne=X,ne.trim?ne.trim():ne.replace(/^\s+|\s+$/g,"")).replace(ue,"")).length<2)return"";for(var ne;X.length%4!=0;)X+="=";return X}(le))}function Te(le,X,ne,pe){for(var _e=0;_e=X.length||_e>=le.length);++_e)X[_e+ne]=le[_e];return _e}},83675:q=>{"use strict";q.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},80593:(q,O,E)=>{"use strict";var d=E(57701),x=E(24373),f=x(d("String.prototype.indexOf"));q.exports=function(T,g){var b=d(T,!!g);return"function"==typeof b&&f(T,".prototype.")>-1?x(b):b}},24373:(q,O,E)=>{"use strict";var d=E(3767),x=E(57701),f=x("%Function.prototype.apply%"),T=x("%Function.prototype.call%"),g=x("%Reflect.apply%",!0)||d.call(T,f),b=x("%Object.getOwnPropertyDescriptor%",!0),l=x("%Object.defineProperty%",!0),h=x("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}q.exports=function(m){var _=g(d,T,arguments);return b&&l&&b(_,"length").configurable&&l(_,"length",{value:1+h(0,m.length-(arguments.length-1))}),_};var u=function(){return g(d,f,arguments)};l?l(q.exports,"apply",{value:u}):q.exports.apply=u},47759:(q,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(83630),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(29033).Buffer,x=E(26657),f=E(55262),T=E(71842),g=E(40779);(O=q.exports).addPrefix=function(l,h){var u;if(d.isBuffer(l))u=g.varintBufferEncode(l);else{if(!T[l])throw new Error("multicodec not recognized");u=T[l]}return d.concat([u,h])},O.rmPrefix=function(l){return x.decode(l),l.slice(x.decode.bytes)},O.getCodec=function(l){var h=x.decode(l),u=f.get(h);if(void 0===u)throw new Error("Code ".concat(h," not found"));return u},O.getName=function(l){return f.get(l)},O.getNumber=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return g.varintBufferDecode(h)[0]},O.getCode=function(l){return x.decode(l)},O.getCodeVarint=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return h},O.getVarint=function(l){return x.encode(l)};var b=E(47759);Object.assign(O,b),O.print=E(29268)},55262:(q,O,E)=>{"use strict";var d=E(83630),x=new Map;for(var f in d)x.set(d[f],f);q.exports=Object.freeze(x)},29268:(q,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(83630),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(26657),x=E(29033).Buffer;function f(g){return parseInt(g.toString("hex"),16)}function T(g){var b=g.toString(16);return b.length%2==1&&(b="0"+b),x.from(b,"hex")}q.exports={numberToBuffer:T,bufferToNumber:f,varintBufferEncode:function(g){return x.from(d.encode(f(g)))},varintBufferDecode:function(g){return T(d.decode(g))},varintEncode:function(g){return x.from(d.encode(g))}}},71842:(q,O,E)=>{"use strict";var d=E(83630),x=E(40779).varintEncode,f={};for(var T in d)f[T]=x(d[T]);q.exports=Object.freeze(f)},59976:(q,O,E)=>{"use strict";var d=E(77748),x=E(29033).Buffer;q.exports={checkCIDComponents:function(T){if(null==T)return"null values are not valid CIDs";if(0!==T.version&&1!==T.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof T.codec)return"codec must be string";if(0===T.version){if("dag-pb"!==T.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==T.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!x.isBuffer(T.multihash))return"multihash must be a Buffer";try{d.validate(T.multihash)}catch(b){var g=b.message;return g||(g="Multihash validation failed"),g}}}},72753:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=E(29033).Buffer,g=E(77748),b=E(6086),l=E(97223),h=E(83630),u=E(59976),m=E(83162)(function(_){function w(S,I,P,L){if((0,x.default)(this,w),m.isCID(S)){var V=S;return this.version=V.version,this.codec=V.codec,this.multihash=T.from(V.multihash),void(this.multibaseName=V.multibaseName||(0===V.version?"base58btc":"base32"))}if("string"==typeof S){var W=b.isEncoded(S);if(W){var G=b.decode(S);this.version=parseInt(G.slice(0,1).toString("hex"),16),this.codec=l.getCodec(G.slice(1)),this.multihash=l.rmPrefix(G.slice(1)),this.multibaseName=W}else this.version=0,this.codec="dag-pb",this.multihash=g.fromB58String(S),this.multibaseName="base58btc";return w.validateCID(this),void Object.defineProperty(this,"string",{value:S})}if(T.isBuffer(S)){var H=S.slice(0,1),j=parseInt(H.toString("hex"),16);if(1===j){var K=S;this.version=j,this.codec=l.getCodec(K.slice(1)),this.multihash=l.rmPrefix(K.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=S,this.multibaseName="base58btc";w.validateCID(this)}else this.version=S,this.codec=I,this.multihash=P,this.multibaseName=L||(0===S?"base58btc":"base32"),w.validateCID(this)}return(0,f.default)(w,[{key:"buffer",get:function(){var S=this._buffer;if(!S){if(0===this.version)S=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");S=T.concat([T.from("01","hex"),l.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:S})}return S}},{key:"prefix",get:function(){return T.concat([T.from("0".concat(this.version),"hex"),l.getCodeVarint(this.codec),g.prefix(this.multihash)])}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var S=g.decode(this.multihash),P=S.length;if("sha2-256"!==S.name)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==P)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new m(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new m(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(){var S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&S===this.multibaseName)return this.string;var I=null;if(0===this.version){if("base58btc"!==S)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");I=g.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");I=b.encode(S,this.buffer).toString()}return S===this.multibaseName&&Object.defineProperty(this,"string",{value:I}),I}},{key:_,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(S){return this.toBaseEncodedString(S)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(S){return this.codec===S.codec&&this.version===S.version&&this.multihash.equals(S.multihash)}}],[{key:"validateCID",value:function(S){var I=u.checkCIDComponents(S);if(I)throw new Error(I)}}]),w}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});m.codecs=h,q.exports=m},93013:(q,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(57245).Transform,f=E(23462).s;function T(g){x.call(this),this.hashMode="string"==typeof g,this.hashMode?this[g]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}E(41736)(T,x),T.prototype.update=function(g,b,l){"string"==typeof g&&(g=d.from(g,b));var h=this._update(g);return this.hashMode?this:(l&&(h=this._toString(h,l)),h)},T.prototype.setAutoPadding=function(){},T.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},T.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},T.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},T.prototype._transform=function(g,b,l){var h;try{this.hashMode?this._update(g):this.push(this._update(g))}catch(u){h=u}finally{l(h)}},T.prototype._flush=function(g){var b;try{this.push(this.__final())}catch(l){b=l}g(b)},T.prototype._finalOrDigest=function(g){var b=this.__final()||d.alloc(0);return g&&(b=this._toString(b,g,!0)),b},T.prototype._toString=function(g,b,l){if(this._decoder||(this._decoder=new f(b),this._encoding=b),this._encoding!==b)throw new Error("can't switch encodings");var h=this._decoder.write(g);return l&&(h+=this._decoder.end()),h},q.exports=T},83162:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(14727)),f=d(E(90775)),T=d(E(69721)),g=d(E(58985)),b=d(E(58975)),l=d(E(15163)),h=d(E(34650)),u=d(E(21949));q.exports=function(m,_){var w=_.className,I=Symbol.for(_.symbolName),P=(0,f.default)({},w,function(L,V){(0,l.default)(j,L);var W,G,H=(W=j,G=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var K,R=(0,u.default)(W);if(G){var o=(0,u.default)(this).constructor;K=Reflect.construct(R,arguments,o)}else K=R.apply(this,arguments);return(0,h.default)(this,K)});function j(){var K;(0,T.default)(this,j);for(var R=arguments.length,o=new Array(R),y=0;y{"use strict";var d=E(72753);O.cidV0ToV1Base32=function(x){var f=new d(x);return 0===f.version&&(f=f.toV1()),f.toString("base32")}},94308:(q,O,E)=>{"use strict";var d=E(69206),x=E(39512),f=x.hexStringToBuffer,T=x.profiles,g=E(36834).cidV0ToV1Base32;q.exports={helpers:{cidV0ToV1Base32:g},decode:function(b){var l=f(b),h=d.getCodec(l),u=d.rmPrefix(l),m=T[h];return m||(m=T.default),m.decode(u)},fromIpfs:function(b){return this.encode("ipfs-ns",b)},fromSwarm:function(b){return this.encode("swarm-ns",b)},encode:function(b,l){var h=T[b];h||(h=T.default);var u=h.encode(l);return d.addPrefix(b,u).toString("hex")},getCodec:function(b){var l=f(b);return d.getCodec(l)}}},39512:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(72753),f=E(77748),T=function(h){var m=h.slice(0,2),_=h.slice(2);return f.fromHexString("0x"===m?_:h)},g={swarm:function(h){var u=f.encode(T(h),"keccak-256");return new x(1,"swarm-manifest",u).buffer},ipfs:function(h){var u=f.fromB58String(h);return new x(1,"dag-pb",u).buffer},utf8:function(h){return d.from(h,"utf8")}},b={hexMultiHash:function(h){var u=new x(h);return f.decode(u.multihash).digest.toString("hex")},b58MultiHash:function(h){var u=new x(h);return f.toB58String(u.multihash)},utf8:function(h){return h.toString("utf8")}},l={"swarm-ns":{encode:g.swarm,decode:b.hexMultiHash},"ipfs-ns":{encode:g.ipfs,decode:b.b58MultiHash},"ipns-ns":{encode:g.ipfs,decode:b.b58MultiHash},default:{encode:g.utf8,decode:b.utf8}};O.hexStringToBuffer=T,O.profiles=l},64628:(q,O,E)=>{"use strict";var d,x,f=E(28847)(E(3355));x=function(T){T.version="1.2.2";var g=function(){for(var K=0,R=new Array(256),o=0;256!=o;++o)K=1&(K=1&(K=1&(K=1&(K=1&(K=1&(K=1&(K=1&(K=o)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1)?-306674912^K>>>1:K>>>1,R[o]=K;return"undefined"!=typeof Int32Array?new Int32Array(R):R}(),b=function(K){var R=0,o=0,y=0,M="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(y=0;256!=y;++y)M[y]=K[y];for(y=0;256!=y;++y)for(o=K[y],R=256+y;R<4096;R+=256)o=M[R]=o>>>8^K[255&o];var v=[];for(y=1;16!=y;++y)v[y-1]="undefined"!=typeof Int32Array?M.subarray(256*y,256*y+256):M.slice(256*y,256*y+256);return v}(g),l=b[0],h=b[1],u=b[2],m=b[3],_=b[4],w=b[5],S=b[6],I=b[7],P=b[8],L=b[9],V=b[10],W=b[11],G=b[12],H=b[13],j=b[14];T.table=g,T.bstr=function(K,R){for(var o=-1^R,y=0,M=K.length;y>>8^g[255&(o^K.charCodeAt(y++))];return~o},T.buf=function(K,R){for(var o=-1^R,y=K.length-15,M=0;M>8&255]^G[K[M++]^o>>16&255]^W[K[M++]^o>>>24]^V[K[M++]]^L[K[M++]]^P[K[M++]]^I[K[M++]]^S[K[M++]]^w[K[M++]]^_[K[M++]]^m[K[M++]]^u[K[M++]]^h[K[M++]]^l[K[M++]]^g[K[M++]];for(y+=15;M>>8^g[255&(o^K[M++])];return~o},T.str=function(K,R){for(var o=-1^R,y=0,M=K.length,v=0,k=0;y>>8^g[255&(o^v)]:v<2048?o=(o=o>>>8^g[255&(o^(192|v>>6&31))])>>>8^g[255&(o^(128|63&v))]:v>=55296&&v<57344?(v=64+(1023&v),k=1023&K.charCodeAt(y++),o=(o=(o=(o=o>>>8^g[255&(o^(240|v>>8&7))])>>>8^g[255&(o^(128|v>>2&63))])>>>8^g[255&(o^(128|k>>6&15|(3&v)<<4))])>>>8^g[255&(o^(128|63&k))]):o=(o=(o=o>>>8^g[255&(o^(224|v>>12&15))])>>>8^g[255&(o^(128|v>>6&63))])>>>8^g[255&(o^(128|63&v))];return~o}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,f.default)(O)?x(O):void 0===(d=function(){var T={};return x(T),T}.call(O,E,O,q))||(q.exports=d):x({})},75102:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(36597),f=E(31734);q.exports=function(l){return new g(l)};var T={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function g(l){this.curveType=T[l],this.curveType||(this.curveType={name:l}),this.curve=new x.ec(this.curveType.name),this.keys=void 0}function b(l,h,u){Array.isArray(l)||(l=l.toArray());var m=new d(l);if(u&&m.length{"use strict";var d=E(41736),x=E(50807),f=E(26707),T=E(51708),g=E(93013);function b(l){g.call(this,"digest"),this._hash=l}d(b,g),b.prototype._update=function(l){this._hash.update(l)},b.prototype._final=function(){return this._hash.digest()},q.exports=function(l){return"md5"===(l=l.toLowerCase())?new x:"rmd160"===l||"ripemd160"===l?new f:new b(T(l))}},55349:(q,O,E)=>{"use strict";var d=E(50807);q.exports=function(x){return(new d).update(x).digest()}},34424:(q,O,E)=>{"use strict";var d=E(41736),x=E(19956),f=E(93013),T=E(48850).Buffer,g=E(55349),b=E(26707),l=E(51708),h=T.alloc(128);function u(m,_){f.call(this,"digest"),"string"==typeof _&&(_=T.from(_));var w="sha512"===m||"sha384"===m?128:64;this._alg=m,this._key=_,_.length>w?_=("rmd160"===m?new b:l(m)).update(_).digest():_.length{"use strict";var d=E(41736),x=E(48850).Buffer,f=E(93013),T=x.alloc(128),g=64;function b(l,h){f.call(this,"digest"),"string"==typeof h&&(h=x.from(h)),this._alg=l,this._key=h,h.length>g?h=l(h):h.length{"use strict";var g,d=E(28847)(E(3355)),x="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==E.g&&E.g,f=function(){function g(){this.fetch=!1,this.DOMException=x.DOMException}return g.prototype=x,new g}();g=f,function(b){var l=void 0!==g&&g||"undefined"!=typeof self&&self||void 0!==l&&l,h_searchParams="URLSearchParams"in l,h_iterable="Symbol"in l&&"iterator"in Symbol,h_blob="FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),h_formData="FormData"in l,h_arrayBuffer="ArrayBuffer"in l;if(h_arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(M){return M&&u.indexOf(Object.prototype.toString.call(M))>-1};function _(M){if("string"!=typeof M&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(M)||""===M)throw new TypeError('Invalid character in header field name: "'+M+'"');return M.toLowerCase()}function w(M){return"string"!=typeof M&&(M=String(M)),M}function S(M){var v={next:function(){var k=M.shift();return{done:void 0===k,value:k}}};return h_iterable&&(v[Symbol.iterator]=function(){return v}),v}function I(M){this.map={},M instanceof I?M.forEach(function(v,k){this.append(k,v)},this):Array.isArray(M)?M.forEach(function(v){this.append(v[0],v[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(v){this.append(v,M[v])},this)}function P(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function L(M){return new Promise(function(v,k){M.onload=function(){v(M.result)},M.onerror=function(){k(M.error)}})}function V(M){var v=new FileReader,k=L(v);return v.readAsArrayBuffer(M),k}function W(M){if(M.slice)return M.slice(0);var v=new Uint8Array(M.byteLength);return v.set(new Uint8Array(M)),v.buffer}function G(){return this.bodyUsed=!1,this._initBody=function(M){var v;this.bodyUsed=this.bodyUsed,this._bodyInit=M,M?"string"==typeof M?this._bodyText=M:h_blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:h_formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:h_searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():h_arrayBuffer&&h_blob&&(v=M)&&DataView.prototype.isPrototypeOf(v)?(this._bodyArrayBuffer=W(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h_arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||m(M))?this._bodyArrayBuffer=W(M):this._bodyText=M=Object.prototype.toString.call(M):this._bodyText="",this.headers.get("content-type")||("string"==typeof M?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h_searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h_blob&&(this.blob=function(){var M=P(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?P(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(V)}),this.text=function(){var M,v,k,D=P(this);if(D)return D;if(this._bodyBlob)return M=this._bodyBlob,k=L(v=new FileReader),v.readAsText(M),k;if(this._bodyArrayBuffer)return Promise.resolve(function(N){for(var C=new Uint8Array(N),a=new Array(C.length),B=0;B-1?D:k),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&N)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(N),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==v.cache&&"no-cache"!==v.cache)){var C=/([?&])_=[^&]*/;C.test(this.url)?this.url=this.url.replace(C,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function K(M){var v=new FormData;return M.trim().split("&").forEach(function(k){if(k){var D=k.split("="),N=D.shift().replace(/\+/g," "),C=D.join("=").replace(/\+/g," ");v.append(decodeURIComponent(N),decodeURIComponent(C))}}),v}function R(M,v){if(!(this instanceof R))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');v||(v={}),this.type="default",this.status=void 0===v.status?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===v.statusText?"":""+v.statusText,this.headers=new I(v.headers),this.url=v.url||"",this._initBody(M)}j.prototype.clone=function(){return new j(this,{body:this._bodyInit})},G.call(j.prototype),G.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new I(this.headers),url:this.url})},R.error=function(){var M=new R(null,{status:0,statusText:""});return M.type="error",M};var o=[301,302,303,307,308];R.redirect=function(M,v){if(-1===o.indexOf(v))throw new RangeError("Invalid status code");return new R(null,{status:v,headers:{location:M}})},b.DOMException=l.DOMException;try{new b.DOMException}catch{b.DOMException=function(v,k){this.message=v,this.name=k;var D=Error(v);this.stack=D.stack},b.DOMException.prototype=Object.create(Error.prototype),b.DOMException.prototype.constructor=b.DOMException}function y(M,v){return new Promise(function(k,D){var N=new j(M,v);if(N.signal&&N.signal.aborted)return D(new b.DOMException("Aborted","AbortError"));var C=new XMLHttpRequest;function a(){C.abort()}C.onload=function(){var B,Q,ee={status:C.status,statusText:C.statusText,headers:(B=C.getAllResponseHeaders()||"",Q=new I,B.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(ue){return 0===ue.indexOf("\n")?ue.substr(1,ue.length):ue}).forEach(function(ue){var we=ue.split(":"),ae=we.shift().trim();if(ae){var Te=we.join(":").trim();Q.append(ae,Te)}}),Q)};ee.url="responseURL"in C?C.responseURL:ee.headers.get("X-Request-URL");var ce="response"in C?C.response:C.responseText;setTimeout(function(){k(new R(ce,ee))},0)},C.onerror=function(){setTimeout(function(){D(new TypeError("Network request failed"))},0)},C.ontimeout=function(){setTimeout(function(){D(new TypeError("Network request failed"))},0)},C.onabort=function(){setTimeout(function(){D(new b.DOMException("Aborted","AbortError"))},0)},C.open(N.method,function(B){try{return""===B&&l.location.href?l.location.href:B}catch{return B}}(N.url),!0),"include"===N.credentials?C.withCredentials=!0:"omit"===N.credentials&&(C.withCredentials=!1),"responseType"in C&&(h_blob?C.responseType="blob":h_arrayBuffer&&N.headers.get("Content-Type")&&-1!==N.headers.get("Content-Type").indexOf("application/octet-stream")&&(C.responseType="arraybuffer")),!v||"object"!==(0,d.default)(v.headers)||v.headers instanceof I?N.headers.forEach(function(B,Q){C.setRequestHeader(Q,B)}):Object.getOwnPropertyNames(v.headers).forEach(function(B){C.setRequestHeader(B,w(v.headers[B]))}),N.signal&&(N.signal.addEventListener("abort",a),C.onreadystatechange=function(){4===C.readyState&&N.signal.removeEventListener("abort",a)}),C.send(void 0===N._bodyInit?null:N._bodyInit)})}y.polyfill=!0,l.fetch||(l.fetch=y,l.Headers=I,l.Request=j,l.Response=R),b.Headers=I,b.Request=j,b.Response=R,b.fetch=y}({}),f.fetch.ponyfill=!0,delete f.fetch.polyfill;var T=x.fetch?x:f;(O=T.fetch).default=T.fetch,O.fetch=T.fetch,O.Headers=T.Headers,O.Request=T.Request,O.Response=T.Response,q.exports=O},24293:(q,O,E)=>{"use strict";O.randomBytes=O.rng=O.pseudoRandomBytes=O.prng=E(75010),O.createHash=O.Hash=E(35866),O.createHmac=O.Hmac=E(34424);var d=E(26561),x=Object.keys(d),f=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(x);O.getHashes=function(){return f};var T=E(54192);O.pbkdf2=T.pbkdf2,O.pbkdf2Sync=T.pbkdf2Sync;var g=E(56805);O.Cipher=g.Cipher,O.createCipher=g.createCipher,O.Cipheriv=g.Cipheriv,O.createCipheriv=g.createCipheriv,O.Decipher=g.Decipher,O.createDecipher=g.createDecipher,O.Decipheriv=g.Decipheriv,O.createDecipheriv=g.createDecipheriv,O.getCiphers=g.getCiphers,O.listCiphers=g.listCiphers;var b=E(28333);O.DiffieHellmanGroup=b.DiffieHellmanGroup,O.createDiffieHellmanGroup=b.createDiffieHellmanGroup,O.getDiffieHellman=b.getDiffieHellman,O.createDiffieHellman=b.createDiffieHellman,O.DiffieHellman=b.DiffieHellman;var l=E(79527);O.createSign=l.createSign,O.Sign=l.Sign,O.createVerify=l.createVerify,O.Verify=l.Verify,O.createECDH=E(75102);var h=E(86991);O.publicEncrypt=h.publicEncrypt,O.privateEncrypt=h.privateEncrypt,O.publicDecrypt=h.publicDecrypt,O.privateDecrypt=h.privateDecrypt;var u=E(36509);O.randomFill=u.randomFill,O.randomFillSync=u.randomFillSync,O.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},O.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},80034:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x="%[a-f0-9]{2}",f=new RegExp("("+x+")|([^%]+?)","gi"),T=new RegExp("("+x+")+","gi");function g(l,h){try{return[decodeURIComponent(l.join(""))]}catch{}if(1===l.length)return l;var u=l.slice(0,h=h||1),m=l.slice(h);return Array.prototype.concat.call([],g(u),g(m))}function b(l){try{return decodeURIComponent(l)}catch{for(var h=l.match(f)||[],u=1;u{"use strict";O.utils=E(43349),O.Cipher=E(19591),O.DES=E(63049),O.CBC=E(4375),O.EDE=E(9413)},4375:(q,O,E)=>{"use strict";var d=E(94504),x=E(41736),f={};function T(g){d.equal(g.length,8,"Invalid IV length"),this.iv=new Array(8);for(var b=0;b{"use strict";var d=E(94504);function x(f){this.options=f,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}q.exports=x,x.prototype._init=function(){},x.prototype.update=function(f){return 0===f.length?[]:"decrypt"===this.type?this._updateDecrypt(f):this._updateEncrypt(f)},x.prototype._buffer=function(f,T){for(var g=Math.min(this.buffer.length-this.bufferOff,f.length-T),b=0;b0;b--)T+=this._buffer(f,T),g+=this._flushBuffer(l,g);return T+=this._buffer(f,T),l},x.prototype.final=function(f){var T,g;return f&&(T=this.update(f)),g="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),T?T.concat(g):g},x.prototype._pad=function(f,T){if(0===T)return!1;for(;T{"use strict";var d=E(94504),x=E(41736),f=E(43349),T=E(19591);function g(){this.tmp=new Array(2),this.keys=null}function b(h){T.call(this,h);var u=new g;this._desState=u,this.deriveKeys(u,h.key)}x(b,T),q.exports=b,b.create=function(h){return new b(h)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];b.prototype.deriveKeys=function(h,u){h.keys=new Array(32),d.equal(u.length,this.blockSize,"Invalid key length");var m=f.readUInt32BE(u,0),_=f.readUInt32BE(u,4);f.pc1(m,_,h.tmp,0),m=h.tmp[0],_=h.tmp[1];for(var w=0;w>>1];m=f.r28shl(m,S),_=f.r28shl(_,S),f.pc2(m,_,h.keys,w)}},b.prototype._update=function(h,u,m,_){var w=this._desState,S=f.readUInt32BE(h,u),I=f.readUInt32BE(h,u+4);f.ip(S,I,w.tmp,0),S=w.tmp[0],I=w.tmp[1],"encrypt"===this.type?this._encrypt(w,S,I,w.tmp,0):this._decrypt(w,S,I,w.tmp,0),I=w.tmp[1],f.writeUInt32BE(m,S=w.tmp[0],_),f.writeUInt32BE(m,I,_+4)},b.prototype._pad=function(h,u){for(var m=h.length-u,_=u;_>>0,S=G}f.rip(I,S,_,w)},b.prototype._decrypt=function(h,u,m,_,w){for(var S=m,I=u,P=h.keys.length-2;P>=0;P-=2){var L=h.keys[P],V=h.keys[P+1];f.expand(S,h.tmp,0);var W=f.substitute(L^=h.tmp[0],V^=h.tmp[1]),G=S;S=(I^f.permute(W))>>>0,I=G}f.rip(S,I,_,w)}},9413:(q,O,E)=>{"use strict";var d=E(94504),x=E(41736),f=E(19591),T=E(63049);function g(l,h){d.equal(h.length,24,"Invalid key length");var u=h.slice(0,8),m=h.slice(8,16),_=h.slice(16,24);this.ciphers="encrypt"===l?[T.create({type:"encrypt",key:u}),T.create({type:"decrypt",key:m}),T.create({type:"encrypt",key:_})]:[T.create({type:"decrypt",key:_}),T.create({type:"encrypt",key:m}),T.create({type:"decrypt",key:u})]}function b(l){f.call(this,l);var h=new g(this.type,this.options.key);this._edeState=h}x(b,f),q.exports=b,b.create=function(l){return new b(l)},b.prototype._update=function(l,h,u,m){var _=this._edeState;_.ciphers[0]._update(l,h,u,m),_.ciphers[1]._update(u,m,u,m),_.ciphers[2]._update(u,m,u,m)},b.prototype._pad=T.prototype._pad,b.prototype._unpad=T.prototype._unpad},43349:(q,O)=>{"use strict";O.readUInt32BE=function(f,T){return(f[0+T]<<24|f[1+T]<<16|f[2+T]<<8|f[3+T])>>>0},O.writeUInt32BE=function(f,T,g){f[0+g]=T>>>24,f[1+g]=T>>>16&255,f[2+g]=T>>>8&255,f[3+g]=255&T},O.ip=function(f,T,g,b){for(var l=0,h=0,u=6;u>=0;u-=2){for(var m=0;m<=24;m+=8)l<<=1,l|=T>>>m+u&1;for(m=0;m<=24;m+=8)l<<=1,l|=f>>>m+u&1}for(u=6;u>=0;u-=2){for(m=1;m<=25;m+=8)h<<=1,h|=T>>>m+u&1;for(m=1;m<=25;m+=8)h<<=1,h|=f>>>m+u&1}g[b+0]=l>>>0,g[b+1]=h>>>0},O.rip=function(f,T,g,b){for(var l=0,h=0,u=0;u<4;u++)for(var m=24;m>=0;m-=8)l<<=1,l|=T>>>m+u&1,l<<=1,l|=f>>>m+u&1;for(u=4;u<8;u++)for(m=24;m>=0;m-=8)h<<=1,h|=T>>>m+u&1,h<<=1,h|=f>>>m+u&1;g[b+0]=l>>>0,g[b+1]=h>>>0},O.pc1=function(f,T,g,b){for(var l=0,h=0,u=7;u>=5;u--){for(var m=0;m<=24;m+=8)l<<=1,l|=T>>m+u&1;for(m=0;m<=24;m+=8)l<<=1,l|=f>>m+u&1}for(m=0;m<=24;m+=8)l<<=1,l|=T>>m+u&1;for(u=1;u<=3;u++){for(m=0;m<=24;m+=8)h<<=1,h|=T>>m+u&1;for(m=0;m<=24;m+=8)h<<=1,h|=f>>m+u&1}for(m=0;m<=24;m+=8)h<<=1,h|=f>>m+u&1;g[b+0]=l>>>0,g[b+1]=h>>>0},O.r28shl=function(f,T){return f<>>28-T};var E=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];O.pc2=function(f,T,g,b){for(var l=0,h=0,u=E.length>>>1,m=0;m>>E[m]&1;for(m=u;m>>E[m]&1;g[b+0]=l>>>0,g[b+1]=h>>>0},O.expand=function(f,T,g){var b=0,l=0;b=(1&f)<<5|f>>>27;for(var h=23;h>=15;h-=4)b<<=6,b|=f>>>h&63;for(h=11;h>=3;h-=4)l|=f>>>h&63,l<<=6;l|=(31&f)<<1|f>>>31,T[g+0]=b>>>0,T[g+1]=l>>>0};var d=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];O.substitute=function(f,T){for(var g=0,b=0;b<4;b++)g<<=4,g|=d[64*b+(f>>>18-6*b&63)];for(b=0;b<4;b++)g<<=4,g|=d[256+64*b+(T>>>18-6*b&63)];return g>>>0};var x=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];O.permute=function(f){for(var T=0,g=0;g>>x[g]&1;return T>>>0},O.padSplit=function(f,T,g){for(var b=f.toString(2);b.length{"use strict";var d=E(29033).Buffer,x=E(78557),f=E(29799),T=E(51592),g={binary:!0,hex:!0,base64:!0};O.DiffieHellmanGroup=O.createDiffieHellmanGroup=O.getDiffieHellman=function(b){var l=new d(f[b].prime,"hex"),h=new d(f[b].gen,"hex");return new T(l,h)},O.createDiffieHellman=O.DiffieHellman=function b(l,h,u,m){return d.isBuffer(h)||void 0===g[h]?b(l,"binary",h,u):(h=h||"binary",m=m||"binary",u=u||new d([2]),d.isBuffer(u)||(u=new d(u,m)),"number"==typeof l?new T(x(l,u),u,!0):(d.isBuffer(l)||(l=new d(l,h)),new T(l,u,!0)))}},51592:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(31734),f=new(E(31962)),T=new x(24),g=new x(11),b=new x(10),l=new x(3),h=new x(7),u=E(78557),m=E(75010);function _(L,V){return V=V||"utf8",d.isBuffer(L)||(L=new d(L,V)),this._pub=new x(L),this}function w(L,V){return V=V||"utf8",d.isBuffer(L)||(L=new d(L,V)),this._priv=new x(L),this}q.exports=I;var S={};function I(L,V,W){this.setGenerator(V),this.__prime=new x(L),this._prime=x.mont(this.__prime),this._primeLen=L.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,W?(this.setPublicKey=_,this.setPrivateKey=w):this._primeCode=8}function P(L,V){var W=new d(L.toArray());return V?W.toString(V):W}Object.defineProperty(I.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(L,V){var W=V.toString("hex"),G=[W,L.toString(16)].join("_");if(G in S)return S[G];var H,j=0;if(L.isEven()||!u.simpleSieve||!u.fermatTest(L)||!f.test(L))return j+=1,S[G]=j+="02"===W||"05"===W?8:4,j;switch(f.test(L.shrn(1))||(j+=2),W){case"02":L.mod(T).cmp(g)&&(j+=8);break;case"05":(H=L.mod(b)).cmp(l)&&H.cmp(h)&&(j+=8);break;default:j+=4}return S[G]=j,j}(this.__prime,this.__gen)),this._primeCode}}),I.prototype.generateKeys=function(){return this._priv||(this._priv=new x(m(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},I.prototype.computeSecret=function(L){var V=(L=(L=new x(L)).toRed(this._prime)).redPow(this._priv).fromRed(),W=new d(V.toArray()),G=this.getPrime();if(W.length{"use strict";var d=E(75010);q.exports=L,L.simpleSieve=I,L.fermatTest=P;var x=E(31734),f=new x(24),T=new(E(31962)),g=new x(1),b=new x(2),l=new x(5),h=(new x(16),new x(8),new x(10)),u=new x(3),m=(new x(7),new x(11)),_=new x(4),w=(new x(12),null);function I(V){for(var W=function(){if(null!==w)return w;var V=[];V[0]=2;for(var W=1,G=3;G<1048576;G+=2){for(var H=Math.ceil(Math.sqrt(G)),j=0;jV;)G.ishrn(1);if(G.isEven()&&G.iadd(g),G.testn(1)||G.iadd(b),W.cmp(b)){if(!W.cmp(l))for(;G.mod(h).cmp(u);)G.iadd(_)}else for(;G.mod(f).cmp(m);)G.iadd(_);if(I(H=G.shrn(1))&&I(G)&&P(H)&&P(G)&&T.test(H)&&T.test(G))return G}}},36597:(q,O,E)=>{"use strict";var d=O;d.version=E(18597).i8,d.utils=E(7528),d.rand=E(82202),d.curve=E(76063),d.curves=E(40506),d.ec=E(28320),d.eddsa=E(68027)},11249:(q,O,E)=>{"use strict";var d=E(31734),x=E(7528),f=x.getNAF,T=x.getJSF,g=x.assert;function b(h,u){this.type=h,this.p=new d(u.p,16),this.red=u.prime?d.red(u.prime):d.mont(this.p),this.zero=new d(0).toRed(this.red),this.one=new d(1).toRed(this.red),this.two=new d(2).toRed(this.red),this.n=u.n&&new d(u.n,16),this.g=u.g&&this.pointFromJSON(u.g,u.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var m=this.n&&this.p.div(this.n);!m||m.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(h,u){this.curve=h,this.type=u,this.precomputed=null}q.exports=b,b.prototype.point=function(){throw new Error("Not implemented")},b.prototype.validate=function(){throw new Error("Not implemented")},b.prototype._fixedNafMul=function(h,u){g(h.precomputed);var m=h._getDoubles(),_=f(u,1,this._bitLength),w=(1<=S;L--)I=(I<<1)+_[L];P.push(I)}for(var V=this.jpoint(null,null,null),W=this.jpoint(null,null,null),G=w;G>0;G--){for(S=0;S=0;P--){for(var L=0;P>=0&&0===S[P];P--)L++;if(P>=0&&L++,I=I.dblp(L),P<0)break;var V=S[P];g(0!==V),I="affine"===h.type?I.mixedAdd(V>0?w[V-1>>1]:w[-V-1>>1].neg()):I.add(V>0?w[V-1>>1]:w[-V-1>>1].neg())}return"affine"===h.type?I.toP():I},b.prototype._wnafMulAdd=function(h,u,m,_,w){var S,I,P,L=this._wnafT1,V=this._wnafT2,W=this._wnafT3,G=0;for(S=0;S<_;S++){var H=(P=u[S])._getNAFPoints(h);L[S]=H.wnd,V[S]=H.points}for(S=_-1;S>=1;S-=2){var j=S-1,K=S;if(1===L[j]&&1===L[K]){var R=[u[j],null,null,u[K]];0===u[j].y.cmp(u[K].y)?(R[1]=u[j].add(u[K]),R[2]=u[j].toJ().mixedAdd(u[K].neg())):0===u[j].y.cmp(u[K].y.redNeg())?(R[1]=u[j].toJ().mixedAdd(u[K]),R[2]=u[j].add(u[K].neg())):(R[1]=u[j].toJ().mixedAdd(u[K]),R[2]=u[j].toJ().mixedAdd(u[K].neg()));var o=[-3,-1,-5,-7,0,7,5,1,3],y=T(m[j],m[K]);for(G=Math.max(y[0].length,G),W[j]=new Array(G),W[K]=new Array(G),I=0;I=0;S--){for(var N=0;S>=0;){var C=!0;for(I=0;I<_;I++)D[I]=0|W[I][S],0!==D[I]&&(C=!1);if(!C)break;N++,S--}if(S>=0&&N++,k=k.dblp(N),S<0)break;for(I=0;I<_;I++){var a=D[I];0!==a&&(a>0?P=V[I][a-1>>1]:a<0&&(P=V[I][-a-1>>1].neg()),k="affine"===P.type?k.mixedAdd(P):k.add(P))}}for(S=0;S<_;S++)V[S]=null;return w?k:k.toP()},b.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},b.prototype.decodePoint=function(h,u){h=x.toArray(h,u);var m=this.p.byteLength();if((4===h[0]||6===h[0]||7===h[0])&&h.length-1==2*m)return 6===h[0]?g(h[h.length-1]%2==0):7===h[0]&&g(h[h.length-1]%2==1),this.point(h.slice(1,1+m),h.slice(1+m,1+2*m));if((2===h[0]||3===h[0])&&h.length-1===m)return this.pointFromX(h.slice(1,1+m),3===h[0]);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(h){return this.encode(h,!0)},l.prototype._encode=function(h){var u=this.curve.p.byteLength(),m=this.getX().toArray("be",u);return h?[this.getY().isEven()?2:3].concat(m):[4].concat(m,this.getY().toArray("be",u))},l.prototype.encode=function(h,u){return x.encode(this._encode(u),h)},l.prototype.precompute=function(h){if(this.precomputed)return this;var u={doubles:null,naf:null,beta:null};return u.naf=this._getNAFPoints(8),u.doubles=this._getDoubles(4,h),u.beta=this._getBeta(),this.precomputed=u,this},l.prototype._hasDoubles=function(h){if(!this.precomputed)return!1;var u=this.precomputed.doubles;return!!u&&u.points.length>=Math.ceil((h.bitLength()+1)/u.step)},l.prototype._getDoubles=function(h,u){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var m=[this],_=this,w=0;w{"use strict";var d=E(7528),x=E(31734),f=E(41736),T=E(11249),g=d.assert;function b(h){this.twisted=1!=(0|h.a),this.mOneA=this.twisted&&-1==(0|h.a),this.extended=this.mOneA,T.call(this,"edwards",h),this.a=new x(h.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new x(h.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new x(h.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),g(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|h.c)}function l(h,u,m,_,w){T.BasePoint.call(this,h,"projective"),null===u&&null===m&&null===_?(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 x(u,16),this.y=new x(m,16),this.z=_?new x(_,16):this.curve.one,this.t=w&&new x(w,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()))))}f(b,T),q.exports=b,b.prototype._mulA=function(h){return this.mOneA?h.redNeg():this.a.redMul(h)},b.prototype._mulC=function(h){return this.oneC?h:this.c.redMul(h)},b.prototype.jpoint=function(h,u,m,_){return this.point(h,u,m,_)},b.prototype.pointFromX=function(h,u){(h=new x(h,16)).red||(h=h.toRed(this.red));var m=h.redSqr(),_=this.c2.redSub(this.a.redMul(m)),w=this.one.redSub(this.c2.redMul(this.d).redMul(m)),S=_.redMul(w.redInvm()),I=S.redSqrt();if(0!==I.redSqr().redSub(S).cmp(this.zero))throw new Error("invalid point");var P=I.fromRed().isOdd();return(u&&!P||!u&&P)&&(I=I.redNeg()),this.point(h,I)},b.prototype.pointFromY=function(h,u){(h=new x(h,16)).red||(h=h.toRed(this.red));var m=h.redSqr(),_=m.redSub(this.c2),w=m.redMul(this.d).redMul(this.c2).redSub(this.a),S=_.redMul(w.redInvm());if(0===S.cmp(this.zero)){if(u)throw new Error("invalid point");return this.point(this.zero,h)}var I=S.redSqrt();if(0!==I.redSqr().redSub(S).cmp(this.zero))throw new Error("invalid point");return I.fromRed().isOdd()!==u&&(I=I.redNeg()),this.point(I,h)},b.prototype.validate=function(h){if(h.isInfinity())return!0;h.normalize();var u=h.x.redSqr(),m=h.y.redSqr(),_=u.redMul(this.a).redAdd(m),w=this.c2.redMul(this.one.redAdd(this.d.redMul(u).redMul(m)));return 0===_.cmp(w)},f(l,T.BasePoint),b.prototype.pointFromJSON=function(h){return l.fromJSON(this,h)},b.prototype.point=function(h,u,m,_){return new l(this,h,u,m,_)},l.fromJSON=function(h,u){return new l(h,u[0],u[1],u[2])},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},l.prototype._extDbl=function(){var h=this.x.redSqr(),u=this.y.redSqr(),m=this.z.redSqr();m=m.redIAdd(m);var _=this.curve._mulA(h),w=this.x.redAdd(this.y).redSqr().redISub(h).redISub(u),S=_.redAdd(u),I=S.redSub(m),P=_.redSub(u),L=w.redMul(I),V=S.redMul(P),W=w.redMul(P),G=I.redMul(S);return this.curve.point(L,V,G,W)},l.prototype._projDbl=function(){var h,u,m,_,w,S,I=this.x.redAdd(this.y).redSqr(),P=this.x.redSqr(),L=this.y.redSqr();if(this.curve.twisted){var V=(_=this.curve._mulA(P)).redAdd(L);this.zOne?(h=I.redSub(P).redSub(L).redMul(V.redSub(this.curve.two)),u=V.redMul(_.redSub(L)),m=V.redSqr().redSub(V).redSub(V)):(w=this.z.redSqr(),S=V.redSub(w).redISub(w),h=I.redSub(P).redISub(L).redMul(S),u=V.redMul(_.redSub(L)),m=V.redMul(S))}else _=P.redAdd(L),w=this.curve._mulC(this.z).redSqr(),S=_.redSub(w).redSub(w),h=this.curve._mulC(I.redISub(_)).redMul(S),u=this.curve._mulC(_).redMul(P.redISub(L)),m=_.redMul(S);return this.curve.point(h,u,m)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(h){var u=this.y.redSub(this.x).redMul(h.y.redSub(h.x)),m=this.y.redAdd(this.x).redMul(h.y.redAdd(h.x)),_=this.t.redMul(this.curve.dd).redMul(h.t),w=this.z.redMul(h.z.redAdd(h.z)),S=m.redSub(u),I=w.redSub(_),P=w.redAdd(_),L=m.redAdd(u),V=S.redMul(I),W=P.redMul(L),G=S.redMul(L),H=I.redMul(P);return this.curve.point(V,W,H,G)},l.prototype._projAdd=function(h){var u,m,_=this.z.redMul(h.z),w=_.redSqr(),S=this.x.redMul(h.x),I=this.y.redMul(h.y),P=this.curve.d.redMul(S).redMul(I),L=w.redSub(P),V=w.redAdd(P),W=this.x.redAdd(this.y).redMul(h.x.redAdd(h.y)).redISub(S).redISub(I),G=_.redMul(L).redMul(W);return this.curve.twisted?(u=_.redMul(V).redMul(I.redSub(this.curve._mulA(S))),m=L.redMul(V)):(u=_.redMul(V).redMul(I.redSub(S)),m=this.curve._mulC(L).redMul(V)),this.curve.point(G,u,m)},l.prototype.add=function(h){return this.isInfinity()?h:h.isInfinity()?this:this.curve.extended?this._extAdd(h):this._projAdd(h)},l.prototype.mul=function(h){return this._hasDoubles(h)?this.curve._fixedNafMul(this,h):this.curve._wnafMul(this,h)},l.prototype.mulAdd=function(h,u,m){return this.curve._wnafMulAdd(1,[this,u],[h,m],2,!1)},l.prototype.jmulAdd=function(h,u,m){return this.curve._wnafMulAdd(1,[this,u],[h,m],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var h=this.z.redInvm();return this.x=this.x.redMul(h),this.y=this.y.redMul(h),this.t&&(this.t=this.t.redMul(h)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(h){return this===h||0===this.getX().cmp(h.getX())&&0===this.getY().cmp(h.getY())},l.prototype.eqXToP=function(h){var u=h.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(u))return!0;for(var m=h.clone(),_=this.curve.redN.redMul(this.z);;){if(m.iadd(this.curve.n),m.cmp(this.curve.p)>=0)return!1;if(u.redIAdd(_),0===this.x.cmp(u))return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},76063:(q,O,E)=>{"use strict";var d=O;d.base=E(11249),d.short=E(53148),d.mont=E(51105),d.edwards=E(81123)},51105:(q,O,E)=>{"use strict";var d=E(31734),x=E(41736),f=E(11249),T=E(7528);function g(l){f.call(this,"mont",l),this.a=new d(l.a,16).toRed(this.red),this.b=new d(l.b,16).toRed(this.red),this.i4=new d(4).toRed(this.red).redInvm(),this.two=new d(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function b(l,h,u){f.BasePoint.call(this,l,"projective"),null===h&&null===u?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new d(h,16),this.z=new d(u,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}x(g,f),q.exports=g,g.prototype.validate=function(l){var h=l.normalize().x,u=h.redSqr(),m=u.redMul(h).redAdd(u.redMul(this.a)).redAdd(h);return 0===m.redSqrt().redSqr().cmp(m)},x(b,f.BasePoint),g.prototype.decodePoint=function(l,h){return this.point(T.toArray(l,h),1)},g.prototype.point=function(l,h){return new b(this,l,h)},g.prototype.pointFromJSON=function(l){return b.fromJSON(this,l)},b.prototype.precompute=function(){},b.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},b.fromJSON=function(l,h){return new b(l,h[0],h[1]||l.one)},b.prototype.inspect=function(){return this.isInfinity()?"":""},b.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},b.prototype.dbl=function(){var l=this.x.redAdd(this.z).redSqr(),h=this.x.redSub(this.z).redSqr(),u=l.redSub(h),m=l.redMul(h),_=u.redMul(h.redAdd(this.curve.a24.redMul(u)));return this.curve.point(m,_)},b.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},b.prototype.diffAdd=function(l,h){var u=this.x.redAdd(this.z),m=this.x.redSub(this.z),_=l.x.redAdd(l.z),w=l.x.redSub(l.z).redMul(u),S=_.redMul(m),I=h.z.redMul(w.redAdd(S).redSqr()),P=h.x.redMul(w.redISub(S).redSqr());return this.curve.point(I,P)},b.prototype.mul=function(l){for(var h=l.clone(),u=this,m=this.curve.point(null,null),_=[];0!==h.cmpn(0);h.iushrn(1))_.push(h.andln(1));for(var w=_.length-1;w>=0;w--)0===_[w]?(u=u.diffAdd(m,this),m=m.dbl()):(m=u.diffAdd(m,this),u=u.dbl());return m},b.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},b.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},b.prototype.eq=function(l){return 0===this.getX().cmp(l.getX())},b.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},b.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},53148:(q,O,E)=>{"use strict";var d=E(7528),x=E(31734),f=E(41736),T=E(11249),g=d.assert;function b(u){T.call(this,"short",u),this.a=new x(u.a,16).toRed(this.red),this.b=new x(u.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(u),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(u,m,_,w){T.BasePoint.call(this,u,"affine"),null===m&&null===_?(this.x=null,this.y=null,this.inf=!0):(this.x=new x(m,16),this.y=new x(_,16),w&&(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 h(u,m,_,w){T.BasePoint.call(this,u,"jacobian"),null===m&&null===_&&null===w?(this.x=this.curve.one,this.y=this.curve.one,this.z=new x(0)):(this.x=new x(m,16),this.y=new x(_,16),this.z=new x(w,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}f(b,T),q.exports=b,b.prototype._getEndomorphism=function(u){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var m,_;if(u.beta)m=new x(u.beta,16).toRed(this.red);else{var w=this._getEndoRoots(this.p);m=(m=w[0].cmp(w[1])<0?w[0]:w[1]).toRed(this.red)}if(u.lambda)_=new x(u.lambda,16);else{var S=this._getEndoRoots(this.n);0===this.g.mul(S[0]).x.cmp(this.g.x.redMul(m))?_=S[0]:g(0===this.g.mul(_=S[1]).x.cmp(this.g.x.redMul(m)))}return{beta:m,lambda:_,basis:u.basis?u.basis.map(function(I){return{a:new x(I.a,16),b:new x(I.b,16)}}):this._getEndoBasis(_)}}},b.prototype._getEndoRoots=function(u){var m=u===this.p?this.red:x.mont(u),_=new x(2).toRed(m).redInvm(),w=_.redNeg(),S=new x(3).toRed(m).redNeg().redSqrt().redMul(_);return[w.redAdd(S).fromRed(),w.redSub(S).fromRed()]},b.prototype._getEndoBasis=function(u){for(var m,_,w,S,I,P,L,V,W,G=this.n.ushrn(Math.floor(this.n.bitLength()/2)),H=u,j=this.n.clone(),K=new x(1),R=new x(0),o=new x(0),y=new x(1),M=0;0!==H.cmpn(0);){var v=j.div(H);V=j.sub(v.mul(H)),W=o.sub(v.mul(K));var k=y.sub(v.mul(R));if(!w&&V.cmp(G)<0)m=L.neg(),_=K,w=V.neg(),S=W;else if(w&&2==++M)break;L=V,j=H,H=V,o=K,K=W,y=R,R=k}I=V.neg(),P=W;var D=w.sqr().add(S.sqr());return I.sqr().add(P.sqr()).cmp(D)>=0&&(I=m,P=_),w.negative&&(w=w.neg(),S=S.neg()),I.negative&&(I=I.neg(),P=P.neg()),[{a:w,b:S},{a:I,b:P}]},b.prototype._endoSplit=function(u){var m=this.endo.basis,_=m[0],w=m[1],S=w.b.mul(u).divRound(this.n),I=_.b.neg().mul(u).divRound(this.n),P=S.mul(_.a),L=I.mul(w.a),V=S.mul(_.b),W=I.mul(w.b);return{k1:u.sub(P).sub(L),k2:V.add(W).neg()}},b.prototype.pointFromX=function(u,m){(u=new x(u,16)).red||(u=u.toRed(this.red));var _=u.redSqr().redMul(u).redIAdd(u.redMul(this.a)).redIAdd(this.b),w=_.redSqrt();if(0!==w.redSqr().redSub(_).cmp(this.zero))throw new Error("invalid point");var S=w.fromRed().isOdd();return(m&&!S||!m&&S)&&(w=w.redNeg()),this.point(u,w)},b.prototype.validate=function(u){if(u.inf)return!0;var m=u.x,_=u.y,w=this.a.redMul(m),S=m.redSqr().redMul(m).redIAdd(w).redIAdd(this.b);return 0===_.redSqr().redISub(S).cmpn(0)},b.prototype._endoWnafMulAdd=function(u,m,_){for(var w=this._endoWnafT1,S=this._endoWnafT2,I=0;I":""},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(u){if(this.inf)return u;if(u.inf)return this;if(this.eq(u))return this.dbl();if(this.neg().eq(u))return this.curve.point(null,null);if(0===this.x.cmp(u.x))return this.curve.point(null,null);var m=this.y.redSub(u.y);0!==m.cmpn(0)&&(m=m.redMul(this.x.redSub(u.x).redInvm()));var _=m.redSqr().redISub(this.x).redISub(u.x),w=m.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,w)},l.prototype.dbl=function(){if(this.inf)return this;var u=this.y.redAdd(this.y);if(0===u.cmpn(0))return this.curve.point(null,null);var m=this.curve.a,_=this.x.redSqr(),w=u.redInvm(),S=_.redAdd(_).redIAdd(_).redIAdd(m).redMul(w),I=S.redSqr().redISub(this.x.redAdd(this.x)),P=S.redMul(this.x.redSub(I)).redISub(this.y);return this.curve.point(I,P)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(u){return u=new x(u,16),this.isInfinity()?this:this._hasDoubles(u)?this.curve._fixedNafMul(this,u):this.curve.endo?this.curve._endoWnafMulAdd([this],[u]):this.curve._wnafMul(this,u)},l.prototype.mulAdd=function(u,m,_){var w=[this,m],S=[u,_];return this.curve.endo?this.curve._endoWnafMulAdd(w,S):this.curve._wnafMulAdd(1,w,S,2)},l.prototype.jmulAdd=function(u,m,_){var w=[this,m],S=[u,_];return this.curve.endo?this.curve._endoWnafMulAdd(w,S,!0):this.curve._wnafMulAdd(1,w,S,2,!0)},l.prototype.eq=function(u){return this===u||this.inf===u.inf&&(this.inf||0===this.x.cmp(u.x)&&0===this.y.cmp(u.y))},l.prototype.neg=function(u){if(this.inf)return this;var m=this.curve.point(this.x,this.y.redNeg());if(u&&this.precomputed){var _=this.precomputed,w=function(S){return S.neg()};m.precomputed={naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(w)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(w)}}}return m},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},f(h,T.BasePoint),b.prototype.jpoint=function(u,m,_){return new h(this,u,m,_)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var u=this.z.redInvm(),m=u.redSqr(),_=this.x.redMul(m),w=this.y.redMul(m).redMul(u);return this.curve.point(_,w)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(u){if(this.isInfinity())return u;if(u.isInfinity())return this;var m=u.z.redSqr(),_=this.z.redSqr(),w=this.x.redMul(m),S=u.x.redMul(_),I=this.y.redMul(m.redMul(u.z)),P=u.y.redMul(_.redMul(this.z)),L=w.redSub(S),V=I.redSub(P);if(0===L.cmpn(0))return 0!==V.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var W=L.redSqr(),G=W.redMul(L),H=w.redMul(W),j=V.redSqr().redIAdd(G).redISub(H).redISub(H),K=V.redMul(H.redISub(j)).redISub(I.redMul(G)),R=this.z.redMul(u.z).redMul(L);return this.curve.jpoint(j,K,R)},h.prototype.mixedAdd=function(u){if(this.isInfinity())return u.toJ();if(u.isInfinity())return this;var m=this.z.redSqr(),_=this.x,w=u.x.redMul(m),S=this.y,I=u.y.redMul(m).redMul(this.z),P=_.redSub(w),L=S.redSub(I);if(0===P.cmpn(0))return 0!==L.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var V=P.redSqr(),W=V.redMul(P),G=_.redMul(V),H=L.redSqr().redIAdd(W).redISub(G).redISub(G),j=L.redMul(G.redISub(H)).redISub(S.redMul(W)),K=this.z.redMul(P);return this.curve.jpoint(H,j,K)},h.prototype.dblp=function(u){if(0===u)return this;if(this.isInfinity())return this;if(!u)return this.dbl();var m;if(this.curve.zeroA||this.curve.threeA){var _=this;for(m=0;m=0)return!1;if(_.redIAdd(S),0===this.x.cmp(_))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},40506:(q,O,E)=>{"use strict";var d,x=O,f=E(37198),T=E(76063),g=E(7528).assert;function b(h){this.curve="short"===h.type?new T.short(h):"edwards"===h.type?new T.edwards(h):new T.mont(h),this.g=this.curve.g,this.n=this.curve.n,this.hash=h.hash,g(this.g.validate(),"Invalid curve"),g(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(h,u){Object.defineProperty(x,h,{configurable:!0,enumerable:!0,get:function(){var m=new b(u);return Object.defineProperty(x,h,{configurable:!0,enumerable:!0,value:m}),m}})}x.PresetCurve=b,l("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:f.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("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:f.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("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:f.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("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:f.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"]}),l("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:f.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"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f.sha256,gRed:!1,g:["9"]}),l("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:f.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{d=E(46401)}catch{d=void 0}l("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:f.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",d]})},28320:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(29410),T=E(7528),g=E(40506),b=E(82202),l=T.assert,h=E(37791),u=E(30488);function m(_){if(!(this instanceof m))return new m(_);"string"==typeof _&&(l(Object.prototype.hasOwnProperty.call(g,_),"Unknown curve "+_),_=g[_]),_ instanceof g.PresetCurve&&(_={curve:_}),this.curve=_.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=_.curve.g,this.g.precompute(_.curve.n.bitLength()+1),this.hash=_.hash||_.curve.hash}q.exports=m,m.prototype.keyPair=function(_){return new h(this,_)},m.prototype.keyFromPrivate=function(_,w){return h.fromPrivate(this,_,w)},m.prototype.keyFromPublic=function(_,w){return h.fromPublic(this,_,w)},m.prototype.genKeyPair=function(_){_||(_={});for(var w=new f({hash:this.hash,pers:_.pers,persEnc:_.persEnc||"utf8",entropy:_.entropy||b(this.hash.hmacStrength),entropyEnc:_.entropy&&_.entropyEnc||"utf8",nonce:this.n.toArray()}),S=this.n.byteLength(),I=this.n.sub(new x(2));;){var P=new x(w.generate(S));if(!(P.cmp(I)>0))return P.iaddn(1),this.keyFromPrivate(P)}},m.prototype._truncateToN=function(_,w){var S=8*_.byteLength()-this.n.bitLength();return S>0&&(_=_.ushrn(S)),!w&&_.cmp(this.n)>=0?_.sub(this.n):_},m.prototype.sign=function(_,w,S,I){"object"===(0,d.default)(S)&&(I=S,S=null),I||(I={}),w=this.keyFromPrivate(w,S),_=this._truncateToN(new x(_,16));for(var P=this.n.byteLength(),L=w.getPrivate().toArray("be",P),V=_.toArray("be",P),W=new f({hash:this.hash,entropy:L,nonce:V,pers:I.pers,persEnc:I.persEnc||"utf8"}),G=this.n.sub(new x(1)),H=0;;H++){var j=I.k?I.k(H):new x(W.generate(this.n.byteLength()));if(!((j=this._truncateToN(j,!0)).cmpn(1)<=0||j.cmp(G)>=0)){var K=this.g.mul(j);if(!K.isInfinity()){var R=K.getX(),o=R.umod(this.n);if(0!==o.cmpn(0)){var y=j.invm(this.n).mul(o.mul(w.getPrivate()).iadd(_));if(0!==(y=y.umod(this.n)).cmpn(0)){var M=(K.getY().isOdd()?1:0)|(0!==R.cmp(o)?2:0);return I.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),M^=1),new u({r:o,s:y,recoveryParam:M})}}}}}},m.prototype.verify=function(_,w,S,I){_=this._truncateToN(new x(_,16)),S=this.keyFromPublic(S,I);var P=(w=new u(w,"hex")).r,L=w.s;if(P.cmpn(1)<0||P.cmp(this.n)>=0||L.cmpn(1)<0||L.cmp(this.n)>=0)return!1;var V,W=L.invm(this.n),G=W.mul(_).umod(this.n),H=W.mul(P).umod(this.n);return this.curve._maxwellTrick?!(V=this.g.jmulAdd(G,S.getPublic(),H)).isInfinity()&&V.eqXToP(P):!(V=this.g.mulAdd(G,S.getPublic(),H)).isInfinity()&&0===V.getX().umod(this.n).cmp(P)},m.prototype.recoverPubKey=function(_,w,S,I){l((3&S)===S,"The recovery param is more than two bits"),w=new u(w,I);var P=this.n,L=new x(_),V=w.r,W=w.s,G=1&S,H=S>>1;if(V.cmp(this.curve.p.umod(this.curve.n))>=0&&H)throw new Error("Unable to find sencond key candinate");V=this.curve.pointFromX(H?V.add(this.curve.n):V,G);var j=w.r.invm(P),K=P.sub(L).mul(j).umod(P),R=W.mul(j).umod(P);return this.g.mulAdd(K,V,R)},m.prototype.getKeyRecoveryParam=function(_,w,S,I){if(null!==(w=new u(w,I)).recoveryParam)return w.recoveryParam;for(var P=0;P<4;P++){var L;try{L=this.recoverPubKey(_,w,P)}catch{continue}if(L.eq(S))return P}throw new Error("Unable to find valid recovery factor")}},37791:(q,O,E)=>{"use strict";var d=E(31734),x=E(7528).assert;function f(T,g){this.ec=T,this.priv=null,this.pub=null,g.priv&&this._importPrivate(g.priv,g.privEnc),g.pub&&this._importPublic(g.pub,g.pubEnc)}q.exports=f,f.fromPublic=function(T,g,b){return g instanceof f?g:new f(T,{pub:g,pubEnc:b})},f.fromPrivate=function(T,g,b){return g instanceof f?g:new f(T,{priv:g,privEnc:b})},f.prototype.validate=function(){var T=this.getPublic();return T.isInfinity()?{result:!1,reason:"Invalid public key"}:T.validate()?T.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"}},f.prototype.getPublic=function(T,g){return"string"==typeof T&&(g=T,T=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),g?this.pub.encode(g,T):this.pub},f.prototype.getPrivate=function(T){return"hex"===T?this.priv.toString(16,2):this.priv},f.prototype._importPrivate=function(T,g){this.priv=new d(T,g||16),this.priv=this.priv.umod(this.ec.curve.n)},f.prototype._importPublic=function(T,g){if(T.x||T.y)return"mont"===this.ec.curve.type?x(T.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||x(T.x&&T.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(T.x,T.y));this.pub=this.ec.curve.decodePoint(T,g)},f.prototype.derive=function(T){return T.validate()||x(T.validate(),"public point not validated"),T.mul(this.priv).getX()},f.prototype.sign=function(T,g,b){return this.ec.sign(T,this,g,b)},f.prototype.verify=function(T,g){return this.ec.verify(T,g,this)},f.prototype.inspect=function(){return""}},30488:(q,O,E)=>{"use strict";var d=E(31734),x=E(7528),f=x.assert;function T(u,m){if(u instanceof T)return u;this._importDER(u,m)||(f(u.r&&u.s,"Signature without r or s"),this.r=new d(u.r,16),this.s=new d(u.s,16),this.recoveryParam=void 0===u.recoveryParam?null:u.recoveryParam)}function g(){this.place=0}function b(u,m){var _=u[m.place++];if(!(128&_))return _;var w=15&_;if(0===w||w>4)return!1;for(var S=0,I=0,P=m.place;I>>=0;return!(S<=127)&&(m.place=P,S)}function l(u){for(var m=0,_=u.length-1;!u[m]&&!(128&u[m+1])&&m<_;)m++;return 0===m?u:u.slice(m)}function h(u,m){if(m<128)u.push(m);else{var _=1+(Math.log(m)/Math.LN2>>>3);for(u.push(128|_);--_;)u.push(m>>>(_<<3)&255);u.push(m)}}q.exports=T,T.prototype._importDER=function(u,m){u=x.toArray(u,m);var _=new g;if(48!==u[_.place++])return!1;var w=b(u,_);if(!1===w||w+_.place!==u.length||2!==u[_.place++])return!1;var S=b(u,_);if(!1===S)return!1;var I=u.slice(_.place,S+_.place);if(_.place+=S,2!==u[_.place++])return!1;var P=b(u,_);if(!1===P||u.length!==P+_.place)return!1;var L=u.slice(_.place,P+_.place);if(0===I[0]){if(!(128&I[1]))return!1;I=I.slice(1)}if(0===L[0]){if(!(128&L[1]))return!1;L=L.slice(1)}return this.r=new d(I),this.s=new d(L),this.recoveryParam=null,!0},T.prototype.toDER=function(u){var m=this.r.toArray(),_=this.s.toArray();for(128&m[0]&&(m=[0].concat(m)),128&_[0]&&(_=[0].concat(_)),m=l(m),_=l(_);!(_[0]||128&_[1]);)_=_.slice(1);var w=[2];h(w,m.length),(w=w.concat(m)).push(2),h(w,_.length);var S=w.concat(_),I=[48];return h(I,S.length),I=I.concat(S),x.encode(I,u)}},68027:(q,O,E)=>{"use strict";var d=E(37198),x=E(40506),f=E(7528),T=f.assert,g=f.parseBytes,b=E(27303),l=E(36646);function h(u){if(T("ed25519"===u,"only tested with ed25519 so far"),!(this instanceof h))return new h(u);this.curve=u=x[u].curve,this.g=u.g,this.g.precompute(u.n.bitLength()+1),this.pointClass=u.point().constructor,this.encodingLength=Math.ceil(u.n.bitLength()/8),this.hash=d.sha512}q.exports=h,h.prototype.sign=function(u,m){u=g(u);var _=this.keyFromSecret(m),w=this.hashInt(_.messagePrefix(),u),S=this.g.mul(w),I=this.encodePoint(S),P=this.hashInt(I,_.pubBytes(),u).mul(_.priv()),L=w.add(P).umod(this.curve.n);return this.makeSignature({R:S,S:L,Rencoded:I})},h.prototype.verify=function(u,m,_){u=g(u),m=this.makeSignature(m);var w=this.keyFromPublic(_),S=this.hashInt(m.Rencoded(),w.pubBytes(),u),I=this.g.mul(m.S());return m.R().add(w.pub().mul(S)).eq(I)},h.prototype.hashInt=function(){for(var u=this.hash(),m=0;m{"use strict";var d=E(7528),x=d.assert,f=d.parseBytes,T=d.cachedProperty;function g(b,l){this.eddsa=b,this._secret=f(l.secret),b.isPoint(l.pub)?this._pub=l.pub:this._pubBytes=f(l.pub)}g.fromPublic=function(b,l){return l instanceof g?l:new g(b,{pub:l})},g.fromSecret=function(b,l){return l instanceof g?l:new g(b,{secret:l})},g.prototype.secret=function(){return this._secret},T(g,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),T(g,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),T(g,"privBytes",function(){var b=this.eddsa,l=this.hash(),h=b.encodingLength-1,u=l.slice(0,b.encodingLength);return u[0]&=248,u[h]&=127,u[h]|=64,u}),T(g,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),T(g,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),T(g,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),g.prototype.sign=function(b){return x(this._secret,"KeyPair can only verify"),this.eddsa.sign(b,this)},g.prototype.verify=function(b,l){return this.eddsa.verify(b,l,this)},g.prototype.getSecret=function(b){return x(this._secret,"KeyPair is public only"),d.encode(this.secret(),b)},g.prototype.getPublic=function(b){return d.encode(this.pubBytes(),b)},q.exports=g},36646:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(7528),T=f.assert,g=f.cachedProperty,b=f.parseBytes;function l(h,u){this.eddsa=h,"object"!==(0,d.default)(u)&&(u=b(u)),Array.isArray(u)&&(u={R:u.slice(0,h.encodingLength),S:u.slice(h.encodingLength)}),T(u.R&&u.S,"Signature without R or S"),h.isPoint(u.R)&&(this._R=u.R),u.S instanceof x&&(this._S=u.S),this._Rencoded=Array.isArray(u.R)?u.R:u.Rencoded,this._Sencoded=Array.isArray(u.S)?u.S:u.Sencoded}g(l,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),g(l,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),g(l,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),g(l,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return f.encode(this.toBytes(),"hex").toUpperCase()},q.exports=l},46401:q=>{"use strict";q.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"]]}}},7528:(q,O,E)=>{"use strict";var d=O,x=E(31734),f=E(94504),T=E(96580);d.assert=f,d.toArray=T.toArray,d.zero2=T.zero2,d.toHex=T.toHex,d.encode=T.encode,d.getNAF=function(g,b,l){var h=new Array(Math.max(g.bitLength(),l)+1);h.fill(0);for(var u=1<(u>>1)-1?(u>>1)-S:S):w=0,h[_]=w,m.iushrn(1)}return h},d.getJSF=function(g,b){var l=[[],[]];g=g.clone(),b=b.clone();for(var h,u=0,m=0;g.cmpn(-u)>0||b.cmpn(-m)>0;){var _,w,S=g.andln(3)+u&3,I=b.andln(3)+m&3;3===S&&(S=-1),3===I&&(I=-1),_=0==(1&S)?0:3!=(h=g.andln(7)+u&7)&&5!==h||2!==I?S:-S,l[0].push(_),w=0==(1&I)?0:3!=(h=b.andln(7)+m&7)&&5!==h||2!==S?I:-I,l[1].push(w),2*u===_+1&&(u=1-u),2*m===w+1&&(m=1-m),g.iushrn(1),b.iushrn(1)}return l},d.cachedProperty=function(g,b,l){var h="_"+b;g.prototype[b]=function(){return void 0!==this[h]?this[h]:this[h]=l.call(this)}},d.parseBytes=function(g){return"string"==typeof g?d.toArray(g,"hex"):g},d.intFromLE=function(g){return new x(g,"hex","le")}},26464:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=function(){if("object"===("undefined"==typeof self?"undefined":(0,d.default)(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":(0,d.default)(window))&&window)return window;throw new Error("Unable to resolve global `this`")};q.exports=function(){if(this)return this;if("object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return x()}try{return __global__||x()}finally{delete Object.prototype.__global__}}()},54258:(q,O,E)=>{"use strict";var d,x,f,T=E(19142),g=E(28847)(E(3355));f=function(){function b(pe){return"function"==typeof pe}var l=Array.isArray?Array.isArray:function(pe){return"[object Array]"===Object.prototype.toString.call(pe)},h=0,u=void 0,m=void 0,_=function(pe,_e){W[h]=pe,W[h+1]=_e,2===(h+=2)&&(m?m(G):o())},w="undefined"!=typeof window?window:void 0,S=w||{},I=S.MutationObserver||S.WebKitMutationObserver,P="undefined"==typeof self&&void 0!==T&&"[object process]"==={}.toString.call(T),L="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function V(){var pe=setTimeout;return function(){return pe(G,1)}}var W=new Array(1e3);function G(){for(var pe=0;pe{"use strict";var d=E(29033).Buffer,x=E(24858).keccak_256,f=E(3956);function T(g){return g&&f.toUnicode(g,{useStd3ASCII:!0,transitional:!1})}O.hash=function(g){for(var b="",l=0;l<32;l++)b+="00";if(name=T(g),name){var h=name.split(".");for(l=h.length-1;l>=0;l--){var u=x(h[l]);b=x(new d(b+u,"hex"))}}return"0x"+b},O.normalize=T},53058:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(74519)),f=E(58320),T=E(88645),g=E(36597),b=(E(46740),new g.ec("secp256k1")),l=E(22922),h=l.keccak256,u=l.keccak256s,m=function(L){for(var V=u(L.slice(2)),W="0x",G=0;G<40;G++)W+=parseInt(V[G+2],16)>7?L[G+2].toUpperCase():L[G+2];return W},_=function(L){var V=new d(L.slice(2),"hex"),W="0x"+b.keyFromPrivate(V).getPublic(!1,"hex").slice(2),G=h(W);return{address:m("0x"+G.slice(-40)),privateKey:L}},w=function(L){var V=(0,x.default)(L,3);return f.flatten([V[1],V[2],V[0]])},S=function(L){return[f.slice(64,f.length(L),L),f.slice(0,32,L),f.slice(32,64,L)]},I=function(L){return function(V,W){var G=b.keyFromPrivate(new d(W.slice(2),"hex")).sign(new d(V.slice(2),"hex"),{canonical:!0});return w([T.fromString(f.fromNumber(L+G.recoveryParam)),f.pad(32,f.fromNat("0x"+G.r.toString(16))),f.pad(32,f.fromNat("0x"+G.s.toString(16)))])}},P=I(27);q.exports={create:function(L){var V=h(f.concat(f.random(32),L||f.random(32))),W=f.concat(f.concat(f.random(32),V),f.random(32)),G=h(W);return _(G)},toChecksum:m,fromPrivate:_,sign:P,makeSigner:I,recover:function(L,V){var W=S(V),G={v:f.toNumber(W[0]),r:W[1].slice(2),s:W[2].slice(2)},H="0x"+b.recoverPubKey(new d(L.slice(2),"hex"),G,G.v<2?G.v:1-G.v%2).encode("hex",!1).slice(2),j=h(H);return m("0x"+j.slice(-40))},encodeSignature:w,decodeSignature:S}},51376:q=>{"use strict";var O=function(E,d){for(var x=[],f=0;f{"use strict";E(51376);var d=function(g,b){return parseInt(g.slice(2*b+2,2*b+4),16)},x=function(g){return(g.length-2)/2},f=function(g){for(var b=[],l=2,h=g.length;l>6|192);else{if(u>55295&&u<56320){if(++h==g.length)return null;var m=g.charCodeAt(h);if(m<56320||m>57343)return null;l+=b((u=65536+((1023&u)<<10)+(1023&m))>>18|240),l+=b(u>>12&63|128)}else l+=b(u>>12|224);l+=b(u>>6&63|128)}l+=b(63&u|128)}}return l},toString:function(g){for(var b="",l=0,h=x(g);l127){if(u>191&&u<224){if(l>=h)return null;u=(31&u)<<6|63&d(g,l)}else if(u>223&&u<240){if(l+1>=h)return null;u=(15&u)<<12|(63&d(g,l))<<6|63&d(g,++l)}else{if(!(u>239&&u<248)||l+2>=h)return null;u=(7&u)<<18|(63&d(g,l))<<12|(63&d(g,++l))<<6|63&d(g,++l)}++l}if(u<=65535)b+=String.fromCharCode(u);else{if(!(u<=1114111))return null;u-=65536,b+=String.fromCharCode(u>>10|55296),b+=String.fromCharCode(1023&u|56320)}}return b},fromNumber:function(g){var b=g.toString(16);return b.length%2==0?"0x"+b:"0x0"+b},toNumber:function(g){return parseInt(g.slice(2),16)},fromNat:function(g){return"0x0"===g?"0x":g.length%2==0?g:"0x0"+g.slice(2)},toNat:function(g){return"0"===g[2]?"0x"+g.slice(3):g},fromArray:T,toArray:f,fromUint8Array:function(g){return T([].slice.call(g,0))},toUint8Array:function(g){return new Uint8Array(f(g))}}},22922:q=>{"use strict";var O="0123456789abcdef".split(""),E=[1,256,65536,16777216],d=[0,8,16,24],x=[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],f=function(g){var b,l,h,u,m,_,w,S,I,P,L,V,W,G,H,j,K,R,o,y,M,v,k,D,N,C,a,B,Q,ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt;for(h=0;h<48;h+=2)u=g[0]^g[10]^g[20]^g[30]^g[40],m=g[1]^g[11]^g[21]^g[31]^g[41],S=g[4]^g[14]^g[24]^g[34]^g[44],I=g[5]^g[15]^g[25]^g[35]^g[45],P=g[6]^g[16]^g[26]^g[36]^g[46],L=g[7]^g[17]^g[27]^g[37]^g[47],b=(V=g[8]^g[18]^g[28]^g[38]^g[48])^((_=g[2]^g[12]^g[22]^g[32]^g[42])<<1|(w=g[3]^g[13]^g[23]^g[33]^g[43])>>>31),l=(W=g[9]^g[19]^g[29]^g[39]^g[49])^(w<<1|_>>>31),g[0]^=b,g[1]^=l,g[10]^=b,g[11]^=l,g[20]^=b,g[21]^=l,g[30]^=b,g[31]^=l,g[40]^=b,g[41]^=l,l=m^(I<<1|S>>>31),g[2]^=b=u^(S<<1|I>>>31),g[3]^=l,g[12]^=b,g[13]^=l,g[22]^=b,g[23]^=l,g[32]^=b,g[33]^=l,g[42]^=b,g[43]^=l,l=w^(L<<1|P>>>31),g[4]^=b=_^(P<<1|L>>>31),g[5]^=l,g[14]^=b,g[15]^=l,g[24]^=b,g[25]^=l,g[34]^=b,g[35]^=l,g[44]^=b,g[45]^=l,l=I^(W<<1|V>>>31),g[6]^=b=S^(V<<1|W>>>31),g[7]^=l,g[16]^=b,g[17]^=l,g[26]^=b,g[27]^=l,g[36]^=b,g[37]^=l,g[46]^=b,g[47]^=l,l=L^(m<<1|u>>>31),g[8]^=b=P^(u<<1|m>>>31),g[9]^=l,g[18]^=b,g[19]^=l,g[28]^=b,g[29]^=l,g[38]^=b,g[39]^=l,g[48]^=b,g[49]^=l,H=g[1],ze=g[11]<<4|g[10]>>>28,Ve=g[10]<<4|g[11]>>>28,B=g[20]<<3|g[21]>>>29,Q=g[21]<<3|g[20]>>>29,Nt=g[31]<<9|g[30]>>>23,It=g[30]<<9|g[31]>>>23,Ce=g[40]<<18|g[41]>>>14,ke=g[41]<<18|g[40]>>>14,ae=g[2]<<1|g[3]>>>31,Te=g[3]<<1|g[2]>>>31,K=g[12]<<12|g[13]>>>20,nt=g[22]<<10|g[23]>>>22,tt=g[23]<<10|g[22]>>>22,ee=g[33]<<13|g[32]>>>19,ce=g[32]<<13|g[33]>>>19,qt=g[42]<<2|g[43]>>>30,jt=g[43]<<2|g[42]>>>30,st=g[5]<<30|g[4]>>>2,Ye=g[4]<<30|g[5]>>>2,le=g[14]<<6|g[15]>>>26,X=g[15]<<6|g[14]>>>26,o=g[24]<<11|g[25]>>>21,mt=g[34]<<15|g[35]>>>17,ht=g[35]<<15|g[34]>>>17,ue=g[45]<<29|g[44]>>>3,we=g[44]<<29|g[45]>>>3,D=g[6]<<28|g[7]>>>4,N=g[7]<<28|g[6]>>>4,gt=g[17]<<23|g[16]>>>9,St=g[16]<<23|g[17]>>>9,ne=g[26]<<25|g[27]>>>7,pe=g[27]<<25|g[26]>>>7,y=g[36]<<21|g[37]>>>11,M=g[37]<<21|g[36]>>>11,wt=g[47]<<24|g[46]>>>8,Pt=g[46]<<24|g[47]>>>8,me=g[8]<<27|g[9]>>>5,Ee=g[9]<<27|g[8]>>>5,C=g[18]<<20|g[19]>>>12,a=g[19]<<20|g[18]>>>12,Wt=g[29]<<7|g[28]>>>25,dn=g[28]<<7|g[29]>>>25,_e=g[38]<<8|g[39]>>>24,xe=g[39]<<8|g[38]>>>24,v=g[48]<<14|g[49]>>>18,k=g[49]<<14|g[48]>>>18,g[0]=(G=g[0])^~(j=g[13]<<12|g[12]>>>20)&(R=g[25]<<11|g[24]>>>21),g[1]=H^~K&o,g[10]=D^~C&B,g[11]=N^~a&Q,g[20]=ae^~le&ne,g[21]=Te^~X&pe,g[30]=me^~ze&nt,g[31]=Ee^~Ve&tt,g[40]=st^~gt&Wt,g[41]=Ye^~St&dn,g[2]=j^~R&y,g[3]=K^~o&M,g[12]=C^~B&ee,g[13]=a^~Q&ce,g[22]=le^~ne&_e,g[23]=X^~pe&xe,g[32]=ze^~nt&mt,g[33]=Ve^~tt&ht,g[42]=gt^~Wt&Nt,g[43]=St^~dn&It,g[4]=R^~y&v,g[5]=o^~M&k,g[14]=B^~ee&ue,g[15]=Q^~ce&we,g[24]=ne^~_e&Ce,g[25]=pe^~xe&ke,g[34]=nt^~mt&wt,g[35]=tt^~ht&Pt,g[44]=Wt^~Nt&qt,g[45]=dn^~It&jt,g[6]=y^~v&G,g[7]=M^~k&H,g[16]=ee^~ue&D,g[17]=ce^~we&N,g[26]=_e^~Ce&ae,g[27]=xe^~ke&Te,g[36]=mt^~wt&me,g[37]=ht^~Pt&Ee,g[46]=Nt^~qt&st,g[47]=It^~jt&Ye,g[8]=v^~G&j,g[9]=k^~H&K,g[18]=ue^~D&C,g[19]=we^~N&a,g[28]=Ce^~ae&le,g[29]=ke^~Te&X,g[38]=wt^~me&ze,g[39]=Pt^~Ee&Ve,g[48]=qt^~st>,g[49]=jt^~Ye&St,g[0]^=x[h],g[1]^=x[h+1]},T=function(g){return function(b){var l,m,_;if("0x"===b.slice(0,2)){l=[];for(var h=2,u=b.length;h>2]|=_[G]<>2]|=w<>2]|=(192|w>>6)<>2]|=(128|63&w)<=57344?(I[K>>2]|=(224|w>>12)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<>2]|=(240|w>>18)<>2]|=(128|w>>12&63)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<=P){for(m.start=K-P,m.block=I[L],K=0;K>2]|=E[3&K],m.lastByteIndex===P)for(I[0]=I[L],K=1;K>4&15]+O[15&H]+O[H>>12&15]+O[H>>8&15]+O[H>>20&15]+O[H>>16&15]+O[H>>28&15]+O[H>>24&15];R%L==0&&(f(W),K=0)}return"0x"+j}({blocks:[],reset:!0,block:0,start:0,blockCount:1600-((m=g)<<1)>>5,outputBlocks:m>>5,s:(_=[0,0,0,0,0,0,0,0,0,0],[].concat(_,_,_,_,_))},l)}};q.exports={keccak256:T(256),keccak512:T(512),keccak256s:T(256),keccak512s:T(512)}},88645:(q,O,E)=>{"use strict";var d=E(31734),x=E(58320),f=function(w){return new d(w.slice(2),16)},T=function(w){var S="0x"+("0x"===w.slice(0,2)?new d(w.slice(2),16):new d(w,10)).toString("hex");return"0x0"===S?"0x":S},g=function(w){return"string"==typeof w?/^0x/.test(w)?w:"0x"+w:"0x"+new d(w).toString("hex")},b=function(w){return f(w).toNumber()},l=function(w){return function(S,I){return"0x"+f(S)[w](f(I)).toString("hex")}},h=l("add"),u=l("mul"),m=l("div"),_=l("sub");q.exports={toString:function(w){return f(w).toString(10)},fromString:T,toNumber:b,fromNumber:g,toEther:function(w){return b(m(w,T("10000000000")))/1e8},fromEther:function(w){return u(g(Math.floor(1e8*w)),T("10000000000"))},toUint256:function(w){return x.pad(32,w)},add:h,mul:u,div:m,sub:_}},46740:q=>{"use strict";q.exports={encode:function(O){var E=function(x){return(f=x.toString(16)).length%2==0?f:"0"+f;var f},d=function(x,f){return x<56?E(f+x):E(f+E(x).length/2+55)+E(x)};return"0x"+function x(f){if("string"==typeof f){var T=f.slice(2);return(2!=T.length||T>="80"?d(T.length/2,128):"")+T}var g=f.map(x).join("");return d(g.length/2,192)+g}(O)},decode:function(O){var E=2,d=function(){if(E>=O.length)throw"";var g=O.slice(E,E+2);return g<"80"?(E+=2,"0x"+g):g<"c0"?f():T()},x=function(){var g=parseInt(O.slice(E,E+=2),16)%64;return g<56?g:parseInt(O.slice(E,E+=2*(g-55)),16)},f=function(){var g=x();return"0x"+O.slice(E,E+=2*g)},T=function(){for(var g=2*x()+E,b=[];E{"use strict";var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0});var x=E(78179);function f(h){return!("string"!=typeof h||!/^(0x)?[0-9a-f]{512}$/i.test(h)||!/^(0x)?[0-9a-f]{512}$/.test(h)&&!/^(0x)?[0-9A-F]{512}$/.test(h))}function T(h,u){"object"===(0,d.default)(u)&&u.constructor===Uint8Array&&(u=x.bytesToHex(u));for(var m=x.keccak256(u).replace("0x",""),_=0;_<12;_+=4){var w=(parseInt(m.substr(_,2),16)<<8)+parseInt(m.substr(_+2,2),16)&2047,S=1<=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;throw new Error("invalid bloom")}function b(h){return!("string"!=typeof h||!/^(0x)?[0-9a-f]{64}$/i.test(h)||!/^(0x)?[0-9a-f]{64}$/.test(h)&&!/^(0x)?[0-9A-F]{64}$/.test(h))}function l(h){return!("string"!=typeof h||!h.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!h.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}O.isBloom=f,O.isInBloom=T,O.isUserEthereumAddressInBloom=function(h,u){if(!f(h))throw new Error("Invalid bloom given");if(!l(u))throw new Error('Invalid ethereum address given: "'.concat(u,'"'));return T(h,x.padLeft(u,64))},O.isContractAddressInBloom=function(h,u){if(!f(h))throw new Error("Invalid bloom given");if(!l(u))throw new Error('Invalid contract address given: "'.concat(u,'"'));return T(h,u)},O.isTopicInBloom=function(h,u){if(!f(h))throw new Error("Invalid bloom given");if(!b(u))throw new Error("Invalid topic");return T(h,u)},O.isTopic=b,O.isAddress=l},78179:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(34477);function x(T){if(null==T)throw new Error("cannot convert null value to array");if("string"==typeof T){var g=T.match(/^(0x)?[0-9a-fA-F]*$/);if(!g)throw new Error("invalid hexidecimal string");if("0x"!==g[1])throw new Error("hex string must have 0x prefix");(T=T.substring(2)).length%2&&(T="0"+T);for(var b=[],l=0;l=256||parseInt(String(m))!=m)return!1}return!0}(T))return f(new Uint8Array(T));throw new Error("invalid arrayify value")}function f(T){var g=arguments;return void 0!==T.slice||(T.slice=function(){var b=Array.prototype.slice.call(g);return f(new Uint8Array(Array.prototype.slice.apply(T,b)))}),T}O.keccak256=function(T){return"0x"+d.keccak_256(x(T))},O.padLeft=function(T,g){var b=/^0x/i.test(T)||"number"==typeof T,l=g-(T=T.toString().replace(/^0x/i,"")).length+1>=0?g-T.length+1:0;return(b?"0x":"")+new Array(l).join("0")+T},O.bytesToHex=function(T){for(var g=[],b=0;b>>4).toString(16)),g.push((15&T[b]).toString(16));return"0x".concat(g.join("").replace(/^0+/,""))},O.toByteArray=x},34477:(q,O,E)=>{"use strict";q=E.nmd(q);var d,x=E(19142),f=E(28847)(E(3355));!function(){var T="input is invalid type",g="object"===("undefined"==typeof window?"undefined":(0,f.default)(window)),b=g?window:{};b.JS_SHA3_NO_WINDOW&&(g=!1);var l=!g&&"object"===("undefined"==typeof self?"undefined":(0,f.default)(self));!b.JS_SHA3_NO_NODE_JS&&"object"===(void 0===x?"undefined":(0,f.default)(x))&&x.versions&&x.versions.node?b=E.g:l&&(b=self);var h=!b.JS_SHA3_NO_COMMON_JS&&"object"===(0,f.default)(q)&&q.exports,u=E.amdO,m=!b.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,_="0123456789abcdef".split(""),w=[4,1024,262144,67108864],S=[0,8,16,24],I=[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],P=[224,256,384,512],L=[128,256],V=["hex","buffer","arrayBuffer","array","digest"],W={128:168,256:136};!b.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(ue){return"[object Array]"===Object.prototype.toString.call(ue)}),!m||!b.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(ue){return"object"===(0,f.default)(ue)&&ue.buffer&&ue.buffer.constructor===ArrayBuffer});for(var G=function(ue,we,ae){return function(Te){return new Q(ue,we,ue).update(Te)[ae]()}},H=function(ue,we,ae){return function(Te,le){return new Q(ue,we,le).update(Te)[ae]()}},j=function(ue,we,ae){return function(Te,le,X,ne){return M["cshake"+ue].update(Te,le,X,ne)[ae]()}},K=function(ue,we,ae){return function(Te,le,X,ne){return M["kmac"+ue].update(Te,le,X,ne)[ae]()}},R=function(ue,we,ae,Te){for(var le=0;le>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(31&ae)>>3;for(var Te=0;Te<50;++Te)this.s[Te]=0}function ee(ue,we,ae){Q.call(this,ue,we,ae)}Q.prototype.update=function(ue){if(this.finalized)throw new Error("finalize already called");var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}for(var Te,le,X=this.blocks,ne=this.byteCount,pe=ue.length,_e=this.blockCount,xe=0,Ce=this.s;xe>2]|=ue[xe]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|63&le)<=57344?(X[Te>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|63&le)<=ne){for(this.start=Te-ne,this.block=X[_e],Te=0;Te<_e;++Te)Ce[Te]^=X[Te];ce(Ce),this.reset=!0}else this.start=Te}return this},Q.prototype.encode=function(ue,we){var ae=255&ue,Te=1,le=[ae];for(ae=255&(ue>>=8);ae>0;)le.unshift(ae),ae=255&(ue>>=8),++Te;return we?le.push(Te):le.unshift(Te),this.update(le),le.length},Q.prototype.encodeString=function(ue){var we,ae=(0,f.default)(ue);if("string"!==ae){if("object"!==ae)throw new Error(T);if(null===ue)throw new Error(T);if(m&&ue.constructor===ArrayBuffer)ue=new Uint8Array(ue);else if(!(Array.isArray(ue)||m&&ArrayBuffer.isView(ue)))throw new Error(T);we=!0}var Te=0;if(we)Te=ue.length;else for(var X=0;X=57344?Te+=3:(ne=65536+((1023&ne)<<10|1023&ue.charCodeAt(++X)),Te+=4)}return Te+=this.encode(8*Te),this.update(ue),Te},Q.prototype.bytepad=function(ue,we){for(var ae=this.encode(we),Te=0;Te>2]|=this.padding[3&we],this.lastByteIndex===this.byteCount)for(ue[0]=ue[ae],we=1;we>4&15]+_[15&ue]+_[ue>>12&15]+_[ue>>8&15]+_[ue>>20&15]+_[ue>>16&15]+_[ue>>28&15]+_[ue>>24&15];ne%we==0&&(ce(ae),X=0)}return le&&(pe+=_[(ue=ae[X])>>4&15]+_[15&ue],le>1&&(pe+=_[ue>>12&15]+_[ue>>8&15]),le>2&&(pe+=_[ue>>20&15]+_[ue>>16&15])),pe},Q.prototype.buffer=Q.prototype.arrayBuffer=function(){this.finalize();var ue,we=this.blockCount,ae=this.s,Te=this.outputBlocks,le=this.extraBytes,X=0,ne=0,pe=this.outputBits>>3;ue=le?new ArrayBuffer(Te+1<<2):new ArrayBuffer(pe);for(var _e=new Uint32Array(ue);ne>8&255,_e[ue+2]=we>>16&255,_e[ue+3]=we>>24&255;pe%ae==0&&ce(Te)}return X&&(_e[ue=pe<<2]=255&(we=Te[ne]),X>1&&(_e[ue+1]=we>>8&255),X>2&&(_e[ue+2]=we>>16&255)),_e},(ee.prototype=new Q).finalize=function(){return this.encode(this.outputBits,!0),Q.prototype.finalize.call(this)};var ce=function(ue){var we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Jr,Ln,Bn,Wr,zn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn,Qn,Vi,ar,br,ki,ur,mr,Fr,hi,wi,cs,$i,rs,Xi;for(Te=0;Te<48;Te+=2)le=ue[0]^ue[10]^ue[20]^ue[30]^ue[40],X=ue[1]^ue[11]^ue[21]^ue[31]^ue[41],_e=ue[4]^ue[14]^ue[24]^ue[34]^ue[44],xe=ue[5]^ue[15]^ue[25]^ue[35]^ue[45],Ce=ue[6]^ue[16]^ue[26]^ue[36]^ue[46],ke=ue[7]^ue[17]^ue[27]^ue[37]^ue[47],we=(me=ue[8]^ue[18]^ue[28]^ue[38]^ue[48])^((ne=ue[2]^ue[12]^ue[22]^ue[32]^ue[42])<<1|(pe=ue[3]^ue[13]^ue[23]^ue[33]^ue[43])>>>31),ae=(Ee=ue[9]^ue[19]^ue[29]^ue[39]^ue[49])^(pe<<1|ne>>>31),ue[0]^=we,ue[1]^=ae,ue[10]^=we,ue[11]^=ae,ue[20]^=we,ue[21]^=ae,ue[30]^=we,ue[31]^=ae,ue[40]^=we,ue[41]^=ae,ae=X^(xe<<1|_e>>>31),ue[2]^=we=le^(_e<<1|xe>>>31),ue[3]^=ae,ue[12]^=we,ue[13]^=ae,ue[22]^=we,ue[23]^=ae,ue[32]^=we,ue[33]^=ae,ue[42]^=we,ue[43]^=ae,ae=pe^(ke<<1|Ce>>>31),ue[4]^=we=ne^(Ce<<1|ke>>>31),ue[5]^=ae,ue[14]^=we,ue[15]^=ae,ue[24]^=we,ue[25]^=ae,ue[34]^=we,ue[35]^=ae,ue[44]^=we,ue[45]^=ae,ae=xe^(Ee<<1|me>>>31),ue[6]^=we=_e^(me<<1|Ee>>>31),ue[7]^=ae,ue[16]^=we,ue[17]^=ae,ue[26]^=we,ue[27]^=ae,ue[36]^=we,ue[37]^=ae,ue[46]^=we,ue[47]^=ae,ae=ke^(X<<1|le>>>31),ue[8]^=we=Ce^(le<<1|X>>>31),ue[9]^=ae,ue[18]^=we,ue[19]^=ae,ue[28]^=we,ue[29]^=ae,ue[38]^=we,ue[39]^=ae,ue[48]^=we,ue[49]^=ae,Ve=ue[1],Un=ue[11]<<4|ue[10]>>>28,ir=ue[10]<<4|ue[11]>>>28,Nt=ue[20]<<3|ue[21]>>>29,It=ue[21]<<3|ue[20]>>>29,cs=ue[31]<<9|ue[30]>>>23,$i=ue[30]<<9|ue[31]>>>23,Lr=ue[40]<<18|ue[41]>>>14,Kn=ue[41]<<18|ue[40]>>>14,fn=ue[2]<<1|ue[3]>>>31,$n=ue[3]<<1|ue[2]>>>31,tt=ue[12]<<12|ue[13]>>>20,ts=ue[22]<<10|ue[23]>>>22,Tn=ue[23]<<10|ue[22]>>>22,qt=ue[33]<<13|ue[32]>>>19,jt=ue[32]<<13|ue[33]>>>19,rs=ue[42]<<2|ue[43]>>>30,Xi=ue[43]<<2|ue[42]>>>30,ki=ue[5]<<30|ue[4]>>>2,ur=ue[4]<<30|ue[5]>>>2,Jr=ue[14]<<6|ue[15]>>>26,Ln=ue[15]<<6|ue[14]>>>26,ht=ue[24]<<11|ue[25]>>>21,Qn=ue[34]<<15|ue[35]>>>17,Vi=ue[35]<<15|ue[34]>>>17,Yt=ue[45]<<29|ue[44]>>>3,Wn=ue[44]<<29|ue[45]>>>3,gt=ue[6]<<28|ue[7]>>>4,St=ue[7]<<28|ue[6]>>>4,mr=ue[17]<<23|ue[16]>>>9,Fr=ue[16]<<23|ue[17]>>>9,Bn=ue[26]<<25|ue[27]>>>7,Wr=ue[27]<<25|ue[26]>>>7,wt=ue[36]<<21|ue[37]>>>11,Pt=ue[37]<<21|ue[36]>>>11,ar=ue[47]<<24|ue[46]>>>8,br=ue[46]<<24|ue[47]>>>8,sr=ue[8]<<27|ue[9]>>>5,Ii=ue[9]<<27|ue[8]>>>5,Wt=ue[18]<<20|ue[19]>>>12,dn=ue[19]<<20|ue[18]>>>12,hi=ue[29]<<7|ue[28]>>>25,wi=ue[28]<<7|ue[29]>>>25,zn=ue[38]<<8|ue[39]>>>24,bn=ue[39]<<8|ue[38]>>>24,st=ue[48]<<14|ue[49]>>>18,Ye=ue[49]<<14|ue[48]>>>18,ue[0]=(ze=ue[0])^~(nt=ue[13]<<12|ue[12]>>>20)&(mt=ue[25]<<11|ue[24]>>>21),ue[1]=Ve^~tt&ht,ue[10]=gt^~Wt&Nt,ue[11]=St^~dn&It,ue[20]=fn^~Jr&Bn,ue[21]=$n^~Ln&Wr,ue[30]=sr^~Un&ts,ue[31]=Ii^~ir&Tn,ue[40]=ki^~mr&hi,ue[41]=ur^~Fr&wi,ue[2]=nt^~mt&wt,ue[3]=tt^~ht&Pt,ue[12]=Wt^~Nt&qt,ue[13]=dn^~It&jt,ue[22]=Jr^~Bn&zn,ue[23]=Ln^~Wr&bn,ue[32]=Un^~ts&Qn,ue[33]=ir^~Tn&Vi,ue[42]=mr^~hi&cs,ue[43]=Fr^~wi&$i,ue[4]=mt^~wt&st,ue[5]=ht^~Pt&Ye,ue[14]=Nt^~qt&Yt,ue[15]=It^~jt&Wn,ue[24]=Bn^~zn&Lr,ue[25]=Wr^~bn&Kn,ue[34]=ts^~Qn&ar,ue[35]=Tn^~Vi&br,ue[44]=hi^~cs&rs,ue[45]=wi^~$i&Xi,ue[6]=wt^~st&ze,ue[7]=Pt^~Ye&Ve,ue[16]=qt^~Yt>,ue[17]=jt^~Wn&St,ue[26]=zn^~Lr&fn,ue[27]=bn^~Kn&$n,ue[36]=Qn^~ar&sr,ue[37]=Vi^~br&Ii,ue[46]=cs^~rs&ki,ue[47]=$i^~Xi&ur,ue[8]=st^~ze&nt,ue[9]=Ye^~Ve&tt,ue[18]=Yt^~gt&Wt,ue[19]=Wn^~St&dn,ue[28]=Lr^~fn&Jr,ue[29]=Kn^~$n&Ln,ue[38]=ar^~sr&Un,ue[39]=br^~Ii&ir,ue[48]=rs^~ki&mr,ue[49]=Xi^~ur&Fr,ue[0]^=I[Te],ue[1]^=I[Te+1]};if(h)q.exports=M;else{for(k=0;k{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.keccak512=O.keccak384=O.keccak256=O.keccak224=void 0;var d,x=E(64376),f=E(40890);O.keccak224=(0,f.wrapHash)(x.keccak_224),O.keccak256=((d=(0,f.wrapHash)(x.keccak_256)).create=x.keccak_256.create,d),O.keccak384=(0,f.wrapHash)(x.keccak_384),O.keccak512=(0,f.wrapHash)(x.keccak_512)},86992:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.secp256k1=void 0;var d=E(4158);Object.defineProperty(O,"secp256k1",{enumerable:!0,get:function(){return d.secp256k1}})},40890:(q,O,E)=>{"use strict";q=E.nmd(q);var d=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.crypto=O.wrapHash=O.equalsBytes=O.hexToBytes=O.bytesToUtf8=O.utf8ToBytes=O.createView=O.concatBytes=O.toHex=O.bytesToHex=O.assertBytes=O.assertBool=void 0;var x,f=(x=E(96822))&&x.__esModule?x:{default:x},T=E(72434);O.assertBool=f.default.bool,O.assertBytes=f.default.bytes;var l,h,u=E(72434);Object.defineProperty(O,"bytesToHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(O,"toHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(O,"concatBytes",{enumerable:!0,get:function(){return u.concatBytes}}),Object.defineProperty(O,"createView",{enumerable:!0,get:function(){return u.createView}}),Object.defineProperty(O,"utf8ToBytes",{enumerable:!0,get:function(){return u.utf8ToBytes}}),O.bytesToUtf8=function(m){if(!(m instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got ".concat((0,d.default)(m)));return(new TextDecoder).decode(m)},O.hexToBytes=function(m){var _=m.startsWith("0x")?m.substring(2):m;return(0,T.hexToBytes)(_)},O.equalsBytes=function(m,_){if(m.length!==_.length)return!1;for(var w=0;w{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.isZeroAddress=O.zeroAddress=O.importPublic=O.privateToAddress=O.privateToPublic=O.publicToAddress=O.pubToAddress=O.isValidPublic=O.isValidPrivate=O.generateAddress2=O.generateAddress=O.isValidChecksumAddress=O.toChecksumAddress=O.isValidAddress=O.Account=void 0;var x,f=(x=E(3894))&&x.__esModule?x:{default:x},T=E(49100),g=E(31439),b=E(23271),l=E(60986),h=E(13464),u=E(39808),m=E(5725),_=E(35513),w=function(){function S(I,P,L,V){void 0===I&&(I=new T.BN(0)),void 0===P&&(P=new T.BN(0)),void 0===L&&(L=l.KECCAK256_RLP),void 0===V&&(V=l.KECCAK256_NULL),this.nonce=I,this.balance=P,this.stateRoot=L,this.codeHash=V,this._validate()}return S.fromAccountData=function(I){var P=I.nonce,L=I.balance,V=I.stateRoot,W=I.codeHash;return new S(P?new T.BN((0,h.toBuffer)(P)):void 0,L?new T.BN((0,h.toBuffer)(L)):void 0,V?(0,h.toBuffer)(V):void 0,W?(0,h.toBuffer)(W):void 0)},S.fromRlpSerializedAccount=function(I){var P=T.rlp.decode(I);if(!Array.isArray(P))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(P)},S.fromValuesArray=function(I){var P=function(H,j){var K="function"==typeof Symbol&&H[Symbol.iterator];if(!K)return H;var R,o,y=K.call(H),M=[];try{for(;(void 0===j||j-- >0)&&!(R=y.next()).done;)M.push(R.value)}catch(v){o={error:v}}finally{try{R&&!R.done&&(K=y.return)&&K.call(y)}finally{if(o)throw o.error}}return M}(I,4),V=P[1],W=P[2],G=P[3];return new S(new T.BN(P[0]),new T.BN(V),W,G)},S.prototype._validate=function(){if(this.nonce.lt(new T.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new T.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},S.prototype.raw=function(){return[(0,_.bnToUnpaddedBuffer)(this.nonce),(0,_.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},S.prototype.serialize=function(){return T.rlp.encode(this.raw())},S.prototype.isContract=function(){return!this.codeHash.equals(l.KECCAK256_NULL)},S.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(l.KECCAK256_NULL)},S}();O.Account=w,O.isValidAddress=function(S){try{(0,m.assertIsString)(S)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(S)},O.toChecksumAddress=function(S,I){(0,m.assertIsHexString)(S);var P=(0,b.stripHexPrefix)(S).toLowerCase(),L="";I&&(L=(0,_.toType)(I,_.TypeOutput.BN).toString()+"0x");for(var V=(0,u.keccakFromString)(L+P).toString("hex"),W="0x",G=0;G=8?W+=P[G].toUpperCase():W+=P[G];return W},O.isValidChecksumAddress=function(S,I){return(0,O.isValidAddress)(S)&&(0,O.toChecksumAddress)(S,I)===S},O.generateAddress=function(S,I){(0,m.assertIsBuffer)(S),(0,m.assertIsBuffer)(I);var P=new T.BN(I);return P.isZero()?(0,u.rlphash)([S,null]).slice(-20):(0,u.rlphash)([S,d.from(P.toArray())]).slice(-20)},O.generateAddress2=function(S,I,P){return(0,m.assertIsBuffer)(S),(0,m.assertIsBuffer)(I),(0,m.assertIsBuffer)(P),(0,f.default)(20===S.length),(0,f.default)(32===I.length),(0,u.keccak256)(d.concat([d.from("ff","hex"),S,I,(0,u.keccak256)(P)])).slice(-20)},O.isValidPrivate=function(S){return(0,g.privateKeyVerify)(S)},O.isValidPublic=function(S,I){return void 0===I&&(I=!1),(0,m.assertIsBuffer)(S),64===S.length?(0,g.publicKeyVerify)(d.concat([d.from([4]),S])):!!I&&(0,g.publicKeyVerify)(S)},O.pubToAddress=function(S,I){return void 0===I&&(I=!1),(0,m.assertIsBuffer)(S),I&&64!==S.length&&(S=d.from((0,g.publicKeyConvert)(S,!1).slice(1))),(0,f.default)(64===S.length),(0,u.keccak)(S).slice(-20)},O.publicToAddress=O.pubToAddress,O.privateToPublic=function(S){return(0,m.assertIsBuffer)(S),d.from((0,g.publicKeyCreate)(S,!1)).slice(1)},O.privateToAddress=function(S){return(0,O.publicToAddress)((0,O.privateToPublic)(S))},O.importPublic=function(S){return(0,m.assertIsBuffer)(S),64!==S.length&&(S=d.from((0,g.publicKeyConvert)(S,!1).slice(1))),S},O.zeroAddress=function(){var S=(0,h.zeros)(20);return(0,h.bufferToHex)(S)},O.isZeroAddress=function(S){try{(0,m.assertIsString)(S)}catch{return!1}return(0,O.zeroAddress)()===S}},41984:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.Address=void 0;var x,f=(x=E(3894))&&x.__esModule?x:{default:x},T=E(49100),g=E(13464),b=E(21968),l=function(){function h(u){(0,f.default)(20===u.length,"Invalid address length"),this.buf=u}return h.zero=function(){return new h((0,g.zeros)(20))},h.fromString=function(u){return(0,f.default)((0,b.isValidAddress)(u),"Invalid address"),new h((0,g.toBuffer)(u))},h.fromPublicKey=function(u){return(0,f.default)(d.isBuffer(u),"Public key should be Buffer"),new h((0,b.pubToAddress)(u))},h.fromPrivateKey=function(u){return(0,f.default)(d.isBuffer(u),"Private key should be Buffer"),new h((0,b.privateToAddress)(u))},h.generate=function(u,m){return(0,f.default)(T.BN.isBN(m)),new h((0,b.generateAddress)(u.buf,m.toArrayLike(d)))},h.generate2=function(u,m,_){return(0,f.default)(d.isBuffer(m)),(0,f.default)(d.isBuffer(_)),new h((0,b.generateAddress2)(u.buf,m,_))},h.prototype.equals=function(u){return this.buf.equals(u.buf)},h.prototype.isZero=function(){return this.equals(h.zero())},h.prototype.isPrecompileOrSystemAddress=function(){var u=new T.BN(this.buf),m=new T.BN(0),_=new T.BN("ffff","hex");return u.gte(m)&&u.lte(_)},h.prototype.toString=function(){return"0x"+this.buf.toString("hex")},h.prototype.toBuffer=function(){return d.from(this.buf)},h}();O.Address=l},13464:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=function(h,u){var m="function"==typeof Symbol&&h[Symbol.iterator];if(!m)return h;var _,w,S=m.call(h),I=[];try{for(;(void 0===u||u-- >0)&&!(_=S.next()).done;)I.push(_.value)}catch(P){w={error:P}}finally{try{_&&!_.done&&(m=S.return)&&m.call(S)}finally{if(w)throw w.error}}return I};Object.defineProperty(O,"__esModule",{value:!0}),O.bufArrToArr=O.arrToBufArr=O.validateNoLeadingZeroes=O.baToJSON=O.toUtf8=O.addHexPrefix=O.toUnsigned=O.fromSigned=O.bufferToHex=O.bufferToInt=O.toBuffer=O.unpadHexString=O.unpadArray=O.unpadBuffer=O.setLengthRight=O.setLengthLeft=O.zeros=O.intToBuffer=O.intToHex=void 0;var f=E(49100),T=E(23271),g=E(5725);O.intToHex=function(h){if(!Number.isSafeInteger(h)||h<0)throw new Error("Received an invalid integer type: ".concat(h));return"0x".concat(h.toString(16))},O.intToBuffer=function(h){var u=(0,O.intToHex)(h);return d.from((0,T.padToEven)(u.slice(2)),"hex")},O.zeros=function(h){return d.allocUnsafe(h).fill(0)};var b=function(h,u,m){var _=(0,O.zeros)(u);return m?h.length0&&"0"===u.toString();)u=(h=h.slice(1))[0];return h};O.unpadBuffer=function(h){return(0,g.assertIsBuffer)(h),l(h)},O.unpadArray=function(h){return(0,g.assertIsArray)(h),l(h)},O.unpadHexString=function(h){return(0,g.assertIsHexString)(h),h=(0,T.stripHexPrefix)(h),l(h)},O.toBuffer=function(h){if(null==h)return d.allocUnsafe(0);if(d.isBuffer(h)||Array.isArray(h)||h instanceof Uint8Array)return d.from(h);if("string"==typeof h){if(!(0,T.isHexString)(h))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(h));return d.from((0,T.padToEven)((0,T.stripHexPrefix)(h)),"hex")}if("number"==typeof h)return(0,O.intToBuffer)(h);if(f.BN.isBN(h)){if(h.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(h));return h.toArrayLike(d)}if(h.toArray)return d.from(h.toArray());if(h.toBuffer)return d.from(h.toBuffer());throw new Error("invalid type")},O.bufferToInt=function(h){return new f.BN((0,O.toBuffer)(h)).toNumber()},O.bufferToHex=function(h){return"0x"+(h=(0,O.toBuffer)(h)).toString("hex")},O.fromSigned=function(h){return new f.BN(h).fromTwos(256)},O.toUnsigned=function(h){return d.from(h.toTwos(256).toArray())},O.addHexPrefix=function(h){return"string"!=typeof h||(0,T.isHexPrefixed)(h)?h:"0x"+h},O.toUtf8=function(h){if((h=(0,T.stripHexPrefix)(h)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return d.from(h.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},O.baToJSON=function(h){if(d.isBuffer(h))return"0x".concat(h.toString("hex"));if(h instanceof Array){for(var u=[],m=0;m=L.length&&(L=void 0),{value:L&&L[G++],done:!L}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(h)),w=_.next();!w.done;w=_.next()){var S=x(w.value,2),P=S[1];if(void 0!==P&&P.length>0&&0===P[0])throw new Error("".concat(S[0]," cannot have leading zeroes, received: ").concat(P.toString("hex")))}}catch(L){u={error:L}}finally{try{w&&!w.done&&(m=_.return)&&m.call(_)}finally{if(u)throw u.error}}},O.arrToBufArr=function h(u){return Array.isArray(u)?u.map(function(m){return h(m)}):d.from(u)},O.bufArrToArr=function h(u){return Array.isArray(u)?u.map(function(m){return h(m)}):Uint8Array.from(u??[])}},60986:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.KECCAK256_RLP=O.KECCAK256_RLP_S=O.KECCAK256_RLP_ARRAY=O.KECCAK256_RLP_ARRAY_S=O.KECCAK256_NULL=O.KECCAK256_NULL_S=O.TWO_POW256=O.MAX_INTEGER=O.MAX_UINT64=void 0;var d=E(29033),x=E(49100);O.MAX_UINT64=new x.BN("ffffffffffffffff",16),O.MAX_INTEGER=new x.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),O.TWO_POW256=new x.BN("10000000000000000000000000000000000000000000000000000000000000000",16),O.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",O.KECCAK256_NULL=d.Buffer.from(O.KECCAK256_NULL_S,"hex"),O.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",O.KECCAK256_RLP_ARRAY=d.Buffer.from(O.KECCAK256_RLP_ARRAY_S,"hex"),O.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",O.KECCAK256_RLP=d.Buffer.from(O.KECCAK256_RLP_S,"hex")},49100:(q,O,E)=>{"use strict";var d=Object.create?function(b,l,h,u){void 0===u&&(u=h);var m=Object.getOwnPropertyDescriptor(l,h);m&&!("get"in m?!l.__esModule:m.writable||m.configurable)||(m={enumerable:!0,get:function(){return l[h]}}),Object.defineProperty(b,u,m)}:function(b,l,h,u){void 0===u&&(u=h),b[u]=l[h]},x=Object.create?function(b,l){Object.defineProperty(b,"default",{enumerable:!0,value:l})}:function(b,l){b.default=l};Object.defineProperty(O,"__esModule",{value:!0}),O.rlp=O.BN=void 0;var f,T=(f=E(31734))&&f.__esModule?f:{default:f};O.BN=T.default;var g=function(b){if(b&&b.__esModule)return b;var l={};if(null!=b)for(var h in b)"default"!==h&&Object.prototype.hasOwnProperty.call(b,h)&&d(l,b,h);return x(l,b),l}(E(6905));O.rlp=g},39808:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.rlphash=O.ripemd160FromArray=O.ripemd160FromString=O.ripemd160=O.sha256FromArray=O.sha256FromString=O.sha256=O.keccakFromArray=O.keccakFromHexString=O.keccakFromString=O.keccak256=O.keccak=void 0;var x=E(8235),f=E(35866),T=E(49100),g=E(13464),b=E(5725);O.keccak=function(u,m){switch(void 0===m&&(m=256),(0,b.assertIsBuffer)(u),m){case 224:return(0,x.keccak224)(u);case 256:return(0,x.keccak256)(u);case 384:return(0,x.keccak384)(u);case 512:return(0,x.keccak512)(u);default:throw new Error("Invald algorithm: keccak".concat(m))}},O.keccak256=function(u){return(0,O.keccak)(u)},O.keccakFromString=function(u,m){void 0===m&&(m=256),(0,b.assertIsString)(u);var _=d.from(u,"utf8");return(0,O.keccak)(_,m)},O.keccakFromHexString=function(u,m){return void 0===m&&(m=256),(0,b.assertIsHexString)(u),(0,O.keccak)((0,g.toBuffer)(u),m)},O.keccakFromArray=function(u,m){return void 0===m&&(m=256),(0,b.assertIsArray)(u),(0,O.keccak)((0,g.toBuffer)(u),m)};var l=function(u){return u=(0,g.toBuffer)(u),f("sha256").update(u).digest()};O.sha256=function(u){return(0,b.assertIsBuffer)(u),l(u)},O.sha256FromString=function(u){return(0,b.assertIsString)(u),l(u)},O.sha256FromArray=function(u){return(0,b.assertIsArray)(u),l(u)};var h=function(u,m){u=(0,g.toBuffer)(u);var _=f("rmd160").update(u).digest();return!0===m?(0,g.setLengthLeft)(_,32):_};O.ripemd160=function(u,m){return(0,b.assertIsBuffer)(u),h(u,m)},O.ripemd160FromString=function(u,m){return(0,b.assertIsString)(u),h(u,m)},O.ripemd160FromArray=function(u,m){return(0,b.assertIsArray)(u),h(u,m)},O.rlphash=function(u){return(0,O.keccak)(T.rlp.encode(u))}},5725:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.assertIsString=O.assertIsArray=O.assertIsBuffer=O.assertIsHexString=void 0;var x=E(23271);O.assertIsHexString=function(f){if(!(0,x.isHexString)(f)){var T="This method only supports 0x-prefixed hex strings but input was: ".concat(f);throw new Error(T)}},O.assertIsBuffer=function(f){if(!d.isBuffer(f)){var T="This method only supports Buffer but input was: ".concat(f);throw new Error(T)}},O.assertIsArray=function(f){if(!Array.isArray(f)){var T="This method only supports number arrays but input was: ".concat(f);throw new Error(T)}},O.assertIsString=function(f){if("string"!=typeof f){var T="This method only supports strings but input was: ".concat(f);throw new Error(T)}}},33062:(q,O,E)=>{"use strict";var d=Object.create?function(T,g,b,l){void 0===l&&(l=b);var h=Object.getOwnPropertyDescriptor(g,b);h&&!("get"in h?!g.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return g[b]}}),Object.defineProperty(T,l,h)}:function(T,g,b,l){void 0===l&&(l=b),T[l]=g[b]},x=function(T,g){for(var b in T)"default"===b||Object.prototype.hasOwnProperty.call(g,b)||d(g,T,b)};Object.defineProperty(O,"__esModule",{value:!0}),O.isHexString=O.getKeys=O.fromAscii=O.fromUtf8=O.toAscii=O.arrayContainsArray=O.getBinarySize=O.padToEven=O.stripHexPrefix=O.isHexPrefixed=void 0,x(E(60986),O),x(E(21968),O),x(E(41984),O),x(E(39808),O),x(E(86081),O),x(E(13464),O),x(E(41677),O),x(E(49100),O),x(E(35513),O);var f=E(23271);Object.defineProperty(O,"isHexPrefixed",{enumerable:!0,get:function(){return f.isHexPrefixed}}),Object.defineProperty(O,"stripHexPrefix",{enumerable:!0,get:function(){return f.stripHexPrefix}}),Object.defineProperty(O,"padToEven",{enumerable:!0,get:function(){return f.padToEven}}),Object.defineProperty(O,"getBinarySize",{enumerable:!0,get:function(){return f.getBinarySize}}),Object.defineProperty(O,"arrayContainsArray",{enumerable:!0,get:function(){return f.arrayContainsArray}}),Object.defineProperty(O,"toAscii",{enumerable:!0,get:function(){return f.toAscii}}),Object.defineProperty(O,"fromUtf8",{enumerable:!0,get:function(){return f.fromUtf8}}),Object.defineProperty(O,"fromAscii",{enumerable:!0,get:function(){return f.fromAscii}}),Object.defineProperty(O,"getKeys",{enumerable:!0,get:function(){return f.getKeys}}),Object.defineProperty(O,"isHexString",{enumerable:!0,get:function(){return f.isHexString}})},23271:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847)(E(3355));function f(g){if("string"!=typeof g)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,x.default)(g)));return"0"===g[0]&&"x"===g[1]}function T(g){var b=g;if("string"!=typeof b)throw new Error("[padToEven] value must be type 'string', received ".concat((0,x.default)(b)));return b.length%2&&(b="0".concat(b)),b}Object.defineProperty(O,"__esModule",{value:!0}),O.isHexString=O.getKeys=O.fromAscii=O.fromUtf8=O.toAscii=O.arrayContainsArray=O.getBinarySize=O.padToEven=O.stripHexPrefix=O.isHexPrefixed=void 0,O.isHexPrefixed=f,O.stripHexPrefix=function(g){if("string"!=typeof g)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,x.default)(g)));return f(g)?g.slice(2):g},O.padToEven=T,O.getBinarySize=function(g){if("string"!=typeof g)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat((0,x.default)(g)));return d.byteLength(g,"utf8")},O.arrayContainsArray=function(g,b,l){if(!0!==Array.isArray(g))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,x.default)(g),"'"));if(!0!==Array.isArray(b))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,x.default)(b),"'"));return b[l?"some":"every"](function(h){return g.indexOf(h)>=0})},O.toAscii=function(g){var b="",l=0,h=g.length;for("0x"===g.substring(0,2)&&(l=2);l{"use strict";var d=E(29033).Buffer,x=E(28847)(E(3355));Object.defineProperty(O,"__esModule",{value:!0}),O.defineProperties=void 0;var f,T=(f=E(3894))&&f.__esModule?f:{default:f},g=E(23271),b=E(49100),l=E(13464);O.defineProperties=function(h,u,m){if(h.raw=[],h._fields=[],h.toJSON=function(w){if(void 0===w&&(w=!1),w){var S={};return h._fields.forEach(function(I){S[I]="0x".concat(h[I].toString("hex"))}),S}return(0,l.baToJSON)(h.raw)},h.serialize=function(){return b.rlp.encode(h.raw)},u.forEach(function(w,S){function I(){return h.raw[S]}function P(L){"00"!==(L=(0,l.toBuffer)(L)).toString("hex")||w.allowZero||(L=d.allocUnsafe(0)),w.allowLess&&w.length?(L=(0,l.unpadBuffer)(L),(0,T.default)(w.length>=L.length,"The field ".concat(w.name," must not have more ").concat(w.length," bytes"))):w.allowZero&&0===L.length||!w.length||(0,T.default)(w.length===L.length,"The field ".concat(w.name," must have byte length of ").concat(w.length)),h.raw[S]=L}h._fields.push(w.name),Object.defineProperty(h,w.name,{enumerable:!0,configurable:!0,get:I,set:P}),w.default&&(h[w.name]=w.default),w.alias&&Object.defineProperty(h,w.alias,{enumerable:!1,configurable:!0,set:P,get:I})}),m)if("string"==typeof m&&(m=d.from((0,g.stripHexPrefix)(m),"hex")),d.isBuffer(m)&&(m=b.rlp.decode(m)),Array.isArray(m)){if(m.length>h._fields.length)throw new Error("wrong number of fields in data");m.forEach(function(w,S){h[h._fields[S]]=(0,l.toBuffer)(w)})}else{if("object"!==(0,x.default)(m))throw new Error("invalid data");var _=Object.keys(m);u.forEach(function(w){-1!==_.indexOf(w.name)&&(h[w.name]=m[w.name]),-1!==_.indexOf(w.alias)&&(h[w.alias]=m[w.alias])})}}},86081:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.hashPersonalMessage=O.isValidSignature=O.fromRpcSig=O.toCompactSig=O.toRpcSig=O.ecrecover=O.ecsign=void 0;var x=E(31439),f=E(49100),T=E(13464),g=E(39808),b=E(5725),l=E(35513);function h(m,_){var w=(0,l.toType)(m,l.TypeOutput.BN);if(w.eqn(0)||w.eqn(1))return(0,l.toType)(m,l.TypeOutput.BN);if(!_)return w.subn(27);var S=(0,l.toType)(_,l.TypeOutput.BN);return w.sub(S.muln(2).addn(35))}function u(m){var _=new f.BN(m);return _.eqn(0)||_.eqn(1)}O.ecsign=function(m,_,w){var S=(0,x.ecdsaSign)(m,_),I=S.signature,P=S.recid,L=d.from(I.slice(0,32)),V=d.from(I.slice(32,64));if(!w||"number"==typeof w){if(w&&!Number.isSafeInteger(w))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:L,s:V,v:w?P+(2*w+35):P+27}}return{r:L,s:V,v:(0,l.toType)(w,l.TypeOutput.BN).muln(2).addn(35).addn(P).toArrayLike(d)}},O.ecrecover=function(m,_,w,S,I){var P=d.concat([(0,T.setLengthLeft)(w,32),(0,T.setLengthLeft)(S,32)],64),L=h(_,I);if(!u(L))throw new Error("Invalid signature v value");var V=(0,x.ecdsaRecover)(P,L.toNumber(),m);return d.from((0,x.publicKeyConvert)(V,!1).slice(1))},O.toRpcSig=function(m,_,w,S){if(!u(h(m,S)))throw new Error("Invalid signature v value");return(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(_,32),(0,T.setLengthLeft)(w,32),(0,T.toBuffer)(m)]))},O.toCompactSig=function(m,_,w,S){if(!u(h(m,S)))throw new Error("Invalid signature v value");var I=(0,l.toType)(m,l.TypeOutput.Number),P=w;return(I>28&&I%2==1||1===I||28===I)&&((P=d.from(w))[0]|=128),(0,T.bufferToHex)(d.concat([(0,T.setLengthLeft)(_,32),(0,T.setLengthLeft)(P,32)]))},O.fromRpcSig=function(m){var _,w,S,I=(0,T.toBuffer)(m);if(I.length>=65)_=I.slice(0,32),w=I.slice(32,64),S=(0,T.bufferToInt)(I.slice(64));else{if(64!==I.length)throw new Error("Invalid signature length");_=I.slice(0,32),w=I.slice(32,64),S=(0,T.bufferToInt)(I.slice(32,33))>>7,w[0]&=127}return S<27&&(S+=27),{v:S,r:_,s:w}},O.isValidSignature=function(m,_,w,S,I){void 0===S&&(S=!0);var P=new f.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),L=new f.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==_.length||32!==w.length||!u(h(m,I)))return!1;var V=new f.BN(_),W=new f.BN(w);return!(V.isZero()||V.gt(L)||W.isZero()||W.gt(L)||S&&1===W.cmp(P))},O.hashPersonalMessage=function(m){(0,b.assertIsBuffer)(m);var _=d.from("\x19Ethereum Signed Message:\n".concat(m.length),"utf-8");return(0,g.keccak)(d.concat([_,m]))}},35513:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.toType=O.TypeOutput=O.bnToRlp=O.bnToUnpaddedBuffer=O.bnToHex=void 0;var x,l,f=E(49100),T=E(23271),g=E(13464);function b(l){return(0,g.unpadBuffer)(l.toArrayLike(d))}O.bnToHex=function(l){return"0x".concat(l.toString(16))},O.bnToUnpaddedBuffer=b,O.bnToRlp=function(l){return b(l)},(l=x=O.TypeOutput||(O.TypeOutput={}))[l.Number=0]="Number",l[l.BN=1]="BN",l[l.Buffer=2]="Buffer",l[l.PrefixedHexString=3]="PrefixedHexString",O.toType=function(l,h){if(null===l)return null;if(void 0!==l){if("string"==typeof l&&!(0,T.isHexString)(l))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(l));if("number"==typeof l&&!Number.isSafeInteger(l))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var u=(0,g.toBuffer)(l);if(h===x.Buffer)return u;if(h===x.BN)return new f.BN(u);if(h===x.Number){var m=new f.BN(u),_=new f.BN(Number.MAX_SAFE_INTEGER.toString());if(m.gt(_))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return m.toNumber()}return"0x".concat(u.toString("hex"))}}},73303:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.createHashFunction=function(x){return function(f){var T=x();return T.update(f),d.from(T.digest())}}},8235:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(73303),x=E(93135);O.keccak224=d.createHashFunction(function(){return x("keccak224")}),O.keccak256=d.createHashFunction(function(){return x("keccak256")}),O.keccak384=d.createHashFunction(function(){return x("keccak384")}),O.keccak512=d.createHashFunction(function(){return x("keccak512")})},40739:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(75010);O.getRandomBytes=function(x){return new Promise(function(f,T){d(x,function(g,b){g?T(g):f(b)})})},O.getRandomBytesSync=function(x){return d(x)}},31439:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var d=E(57902),x=E(40739);O.createPrivateKey=function(){return f=this,b=function(){var l;return function(h,u){var m,_,w,S,I={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return S={next:P(0),throw:P(1),return:P(2)},"function"==typeof Symbol&&(S[Symbol.iterator]=function(){return this}),S;function P(L){return function(V){return function(W){if(m)throw new TypeError("Generator is already executing.");for(;I;)try{if(m=1,_&&(w=2&W[0]?_.return:W[0]?_.throw||((w=_.return)&&w.call(_),0):_.next)&&!(w=w.call(_,W[1])).done)return w;switch(_=0,w&&(W=[2&W[0],w.value]),W[0]){case 0:case 1:w=W;break;case 4:return I.label++,{value:W[1],done:!1};case 5:I.label++,_=W[1],W=[0];continue;case 7:W=I.ops.pop(),I.trys.pop();continue;default:if(!((w=(w=I.trys).length>0&&w[w.length-1])||6!==W[0]&&2!==W[0])){I=0;continue}if(3===W[0]&&(!w||W[1]>w[0]&&W[1]{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(77277),T=new x(0),g=new x(-1),b={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function l(u){var m=u?u.toLowerCase():"ether",_=b[m];if("string"!=typeof _)throw new Error("[ethjs-unit] the unit provided "+u+" doesn't exists, please use the one of the following units "+JSON.stringify(b,null,2));return new x(_,10)}function h(u){if("string"==typeof u){if(!u.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+u+"', should be a number matching (^-?[0-9.]+).");return u}if("number"==typeof u)return String(u);if("object"===(0,d.default)(u)&&u.toString&&(u.toTwos||u.dividedToIntegerBy))return u.toPrecision?String(u.toPrecision()):u.toString(10);throw new Error("while converting number to string, invalid number value '"+u+"' type "+(0,d.default)(u)+".")}q.exports={unitMap:b,numberToString:h,getValueOfUnit:l,fromWei:function(u,m,_){var w=f(u),S=w.lt(T),I=l(m),P=b[m].length-1||1,L=_||{};S&&(w=w.mul(g));for(var V=w.mod(I).toString(10);V.length2)throw new Error("[ethjs-unit] while converting number "+u+" to wei, too many decimal points");var L=P[0],V=P[1];if(L||(L="0"),V||(V="0"),V.length>S)throw new Error("[ethjs-unit] while converting number "+u+" to wei, too many decimal places");for(;V.length{"use strict";var O=Object.prototype.hasOwnProperty,E="~";function d(){}function x(b,l,h){this.fn=b,this.context=l,this.once=h||!1}function f(b,l,h,u,m){if("function"!=typeof h)throw new TypeError("The listener must be a function");var _=new x(h,u||b,m),w=E?E+l:l;return b._events[w]?b._events[w].fn?b._events[w]=[b._events[w],_]:b._events[w].push(_):(b._events[w]=_,b._eventsCount++),b}function T(b,l){0==--b._eventsCount?b._events=new d:delete b._events[l]}function g(){this._events=new d,this._eventsCount=0}Object.create&&(d.prototype=Object.create(null),(new d).__proto__||(E=!1)),g.prototype.eventNames=function(){var b,l,h=[];if(0===this._eventsCount)return h;for(l in b=this._events)O.call(b,l)&&h.push(E?l.slice(1):l);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(b)):h},g.prototype.listeners=function(b){var h=this._events[E?E+b:b];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,m=h.length,_=new Array(m);u{"use strict";var d=E(28847)(E(3355)),x=Object.create||function(L){var V=function(){};return V.prototype=L,new V},f=Object.keys||function(L){var V=[];for(var W in L)Object.prototype.hasOwnProperty.call(L,W)&&V.push(W);return W},T=Function.prototype.bind||function(L){var V=this;return function(){return V.apply(L,arguments)}};function g(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=x(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}q.exports=g,g.EventEmitter=g,g.prototype._events=void 0,g.prototype._maxListeners=void 0;var b,l=10;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),b=0===h.x}catch{b=!1}function u(L){return void 0===L._maxListeners?g.defaultMaxListeners:L._maxListeners}function m(L,V,W,G){var H,j,K;if("function"!=typeof W)throw new TypeError('"listener" argument must be a function');if((j=L._events)?(j.newListener&&(L.emit("newListener",V,W.listener?W.listener:W),j=L._events),K=j[V]):(j=L._events=x(null),L._eventsCount=0),K){if("function"==typeof K?K=j[V]=G?[W,K]:[K,W]:G?K.unshift(W):K.push(W),!K.warned&&(H=u(L))&&H>0&&K.length>H){K.warned=!0;var R=new Error("Possible EventEmitter memory leak detected. "+K.length+' "'+String(V)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');R.name="MaxListenersExceededWarning",R.emitter=L,R.type=V,R.count=K.length,"object"===("undefined"==typeof console?"undefined":(0,d.default)(console))&&console.warn&&console.warn("%s: %s",R.name,R.message)}}else K=j[V]=W,++L._eventsCount;return L}function _(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var L=new Array(arguments.length),V=0;V1&&(V=arguments[1]),V instanceof Error)throw V;var o=new Error('Unhandled "error" event. ('+V+")");throw o.context=V,o}if(!(W=K[L]))return!1;var y="function"==typeof W;switch(G=arguments.length){case 1:!function(M,v,k){if(v)M.call(k);else for(var D=M.length,N=P(M,D),C=0;C=0;j--)if(W[j]===V||W[j].listener===V){K=W[j].listener,H=j;break}if(H<0)return this;0===H?W.shift():function(R,o){for(var y=o,M=y+1,v=R.length;M=0;G--)this.removeListener(L,V[G]);return this},g.prototype.listeners=function(L){return S(this,L,!0)},g.prototype.rawListeners=function(L){return S(this,L,!1)},g.listenerCount=function(L,V){return"function"==typeof L.listenerCount?L.listenerCount(V):I.call(L,V)},g.prototype.listenerCount=I,g.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},27085:(q,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(50807);q.exports=function(f,T,g,b){if(d.isBuffer(f)||(f=d.from(f,"binary")),T&&(d.isBuffer(T)||(T=d.from(T,"binary")),8!==T.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var l=g/8,h=d.alloc(l),u=d.alloc(b||0),m=d.alloc(0);l>0||b>0;){var _=new x;_.update(m),_.update(f),T&&_.update(T),m=_.digest();var w=0;if(l>0){var S=h.length-l;w=Math.min(l,m.length),m.copy(h,S,0,w),l-=w}if(w0){var I=u.length-b,P=Math.min(b,m.length-w);m.copy(u,I,w,w+P),b-=P}}return m.fill(0),{key:h,iv:u}}},48184:(q,O,E)=>{"use strict";var d=E(41493),x=Object.prototype.toString,f=Object.prototype.hasOwnProperty;q.exports=function(T,g,b){if(!d(g))throw new TypeError("iterator must be a function");var l;arguments.length>=3&&(l=b),"[object Array]"===x.call(T)?function(h,u,m){for(var _=0,w=h.length;_{"use strict";var O=Array.prototype.slice,E=Object.prototype.toString;q.exports=function(d){var x=this;if("function"!=typeof x||"[object Function]"!==E.call(x))throw new TypeError("Function.prototype.bind called on incompatible "+x);for(var f,T=O.call(arguments,1),g=Math.max(0,x.length-T.length),b=[],l=0;l{"use strict";var d=E(83161);q.exports=Function.prototype.bind||d},57701:(q,O,E)=>{"use strict";var d,x=E(28847)(E(3355)),f=SyntaxError,T=Function,g=TypeError,b=function(v){try{return T('"use strict"; return ('+v+").constructor;")()}catch{}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch{l=null}var h=function(){throw new g},u=l?function(){try{return h}catch{try{return l(arguments,"callee").get}catch{return h}}}():h,m=E(58489)(),_=Object.getPrototypeOf||function(v){return v.__proto__},w={},S="undefined"==typeof Uint8Array?d:_(Uint8Array),I={"%AggregateError%":"undefined"==typeof AggregateError?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?d:ArrayBuffer,"%ArrayIteratorPrototype%":m?_([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":"undefined"==typeof Atomics?d:Atomics,"%BigInt%":"undefined"==typeof BigInt?d:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?d:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?d:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?d:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":w,"%Int8Array%":"undefined"==typeof Int8Array?d:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?d:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m?_(_([][Symbol.iterator]())):d,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":(0,x.default)(JSON))?JSON:d,"%Map%":"undefined"==typeof Map?d:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m?_((new Map)[Symbol.iterator]()):d,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?d:Promise,"%Proxy%":"undefined"==typeof Proxy?d:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?d:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?d:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m?_((new Set)[Symbol.iterator]()):d,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m?_(""[Symbol.iterator]()):d,"%Symbol%":m?Symbol:d,"%SyntaxError%":f,"%ThrowTypeError%":u,"%TypedArray%":S,"%TypeError%":g,"%Uint8Array%":"undefined"==typeof Uint8Array?d:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?d:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?d:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?d:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?d:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?d:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?d:WeakSet},P=function v(k){var D;if("%AsyncFunction%"===k)D=b("async function () {}");else if("%GeneratorFunction%"===k)D=b("function* () {}");else if("%AsyncGeneratorFunction%"===k)D=b("async function* () {}");else if("%AsyncGenerator%"===k){var N=v("%AsyncGeneratorFunction%");N&&(D=N.prototype)}else if("%AsyncIteratorPrototype%"===k){var C=v("%AsyncGenerator%");C&&(D=_(C.prototype))}return I[k]=D,D},L={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},V=E(3767),W=E(51888),G=V.call(Function.call,Array.prototype.concat),H=V.call(Function.apply,Array.prototype.splice),j=V.call(Function.call,String.prototype.replace),K=V.call(Function.call,String.prototype.slice),R=V.call(Function.call,RegExp.prototype.exec),o=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,y=/\\(\\)?/g,M=function(v,k){var D,N=v;if(W(L,N)&&(N="%"+(D=L[N])[0]+"%"),W(I,N)){var C=I[N];if(C===w&&(C=P(N)),void 0===C&&!k)throw new g("intrinsic "+v+" exists, but is not available. Please file an issue!");return{alias:D,name:N,value:C}}throw new f("intrinsic "+v+" does not exist!")};q.exports=function(v,k){if("string"!=typeof v||0===v.length)throw new g("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof k)throw new g('"allowMissing" argument must be a boolean');if(null===R(/^%?[^%]*%?$/,v))throw new f("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=function(X){var ne=K(X,0,1),pe=K(X,-1);if("%"===ne&&"%"!==pe)throw new f("invalid intrinsic syntax, expected closing `%`");if("%"===pe&&"%"!==ne)throw new f("invalid intrinsic syntax, expected opening `%`");var _e=[];return j(X,o,function(xe,Ce,ke,me){_e[_e.length]=ke?j(me,y,"$1"):Ce||xe}),_e}(v),N=D.length>0?D[0]:"",C=M("%"+N+"%",k),a=C.name,B=C.value,Q=!1,ee=C.alias;ee&&(N=ee[0],H(D,G([0,1],ee)));for(var ce=1,ue=!0;ce=D.length){var le=l(B,we);B=(ue=!!le)&&"get"in le&&!("originalValue"in le.get)?le.get:B[we]}else ue=W(B,we),B=B[we];ue&&!Q&&(I[a]=B)}}return B}},92948:(q,O,E)=>{"use strict";var d;d="undefined"!=typeof window?window:void 0!==E.g?E.g:"undefined"!=typeof self?self:{},q.exports=d},53820:(q,O,E)=>{"use strict";var d=E(57701)("%Object.getOwnPropertyDescriptor%",!0);if(d)try{d([],"length")}catch{d=null}q.exports=d},58489:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x="undefined"!=typeof Symbol&&Symbol,f=E(47027);q.exports=function(){return"function"==typeof x&&"function"==typeof Symbol&&"symbol"===(0,d.default)(x("foo"))&&"symbol"===(0,d.default)(Symbol("bar"))&&f()}},47027:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));q.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===(0,d.default)(Symbol.iterator))return!0;var x={},f=Symbol("test"),T=Object(f);if("string"==typeof f||"[object Symbol]"!==Object.prototype.toString.call(f)||"[object Symbol]"!==Object.prototype.toString.call(T))return!1;for(f in x[f]=42,x)return!1;if("function"==typeof Object.keys&&0!==Object.keys(x).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(x).length)return!1;var g=Object.getOwnPropertySymbols(x);if(1!==g.length||g[0]!==f||!Object.prototype.propertyIsEnumerable.call(x,f))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var b=Object.getOwnPropertyDescriptor(x,f);if(42!==b.value||!0!==b.enumerable)return!1}return!0}},11191:(q,O,E)=>{"use strict";var d=E(47027);q.exports=function(){return d()&&!!Symbol.toStringTag}},51888:(q,O,E)=>{"use strict";var d=E(3767);q.exports=d.call(Function.call,Object.prototype.hasOwnProperty)},22353:(q,O,E)=>{"use strict";var d=E(48850).Buffer,x=E(86505).Transform;function f(T){x.call(this),this._block=d.allocUnsafe(T),this._blockSize=T,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}E(41736)(f,x),f.prototype._transform=function(T,g,b){var l=null;try{this.update(T,g)}catch(h){l=h}b(l)},f.prototype._flush=function(T){var g=null;try{this.push(this.digest())}catch(b){g=b}T(g)},f.prototype.update=function(T,g){if(function(_,w){if(!d.isBuffer(_)&&"string"!=typeof _)throw new TypeError("Data must be a string or a buffer")}(T),this._finalized)throw new Error("Digest already called");d.isBuffer(T)||(T=d.from(T,g));for(var b=this._block,l=0;this._blockOffset+T.length-l>=this._blockSize;){for(var h=this._blockOffset;h0;++u)this._length[u]+=m,(m=this._length[u]/4294967296|0)>0&&(this._length[u]-=4294967296*m);return this},f.prototype._update=function(){throw new Error("_update is not implemented")},f.prototype.digest=function(T){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var g=this._digest();void 0!==T&&(g=g.toString(T)),this._block.fill(0),this._blockOffset=0;for(var b=0;b<4;++b)this._length[b]=0;return g},f.prototype._digest=function(){throw new Error("_digest is not implemented")},q.exports=f},37198:(q,O,E)=>{"use strict";var d=O;d.utils=E(84268),d.common=E(64696),d.sha=E(39310),d.ripemd=E(69294),d.hmac=E(53201),d.sha1=d.sha.sha1,d.sha256=d.sha.sha256,d.sha224=d.sha.sha224,d.sha384=d.sha.sha384,d.sha512=d.sha.sha512,d.ripemd160=d.ripemd.ripemd160},64696:(q,O,E)=>{"use strict";var d=E(84268),x=E(94504);function f(){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}O.BlockHash=f,f.prototype.update=function(T,g){if(T=d.toArray(T,g),this.pending=this.pending?this.pending.concat(T):T,this.pendingTotal+=T.length,this.pending.length>=this._delta8){var b=(T=this.pending).length%this._delta8;this.pending=T.slice(T.length-b,T.length),0===this.pending.length&&(this.pending=null),T=d.join32(T,0,T.length-b,this.endian);for(var l=0;l>>24&255,l[h++]=T>>>16&255,l[h++]=T>>>8&255,l[h++]=255&T}else for(l[h++]=255&T,l[h++]=T>>>8&255,l[h++]=T>>>16&255,l[h++]=T>>>24&255,l[h++]=0,l[h++]=0,l[h++]=0,l[h++]=0,u=8;u{"use strict";var d=E(84268),x=E(94504);function f(T,g,b){if(!(this instanceof f))return new f(T,g,b);this.Hash=T,this.blockSize=T.blockSize/8,this.outSize=T.outSize/8,this.inner=null,this.outer=null,this._init(d.toArray(g,b))}q.exports=f,f.prototype._init=function(T){T.length>this.blockSize&&(T=(new this.Hash).update(T).digest()),x(T.length<=this.blockSize);for(var g=T.length;g{"use strict";var d=E(84268),x=E(64696),f=d.rotl32,T=d.sum32,g=d.sum32_3,b=d.sum32_4,l=x.BlockHash;function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function u(L,V,W,G){return L<=15?V^W^G:L<=31?V&W|~V&G:L<=47?(V|~W)^G:L<=63?V&G|W&~G:V^(W|~G)}function m(L){return L<=15?0:L<=31?1518500249:L<=47?1859775393:L<=63?2400959708:2840853838}function _(L){return L<=15?1352829926:L<=31?1548603684:L<=47?1836072691:L<=63?2053994217:0}d.inherits(h,l),O.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(L,V){for(var W=this.h[0],G=this.h[1],H=this.h[2],j=this.h[3],K=this.h[4],R=W,o=G,y=H,M=j,v=K,k=0;k<80;k++){var D=T(f(b(W,u(k,G,H,j),L[w[k]+V],m(k)),I[k]),K);W=K,K=j,j=f(H,10),H=G,G=D,D=T(f(b(R,u(79-k,o,y,M),L[S[k]+V],_(k)),P[k]),v),R=v,v=M,M=f(y,10),y=o,o=D}D=g(this.h[1],H,M),this.h[1]=g(this.h[2],j,v),this.h[2]=g(this.h[3],K,R),this.h[3]=g(this.h[4],W,o),this.h[4]=g(this.h[0],G,y),this.h[0]=D},h.prototype._digest=function(L){return"hex"===L?d.toHex32(this.h,"little"):d.split32(this.h,"little")};var w=[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],S=[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],I=[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],P=[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]},39310:(q,O,E)=>{"use strict";O.sha1=E(38142),O.sha224=E(14909),O.sha256=E(87682),O.sha384=E(74532),O.sha512=E(36515)},38142:(q,O,E)=>{"use strict";var d=E(84268),x=E(64696),f=E(90070),T=d.rotl32,g=d.sum32,b=d.sum32_5,l=f.ft_1,h=x.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function m(){if(!(this instanceof m))return new m;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}d.inherits(m,h),q.exports=m,m.blockSize=512,m.outSize=160,m.hmacStrength=80,m.padLength=64,m.prototype._update=function(_,w){for(var S=this.W,I=0;I<16;I++)S[I]=_[w+I];for(;I{"use strict";var d=E(84268),x=E(87682);function f(){if(!(this instanceof f))return new f;x.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}d.inherits(f,x),q.exports=f,f.blockSize=512,f.outSize=224,f.hmacStrength=192,f.padLength=64,f.prototype._digest=function(T){return"hex"===T?d.toHex32(this.h.slice(0,7),"big"):d.split32(this.h.slice(0,7),"big")}},87682:(q,O,E)=>{"use strict";var d=E(84268),x=E(64696),f=E(90070),T=E(94504),g=d.sum32,b=d.sum32_4,l=d.sum32_5,h=f.ch32,u=f.maj32,m=f.s0_256,_=f.s1_256,w=f.g0_256,S=f.g1_256,I=x.BlockHash,P=[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 L(){if(!(this instanceof L))return new L;I.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=P,this.W=new Array(64)}d.inherits(L,I),q.exports=L,L.blockSize=512,L.outSize=256,L.hmacStrength=192,L.padLength=64,L.prototype._update=function(V,W){for(var G=this.W,H=0;H<16;H++)G[H]=V[W+H];for(;H{"use strict";var d=E(84268),x=E(36515);function f(){if(!(this instanceof f))return new f;x.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}d.inherits(f,x),q.exports=f,f.blockSize=1024,f.outSize=384,f.hmacStrength=192,f.padLength=128,f.prototype._digest=function(T){return"hex"===T?d.toHex32(this.h.slice(0,12),"big"):d.split32(this.h.slice(0,12),"big")}},36515:(q,O,E)=>{"use strict";var d=E(84268),x=E(64696),f=E(94504),T=d.rotr64_hi,g=d.rotr64_lo,b=d.shr64_hi,l=d.shr64_lo,h=d.sum64,u=d.sum64_hi,m=d.sum64_lo,_=d.sum64_4_hi,w=d.sum64_4_lo,S=d.sum64_5_hi,I=d.sum64_5_lo,P=x.BlockHash,L=[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;P.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=L,this.W=new Array(160)}function W(k,D,N,C,a){var B=k&N^~k&a;return B<0&&(B+=4294967296),B}function G(k,D,N,C,a,B){var Q=D&C^~D&B;return Q<0&&(Q+=4294967296),Q}function H(k,D,N,C,a){var B=k&N^k&a^N&a;return B<0&&(B+=4294967296),B}function j(k,D,N,C,a,B){var Q=D&C^D&B^C&B;return Q<0&&(Q+=4294967296),Q}function K(k,D){var N=T(k,D,28)^T(D,k,2)^T(D,k,7);return N<0&&(N+=4294967296),N}function R(k,D){var N=g(k,D,28)^g(D,k,2)^g(D,k,7);return N<0&&(N+=4294967296),N}function o(k,D){var N=g(k,D,14)^g(k,D,18)^g(D,k,9);return N<0&&(N+=4294967296),N}function y(k,D){var N=T(k,D,1)^T(k,D,8)^b(k,D,7);return N<0&&(N+=4294967296),N}function M(k,D){var N=g(k,D,1)^g(k,D,8)^l(k,D,7);return N<0&&(N+=4294967296),N}function v(k,D){var N=g(k,D,19)^g(D,k,29)^l(k,D,6);return N<0&&(N+=4294967296),N}d.inherits(V,P),q.exports=V,V.blockSize=1024,V.outSize=512,V.hmacStrength=192,V.padLength=128,V.prototype._prepareBlock=function(k,D){for(var N=this.W,C=0;C<32;C++)N[C]=k[D+C];for(;C{"use strict";var d=E(84268).rotr32;function x(g,b,l){return g&b^~g&l}function f(g,b,l){return g&b^g&l^b&l}function T(g,b,l){return g^b^l}O.ft_1=function(g,b,l,h){return 0===g?x(b,l,h):1===g||3===g?T(b,l,h):2===g?f(b,l,h):void 0},O.ch32=x,O.maj32=f,O.p32=T,O.s0_256=function(g){return d(g,2)^d(g,13)^d(g,22)},O.s1_256=function(g){return d(g,6)^d(g,11)^d(g,25)},O.g0_256=function(g){return d(g,7)^d(g,18)^g>>>3},O.g1_256=function(g){return d(g,17)^d(g,19)^g>>>10}},84268:(q,O,E)=>{"use strict";var d=E(94504),x=E(41736);function f(l,h){return 55296==(64512&l.charCodeAt(h))&&!(h<0||h+1>=l.length)&&56320==(64512&l.charCodeAt(h+1))}function T(l){return(l>>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24)>>>0}function g(l){return 1===l.length?"0"+l:l}function b(l){return 7===l.length?"0"+l:6===l.length?"00"+l:5===l.length?"000"+l:4===l.length?"0000"+l:3===l.length?"00000"+l:2===l.length?"000000"+l:1===l.length?"0000000"+l:l}O.inherits=x,O.toArray=function(l,h){if(Array.isArray(l))return l.slice();if(!l)return[];var u=[];if("string"==typeof l)if(h){if("hex"===h)for((l=l.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(l="0"+l),_=0;_>6|192,u[m++]=63&w|128):f(l,_)?(w=65536+((1023&w)<<10)+(1023&l.charCodeAt(++_)),u[m++]=w>>18|240,u[m++]=w>>12&63|128,u[m++]=w>>6&63|128,u[m++]=63&w|128):(u[m++]=w>>12|224,u[m++]=w>>6&63|128,u[m++]=63&w|128)}else for(_=0;_>>0;return w},O.split32=function(l,h){for(var u=new Array(4*l.length),m=0,_=0;m>>24,u[_+1]=w>>>16&255,u[_+2]=w>>>8&255,u[_+3]=255&w):(u[_+3]=w>>>24,u[_+2]=w>>>16&255,u[_+1]=w>>>8&255,u[_]=255&w)}return u},O.rotr32=function(l,h){return l>>>h|l<<32-h},O.rotl32=function(l,h){return l<>>32-h},O.sum32=function(l,h){return l+h>>>0},O.sum32_3=function(l,h,u){return l+h+u>>>0},O.sum32_4=function(l,h,u,m){return l+h+u+m>>>0},O.sum32_5=function(l,h,u,m,_){return l+h+u+m+_>>>0},O.sum64=function(l,h,u,m){var w=m+l[h+1]>>>0;l[h]=(w>>0,l[h+1]=w},O.sum64_hi=function(l,h,u,m){return(h+m>>>0>>0},O.sum64_lo=function(l,h,u,m){return h+m>>>0},O.sum64_4_hi=function(l,h,u,m,_,w,S,I){var P=0,L=h;return P+=(L=L+m>>>0)>>0)>>0)>>0},O.sum64_4_lo=function(l,h,u,m,_,w,S,I){return h+m+w+I>>>0},O.sum64_5_hi=function(l,h,u,m,_,w,S,I,P,L){var V=0,W=h;return V+=(W=W+m>>>0)>>0)>>0)>>0)>>0},O.sum64_5_lo=function(l,h,u,m,_,w,S,I,P,L){return h+m+w+I+L>>>0},O.rotr64_hi=function(l,h,u){return(h<<32-u|l>>>u)>>>0},O.rotr64_lo=function(l,h,u){return(l<<32-u|h>>>u)>>>0},O.shr64_hi=function(l,h,u){return l>>>u},O.shr64_lo=function(l,h,u){return(l<<32-u|h>>>u)>>>0}},29410:(q,O,E)=>{"use strict";var d=E(37198),x=E(96580),f=E(94504);function T(g){if(!(this instanceof T))return new T(g);this.hash=g.hash,this.predResist=!!g.predResist,this.outLen=this.hash.outSize,this.minEntropy=g.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var b=x.toArray(g.entropy,g.entropyEnc||"hex"),l=x.toArray(g.nonce,g.nonceEnc||"hex"),h=x.toArray(g.pers,g.persEnc||"hex");f(b.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(b,l,h)}q.exports=T,T.prototype._init=function(g,b,l){var h=g.concat(b).concat(l);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var u=0;u=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(g.concat(l||[])),this._reseed=1},T.prototype.generate=function(g,b,l,h){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof b&&(h=l,l=b,b=null),l&&(l=x.toArray(l,h||"hex"),this._update(l));for(var u=[];u.length{"use strict";var d=E(29519),x=E(51143),f=q.exports;for(var T in d)d.hasOwnProperty(T)&&(f[T]=d[T]);function g(b){if("string"==typeof b&&(b=x.parse(b)),b.protocol||(b.protocol="https:"),"https:"!==b.protocol)throw new Error('Protocol "'+b.protocol+'" not supported. Expected "https:"');return b}f.request=function(b,l){return b=g(b),d.request.call(this,b,l)},f.get=function(b,l){return b=g(b),d.get.call(this,b,l)}},32996:(q,O,E)=>{"use strict";var d;E(28847)(E(3355)),void 0===(d=function(){return x=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],f=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]),{mapStr:"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645\u062c\u0644 \u062c\u0644\u0627\u0644\u0647\u30ad\u30ed\u30e1\u30fc\u30c8\u30ebrad\u2215s2\u30a8\u30b9\u30af\u30fc\u30c9\u30ad\u30ed\u30b0\u30e9\u30e0\u30ad\u30ed\u30ef\u30c3\u30c8\u30b0\u30e9\u30e0\u30c8\u30f3\u30af\u30eb\u30bc\u30a4\u30ed\u30b5\u30f3\u30c1\u30fc\u30e0\u30d1\u30fc\u30bb\u30f3\u30c8\u30d4\u30a2\u30b9\u30c8\u30eb\u30d5\u30a1\u30e9\u30c3\u30c9\u30d6\u30c3\u30b7\u30a7\u30eb\u30d8\u30af\u30bf\u30fc\u30eb\u30de\u30f3\u30b7\u30e7\u30f3\u30df\u30ea\u30d0\u30fc\u30eb\u30ec\u30f3\u30c8\u30b2\u30f3\u2032\u2032\u2032\u20321\u204410viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)\u222b\u222b\u222b\u222b(\uc624\uc804)(\uc624\ud6c4)\u30a2\u30d1\u30fc\u30c8\u30a2\u30eb\u30d5\u30a1\u30a2\u30f3\u30da\u30a2\u30a4\u30cb\u30f3\u30b0\u30a8\u30fc\u30ab\u30fc\u30ab\u30e9\u30c3\u30c8\u30ab\u30ed\u30ea\u30fc\u30ad\u30e5\u30ea\u30fc\u30ae\u30eb\u30c0\u30fc\u30af\u30ed\u30fc\u30cd\u30b5\u30a4\u30af\u30eb\u30b7\u30ea\u30f3\u30b0\u30d0\u30fc\u30ec\u30eb\u30d5\u30a3\u30fc\u30c8\u30dd\u30a4\u30f3\u30c8\u30de\u30a4\u30af\u30ed\u30df\u30af\u30ed\u30f3\u30e1\u30ac\u30c8\u30f3\u30ea\u30c3\u30c8\u30eb\u30eb\u30fc\u30d6\u30eb\u682a\u5f0f\u4f1a\u793ekcalm\u2215s2c\u2215kg\u0627\u0643\u0628\u0631\u0645\u062d\u0645\u062f\u0635\u0644\u0639\u0645\u0631\u0633\u0648\u0644\u0631\u06cc\u0627\u06441\u204441\u204423\u20444 \u0308\u0301\u0fb2\u0f71\u0f80\u0fb3\u0f71\u0f80 \u0308\u0342 \u0313\u0300 \u0313\u0301 \u0313\u0342 \u0314\u0300 \u0314\u0301 \u0314\u0342 \u0308\u0300\u2035\u2035\u2035a/ca/sc/oc/utelfax1\u204471\u204491\u204432\u204431\u204452\u204453\u204454\u204451\u204465\u204461\u204483\u204485\u204487\u20448xii0\u20443\u222e\u222e\u222e(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)::====(\u1100)(\u1102)(\u1103)(\u1105)(\u1106)(\u1107)(\u1109)(\u110b)(\u110c)(\u110e)(\u110f)(\u1110)(\u1111)(\u1112)(\uac00)(\ub098)(\ub2e4)(\ub77c)(\ub9c8)(\ubc14)(\uc0ac)(\uc544)(\uc790)(\ucc28)(\uce74)(\ud0c0)(\ud30c)(\ud558)(\uc8fc)(\u4e00)(\u4e8c)(\u4e09)(\u56db)(\u4e94)(\u516d)(\u4e03)(\u516b)(\u4e5d)(\u5341)(\u6708)(\u706b)(\u6c34)(\u6728)(\u91d1)(\u571f)(\u65e5)(\u682a)(\u6709)(\u793e)(\u540d)(\u7279)(\u8ca1)(\u795d)(\u52b4)(\u4ee3)(\u547c)(\u5b66)(\u76e3)(\u4f01)(\u8cc7)(\u5354)(\u796d)(\u4f11)(\u81ea)(\u81f3)pte10\u670811\u670812\u6708ergltd\u30a2\u30fc\u30eb\u30a4\u30f3\u30c1\u30a6\u30a9\u30f3\u30aa\u30f3\u30b9\u30aa\u30fc\u30e0\u30ab\u30a4\u30ea\u30ac\u30ed\u30f3\u30ac\u30f3\u30de\u30ae\u30cb\u30fc\u30b1\u30fc\u30b9\u30b3\u30eb\u30ca\u30b3\u30fc\u30dd\u30bb\u30f3\u30c1\u30c0\u30fc\u30b9\u30ce\u30c3\u30c8\u30cf\u30a4\u30c4\u30d1\u30fc\u30c4\u30d4\u30af\u30eb\u30d5\u30e9\u30f3\u30da\u30cb\u30d2\u30d8\u30eb\u30c4\u30da\u30f3\u30b9\u30da\u30fc\u30b8\u30d9\u30fc\u30bf\u30dc\u30eb\u30c8\u30dd\u30f3\u30c9\u30db\u30fc\u30eb\u30db\u30fc\u30f3\u30de\u30a4\u30eb\u30de\u30c3\u30cf\u30de\u30eb\u30af\u30e4\u30fc\u30c9\u30e4\u30fc\u30eb\u30e6\u30a2\u30f3\u30eb\u30d4\u30fc10\u70b911\u70b912\u70b913\u70b914\u70b915\u70b916\u70b917\u70b918\u70b919\u70b920\u70b921\u70b922\u70b923\u70b924\u70b9hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv\u2215ma\u2215m10\u65e511\u65e512\u65e513\u65e514\u65e515\u65e516\u65e517\u65e518\u65e519\u65e520\u65e521\u65e522\u65e523\u65e524\u65e525\u65e526\u65e527\u65e528\u65e529\u65e530\u65e531\u65e5galffiffl\u05e9\u05bc\u05c1\u05e9\u05bc\u05c2 \u064c\u0651 \u064d\u0651 \u064e\u0651 \u064f\u0651 \u0650\u0651 \u0651\u0670\u0640\u064e\u0651\u0640\u064f\u0651\u0640\u0650\u0651\u062a\u062c\u0645\u062a\u062d\u062c\u062a\u062d\u0645\u062a\u062e\u0645\u062a\u0645\u062c\u062a\u0645\u062d\u062a\u0645\u062e\u062c\u0645\u062d\u062d\u0645\u064a\u062d\u0645\u0649\u0633\u062d\u062c\u0633\u062c\u062d\u0633\u062c\u0649\u0633\u0645\u062d\u0633\u0645\u062c\u0633\u0645\u0645\u0635\u062d\u062d\u0635\u0645\u0645\u0634\u062d\u0645\u0634\u062c\u064a\u0634\u0645\u062e\u0634\u0645\u0645\u0636\u062d\u0649\u0636\u062e\u0645\u0637\u0645\u062d\u0637\u0645\u0645\u0637\u0645\u064a\u0639\u062c\u0645\u0639\u0645\u0645\u0639\u0645\u0649\u063a\u0645\u0645\u063a\u0645\u064a\u063a\u0645\u0649\u0641\u062e\u0645\u0642\u0645\u062d\u0642\u0645\u0645\u0644\u062d\u0645\u0644\u062d\u064a\u0644\u062d\u0649\u0644\u062c\u062c\u0644\u062e\u0645\u0644\u0645\u062d\u0645\u062d\u062c\u0645\u062d\u064a\u0645\u062c\u062d\u0645\u062c\u0645\u0645\u062e\u0645\u0645\u062c\u062e\u0647\u0645\u062c\u0647\u0645\u0645\u0646\u062d\u0645\u0646\u062d\u0649\u0646\u062c\u0645\u0646\u062c\u0649\u0646\u0645\u064a\u0646\u0645\u0649\u064a\u0645\u0645\u0628\u062e\u064a\u062a\u062c\u064a\u062a\u062c\u0649\u062a\u062e\u064a\u062a\u062e\u0649\u062a\u0645\u064a\u062a\u0645\u0649\u062c\u0645\u064a\u062c\u062d\u0649\u062c\u0645\u0649\u0633\u062e\u0649\u0635\u062d\u064a\u0634\u062d\u064a\u0636\u062d\u064a\u0644\u062c\u064a\u0644\u0645\u064a\u064a\u062d\u064a\u064a\u062c\u064a\u064a\u0645\u064a\u0645\u0645\u064a\u0642\u0645\u064a\u0646\u062d\u064a\u0639\u0645\u064a\u0643\u0645\u064a\u0646\u062c\u062d\u0645\u062e\u064a\u0644\u062c\u0645\u0643\u0645\u0645\u062c\u062d\u064a\u062d\u062c\u064a\u0645\u062c\u064a\u0641\u0645\u064a\u0628\u062d\u064a\u0633\u062e\u064a\u0646\u062c\u064a\u0635\u0644\u06d2\u0642\u0644\u06d2\u{1d158}\u{1d165}\u{1d16e}\u{1d158}\u{1d165}\u{1d16f}\u{1d158}\u{1d165}\u{1d170}\u{1d158}\u{1d165}\u{1d171}\u{1d158}\u{1d165}\u{1d172}\u{1d1b9}\u{1d165}\u{1d16e}\u{1d1ba}\u{1d165}\u{1d16e}\u{1d1b9}\u{1d165}\u{1d16f}\u{1d1ba}\u{1d165}\u{1d16f}\u3014s\u3015ppv\u3014\u672c\u3015\u3014\u4e09\u3015\u3014\u4e8c\u3015\u3014\u5b89\u3015\u3014\u70b9\u3015\u3014\u6253\u3015\u3014\u76d7\u3015\u3014\u52dd\u3015\u3014\u6557\u3015 \u0304 \u0301 \u0327ssi\u0307ijl\xb7\u02bcnd\u017eljnjdz \u0306 \u0307 \u030a \u0328 \u0303 \u030b \u03b9\u0565\u0582\u0627\u0674\u0648\u0674\u06c7\u0674\u064a\u0674\u0915\u093c\u0916\u093c\u0917\u093c\u091c\u093c\u0921\u093c\u0922\u093c\u092b\u093c\u092f\u093c\u09a1\u09bc\u09a2\u09bc\u09af\u09bc\u0a32\u0a3c\u0a38\u0a3c\u0a16\u0a3c\u0a17\u0a3c\u0a1c\u0a3c\u0a2b\u0a3c\u0b21\u0b3c\u0b22\u0b3c\u0e4d\u0e32\u0ecd\u0eb2\u0eab\u0e99\u0eab\u0ea1\u0f42\u0fb7\u0f4c\u0fb7\u0f51\u0fb7\u0f56\u0fb7\u0f5b\u0fb7\u0f40\u0fb5\u0f71\u0f72\u0f71\u0f74\u0fb2\u0f80\u0fb3\u0f80\u0f92\u0fb7\u0f9c\u0fb7\u0fa1\u0fb7\u0fa6\u0fb7\u0fab\u0fb7\u0f90\u0fb5a\u02be\u1f00\u03b9\u1f01\u03b9\u1f02\u03b9\u1f03\u03b9\u1f04\u03b9\u1f05\u03b9\u1f06\u03b9\u1f07\u03b9\u1f20\u03b9\u1f21\u03b9\u1f22\u03b9\u1f23\u03b9\u1f24\u03b9\u1f25\u03b9\u1f26\u03b9\u1f27\u03b9\u1f60\u03b9\u1f61\u03b9\u1f62\u03b9\u1f63\u03b9\u1f64\u03b9\u1f65\u03b9\u1f66\u03b9\u1f67\u03b9\u1f70\u03b9\u03b1\u03b9\u03ac\u03b9\u1fb6\u03b9 \u0342\u1f74\u03b9\u03b7\u03b9\u03ae\u03b9\u1fc6\u03b9\u1f7c\u03b9\u03c9\u03b9\u03ce\u03b9\u1ff6\u03b9 \u0333!! \u0305???!!?rs\xb0c\xb0fnosmtmivix\u2add\u0338 \u3099 \u309a\u3088\u308a\u30b3\u30c8333435\ucc38\uace0\uc8fc\uc758363738394042444546474849503\u67084\u67085\u67086\u67087\u67088\u67089\u6708hgev\u30ae\u30ac\u30c7\u30b7\u30c9\u30eb\u30ca\u30ce\u30d4\u30b3\u30d3\u30eb\u30da\u30bd\u30db\u30f3\u30ea\u30e9\u30ec\u30e0daauovpciu\u5e73\u6210\u662d\u548c\u5927\u6b63\u660e\u6cbbna\u03bcakakbmbgbpfnf\u03bcf\u03bcgmg\u03bclmldlklfmnm\u03bcmpsns\u03bcsmsnv\u03bcvkvpwnw\u03bcwmwkwk\u03c9m\u03c9bqcccddbgyhainkkktlnlxphprsrsvwbst\u0574\u0576\u0574\u0565\u0574\u056b\u057e\u0576\u0574\u056d\u05d9\u05b4\u05f2\u05b7\u05e9\u05c1\u05e9\u05c2\u05d0\u05b7\u05d0\u05b8\u05d0\u05bc\u05d1\u05bc\u05d2\u05bc\u05d3\u05bc\u05d4\u05bc\u05d5\u05bc\u05d6\u05bc\u05d8\u05bc\u05d9\u05bc\u05da\u05bc\u05db\u05bc\u05dc\u05bc\u05de\u05bc\u05e0\u05bc\u05e1\u05bc\u05e3\u05bc\u05e4\u05bc\u05e6\u05bc\u05e7\u05bc\u05e8\u05bc\u05ea\u05bc\u05d5\u05b9\u05d1\u05bf\u05db\u05bf\u05e4\u05bf\u05d0\u05dc\u0626\u0627\u0626\u06d5\u0626\u0648\u0626\u06c7\u0626\u06c6\u0626\u06c8\u0626\u06d0\u0626\u0649\u0626\u062c\u0626\u062d\u0626\u0645\u0626\u064a\u0628\u062c\u0628\u0645\u0628\u0649\u0628\u064a\u062a\u0649\u062a\u064a\u062b\u062c\u062b\u0645\u062b\u0649\u062b\u064a\u062e\u062d\u0636\u062c\u0636\u0645\u0637\u062d\u0638\u0645\u063a\u062c\u0641\u062c\u0641\u062d\u0641\u0649\u0641\u064a\u0642\u062d\u0642\u0649\u0642\u064a\u0643\u0627\u0643\u062c\u0643\u062d\u0643\u062e\u0643\u0644\u0643\u0649\u0643\u064a\u0646\u062e\u0646\u0649\u0646\u064a\u0647\u062c\u0647\u0649\u0647\u064a\u064a\u0649\u0630\u0670\u0631\u0670\u0649\u0670\u0626\u0631\u0626\u0632\u0626\u0646\u0628\u0632\u0628\u0646\u062a\u0631\u062a\u0632\u062a\u0646\u062b\u0631\u062b\u0632\u062b\u0646\u0645\u0627\u0646\u0631\u0646\u0632\u0646\u0646\u064a\u0631\u064a\u0632\u0626\u062e\u0626\u0647\u0628\u0647\u062a\u0647\u0635\u062e\u0646\u0647\u0647\u0670\u062b\u0647\u0633\u0647\u0634\u0647\u0637\u0649\u0637\u064a\u0639\u0649\u0639\u064a\u063a\u0649\u063a\u064a\u0633\u0649\u0633\u064a\u0634\u0649\u0634\u064a\u0635\u0649\u0635\u064a\u0636\u0649\u0636\u064a\u0634\u062e\u0634\u0631\u0633\u0631\u0635\u0631\u0636\u0631\u0627\u064b \u064b\u0640\u064b\u0640\u0651 \u0652\u0640\u0652\u0644\u0622\u0644\u0623\u0644\u0625\u{1d157}\u{1d165}0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddj\u307b\u304b\u30b3\u30b3\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0135\u0137\u013a\u013c\u013e\u0142\u0144\u0146\u0148\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\xff\u017a\u017c\u0253\u0183\u0185\u0254\u0188\u0256\u0257\u018c\u01dd\u0259\u025b\u0192\u0260\u0263\u0269\u0268\u0199\u026f\u0272\u0275\u01a1\u01a3\u01a5\u0280\u01a8\u0283\u01ad\u0288\u01b0\u028a\u028b\u01b4\u01b6\u0292\u01b9\u01bd\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f5\u0195\u01bf\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u019e\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233\u2c65\u023c\u019a\u2c66\u0242\u0180\u0289\u028c\u0247\u0249\u024b\u024d\u024f\u0266\u0279\u027b\u0281\u0295\u0371\u0373\u02b9\u0377;\u03f3\u03ad\u03af\u03cc\u03cd\u03b2\u03b3\u03b4\u03b5\u03b6\u03b8\u03ba\u03bb\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03ca\u03cb\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef\u03f8\u03fb\u037b\u037c\u037d\u0450\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\u045d\u045e\u045f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561\u0562\u0563\u0564\u0566\u0567\u0568\u0569\u056a\u056c\u056e\u056f\u0570\u0571\u0572\u0573\u0575\u0577\u0578\u0579\u057a\u057b\u057c\u057d\u057f\u0580\u0581\u0583\u0584\u0585\u0586\u0f0b\u2d27\u2d2d\u10dc\u13f0\u13f1\u13f2\u13f3\u13f4\u13f5\ua64b\u0250\u0251\u1d02\u025c\u1d16\u1d17\u1d1d\u1d25\u0252\u0255\u025f\u0261\u0265\u026a\u1d7b\u029d\u026d\u1d85\u029f\u0271\u0270\u0273\u0274\u0278\u0282\u01ab\u1d1c\u0290\u0291\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff\u1f10\u1f11\u1f12\u1f13\u1f14\u1f15\u1f30\u1f31\u1f32\u1f33\u1f34\u1f35\u1f36\u1f37\u1f40\u1f41\u1f42\u1f43\u1f44\u1f45\u1f51\u1f53\u1f55\u1f57\u1fb0\u1fb1\u1f72\u0390\u1fd0\u1fd1\u1f76\u03b0\u1fe0\u1fe1\u1f7a\u1fe5`\u1f78\u2010+\u2212\u2211\u3008\u3009\u2c30\u2c31\u2c32\u2c33\u2c34\u2c35\u2c36\u2c37\u2c38\u2c39\u2c3a\u2c3b\u2c3c\u2c3d\u2c3e\u2c3f\u2c40\u2c41\u2c42\u2c43\u2c44\u2c45\u2c46\u2c47\u2c48\u2c49\u2c4a\u2c4b\u2c4c\u2c4d\u2c4e\u2c4f\u2c50\u2c51\u2c52\u2c53\u2c54\u2c55\u2c56\u2c57\u2c58\u2c59\u2c5a\u2c5b\u2c5c\u2c5d\u2c5e\u2c61\u026b\u1d7d\u027d\u2c68\u2c6a\u2c6c\u2c73\u2c76\u023f\u0240\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2cec\u2cee\u2cf3\u2d61\u6bcd\u9f9f\u4e28\u4e36\u4e3f\u4e59\u4e85\u4ea0\u4eba\u513f\u5165\u5182\u5196\u51ab\u51e0\u51f5\u5200\u529b\u52f9\u5315\u531a\u5338\u535c\u5369\u5382\u53b6\u53c8\u53e3\u56d7\u58eb\u5902\u590a\u5915\u5973\u5b50\u5b80\u5bf8\u5c0f\u5c22\u5c38\u5c6e\u5c71\u5ddb\u5de5\u5df1\u5dfe\u5e72\u5e7a\u5e7f\u5ef4\u5efe\u5f0b\u5f13\u5f50\u5f61\u5f73\u5fc3\u6208\u6236\u624b\u652f\u6534\u6587\u6597\u65a4\u65b9\u65e0\u66f0\u6b20\u6b62\u6b79\u6bb3\u6bcb\u6bd4\u6bdb\u6c0f\u6c14\u722a\u7236\u723b\u723f\u7247\u7259\u725b\u72ac\u7384\u7389\u74dc\u74e6\u7518\u751f\u7528\u7530\u758b\u7592\u7676\u767d\u76ae\u76bf\u76ee\u77db\u77e2\u77f3\u793a\u79b8\u79be\u7a74\u7acb\u7af9\u7c73\u7cf8\u7f36\u7f51\u7f8a\u7fbd\u8001\u800c\u8012\u8033\u807f\u8089\u81e3\u81fc\u820c\u821b\u821f\u826e\u8272\u8278\u864d\u866b\u8840\u884c\u8863\u897e\u898b\u89d2\u8a00\u8c37\u8c46\u8c55\u8c78\u8c9d\u8d64\u8d70\u8db3\u8eab\u8eca\u8f9b\u8fb0\u8fb5\u9091\u9149\u91c6\u91cc\u9577\u9580\u961c\u96b6\u96b9\u96e8\u9751\u975e\u9762\u9769\u97cb\u97ed\u97f3\u9801\u98a8\u98db\u98df\u9996\u9999\u99ac\u9aa8\u9ad8\u9adf\u9b25\u9b2f\u9b32\u9b3c\u9b5a\u9ce5\u9e75\u9e7f\u9ea5\u9ebb\u9ec3\u9ecd\u9ed1\u9ef9\u9efd\u9f0e\u9f13\u9f20\u9f3b\u9f4a\u9f52\u9f8d\u9f9c\u9fa0.\u3012\u5344\u5345\u1101\u11aa\u11ac\u11ad\u1104\u11b0\u11b1\u11b2\u11b3\u11b4\u11b5\u111a\u1108\u1121\u110a\u110d\u1161\u1162\u1163\u1164\u1165\u1166\u1167\u1168\u1169\u116a\u116b\u116c\u116d\u116e\u116f\u1170\u1171\u1172\u1173\u1174\u1175\u1114\u1115\u11c7\u11c8\u11cc\u11ce\u11d3\u11d7\u11d9\u111c\u11dd\u11df\u111d\u111e\u1120\u1122\u1123\u1127\u1129\u112b\u112c\u112d\u112e\u112f\u1132\u1136\u1140\u1147\u114c\u11f1\u11f2\u1157\u1158\u1159\u1184\u1185\u1188\u1191\u1192\u1194\u119e\u11a1\u4e0a\u4e2d\u4e0b\u7532\u4e19\u4e01\u5929\u5730\u554f\u5e7c\u7b8f\uc6b0\u79d8\u7537\u9069\u512a\u5370\u6ce8\u9805\u5199\u5de6\u53f3\u533b\u5b97\u591c\u30c6\u30cc\u30e2\u30e8\u30f0\u30f1\u30f2\ua641\ua643\ua645\ua647\ua649\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua77a\ua77c\u1d79\ua77f\ua781\ua783\ua785\ua787\ua78c\ua791\ua793\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\u026c\u029e\u0287\uab53\ua7b5\ua7b7\uab37\uab52\u13a0\u13a1\u13a2\u13a3\u13a4\u13a5\u13a6\u13a7\u13a8\u13a9\u13aa\u13ab\u13ac\u13ad\u13ae\u13af\u13b0\u13b1\u13b2\u13b3\u13b4\u13b5\u13b6\u13b7\u13b8\u13b9\u13ba\u13bb\u13bc\u13bd\u13be\u13bf\u13c0\u13c1\u13c2\u13c3\u13c4\u13c5\u13c6\u13c7\u13c8\u13c9\u13ca\u13cb\u13cc\u13cd\u13ce\u13cf\u13d0\u13d1\u13d2\u13d3\u13d4\u13d5\u13d6\u13d7\u13d8\u13d9\u13da\u13db\u13dc\u13dd\u13de\u13df\u13e0\u13e1\u13e2\u13e3\u13e4\u13e5\u13e6\u13e7\u13e8\u13e9\u13ea\u13eb\u13ec\u13ed\u13ee\u13ef\u8c48\u66f4\u8cc8\u6ed1\u4e32\u53e5\u5951\u5587\u5948\u61f6\u7669\u7f85\u863f\u87ba\u88f8\u908f\u6a02\u6d1b\u70d9\u73de\u843d\u916a\u99f1\u4e82\u5375\u6b04\u721b\u862d\u9e1e\u5d50\u6feb\u85cd\u8964\u62c9\u81d8\u881f\u5eca\u6717\u6d6a\u72fc\u90ce\u4f86\u51b7\u52de\u64c4\u6ad3\u7210\u76e7\u8606\u865c\u8def\u9732\u9b6f\u9dfa\u788c\u797f\u7da0\u83c9\u9304\u8ad6\u58df\u5f04\u7c60\u807e\u7262\u78ca\u8cc2\u96f7\u58d8\u5c62\u6a13\u6dda\u6f0f\u7d2f\u7e37\u964b\u52d2\u808b\u51dc\u51cc\u7a1c\u7dbe\u83f1\u9675\u8b80\u62cf\u8afe\u4e39\u5be7\u6012\u7387\u7570\u5317\u78fb\u4fbf\u5fa9\u4e0d\u6ccc\u6578\u7d22\u53c3\u585e\u7701\u8449\u8aaa\u6bba\u6c88\u62fe\u82e5\u63a0\u7565\u4eae\u5169\u51c9\u6881\u7ce7\u826f\u8ad2\u91cf\u52f5\u5442\u5eec\u65c5\u6ffe\u792a\u95ad\u9a6a\u9e97\u9ece\u66c6\u6b77\u8f62\u5e74\u6190\u6200\u649a\u6f23\u7149\u7489\u79ca\u7df4\u806f\u8f26\u84ee\u9023\u934a\u5217\u52a3\u54bd\u70c8\u88c2\u5ec9\u5ff5\u637b\u6bae\u7c3e\u7375\u4ee4\u56f9\u5dba\u601c\u73b2\u7469\u7f9a\u8046\u9234\u96f6\u9748\u9818\u4f8b\u79ae\u91b4\u96b8\u60e1\u4e86\u50da\u5bee\u5c3f\u6599\u71ce\u7642\u84fc\u907c\u6688\u962e\u5289\u677b\u67f3\u6d41\u6e9c\u7409\u7559\u786b\u7d10\u985e\u622e\u9678\u502b\u5d19\u6dea\u8f2a\u5f8b\u6144\u6817\u9686\u5229\u540f\u5c65\u6613\u674e\u68a8\u6ce5\u7406\u75e2\u7f79\u88cf\u88e1\u96e2\u533f\u6eba\u541d\u71d0\u7498\u85fa\u96a3\u9c57\u9e9f\u6797\u6dcb\u81e8\u7b20\u7c92\u72c0\u7099\u8b58\u4ec0\u8336\u523a\u5207\u5ea6\u62d3\u7cd6\u5b85\u6d1e\u66b4\u8f3b\u964d\u5ed3\u5140\u55c0\u585a\u6674\u51de\u732a\u76ca\u793c\u795e\u7965\u798f\u9756\u7cbe\u8612\u8af8\u9038\u90fd\u98ef\u98fc\u9928\u9db4\u90de\u96b7\u4fae\u50e7\u514d\u52c9\u52e4\u5351\u559d\u5606\u5668\u5840\u58a8\u5c64\u6094\u6168\u618e\u61f2\u654f\u65e2\u6691\u6885\u6d77\u6e1a\u6f22\u716e\u722b\u7422\u7891\u7949\u7948\u7950\u7956\u798d\u798e\u7a40\u7a81\u7bc0\u7e09\u7e41\u7f72\u8005\u81ed\u8279\u8457\u8910\u8996\u8b01\u8b39\u8cd3\u8d08\u8fb6\u96e3\u97ff\u983b\u6075\u{242ee}\u8218\u4e26\u51b5\u5168\u4f80\u5145\u5180\u52c7\u52fa\u5555\u5599\u55e2\u58b3\u5944\u5954\u5a62\u5b28\u5ed2\u5ed9\u5f69\u5fad\u60d8\u614e\u6108\u6160\u6234\u63c4\u641c\u6452\u6556\u671b\u6756\u6edb\u6ecb\u701e\u77a7\u7235\u72af\u7471\u7506\u753b\u761d\u761f\u76db\u76f4\u774a\u7740\u78cc\u7ab1\u7c7b\u7d5b\u7f3e\u8352\u83ef\u8779\u8941\u8986\u8abf\u8acb\u8aed\u8b8a\u8f38\u9072\u9199\u9276\u967c\u97db\u980b\u9b12\u{2284a}\u{22844}\u{233d5}\u3b9d\u4018\u4039\u{25249}\u{25cd0}\u{27ed3}\u9f43\u9f8e\u05e2\u05dd\u0671\u067b\u067e\u0680\u067a\u067f\u0679\u06a4\u06a6\u0684\u0683\u0686\u0687\u068d\u068c\u068e\u0688\u0698\u0691\u06a9\u06af\u06b3\u06b1\u06ba\u06bb\u06c0\u06c1\u06be\u06d3\u06ad\u06cb\u06c5\u06c9\u3001\u3016\u3017\u2014\u2013_{}\u3010\u3011\u300a\u300b\u300c\u300d\u300e\u300f[]#&*-<>\\$%@\u0621\u0624\u0629\"'^|~\u2985\u2986\u30fb\u30a5\u30e3\xa2\xa3\xac\xa6\xa5\u20a9\u2502\u2190\u2191\u2192\u2193\u25a0\u25cb\u{10428}\u{10429}\u{1042a}\u{1042b}\u{1042c}\u{1042d}\u{1042e}\u{1042f}\u{10430}\u{10431}\u{10432}\u{10433}\u{10434}\u{10435}\u{10436}\u{10437}\u{10438}\u{10439}\u{1043a}\u{1043b}\u{1043c}\u{1043d}\u{1043e}\u{1043f}\u{10440}\u{10441}\u{10442}\u{10443}\u{10444}\u{10445}\u{10446}\u{10447}\u{10448}\u{10449}\u{1044a}\u{1044b}\u{1044c}\u{1044d}\u{1044e}\u{1044f}\u{104d8}\u{104d9}\u{104da}\u{104db}\u{104dc}\u{104dd}\u{104de}\u{104df}\u{104e0}\u{104e1}\u{104e2}\u{104e3}\u{104e4}\u{104e5}\u{104e6}\u{104e7}\u{104e8}\u{104e9}\u{104ea}\u{104eb}\u{104ec}\u{104ed}\u{104ee}\u{104ef}\u{104f0}\u{104f1}\u{104f2}\u{104f3}\u{104f4}\u{104f5}\u{104f6}\u{104f7}\u{104f8}\u{104f9}\u{104fa}\u{104fb}\u{10cc0}\u{10cc1}\u{10cc2}\u{10cc3}\u{10cc4}\u{10cc5}\u{10cc6}\u{10cc7}\u{10cc8}\u{10cc9}\u{10cca}\u{10ccb}\u{10ccc}\u{10ccd}\u{10cce}\u{10ccf}\u{10cd0}\u{10cd1}\u{10cd2}\u{10cd3}\u{10cd4}\u{10cd5}\u{10cd6}\u{10cd7}\u{10cd8}\u{10cd9}\u{10cda}\u{10cdb}\u{10cdc}\u{10cdd}\u{10cde}\u{10cdf}\u{10ce0}\u{10ce1}\u{10ce2}\u{10ce3}\u{10ce4}\u{10ce5}\u{10ce6}\u{10ce7}\u{10ce8}\u{10ce9}\u{10cea}\u{10ceb}\u{10cec}\u{10ced}\u{10cee}\u{10cef}\u{10cf0}\u{10cf1}\u{10cf2}\u{118c0}\u{118c1}\u{118c2}\u{118c3}\u{118c4}\u{118c5}\u{118c6}\u{118c7}\u{118c8}\u{118c9}\u{118ca}\u{118cb}\u{118cc}\u{118cd}\u{118ce}\u{118cf}\u{118d0}\u{118d1}\u{118d2}\u{118d3}\u{118d4}\u{118d5}\u{118d6}\u{118d7}\u{118d8}\u{118d9}\u{118da}\u{118db}\u{118dc}\u{118dd}\u{118de}\u{118df}\u0131\u0237\u2207\u2202\u{1e922}\u{1e923}\u{1e924}\u{1e925}\u{1e926}\u{1e927}\u{1e928}\u{1e929}\u{1e92a}\u{1e92b}\u{1e92c}\u{1e92d}\u{1e92e}\u{1e92f}\u{1e930}\u{1e931}\u{1e932}\u{1e933}\u{1e934}\u{1e935}\u{1e936}\u{1e937}\u{1e938}\u{1e939}\u{1e93a}\u{1e93b}\u{1e93c}\u{1e93d}\u{1e93e}\u{1e93f}\u{1e940}\u{1e941}\u{1e942}\u{1e943}\u066e\u06a1\u066f\u5b57\u53cc\u591a\u89e3\u4ea4\u6620\u7121\u524d\u5f8c\u518d\u65b0\u521d\u7d42\u8ca9\u58f0\u5439\u6f14\u6295\u6355\u904a\u6307\u7981\u7a7a\u5408\u6e80\u7533\u5272\u55b6\u914d\u5f97\u53ef\u4e3d\u4e38\u4e41\u{20122}\u4f60\u4fbb\u5002\u507a\u5099\u50cf\u349e\u{2063a}\u5154\u5164\u5177\u{2051c}\u34b9\u5167\u{2054b}\u5197\u51a4\u4ecc\u51ac\u{291df}\u5203\u34df\u523b\u5246\u5277\u3515\u5305\u5306\u5349\u535a\u5373\u537d\u537f\u{20a2c}\u7070\u53ca\u53df\u{20b63}\u53eb\u53f1\u5406\u549e\u5438\u5448\u5468\u54a2\u54f6\u5510\u5553\u5563\u5584\u55ab\u55b3\u55c2\u5716\u5717\u5651\u5674\u58ee\u57ce\u57f4\u580d\u578b\u5832\u5831\u58ac\u{214e4}\u58f2\u58f7\u5906\u5922\u5962\u{216a8}\u{216ea}\u59ec\u5a1b\u5a27\u59d8\u5a66\u36ee\u5b08\u5b3e\u{219c8}\u5bc3\u5bd8\u5bf3\u{21b18}\u5bff\u5c06\u3781\u5c60\u5cc0\u5c8d\u{21de4}\u5d43\u{21de6}\u5d6e\u5d6b\u5d7c\u5de1\u5de2\u382f\u5dfd\u5e28\u5e3d\u5e69\u3862\u{22183}\u387c\u5eb0\u5eb3\u5eb6\u{2a392}\u{22331}\u8201\u5f22\u38c7\u{232b8}\u{261da}\u5f62\u5f6b\u38e3\u5f9a\u5fcd\u5fd7\u5ff9\u6081\u393a\u391c\u{226d4}\u60c7\u6148\u614c\u617a\u61b2\u61a4\u61af\u61de\u621b\u625d\u62b1\u62d4\u6350\u{22b0c}\u633d\u62fc\u6368\u6383\u63e4\u{22bf1}\u6422\u63c5\u63a9\u3a2e\u6469\u647e\u649d\u6477\u3a6c\u656c\u{2300a}\u65e3\u66f8\u6649\u3b19\u3b08\u3ae4\u5192\u5195\u6700\u669c\u80ad\u43d9\u6721\u675e\u6753\u{233c3}\u3b49\u67fa\u6785\u6852\u{2346d}\u688e\u681f\u6914\u6942\u69a3\u69ea\u6aa8\u{236a3}\u6adb\u3c18\u6b21\u{238a7}\u6b54\u3c4e\u6b72\u6b9f\u6bbb\u{23a8d}\u{21d0b}\u{23afa}\u6c4e\u{23cbc}\u6cbf\u6ccd\u6c67\u6d16\u6d3e\u6d69\u6d78\u6d85\u{23d1e}\u6d34\u6e2f\u6e6e\u3d33\u6ec7\u{23ed1}\u6df9\u6f6e\u{23f5e}\u{23f8e}\u6fc6\u7039\u701b\u3d96\u704a\u707d\u7077\u70ad\u{20525}\u7145\u{24263}\u719c\u7228\u7250\u{24608}\u7280\u7295\u{24735}\u{24814}\u737a\u738b\u3eac\u73a5\u3eb8\u7447\u745c\u7485\u74ca\u3f1b\u7524\u{24c36}\u753e\u{24c92}\u{2219f}\u7610\u{24fa1}\u{24fb8}\u{25044}\u3ffc\u4008\u{250f3}\u{250f2}\u{25119}\u{25133}\u771e\u771f\u778b\u4046\u4096\u{2541d}\u784e\u40e3\u{25626}\u{2569a}\u{256c5}\u79eb\u412f\u7a4a\u7a4f\u{2597c}\u{25aa7}\u4202\u{25bab}\u7bc6\u7bc9\u4227\u{25c80}\u7cd2\u42a0\u7ce8\u7ce3\u7d00\u{25f86}\u7d63\u4301\u7dc7\u7e02\u7e45\u4334\u{26228}\u{26247}\u4359\u{262d9}\u7f7a\u{2633e}\u7f95\u7ffa\u{264da}\u{26523}\u8060\u{265a8}\u8070\u{2335f}\u43d5\u80b2\u8103\u440b\u813e\u5ab5\u{267a7}\u{267b5}\u{23393}\u{2339c}\u8204\u8f9e\u446b\u8291\u828b\u829d\u52b3\u82b1\u82b3\u82bd\u82e6\u{26b3c}\u831d\u8363\u83ad\u8323\u83bd\u83e7\u8353\u83ca\u83cc\u83dc\u{26c36}\u{26d6b}\u{26cd5}\u452b\u84f1\u84f3\u8516\u{273ca}\u8564\u{26f2c}\u455d\u4561\u{26fb1}\u{270d2}\u456b\u8650\u8667\u8669\u86a9\u8688\u870e\u86e2\u8728\u876b\u8786\u87e1\u8801\u45f9\u8860\u{27667}\u88d7\u88de\u4635\u88fa\u34bb\u{278ae}\u{27966}\u46be\u46c7\u8aa0\u{27ca8}\u8cab\u8cc1\u8d1b\u8d77\u{27f2f}\u{20804}\u8dcb\u8dbc\u8df0\u{208de}\u8ed4\u{285d2}\u{285ed}\u9094\u90f1\u9111\u{2872e}\u911b\u9238\u92d7\u92d8\u927c\u93f9\u9415\u{28bfa}\u958b\u4995\u95b7\u{28d77}\u49e6\u96c3\u5db2\u9723\u{29145}\u{2921a}\u4a6e\u4a76\u97e0\u{2940a}\u4ab2\u{29496}\u9829\u{295b6}\u98e2\u4b33\u9929\u99a7\u99c2\u99fe\u4bce\u{29b30}\u9c40\u9cfd\u4cce\u4ced\u9d67\u{2a0ce}\u4cf8\u{2a105}\u{2a20e}\u{2a291}\u4d56\u9efe\u9f05\u9f0f\u9f16\u{2a600}",mapChar:function(T){return T>=196608?T>=917760&&T<=917999?18874368:0:x[f[T>>4]][15&T]}};var x,f}.apply(O,[]))||(q.exports=d)},94489:(q,O,E)=>{"use strict";var d=E(28847)(E(93106));function x(H,j){var K="undefined"!=typeof Symbol&&H[Symbol.iterator]||H["@@iterator"];if(!K){if(Array.isArray(H)||(K=function(k,D){if(k){if("string"==typeof k)return f(k,D);var N=Object.prototype.toString.call(k).slice(8,-1);return"Object"===N&&k.constructor&&(N=k.constructor.name),"Map"===N||"Set"===N?Array.from(k):"Arguments"===N||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)?f(k,D):void 0}}(H))||j&&H&&"number"==typeof H.length){K&&(H=K);var R=0,o=function(){};return{s:o,n:function(){return R>=H.length?{done:!0}:{done:!1,value:H[R++]}},e:function(k){throw k},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y,M=!0,v=!1;return{s:function(){K=K.call(H)},n:function(){var k=K.next();return M=k.done,k},e:function(k){v=!0,y=k},f:function(){try{M||null==K.return||K.return()}finally{if(v)throw y}}}}function f(H,j){(null==j||j>H.length)&&(j=H.length);for(var K=0,R=new Array(j);K= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,_=String.fromCharCode;function w(H){throw new RangeError(u[H])}function S(H,j){var K=H.split("@"),R="";return K.length>1&&(R=K[0]+"@",H=K[1]),R+function(y,M){for(var v=[],k=y.length;k--;)v[k]=M(y[k]);return v}((H=H.replace(h,".")).split("."),j).join(".")}function I(H){for(var j=[],K=0,R=H.length;K=55296&&o<=56319&&K>1,H+=m(H/j);H>455;R+=g)H=m(H/35);return m(R+36*H/(H+38))},V=function(H){var j,K=[],R=H.length,o=0,y=128,M=72,v=H.lastIndexOf("-");v<0&&(v=0);for(var k=0;k=128&&w("not-basic"),K.push(H.charCodeAt(k));for(var D=v>0?v+1:0;D=R&&w("invalid-input");var B=(j=H.charCodeAt(D++))-48<10?j-22:j-65<26?j-65:j-97<26?j-97:g;(B>=g||B>m((T-o)/C))&&w("overflow"),o+=B*C;var Q=a<=M?1:a>=M+26?26:a-M;if(Bm(T/ee)&&w("overflow"),C*=ee}var ce=K.length+1;M=L(o-N,ce,0==N),m(o/ce)>T-y&&w("overflow"),y+=m(o/ce),o%=ce,K.splice(o++,0,y)}return String.fromCodePoint.apply(String,K)},W=function(H){var j,K=[],R=(H=I(H)).length,o=128,y=0,M=72,v=x(H);try{for(v.s();!(j=v.n()).done;){var k=j.value;k<128&&K.push(_(k))}}catch(pe){v.e(pe)}finally{v.f()}var D=K.length,N=D;for(D&&K.push("-");N=o&&Qm((T-y)/ee)&&w("overflow"),y+=(a-o)*ee,o=a;var ce,ue=x(H);try{for(ue.s();!(ce=ue.n()).done;){var we=ce.value;if(weT&&w("overflow"),we==o){for(var ae=y,Te=g;;Te+=g){var le=Te<=M?1:Te>=M+26?26:Te-M;if(ae{"use strict";var d,x;E(28847)(E(3355)),d=[E(94489),E(32996)],void 0===(x=function(f,T){return function(g,b){function l(m,_,w){for(var S=[],I=g.ucs2.decode(m),P=0;P>23,H=W>>21&3,R=b.mapStr.substr(W>>5&65535,31&W);if(0===H||_&&1&G)throw new Error("Illegal char "+V);1===H?S.push(R):2===H?S.push(w?R:V):3===H&&S.push(V)}return S.join("").normalize("NFC")}function h(m,_,w){void 0===w&&(w=!1);var S=l(m,w,_).split(".");return(S=S.map(function(I){return I.startsWith("xn--")?u(I=g.decode(I.substring(4)),w,!1):u(I,w,_),I})).join(".")}function u(m,_,w){if("-"===m[2]&&"-"===m[3])throw new Error("Failed to validate "+m);if(m.startsWith("-")||m.endsWith("-"))throw new Error("Failed to validate "+m);if(m.includes("."))throw new Error("Failed to validate "+m);if(l(m,_,w)!==m)throw new Error("Failed to validate "+m);var S=m.codePointAt(0);if(b.mapChar(S)&2<<23)throw new Error("Label contains illegal character: "+S)}return{toUnicode:function(m,_){return void 0===_&&(_={}),h(m,!1,"useStd3ASCII"in _&&_.useStd3ASCII)},toAscii:function(m,_){void 0===_&&(_={});var w,P="verifyDnsLength"in _&&_.verifyDnsLength,L=h(m,!("transitional"in _)||_.transitional,"useStd3ASCII"in _&&_.useStd3ASCII).split(".").map(g.toASCII),V=L.join(".");if(P){if(V.length<1||V.length>253)throw new Error("DNS name has wrong length: "+V);for(w=0;w63)throw new Error("DNS label has wrong length: "+W)}}return V}}}(f,T)}.apply(O,d))||(q.exports=x)},83226:(q,O)=>{"use strict";O.read=function(E,d,x,f,T){var g,b,l=8*T-f-1,h=(1<>1,m=-7,_=x?T-1:0,w=x?-1:1,S=E[d+_];for(_+=w,g=S&(1<<-m)-1,S>>=-m,m+=l;m>0;g=256*g+E[d+_],_+=w,m-=8);for(b=g&(1<<-m)-1,g>>=-m,m+=f;m>0;b=256*b+E[d+_],_+=w,m-=8);if(0===g)g=1-u;else{if(g===h)return b?NaN:1/0*(S?-1:1);b+=Math.pow(2,f),g-=u}return(S?-1:1)*b*Math.pow(2,g-f)},O.write=function(E,d,x,f,T,g){var b,l,h,u=8*g-T-1,m=(1<>1,w=23===T?Math.pow(2,-24)-Math.pow(2,-77):0,S=f?0:g-1,I=f?1:-1,P=d<0||0===d&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(l=isNaN(d)?1:0,b=m):(b=Math.floor(Math.log(d)/Math.LN2),d*(h=Math.pow(2,-b))<1&&(b--,h*=2),(d+=b+_>=1?w/h:w*Math.pow(2,1-_))*h>=2&&(b++,h/=2),b+_>=m?(l=0,b=m):b+_>=1?(l=(d*h-1)*Math.pow(2,T),b+=_):(l=d*Math.pow(2,_-1)*Math.pow(2,T),b=0));T>=8;E[x+S]=255&l,S+=I,l/=256,T-=8);for(b=b<0;E[x+S]=255&b,S+=I,b/=256,u-=8);E[x+S-I]|=128*P}},41736:q=>{"use strict";q.exports="function"==typeof Object.create?function(O,E){E&&(O.super_=E,O.prototype=Object.create(E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}))}:function(O,E){if(E){O.super_=E;var d=function(){};d.prototype=E.prototype,O.prototype=new d,O.prototype.constructor=O}}},69446:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(11191)(),f=E(80593)("Object.prototype.toString"),T=function(l){return!(x&&l&&"object"===(0,d.default)(l)&&Symbol.toStringTag in l)&&"[object Arguments]"===f(l)},g=function(l){return!!T(l)||null!==l&&"object"===(0,d.default)(l)&&"number"==typeof l.length&&l.length>=0&&"[object Array]"!==f(l)&&"[object Function]"===f(l.callee)},b=function(){return T(arguments)}();T.isLegacyArguments=g,q.exports=b?T:g},41493:(q,O,E)=>{"use strict";var d,x,f=E(28847)(E(3355)),T=Function.prototype.toString,g="object"===("undefined"==typeof Reflect?"undefined":(0,f.default)(Reflect))&&null!==Reflect&&Reflect.apply;if("function"==typeof g&&"function"==typeof Object.defineProperty)try{d=Object.defineProperty({},"length",{get:function(){throw x}}),x={},g(function(){throw 42},null,d)}catch(I){I!==x&&(g=null)}else g=null;var b=/^\s*class\b/,l=function(I){try{var P=T.call(I);return b.test(P)}catch{return!1}},h=function(I){try{return!l(I)&&(T.call(I),!0)}catch{return!1}},u=Object.prototype.toString,m="function"==typeof Symbol&&!!Symbol.toStringTag,_=!(0 in[,]),w=function(){return!1};if("object"===("undefined"==typeof document?"undefined":(0,f.default)(document))){var S=document.all;u.call(S)===u.call(document.all)&&(w=function(I){if((_||!I)&&(void 0===I||"object"===(0,f.default)(I)))try{var P=u.call(I);return("[object HTMLAllCollection]"===P||"[object HTML document.all class]"===P||"[object HTMLCollection]"===P||"[object Object]"===P)&&null==I("")}catch{}return!1})}q.exports=g?function(I){if(w(I))return!0;if(!I||"function"!=typeof I&&"object"!==(0,f.default)(I))return!1;try{g(I,null,d)}catch(P){if(P!==x)return!1}return!l(I)&&h(I)}:function(I){if(w(I))return!0;if(!I||"function"!=typeof I&&"object"!==(0,f.default)(I))return!1;if(m)return h(I);if(l(I))return!1;var P=u.call(I);return!("[object Function]"!==P&&"[object GeneratorFunction]"!==P&&!/^\[object HTML/.test(P))&&h(I)}},27277:q=>{"use strict";q.exports=function(E){if(!E)return!1;var d=O.call(E);return"[object Function]"===d||"function"==typeof E&&"[object RegExp]"!==d||"undefined"!=typeof window&&(E===window.setTimeout||E===window.alert||E===window.confirm||E===window.prompt)};var O=Object.prototype.toString},14477:(q,O,E)=>{"use strict";var d,x=Object.prototype.toString,f=Function.prototype.toString,T=/^\s*(?:function)?\*/,g=E(11191)(),b=Object.getPrototypeOf;q.exports=function(l){if("function"!=typeof l)return!1;if(T.test(f.call(l)))return!0;if(!g)return"[object GeneratorFunction]"===x.call(l);if(!b)return!1;if(void 0===d){var h=function(){if(!g)return!1;try{return Function("return function*() {}")()}catch{}}();d=!!h&&b(h)}return b(l)===d}},8619:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));q.exports=function(x){if("string"!=typeof x)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(0,d.default)(x)+", while checking isHexPrefixed.");return"0x"===x.slice(0,2)}},28915:(q,O,E)=>{"use strict";var d=E(72337);q.exports=function(x){return!!d(x)}},39484:q=>{"use strict";var O={}.toString;q.exports=Array.isArray||function(E){return"[object Array]"==O.call(E)}},24858:(q,O,E)=>{"use strict";q=E.nmd(q);var d=E(19142),x=E(28847)(E(3355));!function(){var f="object"===("undefined"==typeof window?"undefined":(0,x.default)(window))?window:{};!f.JS_SHA3_NO_NODE_JS&&"object"===(void 0===d?"undefined":(0,x.default)(d))&&d.versions&&d.versions.node&&(f=E.g);for(var T=!f.JS_SHA3_NO_COMMON_JS&&"object"===(0,x.default)(q)&&q.exports,g="0123456789abcdef".split(""),b=[0,8,16,24],l=[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],h=[224,256,384,512],u=["hex","buffer","arrayBuffer","array"],m=function(R,o,y){return function(M){return new j(R,o,R).update(M)[y]()}},_=function(R,o,y){return function(M,v){return new j(R,o,v).update(M)[y]()}},w=function(R,o){var y=m(R,o,"hex");y.create=function(){return new j(R,o,R)},y.update=function(k){return y.create().update(k)};for(var M=0;M>5,this.byteCount=this.blockCount<<2,this.outputBlocks=y>>5,this.extraBytes=(31&y)>>3;for(var M=0;M<50;++M)this.s[M]=0}j.prototype.update=function(R){var o="string"!=typeof R;o&&R.constructor===ArrayBuffer&&(R=new Uint8Array(R));for(var y,M,v=R.length,k=this.blocks,D=this.byteCount,N=this.blockCount,C=0,a=this.s;C>2]|=R[C]<>2]|=M<>2]|=(192|M>>6)<>2]|=(128|63&M)<=57344?(k[y>>2]|=(224|M>>12)<>2]|=(128|M>>6&63)<>2]|=(128|63&M)<>2]|=(240|M>>18)<>2]|=(128|M>>12&63)<>2]|=(128|M>>6&63)<>2]|=(128|63&M)<=D){for(this.start=y-D,this.block=k[N],y=0;y>2]|=this.padding[3&o],this.lastByteIndex===this.byteCount)for(R[0]=R[y],o=1;o>4&15]+g[15&R]+g[R>>12&15]+g[R>>8&15]+g[R>>20&15]+g[R>>16&15]+g[R>>28&15]+g[R>>24&15];D%o==0&&(K(y),k=0)}return v&&(R=y[k],v>0&&(N+=g[R>>4&15]+g[15&R]),v>1&&(N+=g[R>>12&15]+g[R>>8&15]),v>2&&(N+=g[R>>20&15]+g[R>>16&15])),N},j.prototype.buffer=j.prototype.arrayBuffer=function(){this.finalize();var R,o=this.blockCount,y=this.s,M=this.outputBlocks,v=this.extraBytes,k=0,D=0,N=this.outputBits>>3;R=v?new ArrayBuffer(M+1<<2):new ArrayBuffer(N);for(var C=new Uint32Array(R);D>8&255,C[R+2]=o>>16&255,C[R+3]=o>>24&255;N%y==0&&K(M)}return k&&(R=N<<2,o=M[D],k>0&&(C[R]=255&o),k>1&&(C[R+1]=o>>8&255),k>2&&(C[R+2]=o>>16&255)),C};var K=function(R){var o,y,M,v,k,D,N,C,a,B,Q,ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt,Yt,Wn,fn,$n,Jr,Ln,Bn,Wr,zn,bn,Lr,Kn,sr,Ii,Un,ir,ts,Tn;for(M=0;M<48;M+=2)v=R[0]^R[10]^R[20]^R[30]^R[40],k=R[1]^R[11]^R[21]^R[31]^R[41],C=R[4]^R[14]^R[24]^R[34]^R[44],a=R[5]^R[15]^R[25]^R[35]^R[45],B=R[6]^R[16]^R[26]^R[36]^R[46],Q=R[7]^R[17]^R[27]^R[37]^R[47],o=(ee=R[8]^R[18]^R[28]^R[38]^R[48])^((D=R[2]^R[12]^R[22]^R[32]^R[42])<<1|(N=R[3]^R[13]^R[23]^R[33]^R[43])>>>31),y=(ce=R[9]^R[19]^R[29]^R[39]^R[49])^(N<<1|D>>>31),R[0]^=o,R[1]^=y,R[10]^=o,R[11]^=y,R[20]^=o,R[21]^=y,R[30]^=o,R[31]^=y,R[40]^=o,R[41]^=y,y=k^(a<<1|C>>>31),R[2]^=o=v^(C<<1|a>>>31),R[3]^=y,R[12]^=o,R[13]^=y,R[22]^=o,R[23]^=y,R[32]^=o,R[33]^=y,R[42]^=o,R[43]^=y,y=N^(Q<<1|B>>>31),R[4]^=o=D^(B<<1|Q>>>31),R[5]^=y,R[14]^=o,R[15]^=y,R[24]^=o,R[25]^=y,R[34]^=o,R[35]^=y,R[44]^=o,R[45]^=y,y=a^(ce<<1|ee>>>31),R[6]^=o=C^(ee<<1|ce>>>31),R[7]^=y,R[16]^=o,R[17]^=y,R[26]^=o,R[27]^=y,R[36]^=o,R[37]^=y,R[46]^=o,R[47]^=y,y=Q^(k<<1|v>>>31),R[8]^=o=B^(v<<1|k>>>31),R[9]^=y,R[18]^=o,R[19]^=y,R[28]^=o,R[29]^=y,R[38]^=o,R[39]^=y,R[48]^=o,R[49]^=y,we=R[1],Yt=R[11]<<4|R[10]>>>28,Wn=R[10]<<4|R[11]>>>28,ze=R[20]<<3|R[21]>>>29,Ve=R[21]<<3|R[20]>>>29,Un=R[31]<<9|R[30]>>>23,ir=R[30]<<9|R[31]>>>23,Nt=R[40]<<18|R[41]>>>14,It=R[41]<<18|R[40]>>>14,wt=R[2]<<1|R[3]>>>31,Pt=R[3]<<1|R[2]>>>31,Te=R[12]<<12|R[13]>>>20,fn=R[22]<<10|R[23]>>>22,$n=R[23]<<10|R[22]>>>22,nt=R[33]<<13|R[32]>>>19,tt=R[32]<<13|R[33]>>>19,ts=R[42]<<2|R[43]>>>30,Tn=R[43]<<2|R[42]>>>30,zn=R[5]<<30|R[4]>>>2,bn=R[4]<<30|R[5]>>>2,st=R[14]<<6|R[15]>>>26,Ye=R[15]<<6|R[14]>>>26,X=R[24]<<11|R[25]>>>21,Jr=R[34]<<15|R[35]>>>17,Ln=R[35]<<15|R[34]>>>17,mt=R[45]<<29|R[44]>>>3,ht=R[44]<<29|R[45]>>>3,Ce=R[6]<<28|R[7]>>>4,ke=R[7]<<28|R[6]>>>4,Lr=R[17]<<23|R[16]>>>9,Kn=R[16]<<23|R[17]>>>9,gt=R[26]<<25|R[27]>>>7,St=R[27]<<25|R[26]>>>7,ne=R[36]<<21|R[37]>>>11,pe=R[37]<<21|R[36]>>>11,Bn=R[47]<<24|R[46]>>>8,Wr=R[46]<<24|R[47]>>>8,qt=R[8]<<27|R[9]>>>5,jt=R[9]<<27|R[8]>>>5,me=R[18]<<20|R[19]>>>12,Ee=R[19]<<20|R[18]>>>12,sr=R[29]<<7|R[28]>>>25,Ii=R[28]<<7|R[29]>>>25,Wt=R[38]<<8|R[39]>>>24,dn=R[39]<<8|R[38]>>>24,_e=R[48]<<14|R[49]>>>18,xe=R[49]<<14|R[48]>>>18,R[0]=(ue=R[0])^~(ae=R[13]<<12|R[12]>>>20)&(le=R[25]<<11|R[24]>>>21),R[1]=we^~Te&X,R[10]=Ce^~me&ze,R[11]=ke^~Ee&Ve,R[20]=wt^~st>,R[21]=Pt^~Ye&St,R[30]=qt^~Yt&fn,R[31]=jt^~Wn&$n,R[40]=zn^~Lr&sr,R[41]=bn^~Kn&Ii,R[2]=ae^~le&ne,R[3]=Te^~X&pe,R[12]=me^~ze&nt,R[13]=Ee^~Ve&tt,R[22]=st^~gt&Wt,R[23]=Ye^~St&dn,R[32]=Yt^~fn&Jr,R[33]=Wn^~$n&Ln,R[42]=Lr^~sr&Un,R[43]=Kn^~Ii&ir,R[4]=le^~ne&_e,R[5]=X^~pe&xe,R[14]=ze^~nt&mt,R[15]=Ve^~tt&ht,R[24]=gt^~Wt&Nt,R[25]=St^~dn&It,R[34]=fn^~Jr&Bn,R[35]=$n^~Ln&Wr,R[44]=sr^~Un&ts,R[45]=Ii^~ir&Tn,R[6]=ne^~_e&ue,R[7]=pe^~xe&we,R[16]=nt^~mt&Ce,R[17]=tt^~ht&ke,R[26]=Wt^~Nt&wt,R[27]=dn^~It&Pt,R[36]=Jr^~Bn&qt,R[37]=Ln^~Wr&jt,R[46]=Un^~ts&zn,R[47]=ir^~Tn&bn,R[8]=_e^~ue&ae,R[9]=xe^~we&Te,R[18]=mt^~Ce&me,R[19]=ht^~ke&Ee,R[28]=Nt^~wt&st,R[29]=It^~Pt&Ye,R[38]=Bn^~qt&Yt,R[39]=Wr^~jt&Wn,R[48]=ts^~zn&Lr,R[49]=Tn^~bn&Kn,R[0]^=l[M],R[1]^=l[M+1]};if(T)q.exports=I;else for(L=0;L{"use strict";q.exports=E(22109)(E(80801))},22109:(q,O,E)=>{"use strict";var d=E(46543),x=E(40274);q.exports=function(f){var T=d(f),g=x(f);return function(b,l){switch("string"==typeof b?b.toLowerCase():b){case"keccak224":return new T(1152,448,null,224,l);case"keccak256":return new T(1088,512,null,256,l);case"keccak384":return new T(832,768,null,384,l);case"keccak512":return new T(576,1024,null,512,l);case"sha3-224":return new T(1152,448,6,224,l);case"sha3-256":return new T(1088,512,6,256,l);case"sha3-384":return new T(832,768,6,384,l);case"sha3-512":return new T(576,1024,6,512,l);case"shake128":return new g(1344,256,31,l);case"shake256":return new g(1088,512,31,l);default:throw new Error("Invald algorithm: "+b)}}}},46543:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(69721)),T=x(E(58985)),g=x(E(15163)),b=x(E(34650)),l=x(E(21949)),h=E(86505).Transform;q.exports=function(u){return function(m){(0,g.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,l.default)(_);if(w){var V=(0,l.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,b.default)(this,P)});function I(P,L,V,W,G){var H;return(0,f.default)(this,I),(H=S.call(this,G))._rate=P,H._capacity=L,H._delimitedSuffix=V,H._hashBitLength=W,H._options=G,H._state=new u,H._state.initialize(P,L),H._finalized=!1,H}return(0,T.default)(I,[{key:"_transform",value:function(P,L,V){var W=null;try{this.update(P,L)}catch(G){W=G}V(W)}},{key:"_flush",value:function(P){var L=null;try{this.push(this.digest())}catch(V){L=V}P(L)}},{key:"update",value:function(P,L){if(!d.isBuffer(P)&&"string"!=typeof P)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return d.isBuffer(P)||(P=d.from(P,L)),this._state.absorb(P),this}},{key:"digest",value:function(P){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var L=this._state.squeeze(this._hashBitLength/8);return void 0!==P&&(L=L.toString(P)),this._resetState(),L}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var P=new I(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(P._state),P._finalized=this._finalized,P}}]),I}(h)}},40274:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(69721)),T=x(E(58985)),g=x(E(15163)),b=x(E(34650)),l=x(E(21949)),h=E(86505).Transform;q.exports=function(u){return function(m){(0,g.default)(I,m);var _,w,S=(_=I,w=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var P,L=(0,l.default)(_);if(w){var V=(0,l.default)(this).constructor;P=Reflect.construct(L,arguments,V)}else P=L.apply(this,arguments);return(0,b.default)(this,P)});function I(P,L,V,W){var G;return(0,f.default)(this,I),(G=S.call(this,W))._rate=P,G._capacity=L,G._delimitedSuffix=V,G._options=W,G._state=new u,G._state.initialize(P,L),G._finalized=!1,G}return(0,T.default)(I,[{key:"_transform",value:function(P,L,V){var W=null;try{this.update(P,L)}catch(G){W=G}V(W)}},{key:"_flush",value:function(){}},{key:"_read",value:function(P){this.push(this.squeeze(P))}},{key:"update",value:function(P,L){if(!d.isBuffer(P)&&"string"!=typeof P)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return d.isBuffer(P)||(P=d.from(P,L)),this._state.absorb(P),this}},{key:"squeeze",value:function(P,L){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var V=this._state.squeeze(P);return void 0!==L&&(V=V.toString(L)),V}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var P=new I(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(P._state),P._finalized=this._finalized,P}}]),I}(h)}},25612:(q,O)=>{"use strict";var E=[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];O.p1600=function(d){for(var x=0;x<24;++x){var f=d[0]^d[10]^d[20]^d[30]^d[40],T=d[1]^d[11]^d[21]^d[31]^d[41],g=d[2]^d[12]^d[22]^d[32]^d[42],b=d[3]^d[13]^d[23]^d[33]^d[43],l=d[4]^d[14]^d[24]^d[34]^d[44],h=d[5]^d[15]^d[25]^d[35]^d[45],u=d[6]^d[16]^d[26]^d[36]^d[46],m=d[7]^d[17]^d[27]^d[37]^d[47],_=d[8]^d[18]^d[28]^d[38]^d[48],w=d[9]^d[19]^d[29]^d[39]^d[49],S=_^(g<<1|b>>>31),I=w^(b<<1|g>>>31),P=d[0]^S,L=d[1]^I,V=d[10]^S,W=d[11]^I,G=d[20]^S,H=d[21]^I,j=d[30]^S,K=d[31]^I,R=d[40]^S,o=d[41]^I,y=d[2]^(S=f^(l<<1|h>>>31)),M=d[3]^(I=T^(h<<1|l>>>31)),v=d[12]^S,k=d[13]^I,D=d[22]^S,N=d[23]^I,C=d[32]^S,a=d[33]^I,B=d[42]^S,Q=d[43]^I,ee=d[4]^(S=g^(u<<1|m>>>31)),ce=d[5]^(I=b^(m<<1|u>>>31)),ue=d[14]^S,we=d[15]^I,ae=d[24]^S,Te=d[25]^I,le=d[34]^S,X=d[35]^I,ne=d[44]^S,pe=d[45]^I,_e=d[6]^(S=l^(_<<1|w>>>31)),xe=d[7]^(I=h^(w<<1|_>>>31)),Ce=d[16]^S,ke=d[17]^I,me=d[26]^S,Ee=d[27]^I,ze=d[36]^S,Ve=d[37]^I,nt=d[46]^S,tt=d[47]^I,mt=d[8]^(S=u^(f<<1|T>>>31)),ht=d[9]^(I=m^(T<<1|f>>>31)),wt=d[18]^S,Pt=d[19]^I,st=d[28]^S,Ye=d[29]^I,gt=d[38]^S,St=d[39]^I,Wt=d[48]^S,dn=d[49]^I,Nt=P,It=L,qt=W<<4|V>>>28,jt=V<<4|W>>>28,Yt=G<<3|H>>>29,Wn=H<<3|G>>>29,fn=K<<9|j>>>23,$n=j<<9|K>>>23,Jr=R<<18|o>>>14,Ln=o<<18|R>>>14,Bn=y<<1|M>>>31,Wr=M<<1|y>>>31,zn=k<<12|v>>>20,bn=v<<12|k>>>20,Lr=D<<10|N>>>22,Kn=N<<10|D>>>22,sr=a<<13|C>>>19,Ii=C<<13|a>>>19,Un=B<<2|Q>>>30,ir=Q<<2|B>>>30,ts=ce<<30|ee>>>2,Tn=ee<<30|ce>>>2,Qn=ue<<6|we>>>26,Vi=we<<6|ue>>>26,ar=Te<<11|ae>>>21,br=ae<<11|Te>>>21,ki=le<<15|X>>>17,ur=X<<15|le>>>17,mr=pe<<29|ne>>>3,Fr=ne<<29|pe>>>3,hi=_e<<28|xe>>>4,wi=xe<<28|_e>>>4,cs=ke<<23|Ce>>>9,$i=Ce<<23|ke>>>9,rs=me<<25|Ee>>>7,Xi=Ee<<25|me>>>7,$s=ze<<21|Ve>>>11,is=Ve<<21|ze>>>11,go=tt<<24|nt>>>8,ji=nt<<24|tt>>>8,so=mt<<27|ht>>>5,oo=ht<<27|mt>>>5,zo=wt<<20|Pt>>>12,Wi=Pt<<20|wt>>>12,bo=Ye<<7|st>>>25,_s=st<<7|Ye>>>25,Ao=gt<<8|St>>>24,zi=St<<8|gt>>>24,Ms=Wt<<14|dn>>>18,Oi=dn<<14|Wt>>>18;d[0]=Nt^~zn&ar,d[1]=It^~bn&br,d[10]=hi^~zo&Yt,d[11]=wi^~Wi&Wn,d[20]=Bn^~Qn&rs,d[21]=Wr^~Vi&Xi,d[30]=so^~qt&Lr,d[31]=oo^~jt&Kn,d[40]=ts^~cs&bo,d[41]=Tn^~$i&_s,d[2]=zn^~ar&$s,d[3]=bn^~br&is,d[12]=zo^~Yt&sr,d[13]=Wi^~Wn&Ii,d[22]=Qn^~rs&Ao,d[23]=Vi^~Xi&zi,d[32]=qt^~Lr&ki,d[33]=jt^~Kn&ur,d[42]=cs^~bo&fn,d[43]=$i^~_s&$n,d[4]=ar^~$s&Ms,d[5]=br^~is&Oi,d[14]=Yt^~sr&mr,d[15]=Wn^~Ii&Fr,d[24]=rs^~Ao&Jr,d[25]=Xi^~zi&Ln,d[34]=Lr^~ki&go,d[35]=Kn^~ur&ji,d[44]=bo^~fn&Un,d[45]=_s^~$n&ir,d[6]=$s^~Ms&Nt,d[7]=is^~Oi&It,d[16]=sr^~mr&hi,d[17]=Ii^~Fr&wi,d[26]=Ao^~Jr&Bn,d[27]=zi^~Ln&Wr,d[36]=ki^~go&so,d[37]=ur^~ji&oo,d[46]=fn^~Un&ts,d[47]=$n^~ir&Tn,d[8]=Ms^~Nt&zn,d[9]=Oi^~It&bn,d[18]=mr^~hi&zo,d[19]=Fr^~wi&Wi,d[28]=Jr^~Bn&Qn,d[29]=Ln^~Wr&Vi,d[38]=go^~so&qt,d[39]=ji^~oo&jt,d[48]=Un^~ts&cs,d[49]=ir^~Tn&$i,d[0]^=E[2*x],d[1]^=E[2*x+1]}}},80801:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(25612);function f(){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}f.prototype.initialize=function(T,g){for(var b=0;b<50;++b)this.state[b]=0;this.blockSize=T/8,this.count=0,this.squeezing=!1},f.prototype.absorb=function(T){for(var g=0;g>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(x.p1600(this.state),this.count=0);return g},f.prototype.copy=function(T){for(var g=0;g<50;++g)T.state[g]=this.state[g];T.blockSize=this.blockSize,T.count=this.count,T.squeezing=this.squeezing},q.exports=f},50807:(q,O,E)=>{"use strict";var d=E(41736),x=E(22353),f=E(48850).Buffer,T=new Array(16);function g(){x.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function b(_,w){return _<>>32-w}function l(_,w,S,I,P,L,V){return b(_+(w&S|~w&I)+P+L|0,V)+w|0}function h(_,w,S,I,P,L,V){return b(_+(w&I|S&~I)+P+L|0,V)+w|0}function u(_,w,S,I,P,L,V){return b(_+(w^S^I)+P+L|0,V)+w|0}function m(_,w,S,I,P,L,V){return b(_+(S^(w|~I))+P+L|0,V)+w|0}d(g,x),g.prototype._update=function(){for(var _=T,w=0;w<16;++w)_[w]=this._block.readInt32LE(4*w);var S=this._a,I=this._b,P=this._c,L=this._d;S=l(S,I,P,L,_[0],3614090360,7),L=l(L,S,I,P,_[1],3905402710,12),P=l(P,L,S,I,_[2],606105819,17),I=l(I,P,L,S,_[3],3250441966,22),S=l(S,I,P,L,_[4],4118548399,7),L=l(L,S,I,P,_[5],1200080426,12),P=l(P,L,S,I,_[6],2821735955,17),I=l(I,P,L,S,_[7],4249261313,22),S=l(S,I,P,L,_[8],1770035416,7),L=l(L,S,I,P,_[9],2336552879,12),P=l(P,L,S,I,_[10],4294925233,17),I=l(I,P,L,S,_[11],2304563134,22),S=l(S,I,P,L,_[12],1804603682,7),L=l(L,S,I,P,_[13],4254626195,12),P=l(P,L,S,I,_[14],2792965006,17),S=h(S,I=l(I,P,L,S,_[15],1236535329,22),P,L,_[1],4129170786,5),L=h(L,S,I,P,_[6],3225465664,9),P=h(P,L,S,I,_[11],643717713,14),I=h(I,P,L,S,_[0],3921069994,20),S=h(S,I,P,L,_[5],3593408605,5),L=h(L,S,I,P,_[10],38016083,9),P=h(P,L,S,I,_[15],3634488961,14),I=h(I,P,L,S,_[4],3889429448,20),S=h(S,I,P,L,_[9],568446438,5),L=h(L,S,I,P,_[14],3275163606,9),P=h(P,L,S,I,_[3],4107603335,14),I=h(I,P,L,S,_[8],1163531501,20),S=h(S,I,P,L,_[13],2850285829,5),L=h(L,S,I,P,_[2],4243563512,9),P=h(P,L,S,I,_[7],1735328473,14),S=u(S,I=h(I,P,L,S,_[12],2368359562,20),P,L,_[5],4294588738,4),L=u(L,S,I,P,_[8],2272392833,11),P=u(P,L,S,I,_[11],1839030562,16),I=u(I,P,L,S,_[14],4259657740,23),S=u(S,I,P,L,_[1],2763975236,4),L=u(L,S,I,P,_[4],1272893353,11),P=u(P,L,S,I,_[7],4139469664,16),I=u(I,P,L,S,_[10],3200236656,23),S=u(S,I,P,L,_[13],681279174,4),L=u(L,S,I,P,_[0],3936430074,11),P=u(P,L,S,I,_[3],3572445317,16),I=u(I,P,L,S,_[6],76029189,23),S=u(S,I,P,L,_[9],3654602809,4),L=u(L,S,I,P,_[12],3873151461,11),P=u(P,L,S,I,_[15],530742520,16),S=m(S,I=u(I,P,L,S,_[2],3299628645,23),P,L,_[0],4096336452,6),L=m(L,S,I,P,_[7],1126891415,10),P=m(P,L,S,I,_[14],2878612391,15),I=m(I,P,L,S,_[5],4237533241,21),S=m(S,I,P,L,_[12],1700485571,6),L=m(L,S,I,P,_[3],2399980690,10),P=m(P,L,S,I,_[10],4293915773,15),I=m(I,P,L,S,_[1],2240044497,21),S=m(S,I,P,L,_[8],1873313359,6),L=m(L,S,I,P,_[15],4264355552,10),P=m(P,L,S,I,_[6],2734768916,15),I=m(I,P,L,S,_[13],1309151649,21),S=m(S,I,P,L,_[4],4149444226,6),L=m(L,S,I,P,_[11],3174756917,10),P=m(P,L,S,I,_[2],718787259,15),I=m(I,P,L,S,_[9],3951481745,21),this._a=this._a+S|0,this._b=this._b+I|0,this._c=this._c+P|0,this._d=this._d+L|0},g.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var _=f.allocUnsafe(16);return _.writeInt32LE(this._a,0),_.writeInt32LE(this._b,4),_.writeInt32LE(this._c,8),_.writeInt32LE(this._d,12),_},q.exports=g},37441:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(19142),f=E(28847),T=f(E(82247)),g=f(E(3355)),b=f(E(94571)),l=f(E(90775)),h=f(E(58985)),u=f(E(69721)),m=f(E(15163)),_=f(E(34650)),w=f(E(21949)),S=f(E(22940));function I(N,C){var a=Object.keys(N);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(N);C&&(B=B.filter(function(Q){return Object.getOwnPropertyDescriptor(N,Q).enumerable})),a.push.apply(a,B)}return a}function P(N){for(var C=1;C{"use strict";var d=E(31734),x=E(82202);function f(T){this.rand=T||new x.Rand}q.exports=f,f.create=function(T){return new f(T)},f.prototype._randbelow=function(T){var g=T.bitLength(),b=Math.ceil(g/8);do{var l=new d(this.rand.generate(b))}while(l.cmp(T)>=0);return l},f.prototype._randrange=function(T,g){var b=g.sub(T);return T.add(this._randbelow(b))},f.prototype.test=function(T,g,b){var l=T.bitLength(),h=d.mont(T),u=new d(1).toRed(h);g||(g=Math.max(1,l/48|0));for(var m=T.subn(1),_=0;!m.testn(_);_++);for(var w=T.shrn(_),S=m.toRed(h);g>0;g--){var I=this._randrange(new d(2),m);b&&b(I);var P=I.toRed(h).redPow(w);if(0!==P.cmp(u)&&0!==P.cmp(S)){for(var L=1;L<_;L++){if(0===(P=P.redSqr()).cmp(u))return!1;if(0===P.cmp(S))break}if(L===_)return!1}}return!0},f.prototype.getDivisor=function(T,g){var b=T.bitLength(),l=d.mont(T),h=new d(1).toRed(l);g||(g=Math.max(1,b/48|0));for(var u=T.subn(1),m=0;!u.testn(m);m++);for(var _=T.shrn(m),w=u.toRed(l);g>0;g--){var S=this._randrange(new d(2),u),I=T.gcd(S);if(0!==I.cmpn(1))return I;var P=S.toRed(l).redPow(_);if(0!==P.cmp(h)&&0!==P.cmp(w)){for(var L=1;L{"use strict";function O(E,d){if(!E)throw new Error(d||"Assertion failed")}q.exports=O,O.equal=function(E,d,x){if(E!=d)throw new Error(x||"Assertion failed: "+E+" != "+d)}},96580:(q,O)=>{"use strict";var E=O;function d(f){return 1===f.length?"0"+f:f}function x(f){for(var T="",g=0;g>8,u=255&l;h?g.push(h,u):g.push(u)}return g},E.zero2=d,E.toHex=x,E.encode=function(f,T){return"hex"===T?x(f):f}},36565:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=function(){function g(b,l,h,u){(0,x.default)(this,g),this.name=b,this.code=l,this.alphabet=u,h&&u&&(this.engine=h(u))}return(0,f.default)(g,[{key:"encode",value:function(b){return this.engine.encode(b)}},{key:"decode",value:function(b){return this.engine.decode(b)}},{key:"isImplemented",value:function(){return this.engine}}]),g}();q.exports=T},52642:(q,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g=h.length?{done:!0}:{done:!1,value:h[_++]}},e:function(L){throw L},f:w}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S,I=!0,P=!1;return{s:function(){m=m.call(h)},n:function(){var L=m.next();return I=L.done,L},e:function(L){P=!0,S=L},f:function(){try{I||null==m.return||m.return()}finally{if(P)throw S}}}}(T);try{for(b.s();!(g=b.n()).done;)if(f.indexOf(g.value)<0)throw new Error("invalid base16 character")}catch(h){b.e(h)}finally{b.f()}return x.from(T,"hex")}}}},96494:q=>{"use strict";function O(E,d){(null==d||d>E.length)&&(d=E.length);for(var x=0,f=new Array(d);x=5;)u+=f[h>>>l-5&31],l-=5;if(l>0&&(u+=f[h<<5-l&31]),b)for(;u.length%8!=0;)u+="=";return u}("string"==typeof d?Uint8Array.from(d):d,E)},decode:function(d){var x,f=function(g,b){var l="undefined"!=typeof Symbol&&g[Symbol.iterator]||g["@@iterator"];if(!l){if(Array.isArray(g)||(l=function(S,I){if(S){if("string"==typeof S)return O(S,I);var P=Object.prototype.toString.call(S).slice(8,-1);return"Object"===P&&S.constructor&&(P=S.constructor.name),"Map"===P||"Set"===P?Array.from(S):"Arguments"===P||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?O(S,I):void 0}}(g))){l&&(g=l);var h=0,u=function(){};return{s:u,n:function(){return h>=g.length?{done:!0}:{done:!1,value:g[h++]}},e:function(S){throw S},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var m,_=!0,w=!1;return{s:function(){l=l.call(g)},n:function(){var S=l.next();return _=S.done,S},e:function(S){w=!0,m=S},f:function(){try{_||null==l.return||l.return()}finally{if(w)throw m}}}}(d);try{for(f.s();!(x=f.n()).done;)if(E.indexOf(x.value)<0)throw new Error("invalid base32 character")}catch(g){f.e(g)}finally{f.f()}return function(g,b){for(var l=(g=g.replace(new RegExp("=","g"),"")).length,h=0,u=0,m=0,_=new Uint8Array(5*l/8|0),w=0;w=8&&(_[m++]=u>>>h-8&255,h-=8);return _.buffer}(d,E)}}}},76627:(q,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g-1,g=f.indexOf("-")>-1&&f.indexOf("_")>-1;return{encode:function(b){var l="";l="string"==typeof b?x.from(b).toString("base64"):b.toString("base64"),g&&(l=l.replace(/\+/g,"-").replace(/\//g,"_"));var h=l.indexOf("=");return h>0&&!T&&(l=l.substring(0,h)),l},decode:function(b){var l,h=function(m,_){var w="undefined"!=typeof Symbol&&m[Symbol.iterator]||m["@@iterator"];if(!w){if(Array.isArray(m)||(w=function(W,G){if(W){if("string"==typeof W)return d(W,G);var H=Object.prototype.toString.call(W).slice(8,-1);return"Object"===H&&W.constructor&&(H=W.constructor.name),"Map"===H||"Set"===H?Array.from(W):"Arguments"===H||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?d(W,G):void 0}}(m))){w&&(m=w);var S=0,I=function(){};return{s:I,n:function(){return S>=m.length?{done:!0}:{done:!1,value:m[S++]}},e:function(W){throw W},f:I}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P,L=!0,V=!1;return{s:function(){w=w.call(m)},n:function(){var W=w.next();return L=W.done,W},e:function(W){V=!0,P=W},f:function(){try{L||null==w.return||w.return()}finally{if(V)throw P}}}}(b);try{for(h.s();!(l=h.n()).done;)if(f.indexOf(l.value)<0)throw new Error("invalid base64 character")}catch(m){h.e(m)}finally{h.f()}return x.from(b,"base64")}}}},7905:(q,O,E)=>{"use strict";var d=E(36565),x=E(27548),f=E(52642),T=E(96494),g=E(76627),b=[["base1","1","","1"],["base2","0",x,"01"],["base8","7",x,"01234567"],["base10","9",x,"0123456789"],["base16","f",f,"0123456789abcdef"],["base32","b",T,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",T,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",T,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",T,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",T,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",x,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",x,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],l=b.reduce(function(u,m){return u[m[0]]=new d(m[0],m[1],m[2],m[3]),u},{}),h=b.reduce(function(u,m){return u[m[1]]=l[m[0]],u},{});q.exports={names:l,codes:h}},6086:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(7905);(O=q.exports=T).encode=function(b,l){var h=g(b);return T(h.name,d.from(h.encode(l)))},O.decode=function(b){d.isBuffer(b)&&(b=b.toString());var l=b.substring(0,1);"string"==typeof(b=b.substring(1,b.length))&&(b=d.from(b));var h=g(l);return d.from(h.decode(b.toString()))},O.isEncoded=function(b){if(d.isBuffer(b)&&(b=b.toString()),"[object String]"!==Object.prototype.toString.call(b))return!1;var l=b.substring(0,1);try{return g(l).name}catch{return!1}},O.names=Object.freeze(Object.keys(x.names)),O.codes=Object.freeze(Object.keys(x.codes));var f=new Error("Unsupported encoding");function T(b,l){if(!l)throw new Error("requires an encoded buffer");var _,h=g(b),u=d.from(h.code);return _=l,g(h.name).decode(_.toString()),d.concat([u,l])}function g(b){var l;if(x.names[b])l=x.names[b];else{if(!x.codes[b])throw f;l=x.codes[b]}if(!l.isImplemented())throw new Error("Base "+b+" is not implemented yet");return l}},54093:(q,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(24070),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(29033).Buffer,x=E(26657),f=E(7054),T=E(86002),g=E(55576);(O=q.exports).addPrefix=function(l,h){var u;if(d.isBuffer(l))u=g.varintBufferEncode(l);else{if(!T[l])throw new Error("multicodec not recognized");u=T[l]}return d.concat([u,h])},O.rmPrefix=function(l){return x.decode(l),l.slice(x.decode.bytes)},O.getCodec=function(l){var h=x.decode(l),u=f.get(h);if(void 0===u)throw new Error("Code ".concat(h," not found"));return u},O.getName=function(l){return f.get(l)},O.getNumber=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return g.varintBufferDecode(h)[0]},O.getCode=function(l){return x.decode(l)},O.getCodeVarint=function(l){var h=T[l];if(void 0===h)throw new Error("Codec `"+l+"` not found");return h},O.getVarint=function(l){return x.encode(l)};var b=E(54093);Object.assign(O,b),O.print=E(11032)},7054:(q,O,E)=>{"use strict";var d=E(24070),x=new Map;for(var f in d)x.set(d[f],f);q.exports=Object.freeze(x)},11032:(q,O,E)=>{"use strict";for(var d=E(28847)(E(74519)),x=E(24070),f={},T=0,g=Object.entries(x);T{"use strict";var d=E(29033).Buffer,x=E(26657);function f(g){return parseInt(g.toString("hex"),16)}function T(g){var b=g.toString(16);return b.length%2==1&&(b="0"+b),d.from(b,"hex")}q.exports={numberToBuffer:T,bufferToNumber:f,varintBufferEncode:function(g){return d.from(x.encode(f(g)))},varintBufferDecode:function(g){return T(x.decode(g))},varintEncode:function(g){return d.from(x.encode(g))}}},86002:(q,O,E)=>{"use strict";var d=E(24070),x=E(55576).varintEncode,f={};for(var T in d)f[T]=x(d[T]);q.exports=Object.freeze(f)},71786:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=function(){function g(b,l,h,u){(0,x.default)(this,g),this.name=b,this.code=l,this.alphabet=u,h&&u&&(this.engine=h(u))}return(0,f.default)(g,[{key:"encode",value:function(b){return this.engine.encode(b)}},{key:"decode",value:function(b){return this.engine.decode(b)}},{key:"isImplemented",value:function(){return this.engine}}]),g}();q.exports=T},37739:(q,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g=h.length?{done:!0}:{done:!1,value:h[_++]}},e:function(L){throw L},f:w}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S,I=!0,P=!1;return{s:function(){m=m.call(h)},n:function(){var L=m.next();return I=L.done,L},e:function(L){P=!0,S=L},f:function(){try{I||null==m.return||m.return()}finally{if(P)throw S}}}}(T);try{for(b.s();!(g=b.n()).done;)if(f.indexOf(g.value)<0)throw new Error("invalid base16 character")}catch(h){b.e(h)}finally{b.f()}return x.from(T,"hex")}}}},70976:q=>{"use strict";function O(E,d){(null==d||d>E.length)&&(d=E.length);for(var x=0,f=new Array(d);x=5;)u+=f[h>>>l-5&31],l-=5;if(l>0&&(u+=f[h<<5-l&31]),b)for(;u.length%8!=0;)u+="=";return u}("string"==typeof d?Uint8Array.from(d):d,E)},decode:function(d){var x,f=function(g,b){var l="undefined"!=typeof Symbol&&g[Symbol.iterator]||g["@@iterator"];if(!l){if(Array.isArray(g)||(l=function(S,I){if(S){if("string"==typeof S)return O(S,I);var P=Object.prototype.toString.call(S).slice(8,-1);return"Object"===P&&S.constructor&&(P=S.constructor.name),"Map"===P||"Set"===P?Array.from(S):"Arguments"===P||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?O(S,I):void 0}}(g))){l&&(g=l);var h=0,u=function(){};return{s:u,n:function(){return h>=g.length?{done:!0}:{done:!1,value:g[h++]}},e:function(S){throw S},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var m,_=!0,w=!1;return{s:function(){l=l.call(g)},n:function(){var S=l.next();return _=S.done,S},e:function(S){w=!0,m=S},f:function(){try{_||null==l.return||l.return()}finally{if(w)throw m}}}}(d);try{for(f.s();!(x=f.n()).done;)if(E.indexOf(x.value)<0)throw new Error("invalid base32 character")}catch(g){f.e(g)}finally{f.f()}return function(g,b){for(var l=(g=g.replace(new RegExp("=","g"),"")).length,h=0,u=0,m=0,_=new Uint8Array(5*l/8|0),w=0;w=8&&(_[m++]=u>>>h-8&255,h-=8);return _.buffer}(d,E)}}}},88504:(q,O,E)=>{"use strict";function d(f,T){(null==T||T>f.length)&&(T=f.length);for(var g=0,b=new Array(T);g-1,g=f.indexOf("-")>-1&&f.indexOf("_")>-1;return{encode:function(b){var l="";l="string"==typeof b?x.from(b).toString("base64"):b.toString("base64"),g&&(l=l.replace(/\+/g,"-").replace(/\//g,"_"));var h=l.indexOf("=");return h>0&&!T&&(l=l.substring(0,h)),l},decode:function(b){var l,h=function(m,_){var w="undefined"!=typeof Symbol&&m[Symbol.iterator]||m["@@iterator"];if(!w){if(Array.isArray(m)||(w=function(W,G){if(W){if("string"==typeof W)return d(W,G);var H=Object.prototype.toString.call(W).slice(8,-1);return"Object"===H&&W.constructor&&(H=W.constructor.name),"Map"===H||"Set"===H?Array.from(W):"Arguments"===H||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?d(W,G):void 0}}(m))){w&&(m=w);var S=0,I=function(){};return{s:I,n:function(){return S>=m.length?{done:!0}:{done:!1,value:m[S++]}},e:function(W){throw W},f:I}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P,L=!0,V=!1;return{s:function(){w=w.call(m)},n:function(){var W=w.next();return L=W.done,W},e:function(W){V=!0,P=W},f:function(){try{L||null==w.return||w.return()}finally{if(V)throw P}}}}(b);try{for(h.s();!(l=h.n()).done;)if(f.indexOf(l.value)<0)throw new Error("invalid base64 character")}catch(m){h.e(m)}finally{h.f()}return x.from(b,"base64")}}}},12263:(q,O,E)=>{"use strict";var d=E(71786),x=E(27548),f=E(37739),T=E(70976),g=E(88504),b=[["base1","1","","1"],["base2","0",x,"01"],["base8","7",x,"01234567"],["base10","9",x,"0123456789"],["base16","f",f,"0123456789abcdef"],["base32","b",T,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",T,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",T,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",T,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",T,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",x,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",x,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",g,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],l=b.reduce(function(u,m){return u[m[0]]=new d(m[0],m[1],m[2],m[3]),u},{}),h=b.reduce(function(u,m){return u[m[1]]=l[m[0]],u},{});q.exports={names:l,codes:h}},2592:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(12263);function f(g,b){if(!b)throw new Error("requires an encoded buffer");var m,l=T(g),h=d.from(l.code);return m=b,T(l.name).decode(m.toString()),d.concat([h,b])}function T(g){var b;if(x.names[g])b=x.names[g];else{if(!x.codes[g])throw new Error("Unsupported encoding");b=x.codes[g]}if(!b.isImplemented())throw new Error("Base "+g+" is not implemented yet");return b}(O=q.exports=f).encode=function(g,b){var l=T(g);return f(l.name,d.from(l.encode(b)))},O.decode=function(g){d.isBuffer(g)&&(g=g.toString());var b=g.substring(0,1);"string"==typeof(g=g.substring(1,g.length))&&(g=d.from(g));var l=T(b);return d.from(l.decode(g.toString()))},O.isEncoded=function(g){if(d.isBuffer(g)&&(g=g.toString()),"[object String]"!==Object.prototype.toString.call(g))return!1;var b=g.substring(0,1);try{return T(b).name}catch{return!1}},O.names=Object.freeze(Object.keys(x.names)),O.codes=Object.freeze(Object.keys(x.codes))},81269:(q,O)=>{"use strict";O.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),O.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),O.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},77748:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(2592),f=E(26657),T=E(81269);function g(b){O.decode(b)}O.names=T.names,O.codes=T.codes,O.defaultLengths=T.defaultLengths,O.toHexString=function(b){if(!d.isBuffer(b))throw new Error("must be passed a buffer");return b.toString("hex")},O.fromHexString=function(b){return d.from(b,"hex")},O.toB58String=function(b){if(!d.isBuffer(b))throw new Error("must be passed a buffer");return x.encode("base58btc",b).toString().slice(1)},O.fromB58String=function(b){var l=b;return d.isBuffer(b)&&(l=b.toString()),x.decode("z"+l)},O.decode=function(b){if(!d.isBuffer(b))throw new Error("multihash must be a Buffer");if(b.length<2)throw new Error("multihash too short. must be > 2 bytes.");var l=f.decode(b);if(!O.isValidCode(l))throw new Error("multihash unknown function code: 0x".concat(l.toString(16)));b=b.slice(f.decode.bytes);var h=f.decode(b);if(h<0)throw new Error("multihash invalid length: ".concat(h));if((b=b.slice(f.decode.bytes)).length!==h)throw new Error("multihash length inconsistent: 0x".concat(b.toString("hex")));return{code:l,name:T.codes[l],length:h,digest:b}},O.encode=function(b,l,h){if(!b||void 0===l)throw new Error("multihash encode requires at least two args: digest, code");var u=O.coerceCode(l);if(!d.isBuffer(b))throw new Error("digest should be a Buffer");if(null==h&&(h=b.length),h&&b.length!==h)throw new Error("digest length should be equal to specified length.");return d.concat([d.from(f.encode(u)),d.from(f.encode(h)),b])},O.coerceCode=function(b){var l=b;if("string"==typeof b){if(void 0===T.names[b])throw new Error("Unrecognized hash function named: ".concat(b));l=T.names[b]}if("number"!=typeof l)throw new Error("Hash function code should be a number. Got: ".concat(l));if(void 0===T.codes[l]&&!O.isAppCode(l))throw new Error("Unrecognized function code: ".concat(l));return l},O.isAppCode=function(b){return b>0&&b<16},O.isValidCode=function(b){return!!O.isAppCode(b)||!!T.codes[b]},O.validate=g,O.prefix=function(b){return g(b),b.slice(0,2)}},77277:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(36931);q.exports=function(T){if("string"==typeof T||"number"==typeof T){var g=new x(1),b=String(T).toLowerCase().trim(),l="0x"===b.substr(0,2)||"-0x"===b.substr(0,3),h=f(b);if("-"===h.substr(0,1)&&(h=f(h.slice(1)),g=new x(-1,10)),!(h=""===h?"0":h).match(/^-?[0-9]+$/)&&h.match(/^[0-9A-Fa-f]+$/)||h.match(/^[a-fA-F]+$/)||!0===l&&h.match(/^[0-9A-Fa-f]+$/))return new x(h,16).mul(g);if((h.match(/^-?[0-9]+$/)||""===h)&&!1===l)return new x(h,10).mul(g)}else if("object"===(0,d.default)(T)&&T.toString&&!T.pop&&!T.push&&T.toString(10).match(/^-?[0-9]+$/)&&(T.mul||T.dividedToIntegerBy))return new x(T.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(T)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},33103:q=>{"use strict";var O=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;q.exports=function(){try{if(!Object.assign)return!1;var x=new String("abc");if(x[5]="de","5"===Object.getOwnPropertyNames(x)[0])return!1;for(var f={},T=0;T<10;T++)f["_"+String.fromCharCode(T)]=T;if("0123456789"!==Object.getOwnPropertyNames(f).map(function(b){return f[b]}).join(""))return!1;var g={};return"abcdefghijklmnopqrst".split("").forEach(function(b){g[b]=b}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},g)).join("")}catch{return!1}}()?Object.assign:function(x,f){for(var T,g,b=function(m){if(null==m)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(m)}(x),l=1;l{"use strict";var d,f;q=E.nmd(q);var T,g=E(28847)(E(3355));T=function(){return function(b){var l={};function h(u){if(l[u])return l[u].exports;var m=l[u]={i:u,l:!1,exports:{}};return b[u].call(m.exports,m,m.exports,h),m.l=!0,m.exports}return h.m=b,h.c=l,h.d=function(u,m,_){h.o(u,m)||Object.defineProperty(u,m,{configurable:!1,enumerable:!0,get:_})},h.n=function(u){var m=u&&u.__esModule?function(){return u.default}:function(){return u};return h.d(m,"a",m),m},h.o=function(u,m){return Object.prototype.hasOwnProperty.call(u,m)},h.p="",h(h.s=7)}([function(b,l,h){h.d(l,"j",function(){return m}),h.d(l,"d",function(){return _}),h.d(l,"c",function(){return w}),h.d(l,"h",function(){return S}),h.d(l,"b",function(){return I}),h.d(l,"k",function(){return P}),h.d(l,"e",function(){return L}),h.d(l,"g",function(){return V}),h.d(l,"i",function(){return W}),h.d(l,"a",function(){return G}),h.d(l,"f",function(){return H});var u=h(1),m=P(function(j,K){var R=K.length;return P(function(o){for(var y=0;y0&&(I=S),S=wt[st++]);)switch(Ve++,"\n"===S?(tt++,nt=0):nt++,Ce){case R:if("{"===S)Ce=y;else if("["===S)Ce=v;else if(!ht(S))return mt("Non-whitespace before {[.");continue;case N:case y:if(ht(S))continue;if(Ce===N)ke.push(C);else{if("}"===S){V({}),W(),Ce=ke.pop()||o;continue}ke.push(M)}if('"'!==S)return mt('Malformed object key should start with " ');Ce=D;continue;case C:case M:if(ht(S))continue;if(":"===S)Ce===M?(ke.push(M),void 0!==P&&(V({}),L(P),P=void 0),ze++):void 0!==P&&(L(P),P=void 0),Ce=o;else if("}"===S)void 0!==P&&(V(P),W(),P=void 0),W(),ze--,Ce=ke.pop()||o;else{if(","!==S)return mt("Bad object");Ce===M&&ke.push(M),void 0!==P&&(V(P),W(),P=void 0),Ce=N}continue;case v:case o:if(ht(S))continue;if(Ce===v){if(V([]),ze++,Ce=o,"]"===S){W(),ze--,Ce=ke.pop()||o;continue}ke.push(k)}if('"'===S)Ce=D;else if("{"===S)Ce=y;else if("["===S)Ce=v;else if("t"===S)Ce=a;else if("f"===S)Ce=ee;else if("n"===S)Ce=ae;else if("-"===S)pe+=S;else if("0"===S)pe+=S,Ce=20;else{if(-1==="123456789".indexOf(S))return mt("Bad value");pe+=S,Ce=20}continue;case k:if(","===S)ke.push(k),void 0!==P&&(V(P),W(),P=void 0),Ce=o;else{if("]"!==S){if(ht(S))continue;return mt("Bad array")}void 0!==P&&(V(P),W(),P=void 0),W(),ze--,Ce=ke.pop()||o}continue;case D:void 0===P&&(P="");var Ye=st-1;e:for(;;){for(;Ee>0;)if(me+=S,S=wt.charAt(st++),4===Ee?(P+=String.fromCharCode(parseInt(me,16)),Ee=0,Ye=st-1):Ee++,!S)break e;if('"'===S&&!_e){Ce=ke.pop()||o,P+=wt.substring(Ye,st-1);break}if(!("\\"!==S||_e||(_e=!0,P+=wt.substring(Ye,st-1),S=wt.charAt(st++))))break;if(_e){if(_e=!1,"n"===S?P+="\n":"r"===S?P+="\r":"t"===S?P+="\t":"f"===S?P+="\f":"b"===S?P+="\b":"u"===S?(Ee=1,me=""):P+=S,S=wt.charAt(st++),Ye=st-1,S)continue;break}j.lastIndex=st;var gt=j.exec(wt);if(!gt){P+=wt.substring(Ye,(st=wt.length+1)-1);break}if(st=gt.index+1,!(S=wt.charAt(gt.index))){P+=wt.substring(Ye,st-1);break}}continue;case a:if(!S)continue;if("r"!==S)return mt("Invalid true started with t"+S);Ce=B;continue;case B:if(!S)continue;if("u"!==S)return mt("Invalid true started with tr"+S);Ce=Q;continue;case Q:if(!S)continue;if("e"!==S)return mt("Invalid true started with tru"+S);V(!0),W(),Ce=ke.pop()||o;continue;case ee:if(!S)continue;if("a"!==S)return mt("Invalid false started with f"+S);Ce=ce;continue;case ce:if(!S)continue;if("l"!==S)return mt("Invalid false started with fa"+S);Ce=ue;continue;case ue:if(!S)continue;if("s"!==S)return mt("Invalid false started with fal"+S);Ce=we;continue;case we:if(!S)continue;if("e"!==S)return mt("Invalid false started with fals"+S);V(!1),W(),Ce=ke.pop()||o;continue;case ae:if(!S)continue;if("u"!==S)return mt("Invalid null started with n"+S);Ce=Te;continue;case Te:if(!S)continue;if("l"!==S)return mt("Invalid null started with nu"+S);Ce=le;continue;case le:if(!S)continue;if("l"!==S)return mt("Invalid null started with nul"+S);V(null),W(),Ce=ke.pop()||o;continue;case X:if("."!==S)return mt("Leading zero not followed by .");pe+=S,Ce=20;continue;case 20:if(-1!=="0123456789".indexOf(S))pe+=S;else if("."===S){if(-1!==pe.indexOf("."))return mt("Invalid number has two dots");pe+=S}else if("e"===S||"E"===S){if(-1!==pe.indexOf("e")||-1!==pe.indexOf("E"))return mt("Invalid number has two exponential");pe+=S}else if("+"===S||"-"===S){if("e"!==I&&"E"!==I)return mt("Invalid symbol in number");pe+=S}else pe&&(V(parseFloat(pe)),W(),pe=""),st--,Ce=ke.pop()||o;continue;default:return mt("Unknown state: "+Ce)}Ve>=ne&&(Pt=0,void 0!==P&&P.length>H&&(mt("Max buffer length exceeded: textNode"),Pt=Math.max(Pt,P.length)),pe.length>H&&(mt("Max buffer length exceeded: numberNode"),Pt=Math.max(Pt,pe.length)),ne=H-Pt+Ve)}}),_(u.n).on(function(){if(Ce===R)return V({}),W(),void(xe=!0);Ce===o&&0===ze||mt("Unexpected end"),void 0!==P&&(V(P),W(),P=void 0),xe=!0})}},function(b,l,h){h.d(l,"a",function(){return I}),h.d(l,"b",function(){return P});var u=h(19),m=h(3),_=h(2),w=h(20),S=h(0);function I(){return new XMLHttpRequest}function P(L,V,W,G,H,j,K){var R=L(m.m).emit,o=L(m.b).emit,y=0,M=!0;function v(){if("2"===String(V.status)[0]){var N=V.responseText,C=(" "+N.substr(y)).substr(1);C&&R(C),y=Object(_.e)(N)}}function k(N){try{M&&L(m.c).emit(N.status,Object(w.a)(N.getAllResponseHeaders())),M=!1}catch{}}L(m.a).on(function(){V.onreadystatechange=null,V.abort()}),"onprogress"in V&&(V.onprogress=v),V.onreadystatechange=function(){switch(V.readyState){case 2:case 3:return k(V);case 4:k(V),"2"===String(V.status)[0]?(v(),L(m.n).emit()):o(Object(m.o)(V.status,V.responseText))}};try{for(var D in V.open(W,G,!0),j)V.setRequestHeader(D,j[D]);Object(u.a)(window.location,Object(u.b)(G))||V.setRequestHeader("X-Requested-With","XMLHttpRequest"),V.withCredentials=K,V.send(H)}catch(N){window.setTimeout(Object(S.j)(o,Object(m.o)(void 0,void 0,N)),0)}}},function(b,l,h){function u(_,w){function S(I){return String(I.port||{"http:":80,"https:":443}[I.protocol||_.protocol])}return!!(w.protocol&&w.protocol!==_.protocol||w.host&&w.host!==_.host||w.host&&S(w)!==S(_))}function m(_){var w=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(_)||[];return{protocol:w[1]||"",host:w[2]||"",port:w[3]||""}}h.d(l,"a",function(){return u}),h.d(l,"b",function(){return m})},function(b,l,h){function u(m){var _={};return m&&m.split("\r\n").forEach(function(w){var S=w.indexOf(": ");_[w.substring(0,S)]=w.substring(S+2)}),_}h.d(l,"a",function(){return u})}]).default},"object"===(0,g.default)(O)&&"object"===(0,g.default)(q)?q.exports=T():void 0===(f="function"==typeof(d=T)?d.apply(O,[]):d)||(q.exports=f)},21307:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function f(b,l){return Object.prototype.hasOwnProperty.call(b,l)}O.assign=function(b){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var h=l.shift();if(h){if("object"!==(0,d.default)(h))throw new TypeError(h+"must be non-object");for(var u in h)f(h,u)&&(b[u]=h[u])}}return b},O.shrinkBuf=function(b,l){return b.length===l?b:b.subarray?b.subarray(0,l):(b.length=l,b)};var T={arraySet:function(b,l,h,u,m){if(l.subarray&&b.subarray)b.set(l.subarray(h,h+u),m);else for(var _=0;_{"use strict";q.exports=function(O,E,d,x){for(var f=65535&O|0,T=O>>>16&65535|0,g=0;0!==d;){d-=g=d>2e3?2e3:d;do{T=T+(f=f+E[x++]|0)|0}while(--g);f%=65521,T%=65521}return f|T<<16|0}},29806:q=>{"use strict";q.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},28548:q=>{"use strict";var O=function(){for(var E,d=[],x=0;x<256;x++){E=x;for(var f=0;f<8;f++)E=1&E?3988292384^E>>>1:E>>>1;d[x]=E}return d}();q.exports=function(E,d,x,f){var T=O,g=f+x;E^=-1;for(var b=f;b>>8^T[255&(E^d[b])];return-1^E}},54151:(q,O,E)=>{"use strict";var d,x=E(21307),f=E(25280),T=E(57506),g=E(28548),b=E(78021),m=-2,R=258,o=262,M=103,v=113,k=666;function B(me,Ee){return me.msg=b[Ee],Ee}function Q(me){return(me<<1)-(me>4?9:0)}function ee(me){for(var Ee=me.length;--Ee>=0;)me[Ee]=0}function ce(me){var Ee=me.state,ze=Ee.pending;ze>me.avail_out&&(ze=me.avail_out),0!==ze&&(x.arraySet(me.output,Ee.pending_buf,Ee.pending_out,ze,me.next_out),me.next_out+=ze,Ee.pending_out+=ze,me.total_out+=ze,me.avail_out-=ze,Ee.pending-=ze,0===Ee.pending&&(Ee.pending_out=0))}function ue(me,Ee){f._tr_flush_block(me,me.block_start>=0?me.block_start:-1,me.strstart-me.block_start,Ee),me.block_start=me.strstart,ce(me.strm)}function we(me,Ee){me.pending_buf[me.pending++]=Ee}function ae(me,Ee){me.pending_buf[me.pending++]=Ee>>>8&255,me.pending_buf[me.pending++]=255&Ee}function Te(me,Ee){var ze,Ve,nt=me.max_chain_length,tt=me.strstart,mt=me.prev_length,ht=me.nice_match,wt=me.strstart>me.w_size-o?me.strstart-(me.w_size-o):0,Pt=me.window,st=me.w_mask,Ye=me.prev,gt=me.strstart+R,St=Pt[tt+mt-1],Wt=Pt[tt+mt];me.prev_length>=me.good_match&&(nt>>=2),ht>me.lookahead&&(ht=me.lookahead);do{if(Pt[(ze=Ee)+mt]===Wt&&Pt[ze+mt-1]===St&&Pt[ze]===Pt[tt]&&Pt[++ze]===Pt[tt+1]){tt+=2,ze++;do{}while(Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&Pt[++tt]===Pt[++ze]&&ttmt){if(me.match_start=Ee,mt=Ve,Ve>=ht)break;St=Pt[tt+mt-1],Wt=Pt[tt+mt]}}}while((Ee=Ye[Ee&st])>wt&&0!=--nt);return mt<=me.lookahead?mt:me.lookahead}function le(me){var Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye=me.w_size;do{if(nt=me.window_size-me.lookahead-me.strstart,me.strstart>=Ye+(Ye-o)){x.arraySet(me.window,me.window,Ye,Ye,0),me.match_start-=Ye,me.strstart-=Ye,me.block_start-=Ye,Ee=ze=me.hash_size;do{Ve=me.head[--Ee],me.head[Ee]=Ve>=Ye?Ve-Ye:0}while(--ze);Ee=ze=Ye;do{Ve=me.prev[--Ee],me.prev[Ee]=Ve>=Ye?Ve-Ye:0}while(--ze);nt+=Ye}if(0===me.strm.avail_in)break;if(ht=me.window,wt=me.strstart+me.lookahead,st=void 0,(st=(mt=me.strm).avail_in)>(Pt=nt)&&(st=Pt),ze=0===st?0:(mt.avail_in-=st,x.arraySet(ht,mt.input,mt.next_in,st,wt),1===mt.state.wrap?mt.adler=T(mt.adler,ht,st,wt):2===mt.state.wrap&&(mt.adler=g(mt.adler,ht,st,wt)),mt.next_in+=st,mt.total_in+=st,st),me.lookahead+=ze,me.lookahead+me.insert>=3)for(me.ins_h=me.window[tt=me.strstart-me.insert],me.ins_h=(me.ins_h<=3&&(me.ins_h=(me.ins_h<=3)if(Ve=f._tr_tally(me,me.strstart-me.match_start,me.match_length-3),me.lookahead-=me.match_length,me.match_length<=me.max_lazy_match&&me.lookahead>=3){me.match_length--;do{me.strstart++,me.ins_h=(me.ins_h<=3&&(me.ins_h=(me.ins_h<4096)&&(me.match_length=2)),me.prev_length>=3&&me.match_length<=me.prev_length){nt=me.strstart+me.lookahead-3,Ve=f._tr_tally(me,me.strstart-1-me.prev_match,me.prev_length-3),me.lookahead-=me.prev_length-1,me.prev_length-=2;do{++me.strstart<=nt&&(me.ins_h=(me.ins_h<15&&(mt=2,Ve-=16),nt<1||nt>9||8!==ze||Ve<8||Ve>15||Ee<0||Ee>9||tt<0||tt>4)return B(me,m);8===Ve&&(Ve=9);var ht=new _e;return me.state=ht,ht.strm=me,ht.wrap=mt,ht.gzhead=null,ht.w_bits=Ve,ht.w_size=1<me.pending_buf_size-5&&(ze=me.pending_buf_size-5);;){if(me.lookahead<=1){if(le(me),0===me.lookahead&&0===Ee)return 1;if(0===me.lookahead)break}me.strstart+=me.lookahead,me.lookahead=0;var Ve=me.block_start+ze;if((0===me.strstart||me.strstart>=Ve)&&(me.lookahead=me.strstart-Ve,me.strstart=Ve,ue(me,!1),0===me.strm.avail_out)||me.strstart-me.block_start>=me.w_size-o&&(ue(me,!1),0===me.strm.avail_out))return 1}return me.insert=0,4===Ee?(ue(me,!0),0===me.strm.avail_out?3:4):(me.strstart>me.block_start&&ue(me,!1),1)}),new pe(4,4,8,4,X),new pe(4,5,16,8,X),new pe(4,6,32,32,X),new pe(4,4,16,16,ne),new pe(8,16,32,32,ne),new pe(8,16,128,128,ne),new pe(8,32,128,256,ne),new pe(32,128,258,1024,ne),new pe(32,258,258,4096,ne)],O.deflateInit=function(me,Ee){return ke(me,Ee,8,15,8,0)},O.deflateInit2=ke,O.deflateReset=Ce,O.deflateResetKeep=xe,O.deflateSetHeader=function(me,Ee){return me&&me.state?2!==me.state.wrap?m:(me.state.gzhead=Ee,0):m},O.deflate=function(me,Ee){var ze,Ve,nt,tt;if(!me||!me.state||Ee>5||Ee<0)return me?B(me,m):m;if(Ve=me.state,!me.output||!me.input&&0!==me.avail_in||Ve.status===k&&4!==Ee)return B(me,0===me.avail_out?-5:m);if(Ve.strm=me,ze=Ve.last_flush,Ve.last_flush=Ee,42===Ve.status)if(2===Ve.wrap)me.adler=0,we(Ve,31),we(Ve,139),we(Ve,8),Ve.gzhead?(we(Ve,(Ve.gzhead.text?1:0)+(Ve.gzhead.hcrc?2:0)+(Ve.gzhead.extra?4:0)+(Ve.gzhead.name?8:0)+(Ve.gzhead.comment?16:0)),we(Ve,255&Ve.gzhead.time),we(Ve,Ve.gzhead.time>>8&255),we(Ve,Ve.gzhead.time>>16&255),we(Ve,Ve.gzhead.time>>24&255),we(Ve,9===Ve.level?2:Ve.strategy>=2||Ve.level<2?4:0),we(Ve,255&Ve.gzhead.os),Ve.gzhead.extra&&Ve.gzhead.extra.length&&(we(Ve,255&Ve.gzhead.extra.length),we(Ve,Ve.gzhead.extra.length>>8&255)),Ve.gzhead.hcrc&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending,0)),Ve.gzindex=0,Ve.status=69):(we(Ve,0),we(Ve,0),we(Ve,0),we(Ve,0),we(Ve,0),we(Ve,9===Ve.level?2:Ve.strategy>=2||Ve.level<2?4:0),we(Ve,3),Ve.status=v);else{var mt=8+(Ve.w_bits-8<<4)<<8;mt|=(Ve.strategy>=2||Ve.level<2?0:Ve.level<6?1:6===Ve.level?2:3)<<6,0!==Ve.strstart&&(mt|=32),mt+=31-mt%31,Ve.status=v,ae(Ve,mt),0!==Ve.strstart&&(ae(Ve,me.adler>>>16),ae(Ve,65535&me.adler)),me.adler=1}if(69===Ve.status)if(Ve.gzhead.extra){for(nt=Ve.pending;Ve.gzindex<(65535&Ve.gzhead.extra.length)&&(Ve.pending!==Ve.pending_buf_size||(Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),ce(me),nt=Ve.pending,Ve.pending!==Ve.pending_buf_size));)we(Ve,255&Ve.gzhead.extra[Ve.gzindex]),Ve.gzindex++;Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),Ve.gzindex===Ve.gzhead.extra.length&&(Ve.gzindex=0,Ve.status=73)}else Ve.status=73;if(73===Ve.status)if(Ve.gzhead.name){nt=Ve.pending;do{if(Ve.pending===Ve.pending_buf_size&&(Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),ce(me),nt=Ve.pending,Ve.pending===Ve.pending_buf_size)){tt=1;break}tt=Ve.gzindexnt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),0===tt&&(Ve.gzindex=0,Ve.status=91)}else Ve.status=91;if(91===Ve.status)if(Ve.gzhead.comment){nt=Ve.pending;do{if(Ve.pending===Ve.pending_buf_size&&(Ve.gzhead.hcrc&&Ve.pending>nt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),ce(me),nt=Ve.pending,Ve.pending===Ve.pending_buf_size)){tt=1;break}tt=Ve.gzindexnt&&(me.adler=g(me.adler,Ve.pending_buf,Ve.pending-nt,nt)),0===tt&&(Ve.status=M)}else Ve.status=M;if(Ve.status===M&&(Ve.gzhead.hcrc?(Ve.pending+2>Ve.pending_buf_size&&ce(me),Ve.pending+2<=Ve.pending_buf_size&&(we(Ve,255&me.adler),we(Ve,me.adler>>8&255),me.adler=0,Ve.status=v)):Ve.status=v),0!==Ve.pending){if(ce(me),0===me.avail_out)return Ve.last_flush=-1,0}else if(0===me.avail_in&&Q(Ee)<=Q(ze)&&4!==Ee)return B(me,-5);if(Ve.status===k&&0!==me.avail_in)return B(me,-5);if(0!==me.avail_in||0!==Ve.lookahead||0!==Ee&&Ve.status!==k){var ht=2===Ve.strategy?function(wt,Pt){for(var st;;){if(0===wt.lookahead&&(le(wt),0===wt.lookahead)){if(0===Pt)return 1;break}if(wt.match_length=0,st=f._tr_tally(wt,0,wt.window[wt.strstart]),wt.lookahead--,wt.strstart++,st&&(ue(wt,!1),0===wt.strm.avail_out))return 1}return wt.insert=0,4===Pt?(ue(wt,!0),0===wt.strm.avail_out?3:4):wt.last_lit&&(ue(wt,!1),0===wt.strm.avail_out)?1:2}(Ve,Ee):3===Ve.strategy?function(wt,Pt){for(var st,Ye,gt,St,Wt=wt.window;;){if(wt.lookahead<=R){if(le(wt),wt.lookahead<=R&&0===Pt)return 1;if(0===wt.lookahead)break}if(wt.match_length=0,wt.lookahead>=3&&wt.strstart>0&&(Ye=Wt[gt=wt.strstart-1])===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]){St=wt.strstart+R;do{}while(Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&&Ye===Wt[++gt]&>wt.lookahead&&(wt.match_length=wt.lookahead)}if(wt.match_length>=3?(st=f._tr_tally(wt,1,wt.match_length-3),wt.lookahead-=wt.match_length,wt.strstart+=wt.match_length,wt.match_length=0):(st=f._tr_tally(wt,0,wt.window[wt.strstart]),wt.lookahead--,wt.strstart++),st&&(ue(wt,!1),0===wt.strm.avail_out))return 1}return wt.insert=0,4===Pt?(ue(wt,!0),0===wt.strm.avail_out?3:4):wt.last_lit&&(ue(wt,!1),0===wt.strm.avail_out)?1:2}(Ve,Ee):d[Ve.level].func(Ve,Ee);if(3!==ht&&4!==ht||(Ve.status=k),1===ht||3===ht)return 0===me.avail_out&&(Ve.last_flush=-1),0;if(2===ht&&(1===Ee?f._tr_align(Ve):5!==Ee&&(f._tr_stored_block(Ve,0,0,!1),3===Ee&&(ee(Ve.head),0===Ve.lookahead&&(Ve.strstart=0,Ve.block_start=0,Ve.insert=0))),ce(me),0===me.avail_out))return Ve.last_flush=-1,0}return 4!==Ee?0:Ve.wrap<=0?1:(2===Ve.wrap?(we(Ve,255&me.adler),we(Ve,me.adler>>8&255),we(Ve,me.adler>>16&255),we(Ve,me.adler>>24&255),we(Ve,255&me.total_in),we(Ve,me.total_in>>8&255),we(Ve,me.total_in>>16&255),we(Ve,me.total_in>>24&255)):(ae(Ve,me.adler>>>16),ae(Ve,65535&me.adler)),ce(me),Ve.wrap>0&&(Ve.wrap=-Ve.wrap),0!==Ve.pending?0:1)},O.deflateEnd=function(me){var Ee;return me&&me.state?42!==(Ee=me.state.status)&&69!==Ee&&73!==Ee&&91!==Ee&&Ee!==M&&Ee!==v&&Ee!==k?B(me,m):(me.state=null,Ee===v?B(me,-3):0):m},O.deflateSetDictionary=function(me,Ee){var ze,Ve,nt,tt,mt,ht,wt,Pt,st=Ee.length;if(!me||!me.state||2===(tt=(ze=me.state).wrap)||1===tt&&42!==ze.status||ze.lookahead)return m;for(1===tt&&(me.adler=T(me.adler,Ee,st,0)),ze.wrap=0,st>=ze.w_size&&(0===tt&&(ee(ze.head),ze.strstart=0,ze.block_start=0,ze.insert=0),Pt=new x.Buf8(ze.w_size),x.arraySet(Pt,Ee,st-ze.w_size,ze.w_size,0),Ee=Pt,st=ze.w_size),mt=me.avail_in,ht=me.next_in,wt=me.input,me.avail_in=st,me.next_in=0,me.input=Ee,le(ze);ze.lookahead>=3;){Ve=ze.strstart,nt=ze.lookahead-2;do{ze.ins_h=(ze.ins_h<{"use strict";q.exports=function(O,E){var d,x,f,T,g,b,l,h,u,m,_,w,S,I,P,L,V,W,G,H,j,K,R,o,y;o=O.input,f=(x=O.next_in)+(O.avail_in-5),y=O.output,g=(T=O.next_out)-(E-O.avail_out),b=T+(O.avail_out-257),l=(d=O.state).dmax,h=d.wsize,u=d.whave,m=d.wnext,_=d.window,w=d.hold,S=d.bits,I=d.lencode,P=d.distcode,L=(1<>>=G=W>>>24,S-=G,0==(G=W>>>16&255))y[T++]=65535&W;else{if(!(16&G)){if(0==(64&G)){W=I[(65535&W)+(w&(1<>>=G,S-=G),S<15&&(w+=o[x++]<>>=G=W>>>24,S-=G,!(16&(G=W>>>16&255))){if(0==(64&G)){W=P[(65535&W)+(w&(1<l){O.msg="invalid distance too far back",d.mode=30;break e}if(w>>>=G,S-=G,j>(G=T-g)){if((G=j-G)>u&&d.sane){O.msg="invalid distance too far back",d.mode=30;break e}if(K=0,R=_,0===m){if(K+=h-G,G2;)y[T++]=R[K++],y[T++]=R[K++],y[T++]=R[K++],H-=3;H&&(y[T++]=R[K++],H>1&&(y[T++]=R[K++]))}else{K=T-j;do{y[T++]=y[K++],y[T++]=y[K++],y[T++]=y[K++],H-=3}while(H>2);H&&(y[T++]=y[K++],H>1&&(y[T++]=y[K++]))}break}}break}}while(x>3,w&=(1<<(S-=H<<3))-1,O.next_in=x,O.next_out=T,O.avail_in=x{"use strict";var d=E(21307),x=E(57506),f=E(28548),T=E(52399),g=E(51721),u=-2,_=12,w=30;function P(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function L(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function V(M){var v;return M&&M.state?(M.total_in=M.total_out=(v=M.state).total=0,M.msg="",v.wrap&&(M.adler=1&v.wrap),v.mode=1,v.last=0,v.havedict=0,v.dmax=32768,v.head=null,v.hold=0,v.bits=0,v.lencode=v.lendyn=new d.Buf32(852),v.distcode=v.distdyn=new d.Buf32(592),v.sane=1,v.back=-1,0):u}function W(M){var v;return M&&M.state?((v=M.state).wsize=0,v.whave=0,v.wnext=0,V(M)):u}function G(M,v){var k,D;return M&&M.state?(D=M.state,v<0?(k=0,v=-v):(k=1+(v>>4),v<48&&(v&=15)),v&&(v<8||v>15)?u:(null!==D.window&&D.wbits!==v&&(D.window=null),D.wrap=k,D.wbits=v,W(M))):u}function H(M,v){var k,D;return M?(D=new L,M.state=D,D.window=null,0!==(k=G(M,v))&&(M.state=null),k):u}var j,K,R=!0;function o(M){if(R){var v;for(j=new d.Buf32(512),K=new d.Buf32(32),v=0;v<144;)M.lens[v++]=8;for(;v<256;)M.lens[v++]=9;for(;v<280;)M.lens[v++]=7;for(;v<288;)M.lens[v++]=8;for(g(1,M.lens,0,288,j,0,M.work,{bits:9}),v=0;v<32;)M.lens[v++]=5;g(2,M.lens,0,32,K,0,M.work,{bits:5}),R=!1}M.lencode=j,M.lenbits=9,M.distcode=K,M.distbits=5}function y(M,v,k,D){var N,C=M.state;return null===C.window&&(C.wsize=1<=C.wsize?(d.arraySet(C.window,v,k-C.wsize,C.wsize,0),C.wnext=0,C.whave=C.wsize):((N=C.wsize-C.wnext)>D&&(N=D),d.arraySet(C.window,v,k-D,N,C.wnext),(D-=N)?(d.arraySet(C.window,v,k-D,D,0),C.wnext=D,C.whave=C.wsize):(C.wnext+=N,C.wnext===C.wsize&&(C.wnext=0),C.whave>>8&255,k.check=f(k.check,nt,2,0),ee=0,ce=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&ee)<<8)+(ee>>8))%31){M.msg="incorrect header check",k.mode=w;break}if(8!=(15&ee)){M.msg="unknown compression method",k.mode=w;break}if(ce-=4,ke=8+(15&(ee>>>=4)),0===k.wbits)k.wbits=ke;else if(ke>k.wbits){M.msg="invalid window size",k.mode=w;break}k.dmax=1<>8&1),512&k.flags&&(nt[0]=255&ee,nt[1]=ee>>>8&255,k.check=f(k.check,nt,2,0)),ee=0,ce=0,k.mode=3;case 3:for(;ce<32;){if(0===B)break e;B--,ee+=D[C++]<>>8&255,nt[2]=ee>>>16&255,nt[3]=ee>>>24&255,k.check=f(k.check,nt,4,0)),ee=0,ce=0,k.mode=4;case 4:for(;ce<16;){if(0===B)break e;B--,ee+=D[C++]<>8),512&k.flags&&(nt[0]=255&ee,nt[1]=ee>>>8&255,k.check=f(k.check,nt,2,0)),ee=0,ce=0,k.mode=5;case 5:if(1024&k.flags){for(;ce<16;){if(0===B)break e;B--,ee+=D[C++]<>>8&255,k.check=f(k.check,nt,2,0)),ee=0,ce=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&((ae=k.length)>B&&(ae=B),ae&&(k.head&&(ke=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),d.arraySet(k.head.extra,D,C,ae,ke)),512&k.flags&&(k.check=f(k.check,D,ae,C)),B-=ae,C+=ae,k.length-=ae),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(0===B)break e;ae=0;do{ke=D[C+ae++],k.head&&ke&&k.length<65536&&(k.head.name+=String.fromCharCode(ke))}while(ke&&ae>9&1,k.head.done=!0),M.adler=k.check=0,k.mode=_;break;case 10:for(;ce<32;){if(0===B)break e;B--,ee+=D[C++]<>>=7&ce,ce-=7&ce,k.mode=27;break}for(;ce<3;){if(0===B)break e;B--,ee+=D[C++]<>>=1)){case 0:k.mode=14;break;case 1:if(o(k),k.mode=20,6===v){ee>>>=2,ce-=2;break e}break;case 2:k.mode=17;break;case 3:M.msg="invalid block type",k.mode=w}ee>>>=2,ce-=2;break;case 14:for(ee>>>=7&ce,ce-=7&ce;ce<32;){if(0===B)break e;B--,ee+=D[C++]<>>16^65535)){M.msg="invalid stored block lengths",k.mode=w;break}if(k.length=65535&ee,ee=0,ce=0,k.mode=15,6===v)break e;case 15:k.mode=16;case 16:if(ae=k.length){if(ae>B&&(ae=B),ae>Q&&(ae=Q),0===ae)break e;d.arraySet(N,D,C,ae,a),B-=ae,C+=ae,Q-=ae,a+=ae,k.length-=ae;break}k.mode=_;break;case 17:for(;ce<14;){if(0===B)break e;B--,ee+=D[C++]<>>=5)),ce-=5,k.ncode=4+(15&(ee>>>=5)),ee>>>=4,ce-=4,k.nlen>286||k.ndist>30){M.msg="too many length or distance symbols",k.mode=w;break}k.have=0,k.mode=18;case 18:for(;k.have>>=3,ce-=3}for(;k.have<19;)k.lens[tt[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,me=g(0,k.lens,0,19,k.lencode,0,k.work,Ee={bits:k.lenbits}),k.lenbits=Ee.bits,me){M.msg="invalid code lengths set",k.mode=w;break}k.have=0,k.mode=19;case 19:for(;k.have>>16&255,pe=65535&Ve,!((X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>>=X,ce-=X,k.lens[k.have++]=pe;else{if(16===pe){for(ze=X+2;ce>>=X,ce-=X,0===k.have){M.msg="invalid bit length repeat",k.mode=w;break}ke=k.lens[k.have-1],ae=3+(3&ee),ee>>>=2,ce-=2}else if(17===pe){for(ze=X+3;ce>>=X)),ee>>>=3,ce-=3}else{for(ze=X+7;ce>>=X)),ee>>>=7,ce-=7}if(k.have+ae>k.nlen+k.ndist){M.msg="invalid bit length repeat",k.mode=w;break}for(;ae--;)k.lens[k.have++]=ke}}if(k.mode===w)break;if(0===k.lens[256]){M.msg="invalid code -- missing end-of-block",k.mode=w;break}if(k.lenbits=9,me=g(1,k.lens,0,k.nlen,k.lencode,0,k.work,Ee={bits:k.lenbits}),k.lenbits=Ee.bits,me){M.msg="invalid literal/lengths set",k.mode=w;break}if(k.distbits=6,k.distcode=k.distdyn,me=g(2,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,Ee={bits:k.distbits}),k.distbits=Ee.bits,me){M.msg="invalid distances set",k.mode=w;break}if(k.mode=20,6===v)break e;case 20:k.mode=21;case 21:if(B>=6&&Q>=258){M.next_out=a,M.avail_out=Q,M.next_in=C,M.avail_in=B,k.hold=ee,k.bits=ce,T(M,we),a=M.next_out,N=M.output,Q=M.avail_out,C=M.next_in,D=M.input,B=M.avail_in,ee=k.hold,ce=k.bits,k.mode===_&&(k.back=-1);break}for(k.back=0;ne=(Ve=k.lencode[ee&(1<>>16&255,pe=65535&Ve,!((X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>_e)])>>>16&255,pe=65535&Ve,!(_e+(X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>>=_e,ce-=_e,k.back+=_e}if(ee>>>=X,ce-=X,k.back+=X,k.length=pe,0===ne){k.mode=26;break}if(32&ne){k.back=-1,k.mode=_;break}if(64&ne){M.msg="invalid literal/length code",k.mode=w;break}k.extra=15&ne,k.mode=22;case 22:if(k.extra){for(ze=k.extra;ce>>=k.extra,ce-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;ne=(Ve=k.distcode[ee&(1<>>16&255,pe=65535&Ve,!((X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>_e)])>>>16&255,pe=65535&Ve,!(_e+(X=Ve>>>24)<=ce);){if(0===B)break e;B--,ee+=D[C++]<>>=_e,ce-=_e,k.back+=_e}if(ee>>>=X,ce-=X,k.back+=X,64&ne){M.msg="invalid distance code",k.mode=w;break}k.offset=pe,k.extra=15&ne,k.mode=24;case 24:if(k.extra){for(ze=k.extra;ce>>=k.extra,ce-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){M.msg="invalid distance too far back",k.mode=w;break}k.mode=25;case 25:if(0===Q)break e;if(k.offset>(ae=we-Q)){if((ae=k.offset-ae)>k.whave&&k.sane){M.msg="invalid distance too far back",k.mode=w;break}Te=ae>k.wnext?k.wsize-(ae-=k.wnext):k.wnext-ae,ae>k.length&&(ae=k.length),le=k.window}else le=N,Te=a-k.offset,ae=k.length;ae>Q&&(ae=Q),Q-=ae,k.length-=ae;do{N[a++]=le[Te++]}while(--ae);0===k.length&&(k.mode=21);break;case 26:if(0===Q)break e;N[a++]=k.length,Q--,k.mode=21;break;case 27:if(k.wrap){for(;ce<32;){if(0===B)break e;B--,ee|=D[C++]<{"use strict";var d=E(21307),x=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],T=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];q.exports=function(b,l,h,u,m,_,w,S){var I,P,L,V,W,G,H,j,K,R=S.bits,o=0,y=0,M=0,v=0,k=0,D=0,N=0,C=0,a=0,B=0,Q=null,ee=0,ce=new d.Buf16(16),ue=new d.Buf16(16),we=null,ae=0;for(o=0;o<=15;o++)ce[o]=0;for(y=0;y=1&&0===ce[v];v--);if(k>v&&(k=v),0===v)return m[_++]=20971520,m[_++]=20971520,S.bits=1,0;for(M=1;M0&&(0===b||1!==v))return-1;for(ue[1]=0,o=1;o<15;o++)ue[o+1]=ue[o]+ce[o];for(y=0;y852||2===b&&a>592)return 1;for(;;){H=o-N,w[y]G?(j=we[ae+w[y]],K=Q[ee+w[y]]):(j=96,K=0),I=1<>N)+(P-=I)]=H<<24|j<<16|K|0}while(0!==P);for(I=1<>=1;if(0!==I?(B&=I-1,B+=I):B=0,y++,0==--ce[o]){if(o===v)break;o=l[h+w[y]]}if(o>k&&(B&V)!==L){for(0===N&&(N=k),W+=M,C=1<<(D=o-N);D+N852||2===b&&a>592)return 1;m[L=B&V]=k<<24|D<<16|W-_|0}}return 0!==B&&(m[W+B]=o-N<<24|64<<16|0),S.bits=k,0}},78021:q=>{"use strict";q.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},25280:(q,O,E)=>{"use strict";var d=E(21307);function x(xe){for(var Ce=xe.length;--Ce>=0;)xe[Ce]=0}var P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],V=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(576);x(G);var H=new Array(60);x(H);var j=new Array(512);x(j);var K=new Array(256);x(K);var R=new Array(29);x(R);var o,y,M,v=new Array(30);function k(xe,Ce,ke,me,Ee){this.static_tree=xe,this.extra_bits=Ce,this.extra_base=ke,this.elems=me,this.max_length=Ee,this.has_stree=xe&&xe.length}function D(xe,Ce){this.dyn_tree=xe,this.max_code=0,this.stat_desc=Ce}function N(xe){return xe<256?j[xe]:j[256+(xe>>>7)]}function C(xe,Ce){xe.pending_buf[xe.pending++]=255&Ce,xe.pending_buf[xe.pending++]=Ce>>>8&255}function a(xe,Ce,ke){xe.bi_valid>16-ke?(xe.bi_buf|=Ce<>16-xe.bi_valid,xe.bi_valid+=ke-16):(xe.bi_buf|=Ce<>>=1,ke<<=1}while(--Ce>0);return ke>>>1}function ee(xe,Ce,ke){var me,Ee,ze=new Array(16),Ve=0;for(me=1;me<=15;me++)ze[me]=Ve=Ve+ke[me-1]<<1;for(Ee=0;Ee<=Ce;Ee++){var nt=xe[2*Ee+1];0!==nt&&(xe[2*Ee]=Q(ze[nt]++,nt))}}function ce(xe){var Ce;for(Ce=0;Ce<286;Ce++)xe.dyn_ltree[2*Ce]=0;for(Ce=0;Ce<30;Ce++)xe.dyn_dtree[2*Ce]=0;for(Ce=0;Ce<19;Ce++)xe.bl_tree[2*Ce]=0;xe.dyn_ltree[512]=1,xe.opt_len=xe.static_len=0,xe.last_lit=xe.matches=0}function ue(xe){xe.bi_valid>8?C(xe,xe.bi_buf):xe.bi_valid>0&&(xe.pending_buf[xe.pending++]=xe.bi_buf),xe.bi_buf=0,xe.bi_valid=0}function we(xe,Ce,ke,me){var Ee=2*Ce,ze=2*ke;return xe[Ee]>1;ke>=1;ke--)ae(xe,ze,ke);Ee=tt;do{ke=xe.heap[1],xe.heap[1]=xe.heap[xe.heap_len--],ae(xe,ze,1),me=xe.heap[1],xe.heap[--xe.heap_max]=ke,xe.heap[--xe.heap_max]=me,ze[2*Ee]=ze[2*ke]+ze[2*me],xe.depth[Ee]=(xe.depth[ke]>=xe.depth[me]?xe.depth[ke]:xe.depth[me])+1,ze[2*ke+1]=ze[2*me+1]=Ee,xe.heap[1]=Ee++,ae(xe,ze,1)}while(xe.heap_len>=2);xe.heap[--xe.heap_max]=xe.heap[1],function(ht,wt){var Pt,st,Ye,gt,St,Wt,dn=wt.dyn_tree,Nt=wt.max_code,It=wt.stat_desc.static_tree,qt=wt.stat_desc.has_stree,jt=wt.stat_desc.extra_bits,Yt=wt.stat_desc.extra_base,Wn=wt.stat_desc.max_length,fn=0;for(gt=0;gt<=15;gt++)ht.bl_count[gt]=0;for(dn[2*ht.heap[ht.heap_max]+1]=0,Pt=ht.heap_max+1;Pt<573;Pt++)(gt=dn[2*dn[2*(st=ht.heap[Pt])+1]+1]+1)>Wn&&(gt=Wn,fn++),dn[2*st+1]=gt,st>Nt||(ht.bl_count[gt]++,St=0,st>=Yt&&(St=jt[st-Yt]),ht.opt_len+=(Wt=dn[2*st])*(gt+St),qt&&(ht.static_len+=Wt*(It[2*st+1]+St)));if(0!==fn){do{for(gt=Wn-1;0===ht.bl_count[gt];)gt--;ht.bl_count[gt]--,ht.bl_count[gt+1]+=2,ht.bl_count[Wn]--,fn-=2}while(fn>0);for(gt=Wn;0!==gt;gt--)for(st=ht.bl_count[gt];0!==st;)(Ye=ht.heap[--Pt])>Nt||(dn[2*Ye+1]!==gt&&(ht.opt_len+=(gt-dn[2*Ye+1])*dn[2*Ye],dn[2*Ye+1]=gt),st--)}}(xe,Ce),ee(ze,mt,xe.bl_count)}function X(xe,Ce,ke){var me,Ee,ze=-1,Ve=Ce[1],nt=0,tt=7,mt=4;for(0===Ve&&(tt=138,mt=3),Ce[2*(ke+1)+1]=65535,me=0;me<=ke;me++)Ee=Ve,Ve=Ce[2*(me+1)+1],++nt>=7;Ee<30;Ee++)for(v[Ee]=ze<<7,Ce=0;Ce<1<0?(2===xe.strm.data_type&&(xe.strm.data_type=function(nt){var tt,mt=4093624447;for(tt=0;tt<=31;tt++,mt>>>=1)if(1&mt&&0!==nt.dyn_ltree[2*tt])return 0;if(0!==nt.dyn_ltree[18]||0!==nt.dyn_ltree[20]||0!==nt.dyn_ltree[26])return 1;for(tt=32;tt<256;tt++)if(0!==nt.dyn_ltree[2*tt])return 1;return 0}(xe)),le(xe,xe.l_desc),le(xe,xe.d_desc),Ve=function(nt){var tt;for(X(nt,nt.dyn_ltree,nt.l_desc.max_code),X(nt,nt.dyn_dtree,nt.d_desc.max_code),le(nt,nt.bl_desc),tt=18;tt>=3&&0===nt.bl_tree[2*W[tt]+1];tt--);return nt.opt_len+=3*(tt+1)+5+5+4,tt}(xe),(ze=xe.static_len+3+7>>>3)<=(Ee=xe.opt_len+3+7>>>3)&&(Ee=ze)):Ee=ze=ke+5,ke+4<=Ee&&-1!==Ce?_e(xe,Ce,ke,me):4===xe.strategy||ze===Ee?(a(xe,2+(me?1:0),3),Te(xe,G,H)):(a(xe,4+(me?1:0),3),function(nt,tt,mt,ht){var wt;for(a(nt,tt-257,5),a(nt,mt-1,5),a(nt,ht-4,4),wt=0;wt>>8&255,xe.pending_buf[xe.d_buf+2*xe.last_lit+1]=255&Ce,xe.pending_buf[xe.l_buf+xe.last_lit]=255&ke,xe.last_lit++,0===Ce?xe.dyn_ltree[2*ke]++:(xe.matches++,Ce--,xe.dyn_ltree[2*(K[ke]+256+1)]++,xe.dyn_dtree[2*N(Ce)]++),xe.last_lit===xe.lit_bufsize-1},O._tr_align=function(xe){var Ce;a(xe,2,3),B(xe,256,G),16===(Ce=xe).bi_valid?(C(Ce,Ce.bi_buf),Ce.bi_buf=0,Ce.bi_valid=0):Ce.bi_valid>=8&&(Ce.pending_buf[Ce.pending++]=255&Ce.bi_buf,Ce.bi_buf>>=8,Ce.bi_valid-=8)}},47563:q=>{"use strict";q.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},81823:(q,O,E)=>{"use strict";var d=E(68357);O.certificate=E(41320);var x=d.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});O.RSAPrivateKey=x;var f=d.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});O.RSAPublicKey=f;var T=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(g),this.key("subjectPublicKey").bitstr())});O.PublicKey=T;var g=d.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),b=d.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(g),this.key("subjectPrivateKey").octstr())});O.PrivateKey=b;var l=d.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});O.EncryptedPrivateKey=l;var h=d.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});O.DSAPrivateKey=h,O.DSAparam=d.define("DSAparam",function(){this.int()});var u=d.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(m),this.key("publicKey").optional().explicit(1).bitstr())});O.ECPrivateKey=u;var m=d.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});O.signature=d.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},41320:(q,O,E)=>{"use strict";var d=E(68357),x=d.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),f=d.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),T=d.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),g=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(T),this.key("subjectPublicKey").bitstr())}),b=d.define("RelativeDistinguishedName",function(){this.setof(f)}),l=d.define("RDNSequence",function(){this.seqof(b)}),h=d.define("Name",function(){this.choice({rdnSequence:this.use(l)})}),u=d.define("Validity",function(){this.seq().obj(this.key("notBefore").use(x),this.key("notAfter").use(x))}),m=d.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),_=d.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(T),this.key("issuer").use(h),this.key("validity").use(u),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(g),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(m).optional())}),w=d.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(_),this.key("signatureAlgorithm").use(T),this.key("signatureValue").bitstr())});q.exports=w},64988:(q,O,E)=>{"use strict";var d=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,x=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,f=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,T=E(27085),g=E(98073),b=E(48850).Buffer;q.exports=function(l,h){var u,m=l.toString(),_=m.match(d);if(_){var w="aes"+_[1],S=b.from(_[2],"hex"),I=b.from(_[3].replace(/[\r\n]/g,""),"base64"),P=T(h,S.slice(0,8),parseInt(_[1],10)).key,L=[],V=g.createDecipheriv(w,P,S);L.push(V.update(I)),L.push(V.final()),u=b.concat(L)}else{var W=m.match(f);u=b.from(W[2].replace(/[\r\n]/g,""),"base64")}return{tag:m.match(x)[1],data:u}}},27552:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(81823),f=E(22562),T=E(64988),g=E(98073),b=E(54192),l=E(48850).Buffer;function h(u){var m;"object"!==(0,d.default)(u)||l.isBuffer(u)||(m=u.passphrase,u=u.key),"string"==typeof u&&(u=l.from(u));var _,w,L,V,W,G,H,j,K,R,o,y,M,S=T(u,m),I=S.tag,P=S.data;switch(I){case"CERTIFICATE":w=x.certificate.decode(P,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(w||(w=x.PublicKey.decode(P,"der")),_=w.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return x.RSAPublicKey.decode(w.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return w.subjectPrivateKey=w.subjectPublicKey,{type:"ec",data:w};case"1.2.840.10040.4.1":return w.algorithm.params.pub_key=x.DSAparam.decode(w.subjectPublicKey.data,"der"),{type:"dsa",data:w.algorithm.params};default:throw new Error("unknown key id "+_)}case"ENCRYPTED PRIVATE KEY":V=m,W=(L=P=x.EncryptedPrivateKey.decode(P,"der")).algorithm.decrypt.kde.kdeparams.salt,G=parseInt(L.algorithm.decrypt.kde.kdeparams.iters.toString(),10),H=f[L.algorithm.decrypt.cipher.algo.join(".")],j=L.algorithm.decrypt.cipher.iv,K=L.subjectPrivateKey,R=parseInt(H.split("-")[1],10)/8,o=b.pbkdf2Sync(V,W,G,R,"sha1"),y=g.createDecipheriv(H,o,j),(M=[]).push(y.update(K)),M.push(y.final()),P=l.concat(M);case"PRIVATE KEY":switch(_=(w=x.PrivateKey.decode(P,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return x.RSAPrivateKey.decode(w.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:w.algorithm.curve,privateKey:x.ECPrivateKey.decode(w.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return w.algorithm.params.priv_key=x.DSAparam.decode(w.subjectPrivateKey,"der"),{type:"dsa",params:w.algorithm.params};default:throw new Error("unknown key id "+_)}case"RSA PUBLIC KEY":return x.RSAPublicKey.decode(P,"der");case"RSA PRIVATE KEY":return x.RSAPrivateKey.decode(P,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:x.DSAPrivateKey.decode(P,"der")};case"EC PRIVATE KEY":return{curve:(P=x.ECPrivateKey.decode(P,"der")).parameters.value,privateKey:P.privateKey};default:throw new Error("unknown key type "+I)}}q.exports=h,h.signature=x.signature},48209:q=>{"use strict";var O=function(E){return E.replace(/^\s+|\s+$/g,"")};q.exports=function(E){if(!E)return{};for(var x={},f=O(E).split("\n"),T=0;T{"use strict";O.pbkdf2=E(1882),O.pbkdf2Sync=E(1658)},1882:(q,O,E)=>{"use strict";var d,x,f=E(48850).Buffer,T=E(63127),g=E(77401),b=E(1658),l=E(98398),h=E.g.crypto&&E.g.crypto.subtle,u={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function _(){return x||(x=E.g.process&&E.g.process.nextTick?E.g.process.nextTick:E.g.queueMicrotask?E.g.queueMicrotask:E.g.setImmediate?E.g.setImmediate:E.g.setTimeout)}function w(S,I,P,L,V){return h.importKey("raw",S,{name:"PBKDF2"},!1,["deriveBits"]).then(function(W){return h.deriveBits({name:"PBKDF2",salt:I,iterations:P,hash:{name:V}},W,L<<3)}).then(function(W){return f.from(W)})}q.exports=function(S,I,P,L,V,W){"function"==typeof V&&(W=V,V=void 0);var H,j,G=u[(V=V||"sha1").toLowerCase()];if(G&&"function"==typeof E.g.Promise){if(T(P,L),S=l(S,g,"Password"),I=l(I,g,"Salt"),"function"!=typeof W)throw new Error("No callback provided to pbkdf2");H=function(H){if(E.g.process&&!E.g.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(void 0!==m[H])return m[H];var j=w(d=d||f.alloc(8),d,10,128,H).then(function(){return!0}).catch(function(){return!1});return m[H]=j,j}(G).then(function(H){return H?w(S,I,P,L,G):b(S,I,P,L,V)}),j=W,H.then(function(K){_()(function(){j(null,K)})},function(K){_()(function(){j(K)})})}else _()(function(){var H;try{H=b(S,I,P,L,V)}catch(j){return W(j)}W(null,H)})}},77401:(q,O,E)=>{"use strict";var d,x=E(19142);d=E.g.process&&E.g.process.browser?"utf-8":E.g.process&&E.g.process.version?parseInt(x.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",q.exports=d},63127:q=>{"use strict";var O=Math.pow(2,30)-1;q.exports=function(E,d){if("number"!=typeof E)throw new TypeError("Iterations not a number");if(E<0)throw new TypeError("Bad iterations");if("number"!=typeof d)throw new TypeError("Key length not a number");if(d<0||d>O||d!=d)throw new TypeError("Bad key length")}},1658:(q,O,E)=>{"use strict";var d=E(55349),x=E(26707),f=E(51708),T=E(48850).Buffer,g=E(63127),b=E(77401),l=E(98398),h=T.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function m(_,w,S){var H,I="rmd160"===(H=_)||"ripemd160"===H?function(j){return(new x).update(j).digest()}:"md5"===H?d:function(j){return f(H).update(j).digest()},P="sha512"===_||"sha384"===_?128:64;w.length>P?w=I(w):w.length{"use strict";var d=E(48850).Buffer;q.exports=function(x,f,T){if(d.isBuffer(x))return x;if("string"==typeof x)return d.from(x,f);if(ArrayBuffer.isView(x))return d.from(x.buffer);throw new TypeError(T+" must be a string, a Buffer, a typed array or a DataView")}},19142:q=>{"use strict";var O,E,d=q.exports={};function x(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}function T(S){if(O===setTimeout)return setTimeout(S,0);if((O===x||!O)&&setTimeout)return O=setTimeout,setTimeout(S,0);try{return O(S,0)}catch{try{return O.call(null,S,0)}catch{return O.call(this,S,0)}}}!function(){try{O="function"==typeof setTimeout?setTimeout:x}catch{O=x}try{E="function"==typeof clearTimeout?clearTimeout:f}catch{E=f}}();var g,b=[],l=!1,h=-1;function u(){l&&g&&(l=!1,g.length?b=g.concat(b):h=-1,b.length&&m())}function m(){if(!l){var S=T(u);l=!0;for(var I=b.length;I;){for(g=b,b=[];++h1)for(var P=1;P{"use strict";O.publicEncrypt=E(82466),O.privateDecrypt=E(53144),O.privateEncrypt=function(d,x){return O.publicEncrypt(d,x,!0)},O.publicDecrypt=function(d,x){return O.privateDecrypt(d,x,!0)}},26873:(q,O,E)=>{"use strict";var d=E(35866),x=E(48850).Buffer;function f(T){var g=x.allocUnsafe(4);return g.writeUInt32BE(T,0),g}q.exports=function(T,g){for(var b,l=x.alloc(0),h=0;l.length{"use strict";var d=E(27552),x=E(26873),f=E(27223),T=E(31734),g=E(99782),b=E(35866),l=E(2561),h=E(48850).Buffer;q.exports=function(u,m,_){var w;w=u.padding?u.padding:_?1:4;var S,I=d(u),P=I.modulus.byteLength();if(m.length>P||new T(m).cmp(I.modulus)>=0)throw new Error("decryption error");S=_?l(new T(m),I):g(m,I);var L=h.alloc(P-S.length);if(S=h.concat([L,S],P),4===w)return function(V,W){var G=V.modulus.byteLength(),H=b("sha1").update(h.alloc(0)).digest(),j=H.length;if(0!==W[0])throw new Error("decryption error");var K=W.slice(1,j+1),R=W.slice(j+1),o=f(K,x(R,j)),y=f(R,x(o,G-j-1));if(function(v,k){v=h.from(v),k=h.from(k);var D=0,N=v.length;v.length!==k.length&&(D++,N=Math.min(v.length,k.length));for(var C=-1;++C=W.length){K++;break}var R=W.slice(2,j-1);if(("0002"!==H.toString("hex")&&!G||"0001"!==H.toString("hex")&&G)&&K++,R.length<8&&K++,K)throw new Error("decryption error");return W.slice(j)}(0,S,_);if(3===w)return S;throw new Error("unknown padding")}},82466:(q,O,E)=>{"use strict";var d=E(27552),x=E(75010),f=E(35866),T=E(26873),g=E(27223),b=E(31734),l=E(2561),h=E(99782),u=E(48850).Buffer;q.exports=function(m,_,w){var S;S=m.padding?m.padding:w?1:4;var I,P=d(m);if(4===S)I=function(L,V){var W=L.modulus.byteLength(),G=V.length,H=f("sha1").update(u.alloc(0)).digest(),j=H.length,K=2*j;if(G>W-K-2)throw new Error("message too long");var R=u.alloc(W-G-K-2),o=W-j-1,y=x(j),M=g(u.concat([H,R,u.alloc(1,1),V],o),T(y,o)),v=g(y,T(M,j));return new b(u.concat([u.alloc(1),v,M],W))}(P,_);else if(1===S)I=function(L,V,W){var G,H=V.length,j=L.modulus.byteLength();if(H>j-11)throw new Error("message too long");return G=W?u.alloc(j-H-3,255):function(K){for(var R,o=u.allocUnsafe(K),y=0,M=x(2*K),v=0;y=0)throw new Error("data too long for modulus")}return w?h(I,P):l(I,P)}},2561:(q,O,E)=>{"use strict";var d=E(31734),x=E(48850).Buffer;q.exports=function(f,T){return x.from(f.toRed(d.mont(T.modulus)).redPow(new d(T.publicExponent)).fromRed().toArray())}},27223:q=>{"use strict";q.exports=function(O,E){for(var d=O.length,x=-1;++x{"use strict";var d=E(28847)(E(3355)),x=E(22028),f=E(33103),T=E(80034);function g(u,m){return m.encode?m.strict?x(u):encodeURIComponent(u):u}function b(u){return Array.isArray(u)?u.sort():"object"===(0,d.default)(u)?b(Object.keys(u)).sort(function(m,_){return Number(m)-Number(_)}).map(function(m){return u[m]}):u}function l(u){var m=u.indexOf("?");return-1===m?"":u.slice(m+1)}function h(u,m){var _=function(S){var I;switch(S.arrayFormat){case"index":return function(P,L,V){I=/\[(\d*)\]$/.exec(P),P=P.replace(/\[\d*\]$/,""),I?(void 0===V[P]&&(V[P]={}),V[P][I[1]]=L):V[P]=L};case"bracket":return function(P,L,V){I=/(\[\])$/.exec(P),V[P=P.replace(/\[\]$/,"")]=I?void 0!==V[P]?[].concat(V[P],L):[L]:L};default:return function(P,L,V){V[P]=void 0!==V[P]?[].concat(V[P],L):L}}}(m=f({arrayFormat:"none"},m)),w=Object.create(null);return"string"!=typeof u?w:(u=u.trim().replace(/^[?#&]/,""))?(u.split("&").forEach(function(S){var I=S.replace(/\+/g," ").split("="),P=I.shift(),L=I.length>0?I.join("="):void 0;L=void 0===L?null:T(L),_(T(P),L,w)}),Object.keys(w).sort().reduce(function(S,I){var P=w[I];return S[I]=Boolean(P)&&"object"===(0,d.default)(P)&&!Array.isArray(P)?b(P):P,S},Object.create(null))):w}O.extract=l,O.parse=h,O.stringify=function(u,m){!1===(m=f({encode:!0,strict:!0,arrayFormat:"none"},m)).sort&&(m.sort=function(){});var _=function(w){switch(w.arrayFormat){case"index":return function(S,I,P){return null===I?[g(S,w),"[",P,"]"].join(""):[g(S,w),"[",g(P,w),"]=",g(I,w)].join("")};case"bracket":return function(S,I){return null===I?g(S,w):[g(S,w),"[]=",g(I,w)].join("")};default:return function(S,I){return null===I?g(S,w):[g(S,w),"=",g(I,w)].join("")}}}(m);return u?Object.keys(u).sort(m.sort).map(function(w){var S=u[w];if(void 0===S)return"";if(null===S)return g(w,m);if(Array.isArray(S)){var I=[];return S.slice().forEach(function(P){void 0!==P&&I.push(_(w,P,I.length))}),I.join("&")}return g(w,m)+"="+g(S,m)}).filter(function(w){return w.length>0}).join("&"):""},O.parseUrl=function(u,m){return{url:u.split("?")[0]||"",query:h(l(u),m)}}},75010:(q,O,E)=>{"use strict";var d=E(19142),x=65536,f=E(48850).Buffer,T=E.g.crypto||E.g.msCrypto;q.exports=T&&T.getRandomValues?function(g,b){if(g>4294967295)throw new RangeError("requested too many random bytes");var l=f.allocUnsafe(g);if(g>0)if(g>x)for(var h=0;h{"use strict";var d=E(19142);function x(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var f=E(48850),T=E(75010),g=f.Buffer,b=f.kMaxLength,l=E.g.crypto||E.g.msCrypto,h=Math.pow(2,32)-1;function u(w,S){if("number"!=typeof w||w!=w)throw new TypeError("offset must be a number");if(w>h||w<0)throw new TypeError("offset must be a uint32");if(w>b||w>S)throw new RangeError("offset out of range")}function m(w,S,I){if("number"!=typeof w||w!=w)throw new TypeError("size must be a number");if(w>h||w<0)throw new TypeError("size must be a uint32");if(w+S>I||w>b)throw new RangeError("buffer too small")}function _(w,S,I,P){if(d.browser){var V=new Uint8Array(w.buffer,S,I);return l.getRandomValues(V),P?void d.nextTick(function(){P(null,w)}):w}if(!P)return T(I).copy(w,S),w;T(I,function(W,G){if(W)return P(W);G.copy(w,S),P(null,w)})}l&&l.getRandomValues||!d.browser?(O.randomFill=function(w,S,I,P){if(!(g.isBuffer(w)||w instanceof E.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof S)P=S,S=0,I=w.length;else if("function"==typeof I)P=I,I=w.length-S;else if("function"!=typeof P)throw new TypeError('"cb" argument must be a function');return u(S,w.length),m(I,S,w.length),_(w,S,I,P)},O.randomFillSync=function(w,S,I){if(void 0===S&&(S=0),!(g.isBuffer(w)||w instanceof E.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return u(S,w.length),void 0===I&&(I=w.length-S),m(I,S,w.length),_(w,S,I)}):(O.randomFill=x,O.randomFillSync=x)},79024:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x={};function f(g,b,l){l||(l=Error);var h=function(u){var m,_;function w(S,I,P){return u.call(this,"string"==typeof b?b:b(S,I,P))||this}return _=u,(m=w).prototype=Object.create(_.prototype),m.prototype.constructor=m,m.__proto__=_,w}(l);h.prototype.name=l.name,h.prototype.code=g,x[g]=h}function T(g,b){if(Array.isArray(g)){var l=g.length;return g=g.map(function(h){return String(h)}),l>2?"one of ".concat(b," ").concat(g.slice(0,l-1).join(", "),", or ")+g[l-1]:2===l?"one of ".concat(b," ").concat(g[0]," or ").concat(g[1]):"of ".concat(b," ").concat(g[0])}return"of ".concat(b," ").concat(String(g))}f("ERR_INVALID_OPT_VALUE",function(g,b){return'The value "'+b+'" is invalid for option "'+g+'"'},TypeError),f("ERR_INVALID_ARG_TYPE",function(g,b,l){var h,m,_,w,I,L;if("string"==typeof b&&"not "===b.substr(0,"not ".length)?(h="must not be",b=b.replace(/^not /,"")):h="must be",I=g,(void 0===L||L>I.length)&&(L=I.length)," argument"===I.substring(L-" argument".length,L))m="The ".concat(g," ").concat(h," ").concat(T(b,"type"));else{var S=("number"!=typeof w&&(w=0),w+".".length>(_=g).length||-1===_.indexOf(".",w)?"argument":"property");m='The "'.concat(g,'" ').concat(S," ").concat(h," ").concat(T(b,"type"))}return m+". Received type ".concat((0,d.default)(l))},TypeError),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),f("ERR_METHOD_NOT_IMPLEMENTED",function(g){return"The "+g+" method is not implemented"}),f("ERR_STREAM_PREMATURE_CLOSE","Premature close"),f("ERR_STREAM_DESTROYED",function(g){return"Cannot call "+g+" after a stream was destroyed"}),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),f("ERR_STREAM_WRITE_AFTER_END","write after end"),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_UNKNOWN_ENCODING",function(g){return"Unknown encoding: "+g},TypeError),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),q.exports.q=x},76884:(q,O,E)=>{"use strict";var d=E(19142),x=Object.keys||function(_){var w=[];for(var S in _)w.push(S);return w};q.exports=h;var f=E(6297),T=E(71471);E(41736)(h,f);for(var g=x(T.prototype),b=0;b{"use strict";q.exports=x;var d=E(99154);function x(f){if(!(this instanceof x))return new x(f);d.call(this,f)}E(41736)(x,d),x.prototype._transform=function(f,T,g){g(null,f)}},6297:(q,O,E)=>{"use strict";var d,x=E(19142);q.exports=R,R.ReadableState=K,E(38291);var f,T=function(Te,le){return Te.listeners(le).length},g=E(37144),b=E(29033).Buffer,l=E.g.Uint8Array||function(){},h=E(94616);f=h&&h.debuglog?h.debuglog("stream"):function(){};var u,m,_,w=E(25392),S=E(57572),I=E(6756).getHighWaterMark,P=E(79024).q,L=P.ERR_INVALID_ARG_TYPE,V=P.ERR_STREAM_PUSH_AFTER_EOF,W=P.ERR_METHOD_NOT_IMPLEMENTED,G=P.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;E(41736)(R,g);var H=S.errorOrDestroy,j=["error","close","destroy","pause","resume"];function K(Te,le,X){d=d||E(76884),"boolean"!=typeof X&&(X=le instanceof d),this.objectMode=!!(Te=Te||{}).objectMode,X&&(this.objectMode=this.objectMode||!!Te.readableObjectMode),this.highWaterMark=I(this,Te,"readableHighWaterMark",X),this.buffer=new w,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!==Te.emitClose,this.autoDestroy=!!Te.autoDestroy,this.destroyed=!1,this.defaultEncoding=Te.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Te.encoding&&(u||(u=E(23462).s),this.decoder=new u(Te.encoding),this.encoding=Te.encoding)}function R(Te){if(d=d||E(76884),!(this instanceof R))return new R(Te);this._readableState=new K(Te,this,this instanceof d),this.readable=!0,Te&&("function"==typeof Te.read&&(this._read=Te.read),"function"==typeof Te.destroy&&(this._destroy=Te.destroy)),g.call(this)}function o(Te,le,X,ne,pe){f("readableAddChunk",le);var _e,Ce,ke,me,Ee,xe=Te._readableState;if(null===le)xe.reading=!1,function(Ce,ke){if(f("onEofChunk"),!ke.ended){if(ke.decoder){var me=ke.decoder.end();me&&me.length&&(ke.buffer.push(me),ke.length+=ke.objectMode?1:me.length)}ke.ended=!0,ke.sync?k(Ce):(ke.needReadable=!1,ke.emittedReadable||(ke.emittedReadable=!0,D(Ce)))}}(Te,xe);else if(pe||(Ce=xe,b.isBuffer(Ee=ke=le)||Ee instanceof l||"string"==typeof ke||void 0===ke||Ce.objectMode||(me=new L("chunk",["string","Buffer","Uint8Array"],ke)),_e=me),_e)H(Te,_e);else if(xe.objectMode||le&&le.length>0)if("string"==typeof le||xe.objectMode||Object.getPrototypeOf(le)===b.prototype||(le=function(Ce){return b.from(Ce)}(le)),ne)xe.endEmitted?H(Te,new G):y(Te,xe,le,!0);else if(xe.ended)H(Te,new V);else{if(xe.destroyed)return!1;xe.reading=!1,xe.decoder&&!X?(le=xe.decoder.write(le),xe.objectMode||0!==le.length?y(Te,xe,le,!1):N(Te,xe)):y(Te,xe,le,!1)}else ne||(xe.reading=!1,N(Te,xe));return!xe.ended&&(xe.lengthle.highWaterMark&&(le.highWaterMark=((X=Te)>=M?X=M:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X)),Te<=le.length?Te:le.ended?le.length:(le.needReadable=!0,0));var X}function k(Te){var le=Te._readableState;f("emitReadable",le.needReadable,le.emittedReadable),le.needReadable=!1,le.emittedReadable||(f("emitReadable",le.flowing),le.emittedReadable=!0,x.nextTick(D,Te))}function D(Te){var le=Te._readableState;f("emitReadable_",le.destroyed,le.length,le.ended),le.destroyed||!le.length&&!le.ended||(Te.emit("readable"),le.emittedReadable=!1),le.needReadable=!le.flowing&&!le.ended&&le.length<=le.highWaterMark,ee(Te)}function N(Te,le){le.readingMore||(le.readingMore=!0,x.nextTick(C,Te,le))}function C(Te,le){for(;!le.reading&&!le.ended&&(le.length0,le.resumeScheduled&&!le.paused?le.flowing=!0:Te.listenerCount("data")>0&&Te.resume()}function B(Te){f("readable nexttick read 0"),Te.read(0)}function Q(Te,le){f("resume",le.reading),le.reading||Te.read(0),le.resumeScheduled=!1,Te.emit("resume"),ee(Te),le.flowing&&!le.reading&&Te.read(0)}function ee(Te){var le=Te._readableState;for(f("flow",le.flowing);le.flowing&&null!==Te.read(););}function ce(Te,le){return 0===le.length?null:(le.objectMode?X=le.buffer.shift():!Te||Te>=le.length?(X=le.decoder?le.buffer.join(""):1===le.buffer.length?le.buffer.first():le.buffer.concat(le.length),le.buffer.clear()):X=le.buffer.consume(Te,le.decoder),X);var X}function ue(Te){var le=Te._readableState;f("endReadable",le.endEmitted),le.endEmitted||(le.ended=!0,x.nextTick(we,le,Te))}function we(Te,le){if(f("endReadableNT",Te.endEmitted,Te.length),!Te.endEmitted&&0===Te.length&&(Te.endEmitted=!0,le.readable=!1,le.emit("end"),Te.autoDestroy)){var X=le._writableState;(!X||X.autoDestroy&&X.finished)&&le.destroy()}}function ae(Te,le){for(var X=0,ne=Te.length;X=le.highWaterMark:le.length>0)||le.ended))return f("read: emitReadable",le.length,le.ended),0===le.length&&le.ended?ue(this):k(this),null;if(0===(Te=v(Te,le))&&le.ended)return 0===le.length&&ue(this),null;var ne,pe=le.needReadable;return f("need readable",pe),(0===le.length||le.length-Te0?ce(Te,le):null)?(le.needReadable=le.length<=le.highWaterMark,Te=0):(le.length-=Te,le.awaitDrain=0),0===le.length&&(le.ended||(le.needReadable=!0),X!==Te&&le.ended&&ue(this)),null!==ne&&this.emit("data",ne),ne},R.prototype._read=function(Te){H(this,new W("_read()"))},R.prototype.pipe=function(Te,le){var X=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=Te;break;case 1:ne.pipes=[ne.pipes,Te];break;default:ne.pipes.push(Te)}ne.pipesCount+=1,f("pipe count=%d opts=%j",ne.pipesCount,le);var pe=le&&!1===le.end||Te===x.stdout||Te===x.stderr?Ve:_e;function _e(){f("onend"),Te.end()}ne.endEmitted?x.nextTick(pe):X.once("end",pe),Te.on("unpipe",function nt(tt,mt){f("onunpipe"),tt===X&&mt&&!1===mt.hasUnpiped&&(mt.hasUnpiped=!0,f("cleanup"),Te.removeListener("close",Ee),Te.removeListener("finish",ze),Te.removeListener("drain",xe),Te.removeListener("error",me),Te.removeListener("unpipe",nt),X.removeListener("end",_e),X.removeListener("end",Ve),X.removeListener("data",ke),Ce=!0,!ne.awaitDrain||Te._writableState&&!Te._writableState.needDrain||xe())});var nt,xe=(nt=X,function(){var tt=nt._readableState;f("pipeOnDrain",tt.awaitDrain),tt.awaitDrain&&tt.awaitDrain--,0===tt.awaitDrain&&T(nt,"data")&&(tt.flowing=!0,ee(nt))});Te.on("drain",xe);var Ce=!1;function ke(nt){f("ondata");var tt=Te.write(nt);f("dest.write",tt),!1===tt&&((1===ne.pipesCount&&ne.pipes===Te||ne.pipesCount>1&&-1!==ae(ne.pipes,Te))&&!Ce&&(f("false write response, pause",ne.awaitDrain),ne.awaitDrain++),X.pause())}function me(nt){f("onerror",nt),Ve(),Te.removeListener("error",me),0===T(Te,"error")&&H(Te,nt)}function Ee(){Te.removeListener("finish",ze),Ve()}function ze(){f("onfinish"),Te.removeListener("close",Ee),Ve()}function Ve(){f("unpipe"),X.unpipe(Te)}return X.on("data",ke),function(nt,tt,mt){if("function"==typeof nt.prependListener)return nt.prependListener(tt,mt);nt._events&&nt._events[tt]?Array.isArray(nt._events[tt])?nt._events[tt].unshift(mt):nt._events[tt]=[mt,nt._events[tt]]:nt.on(tt,mt)}(Te,"error",me),Te.once("close",Ee),Te.once("finish",ze),Te.emit("pipe",X),ne.flowing||(f("pipe resume"),X.resume()),Te},R.prototype.unpipe=function(Te){var le=this._readableState,X={hasUnpiped:!1};if(0===le.pipesCount)return this;if(1===le.pipesCount)return Te&&Te!==le.pipes||(Te||(Te=le.pipes),le.pipes=null,le.pipesCount=0,le.flowing=!1,Te&&Te.emit("unpipe",this,X)),this;if(!Te){var ne=le.pipes,pe=le.pipesCount;le.pipes=null,le.pipesCount=0,le.flowing=!1;for(var _e=0;_e0,!1!==ne.flowing&&this.resume()):"readable"===Te&&(ne.endEmitted||ne.readableListening||(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,f("on readable",ne.length,ne.reading),ne.length?k(this):ne.reading||x.nextTick(B,this))),X},R.prototype.removeListener=function(Te,le){var X=g.prototype.removeListener.call(this,Te,le);return"readable"===Te&&x.nextTick(a,this),X},R.prototype.removeAllListeners=function(Te){var le=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==Te&&void 0!==Te||x.nextTick(a,this),le},R.prototype.resume=function(){var X,Te=this._readableState;return Te.flowing||(f("resume"),Te.flowing=!Te.readableListening,this,(X=Te).resumeScheduled||(X.resumeScheduled=!0,x.nextTick(Q,this,X))),Te.paused=!1,this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(Te){var le=this,X=this._readableState,ne=!1;for(var pe in Te.on("end",function(){if(f("wrapped end"),X.decoder&&!X.ended){var xe=X.decoder.end();xe&&xe.length&&le.push(xe)}le.push(null)}),Te.on("data",function(xe){f("wrapped data"),X.decoder&&(xe=X.decoder.write(xe)),X.objectMode&&null==xe||(X.objectMode||xe&&xe.length)&&(le.push(xe)||(ne=!0,Te.pause()))}),Te)void 0===this[pe]&&"function"==typeof Te[pe]&&(this[pe]=function(xe){return function(){return Te[xe].apply(Te,arguments)}}(pe));for(var _e=0;_e{"use strict";q.exports=h;var d=E(79024).q,x=d.ERR_METHOD_NOT_IMPLEMENTED,f=d.ERR_MULTIPLE_CALLBACK,T=d.ERR_TRANSFORM_ALREADY_TRANSFORMING,g=d.ERR_TRANSFORM_WITH_LENGTH_0,b=E(76884);function l(_,w){var S=this._transformState;S.transforming=!1;var I=S.writecb;if(null===I)return this.emit("error",new f);S.writechunk=null,S.writecb=null,null!=w&&this.push(w),I(_);var P=this._readableState;P.reading=!1,(P.needReadable||P.length{"use strict";var d,x=E(19142);function f(N){var C=this;this.next=null,this.entry=null,this.finish=function(){!function(a,B,Q){var ee=a.entry;for(a.entry=null;ee;){var ce=ee.callback;B.pendingcb--,ce(void 0),ee=ee.next}B.corkedRequestsFree.next=a}(C,N)}}q.exports=R,R.WritableState=K;var T,g={deprecate:E(96219)},b=E(37144),l=E(29033).Buffer,h=E.g.Uint8Array||function(){},u=E(57572),m=E(6756).getHighWaterMark,_=E(79024).q,w=_.ERR_INVALID_ARG_TYPE,S=_.ERR_METHOD_NOT_IMPLEMENTED,I=_.ERR_MULTIPLE_CALLBACK,P=_.ERR_STREAM_CANNOT_PIPE,L=_.ERR_STREAM_DESTROYED,V=_.ERR_STREAM_NULL_VALUES,W=_.ERR_STREAM_WRITE_AFTER_END,G=_.ERR_UNKNOWN_ENCODING,H=u.errorOrDestroy;function j(){}function K(N,C,a){d=d||E(76884),"boolean"!=typeof a&&(a=C instanceof d),this.objectMode=!!(N=N||{}).objectMode,a&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=m(this,N,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===N.decodeStrings),this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){!function(ee,ce){var le,ue=ee._writableState,we=ue.sync,ae=ue.writecb;if("function"!=typeof ae)throw new I;if((le=ue).writing=!1,le.writecb=null,le.length-=le.writelen,le.writelen=0,ce)!function(le,X,ne,pe,_e){--X.pendingcb,ne?(x.nextTick(_e,pe),x.nextTick(D,le,X),le._writableState.errorEmitted=!0,H(le,pe)):(_e(pe),le._writableState.errorEmitted=!0,H(le,pe),D(le,X))}(ee,ue,we,ce,ae);else{var Te=v(ue)||ee.destroyed;Te||ue.corked||ue.bufferProcessing||!ue.bufferedRequest||M(ee,ue),we?x.nextTick(y,ee,ue,Te,ae):y(ee,ue,Te,ae)}}(C,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==N.emitClose,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}function R(N){var C=this instanceof(d=d||E(76884));if(!C&&!T.call(R,this))return new R(N);this._writableState=new K(N,this,C),this.writable=!0,N&&("function"==typeof N.write&&(this._write=N.write),"function"==typeof N.writev&&(this._writev=N.writev),"function"==typeof N.destroy&&(this._destroy=N.destroy),"function"==typeof N.final&&(this._final=N.final)),b.call(this)}function o(N,C,a,B,Q,ee,ce){C.writelen=B,C.writecb=ce,C.writing=!0,C.sync=!0,C.destroyed?C.onwrite(new L("write")):a?N._writev(Q,C.onwrite):N._write(Q,ee,C.onwrite),C.sync=!1}function y(N,C,a,B){var Q,ee;a||(Q=N,0===(ee=C).length&&ee.needDrain&&(ee.needDrain=!1,Q.emit("drain"))),C.pendingcb--,B(),D(N,C)}function M(N,C){C.bufferProcessing=!0;var a=C.bufferedRequest;if(N._writev&&a&&a.next){var Q=new Array(C.bufferedRequestCount),ee=C.corkedRequestsFree;ee.entry=a;for(var ce=0,ue=!0;a;)Q[ce]=a,a.isBuf||(ue=!1),a=a.next,ce+=1;Q.allBuffers=ue,o(N,C,!0,C.length,Q,"",ee.finish),C.pendingcb++,C.lastBufferedRequest=null,ee.next?(C.corkedRequestsFree=ee.next,ee.next=null):C.corkedRequestsFree=new f(C),C.bufferedRequestCount=0}else{for(;a;){var we=a.chunk;if(o(N,C,!1,C.objectMode?1:we.length,we,a.encoding,a.callback),a=a.next,C.bufferedRequestCount--,C.writing)break}null===a&&(C.lastBufferedRequest=null)}C.bufferedRequest=a,C.bufferProcessing=!1}function v(N){return N.ending&&0===N.length&&null===N.bufferedRequest&&!N.finished&&!N.writing}function k(N,C){N._final(function(a){C.pendingcb--,a&&H(N,a),C.prefinished=!0,N.emit("prefinish"),D(N,C)})}function D(N,C){var Q,ee,a=v(C);if(a&&(Q=N,(ee=C).prefinished||ee.finalCalled||("function"!=typeof Q._final||ee.destroyed?(ee.prefinished=!0,Q.emit("prefinish")):(ee.pendingcb++,ee.finalCalled=!0,x.nextTick(k,Q,ee))),0===C.pendingcb&&(C.finished=!0,N.emit("finish"),C.autoDestroy))){var B=N._readableState;(!B||B.autoDestroy&&B.endEmitted)&&N.destroy()}return a}E(41736)(R,b),K.prototype.getBuffer=function(){for(var N=this.bufferedRequest,C=[];N;)C.push(N),N=N.next;return C},function(){try{Object.defineProperty(K.prototype,"buffer",{get:g.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(N){return!!T.call(this,N)||this===R&&N&&N._writableState instanceof K}})):T=function(N){return N instanceof this},R.prototype.pipe=function(){H(this,new P)},R.prototype.write=function(N,C,a){var B,ue,we,ae,Q=this._writableState,ee=!1,ce=!Q.objectMode&&(l.isBuffer(B=N)||B instanceof h);return ce&&!l.isBuffer(N)&&(N=l.from(N)),"function"==typeof C&&(a=C,C=null),ce?C="buffer":C||(C=Q.defaultEncoding),"function"!=typeof a&&(a=j),Q.ending?(ue=this,we=a,ae=new W,H(ue,ae),x.nextTick(we,ae)):(ce||function(ue,we,ae,Te){var le;return null===ae?le=new V:"string"==typeof ae||we.objectMode||(le=new w("chunk",["string","Buffer"],ae)),!le||(H(ue,le),x.nextTick(Te,le),!1)}(this,Q,N,a))&&(Q.pendingcb++,ee=function(ue,we,ae,Te,le,X){if(!ae){var ne=(ke=Te,(Ce=we).objectMode||!1===Ce.decodeStrings||"string"!=typeof ke||(ke=l.from(ke,le)),ke);Te!==ne&&(ae=!0,le="buffer",Te=ne)}var Ce,ke,pe=we.objectMode?1:Te.length;we.length+=pe;var _e=we.length-1))throw new G(N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(N,C,a){a(new S("_write()"))},R.prototype._writev=null,R.prototype.end=function(N,C,a){var Q,ee,ce,B=this._writableState;return"function"==typeof N?(a=N,N=null,C=null):"function"==typeof C&&(a=C,C=null),null!=N&&this.write(N,C),B.corked&&(B.corked=1,this.uncork()),B.ending||(Q=this,ce=a,(ee=B).ending=!0,D(Q,ee),ce&&(ee.finished?x.nextTick(ce):Q.once("finish",ce)),ee.ended=!0,Q.writable=!1),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),R.prototype.destroy=u.destroy,R.prototype._undestroy=u.undestroy,R.prototype._destroy=function(N,C){C(N)}},32317:(q,O,E)=>{"use strict";var d,x=E(19142);function f(V,W,G){return W in V?Object.defineProperty(V,W,{value:G,enumerable:!0,configurable:!0,writable:!0}):V[W]=G,V}var T=E(5831),g=Symbol("lastResolve"),b=Symbol("lastReject"),l=Symbol("error"),h=Symbol("ended"),u=Symbol("lastPromise"),m=Symbol("handlePromise"),_=Symbol("stream");function w(V,W){return{value:V,done:W}}function S(V){var W=V[g];if(null!==W){var G=V[_].read();null!==G&&(V[u]=null,V[g]=null,V[b]=null,W(w(G,!1)))}}function I(V){x.nextTick(S,V)}var P=Object.getPrototypeOf(function(){}),L=Object.setPrototypeOf((f(d={get stream(){return this[_]},next:function(){var V=this,W=this[l];if(null!==W)return Promise.reject(W);if(this[h])return Promise.resolve(w(void 0,!0));if(this[_].destroyed)return new Promise(function(K,R){x.nextTick(function(){V[l]?R(V[l]):K(w(void 0,!0))})});var G,K,R,H=this[u];if(H)G=new Promise((K=H,R=this,function(o,y){K.then(function(){R[h]?o(w(void 0,!0)):R[m](o,y)},y)}));else{var j=this[_].read();if(null!==j)return Promise.resolve(w(j,!1));G=new Promise(this[m])}return this[u]=G,G}},Symbol.asyncIterator,function(){return this}),f(d,"return",function(){var V=this;return new Promise(function(W,G){V[_].destroy(null,function(H){H?G(H):W(w(void 0,!0))})})}),d),P);q.exports=function(V){var W,G=Object.create(L,(f(W={},_,{value:V,writable:!0}),f(W,g,{value:null,writable:!0}),f(W,b,{value:null,writable:!0}),f(W,l,{value:null,writable:!0}),f(W,h,{value:V._readableState.endEmitted,writable:!0}),f(W,m,{value:function(H,j){var K=G[_].read();K?(G[u]=null,G[g]=null,G[b]=null,H(w(K,!1))):(G[g]=H,G[b]=j)},writable:!0}),W));return G[u]=null,T(V,function(H){if(H&&"ERR_STREAM_PREMATURE_CLOSE"!==H.code){var j=G[b];return null!==j&&(G[u]=null,G[g]=null,G[b]=null,j(H)),void(G[l]=H)}var K=G[g];null!==K&&(G[u]=null,G[g]=null,G[b]=null,K(w(void 0,!0))),G[h]=!0}),V.on("readable",I.bind(null,G)),G}},25392:(q,O,E)=>{"use strict";function d(l,h){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(l);h&&(m=m.filter(function(_){return Object.getOwnPropertyDescriptor(l,_).enumerable})),u.push.apply(u,m)}return u}function x(l,h,u){return h in l?Object.defineProperty(l,h,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[h]=u,l}var T=E(29033).Buffer,g=E(52361).inspect,b=g&&g.custom||"inspect";q.exports=function(){function l(){(function(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}var u;return u=[{key:"push",value:function(m){var _={data:m,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length}},{key:"unshift",value:function(m){var _={data:m,next:this.head};0===this.length&&(this.tail=_),this.head=_,++this.length}},{key:"shift",value:function(){if(0!==this.length){var m=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(0===this.length)return"";for(var _=this.head,w=""+_.data;_=_.next;)w+=m+_.data;return w}},{key:"concat",value:function(m){if(0===this.length)return T.alloc(0);for(var I=T.allocUnsafe(m>>>0),P=this.head,L=0;P;)T.prototype.copy.call(P.data,I,L),L+=P.data.length,P=P.next;return I}},{key:"consume",value:function(m,_){var w;return mI.length?I.length:m;if(S+=P===I.length?I:I.slice(0,m),0==(m-=P)){P===I.length?(++w,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=I.slice(P));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(m){var _=T.allocUnsafe(m),w=this.head,S=1;for(w.data.copy(_),m-=w.data.length;w=w.next;){var I=w.data,P=m>I.length?I.length:m;if(I.copy(_,_.length-m,0,P),0==(m-=P)){P===I.length?(++S,this.head=w.next?w.next:this.tail=null):(this.head=w,w.data=I.slice(P));break}++S}return this.length-=S,_}},{key:b,value:function(m,_){return g(this,function(w){for(var S=1;S{"use strict";var d=E(19142);function x(g,b){T(g,b),f(g)}function f(g){g._writableState&&!g._writableState.emitClose||g._readableState&&!g._readableState.emitClose||g.emit("close")}function T(g,b){g.emit("error",b)}q.exports={destroy:function(g,b){var l=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(b?b(g):g&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(T,this,g)):d.nextTick(T,this,g)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(m){!b&&m?l._writableState?l._writableState.errorEmitted?d.nextTick(f,l):(l._writableState.errorEmitted=!0,d.nextTick(x,l,m)):d.nextTick(x,l,m):b?(d.nextTick(f,l),b(m)):d.nextTick(f,l)}),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(g,b){var l=g._readableState,h=g._writableState;l&&l.autoDestroy||h&&h.autoDestroy?g.destroy(b):g.emit("error",b)}}},5831:(q,O,E)=>{"use strict";var d=E(79024).q.ERR_STREAM_PREMATURE_CLOSE;function x(){}q.exports=function f(T,g,b){if("function"==typeof g)return f(T,null,g);var V,W;g||(g={}),V=b||x,W=!1,b=function(){if(!W){W=!0;for(var G=arguments.length,H=new Array(G),j=0;j{"use strict";q.exports=function(){throw new Error("Readable.from is not available in the browser")}},60384:(q,O,E)=>{"use strict";var d,x=E(79024).q,f=x.ERR_MISSING_ARGS,T=x.ERR_STREAM_DESTROYED;function g(h){if(h)throw h}function b(h){h()}function l(h,u){return h.pipe(u)}q.exports=function(){for(var h=arguments.length,u=new Array(h),m=0;m0,function(V){_||(_=V),V&&S.forEach(b),L||(S.forEach(b),w(_))})});return u.reduce(l)}},6756:(q,O,E)=>{"use strict";var d=E(79024).q.ERR_INVALID_OPT_VALUE;q.exports={getHighWaterMark:function(x,f,T,g){var l,b=null!=(l=f).highWaterMark?l.highWaterMark:g?l[T]:null;if(null!=b){if(!isFinite(b)||Math.floor(b)!==b||b<0)throw new d(g?T:"highWaterMark",b);return Math.floor(b)}return x.objectMode?16:16384}}},37144:(q,O,E)=>{"use strict";q.exports=E(38291).EventEmitter},86505:(q,O,E)=>{"use strict";(O=q.exports=E(6297)).Stream=O,O.Readable=O,O.Writable=E(71471),O.Duplex=E(76884),O.Transform=E(99154),O.PassThrough=E(53582),O.finished=E(5831),O.pipeline=E(60384)},26707:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(41736),f=E(22353),T=new Array(16),g=[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],b=[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],l=[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],h=[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],u=[0,1518500249,1859775393,2400959708,2840853838],m=[1352829926,1548603684,1836072691,2053994217,0];function _(){f.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function w(W,G){return W<>>32-G}function S(W,G,H,j,K,R,o,y){return w(W+(G^H^j)+R+o|0,y)+K|0}function I(W,G,H,j,K,R,o,y){return w(W+(G&H|~G&j)+R+o|0,y)+K|0}function P(W,G,H,j,K,R,o,y){return w(W+((G|~H)^j)+R+o|0,y)+K|0}function L(W,G,H,j,K,R,o,y){return w(W+(G&j|H&~j)+R+o|0,y)+K|0}function V(W,G,H,j,K,R,o,y){return w(W+(G^(H|~j))+R+o|0,y)+K|0}x(_,f),_.prototype._update=function(){for(var W=T,G=0;G<16;++G)W[G]=this._block.readInt32LE(4*G);for(var H=0|this._a,j=0|this._b,K=0|this._c,R=0|this._d,o=0|this._e,y=0|this._a,M=0|this._b,v=0|this._c,k=0|this._d,D=0|this._e,N=0;N<80;N+=1){var C,a;N<16?(C=S(H,j,K,R,o,W[g[N]],u[0],l[N]),a=V(y,M,v,k,D,W[b[N]],m[0],h[N])):N<32?(C=I(H,j,K,R,o,W[g[N]],u[1],l[N]),a=L(y,M,v,k,D,W[b[N]],m[1],h[N])):N<48?(C=P(H,j,K,R,o,W[g[N]],u[2],l[N]),a=P(y,M,v,k,D,W[b[N]],m[2],h[N])):N<64?(C=L(H,j,K,R,o,W[g[N]],u[3],l[N]),a=I(y,M,v,k,D,W[b[N]],m[3],h[N])):(C=V(H,j,K,R,o,W[g[N]],u[4],l[N]),a=S(y,M,v,k,D,W[b[N]],m[4],h[N])),H=o,o=R,R=w(K,10),K=j,j=C,y=D,D=k,k=w(v,10),v=M,M=a}var B=this._b+K+k|0;this._b=this._c+R+D|0,this._c=this._d+o+y|0,this._d=this._e+H+M|0,this._e=this._a+j+v|0,this._a=B},_.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var W=d.alloc?d.alloc(20):new d(20);return W.writeInt32LE(this._a,0),W.writeInt32LE(this._b,4),W.writeInt32LE(this._c,8),W.writeInt32LE(this._d,12),W.writeInt32LE(this._e,16),W},q.exports=_},6905:(q,O,E)=>{"use strict";var d=E(29033).Buffer;Object.defineProperty(O,"__esModule",{value:!0}),O.getLength=O.decode=O.encode=void 0;var x,f=(x=E(31734))&&x.__esModule?x:{default:x};function T(m,_){if("0"===m[0]&&"0"===m[1])throw new Error("invalid RLP: extra zeros");return parseInt(m,_)}function g(m,_){if(m<56)return d.from([m+_]);var w=h(m),S=h(_+55+w.length/2);return d.from(S+w,"hex")}function b(m){var _,w,S,I,P,L=[],V=m[0];if(V<=127)return{data:m.slice(0,1),remainder:m.slice(1)};if(V<=183){if(_=V-127,S=128===V?d.from([]):m.slice(1,_),2===_&&S[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:S,remainder:m.slice(_)}}if(V<=191){if(m.length-1<(w=V-182))throw new Error("invalid RLP: not enough bytes for string length");if((_=T(m.slice(1,w).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((S=m.slice(w,_+w)).length<_)throw new Error("invalid RLP: not enough bytes for string");return{data:S,remainder:m.slice(_+w)}}if(V<=247){for(I=m.slice(1,_=V-191);I.length;)P=b(I),L.push(P.data),I=P.remainder;return{data:L,remainder:m.slice(_)}}var W=(w=V-246)+(_=T(m.slice(1,w).toString("hex"),16));if(W>m.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(I=m.slice(w,W)).length)throw new Error("invalid rlp, List has a invalid length");for(;I.length;)P=b(I),L.push(P.data),I=P.remainder;return{data:L,remainder:m.slice(W)}}function l(m){return"0x"===m.slice(0,2)}function h(m){if(m<0)throw new Error("Invalid integer as argument, must be unsigned!");var _=m.toString(16);return _.length%2?"0"+_:_}function u(m){if(!d.isBuffer(m)){if("string"==typeof m)return l(m)?d.from((w="string"!=typeof(S=m)?S:l(S)?S.slice(2):S).length%2?"0"+w:w,"hex"):d.from(m);if("number"==typeof m||"bigint"==typeof m)return m?(_=h(m),d.from(_,"hex")):d.from([]);if(null==m)return d.from([]);if(m instanceof Uint8Array)return d.from(m);if(f.default.isBN(m))return d.from(m.toArray());throw new Error("invalid type")}var _,w,S;return m}O.encode=function m(_){if(Array.isArray(_)){for(var w=[],S=0;S<_.length;S++)w.push(m(_[S]));var I=d.concat(w);return d.concat([g(I.length,192),I])}var P=u(_);return 1===P.length&&P[0]<128?P:d.concat([g(P.length,128),P])},O.decode=function(m,_){if(void 0===_&&(_=!1),!m||0===m.length)return d.from([]);var w=b(u(m));if(_)return w;if(0!==w.remainder.length)throw new Error("invalid remainder");return w.data},O.getLength=function(m){if(!m||0===m.length)return d.from([]);var _=u(m),w=_[0];if(w<=127)return _.length;if(w<=183)return w-127;if(w<=191)return w-182;if(w<=247)return w-191;var S=w-246;return S+T(_.slice(1,S).toString("hex"),16)}},48850:(q,O,E)=>{"use strict";var d=E(29033),x=d.Buffer;function f(g,b){for(var l in g)b[l]=g[l]}function T(g,b,l){return x(g,b,l)}x.from&&x.alloc&&x.allocUnsafe&&x.allocUnsafeSlow?q.exports=d:(f(d,O),O.Buffer=T),T.prototype=Object.create(x.prototype),f(x,T),T.from=function(g,b,l){if("number"==typeof g)throw new TypeError("Argument must not be a number");return x(g,b,l)},T.alloc=function(g,b,l){if("number"!=typeof g)throw new TypeError("Argument must be a number");var h=x(g);return void 0!==b?"string"==typeof l?h.fill(b,l):h.fill(b):h.fill(0),h},T.allocUnsafe=function(g){if("number"!=typeof g)throw new TypeError("Argument must be a number");return x(g)},T.allocUnsafeSlow=function(g){if("number"!=typeof g)throw new TypeError("Argument must be a number");return d.SlowBuffer(g)}},11755:(q,O,E)=>{"use strict";var d,x=E(19142),f=E(28847)(E(3355)),T=E(29033),g=T.Buffer,b={};for(d in T)T.hasOwnProperty(d)&&"SlowBuffer"!==d&&"Buffer"!==d&&(b[d]=T[d]);var l=b.Buffer={};for(d in g)g.hasOwnProperty(d)&&"allocUnsafe"!==d&&"allocUnsafeSlow"!==d&&(l[d]=g[d]);if(b.Buffer.prototype=g.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(h,u,m){if("number"==typeof h)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,f.default)(h));if(h&&void 0===h.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,f.default)(h));return g(h,u,m)}),l.alloc||(l.alloc=function(h,u,m){if("number"!=typeof h)throw new TypeError('The "size" argument must be of type number. Received type '+(0,f.default)(h));if(h<0||h>=2*(1<<30))throw new RangeError('The value "'+h+'" is invalid for option "size"');var _=g(h);return u&&0!==u.length?"string"==typeof m?_.fill(u,m):_.fill(u):_.fill(0),_}),!b.kStringMaxLength)try{b.kStringMaxLength=x.binding("buffer").kStringMaxLength}catch{}b.constants||(b.constants={MAX_LENGTH:b.kMaxLength},b.kStringMaxLength&&(b.constants.MAX_STRING_LENGTH=b.kStringMaxLength)),q.exports=b},67799:q=>{"use strict";!function(O){var E=2147483647;function d(w){var 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]),I=1779033703,P=3144134277,L=1013904242,V=2773480762,W=1359893119,G=2600822924,H=528734635,j=1541459225,K=new Uint32Array(64);function R(N){for(var C=0,a=N.length;a>=64;){var B=I,Q=P,ee=L,ce=V,ue=W,we=G,ae=H,Te=j,le=void 0,X=void 0,ne=void 0,pe=void 0,_e=void 0;for(X=0;X<16;X++)K[X]=(255&N[ne=C+4*X])<<24|(255&N[ne+1])<<16|(255&N[ne+2])<<8|255&N[ne+3];for(X=16;X<64;X++)pe=((le=K[X-2])>>>17|le<<15)^(le>>>19|le<<13)^le>>>10,_e=((le=K[X-15])>>>7|le<<25)^(le>>>18|le<<14)^le>>>3,K[X]=(pe+K[X-7]|0)+(_e+K[X-16]|0)|0;for(X=0;X<64;X++)pe=(((ue>>>6|ue<<26)^(ue>>>11|ue<<21)^(ue>>>25|ue<<7))+(ue&we^~ue&ae)|0)+(Te+(S[X]+K[X]|0)|0)|0,_e=((B>>>2|B<<30)^(B>>>13|B<<19)^(B>>>22|B<<10))+(B&Q^B&ee^Q&ee)|0,Te=ae,ae=we,we=ue,ue=ce+pe|0,ce=ee,ee=Q,Q=B,B=pe+_e|0;I=I+B|0,P=P+Q|0,L=L+ee|0,V=V+ce|0,W=W+ue|0,G=G+we|0,H=H+ae|0,j=j+Te|0,C+=64,a-=64}}R(w);var o,y=w.length%64,M=w.length/536870912|0,v=w.length<<3,k=y<56?56:120,D=w.slice(w.length-y,w.length);for(D.push(128),o=y+1;o>>24&255),D.push(M>>>16&255),D.push(M>>>8&255),D.push(M>>>0&255),D.push(v>>>24&255),D.push(v>>>16&255),D.push(v>>>8&255),D.push(v>>>0&255),R(D),[I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,V>>>24&255,V>>>16&255,V>>>8&255,V>>>0&255,W>>>24&255,W>>>16&255,W>>>8&255,W>>>0&255,G>>>24&255,G>>>16&255,G>>>8&255,G>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255]}function x(w,S,I){w=w.length<=64?w:d(w);var P,L=64+S.length+4,V=new Array(L),W=new Array(64),G=[];for(P=0;P<64;P++)V[P]=54;for(P=0;P=L-4;j--){if(V[j]++,V[j]<=255)return;V[j]=0}}for(;I>=32;)H(),G=G.concat(d(W.concat(d(V)))),I-=32;return I>0&&(H(),G=G.concat(d(W.concat(d(V))).slice(0,I))),G}function f(w,S,I,P,L){var V;for(l(w,16*(2*I-1),L,0,16),V=0;V<2*I;V++)b(w,16*V,L,16),g(L,P),l(L,0,w,S+16*V,16);for(V=0;V>>32-S}function g(w,S){l(w,0,S,0,16);for(var I=8;I>0;I-=2)S[4]^=T(S[0]+S[12],7),S[8]^=T(S[4]+S[0],9),S[12]^=T(S[8]+S[4],13),S[0]^=T(S[12]+S[8],18),S[9]^=T(S[5]+S[1],7),S[13]^=T(S[9]+S[5],9),S[1]^=T(S[13]+S[9],13),S[5]^=T(S[1]+S[13],18),S[14]^=T(S[10]+S[6],7),S[2]^=T(S[14]+S[10],9),S[6]^=T(S[2]+S[14],13),S[10]^=T(S[6]+S[2],18),S[3]^=T(S[15]+S[11],7),S[7]^=T(S[3]+S[15],9),S[11]^=T(S[7]+S[3],13),S[15]^=T(S[11]+S[7],18),S[1]^=T(S[0]+S[3],7),S[2]^=T(S[1]+S[0],9),S[3]^=T(S[2]+S[1],13),S[0]^=T(S[3]+S[2],18),S[6]^=T(S[5]+S[4],7),S[7]^=T(S[6]+S[5],9),S[4]^=T(S[7]+S[6],13),S[5]^=T(S[4]+S[7],18),S[11]^=T(S[10]+S[9],7),S[8]^=T(S[11]+S[10],9),S[9]^=T(S[8]+S[11],13),S[10]^=T(S[9]+S[8],18),S[12]^=T(S[15]+S[14],7),S[13]^=T(S[12]+S[15],9),S[14]^=T(S[13]+S[12],13),S[15]^=T(S[14]+S[13],18);for(var P=0;P<16;++P)w[P]+=S[P]}function b(w,S,I,P){for(var L=0;L=256)return!1}return!0}function u(w,S){if("number"!=typeof w||w%1)throw new Error("invalid "+S);return w}function m(w,S,I,P,L,V,W){if(I=u(I,"N"),P=u(P,"r"),L=u(L,"p"),V=u(V,"dkLen"),0===I||0!=(I&I-1))throw new Error("N must be power of 2");if(I>E/128/P)throw new Error("N too large");if(P>E/128/L)throw new Error("r too large");if(!h(w))throw new Error("password must be an array or buffer");if(w=Array.prototype.slice.call(w),!h(S))throw new Error("salt must be an array or buffer");S=Array.prototype.slice.call(S);for(var G=x(w,S,128*L*P),H=new Uint32Array(32*L*P),j=0;jce&&(le=ce);for(var X=0;Xce&&(le=ce);for(var pe=0;pe>0&255),G.push(H[Ce]>>8&255),G.push(H[Ce]>>16&255),G.push(H[Ce]>>24&255);var ke=x(w,G,V);return W&&W(null,1,ke),ke}W&&ue(Te)};if(!W)for(;;){var ae=we();if(null!=ae)return ae}we()}q.exports={scrypt:function(w,S,I,P,L,V,W){return new Promise(function(G,H){var j=0;W&&W(0),m(w,S,I,P,L,V,function(K,R,o){if(K)H(K);else if(o)W&&1!==j&&W(1),G(new Uint8Array(o));else if(W&&R!==j)return j=R,W(R)})})},syncScrypt:function(w,S,I,P,L,V){return new Uint8Array(m(w,S,I,P,L,V))}}}()},57902:(q,O,E)=>{"use strict";q.exports=E(36922)(E(38123))},38123:(q,O,E)=>{"use strict";var d=new(E(36597).ec)("secp256k1"),x=d.curve,f=x.n.constructor;function T(b){var l=b[0];switch(l){case 2:case 3:return 33!==b.length?null:function(h,u){var m=new f(u);if(m.cmp(x.p)>=0)return null;var _=(m=m.toRed(x.red)).redSqr().redIMul(m).redIAdd(x.b).redSqrt();return 3===h!==_.isOdd()&&(_=_.redNeg()),d.keyPair({pub:{x:m,y:_}})}(l,b.subarray(1,33));case 4:case 6:case 7:return 65!==b.length?null:function(h,u,m){var _=new f(u),w=new f(m);if(_.cmp(x.p)>=0||w.cmp(x.p)>=0||(_=_.toRed(x.red),w=w.toRed(x.red),(6===h||7===h)&&w.isOdd()!==(7===h)))return null;var S=_.redSqr().redIMul(_);return w.redSqr().redISub(S.redIAdd(x.b)).isZero()?d.keyPair({pub:{x:_,y:w}}):null}(l,b.subarray(1,33),b.subarray(33,65));default:return null}}function g(b,l){for(var h=l.encode(null,33===b.length),u=0;u=0||(h.iadd(new f(b)),h.cmp(x.n)>=0&&h.isub(x.n),h.isZero()))return 1;var u=h.toArrayLike(Uint8Array,"be",32);return b.set(u),0},privateKeyTweakMul:function(b,l){var h=new f(l);if(h.cmp(x.n)>=0||h.isZero())return 1;h.imul(new f(b)),h.cmp(x.n)>=0&&(h=h.umod(x.n));var u=h.toArrayLike(Uint8Array,"be",32);return b.set(u),0},publicKeyVerify:function(b){return null===T(b)?1:0},publicKeyCreate:function(b,l){var h=new f(l);return h.cmp(x.n)>=0||h.isZero()?1:(g(b,d.keyFromPrivate(l).getPublic()),0)},publicKeyConvert:function(b,l){var h=T(l);return null===h?1:(g(b,h.getPublic()),0)},publicKeyNegate:function(b,l){var h=T(l);if(null===h)return 1;var u=h.getPublic();return u.y=u.y.redNeg(),g(b,u),0},publicKeyCombine:function(b,l){for(var h=new Array(l.length),u=0;u=0)return 2;var m=u.getPublic().add(x.g.mul(h));return m.isInfinity()?2:(g(b,m),0)},publicKeyTweakMul:function(b,l,h){var u=T(l);return null===u?1:(h=new f(h)).cmp(x.n)>=0||h.isZero()?2:(g(b,u.getPublic().mul(h)),0)},signatureNormalize:function(b){var l=new f(b.subarray(0,32)),h=new f(b.subarray(32,64));return l.cmp(x.n)>=0||h.cmp(x.n)>=0?1:(1===h.cmp(d.nh)&&b.set(x.n.sub(h).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(b,l){var h=l.subarray(0,32),u=l.subarray(32,64);if(new f(h).cmp(x.n)>=0||new f(u).cmp(x.n)>=0)return 1;var m=b.output,_=m.subarray(4,37);_[0]=0,_.set(h,1);for(var w=33,S=0;w>1&&0===_[S]&&!(128&_[S+1]);--w,++S);if(128&(_=_.subarray(S))[0]||w>1&&0===_[0]&&!(128&_[1]))return 1;var I=m.subarray(39,72);I[0]=0,I.set(u,1);for(var P=33,L=0;P>1&&0===I[L]&&!(128&I[L+1]);--P,++L);return 128&(I=I.subarray(L))[0]||P>1&&0===I[0]&&!(128&I[1])?1:(b.outputlen=6+w+P,m[0]=48,m[1]=b.outputlen-2,m[2]=2,m[3]=_.length,m.set(_,4),m[4+w]=2,m[5+w]=I.length,m.set(I,6+w),0)},signatureImport:function(b,l){if(l.length<8||l.length>72||48!==l[0]||l[1]!==l.length-2||2!==l[2])return 1;var h=l[3];if(0===h||5+h>=l.length||2!==l[4+h])return 1;var u=l[5+h];if(0===u||6+h+u!==l.length||128&l[4]||h>1&&0===l[4]&&!(128&l[5])||128&l[h+6]||u>1&&0===l[h+6]&&!(128&l[h+7]))return 1;var m=l.subarray(4,4+h);if(33===m.length&&0===m[0]&&(m=m.subarray(1)),m.length>32)return 1;var _=l.subarray(6+h);if(33===_.length&&0===_[0]&&(_=_.slice(1)),_.length>32)throw new Error("S length is too long");var w=new f(m);w.cmp(x.n)>=0&&(w=new f(0));var S=new f(l.subarray(6+h));return S.cmp(x.n)>=0&&(S=new f(0)),b.set(w.toArrayLike(Uint8Array,"be",32),0),b.set(S.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(b,l,h,u,m){if(m){var _=m;m=function(I){var P=_(l,h,null,u,I);if(!(P instanceof Uint8Array&&32===P.length))throw new Error("This is the way");return new f(P)}}var w,S=new f(h);if(S.cmp(x.n)>=0||S.isZero())return 1;try{w=d.sign(l,h,{canonical:!0,k:m,pers:u})}catch{return 1}return b.signature.set(w.r.toArrayLike(Uint8Array,"be",32),0),b.signature.set(w.s.toArrayLike(Uint8Array,"be",32),32),b.recid=w.recoveryParam,0},ecdsaVerify:function(b,l,h){var u={r:b.subarray(0,32),s:b.subarray(32,64)},m=new f(u.r),_=new f(u.s);if(m.cmp(x.n)>=0||_.cmp(x.n)>=0)return 1;if(1===_.cmp(d.nh)||m.isZero()||_.isZero())return 3;var w=T(h);if(null===w)return 2;var S=w.getPublic();return d.verify(l,u,S)?0:3},ecdsaRecover:function(b,l,h,u){var m,_={r:l.slice(0,32),s:l.slice(32,64)},w=new f(_.r),S=new f(_.s);if(w.cmp(x.n)>=0||S.cmp(x.n)>=0)return 1;if(w.isZero()||S.isZero())return 2;try{m=d.recoverPubKey(u,_,h)}catch{return 2}return g(b,m),0},ecdh:function(b,l,h,u,m,_,w){var S=T(l);if(null===S)return 1;var I=new f(h);if(I.cmp(x.n)>=0||I.isZero())return 2;var P=S.getPublic().mul(I);if(void 0===m)for(var L=P.encode(null,!0),V=d.hash().update(L).digest(),W=0;W<32;++W)b[W]=V[W];else{_||(_=new Uint8Array(32));for(var G=P.getX().toArray("be",32),H=0;H<32;++H)_[H]=G[H];w||(w=new Uint8Array(32));for(var j=P.getY().toArray("be",32),K=0;K<32;++K)w[K]=j[K];var R=m(_,w,u);if(!(R instanceof Uint8Array&&R.length===b.length))return 2;b.set(R)}return 0}}},36922:q=>{"use strict";function O(_,w){(null==w||w>_.length)&&(w=_.length);for(var S=0,I=new Array(w);S0&&void 0!==arguments[0]?arguments[0]:function(S){return new Uint8Array(S)},w=arguments.length>1?arguments[1]:void 0;return"function"==typeof _&&(_=_(w)),l("output",_,w),_}function m(_){return Object.prototype.toString.call(_).slice(8,-1)}q.exports=function(_){return{contextRandomize:function(w){if(b(null===w||w instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==w&&l("seed",w,32),1===_.contextRandomize(w))throw new Error("Unknow error on context randomization")},privateKeyVerify:function(w){return l("private key",w,32),0===_.privateKeyVerify(w)},privateKeyNegate:function(w){switch(l("private key",w,32),_.privateKeyNegate(w)){case 0:return w;case 1:throw new Error(E)}},privateKeyTweakAdd:function(w,S){switch(l("private key",w,32),l("tweak",S,32),_.privateKeyTweakAdd(w,S)){case 0:return w;case 1:throw new Error(d)}},privateKeyTweakMul:function(w,S){switch(l("private key",w,32),l("tweak",S,32),_.privateKeyTweakMul(w,S)){case 0:return w;case 1:throw new Error(x)}},publicKeyVerify:function(w){return l("public key",w,[33,65]),0===_.publicKeyVerify(w)},publicKeyCreate:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;switch(l("private key",w,32),h(S),I=u(I,S?33:65),_.publicKeyCreate(I,w)){case 0:return I;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(T)}},publicKeyConvert:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;switch(l("public key",w,[33,65]),h(S),I=u(I,S?33:65),_.publicKeyConvert(I,w)){case 0:return I;case 1:throw new Error(f);case 2:throw new Error(T)}},publicKeyNegate:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;switch(l("public key",w,[33,65]),h(S),I=u(I,S?33:65),_.publicKeyNegate(I,w)){case 0:return I;case 1:throw new Error(f);case 2:throw new Error(E);case 3:throw new Error(T)}},publicKeyCombine:function(w){var S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=arguments.length>2?arguments[2]:void 0;b(Array.isArray(w),"Expected public keys to be an Array"),b(w.length>0,"Expected public keys array will have more than zero items");var P,L=function(V,W){var G="undefined"!=typeof Symbol&&V[Symbol.iterator]||V["@@iterator"];if(!G){if(Array.isArray(V)||(G=function(y,M){if(y){if("string"==typeof y)return O(y,M);var v=Object.prototype.toString.call(y).slice(8,-1);return"Object"===v&&y.constructor&&(v=y.constructor.name),"Map"===v||"Set"===v?Array.from(y):"Arguments"===v||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?O(y,M):void 0}}(V))){G&&(V=G);var H=0,j=function(){};return{s:j,n:function(){return H>=V.length?{done:!0}:{done:!1,value:V[H++]}},e:function(y){throw y},f:j}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var K,R=!0,o=!1;return{s:function(){G=G.call(V)},n:function(){var y=G.next();return R=y.done,y},e:function(y){o=!0,K=y},f:function(){try{R||null==G.return||G.return()}finally{if(o)throw K}}}}(w);try{for(L.s();!(P=L.n()).done;)l("public key",P.value,[33,65])}catch(V){L.e(V)}finally{L.f()}switch(h(S),I=u(I,S?33:65),_.publicKeyCombine(I,w)){case 0:return I;case 1:throw new Error(f);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(T)}},publicKeyTweakAdd:function(w,S){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],P=arguments.length>3?arguments[3]:void 0;switch(l("public key",w,[33,65]),l("tweak",S,32),h(I),P=u(P,I?33:65),_.publicKeyTweakAdd(P,w,S)){case 0:return P;case 1:throw new Error(f);case 2:throw new Error(d)}},publicKeyTweakMul:function(w,S){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],P=arguments.length>3?arguments[3]:void 0;switch(l("public key",w,[33,65]),l("tweak",S,32),h(I),P=u(P,I?33:65),_.publicKeyTweakMul(P,w,S)){case 0:return P;case 1:throw new Error(f);case 2:throw new Error(x)}},signatureNormalize:function(w){switch(l("signature",w,64),_.signatureNormalize(w)){case 0:return w;case 1:throw new Error(g)}},signatureExport:function(w,S){l("signature",w,64);var I={output:S=u(S,72),outputlen:72};switch(_.signatureExport(I,w)){case 0:return S.slice(0,I.outputlen);case 1:throw new Error(g);case 2:throw new Error(E)}},signatureImport:function(w,S){switch(l("signature",w),S=u(S,64),_.signatureImport(S,w)){case 0:return S;case 1:throw new Error(g);case 2:throw new Error(E)}},ecdsaSign:function(w,S){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},P=arguments.length>3?arguments[3]:void 0;l("message",w,32),l("private key",S,32),b("Object"===m(I),"Expected options to be an Object"),void 0!==I.data&&l("options.data",I.data),void 0!==I.noncefn&&b("Function"===m(I.noncefn),"Expected options.noncefn to be a Function");var L={signature:P=u(P,64),recid:null};switch(_.ecdsaSign(L,w,S,I.data,I.noncefn)){case 0:return L;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(E)}},ecdsaVerify:function(w,S,I){switch(l("signature",w,64),l("message",S,32),l("public key",I,[33,65]),_.ecdsaVerify(w,S,I)){case 0:return!0;case 3:return!1;case 1:throw new Error(g);case 2:throw new Error(f)}},ecdsaRecover:function(w,S,I){var P=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],L=arguments.length>4?arguments[4]:void 0;switch(l("signature",w,64),b("Number"===m(S)&&S>=0&&S<=3,"Expected recovery id to be a Number within interval [0, 3]"),l("message",I,32),h(P),L=u(L,P?33:65),_.ecdsaRecover(L,w,S,I)){case 0:return L;case 1:throw new Error(g);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(E)}},ecdh:function(w,S){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},P=arguments.length>3?arguments[3]:void 0;switch(l("public key",w,[33,65]),l("private key",S,32),b("Object"===m(I),"Expected options to be an Object"),void 0!==I.data&&l("options.data",I.data),void 0!==I.hashfn?(b("Function"===m(I.hashfn),"Expected options.hashfn to be a Function"),void 0!==I.xbuf&&l("options.xbuf",I.xbuf,32),void 0!==I.ybuf&&l("options.ybuf",I.ybuf,32),l("output",P)):P=u(P,32),_.ecdh(P,w,S,I.data,I.hashfn,I.xbuf,I.ybuf)){case 0:return P;case 1:throw new Error(f);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}}},76003:(q,O,E)=>{"use strict";var d=E(48850).Buffer;function x(f,T){this._block=d.alloc(f),this._finalSize=T,this._blockSize=f,this._len=0}x.prototype.update=function(f,T){"string"==typeof f&&(f=d.from(f,T=T||"utf8"));for(var g=this._block,b=this._blockSize,l=f.length,h=this._len,u=0;u=this._finalSize&&(this._update(this._block),this._block.fill(0));var g=8*this._len;if(g<=4294967295)this._block.writeUInt32BE(g,this._blockSize-4);else{var b=(4294967295&g)>>>0;this._block.writeUInt32BE((g-b)/4294967296,this._blockSize-8),this._block.writeUInt32BE(b,this._blockSize-4)}this._update(this._block);var h=this._hash();return f?h.toString(f):h},x.prototype._update=function(){throw new Error("_update must be implemented by subclass")},q.exports=x},51708:(q,O,E)=>{"use strict";var d=q.exports=function(x){x=x.toLowerCase();var f=d[x];if(!f)throw new Error(x+" is not supported (we accept pull requests)");return new f};d.sha=E(8210),d.sha1=E(10544),d.sha224=E(66288),d.sha256=E(34571),d.sha384=E(46959),d.sha512=E(14515)},8210:(q,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[1518500249,1859775393,-1894007588,-899497514],g=new Array(80);function b(){this.init(),this._w=g,x.call(this,64,56)}function l(u){return u<<30|u>>>2}function h(u,m,_,w){return 0===u?m&_|~m&w:2===u?m&_|m&w|_&w:m^_^w}d(b,x),b.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},b.prototype._update=function(u){for(var m,_=this._w,w=0|this._a,S=0|this._b,I=0|this._c,P=0|this._d,L=0|this._e,V=0;V<16;++V)_[V]=u.readInt32BE(4*V);for(;V<80;++V)_[V]=_[V-3]^_[V-8]^_[V-14]^_[V-16];for(var W=0;W<80;++W){var G=~~(W/20),H=0|((m=w)<<5|m>>>27)+h(G,S,I,P)+L+_[W]+T[G];L=P,P=I,I=l(S),S=w,w=H}this._a=w+this._a|0,this._b=S+this._b|0,this._c=I+this._c|0,this._d=P+this._d|0,this._e=L+this._e|0},b.prototype._hash=function(){var u=f.allocUnsafe(20);return u.writeInt32BE(0|this._a,0),u.writeInt32BE(0|this._b,4),u.writeInt32BE(0|this._c,8),u.writeInt32BE(0|this._d,12),u.writeInt32BE(0|this._e,16),u},q.exports=b},10544:(q,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[1518500249,1859775393,-1894007588,-899497514],g=new Array(80);function b(){this.init(),this._w=g,x.call(this,64,56)}function l(m){return m<<5|m>>>27}function h(m){return m<<30|m>>>2}function u(m,_,w,S){return 0===m?_&w|~_&S:2===m?_&w|_&S|w&S:_^w^S}d(b,x),b.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},b.prototype._update=function(m){for(var _,w=this._w,S=0|this._a,I=0|this._b,P=0|this._c,L=0|this._d,V=0|this._e,W=0;W<16;++W)w[W]=m.readInt32BE(4*W);for(;W<80;++W)w[W]=(_=w[W-3]^w[W-8]^w[W-14]^w[W-16])<<1|_>>>31;for(var G=0;G<80;++G){var H=~~(G/20),j=l(S)+u(H,I,P,L)+V+w[G]+T[H]|0;V=L,L=P,P=h(I),I=S,S=j}this._a=S+this._a|0,this._b=I+this._b|0,this._c=P+this._c|0,this._d=L+this._d|0,this._e=V+this._e|0},b.prototype._hash=function(){var m=f.allocUnsafe(20);return m.writeInt32BE(0|this._a,0),m.writeInt32BE(0|this._b,4),m.writeInt32BE(0|this._c,8),m.writeInt32BE(0|this._d,12),m.writeInt32BE(0|this._e,16),m},q.exports=b},66288:(q,O,E)=>{"use strict";var d=E(41736),x=E(34571),f=E(76003),T=E(48850).Buffer,g=new Array(64);function b(){this.init(),this._w=g,f.call(this,64,56)}d(b,x),b.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},b.prototype._hash=function(){var l=T.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},q.exports=b},34571:(q,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[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],g=new Array(64);function b(){this.init(),this._w=g,x.call(this,64,56)}function l(w,S,I){return I^w&(S^I)}function h(w,S,I){return w&S|I&(w|S)}function u(w){return(w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10)}function m(w){return(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7)}function _(w){return(w>>>7|w<<25)^(w>>>18|w<<14)^w>>>3}d(b,x),b.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},b.prototype._update=function(w){for(var S,I=this._w,P=0|this._a,L=0|this._b,V=0|this._c,W=0|this._d,G=0|this._e,H=0|this._f,j=0|this._g,K=0|this._h,R=0;R<16;++R)I[R]=w.readInt32BE(4*R);for(;R<64;++R)I[R]=0|(((S=I[R-2])>>>17|S<<15)^(S>>>19|S<<13)^S>>>10)+I[R-7]+_(I[R-15])+I[R-16];for(var o=0;o<64;++o){var y=K+m(G)+l(G,H,j)+T[o]+I[o]|0,M=u(P)+h(P,L,V)|0;K=j,j=H,H=G,G=W+y|0,W=V,V=L,L=P,P=y+M|0}this._a=P+this._a|0,this._b=L+this._b|0,this._c=V+this._c|0,this._d=W+this._d|0,this._e=G+this._e|0,this._f=H+this._f|0,this._g=j+this._g|0,this._h=K+this._h|0},b.prototype._hash=function(){var w=f.allocUnsafe(32);return w.writeInt32BE(this._a,0),w.writeInt32BE(this._b,4),w.writeInt32BE(this._c,8),w.writeInt32BE(this._d,12),w.writeInt32BE(this._e,16),w.writeInt32BE(this._f,20),w.writeInt32BE(this._g,24),w.writeInt32BE(this._h,28),w},q.exports=b},46959:(q,O,E)=>{"use strict";var d=E(41736),x=E(14515),f=E(76003),T=E(48850).Buffer,g=new Array(160);function b(){this.init(),this._w=g,f.call(this,128,112)}d(b,x),b.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},b.prototype._hash=function(){var l=T.allocUnsafe(48);function h(u,m,_){l.writeInt32BE(u,_),l.writeInt32BE(m,_+4)}return h(this._ah,this._al,0),h(this._bh,this._bl,8),h(this._ch,this._cl,16),h(this._dh,this._dl,24),h(this._eh,this._el,32),h(this._fh,this._fl,40),l},q.exports=b},14515:(q,O,E)=>{"use strict";var d=E(41736),x=E(76003),f=E(48850).Buffer,T=[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],g=new Array(160);function b(){this.init(),this._w=g,x.call(this,128,112)}function l(L,V,W){return W^L&(V^W)}function h(L,V,W){return L&V|W&(L|V)}function u(L,V){return(L>>>28|V<<4)^(V>>>2|L<<30)^(V>>>7|L<<25)}function m(L,V){return(L>>>14|V<<18)^(L>>>18|V<<14)^(V>>>9|L<<23)}function _(L,V){return(L>>>1|V<<31)^(L>>>8|V<<24)^L>>>7}function w(L,V){return(L>>>1|V<<31)^(L>>>8|V<<24)^(L>>>7|V<<25)}function S(L,V){return(L>>>19|V<<13)^(V>>>29|L<<3)^L>>>6}function I(L,V){return(L>>>19|V<<13)^(V>>>29|L<<3)^(L>>>6|V<<26)}function P(L,V){return L>>>0>>0?1:0}d(b,x),b.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},b.prototype._update=function(L){for(var V=this._w,W=0|this._ah,G=0|this._bh,H=0|this._ch,j=0|this._dh,K=0|this._eh,R=0|this._fh,o=0|this._gh,y=0|this._hh,M=0|this._al,v=0|this._bl,k=0|this._cl,D=0|this._dl,N=0|this._el,C=0|this._fl,a=0|this._gl,B=0|this._hl,Q=0;Q<32;Q+=2)V[Q]=L.readInt32BE(4*Q),V[Q+1]=L.readInt32BE(4*Q+4);for(;Q<160;Q+=2){var ee=V[Q-30],ce=V[Q-30+1],ue=_(ee,ce),we=w(ce,ee),ae=S(ee=V[Q-4],ce=V[Q-4+1]),Te=I(ce,ee),ne=V[Q-32],pe=V[Q-32+1],_e=we+V[Q-14+1]|0,xe=ue+V[Q-14]+P(_e,we)|0;xe=(xe=xe+ae+P(_e=_e+Te|0,Te)|0)+ne+P(_e=_e+pe|0,pe)|0,V[Q]=xe,V[Q+1]=_e}for(var Ce=0;Ce<160;Ce+=2){xe=V[Ce],_e=V[Ce+1];var ke=h(W,G,H),me=h(M,v,k),Ee=u(W,M),ze=u(M,W),Ve=m(K,N),nt=m(N,K),tt=T[Ce],mt=T[Ce+1],ht=l(K,R,o),wt=l(N,C,a),Pt=B+nt|0,st=y+Ve+P(Pt,B)|0;st=(st=(st=st+ht+P(Pt=Pt+wt|0,wt)|0)+tt+P(Pt=Pt+mt|0,mt)|0)+xe+P(Pt=Pt+_e|0,_e)|0;var Ye=ze+me|0,gt=Ee+ke+P(Ye,ze)|0;y=o,B=a,o=R,a=C,R=K,C=N,K=j+st+P(N=D+Pt|0,D)|0,j=H,D=k,H=G,k=v,G=W,v=M,W=st+gt+P(M=Pt+Ye|0,Pt)|0}this._al=this._al+M|0,this._bl=this._bl+v|0,this._cl=this._cl+k|0,this._dl=this._dl+D|0,this._el=this._el+N|0,this._fl=this._fl+C|0,this._gl=this._gl+a|0,this._hl=this._hl+B|0,this._ah=this._ah+W+P(this._al,M)|0,this._bh=this._bh+G+P(this._bl,v)|0,this._ch=this._ch+H+P(this._cl,k)|0,this._dh=this._dh+j+P(this._dl,D)|0,this._eh=this._eh+K+P(this._el,N)|0,this._fh=this._fh+R+P(this._fl,C)|0,this._gh=this._gh+o+P(this._gl,a)|0,this._hh=this._hh+y+P(this._hl,B)|0},b.prototype._hash=function(){var L=f.allocUnsafe(64);function V(W,G,H){L.writeInt32BE(W,H),L.writeInt32BE(G,H+4)}return V(this._ah,this._al,0),V(this._bh,this._bl,8),V(this._ch,this._cl,16),V(this._dh,this._dl,24),V(this._eh,this._el,32),V(this._fh,this._fl,40),V(this._gh,this._gl,48),V(this._hh,this._hl,56),L},q.exports=b},57245:(q,O,E)=>{"use strict";q.exports=x;var d=E(38291).EventEmitter;function x(){d.call(this)}E(41736)(x,d),x.Readable=E(6297),x.Writable=E(71471),x.Duplex=E(76884),x.Transform=E(99154),x.PassThrough=E(53582),x.finished=E(5831),x.pipeline=E(60384),x.Stream=x,x.prototype.pipe=function(f,T){var g=this;function b(S){f.writable&&!1===f.write(S)&&g.pause&&g.pause()}function l(){g.readable&&g.resume&&g.resume()}g.on("data",b),f.on("drain",l),f._isStdio||T&&!1===T.end||(g.on("end",u),g.on("close",m));var h=!1;function u(){h||(h=!0,f.end())}function m(){h||(h=!0,"function"==typeof f.destroy&&f.destroy())}function _(S){if(w(),0===d.listenerCount(this,"error"))throw S}function w(){g.removeListener("data",b),f.removeListener("drain",l),g.removeListener("end",u),g.removeListener("close",m),g.removeListener("error",_),f.removeListener("error",_),g.removeListener("end",w),g.removeListener("close",w),f.removeListener("close",w)}return g.on("error",_),f.on("error",_),g.on("end",w),g.on("close",w),f.on("close",w),f.emit("pipe",g),f}},29519:(q,O,E)=>{"use strict";var d=E(38844),x=E(53319),f=E(87705),T=E(83675),g=E(51143),b=O;b.request=function(l,h){l="string"==typeof l?g.parse(l):f(l);var u=-1===E.g.location.protocol.search(/^https?:$/)?"http:":"",m=l.protocol||u,_=l.hostname||l.host,w=l.port,S=l.path||"/";_&&-1!==_.indexOf(":")&&(_="["+_+"]"),l.url=(_?m+"//"+_:"")+(w?":"+w:"")+S,l.method=(l.method||"GET").toUpperCase(),l.headers=l.headers||{};var I=new d(l);return h&&I.on("response",h),I},b.get=function(l,h){var u=b.request(l,h);return u.end(),u},b.ClientRequest=d,b.IncomingMessage=x.IncomingMessage,b.Agent=function(){},b.Agent.defaultMaxSockets=4,b.globalAgent=new b.Agent,b.STATUS_CODES=T,b.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},23928:(q,O,E)=>{"use strict";var d;function x(){if(void 0!==d)return d;if(E.g.XMLHttpRequest){d=new E.g.XMLHttpRequest;try{d.open("GET",E.g.XDomainRequest?"/":"https://example.com")}catch{d=null}}else d=null;return d}function f(g){var b=x();if(!b)return!1;try{return b.responseType=g,b.responseType===g}catch{}return!1}function T(g){return"function"==typeof g}O.fetch=T(E.g.fetch)&&T(E.g.ReadableStream),O.writableStream=T(E.g.WritableStream),O.abortController=T(E.g.AbortController),O.arraybuffer=O.fetch||f("arraybuffer"),O.msstream=!O.fetch&&f("ms-stream"),O.mozchunkedarraybuffer=!O.fetch&&f("moz-chunked-arraybuffer"),O.overrideMimeType=O.fetch||!!x()&&T(x().overrideMimeType),d=null},38844:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(19142),f=E(23928),T=E(41736),g=E(53319),b=E(86505),l=g.IncomingMessage,h=g.readyStates,u=q.exports=function(_){var w,S=this;b.Writable.call(S),S._opts=_,S._body=[],S._headers={},_.auth&&S.setHeader("Authorization","Basic "+d.from(_.auth).toString("base64")),Object.keys(_.headers).forEach(function(P){S.setHeader(P,_.headers[P])});var I=!0;if("disable-fetch"===_.mode||"requestTimeout"in _&&!f.abortController)I=!1,w=!0;else if("prefer-streaming"===_.mode)w=!1;else if("allow-wrong-content-type"===_.mode)w=!f.overrideMimeType;else{if(_.mode&&"default"!==_.mode&&"prefer-fast"!==_.mode)throw new Error("Invalid value for opts.mode");w=!0}S._mode=f.fetch&&I?"fetch":f.mozchunkedarraybuffer?"moz-chunked-arraybuffer":f.msstream?"ms-stream":f.arraybuffer&&w?"arraybuffer":"text",S._fetchTimer=null,S._socketTimeout=null,S._socketTimer=null,S.on("finish",function(){S._onFinish()})};T(u,b.Writable),u.prototype.setHeader=function(_,w){var S=_.toLowerCase();-1===m.indexOf(S)&&(this._headers[S]={name:_,value:w})},u.prototype.getHeader=function(_){var w=this._headers[_.toLowerCase()];return w?w.value:null},u.prototype.removeHeader=function(_){delete this._headers[_.toLowerCase()]},u.prototype._onFinish=function(){var _=this;if(!_._destroyed){var w=_._opts;"timeout"in w&&0!==w.timeout&&_.setTimeout(w.timeout);var S=_._headers,I=null;"GET"!==w.method&&"HEAD"!==w.method&&(I=new Blob(_._body,{type:(S["content-type"]||{}).value||""}));var P=[];if(Object.keys(S).forEach(function(G){var H=S[G].name,j=S[G].value;Array.isArray(j)?j.forEach(function(K){P.push([H,K])}):P.push([H,j])}),"fetch"===_._mode){var L=null;if(f.abortController){var V=new AbortController;L=V.signal,_._fetchAbortController=V,"requestTimeout"in w&&0!==w.requestTimeout&&(_._fetchTimer=E.g.setTimeout(function(){_.emit("requestTimeout"),_._fetchAbortController&&_._fetchAbortController.abort()},w.requestTimeout))}E.g.fetch(_._opts.url,{method:_._opts.method,headers:P,body:I||void 0,mode:"cors",credentials:w.withCredentials?"include":"same-origin",signal:L}).then(function(G){_._fetchResponse=G,_._resetTimers(!1),_._connect()},function(G){_._resetTimers(!0),_._destroyed||_.emit("error",G)})}else{var W=_._xhr=new E.g.XMLHttpRequest;try{W.open(_._opts.method,_._opts.url,!0)}catch(G){return void x.nextTick(function(){_.emit("error",G)})}"responseType"in W&&(W.responseType=_._mode),"withCredentials"in W&&(W.withCredentials=!!w.withCredentials),"text"===_._mode&&"overrideMimeType"in W&&W.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in w&&(W.timeout=w.requestTimeout,W.ontimeout=function(){_.emit("requestTimeout")}),P.forEach(function(G){W.setRequestHeader(G[0],G[1])}),_._response=null,W.onreadystatechange=function(){switch(W.readyState){case h.LOADING:case h.DONE:_._onXHRProgress()}},"moz-chunked-arraybuffer"===_._mode&&(W.onprogress=function(){_._onXHRProgress()}),W.onerror=function(){_._destroyed||(_._resetTimers(!0),_.emit("error",new Error("XHR error")))};try{W.send(I)}catch(G){return void x.nextTick(function(){_.emit("error",G)})}}}},u.prototype._onXHRProgress=function(){var _=this;_._resetTimers(!1),function(w){try{var S=w.status;return null!==S&&0!==S}catch{return!1}}(_._xhr)&&!_._destroyed&&(_._response||_._connect(),_._response._onXHRProgress(_._resetTimers.bind(_)))},u.prototype._connect=function(){var _=this;_._destroyed||(_._response=new l(_._xhr,_._fetchResponse,_._mode,_._resetTimers.bind(_)),_._response.on("error",function(w){_.emit("error",w)}),_.emit("response",_._response))},u.prototype._write=function(_,w,S){this._body.push(_),S()},u.prototype._resetTimers=function(_){var w=this;E.g.clearTimeout(w._socketTimer),w._socketTimer=null,_?(E.g.clearTimeout(w._fetchTimer),w._fetchTimer=null):w._socketTimeout&&(w._socketTimer=E.g.setTimeout(function(){w.emit("timeout")},w._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(_){var w=this;w._destroyed=!0,w._resetTimers(!0),w._response&&(w._response._destroyed=!0),w._xhr?w._xhr.abort():w._fetchAbortController&&w._fetchAbortController.abort(),_&&w.emit("error",_)},u.prototype.end=function(_,w,S){"function"==typeof _&&(S=_,_=void 0),b.Writable.prototype.end.call(this,_,w,S)},u.prototype.setTimeout=function(_,w){var S=this;w&&S.once("timeout",w),S._socketTimeout=_,S._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},53319:(q,O,E)=>{"use strict";var d=E(19142),x=E(29033).Buffer,f=E(23928),T=E(41736),g=E(86505),b=O.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=O.IncomingMessage=function(h,u,m,_){var w=this;if(g.Readable.call(w),w._mode=m,w.headers={},w.rawHeaders=[],w.trailers={},w.rawTrailers=[],w.on("end",function(){d.nextTick(function(){w.emit("close")})}),"fetch"===m){if(w._fetchResponse=u,w.url=u.url,w.statusCode=u.status,w.statusMessage=u.statusText,u.headers.forEach(function(V,W){w.headers[W.toLowerCase()]=V,w.rawHeaders.push(W,V)}),f.writableStream){var S=new WritableStream({write:function(V){return _(!1),new Promise(function(W,G){w._destroyed?G():w.push(x.from(V))?W():w._resumeFetch=W})},close:function(){_(!0),w._destroyed||w.push(null)},abort:function(V){_(!0),w._destroyed||w.emit("error",V)}});try{return void u.body.pipeTo(S).catch(function(V){_(!0),w._destroyed||w.emit("error",V)})}catch{}}var I=u.body.getReader();!function V(){I.read().then(function(W){w._destroyed||(_(W.done),W.done?w.push(null):(w.push(x.from(W.value)),V()))}).catch(function(W){_(!0),w._destroyed||w.emit("error",W)})}()}else if(w._xhr=h,w._pos=0,w.url=h.responseURL,w.statusCode=h.status,w.statusMessage=h.statusText,h.getAllResponseHeaders().split(/\r?\n/).forEach(function(V){var W=V.match(/^([^:]+):\s*(.*)/);if(W){var G=W[1].toLowerCase();"set-cookie"===G?(void 0===w.headers[G]&&(w.headers[G]=[]),w.headers[G].push(W[2])):void 0!==w.headers[G]?w.headers[G]+=", "+W[2]:w.headers[G]=W[2],w.rawHeaders.push(W[1],W[2])}}),w._charset="x-user-defined",!f.overrideMimeType){var P=w.rawHeaders["mime-type"];if(P){var L=P.match(/;\s*charset=([^;])(;|$)/);L&&(w._charset=L[1].toLowerCase())}w._charset||(w._charset="utf-8")}};T(l,g.Readable),l.prototype._read=function(){var h=this._resumeFetch;h&&(this._resumeFetch=null,h())},l.prototype._onXHRProgress=function(h){var u=this,m=u._xhr,_=null;switch(u._mode){case"text":if((_=m.responseText).length>u._pos){var w=_.substr(u._pos);if("x-user-defined"===u._charset){for(var S=x.alloc(w.length),I=0;Iu._pos&&(u.push(x.from(new Uint8Array(P.result.slice(u._pos)))),u._pos=P.result.byteLength)},P.onload=function(){h(!0),u.push(null)},P.readAsArrayBuffer(_)}u._xhr.readyState===b.DONE&&"ms-stream"!==u._mode&&(h(!0),u.push(null))}},22028:q=>{"use strict";q.exports=function(O){return encodeURIComponent(O).replace(/[!'()*]/g,function(E){return"%"+E.charCodeAt(0).toString(16).toUpperCase()})}},23462:(q,O,E)=>{"use strict";var d=E(48850).Buffer,x=d.isEncoding||function(w){switch((w=""+w)&&w.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 f(w){var S;switch(this.encoding=function(I){var P=function(L){if(!L)return"utf8";for(var V;;)switch(L){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 L;default:if(V)return;L=(""+L).toLowerCase(),V=!0}}(I);if("string"!=typeof P&&(d.isEncoding===x||!x(I)))throw new Error("Unknown encoding: "+I);return P||I}(w),this.encoding){case"utf16le":this.text=b,this.end=l,S=4;break;case"utf8":this.fillLast=g,S=4;break;case"base64":this.text=h,this.end=u,S=3;break;default:return this.write=m,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=d.allocUnsafe(S)}function T(w){return w<=127?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function g(w){var S=this.lastTotal-this.lastNeed,I=function(P,L,V){if(128!=(192&L[0]))return P.lastNeed=0,"\ufffd";if(P.lastNeed>1&&L.length>1){if(128!=(192&L[1]))return P.lastNeed=1,"\ufffd";if(P.lastNeed>2&&L.length>2&&128!=(192&L[2]))return P.lastNeed=2,"\ufffd"}}(this,w);return void 0!==I?I:this.lastNeed<=w.length?(w.copy(this.lastChar,S,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,S,0,w.length),void(this.lastNeed-=w.length))}function b(w,S){if((w.length-S)%2==0){var I=w.toString("utf16le",S);if(I){var P=I.charCodeAt(I.length-1);if(P>=55296&&P<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",S,w.length-1)}function l(w){var S=w&&w.length?this.write(w):"";return this.lastNeed?S+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):S}function h(w,S){var I=(w.length-S)%3;return 0===I?w.toString("base64",S):(this.lastNeed=3-I,this.lastTotal=3,1===I?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",S,w.length-I))}function u(w){var S=w&&w.length?this.write(w):"";return this.lastNeed?S+this.lastChar.toString("base64",0,3-this.lastNeed):S}function m(w){return w.toString(this.encoding)}function _(w){return w&&w.length?this.write(w):""}O.s=f,f.prototype.write=function(w){if(0===w.length)return"";var S,I;if(this.lastNeed){if(void 0===(S=this.fillLast(w)))return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I=0?(H>0&&(L.lastNeed=H-1),H):--G=0?(H>0&&(L.lastNeed=H-2),H):--G=0?(H>0&&(2===H?H=0:L.lastNeed=H-3),H):0}(this,w,S);if(!this.lastNeed)return w.toString("utf8",S);this.lastTotal=I;var P=w.length-(I-this.lastNeed);return w.copy(this.lastChar,0,P),w.toString("utf8",S,P)},f.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length}},36931:(q,O,E)=>{"use strict";var d=E(8619);q.exports=function(x){return"string"!=typeof x?x:d(x)?x.slice(2):x}},26427:(q,O,E)=>{"use strict";var d=function(){throw"This swarm.js function isn't available on the browser."},x={readFile:d},f={download:d,safeDownloadArchived:d,directoryTree:d},T={platform:d,arch:d},g={join:d,slice:d},b={spawn:d},l={lookup:d},h=E(31357),u=E(40631),m=E(42733),_=E(52510),w=E(13094);q.exports=w({fs:x,files:f,os:T,path:g,child_process:b,defaultArchives:{},mimetype:l,request:h,downloadUrl:null,bytes:u,hash:m,pick:_})},52510:q=>{"use strict";var O=function(E){return function(){return new Promise(function(d,x){var f,T=function(b){var l={},h=b.target.files.length,u=0;[].map.call(b.target.files,function(m){var _=new FileReader;_.onload=function(w){var S=new Uint8Array(w.target.result);if("directory"===E){var I=m.webkitRelativePath;l[I.slice(I.indexOf("/")+1)]={type:"text/plain",data:S},++u===h&&d(l)}else d("file"===E?{type:mimetype.lookup(m.webkitRelativePath),data:S}:S)},_.readAsArrayBuffer(m)})};"directory"===E?((f=document.createElement("input")).addEventListener("change",T),f.type="file",f.webkitdirectory=!0,f.mozdirectory=!0,f.msdirectory=!0,f.odirectory=!0,f.directory=!0):((f=document.createElement("input")).addEventListener("change",T),f.type="file");var g=document.createEvent("MouseEvents");g.initEvent("click",!0,!1),f.dispatchEvent(g)})}};q.exports={data:O("data"),file:O("file"),directory:O("directory")}},42733:(q,O,E)=>{"use strict";var d=E(49574).keccak256,x=E(40631),f=function(T,g){var b=x.reverse(x.pad(6,x.fromNumber(T))),l=x.flatten([b,"0x0000",g]);return d(l).slice(2)};q.exports=function T(g){"string"==typeof g&&"0x"!==g.slice(0,2)?g=x.fromString(g):"string"!=typeof g&&void 0!==g.length&&(g=x.fromUint8Array(g));var b=x.length(g);if(b<=4096)return f(b,g);for(var l=4096;128*l{"use strict";q.exports=function(O){var E=O.fs,d=O.files,x=O.os,f=O.path,T=O.child_process,g=O.mimetype,b=O.defaultArchives,l=O.request,h=O.downloadUrl,u=O.bytes,m=O.hash,_=O.pick,w=function(we){return function(ae){for(var Te={},le=0,X=we.length;le=400?le(new Error("Error ".concat(pe.statusCode,"."))):Te(new Uint8Array(ne))})})}},P=function(we){return function(ae){return function Te(le){return function(X){return function(ne){var pe=function(_e){return void 0===_e.path?Promise.resolve():"application/bzz-manifest+json"===_e.contentType?Te(_e.hash)(X+_e.path)(ne):Promise.resolve((xe=X+_e.path,function(Ce){return function(ke){return ke[xe]=Ce,ke}})({type:(Ce=_e).contentType,hash:Ce.hash})(ne));var Ce,xe};return I(we)(le).then(function(_e){return JSON.parse(ee(_e)).entries}).then(function(_e){return Promise.all(_e.map(pe))}).then(function(){return ne})}}}(ae)("")({})}},L=function(we){return function(ae){return P(we)(ae).then(function(Te){return w(Object.keys(Te))(Object.keys(Te).map(function(le){return Te[le].hash}))})}},V=function(we){return function(ae){return P(we)(ae).then(function(Te){var le=Object.keys(Te),X=le.map(function(_e){return Te[_e].hash}),ne=le.map(function(_e){return Te[_e].type}),pe=X.map(I(we));return Promise.all(pe).then(function(_e){return w(le)(_e.map(function(Ce,ke){return{type:ne[ke],data:Ce}}))})})}},W=function(we){return function(ae){return function(Te){return d.download(S(we)(ae))(Te)}}},G=function(we){return function(ae){return function(Te){return L(we)(ae).then(function(le){var X=[];for(var ne in le)if(ne.length>0){var pe=f.join(Te,ne);X.push(W(we)(le[ne])(pe))}return Promise.all(X).then(function(){return Te})})}}},H=function(we){return function(ae){return new Promise(function(Te,le){var X={body:"string"==typeof ae?ce(ae):ae,method:"POST"};l("".concat(we,"/bzz-raw:/"),X,function(ne,pe){return ne?le(ne):Te(pe)})})}},j=function(we){return function(ae){return function(Te){return function(le){return function X(ne){var pe="/"===Te[0]?Te:"/"+Te,_e="".concat(we,"/bzz:/").concat(ae).concat(pe),xe={method:"PUT",headers:{"Content-Type":le.type},body:le.data};return new Promise(function(Ce,ke){l(_e,xe,function(me,Ee){return me?ke(me):-1!==Ee.indexOf("error")?ke(Ee):Ce(Ee)})}).catch(function(Ce){return ne>0&&X(ne-1)})}(3)}}}},K=function(we){return function(ae){return o(we)({"":ae})}},R=function(we){return function(ae){return E.readFile(ae).then(function(Te){return K(we)({type:g.lookup(ae),data:Te})})}},o=function(we){return function(ae){return H(we)("{}").then(function(Te){return Object.keys(ae).reduce(function(le,X){return le.then((ne=X,function(pe){return j(we)(pe)(ne)(ae[ne])}));var ne},Promise.resolve(Te))})}},y=function(we){return function(ae){return E.readFile(ae).then(H(we))}},M=function(we){return function(ae){return function(Te){return d.directoryTree(Te).then(function(le){return Promise.all(le.map(function(X){return E.readFile(X)})).then(function(X){var ne=le.map(function(_e){return _e.slice(Te.length)}),pe=le.map(function(_e){return g.lookup(_e)||"text/plain"});return w(ne)(X.map(function(_e,xe){return{type:pe[xe],data:_e}}))})}).then(function(le){return(X=ae?{"":le[ae]}:{},function(ne){var pe={};for(var _e in X)pe[_e]=X[_e];for(var xe in ne)pe[xe]=ne[xe];return pe})(le);var X}).then(o(we))}}},v=function(we){return function(ae){if("data"===ae.pick)return _.data().then(H(we));if("file"===ae.pick)return _.file().then(K(we));if("directory"===ae.pick)return _.directory().then(o(we));if(ae.path)switch(ae.kind){case"data":return y(we)(ae.path);case"file":return R(we)(ae.path);case"directory":return M(we)(ae.defaultFile)(ae.path)}else{if(ae.length||"string"==typeof ae)return H(we)(ae);if(ae instanceof Object)return o(we)(ae)}return Promise.reject(new Error("Bad arguments"))}},k=function(we){return function(ae){return function(Te){return B(we)(ae).then(function(le){return le?Te?G(we)(ae)(Te):V(we)(ae):Te?W(we)(ae)(Te):I(we)(ae)})}}},D=function(we,ae){var Te=x.platform().replace("win32","windows")+"-"+("x64"===x.arch()?"amd64":"386"),le=(ae||b)[Te],ne=le.archiveMD5,pe=le.binaryMD5;return d.safeDownloadArchived(h+le.archive+".tar.gz")(ne)(pe)(we)},N=function(we){return new Promise(function(ae,Te){var X=function(Ve){return function(nt){return-1!==(""+nt).indexOf(Ve)}},pe=we.password,ke=0,me=(0,T.spawn)(we.binPath,["--bzzaccount",we.account||we.privateKey,"--datadir",we.dataDir,"--ens-api",we.ensApi]),Ee=function(Ve){0===ke&&X("Passphrase")(Ve)?setTimeout(function(){ke=1,me.stdin.write(pe+"\n")},500):X("Swarm http proxy started")(Ve)&&(ke=2,clearTimeout(ze),ae(me))};me.stdout.on("data",Ee),me.stderr.on("data",Ee);var ze=setTimeout(function(){return Te(new Error("Couldn't start swarm process."))},2e4)})},C=function(we){return new Promise(function(ae,Te){we.stderr.removeAllListeners("data"),we.stdout.removeAllListeners("data"),we.stdin.removeAllListeners("error"),we.removeAllListeners("error"),we.removeAllListeners("exit"),we.kill("SIGINT");var le=setTimeout(function(){return we.kill("SIGKILL")},8e3);we.once("close",function(){clearTimeout(le),ae()})})},a=function(we){return H(we)("test").then(function(ae){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===ae}).catch(function(){return!1})},B=function(we){return function(ae){return I(we)(ae).then(function(Te){try{return!!JSON.parse(ee(Te)).entries}catch{return!1}})}},Q=function(we){return function(ae,Te,le,X,ne){var pe;return void 0!==ae&&(pe=we(ae)),void 0!==Te&&(pe=we(Te)),void 0!==le&&(pe=we(le)),void 0!==X&&(pe=we(X)),void 0!==ne&&(pe=we(ne)),pe}},ee=function(we){return u.toString(u.fromUint8Array(we))},ce=function(we){return u.toUint8Array(u.fromString(we))},ue=function(we){return{download:function(ae,Te){return k(we)(ae)(Te)},downloadData:Q(I(we)),downloadDataToDisk:Q(W(we)),downloadDirectory:Q(V(we)),downloadDirectoryToDisk:Q(G(we)),downloadEntries:Q(P(we)),downloadRoutes:Q(L(we)),isAvailable:function(){return a(we)},upload:function(ae){return v(we)(ae)},uploadData:Q(H(we)),uploadFile:Q(K(we)),uploadFileFromDisk:Q(K(we)),uploadDataFromDisk:Q(y(we)),uploadDirectory:Q(o(we)),uploadDirectoryFromDisk:Q(M(we)),uploadToManifest:Q(j(we)),pick:_,hash:m,fromString:ce,toString:ee}};return{at:ue,local:function(we){return function(ae){return a("http://localhost:8500").then(function(Te){return Te?ae(ue("http://localhost:8500")).then(function(){}):D(we.binPath,we.archives).onData(function(le){return(we.onProgress||function(){})(le.length)}).then(function(){return N(we)}).then(function(le){return ae(ue("http://localhost:8500")).then(function(){return le})}).then(C)})}},download:k,downloadBinary:D,downloadData:I,downloadDataToDisk:W,downloadDirectory:V,downloadDirectoryToDisk:G,downloadEntries:P,downloadRoutes:L,isAvailable:a,startProcess:N,stopProcess:C,upload:v,uploadData:H,uploadDataFromDisk:y,uploadFile:K,uploadFileFromDisk:R,uploadDirectory:o,uploadDirectoryFromDisk:M,uploadToManifest:j,pick:_,hash:m,fromString:ce,toString:ee}}},16873:q=>{"use strict";var O=function(E,d){for(var x=[],f=0;f{"use strict";E(16873);var d=function(g,b){return parseInt(g.slice(2*b+2,2*b+4),16)},x=function(g){return(g.length-2)/2},f=function(g){for(var b=[],l=2,h=g.length;l>6|192);else{if(u>55295&&u<56320){if(++h==g.length)return null;var m=g.charCodeAt(h);if(m<56320||m>57343)return null;l+=b((u=65536+((1023&u)<<10)+(1023&m))>>18|240),l+=b(u>>12&63|128)}else l+=b(u>>12|224);l+=b(u>>6&63|128)}l+=b(63&u|128)}}return l},toString:function(g){for(var b="",l=0,h=x(g);l127){if(u>191&&u<224){if(l>=h)return null;u=(31&u)<<6|63&d(g,l)}else if(u>223&&u<240){if(l+1>=h)return null;u=(15&u)<<12|(63&d(g,l))<<6|63&d(g,++l)}else{if(!(u>239&&u<248)||l+2>=h)return null;u=(7&u)<<18|(63&d(g,l))<<12|(63&d(g,++l))<<6|63&d(g,++l)}++l}if(u<=65535)b+=String.fromCharCode(u);else{if(!(u<=1114111))return null;u-=65536,b+=String.fromCharCode(u>>10|55296),b+=String.fromCharCode(1023&u|56320)}}return b},fromNumber:function(g){var b=g.toString(16);return b.length%2==0?"0x"+b:"0x0"+b},toNumber:function(g){return parseInt(g.slice(2),16)},fromNat:function(g){return"0x0"===g?"0x":g.length%2==0?g:"0x0"+g.slice(2)},toNat:function(g){return"0"===g[2]?"0x"+g.slice(3):g},fromArray:T,toArray:f,fromUint8Array:function(g){return T([].slice.call(g,0))},toUint8Array:function(g){return new Uint8Array(f(g))}}},49574:q=>{"use strict";var O="0123456789abcdef".split(""),E=[1,256,65536,16777216],d=[0,8,16,24],x=[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],f=function(g){var b,l,h,u,m,_,w,S,I,P,L,V,W,G,H,j,K,R,o,y,M,v,k,D,N,C,a,B,Q,ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee,ze,Ve,nt,tt,mt,ht,wt,Pt,st,Ye,gt,St,Wt,dn,Nt,It,qt,jt;for(h=0;h<48;h+=2)u=g[0]^g[10]^g[20]^g[30]^g[40],m=g[1]^g[11]^g[21]^g[31]^g[41],S=g[4]^g[14]^g[24]^g[34]^g[44],I=g[5]^g[15]^g[25]^g[35]^g[45],P=g[6]^g[16]^g[26]^g[36]^g[46],L=g[7]^g[17]^g[27]^g[37]^g[47],b=(V=g[8]^g[18]^g[28]^g[38]^g[48])^((_=g[2]^g[12]^g[22]^g[32]^g[42])<<1|(w=g[3]^g[13]^g[23]^g[33]^g[43])>>>31),l=(W=g[9]^g[19]^g[29]^g[39]^g[49])^(w<<1|_>>>31),g[0]^=b,g[1]^=l,g[10]^=b,g[11]^=l,g[20]^=b,g[21]^=l,g[30]^=b,g[31]^=l,g[40]^=b,g[41]^=l,l=m^(I<<1|S>>>31),g[2]^=b=u^(S<<1|I>>>31),g[3]^=l,g[12]^=b,g[13]^=l,g[22]^=b,g[23]^=l,g[32]^=b,g[33]^=l,g[42]^=b,g[43]^=l,l=w^(L<<1|P>>>31),g[4]^=b=_^(P<<1|L>>>31),g[5]^=l,g[14]^=b,g[15]^=l,g[24]^=b,g[25]^=l,g[34]^=b,g[35]^=l,g[44]^=b,g[45]^=l,l=I^(W<<1|V>>>31),g[6]^=b=S^(V<<1|W>>>31),g[7]^=l,g[16]^=b,g[17]^=l,g[26]^=b,g[27]^=l,g[36]^=b,g[37]^=l,g[46]^=b,g[47]^=l,l=L^(m<<1|u>>>31),g[8]^=b=P^(u<<1|m>>>31),g[9]^=l,g[18]^=b,g[19]^=l,g[28]^=b,g[29]^=l,g[38]^=b,g[39]^=l,g[48]^=b,g[49]^=l,H=g[1],ze=g[11]<<4|g[10]>>>28,Ve=g[10]<<4|g[11]>>>28,B=g[20]<<3|g[21]>>>29,Q=g[21]<<3|g[20]>>>29,Nt=g[31]<<9|g[30]>>>23,It=g[30]<<9|g[31]>>>23,Ce=g[40]<<18|g[41]>>>14,ke=g[41]<<18|g[40]>>>14,ae=g[2]<<1|g[3]>>>31,Te=g[3]<<1|g[2]>>>31,K=g[12]<<12|g[13]>>>20,nt=g[22]<<10|g[23]>>>22,tt=g[23]<<10|g[22]>>>22,ee=g[33]<<13|g[32]>>>19,ce=g[32]<<13|g[33]>>>19,qt=g[42]<<2|g[43]>>>30,jt=g[43]<<2|g[42]>>>30,st=g[5]<<30|g[4]>>>2,Ye=g[4]<<30|g[5]>>>2,le=g[14]<<6|g[15]>>>26,X=g[15]<<6|g[14]>>>26,o=g[24]<<11|g[25]>>>21,mt=g[34]<<15|g[35]>>>17,ht=g[35]<<15|g[34]>>>17,ue=g[45]<<29|g[44]>>>3,we=g[44]<<29|g[45]>>>3,D=g[6]<<28|g[7]>>>4,N=g[7]<<28|g[6]>>>4,gt=g[17]<<23|g[16]>>>9,St=g[16]<<23|g[17]>>>9,ne=g[26]<<25|g[27]>>>7,pe=g[27]<<25|g[26]>>>7,y=g[36]<<21|g[37]>>>11,M=g[37]<<21|g[36]>>>11,wt=g[47]<<24|g[46]>>>8,Pt=g[46]<<24|g[47]>>>8,me=g[8]<<27|g[9]>>>5,Ee=g[9]<<27|g[8]>>>5,C=g[18]<<20|g[19]>>>12,a=g[19]<<20|g[18]>>>12,Wt=g[29]<<7|g[28]>>>25,dn=g[28]<<7|g[29]>>>25,_e=g[38]<<8|g[39]>>>24,xe=g[39]<<8|g[38]>>>24,v=g[48]<<14|g[49]>>>18,k=g[49]<<14|g[48]>>>18,g[0]=(G=g[0])^~(j=g[13]<<12|g[12]>>>20)&(R=g[25]<<11|g[24]>>>21),g[1]=H^~K&o,g[10]=D^~C&B,g[11]=N^~a&Q,g[20]=ae^~le&ne,g[21]=Te^~X&pe,g[30]=me^~ze&nt,g[31]=Ee^~Ve&tt,g[40]=st^~gt&Wt,g[41]=Ye^~St&dn,g[2]=j^~R&y,g[3]=K^~o&M,g[12]=C^~B&ee,g[13]=a^~Q&ce,g[22]=le^~ne&_e,g[23]=X^~pe&xe,g[32]=ze^~nt&mt,g[33]=Ve^~tt&ht,g[42]=gt^~Wt&Nt,g[43]=St^~dn&It,g[4]=R^~y&v,g[5]=o^~M&k,g[14]=B^~ee&ue,g[15]=Q^~ce&we,g[24]=ne^~_e&Ce,g[25]=pe^~xe&ke,g[34]=nt^~mt&wt,g[35]=tt^~ht&Pt,g[44]=Wt^~Nt&qt,g[45]=dn^~It&jt,g[6]=y^~v&G,g[7]=M^~k&H,g[16]=ee^~ue&D,g[17]=ce^~we&N,g[26]=_e^~Ce&ae,g[27]=xe^~ke&Te,g[36]=mt^~wt&me,g[37]=ht^~Pt&Ee,g[46]=Nt^~qt&st,g[47]=It^~jt&Ye,g[8]=v^~G&j,g[9]=k^~H&K,g[18]=ue^~D&C,g[19]=we^~N&a,g[28]=Ce^~ae&le,g[29]=ke^~Te&X,g[38]=wt^~me&ze,g[39]=Pt^~Ee&Ve,g[48]=qt^~st>,g[49]=jt^~Ye&St,g[0]^=x[h],g[1]^=x[h+1]},T=function(g){return function(b){var l,m,_;if("0x"===b.slice(0,2)){l=[];for(var h=2,u=b.length;h>2]|=_[G]<>2]|=w<>2]|=(192|w>>6)<>2]|=(128|63&w)<=57344?(I[K>>2]|=(224|w>>12)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<>2]|=(240|w>>18)<>2]|=(128|w>>12&63)<>2]|=(128|w>>6&63)<>2]|=(128|63&w)<=P){for(m.start=K-P,m.block=I[L],K=0;K>2]|=E[3&K],m.lastByteIndex===P)for(I[0]=I[L],K=1;K>4&15]+O[15&H]+O[H>>12&15]+O[H>>8&15]+O[H>>20&15]+O[H>>16&15]+O[H>>28&15]+O[H>>24&15];R%L==0&&(f(W),K=0)}return"0x"+j}({blocks:[],reset:!0,block:0,start:0,blockCount:1600-((m=g)<<1)>>5,outputBlocks:m>>5,s:(_=[0,0,0,0,0,0,0,0,0,0],[].concat(_,_,_,_,_))},l)}};q.exports={keccak256:T(256),keccak512:T(512),keccak256s:T(256),keccak512s:T(512)}},68419:q=>{"use strict";q.exports=function(O,E){if(E){E=(E=E.trim().replace(/^(\?|#|&)/,""))?"?"+E:E;var d=O.split(/[\?\#]/)[0];E&&/\:\/\/[^\/]*$/.test(d)&&(d+="/");var x=O.match(/(\#.*)$/);O=d+E,x&&(O+=x[0])}return O}},78677:(q,O,E)=>{"use strict";var d;q=E.nmd(q);var x=E(28847)(E(3355));!function(f){var T="object"==(0,x.default)(O)&&O&&!O.nodeType&&O,g="object"==(0,x.default)(q)&&q&&!q.nodeType&&q,b="object"==(void 0===E.g?"undefined":(0,x.default)(E.g))&&E.g;b.global!==b&&b.window!==b&&b.self!==b||(f=b);var l,h,u=2147483647,m=36,W=/^xn--/,G=/[^\x20-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=Math.floor,o=String.fromCharCode;function y(Q){throw RangeError(j[Q])}function M(Q,ee){for(var ce=Q.length,ue=[];ce--;)ue[ce]=ee(Q[ce]);return ue}function v(Q,ee){var ce=Q.split("@"),ue="";return ce.length>1&&(ue=ce[0]+"@",Q=ce[1]),ue+M((Q=Q.replace(H,".")).split("."),ee).join(".")}function k(Q){for(var ee,ce,ue=[],we=0,ae=Q.length;we=55296&&ee<=56319&&we65535&&(ce+=o((ee-=65536)>>>10&1023|55296),ee=56320|1023&ee),ce+o(ee)}).join("")}function N(Q,ee){return Q+22+75*(Q<26)-((0!=ee)<<5)}function C(Q,ee,ce){var ue=0;for(Q=ce?R(Q/700):Q>>1,Q+=R(Q/ee);Q>455;ue+=m)Q=R(Q/35);return R(ue+36*Q/(Q+38))}function a(Q){var ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe=[],Ce=Q.length,ke=0,me=128,Ee=72;for((ce=Q.lastIndexOf("-"))<0&&(ce=0),ue=0;ue=128&&y("not-basic"),xe.push(Q.charCodeAt(ue));for(we=ce>0?ce+1:0;we=Ce&&y("invalid-input"),((X=(_e=Q.charCodeAt(we++))-48<10?_e-22:_e-65<26?_e-65:_e-97<26?_e-97:m)>=m||X>R((u-ke)/Te))&&y("overflow"),ke+=X*Te,!(X<(ne=le<=Ee?1:le>=Ee+26?26:le-Ee));le+=m)Te>R(u/(pe=m-ne))&&y("overflow"),Te*=pe;Ee=C(ke-ae,ee=xe.length+1,0==ae),R(ke/ee)>u-me&&y("overflow"),me+=R(ke/ee),ke%=ee,xe.splice(ke++,0,me)}return D(xe)}function B(Q){var ee,ce,ue,we,ae,Te,le,X,ne,pe,_e,xe,Ce,ke,me,Ee=[];for(xe=(Q=k(Q)).length,ee=128,ce=0,ae=72,Te=0;Te=ee&&_eR((u-ce)/(Ce=ue+1))&&y("overflow"),ce+=(le-ee)*Ce,ee=le,Te=0;Teu&&y("overflow"),_e==ee){for(X=ce,ne=m;!(X<(pe=ne<=ae?1:ne>=ae+26?26:ne-ae));ne+=m)Ee.push(o(N(pe+(me=X-pe)%(ke=m-pe),0))),X=R(me/ke);Ee.push(o(N(X,0))),ae=C(ce,Ce,ue==we),ce=0,++ue}++ce,++ee}return Ee.join("")}if(l={version:"1.3.2",ucs2:{decode:k,encode:D},decode:a,encode:B,toASCII:function(Q){return v(Q,function(ee){return G.test(ee)?"xn--"+B(ee):ee})},toUnicode:function(Q){return v(Q,function(ee){return W.test(ee)?a(ee.slice(4).toLowerCase()):ee})}},"object"==(0,x.default)(E.amdO)&&E.amdO)void 0===(d=function(){return l}.call(O,E,O,q))||(q.exports=d);else if(T&&g)if(q.exports==T)g.exports=l;else for(h in l)l.hasOwnProperty(h)&&(T[h]=l[h]);else f.punycode=l}(void 0)},98983:q=>{"use strict";function O(E,d){return Object.prototype.hasOwnProperty.call(E,d)}q.exports=function(E,d,x,f){x=x||"=";var T={};if("string"!=typeof E||0===E.length)return T;var g=/\+/g;E=E.split(d=d||"&");var b=1e3;f&&"number"==typeof f.maxKeys&&(b=f.maxKeys);var l=E.length;b>0&&l>b&&(l=b);for(var h=0;h=0?(u=S.substr(0,I),m=S.substr(I+1)):(u=S,m=""),_=decodeURIComponent(u),w=decodeURIComponent(m),O(T,_)?Array.isArray(T[_])?T[_].push(w):T[_]=[T[_],w]:T[_]=w}return T}},84031:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=function(f){switch((0,d.default)(f)){case"string":return f;case"boolean":return f?"true":"false";case"number":return isFinite(f)?f:"";default:return""}};q.exports=function(f,T,g,b){return T=T||"&",g=g||"=",null===f&&(f=void 0),"object"===(0,d.default)(f)?Object.keys(f).map(function(l){var h=encodeURIComponent(x(l))+g;return Array.isArray(f[l])?f[l].map(function(u){return h+encodeURIComponent(x(u))}).join(T):h+encodeURIComponent(x(f[l]))}).join(T):b?encodeURIComponent(x(b))+g+encodeURIComponent(x(f)):""}},845:(q,O,E)=>{"use strict";O.decode=O.parse=E(98983),O.encode=O.stringify=E(84031)},51143:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(78677),f=E(95751);function T(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}O.parse=W,O.resolve=function(G,H){return W(G,!1,!0).resolve(H)},O.resolveObject=function(G,H){return G?W(G,!1,!0).resolveObject(H):H},O.format=function(G){return f.isString(G)&&(G=W(G)),G instanceof T?G.format():T.prototype.format.call(G)},O.Url=T;var g=/^([a-z0-9.+-]+:)/i,b=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(h),m=["%","/","?",";","#"].concat(u),_=["/","?","#"],w=/^[+a-z0-9A-Z_-]{0,63}$/,S=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,I={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},L={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},V=E(845);function W(G,H,j){if(G&&f.isObject(G)&&G instanceof T)return G;var K=new T;return K.parse(G,H,j),K}T.prototype.parse=function(G,H,j){if(!f.isString(G))throw new TypeError("Parameter 'url' must be a string, not "+(0,d.default)(G));var K=G.indexOf("?"),R=-1!==K&&K127?ae+="x":ae+=we[Te];if(!ae.match(w)){var X=ce.slice(0,B),ne=ce.slice(B+1),pe=we.match(S);pe&&(X.push(pe[1]),ne.unshift(pe[2])),ne.length&&(y="/"+ne.join(".")+y),this.hostname=X.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),ee||(this.hostname=x.toASCII(this.hostname));var _e=this.port?":"+this.port:"";this.host=(this.hostname||"")+_e,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!I[k])for(B=0,ue=u.length;B0)&&j.host.split("@"))&&(j.auth=pe.shift(),j.host=j.hostname=pe.shift())),j.search=G.search,j.query=G.query,f.isNull(j.pathname)&&f.isNull(j.search)||(j.path=(j.pathname?j.pathname:"")+(j.search?j.search:"")),j.href=j.format(),j;if(!we.length)return j.pathname=null,j.path=j.search?"/"+j.search:null,j.href=j.format(),j;for(var Te=we.slice(-1)[0],le=(j.host||G.host||we.length>1)&&("."===Te||".."===Te)||""===Te,X=0,ne=we.length;ne>=0;ne--)"."===(Te=we[ne])?we.splice(ne,1):".."===Te?(we.splice(ne,1),X++):X&&(we.splice(ne,1),X--);if(!ce&&!ue)for(;X--;X)we.unshift("..");!ce||""===we[0]||we[0]&&"/"===we[0].charAt(0)||we.unshift(""),le&&"/"!==we.join("/").substr(-1)&&we.push("");var pe,_e=""===we[0]||we[0]&&"/"===we[0].charAt(0);return ae&&(j.hostname=j.host=_e?"":we.length?we.shift():"",(pe=!!(j.host&&j.host.indexOf("@")>0)&&j.host.split("@"))&&(j.auth=pe.shift(),j.host=j.hostname=pe.shift())),(ce=ce||j.host&&we.length)&&!_e&&we.unshift(""),we.length?j.pathname=we.join("/"):(j.pathname=null,j.path=null),f.isNull(j.pathname)&&f.isNull(j.search)||(j.path=(j.pathname?j.pathname:"")+(j.search?j.search:"")),j.auth=G.auth||j.auth,j.slashes=j.slashes||G.slashes,j.href=j.format(),j},T.prototype.parseHost=function(){var G=this.host,H=b.exec(G);H&&(":"!==(H=H[0])&&(this.port=H.substr(1)),G=G.substr(0,G.length-H.length)),G&&(this.hostname=G)}},95751:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));q.exports={isString:function(x){return"string"==typeof x},isObject:function(x){return"object"===(0,d.default)(x)&&null!==x},isNull:function(x){return null===x},isNullOrUndefined:function(x){return null==x}}},88632:(q,O)=>{"use strict";!function(E){var d,x,f,T=String.fromCharCode;function g(_){for(var w,S,I=[],P=0,L=_.length;P=55296&&w<=56319&&P=55296&&_<=57343)throw Error("Lone surrogate U+"+_.toString(16).toUpperCase()+" is not a scalar value")}function l(_,w){return T(_>>w&63|128)}function h(_){if(0==(4294967168&_))return T(_);var w="";return 0==(4294965248&_)?w=T(_>>6&31|192):0==(4294901760&_)?(b(_),w=T(_>>12&15|224),w+=l(_,6)):0==(4292870144&_)&&(w=T(_>>18&7|240),w+=l(_,12),w+=l(_,6)),w+T(63&_|128)}function u(){if(f>=x)throw Error("Invalid byte index");var _=255&d[f];if(f++,128==(192&_))return 63&_;throw Error("Invalid continuation byte")}function m(){var _,w;if(f>x)throw Error("Invalid byte index");if(f==x)return!1;if(_=255&d[f],f++,0==(128&_))return _;if(192==(224&_)){if((w=(31&_)<<6|u())>=128)return w;throw Error("Invalid continuation byte")}if(224==(240&_)){if((w=(15&_)<<12|u()<<6|u())>=2048)return b(w),w;throw Error("Invalid continuation byte")}if(240==(248&_)&&(w=(7&_)<<18|u()<<12|u()<<6|u())>=65536&&w<=1114111)return w;throw Error("Invalid UTF-8 detected")}E.version="3.0.0",E.encode=function(_){for(var w=g(_),S=w.length,I=-1,P="";++I65535&&(W+=T((P-=65536)>>>10&1023|55296),P=56320|1023&P),W+=T(P);return W}(S)}}(O)},96219:(q,O,E)=>{"use strict";function d(x){try{if(!E.g.localStorage)return!1}catch{return!1}var f=E.g.localStorage[x];return null!=f&&"true"===String(f).toLowerCase()}q.exports=function(x,f){if(d("noDeprecation"))return x;var T=!1;return function(){if(!T){if(d("throwDeprecation"))throw new Error(f);d("traceDeprecation")?console.trace(f):console.warn(f),T=!0}return x.apply(this,arguments)}}},16248:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));q.exports=function(x){return x&&"object"===(0,d.default)(x)&&"function"==typeof x.copy&&"function"==typeof x.fill&&"function"==typeof x.readUInt8}},17092:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(69446),f=E(14477),T=E(72337),g=E(28915);function b(a){return a.call.bind(a)}var l="undefined"!=typeof BigInt,h="undefined"!=typeof Symbol,u=b(Object.prototype.toString),m=b(Number.prototype.valueOf),_=b(String.prototype.valueOf),w=b(Boolean.prototype.valueOf);if(l)var S=b(BigInt.prototype.valueOf);if(h)var I=b(Symbol.prototype.valueOf);function P(a,B){if("object"!==(0,d.default)(a))return!1;try{return B(a),!0}catch{return!1}}function L(a){return"[object Map]"===u(a)}function V(a){return"[object Set]"===u(a)}function W(a){return"[object WeakMap]"===u(a)}function G(a){return"[object WeakSet]"===u(a)}function H(a){return"[object ArrayBuffer]"===u(a)}function j(a){return"undefined"!=typeof ArrayBuffer&&(H.working?H(a):a instanceof ArrayBuffer)}function K(a){return"[object DataView]"===u(a)}function R(a){return"undefined"!=typeof DataView&&(K.working?K(a):a instanceof DataView)}O.isArgumentsObject=x,O.isGeneratorFunction=f,O.isTypedArray=g,O.isPromise=function(a){return"undefined"!=typeof Promise&&a instanceof Promise||null!==a&&"object"===(0,d.default)(a)&&"function"==typeof a.then&&"function"==typeof a.catch},O.isArrayBufferView=function(a){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(a):g(a)||R(a)},O.isUint8Array=function(a){return"Uint8Array"===T(a)},O.isUint8ClampedArray=function(a){return"Uint8ClampedArray"===T(a)},O.isUint16Array=function(a){return"Uint16Array"===T(a)},O.isUint32Array=function(a){return"Uint32Array"===T(a)},O.isInt8Array=function(a){return"Int8Array"===T(a)},O.isInt16Array=function(a){return"Int16Array"===T(a)},O.isInt32Array=function(a){return"Int32Array"===T(a)},O.isFloat32Array=function(a){return"Float32Array"===T(a)},O.isFloat64Array=function(a){return"Float64Array"===T(a)},O.isBigInt64Array=function(a){return"BigInt64Array"===T(a)},O.isBigUint64Array=function(a){return"BigUint64Array"===T(a)},L.working="undefined"!=typeof Map&&L(new Map),O.isMap=function(a){return"undefined"!=typeof Map&&(L.working?L(a):a instanceof Map)},V.working="undefined"!=typeof Set&&V(new Set),O.isSet=function(a){return"undefined"!=typeof Set&&(V.working?V(a):a instanceof Set)},W.working="undefined"!=typeof WeakMap&&W(new WeakMap),O.isWeakMap=function(a){return"undefined"!=typeof WeakMap&&(W.working?W(a):a instanceof WeakMap)},G.working="undefined"!=typeof WeakSet&&G(new WeakSet),O.isWeakSet=function(a){return G(a)},H.working="undefined"!=typeof ArrayBuffer&&H(new ArrayBuffer),O.isArrayBuffer=j,K.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&K(new DataView(new ArrayBuffer(1),0,1)),O.isDataView=R;var o="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function y(a){return"[object SharedArrayBuffer]"===u(a)}function M(a){return void 0!==o&&(void 0===y.working&&(y.working=y(new o)),y.working?y(a):a instanceof o)}function v(a){return P(a,m)}function k(a){return P(a,_)}function D(a){return P(a,w)}function N(a){return l&&P(a,S)}function C(a){return h&&P(a,I)}O.isSharedArrayBuffer=M,O.isAsyncFunction=function(a){return"[object AsyncFunction]"===u(a)},O.isMapIterator=function(a){return"[object Map Iterator]"===u(a)},O.isSetIterator=function(a){return"[object Set Iterator]"===u(a)},O.isGeneratorObject=function(a){return"[object Generator]"===u(a)},O.isWebAssemblyCompiledModule=function(a){return"[object WebAssembly.Module]"===u(a)},O.isNumberObject=v,O.isStringObject=k,O.isBooleanObject=D,O.isBigIntObject=N,O.isSymbolObject=C,O.isBoxedPrimitive=function(a){return v(a)||k(a)||D(a)||N(a)||C(a)},O.isAnyArrayBuffer=function(a){return"undefined"!=typeof Uint8Array&&(j(a)||M(a))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(a){Object.defineProperty(O,a,{enumerable:!1,value:function(){throw new Error(a+" is not supported in userland")}})})},45058:(q,O,E)=>{"use strict";var d=E(19142),x=E(28847)(E(3355)),f=Object.getOwnPropertyDescriptors||function(C){for(var a=Object.keys(C),B={},Q=0;Q=ee)return we;switch(we){case"%s":return String(Q[B++]);case"%d":return Number(Q[B++]);case"%j":try{return JSON.stringify(Q[B++])}catch{return"[Circular]"}default:return we}}),ue=Q[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),P(a)?B.showHidden=a:a&&O._extend(B,a),G(B.showHidden)&&(B.showHidden=!1),G(B.depth)&&(B.depth=2),G(B.colors)&&(B.colors=!1),G(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=u),_(B,C,B.depth)}function u(C,a){var B=h.styles[a];return B?"\x1b["+h.colors[B][0]+"m"+C+"\x1b["+h.colors[B][1]+"m":C}function m(C,a){return C}function _(C,a,B){if(C.customInspect&&a&&o(a.inspect)&&a.inspect!==O.inspect&&(!a.constructor||a.constructor.prototype!==a)){var Q=a.inspect(B,C);return W(Q)||(Q=_(C,Q,B)),Q}var ee=function(ne,pe){if(G(pe))return ne.stylize("undefined","undefined");if(W(pe)){var _e="'"+JSON.stringify(pe).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ne.stylize(_e,"string")}return V(pe)?ne.stylize(""+pe,"number"):P(pe)?ne.stylize(""+pe,"boolean"):L(pe)?ne.stylize("null","null"):void 0}(C,a);if(ee)return ee;var pe,ce=Object.keys(a),ue=(pe={},ce.forEach(function(_e,xe){pe[_e]=!0}),pe);if(C.showHidden&&(ce=Object.getOwnPropertyNames(a)),R(a)&&(ce.indexOf("message")>=0||ce.indexOf("description")>=0))return w(a);if(0===ce.length){if(o(a))return C.stylize("[Function"+(a.name?": "+a.name:"")+"]","special");if(H(a))return C.stylize(RegExp.prototype.toString.call(a),"regexp");if(K(a))return C.stylize(Date.prototype.toString.call(a),"date");if(R(a))return w(a)}var ae,Te="",le=!1,X=["{","}"];return I(a)&&(le=!0,X=["[","]"]),o(a)&&(Te=" [Function"+(a.name?": "+a.name:"")+"]"),H(a)&&(Te=" "+RegExp.prototype.toString.call(a)),K(a)&&(Te=" "+Date.prototype.toUTCString.call(a)),R(a)&&(Te=" "+w(a)),0!==ce.length||le&&0!=a.length?B<0?H(a)?C.stylize(RegExp.prototype.toString.call(a),"regexp"):C.stylize("[Object]","special"):(C.seen.push(a),ae=le?function(ne,pe,_e,xe,Ce){for(var ke=[],me=0,Ee=pe.length;me60?_e[0]+(""===pe?"":pe+"\n ")+" "+ne.join(",\n ")+" "+_e[1]:_e[0]+pe+" "+ne.join(", ")+" "+_e[1]}(ae,Te,X)):X[0]+Te+X[1]}function w(C){return"["+Error.prototype.toString.call(C)+"]"}function S(C,a,B,Q,ee,ce){var ue,we,ae;if((ae=Object.getOwnPropertyDescriptor(a,ee)||{value:a[ee]}).get?we=C.stylize(ae.set?"[Getter/Setter]":"[Getter]","special"):ae.set&&(we=C.stylize("[Setter]","special")),k(Q,ee)||(ue="["+ee+"]"),we||(C.seen.indexOf(ae.value)<0?(we=L(B)?_(C,ae.value,null):_(C,ae.value,B-1)).indexOf("\n")>-1&&(we=ce?we.split("\n").map(function(Te){return" "+Te}).join("\n").slice(2):"\n"+we.split("\n").map(function(Te){return" "+Te}).join("\n")):we=C.stylize("[Circular]","special")),G(ue)){if(ce&&ee.match(/^\d+$/))return we;(ue=JSON.stringify(""+ee)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ue=ue.slice(1,-1),ue=C.stylize(ue,"name")):(ue=ue.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ue=C.stylize(ue,"string"))}return ue+": "+we}function I(C){return Array.isArray(C)}function P(C){return"boolean"==typeof C}function L(C){return null===C}function V(C){return"number"==typeof C}function W(C){return"string"==typeof C}function G(C){return void 0===C}function H(C){return j(C)&&"[object RegExp]"===y(C)}function j(C){return"object"===(0,x.default)(C)&&null!==C}function K(C){return j(C)&&"[object Date]"===y(C)}function R(C){return j(C)&&("[object Error]"===y(C)||C instanceof Error)}function o(C){return"function"==typeof C}function y(C){return Object.prototype.toString.call(C)}function M(C){return C<10?"0"+C.toString(10):C.toString(10)}O.debuglog=function(C){if(C=C.toUpperCase(),!g[C])if(b.test(C)){var a=d.pid;g[C]=function(){var B=O.format.apply(O,arguments);console.error("%s %d: %s",C,a,B)}}else g[C]=function(){};return g[C]},O.inspect=h,h.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]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},O.types=E(17092),O.isArray=I,O.isBoolean=P,O.isNull=L,O.isNullOrUndefined=function(C){return null==C},O.isNumber=V,O.isString=W,O.isSymbol=function(C){return"symbol"===(0,x.default)(C)},O.isUndefined=G,O.isRegExp=H,O.types.isRegExp=H,O.isObject=j,O.isDate=K,O.types.isDate=K,O.isError=R,O.types.isNativeError=R,O.isFunction=o,O.isPrimitive=function(C){return null===C||"boolean"==typeof C||"number"==typeof C||"string"==typeof C||"symbol"===(0,x.default)(C)||void 0===C},O.isBuffer=E(16248);var v=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(C,a){return Object.prototype.hasOwnProperty.call(C,a)}O.log=function(){var C,a;console.log("%s - %s",(a=[M((C=new Date).getHours()),M(C.getMinutes()),M(C.getSeconds())].join(":"),[C.getDate(),v[C.getMonth()],a].join(" ")),O.format.apply(O,arguments))},O.inherits=E(41736),O._extend=function(C,a){if(!a||!j(a))return C;for(var B=Object.keys(a),Q=B.length;Q--;)C[B[Q]]=a[B[Q]];return C};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(C,a){if(!C){var B=new Error("Promise was rejected with a falsy value");B.reason=C,C=B}return a(C)}O.promisify=function(C){if("function"!=typeof C)throw new TypeError('The "original" argument must be of type Function');if(D&&C[D]){var a;if("function"!=typeof(a=C[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(a,D,{value:a,enumerable:!1,writable:!1,configurable:!0}),a}function a(){for(var B,Q,ee=new Promise(function(we,ae){B=we,Q=ae}),ce=[],ue=0;ue{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(O,"NIL",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(O,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(O,"stringify",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(O,"v1",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(O,"v3",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(O,"v4",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(O,"v5",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(O,"validate",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(O,"version",{enumerable:!0,get:function(){return b.default}});var d=m(E(55999)),x=m(E(28231)),f=m(E(78647)),T=m(E(65025)),g=m(E(55996)),b=m(E(8928)),l=m(E(76163)),h=m(E(22982)),u=m(E(91729));function m(_){return _&&_.__esModule?_:{default:_}}},86792:(q,O)=>{"use strict";function E(l){return 14+(l+64>>>9<<4)+1}function d(l,h){var u=(65535&l)+(65535&h);return(l>>16)+(h>>16)+(u>>16)<<16|65535&u}function x(l,h,u,m,_,w){return d((S=d(d(h,l),d(m,w)))<<(I=_)|S>>>32-I,u);var S,I}function f(l,h,u,m,_,w,S){return x(h&u|~h&m,l,h,_,w,S)}function T(l,h,u,m,_,w,S){return x(h&m|u&~m,l,h,_,w,S)}function g(l,h,u,m,_,w,S){return x(h^u^m,l,h,_,w,S)}function b(l,h,u,m,_,w,S){return x(u^(h|~m),l,h,_,w,S)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default=function(l){if("string"==typeof l){var h=unescape(encodeURIComponent(l));l=new Uint8Array(h.length);for(var u=0;u>5]>>>I%32&255,L=parseInt(S.charAt(P>>>4&15)+S.charAt(15&P),16);_.push(L)}return _}(function(m,_){m[_>>5]|=128<<_%32,m[E(_)-1]=_;for(var w=1732584193,S=-271733879,I=-1732584194,P=271733878,L=0;L>5]|=(255&m[S/8])<{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var E={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};O.default=E},55996:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default="00000000-0000-0000-0000-000000000000"},91729:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x=(d=E(76163))&&d.__esModule?d:{default:d};O.default=function(f){if(!(0,x.default)(f))throw TypeError("Invalid UUID");var T,g=new Uint8Array(16);return g[0]=(T=parseInt(f.slice(0,8),16))>>>24,g[1]=T>>>16&255,g[2]=T>>>8&255,g[3]=255&T,g[4]=(T=parseInt(f.slice(9,13),16))>>>8,g[5]=255&T,g[6]=(T=parseInt(f.slice(14,18),16))>>>8,g[7]=255&T,g[8]=(T=parseInt(f.slice(19,23),16))>>>8,g[9]=255&T,g[10]=(T=parseInt(f.slice(24,36),16))/1099511627776&255,g[11]=T/4294967296&255,g[12]=T>>>24&255,g[13]=T>>>16&255,g[14]=T>>>8&255,g[15]=255&T,g}},77300:(q,O)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},14402:(q,O)=>{"use strict";var E;Object.defineProperty(O,"__esModule",{value:!0}),O.default=function(){if(!E&&!(E="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(d)};var d=new Uint8Array(16)},42702:(q,O)=>{"use strict";function E(x,f,T,g){switch(x){case 0:return f&T^~f&g;case 1:case 3:return f^T^g;case 2:return f&T^f&g^T&g}}function d(x,f){return x<>>32-f}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.default=function(x){var f=[1518500249,1859775393,2400959708,3395469782],T=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof x){var g=unescape(encodeURIComponent(x));x=[];for(var b=0;b>>0;j=H,H=G,G=d(W,30)>>>0,W=V,V=o}T[0]=T[0]+V>>>0,T[1]=T[1]+W>>>0,T[2]=T[2]+G>>>0,T[3]=T[3]+H>>>0,T[4]=T[4]+j>>>0}return[T[0]>>24&255,T[0]>>16&255,T[0]>>8&255,255&T[0],T[1]>>24&255,T[1]>>16&255,T[1]>>8&255,255&T[1],T[2]>>24&255,T[2]>>16&255,T[2]>>8&255,255&T[2],T[3]>>24&255,T[3]>>16&255,T[3]>>8&255,255&T[3],T[4]>>24&255,T[4]>>16&255,T[4]>>8&255,255&T[4]]}},22982:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0,O.unsafeStringify=g;for(var d,x=(d=E(76163))&&d.__esModule?d:{default:d},f=[],T=0;T<256;++T)f.push((T+256).toString(16).slice(1));function g(b){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(f[b[l+0]]+f[b[l+1]]+f[b[l+2]]+f[b[l+3]]+"-"+f[b[l+4]]+f[b[l+5]]+"-"+f[b[l+6]]+f[b[l+7]]+"-"+f[b[l+8]]+f[b[l+9]]+"-"+f[b[l+10]]+f[b[l+11]]+f[b[l+12]]+f[b[l+13]]+f[b[l+14]]+f[b[l+15]]).toLowerCase()}O.default=function(b){var l=g(b,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,x.default)(l))throw TypeError("Stringified UUID is invalid");return l}},55999:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x,f,T=(d=E(14402))&&d.__esModule?d:{default:d},g=E(22982),b=0,l=0;O.default=function(h,u,m){var _=u&&m||0,w=u||new Array(16),S=(h=h||{}).node||x,I=void 0!==h.clockseq?h.clockseq:f;if(null==S||null==I){var P=h.random||(h.rng||T.default)();null==S&&(S=x=[1|P[0],P[1],P[2],P[3],P[4],P[5]]),null==I&&(I=f=16383&(P[6]<<8|P[7]))}var L=void 0!==h.msecs?h.msecs:Date.now(),V=void 0!==h.nsecs?h.nsecs:l+1,W=L-b+(V-l)/1e4;if(W<0&&void 0===h.clockseq&&(I=I+1&16383),(W<0||L>b)&&void 0===h.nsecs&&(V=0),V>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");b=L,l=V,f=I;var G=(1e4*(268435455&(L+=122192928e5))+V)%4294967296;w[_++]=G>>>24&255,w[_++]=G>>>16&255,w[_++]=G>>>8&255,w[_++]=255&G;var H=L/4294967296*1e4&268435455;w[_++]=H>>>8&255,w[_++]=255&H,w[_++]=H>>>24&15|16,w[_++]=H>>>16&255,w[_++]=I>>>8|128,w[_++]=255&I;for(var j=0;j<6;++j)w[_+j]=S[j];return u||(0,g.unsafeStringify)(w)}},28231:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=f(E(36125)),x=f(E(86792));function f(g){return g&&g.__esModule?g:{default:g}}var T=(0,d.default)("v3",48,x.default);O.default=T},36125:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.URL=O.DNS=void 0,O.default=function(b,l,h){function u(m,_,w,S){var I;if("string"==typeof m&&(m=function(V){V=unescape(encodeURIComponent(V));for(var W=[],G=0;G{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=T(E(11788)),x=T(E(14402)),f=E(22982);function T(g){return g&&g.__esModule?g:{default:g}}O.default=function(g,b,l){if(d.default.randomUUID&&!b&&!g)return d.default.randomUUID();var h=(g=g||{}).random||(g.rng||x.default)();if(h[6]=15&h[6]|64,h[8]=63&h[8]|128,b){l=l||0;for(var u=0;u<16;++u)b[l+u]=h[u];return b}return(0,f.unsafeStringify)(h)}},65025:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=f(E(36125)),x=f(E(42702));function f(g){return g&&g.__esModule?g:{default:g}}var T=(0,d.default)("v5",80,x.default);O.default=T},76163:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x=(d=E(77300))&&d.__esModule?d:{default:d};O.default=function(f){return"string"==typeof f&&x.default.test(f)}},8928:(q,O,E)=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d,x=(d=E(76163))&&d.__esModule?d:{default:d};O.default=function(f){if(!(0,x.default)(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}},38325:q=>{"use strict";q.exports=function d(x,f){var T,g=0,b=0,l=f=f||0,h=x.length;do{if(l>=h)throw d.bytes=0,new RangeError("Could not decode varint");T=x[l++],g+=b<28?(T&E)<=O);return d.bytes=l-f,g};var O=128,E=127},92699:q=>{"use strict";q.exports=function x(f,T,g){T=T||[];for(var b=g=g||0;f>=d;)T[g++]=255&f|O,f/=128;for(;f&E;)T[g++]=255&f|O,f>>>=7;return T[g]=0|f,x.bytes=g-b+1,T};var O=128,E=-128,d=Math.pow(2,31)},26657:(q,O,E)=>{"use strict";q.exports={encode:E(92699),decode:E(38325),encodingLength:E(57490)}},57490:q=>{"use strict";var O=Math.pow(2,7),E=Math.pow(2,14),d=Math.pow(2,21),x=Math.pow(2,28),f=Math.pow(2,35),T=Math.pow(2,42),g=Math.pow(2,49),b=Math.pow(2,56),l=Math.pow(2,63);q.exports=function(h){return h{"use strict";var d,x=E(28847)(E(3355));if("object"===("undefined"==typeof globalThis?"undefined":(0,x.default)(globalThis)))d=globalThis;else try{d=E(26464)}catch{}finally{if(d||"undefined"==typeof window||(d=window),!d)throw new Error("Could not determine global this")}var f=d.WebSocket||d.MozWebSocket,T=E(75735);function g(b,l){return l?new f(b,l):new f(b)}f&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(b){Object.defineProperty(g,b,{get:function(){return f[b]}})}),q.exports={w3cwebsocket:f?g:null,version:T}},75735:(q,O,E)=>{"use strict";q.exports=E(19794).version},72337:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(48184),f=E(43604),T=E(24373),g=E(80593),b=E(53820),l=g("Object.prototype.toString"),h=E(11191)(),u="undefined"==typeof globalThis?E.g:globalThis,m=f(),_=g("String.prototype.slice"),w=Object.getPrototypeOf,S=g("Array.prototype.indexOf",!0)||function(P,L){for(var V=0;V-1?L:"Object"===L&&(V=P,W=!1,x(I,function(G,H){if(!W)try{G(V),W=_(H,1)}catch{}}),W)}var V,W;return b?function(V){var W=!1;return x(I,function(G,H){if(!W)try{"$"+G(V)===H&&(W=_(H,1))}catch{}}),W}(P):null}},31357:(q,O,E)=>{"use strict";var d=E(31296),x=E(68419),f=E(33103),T=E(39122),g=E(17321),b="application/json",l=function(){};q.exports=function(h,u,m){if(!h||"string"!=typeof h)throw new TypeError("must specify a URL");if("function"==typeof u&&(m=u,u={}),m&&"function"!=typeof m)throw new TypeError("expected cb to be undefined or a function");m=m||l;var _=(u=u||{}).json?"json":"text",w=(u=f({responseType:_},u)).headers||{},S=(u.method||"GET").toUpperCase(),I=u.query;return I&&("string"!=typeof I&&(I=d.stringify(I)),h=x(h,I)),"json"===u.responseType&&T(w,"Accept",b),u.json&&"GET"!==S&&"HEAD"!==S&&(T(w,"Content-Type",b),u.body=JSON.stringify(u.body)),u.method=S,u.url=h,u.headers=w,delete u.query,delete u.json,g(u,m)}},39122:q=>{"use strict";q.exports=function(O,E,d){var x=E.toLowerCase();O[E]||O[x]||(O[E]=d)}},49800:q=>{"use strict";q.exports=function(O,E){return E?{statusCode:E.statusCode,headers:E.headers,method:O.method,url:O.url,rawRequest:E.rawRequest?E.rawRequest:E}:null}},17321:(q,O,E)=>{"use strict";var d=E(30346),x=E(49800),f=function(){};q.exports=function(T,g){delete T.uri;var b=!1;"json"===T.responseType&&(T.responseType="text",b=!0);var l=d(T,function(u,m,_){if(b&&!u)try{_=JSON.parse(m.rawRequest.responseText)}catch(S){u=S}m=x(T,m),g(u,u?null:_,m),g=f}),h=l.onabort;return l.onabort=function(){var u=h.apply(l,Array.prototype.slice.call(arguments));return g(new Error("XHR Aborted")),g=f,u},l}},30346:(q,O,E)=>{"use strict";var d=E(92948),x=E(27277),f=E(48209),T=E(87705);function g(h,u,m){var _=h;return x(u)?(m=u,"string"==typeof h&&(_={uri:h})):_=T(u,{uri:h}),_.callback=m,_}function b(h,u,m){return l(u=g(h,u,m))}function l(h){if(void 0===h.callback)throw new Error("callback argument missing");var u=!1,m=function(y,M,v){u||(u=!0,h.callback(y,M,v))};function _(){var y=void 0;if(y=L.response?L.response:L.responseText||function(M){try{if("document"===M.responseType)return M.responseXML;if(""===M.responseType&&(!M.responseXML||"parsererror"!==M.responseXML.documentElement.nodeName))return M.responseXML}catch{}return null}(L),R)try{y=JSON.parse(y)}catch{}return y}function w(y){return clearTimeout(V),y instanceof Error||(y=new Error(""+(y||"Unknown XMLHttpRequest Error"))),y.statusCode=0,m(y,o)}function S(){if(!P){var y;clearTimeout(V);var M=o,v=null;return 0!==(y=h.useXDR&&void 0===L.status?200:1223===L.status?204:L.status)?(M={body:_(),statusCode:y,method:G,headers:{},url:W,rawRequest:L},L.getAllResponseHeaders&&(M.headers=f(L.getAllResponseHeaders()))):v=new Error("Internal XMLHttpRequest Error"),m(v,M,M.body)}}var I,P,L=h.xhr||null;L||(L=h.cors||h.useXDR?new b.XDomainRequest:new b.XMLHttpRequest);var V,W=L.url=h.uri||h.url,G=L.method=h.method||"GET",H=h.body||h.data,j=L.headers=h.headers||{},K=!!h.sync,R=!1,o={body:void 0,headers:{},statusCode:0,method:G,url:W,rawRequest:L};if("json"in h&&!1!==h.json&&(R=!0,j.accept||j.Accept||(j.Accept="application/json"),"GET"!==G&&"HEAD"!==G&&(j["content-type"]||j["Content-Type"]||(j["Content-Type"]="application/json"),H=JSON.stringify(!0===h.json?H:h.json))),L.onreadystatechange=function(){4===L.readyState&&setTimeout(S,0)},L.onload=S,L.onerror=w,L.onprogress=function(){},L.onabort=function(){P=!0},L.ontimeout=w,L.open(G,W,!K,h.username,h.password),K||(L.withCredentials=!!h.withCredentials),!K&&h.timeout>0&&(V=setTimeout(function(){if(!P){P=!0,L.abort("timeout");var y=new Error("XMLHttpRequest timeout");y.code="ETIMEDOUT",w(y)}},h.timeout)),L.setRequestHeader)for(I in j)j.hasOwnProperty(I)&&L.setRequestHeader(I,j[I]);else if(h.headers&&!function(y){for(var M in y)if(y.hasOwnProperty(M))return!1;return!0}(h.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in h&&(L.responseType=h.responseType),"beforeSend"in h&&"function"==typeof h.beforeSend&&h.beforeSend(L),L.send(H||null),L}q.exports=b,q.exports.default=b,b.XMLHttpRequest=d.XMLHttpRequest||function(){},b.XDomainRequest="withCredentials"in new b.XMLHttpRequest?b.XMLHttpRequest:d.XDomainRequest,function(h,u){for(var m=0;m{"use strict";q.exports=function(){for(var E={},d=0;d{"use strict";var d=E(28847)(E(3355)),x=E(26427),f=function T(g){this.givenProvider=T.givenProvider,g&&g._requestManager&&(g=g.currentProvider),"undefined"!=typeof document&&(this.pick=x.pick),this.setProvider(g)};f.givenProvider=null,"undefined"!=typeof ethereum&ðereum.bzz&&(f.givenProvider=ethereum.bzz),f.prototype.setProvider=function(T){if(T&&"object"===(0,d.default)(T)&&"string"==typeof T.bzz&&(T=T.bzz),"string"!=typeof T){this.currentProvider=null;var g=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw g},!1}return this.currentProvider=T,this.download=x.at(T).download,this.upload=x.at(T).upload,this.isAvailable=x.at(T).isAvailable,!0},q.exports=f},94246:(q,O,E)=>{"use strict";var d=E(28847)(E(3355));q.exports={ErrorResponse:function(x){var f=x&&x.error&&x.error.message?x.error.message:JSON.stringify(x),T=x.error&&x.error.data?x.error.data:null,g=new Error("Returned error: "+f);return g.data=T,g},InvalidNumberOfParams:function(x,f,T){return new Error('Invalid number of parameters for "'+T+'". Got '+x+" expected "+f+"!")},InvalidConnection:function(x,f){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+x+".",f)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(x){var f=x&&x.error&&x.error.message?x.error.message:"Invalid JSON RPC response: "+JSON.stringify(x);return new Error(f)},ConnectionTimeout:function(x){return new Error("CONNECTION TIMEOUT: timeout of "+x+" ms achived")},ConnectionNotOpenError:function(x){return this.ConnectionError("connection not open on send()",x)},ConnectionCloseError:function(x){return"object"===(0,d.default)(x)&&x.code&&x.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+x.code+"` and the following reason string `"+x.reason+"`",x):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(x,f){var T=new Error(x);return f&&(T.code=f.code,T.reason=f.reason,f.description&&(T.description=f.description)),T},RevertInstructionError:function(x,f){var T=new Error("Your request got reverted with the following reason string: "+x);return T.reason=x,T.signature=f,T},TransactionRevertInstructionError:function(x,f,T){var g=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(T,null,2));return g.reason=x,g.signature=f,g.receipt=T,g},TransactionError:function(x,f){var T=new Error(x);return T.receipt=f,T},NoContractAddressFoundError:function(x){return this.TransactionError("The transaction receipt didn't contain a contract address.",x)},ContractCodeNotStoredError:function(x){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",x)},TransactionRevertedWithoutReasonError:function(x){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(x,null,2),x)},TransactionOutOfGasError:function(x){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(x,null,2),x)},ResolverMethodMissingError:function(x,f){return new Error("The resolver at "+x+'does not implement requested method: "'+f+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(x){return new Error('Event "'+x+"\" doesn't exist in this contract.")},ContractReservedEventError:function(x){return new Error('The event "'+x+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},32084:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(90775)),f=d(E(3355));function T(I,P){var L=Object.keys(I);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(I);P&&(V=V.filter(function(W){return Object.getOwnPropertyDescriptor(I,W).enumerable})),L.push.apply(L,V)}return L}function g(I){for(var P=1;P{"use strict";var d=E(94246),x=E(32084);q.exports={errors:d,formatters:x}},53349:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(74519)),T=d(E(90775)),g=d(E(94571)),b=d(E(3355));function l(V,W){var G=Object.keys(V);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(V);W&&(H=H.filter(function(j){return Object.getOwnPropertyDescriptor(V,j).enumerable})),G.push.apply(G,H)}return G}function h(V){for(var W=1;W1?(V[G[0]]=V[G[0]]||{},V[G[0]][G[1]]=W):V[G[0]]=W},P.prototype.getCall=function(V){return"function"==typeof this.call?this.call(V):this.call},P.prototype.extractCallback=function(V){if("function"==typeof V[V.length-1])return V.pop()},P.prototype.validateArgs=function(V){if(V.length!==this.params)throw u.InvalidNumberOfParams(V.length,this.params,this.name)},P.prototype.formatInput=function(V){var W=this;return this.inputFormatter?this.inputFormatter.map(function(G,H){return G?G.call(W,V[H]):V[H]}):V},P.prototype.formatOutput=function(V){var W=this;return Array.isArray(V)?V.map(function(G){return W.outputFormatter&&G?W.outputFormatter(G,null==this?void 0:this.hexFormat):G}):this.outputFormatter&&V?this.outputFormatter(V,null==this?void 0:this.hexFormat):V},P.prototype.toPayload=function(V){var W=this.getCall(V),G=this.extractCallback(V),H=this.formatInput(V);this.validateArgs(H);var j={method:W,params:H,callback:G};return this.transformPayload&&(j=this.transformPayload(j)),j},P.prototype._confirmTransaction=function(V,W,G){var H=this,j=!1,K=!0,R=0,o=0,y=null,M=null,v=null,k=G.params[0]&&"object"===(0,b.default)(G.params[0])&&G.params[0].gas?G.params[0].gas:null,D=!!G.params[0]&&"object"===(0,b.default)(G.params[0])&&G.params[0].data&&G.params[0].from&&!G.params[0].to,N=D&&G.params[0].data.length>2,C=[new P({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[m.inputBlockNumberFormatter,function(ee){return!!ee}],outputFormatter:m.outputBlockFormatter}),new P({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new P({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new P({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new S({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter}}})],a={};C.forEach(function(ee){ee.attachToObject(a),ee.requestManager=H.requestManager});var B=function(ee,ce,ue,we,ae){if(!ue)return ae||(ae={unsubscribe:function(){clearInterval(y),clearTimeout(M)}}),(ee?w.resolve(ee):a.getTransactionReceipt(W)).catch(function(Te){ae.unsubscribe(),j=!0,_._fireError({message:"Failed to check for transaction receipt:",data:Te},V.eventEmitter,V.reject)}).then((Te=(0,g.default)(x.default.mark(function le(X){var ne,pe,_e;return x.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(X&&X.blockHash){xe.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(H.extraFormatters&&H.extraFormatters.receiptFormatter&&(X=H.extraFormatters.receiptFormatter(X)),!(V.eventEmitter.listeners("confirmation").length>0)){xe.next=28;break}if(void 0!==ee&&0===o){xe.next=25;break}return xe.next=7,a.getBlockByNumber("latest");case 7:if(_e=(pe=xe.sent)?pe.hash:null,!ce){xe.next=24;break}if(!v){xe.next=17;break}return xe.next=13,a.getBlockByNumber(v.number+1);case 13:(ne=xe.sent)&&(v=ne,V.eventEmitter.emit("confirmation",o,X,_e)),xe.next=22;break;case 17:return xe.next=19,a.getBlockByNumber(X.blockNumber);case 19:v=ne=xe.sent,V.eventEmitter.emit("confirmation",o,X,_e);case 22:xe.next=25;break;case 24:V.eventEmitter.emit("confirmation",o,X,_e);case 25:(ce&&ne||!ce)&&o++,K=!1,o===H.transactionConfirmationBlocks+1&&(ae.unsubscribe(),V.eventEmitter.removeAllListeners());case 28:return xe.abrupt("return",X);case 29:case"end":return xe.stop()}},le)})),function(le){return Te.apply(this,arguments)})).then(function(){var Te=(0,g.default)(x.default.mark(function le(X){var ne;return x.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(!D||j){pe.next=19;break}if(X.contractAddress){pe.next=5;break}return K&&(ae.unsubscribe(),j=!0),_._fireError(u.NoContractAddressFoundError(X),V.eventEmitter,V.reject,null,X),pe.abrupt("return");case 5:return pe.prev=5,pe.next=8,a.getCode(X.contractAddress);case 8:ne=pe.sent,pe.next=13;break;case 11:pe.prev=11,pe.t0=pe.catch(5);case 13:if(ne){pe.next=15;break}return pe.abrupt("return");case 15:!0===X.status&&N||ne.length>2?(V.eventEmitter.emit("receipt",X),V.resolve(H.extraFormatters&&H.extraFormatters.contractDeployFormatter?H.extraFormatters.contractDeployFormatter(X):X),K&&V.eventEmitter.removeAllListeners()):_._fireError(u.ContractCodeNotStoredError(X),V.eventEmitter,V.reject,null,X),K&&ae.unsubscribe(),j=!0;case 19:return pe.abrupt("return",X);case 20:case"end":return pe.stop()}},le,null,[[5,11]])}));return function(le){return Te.apply(this,arguments)}}()).then(function(){var Te=(0,g.default)(x.default.mark(function le(X){var ne,pe,xe;return x.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(D||j){Ce.next=35;break}if(X.outOfGas||k&&k===X.gasUsed||!0!==X.status&&"0x1"!==X.status&&void 0!==X.status){Ce.next=7;break}V.eventEmitter.emit("receipt",X),V.resolve(X),K&&V.eventEmitter.removeAllListeners(),Ce.next=33;break;case 7:if(JSON.stringify(X,null,2),!1!==X.status&&"0x0"!==X.status){Ce.next=32;break}if(Ce.prev=9,ne=null,!H.handleRevert||"eth_sendTransaction"!==H.call&&"eth_sendRawTransaction"!==H.call){Ce.next=24;break}return pe=G.params[0],"eth_sendRawTransaction"===H.call&&(xe=I.parse(G.params[0]),pe=m.inputTransactionFormatter({data:xe.data,to:xe.to,from:xe.from,gas:xe.gasLimit.toHexString(),gasPrice:xe.gasPrice?xe.gasPrice.toHexString():void 0,value:xe.value.toHexString()})),Ce.next=16,H.getRevertReason(pe,X.blockNumber);case 16:if(!(ne=Ce.sent)){Ce.next=21;break}_._fireError(u.TransactionRevertInstructionError(ne.reason,ne.signature,X),V.eventEmitter,V.reject,null,X),Ce.next=22;break;case 21:throw!1;case 22:Ce.next=25;break;case 24:throw!1;case 25:Ce.next=30;break;case 27:Ce.prev=27,Ce.t0=Ce.catch(9),_._fireError(u.TransactionRevertedWithoutReasonError(X),V.eventEmitter,V.reject,null,X);case 30:Ce.next=33;break;case 32:_._fireError(u.TransactionOutOfGasError(X),V.eventEmitter,V.reject,null,X);case 33:K&&ae.unsubscribe(),j=!0;case 35:case"end":return Ce.stop()}},le,null,[[9,27]])}));return function(le){return Te.apply(this,arguments)}}()).catch(function(){R++,ce?R-1>=H.transactionPollingTimeout&&(ae.unsubscribe(),j=!0,_._fireError(u.TransactionError("Transaction was not mined within "+H.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),V.eventEmitter,V.reject)):R-1>=H.transactionBlockTimeout&&(ae.unsubscribe(),j=!0,_._fireError(u.TransactionError("Transaction was not mined within "+H.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),V.eventEmitter,V.reject))});var Te;ae.unsubscribe(),j=!0,_._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:ue},V.eventEmitter,V.reject)},Q=function(ee){var ce=!1,ue=function(){y=setInterval(B.bind(null,ee,!0),H.transactionPollingInterval)};if(!this.requestManager.provider.on)return ue();a.subscribe("newBlockHeaders",function(we,ae,Te){if(ce=!0,we||!ae)return ue();B(ee,!1,we,0,Te)}),M=setTimeout(function(){ce||ue()},1e3*this.blockHeaderTimeout)}.bind(this);a.getTransactionReceipt(W).then(function(ee){ee&&ee.blockHash?(V.eventEmitter.listeners("confirmation").length>0&&Q(ee),B(ee,!1)):j||Q()}).catch(function(){j||Q()})};var L=function(V,W){return"number"==typeof V?W.wallet[V]:V&&"object"===(0,b.default)(V)&&V.address&&V.privateKey?V:W.wallet[V.toLowerCase()]};P.prototype.buildCall=function(){var V=this,W="eth_sendTransaction"===V.call||"eth_sendRawTransaction"===V.call,G="eth_call"===V.call,H=function(){var j=Array.prototype.slice.call(arguments),K=w(!W),R=V.toPayload(j);V.hexFormat=!1,"eth_getTransactionReceipt"!==V.call&&"eth_getTransactionByHash"!==V.call&&"getBlock"!==V.name||(V.hexFormat=R.params.length{"use strict";var d=E(98008),x=function(f){var T,g,b=new Promise(function(){T=arguments[0],g=arguments[1]});if(f)return{resolve:T,reject:g,eventEmitter:b};var l=new d;return b._events=l._events,b.emit=l.emit,b.on=l.on,b.once=l.once,b.off=l.off,b.listeners=l.listeners,b.addListener=l.addListener,b.removeListener=l.removeListener,b.removeAllListeners=l.removeAllListeners,{resolve:T,reject:g,eventEmitter:b}};x.resolve=function(f){var T=x(!0);return T.resolve(f),T.eventEmitter},q.exports=x},35229:(q,O,E)=>{"use strict";var d=E(48155),x=E(11314).errors,f=function(T){this.requestManager=T,this.requests=[]};f.prototype.add=function(T){this.requests.push(T)},f.prototype.execute=function(){var T=this.requests,g=this._sortResponses.bind(this);this.requestManager.sendBatch(T,function(b,l){l=g(l),T.map(function(h,u){return l[u]||{}}).forEach(function(h,u){if(T[u].callback){if(h&&h.error)return T[u].callback(x.ErrorResponse(h));if(!d.isValidResponse(h))return T[u].callback(x.InvalidResponse(h));try{T[u].callback(null,T[u].format?T[u].format(h.result):h.result)}catch(m){T[u].callback(m)}}})})},f.prototype._sortResponses=function(T){return(T||[]).sort(function(g,b){return g.id-b.id})},q.exports=f},99764:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=null,f="object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))?globalThis:void 0;if(!f)try{f=Function("return this")()}catch{f=self}void 0!==f.ethereum?x=f.ethereum:void 0!==f.web3&&f.web3.currentProvider&&(f.web3.currentProvider.sendAsync&&(f.web3.currentProvider.send=f.web3.currentProvider.sendAsync,delete f.web3.currentProvider.sendAsync),!f.web3.currentProvider.on&&f.web3.currentProvider.connection&&"ipcProviderWrapper"===f.web3.currentProvider.connection.constructor.name&&(f.web3.currentProvider.on=function(T,g){if("function"!=typeof g)throw new Error("The second parameter callback must be a function.");"data"===T?this.connection.on("data",function(b){var l="";b=b.toString();try{l=JSON.parse(b)}catch{return g(new Error("Couldn't parse response data"+b))}l.id||-1===l.method.indexOf("_subscription")||g(null,l)}):this.connection.on(T,g)}),x=f.web3.currentProvider),q.exports=x},92033:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(45058).callbackify,f=E(11314).errors,T=E(48155),g=E(35229),b=E(99764),l=function h(u,m){this.provider=null,this.providers=h.providers,this.setProvider(u,m),this.subscriptions=new Map};l.givenProvider=b,l.providers={WebsocketProvider:E(77651),HttpProvider:E(14565),IpcProvider:E(52683)},l.prototype.setProvider=function(h,u){var m=this;if(h&&"string"==typeof h&&this.providers)if(/^http(s)?:\/\//i.test(h))h=new this.providers.HttpProvider(h);else if(/^ws(s)?:\/\//i.test(h))h=new this.providers.WebsocketProvider(h);else if(h&&"object"===(0,d.default)(u)&&"function"==typeof u.connect)h=new this.providers.IpcProvider(h,u);else if(h)throw new Error("Can't autodetect provider for \""+h+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=h||null,this.provider&&this.provider.on&&("function"==typeof h.request?this.provider.on("message",function(_){if(_&&"eth_subscription"===_.type&&_.data){var w=_.data;w.subscription&&m.subscriptions.has(w.subscription)&&m.subscriptions.get(w.subscription).callback(null,w.result)}}):this.provider.on("data",function(_,w){(_=_||w).method&&_.params&&_.params.subscription&&m.subscriptions.has(_.params.subscription)&&m.subscriptions.get(_.params.subscription).callback(null,_.params.result)}),this.provider.on("connect",function(){m.subscriptions.forEach(function(_){_.subscription.resubscribe()})}),this.provider.on("error",function(_){m.subscriptions.forEach(function(w){w.callback(_)})}),this.provider.on("disconnect",function(_){m._isCleanCloseEvent(_)&&!m._isIpcCloseError(_)||(m.subscriptions.forEach(function(w){w.callback(f.ConnectionCloseError(_)),m.subscriptions.delete(w.subscription.id)}),m.provider&&m.provider.emit&&m.provider.emit("error",f.ConnectionCloseError(_))),m.provider&&m.provider.emit&&m.provider.emit("end",_)}))},l.prototype.send=function(h,u){if(u=u||function(){},!this.provider)return u(f.InvalidProvider());var m=h.method,_=h.params,w=T.toPayload(m,_),S=this._jsonrpcResultCallback(u,w);if(this.provider.request)x(this.provider.request.bind(this.provider))({method:m,params:_},u);else if(this.provider.sendAsync)this.provider.sendAsync(w,S);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(w,S)}},l.prototype.sendBatch=function(h,u){if(!this.provider)return u(f.InvalidProvider());var m=T.toBatchPayload(h);this.provider[this.provider.sendAsync?"sendAsync":"send"](m,function(_,w){return _?u(_):Array.isArray(w)?void u(null,w):u(f.InvalidResponse(w))})},l.prototype.addSubscription=function(h,u){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(h.id,{callback:u,subscription:h})},l.prototype.removeSubscription=function(h,u){if(this.subscriptions.has(h)){var m=this.subscriptions.get(h).subscription.options.type;return this.subscriptions.delete(h),void this.send({method:m+"_unsubscribe",params:[h]},u)}"function"==typeof u&&u(null)},l.prototype.clearSubscriptions=function(h){try{var u=this;return this.subscriptions.size>0&&this.subscriptions.forEach(function(m,_){h&&"syncing"===m.name||u.removeSubscription(_)}),this.provider.reset&&this.provider.reset(),!0}catch(m){throw new Error("Error while clearing subscriptions: ".concat(m))}},l.prototype._isCleanCloseEvent=function(h){return"object"===(0,d.default)(h)&&([1e3].includes(h.code)||!0===h.wasClean)},l.prototype._isIpcCloseError=function(h){return"boolean"==typeof h&&h},l.prototype._jsonrpcResultCallback=function(h,u){return function(m,_){return _&&_.id&&u.id!==_.id?h(new Error("Wrong response id ".concat(_.id," (expected: ").concat(u.id,") in ").concat(JSON.stringify(u)))):m?h(m):_&&_.error?h(f.ErrorResponse(_)):T.isValidResponse(_)?void h(null,_.result):h(f.InvalidResponse(_))}},q.exports={Manager:l,BatchManager:g}},48155:q=>{"use strict";var O={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(E,d){if(!E)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(d)+'"!');return O.messageId===Number.MAX_SAFE_INTEGER?O.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):O.messageId++,{jsonrpc:"2.0",id:O.messageId,method:E,params:d||[]}},isValidResponse:function(E){return Array.isArray(E)?E.every(d):d(E);function d(x){return!(!x||x.error||"2.0"!==x.jsonrpc||"number"!=typeof x.id&&"string"!=typeof x.id||void 0===x.result)}},toBatchPayload:function(E){return E.map(function(d){return O.toPayload(d.method,d.params)})}};q.exports=O},34178:(q,O,E)=>{"use strict";var d=E(42929),x=function(f){this.name=f.name,this.type=f.type,this.subscriptions=f.subscriptions||{},this.requestManager=null};x.prototype.setRequestManager=function(f){this.requestManager=f},x.prototype.attachToObject=function(f){var T=this.buildCall(),g=this.name.split(".");g.length>1?(f[g[0]]=f[g[0]]||{},f[g[0]][g[1]]=T):f[g[0]]=T},x.prototype.buildCall=function(){var f=this;return function(){f.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var T=new d({subscription:f.subscriptions[arguments[0]]||{},requestManager:f.requestManager,type:f.type});return T.subscribe.apply(T,arguments)}},q.exports={subscriptions:x,subscription:d}},42929:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(11314).errors,f=E(98008),T=E(11314).formatters;function g(l){return l}function b(l){f.call(this),this.id=null,this.callback=g,this.arguments=null,this.lastBlock=null,this.options={subscription:l.subscription,type:l.type,requestManager:l.requestManager}}(b.prototype=Object.create(f.prototype)).constructor=b,b.prototype._extractCallback=function(l){if("function"==typeof l[l.length-1])return l.pop()},b.prototype._validateArgs=function(l){var h=this.options.subscription;if(h||(h={}),h.params||(h.params=0),l.length!==h.params)throw x.InvalidNumberOfParams(l.length,h.params,h.subscriptionName)},b.prototype._formatInput=function(l){var h=this.options.subscription;return h&&h.inputFormatter?h.inputFormatter.map(function(u,m){return u?u(l[m]):l[m]}):l},b.prototype._formatOutput=function(l){var h=this.options.subscription;return h&&h.outputFormatter&&l?h.outputFormatter(l):l},b.prototype._toPayload=function(l){var h=[];if(this.callback=this._extractCallback(l)||g,this.subscriptionMethod||(this.subscriptionMethod=l.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(l),this._validateArgs(this.arguments),l=[]),h.push(this.subscriptionMethod),h=h.concat(this.arguments),l.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:h}},b.prototype.unsubscribe=function(l){this.options.requestManager.removeSubscription(this.id,l),this.id=null,this.lastBlock=null,this.removeAllListeners()},b.prototype.subscribe=function(){var l=this,h=Array.prototype.slice.call(arguments),u=this._toPayload(h);if(!u)return this;if(!this.options.requestManager.provider)return setTimeout(function(){var _=new Error("No provider set.");l.callback(_,null,l),l.emit("error",_)},0),this;if(!this.options.requestManager.provider.on)return setTimeout(function(){var _=new Error("The current provider doesn't support subscriptions: "+l.options.requestManager.provider.constructor.name);l.callback(_,null,l),l.emit("error",_)},0),this;if(this.lastBlock&&this.options.params&&"object"===(0,d.default)(this.options.params)&&(u.params[1]=this.options.params,u.params[1].fromBlock=T.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=u.params[1],"logs"===u.params[0]&&u.params[1]&&"object"===(0,d.default)(u.params[1])&&u.params[1].hasOwnProperty("fromBlock")&&isFinite(u.params[1].fromBlock)){var m=Object.assign({},u.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[m]},function(_,w){_?setTimeout(function(){l.callback(_,null,l),l.emit("error",_)},0):w.forEach(function(S){var I=l._formatOutput(S);l.callback(null,I,l),l.emit("data",I)})})}return"object"===(0,d.default)(u.params[1])&&delete u.params[1].fromBlock,this.options.requestManager.send(u,function(_,w){!_&&w?(l.id=w,l.method=u.params[0],l.options.requestManager.addSubscription(l,function(S,I){S?(l.callback(S,!1,l),l.emit("error",S)):(Array.isArray(I)||(I=[I]),I.forEach(function(P){var L=l._formatOutput(P);if(l.lastBlock=L&&"object"===(0,d.default)(L)?L.blockNumber:null,"function"==typeof l.options.subscription.subscriptionHandler)return l.options.subscription.subscriptionHandler.call(l,L);l.emit("data",L),l.callback(null,L,l)}))}),l.emit("connected",w)):setTimeout(function(){l.callback(_,!1,l),l.emit("error",_)},0)}),this},b.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},q.exports=b},1949:(q,O,E)=>{"use strict";var d=E(11314).formatters,x=E(53349),f=E(48161);q.exports=function(T){var g=function(b){var l;return b.property?(T[b.property]||(T[b.property]={}),l=T[b.property]):l=T,b.methods&&b.methods.forEach(function(h){h instanceof x||(h=new x(h)),h.attachToObject(l),h.setRequestManager(T._requestManager)}),T};return g.formatters=d,g.utils=f,g.Method=x,g}},80606:(q,O,E)=>{"use strict";var d=E(92033),x=E(1949);q.exports={packageInit:function(f,T){if(T=Array.prototype.slice.call(T),!f)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(f,"currentProvider",{get:function(){return f._provider},set:function(g){return f.setProvider(g)},enumerable:!0,configurable:!0}),f._requestManager=T[0]&&T[0]._requestManager?T[0]._requestManager:new d.Manager(T[0],T[1]),f.givenProvider=d.Manager.givenProvider,f.providers=d.Manager.providers,f._provider=f._requestManager.provider,f.setProvider||(f.setProvider=function(g,b){return f._requestManager.setProvider(g,b),f._provider=f._requestManager.provider,!0}),f.setRequestManager=function(g){f._requestManager=g,f._provider=g.provider},f.BatchRequest=d.BatchManager.bind(null,f._requestManager),f.extend=x(f)},addProviders:function(f){f.givenProvider=d.Manager.givenProvider,f.providers=d.Manager.providers}}},79901:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(29033).Buffer,f=E(48161),T=E(62914).RQ,g=E(62914)._R,b=new T(function(m,_){return!m.match(/^u?int/)||Array.isArray(_)||_&&"object"===(0,d.default)(_)&&"BN"===_.constructor.name?_:_.toString()});function l(){}var h=function(){};h.prototype.encodeFunctionSignature=function(m){return("function"==typeof m||"object"===(0,d.default)(m)&&m)&&(m=f._jsonInterfaceMethodToString(m)),f.sha3(m).slice(0,10)},h.prototype.encodeEventSignature=function(m){return("function"==typeof m||"object"===(0,d.default)(m)&&m)&&(m=f._jsonInterfaceMethodToString(m)),f.sha3(m)},h.prototype.encodeParameter=function(m,_){return this.encodeParameters([m],[_])},h.prototype.encodeParameters=function(m,_){var w=this;return m=w.mapTypes(m),_=_.map(function(S,I){var P=m[I];return"object"===(0,d.default)(P)&&P.type&&(P=P.type),S=w.formatParam(P,S),"string"==typeof P&&P.includes("tuple")&&function L(V,W){if("array"===V.name){if(!V.type.match(/\[(\d+)\]/))return W.map(function(H){return L(b._getCoder(g.from(V.type.replace("[]",""))),H)});var G=parseInt(V.type.match(/\[(\d+)\]/)[1]);if(W.length!==G)throw new Error("Array length does not matches with the given input");return W.map(function(H){return L(b._getCoder(g.from(V.type.replace(/\[\d+\]/,""))),H)})}V.coders.forEach(function(H,j){"tuple"===H.name?L(H,W[j]):W[j]=w.formatParam(H.name,W[j])})}(b._getCoder(g.from(P)),S),S}),b.encode(m,_)},h.prototype.mapTypes=function(m){var _=this,w=[];return m.forEach(function(S){if("object"===(0,d.default)(S)&&"function"===S.type&&(S=Object.assign({},S,{type:"bytes24"})),_.isSimplifiedStructFormat(S)){var I=Object.keys(S)[0];w.push(Object.assign(_.mapStructNameAndType(I),{components:_.mapStructToCoderFormat(S[I])}))}else w.push(S)}),w},h.prototype.isSimplifiedStructFormat=function(m){return"object"===(0,d.default)(m)&&void 0===m.components&&void 0===m.name},h.prototype.mapStructNameAndType=function(m){var _="tuple";return m.indexOf("[]")>-1&&(_="tuple[]",m=m.slice(0,-2)),{type:_,name:m}},h.prototype.mapStructToCoderFormat=function(m){var _=this,w=[];return Object.keys(m).forEach(function(S){"object"!==(0,d.default)(m[S])?w.push({name:S,type:m[S]}):w.push(Object.assign(_.mapStructNameAndType(S),{components:_.mapStructToCoderFormat(m[S])}))}),w},h.prototype.formatParam=function(m,_){var w=this,S=new RegExp(/^bytes([0-9]*)$/),I=new RegExp(/^bytes([0-9]*)\[\]$/),P=new RegExp(/^(u?int)([0-9]*)$/),L=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(f.isBN(_)||f.isBigNumber(_))return _.toString(10);if(m.match(I)||m.match(L))return _.map(function(j){return w.formatParam(m.replace("[]",""),j)});var V=m.match(P);if(V){var W=parseInt(V[2]||"256");W/8<_.length&&(_=_.startsWith("-")?"-".concat(f.leftPad(_.substring(1),W)):f.leftPad(_,W))}if(V=m.match(S)){x.isBuffer(_)&&(_=f.toHex(_));var G=parseInt(V[1]);if(G){var H=2*G;"0x"===_.substring(0,2)&&(H+=2),_.length0&&(!_||"0x"===_||"0X"===_))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var S=b.decode(this.mapTypes(m),"0x"+_.replace(/0x/i,""),w),I=new l;return I.__length__=0,m.forEach(function(P,L){var V=S[I.__length__],W="object"===(0,d.default)(P)&&P.type&&"string"===P.type;I[L]=V="0x"!==V||W||"string"==typeof P&&"string"===P?V:null,("function"==typeof P||P&&"object"===(0,d.default)(P))&&P.name&&(I[P.name]=V),I.__length__++}),I},h.prototype.decodeLog=function(m,_,w){var S=this;w=Array.isArray(w)?w:[w],_=_||"";var I=[],P=[],L=0;m.forEach(function(H,j){H.indexed?(P[j]=["bool","int","uint","address","fixed","ufixed"].find(function(K){return-1!==H.type.indexOf(K)})?S.decodeParameter(H.type,w[L]):w[L],L++):I[j]=H});var W=_?this.decodeParametersWith(I,_,!0):[],G=new l;return G.__length__=0,m.forEach(function(H,j){G[j]="string"===H.type?"":null,void 0!==W[j]&&(G[j]=W[j]),void 0!==P[j]&&(G[j]=P[j]),H.name&&(G[H.name]=G[j]),G.__length__++}),G};var u=new h;q.exports=u},99819:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(93106)),T=x(E(3355)),g=x(E(90775)),b=x(E(74519));function l(v,k){var D=Object.keys(v);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(v);k&&(N=N.filter(function(C){return Object.getOwnPropertyDescriptor(v,C).enumerable})),D.push.apply(D,N)}return D}function h(v){for(var k=1;kv.length)&&(k=v.length);for(var D=0,N=new Array(k);D0){var Te,le="Signer Error: ",X=function(Ce,ke){var me="undefined"!=typeof Symbol&&Ce[Symbol.iterator]||Ce["@@iterator"];if(!me){if(Array.isArray(Ce)||(me=function(mt,ht){if(mt){if("string"==typeof mt)return u(mt,void 0);var wt=Object.prototype.toString.call(mt).slice(8,-1);return"Object"===wt&&mt.constructor&&(wt=mt.constructor.name),"Map"===wt||"Set"===wt?Array.from(mt):"Arguments"===wt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wt)?u(mt,void 0):void 0}}(Ce))){me&&(Ce=me);var Ee=0,ze=function(){};return{s:ze,n:function(){return Ee>=Ce.length?{done:!0}:{done:!1,value:Ce[Ee++]}},e:function(mt){throw mt},f:ze}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ve,nt=!0,tt=!1;return{s:function(){me=me.call(Ce)},n:function(){var mt=me.next();return nt=mt.done,mt},e:function(mt){tt=!0,Ve=mt},f:function(){try{nt||null==me.return||me.return()}finally{if(tt)throw Ve}}}}(ae);try{for(X.s();!(Te=X.n()).done;){var ne=Te.value;le+="".concat(le," ").concat(ne,".")}}catch(Ce){X.e(Ce)}finally{X.f()}throw new Error(le)}var pe="0x"+we.serialize().toString("hex"),_e=L.keccak256(pe),xe={messageHash:"0x"+d.from(we.getMessageToSign(!0)).toString("hex"),v:"0x"+we.v.toString("hex"),r:"0x"+we.r.toString("hex"),s:"0x"+we.s.toString("hex"),rawTransaction:pe,transactionHash:_e};return D(null,xe),xe}catch(Ce){return D(Ce),Promise.reject(Ce)}}return v.type=function(ee){var ce,ue=void 0!==ee.maxFeePerGas||void 0!==ee.maxPriorityFeePerGas;if(void 0!==ee.type?ce=L.toHex(ee.type):void 0===ee.type&&ue&&(ce="0x2"),void 0!==ee.gasPrice&&("0x2"===ce||ue))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===ce||"0x0"===ce)&&ue)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");return ue||ee.common&&ee.common.hardfork&&ee.common.hardfork.toLowerCase()===H.London||ee.hardfork&&ee.hardfork.toLowerCase()===H.London?ce="0x2":(ee.accessList||ee.common&&ee.common.hardfork&&ee.common.hardfork.toLowerCase()===H.Berlin||ee.hardfork&&ee.hardfork.toLowerCase()===H.Berlin)&&(ce="0x1"),ce}(v),void 0!==v.nonce&&void 0!==v.chainId&&(void 0!==v.gasPrice||void 0!==v.maxFeePerGas&&void 0!==v.maxPriorityFeePerGas)&&B?Promise.resolve(Q(v)):Promise.all([K(v.common)||K(v.common.customChain.chainId)?K(v.chainId)?N._ethereumCall.getChainId():v.chainId:void 0,K(v.nonce)?N._ethereumCall.getTransactionCount(N.privateKeyToAccount(k).address):v.nonce,K(B)?N._ethereumCall.getNetworkId():1,y(N,v)]).then(function(ee){var ce=(0,b.default)(ee,4),ue=ce[0],we=ce[1],ae=ce[2],Te=ce[3];if(K(ue)&&K(v.common)&&K(v.common.customChain.chainId)||K(we)||K(ae)||K(Te))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(ee));return Q(h(h(h({},v),K(v.common)||K(v.common.customChain.chainId)?{chainId:ue}:{}),{},{nonce:we,networkId:ae},Te))})},o.prototype.recoverTransaction=function(v){var k=d.from(v.slice(2),"hex"),D=W.fromSerializedData(k);return L.toChecksumAddress(D.getSenderAddress().toString("hex"))},o.prototype.hashMessage=function(v){var k=L.isHexStrict(v)?v:L.utf8ToHex(v),D=L.hexToBytes(k),N=d.from(D),a=d.from("\x19Ethereum Signed Message:\n"+D.length),B=d.concat([a,N]);return j.bufferToHex(L.keccak256(B))},o.prototype.sign=function(v,k){if(k.startsWith("0x")||(k="0x"+k),66!==k.length)throw new Error("Private key must be 32 bytes long");var D=this.hashMessage(v),N=w.sign(D,k),C=w.decodeSignature(N);return{message:v,messageHash:D,v:C[0],r:C[1],s:C[2],signature:N}},o.prototype.recover=function(v,k,D){var N=[].slice.apply(arguments);return v&&"object"===(0,T.default)(v)?this.recover(v.messageHash,w.encodeSignature([v.v,v.r,v.s]),!0):(D||(v=this.hashMessage(v)),N.length>=4?(D="boolean"==typeof(D=N.slice(-1)[0])&&!!D,this.recover(v,w.encodeSignature(N.slice(1,4)),D)):w.recover(v,k))},o.prototype.decrypt=function(v,k,D){if("string"!=typeof k)throw new Error("No password given.");var N,C,a=v&&"object"===(0,T.default)(v)?v:JSON.parse(D?v.toLowerCase():v);if(3!==a.version)throw new Error("Not a valid V3 wallet");if("scrypt"===a.crypto.kdf)C=a.crypto.kdfparams,N=I.syncScrypt(d.from(k),d.from(C.salt,"hex"),C.n,C.r,C.p,C.dklen);else{if("pbkdf2"!==a.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(C=a.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");N=S.pbkdf2Sync(d.from(k),d.from(C.salt,"hex"),C.c,C.dklen,"sha256")}var B=d.from(a.crypto.ciphertext,"hex");if(L.sha3(d.from([].concat((0,f.default)(N.slice(16,32)),(0,f.default)(B)))).replace("0x","")!==a.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var Q=S.createDecipheriv(a.crypto.cipher,N.slice(0,16),d.from(a.crypto.cipherparams.iv,"hex")),ee="0x"+d.from([].concat((0,f.default)(Q.update(B)),(0,f.default)(Q.final()))).toString("hex");return this.privateKeyToAccount(ee,!0)},o.prototype.encrypt=function(v,k,D){var N,C=this.privateKeyToAccount(v,!0),a=(D=D||{}).salt||S.randomBytes(32),B=D.iv||S.randomBytes(16),Q=D.kdf||"scrypt",ee={dklen:D.dklen||32,salt:a.toString("hex")};if("pbkdf2"===Q)ee.c=D.c||262144,ee.prf="hmac-sha256",N=S.pbkdf2Sync(d.from(k),d.from(ee.salt,"hex"),ee.c,ee.dklen,"sha256");else{if("scrypt"!==Q)throw new Error("Unsupported kdf");ee.n=D.n||8192,ee.r=D.r||8,ee.p=D.p||1,N=I.syncScrypt(d.from(k),d.from(ee.salt,"hex"),ee.n,ee.r,ee.p,ee.dklen)}var ce=S.createCipheriv(D.cipher||"aes-128-ctr",N.slice(0,16),B);if(!ce)throw new Error("Unsupported cipher");var ue=d.from([].concat((0,f.default)(ce.update(d.from(C.privateKey.replace("0x",""),"hex"))),(0,f.default)(ce.final()))),we=L.sha3(d.from([].concat((0,f.default)(N.slice(16,32)),(0,f.default)(ue)))).replace("0x","");return{version:3,id:P.v4({random:D.uuid||S.randomBytes(16)}),address:C.address.toLowerCase().replace("0x",""),crypto:{ciphertext:ue.toString("hex"),cipherparams:{iv:B.toString("hex")},cipher:D.cipher||"aes-128-ctr",kdf:Q,kdfparams:ee,mac:we.toString("hex")}}},M.prototype._findSafeIndex=function(v){return this.hasOwnProperty(v=v||0)?this._findSafeIndex(v+1):v},M.prototype._currentIndexes=function(){return Object.keys(this).map(function(v){return parseInt(v)}).filter(function(v){return v<9e20})},M.prototype.create=function(v,k){for(var D=0;D{"use strict";var d=E(28847),x=d(E(93106)),f=d(E(90775)),T=d(E(3355));function g(W,G){(null==G||G>W.length)&&(G=W.length);for(var H=0,j=new Array(G);H=M.length?{done:!0}:{done:!1,value:M[D++]}},e:function(Q){throw Q},f:N}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var C,a=!0,B=!1;return{s:function(){k=k.call(M)},n:function(){var Q=k.next();return a=Q.done,Q},e:function(Q){B=!0,C=Q},f:function(){try{a||null==k.return||k.return()}finally{if(B)throw C}}}}(W.inputs);try{var y=function(){var M=R.value;if(!M.indexed)return"continue";var v=H[M.name];if(!v)return K.push(null),"continue";Array.isArray(v)?K.push(v.map(function(k){return P.encodeParameter(M.type,k)})):K.push(P.encodeParameter(M.type,v))};for(o.s();!(R=o.n()).done;)y()}catch(M){o.e(M)}finally{o.f()}}return K.length&&(j.topics=K),this.options.address&&(j.address=this.options.address.toLowerCase()),j},L.prototype._decodeEventABI=function(W){var G=this;W.data=W.data||"",W.topics=W.topics||[];var H=w.outputLogFormatter(W);if("ALLEVENTS"===G.name&&(G=G.jsonInterface.find(function(R){return R.signature===W.topics[0]})||{anonymous:!0}),G.inputs=G.inputs||[],!G.anonymous){var j=0;G.inputs.forEach(function(R){return R.indexed?j++:null}),j>0&&W.topics.length!==j+1&&(G={anonymous:!0,inputs:[]})}var K=G.anonymous?W.topics:W.topics.slice(1);return H.returnValues=P.decodeLog(G.inputs,W.data,K),delete H.returnValues.__length__,H.event=G.name,H.signature=G.anonymous||!W.topics[0]?null:W.topics[0],H.raw={data:H.data,topics:H.topics},delete H.data,delete H.topics,H},L.prototype._encodeMethodABI=function(){var W=this._method.signature,G=this.arguments||[],H=!1,j=this._parent.options.jsonInterface.filter(function(R){return"constructor"===W&&R.type===W||(R.signature===W||R.signature===W.replace("0x","")||R.name===W)&&"function"===R.type}).map(function(R){var o=Array.isArray(R.inputs)?R.inputs.length:0;if(o!==G.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+o+" arguments.");return"function"===R.type&&(H=R.signature),Array.isArray(R.inputs)?R.inputs:[]}).map(function(R){return P.encodeParameters(R,G).replace("0x","")})[0]||"";if("constructor"===W){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+j}var K=H?H+j:j;if(!K)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return K},L.prototype._decodeMethodReturn=function(W,G){if(!G)return null;G=G.length>=2?G.slice(2):G;var H=P.decodeParameters(W,G);return 1===H.__length__?H[0]:(delete H.__length__,H)},L.prototype.deploy=function(W,G){if((W=W||{}).arguments=W.arguments||[],!(W=this._getOrSetDefaultOptions(W)).data){if("function"==typeof G)return G(S.ContractMissingDeployDataError());throw S.ContractMissingDeployDataError()}var H=this.options.jsonInterface.find(function(j){return"constructor"===j.type})||{};return H.signature="constructor",this._createTxObject.apply({method:H,parent:this,deployData:W.data,_ethAccounts:this.constructor._ethAccounts},W.arguments)},L.prototype._generateEventOptions=function(){var W=Array.prototype.slice.call(arguments),G=this._getCallback(W),H="object"===(!!W[W.length-1]&&(0,T.default)(W[W.length-1]))?W.pop():{},j="string"==typeof W[0]?W[0]:"allevents",K="allevents"===j.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(R){return"event"===R.type&&(R.name===j||R.signature==="0x"+j.replace("0x",""))});if(!K)throw S.ContractEventDoesNotExistError(j);if(!m.isAddress(this.options.address))throw S.ContractNoAddressDefinedError();return{params:this._encodeEventABI(K,H),event:K,filter:H.filter||{},callback:G}},L.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},L.prototype.once=function(W,G,H){var j=Array.prototype.slice.call(arguments);if(!(H=this._getCallback(j)))throw S.ContractOnceRequiresCallbackError();G&&delete G.fromBlock,this._on(W,G,function(K,R,o){o.unsubscribe(),"function"==typeof H&&H(K,R,o)})},L.prototype._on=function(){var W=this._generateEventOptions.apply(this,arguments);W.params&&W.params.toBlock&&(delete W.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",W.event.name),this._checkListener("removeListener",W.event.name);var G=new _({subscription:{params:1,inputFormatter:[w.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(W.event),subscriptionHandler:function(H){this.emit(H.removed?"changed":"data",H),"function"==typeof this.callback&&this.callback(null,H,this)}},type:"eth",requestManager:this._requestManager});return G.subscribe("logs",W.params,W.callback||function(){}),G};var V=function(W,G){if(W.event&&"ALLEVENTS"===W.event.name&&Array.isArray(G)){var H=W.filter||{},j=Object.keys(H);return j.length>0?G.filter(function(K){return"string"==typeof K||j.every(function(R){return Array.isArray(H[R])?H[R].some(function(o){return String(K.returnValues[R]).toUpperCase()===String(o).toUpperCase()}):String(K.returnValues[R]).toUpperCase()===String(H[R]).toUpperCase()})}):G}return G};L.prototype.getPastEvents=function(){var W=this._generateEventOptions.apply(this,arguments),G=new u({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[w.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(W.event)});G.setRequestManager(this._requestManager);var H=G.buildCall();return G=null,H(W.params,function(j,K){"function"==typeof W.callback&&W.callback(j,V(W,K))}).then(V.bind(this,W))},L.prototype._createTxObject=function(){var W=Array.prototype.slice.call(arguments),G={};if("function"===this.method.type&&(G.call=this.parent._executeMethod.bind(G,"call"),G.call.request=this.parent._executeMethod.bind(G,"call",!0)),G.send=this.parent._executeMethod.bind(G,"send"),G.send.request=this.parent._executeMethod.bind(G,"send",!0),G.encodeABI=this.parent._encodeMethodABI.bind(G),G.estimateGas=this.parent._executeMethod.bind(G,"estimate"),G.createAccessList=this.parent._executeMethod.bind(G,"createAccessList"),W&&this.method.inputs&&W.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,W);throw S.InvalidNumberOfParams(W.length,this.method.inputs.length,this.method.name)}return G.arguments=W||[],G._method=this.method,G._parent=this.parent,G._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(G._deployData=this.deployData),G},L.prototype._processExecuteArguments=function(W,G){var H={};if(H.type=W.shift(),H.callback=this._parent._getCallback(W),"call"!==H.type||!0===W[W.length-1]||"string"!=typeof W[W.length-1]&&!isFinite(W[W.length-1])||(H.defaultBlock=W.pop()),H.options="object"===(!!W[W.length-1]&&(0,T.default)(W[W.length-1]))?W.pop():{},H.generateRequest=!0===W[W.length-1]&&W.pop(),H.options=this._parent._getOrSetDefaultOptions(H.options),H.options.data=this.encodeABI(),!this._deployData&&!m.isAddress(this._parent.options.address))throw S.ContractNoAddressDefinedError();return this._deployData||(H.options.to=this._parent.options.address),H.options.data?H:m._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),G.eventEmitter,G.reject,H.callback)},L.prototype._executeMethod=function(){var W=this,G=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),H),H=I("send"!==G.type),j=W.constructor._ethAccounts||W._ethAccounts;if(G.generateRequest){var K={params:[w.inputCallFormatter.call(this._parent,G.options)],callback:G.callback};return"call"===G.type?(K.params.push(w.inputDefaultBlockNumberFormatter.call(this._parent,G.defaultBlock)),K.method="eth_call",K.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):K.method="eth_sendTransaction",K}switch(G.type){case"createAccessList":return m.isAddress(G.options.from)?new u({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[w.inputTransactionFormatter,w.inputDefaultBlockNumberFormatter],requestManager:W._parent._requestManager,accounts:j,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock}).createFunction()(G.options,G.callback):m._fireError(S.ContractNoFromAddressDefinedError(),H.eventEmitter,H.reject,G.callback);case"estimate":return new u({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[w.inputCallFormatter],outputFormatter:m.hexToNumber,requestManager:W._parent._requestManager,accounts:j,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock}).createFunction()(G.options,G.callback);case"call":return new u({name:"call",call:"eth_call",params:2,inputFormatter:[w.inputCallFormatter,w.inputDefaultBlockNumberFormatter],outputFormatter:function(o){return W._parent._decodeMethodReturn(W._method.outputs,o)},requestManager:W._parent._requestManager,accounts:j,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock,handleRevert:W._parent.handleRevert,abiCoder:P}).createFunction()(G.options,G.defaultBlock,G.callback);case"send":if(!m.isAddress(G.options.from))return m._fireError(S.ContractNoFromAddressDefinedError(),H.eventEmitter,H.reject,G.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&G.options.value&&G.options.value>0)return m._fireError(new Error("Can not send value to non-payable contract method or constructor"),H.eventEmitter,H.reject,G.callback);var R={receiptFormatter:function(o){if(Array.isArray(o.logs)){var y=o.logs.map(function(v){return W._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:W._parent.options.jsonInterface},v)});o.events={};var M=0;y.forEach(function(v){v.event?o.events[v.event]?Array.isArray(o.events[v.event])?o.events[v.event].push(v):o.events[v.event]=[o.events[v.event],v]:o.events[v.event]=v:(o.events[M]=v,M++)}),delete o.logs}return o},contractDeployFormatter:function(o){var y=W._parent.clone();return y.options.address=o.contractAddress,y}};return new u({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[w.inputTransactionFormatter],requestManager:W._parent._requestManager,accounts:W.constructor._ethAccounts||W._ethAccounts,defaultAccount:W._parent.defaultAccount,defaultBlock:W._parent.defaultBlock,transactionBlockTimeout:W._parent.transactionBlockTimeout,transactionConfirmationBlocks:W._parent.transactionConfirmationBlocks,transactionPollingTimeout:W._parent.transactionPollingTimeout,transactionPollingInterval:W._parent.transactionPollingInterval,defaultCommon:W._parent.defaultCommon,defaultChain:W._parent.defaultChain,defaultHardfork:W._parent.defaultHardfork,handleRevert:W._parent.handleRevert,extraFormatters:R,abiCoder:P}).createFunction()(G.options,G.callback);default:throw new Error('Method "'+G.type+'" not implemented.')}},q.exports=L},46764:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(82247)),f=d(E(94571)),T=E(55160),g=E(11314).formatters,b=E(48161),l=E(11841),h=E(62867),u=E(22689);function m(_){this.eth=_;var w=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new l(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new h(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return w},set:function(S){w=null!==S?g.inputAddressFormatter(S):S},enumerable:!0})}m.prototype.supportsInterface=function(_,w,S){return this.getResolver(_).then(function(I){return b.isHexStrict(w)||(w=b.sha3(w).slice(0,10)),I.methods.supportsInterface(w).call(S)}).catch(function(I){if("function"!=typeof S)throw I;S(I,null)})},m.prototype.resolver=function(_,w){return this.registry.resolver(_,w)},m.prototype.getResolver=function(_,w){return this.registry.getResolver(_,w)},m.prototype.setResolver=function(_,w,S,I){return this.registry.setResolver(_,w,S,I)},m.prototype.setRecord=function(_,w,S,I,P,L){return this.registry.setRecord(_,w,S,I,P,L)},m.prototype.setSubnodeRecord=function(_,w,S,I,P,L,V){return this.registry.setSubnodeRecord(_,w,S,I,P,L,V)},m.prototype.setApprovalForAll=function(_,w,S,I){return this.registry.setApprovalForAll(_,w,S,I)},m.prototype.isApprovedForAll=function(_,w,S){return this.registry.isApprovedForAll(_,w,S)},m.prototype.recordExists=function(_,w){return this.registry.recordExists(_,w)},m.prototype.setSubnodeOwner=function(_,w,S,I,P){return this.registry.setSubnodeOwner(_,w,S,I,P)},m.prototype.getTTL=function(_,w){return this.registry.getTTL(_,w)},m.prototype.setTTL=function(_,w,S,I){return this.registry.setTTL(_,w,S,I)},m.prototype.getOwner=function(_,w){return this.registry.getOwner(_,w)},m.prototype.setOwner=function(_,w,S,I){return this.registry.setOwner(_,w,S,I)},m.prototype.getAddress=function(_,w){return this.resolverMethodHandler.method(_,"addr",[]).call(w)},m.prototype.setAddress=function(_,w,S,I){return this.resolverMethodHandler.method(_,"setAddr",[w]).send(S,I)},m.prototype.getPubkey=function(_,w){return this.resolverMethodHandler.method(_,"pubkey",[],null,w).call(w)},m.prototype.setPubkey=function(_,w,S,I,P){return this.resolverMethodHandler.method(_,"setPubkey",[w,S]).send(I,P)},m.prototype.getContent=function(_,w){return this.resolverMethodHandler.method(_,"content",[]).call(w)},m.prototype.setContent=function(_,w,S,I){return this.resolverMethodHandler.method(_,"setContent",[w]).send(S,I)},m.prototype.getContenthash=function(_,w){return this.resolverMethodHandler.method(_,"contenthash",[],u.decode).call(w)},m.prototype.setContenthash=function(_,w,S,I){var P;try{P=u.encode(w)}catch{var L=new Error("Could not encode "+w+". See docs for supported hash protocols.");if("function"==typeof I)return void I(L,null);throw L}return this.resolverMethodHandler.method(_,"setContenthash",[P]).send(S,I)},m.prototype.getMultihash=function(_,w){return this.resolverMethodHandler.method(_,"multihash",[]).call(w)},m.prototype.setMultihash=function(_,w,S,I){return this.resolverMethodHandler.method(_,"multihash",[w]).send(S,I)},m.prototype.checkNetwork=(0,f.default)(x.default.mark(function _(){var w,I,P,L;return x.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(w=new Date/1e3,this._lastSyncCheck&&!(w-this._lastSyncCheck>3600)){V.next=9;break}return V.next=4,this.eth.getBlock("latest");case 4:if(!((I=w-V.sent.timestamp)>3600)){V.next=8;break}throw new Error("Network not synced; last block was "+I+" seconds ago");case 8:this._lastSyncCheck=w;case 9:if(!this.registryAddress){V.next=11;break}return V.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){V.next=20;break}return V.next=14,this.eth.net.getNetworkType();case 14:if(void 0!==(L=T.addresses[P=V.sent])){V.next=18;break}throw new Error("ENS is not supported on network "+P);case 18:return this._detectedAddress=L,V.abrupt("return",this._detectedAddress);case 20:return V.abrupt("return",this._detectedAddress);case 21:case"end":return V.stop()}},_,this)})),q.exports=m},55160:q=>{"use strict";q.exports={addresses:{main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",ropsten:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",rinkeby:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},interfaceIds:{addr:"0x3b3b57de",setAddr:"0x3b3b57de",pubkey:"0xc8690233",setPubkey:"0xc8690233",contenthash:"0xbc1c58d1",setContenthash:"0xbc1c58d1",content:"0xd8389dc5",setContent:"0xd8389dc5"}}},11841:(q,O,E)=>{"use strict";var d=E(58164),x=E(21006),f=E(90282),T=E(11314).formatters,g=E(48161),b=E(43205),l=E(48384);function h(u){var m=this;this.ens=u,this.contract=u.checkNetwork().then(function(_){var w=new d(b,_);return w.setProvider(m.ens.eth.currentProvider),w})}h.prototype.owner=function(u,m){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(u,m)},h.prototype.getOwner=function(u,m){var _=new f(!0);return this.contract.then(function(w){return w.methods.owner(x.hash(u)).call()}).then(function(w){"function"!=typeof m?_.resolve(w):m(w,w)}).catch(function(w){"function"!=typeof m?_.reject(w):m(w,null)}),_.eventEmitter},h.prototype.setOwner=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setOwner(x.hash(u),T.inputAddressFormatter(m)).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},h.prototype.getTTL=function(u,m){var _=new f(!0);return this.contract.then(function(w){return w.methods.ttl(x.hash(u)).call()}).then(function(w){"function"!=typeof m?_.resolve(w):m(w,w)}).catch(function(w){"function"!=typeof m?_.reject(w):m(w,null)}),_.eventEmitter},h.prototype.setTTL=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setTTL(x.hash(u),m).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},h.prototype.setSubnodeOwner=function(u,m,_,w,S){var I=new f(!0);return g.isHexStrict(m)||(m=g.sha3(m)),this.contract.then(function(P){return P.methods.setSubnodeOwner(x.hash(u),m,T.inputAddressFormatter(_)).send(w)}).then(function(P){"function"!=typeof S?I.resolve(P):S(P,P)}).catch(function(P){"function"!=typeof S?I.reject(P):S(P,null)}),I.eventEmitter},h.prototype.setRecord=function(u,m,_,w,S,I){var P=new f(!0);return this.contract.then(function(L){return L.methods.setRecord(x.hash(u),T.inputAddressFormatter(m),T.inputAddressFormatter(_),w).send(S)}).then(function(L){"function"!=typeof I?P.resolve(L):I(L,L)}).catch(function(L){"function"!=typeof I?P.reject(L):I(L,null)}),P.eventEmitter},h.prototype.setSubnodeRecord=function(u,m,_,w,S,I,P){var L=new f(!0);return g.isHexStrict(m)||(m=g.sha3(m)),this.contract.then(function(V){return V.methods.setSubnodeRecord(x.hash(u),m,T.inputAddressFormatter(_),T.inputAddressFormatter(w),S).send(I)}).then(function(V){"function"!=typeof P?L.resolve(V):P(V,V)}).catch(function(V){"function"!=typeof P?L.reject(V):P(V,null)}),L.eventEmitter},h.prototype.setApprovalForAll=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setApprovalForAll(T.inputAddressFormatter(u),m).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},h.prototype.isApprovedForAll=function(u,m,_){var w=new f(!0);return this.contract.then(function(S){return S.methods.isApprovedForAll(T.inputAddressFormatter(u),T.inputAddressFormatter(m)).call()}).then(function(S){"function"!=typeof _?w.resolve(S):_(S,S)}).catch(function(S){"function"!=typeof _?w.reject(S):_(S,null)}),w.eventEmitter},h.prototype.recordExists=function(u,m){var _=new f(!0);return this.contract.then(function(w){return w.methods.recordExists(x.hash(u)).call()}).then(function(w){"function"!=typeof m?_.resolve(w):m(w,w)}).catch(function(w){"function"!=typeof m?_.reject(w):m(w,null)}),_.eventEmitter},h.prototype.resolver=function(u,m){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(u,m)},h.prototype.getResolver=function(u,m){var _=this;return this.contract.then(function(w){return w.methods.resolver(x.hash(u)).call()}).then(function(w){var S=new d(l,w);if(S.setProvider(_.ens.eth.currentProvider),"function"!=typeof m)return S;m(S,S)}).catch(function(w){if("function"!=typeof m)throw w;m(w,null)})},h.prototype.setResolver=function(u,m,_,w){var S=new f(!0);return this.contract.then(function(I){return I.methods.setResolver(x.hash(u),T.inputAddressFormatter(m)).send(_)}).then(function(I){"function"!=typeof w?S.resolve(I):w(I,I)}).catch(function(I){"function"!=typeof w?S.reject(I):w(I,null)}),S.eventEmitter},q.exports=h},30715:(q,O,E)=>{"use strict";var d=E(46764);q.exports=d},62867:(q,O,E)=>{"use strict";var u,d=E(28847),x=d(E(82247)),f=d(E(94571)),T=E(90282),g=E(21006),b=E(11314).errors,l=E(55160).interfaceIds;function h(u){this.registry=u}h.prototype.method=function(u,m,_,w,S){return{call:this.call.bind({ensName:u,methodName:m,methodArguments:_,callback:S,parent:this,outputFormatter:w}),send:this.send.bind({ensName:u,methodName:m,methodArguments:_,callback:S,parent:this})}},h.prototype.call=function(u){var I,m=this,_=new T,w=this.parent.prepareArguments(this.ensName,this.methodArguments),S=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then((I=(0,f.default)(x.default.mark(function P(L){return x.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,m.parent.checkInterfaceSupport(L,m.methodName);case 2:m.parent.handleCall(_,L.methods[m.methodName],w,S,u);case 3:case"end":return V.stop()}},P)})),function(P){return I.apply(this,arguments)})).catch(function(I){"function"!=typeof u?_.reject(I):u(I,null)}),_.eventEmitter},h.prototype.send=function(u,m){var I,_=this,w=new T,S=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then((I=(0,f.default)(x.default.mark(function P(L){return x.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,_.parent.checkInterfaceSupport(L,_.methodName);case 2:_.parent.handleSend(w,L.methods[_.methodName],S,u,m);case 3:case"end":return V.stop()}},P)})),function(P){return I.apply(this,arguments)})).catch(function(I){"function"!=typeof m?w.reject(I):m(I,null)}),w.eventEmitter},h.prototype.handleCall=function(u,m,_,w,S){return m.apply(this,_).call().then(function(I){w&&(I=w(I)),"function"!=typeof S?u.resolve(I):S(I,I)}).catch(function(I){"function"!=typeof S?u.reject(I):S(I,null)}),u},h.prototype.handleSend=function(u,m,_,w,S){return m.apply(this,_).send(w).on("sending",function(){u.eventEmitter.emit("sending")}).on("sent",function(){u.eventEmitter.emit("sent")}).on("transactionHash",function(I){u.eventEmitter.emit("transactionHash",I)}).on("confirmation",function(I,P){u.eventEmitter.emit("confirmation",I,P)}).on("receipt",function(I){u.eventEmitter.emit("receipt",I),u.resolve(I),"function"==typeof S&&S(I,I)}).on("error",function(I){u.eventEmitter.emit("error",I),"function"!=typeof S?u.reject(I):S(I,null)}),u},h.prototype.prepareArguments=function(u,m){var _=g.hash(u);return m.length>0?(m.unshift(_),m):[_]},h.prototype.checkInterfaceSupport=(u=(0,f.default)(x.default.mark(function m(_,w){var S;return x.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(l[w]){I.next=2;break}return I.abrupt("return");case 2:return S=!1,I.prev=3,I.next=6,_.methods.supportsInterface(l[w]).call();case 6:S=I.sent,I.next=12;break;case 9:I.prev=9,I.t0=I.catch(3),console.warn('Could not verify interface of resolver contract at "'+_.options.address+'". ');case 12:if(S){I.next=14;break}throw b.ResolverMethodMissingError(_.options.address,w);case 14:case"end":return I.stop()}},m,null,[[3,9]])})),function(m,_){return u.apply(this,arguments)}),q.exports=h},22689:(q,O,E)=>{"use strict";var d=E(94308);q.exports={decode:function(x){var f=null,T=null,g=null;if(x&&x.error)return{protocolType:null,decoded:x.error};if(x)try{f=d.decode(x);var b=d.getCodec(x);"ipfs-ns"===b?T="ipfs":"swarm-ns"===b?T="bzz":"onion"===b?T="onion":"onion3"===b?T="onion3":f=x}catch(l){g=l.message}return{protocolType:T,decoded:f,error:g}},encode:function(x){var f,T,g=!1;if(x){var b=x.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||x.match(/\/(ipfs)\/(.*)/);b&&(T=b[1],f=b[2]);try{if("ipfs"===T)f.length>=4&&(g="0x"+d.fromIpfs(f));else if("bzz"===T)f.length>=4&&(g="0x"+d.fromSwarm(f));else if("onion"===T)16===f.length&&(g="0x"+d.encode("onion",f));else{if("onion3"!==T)throw new Error("Could not encode content hash: unsupported content type");56===f.length&&(g="0x"+d.encode("onion3",f))}}catch(l){throw l}}return g}}},43205:q=>{"use strict";q.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},48384:q=>{"use strict";q.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},30006:(q,O,E)=>{"use strict";var d=E(28847),x=d(E(69721)),f=d(E(58985)),T=E(48161),g=E(31734),b=function(u){var m="A".charCodeAt(0),_="Z".charCodeAt(0);return(u=(u=u.toUpperCase()).slice(4)+u.slice(0,4)).split("").map(function(w){var S=w.charCodeAt(0);return S>=m&&S<=_?S-m+10:w}).join("")},l=function(u){for(var m,_=u;_.length>2;)m=_.slice(0,9),_=parseInt(m,10)%97+_.slice(m.length);return parseInt(_,10)%97},h=function(){function u(m){(0,x.default)(this,u),this._iban=m}return(0,f.default)(u,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===l(b(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var m=this._iban.slice(4),_=new g(m,36);return T.toChecksumAddress(_.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(m){if(!(m=new u(m)).isDirect())throw new Error("IBAN is indirect and can't be converted");return m.toAddress()}},{key:"toIban",value:function(m){return u.fromAddress(m).toString()}},{key:"fromAddress",value:function(m){if(!T.isAddress(m))throw new Error("Provided address is not a valid address: "+m);m=m.replace("0x","").replace("0X","");var _=function(w,S){for(var I=w;I.length<30;)I="0"+I;return I}(new g(m,16).toString(36));return u.fromBban(_.toUpperCase())}},{key:"fromBban",value:function(m){return new u("XE"+("0"+(98-l(b("XE00"+m)))).slice(-2)+m)}},{key:"createIndirect",value:function(m){return u.fromBban("ETH"+m.institution+m.identifier)}},{key:"isValid",value:function(m){return new u(m).isValid()}}]),u}();q.exports=h},96306:(q,O,E)=>{"use strict";var d=E(80606),x=E(53349),f=E(48161),T=E(473),g=E(11314).formatters,b=function(){var l=this;d.packageInit(this,arguments),this.net=new T(this);var h=null,u="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return h},set:function(_){return _&&(h=f.toChecksumAddress(g.inputAddressFormatter(_))),m.forEach(function(w){w.defaultAccount=h}),_},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return u},set:function(_){return u=_,m.forEach(function(w){w.defaultBlock=u}),_},enumerable:!0});var m=[new x({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:f.toChecksumAddress}),new x({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:f.toChecksumAddress}),new x({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[g.inputAddressFormatter,null,null]}),new x({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[g.inputAddressFormatter]}),new x({name:"importRawKey",call:"personal_importRawKey",params:2}),new x({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[g.inputTransactionFormatter,null]}),new x({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[g.inputTransactionFormatter,null]}),new x({name:"sign",call:"personal_sign",params:3,inputFormatter:[g.inputSignFormatter,g.inputAddressFormatter,null]}),new x({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[g.inputSignFormatter,null]})];m.forEach(function(_){_.attachToObject(l),_.setRequestManager(l._requestManager),_.defaultBlock=l.defaultBlock,_.defaultAccount=l.defaultAccount})};d.addProviders(b),q.exports=b},28130:q=>{"use strict";q.exports=function(O){var E,d=this;return this.net.getId().then(function(x){return E=x,d.getBlock(0)}).then(function(x){var f="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===x.hash&&1===E&&(f="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===x.hash&&3===E&&(f="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===x.hash&&4===E&&(f="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===x.hash&&5===E&&(f="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===x.hash&&42===E&&(f="kovan"),"function"==typeof O&&O(null,f),f}).catch(function(x){if("function"!=typeof O)throw x;O(x)})}},66748:(q,O,E)=>{"use strict";var d=E(80606),x=E(11314),f=E(34178).subscriptions,T=E(53349),g=E(48161),b=E(473),l=E(30715),h=E(96306),u=E(58164),m=E(30006),_=E(99819),w=E(79901),S=E(28130),I=x.formatters,P=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},L=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},V=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},W=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},G=function(j){return"string"==typeof j[0]&&0===j[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},H=function(){var j=this;d.packageInit(this,arguments);var K=this.setRequestManager;this.setRequestManager=function(ae){return K(ae),j.net.setRequestManager(ae),j.personal.setRequestManager(ae),j.accounts.setRequestManager(ae),j.Contract._requestManager=j._requestManager,j.Contract.currentProvider=j._provider,!0};var R=this.setProvider;this.setProvider=function(){R.apply(j,arguments),j.setRequestManager(j._requestManager),j.ens._detectedAddress=null,j.ens._lastSyncCheck=null};var o,y,M,v=!1,k=null,D="latest",N=50,C=24,a=750,B=1e3,Q=10,ee=100;Object.defineProperty(this,"handleRevert",{get:function(){return v},set:function(ae){j.Contract.handleRevert=v=ae,we.forEach(function(Te){Te.handleRevert=v})},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return M},set:function(ae){j.Contract.defaultCommon=M=ae,we.forEach(function(Te){Te.defaultCommon=M})},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return y},set:function(ae){j.Contract.defaultHardfork=y=ae,we.forEach(function(Te){Te.defaultHardfork=y})},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return o},set:function(ae){j.Contract.defaultChain=o=ae,we.forEach(function(Te){Te.defaultChain=o})},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return a},set:function(ae){j.Contract.transactionPollingTimeout=a=ae,we.forEach(function(Te){Te.transactionPollingTimeout=a})},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return B},set:function(ae){j.Contract.transactionPollingInterval=B=ae,we.forEach(function(Te){Te.transactionPollingInterval=B})},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return C},set:function(ae){j.Contract.transactionConfirmationBlocks=C=ae,we.forEach(function(Te){Te.transactionConfirmationBlocks=C})},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return N},set:function(ae){j.Contract.transactionBlockTimeout=N=ae,we.forEach(function(Te){Te.transactionBlockTimeout=N})},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return Q},set:function(ae){j.Contract.blockHeaderTimeout=Q=ae,we.forEach(function(Te){Te.blockHeaderTimeout=Q})},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return k},set:function(ae){return ae&&(k=g.toChecksumAddress(I.inputAddressFormatter(ae))),j.Contract.defaultAccount=k,j.personal.defaultAccount=k,we.forEach(function(Te){Te.defaultAccount=k}),ae},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return D},set:function(ae){return j.Contract.defaultBlock=D=ae,j.personal.defaultBlock=D,we.forEach(function(Te){Te.defaultBlock=D}),ae},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return ee},set:function(ae){j.currentProvider&&j.currentProvider.setMaxListeners&&(ee=ae,j.currentProvider.setMaxListeners(ae))},enumerable:!0}),this.clearSubscriptions=j._requestManager.clearSubscriptions.bind(j._requestManager),this.removeSubscriptionById=j._requestManager.removeSubscription.bind(j._requestManager),this.net=new b(this),this.net.getNetworkType=S.bind(this),this.accounts=new _(this),this.personal=new h(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=ee;var ce=this,ue=function(){u.apply(this,arguments);var ae=this,Te=ce.setProvider;ce.setProvider=function(){Te.apply(ce,arguments),d.packageInit(ae,[ce])}};ue.setProvider=function(){u.setProvider.apply(this,arguments)},(ue.prototype=Object.create(u.prototype)).constructor=ue,this.Contract=ue,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=m,this.abi=w,this.ens=new l(this);var we=[new T({name:"getNodeInfo",call:"web3_clientVersion"}),new T({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new T({name:"getCoinbase",call:"eth_coinbase",params:0}),new T({name:"isMining",call:"eth_mining",params:0}),new T({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:g.hexToNumber}),new T({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:I.outputSyncingFormatter}),new T({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:I.outputBigNumberFormatter}),new T({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[g.numberToHex,I.inputBlockNumberFormatter,null]}),new T({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:g.toChecksumAddress}),new T({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:g.hexToNumber}),new T({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[I.inputAddressFormatter,I.inputDefaultBlockNumberFormatter],outputFormatter:I.outputBigNumberFormatter}),new T({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[I.inputAddressFormatter,g.numberToHex,I.inputDefaultBlockNumberFormatter]}),new T({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[I.inputAddressFormatter,I.inputDefaultBlockNumberFormatter]}),new T({name:"getBlock",call:P,params:2,inputFormatter:[I.inputBlockNumberFormatter,function(ae){return!!ae}],outputFormatter:I.outputBlockFormatter}),new T({name:"getUncle",call:V,params:2,inputFormatter:[I.inputBlockNumberFormatter,g.numberToHex],outputFormatter:I.outputBlockFormatter}),new T({name:"getBlockTransactionCount",call:W,params:1,inputFormatter:[I.inputBlockNumberFormatter],outputFormatter:g.hexToNumber}),new T({name:"getBlockUncleCount",call:G,params:1,inputFormatter:[I.inputBlockNumberFormatter],outputFormatter:g.hexToNumber}),new T({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:I.outputTransactionFormatter}),new T({name:"getTransactionFromBlock",call:L,params:2,inputFormatter:[I.inputBlockNumberFormatter,g.numberToHex],outputFormatter:I.outputTransactionFormatter}),new T({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:I.outputTransactionReceiptFormatter}),new T({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[I.inputAddressFormatter,I.inputDefaultBlockNumberFormatter],outputFormatter:g.hexToNumber}),new T({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:w}),new T({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[I.inputTransactionFormatter]}),new T({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[I.inputTransactionFormatter],abiCoder:w}),new T({name:"sign",call:"eth_sign",params:2,inputFormatter:[I.inputSignFormatter,I.inputAddressFormatter],transformPayload:function(ae){return ae.params.reverse(),ae}}),new T({name:"call",call:"eth_call",params:2,inputFormatter:[I.inputCallFormatter,I.inputDefaultBlockNumberFormatter],abiCoder:w}),new T({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[I.inputCallFormatter],outputFormatter:g.hexToNumber}),new T({name:"submitWork",call:"eth_submitWork",params:3}),new T({name:"getWork",call:"eth_getWork",params:0}),new T({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[I.inputLogFormatter],outputFormatter:I.outputLogFormatter}),new T({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:g.hexToNumber}),new T({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:g.toChecksumAddress}),new T({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[I.inputAddressFormatter,I.inputStorageKeysFormatter,I.inputDefaultBlockNumberFormatter],outputFormatter:I.outputProofFormatter}),new T({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:I.outputTransactionFormatter}),new T({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[I.inputTransactionFormatter,I.inputDefaultBlockNumberFormatter]}),new f({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:I.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[I.inputLogFormatter],outputFormatter:I.outputLogFormatter,subscriptionHandler:function(ae){this.emit(ae.removed?"changed":"data",ae),"function"==typeof this.callback&&this.callback(null,ae,this)}},syncing:{params:0,outputFormatter:I.outputSyncingFormatter,subscriptionHandler:function(ae){var Te=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",Te._isSyncing),"function"==typeof this.callback&&this.callback(null,Te._isSyncing,this),setTimeout(function(){Te.emit("data",ae),"function"==typeof Te.callback&&Te.callback(null,ae,Te)},0)):(this.emit("data",ae),"function"==typeof Te.callback&&this.callback(null,ae,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){ae.currentBlock>ae.highestBlock-200&&(Te._isSyncing=!1,Te.emit("changed",Te._isSyncing),"function"==typeof Te.callback&&Te.callback(null,Te._isSyncing,Te))},500))}}}})];we.forEach(function(ae){ae.attachToObject(j),ae.setRequestManager(j._requestManager,j.accounts),ae.defaultBlock=j.defaultBlock,ae.defaultAccount=j.defaultAccount,ae.transactionBlockTimeout=j.transactionBlockTimeout,ae.transactionConfirmationBlocks=j.transactionConfirmationBlocks,ae.transactionPollingTimeout=j.transactionPollingTimeout,ae.transactionPollingInterval=j.transactionPollingInterval,ae.handleRevert=j.handleRevert})};d.addProviders(H),q.exports=H},473:(q,O,E)=>{"use strict";var d=E(80606),x=E(53349),f=E(48161),T=function(){var g=this;d.packageInit(this,arguments),[new x({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new x({name:"isListening",call:"net_listening",params:0}),new x({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:f.hexToNumber})].forEach(function(b){b.attachToObject(g),b.setRequestManager(g._requestManager)})};d.addProviders(T),q.exports=T},14565:(q,O,E)=>{"use strict";var d=E(11314).errors,x=E(33768),f=E(29519),T=E(90912);E(54258).polyfill(),void 0===E.g||E.g.AbortController||E(53368);var g=function(b,l){this.withCredentials=(l=l||{}).withCredentials,this.timeout=l.timeout||0,this.headers=l.headers,this.agent=l.agent,this.forceGlobalFetch=l.forceGlobalFetch||!1,this.connected=!1;var h=!1!==l.keepAlive;this.host=b||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new T.Agent({keepAlive:h}):this.httpAgent=new f.Agent({keepAlive:h}))};g.prototype.send=function(b,l){var h,u={method:"POST",body:JSON.stringify(b)},m={},_=this.forceGlobalFetch?globalThis.fetch:x;if("undefined"!=typeof AbortController?h=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(h=new window.AbortController),void 0!==h&&(u.signal=h.signal),"undefined"==typeof XMLHttpRequest){var w={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(w.httpsAgent=this.agent.https,w.httpAgent=this.agent.http),u.agent="https"===this.host.substring(0,5)?w.httpsAgent:w.httpAgent}this.headers&&this.headers.forEach(function(S){m[S.name]=S.value}),m["Content-Type"]||(m["Content-Type"]="application/json"),u.credentials=this.withCredentials?"include":"omit",u.headers=m,this.timeout>0&&void 0!==h&&(this.timeoutId=setTimeout(function(){h.abort()},this.timeout)),_(this.host,u).then(function(S){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),S.json().then(function(I){l(null,I)},function(){S.text().then(function(I){l(d.InvalidResponse(I))},function(){l(d.InvalidResponse(""))})})}.bind(this),function(S){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),l("AbortError"!==S.name?d.InvalidConnection(this.host,S):d.ConnectionTimeout(this.timeout))}.bind(this))},g.prototype.disconnect=function(){},g.prototype.supportsSubscriptions=function(){return!1},q.exports=g},52683:(q,O,E)=>{"use strict";var d=E(11314).errors,x=E(83150),f=function(T,g){var b=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=T,this.connected=!1,this.connection=g.connect({path:this.path}),this.addDefaultEvents();var l=function(h){var u=null;Array.isArray(h)?h.forEach(function(m){b.responseCallbacks[m.id]&&(u=m.id)}):u=h.id,u||-1===h.method.indexOf("_subscription")?b.responseCallbacks[u]&&(b.responseCallbacks[u](null,h),delete b.responseCallbacks[u]):b.notificationCallbacks.forEach(function(m){"function"==typeof m&&m(h)})};"Socket"===g.constructor.name?x(this.connection).done(l):this.connection.on("data",function(h){b._parseResponse(h.toString()).forEach(l)})};f.prototype.addDefaultEvents=function(){var T=this;this.connection.on("connect",function(){T.connected=!0}),this.connection.on("close",function(){T.connected=!1}),this.connection.on("error",function(){T._timeout()}),this.connection.on("end",function(){T._timeout()}),this.connection.on("timeout",function(){T._timeout()})},f.prototype._parseResponse=function(T){var g=this,b=[];return T.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(l){g.lastChunk&&(l=g.lastChunk+l);var h=null;try{h=JSON.parse(l)}catch{return g.lastChunk=l,clearTimeout(g.lastChunkTimeout),void(g.lastChunkTimeout=setTimeout(function(){throw g._timeout(),d.InvalidResponse(l)},15e3))}clearTimeout(g.lastChunkTimeout),g.lastChunk=null,h&&b.push(h)}),b},f.prototype._addResponseCallback=function(T,g){var b=T.id||T[0].id,l=T.method||T[0].method;this.responseCallbacks[b]=g,this.responseCallbacks[b].method=l},f.prototype._timeout=function(){for(var T in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(T)&&(this.responseCallbacks[T](d.InvalidConnection("on IPC")),delete this.responseCallbacks[T])},f.prototype.reconnect=function(){this.connection.connect({path:this.path})},f.prototype.send=function(T,g){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(T)),this._addResponseCallback(T,g)},f.prototype.on=function(T,g){if("function"!=typeof g)throw new Error("The second parameter callback must be a function.");"data"===T?this.notificationCallbacks.push(g):this.connection.on(T,g)},f.prototype.once=function(T,g){if("function"!=typeof g)throw new Error("The second parameter callback must be a function.");this.connection.once(T,g)},f.prototype.removeListener=function(T,g){var b=this;"data"===T?this.notificationCallbacks.forEach(function(l,h){l===g&&b.notificationCallbacks.splice(h,1)}):this.connection.removeListener(T,g)},f.prototype.removeAllListeners=function(T){"data"===T?this.notificationCallbacks=[]:this.connection.removeAllListeners(T)},f.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},f.prototype.supportsSubscriptions=function(){return!0},q.exports=f},40360:(q,O,E)=>{"use strict";var d=E(19142),x=E(29033).Buffer,f=E(28847)(E(3355)),T="[object process]"===Object.prototype.toString.call(void 0!==d?d:0),g="undefined"!=typeof navigator&&"ReactNative"===navigator.product,b=null,l=null;if(T||g){b=function(m){return x.from(m).toString("base64")};var h=E(51143);if(h.URL){var u=h.URL;l=function(m){return new u(m)}}else l=E(51143).parse}else b=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,f.default)(globalThis))?globalThis:self),l=function(m){return new URL(m)};q.exports={parseURL:l,btoa:b}},77651:(q,O,E)=>{"use strict";var d=E(98008),x=E(40360),f=E(11314).errors,T=E(1158).w3cwebsocket,g=function(b,l){d.call(this),l=l||{},this.url=b,this._customTimeout=l.timeout||15e3,this.headers=l.headers||{},this.protocol=l.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},l.reconnect),this.clientConfig=l.clientConfig||void 0,this.requestOptions=l.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1,this.connectFailedDescription=null;var h=x.parseURL(b);h.username&&h.password&&(this.headers.authorization="Basic "+x.btoa(h.username+":"+h.password)),h.auth&&(this.headers.authorization="Basic "+x.btoa(h.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(g.prototype=Object.create(d.prototype)).constructor=g,g.prototype.connect=function(){this.connection=new T(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},g.prototype._onMessage=function(b){var l=this;this._parseResponse("string"==typeof b.data?b.data:"").forEach(function(h){if(h.method&&-1!==h.method.indexOf("_subscription"))l.emit(l.DATA,h);else{var u=h.id;Array.isArray(h)&&(u=h[0].id),l.responseQueue.has(u)&&(void 0!==l.responseQueue.get(u).callback&&l.responseQueue.get(u).callback(!1,h),l.responseQueue.delete(u))}})},g.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var b=this;this.requestQueue.forEach(function(l,h){b.send(l.payload,l.callback),b.requestQueue.delete(h)})}},g.prototype._onConnectFailed=function(b){this.connectFailedDescription=b.toString().split("\n")[0];var l=this;this.connectFailedDescription&&(b.description=this.connectFailedDescription,this.connectFailedDescription=null),b.code=1006,b.reason="connection failed",!this.reconnectOptions.auto||[1e3,1001].includes(b.code)&&!1!==b.wasClean?(this.emit(this.ERROR,b),this.requestQueue.size>0&&this.requestQueue.forEach(function(h,u){h.callback(f.ConnectionNotOpenError(b)),l.requestQueue.delete(u)}),this.responseQueue.size>0&&this.responseQueue.forEach(function(h,u){h.callback(f.InvalidConnection("on WS",b)),l.responseQueue.delete(u)}),this.connection._connection&&this.connection._connection.removeAllListeners(),this.connection._client.removeAllListeners(),this.connection._readyState=3,this.emit(this.CLOSE,b)):this.reconnect()},g.prototype._onClose=function(b){var l=this;!this.reconnectOptions.auto||[1e3,1001].includes(b.code)&&!1!==b.wasClean?(this.emit(this.CLOSE,b),this.requestQueue.size>0&&this.requestQueue.forEach(function(h,u){h.callback(f.ConnectionNotOpenError(b)),l.requestQueue.delete(u)}),this.responseQueue.size>0&&this.responseQueue.forEach(function(h,u){h.callback(f.InvalidConnection("on WS",b)),l.responseQueue.delete(u)}),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},g.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this)),this.connection._client&&(this.connection._client.removeAllListeners("connectFailed"),this.connection._client.on("connectFailed",this._onConnectFailed.bind(this)))},g.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose),this.connection._connection&&this.connection._client.removeListener("connectFailed",this._onConnectFailed)},g.prototype._parseResponse=function(b){var l=this,h=[];return b.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(u){l.lastChunk&&(u=l.lastChunk+u);var m=null;try{m=JSON.parse(u)}catch{return l.lastChunk=u,clearTimeout(l.lastChunkTimeout),void(l.lastChunkTimeout=setTimeout(function(){l.reconnectOptions.auto&&l.reconnectOptions.onTimeout?l.reconnect():(l.emit(l.ERROR,f.ConnectionTimeout(l._customTimeout)),l.requestQueue.size>0&&l.requestQueue.forEach(function(w,S){w.callback(f.ConnectionTimeout(l._customTimeout)),l.requestQueue.delete(S)}))},l._customTimeout))}clearTimeout(l.lastChunkTimeout),l.lastChunk=null,m&&h.push(m)}),h},g.prototype.send=function(b,l){var h=b.id,u={payload:b,callback:l};if(Array.isArray(b)&&(h=b[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(h,u);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(h),this.emit(this.ERROR,f.ConnectionNotOpenError()),void u.callback(f.ConnectionNotOpenError());this.responseQueue.set(h,u),this.requestQueue.delete(h);try{this.connection.send(JSON.stringify(u.payload))}catch(m){u.callback(m),this.responseQueue.delete(h)}}},g.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},g.prototype.disconnect=function(b,l){this._removeSocketListeners(),this.connection.close(b||1e3,l)},g.prototype.supportsSubscriptions=function(){return!0},g.prototype.reconnect=function(){var b=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach(function(l,h){try{b.responseQueue.delete(h),l.callback(f.PendingRequestsOnReconnectingError())}catch(u){console.error("Error encountered in reconnect: ",u)}}),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach(function(l,h){l.callback(f.MaxAttemptsReachedOnReconnectingError()),b.requestQueue.delete(h)}))},q.exports=g},92565:(q,O,E)=>{"use strict";var d=E(80606),x=E(34178).subscriptions,f=E(53349),T=E(473),g=function(){var b=this;d.packageInit(this,arguments);var l=this.setRequestManager;this.setRequestManager=function(u){return l(u),b.net.setRequestManager(u),!0};var h=this.setProvider;this.setProvider=function(){h.apply(b,arguments),b.setRequestManager(b._requestManager)},this.net=new T(this),[new x({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new f({name:"getVersion",call:"shh_version",params:0}),new f({name:"getInfo",call:"shh_info",params:0}),new f({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new f({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new f({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new f({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new f({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new f({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new f({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new f({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new f({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new f({name:"newSymKey",call:"shh_newSymKey",params:0}),new f({name:"addSymKey",call:"shh_addSymKey",params:1}),new f({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new f({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new f({name:"getSymKey",call:"shh_getSymKey",params:1}),new f({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new f({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new f({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new f({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new f({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new f({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach(function(u){u.attachToObject(b),u.setRequestManager(b._requestManager)})};g.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},d.addProviders(g),q.exports=g},48161:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(17130),f=E(90323),T=E(747),g=E(75010),b=E(31734),l=function _(w,S){var I=[];return S.forEach(function(P){if("object"===(0,d.default)(P.components)){if("tuple"!==P.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var L="",V=P.type.indexOf("[");V>=0&&(L=P.type.substring(V));var W=_(w,P.components);Array.isArray(W)&&w?I.push("tuple("+W.join(",")+")"+L):I.push(w?"("+W+")":"("+W.join(",")+")"+L)}else I.push(P.type)}),I},h=function(_){if(!f.isHexStrict(_))throw new Error("The parameter must be a valid HEX string.");var w="",S=0,I=_.length;for("0x"===_.substring(0,2)&&(S=2);S7?S+=_[I].toUpperCase():S+=_[I];return S},toHex:f.toHex,toBN:f.toBN,bytesToHex:f.bytesToHex,hexToBytes:f.hexToBytes,hexToNumberString:f.hexToNumberString,hexToNumber:f.hexToNumber,toDecimal:f.hexToNumber,numberToHex:f.numberToHex,fromDecimal:f.numberToHex,hexToUtf8:f.hexToUtf8,hexToString:f.hexToUtf8,toUtf8:f.hexToUtf8,stripHexPrefix:f.stripHexPrefix,utf8ToHex:f.utf8ToHex,stringToHex:f.utf8ToHex,fromUtf8:f.utf8ToHex,hexToAscii:h,toAscii:h,asciiToHex:u,fromAscii:u,unitMap:x.unitMap,toWei:function(_,w){if(w=m(w),!f.isBN(_)&&"string"!=typeof _)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return f.isBN(_)?x.toWei(_,w):x.toWei(_,w).toString(10)},fromWei:function(_,w){if(w=m(w),!f.isBN(_)&&"string"!=typeof _)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return f.isBN(_)?x.fromWei(_,w):x.fromWei(_,w).toString(10)},padLeft:f.leftPad,leftPad:f.leftPad,padRight:f.rightPad,rightPad:f.rightPad,toTwosComplement:f.toTwosComplement,isBloom:f.isBloom,isUserEthereumAddressInBloom:f.isUserEthereumAddressInBloom,isContractAddressInBloom:f.isContractAddressInBloom,isTopic:f.isTopic,isTopicInBloom:f.isTopicInBloom,isInBloom:f.isInBloom,compareBlockNumbers:function(_,w){if(_===w)return 0;if("genesis"!==_&&"earliest"!==_&&0!==_||"genesis"!==w&&"earliest"!==w&&0!==w){if("genesis"===_||"earliest"===_||0===_)return-1;if("genesis"===w||"earliest"===w||0===w)return 1;if("latest"===_||"finalized"===_)return"pending"===w?-1:1;if("latest"===w||"finalized"===w)return"pending"===_?1:-1;if("pending"===_)return 1;if("pending"===w)return-1;if("safe"===_||"safe"===w)return;var S=new b(_),I=new b(w);return S.lt(I)?-1:S.eq(I)?0:1}return 0},toNumber:f.toNumber}},747:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(31734),f=E(90323),T=function(l){var h=(0,d.default)(l);if("string"===h)return f.isHexStrict(l)?new x(l.replace(/0x/i,""),16):new x(l,10);if("number"===h)return new x(l);if(f.isBigNumber(l))return new x(l.toString(10));if(f.isBN(l))return l;throw new Error(l+" is not a number")},g=function(l,h,u){var m,_,w;if("bytes"===(l=(w=l).startsWith("int[")?"int256"+w.slice(3):"int"===w?"int256":w.startsWith("uint[")?"uint256"+w.slice(4):"uint"===w?"uint256":w.startsWith("fixed[")?"fixed128x128"+w.slice(5):"fixed"===w?"fixed128x128":w.startsWith("ufixed[")?"ufixed128x128"+w.slice(6):"ufixed"===w?"ufixed128x128":w)){if(h.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+h.length);return h}if("string"===l)return f.utf8ToHex(h);if("bool"===l)return h?"01":"00";if(l.startsWith("address")){if(m=u?64:40,!f.isAddress(h))throw new Error(h+" is not a valid address, or the checksum is invalid.");return f.leftPad(h.toLowerCase(),m)}if(m=function(w){var S=/^\D+(\d+).*$/.exec(w);return S?parseInt(S[1],10):null}(l),l.startsWith("bytes")){if(!m)throw new Error("bytes[] not yet supported in solidity");if(u&&(m=32),m<1||m>32||m256)throw new Error("Invalid uint"+m+" size");if((_=T(h)).bitLength()>m)throw new Error("Supplied uint exceeds width: "+m+" vs "+_.bitLength());if(_.lt(new x(0)))throw new Error("Supplied uint "+_.toString()+" is negative");return m?f.leftPad(_.toString("hex"),m/8*2):_}if(l.startsWith("int")){if(m%8||m<8||m>256)throw new Error("Invalid int"+m+" size");if((_=T(h)).bitLength()>m)throw new Error("Supplied int exceeds width: "+m+" vs "+_.bitLength());return _.lt(new x(0))?_.toTwos(m).toString("hex"):m?f.leftPad(_.toString("hex"),m/8*2):_}throw new Error("Unsupported or invalid type: "+l)},b=function(l){if(Array.isArray(l))throw new Error("Autodetection of array types is not supported.");var h,u,w,m="";if(l&&"object"===(0,d.default)(l)&&(l.hasOwnProperty("v")||l.hasOwnProperty("t")||l.hasOwnProperty("value")||l.hasOwnProperty("type"))?(h=l.hasOwnProperty("t")?l.t:l.type,m=l.hasOwnProperty("v")?l.v:l.value):(h=f.toHex(l,!0),m=f.toHex(l),h.startsWith("int")||h.startsWith("uint")||(h="bytes")),!h.startsWith("int")&&!h.startsWith("uint")||"string"!=typeof m||/^(-)?0x/i.test(m)||(m=new x(m)),Array.isArray(m)){if(w=/^\D+\d*\[(\d+)\]$/.exec(h),(u=w?parseInt(w[1],10):null)&&m.length!==u)throw new Error(h+" is not matching the given array "+JSON.stringify(m));u=m.length}return Array.isArray(m)?m.map(function(_){return g(h,_,u).toString("hex").replace("0x","")}).join(""):g(h,m,u).toString("hex").replace("0x","")};q.exports={soliditySha3:function(){var l=Array.prototype.slice.call(arguments).map(b);return f.sha3("0x"+l.join(""))},soliditySha3Raw:function(){return f.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(b).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(b).join("").toLowerCase()}}},90323:(q,O,E)=>{"use strict";var d=E(29033).Buffer,x=E(28847),f=x(E(74519)),T=x(E(3355)),g=E(31734),b=E(77277),l=E(88632),h=E(65907),u=E(19313),m=E(1243).keccak256,_=function(y){return g.isBN(y)},w=function(y){return y&&y.constructor&&"BigNumber"===y.constructor.name},S=function(y){try{return b.apply(null,arguments)}catch(M){throw new Error(M+' Given value: "'+y+'"')}},I=function(y){return!!/^(0x)?[0-9a-f]{40}$/i.test(y)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(y)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(y))||P(y))},P=function(y){y=y.replace(/^0x/i,"");for(var M=R(y.toLowerCase()).replace(/^0x/i,""),v=0;v<40;v++)if(parseInt(M[v],16)>7&&y[v].toUpperCase()!==y[v]||parseInt(M[v],16)<=7&&y[v].toLowerCase()!==y[v])return!1;return!0},L=function(y){var M="";y=(y=(y=(y=(y=l.encode(y)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var v=0;v1&&void 0!==arguments[1]&&arguments[1];if(!y)return y;if("string"==typeof y&&!H(y))throw new Error('Given value "'+y+'" is not a valid hex string.');var v=S(y);return M&&(v>Number.MAX_SAFE_INTEGER||v>>4).toString(16)),M.push((15&y[v]).toString(16));return"0x"+M.join("")},isHex:j,isHexStrict:H,stripHexPrefix:function(y){return 0!==y&&j(y)?y.replace(/^(-)?0x/i,"$1"):y},leftPad:function(y,M,v){var k=/^0x/i.test(y)||"number"==typeof y,D=M-(y=y.toString(16).replace(/^0x/i,"")).length+1>=0?M-y.length+1:0;return(k?"0x":"")+new Array(D).join(v||"0")+y},rightPad:function(y,M,v){var k=/^0x/i.test(y)||"number"==typeof y,D=M-(y=y.toString(16).replace(/^0x/i,"")).length+1>=0?M-y.length+1:0;return(k?"0x":"")+y+new Array(D).join(v||"0")},toTwosComplement:function(y){return"0x"+S(y).toTwos(256).toString(16,64)},sha3:R,sha3Raw:function(y){return null===(y=R(y))?K:y},toNumber:function(y){var M=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"==typeof y?y:V(G(y),M)}}},17001:(q,O,E)=>{"use strict";var d=E(78920).i8,x=E(80606),f=E(66748),T=E(473),g=E(96306),b=E(92565),l=E(42463),h=E(48161),u=function(){var m=this;x.packageInit(this,arguments),this.version=d,this.utils=h,this.eth=new f(this),this.shh=new b(this),this.bzz=new l(this);var _=this.setProvider;this.setProvider=function(w,S){return _.apply(m,arguments),m.eth.setRequestManager(m._requestManager),m.shh.setRequestManager(m._requestManager),m.bzz.setProvider(w),!0}};u.version=d,u.utils=h,u.modules={Eth:f,Net:T,Personal:g,Shh:b,Bzz:l},x.addProviders(u),q.exports=u},89214:()=>{},52361:()=>{},94616:()=>{},38768:q=>{"use strict";q.exports=function(O,E){(null==E||E>O.length)&&(E=O.length);for(var d=0,x=new Array(E);d{"use strict";q.exports=function(O){if(Array.isArray(O))return O},q.exports.__esModule=!0,q.exports.default=q.exports},77907:(q,O,E)=>{"use strict";var d=E(38768);q.exports=function(x){if(Array.isArray(x))return d(x)},q.exports.__esModule=!0,q.exports.default=q.exports},58975:q=>{"use strict";q.exports=function(O){if(void 0===O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O},q.exports.__esModule=!0,q.exports.default=q.exports},94571:q=>{"use strict";function O(E,d,x,f,T,g,b){try{var l=E[g](b),h=l.value}catch(u){return void x(u)}l.done?d(h):Promise.resolve(h).then(f,T)}q.exports=function(E){return function(){var d=this,x=arguments;return new Promise(function(f,T){var g=E.apply(d,x);function b(h){O(g,f,T,b,l,"next",h)}function l(h){O(g,f,T,b,l,"throw",h)}b(void 0)})}},q.exports.__esModule=!0,q.exports.default=q.exports},69721:q=>{"use strict";q.exports=function(O,E){if(!(O instanceof E))throw new TypeError("Cannot call a class as a function")},q.exports.__esModule=!0,q.exports.default=q.exports},14727:(q,O,E)=>{"use strict";var d=E(38746),x=E(36923);function f(T,g,b){return x()?(q.exports=f=Reflect.construct.bind(),q.exports.__esModule=!0,q.exports.default=q.exports):(q.exports=f=function(l,h,u){var m=[null];m.push.apply(m,h);var _=new(Function.bind.apply(l,m));return u&&d(_,u.prototype),_},q.exports.__esModule=!0,q.exports.default=q.exports),f.apply(null,arguments)}q.exports=f,q.exports.__esModule=!0,q.exports.default=q.exports},58985:(q,O,E)=>{"use strict";var d=E(32310);function x(f,T){for(var g=0;g{"use strict";var d=E(32310);q.exports=function(x,f,T){return(f=d(f))in x?Object.defineProperty(x,f,{value:T,enumerable:!0,configurable:!0,writable:!0}):x[f]=T,x},q.exports.__esModule=!0,q.exports.default=q.exports},119:(q,O,E)=>{"use strict";var d=E(47460);function x(){return"undefined"!=typeof Reflect&&Reflect.get?(q.exports=x=Reflect.get.bind(),q.exports.__esModule=!0,q.exports.default=q.exports):(q.exports=x=function(f,T,g){var b=d(f,T);if(b){var l=Object.getOwnPropertyDescriptor(b,T);return l.get?l.get.call(arguments.length<3?f:g):l.value}},q.exports.__esModule=!0,q.exports.default=q.exports),x.apply(this,arguments)}q.exports=x,q.exports.__esModule=!0,q.exports.default=q.exports},21949:q=>{"use strict";function O(E){return q.exports=O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},q.exports.__esModule=!0,q.exports.default=q.exports,O(E)}q.exports=O,q.exports.__esModule=!0,q.exports.default=q.exports},15163:(q,O,E)=>{"use strict";var d=E(38746);q.exports=function(x,f){if("function"!=typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(f&&f.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),Object.defineProperty(x,"prototype",{writable:!1}),f&&d(x,f)},q.exports.__esModule=!0,q.exports.default=q.exports},28847:q=>{"use strict";q.exports=function(O){return O&&O.__esModule?O:{default:O}},q.exports.__esModule=!0,q.exports.default=q.exports},78958:q=>{"use strict";q.exports=function(O){return-1!==Function.toString.call(O).indexOf("[native code]")},q.exports.__esModule=!0,q.exports.default=q.exports},36923:q=>{"use strict";q.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}},q.exports.__esModule=!0,q.exports.default=q.exports},41642:q=>{"use strict";q.exports=function(O){if("undefined"!=typeof Symbol&&null!=O[Symbol.iterator]||null!=O["@@iterator"])return Array.from(O)},q.exports.__esModule=!0,q.exports.default=q.exports},91436:q=>{"use strict";q.exports=function(O,E){var d=null==O?null:"undefined"!=typeof Symbol&&O[Symbol.iterator]||O["@@iterator"];if(null!=d){var x,f,T,g,b=[],l=!0,h=!1;try{if(T=(d=d.call(O)).next,0===E){if(Object(d)!==d)return;l=!1}else for(;!(l=(x=T.call(d)).done)&&(b.push(x.value),b.length!==E);l=!0);}catch(u){h=!0,f=u}finally{try{if(!l&&null!=d.return&&(g=d.return(),Object(g)!==g))return}finally{if(h)throw f}}return b}},q.exports.__esModule=!0,q.exports.default=q.exports},82966:q=>{"use strict";q.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},q.exports.__esModule=!0,q.exports.default=q.exports},22344:q=>{"use strict";q.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},q.exports.__esModule=!0,q.exports.default=q.exports},34650:(q,O,E)=>{"use strict";var d=E(3355).default,x=E(58975);q.exports=function(f,T){if(T&&("object"===d(T)||"function"==typeof T))return T;if(void 0!==T)throw new TypeError("Derived constructors may only return object or undefined");return x(f)},q.exports.__esModule=!0,q.exports.default=q.exports},82028:(q,O,E)=>{"use strict";var d=E(3355).default;function x(){q.exports=x=function(){return f},q.exports.__esModule=!0,q.exports.default=q.exports;var f={},T=Object.prototype,g=T.hasOwnProperty,b=Object.defineProperty||function(C,a,B){C[a]=B.value},l="function"==typeof Symbol?Symbol:{},h=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",m=l.toStringTag||"@@toStringTag";function _(C,a,B){return Object.defineProperty(C,a,{value:B,enumerable:!0,configurable:!0,writable:!0}),C[a]}try{_({},"")}catch{_=function(a,B,Q){return a[B]=Q}}function w(C,a,B,Q){var ce=Object.create((a&&a.prototype instanceof P?a:P).prototype),ue=new k(Q||[]);return b(ce,"_invoke",{value:o(C,B,ue)}),ce}function S(C,a,B){try{return{type:"normal",arg:C.call(a,B)}}catch(Q){return{type:"throw",arg:Q}}}f.wrap=w;var I={};function P(){}function L(){}function V(){}var W={};_(W,h,function(){return this});var G=Object.getPrototypeOf,H=G&&G(G(D([])));H&&H!==T&&g.call(H,h)&&(W=H);var j=V.prototype=P.prototype=Object.create(W);function K(C){["next","throw","return"].forEach(function(a){_(C,a,function(B){return this._invoke(a,B)})})}function R(C,a){function B(ee,ce,ue,we){var ae=S(C[ee],C,ce);if("throw"!==ae.type){var Te=ae.arg,le=Te.value;return le&&"object"==d(le)&&g.call(le,"__await")?a.resolve(le.__await).then(function(X){B("next",X,ue,we)},function(X){B("throw",X,ue,we)}):a.resolve(le).then(function(X){Te.value=X,ue(Te)},function(X){return B("throw",X,ue,we)})}we(ae.arg)}var Q;b(this,"_invoke",{value:function(ee,ce){function ue(){return new a(function(we,ae){B(ee,ce,we,ae)})}return Q=Q?Q.then(ue,ue):ue()}})}function o(C,a,B){var Q="suspendedStart";return function(ee,ce){if("executing"===Q)throw new Error("Generator is already running");if("completed"===Q){if("throw"===ee)throw ce;return{value:void 0,done:!0}}for(B.method=ee,B.arg=ce;;){var ue=B.delegate;if(ue){var we=y(ue,B);if(we){if(we===I)continue;return we}}if("next"===B.method)B.sent=B._sent=B.arg;else if("throw"===B.method){if("suspendedStart"===Q)throw Q="completed",B.arg;B.dispatchException(B.arg)}else"return"===B.method&&B.abrupt("return",B.arg);Q="executing";var ae=S(C,a,B);if("normal"===ae.type){if(Q=B.done?"completed":"suspendedYield",ae.arg===I)continue;return{value:ae.arg,done:B.done}}"throw"===ae.type&&(Q="completed",B.method="throw",B.arg=ae.arg)}}}function y(C,a){var B=a.method,Q=C.iterator[B];if(void 0===Q)return a.delegate=null,"throw"===B&&C.iterator.return&&(a.method="return",a.arg=void 0,y(C,a),"throw"===a.method)||"return"!==B&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+B+"' method")),I;var ee=S(Q,C.iterator,a.arg);if("throw"===ee.type)return a.method="throw",a.arg=ee.arg,a.delegate=null,I;var ce=ee.arg;return ce?ce.done?(a[C.resultName]=ce.value,a.next=C.nextLoc,"return"!==a.method&&(a.method="next",a.arg=void 0),a.delegate=null,I):ce:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,I)}function M(C){var a={tryLoc:C[0]};1 in C&&(a.catchLoc=C[1]),2 in C&&(a.finallyLoc=C[2],a.afterLoc=C[3]),this.tryEntries.push(a)}function v(C){var a=C.completion||{};a.type="normal",delete a.arg,C.completion=a}function k(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(M,this),this.reset(!0)}function D(C){if(C){var a=C[h];if(a)return a.call(C);if("function"==typeof C.next)return C;if(!isNaN(C.length)){var B=-1,Q=function ee(){for(;++B=0;--Q){var ee=this.tryEntries[Q],ce=ee.completion;if("root"===ee.tryLoc)return B("end");if(ee.tryLoc<=this.prev){var ue=g.call(ee,"catchLoc"),we=g.call(ee,"finallyLoc");if(ue&&we){if(this.prev=0;--B){var Q=this.tryEntries[B];if(Q.tryLoc<=this.prev&&g.call(Q,"finallyLoc")&&this.prev=0;--a){var B=this.tryEntries[a];if(B.finallyLoc===C)return this.complete(B.completion,B.afterLoc),v(B),I}},catch:function(C){for(var a=this.tryEntries.length-1;a>=0;--a){var B=this.tryEntries[a];if(B.tryLoc===C){var Q=B.completion;if("throw"===Q.type){var ee=Q.arg;v(B)}return ee}}throw new Error("illegal catch attempt")},delegateYield:function(C,a,B){return this.delegate={iterator:D(C),resultName:a,nextLoc:B},"next"===this.method&&(this.arg=void 0),I}},f}q.exports=x,q.exports.__esModule=!0,q.exports.default=q.exports},38746:q=>{"use strict";function O(E,d){return q.exports=O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,f){return x.__proto__=f,x},q.exports.__esModule=!0,q.exports.default=q.exports,O(E,d)}q.exports=O,q.exports.__esModule=!0,q.exports.default=q.exports},74519:(q,O,E)=>{"use strict";var d=E(12338),x=E(91436),f=E(46906),T=E(82966);q.exports=function(g,b){return d(g)||x(g,b)||f(g,b)||T()},q.exports.__esModule=!0,q.exports.default=q.exports},47460:(q,O,E)=>{"use strict";var d=E(21949);q.exports=function(x,f){for(;!Object.prototype.hasOwnProperty.call(x,f)&&null!==(x=d(x)););return x},q.exports.__esModule=!0,q.exports.default=q.exports},93106:(q,O,E)=>{"use strict";var d=E(77907),x=E(41642),f=E(46906),T=E(22344);q.exports=function(g){return d(g)||x(g)||f(g)||T()},q.exports.__esModule=!0,q.exports.default=q.exports},79662:(q,O,E)=>{"use strict";var d=E(3355).default;q.exports=function(x,f){if("object"!==d(x)||null===x)return x;var T=x[Symbol.toPrimitive];if(void 0!==T){var g=T.call(x,f||"default");if("object"!==d(g))return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===f?String:Number)(x)},q.exports.__esModule=!0,q.exports.default=q.exports},32310:(q,O,E)=>{"use strict";var d=E(3355).default,x=E(79662);q.exports=function(f){var T=x(f,"string");return"symbol"===d(T)?T:String(T)},q.exports.__esModule=!0,q.exports.default=q.exports},3355:q=>{"use strict";function O(E){return q.exports=O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},q.exports.__esModule=!0,q.exports.default=q.exports,O(E)}q.exports=O,q.exports.__esModule=!0,q.exports.default=q.exports},46906:(q,O,E)=>{"use strict";var d=E(38768);q.exports=function(x,f){if(x){if("string"==typeof x)return d(x,f);var T=Object.prototype.toString.call(x).slice(8,-1);return"Object"===T&&x.constructor&&(T=x.constructor.name),"Map"===T||"Set"===T?Array.from(x):"Arguments"===T||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?d(x,f):void 0}},q.exports.__esModule=!0,q.exports.default=q.exports},22940:(q,O,E)=>{"use strict";var d=E(21949),x=E(38746),f=E(78958),T=E(14727);function g(b){var l="function"==typeof Map?new Map:void 0;return q.exports=g=function(h){if(null===h||!f(h))return h;if("function"!=typeof h)throw new TypeError("Super expression must either be null or a function");if(void 0!==l){if(l.has(h))return l.get(h);l.set(h,u)}function u(){return T(h,arguments,d(this).constructor)}return u.prototype=Object.create(h.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),x(u,h)},q.exports.__esModule=!0,q.exports.default=q.exports,g(b)}q.exports=g,q.exports.__esModule=!0,q.exports.default=q.exports},82247:(q,O,E)=>{"use strict";var d=E(28847)(E(3355)),x=E(82028)();q.exports=x;try{regeneratorRuntime=x}catch{"object"===("undefined"==typeof globalThis?"undefined":(0,d.default)(globalThis))?globalThis.regeneratorRuntime=x:Function("r","regeneratorRuntime = r")(x)}},43604:(q,O,E)=>{"use strict";var d=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],x="undefined"==typeof globalThis?E.g:globalThis;q.exports=function(){for(var f=[],T=0;T{"use strict";q.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"hash":"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a","timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xa3f5ab08"},{"name":"homestead","block":0,"forkHash":"0xa3f5ab08"},{"name":"tangerineWhistle","block":0,"forkHash":"0xa3f5ab08"},{"name":"spuriousDragon","block":0,"forkHash":"0xa3f5ab08"},{"name":"byzantium","block":0,"forkHash":"0xa3f5ab08"},{"name":"constantinople","block":0,"forkHash":"0xa3f5ab08"},{"name":"petersburg","block":0,"forkHash":"0xa3f5ab08"},{"name":"istanbul","block":1561651,"forkHash":"0xc25efa5c"},{"name":"berlin","block":4460644,"forkHash":"0x757a1c47"},{"name":"london","block":5062605,"forkHash":"0xb8c6299d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"51.141.78.53","port":30303,"id":"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a","location":"","comment":"Upstream bootnode 1"},{"ip":"13.93.54.137","port":30303,"id":"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b","location":"","comment":"Upstream bootnode 2"},{"ip":"94.237.54.114","port":30313,"id":"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291","location":"","comment":"Upstream bootnode 3"},{"ip":"18.218.250.66","port":30313,"id":"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949","location":"","comment":"Upstream bootnode 4"},{"ip":"3.11.147.67","port":30303,"id":"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91","location":"","comment":"Ethereum Foundation bootnode"},{"ip":"51.15.116.226","port":30303,"id":"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":30303,"id":"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":40303,"id":"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd","location":"","comment":"Goerli Initiative bootnode"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}')},37098:q=>{"use strict";q.exports=JSON.parse('{"name":"kovan","chainId":42,"networkId":42,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"aura","aura":{}},"comment":"Parity PoA test network","url":"https://kovan-testnet.github.io/website/","genesis":{"hash":"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9","timestamp":null,"gasLimit":6000000,"difficulty":131072,"nonce":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","extraData":"0x","stateRoot":"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x010ffe56"},{"name":"homestead","block":0,"forkHash":"0x010ffe56"},{"name":"tangerineWhistle","block":0,"forkHash":"0x010ffe56"},{"name":"spuriousDragon","block":0,"forkHash":"0x010ffe56"},{"name":"byzantium","block":5067000,"forkHash":"0x7f83c620"},{"name":"constantinople","block":9200000,"forkHash":"0xa94e3dc4"},{"name":"petersburg","block":10255201,"forkHash":"0x186874aa"},{"name":"istanbul","block":14111141,"forkHash":"0x7f6599a6"},{"name":"berlin","block":null,"forkHash":null},{"name":"london","block":null,"forkHash":null},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"116.203.116.241","port":30303,"id":"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45","location":"","comment":"1"},{"ip":"3.217.96.11","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"2"},{"ip":"108.61.170.124","port":30303,"id":"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c","location":"","comment":"3"},{"ip":"157.230.31.163","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"4"}]}')},87295:q=>{"use strict";q.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","timestamp":null,"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","stateRoot":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfc64ec04"},{"name":"homestead","block":1150000,"forkHash":"0x97c2c34c"},{"name":"dao","block":1920000,"forkHash":"0x91d1f948"},{"name":"tangerineWhistle","block":2463000,"forkHash":"0x7a64da13"},{"name":"spuriousDragon","block":2675000,"forkHash":"0x3edd5b10"},{"name":"byzantium","block":4370000,"forkHash":"0xa00bc324"},{"name":"constantinople","block":7280000,"forkHash":"0x668db0af"},{"name":"petersburg","block":7280000,"forkHash":"0x668db0af"},{"name":"istanbul","block":9069000,"forkHash":"0x879d6e30"},{"name":"muirGlacier","block":9200000,"forkHash":"0xe029e991"},{"name":"berlin","block":12244000,"forkHash":"0x0eb440f6"},{"name":"london","block":12965000,"forkHash":"0xb715077d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"18.138.108.67","port":30303,"id":"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666","location":"ap-southeast-1-001","comment":"bootnode-aws-ap-southeast-1-001"},{"ip":"3.209.45.79","port":30303,"id":"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de","location":"us-east-1-001","comment":"bootnode-aws-us-east-1-001"},{"ip":"34.255.23.113","port":30303,"id":"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758","location":"eu-west-1-001","comment":"bootnode-aws-eu-west-1-001"},{"ip":"35.158.244.151","port":30303,"id":"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8","location":"eu-central-1-001","comment":"bootnode-aws-eu-central-1-001"},{"ip":"52.187.207.27","port":30303,"id":"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a","location":"australiaeast-001","comment":"bootnode-azure-australiaeast-001"},{"ip":"191.234.162.198","port":30303,"id":"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1","location":"brazilsouth-001","comment":"bootnode-azure-brazilsouth-001"},{"ip":"52.231.165.108","port":30303,"id":"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8","location":"koreasouth-001","comment":"bootnode-azure-koreasouth-001"},{"ip":"104.42.217.25","port":30303,"id":"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f","location":"westus-001","comment":"bootnode-azure-westus-001"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}')},40439:q=>{"use strict";q.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"hash":"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177","timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x3b8e0691"},{"name":"homestead","block":1,"forkHash":"0x60949295"},{"name":"tangerineWhistle","block":2,"forkHash":"0x8bde40dd"},{"name":"spuriousDragon","block":3,"forkHash":"0xcb3a64bb"},{"name":"byzantium","block":1035301,"forkHash":"0x8d748b57"},{"name":"constantinople","block":3660663,"forkHash":"0xe49cab14"},{"name":"petersburg","block":4321234,"forkHash":"0xafec6b27"},{"name":"istanbul","block":5435345,"forkHash":"0xcbdb8838"},{"name":"berlin","block":8290928,"forkHash":"0x6910c8bd"},{"name":"london","block":8897988,"forkHash":"0x8e29f2f3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.169.42.101","port":30303,"id":"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf","location":"","comment":"IE"},{"ip":"52.3.158.184","port":30303,"id":"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8","location":"","comment":"INFURA"},{"ip":"159.89.28.211","port":30303,"id":"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6","location":"","comment":"AKASHA"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}')},31227:q=>{"use strict";q.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"hash":"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d","timestamp":null,"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535","stateRoot":"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x30c7ddbc"},{"name":"homestead","block":0,"forkHash":"0x30c7ddbc"},{"name":"tangerineWhistle","block":0,"forkHash":"0x30c7ddbc"},{"name":"spuriousDragon","block":10,"forkHash":"0x63760190"},{"name":"byzantium","block":1700000,"forkHash":"0x3ea159c7"},{"name":"constantinople","block":4230000,"forkHash":"0x97b544f3"},{"name":"petersburg","block":4939394,"forkHash":"0xd6e2149b"},{"name":"istanbul","block":6485846,"forkHash":"0x4bc66396"},{"name":"muirGlacier","block":7117117,"forkHash":"0x6727ef90"},{"name":"berlin","block":9812189,"forkHash":"0xa157d377"},{"name":"london","block":10499401,"forkHash":"0x7119b6b3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.176.7.10","port":30303,"id":"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606","location":"","comment":"US-Azure geth"},{"ip":"52.176.100.77","port":30303,"id":"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c","location":"","comment":"US-Azure parity"},{"ip":"52.232.243.152","port":30303,"id":"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f","location":"","comment":"Parity"},{"ip":"192.81.208.223","port":30303,"id":"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09","location":"","comment":"@gpip"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}')},77523:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-1559","number":1559,"comment":"Fee market change for ETH 1.0 chain","url":"https://eips.ethereum.org/EIPS/eip-1559","status":"Review","minimumHardfork":"berlin","requiredEIPs":[2930],"gasConfig":{"baseFeeMaxChangeDenominator":{"v":8,"d":"Maximum base fee change denominator"},"elasticityMultiplier":{"v":2,"d":"Maximum block gas target elasticity"},"initialBaseFee":{"v":1000000000,"d":"Initial base fee on first EIP1559 block"}},"gasPrices":{},"vm":{},"pow":{}}')},83339:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-2315","number":2315,"comment":"Simple subroutines for the EVM","url":"https://eips.ethereum.org/EIPS/eip-2315","status":"Draft","minimumHardfork":"istanbul","gasConfig":{},"gasPrices":{"beginsub":{"v":2,"d":"Base fee of the BEGINSUB opcode"},"returnsub":{"v":5,"d":"Base fee of the RETURNSUB opcode"},"jumpsub":{"v":10,"d":"Base fee of the JUMPSUB opcode"}},"vm":{},"pow":{}}')},26769:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-2537","number":2537,"comment":"BLS12-381 precompiles","url":"https://eips.ethereum.org/EIPS/eip-2537","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"Bls12381G1AddGas":{"v":600,"d":"Gas cost of a single BLS12-381 G1 addition precompile-call"},"Bls12381G1MulGas":{"v":12000,"d":"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},"Bls12381G2AddGas":{"v":4500,"d":"Gas cost of a single BLS12-381 G2 addition precompile-call"},"Bls12381G2MulGas":{"v":55000,"d":"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},"Bls12381PairingBaseGas":{"v":115000,"d":"Base gas cost of BLS12-381 pairing check"},"Bls12381PairingPerPairGas":{"v":23000,"d":"Per-pair gas cost of BLS12-381 pairing check"},"Bls12381MapG1Gas":{"v":5500,"d":"Gas cost of BLS12-381 map field element to G1"},"Bls12381MapG2Gas":{"v":110000,"d":"Gas cost of BLS12-381 map field element to G2"},"Bls12381MultiExpGasDiscount":{"v":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],"d":"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},"vm":{},"pow":{}}')},17897:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Last call","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},62170:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},88436:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"coldsload":{"v":2100,"d":"Gas cost of the first read of storage from a given location (per transaction)"},"coldaccountaccess":{"v":2600,"d":"Gas cost of the first read of a given address (per transaction)"},"warmstorageread":{"v":100,"d":"Gas cost of reading storage locations which have already loaded \'cold\'"},"sstoreCleanGasEIP2200":{"v":2900,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreNoopGasEIP2200":{"v":100,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":100,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitRefundEIP2200":{"v":19900,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanRefundEIP2200":{"v":4900,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"call":{"v":0,"d":"Base fee of the CALL opcode"},"callcode":{"v":0,"d":"Base fee of the CALLCODE opcode"},"delegatecall":{"v":0,"d":"Base fee of the DELEGATECALL opcode"},"staticcall":{"v":0,"d":"Base fee of the STATICCALL opcode"},"balance":{"v":0,"d":"Base fee of the BALANCE opcode"},"extcodesize":{"v":0,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":0,"d":"Base fee of the EXTCODECOPY opcode"},"extcodehash":{"v":0,"d":"Base fee of the EXTCODEHASH opcode"},"sload":{"v":0,"d":"Base fee of the SLOAD opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"}},"vm":{},"pow":{}}')},96213:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Draft","minimumHardfork":"istanbul","requiredEIPs":[2718,2929],"gasConfig":{},"gasPrices":{"accessListStorageKeyCost":{"v":1900,"d":"Gas cost per storage key in an Access List transaction"},"accessListAddressCost":{"v":2400,"d":"Gas cost per storage key in an Access List transaction"}},"vm":{},"pow":{}}')},25491:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Review","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},20070:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[2929],"gasConfig":{"maxRefundQuotient":{"v":5,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"selfdestructRefund":{"v":0,"d":"Refunded following a selfdestruct operation"},"sstoreClearRefundEIP2200":{"v":4800,"d":"Once per SSTORE operation for clearing an originally existing storage slot"}},"vm":{},"pow":{}}')},21871:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},47225:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Draft","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},98571:q=>{"use strict";q.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},20015:q=>{"use strict";q.exports=JSON.parse('{"name":"berlin","comment":"HF targeted for July 2020 following the Muir Glacier HF","url":"https://eips.ethereum.org/EIPS/eip-2070","status":"Draft","eips":[2565,2929,2718,2930]}')},26985:q=>{"use strict";q.exports=JSON.parse('{"name":"byzantium","comment":"Hardfork with new precompiles, instructions and other protocol changes","url":"https://eips.ethereum.org/EIPS/eip-609","status":"Final","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":20,"d":"Gquaddivisor from modexp precompile for gas calculation"},"ecAdd":{"v":500,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":40000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":100000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":80000,"d":"Gas costs regarding curve pairing precompile input length"},"revert":{"v":0,"d":"Base fee of the REVERT opcode"},"staticcall":{"v":700,"d":"Base fee of the STATICCALL opcode"},"returndatasize":{"v":2,"d":"Base fee of the RETURNDATASIZE opcode"},"returndatacopy":{"v":3,"d":"Base fee of the RETURNDATACOPY opcode"}},"vm":{},"pow":{"minerReward":{"v":"3000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":3000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},60114:q=>{"use strict";q.exports=JSON.parse('{"name":"chainstart","comment":"Start of the Ethereum main chain","url":"","status":"","gasConfig":{"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be"},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations"},"maxRefundQuotient":{"v":2,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"base":{"v":2,"d":"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},"tierStep":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them"},"exp":{"v":10,"d":"Base fee of the EXP opcode"},"expByte":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction"},"sha3":{"v":30,"d":"Base fee of the SHA3 opcode"},"sha3Word":{"v":6,"d":"Once per word of the SHA3 operation\'s data"},"sload":{"v":50,"d":"Base fee of the SLOAD opcode"},"sstoreSet":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero"},"sstoreReset":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero"},"sstoreRefund":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero"},"jumpdest":{"v":1,"d":"Base fee of the JUMPDEST opcode"},"log":{"v":375,"d":"Base fee of the LOG opcode"},"logData":{"v":8,"d":"Per byte in a LOG* operation\'s data"},"logTopic":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},"create":{"v":32000,"d":"Base fee of the CREATE opcode"},"call":{"v":40,"d":"Base fee of the CALL opcode"},"callStipend":{"v":2300,"d":"Free gas given at beginning of call"},"callValueTransfer":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero"},"callNewAccount":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior"},"selfdestructRefund":{"v":24000,"d":"Refunded following a selfdestruct operation"},"memory":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation"},"createData":{"v":200,"d":""},"tx":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions"},"txCreation":{"v":32000,"d":"The cost of creating a contract via tx"},"txDataZero":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},"txDataNonZero":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"copy":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},"ecRecover":{"v":3000,"d":""},"sha256":{"v":60,"d":""},"sha256Word":{"v":12,"d":""},"ripemd160":{"v":600,"d":""},"ripemd160Word":{"v":120,"d":""},"identity":{"v":15,"d":""},"identityWord":{"v":3,"d":""},"stop":{"v":0,"d":"Base fee of the STOP opcode"},"add":{"v":3,"d":"Base fee of the ADD opcode"},"mul":{"v":5,"d":"Base fee of the MUL opcode"},"sub":{"v":3,"d":"Base fee of the SUB opcode"},"div":{"v":5,"d":"Base fee of the DIV opcode"},"sdiv":{"v":5,"d":"Base fee of the SDIV opcode"},"mod":{"v":5,"d":"Base fee of the MOD opcode"},"smod":{"v":5,"d":"Base fee of the SMOD opcode"},"addmod":{"v":8,"d":"Base fee of the ADDMOD opcode"},"mulmod":{"v":8,"d":"Base fee of the MULMOD opcode"},"signextend":{"v":5,"d":"Base fee of the SIGNEXTEND opcode"},"lt":{"v":3,"d":"Base fee of the LT opcode"},"gt":{"v":3,"d":"Base fee of the GT opcode"},"slt":{"v":3,"d":"Base fee of the SLT opcode"},"sgt":{"v":3,"d":"Base fee of the SGT opcode"},"eq":{"v":3,"d":"Base fee of the EQ opcode"},"iszero":{"v":3,"d":"Base fee of the ISZERO opcode"},"and":{"v":3,"d":"Base fee of the AND opcode"},"or":{"v":3,"d":"Base fee of the OR opcode"},"xor":{"v":3,"d":"Base fee of the XOR opcode"},"not":{"v":3,"d":"Base fee of the NOT opcode"},"byte":{"v":3,"d":"Base fee of the BYTE opcode"},"address":{"v":2,"d":"Base fee of the ADDRESS opcode"},"balance":{"v":20,"d":"Base fee of the BALANCE opcode"},"origin":{"v":2,"d":"Base fee of the ORIGIN opcode"},"caller":{"v":2,"d":"Base fee of the CALLER opcode"},"callvalue":{"v":2,"d":"Base fee of the CALLVALUE opcode"},"calldataload":{"v":3,"d":"Base fee of the CALLDATALOAD opcode"},"calldatasize":{"v":2,"d":"Base fee of the CALLDATASIZE opcode"},"calldatacopy":{"v":3,"d":"Base fee of the CALLDATACOPY opcode"},"codesize":{"v":2,"d":"Base fee of the CODESIZE opcode"},"codecopy":{"v":3,"d":"Base fee of the CODECOPY opcode"},"gasprice":{"v":2,"d":"Base fee of the GASPRICE opcode"},"extcodesize":{"v":20,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":20,"d":"Base fee of the EXTCODECOPY opcode"},"blockhash":{"v":20,"d":"Base fee of the BLOCKHASH opcode"},"coinbase":{"v":2,"d":"Base fee of the COINBASE opcode"},"timestamp":{"v":2,"d":"Base fee of the TIMESTAMP opcode"},"number":{"v":2,"d":"Base fee of the NUMBER opcode"},"difficulty":{"v":2,"d":"Base fee of the DIFFICULTY opcode"},"gaslimit":{"v":2,"d":"Base fee of the GASLIMIT opcode"},"pop":{"v":2,"d":"Base fee of the POP opcode"},"mload":{"v":3,"d":"Base fee of the MLOAD opcode"},"mstore":{"v":3,"d":"Base fee of the MSTORE opcode"},"mstore8":{"v":3,"d":"Base fee of the MSTORE8 opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"},"jump":{"v":8,"d":"Base fee of the JUMP opcode"},"jumpi":{"v":10,"d":"Base fee of the JUMPI opcode"},"pc":{"v":2,"d":"Base fee of the PC opcode"},"msize":{"v":2,"d":"Base fee of the MSIZE opcode"},"gas":{"v":2,"d":"Base fee of the GAS opcode"},"push":{"v":3,"d":"Base fee of the PUSH opcode"},"dup":{"v":3,"d":"Base fee of the DUP opcode"},"swap":{"v":3,"d":"Base fee of the SWAP opcode"},"callcode":{"v":40,"d":"Base fee of the CALLCODE opcode"},"return":{"v":0,"d":"Base fee of the RETURN opcode"},"invalid":{"v":0,"d":"Base fee of the INVALID opcode"},"selfdestruct":{"v":0,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed"},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack"},"maxExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis"}},"pow":{"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be"},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations"},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":0,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},35993:q=>{"use strict";q.exports=JSON.parse('{"name":"constantinople","comment":"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)","url":"https://eips.ethereum.org/EIPS/eip-1013","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":200,"d":"Once per SSTORE operation if the value doesn\'t change"},"netSstoreInitGas":{"v":20000,"d":"Once per SSTORE operation from clean zero"},"netSstoreCleanGas":{"v":5000,"d":"Once per SSTORE operation from clean non-zero"},"netSstoreDirtyGas":{"v":200,"d":"Once per SSTORE operation from dirty"},"netSstoreClearRefund":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"netSstoreResetRefund":{"v":4800,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"netSstoreResetClearRefund":{"v":19800,"d":"Once per SSTORE operation for resetting to the original zero value"},"shl":{"v":3,"d":"Base fee of the SHL opcode"},"shr":{"v":3,"d":"Base fee of the SHR opcode"},"sar":{"v":3,"d":"Base fee of the SAR opcode"},"extcodehash":{"v":400,"d":"Base fee of the EXTCODEHASH opcode"},"create2":{"v":32000,"d":"Base fee of the CREATE2 opcode"}},"vm":{},"pow":{"minerReward":{"v":"2000000000000000000","d":"The amount a miner gets rewarded for mining a block"},"difficultyBombDelay":{"v":5000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},7197:q=>{"use strict";q.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},62800:q=>{"use strict";q.exports=JSON.parse('{"name":"homestead","comment":"Homestead hardfork with protocol and network changes","url":"https://eips.ethereum.org/EIPS/eip-606","status":"Final","gasConfig":{},"gasPrices":{"delegatecall":{"v":40,"d":"Base fee of the DELEGATECALL opcode"}},"vm":{},"pow":{}}')},83166:q=>{"use strict";q.exports=JSON.parse('{"name":"istanbul","comment":"HF targeted for December 2019 following the Constantinople/Petersburg HF","url":"https://eips.ethereum.org/EIPS/eip-1679","status":"Draft","gasConfig":{},"gasPrices":{"blake2Round":{"v":1,"d":"Gas cost per round for the Blake2 F precompile"},"ecAdd":{"v":150,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":6000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":45000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":34000,"d":"Gas costs regarding curve pairing precompile input length"},"txDataNonZero":{"v":16,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"sstoreSentryGasEIP2200":{"v":2300,"d":"Minimum gas required to be present for an SSTORE call, not consumed"},"sstoreNoopGasEIP2200":{"v":800,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":800,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitGasEIP2200":{"v":20000,"d":"Once per SSTORE operation from clean zero to non-zero"},"sstoreInitRefundEIP2200":{"v":19200,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanGasEIP2200":{"v":5000,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreCleanRefundEIP2200":{"v":4200,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"sstoreClearRefundEIP2200":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"balance":{"v":700,"d":"Base fee of the BALANCE opcode"},"extcodehash":{"v":700,"d":"Base fee of the EXTCODEHASH opcode"},"chainid":{"v":2,"d":"Base fee of the CHAINID opcode"},"selfbalance":{"v":5,"d":"Base fee of the SELFBALANCE opcode"},"sload":{"v":800,"d":"Base fee of the SLOAD opcode"}},"vm":{},"pow":{}}')},61250:q=>{"use strict";q.exports=JSON.parse('{"name":"london","comment":"HF targeted for July 2021 following the Berlin fork","url":"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md","status":"Draft","eips":[1559,3198,3529,3541]}')},88648:q=>{"use strict";q.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/pm/issues/361","status":"pre-Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675]}')},42946:q=>{"use strict";q.exports=JSON.parse('{"name":"muirGlacier","comment":"HF to delay the difficulty bomb","url":"https://eips.ethereum.org/EIPS/eip-2384","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},4064:q=>{"use strict";q.exports=JSON.parse('{"name":"petersburg","comment":"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople","url":"https://eips.ethereum.org/EIPS/eip-1716","status":"Draft","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreInitGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreCleanGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreDirtyGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreClearRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetClearRefund":{"v":null,"d":"Removed along EIP-1283"}},"vm":{},"pow":{}}')},5553:q=>{"use strict";q.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the London HF","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},90716:q=>{"use strict";q.exports=JSON.parse('{"name":"spuriousDragon","comment":"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit","url":"https://eips.ethereum.org/EIPS/eip-607","status":"Final","gasConfig":{},"gasPrices":{"expByte":{"v":50,"d":"Times ceil(log256(exponent)) for the EXP instruction"}},"vm":{"maxCodeSize":{"v":24576,"d":"Maximum length of contract code"}},"pow":{}}')},22302:q=>{"use strict";q.exports=JSON.parse('{"name":"tangerineWhistle","comment":"Hardfork with gas cost changes for IO-heavy operations","url":"https://eips.ethereum.org/EIPS/eip-608","status":"Final","gasConfig":{},"gasPrices":{"sload":{"v":200,"d":"Once per SLOAD operation"},"call":{"v":700,"d":"Once per CALL operation & message call transaction"},"extcodesize":{"v":700,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":700,"d":"Base fee of the EXTCODECOPY opcode"},"balance":{"v":400,"d":"Base fee of the BALANCE opcode"},"delegatecall":{"v":700,"d":"Base fee of the DELEGATECALL opcode"},"callcode":{"v":700,"d":"Base fee of the CALLCODE opcode"},"selfdestruct":{"v":5000,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{},"pow":{}}')},44946:q=>{"use strict";q.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:q=>{"use strict";q.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:q=>{"use strict";q.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},83630:q=>{"use strict";q.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"blake3":30,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,"x11":4352,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},29799:q=>{"use strict";q.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:q=>{"use strict";q.exports={i8:"6.5.4"}},24070:q=>{"use strict";q.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},22562:q=>{"use strict";q.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},19794:q=>{"use strict";q.exports={version:"1.0.34"}},78920:q=>{"use strict";q.exports={i8:"1.10.2"}}},Y={};function ie(q){var O=Y[q];if(void 0!==O)return O.exports;var E=Y[q]={id:q,loaded:!1,exports:{}};return be[q](E,E.exports,ie),E.loaded=!0,E.exports}return ie.amdO={},ie.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),ie.nmd=q=>(q.paths=[],q.children||(q.children=[]),q),ie(17001)})())()},47709:(bt,be,Y)=>{"use strict";var ie=Y(79765),q=Y(10826),O=Y(39897),E=Y(66682),d=Y(78345);function x(n){for(let t in n)if(n[t]===x)return t;throw Error("Could not find renamed property on target object.")}function f(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function T(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(T).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function g(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const b=x({__forward_ref__:x});function l(n){return n.__forward_ref__=l,n.toString=function(){return T(this())},n}function h(n){return u(n)?n():n}function u(n){return"function"==typeof n&&n.hasOwnProperty(b)&&n.__forward_ref__===l}class _ extends Error{constructor(t,e){super(function(n,t){return`${n?`NG0${n}: `:""}${t}`}(t,e)),this.code=t}}function I(n){return"string"==typeof n?n:null==n?"":String(n)}function P(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():I(n)}function G(n,t){const e=t?` in ${t}`:"";throw new _("201",`No provider for ${P(n)} found${e}`)}function B(n,t){null==n&&function(n,t,e,r){throw new Error(`ASSERTION ERROR: ${n}`+(null==r?"":` [Expected=> ${e} ${r} ${t} <=Actual]`))}(t,n,null,"!=")}function we(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Te(n){return{providers:n.providers||[],imports:n.imports||[]}}function le(n){return X(n,xe)||X(n,ke)}function X(n,t){return n.hasOwnProperty(t)?n[t]:null}function _e(n){return n&&(n.hasOwnProperty(Ce)||n.hasOwnProperty(me))?n[Ce]:null}const xe=x({\u0275prov:x}),Ce=x({\u0275inj:x}),ke=x({ngInjectableDef:x}),me=x({ngInjectorDef:x});var Ee=(()=>((Ee=Ee||{})[Ee.Default=0]="Default",Ee[Ee.Host=1]="Host",Ee[Ee.Self=2]="Self",Ee[Ee.SkipSelf=4]="SkipSelf",Ee[Ee.Optional=8]="Optional",Ee))();let ze;function nt(n){const t=ze;return ze=n,t}function tt(n,t,e){const r=le(n);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:e&Ee.Optional?null:void 0!==t?t:void G(T(n),"Injector")}function ht(n){return{toString:n}.toString()}var wt=(()=>((wt=wt||{})[wt.OnPush=0]="OnPush",wt[wt.Default=1]="Default",wt))(),Ye=(()=>((Ye=Ye||{})[Ye.Emulated=0]="Emulated",Ye[Ye.None=2]="None",Ye[Ye.ShadowDom=3]="ShadowDom",Ye))();const gt="undefined"!=typeof globalThis&&globalThis,St="undefined"!=typeof window&&window,Wt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Nt=gt||"undefined"!=typeof global&&global||St||Wt,jt={},Yt=[],Wn=x({\u0275cmp:x}),fn=x({\u0275dir:x}),$n=x({\u0275pipe:x}),Jr=x({\u0275mod:x}),Ln=x({\u0275loc:x}),Bn=x({\u0275fac:x}),Wr=x({__NG_ELEMENT_ID__:x});let zn=0;function bn(n){return ht(()=>{const e={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===wt.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||Yt,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Ye.Emulated,id:"c",styles:n.styles||Yt,_:null,setInput:null,schemas:n.schemas||null,tView:null},s=n.directives,p=n.features,F=n.pipes;return r.id+=zn++,r.inputs=ts(n.inputs,e),r.outputs=ts(n.outputs),p&&p.forEach(z=>z(r)),r.directiveDefs=s?()=>("function"==typeof s?s():s).map(Kn):null,r.pipeDefs=F?()=>("function"==typeof F?F():F).map(sr):null,r})}function Kn(n){return Vi(n)||function(n){return n[fn]||null}(n)}function sr(n){return function(n){return n[$n]||null}(n)}const Ii={};function Un(n){return ht(()=>{const t={type:n.type,bootstrap:n.bootstrap||Yt,declarations:n.declarations||Yt,imports:n.imports||Yt,exports:n.exports||Yt,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Ii[n.id]=n.type),t})}function ts(n,t){if(null==n)return jt;const e={};for(const r in n)if(n.hasOwnProperty(r)){let s=n[r],p=s;Array.isArray(s)&&(p=s[1],s=s[0]),e[s]=r,t&&(t[s]=p)}return e}const Tn=bn;function Qn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,onDestroy:n.type.prototype.ngOnDestroy||null}}function Vi(n){return n[Wn]||null}function ki(n,t){const e=n[Jr]||null;if(!e&&!0===t)throw new Error(`Type ${T(n)} does not have '\u0275mod' property.`);return e}function Eu(n){return Array.isArray(n)&&"object"==typeof n[1]}function jo(n){return Array.isArray(n)&&!0===n[1]}function yo(n){return 0!=(8&n.flags)}function Vc(n){return 2==(2&n.flags)}function El(n){return 1==(1&n.flags)}function ec(n){return null!==n.template}function kc(n){return 0!=(512&n[2])}function po(n,t){return n.hasOwnProperty(Bn)?n[Bn]:null}class Sn{constructor(t,e,r){this.previousValue=t,this.currentValue=e,this.firstChange=r}isFirstChange(){return this.firstChange}}function rr(){return hn}function hn(n){return n.type.prototype.ngOnChanges&&(n.setInput=Ir),Cn}function Cn(){const n=Os(this),t=null==n?void 0:n.current;if(t){const e=n.previous;if(e===jt)n.previous=t;else for(let r in t)e[r]=t[r];n.current=null,this.ngOnChanges(t)}}function Ir(n,t,e,r){const s=Os(n)||function(n,t){return n[Ei]=t}(n,{previous:jt,current:null}),p=s.current||(s.current={}),F=s.previous,z=this.declaredInputs[e],te=F[z];p[z]=new Sn(te&&te.currentValue,t,F===jt),n[r]=t}rr.ngInherit=!0;const Ei="__ngSimpleChanges__";function Os(n){return n[Ei]||null}const Vo="http://www.w3.org/2000/svg";let nu;function Hu(){return void 0!==nu?nu:"undefined"!=typeof document?document:void 0}function ru(n){return!!n.listen}const Wc={createRenderer:(n,t)=>Hu()};function Ea(n){for(;Array.isArray(n);)n=n[0];return n}function xn(n,t){return Ea(t[n])}function et(n,t){return Ea(t[n.index])}function gn(n,t){return n.data[t]}function kn(n,t){return n[t]}function nr(n,t){const e=t[n];return Eu(e)?e:e[0]}function pi(n){return 4==(4&n[2])}function xi(n){return 128==(128&n[2])}function Ws(n,t){return null==t?null:n[t]}function As(n){n[18]=0}function Ni(n,t){n[5]+=t;let e=n,r=n[3];for(;null!==r&&(1===t&&1===e[5]||-1===t&&0===e[5]);)r[5]+=t,e=r,r=r[3]}const Ji={lFrame:gh(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function dl(){return Ji.bindingsEnabled}function Ki(){return Ji.lFrame.lView}function ga(){return Ji.lFrame.tView}function Ur(n){return Ji.lFrame.contextLView=n,n[8]}function ca(){let n=wf();for(;null!==n&&64===n.type;)n=n.parent;return n}function wf(){return Ji.lFrame.currentTNode}function fu(n,t){const e=Ji.lFrame;e.currentTNode=n,e.isParent=t}function ka(){return Ji.lFrame.isParent}function Dr(){Ji.lFrame.isParent=!1}function Ho(){return Ji.isInCheckNoChangesMode}function $o(n){Ji.isInCheckNoChangesMode=n}function oa(){const n=Ji.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function Bo(){return Ji.lFrame.bindingIndex}function la(){return Ji.lFrame.bindingIndex++}function tc(n){const t=Ji.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function rd(n,t){const e=Ji.lFrame;e.bindingIndex=e.bindingRootIndex=n,Nc(t)}function Nc(n){Ji.lFrame.currentDirectiveIndex=n}function Kd(n){const t=Ji.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function Fh(){return Ji.lFrame.currentQueryIndex}function hl(n){Ji.lFrame.currentQueryIndex=n}function mh(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function dd(n,t,e){if(e&Ee.SkipSelf){let s=t,p=n;for(;!(s=s.parent,null!==s||e&Ee.Host||(s=mh(p),null===s||(p=p[15],10&s.type))););if(null===s)return!1;t=s,n=p}const r=Ji.lFrame=Ff();return r.currentTNode=t,r.lView=n,!0}function Tl(n){const t=Ff(),e=n[1];Ji.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ff(){const n=Ji.lFrame,t=null===n?null:n.child;return null===t?gh(n):t}function gh(n){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function Lh(){const n=Ji.lFrame;return Ji.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Uh=Lh;function Hc(){const n=Lh();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Or(){return Ji.lFrame.selectedIndex}function Ti(n){Ji.lFrame.selectedIndex=n}function ii(){const n=Ji.lFrame;return gn(n.tView,n.selectedIndex)}function to(){Ji.lFrame.currentNamespace=Vo}function iu(){Ji.lFrame.currentNamespace=null}function Lt(n,t){for(let e=t.directiveStart,r=t.directiveEnd;e=r)break}else t[te]<0&&(n[18]+=65536),(z>11>16&&(3&n[2])===t){n[2]+=2048;try{p.call(z)}finally{}}}else try{p.call(z)}finally{}}class gi{constructor(t,e,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=r}}function vu(n,t,e){const r=ru(n);let s=0;for(;st){F=p-1;break}}}for(;p>16}(n),r=t;for(;e>0;)r=r[15],e--;return r}let Yu=!0;function pu(n){const t=Yu;return Yu=n,t}let Ad=0;function j0(n,t){const e=bh(n,t);if(-1!==e)return e;const r=t[1];r.firstCreatePass&&(n.injectorIndex=t.length,lf(r.data,n),lf(t,null),lf(r.blueprint,null));const s=Hh(n,t),p=n.injectorIndex;if(Lf(s)){const F=Uf(s),z=Mc(s,t),te=z[1].data;for(let fe=0;fe<8;fe++)t[p+fe]=z[F+fe]|te[F+fe]}return t[p+8]=s,p}function lf(n,t){n.push(0,0,0,0,0,0,0,0,t)}function bh(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Hh(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,r=null,s=t;for(;null!==s;){const p=s[1],F=p.type;if(r=2===F?p.declTNode:1===F?s[6]:null,null===r)return-1;if(e++,s=s[15],-1!==r.injectorIndex)return r.injectorIndex|e<<16}return-1}function nc(n,t,e){!function(n,t,e){let r;"string"==typeof e?r=e.charCodeAt(0)||0:e.hasOwnProperty(Wr)&&(r=e[Wr]),null==r&&(r=e[Wr]=Ad++);const s=255&r;t.data[n+(s>>5)]|=1<=0?255&t:Qs:t}(e);if("function"==typeof p){if(!dd(t,n,r))return r&Ee.Host?V0(s,e,r):v1(t,e,r,s);try{const F=p(r);if(null!=F||r&Ee.Optional)return F;G(e)}finally{Uh()}}else if("number"==typeof p){let F=null,z=bh(n,t),te=-1,fe=r&Ee.Host?t[16][6]:null;for((-1===z||r&Ee.SkipSelf)&&(te=-1===z?Hh(n,t):t[z+8],-1!==te&&ac(r,!1)?(F=t[1],z=Uf(te),t=Mc(te,t)):z=-1);-1!==z;){const Re=t[1];if(H0(p,z,Re.data)){const $e=t0(z,t,e,F,r,fe);if($e!==Zd)return $e}te=t[z+8],-1!==te&&ac(r,t[1].data[z+8]===fe)&&H0(p,z,t)?(F=Re,z=Uf(te),t=Mc(te,t)):z=-1}}}return v1(t,e,r,s)}const Zd={};function Qs(){return new Id(ca(),Ki())}function t0(n,t,e,r,s,p){const F=t[1],z=F.data[n+8],Re=jf(z,F,e,null==r?Vc(z)&&Yu:r!=F&&0!=(3&z.type),s&Ee.Host&&p===z);return null!==Re?hc(t,F,Re,z):Zd}function jf(n,t,e,r,s){const p=n.providerIndexes,F=t.data,z=1048575&p,te=n.directiveStart,Re=p>>20,rt=s?z+Re:n.directiveEnd;for(let ft=r?z:z+Re;ft=te&&Tt.type===e)return ft}if(s){const ft=F[te];if(ft&&ec(ft)&&ft.type===e)return te}return null}function hc(n,t,e,r){let s=n[e];const p=t.data;if(function(n){return n instanceof gi}(s)){const F=s;F.resolving&&function(n,t){throw new _("200",`Circular dependency in DI detected for ${n}`)}(P(p[e]));const z=pu(F.canSeeViewProviders);F.resolving=!0;const te=F.injectImpl?nt(F.injectImpl):null;dd(n,r,Ee.Default);try{s=n[e]=F.factory(void 0,p,n,r),t.firstCreatePass&&e>=r.directiveStart&&function(n,t,e){const{ngOnChanges:r,ngOnInit:s,ngDoCheck:p}=t.type.prototype;if(r){const F=hn(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,F),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,F)}s&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,s),p&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,p),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,p))}(e,p[e],t)}finally{null!==te&&nt(te),pu(z),F.resolving=!1,Uh()}}return s}function H0(n,t,e){return!!(e[t+(n>>5)]&1<{const t=n.prototype.constructor,e=t[Bn]||x0(t),r=Object.prototype;let s=Object.getPrototypeOf(n.prototype).constructor;for(;s&&s!==r;){const p=s[Bn]||x0(s);if(p&&p!==e)return p;s=Object.getPrototypeOf(s)}return p=>new p})}function x0(n){return u(n)?()=>{const t=x0(h(n));return t&&t()}:po(n)}function Sd(n){return function(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;const e=n.attrs;if(e){const r=e.length;let s=0;for(;s{const r=function(n){return function(...e){if(n){const r=n(...e);for(const s in r)this[s]=r[s]}}}(t);function s(...p){if(this instanceof s)return r.apply(this,p),this;const F=new s(...p);return z.annotation=F,z;function z(te,fe,Re){const $e=te.hasOwnProperty(Yd)?te[Yd]:Object.defineProperty(te,Yd,{value:[]})[Yd];for(;$e.length<=Re;)$e.push(null);return($e[Re]=$e[Re]||[]).push(F),te}}return e&&(s.prototype=Object.create(e.prototype)),s.prototype.ngMetadataName=n,s.annotationCls=s,s})}class fo{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=we({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const ff=new fo("AnalyzeForEntryComponents"),Tf=Function;function Od(n,t){void 0===t&&(t=n);for(let e=0;eArray.isArray(e)?ol(e,t):t(e))}function vh(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function mf(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function pl(n,t){const e=[];for(let r=0;r=0?n[1|r]=e:(r=~r,function(n,t,e,r){let s=n.length;if(s==t)n.push(e,r);else if(1===s)n.push(r,n[0]),n[0]=e;else{for(s--,n.push(n[s-1],n[s]);s>t;)n[s]=n[s-2],s--;n[t]=e,n[t+1]=r}}(n,r,t,e)),r}function Wh(n,t){const e=Nl(n,t);if(e>=0)return n[1|e]}function Nl(n,t){return function(n,t,e){let r=0,s=n.length>>e;for(;s!==r;){const p=r+(s-r>>1),F=n[p<t?s=p:r=p+1}return~(s< ");else if("object"==typeof t){let p=[];for(let F in t)if(t.hasOwnProperty(F)){let z=t[F];p.push(F+":"+("string"==typeof z?JSON.stringify(z):T(z)))}s=`{${p.join(", ")}}`}return`${e}${r?"("+r+")":""}[${s}]: ${n.replace(vp,"\n ")}`}("\n"+n.message,s,e,r),n.ngTokenPath=s,n[gd]=null,n}const l0=bd(mn("Inject",n=>({token:n})),-1),Bl=bd(mn("Optional"),8),qc=bd(mn("SkipSelf"),4);var Bd=(()=>((Bd=Bd||{})[Bd.Important=1]="Important",Bd[Bd.DashCase=2]="DashCase",Bd))();const K0="__ngContext__";function Fl(n,t){n[K0]=t}function Ja(n){const t=function(n){return n[K0]||null}(n);return t?Array.isArray(t)?t:t.lView:null}function xt(n,t){return undefined(n,t)}function In(n){const t=n[3];return jo(t)?t[3]:t}function jr(n){return Fi(n[13])}function ni(n){return Fi(n[4])}function Fi(n){for(;null!==n&&!jo(n);)n=n[4];return n}function Ci(n,t,e,r,s){if(null!=r){let p,F=!1;jo(r)?p=r:Eu(r)&&(F=!0,r=r[0]);const z=Ea(r);0===n&&null!==e?null==s?pn(t,e,z):un(t,e,z,s||null,!0):1===n&&null!==e?un(t,e,z,s||null,!0):2===n?function(n,t,e){const r=fr(n,t);r&&function(n,t,e,r){ru(n)?n.removeChild(t,e,r):t.removeChild(e)}(n,r,t,e)}(t,z,F):3===n&&t.destroyNode(z),null!=p&&function(n,t,e,r,s){const p=e[7];p!==Ea(e)&&Ci(t,n,r,p,s);for(let z=10;z0&&(n[e-1][4]=r[4]);const p=mf(n,10+t);!function(n,t){Xs(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(r[1],r);const F=p[19];null!==F&&F.detachView(p[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function Ne(n,t){if(!(256&t[2])){const e=t[11];ru(e)&&e.destroyNode&&Xs(n,t,e,3,null,null),function(n){let t=n[13];if(!t)return Ke(n[1],n);for(;t;){let e=null;if(Eu(t))e=t[13];else{const r=t[10];r&&(e=r)}if(!e){for(;t&&!t[4]&&t!==n;)Eu(t)&&Ke(t[1],t),t=t[3];null===t&&(t=n),Eu(t)&&Ke(t[1],t),e=t&&t[4]}t=e}}(t)}}function Ke(n,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let r=0;r=0?r[s=fe]():r[s=-fe].unsubscribe(),p+=2}else{const F=r[s=e[p+1]];e[p].call(F)}if(null!==r){for(let p=s+1;pn,createScript:n=>n,createScriptURL:n=>n})}catch{}return vd}())||void 0===t?void 0:t.createHTML(n))||n}function Se(n){var t;return(null===(t=function(){if(void 0===Ll&&(Ll=null,Nt.trustedTypes))try{Ll=Nt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Ll}())||void 0===t?void 0:t.createHTML(n))||n}class Qe{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class ut extends Qe{getTypeName(){return"HTML"}}class At extends Qe{getTypeName(){return"Style"}}class Zt extends Qe{getTypeName(){return"Script"}}class Jt extends Qe{getTypeName(){return"URL"}}class on extends Qe{getTypeName(){return"ResourceURL"}}function Pn(n){return n instanceof Qe?n.changingThisBreaksApplicationSecurity:n}function Xn(n,t){const e=or(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===t}function or(n){return n instanceof Qe&&n.getTypeName()||null}class vo{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Fd(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class Za{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const r=this.inertDocument.createElement("body");e.appendChild(r)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Fd(t),e;const r=this.inertDocument.createElement("body");return r.innerHTML=Fd(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(r),r}stripCustomNsAttrs(t){const e=t.attributes;for(let s=e.length-1;0Kc(t.trim())).join(", ")}function Yl(n){const t={};for(const e of n.split(","))t[e]=!0;return t}function Jl(...n){const t={};for(const e of n)for(const r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}const Is=Yl("area,br,col,hr,img,wbr"),wu=Yl("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),al=Yl("rp,rt"),p0=Jl(Is,Jl(wu,Yl("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Jl(al,Yl("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Jl(al,wu)),fi=Yl("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),gl=Yl("srcset"),qf=Jl(fi,gl,Yl("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Yl("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),ys=Yl("script,style,template");class bs{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,r=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?r=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,r&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let s=this.checkClobberedElement(e,e.nextSibling);if(s){e=s;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!p0.hasOwnProperty(e))return this.sanitizedSomething=!0,!ys.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const r=t.attributes;for(let s=0;s"),!0}endElement(t){const e=t.nodeName.toLowerCase();p0.hasOwnProperty(e)&&!Is.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(n1(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const C0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Hi=/([^\#-~ |!])/g;function n1(n){return n.replace(/&/g,"&").replace(C0,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Hi,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let _a;function ro(n,t){let e=null;try{_a=_a||function(n){const t=new Za(n);return function(){try{return!!(new window.DOMParser).parseFromString(Fd(""),"text/html")}catch{return!1}}()?new vo(t):t}(n);let r=t?String(t):"";e=_a.getInertBodyElement(r);let s=5,p=r;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,r=p,p=e.innerHTML,e=_a.getInertBodyElement(r)}while(r!==p);return Fd((new bs).sanitizeChildren(cc(e)||e))}finally{if(e){const r=cc(e)||e;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function cc(n){return"content"in n&&function(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ui=(()=>((Ui=Ui||{})[Ui.NONE=0]="NONE",Ui[Ui.HTML=1]="HTML",Ui[Ui.STYLE=2]="STYLE",Ui[Ui.SCRIPT=3]="SCRIPT",Ui[Ui.URL=4]="URL",Ui[Ui.RESOURCE_URL=5]="RESOURCE_URL",Ui))();function vr(n){const t=vt();return t?Se(t.sanitize(Ui.HTML,n)||""):Xn(n,"HTML")?Se(Pn(n)):ro(Hu(),I(n))}function Pi(n){const t=vt();return t?t.sanitize(Ui.URL,n)||"":Xn(n,"URL")?Pn(n):Kc(I(n))}function vt(){const n=Ki();return n&&n[12]}function Oo(n){return n.ngOriginalError}function uo(n,...t){n.error(...t)}class Jo{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),r=this._findContext(t),s=(n=t)&&n.ngErrorLogger||uo;var n;s(this._console,"ERROR",t),e&&s(this._console,"ORIGINAL ERROR",e),r&&s(this._console,"ERROR CONTEXT",r)}_findContext(t){return t?function(n){return n.ngDebugContext}(t)||this._findContext(Oo(t)):null}_findOriginalError(t){let e=t&&Oo(t);for(;e&&Oo(e);)e=Oo(e);return e||null}}const _d=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Nt))();function J0(n){return n instanceof Function?n():n}function ko(n,t,e){let r=n.length;for(;;){const s=n.indexOf(t,e);if(-1===s)return s;if(0===s||n.charCodeAt(s-1)<=32){const p=t.length;if(s+p===r||n.charCodeAt(s+p)<=32)return s}e=s+1}}const yl="ng-template";function Cl(n,t,e){let r=0;for(;rp?"":s[$e+1].toLowerCase();const ft=8&r?rt:null;if(ft&&-1!==ko(ft,fe,0)||2&r&&fe!==rt){if(Gi(r))return!1;F=!0}}}}else{if(!F&&!Gi(r)&&!Gi(te))return!1;if(F&&Gi(te))continue;F=!1,r=te|1&r}}return Gi(r)||F}function Gi(n){return 0==(1&n)}function Ls(n,t,e,r){if(null===t)return-1;let s=0;if(r||!e){let p=!1;for(;s-1)for(e++;e0?'="'+z+'"':"")+"]"}else 8&r?s+="."+F:4&r&&(s+=" "+F);else""!==s&&!Gi(F)&&(t+=kp(p,s),s=""),r=F,p=p||!Gi(r);e++}return""!==s&&(t+=kp(p,s)),t}const mu={};function ct(n){ju(ga(),Ki(),Or()+n,Ho())}function ju(n,t,e,r){if(!r)if(3==(3&t[2])){const p=n.preOrderCheckHooks;null!==p&&en(t,p,e)}else{const p=n.preOrderHooks;null!==p&&Dn(t,p,0,e)}Ti(e)}function Su(n,t){return n<<17|t<<2}function Ta(n){return n>>17&32767}function Ul(n){return 2|n}function Cp(n){return(131068&n)>>2}function I1(n,t){return-131069&n|t<<2}function Xh(n){return 1|n}function rg(n,t){const e=n.contentQueries;if(null!==e)for(let r=0;r20&&ju(n,t,20,Ho()),e(r,s)}finally{Ti(p)}}function zy(n,t,e){if(yo(t)){const s=t.directiveEnd;for(let p=t.directiveStart;p0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(z)!=te&&z.push(te),z.push(r,s,F)}}function ad(n,t){null!==n.hostBindings&&n.hostBindings(1,t)}function a6(n,t){t.flags|=2,(n.components||(n.components=[])).push(t.index)}function Dv(n,t,e){if(e){if(t.exportAs)for(let r=0;r0&&og(e)}}function og(n){for(let r=jr(n);null!==r;r=ni(r))for(let s=10;s0&&og(p)}const e=n[1].components;if(null!==e)for(let r=0;r0&&og(s)}}function Rv(n,t){const e=nr(t,n),r=e[1];(function(n,t){for(let e=t.length;ePromise.resolve(null))();function Um(n){return n[7]||(n[7]=[])}function Qy(n){return n.cleanup||(n.cleanup=[])}function eh(n,t){const e=n[9],r=e?e.get(Jo,null):null;r&&r.handleError(t)}function ry(n,t,e,r,s){for(let p=0;pthis.processProvider(z,t,e)),ol([t],z=>this.processInjectorType(z,[],p)),this.records.set(a1,Hm(void 0,this));const F=this.records.get(Sh);this.scope=null!=F?F.value:null,this.source=s||("object"==typeof t?null:T(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Pd,r=Ee.Default){this.assertNotDestroyed();const s=Wf(this),p=nt(void 0);try{if(!(r&Ee.SkipSelf)){let z=this.records.get(t);if(void 0===z){const te=("function"==typeof(n=t)||"object"==typeof n&&n instanceof fo)&&le(t);z=te&&this.injectableDefInScope(te)?Hm(Hl(t),jm):null,this.records.set(t,z)}if(null!=z)return this.hydrate(t,z)}return(r&Ee.Self?Vm():this.parent).get(t,e=r&Ee.Optional&&e===Pd?null:e)}catch(F){if("NullInjectorError"===F.name){if((F[gd]=F[gd]||[]).unshift(T(t)),s)throw F;return A0(F,t,"R3InjectorError",this.source)}throw F}finally{nt(p),Wf(s)}var n}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((r,s)=>t.push(T(s))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,r){if(!(t=h(t)))return!1;let s=_e(t);const p=null==s&&t.ngModule||void 0,F=void 0===p?t:p,z=-1!==r.indexOf(F);if(void 0!==p&&(s=_e(p)),null==s)return!1;if(null!=s.imports&&!z){let Re;r.push(F);try{ol(s.imports,$e=>{this.processInjectorType($e,e,r)&&(void 0===Re&&(Re=[]),Re.push($e))})}finally{}if(void 0!==Re)for(let $e=0;$ethis.processProvider(Tt,rt,ft||Yt))}}this.injectorDefTypes.add(F);const te=po(F)||(()=>new F);this.records.set(F,Hm(te,jm));const fe=s.providers;if(null!=fe&&!z){const Re=t;ol(fe,$e=>this.processProvider($e,Re,fe))}return void 0!==p&&void 0!==t.providers}processProvider(t,e,r){let s=w2(t=h(t))?t:h(t&&t.provide);const p=function(n,t,e){return lg(n)?Hm(void 0,n.useValue):Hm(cg(n),jm)}(t);if(w2(t)||!0!==t.multi)this.records.get(s);else{let F=this.records.get(s);F||(F=Hm(void 0,jm,!0),F.factory=()=>yd(F.multi),this.records.set(s,F)),s=t,F.multi.push(t)}this.records.set(s,p)}hydrate(t,e){return e.value===jm&&(e.value=_2,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value;var n}injectableDefInScope(t){if(!t.providedIn)return!1;const e=h(t.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function Hl(n){const t=le(n),e=null!==t?t.factory:po(n);if(null!==e)return e;if(n instanceof fo)throw new Error(`Token ${T(n)} is missing a \u0275prov definition.`);if(n instanceof Function)return function(n){const t=n.length;if(t>0){const r=pl(t,"?");throw new Error(`Can't resolve all parameters for ${T(n)}: (${r.join(", ")}).`)}const e=function(n){const t=n&&(n[xe]||n[ke]);if(t){const e=function(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new Error("unreachable")}function cg(n,t,e){let r;if(w2(n)){const s=h(n);return po(s)||Hl(s)}if(lg(n))r=()=>h(n.useValue);else if(function(n){return!(!n||!n.useFactory)}(n))r=()=>n.useFactory(...yd(n.deps||[]));else if(function(n){return!(!n||!n.useExisting)}(n))r=()=>Yn(h(n.useExisting));else{const s=h(n&&(n.useClass||n.provide));if(!function(n){return!!n.deps}(n))return po(s)||Hl(s);r=()=>new s(...yd(n.deps))}return r}function Hm(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function lg(n){return null!==n&&"object"==typeof n&&_p in n}function w2(n){return"function"==typeof n}const E2=function(n,t,e){return function(n,t=null,e=null,r){const s=l6(n,t,e,r);return s._resolveInjectorDefTypes(),s}({name:e},t,n,e)};let sc=(()=>{class n{static create(e,r){return Array.isArray(e)?E2(e,r,""):E2(e.providers,e.parent,e.name||"")}}return n.THROW_IF_NOT_FOUND=Pd,n.NULL=new Vl,n.\u0275prov=we({token:n,providedIn:"any",factory:()=>Yn(a1)}),n.__NG_ELEMENT_ID__=-1,n})();function g6(n,t){Lt(Ja(n)[1],ca())}function ya(n){let t=function(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),e=!0;const r=[n];for(;t;){let s;if(ec(n))s=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");s=t.\u0275dir}if(s){if(e){r.push(s);const F=n;F.inputs=A2(n.inputs),F.declaredInputs=A2(n.declaredInputs),F.outputs=A2(n.outputs);const z=s.hostBindings;z&&bg(n,z);const te=s.viewQuery,fe=s.contentQueries;if(te&&hm(n,te),fe&&ly(n,fe),f(n.inputs,s.inputs),f(n.declaredInputs,s.declaredInputs),f(n.outputs,s.outputs),ec(s)&&s.data.animation){const Re=n.data;Re.animation=(Re.animation||[]).concat(s.data.animation)}}const p=s.features;if(p)for(let F=0;F=0;r--){const s=n[r];s.hostVars=t+=s.hostVars,s.hostAttrs=sl(s.hostAttrs,e=sl(e,s.hostAttrs))}}(r)}function A2(n){return n===jt?{}:n===Yt?[]:n}function hm(n,t){const e=n.viewQuery;n.viewQuery=e?(r,s)=>{t(r,s),e(r,s)}:t}function ly(n,t){const e=n.contentQueries;n.contentQueries=e?(r,s,p)=>{t(r,s,p),e(r,s,p)}:t}function bg(n,t){const e=n.hostBindings;n.hostBindings=e?(r,s)=>{t(r,s),e(r,s)}:t}let $m=null;function Wm(){if(!$m){const n=Nt.Symbol;if(n&&n.iterator)$m=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ez(Ea(_r[r.index])):r.index;if(ru(e)){let _r=null;if(!z&&te&&(_r=function(n,t,e,r){const s=n.cleanup;if(null!=s)for(let p=0;pte?z[te]:null}"string"==typeof F&&(p+=2)}return null}(n,t,s,r.index)),null!==_r)(_r.__ngLastListenerFn__||_r).__ngNextListenerFn__=p,_r.__ngLastListenerFn__=p,ft=!1;else{p=Xv(r,t,$e,p,!1);const pr=e.listen(wn,s,p);rt.push(p,pr),Re&&Re.push(s,gr,An,An+1)}}else p=Xv(r,t,$e,p,!0),wn.addEventListener(s,p,F),rt.push(p),Re&&Re.push(s,gr,An,F)}else p=Xv(r,t,$e,p,!1);const Tt=r.outputs;let Ft;if(ft&&null!==Tt&&(Ft=Tt[s])){const Qt=Ft.length;if(Qt)for(let wn=0;wn0;)t=t[15],n--;return t}(n,Ji.lFrame.contextLView))[8]}(n)}function gy(n,t){let e=null;const r=function(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(n);for(let s=0;s=0}const Ze={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Et(n){return n.substring(Ze.key,Ze.keyEnd)}function tn(n,t){const e=Ze.textEnd;return e===t?-1:(t=Ze.keyEnd=function(n,t,e){for(;t32;)t++;return t}(n,Ze.key=t,e),Mn(n,t,e))}function Mn(n,t,e){for(;t=0;e=tn(t,e))Il(n,Et(t),!0)}function nf(n,t,e,r){const s=Ki(),p=ga(),F=tc(2);p.firstUpdatePass&&x6(p,n,F,r),t!==mu&&gf(s,F,t)&&Eg(p,p.data[Or()],s,s[11],n,s[F+1]=function(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=T(Pn(n)))),n}(t,e),r,F)}function yy(n,t){return t>=n.expandoStartIndex}function x6(n,t,e,r){const s=n.data;if(null===s[e+1]){const p=s[Or()],F=yy(n,e);n3(p,r)&&null===t&&!F&&(t=!1),t=function(n,t,e,r){const s=Kd(n);let p=r?t.residualClasses:t.residualStyles;if(null===s)0===(r?t.classBindings:t.styleBindings)&&(e=Np(e=Rp(null,n,t,e,r),t.attrs,r),p=null);else{const F=t.directiveStylingLast;if(-1===F||n[F]!==s)if(e=Rp(s,n,t,e,r),null===p){let te=function(n,t,e){const r=e?t.classBindings:t.styleBindings;if(0!==Cp(r))return n[Ta(r)]}(n,t,r);void 0!==te&&Array.isArray(te)&&(te=Rp(null,n,t,te[1],r),te=Np(te,t.attrs,r),function(n,t,e,r){n[Ta(e?t.classBindings:t.styleBindings)]=r}(n,t,r,te))}else p=function(n,t,e){let r;const s=t.directiveEnd;for(let p=1+t.directiveStylingLast;p0)&&(fe=!0)}else Re=e;if(s)if(0!==te){const rt=Ta(n[z+1]);n[r+1]=Su(rt,z),0!==rt&&(n[rt+1]=I1(n[rt+1],r)),n[z+1]=function(n,t){return 131071&n|t<<17}(n[z+1],r)}else n[r+1]=Su(z,0),0!==z&&(n[z+1]=I1(n[z+1],r)),z=r;else n[r+1]=Su(te,0),0===z?z=r:n[te+1]=I1(n[te+1],r),te=r;fe&&(n[r+1]=Ul(n[r+1])),Oe(n,Re,r,!0),Oe(n,Re,r,!1),function(n,t,e,r,s){const p=s?n.residualClasses:n.residualStyles;null!=p&&"string"==typeof t&&Nl(p,t)>=0&&(e[r+1]=Xh(e[r+1]))}(t,Re,n,r,p),F=Su(z,te),p?t.classBindings=F:t.styleBindings=F}(s,p,t,e,F,r)}}function Rp(n,t,e,r,s){let p=null;const F=e.directiveEnd;let z=e.directiveStylingLast;for(-1===z?z=e.directiveStart:z++;z0;){const te=n[s],fe=Array.isArray(te),Re=fe?te[1]:te,$e=null===Re;let rt=e[s+1];rt===mu&&(rt=$e?Yt:void 0);let ft=$e?Wh(rt,r):Re===r?rt:void 0;if(fe&&!E6(ft)&&(ft=Wh(te,r)),E6(ft)&&(z=ft,F))return z;const Tt=n[s+1];s=F?Ta(Tt):Cp(Tt)}if(null!==t){let te=p?t.residualClasses:t.residualStyles;null!=te&&(z=Wh(te,r))}return z}function E6(n){return void 0!==n}function n3(n,t){return 0!=(n.flags&(t?16:32))}function kt(n,t=""){const e=Ki(),r=ga(),s=n+20,p=r.firstCreatePass?Fm(r,s,1,t,null):r.data[s],F=e[s]=function(n,t){return ru(n)?n.createText(t):n.createTextNode(t)}(e[11],t);es(r,e,F,p),fu(p,!1)}function bc(n){return Pr("",n,""),bc}function Pr(n,t,e){const r=Ki(),s=Vd(r,n,t,e);return s!==mu&&ef(r,Or(),s),Pr}function cu(n,t,e,r,s){const p=Ki(),F=S2(p,n,t,e,r,s);return F!==mu&&ef(p,Or(),F),cu}function Lc(n,t,e,r,s,p,F){const z=Ki(),te=function(n,t,e,r,s,p,F,z){const fe=_g(n,Bo(),e,s,F);return tc(3),fe?t+I(e)+r+I(s)+p+I(F)+z:mu}(z,n,t,e,r,s,p,F);return te!==mu&&ef(z,Or(),te),Lc}function $l(n,t,e,r,s,p,F,z,te){const fe=Ki(),Re=function(n,t,e,r,s,p,F,z,te,fe){const $e=Ch(n,Bo(),e,s,F,te);return tc(4),$e?t+I(e)+r+I(s)+p+I(F)+z+I(te)+fe:mu}(fe,n,t,e,r,s,p,F,z,te);return Re!==mu&&ef(fe,Or(),Re),$l}function ip(n,t,e){const r=Ki();return gf(r,la(),t)&&X0(ga(),ii(),r,n,t,r[11],e,!0),ip}function F8(n,t,e){const r=Ki();if(gf(r,la(),t)){const p=ga(),F=ii();X0(p,F,r,n,t,function(n,t,e){return(null===n||ec(n))&&(e=function(n){for(;Array.isArray(n);){if("object"==typeof n[1])return n;n=n[0]}return null}(e[t.index])),e[11]}(Kd(p.data),F,r),e,!0)}return F8}const _b=void 0;var HI=["en",[["a","p"],["AM","PM"],_b],[["AM","PM"],_b,_b],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],_b,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],_b,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",_b,"{1} 'at' {0}",_b],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(n){const t=Math.floor(Math.abs(n)),e=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===e?1:5}];let I6={};function u3(n){return n in I6||(I6[n]=Nt.ng&&Nt.ng.common&&Nt.ng.common.locales&&Nt.ng.common.locales[n]),I6[n]}var ps=(()=>((ps=ps||{})[ps.LocaleId=0]="LocaleId",ps[ps.DayPeriodsFormat=1]="DayPeriodsFormat",ps[ps.DayPeriodsStandalone=2]="DayPeriodsStandalone",ps[ps.DaysFormat=3]="DaysFormat",ps[ps.DaysStandalone=4]="DaysStandalone",ps[ps.MonthsFormat=5]="MonthsFormat",ps[ps.MonthsStandalone=6]="MonthsStandalone",ps[ps.Eras=7]="Eras",ps[ps.FirstDayOfWeek=8]="FirstDayOfWeek",ps[ps.WeekendRange=9]="WeekendRange",ps[ps.DateFormat=10]="DateFormat",ps[ps.TimeFormat=11]="TimeFormat",ps[ps.DateTimeFormat=12]="DateTimeFormat",ps[ps.NumberSymbols=13]="NumberSymbols",ps[ps.NumberFormats=14]="NumberFormats",ps[ps.CurrencyCode=15]="CurrencyCode",ps[ps.CurrencySymbol=16]="CurrencySymbol",ps[ps.CurrencyName=17]="CurrencyName",ps[ps.Currencies=18]="Currencies",ps[ps.Directionality=19]="Directionality",ps[ps.PluralCase=20]="PluralCase",ps[ps.ExtraData=21]="ExtraData",ps))();const j8="en-US";let y4=j8;function b4(n){B(n,"Expected localeId to be defined"),"string"==typeof n&&(y4=n.toLowerCase().replace(/_/g,"-"))}function k4(n,t,e,r,s){if(n=h(n),Array.isArray(n))for(let p=0;p>20;if(w2(n)||!n.multi){const ft=new gi(te,s,Xt),Tt=M4(z,t,s?Re:Re+rt,$e);-1===Tt?(nc(j0(fe,F),p,z),C4(p,n,t.length),t.push(z),fe.directiveStart++,fe.directiveEnd++,s&&(fe.providerIndexes+=1048576),e.push(ft),F.push(ft)):(e[Tt]=ft,F[Tt]=ft)}else{const ft=M4(z,t,Re+rt,$e),Tt=M4(z,t,Re,Re+rt),Ft=ft>=0&&e[ft],Qt=Tt>=0&&e[Tt];if(s&&!Qt||!s&&!Ft){nc(j0(fe,F),p,z);const wn=function(n,t,e,r,s){const p=new gi(n,e,Xt);return p.multi=[],p.index=t,p.componentProviders=0,ox(p,s,r&&!e),p}(s?_S:vS,e.length,s,r,te);!s&&Qt&&(e[Tt].providerFactory=wn),C4(p,n,t.length,0),t.push(z),fe.directiveStart++,fe.directiveEnd++,s&&(fe.providerIndexes+=1048576),e.push(wn),F.push(wn)}else C4(p,n,ft>-1?ft:Tt,ox(e[s?Tt:ft],te,!s&&r));!s&&r&&Qt&&e[Tt].componentProviders++}}}function C4(n,t,e,r){const s=w2(t);if(s||function(n){return!!n.useClass}(t)){const F=(t.useClass||t).prototype.ngOnDestroy;if(F){const z=n.destroyHooks||(n.destroyHooks=[]);if(!s&&t.multi){const te=z.indexOf(e);-1===te?z.push(e,[r,F]):z[te+1].push(r,F)}else z.push(e,F)}}}function ox(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function M4(n,t,e,r){for(let s=e;s{e.providersResolver=(r,s)=>function(n,t,e){const r=ga();if(r.firstCreatePass){const s=ec(n);k4(e,r.data,r.blueprint,s,!0),k4(t,r.data,r.blueprint,s,!1)}}(r,s?s(n):n,t)}}class ux{}const lx="ngComponent";class xS{resolveComponentFactory(t){throw function(n){const t=Error(`No component factory found for ${T(n)}. Did you add it to @NgModule.entryComponents?`);return t[lx]=n,t}(t)}}let l1=(()=>{class n{}return n.NULL=new xS,n})();function Eb(...n){}function D6(n,t){return new wa(et(n,t))}const IS=function(){return D6(ca(),Ki())};let wa=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=IS,n})();function dx(n){return n instanceof wa?n.nativeElement:n}class Ig{}let sh=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>kS(),n})();const kS=function(){const n=Ki(),e=nr(ca().index,n);return function(n){return n[11]}(Eu(e)?e:n)};let D4=(()=>{class n{}return n.\u0275prov=we({token:n,providedIn:"root",factory:()=>null}),n})();class Sg{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const P4=new Sg("12.2.17");class fx{constructor(){}supports(t){return pm(t)}create(t){return new DS(t)}}const OS=(n,t)=>t;class DS{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||OS}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,r=this._removalsHead,s=0,p=null;for(;e||r;){const F=!r||e&&e.currentIndex{F=this._trackByFn(s,z),null!==e&&Object.is(e.trackById,F)?(r&&(e=this._verifyReinsertion(e,z,F,s)),Object.is(e.item,z)||this._addIdentityChange(e,z)):(e=this._mismatch(e,z,F,s),r=!0),e=e._next,s++}),this.length=s;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,r,s){let p;return null===t?p=this._itTail:(p=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,p,s)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(r,s))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,p,s)):t=this._addAfter(new W8(e,r),p,s),t}_verifyReinsertion(t,e,r,s){let p=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==p?t=this._reinsertAfter(p,t._prev,s):t.currentIndex!=s&&(t.currentIndex=s,this._addToMoves(t,s)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const s=t._prevRemoved,p=t._nextRemoved;return null===s?this._removalsHead=p:s._nextRemoved=p,null===p?this._removalsTail=s:p._prevRemoved=s,this._insertAfter(t,e,r),this._addToMoves(t,r),t}_moveAfter(t,e,r){return this._unlink(t),this._insertAfter(t,e,r),this._addToMoves(t,r),t}_addAfter(t,e,r){return this._insertAfter(t,e,r),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,r){const s=null===e?this._itHead:e._next;return t._next=s,t._prev=e,null===s?this._itTail=t:s._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new hx),this._linkedRecords.put(t),t.currentIndex=r,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,r=t._next;return null===e?this._itHead=r:e._next=r,null===r?this._itTail=e:r._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new hx),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class W8{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class PS{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===e||e<=r.currentIndex)&&Object.is(r.trackById,t))return r;return null}remove(t){const e=t._prevDup,r=t._nextDup;return null===e?this._head=r:e._nextDup=r,null===r?this._tail=e:r._prevDup=e,null===this._head}}class hx{constructor(){this.map=new Map}put(t){const e=t.trackById;let r=this.map.get(e);r||(r=new PS,this.map.set(e,r)),r.add(t)}get(t,e){const s=this.map.get(t);return s?s.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function px(n,t,e){const r=n.previousIndex;if(null===r)return r;let s=0;return e&&r{if(e&&e.key===s)this._maybeAddToChanges(e,r),this._appendAfter=e,e=e._next;else{const p=this._getOrCreateRecordForKey(s,r);e=this._insertBeforeOrAppend(e,p)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let r=e;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const r=t._prev;return e._next=t,e._prev=r,t._prev=e,r&&(r._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const s=this._records.get(t);this._maybeAddToChanges(s,e);const p=s._prev,F=s._next;return p&&(p._next=F),F&&(F._prev=p),s._next=null,s._prev=null,s}const r=new NS(t);return this._records.set(t,r),r.currentValue=e,this._addToAdditions(r),r}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(r=>e(t[r],r))}}class NS{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function gx(){return new Zm([new fx])}let Zm=(()=>{class n{constructor(e){this.factories=e}static create(e,r){if(null!=r){const s=r.factories.slice();e=e.concat(s)}return new n(e)}static extend(e){return{provide:n,useFactory:r=>n.create(e,r||gx()),deps:[[n,new qc,new Bl]]}}find(e){const r=this.factories.find(s=>s.supports(e));if(null!=r)return r;throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(n){return n.name||typeof n}(e)}'`)}}return n.\u0275prov=we({token:n,providedIn:"root",factory:gx}),n})();function yx(){return new P6([new mx])}let P6=(()=>{class n{constructor(e){this.factories=e}static create(e,r){if(r){const s=r.factories.slice();e=e.concat(s)}return new n(e)}static extend(e){return{provide:n,useFactory:r=>n.create(e,r||yx()),deps:[[n,new qc,new Bl]]}}find(e){const r=this.factories.find(s=>s.supports(e));if(r)return r;throw new Error(`Cannot find a differ supporting object '${e}'`)}}return n.\u0275prov=we({token:n,providedIn:"root",factory:yx}),n})();function Tb(n,t,e,r,s=!1){for(;null!==e;){const p=t[e.index];if(null!==p&&r.push(Ea(p)),jo(p))for(let z=10;z-1&&(ge(t,r),mf(e,r))}this._attachedToViewContainer=!1}Ne(this._lView[1],this._lView)}onDestroy(t){um(this._lView[1],this._lView,null,t)}markForCheck(){ty(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){s1(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(n,t,e){$o(!0);try{s1(n,t,e)}finally{$o(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,Xs(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class bx extends y3{constructor(t){super(t),this._view=t}detectChanges(){g0(this._view)}checkNoChanges(){!function(n){$o(!0);try{g0(n)}finally{$o(!1)}}(this._view)}get context(){return null}}const wx=function(n){return function(n,t,e){if(Vc(n)&&!e){const r=nr(n.index,t);return new y3(r,r)}return 47&n.type?new y3(t[16],t):null}(ca(),Ki(),16==(16&n))};let yf=(()=>{class n{}return n.__NG_ELEMENT_ID__=wx,n})();const FS=[new mx],US=new Zm([new fx]),G8=new P6(FS),jS=function(){return q8(ca(),Ki())};let Ac=(()=>{class n{}return n.__NG_ELEMENT_ID__=jS,n})();const Tx=Ac,VS=class extends Tx{constructor(t,e,r){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=r}createEmbeddedView(t){const e=this._declarationTContainer.tViews,r=Bm(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const p=this._declarationLView[19];return null!==p&&(r[19]=p.createEmbeddedView(e)),d2(e,r,t),new y3(r)}};function q8(n,t){return 4&n.type?new VS(t,n,D6(n,t)):null}class F2{}class Ax{}const WS=function(){return Sx(ca(),Ki())};let Zf=(()=>{class n{}return n.__NG_ELEMENT_ID__=WS,n})();const zS=Zf,Ix=class extends zS{constructor(t,e,r){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=r}get element(){return D6(this._hostTNode,this._hostLView)}get injector(){return new Id(this._hostTNode,this._hostLView)}get parentInjector(){const t=Hh(this._hostTNode,this._hostLView);if(Lf(t)){const e=Mc(t,this._hostLView),r=Uf(t);return new Id(e[1].data[r+8],e)}return new Id(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=_m(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,r){const s=t.createEmbeddedView(e||{});return this.insert(s,r),s}createComponent(t,e,r,s,p){const F=r||this.parentInjector;if(!p&&null==t.ngModule&&F){const te=F.get(F2,null);te&&(p=te)}const z=t.create(F,s,void 0,p);return this.insert(z.hostView,e),z}insert(t,e){const r=t._lView,s=r[1];if(jo(r[3])){const Re=this.indexOf(t);if(-1!==Re)this.detach(Re);else{const $e=r[3],rt=new Ix($e,$e[6],$e[3]);rt.detach(rt.indexOf(t))}}const p=this._adjustIndex(e),F=this._lContainer;!function(n,t,e,r){const s=10+r,p=e.length;r>0&&(e[s-1][4]=t),r_d});class Kx extends ux{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(Jb).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return z4(this.componentDef.inputs)}get outputs(){return z4(this.componentDef.outputs)}create(t,e,r,s){const p=(s=s||this.ngModule)?function(n,t){return{get:(e,r,s)=>{const p=n.get(e,F6,s);return p!==F6||r===F6?p:t.get(e,r,s)}}}(t,s.injector):t,F=p.get(Ig,Wc),z=p.get(D4,null),te=F.createRenderer(null,this.componentDef),fe=this.componentDef.selectors[0][0]||"div",Re=r?function(n,t,e){if(ru(n))return n.selectRootElement(t,e===Ye.ShadowDom);let r="string"==typeof t?n.querySelector(t):t;return r.textContent="",r}(te,r,this.componentDef.encapsulation):Ba(F.createRenderer(null,this.componentDef),fe,function(n){const t=n.toLowerCase();return"svg"===t?Vo:"math"===t?"http://www.w3.org/1998/MathML/":null}(fe)),$e=this.componentDef.onPush?576:528,rt=function(n,t){return{components:[],scheduler:n||_d,clean:ug,playerHandler:t||null,flags:0}}(),ft=h2(0,null,null,1,0,null,null,null,null,null),Tt=Bm(null,ft,rt,$e,null,null,F,te,z,p);let Ft,Qt;Tl(Tt);try{const wn=function(n,t,e,r,s,p){const F=e[1];e[20]=n;const te=Fm(F,20,2,"#host",null),fe=te.mergedAttrs=t.hostAttrs;null!==fe&&(b2(te,fe,!0),null!==n&&(vu(s,n,fe),null!==te.classes&&h0(s,n,te.classes),null!==te.styles&&sm(s,n,te.styles)));const Re=r.createRenderer(n,t),$e=Bm(e,qy(t),null,t.onPush?64:16,e[20],te,r,Re,p||null,null);return F.firstCreatePass&&(nc(j0(te,e),F,t.type),a6(F,te),c6(te,e.length,1)),ag(e,$e),e[20]=$e}(Re,this.componentDef,Tt,F,te);if(Re)if(r)vu(te,Re,["ng-version",P4.full]);else{const{attrs:An,classes:gr}=function(n){const t=[],e=[];let r=1,s=2;for(;r0&&h0(te,Re,gr.join(" "))}if(Qt=gn(ft,20),void 0!==e){const An=Qt.projection=[];for(let gr=0;grte(F,t)),t.contentQueries){const te=ca();t.contentQueries(1,F,te.directiveStart)}const z=ca();return!p.firstCreatePass||null===t.hostBindings&&null===t.hostAttrs||(Ti(z.index),Dp(e[1],z,0,z.directiveStart,z.directiveEnd,t),ad(t,F)),F}(wn,this.componentDef,Tt,rt,[g6]),d2(ft,Tt,null)}finally{Hc()}return new Mk(this.componentType,Ft,D6(Qt,Tt),Tt,Qt)}}class Mk extends class{}{constructor(t,e,r,s,p){super(),this.location=r,this._rootLView=s,this._tNode=p,this.instance=e,this.hostView=this.changeDetectorRef=new bx(s),this.componentType=t}get injector(){return new Id(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}const F0=new Map;class K4 extends F2{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new J8(this);const r=ki(t),s=t[Ln]||null;s&&b4(s),this._bootstrapComponents=J0(r.bootstrap),this._r3Injector=l6(t,e,[{provide:F2,useValue:this},{provide:l1,useValue:this.componentFactoryResolver}],T(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=sc.THROW_IF_NOT_FOUND,r=Ee.Default){return t===sc||t===F2||t===a1?this:this._r3Injector.get(t,e,r)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Z4 extends Ax{constructor(t){super(),this.moduleType=t,null!==ki(t)&&function(n){const t=new Set;!function e(r){const s=ki(r,!0),p=s.id;null!==p&&(function(n,t,e){if(t&&t!==e)throw new Error(`Duplicate module registered for ${n} - ${T(t)} vs ${T(t.name)}`)}(p,F0.get(p),r),F0.set(p,r));const F=J0(s.imports);for(const z of F)t.has(z)||(t.add(z),e(z))}(n)}(t)}create(t){return new K4(this.moduleType,t)}}function sf(n,t,e){const r=oa()+n,s=Ki();return s[r]===mu?D0(s,r,e?t.call(e):t()):mm(s,r)}function Ic(n,t,e,r){return Xx(Ki(),oa(),n,t,e,r)}function vc(n,t,e,r,s){return function(n,t,e,r,s,p,F){const z=t+e;return gm(n,z,s,p)?D0(n,z+2,F?r.call(F,s,p):r(s,p)):Sb(n,z+2)}(Ki(),oa(),n,t,e,r,s)}function Sb(n,t){const e=n[t];return e===mu?void 0:e}function Xx(n,t,e,r,s,p){const F=t+e;return gf(n,F,s)?D0(n,F+1,p?r.call(p,s):r(s)):Sb(n,F+1)}function L6(n,t){const e=ga();let r;const s=n+20;e.firstCreatePass?(r=function(n,t){if(t)for(let e=t.length-1;e>=0;e--){const r=t[e];if(n===r.name)return r}throw new _("302",`The pipe '${n}' could not be found!`)}(t,e.pipeRegistry),e.data[s]=r,r.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(s,r.onDestroy)):r=e.data[s];const p=r.factory||(r.factory=po(r.type)),F=nt(Xt);try{const z=pu(!1),te=p();return pu(z),function(n,t,e,r){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=r}(e,Ki(),s,te),te}finally{nt(F)}}function Q8(n,t,e,r,s){const p=n+20,F=Ki(),z=kn(F,p);return I3(F,A3(F,p)?function(n,t,e,r,s,p,F,z){const te=t+e;return _g(n,te,s,p,F)?D0(n,te+3,z?r.call(z,s,p,F):r(s,p,F)):Sb(n,te+3)}(F,oa(),t,z.transform,e,r,s,z):z.transform(e,r,s))}function A3(n,t){return n[1].data[t].pure}function I3(n,t){return Df.isWrapped(t)&&(t=Df.unwrap(t),n[Bo()]=mu),t}function Q4(n){return t=>{setTimeout(n,void 0,t)}}const mo=class extends ie.xQ{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,r){var s,p,F;let z=t,te=e||(()=>null),fe=r;if(t&&"object"==typeof t){const $e=t;z=null===(s=$e.next)||void 0===s?void 0:s.bind($e),te=null===(p=$e.error)||void 0===p?void 0:p.bind($e),fe=null===(F=$e.complete)||void 0===F?void 0:F.bind($e)}this.__isAsync&&(te=Q4(te),z&&(z=Q4(z)),fe&&(fe=Q4(fe)));const Re=super.subscribe({next:z,error:te,complete:fe});return t instanceof q.w&&t.add(Re),Re}};function Hk(){return this._results[Wm()]()}class e5{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Wm(),r=e5.prototype;r[e]||(r[e]=Hk)}get changes(){return this._changes||(this._changes=new mo)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const r=this;r.dirty=!1;const s=Od(t);(this._changesDetected=!function(n,t,e){if(n.length!==t.length)return!1;for(let r=0;r0)r.push(F[z/2]);else{const fe=p[z+1],Re=t[-te];for(let $e=10;$e{class n{constructor(e){this.appInits=e,this.resolve=Eb,this.reject=Eb,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,s)=>{this.resolve=r,this.reject=s})}runInitializers(){if(this.initialized)return;const e=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let s=0;s{p.subscribe({complete:z,error:te})});e.push(F)}}Promise.all(e).then(()=>{r()}).catch(s=>{this.reject(s)}),0===e.length&&r(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(Yn(t_,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const n_=new fo("AppId"),uG={provide:n_,useFactory:function(){return`${Yk()}${Yk()}${Yk()}`},deps:[]};function Yk(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const iR=new fo("Platform Initializer"),n5=new fo("Platform ID"),sR=new fo("appBootstrapListener");let o7=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const Qm=new fo("LocaleId"),oR=new fo("DefaultCurrencyCode");class lG{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Jk=function(n){return new Z4(n)},dG=Jk,fG=function(n){return Promise.resolve(Jk(n))},aR=function(n){const t=Jk(n),r=J0(ki(n).declarations).reduce((s,p)=>{const F=Vi(p);return F&&s.push(new Kx(F)),s},[]);return new lG(t,r)},hG=aR,pG=function(n){return Promise.resolve(aR(n))};let S3=(()=>{class n{constructor(){this.compileModuleSync=dG,this.compileModuleAsync=fG,this.compileModuleAndAllComponentsSync=hG,this.compileModuleAndAllComponentsAsync=pG}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const yG=(()=>Promise.resolve(0))();function Xk(n){"undefined"==typeof Zone?yG.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class pa{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new mo(!1),this.onMicrotaskEmpty=new mo(!1),this.onStable=new mo(!1),this.onError=new mo(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&e,s.shouldCoalesceRunChangeDetection=r,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function(){let n=Nt.requestAnimationFrame,t=Nt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function(n){const t=()=>{!function(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(Nt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,eC(n),n.isCheckStableRunning=!0,Qk(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),eC(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,r,s,p,F,z)=>{try{return uR(n),e.invokeTask(s,p,F,z)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===p.type||n.shouldCoalesceRunChangeDetection)&&t(),cR(n)}},onInvoke:(e,r,s,p,F,z,te)=>{try{return uR(n),e.invoke(s,p,F,z,te)}finally{n.shouldCoalesceRunChangeDetection&&t(),cR(n)}},onHasTask:(e,r,s,p)=>{e.hasTask(s,p),r===s&&("microTask"==p.change?(n._hasPendingMicrotasks=p.microTask,eC(n),Qk(n)):"macroTask"==p.change&&(n.hasPendingMacrotasks=p.macroTask))},onHandleError:(e,r,s,p)=>(e.handleError(s,p),n.runOutsideAngular(()=>n.onError.emit(p)),!1)})}(s)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!pa.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(pa.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,r){return this._inner.run(t,e,r)}runTask(t,e,r,s){const p=this._inner,F=p.scheduleEventTask("NgZoneEvent: "+s,t,vG,Eb,Eb);try{return p.runTask(F,e,r)}finally{p.cancelTask(F)}}runGuarded(t,e,r){return this._inner.runGuarded(t,e,r)}runOutsideAngular(t){return this._outer.run(t)}}const vG={};function Qk(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function eC(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function uR(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function cR(n){n._nesting--,Qk(n)}class xG{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new mo,this.onMicrotaskEmpty=new mo,this.onStable=new mo,this.onError=new mo}run(t,e,r){return t.apply(e,r)}runGuarded(t,e,r){return t.apply(e,r)}runOutsideAngular(t){return t()}runTask(t,e,r,s){return t.apply(e,r)}}let tC=(()=>{class n{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{pa.assertNotInAngularZone(),Xk(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Xk(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(e)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,r,s){let p=-1;r&&r>0&&(p=setTimeout(()=>{this._callbacks=this._callbacks.filter(F=>F.timeoutId!==p),e(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:e,timeoutId:p,updateCb:s})}whenStable(e,r,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,r,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,r,s){return[]}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),lR=(()=>{class n{constructor(){this._applications=new Map,nC.addToWindow(this)}registerApplication(e,r){this._applications.set(e,r)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,r=!0){return nC.findTestabilityInTree(this,e,r)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class EG{addToWindow(t){}findTestabilityInTree(t,e,r){return null}}let nC=new EG,dR=!0,fR=!1;function rC(){return fR=!0,dR}let kg;const hR=new fo("AllowMultipleToken");class iC{constructor(t,e){this.name=t,this.token=e}}function pR(n,t,e=[]){const r=`Platform: ${t}`,s=new fo(r);return(p=[])=>{let F=mR();if(!F||F.injector.get(hR,!1))if(n)n(e.concat(p).concat({provide:s,useValue:!0}));else{const z=e.concat(p).concat({provide:s,useValue:!0},{provide:Sh,useValue:"platform"});!function(n){if(kg&&!kg.destroyed&&!kg.injector.get(hR,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");kg=n.get(gR);const t=n.get(iR,null);t&&t.forEach(e=>e())}(sc.create({providers:z,name:r}))}return function(n){const t=mR();if(!t)throw new Error("No platform exists!");if(!t.injector.get(n,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(s)}}function mR(){return kg&&!kg.destroyed?kg:null}let gR=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,r){const z=function(n,t){let e;return e="noop"===n?new xG:("zone.js"===n?void 0:n)||new pa({enableLongStackTrace:rC(),shouldCoalesceEventChangeDetection:!!(null==t?void 0:t.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==t?void 0:t.ngZoneRunCoalescing)}),e}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),te=[{provide:pa,useValue:z}];return z.run(()=>{const fe=sc.create({providers:te,parent:this.injector,name:e.moduleType.name}),Re=e.create(fe),$e=Re.injector.get(Jo,null);if(!$e)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return z.runOutsideAngular(()=>{const rt=z.onError.subscribe({next:ft=>{$e.handleError(ft)}});Re.onDestroy(()=>{sC(this._modules,Re),rt.unsubscribe()})}),function(n,t,e){try{const r=e();return j1(r)?r.catch(s=>{throw t.runOutsideAngular(()=>n.handleError(s)),s}):r}catch(r){throw t.runOutsideAngular(()=>n.handleError(r)),r}}($e,z,()=>{const rt=Re.injector.get(t5);return rt.runInitializers(),rt.donePromise.then(()=>(b4(Re.injector.get(Qm,j8)||j8),this._moduleDoBootstrap(Re),Re))})})}bootstrapModule(e,r=[]){const s=yR({},r);return function(n,t,e){const r=new Z4(e);return Promise.resolve(r)}(0,0,e).then(p=>this.bootstrapModuleFactory(p,s))}_moduleDoBootstrap(e){const r=e.injector.get(e2);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(s=>r.bootstrap(s));else{if(!e.instance.ngDoBootstrap)throw new Error(`The module ${T(e.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);e.instance.ngDoBootstrap(r)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(Yn(sc))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function yR(n,t){return Array.isArray(t)?t.reduce(yR,n):Object.assign(Object.assign({},n),t)}let e2=(()=>{class n{constructor(e,r,s,p,F){this._zone=e,this._injector=r,this._exceptionHandler=s,this._componentFactoryResolver=p,this._initStatus=F,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const z=new O.y(fe=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{fe.next(this._stable),fe.complete()})}),te=new O.y(fe=>{let Re;this._zone.runOutsideAngular(()=>{Re=this._zone.onStable.subscribe(()=>{pa.assertNotInAngularZone(),Xk(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,fe.next(!0))})})});const $e=this._zone.onUnstable.subscribe(()=>{pa.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{fe.next(!1)}))});return()=>{Re.unsubscribe(),$e.unsubscribe()}});this.isStable=(0,E.T)(z,te.pipe((0,d.B)()))}bootstrap(e,r){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let s;s=e instanceof ux?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(s.componentType);const p=function(n){return n.isBoundToModule}(s)?void 0:this._injector.get(F2),z=s.create(sc.NULL,[],r||s.selector,p),te=z.location.nativeElement,fe=z.injector.get(tC,null),Re=fe&&z.injector.get(lR);return fe&&Re&&Re.registerApplication(te,fe),z.onDestroy(()=>{this.detachView(z.hostView),sC(this.components,z),Re&&Re.unregisterApplication(te)}),this._loadComponent(z),z}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const r=e;this._views.push(r),r.attachToAppRef(this)}detachView(e){const r=e;sC(this._views,r),r.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(sR,[]).concat(this._bootstrapListeners).forEach(s=>s(e))}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa),Yn(sc),Yn(Jo),Yn(l1),Yn(t5))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function sC(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}class u7{}class LG{}const UG={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let jG=(()=>{class n{constructor(e,r){this._compiler=e,this._config=r||UG}load(e){return this.loadAndCompile(e)}loadAndCompile(e){let[r,s]=e.split("#");return void 0===s&&(s="default"),Y(98255)(r).then(p=>p[s]).then(p=>wR(p,r,s)).then(p=>this._compiler.compileModuleAsync(p))}loadFactory(e){let[r,s]=e.split("#"),p="NgFactory";return void 0===s&&(s="default",p=""),Y(98255)(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(F=>F[s+p]).then(F=>wR(F,r,s))}}return n.\u0275fac=function(e){return new(e||n)(Yn(S3),Yn(LG,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function wR(n,t,e){if(!n)throw new Error(`Cannot find '${e}' in '${t}'`);return n}const YG=pR(null,"core",[{provide:n5,useValue:"unknown"},{provide:gR,deps:[sc]},{provide:lR,deps:[]},{provide:o7,deps:[]}]),tz=[{provide:e2,useClass:e2,deps:[pa,sc,Jo,l1,t5]},{provide:kk,deps:[pa],useFactory:function(n){let t=[];return n.onStable.subscribe(()=>{for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:t5,useClass:t5,deps:[[new Bl,t_]]},{provide:S3,useClass:S3,deps:[]},uG,{provide:Zm,useFactory:function(){return US},deps:[]},{provide:P6,useFactory:function(){return G8},deps:[]},{provide:Qm,useFactory:function(n){return b4(n=n||"undefined"!=typeof $localize&&$localize.locale||j8),n},deps:[[new l0(Qm),new Bl,new qc]]},{provide:oR,useValue:"USD"}];let rz=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(Yn(e2))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:tz}),n})(),b7=null;function Ty(){return b7}const qa=new fo("DocumentToken");let M3=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:nq,token:n,providedIn:"platform"}),n})();function nq(){return Yn(GR)}const rq=new fo("Location Initialized");let GR=(()=>{class n extends M3{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ty().getBaseHref(this._doc)}onPopState(e){const r=Ty().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",e,!1),()=>r.removeEventListener("popstate",e)}onHashChange(e){const r=Ty().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",e,!1),()=>r.removeEventListener("hashchange",e)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,r,s){zR()?this._history.pushState(e,r,s):this.location.hash=s}replaceState(e,r,s){zR()?this._history.replaceState(e,r,s):this.location.hash=s}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:iq,token:n,providedIn:"platform"}),n})();function zR(){return!!window.history.pushState}function iq(){return new GR(Yn(qa))}function _C(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function qR(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function Cb(n){return n&&"?"!==n[0]?"?"+n:n}let s5=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:sq,token:n,providedIn:"root"}),n})();function sq(n){const t=Yn(qa).location;return new KR(Yn(M3),t&&t.origin||"")}const wC=new fo("appBaseHref");let KR=(()=>{class n extends s5{constructor(e,r){if(super(),this._platformLocation=e,this._removeListenerFns=[],null==r&&(r=this._platformLocation.getBaseHrefFromDOM()),null==r)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return _C(this._baseHref,e)}path(e=!1){const r=this._platformLocation.pathname+Cb(this._platformLocation.search),s=this._platformLocation.hash;return s&&e?`${r}${s}`:r}pushState(e,r,s,p){const F=this.prepareExternalUrl(s+Cb(p));this._platformLocation.pushState(e,r,F)}replaceState(e,r,s,p){const F=this.prepareExternalUrl(s+Cb(p));this._platformLocation.replaceState(e,r,F)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var r,s;null===(s=(r=this._platformLocation).historyGo)||void 0===s||s.call(r,e)}}return n.\u0275fac=function(e){return new(e||n)(Yn(M3),Yn(wC,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),oq=(()=>{class n extends s5{constructor(e,r){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(e){const r=_C(this._baseHref,e);return r.length>0?"#"+r:r}pushState(e,r,s,p){let F=this.prepareExternalUrl(s+Cb(p));0==F.length&&(F=this._platformLocation.pathname),this._platformLocation.pushState(e,r,F)}replaceState(e,r,s,p){let F=this.prepareExternalUrl(s+Cb(p));0==F.length&&(F=this._platformLocation.pathname),this._platformLocation.replaceState(e,r,F)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var r,s;null===(s=(r=this._platformLocation).historyGo)||void 0===s||s.call(r,e)}}return n.\u0275fac=function(e){return new(e||n)(Yn(M3),Yn(wC,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),v7=(()=>{class n{constructor(e,r){this._subject=new mo,this._urlChangeListeners=[],this._platformStrategy=e;const s=this._platformStrategy.getBaseHref();this._platformLocation=r,this._baseHref=qR(ZR(s)),this._platformStrategy.onPopState(p=>{this._subject.emit({url:this.path(!0),pop:!0,state:p.state,type:p.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+Cb(r))}normalize(e){return n.stripTrailingSlash(function(n,t){return n&&t.startsWith(n)?t.substring(n.length):t}(this._baseHref,ZR(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,r="",s=null){this._platformStrategy.pushState(s,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Cb(r)),s)}replaceState(e,r="",s=null){this._platformStrategy.replaceState(s,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Cb(r)),s)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(e=0){var r,s;null===(s=(r=this._platformStrategy).historyGo)||void 0===s||s.call(r,e)}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}))}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(s=>s(e,r))}subscribe(e,r,s){return this._subject.subscribe({next:e,error:r,complete:s})}}return n.\u0275fac=function(e){return new(e||n)(Yn(s5),Yn(M3))},n.normalizeQueryParams=Cb,n.joinWithSlash=_C,n.stripTrailingSlash=qR,n.\u0275prov=we({factory:aq,token:n,providedIn:"root"}),n})();function aq(){return new v7(Yn(s5),Yn(M3))}function ZR(n){return n.replace(/\/index.html$/,"")}var ch=(()=>((ch=ch||{})[ch.Zero=0]="Zero",ch[ch.One=1]="One",ch[ch.Two=2]="Two",ch[ch.Few=3]="Few",ch[ch.Many=4]="Many",ch[ch.Other=5]="Other",ch))();const fq=function(n){return function(n){const t=function(n){return n.toLowerCase().replace(/_/g,"-")}(n);let e=u3(t);if(e)return e;const r=t.split("-")[0];if(e=u3(r),e)return e;if("en"===r)return HI;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[ps.PluralCase]};class C7{}let jq=(()=>{class n extends C7{constructor(e){super(),this.locale=e}getPluralCategory(e,r){switch(fq(r||this.locale)(e)){case ch.Zero:return"zero";case ch.One:return"one";case ch.Two:return"two";case ch.Few:return"few";case ch.Many:return"many";default:return"other"}}}return n.\u0275fac=function(e){return new(e||n)(Yn(Qm))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),dh=(()=>{class n{constructor(e,r,s,p){this._iterableDiffers=e,this._keyValueDiffers=r,this._ngEl=s,this._renderer=p,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(pm(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(r=>this._toggleClass(r.key,r.currentValue)),e.forEachChangedItem(r=>this._toggleClass(r.key,r.currentValue)),e.forEachRemovedItem(r=>{r.previousValue&&this._toggleClass(r.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(r=>{if("string"!=typeof r.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${T(r.item)}`);this._toggleClass(r.item,!0)}),e.forEachRemovedItem(r=>this._toggleClass(r.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(r=>this._toggleClass(r,!0)):Object.keys(e).forEach(r=>this._toggleClass(r,!!e[r])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(r=>this._toggleClass(r,!1)):Object.keys(e).forEach(r=>this._toggleClass(r,!1)))}_toggleClass(e,r){(e=e.trim())&&e.split(/\s+/g).forEach(s=>{r?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zm),Xt(P6),Xt(wa),Xt(sh))},n.\u0275dir=Tn({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class $q{constructor(t,e,r,s){this.$implicit=t,this.ngForOf=e,this.index=r,this.count=s}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let L0=(()=>{class n{constructor(e,r,s){this._viewContainer=e,this._template=r,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch{throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(n){return n.name||typeof n}(e)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const r=[];e.forEachOperation((s,p,F)=>{if(null==s.previousIndex){const z=this._viewContainer.createEmbeddedView(this._template,new $q(null,this._ngForOf,-1,-1),null===F?void 0:F),te=new aN(s,z);r.push(te)}else if(null==F)this._viewContainer.remove(null===p?void 0:p);else if(null!==p){const z=this._viewContainer.get(p);this._viewContainer.move(z,F);const te=new aN(s,z);r.push(te)}});for(let s=0;s{this._viewContainer.get(s.currentIndex).context.$implicit=s.item})}_perViewChange(e,r){e.context.$implicit=r.item}static ngTemplateContextGuard(e,r){return!0}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(Ac),Xt(Zm))},n.\u0275dir=Tn({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();class aN{constructor(t,e){this.record=t,this.view=e}}let La=(()=>{class n{constructor(e,r){this._viewContainer=e,this._context=new Gq,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){uN("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){uN("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,r){return!0}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class Gq{constructor(){this.$implicit=null,this.ngIf=null}}function uN(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${T(t)}'.`)}let Dg=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(e.ngTemplateOutlet){const r=this._viewContainerRef;this._viewRef&&r.remove(r.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?r.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf))},n.\u0275dir=Tn({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[rr]}),n})(),lN=(()=>{class n{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dN}transform(e,r=dN){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const s=this.differ.diff(e),p=r!==this.compareFn;return s&&(this.keyValues=[],s.forEachItem(F=>{this.keyValues.push(function(n,t){return{key:n,value:t}}(F.key,F.currentValue))})),(s||p)&&(this.keyValues.sort(r),this.compareFn=r),this.keyValues}}return n.\u0275fac=function(e){return new(e||n)(Xt(P6,16))},n.\u0275pipe=Qn({name:"keyvalue",type:n,pure:!1}),n})();function dN(n,t){const e=n.key,r=t.key;if(e===r)return 0;if(void 0===e)return 1;if(void 0===r)return-1;if(null===e)return 1;if(null===r)return-1;if("string"==typeof e&&"string"==typeof r)return e{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:[{provide:C7,useClass:jq}]}),n})();const hN="browser";let mN=(()=>{class n{}return n.\u0275prov=we({token:n,providedIn:"root",factory:()=>new yK(Yn(qa),window)}),n})();class yK{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let s=r.currentNode;for(;s;){const p=s.shadowRoot;if(p){const F=p.getElementById(t)||p.querySelector(`[name="${t}"]`);if(F)return F}s=r.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),this.attemptFocus(e))}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),r=e.left+this.window.pageXOffset,s=e.top+this.window.pageYOffset,p=this.offset();this.window.scrollTo(r-p[0],s-p[1])}attemptFocus(t){return t.focus(),this.document.activeElement===t}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=gN(this.window.history)||gN(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function gN(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class NC extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){var n;n=new NC,b7||(b7=n)}onAndCancel(t,e,r){return t.addEventListener(e,r,!1),()=>{t.removeEventListener(e,r,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=(c_=c_||document.querySelector("base"),c_?c_.getAttribute("href"):null);return null==e?null:function(n){M7=M7||document.createElement("a"),M7.setAttribute("href",n);const t=M7.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){c_=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const r=e.indexOf("="),[s,p]=-1==r?[e,""]:[e.slice(0,r),e.slice(r+1)];if(s.trim()===t)return decodeURIComponent(p)}return null}(document.cookie,t)}}let M7,c_=null;const yN=new fo("TRANSITION_ID"),TK=[{provide:t_,useFactory:function(n,t,e){return()=>{e.get(t5).donePromise.then(()=>{const r=Ty(),s=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let p=0;p{const p=t.findTestabilityInTree(r,s);if(null==p)throw new Error("Could not find testability for element.");return p},Nt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Nt.getAllAngularRootElements=()=>t.getAllRootElements(),Nt.frameworkStabilizers||(Nt.frameworkStabilizers=[]),Nt.frameworkStabilizers.push(r=>{const s=Nt.getAllAngularTestabilities();let p=s.length,F=!1;const z=function(te){F=F||te,p--,0==p&&r(F)};s.forEach(function(te){te.whenStable(z)})})}findTestabilityInTree(t,e,r){return null==e?null:t.getTestability(e)??(r?Ty().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}}let AK=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const l_=new fo("EventManagerPlugins");let D7=(()=>{class n{constructor(e,r){this._zone=r,this._eventNameToPlugin=new Map,e.forEach(s=>s.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,r,s){return this._findPluginFor(r).addEventListener(e,r,s)}addGlobalEventListener(e,r,s){return this._findPluginFor(r).addGlobalEventListener(e,r,s)}getZone(){return this._zone}_findPluginFor(e){const r=this._eventNameToPlugin.get(e);if(r)return r;const s=this._plugins;for(let p=0;p{class n{constructor(){this._stylesSet=new Set}addStyles(e){const r=new Set;e.forEach(s=>{this._stylesSet.has(s)||(this._stylesSet.add(s),r.add(s))}),this.onStylesAdded(r)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),d_=(()=>{class n extends vN{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,r,s){e.forEach(p=>{const F=this._doc.createElement("style");F.textContent=p,s.push(r.appendChild(F))})}addHost(e){const r=[];this._addStylesToHost(this._stylesSet,e,r),this._hostNodes.set(e,r)}removeHost(e){const r=this._hostNodes.get(e);r&&r.forEach(_N),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((r,s)=>{this._addStylesToHost(e,s,r)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(_N))}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function _N(n){Ty().remove(n)}const LC={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},UC=/%COMP%/g;function P7(n,t,e){for(let r=0;r{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let R7=(()=>{class n{constructor(e,r,s){this.eventManager=e,this.sharedStylesHost=r,this.appId=s,this.rendererByCompId=new Map,this.defaultRenderer=new jC(e)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;switch(r.encapsulation){case Ye.Emulated:{let s=this.rendererByCompId.get(r.id);return s||(s=new jK(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,s)),s.applyToHost(e),s}case 1:case Ye.ShadowDom:return new VK(this.eventManager,this.sharedStylesHost,e,r);default:if(!this.rendererByCompId.has(r.id)){const s=P7(r.id,r.styles,[]);this.sharedStylesHost.addStyles(s),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(Yn(D7),Yn(d_),Yn(n_))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class jC{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(LC[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,r){t&&t.insertBefore(e,r)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let r="string"==typeof t?document.querySelector(t):t;if(!r)throw new Error(`The selector "${t}" did not match any elements`);return e||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,r,s){if(s){e=s+":"+e;const p=LC[s];p?t.setAttributeNS(p,e,r):t.setAttribute(e,r)}else t.setAttribute(e,r)}removeAttribute(t,e,r){if(r){const s=LC[r];s?t.removeAttributeNS(s,e):t.removeAttribute(`${r}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,r,s){s&(Bd.DashCase|Bd.Important)?t.style.setProperty(e,r,s&Bd.Important?"important":""):t.style[e]=r}removeStyle(t,e,r){r&Bd.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,r){t[e]=r}setValue(t,e){t.nodeValue=e}listen(t,e,r){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,EN(r)):this.eventManager.addEventListener(t,e,EN(r))}}class jK extends jC{constructor(t,e,r,s){super(t),this.component=r;const p=P7(s+"-"+r.id,r.styles,[]);e.addStyles(p),this.contentAttr="_ngcontent-%COMP%".replace(UC,s+"-"+r.id),this.hostAttr=function(n){return"_nghost-%COMP%".replace(UC,n)}(s+"-"+r.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const r=super.createElement(t,e);return super.setAttribute(r,this.contentAttr,""),r}}class VK extends jC{constructor(t,e,r,s){super(t),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const p=P7(s.id,s.styles,[]);for(let F=0;F{class n extends FC{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,s){return e.addEventListener(r,s,!1),()=>this.removeEventListener(e,r,s)}removeEventListener(e,r,s){return e.removeEventListener(r,s)}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const IN=["alt","control","meta","shift"],ZK={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},SN={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},YK={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let JK=(()=>{class n extends FC{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,r,s){const p=n.parseEventName(r),F=n.eventCallback(p.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ty().onAndCancel(e,p.domEventName,F))}static parseEventName(e){const r=e.toLowerCase().split("."),s=r.shift();if(0===r.length||"keydown"!==s&&"keyup"!==s)return null;const p=n._normalizeKey(r.pop());let F="";if(IN.forEach(te=>{const fe=r.indexOf(te);fe>-1&&(r.splice(fe,1),F+=te+".")}),F+=p,0!=r.length||0===p.length)return null;const z={};return z.domEventName=s,z.fullKey=F,z}static getEventFullKey(e){let r="",s=function(n){let t=n.key;if(null==t){if(t=n.keyIdentifier,null==t)return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===n.location&&SN.hasOwnProperty(t)&&(t=SN[t]))}return ZK[t]||t}(e);return s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),IN.forEach(p=>{p!=s&&YK[p](e)&&(r+=p+".")}),r+=s,r}static eventCallback(e,r,s){return p=>{n.getEventFullKey(p)===e&&s.runGuarded(()=>r(p))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),N7=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:function(){return Yn(HC)},token:n,providedIn:"root"}),n})(),HC=(()=>{class n extends N7{constructor(e){super(),this._doc=e}sanitize(e,r){if(null==r)return null;switch(e){case Ui.NONE:return r;case Ui.HTML:return Xn(r,"HTML")?Pn(r):ro(this._doc,String(r)).toString();case Ui.STYLE:return Xn(r,"Style")?Pn(r):r;case Ui.SCRIPT:if(Xn(r,"Script"))return Pn(r);throw new Error("unsafe value used in a script context");case Ui.URL:return or(r),Xn(r,"URL")?Pn(r):Kc(String(r));case Ui.RESOURCE_URL:if(Xn(r,"ResourceURL"))return Pn(r);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${e} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(e){return function(n){return new ut(n)}(e)}bypassSecurityTrustStyle(e){return function(n){return new At(n)}(e)}bypassSecurityTrustScript(e){return function(n){return new Zt(n)}(e)}bypassSecurityTrustUrl(e){return function(n){return new Jt(n)}(e)}bypassSecurityTrustResourceUrl(e){return function(n){return new on(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return function(n){return new HC(n.get(qa))}(Yn(a1))},token:n,providedIn:"root"}),n})();const rZ=[{provide:n5,useValue:hN},{provide:iR,useValue:function(){NC.makeCurrent(),BC.init()},multi:!0},{provide:qa,useFactory:function(){return n=document,nu=n,document;var n},deps:[]}],sZ=pR(YG,"browser",rZ),oZ=[[],{provide:Sh,useValue:"root"},{provide:Jo,useFactory:function(){return new Jo},deps:[]},{provide:l_,useClass:HK,multi:!0,deps:[qa,pa,n5]},{provide:l_,useClass:JK,multi:!0,deps:[qa]},[],{provide:R7,useClass:R7,deps:[D7,d_,n_]},{provide:Ig,useExisting:R7},{provide:vN,useExisting:d_},{provide:d_,useClass:d_,deps:[qa]},{provide:tC,useClass:tC,deps:[pa]},{provide:D7,useClass:D7,deps:[l_,pa]},{provide:class{},useClass:AK,deps:[]},[]];let $C=(()=>{class n{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:n,providers:[{provide:n_,useValue:e.appId},{provide:yN,useExisting:n_},TK]}}}return n.\u0275fac=function(e){return new(e||n)(Yn(n,12))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:oZ,imports:[h1,rz]}),n})();"undefined"!=typeof window&&window;class pZ{constructor(t,e){this._document=e;const r=this._textarea=this._document.createElement("textarea"),s=r.style;s.position="fixed",s.top=s.opacity="0",s.left="-999em",r.setAttribute("aria-hidden","true"),r.value=t,this._document.body.appendChild(r)}copy(){const t=this._textarea;let e=!1;try{if(t){const r=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),e=this._document.execCommand("copy"),r&&r.focus()}}catch{}return e}destroy(){const t=this._textarea;t&&(t.parentNode&&t.parentNode.removeChild(t),this._textarea=void 0)}}let mZ=(()=>{class n{constructor(e){this._document=e}copy(e){const r=this.beginCopy(e),s=r.copy();return r.destroy(),s}beginCopy(e){return new pZ(e,this._document)}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(qa))},token:n,providedIn:"root"}),n})();const gZ=new fo("CDK_COPY_TO_CLIPBOARD_CONFIG");let CN=(()=>{class n{constructor(e,r,s){this._clipboard=e,this._ngZone=r,this.text="",this.attempts=1,this.copied=new mo,this._pending=new Set,s&&null!=s.attempts&&(this.attempts=s.attempts)}copy(e=this.attempts){if(e>1){let r=e;const s=this._clipboard.beginCopy(this.text);this._pending.add(s);const p=()=>{const F=s.copy();F||!--r||this._destroyed?(this._currentTimeout=null,this._pending.delete(s),s.destroy(),this.copied.emit(F)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(p,1))};p()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(e=>e.destroy()),this._pending.clear(),this._destroyed=!0}}return n.\u0275fac=function(e){return new(e||n)(Xt(mZ),Xt(pa),Xt(gZ,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(e,r){1&e&&dr("click",function(){return r.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),n})(),yZ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();var o5=Y(59193),bu=Y(25917),cp=Y(22759),MN=Y(46797),ON=Y(98085),xd=Y(26215),GC=Y(9112),B7=(Y(17757),Y(21571)),vZ=Y(86804),ed=Y(46782),lp=Y(45435),p1=Y(15257),ll=Y(88002),a5=Y(39761),f_=Y(87519),Rg=Y(43190),Vp=Y(68307),zC=Y(57057),DN=Y(65792),z1=Y(19773),PN=Y(13653),Tm=Y(69412);Y(35758);let mB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),RB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[mB]]}),n})(),fY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[RB]}),n})();const c5=["*"],eJ=["dialog"],tJ=["ngbNavOutlet",""];function nJ(n,t){}const rJ=function(n){return{$implicit:n}};function iJ(n,t){if(1&n&&(Ae(0,"div",2),it(1,nJ,0,0,"ng-template",3),Ie()),2&n){const e=an().$implicit,r=an();Ct("item",e)("nav",r.nav)("role",r.paneRole),ct(1),Ct("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",Ic(5,rJ,e.active||r.isPanelTransitioning(e)))}}function sJ(n,t){if(1&n&&it(0,iJ,2,7,"div",1),2&n){const e=t.$implicit,r=an();Ct("ngIf",e.isPanelInDom()||r.isPanelTransitioning(e))}}function G6(n){return null!=n}function d5(n){return(n||document.body).getBoundingClientRect()}"undefined"!=typeof Element&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(n){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(n))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});const FB={animation:!0,transitionTimerDelayMs:5};let dp=(()=>{class n{constructor(){this.animation=FB.animation}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:function(){return new n},token:n,providedIn:"root"}),n})();const fX=()=>{},{transitionTimerDelayMs:hX}=FB,b_=new Map,Ph=(n,t,e,r)=>{let s=r.context||{};const p=b_.get(t);if(p)switch(r.runningTransition){case"continue":return o5.E;case"stop":n.run(()=>p.transition$.complete()),s=Object.assign(p.context,s),b_.delete(t)}const F=e(t,r.animation,s)||fX;if(!r.animation||"none"===window.getComputedStyle(t).transitionProperty)return n.run(()=>F()),(0,bu.of)(void 0).pipe(function(n){return t=>new O.y(e=>t.subscribe(F=>n.run(()=>e.next(F)),F=>n.run(()=>e.error(F)),()=>n.run(()=>e.complete())))}(n));const z=new ie.xQ,te=new ie.xQ,fe=z.pipe((0,vZ.l)(!0));b_.set(t,{transition$:z,complete:()=>{te.next(),te.complete()},context:s});const Re=function(n){const{transitionDelay:t,transitionDuration:e}=window.getComputedStyle(n);return 1e3*(parseFloat(t)+parseFloat(e))}(t);return n.runOutsideAngular(()=>{const $e=(0,cp.R)(t,"transitionend").pipe((0,ed.R)(fe),(0,lp.h)(({target:ft})=>ft===t)),rt=(0,MN.H)(Re+hX).pipe((0,ed.R)(fe));(0,ON.S3)(rt,$e,te).pipe((0,ed.R)(fe)).subscribe(()=>{b_.delete(t),n.run(()=>{F(),z.next(),z.complete()})})}),z.asObservable()};let HB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),$B=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),GB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),KB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),ZB=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();var Dc=(()=>{return(n=Dc||(Dc={}))[n.Tab=9]="Tab",n[n.Enter=13]="Enter",n[n.Escape=27]="Escape",n[n.Space=32]="Space",n[n.PageUp=33]="PageUp",n[n.PageDown=34]="PageDown",n[n.End=35]="End",n[n.Home=36]="Home",n[n.ArrowLeft=37]="ArrowLeft",n[n.ArrowUp=38]="ArrowUp",n[n.ArrowRight=39]="ArrowRight",n[n.ArrowDown=40]="ArrowDown",Dc;var n})();const X7=(n,t)=>!!t&&t.some(e=>e.contains(n)),QB=(n,t)=>!t||null!=function(n,t){return t&&void 0!==n.closest?n.closest(t):null}(n,t),qX="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const eF=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function tF(n){const t=Array.from(n.querySelectorAll(eF)).filter(e=>-1!==e.tabIndex);return[t[0],t[t.length-1]]}const YX=/\s+/,rF=new class{getAllStyles(t){return window.getComputedStyle(t)}getStyle(t,e){return this.getAllStyles(t)[e]}isStaticPositioned(t){return"static"===(this.getStyle(t,"position")||"static")}offsetParent(t){let e=t.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(t,e=!0){let r,s={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(t,"position"))r=t.getBoundingClientRect(),r={top:r.top,bottom:r.bottom,left:r.left,right:r.right,height:r.height,width:r.width};else{const p=this.offsetParent(t);r=this.offset(t,!1),p!==document.documentElement&&(s=this.offset(p,!1)),s.top+=p.clientTop,s.left+=p.clientLeft}return r.top-=s.top,r.bottom-=s.top,r.left-=s.left,r.right-=s.left,e&&(r.top=Math.round(r.top),r.bottom=Math.round(r.bottom),r.left=Math.round(r.left),r.right=Math.round(r.right)),r}offset(t,e=!0){const r=t.getBoundingClientRect(),s_top=window.pageYOffset-document.documentElement.clientTop,s_left=window.pageXOffset-document.documentElement.clientLeft;let p={height:r.height||t.offsetHeight,width:r.width||t.offsetWidth,top:r.top+s_top,bottom:r.bottom+s_top,left:r.left+s_left,right:r.right+s_left};return e&&(p.height=Math.round(p.height),p.width=Math.round(p.width),p.top=Math.round(p.top),p.bottom=Math.round(p.bottom),p.left=Math.round(p.left),p.right=Math.round(p.right)),p}positionElements(t,e,r,s){const[p="top",F="center"]=r.split("-"),z=s?this.offset(t,!1):this.position(t,!1),te=this.getAllStyles(e),fe=parseFloat(te.marginTop),Re=parseFloat(te.marginBottom),$e=parseFloat(te.marginLeft),rt=parseFloat(te.marginRight);let ft=0,Tt=0;switch(p){case"top":ft=z.top-(e.offsetHeight+fe+Re);break;case"bottom":ft=z.top+z.height;break;case"left":Tt=z.left-(e.offsetWidth+$e+rt);break;case"right":Tt=z.left+z.width}switch(F){case"top":ft=z.top;break;case"bottom":ft=z.top+z.height-e.offsetHeight;break;case"left":Tt=z.left;break;case"right":Tt=z.left+z.width-e.offsetWidth;break;case"center":"top"===p||"bottom"===p?Tt=z.left+z.width/2-e.offsetWidth/2:ft=z.top+z.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(Tt)}px, ${Math.round(ft)}px)`;const Ft=e.getBoundingClientRect(),Qt=document.documentElement,wn=window.innerHeight||Qt.clientHeight,An=window.innerWidth||Qt.clientWidth;return Ft.left>=0&&Ft.top>=0&&Ft.right<=An&&Ft.bottom<=wn}};new Date(1882,10,12),new Date(2174,10,25);let dF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1,fY]]}),n})(),SM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Tn({type:n,selectors:[["",8,"navbar"]]}),n})(),pF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),mF=(()=>{class n{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(dp))},n.\u0275prov=we({factory:function(){return new n(Yn(dp))},token:n,providedIn:"root"}),n})();class B3{constructor(t,e,r){this.nodes=t,this.viewRef=e,this.componentRef=r}}class kM{constructor(t,e,r,s,p,F,z){this._type=t,this._injector=e,this._viewContainerRef=r,this._renderer=s,this._ngZone=p,this._componentFactoryResolver=F,this._applicationRef=z,this._windowRef=null,this._contentRef=null}open(t,e,r=!1){this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes));const{nativeElement:s}=this._windowRef.location,p=this._ngZone.onStable.pipe((0,p1.q)(1),(0,z1.zg)(()=>Ph(this._ngZone,s,({classList:F})=>F.add("show"),{animation:r,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:p}}close(t=!1){return this._windowRef?Ph(this._ngZone,this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:t,runningTransition:"stop"}).pipe((0,Vp.b)(()=>{var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),(null===(e=this._contentRef)||void 0===e?void 0:e.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):(0,bu.of)(void 0)}_getContentRef(t,e){if(t){if(t instanceof Ac){const r=t.createEmbeddedView(e);return this._applicationRef.attachView(r),new B3([r.rootNodes],r)}return new B3([[this._renderer.createText(`${t}`)]])}return new B3([])}}const lQ=()=>{};let gF=(()=>{class n{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):lQ}_adjustBody(e){const r=this._document.body,s=r.style.paddingRight,p=parseFloat(window.getComputedStyle(r)["padding-right"]);return r.style["padding-right"]=`${p+e}px`,()=>r.style["padding-right"]=s}_isPresent(e){const r=this._document.body.getBoundingClientRect();return window.innerWidth-(r.left+r.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const r=this._document.body;r.appendChild(e);const s=e.getBoundingClientRect().width-e.clientWidth;return r.removeChild(e),s}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(qa))},token:n,providedIn:"root"}),n})(),dQ=(()=>{class n{constructor(e,r){this._el=e,this._zone=r}ngOnInit(){this._zone.onStable.asObservable().pipe((0,p1.q)(1)).subscribe(()=>{Ph(this._zone,this._el.nativeElement,(e,r)=>{r&&d5(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Ph(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return n.\u0275fac=function(e){return new(e||n)(Xt(wa),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,r){2&e&&(Ss("modal-backdrop"+(r.backdropClass?" "+r.backdropClass:"")),ks("show",!r.animation)("fade",r.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,r){},encapsulation:2}),n})();class Ob{close(t){}dismiss(t){}}class fQ{constructor(t,e,r,s){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=r,this._beforeDismiss=s,this._closed=new ie.xQ,this._dismissed=new ie.xQ,this._hidden=new ie.xQ,t.instance.dismissEvent.subscribe(p=>{this.dismiss(p)}),this.result=new Promise((p,F)=>{this._resolve=p,this._reject=F}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,ed.R)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,ed.R)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(r=>{!1!==r&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,bu.of)(void 0);t.subscribe(()=>{const{nativeElement:r}=this._windowCmptRef.location;r.parentNode.removeChild(r),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:r}=this._backdropCmptRef.location;r.parentNode.removeChild(r),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,B7.$R)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var T_=(()=>{return(n=T_||(T_={}))[n.BACKDROP_CLICK=0]="BACKDROP_CLICK",n[n.ESC=1]="ESC",T_;var n})();let hQ=(()=>{class n{constructor(e,r,s){this._document=e,this._elRef=r,this._zone=s,this._closed$=new ie.xQ,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new mo,this.shown=new ie.xQ,this.hidden=new ie.xQ}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,p1.q)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,r={animation:this.animation,runningTransition:"stop"},s=Ph(this._zone,e,()=>e.classList.remove("show"),r),p=Ph(this._zone,this._dialogEl.nativeElement,()=>{},r),F=(0,B7.$R)(s,p);return F.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),F}_show(){const e={animation:this.animation,runningTransition:"continue"},r=Ph(this._zone,this._elRef.nativeElement,(p,F)=>{F&&d5(p),p.classList.add("show")},e),s=Ph(this._zone,this._dialogEl.nativeElement,()=>{},e);(0,B7.$R)(r,s).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{(0,cp.R)(e,"keydown").pipe((0,ed.R)(this._closed$),(0,lp.h)(s=>s.which===Dc.Escape)).subscribe(s=>{this.keyboard?requestAnimationFrame(()=>{s.defaultPrevented||this._zone.run(()=>this.dismiss(T_.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let r=!1;(0,cp.R)(this._dialogEl.nativeElement,"mousedown").pipe((0,ed.R)(this._closed$),(0,Vp.b)(()=>r=!1),(0,Rg.w)(()=>(0,cp.R)(e,"mouseup").pipe((0,ed.R)(this._closed$),(0,p1.q)(1))),(0,lp.h)(({target:s})=>e===s)).subscribe(()=>{r=!0}),(0,cp.R)(e,"click").pipe((0,ed.R)(this._closed$)).subscribe(({target:s})=>{e===s&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!r&&this._zone.run(()=>this.dismiss(T_.BACKDROP_CLICK))),r=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const r=e.querySelector("[ngbAutofocus]"),s=tF(e)[0];(r||s||e).focus()}}_restoreFocus(){const e=this._document.body,r=this._elWithFocus;let s;s=r&&r.focus&&e.contains(r)?r:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>s.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Ph(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return n.\u0275fac=function(e){return new(e||n)(Xt(qa),Xt(wa),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["ngb-modal-window"]],viewQuery:function(e,r){if(1&e&&Ro(eJ,7),2&e){let s;gs(s=ho())&&(r._dialogEl=s.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,r){2&e&&(Cu("aria-modal",!0)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy),Ss("modal d-block"+(r.windowClass?" "+r.windowClass:"")),ks("fade",r.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:c5,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,r){1&e&&(Pp(),Ae(0,"div",0,1),Ae(2,"div",2),ih(3),Ie(),Ie()),2&e&&Ss("modal-dialog"+(r.size?" modal-"+r.size:"")+(r.centered?" modal-dialog-centered":"")+(r.scrollable?" modal-dialog-scrollable":"")+(r.modalDialogClass?" "+r.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),n})(),yF=(()=>{class n{constructor(e,r,s,p,F,z){this._applicationRef=e,this._injector=r,this._document=s,this._scrollBar=p,this._rendererFactory=F,this._ngZone=z,this._activeWindowCmptHasChanged=new ie.xQ,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass","modalDialogClass"],this._windowCmpts=[],this._activeInstances=new mo,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const te=this._windowCmpts[this._windowCmpts.length-1];((n,t,e,r=!1)=>{n.runOutsideAngular(()=>{const s=(0,cp.R)(t,"focusin").pipe((0,ed.R)(e),(0,ll.U)(p=>p.target));(0,cp.R)(t,"keydown").pipe((0,ed.R)(e),(0,lp.h)(p=>p.which===Dc.Tab),(0,zC.M)(s)).subscribe(([p,F])=>{const[z,te]=tF(t);(F===z||F===t)&&p.shiftKey&&(te.focus(),p.preventDefault()),F===te&&!p.shiftKey&&(z.focus(),p.preventDefault())}),r&&(0,cp.R)(t,"click").pipe((0,ed.R)(e),(0,zC.M)(s),(0,ll.U)(p=>p[1])).subscribe(p=>p.focus())})})(this._ngZone,te.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(te.location.nativeElement)}})}open(e,r,s,p){const F=p.container instanceof HTMLElement?p.container:G6(p.container)?this._document.querySelector(p.container):this._document.body,z=this._rendererFactory.createRenderer(null,null),te=this._scrollBar.compensate(),fe=()=>{this._modalRefs.length||(z.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!F)throw new Error(`The specified modal container "${p.container||"body"}" was not found in the DOM.`);const Re=new Ob,$e=this._getContentRef(e,p.injector||r,s,Re,p);let rt=!1!==p.backdrop?this._attachBackdrop(e,F):void 0,ft=this._attachWindowComponent(e,F,$e),Tt=new fQ(ft,$e,rt,p.beforeDismiss);return this._registerModalRef(Tt),this._registerWindowCmpt(ft),Tt.result.then(te,te),Tt.result.then(fe,fe),Re.close=Ft=>{Tt.close(Ft)},Re.dismiss=Ft=>{Tt.dismiss(Ft)},this._applyWindowOptions(ft.instance,p),1===this._modalRefs.length&&z.addClass(this._document.body,"modal-open"),rt&&rt.instance&&(this._applyBackdropOptions(rt.instance,p),rt.changeDetectorRef.detectChanges()),ft.changeDetectorRef.detectChanges(),Tt}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(r=>r.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,r){let p=e.resolveComponentFactory(dQ).create(this._injector);return this._applicationRef.attachView(p.hostView),r.appendChild(p.location.nativeElement),p}_attachWindowComponent(e,r,s){let F=e.resolveComponentFactory(hQ).create(this._injector,s.nodes);return this._applicationRef.attachView(F.hostView),r.appendChild(F.location.nativeElement),F}_applyWindowOptions(e,r){this._windowAttributes.forEach(s=>{G6(r[s])&&(e[s]=r[s])})}_applyBackdropOptions(e,r){this._backdropAttributes.forEach(s=>{G6(r[s])&&(e[s]=r[s])})}_getContentRef(e,r,s,p,F){return s?s instanceof Ac?this._createFromTemplateRef(s,p):function(n){return"string"==typeof n}(s)?this._createFromString(s):this._createFromComponent(e,r,s,p,F):new B3([])}_createFromTemplateRef(e,r){const p=e.createEmbeddedView({$implicit:r,close(F){r.close(F)},dismiss(F){r.dismiss(F)}});return this._applicationRef.attachView(p),new B3([p.rootNodes],p)}_createFromString(e){const r=this._document.createTextNode(`${e}`);return new B3([[r]])}_createFromComponent(e,r,s,p,F){const z=e.resolveComponentFactory(s),te=sc.create({providers:[{provide:Ob,useValue:p}],parent:r}),fe=z.create(te),Re=fe.location.nativeElement;return F.scrollable&&Re.classList.add("component-host-scrollable"),this._applicationRef.attachView(fe.hostView),new B3([[Re]],fe.hostView,fe)}_setAriaHidden(e){const r=e.parentElement;r&&e!==this._document.body&&(Array.from(r.children).forEach(s=>{s!==e&&"SCRIPT"!==s.nodeName&&(this._ariaHiddenValues.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}),this._setAriaHidden(r))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,r)=>{e?r.setAttribute("aria-hidden",e):r.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const r=()=>{const s=this._modalRefs.indexOf(e);s>-1&&(this._modalRefs.splice(s,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(r,r)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const r=this._windowCmpts.indexOf(e);r>-1&&(this._windowCmpts.splice(r,1),this._activeWindowCmptHasChanged.next())})}}return n.\u0275fac=function(e){return new(e||n)(Yn(e2),Yn(sc),Yn(qa),Yn(gF),Yn(Ig),Yn(pa))},n.\u0275prov=we({factory:function(){return new n(Yn(e2),Yn(a1),Yn(qa),Yn(gF),Yn(Ig),Yn(pa))},token:n,providedIn:"root"}),n})(),Nf=(()=>{class n{constructor(e,r,s,p){this._moduleCFR=e,this._injector=r,this._modalStack=s,this._config=p}open(e,r={}){const s=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),r);return this._modalStack.open(this._moduleCFR,this._injector,e,s)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return n.\u0275fac=function(e){return new(e||n)(Yn(l1),Yn(sc),Yn(yF),Yn(mF))},n.\u0275prov=we({factory:function(){return new n(Yn(l1),Yn(a1),Yn(yF),Yn(mF))},token:n,providedIn:"root"}),n})(),bF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:[Nf]}),n})(),pQ=(()=>{class n{constructor(e){this._ngbConfig=e,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(dp))},n.\u0275prov=we({factory:function(){return new n(Yn(dp))},token:n,providedIn:"root"}),n})();const vF=n=>G6(n)&&""!==n;let mQ=0,iE=(()=>{class n{constructor(e){this.templateRef=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["ng-template","ngbNavContent",""]]}),n})(),A_=(()=>{class n{constructor(e,r){this.elementRef=r,this.disabled=!1,this.shown=new mo,this.hidden=new mo,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){G6(this.domId)||(this.domId="ngb-nav-"+mQ++)}get active(){return this._nav.activeId===this.id}get id(){return vF(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(G6(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return n.\u0275fac=function(e){return new(e||n)(Xt(l(()=>I_)),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","ngbNavItem",""]],contentQueries:function(e,r,s){if(1&e&&wo(s,iE,4),2&e){let p;gs(p=ho())&&(r.contentTpls=p)}},hostVars:2,hostBindings:function(e,r){2&e&&ks("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]}),n})(),I_=(()=>{class n{constructor(e,r,s,p){this.role=e,this._cd=s,this._document=p,this.activeIdChange=new mo,this.shown=new mo,this.hidden=new mo,this.destroy$=new ie.xQ,this.navItemChange$=new ie.xQ,this.navChange=new mo,this.animation=r.animation,this.destroyOnHide=r.destroyOnHide,this.orientation=r.orientation,this.roles=r.roles,this.keyboard=r.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const r=e.which,s=this.links.filter(z=>!z.navItem.disabled),{length:p}=s;let F=-1;if(s.forEach((z,te)=>{z.elRef.nativeElement===this._document.activeElement&&(F=te)}),p){switch(r){case Dc.ArrowLeft:if("vertical"===this.orientation)return;F=(F-1+p)%p;break;case Dc.ArrowRight:if("vertical"===this.orientation)return;F=(F+1)%p;break;case Dc.ArrowDown:if("horizontal"===this.orientation)return;F=(F+1)%p;break;case Dc.ArrowUp:if("horizontal"===this.orientation)return;F=(F-1+p)%p;break;case Dc.Home:F=0;break;case Dc.End:F=p-1}"changeWithArrows"===this.keyboard&&this.select(s[F].navItem.id),s[F].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!G6(this.activeId)){const e=this.items.first?this.items.first.id:null;vF(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe((0,ed.R)(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,r=!0){if(this.activeId!==e){let s=!1;r&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{s=!0}}),s||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(r=>r.id===e)||null}}return n.\u0275fac=function(e){return new(e||n)(Sd("role"),Xt(pQ),Xt(yf),Xt(qa))},n.\u0275dir=Tn({type:n,selectors:[["","ngbNav",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,A_,4),wo(s,sE,5)),2&e){let p;gs(p=ho())&&(r.items=p),gs(p=ho())&&(r.links=p)}},hostVars:6,hostBindings:function(e,r){1&e&&dr("keydown.arrowLeft",function(p){return r.onKeyDown(p)})("keydown.arrowRight",function(p){return r.onKeyDown(p)})("keydown.arrowDown",function(p){return r.onKeyDown(p)})("keydown.arrowUp",function(p){return r.onKeyDown(p)})("keydown.Home",function(p){return r.onKeyDown(p)})("keydown.End",function(p){return r.onKeyDown(p)}),2&e&&(Cu("aria-orientation","vertical"===r.orientation&&"tablist"===r.roles?"vertical":void 0)("role",r.role?r.role:r.roles?"tablist":void 0),ks("nav",!0)("flex-column","vertical"===r.orientation))},inputs:{animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[rr]}),n})(),sE=(()=>{class n{constructor(e,r,s,p){this.role=e,this.navItem=r,this.nav=s,this.elRef=p}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(Sd("role"),Xt(A_),Xt(I_),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,r){1&e&&dr("click",function(p){return r.nav.click(r.navItem),p.preventDefault()}),2&e&&(ip("id",r.navItem.domId),Cu("role",r.role?r.role:r.nav.roles?"tab":void 0)("tabindex",r.navItem.disabled?-1:void 0)("aria-controls",r.navItem.isPanelInDom()?r.navItem.panelDomId:null)("aria-selected",r.navItem.active)("aria-disabled",r.navItem.disabled),ks("nav-link",!0)("nav-item",r.hasNavItemClass())("active",r.navItem.active)("disabled",r.navItem.disabled))}}),n})();const gQ=({classList:n})=>(n.remove("show"),()=>n.remove("active")),yQ=(n,t)=>{t&&d5(n),n.classList.add("show")};let CM=(()=>{class n{constructor(e){this.elRef=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(e,r){2&e&&(ip("id",r.item.panelDomId),Cu("role",r.role?r.role:r.nav.roles?"tabpanel":void 0)("aria-labelledby",r.item.domId),ks("fade",r.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"}}),n})(),MM=(()=>{class n{constructor(e,r){this._cd=e,this._ngZone=r,this._activePane=null}isPanelTransitioning(e){var r;return(null===(r=this._activePane)||void 0===r?void 0:r.item)===e}ngAfterViewInit(){var e;this._updateActivePane(),this.nav.navItemChange$.pipe((0,ed.R)(this.nav.destroy$),(0,a5.O)((null===(e=this._activePane)||void 0===e?void 0:e.item)||null),(0,f_.x)(),(0,PN.T)(1)).subscribe(r=>{const s={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Ph(this._ngZone,this._activePane.elRef.nativeElement,gQ,s).subscribe(()=>{var p;const F=null===(p=this._activePane)||void 0===p?void 0:p.item;this._activePane=this._getPaneForItem(r),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),Ph(this._ngZone,this._activePane.elRef.nativeElement,yQ,s).subscribe(()=>{r&&(r.shown.emit(),this.nav.shown.emit(r.id))})),F&&(F.hidden.emit(),this.nav.hidden.emit(F.id))}):this._updateActivePane()})}_updateActivePane(){var e,r;this._activePane=this._getActivePane(),null===(e=this._activePane)||void 0===e||e.elRef.nativeElement.classList.add("show"),null===(r=this._activePane)||void 0===r||r.elRef.nativeElement.classList.add("active")}_getPaneForItem(e){return this._panes&&this._panes.find(r=>r.item===e)||null}_getActivePane(){return this._panes&&this._panes.find(e=>e.item.active)||null}}return n.\u0275fac=function(e){return new(e||n)(Xt(yf),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["","ngbNavOutlet",""]],viewQuery:function(e,r){if(1&e&&Ro(CM,5),2&e){let s;gs(s=ho())&&(r._panes=s)}},hostVars:2,hostBindings:function(e,r){2&e&&ks("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},attrs:tJ,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["ngbNavPane","",3,"item","nav","role",4,"ngIf"],["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,r){1&e&&it(0,sJ,1,1,"ng-template",0),2&e&&Ct("ngForOf",r.nav.items)},directives:[L0,La,CM,Dg],encapsulation:2,changeDetection:0}),n})(),_F=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),kF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})();class _Q{constructor(t,e){this.open=t,this.close=e,e||(this.close=t)}isManual(){return"manual"===this.open||"manual"===this.close}}const wQ={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},CF=n=>n>0?(0,DN.g)(n):t=>t;let OF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),DF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),PF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),FF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),LF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),jQ=(()=>{class n{constructor(e){this._ngbConfig=e,this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(dp))},n.\u0275prov=we({factory:function(){return new n(Yn(dp))},token:n,providedIn:"root"}),n})(),VQ=0,HQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,r){2&e&&(ip("id",r.id),Ss("tooltip"+(r.tooltipClass?" "+r.tooltipClass:"")),ks("fade",r.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:c5,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,r){1&e&&(Pp(),Gn(0,"div",0),Ae(1,"div",1),ih(2),Ie())},styles:["ngb-tooltip-window{pointer-events:none}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{top:auto;bottom:.4rem}"],encapsulation:2,changeDetection:0}),n})(),OM=(()=>{class n{constructor(e,r,s,p,F,z,te,fe,Re,$e){this._elementRef=e,this._renderer=r,this._ngZone=te,this._document=fe,this._changeDetector=Re,this.shown=new mo,this.hidden=new mo,this._ngbTooltipWindowId="ngb-tooltip-"+VQ++,this._windowRef=null,this.animation=z.animation,this.autoClose=z.autoClose,this.placement=z.placement,this.triggers=z.triggers,this.container=z.container,this.disableTooltip=z.disableTooltip,this.tooltipClass=z.tooltipClass,this.openDelay=z.openDelay,this.closeDelay=z.closeDelay,this._popupService=new kM(HQ,s,F,r,this._ngZone,p,$e),this._zoneSubscription=te.onStable.subscribe(()=>{this._windowRef&&function(n,t,e,r,s){let p=Array.isArray(e)?e:e.split(YX);const F=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],z=t.classList,te=ft=>{const[Tt,Ft]=ft.split("-"),Qt=[];return s&&(Qt.push(`${s}-${Tt}`),Ft&&Qt.push(`${s}-${Tt}-${Ft}`),Qt.forEach(wn=>{z.add(wn)})),Qt};s&&F.forEach(ft=>{z.remove(`${s}-${ft}`)});let fe=p.findIndex(ft=>"auto"===ft);fe>=0&&F.forEach(function(ft){null==p.find(Tt=>-1!==Tt.search("^"+ft))&&p.splice(fe++,1,ft)});const Re=t.style;Re.position="absolute",Re.top="0",Re.left="0",Re["will-change"]="transform";let $e=null,rt=!1;for($e of p){let ft=te($e);if(rF.positionElements(n,t,$e,r)){rt=!0;break}s&&ft.forEach(Tt=>{z.remove(Tt)})}rt||($e=p[0],te($e),rF.positionElements(n,t,$e,r))}(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:r,transition$:s}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=r,this._windowRef.instance.animation=this.animation,this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),function(n,t,e,r,s,p,F,z){e&&n.runOutsideAngular((n=>qX?()=>setTimeout(()=>n(),100):n)(()=>{const fe=(0,cp.R)(t,"keydown").pipe((0,ed.R)(s),(0,lp.h)(rt=>rt.which===Dc.Escape),(0,Vp.b)(rt=>rt.preventDefault())),Re=(0,cp.R)(t,"mousedown").pipe((0,ll.U)(rt=>{const ft=rt.target;return 2!==rt.button&&!X7(ft,F)&&("inside"===e?X7(ft,p)&&QB(ft,z):"outside"===e?!X7(ft,p):QB(ft,z)||!X7(ft,p))}),(0,ed.R)(s)),$e=(0,cp.R)(t,"mouseup").pipe((0,zC.M)(Re),(0,lp.h)(([rt,ft])=>ft),(0,DN.g)(0),(0,ed.R)(s));(0,ON.S3)([fe.pipe((0,ll.U)(rt=>0)),$e.pipe((0,ll.U)(rt=>1))]).subscribe(rt=>n.run(()=>r(rt)))}))}(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),s.subscribe(()=>this.shown.emit())}}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(this.animation).subscribe(()=>{this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function(n,t,e,r,s,p,F=0,z=0){const te=function(n,t=wQ){const e=(n||"").trim();if(0===e.length)return[];const r=e.split(/\s+/).map(p=>p.split(":")).map(p=>{let F=t[p[0]]||p;return new _Q(F[0],F[1])}),s=r.filter(p=>p.isManual());if(s.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===s.length&&r.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return r}(e);if(1===te.length&&te[0].isManual())return()=>{};const fe=function(n,t,e,r){return new O.y(s=>{const p=[],F=()=>s.next(!0),z=()=>s.next(!1),te=()=>s.next(!r());return e.forEach(fe=>{fe.open===fe.close?p.push(n.listen(t,fe.open,te)):p.push(n.listen(t,fe.open,F),n.listen(t,fe.close,z))}),()=>{p.forEach(fe=>fe())}})}(n,t,te,r).pipe(function(n,t,e){return r=>{let s=null;const p=r.pipe((0,ll.U)(te=>({open:te})),(0,lp.h)(te=>{const fe=e();return fe===te.open||s&&s.open!==fe?(s&&s.open!==te.open&&(s=null),!1):(s=te,!0)}),(0,d.B)()),F=p.pipe((0,lp.h)(te=>te.open),CF(n)),z=p.pipe((0,lp.h)(te=>!te.open),CF(t));return(0,E.T)(F,z).pipe((0,lp.h)(te=>te===s&&(s=null,te.open!==e())),(0,ll.U)(te=>te.open))}}(F,z,r)).subscribe(Re=>Re?s():p());return()=>fe.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(Xt(wa),Xt(sh),Xt(sc),Xt(l1),Xt(Zf),Xt(jQ),Xt(pa),Xt(qa),Xt(yf),Xt(e2))},n.\u0275dir=Tn({type:n,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[rr]}),n})(),UF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();new fo("live announcer delay",{providedIn:"root",factory:function(){return 100}});let HF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})();const ZQ=[HB,$B,GB,KB,ZB,dF,pF,bF,_F,kF,OF,DF,PF,FF,LF,UF,HF];let YQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[ZQ,HB,$B,GB,KB,ZB,dF,pF,bF,_F,kF,OF,DF,PF,FF,LF,UF,HF]}),n})();class $F{}const Db="*";function F3(n,t){return{type:7,name:n,definitions:t,options:{}}}function Bg(n,t=null){return{type:4,styles:t,timings:n}}function WF(n,t=null){return{type:2,steps:n,options:t}}function vf(n){return{type:6,styles:n,offset:null}}function K1(n,t,e){return{type:0,name:n,styles:t,options:e}}function oE(n){return{type:5,steps:n}}function V2(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function XQ(n=null){return{type:9,options:n}}function QQ(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function GF(n){Promise.resolve(null).then(n)}class m5{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){GF(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}}class zF{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,r=0,s=0;const p=this.players.length;0==p?GF(()=>this._onFinish()):this.players.forEach(F=>{F.onDone(()=>{++e==p&&this._onFinish()}),F.onDestroy(()=>{++r==p&&this._onDestroy()}),F.onStart(()=>{++s==p&&this._onStart()})}),this.totalTime=this.players.reduce((F,z)=>Math.max(F,z.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(r=>{const s=r.totalTime?Math.min(1,e/r.totalTime):1;r.setPosition(s)})}getPosition(){const t=this.players.reduce((e,r)=>null===e||r.totalTime>e.totalTime?r:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}}function qF(){return"undefined"!=typeof window&&void 0!==window.document}function PM(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function q6(n){switch(n.length){case 0:return new m5;case 1:return n[0];default:return new zF(n)}}function KF(n,t,e,r,s={},p={}){const F=[],z=[];let te=-1,fe=null;if(r.forEach(Re=>{const $e=Re.offset,rt=$e==te,ft=rt&&fe||{};Object.keys(Re).forEach(Tt=>{let Ft=Tt,Qt=Re[Tt];if("offset"!==Tt)switch(Ft=t.normalizePropertyName(Ft,F),Qt){case"!":Qt=s[Tt];break;case Db:Qt=p[Tt];break;default:Qt=t.normalizeStyleValue(Tt,Ft,Qt,F)}ft[Ft]=Qt}),rt||z.push(ft),fe=ft,te=$e}),F.length){const Re="\n - ";throw new Error(`Unable to animate due to the following errors:${Re}${F.join(Re)}`)}return z}function RM(n,t,e,r){switch(t){case"start":n.onStart(()=>r(e&&NM(e,"start",n)));break;case"done":n.onDone(()=>r(e&&NM(e,"done",n)));break;case"destroy":n.onDestroy(()=>r(e&&NM(e,"destroy",n)))}}function NM(n,t,e){const p=BM(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),F=n._data;return null!=F&&(p._data=F),p}function BM(n,t,e,r,s="",p=0,F){return{element:n,triggerName:t,fromState:e,toState:r,phaseName:s,totalTime:p,disabled:!!F}}function t2(n,t,e){let r;return n instanceof Map?(r=n.get(t),r||n.set(t,r=e)):(r=n[t],r||(r=n[t]=e)),r}function ZF(n){const t=n.indexOf(":");return[n.substring(1,t),n.substr(t+1)]}let FM=(n,t)=>!1,LM=(n,t)=>!1,YF=(n,t,e)=>[];const JF=PM();(JF||"undefined"!=typeof Element)&&(FM=qF()?(n,t)=>{for(;t&&t!==document.documentElement;){if(t===n)return!0;t=t.parentNode||t.host}return!1}:(n,t)=>n.contains(t),LM=(()=>{if(JF||Element.prototype.matches)return(n,t)=>n.matches(t);{const n=Element.prototype,t=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector;return t?(e,r)=>t.apply(e,[r]):LM}})(),YF=(n,t,e)=>{let r=[];if(e){const s=n.querySelectorAll(t);for(let p=0;p{const r=e.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=n[e]}),t}let eL=(()=>{class n{validateStyleProperty(e){return UM(e)}matchesElement(e,r){return jM(e,r)}containsElement(e,r){return VM(e,r)}query(e,r,s){return HM(e,r,s)}computeStyle(e,r,s){return s||""}animate(e,r,s,p,F,z=[],te){return new m5(s,p)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),$M=(()=>{class n{}return n.NOOP=new eL,n})();const WM="ng-enter",aE="ng-leave",uE="ng-trigger",cE=".ng-trigger",nL="ng-animating",GM=".ng-animating";function U3(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:zM(parseFloat(t[1]),t[2])}function zM(n,t){return"s"===t?1e3*n:n}function lE(n,t,e){return n.hasOwnProperty("duration")?n:function(n,t,e){let s,p=0,F="";if("string"==typeof n){const z=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===z)return t.push(`The provided timing value "${n}" is invalid.`),{duration:0,delay:0,easing:""};s=zM(parseFloat(z[1]),z[2]);const te=z[3];null!=te&&(p=zM(parseFloat(te),z[4]));const fe=z[5];fe&&(F=fe)}else s=n;if(!e){let z=!1,te=t.length;s<0&&(t.push("Duration values below 0 are not allowed for this animation step."),z=!0),p<0&&(t.push("Delay values below 0 are not allowed for this animation step."),z=!0),z&&t.splice(te,0,`The provided timing value "${n}" is invalid.`)}return{duration:s,delay:p,easing:F}}(n,t,e)}function g5(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function K6(n,t,e={}){if(t)for(let r in n)e[r]=n[r];else g5(n,e);return e}function iL(n,t,e){return e?t+":"+e+";":""}function sL(n){let t="";for(let e=0;e{const s=KM(r);e&&!e.hasOwnProperty(r)&&(e[r]=n.style[s]),n.style[s]=t[r]}),PM()&&sL(n))}function j3(n,t){n.style&&(Object.keys(t).forEach(e=>{const r=KM(e);n.style[r]=""}),PM()&&sL(n))}function S_(n){return Array.isArray(n)?1==n.length?n[0]:WF(n):n}const qM=new RegExp("{{\\s*(.+?)\\s*}}","g");function oL(n){let t=[];if("string"==typeof n){let e;for(;e=qM.exec(n);)t.push(e[1]);qM.lastIndex=0}return t}function dE(n,t,e){const r=n.toString(),s=r.replace(qM,(p,F)=>{let z=t[F];return t.hasOwnProperty(F)||(e.push(`Please provide a value for the animation param ${F}`),z=""),z.toString()});return s==r?n:s}function fE(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const oee=/-+([a-z0-9])/g;function KM(n){return n.replace(oee,(...t)=>t[1].toUpperCase())}function aee(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function aL(n,t){return 0===n||0===t}function uL(n,t,e){const r=Object.keys(e);if(r.length&&t.length){let p=t[0],F=[];if(r.forEach(z=>{p.hasOwnProperty(z)||F.push(z),p[z]=e[z]}),F.length)for(var s=1;sfunction(n,t,e){if(":"==n[0]){const te=function(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,r)=>parseFloat(r)>parseFloat(e);case":decrement":return(e,r)=>parseFloat(r) *"}}(n,e);if("function"==typeof te)return void t.push(te);n=te}const r=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return e.push(`The provided transition expression "${n}" is not supported`),t;const s=r[1],p=r[2],F=r[3];t.push(cL(s,F));"<"==p[0]&&!("*"==s&&"*"==F)&&t.push(cL(F,s))}(r,e,t)):e.push(n),e}const pE=new Set(["true","1"]),mE=new Set(["false","0"]);function cL(n,t){const e=pE.has(n)||mE.has(n),r=pE.has(t)||mE.has(t);return(s,p)=>{let F="*"==n||n==s,z="*"==t||t==p;return!F&&e&&"boolean"==typeof s&&(F=s?pE.has(n):mE.has(n)),!z&&r&&"boolean"==typeof p&&(z=p?pE.has(t):mE.has(t)),F&&z}}const dee=new RegExp("s*:selfs*,?","g");function YM(n,t,e){return new fee(n).build(t,e)}class fee{constructor(t){this._driver=t}build(t,e){const r=new mee(e);return this._resetContextStyleTimingState(r),n2(this,S_(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let r=e.queryCount=0,s=e.depCount=0;const p=[],F=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(z=>{if(this._resetContextStyleTimingState(e),0==z.type){const te=z,fe=te.name;fe.toString().split(/\s*,\s*/).forEach(Re=>{te.name=Re,p.push(this.visitState(te,e))}),te.name=fe}else if(1==z.type){const te=this.visitTransition(z,e);r+=te.queryCount,s+=te.depCount,F.push(te)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:p,transitions:F,queryCount:r,depCount:s,options:null}}visitState(t,e){const r=this.visitStyle(t.styles,e),s=t.options&&t.options.params||null;if(r.containsDynamicStyles){const p=new Set,F=s||{};if(r.styles.forEach(z=>{if(gE(z)){const te=z;Object.keys(te).forEach(fe=>{oL(te[fe]).forEach(Re=>{F.hasOwnProperty(Re)||p.add(Re)})})}}),p.size){const z=fE(p.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${z.join(", ")}`)}}return{type:0,name:t.name,style:r,options:s?{params:s}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const r=n2(this,S_(t.animation),e);return{type:1,matchers:uee(t.expr,e.errors),animation:r,queryCount:e.queryCount,depCount:e.depCount,options:V3(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(r=>n2(this,r,e)),options:V3(t.options)}}visitGroup(t,e){const r=e.currentTime;let s=0;const p=t.steps.map(F=>{e.currentTime=r;const z=n2(this,F,e);return s=Math.max(s,e.currentTime),z});return e.currentTime=s,{type:3,steps:p,options:V3(t.options)}}visitAnimate(t,e){const r=function(n,t){let e=null;if(n.hasOwnProperty("duration"))e=n;else if("number"==typeof n)return JM(lE(n,t).duration,0,"");const r=n;if(r.split(/\s+/).some(p=>"{"==p.charAt(0)&&"{"==p.charAt(1))){const p=JM(0,0,"");return p.dynamic=!0,p.strValue=r,p}return e=e||lE(r,t),JM(e.duration,e.delay,e.easing)}(t.timings,e.errors);e.currentAnimateTimings=r;let s,p=t.styles?t.styles:vf({});if(5==p.type)s=this.visitKeyframes(p,e);else{let F=t.styles,z=!1;if(!F){z=!0;const fe={};r.easing&&(fe.easing=r.easing),F=vf(fe)}e.currentTime+=r.duration+r.delay;const te=this.visitStyle(F,e);te.isEmptyStep=z,s=te}return e.currentAnimateTimings=null,{type:4,timings:r,style:s,options:null}}visitStyle(t,e){const r=this._makeStyleAst(t,e);return this._validateStyleAst(r,e),r}_makeStyleAst(t,e){const r=[];Array.isArray(t.styles)?t.styles.forEach(F=>{"string"==typeof F?F==Db?r.push(F):e.errors.push(`The provided style string value ${F} is not allowed.`):r.push(F)}):r.push(t.styles);let s=!1,p=null;return r.forEach(F=>{if(gE(F)){const z=F,te=z.easing;if(te&&(p=te,delete z.easing),!s)for(let fe in z)if(z[fe].toString().indexOf("{{")>=0){s=!0;break}}}),{type:6,styles:r,easing:p,offset:t.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(t,e){const r=e.currentAnimateTimings;let s=e.currentTime,p=e.currentTime;r&&p>0&&(p-=r.duration+r.delay),t.styles.forEach(F=>{"string"!=typeof F&&Object.keys(F).forEach(z=>{if(!this._driver.validateStyleProperty(z))return void e.errors.push(`The provided animation property "${z}" is not a supported CSS property for animations`);const te=e.collectedStyles[e.currentQuerySelector],fe=te[z];let Re=!0;fe&&(p!=s&&p>=fe.startTime&&s<=fe.endTime&&(e.errors.push(`The CSS property "${z}" that exists between the times of "${fe.startTime}ms" and "${fe.endTime}ms" is also being animated in a parallel animation between the times of "${p}ms" and "${s}ms"`),Re=!1),p=fe.startTime),Re&&(te[z]={startTime:p,endTime:s}),e.options&&function(n,t,e){const r=t.params||{},s=oL(n);s.length&&s.forEach(p=>{r.hasOwnProperty(p)||e.push(`Unable to resolve the local animation param ${p} in the given list of values`)})}(F[z],e.options,e.errors)})})}visitKeyframes(t,e){const r={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),r;let p=0;const F=[];let z=!1,te=!1,fe=0;const Re=t.steps.map(wn=>{const An=this._makeStyleAst(wn,e);let gr=null!=An.offset?An.offset:function(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(gE(e)&&e.hasOwnProperty("offset")){const r=e;t=parseFloat(r.offset),delete r.offset}});else if(gE(n)&&n.hasOwnProperty("offset")){const e=n;t=parseFloat(e.offset),delete e.offset}return t}(An.styles),_r=0;return null!=gr&&(p++,_r=An.offset=gr),te=te||_r<0||_r>1,z=z||_r0&&p<$e?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==p&&(rt=1/($e-1));const ft=$e-1,Tt=e.currentTime,Ft=e.currentAnimateTimings,Qt=Ft.duration;return Re.forEach((wn,An)=>{const gr=rt>0?An==ft?1:rt*An:F[An],_r=gr*Qt;e.currentTime=Tt+Ft.delay+_r,Ft.duration=_r,this._validateStyleAst(wn,e),wn.offset=gr,r.styles.push(wn)}),r}visitReference(t,e){return{type:8,animation:n2(this,S_(t.animation),e),options:V3(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:V3(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:V3(t.options)}}visitQuery(t,e){const r=e.currentQuerySelector,s=t.options||{};e.queryCount++,e.currentQuery=t;const[p,F]=function(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(dee,"")),n=n.replace(/@\*/g,cE).replace(/@\w+/g,e=>cE+"-"+e.substr(1)).replace(/:animating/g,GM),[n,t]}(t.selector);e.currentQuerySelector=r.length?r+" "+p:p,t2(e.collectedStyles,e.currentQuerySelector,{});const z=n2(this,S_(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=r,{type:11,selector:p,limit:s.limit||0,optional:!!s.optional,includeSelf:F,animation:z,originalSelector:t.selector,options:V3(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const r="full"===t.timings?{duration:0,delay:0,easing:"full"}:lE(t.timings,e.errors,!0);return{type:12,animation:n2(this,S_(t.animation),e),timings:r,options:null}}}class mee{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function gE(n){return!Array.isArray(n)&&"object"==typeof n}function V3(n){return n?(n=g5(n)).params&&(n.params=function(n){return n?g5(n):null}(n.params)):n={},n}function JM(n,t,e){return{duration:n,delay:t,easing:e}}function XM(n,t,e,r,s,p,F=null,z=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:r,duration:s,delay:p,totalTime:s+p,easing:F,subTimeline:z}}class yE{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let r=this._map.get(t);r||this._map.set(t,r=[]),r.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const _ee=new RegExp(":enter","g"),xee=new RegExp(":leave","g");function QM(n,t,e,r,s,p={},F={},z,te,fe=[]){return(new Eee).buildKeyframes(n,t,e,r,s,p,F,z,te,fe)}class Eee{buildKeyframes(t,e,r,s,p,F,z,te,fe,Re=[]){fe=fe||new yE;const $e=new eO(t,e,fe,s,p,Re,[]);$e.options=te,$e.currentTimeline.setStyles([F],null,$e.errors,te),n2(this,r,$e);const rt=$e.timelines.filter(ft=>ft.containsAnimation());if(rt.length&&Object.keys(z).length){const ft=rt[rt.length-1];ft.allowOnlyTimelineStyles()||ft.setStyles([z],null,$e.errors,te)}return rt.length?rt.map(ft=>ft.buildKeyframes()):[XM(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const r=e.subInstructions.consume(e.element);if(r){const s=e.createSubContext(t.options),p=e.currentTimeline.currentTime,F=this._visitSubInstructions(r,s,s.options);p!=F&&e.transformIntoNewTimeline(F)}e.previousNode=t}visitAnimateRef(t,e){const r=e.createSubContext(t.options);r.transformIntoNewTimeline(),this.visitReference(t.animation,r),e.transformIntoNewTimeline(r.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,r){let p=e.currentTimeline.currentTime;const F=null!=r.duration?U3(r.duration):null,z=null!=r.delay?U3(r.delay):null;return 0!==F&&t.forEach(te=>{const fe=e.appendInstructionToTimeline(te,F,z);p=Math.max(p,fe.duration+fe.delay)}),p}visitReference(t,e){e.updateOptions(t.options,!0),n2(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const r=e.subContextCount;let s=e;const p=t.options;if(p&&(p.params||p.delay)&&(s=e.createSubContext(p),s.transformIntoNewTimeline(),null!=p.delay)){6==s.previousNode.type&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=bE);const F=U3(p.delay);s.delayNextStep(F)}t.steps.length&&(t.steps.forEach(F=>n2(this,F,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>r&&s.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const r=[];let s=e.currentTimeline.currentTime;const p=t.options&&t.options.delay?U3(t.options.delay):0;t.steps.forEach(F=>{const z=e.createSubContext(t.options);p&&z.delayNextStep(p),n2(this,F,z),s=Math.max(s,z.currentTimeline.currentTime),r.push(z.currentTimeline)}),r.forEach(F=>e.currentTimeline.mergeTimelineCollectedStyles(F)),e.transformIntoNewTimeline(s),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const r=t.strValue;return lE(e.params?dE(r,e.params,e.errors):r,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const r=e.currentAnimateTimings=this._visitTiming(t.timings,e),s=e.currentTimeline;r.delay&&(e.incrementTime(r.delay),s.snapshotCurrentStyles());const p=t.style;5==p.type?this.visitKeyframes(p,e):(e.incrementTime(r.duration),this.visitStyle(p,e),s.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const r=e.currentTimeline,s=e.currentAnimateTimings;!s&&r.getCurrentStyleProperties().length&&r.forwardFrame();const p=s&&s.easing||t.easing;t.isEmptyStep?r.applyEmptyStep(p):r.setStyles(t.styles,p,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const r=e.currentAnimateTimings,s=e.currentTimeline.duration,p=r.duration,z=e.createSubContext().currentTimeline;z.easing=r.easing,t.styles.forEach(te=>{z.forwardTime((te.offset||0)*p),z.setStyles(te.styles,te.easing,e.errors,e.options),z.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(z),e.transformIntoNewTimeline(s+p),e.previousNode=t}visitQuery(t,e){const r=e.currentTimeline.currentTime,s=t.options||{},p=s.delay?U3(s.delay):0;p&&(6===e.previousNode.type||0==r&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=bE);let F=r;const z=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!s.optional,e.errors);e.currentQueryTotal=z.length;let te=null;z.forEach((fe,Re)=>{e.currentQueryIndex=Re;const $e=e.createSubContext(t.options,fe);p&&$e.delayNextStep(p),fe===e.element&&(te=$e.currentTimeline),n2(this,t.animation,$e),$e.currentTimeline.applyStylesToKeyframe(),F=Math.max(F,$e.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(F),te&&(e.currentTimeline.mergeTimelineCollectedStyles(te),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const r=e.parentContext,s=e.currentTimeline,p=t.timings,F=Math.abs(p.duration),z=F*(e.currentQueryTotal-1);let te=F*e.currentQueryIndex;switch(p.duration<0?"reverse":p.easing){case"reverse":te=z-te;break;case"full":te=r.currentStaggerTime}const Re=e.currentTimeline;te&&Re.delayNextStep(te);const $e=Re.currentTime;n2(this,t.animation,e),e.previousNode=t,r.currentStaggerTime=s.currentTime-$e+(s.startTime-r.currentTimeline.startTime)}}const bE={};class eO{constructor(t,e,r,s,p,F,z,te){this._driver=t,this.element=e,this.subInstructions=r,this._enterClassName=s,this._leaveClassName=p,this.errors=F,this.timelines=z,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=bE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=te||new vE(this._driver,e,0),z.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const r=t;let s=this.options;null!=r.duration&&(s.duration=U3(r.duration)),null!=r.delay&&(s.delay=U3(r.delay));const p=r.params;if(p){let F=s.params;F||(F=this.options.params={}),Object.keys(p).forEach(z=>{(!e||!F.hasOwnProperty(z))&&(F[z]=dE(p[z],F,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const r=t.params={};Object.keys(e).forEach(s=>{r[s]=e[s]})}}return t}createSubContext(t=null,e,r){const s=e||this.element,p=new eO(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,r||0));return p.previousNode=this.previousNode,p.currentAnimateTimings=this.currentAnimateTimings,p.options=this._copyOptions(),p.updateOptions(t),p.currentQueryIndex=this.currentQueryIndex,p.currentQueryTotal=this.currentQueryTotal,p.parentContext=this,this.subContextCount++,p}transformIntoNewTimeline(t){return this.previousNode=bE,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,r){const s={duration:e??t.duration,delay:this.currentTimeline.currentTime+(r??0)+t.delay,easing:""},p=new Tee(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,s,t.stretchStartingKeyframe);return this.timelines.push(p),s}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,r,s,p,F){let z=[];if(s&&z.push(this.element),t.length>0){t=(t=t.replace(_ee,"."+this._enterClassName)).replace(xee,"."+this._leaveClassName);let fe=this._driver.query(this.element,t,1!=r);0!==r&&(fe=r<0?fe.slice(fe.length+r,fe.length):fe.slice(0,r)),z.push(...fe)}return!p&&0==z.length&&F.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),z}}class vE{constructor(t,e,r,s){this._driver=t,this.element=e,this.startTime=r,this._elementTimelineStylesLookup=s,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new vE(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(e=>{this._backFill[e]=this._globalTimelineStyles[e]||Db,this._currentKeyframe[e]=Db}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,r,s){e&&(this._previousKeyframe.easing=e);const p=s&&s.params||{},F=function(n,t){const e={};let r;return n.forEach(s=>{"*"===s?(r=r||Object.keys(t),r.forEach(p=>{e[p]=Db})):K6(s,!1,e)}),e}(t,this._globalTimelineStyles);Object.keys(F).forEach(z=>{const te=dE(F[z],p,r);this._pendingStyles[z]=te,this._localTimelineStyles.hasOwnProperty(z)||(this._backFill[z]=this._globalTimelineStyles.hasOwnProperty(z)?this._globalTimelineStyles[z]:Db),this._updateStyle(z,te)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(r=>{this._currentKeyframe[r]=t[r]}),Object.keys(this._localTimelineStyles).forEach(r=>{this._currentKeyframe.hasOwnProperty(r)||(this._currentKeyframe[r]=this._localTimelineStyles[r])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const r=this._styleSummary[e],s=t._styleSummary[e];(!r||s.time>r.time)&&this._updateStyle(e,s.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,r=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((z,te)=>{const fe=K6(z,!0);Object.keys(fe).forEach(Re=>{const $e=fe[Re];"!"==$e?t.add(Re):$e==Db&&e.add(Re)}),r||(fe.offset=te/this.duration),s.push(fe)});const p=t.size?fE(t.values()):[],F=e.size?fE(e.values()):[];if(r){const z=s[0],te=g5(z);z.offset=0,te.offset=1,s=[z,te]}return XM(this.element,s,p,F,this.duration,this.startTime,this.easing,!1)}}class Tee extends vE{constructor(t,e,r,s,p,F,z=!1){super(t,e,F.delay),this.keyframes=r,this.preStyleProps=s,this.postStyleProps=p,this._stretchStartingKeyframe=z,this.timings={duration:F.duration,delay:F.delay,easing:F.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:r,easing:s}=this.timings;if(this._stretchStartingKeyframe&&e){const p=[],F=r+e,z=e/F,te=K6(t[0],!1);te.offset=0,p.push(te);const fe=K6(t[0],!1);fe.offset=fL(z),p.push(fe);const Re=t.length-1;for(let $e=1;$e<=Re;$e++){let rt=K6(t[$e],!1);rt.offset=fL((e+rt.offset*r)/F),p.push(rt)}r=F,e=0,s="",t=p}return XM(this.element,t,this.preStyleProps,this.postStyleProps,r,e,s,!0)}}function fL(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class tO{}class Iee extends tO{normalizePropertyName(t,e){return KM(t)}normalizeStyleValue(t,e,r,s){let p="";const F=r.toString().trim();if(See[e]&&0!==r&&"0"!==r)if("number"==typeof r)p="px";else{const z=r.match(/^[+-]?[\d\.]+([a-z]*)$/);z&&0==z[1].length&&s.push(`Please provide a CSS unit value for ${t}:${r}`)}return F+p}}const See=(()=>function(n){const t={};return n.forEach(e=>t[e]=!0),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function hL(n,t,e,r,s,p,F,z,te,fe,Re,$e,rt){return{type:0,element:n,triggerName:t,isRemovalTransition:s,fromState:e,fromStyles:p,toState:r,toStyles:F,timelines:z,queriedElements:te,preStyleProps:fe,postStyleProps:Re,totalTime:$e,errors:rt}}const nO={};class pL{constructor(t,e,r){this._triggerName=t,this.ast=e,this._stateStyles=r}match(t,e,r,s){return function(n,t,e,r,s){return n.some(p=>p(t,e,r,s))}(this.ast.matchers,t,e,r,s)}buildStyles(t,e,r){const s=this._stateStyles["*"],p=this._stateStyles[t],F=s?s.buildStyles(e,r):{};return p?p.buildStyles(e,r):F}build(t,e,r,s,p,F,z,te,fe,Re){const $e=[],rt=this.ast.options&&this.ast.options.params||nO,Tt=this.buildStyles(r,z&&z.params||nO,$e),Ft=te&&te.params||nO,Qt=this.buildStyles(s,Ft,$e),wn=new Set,An=new Map,gr=new Map,_r="void"===s,pr={params:Object.assign(Object.assign({},rt),Ft)},ti=Re?[]:QM(t,e,this.ast.animation,p,F,Tt,Qt,pr,fe,$e);let qr=0;if(ti.forEach(as=>{qr=Math.max(as.duration+as.delay,qr)}),$e.length)return hL(e,this._triggerName,r,s,_r,Tt,Qt,[],[],An,gr,qr,$e);ti.forEach(as=>{const Li=as.element,vs=t2(An,Li,{});as.preStyleProps.forEach(no=>vs[no]=!0);const Yi=t2(gr,Li,{});as.postStyleProps.forEach(no=>Yi[no]=!0),Li!==e&&wn.add(Li)});const yi=fE(wn.values());return hL(e,this._triggerName,r,s,_r,Tt,Qt,ti,yi,An,gr,qr)}}class Mee{constructor(t,e,r){this.styles=t,this.defaultParams=e,this.normalizer=r}buildStyles(t,e){const r={},s=g5(this.defaultParams);return Object.keys(t).forEach(p=>{const F=t[p];null!=F&&(s[p]=F)}),this.styles.styles.forEach(p=>{if("string"!=typeof p){const F=p;Object.keys(F).forEach(z=>{let te=F[z];te.length>1&&(te=dE(te,s,e));const fe=this.normalizer.normalizePropertyName(z,e);te=this.normalizer.normalizeStyleValue(z,fe,te,e),r[fe]=te})}}),r}}class Dee{constructor(t,e,r){this.name=t,this.ast=e,this._normalizer=r,this.transitionFactories=[],this.states={},e.states.forEach(s=>{this.states[s.name]=new Mee(s.style,s.options&&s.options.params||{},r)}),mL(this.states,"true","1"),mL(this.states,"false","0"),e.transitions.forEach(s=>{this.transitionFactories.push(new pL(t,s,this.states))}),this.fallbackTransition=function(n,t,e){return new pL(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(F,z)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,r,s){return this.transitionFactories.find(F=>F.match(t,e,r,s))||null}matchStyles(t,e,r){return this.fallbackTransition.buildStyles(t,e,r)}}function mL(n,t,e){n.hasOwnProperty(t)?n.hasOwnProperty(e)||(n[e]=n[t]):n.hasOwnProperty(e)&&(n[t]=n[e])}const Ree=new yE;class Nee{constructor(t,e,r){this.bodyNode=t,this._driver=e,this._normalizer=r,this._animations={},this._playersById={},this.players=[]}register(t,e){const r=[],s=YM(this._driver,e,r);if(r.length)throw new Error(`Unable to build the animation due to the following errors: ${r.join("\n")}`);this._animations[t]=s}_buildPlayer(t,e,r){const s=t.element,p=KF(0,this._normalizer,0,t.keyframes,e,r);return this._driver.animate(s,p,t.duration,t.delay,t.easing,[],!0)}create(t,e,r={}){const s=[],p=this._animations[t];let F;const z=new Map;if(p?(F=QM(this._driver,e,p,WM,aE,{},{},r,Ree,s),F.forEach(Re=>{const $e=t2(z,Re.element,{});Re.postStyleProps.forEach(rt=>$e[rt]=null)})):(s.push("The requested animation doesn't exist or has already been destroyed"),F=[]),s.length)throw new Error(`Unable to create the animation due to the following errors: ${s.join("\n")}`);z.forEach((Re,$e)=>{Object.keys(Re).forEach(rt=>{Re[rt]=this._driver.computeStyle($e,rt,Db)})});const fe=q6(F.map(Re=>{const $e=z.get(Re.element);return this._buildPlayer(Re,{},$e)}));return this._playersById[t]=fe,fe.onDestroy(()=>this.destroy(t)),this.players.push(fe),fe}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const r=this.players.indexOf(e);r>=0&&this.players.splice(r,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,r,s){const p=BM(e,"","","");return RM(this._getPlayer(t),r,p,s),()=>{}}command(t,e,r,s){if("register"==r)return void this.register(t,s[0]);if("create"==r)return void this.create(t,e,s[0]||{});const p=this._getPlayer(t);switch(r){case"play":p.play();break;case"pause":p.pause();break;case"reset":p.reset();break;case"restart":p.restart();break;case"finish":p.finish();break;case"init":p.init();break;case"setPosition":p.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(t)}}}const gL="ng-animate-queued",yL="ng-animate-disabled",bL=".ng-animate-disabled",Uee=[],vL={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},jee={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},H2="__ng_removed";class rO{constructor(t,e=""){this.namespaceId=e;const r=t&&t.hasOwnProperty("value");if(this.value=(r?t.value:t)??null,r){const p=g5(t);delete p.value,this.options=p}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const r=this.options.params;Object.keys(e).forEach(s=>{null==r[s]&&(r[s]=e[s])})}}}const k_="void",iO=new rO(k_);class Vee{constructor(t,e,r){this.id=t,this.hostElement=e,this._engine=r,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,$2(e,this._hostClassName)}listen(t,e,r,s){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${r}" because the animation trigger "${e}" doesn't exist!`);if(null==r||0==r.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(n=r)&&"done"!=n)throw new Error(`The provided animation trigger event "${r}" for the animation trigger "${e}" is not supported!`);var n;const p=t2(this._elementListeners,t,[]),F={name:e,phase:r,callback:s};p.push(F);const z=t2(this._engine.statesByElement,t,{});return z.hasOwnProperty(e)||($2(t,uE),$2(t,uE+"-"+e),z[e]=iO),()=>{this._engine.afterFlush(()=>{const te=p.indexOf(F);te>=0&&p.splice(te,1),this._triggers[e]||delete z[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,r,s=!0){const p=this._getTrigger(e),F=new sO(this.id,e,t);let z=this._engine.statesByElement.get(t);z||($2(t,uE),$2(t,uE+"-"+e),this._engine.statesByElement.set(t,z={}));let te=z[e];const fe=new rO(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&te&&fe.absorbOptions(te.options),z[e]=fe,te||(te=iO),fe.value!==k_&&te.value===fe.value){if(!function(n,t){const e=Object.keys(n),r=Object.keys(t);if(e.length!=r.length)return!1;for(let s=0;s{j3(t,Qt),Ay(t,wn)})}return}const rt=t2(this._engine.playersByElement,t,[]);rt.forEach(Ft=>{Ft.namespaceId==this.id&&Ft.triggerName==e&&Ft.queued&&Ft.destroy()});let ft=p.matchTransition(te.value,fe.value,t,fe.params),Tt=!1;if(!ft){if(!s)return;ft=p.fallbackTransition,Tt=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:ft,fromState:te,toState:fe,player:F,isFallbackTransition:Tt}),Tt||($2(t,gL),F.onStart(()=>{y5(t,gL)})),F.onDone(()=>{let Ft=this.players.indexOf(F);Ft>=0&&this.players.splice(Ft,1);const Qt=this._engine.playersByElement.get(t);if(Qt){let wn=Qt.indexOf(F);wn>=0&&Qt.splice(wn,1)}}),this.players.push(F),rt.push(F),F}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,r)=>{delete e[t]}),this._elementListeners.forEach((e,r)=>{this._elementListeners.set(r,e.filter(s=>s.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(r=>r.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const r=this._engine.driver.query(t,cE,!0);r.forEach(s=>{if(s[H2])return;const p=this._engine.fetchNamespacesByElement(s);p.size?p.forEach(F=>F.triggerLeaveAnimation(s,e,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(t,e,r,s){const p=this._engine.statesByElement.get(t);if(p){const F=[];if(Object.keys(p).forEach(z=>{if(this._triggers[z]){const te=this.trigger(t,z,k_,s);te&&F.push(te)}}),F.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),r&&q6(F).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),r=this._engine.statesByElement.get(t);if(e&&r){const s=new Set;e.forEach(p=>{const F=p.name;if(s.has(F))return;s.add(F);const te=this._triggers[F].fallbackTransition,fe=r[F]||iO,Re=new rO(k_),$e=new sO(this.id,F,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:F,transition:te,fromState:fe,toState:Re,player:$e,isFallbackTransition:!0})})}}removeNode(t,e){const r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let s=!1;if(r.totalAnimations){const p=r.players.length?r.playersByQueriedElement.get(t):[];if(p&&p.length)s=!0;else{let F=t;for(;F=F.parentNode;)if(r.statesByElement.get(F)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(t),s)r.markElementAsRemoved(this.id,t,!1,e);else{const p=t[H2];(!p||p===vL)&&(r.afterFlush(()=>this.clearElementCache(t)),r.destroyInnerAnimations(t),r._onRemovalComplete(t,e))}}insertNode(t,e){$2(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(r=>{const s=r.player;if(s.destroyed)return;const p=r.element,F=this._elementListeners.get(p);F&&F.forEach(z=>{if(z.name==r.triggerName){const te=BM(p,r.triggerName,r.fromState.value,r.toState.value);te._data=t,RM(r.player,z.phase,te,z.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):e.push(r)}),this._queue=[],e.sort((r,s)=>{const p=r.transition.ast.depCount,F=s.transition.ast.depCount;return 0==p||0==F?p-F:this._engine.driver.containsElement(r.element,s.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(r=>r.element===t)||e,e}}class Hee{constructor(t,e,r){this.bodyNode=t,this.driver=e,this._normalizer=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,p)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(r=>{r.queued&&t.push(r)})}),t}createNamespace(t,e){const r=new Vee(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(r,e):(this.newHostElements.set(e,r),this.collectEnterElement(e)),this._namespaceLookup[t]=r}_balanceNamespaceList(t,e){const r=this._namespaceList.length-1;if(r>=0){let s=!1;for(let p=r;p>=0;p--)if(this.driver.containsElement(this._namespaceList[p].hostElement,e)){this._namespaceList.splice(p+1,0,t),s=!0;break}s||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let r=this._namespaceLookup[t];return r||(r=this.createNamespace(t,e)),r}registerTrigger(t,e,r){let s=this._namespaceLookup[t];s&&s.register(e,r)&&this.totalAnimations++}destroy(t,e){if(!t)return;const r=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(r.hostElement),delete this._namespaceLookup[t];const s=this._namespaceList.indexOf(r);s>=0&&this._namespaceList.splice(s,1)}),this.afterFlushAnimationsDone(()=>r.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,r=this.statesByElement.get(t);if(r){const s=Object.keys(r);for(let p=0;p=0&&this.collectedLeaveElements.splice(F,1)}if(t){const F=this._fetchNamespace(t);F&&F.insertNode(e,r)}s&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),$2(t,yL)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),y5(t,yL))}removeNode(t,e,r,s){if(_E(e)){const p=t?this._fetchNamespace(t):null;if(p?p.removeNode(e,s):this.markElementAsRemoved(t,e,!1,s),r){const F=this.namespacesByHostElement.get(e);F&&F.id!==t&&F.removeNode(e,s)}}else this._onRemovalComplete(e,s)}markElementAsRemoved(t,e,r,s){this.collectedLeaveElements.push(e),e[H2]={namespaceId:t,setForRemoval:s,hasAnimation:r,removedBeforeQueried:!1}}listen(t,e,r,s,p){return _E(e)?this._fetchNamespace(t).listen(e,r,s,p):()=>{}}_buildInstruction(t,e,r,s,p){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,r,s,t.fromState.options,t.toState.options,e,p)}destroyInnerAnimations(t){let e=this.driver.query(t,cE,!0);e.forEach(r=>this.destroyActiveAnimationsForElement(r)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,GM,!0),e.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return q6(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[H2];if(e&&e.setForRemoval){if(t[H2]=vL,e.namespaceId){this.destroyInnerAnimations(t);const r=this._fetchNamespace(e.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,bL)&&this.markElementAsDisabled(t,!1),this.driver.query(t,bL,!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,s)=>this._balanceNamespaceList(r,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){const r=this._whenQuietFns;this._whenQuietFns=[],e.length?q6(e).onDone(()=>{r.forEach(s=>s())}):r.forEach(s=>s())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const r=new yE,s=[],p=new Map,F=[],z=new Map,te=new Map,fe=new Map,Re=new Set;this.disabledNodes.forEach(us=>{Re.add(us);const ds=this.driver.query(us,".ng-animate-queued",!0);for(let kr=0;kr{const kr=WM+Ft++;Tt.set(ds,kr),us.forEach(wr=>$2(wr,kr))});const Qt=[],wn=new Set,An=new Set;for(let us=0;uswn.add(wr)):An.add(ds))}const gr=new Map,_r=xL(rt,Array.from(wn));_r.forEach((us,ds)=>{const kr=aE+Ft++;gr.set(ds,kr),us.forEach(wr=>$2(wr,kr))}),t.push(()=>{ft.forEach((us,ds)=>{const kr=Tt.get(ds);us.forEach(wr=>y5(wr,kr))}),_r.forEach((us,ds)=>{const kr=gr.get(ds);us.forEach(wr=>y5(wr,kr))}),Qt.forEach(us=>{this.processLeaveNode(us)})});const pr=[],ti=[];for(let us=this._namespaceList.length-1;us>=0;us--)this._namespaceList[us].drainQueuedTransitions(e).forEach(kr=>{const wr=kr.player,mi=kr.element;if(pr.push(wr),this.collectedEnterElements.length){const Pa=mi[H2];if(Pa&&Pa.setForMove)return void wr.destroy()}const Ys=!$e||!this.driver.containsElement($e,mi),Js=gr.get(mi),va=Tt.get(mi),Qo=this._buildInstruction(kr,r,va,Js,Ys);if(Qo.errors&&Qo.errors.length)ti.push(Qo);else{if(Ys)return wr.onStart(()=>j3(mi,Qo.fromStyles)),wr.onDestroy(()=>Ay(mi,Qo.toStyles)),void s.push(wr);if(kr.isFallbackTransition)return wr.onStart(()=>j3(mi,Qo.fromStyles)),wr.onDestroy(()=>Ay(mi,Qo.toStyles)),void s.push(wr);Qo.timelines.forEach(Pa=>Pa.stretchStartingKeyframe=!0),r.append(mi,Qo.timelines),F.push({instruction:Qo,player:wr,element:mi}),Qo.queriedElements.forEach(Pa=>t2(z,Pa,[]).push(wr)),Qo.preStyleProps.forEach((Pa,Ou)=>{const td=Object.keys(Pa);if(td.length){let Td=te.get(Ou);Td||te.set(Ou,Td=new Set),td.forEach(To=>Td.add(To))}}),Qo.postStyleProps.forEach((Pa,Ou)=>{const td=Object.keys(Pa);let Td=fe.get(Ou);Td||fe.set(Ou,Td=new Set),td.forEach(To=>Td.add(To))})}});if(ti.length){const us=[];ti.forEach(ds=>{us.push(`@${ds.triggerName} has failed due to:\n`),ds.errors.forEach(kr=>us.push(`- ${kr}\n`))}),pr.forEach(ds=>ds.destroy()),this.reportError(us)}const qr=new Map,yi=new Map;F.forEach(us=>{const ds=us.element;r.has(ds)&&(yi.set(ds,ds),this._beforeAnimationBuild(us.player.namespaceId,us.instruction,qr))}),s.forEach(us=>{const ds=us.element;this._getPreviousPlayers(ds,!1,us.namespaceId,us.triggerName,null).forEach(wr=>{t2(qr,ds,[]).push(wr),wr.destroy()})});const as=Qt.filter(us=>TL(us,te,fe)),Li=new Map;wL(Li,this.driver,An,fe,Db).forEach(us=>{TL(us,te,fe)&&as.push(us)});const Yi=new Map;ft.forEach((us,ds)=>{wL(Yi,this.driver,new Set(us),te,"!")}),as.forEach(us=>{const ds=Li.get(us),kr=Yi.get(us);Li.set(us,Object.assign(Object.assign({},ds),kr))});const no=[],Gs=[],Ts={};F.forEach(us=>{const{element:ds,player:kr,instruction:wr}=us;if(r.has(ds)){if(Re.has(ds))return kr.onDestroy(()=>Ay(ds,wr.toStyles)),kr.disabled=!0,kr.overrideTotalTime(wr.totalTime),void s.push(kr);let mi=Ts;if(yi.size>1){let Js=ds;const va=[];for(;Js=Js.parentNode;){const Qo=yi.get(Js);if(Qo){mi=Qo;break}va.push(Js)}va.forEach(Qo=>yi.set(Qo,mi))}const Ys=this._buildAnimation(kr.namespaceId,wr,qr,p,Yi,Li);if(kr.setRealPlayer(Ys),mi===Ts)no.push(kr);else{const Js=this.playersByElement.get(mi);Js&&Js.length&&(kr.parentPlayer=q6(Js)),s.push(kr)}}else j3(ds,wr.fromStyles),kr.onDestroy(()=>Ay(ds,wr.toStyles)),Gs.push(kr),Re.has(ds)&&s.push(kr)}),Gs.forEach(us=>{const ds=p.get(us.element);if(ds&&ds.length){const kr=q6(ds);us.setRealPlayer(kr)}}),s.forEach(us=>{us.parentPlayer?us.syncPlayerEvents(us.parentPlayer):us.destroy()});for(let us=0;us!Ys.destroyed);mi.length?zee(this,ds,mi):this.processLeaveNode(ds)}return Qt.length=0,no.forEach(us=>{this.players.push(us),us.onDone(()=>{us.destroy();const ds=this.players.indexOf(us);this.players.splice(ds,1)}),us.play()}),no}elementContainsData(t,e){let r=!1;const s=e[H2];return s&&s.setForRemoval&&(r=!0),this.playersByElement.has(e)&&(r=!0),this.playersByQueriedElement.has(e)&&(r=!0),this.statesByElement.has(e)&&(r=!0),this._fetchNamespace(t).elementContainsData(e)||r}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,r,s,p){let F=[];if(e){const z=this.playersByQueriedElement.get(t);z&&(F=z)}else{const z=this.playersByElement.get(t);if(z){const te=!p||p==k_;z.forEach(fe=>{fe.queued||!te&&fe.triggerName!=s||F.push(fe)})}}return(r||s)&&(F=F.filter(z=>!(r&&r!=z.namespaceId||s&&s!=z.triggerName))),F}_beforeAnimationBuild(t,e,r){const p=e.element,F=e.isRemovalTransition?void 0:t,z=e.isRemovalTransition?void 0:e.triggerName;for(const te of e.timelines){const fe=te.element,Re=fe!==p,$e=t2(r,fe,[]);this._getPreviousPlayers(fe,Re,F,z,e.toState).forEach(ft=>{const Tt=ft.getRealPlayer();Tt.beforeDestroy&&Tt.beforeDestroy(),ft.destroy(),$e.push(ft)})}j3(p,e.fromStyles)}_buildAnimation(t,e,r,s,p,F){const z=e.triggerName,te=e.element,fe=[],Re=new Set,$e=new Set,rt=e.timelines.map(Tt=>{const Ft=Tt.element;Re.add(Ft);const Qt=Ft[H2];if(Qt&&Qt.removedBeforeQueried)return new m5(Tt.duration,Tt.delay);const wn=Ft!==te,An=function(n){const t=[];return EL(n,t),t}((r.get(Ft)||Uee).map(qr=>qr.getRealPlayer())).filter(qr=>!!qr.element&&qr.element===Ft),gr=p.get(Ft),_r=F.get(Ft),pr=KF(0,this._normalizer,0,Tt.keyframes,gr,_r),ti=this._buildPlayer(Tt,pr,An);if(Tt.subTimeline&&s&&$e.add(Ft),wn){const qr=new sO(t,z,Ft);qr.setRealPlayer(ti),fe.push(qr)}return ti});fe.forEach(Tt=>{t2(this.playersByQueriedElement,Tt.element,[]).push(Tt),Tt.onDone(()=>function(n,t,e){let r;if(n instanceof Map){if(r=n.get(t),r){if(r.length){const s=r.indexOf(e);r.splice(s,1)}0==r.length&&n.delete(t)}}else if(r=n[t],r){if(r.length){const s=r.indexOf(e);r.splice(s,1)}0==r.length&&delete n[t]}return r}(this.playersByQueriedElement,Tt.element,Tt))}),Re.forEach(Tt=>$2(Tt,nL));const ft=q6(rt);return ft.onDestroy(()=>{Re.forEach(Tt=>y5(Tt,nL)),Ay(te,e.toStyles)}),$e.forEach(Tt=>{t2(s,Tt,[]).push(ft)}),ft}_buildPlayer(t,e,r){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,r):new m5(t.duration,t.delay)}}class sO{constructor(t,e,r){this.namespaceId=t,this.triggerName=e,this.element=r,this._player=new m5,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(r=>RM(t,e,void 0,r))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){t2(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function _E(n){return n&&1===n.nodeType}function _L(n,t){const e=n.style.display;return n.style.display=t??"none",e}function wL(n,t,e,r,s){const p=[];e.forEach(te=>p.push(_L(te)));const F=[];r.forEach((te,fe)=>{const Re={};te.forEach($e=>{const rt=Re[$e]=t.computeStyle(fe,$e,s);(!rt||0==rt.length)&&(fe[H2]=jee,F.push(fe))}),n.set(fe,Re)});let z=0;return e.forEach(te=>_L(te,p[z++])),F}function xL(n,t){const e=new Map;if(n.forEach(z=>e.set(z,[])),0==t.length)return e;const s=new Set(t),p=new Map;function F(z){if(!z)return 1;let te=p.get(z);if(te)return te;const fe=z.parentNode;return te=e.has(fe)?fe:s.has(fe)?1:F(fe),p.set(z,te),te}return t.forEach(z=>{const te=F(z);1!==te&&e.get(te).push(z)}),e}const wE="$$classes";function $2(n,t){if(n.classList)n.classList.add(t);else{let e=n[wE];e||(e=n[wE]={}),e[t]=!0}}function y5(n,t){if(n.classList)n.classList.remove(t);else{let e=n[wE];e&&delete e[t]}}function zee(n,t,e){q6(e).onDone(()=>n.processLeaveNode(t))}function EL(n,t){for(let e=0;es.add(p)):t.set(n,r),e.delete(n),!0}class xE{constructor(t,e,r){this.bodyNode=t,this._driver=e,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(s,p)=>{},this._transitionEngine=new Hee(t,e,r),this._timelineEngine=new Nee(t,e,r),this._transitionEngine.onRemovalComplete=(s,p)=>this.onRemovalComplete(s,p)}registerTrigger(t,e,r,s,p){const F=t+"-"+s;let z=this._triggerCache[F];if(!z){const te=[],fe=YM(this._driver,p,te);if(te.length)throw new Error(`The animation trigger "${s}" has failed to build due to the following errors:\n - ${te.join("\n - ")}`);z=function(n,t,e){return new Dee(n,t,e)}(s,fe,this._normalizer),this._triggerCache[F]=z}this._transitionEngine.registerTrigger(e,s,z)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,r,s){this._transitionEngine.insertNode(t,e,r,s)}onRemove(t,e,r,s){this._transitionEngine.removeNode(t,e,s||!1,r)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,r,s){if("@"==r.charAt(0)){const[p,F]=ZF(r);this._timelineEngine.command(p,e,F,s)}else this._transitionEngine.trigger(t,e,r,s)}listen(t,e,r,s,p){if("@"==r.charAt(0)){const[F,z]=ZF(r);return this._timelineEngine.listen(F,e,z,p)}return this._transitionEngine.listen(t,e,r,s,p)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function AL(n,t){let e=null,r=null;return Array.isArray(t)&&t.length?(e=oO(t[0]),t.length>1&&(r=oO(t[t.length-1]))):t&&(e=oO(t)),e||r?new Zee(n,e,r):null}let Zee=(()=>{class n{constructor(e,r,s){this._element=e,this._startStyles=r,this._endStyles=s,this._state=0;let p=n.initialStylesByElement.get(e);p||n.initialStylesByElement.set(e,p={}),this._initialStyles=p}start(){this._state<1&&(this._startStyles&&Ay(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Ay(this._element,this._initialStyles),this._endStyles&&(Ay(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(j3(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(j3(this._element,this._endStyles),this._endStyles=null),Ay(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function oO(n){let t=null;const e=Object.keys(n);for(let r=0;rthis._handleCallback(te)}apply(){(function(n,t){const e=uO(n,"").trim();let r=0;e.length&&(function(n,t){let e=0;for(let r=0;r=this._delay&&r>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),ML(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(n,t){const r=uO(n,"").split(","),s=aO(r,t);s>=0&&(r.splice(s,1),EE(n,"",r.join(",")))}(this._element,this._name))}}function kL(n,t,e){EE(n,"PlayState",e,CL(n,t))}function CL(n,t){const e=uO(n,"");return e.indexOf(",")>0?aO(e.split(","),t):aO([e],t)}function aO(n,t){for(let e=0;e=0)return e;return-1}function ML(n,t,e){e?n.removeEventListener(SL,t):n.addEventListener(SL,t)}function EE(n,t,e,r){const s=IL+t;if(null!=r){const p=n.style[s];if(p.length){const F=p.split(",");F[r]=e,e=F.join(",")}}n.style[s]=e}function uO(n,t){return n.style[IL+t]||""}class OL{constructor(t,e,r,s,p,F,z,te){this.element=t,this.keyframes=e,this.animationName=r,this._duration=s,this._delay=p,this._finalStyles=z,this._specialStyles=te,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=F||"linear",this.totalTime=s+p,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),!(this._state>=4)&&(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),!(this._state>=3)&&(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Qee(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(r=>{"offset"!=r&&(t[r]=e?this._finalStyles[r]:ZM(this.element,r))})}this.currentSnapshot=t}}class ste extends m5{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=QF(e)}init(){this.__initialized||!this._startingStyles||(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){!this._startingStyles||(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){!this._startingStyles||(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class PL{constructor(){this._count=0}validateStyleProperty(t){return UM(t)}matchesElement(t,e){return jM(t,e)}containsElement(t,e){return VM(t,e)}query(t,e,r){return HM(t,e,r)}computeStyle(t,e,r){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,r){r=r.map(z=>QF(z));let s=`@keyframes ${e} {\n`,p="";r.forEach(z=>{p=" ";const te=parseFloat(z.offset);s+=`${p}${100*te}% {\n`,p+=" ",Object.keys(z).forEach(fe=>{const Re=z[fe];switch(fe){case"offset":return;case"easing":return void(Re&&(s+=`${p}animation-timing-function: ${Re};\n`));default:return void(s+=`${p}${fe}: ${Re};\n`)}}),s+=`${p}}\n`}),s+="}\n";const F=document.createElement("style");return F.textContent=s,F}animate(t,e,r,s,p,F=[],z){const te=F.filter(Qt=>Qt instanceof OL),fe={};aL(r,s)&&te.forEach(Qt=>{let wn=Qt.currentSnapshot;Object.keys(wn).forEach(An=>fe[An]=wn[An])});const Re=function(n){let t={};return n&&(Array.isArray(n)?n:[n]).forEach(r=>{Object.keys(r).forEach(s=>{"offset"==s||"easing"==s||(t[s]=r[s])})}),t}(e=uL(t,e,fe));if(0==r)return new ste(t,Re);const $e="gen_css_kf_"+this._count++,rt=this.buildKeyframeElement(t,$e,e);(function(n){var t;const e=null===(t=n.getRootNode)||void 0===t?void 0:t.call(n);return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot?e:document.head})(t).appendChild(rt);const Tt=AL(t,e),Ft=new OL(t,e,$e,r,s,p,Re,Tt);return Ft.onDestroy(()=>{var n;(n=rt).parentNode.removeChild(n)}),Ft}}class NL{constructor(t,e,r,s){this.element=t,this.keyframes=e,this.options=r,this._specialStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,r){return t.animate(e,r)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:ZM(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}}class lte{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(BL().toString()),this._cssKeyframesDriver=new PL}validateStyleProperty(t){return UM(t)}matchesElement(t,e){return jM(t,e)}containsElement(t,e){return VM(t,e)}query(t,e,r){return HM(t,e,r)}computeStyle(t,e,r){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,r,s,p,F=[],z){if(!z&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,r,s,p,F);const Re={duration:r,delay:s,fill:0==s?"both":"forwards"};p&&(Re.easing=p);const $e={},rt=F.filter(Tt=>Tt instanceof NL);aL(r,s)&&rt.forEach(Tt=>{let Ft=Tt.currentSnapshot;Object.keys(Ft).forEach(Qt=>$e[Qt]=Ft[Qt])});const ft=AL(t,e=uL(t,e=e.map(Tt=>K6(Tt,!1)),$e));return new NL(t,e,Re,ft)}}function BL(){return qF()&&Element.prototype.animate||{}}let fte=(()=>{class n extends $F{constructor(e,r){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(r.body,{id:"0",encapsulation:Ye.None,styles:[],data:{animation:[]}})}build(e){const r=this._nextAnimationId.toString();this._nextAnimationId++;const s=Array.isArray(e)?WF(e):e;return FL(this._renderer,null,r,"register",[s]),new hte(r,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(Yn(Ig),Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class hte extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new pte(this._id,t,e||{},this._renderer)}}class pte{constructor(t,e,r,s){this.id=t,this.element=e,this._renderer=s,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",r)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return FL(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function FL(n,t,e,r,s){return n.setProperty(t,`@@${e}:${r}`,s)}const LL="@.disabled";let mte=(()=>{class n{constructor(e,r,s){this.delegate=e,this.engine=r,this._zone=s,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),r.onRemovalComplete=(p,F)=>{F&&F.parentNode(p)&&F.removeChild(p.parentNode,p)}}createRenderer(e,r){const p=this.delegate.createRenderer(e,r);if(!(e&&r&&r.data&&r.data.animation)){let Re=this._rendererCache.get(p);return Re||(Re=new UL("",p,this.engine),this._rendererCache.set(p,Re)),Re}const F=r.id,z=r.id+"-"+this._currentId;this._currentId++,this.engine.register(z,e);const te=Re=>{Array.isArray(Re)?Re.forEach(te):this.engine.registerTrigger(F,z,e,Re.name,Re)};return r.data.animation.forEach(te),new gte(this,z,p,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,r,s){e>=0&&er(s)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(p=>{const[F,z]=p;F(z)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([r,s]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(Yn(Ig),Yn(xE),Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();class UL{constructor(t,e,r){this.namespaceId=t,this.delegate=e,this.engine=r,this.destroyNode=this.delegate.destroyNode?s=>e.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,r,s=!0){this.delegate.insertBefore(t,e,r),this.engine.onInsert(this.namespaceId,e,t,s)}removeChild(t,e,r){this.engine.onRemove(this.namespaceId,e,this.delegate,r)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,r,s){this.delegate.setAttribute(t,e,r,s)}removeAttribute(t,e,r){this.delegate.removeAttribute(t,e,r)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,r,s){this.delegate.setStyle(t,e,r,s)}removeStyle(t,e,r){this.delegate.removeStyle(t,e,r)}setProperty(t,e,r){"@"==e.charAt(0)&&e==LL?this.disableAnimations(t,!!r):this.delegate.setProperty(t,e,r)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,r){return this.delegate.listen(t,e,r)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class gte extends UL{constructor(t,e,r,s){super(e,r,s),this.factory=t,this.namespaceId=e}setProperty(t,e,r){"@"==e.charAt(0)?"."==e.charAt(1)&&e==LL?this.disableAnimations(t,r=void 0===r||!!r):this.engine.process(this.namespaceId,t,e.substr(1),r):this.delegate.setProperty(t,e,r)}listen(t,e,r){if("@"==e.charAt(0)){const s=function(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let p=e.substr(1),F="";return"@"!=p.charAt(0)&&([p,F]=function(n){const t=n.indexOf(".");return[n.substring(0,t),n.substr(t+1)]}(p)),this.engine.listen(this.namespaceId,s,p,F,z=>{this.factory.scheduleListenerCallback(z._data||-1,r,z)})}return this.delegate.listen(t,e,r)}}let vte=(()=>{class n extends xE{constructor(e,r,s){super(e.body,r,s)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa),Yn($M),Yn(tO))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const AE=new fo("AnimationModuleType"),jL=[{provide:$F,useClass:fte},{provide:tO,useFactory:function(){return new Iee}},{provide:xE,useClass:vte},{provide:Ig,useFactory:function(n,t,e){return new mte(n,t,e)},deps:[R7,xE,pa]}],VL=[{provide:$M,useFactory:function(){return"function"==typeof BL()?new lte:new PL}},{provide:AE,useValue:"BrowserAnimations"},...jL],HL=[{provide:$M,useClass:eL},{provide:AE,useValue:"NoopAnimations"},...jL];let Ete=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?HL:VL}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:VL,imports:[$C]}),n})();var Tte=Y(13410),Ate=Y(29923),$L=Y(41439),Ite=Y(52441),WL=Y(42145),H3=Y(5304),C_=Y(94612),Ste=Y(12627),b5=Y(28049),GL=Y(548),kte=Y(51307),Cte=Y(68939),cO=Y(63282);class Pb{constructor(t,e){this.id=t,this.url=e}}class lO extends Pb{constructor(t,e,r="imperative",s=null){super(t,e),this.navigationTrigger=r,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class M_ extends Pb{constructor(t,e,r){super(t,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class zL extends Pb{constructor(t,e,r){super(t,e),this.reason=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Mte extends Pb{constructor(t,e,r){super(t,e),this.error=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Ote extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Dte extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Pte extends Pb{constructor(t,e,r,s,p){super(t,e),this.urlAfterRedirects=r,this.state=s,this.shouldActivate=p}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Rte extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Nte extends Pb{constructor(t,e,r,s){super(t,e),this.urlAfterRedirects=r,this.state=s}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class qL{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class KL{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Bte{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Fte{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lte{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ute{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ZL{constructor(t,e,r){this.routerEvent=t,this.position=e,this.anchor=r}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const jc="primary";class jte{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function v5(n){return new jte(n)}const YL="ngNavigationCancelingError";function dO(n){const t=Error("NavigationCancelingError: "+n);return t[YL]=!0,t}function Hte(n,t,e){const r=e.path.split("/");if(r.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||r.lengthr[p]===s)}return n===t}function XL(n){return Array.prototype.concat.apply([],n)}function QL(n){return n.length>0?n[n.length-1]:null}function Gp(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function Sy(n){return y0(n)?n:j1(n)?(0,Tm.D)(Promise.resolve(n)):(0,bu.of)(n)}const Gte={exact:function nU(n,t,e){if(!W3(n.segments,t.segments)||!IE(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const r in t.children)if(!n.children[r]||!nU(n.children[r],t.children[r],e))return!1;return!0},subset:rU},eU={exact:function(n,t){return Iy(n,t)},subset:function(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>JL(n[e],t[e]))},ignored:()=>!0};function tU(n,t,e){return Gte[e.paths](n.root,t.root,e.matrixParams)&&eU[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function rU(n,t,e){return iU(n,t,t.segments,e)}function iU(n,t,e,r){if(n.segments.length>e.length){const s=n.segments.slice(0,e.length);return!(!W3(s,e)||t.hasChildren()||!IE(s,e,r))}if(n.segments.length===e.length){if(!W3(n.segments,e)||!IE(n.segments,e,r))return!1;for(const s in t.children)if(!n.children[s]||!rU(n.children[s],t.children[s],r))return!1;return!0}{const s=e.slice(0,n.segments.length),p=e.slice(n.segments.length);return!!(W3(n.segments,s)&&IE(n.segments,s,r)&&n.children[jc])&&iU(n.children[jc],t,p,r)}}function IE(n,t,e){return t.every((r,s)=>eU[e](n[s].parameters,r.parameters))}class $3{constructor(t,e,r){this.root=t,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=v5(this.queryParams)),this._queryParamMap}toString(){return Yte.serialize(this)}}class Qc{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Gp(e,(r,s)=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return SE(this)}}class O_{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=v5(this.parameters)),this._parameterMap}toString(){return uU(this)}}function W3(n,t){return n.length===t.length&&n.every((e,r)=>e.path===t[r].path)}class fO{}class sU{parse(t){const e=new sne(t);return new $3(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${D_(t.root,!0)}`,r=function(n){const t=Object.keys(n).map(e=>{const r=n[e];return Array.isArray(r)?r.map(s=>`${kE(e)}=${kE(s)}`).join("&"):`${kE(e)}=${kE(r)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);var n;return`${e}${r}${"string"==typeof t.fragment?`#${n=t.fragment,encodeURI(n)}`:""}`}}const Yte=new sU;function SE(n){return n.segments.map(t=>uU(t)).join("/")}function D_(n,t){if(!n.hasChildren())return SE(n);if(t){const e=n.children[jc]?D_(n.children[jc],!1):"",r=[];return Gp(n.children,(s,p)=>{p!==jc&&r.push(`${p}:${D_(s,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}{const e=function(n,t){let e=[];return Gp(n.children,(r,s)=>{s===jc&&(e=e.concat(t(r,s)))}),Gp(n.children,(r,s)=>{s!==jc&&(e=e.concat(t(r,s)))}),e}(n,(r,s)=>s===jc?[D_(n.children[jc],!1)]:[`${s}:${D_(r,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[jc]?`${SE(n)}/${e[0]}`:`${SE(n)}/(${e.join("//")})`}}function oU(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function kE(n){return oU(n).replace(/%3B/gi,";")}function hO(n){return oU(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function CE(n){return decodeURIComponent(n)}function aU(n){return CE(n.replace(/\+/g,"%20"))}function uU(n){return`${hO(n.path)}${function(n){return Object.keys(n).map(t=>`;${hO(t)}=${hO(n[t])}`).join("")}(n.parameters)}`}const ene=/^[^\/()?;=#]+/;function ME(n){const t=n.match(ene);return t?t[0]:""}const tne=/^[^=?&#]+/,rne=/^[^?&#]+/;class sne{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Qc([],{}):new Qc([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r[jc]=new Qc(t,e)),r}parseSegment(){const t=ME(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new O_(CE(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=ME(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){const s=ME(this.remaining);s&&(r=s,this.capture(r))}t[CE(e)]=CE(r)}parseQueryParam(t){const e=function(n){const t=n.match(tne);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){const F=function(n){const t=n.match(rne);return t?t[0]:""}(this.remaining);F&&(r=F,this.capture(r))}const s=aU(e),p=aU(r);if(t.hasOwnProperty(s)){let F=t[s];Array.isArray(F)||(F=[F],t[s]=F),F.push(p)}else t[s]=p}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=ME(this.remaining),s=this.remaining[r.length];if("/"!==s&&")"!==s&&";"!==s)throw new Error(`Cannot parse url '${this.url}'`);let p;r.indexOf(":")>-1?(p=r.substr(0,r.indexOf(":")),this.capture(p),this.capture(":")):t&&(p=jc);const F=this.parseChildren();e[p]=1===Object.keys(F).length?F[jc]:new Qc([],F),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class cU{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=pO(t,this._root);return e?e.children.map(r=>r.value):[]}firstChild(t){const e=pO(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=mO(t,this._root);return e.length<2?[]:e[e.length-2].children.map(s=>s.value).filter(s=>s!==t)}pathFromRoot(t){return mO(t,this._root).map(e=>e.value)}}function pO(n,t){if(n===t.value)return t;for(const e of t.children){const r=pO(n,e);if(r)return r}return null}function mO(n,t){if(n===t.value)return[t];for(const e of t.children){const r=mO(n,e);if(r.length)return r.unshift(t),r}return[]}class Rb{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function P_(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class lU extends cU{constructor(t,e){super(t),this.snapshot=e,gO(this,t)}toString(){return this.snapshot.toString()}}function dU(n,t){const e=function(n,t){const F=new OE([],{},{},"",{},jc,t,null,n.root,-1,{});return new hU("",new Rb(F,[]))}(n,t),r=new xd.X([new O_("",{})]),s=new xd.X({}),p=new xd.X({}),F=new xd.X({}),z=new xd.X(""),te=new ky(r,s,F,z,p,jc,t,e.root);return te.snapshot=e.root,new lU(new Rb(te,[]),e)}class ky{constructor(t,e,r,s,p,F,z,te){this.url=t,this.params=e,this.queryParams=r,this.fragment=s,this.data=p,this.outlet=F,this.component=z,this._futureSnapshot=te}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,ll.U)(t=>v5(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,ll.U)(t=>v5(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function fU(n,t="emptyOnly"){const e=n.pathFromRoot;let r=0;if("always"!==t)for(r=e.length-1;r>=1;){const s=e[r],p=e[r-1];if(s.routeConfig&&""===s.routeConfig.path)r--;else{if(p.component)break;r--}}return function(n){return n.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(e.slice(r))}class OE{constructor(t,e,r,s,p,F,z,te,fe,Re,$e){this.url=t,this.params=e,this.queryParams=r,this.fragment=s,this.data=p,this.outlet=F,this.component=z,this.routeConfig=te,this._urlSegment=fe,this._lastPathIndex=Re,this._resolve=$e}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=v5(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=v5(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class hU extends cU{constructor(t,e){super(e),this.url=t,gO(this,e)}toString(){return pU(this._root)}}function gO(n,t){t.value._routerState=n,t.children.forEach(e=>gO(n,e))}function pU(n){const t=n.children.length>0?` { ${n.children.map(pU).join(", ")} } `:"";return`${n.value}${t}`}function yO(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Iy(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Iy(t.params,e.params)||n.params.next(e.params),function(n,t){if(n.length!==t.length)return!1;for(let e=0;eIy(e.parameters,t[r].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||bO(n.parent,t.parent))}function DE(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const r=e.value;r._futureSnapshot=t.value;const s=function(n,t,e){return t.children.map(r=>{for(const s of e.children)if(n.shouldReuseRoute(r.value,s.value.snapshot))return DE(n,r,s);return DE(n,r)})}(n,t,e);return new Rb(r,s)}{if(n.shouldAttach(t.value)){const p=n.retrieve(t.value);if(null!==p){const F=p.route;return mU(t,F),F}}const r=function(n){return new ky(new xd.X(n.url),new xd.X(n.params),new xd.X(n.queryParams),new xd.X(n.fragment),new xd.X(n.data),n.outlet,n.component,n)}(t.value),s=t.children.map(p=>DE(n,p));return new Rb(r,s)}}function mU(n,t){if(n.value.routeConfig!==t.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(n.children.length!==t.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");t.value._futureSnapshot=n.value;for(let e=0;e{p[z]=Array.isArray(F)?F.map(te=>`${te}`):`${F}`}),new $3(e.root===n?t:gU(e.root,n,t),p,s)}function gU(n,t,e){const r={};return Gp(n.children,(s,p)=>{r[p]=s===t?e:gU(s,t,e)}),new Qc(n.segments,r)}class yU{constructor(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&PE(r[0]))throw new Error("Root segment cannot have matrix parameters");const s=r.find(R_);if(s&&s!==QL(r))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class _O{constructor(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r}}function bU(n,t,e){if(n||(n=new Qc([],{})),0===n.segments.length&&n.hasChildren())return RE(n,t,e);const r=function(n,t,e){let r=0,s=t;const p={match:!1,pathIndex:0,commandIndex:0};for(;s=e.length)return p;const F=n.segments[s],z=e[r];if(R_(z))break;const te=`${z}`,fe=r0&&void 0===te)break;if(te&&fe&&"object"==typeof fe&&void 0===fe.outlets){if(!_U(te,fe,F))return p;r+=2}else{if(!_U(te,{},F))return p;r++}s++}return{match:!0,pathIndex:s,commandIndex:r}}(n,t,e),s=e.slice(r.commandIndex);if(r.match&&r.pathIndex{"string"==typeof p&&(p=[p]),null!==p&&(s[F]=bU(n.children[F],t,p))}),Gp(n.children,(p,F)=>{void 0===r[F]&&(s[F]=p)}),new Qc(n.segments,s)}}function wO(n,t,e){const r=n.segments.slice(0,t);let s=0;for(;s{"string"==typeof e&&(e=[e]),null!==e&&(t[r]=wO(new Qc([],{}),0,e))}),t}function vU(n){const t={};return Gp(n,(e,r)=>t[r]=`${e}`),t}function _U(n,t,e){return n==e.path&&Iy(t,e.parameters)}class vne{constructor(t,e,r,s){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=s}activate(t){const e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),yO(this.futureState.root),this.activateChildRoutes(e,r,t)}deactivateChildRoutes(t,e,r){const s=P_(e);t.children.forEach(p=>{const F=p.value.outlet;this.deactivateRoutes(p,s[F],r),delete s[F]}),Gp(s,(p,F)=>{this.deactivateRouteAndItsChildren(p,r)})}deactivateRoutes(t,e,r){const s=t.value,p=e?e.value:null;if(s===p)if(s.component){const F=r.getContext(s.outlet);F&&this.deactivateChildRoutes(t,e,F.children)}else this.deactivateChildRoutes(t,e,r);else p&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const r=e.getContext(t.value.outlet);if(r&&r.outlet){const s=r.outlet.detach(),p=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:p})}}deactivateRouteAndOutlet(t,e){const r=e.getContext(t.value.outlet),s=r&&t.value.component?r.children:e,p=P_(t);for(const F of Object.keys(p))this.deactivateRouteAndItsChildren(p[F],s);r&&r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated(),r.attachRef=null,r.resolver=null,r.route=null)}activateChildRoutes(t,e,r){const s=P_(e);t.children.forEach(p=>{this.activateRoutes(p,s[p.value.outlet],r),this.forwardEvent(new Ute(p.value.snapshot))}),t.children.length&&this.forwardEvent(new Fte(t.value.snapshot))}activateRoutes(t,e,r){const s=t.value,p=e?e.value:null;if(yO(s),s===p)if(s.component){const F=r.getOrCreateContext(s.outlet);this.activateChildRoutes(t,e,F.children)}else this.activateChildRoutes(t,e,r);else if(s.component){const F=r.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const z=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),F.children.onOutletReAttached(z.contexts),F.attachRef=z.componentRef,F.route=z.route.value,F.outlet&&F.outlet.attach(z.componentRef,z.route.value),wU(z.route)}else{const z=function(n){for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(s.snapshot),te=z?z.module.componentFactoryResolver:null;F.attachRef=null,F.route=s,F.resolver=te,F.outlet&&F.outlet.activateWith(s,te),this.activateChildRoutes(t,null,F.children)}}else this.activateChildRoutes(t,null,r)}}function wU(n){yO(n.value),n.children.forEach(wU)}class xO{constructor(t,e){this.routes=t,this.module=e}}function Z6(n){return"function"==typeof n}function G3(n){return n instanceof $3}const N_=Symbol("INITIAL_VALUE");function B_(){return(0,Rg.w)(n=>(0,GC.aj)(n.map(t=>t.pipe((0,p1.q)(1),(0,a5.O)(N_)))).pipe((0,WL.R)((t,e)=>{let r=!1;return e.reduce((s,p,F)=>s!==N_?s:(p===N_&&(r=!0),r||!1!==p&&F!==e.length-1&&!G3(p)?s:p),t)},N_),(0,lp.h)(t=>t!==N_),(0,ll.U)(t=>G3(t)?t:!0===t),(0,p1.q)(1)))}let xU=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,r){1&e&&Gn(0,"router-outlet")},directives:function(){return[SO]},encapsulation:2}),n})();function EU(n,t=""){for(let e=0;eW2(r)===t);return e.push(...n.filter(r=>W2(r)!==t)),e}const AU={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function NE(n,t,e){var r;if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?Object.assign({},AU):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const p=(t.matcher||Hte)(e,n,t);if(!p)return Object.assign({},AU);const F={};Gp(p.posParams,(te,fe)=>{F[fe]=te.path});const z=p.consumed.length>0?Object.assign(Object.assign({},F),p.consumed[p.consumed.length-1].parameters):F;return{matched:!0,consumedSegments:p.consumed,lastChild:p.consumed.length,parameters:z,positionalParamSegments:null!==(r=p.posParams)&&void 0!==r?r:{}}}function BE(n,t,e,r,s="corrected"){if(e.length>0&&function(n,t,e){return e.some(r=>FE(n,t,r)&&W2(r)!==jc)}(n,e,r)){const F=new Qc(t,function(n,t,e,r){const s={};s[jc]=r,r._sourceSegment=n,r._segmentIndexShift=t.length;for(const p of e)if(""===p.path&&W2(p)!==jc){const F=new Qc([],{});F._sourceSegment=n,F._segmentIndexShift=t.length,s[W2(p)]=F}return s}(n,t,r,new Qc(e,n.children)));return F._sourceSegment=n,F._segmentIndexShift=t.length,{segmentGroup:F,slicedSegments:[]}}if(0===e.length&&function(n,t,e){return e.some(r=>FE(n,t,r))}(n,e,r)){const F=new Qc(n.segments,function(n,t,e,r,s,p){const F={};for(const z of r)if(FE(n,e,z)&&!s[W2(z)]){const te=new Qc([],{});te._sourceSegment=n,te._segmentIndexShift="legacy"===p?n.segments.length:t.length,F[W2(z)]=te}return Object.assign(Object.assign({},s),F)}(n,t,e,r,n.children,s));return F._sourceSegment=n,F._segmentIndexShift=t.length,{segmentGroup:F,slicedSegments:e}}const p=new Qc(n.segments,n.children);return p._sourceSegment=n,p._segmentIndexShift=t.length,{segmentGroup:p,slicedSegments:e}}function FE(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function IU(n,t,e,r){return!!(W2(n)===r||r!==jc&&FE(t,e,n))&&("**"===n.path||NE(t,n,e).matched)}function SU(n,t,e){return 0===t.length&&!n.children[e]}class F_{constructor(t){this.segmentGroup=t||null}}class kU{constructor(t){this.urlTree=t}}function LE(n){return new O.y(t=>t.error(new F_(n)))}function CU(n){return new O.y(t=>t.error(new kU(n)))}function Dne(n){return new O.y(t=>t.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${n}'`)))}class Nne{constructor(t,e,r,s,p){this.configLoader=e,this.urlSerializer=r,this.urlTree=s,this.config=p,this.allowRedirects=!0,this.ngModule=t.get(F2)}apply(){const t=BE(this.urlTree.root,[],[],this.config).segmentGroup,e=new Qc(t.segments,t.children);return this.expandSegmentGroup(this.ngModule,this.config,e,jc).pipe((0,ll.U)(p=>this.createUrlTree(TO(p),this.urlTree.queryParams,this.urlTree.fragment))).pipe((0,H3.K)(p=>{if(p instanceof kU)return this.allowRedirects=!1,this.match(p.urlTree);throw p instanceof F_?this.noMatchError(p):p}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,jc).pipe((0,ll.U)(s=>this.createUrlTree(TO(s),t.queryParams,t.fragment))).pipe((0,H3.K)(s=>{throw s instanceof F_?this.noMatchError(s):s}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,r){const s=t.segments.length>0?new Qc([],{[jc]:t}):t;return new $3(s,e,r)}expandSegmentGroup(t,e,r,s){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(t,e,r).pipe((0,ll.U)(p=>new Qc([],p))):this.expandSegment(t,r,e,r.segments,s,!0)}expandChildren(t,e,r){const s=[];for(const p of Object.keys(r.children))"primary"===p?s.unshift(p):s.push(p);return(0,Tm.D)(s).pipe((0,C_.b)(p=>{const F=r.children[p],z=TU(e,p);return this.expandSegmentGroup(t,z,F,p).pipe((0,ll.U)(te=>({segment:te,outlet:p})))}),(0,WL.R)((p,F)=>(p[F.outlet]=F.segment,p),{}),(0,Ste.Z)())}expandSegment(t,e,r,s,p,F){return(0,Tm.D)(r).pipe((0,C_.b)(z=>this.expandSegmentAgainstRoute(t,e,r,z,s,p,F).pipe((0,H3.K)(fe=>{if(fe instanceof F_)return(0,bu.of)(null);throw fe}))),(0,b5.P)(z=>!!z),(0,H3.K)((z,te)=>{if(z instanceof Tte.K||"EmptyError"===z.name){if(SU(e,s,p))return(0,bu.of)(new Qc([],{}));throw new F_(e)}throw z}))}expandSegmentAgainstRoute(t,e,r,s,p,F,z){return IU(s,e,p,F)?void 0===s.redirectTo?this.matchSegmentAgainstRoute(t,e,s,p,F):z&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F):LE(e):LE(e)}expandSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F){return"**"===s.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,r,s,F):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,r,s){const p=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?CU(p):this.lineralizeSegments(r,p).pipe((0,z1.zg)(F=>{const z=new Qc(F,{});return this.expandSegment(t,z,e,F,s,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,s,p,F){const{matched:z,consumedSegments:te,lastChild:fe,positionalParamSegments:Re}=NE(e,s,p);if(!z)return LE(e);const $e=this.applyRedirectCommands(te,s.redirectTo,Re);return s.redirectTo.startsWith("/")?CU($e):this.lineralizeSegments(s,$e).pipe((0,z1.zg)(rt=>this.expandSegment(t,e,r,rt.concat(p.slice(fe)),F,!1)))}matchSegmentAgainstRoute(t,e,r,s,p){if("**"===r.path)return r.loadChildren?(r._loadedConfig?(0,bu.of)(r._loadedConfig):this.configLoader.load(t.injector,r)).pipe((0,ll.U)(rt=>(r._loadedConfig=rt,new Qc(s,{})))):(0,bu.of)(new Qc(s,{}));const{matched:F,consumedSegments:z,lastChild:te}=NE(e,r,s);if(!F)return LE(e);const fe=s.slice(te);return this.getChildConfig(t,r,s).pipe((0,z1.zg)($e=>{const rt=$e.module,ft=$e.routes,{segmentGroup:Tt,slicedSegments:Ft}=BE(e,z,fe,ft),Qt=new Qc(Tt.segments,Tt.children);if(0===Ft.length&&Qt.hasChildren())return this.expandChildren(rt,ft,Qt).pipe((0,ll.U)(_r=>new Qc(z,_r)));if(0===ft.length&&0===Ft.length)return(0,bu.of)(new Qc(z,{}));const wn=W2(r)===p;return this.expandSegment(rt,Qt,ft,Ft,wn?jc:p,!0).pipe((0,ll.U)(gr=>new Qc(z.concat(gr.segments),gr.children)))}))}getChildConfig(t,e,r){return e.children?(0,bu.of)(new xO(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?(0,bu.of)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,r).pipe((0,z1.zg)(s=>{return s?this.configLoader.load(t.injector,e).pipe((0,ll.U)(p=>(e._loadedConfig=p,p))):(n=e,new O.y(t=>t.error(dO(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`))));var n})):(0,bu.of)(new xO([],t))}runCanLoadGuards(t,e,r){const s=e.canLoad;if(!s||0===s.length)return(0,bu.of)(!0);const p=s.map(F=>{const z=t.get(F);let te;if((n=z)&&Z6(n.canLoad))te=z.canLoad(e,r);else{if(!Z6(z))throw new Error("Invalid CanLoad guard");te=z(e,r)}var n;return Sy(te)});return(0,bu.of)(p).pipe(B_(),(0,Vp.b)(F=>{if(!G3(F))return;const z=dO(`Redirecting to "${this.urlSerializer.serialize(F)}"`);throw z.url=F,z}),(0,ll.U)(F=>!0===F))}lineralizeSegments(t,e){let r=[],s=e.root;for(;;){if(r=r.concat(s.segments),0===s.numberOfChildren)return(0,bu.of)(r);if(s.numberOfChildren>1||!s.children[jc])return Dne(t.redirectTo);s=s.children[jc]}}applyRedirectCommands(t,e,r){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,r)}applyRedirectCreatreUrlTree(t,e,r,s){const p=this.createSegmentGroup(t,e.root,r,s);return new $3(p,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const r={};return Gp(t,(s,p)=>{if("string"==typeof s&&s.startsWith(":")){const z=s.substring(1);r[p]=e[z]}else r[p]=s}),r}createSegmentGroup(t,e,r,s){const p=this.createSegments(t,e.segments,r,s);let F={};return Gp(e.children,(z,te)=>{F[te]=this.createSegmentGroup(t,z,r,s)}),new Qc(p,F)}createSegments(t,e,r,s){return e.map(p=>p.path.startsWith(":")?this.findPosParam(t,p,s):this.findOrReturn(p,r))}findPosParam(t,e,r){const s=r[e.path.substring(1)];if(!s)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return s}findOrReturn(t,e){let r=0;for(const s of e){if(s.path===t.path)return e.splice(r),s;r++}return t}}function TO(n){const t={};for(const r of Object.keys(n.children)){const p=TO(n.children[r]);(p.segments.length>0||p.hasChildren())&&(t[r]=p)}return function(n){if(1===n.numberOfChildren&&n.children[jc]){const t=n.children[jc];return new Qc(n.segments.concat(t.segments),t.children)}return n}(new Qc(n.segments,t))}class MU{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class UE{constructor(t,e){this.component=t,this.route=e}}function Lne(n,t,e){const r=n._root;return L_(r,t?t._root:null,e,[r.value])}function jE(n,t,e){const r=function(n){if(!n)return null;for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(t);return(r?r.module.injector:e).get(n)}function L_(n,t,e,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const p=P_(t);return n.children.forEach(F=>{(function(n,t,e,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const p=n.value,F=t?t.value:null,z=e?e.getContext(n.value.outlet):null;if(F&&p.routeConfig===F.routeConfig){const te=function(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!W3(n.url,t.url);case"pathParamsOrQueryParamsChange":return!W3(n.url,t.url)||!Iy(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!bO(n,t)||!Iy(n.queryParams,t.queryParams);default:return!bO(n,t)}}(F,p,p.routeConfig.runGuardsAndResolvers);te?s.canActivateChecks.push(new MU(r)):(p.data=F.data,p._resolvedData=F._resolvedData),L_(n,t,p.component?z?z.children:null:e,r,s),te&&z&&z.outlet&&z.outlet.isActivated&&s.canDeactivateChecks.push(new UE(z.outlet.component,F))}else F&&U_(t,z,s),s.canActivateChecks.push(new MU(r)),L_(n,null,p.component?z?z.children:null:e,r,s)})(F,p[F.value.outlet],e,r.concat([F.value]),s),delete p[F.value.outlet]}),Gp(p,(F,z)=>U_(F,e.getContext(z),s)),s}function U_(n,t,e){const r=P_(n),s=n.value;Gp(r,(p,F)=>{U_(p,s.component?t?t.children.getContext(F):null:t,e)}),e.canDeactivateChecks.push(new UE(s.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,s))}class Jne{}function OU(n){return new O.y(t=>t.error(n))}class Qne{constructor(t,e,r,s,p,F){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=s,this.paramsInheritanceStrategy=p,this.relativeLinkResolution=F}recognize(){const t=BE(this.urlTree.root,[],[],this.config.filter(F=>void 0===F.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,jc);if(null===e)return null;const r=new OE([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},jc,this.rootComponentType,null,this.urlTree.root,-1,{}),s=new Rb(r,e),p=new hU(this.url,s);return this.inheritParamsAndData(p._root),p}inheritParamsAndData(t){const e=t.value,r=fU(e,this.paramsInheritanceStrategy);e.params=Object.freeze(r.params),e.data=Object.freeze(r.data),t.children.forEach(s=>this.inheritParamsAndData(s))}processSegmentGroup(t,e,r){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,r)}processChildren(t,e){const r=[];for(const p of Object.keys(e.children)){const F=e.children[p],z=TU(t,p),te=this.processSegmentGroup(z,F,p);if(null===te)return null;r.push(...te)}const s=DU(r);return s.sort((t,e)=>t.value.outlet===jc?-1:e.value.outlet===jc?1:t.value.outlet.localeCompare(e.value.outlet)),s}processSegment(t,e,r,s){for(const p of t){const F=this.processSegmentAgainstRoute(p,e,r,s);if(null!==F)return F}return SU(e,r,s)?[]:null}processSegmentAgainstRoute(t,e,r,s){if(t.redirectTo||!IU(t,e,r,s))return null;let p,F=[],z=[];if("**"===t.path){const ft=r.length>0?QL(r).parameters:{};p=new OE(r,ft,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,NU(t),W2(t),t.component,t,PU(e),RU(e)+r.length,BU(t))}else{const ft=NE(e,t,r);if(!ft.matched)return null;F=ft.consumedSegments,z=r.slice(ft.lastChild),p=new OE(F,ft.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,NU(t),W2(t),t.component,t,PU(e),RU(e)+F.length,BU(t))}const te=(n=t).children?n.children:n.loadChildren?n._loadedConfig.routes:[],{segmentGroup:fe,slicedSegments:Re}=BE(e,F,z,te.filter(ft=>void 0===ft.redirectTo),this.relativeLinkResolution);var n;if(0===Re.length&&fe.hasChildren()){const ft=this.processChildren(te,fe);return null===ft?null:[new Rb(p,ft)]}if(0===te.length&&0===Re.length)return[new Rb(p,[])];const $e=W2(t)===s,rt=this.processSegment(te,fe,Re,$e?jc:s);return null===rt?null:[new Rb(p,rt)]}}function nre(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function DU(n){const t=[],e=new Set;for(const r of n){if(!nre(r)){t.push(r);continue}const s=t.find(p=>r.value.routeConfig===p.value.routeConfig);void 0!==s?(s.children.push(...r.children),e.add(s)):t.push(r)}for(const r of e){const s=DU(r.children);t.push(new Rb(r.value,s))}return t.filter(r=>!e.has(r))}function PU(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function RU(n){let t=n,e=t._segmentIndexShift?t._segmentIndexShift:0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift?t._segmentIndexShift:0;return e-1}function NU(n){return n.data||{}}function BU(n){return n.resolve||{}}function AO(n){return(0,Rg.w)(t=>{const e=n(t);return e?(0,Tm.D)(e).pipe((0,ll.U)(()=>t)):(0,bu.of)(t)})}class lre extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const IO=new fo("ROUTES");class FU{constructor(t,e,r,s){this.loader=t,this.compiler=e,this.onLoadStartListener=r,this.onLoadEndListener=s}load(t,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const s=this.loadModuleFactory(e.loadChildren).pipe((0,ll.U)(p=>{this.onLoadEndListener&&this.onLoadEndListener(e);const F=p.create(t);return new xO(XL(F.injector.get(IO,void 0,Ee.Self|Ee.Optional)).map(EO),F)}),(0,H3.K)(p=>{throw e._loader$=void 0,p}));return e._loader$=new Ite.c(s,()=>new ie.xQ).pipe((0,kte.x)()),e._loader$}loadModuleFactory(t){return"string"==typeof t?(0,Tm.D)(this.loader.load(t)):Sy(t()).pipe((0,z1.zg)(e=>e instanceof Ax?(0,bu.of)(e):(0,Tm.D)(this.compiler.compileModuleAsync(e))))}}class dre{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new _5,this.attachRef=null}}class _5{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const r=this.getOrCreateContext(t);r.outlet=e,this.contexts.set(t,r)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new dre,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class hre{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function pre(n){throw n}function mre(n,t,e){return t.parse("/")}function LU(n,t){return(0,bu.of)(null)}const gre={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},yre={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let _0=(()=>{class n{constructor(e,r,s,p,F,z,te,fe){this.rootComponentType=e,this.urlSerializer=r,this.rootContexts=s,this.location=p,this.config=fe,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new ie.xQ,this.errorHandler=pre,this.malformedUriErrorHandler=mre,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:LU,afterPreactivation:LU},this.urlHandlingStrategy=new hre,this.routeReuseStrategy=new lre,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=F.get(F2),this.console=F.get(o7);const rt=F.get(pa);this.isNgZoneEnabled=rt instanceof pa&&pa.isInAngularZone(),this.resetConfig(fe),this.currentUrlTree=new $3(new Qc([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new FU(z,te,ft=>this.triggerEvent(new qL(ft)),ft=>this.triggerEvent(new KL(ft))),this.routerState=dU(this.currentUrlTree,this.rootComponentType),this.transitions=new xd.X({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var e;return null===(e=this.location.getState())||void 0===e?void 0:e.\u0275routerPageId}setupNavigations(e){const r=this.events;return e.pipe((0,lp.h)(s=>0!==s.id),(0,ll.U)(s=>Object.assign(Object.assign({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),(0,Rg.w)(s=>{let p=!1,F=!1;return(0,bu.of)(s).pipe((0,Vp.b)(z=>{this.currentNavigation={id:z.id,initialUrl:z.currentRawUrl,extractedUrl:z.extractedUrl,trigger:z.source,extras:z.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),(0,Rg.w)(z=>{const te=this.browserUrlTree.toString(),fe=!this.navigated||z.extractedUrl.toString()!==te||te!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||fe)&&this.urlHandlingStrategy.shouldProcessUrl(z.rawUrl))return VE(z.source)&&(this.browserUrlTree=z.extractedUrl),(0,bu.of)(z).pipe((0,Rg.w)($e=>{const rt=this.transitions.getValue();return r.next(new lO($e.id,this.serializeUrl($e.extractedUrl),$e.source,$e.restoredState)),rt!==this.transitions.getValue()?o5.E:Promise.resolve($e)}),function(n,t,e,r){return(0,Rg.w)(s=>function(n,t,e,r,s){return new Nne(n,t,e,r,s).apply()}(n,t,e,s.extractedUrl,r).pipe((0,ll.U)(p=>Object.assign(Object.assign({},s),{urlAfterRedirects:p}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),(0,Vp.b)($e=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:$e.urlAfterRedirects})}),function(n,t,e,r,s){return(0,z1.zg)(p=>function(n,t,e,r,s="emptyOnly",p="legacy"){try{const F=new Qne(n,t,e,r,s,p).recognize();return null===F?OU(new Jne):(0,bu.of)(F)}catch(F){return OU(F)}}(n,t,p.urlAfterRedirects,e(p.urlAfterRedirects),r,s).pipe((0,ll.U)(F=>Object.assign(Object.assign({},p),{targetSnapshot:F}))))}(this.rootComponentType,this.config,$e=>this.serializeUrl($e),this.paramsInheritanceStrategy,this.relativeLinkResolution),(0,Vp.b)($e=>{"eager"===this.urlUpdateStrategy&&($e.extras.skipLocationChange||this.setBrowserUrl($e.urlAfterRedirects,$e),this.browserUrlTree=$e.urlAfterRedirects);const rt=new Ote($e.id,this.serializeUrl($e.extractedUrl),this.serializeUrl($e.urlAfterRedirects),$e.targetSnapshot);r.next(rt)}));if(fe&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:rt,extractedUrl:ft,source:Tt,restoredState:Ft,extras:Qt}=z,wn=new lO(rt,this.serializeUrl(ft),Tt,Ft);r.next(wn);const An=dU(ft,this.rootComponentType).snapshot;return(0,bu.of)(Object.assign(Object.assign({},z),{targetSnapshot:An,urlAfterRedirects:ft,extras:Object.assign(Object.assign({},Qt),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=z.rawUrl,this.browserUrlTree=z.urlAfterRedirects,z.resolve(null),o5.E}),AO(z=>{const{targetSnapshot:te,id:fe,extractedUrl:Re,rawUrl:$e,extras:{skipLocationChange:rt,replaceUrl:ft}}=z;return this.hooks.beforePreactivation(te,{navigationId:fe,appliedUrlTree:Re,rawUrlTree:$e,skipLocationChange:!!rt,replaceUrl:!!ft})}),(0,Vp.b)(z=>{const te=new Dte(z.id,this.serializeUrl(z.extractedUrl),this.serializeUrl(z.urlAfterRedirects),z.targetSnapshot);this.triggerEvent(te)}),(0,ll.U)(z=>Object.assign(Object.assign({},z),{guards:Lne(z.targetSnapshot,z.currentSnapshot,this.rootContexts)})),function(n,t){return(0,z1.zg)(e=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:p,canDeactivateChecks:F}}=e;return 0===F.length&&0===p.length?(0,bu.of)(Object.assign(Object.assign({},e),{guardsResult:!0})):function(n,t,e,r){return(0,Tm.D)(n).pipe((0,z1.zg)(s=>function(n,t,e,r,s){const p=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!p||0===p.length)return(0,bu.of)(!0);const F=p.map(z=>{const te=jE(z,t,s);let fe;if(function(n){return n&&Z6(n.canDeactivate)}(te))fe=Sy(te.canDeactivate(n,t,e,r));else{if(!Z6(te))throw new Error("Invalid CanDeactivate guard");fe=Sy(te(n,t,e,r))}return fe.pipe((0,b5.P)())});return(0,bu.of)(F).pipe(B_())}(s.component,s.route,e,t,r)),(0,b5.P)(s=>!0!==s,!0))}(F,r,s,n).pipe((0,z1.zg)(z=>z&&function(n){return"boolean"==typeof n}(z)?function(n,t,e,r){return(0,Tm.D)(t).pipe((0,C_.b)(s=>(0,Ate.z)(function(n,t){return null!==n&&t&&t(new Bte(n)),(0,bu.of)(!0)}(s.route.parent,r),function(n,t){return null!==n&&t&&t(new Lte(n)),(0,bu.of)(!0)}(s.route,r),function(n,t,e){const r=t[t.length-1],p=t.slice(0,t.length-1).reverse().map(F=>function(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(F)).filter(F=>null!==F).map(F=>(0,$L.P)(()=>{const z=F.guards.map(te=>{const fe=jE(te,F.node,e);let Re;if(function(n){return n&&Z6(n.canActivateChild)}(fe))Re=Sy(fe.canActivateChild(r,n));else{if(!Z6(fe))throw new Error("Invalid CanActivateChild guard");Re=Sy(fe(r,n))}return Re.pipe((0,b5.P)())});return(0,bu.of)(z).pipe(B_())}));return(0,bu.of)(p).pipe(B_())}(n,s.path,e),function(n,t,e){const r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||0===r.length)return(0,bu.of)(!0);const s=r.map(p=>(0,$L.P)(()=>{const F=jE(p,t,e);let z;if(function(n){return n&&Z6(n.canActivate)}(F))z=Sy(F.canActivate(t,n));else{if(!Z6(F))throw new Error("Invalid CanActivate guard");z=Sy(F(t,n))}return z.pipe((0,b5.P)())}));return(0,bu.of)(s).pipe(B_())}(n,s.route,e))),(0,b5.P)(s=>!0!==s,!0))}(r,p,n,t):(0,bu.of)(z)),(0,ll.U)(z=>Object.assign(Object.assign({},e),{guardsResult:z})))})}(this.ngModule.injector,z=>this.triggerEvent(z)),(0,Vp.b)(z=>{if(G3(z.guardsResult)){const fe=dO(`Redirecting to "${this.serializeUrl(z.guardsResult)}"`);throw fe.url=z.guardsResult,fe}const te=new Pte(z.id,this.serializeUrl(z.extractedUrl),this.serializeUrl(z.urlAfterRedirects),z.targetSnapshot,!!z.guardsResult);this.triggerEvent(te)}),(0,lp.h)(z=>!!z.guardsResult||(this.restoreHistory(z),this.cancelNavigationTransition(z,""),!1)),AO(z=>{if(z.guards.canActivateChecks.length)return(0,bu.of)(z).pipe((0,Vp.b)(te=>{const fe=new Rte(te.id,this.serializeUrl(te.extractedUrl),this.serializeUrl(te.urlAfterRedirects),te.targetSnapshot);this.triggerEvent(fe)}),(0,Rg.w)(te=>{let fe=!1;return(0,bu.of)(te).pipe(function(n,t){return(0,z1.zg)(e=>{const{targetSnapshot:r,guards:{canActivateChecks:s}}=e;if(!s.length)return(0,bu.of)(e);let p=0;return(0,Tm.D)(s).pipe((0,C_.b)(F=>function(n,t,e,r){return function(n,t,e,r){const s=Object.keys(n);if(0===s.length)return(0,bu.of)({});const p={};return(0,Tm.D)(s).pipe((0,z1.zg)(F=>function(n,t,e,r){const s=jE(n,t,r);return Sy(s.resolve?s.resolve(t,e):s(t,e))}(n[F],t,e,r).pipe((0,Vp.b)(z=>{p[F]=z}))),(0,GL.h)(1),(0,z1.zg)(()=>Object.keys(p).length===s.length?(0,bu.of)(p):o5.E))}(n._resolve,n,t,r).pipe((0,ll.U)(p=>(n._resolvedData=p,n.data=Object.assign(Object.assign({},n.data),fU(n,e).resolve),null)))}(F.route,r,n,t)),(0,Vp.b)(()=>p++),(0,GL.h)(1),(0,z1.zg)(F=>p===s.length?(0,bu.of)(e):o5.E))})}(this.paramsInheritanceStrategy,this.ngModule.injector),(0,Vp.b)({next:()=>fe=!0,complete:()=>{fe||(this.restoreHistory(te),this.cancelNavigationTransition(te,"At least one route resolver didn't emit any value."))}}))}),(0,Vp.b)(te=>{const fe=new Nte(te.id,this.serializeUrl(te.extractedUrl),this.serializeUrl(te.urlAfterRedirects),te.targetSnapshot);this.triggerEvent(fe)}))}),AO(z=>{const{targetSnapshot:te,id:fe,extractedUrl:Re,rawUrl:$e,extras:{skipLocationChange:rt,replaceUrl:ft}}=z;return this.hooks.afterPreactivation(te,{navigationId:fe,appliedUrlTree:Re,rawUrlTree:$e,skipLocationChange:!!rt,replaceUrl:!!ft})}),(0,ll.U)(z=>{const te=function(n,t,e){const r=DE(n,t._root,e?e._root:void 0);return new lU(r,t)}(this.routeReuseStrategy,z.targetSnapshot,z.currentRouterState);return Object.assign(Object.assign({},z),{targetRouterState:te})}),(0,Vp.b)(z=>{this.currentUrlTree=z.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(z.urlAfterRedirects,z.rawUrl),this.routerState=z.targetRouterState,"deferred"===this.urlUpdateStrategy&&(z.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,z),this.browserUrlTree=z.urlAfterRedirects)}),((n,t,e)=>(0,ll.U)(r=>(new vne(t,r.targetRouterState,r.currentRouterState,e).activate(n),r)))(this.rootContexts,this.routeReuseStrategy,z=>this.triggerEvent(z)),(0,Vp.b)({next(){p=!0},complete(){p=!0}}),(0,Cte.x)(()=>{var z;if(!p&&!F){const te=`Navigation ID ${s.id} is not equal to the current navigation id ${this.navigationId}`;"replace"===this.canceledNavigationResolution?(this.restoreHistory(s),this.cancelNavigationTransition(s,te)):this.cancelNavigationTransition(s,te)}(null===(z=this.currentNavigation)||void 0===z?void 0:z.id)===s.id&&(this.currentNavigation=null)}),(0,H3.K)(z=>{if(F=!0,function(n){return n&&n[YL]}(z)){const te=G3(z.url);te||(this.navigated=!0,this.restoreHistory(s,!0));const fe=new zL(s.id,this.serializeUrl(s.extractedUrl),z.message);r.next(fe),te?setTimeout(()=>{const Re=this.urlHandlingStrategy.merge(z.url,this.rawUrlTree),$e={skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||VE(s.source)};this.scheduleNavigation(Re,"imperative",null,$e,{resolve:s.resolve,reject:s.reject,promise:s.promise})},0):s.resolve(!1)}else{this.restoreHistory(s,!0);const te=new Mte(s.id,this.serializeUrl(s.extractedUrl),z);r.next(te);try{s.resolve(this.errorHandler(z))}catch(fe){s.reject(fe)}}return o5.E}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}getTransition(){const e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const r=this.extractLocationChangeInfoFromEvent(e);this.shouldScheduleNavigation(this.lastLocationChangeInfo,r)&&setTimeout(()=>{const{source:s,state:p,urlTree:F}=r,z={replaceUrl:!0};if(p){const te=Object.assign({},p);delete te.navigationId,delete te.\u0275routerPageId,0!==Object.keys(te).length&&(z.state=te)}this.scheduleNavigation(F,s,p,z)},0),this.lastLocationChangeInfo=r}))}extractLocationChangeInfoFromEvent(e){var r;return{source:"popstate"===e.type?"popstate":"hashchange",urlTree:this.parseUrl(e.url),state:(null===(r=e.state)||void 0===r?void 0:r.navigationId)?e.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(e,r){if(!e)return!0;const s=r.urlTree.toString()===e.urlTree.toString();return r.transitionId!==e.transitionId||!s||!("hashchange"===r.source&&"popstate"===e.source||"popstate"===r.source&&"hashchange"===e.source)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){EU(e),this.config=e.map(EO),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,r={}){const{relativeTo:s,queryParams:p,fragment:F,queryParamsHandling:z,preserveFragment:te}=r,fe=s||this.routerState.root,Re=te?this.currentUrlTree.fragment:F;let $e=null;switch(z){case"merge":$e=Object.assign(Object.assign({},this.currentUrlTree.queryParams),p);break;case"preserve":$e=this.currentUrlTree.queryParams;break;default:$e=p||null}return null!==$e&&($e=this.removeEmptyProps($e)),function(n,t,e,r,s){if(0===e.length)return vO(t.root,t.root,t,r,s);const p=function(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new yU(!0,0,n);let t=0,e=!1;const r=n.reduce((s,p,F)=>{if("object"==typeof p&&null!=p){if(p.outlets){const z={};return Gp(p.outlets,(te,fe)=>{z[fe]="string"==typeof te?te.split("/"):te}),[...s,{outlets:z}]}if(p.segmentPath)return[...s,p.segmentPath]}return"string"!=typeof p?[...s,p]:0===F?(p.split("/").forEach((z,te)=>{0==te&&"."===z||(0==te&&""===z?e=!0:".."===z?t++:""!=z&&s.push(z))}),s):[...s,p]},[]);return new yU(e,t,r)}(e);if(p.toRoot())return vO(t.root,new Qc([],{}),t,r,s);const F=function(n,t,e){if(n.isAbsolute)return new _O(t.root,!0,0);if(-1===e.snapshot._lastPathIndex){const p=e.snapshot._urlSegment;return new _O(p,p===t.root,0)}const r=PE(n.commands[0])?0:1;return function(n,t,e){let r=n,s=t,p=e;for(;p>s;){if(p-=s,r=r.parent,!r)throw new Error("Invalid number of '../'");s=r.segments.length}return new _O(r,!1,s-p)}(e.snapshot._urlSegment,e.snapshot._lastPathIndex+r,n.numberOfDoubleDots)}(p,t,n),z=F.processChildren?RE(F.segmentGroup,F.index,p.commands):bU(F.segmentGroup,F.index,p.commands);return vO(F.segmentGroup,z,t,r,s)}(fe,this.currentUrlTree,e,$e,Re??null)}navigateByUrl(e,r={skipLocationChange:!1}){const s=G3(e)?e:this.parseUrl(e),p=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(p,"imperative",null,r)}navigate(e,r={skipLocationChange:!1}){return function(n){for(let t=0;t{const p=e[s];return null!=p&&(r[s]=p),r},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new M_(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,r,s,p,F){var z,te;if(this.disposed)return Promise.resolve(!1);const fe=this.getTransition(),Re=VE(r)&&fe&&!VE(fe.source),ft=(this.lastSuccessfulId===fe.id||this.currentNavigation?fe.rawUrl:fe.urlAfterRedirects).toString()===e.toString();if(Re&&ft)return Promise.resolve(!0);let Tt,Ft,Qt;F?(Tt=F.resolve,Ft=F.reject,Qt=F.promise):Qt=new Promise((gr,_r)=>{Tt=gr,Ft=_r});const wn=++this.navigationId;let An;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(s=this.location.getState()),An=s&&s.\u0275routerPageId?s.\u0275routerPageId:p.replaceUrl||p.skipLocationChange?null!==(z=this.browserPageId)&&void 0!==z?z:0:(null!==(te=this.browserPageId)&&void 0!==te?te:0)+1):An=0,this.setTransition({id:wn,targetPageId:An,source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:p,resolve:Tt,reject:Ft,promise:Qt,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),Qt.catch(gr=>Promise.reject(gr))}setBrowserUrl(e,r){const s=this.urlSerializer.serialize(e),p=Object.assign(Object.assign({},r.extras.state),this.generateNgRouterState(r.id,r.targetPageId));this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl?this.location.replaceState(s,"",p):this.location.go(s,"",p)}restoreHistory(e,r=!1){var s,p;if("computed"===this.canceledNavigationResolution){const F=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(s=this.currentNavigation)||void 0===s?void 0:s.finalUrl)||0===F?this.currentUrlTree===(null===(p=this.currentNavigation)||void 0===p?void 0:p.finalUrl)&&0===F&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(F)}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(e,r){const s=new zL(e.id,this.serializeUrl(e.extractedUrl),r);this.triggerEvent(s),e.resolve(!1)}generateNgRouterState(e,r){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}}return n.\u0275fac=function(e){return new(e||n)(Yn(Tf),Yn(fO),Yn(_5),Yn(v7),Yn(sc),Yn(u7),Yn(S3),Yn(void 0))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function VE(n){return"imperative"!==n}let HE=(()=>{class n{constructor(e,r,s,p,F){this.router=e,this.route=r,this.commands=[],this.onChanges=new ie.xQ,null==s&&p.setAttribute(F.nativeElement,"tabindex","0")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}onClick(){const e={skipLocationChange:w5(this.skipLocationChange),replaceUrl:w5(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:w5(this.preserveFragment)})}}return n.\u0275fac=function(e){return new(e||n)(Xt(_0),Xt(ky),Sd("tabindex"),Xt(sh),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,r){1&e&&dr("click",function(){return r.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[rr]}),n})(),Y6=(()=>{class n{constructor(e,r,s){this.router=e,this.route=r,this.locationStrategy=s,this.commands=[],this.onChanges=new ie.xQ,this.subscription=e.events.subscribe(p=>{p instanceof M_&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,r,s,p,F){if(0!==e||r||s||p||F||"string"==typeof this.target&&"_self"!=this.target)return!0;const z={skipLocationChange:w5(this.skipLocationChange),replaceUrl:w5(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,z),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:w5(this.preserveFragment)})}}return n.\u0275fac=function(e){return new(e||n)(Xt(_0),Xt(ky),Xt(s5))},n.\u0275dir=Tn({type:n,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,r){1&e&&dr("click",function(p){return r.onClick(p.button,p.ctrlKey,p.shiftKey,p.altKey,p.metaKey)}),2&e&&(ip("href",r.href,Pi),Cu("target",r.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[rr]}),n})();function w5(n){return""===n||!!n}let UU=(()=>{class n{constructor(e,r,s,p,F,z){this.router=e,this.element=r,this.renderer=s,this.cdr=p,this.link=F,this.linkWithHref=z,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=e.events.subscribe(te=>{te instanceof M_&&this.update()})}ngAfterContentInit(){(0,bu.of)(this.links.changes,this.linksWithHrefs.changes,(0,bu.of)(null)).pipe((0,cO.J)()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var e;null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe();const r=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(s=>!!s).map(s=>s.onChanges);this.linkInputChangesSubscription=(0,Tm.D)(r).pipe((0,cO.J)()).subscribe(s=>{this.isActive!==this.isLinkActive(this.router)(s)&&this.update()})}set routerLinkActive(e){const r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(s=>!!s)}ngOnChanges(e){this.update()}ngOnDestroy(){var e;this.routerEventsSubscription.unsubscribe(),null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe()}update(){!this.links||!this.linksWithHrefs||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this.isActive!==e&&(this.isActive=e,this.cdr.markForCheck(),this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}))})}isLinkActive(e){const r=function(n){return!!n.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return s=>e.isActive(s.urlTree,r)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.linkWithHref&&e(this.linkWithHref)||this.links.some(e)||this.linksWithHrefs.some(e)}}return n.\u0275fac=function(e){return new(e||n)(Xt(_0),Xt(wa),Xt(sh),Xt(yf),Xt(HE,8),Xt(Y6,8))},n.\u0275dir=Tn({type:n,selectors:[["","routerLinkActive",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,HE,5),wo(s,Y6,5)),2&e){let p;gs(p=ho())&&(r.links=p),gs(p=ho())&&(r.linksWithHrefs=p)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[rr]}),n})(),SO=(()=>{class n{constructor(e,r,s,p,F){this.parentContexts=e,this.location=r,this.resolver=s,this.changeDetector=F,this.activated=null,this._activatedRoute=null,this.activateEvents=new mo,this.deactivateEvents=new mo,this.name=p||jc,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const F=(r=r||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),z=this.parentContexts.getOrCreateContext(this.name).children,te=new _re(e,z,this.location.injector);this.activated=this.location.createComponent(F,this.location.length,te),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(e){return new(e||n)(Xt(_5),Xt(Zf),Xt(l1),Sd("name"),Xt(yf))},n.\u0275dir=Tn({type:n,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),n})();class _re{constructor(t,e,r){this.route=t,this.childContexts=e,this.parent=r}get(t,e){return t===ky?this.route:t===_5?this.childContexts:this.parent.get(t,e)}}class jU{}class VU{preload(t,e){return(0,bu.of)(null)}}let HU=(()=>{class n{constructor(e,r,s,p,F){this.router=e,this.injector=p,this.preloadingStrategy=F,this.loader=new FU(r,s,fe=>e.triggerEvent(new qL(fe)),fe=>e.triggerEvent(new KL(fe)))}setUpPreloading(){this.subscription=this.router.events.pipe((0,lp.h)(e=>e instanceof M_),(0,C_.b)(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(F2);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){const s=[];for(const p of r)if(p.loadChildren&&!p.canLoad&&p._loadedConfig){const F=p._loadedConfig;s.push(this.processRoutes(F.module,F.routes))}else p.loadChildren&&!p.canLoad?s.push(this.preloadConfig(e,p)):p.children&&s.push(this.processRoutes(e,p.children));return(0,Tm.D)(s).pipe((0,cO.J)(),(0,ll.U)(p=>{}))}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>(r._loadedConfig?(0,bu.of)(r._loadedConfig):this.loader.load(e.injector,r)).pipe((0,z1.zg)(p=>(r._loadedConfig=p,this.processRoutes(p.module,p.routes)))))}}return n.\u0275fac=function(e){return new(e||n)(Yn(_0),Yn(u7),Yn(S3),Yn(sc),Yn(jU))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),kO=(()=>{class n{constructor(e,r,s={}){this.router=e,this.viewportScroller=r,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof lO?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof M_&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof ZL&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,r){this.router.triggerEvent(new ZL(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(Yn(_0),Yn(mN),Yn(void 0))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();const z3=new fo("ROUTER_CONFIGURATION"),$U=new fo("ROUTER_FORROOT_GUARD"),xre=[v7,{provide:fO,useClass:sU},{provide:_0,useFactory:function(n,t,e,r,s,p,F,z={},te,fe){const Re=new _0(null,n,t,e,r,s,p,XL(F));return te&&(Re.urlHandlingStrategy=te),fe&&(Re.routeReuseStrategy=fe),function(n,t){n.errorHandler&&(t.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(t.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(t.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(t.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(t.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(t.urlUpdateStrategy=n.urlUpdateStrategy)}(z,Re),z.enableTracing&&Re.events.subscribe($e=>{var rt,ft;null===(rt=console.group)||void 0===rt||rt.call(console,`Router Event: ${$e.constructor.name}`),console.log($e.toString()),console.log($e),null===(ft=console.groupEnd)||void 0===ft||ft.call(console)}),Re},deps:[fO,_5,v7,sc,u7,S3,IO,z3,[class{},new Bl],[class{},new Bl]]},_5,{provide:ky,useFactory:function(n){return n.routerState.root},deps:[_0]},{provide:u7,useClass:jG},HU,VU,class{preload(t,e){return e().pipe((0,H3.K)(()=>(0,bu.of)(null)))}},{provide:z3,useValue:{enableTracing:!1}}];function Ere(){return new iC("Router",_0)}let WU=(()=>{class n{constructor(e,r){}static forRoot(e,r){return{ngModule:n,providers:[xre,GU(e),{provide:$U,useFactory:Ire,deps:[[_0,new Bl,new qc]]},{provide:z3,useValue:r||{}},{provide:s5,useFactory:Are,deps:[M3,[new l0(wC),new Bl],z3]},{provide:kO,useFactory:Tre,deps:[_0,mN,z3]},{provide:jU,useExisting:r&&r.preloadingStrategy?r.preloadingStrategy:VU},{provide:iC,multi:!0,useFactory:Ere},[CO,{provide:t_,multi:!0,useFactory:Mre,deps:[CO]},{provide:zU,useFactory:Ore,deps:[CO]},{provide:sR,multi:!0,useExisting:zU}]]}}static forChild(e){return{ngModule:n,providers:[GU(e)]}}}return n.\u0275fac=function(e){return new(e||n)(Yn($U,8),Yn(_0,8))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();function Tre(n,t,e){return e.scrollOffset&&t.setOffset(e.scrollOffset),new kO(n,t,e)}function Are(n,t,e={}){return e.useHash?new oq(n,t):new KR(n,t)}function Ire(n){return"guarded"}function GU(n){return[{provide:ff,multi:!0,useValue:n},{provide:IO,multi:!0,useValue:n}]}let CO=(()=>{class n{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new ie.xQ}appInitializer(){return this.injector.get(rq,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let r=null;const s=new Promise(z=>r=z),p=this.injector.get(_0),F=this.injector.get(z3);return"disabled"===F.initialNavigation?(p.setUpLocationChangeListener(),r(!0)):"enabled"===F.initialNavigation||"enabledBlocking"===F.initialNavigation?(p.hooks.afterPreactivation=()=>this.initNavigation?(0,bu.of)(null):(this.initNavigation=!0,r(!0),this.resultOfPreactivationDone),p.initialNavigation()):r(!0),s})}bootstrapListener(e){const r=this.injector.get(z3),s=this.injector.get(HU),p=this.injector.get(kO),F=this.injector.get(_0),z=this.injector.get(e2);e===z.components[0]&&(("enabledNonBlocking"===r.initialNavigation||void 0===r.initialNavigation)&&F.initialNavigation(),s.setUpPreloading(),p.init(),F.resetRootComponentType(z.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(e){return new(e||n)(Yn(sc))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();function Mre(n){return n.appInitializer.bind(n)}function Ore(n){return n.bootstrapListener.bind(n)}const zU=new fo("Router Initializer"),qi={ETHEREUM:1,GOERLI:5,OPTIMISM:10,POLYGON:137,ARBITRUM:42161},$E={[qi.ETHEREUM]:{chainId:"0x1",chainName:"Ethereum",displayName:"Ethereum",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"ETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://mainnet.infura.io/v3"],blockExplorerUrls:["https://etherscan.io"],iconPath:"assets/img/chains/ethereum-icon.png",uniswapFeeTier100:!0,useAccessList:!0},[qi.GOERLI]:{chainId:"0x5",chainName:"Goerli",displayName:"Goerli",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"ETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://goerli.infura.io/v3"],blockExplorerUrls:["https://goerli.etherscan.io"],iconPath:"assets/img/chains/ethereum-icon.png",uniswapFeeTier100:!1,useAccessList:!0},[qi.OPTIMISM]:{chainId:"0xa",chainName:"Optimism",displayName:"Optimism",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"ETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"],iconPath:"assets/img/chains/optimism-icon.svg",uniswapFeeTier100:!0,useAccessList:!1},[qi.POLYGON]:{chainId:"0x89",chainName:"Polygon Mainnet",displayName:"Polygon",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Matic Token",symbol:"MATIC",decimals:18,iconPath:"assets/img/tokens/matic.png"},rpcUrls:["https://polygon-rpc.com"],blockExplorerUrls:["https://polygonscan.com"],iconPath:"assets/img/chains/polygon-icon.png",uniswapFeeTier100:!0,useAccessList:!1},[qi.ARBITRUM]:{chainId:"0xa4b1",chainName:"Arbitrum One",displayName:"Arbitrum",nativeCurrency:{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",name:"Ethereum",symbol:"AETH",decimals:18,iconPath:"assets/img/tokens/eth.png"},rpcUrls:["https://arb1.arbitrum.io/rpc"],blockExplorerUrls:["https://arbiscan.io"],iconPath:"assets/img/chains/arbitrum-icon.svg",uniswapFeeTier100:!1,useAccessList:!1}},x5="0xb5087F95643A9a4069471A28d32C569D9bd57fE4".toLowerCase(),Pre="0xb73F303472C4fD4FF3B9f59ce0F9b13E47fbfD19".toLowerCase(),Rre="0xdf841e93c94cE3b777271FE5E130bf54Ae63C2c9".toLowerCase(),Nre="0x1F98431c8aD98523631AE4a59f267346ea31F984".toLowerCase(),Bre="0xC36442b4a4522E871399CD717aBDD847Ab11FE88".toLowerCase(),MO={[qi.ETHEREUM]:"0x9232a548dd9e81bac65500b5e0d918f8ba93675c000200000000000000000423".toLowerCase(),[qi.GOERLI]:"0xf3a605da753e9de545841de10ea8bffbd1da9c750002000000000000000002c7".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},J6={[qi.ETHEREUM]:"0x9232a548DD9E81BaC65500b5e0d918F8Ba93675C".toLowerCase(),[qi.GOERLI]:"0xF3a605DA753e9dE545841de10EA8bFfBd1Da9C75".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Am={[qi.ETHEREUM]:"0xf17d23136B4FeAd139f54fB766c8795faae09660".toLowerCase(),[qi.GOERLI]:"0xdcEBc9195fE9b8867fd017440ab9516406f475d6".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Cy={[qi.ETHEREUM]:"0x901c8aA6A61f74aC95E7f397E22A0Ac7c1242218".toLowerCase(),[qi.GOERLI]:"0xFe16CC67B62b10119BC03E7E7Bf2983f868f8CE5".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Fre={[qi.ETHEREUM]:"0xF087521Ffca0Fa8A43F5C445773aB37C5f574DA0".toLowerCase(),[qi.GOERLI]:"0x323a2Ace3038C503EccF3e6B612541F0a44fa022".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},qU=("0x4cc39AF0d46b0F66Fd33778C6629A696bDC310a0".toLowerCase(),"0x0Cb53d2dc899464a81d0e58b7B82838Ab264E0A1".toLowerCase(),"".toLowerCase(),"".toLowerCase(),"".toLowerCase(),{[qi.ETHEREUM]:"0x822E5828Cb9C0e2aD2DC5035577E6d63B672D0e2".toLowerCase(),[qi.GOERLI]:"0x8fd0Bc47CaE3358Bafa7DADd1A423D9bF877fe35".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()}),My={[qi.ETHEREUM]:"".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0xe4666F0937B62d64C10316DB0b7061549F87e95F".toLowerCase()},j_={[qi.ETHEREUM]:"0xe4666F0937B62d64C10316DB0b7061549F87e95F".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Lre={[qi.ETHEREUM]:"0x557692FDDCfa46D6E29959F73Fb14ae608680034".toLowerCase(),[qi.GOERLI]:"0x557692FDDCfa46D6E29959F73Fb14ae608680034".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x557692FDDCfa46D6E29959F73Fb14ae608680034".toLowerCase()},fp={[qi.ETHEREUM]:"0x541a2378589e280fdfdde6e53fb5ecf98a853fc2".toLowerCase(),[qi.GOERLI]:"0x0B5dC80CE93a2537c6dbeB4797B77077e1556804".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x541a2378589E280FDfDde6e53Fb5ECf98a853fC2".toLowerCase()},OO={[qi.ETHEREUM]:"0x951f99350d816c0E160A2C71DEfE828BdfC17f12".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Ure={[qi.ETHEREUM]:"0x9DDb2da7Dd76612e0df237B89AF2CF4413733212".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},KU={[qi.ETHEREUM]:"0x892b62134F51034CB256A040ca15769Ab26Af2E0".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},DO={[qi.ETHEREUM]:"".toLowerCase(),[qi.GOERLI]:"".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x093E035e9c2885b1b77B5632F92Fa7593f88E9B3".toLowerCase()},jre={[qi.ETHEREUM]:"https://gateway-arbitrum.network.thegraph.com/api/03ec489384944a6bb41fc11060876152/subgraphs/id/6EcVGBGhW8U6B9nd9uT1n5iDRMtH2evoJeaY5BXBCniM",[qi.GOERLI]:"https://api.thegraph.com/subgraphs/name/bunniapp/bunni-goerli-development",[qi.OPTIMISM]:"https://api.thegraph.com/subgraphs/name/bunniapp/bunni-optimism-development",[qi.POLYGON]:"https://api.thegraph.com/subgraphs/name/bunniapp/bunni-polygon-development",[qi.ARBITRUM]:"https://gateway-arbitrum.network.thegraph.com/api/03ec489384944a6bb41fc11060876152/subgraphs/id/i2zLpRQUj9TKGkAr2dpkf1iW1vx8THkXfDa7QMVx3N1"},Vre={[qi.ETHEREUM]:"https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks",[qi.GOERLI]:"https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks",[qi.OPTIMISM]:"https://api.thegraph.com/subgraphs/name/kybernetwork/optimism-blocks",[qi.POLYGON]:"https://api.thegraph.com/subgraphs/name/kybernetwork/polygon-blocks",[qi.ARBITRUM]:"https://api.thegraph.com/subgraphs/name/sushiswap/arbitrum-blocks"},ZU={[qi.ETHEREUM]:"https://eth-mainnet.alchemyapi.io/v2/Whqjb5i87dMAyACOf3S1Ajv89RabbZUc",[qi.GOERLI]:"https://eth-goerli.g.alchemy.com/v2/N5lNCz2WLC0yFrCc46qXcZThSXVGQyGV",[qi.OPTIMISM]:"https://opt-mainnet.g.alchemy.com/v2/B7MM2DSlWzEQ1O2F7WPDxI199rngkRpC",[qi.POLYGON]:"https://polygon-rpc.com",[qi.ARBITRUM]:"https://arb1.arbitrum.io/rpc"},Hre={[qi.ETHEREUM]:"https://api.0x.org",[qi.GOERLI]:"https://goerli.api.0x.org",[qi.OPTIMISM]:"https://optimism.api.0x.org",[qi.POLYGON]:"https://polygon.api.0x.org",[qi.ARBITRUM]:"https://arbitrum.api.0x.org"},Yw=class{constructor(){}get id(){return qi}get rpc(){return ZU}get metadata(){return $E}isL1(t){return this.isTestnet(t)||this.isMainnet(t)}isTestnet(t){return t===qi.GOERLI}isMainnet(t){return t===qi.ETHEREUM}isSupported(t){return!!$E[t]}zapSupported(t){return!!fp[t]}gaugeSupported(t){return!!Cy[t]||!!My[t]}idToSlug(t){return this.metadata[t].displayName.toLowerCase()}slugToId(t){return this.id[t.toUpperCase()]}};let dc=Yw;yt(dc,"\u0275fac",function(e){return new(e||Yw)}),yt(dc,"\u0275prov",we({token:Yw,factory:Yw.\u0275fac,providedIn:"root"}));const Jw=class{constructor(t,e){yt(this,"chain"),yt(this,"router"),this.chain=t,this.router=e}resolve(t){const e=t.paramMap.get("chainSlug");if(!e||Object.values(this.chain.metadata).find(r=>r.displayName.toLowerCase()===e))return null;this.router.navigate([""])}};let X6=Jw;yt(X6,"\u0275fac",function(e){return new(e||Jw)(Yn(dc),Yn(_0))}),yt(X6,"\u0275prov",we({token:Jw,factory:Jw.\u0275fac,providedIn:"root"}));var Br=Y(34553);const Oy="0x0000000000000000000000000000000000000000".toLowerCase(),WE="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLowerCase(),Q6={[qi.ETHEREUM]:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".toLowerCase(),[qi.GOERLI]:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6".toLowerCase(),[qi.OPTIMISM]:"0x4200000000000000000000000000000000000006".toLowerCase(),[qi.POLYGON]:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270".toLowerCase(),[qi.ARBITRUM]:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1".toLowerCase()},E5={[qi.ETHEREUM]:"0xfd0205066521550D7d7AB19DA8F72bb004b4C341".toLowerCase(),[qi.GOERLI]:"0xf5bE16a558e7756b770d14528Df5419f982E52bF".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"".toLowerCase()},Z1={[qi.ETHEREUM]:"0x627fee87d0D9D2c55098A06ac805Db8F98B158Aa".toLowerCase(),[qi.GOERLI]:"0x63390fB9257AaBF54fbB9aCCDE3b927Edd2fB4a2".toLowerCase(),[qi.OPTIMISM]:"".toLowerCase(),[qi.POLYGON]:"".toLowerCase(),[qi.ARBITRUM]:"0x0ffB33812FA5cd8bCE181Db3FD76E11935105B12".toLowerCase()},$re={BAL:"0xba100000625a3754423978a60c9317c58a424e3D".toLowerCase(),DAI:"0x6B175474E89094C44Da98b954EedeAC495271d0F".toLowerCase(),USDC:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48".toLowerCase(),USDT:"0xdAC17F958D2ee523a2206206994597C13D831ec7".toLowerCase(),WBTC:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599".toLowerCase(),WETH:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".toLowerCase(),STETH:"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84".toLowerCase(),SWETH:"0xf951E335afb289353dc249e82926178EaC7DEd78".toLowerCase(),WSTETH:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0".toLowerCase()},Wre={WETH:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6".toLowerCase()},Gre={DAI:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1".toLowerCase(),USDC:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607".toLowerCase(),USDT:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58".toLowerCase(),WBTC:"0x68f180fcCe6836688e9084f035309E29Bf0A2095".toLowerCase(),WETH:"0x4200000000000000000000000000000000000006".toLowerCase()},zre={DAI:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063".toLowerCase(),USDC:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174".toLowerCase(),USDT:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F".toLowerCase(),WBTC:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6".toLowerCase(),WETH:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619".toLowerCase()},qre={DAI:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1".toLowerCase(),USDC:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8".toLowerCase(),USDT:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9".toLowerCase(),WBTC:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f".toLowerCase(),WETH:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1".toLowerCase()},hp={[qi.ETHEREUM]:$re,[qi.GOERLI]:Wre,[qi.OPTIMISM]:Gre,[qi.POLYGON]:zre,[qi.ARBITRUM]:qre};var Kre=Y(53642),V_=Y.n(Kre);function Zre(n,t){1&n&&Gn(0,"span",9)}function Yre(n,t){1&n&&(Ae(0,"div",10),Ae(1,"span",11),kt(2,"Loading..."),Ie(),Ie())}function Jre(n,t){1&n&&(Ae(0,"strong",12),kt(1,"Transaction pending"),Ie())}function Xre(n,t){1&n&&(Ae(0,"strong",12),kt(1,"Transaction confirmed"),Ie())}const $A=class{constructor(t){yt(this,"chain"),yt(this,"hash"),yt(this,"hidden"),yt(this,"chainId"),yt(this,"timeout"),yt(this,"txConfirmed"),yt(this,"explorerLink"),yt(this,"toastrInstance"),this.chain=t}ngOnInit(){this.explorerLink=this.getExplorerLink()}getExplorerLink(){return this.chain.metadata[this.chainId].blockExplorerUrls[0]+"/tx/"+this.hash}closeToastr(){this.toastrInstance.toastRef.close()}};let GE=$A;yt(GE,"\u0275fac",function(e){return new(e||$A)(Xt(dc))}),yt(GE,"\u0275cmp",bn({type:$A,selectors:[["app-transaction-alert-modal"]],decls:11,vars:5,consts:[["role","alert","aria-live","assertive","aria-atomic","true",1,"toast","show","mt-2"],[1,"toast-header"],["class","fe fe-check-circle text-success me-2",4,"ngIf"],["class","spinner-grow spinner-grow-sm me-2","role","status",4,"ngIf"],["class","me-auto",4,"ngIf"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"toast-body"],["target","_blank",3,"href"],[1,"fe","fe-external-link"],[1,"fe","fe-check-circle","text-success","me-2"],["role","status",1,"spinner-grow","spinner-grow-sm","me-2"],[1,"visually-hidden"],[1,"me-auto"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),it(2,Zre,1,0,"span",2),it(3,Yre,3,0,"div",3),it(4,Jre,2,0,"strong",4),it(5,Xre,2,0,"strong",4),Ae(6,"button",5),dr("click",function(){return r.closeToastr()}),Ie(),Ie(),Ae(7,"div",6),Ae(8,"a",7),kt(9," View on Explorer "),Gn(10,"i",8),Ie(),Ie(),Ie()),2&e&&(ct(2),Ct("ngIf",r.txConfirmed),ct(1),Ct("ngIf",!r.txConfirmed),ct(1),Ct("ngIf",!r.txConfirmed),ct(1),Ct("ngIf",r.txConfirmed),ct(3),qu("href",r.explorerLink,Pi))},directives:[La],styles:[""]}));const WA=class{constructor(){yt(this,"error")}ngOnInit(){}};let zE=WA;yt(zE,"\u0275fac",function(e){return new(e||WA)}),yt(zE,"\u0275cmp",bn({type:WA,selectors:[["app-error-alert-modal"]],decls:8,vars:1,consts:[["role","alert","aria-live","assertive","aria-atomic","true",1,"toast","show","mt-2"],[1,"toast-header"],[1,"fe","fe-x-circle","text-danger","me-2"],[1,"me-auto","text-danger"],["type","button","data-bs-dismiss","toast","aria-label","Close",1,"btn-close"],[1,"toast-body"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Gn(2,"span",2),Ae(3,"strong",3),kt(4,"Transaction error"),Ie(),Gn(5,"button",4),Ie(),Ae(6,"div",5),kt(7),Ie(),Ie()),2&e&&(ct(7),Pr(" ",r.error.message," "))},styles:[""]}));var sn=Y(50404),Qre=Y(61488),PO=Y(61522),iie=Y(39144),Zu=(Y(23845),Y(1238),Y(18560)),Wl=Y(79696);Y(92280),Y(17522),Y(41413),Y(42624);const oie=function({darkMode:n=!1}={}){return()=>{return{label:"Coinbase Wallet",getIcon:(t=(0,Br.Z)(function*(){return(yield Y.e(1405).then(Y.bind(Y,31405))).default}),function(){return t.apply(this,arguments)}),getInterface:function(){var t=(0,Br.Z)(function*({chains:e,appMetadata:r}){const[s]=e,{name:p,icon:F}=r||{},{default:z}=yield Promise.all([Y.e(1865),Y.e(9938)]).then(Y.t.bind(Y,27235,19)),$e=new(z.default?z.default:z)({appName:p||"",appLogoUrl:`data:image/svg+xml;base64,${window.btoa(F||"")}`,darkMode:n}),rt=$e.makeWeb3Provider(s.rpcUrl,parseInt(s.id)),ft=rt.on.bind(rt);return rt.on=(Tt,Ft)=>(ft(Tt,Qt=>{Ft("chainChanged"!==Tt?Qt:`0x${Qt.toString(16)}`)}),rt),{provider:rt,instance:$e}});return function(r){return t.apply(this,arguments)}}()};var t}},uie=function(n){const{apiKey:t}=n;return()=>{return{label:"Fortmatic",getIcon:(e=(0,Br.Z)(function*(){return(yield Y.e(209).then(Y.bind(Y,50209))).default}),function(){return e.apply(this,arguments)}),getInterface:function(){var e=(0,Br.Z)(function*({EventEmitter:r,BigNumber:s,chains:p}){const{default:F}=yield Y.e(2071).then(Y.t.bind(Y,52071,19)),{createEIP1193Provider:z,ProviderRpcErrorCode:te,ProviderRpcError:fe}=yield Promise.resolve().then(Y.bind(Y,79696)),Re=new r;let ft,$e=new F(t,{chainId:parseInt(p[0].id),rpcUrl:p[0].rpcUrl||""}),rt=$e.getProvider();return ft=function Tt(){const Ft=z(rt,{eth_requestAccounts:(Qt=(0,Br.Z)(function*(){try{return yield $e.user.login()}catch(wn){const{code:An}=wn;if(-32603===An)throw new fe({code:te.ACCOUNT_ACCESS_REJECTED,message:"Account access rejected"});return[]}}),function(){return Qt.apply(this,arguments)}),eth_selectAccounts:null,eth_getBalance:function(){var Qt=(0,Br.Z)(function*(){const[wn]=yield $e.user.getBalances();return wn?s.from(wn.crypto_amount).mul("1000000000000000000").toString():"0"});return function(){return Qt.apply(this,arguments)}}(),wallet_switchEthereumChain:function(){var Qt=(0,Br.Z)(function*({params:wn}){const An=p.find(({id:gr})=>gr===wn[0].chainId);if(!An)throw new Error("chain must be set before switching");return $e=new F(t,{chainId:parseInt(An.id),rpcUrl:An.rpcUrl||""}),rt=$e.getProvider(),Re.emit("chainChanged",An.id),Tt(),null});return function(An){return Qt.apply(this,arguments)}}()});var Qt;return ft?(ft.request=Ft.request.bind(Ft),ft.send=Ft.send.bind(Ft),ft.sendAsync=Ft.sendAsync.bind(Ft),ft):(Ft.on=Re.on.bind(Re),Ft.disconnect=()=>()=>$e.user.logout(),Ft)}(),{provider:ft,instance:$e}});return function(s){return e.apply(this,arguments)}}()};var e}},fie=function(n){const{whitelistedDomains:t=[/^https:\/\/app\.safe\.global$/,/^https:\/\/safe\.global$/]}=n||{};return()=>{return window.self!==window.top?{label:"Safe",getIcon:(r=(0,Br.Z)(function*(){return(yield Y.e(7869).then(Y.bind(Y,17869))).default}),function(){return r.apply(this,arguments)}),getInterface:function(){var r=(0,Br.Z)(function*(){const{default:s}=yield Y.e(3605).then(Y.t.bind(Y,13605,19)),{SafeAppProvider:p}=yield Y.e(8369).then(Y.t.bind(Y,78369,19)),{createEIP1193Provider:F}=yield Promise.resolve().then(Y.bind(Y,79696)),fe=new(s.default||s)({whitelistedDomains:t}),Re=yield Promise.race([fe.safe.getInfo(),new Promise(ft=>setTimeout(ft,200))]);if(!Re)throw new Error('App must be loaded in a Safe App context, head to the Safe and open this website as an app.');return{provider:F(new p(Re,fe),{eth_requestAccounts:()=>Promise.resolve([Re.safeAddress])}),instance:fe}});return function(){return r.apply(this,arguments)}}()}:[];var r}};var hie=Y(21930),Xo=(()=>{return(n=Xo||(Xo={})).AlphaWallet="isAlphaWallet",n.ApexWallet="isApexWallet",n.AToken="isAToken",n.BifrostWallet="isBifrost",n.Binance="bbcSignTx",n.Bitpie="isBitpie",n.BlockWallet="isBlockWallet",n.Coinbase="isToshi",n.CoinbaseExtension="isCoinbaseWallet",n.Detected="request",n.Dcent="isDcentWallet",n.Exodus="isExodus",n.Frontier="isFrontier",n.Frame="isFrame",n.HuobiWallet="isHbWallet",n.HyperPay="isHyperPay",n.ImToken="isImToken",n.InfinityWallet="isInfinityWallet",n.Liquality="isLiquality",n.MeetOne="wallet",n.MetaMask="isMetaMask",n.MyKey="isMYKEY",n.OwnBit="isOwnbit",n.Status="isStatus",n.Trust="isTrust",n.TokenPocket="isTokenPocket",n.TP="isTp",n.WalletIo="isWalletIO",n.XDEFI="isXDEFI",n.OneInch="isOneInchIOSWallet",n.Tokenary="isTokenary",n.Tally="isTally",n.BraveWallet="isBraveWallet",n.Rabby="isRabby",n.MathWallet="isMathWallet",n.GameStop="isGamestop",n.BitKeep="isBitKeep",n.Sequence="isSequence",n.Core="isAvalanche",n.Opera="isOpera",n.Bitski="isBitski",n.Enkrypt="isEnkrypt",n.Phantom="isPhantom",n.OKXWallet="isOkxWallet",n.Zeal="isZeal",n.Zerion="isZerion",n.Rainbow="isRainbow",n.SafePal="isSafePal",n.DeFiWallet="isDeficonnectProvider",n.Safeheron="isSafeheron",n.Talisman="isTalisman",n.OneKey="isOneKey",n.Fordefi="isFordefi",n.Coin98Wallet="isCoin98",n.SubWallet="isSubWallet",n.Kayros="isKayros",Xo;var n})(),Y1=(()=>{return(n=Y1||(Y1={})).Binance="https://www.bnbchain.org/ru/blog/binance-extension-wallet/",n.BitKeep="https://bitkeep.com/en/download?type=0",n.Coinbase="https://www.coinbase.com/wallet/downloads",n.MetaMask="https://metamask.io/download/",n.OKXWallet="https://okx.com/download",n.Phantom="https://phantom.app/download",n.Talisman="https://www.talisman.xyz/",n.Trust="https://trustwallet.com/download/",n.OneKey="https://onekey.so/download/",n.RoninWallet="https://wallet.skymavis.com/",n.Coin98Wallet="https://coin98.com/wallet/",n.SubWallet="https://www.subwallet.app/",n.Kayros="https://www.kayros.games/wallet/",Y1;var n})(),Ua=(()=>{return(n=Ua||(Ua={})).AlphaWallet="AlphaWallet",n.ApexWallet="Apex Wallet",n.AToken="AToken",n.BifrostWallet="Bifrost Wallet",n.Binance="Binance Smart Wallet",n.Bitpie="Bitpie",n.Bitski="Bitski",n.BlockWallet="BlockWallet",n.Brave="Brave Wallet",n.Coinbase="Coinbase Wallet",n.Dcent="D'CENT",n.Detected="Detected Wallet",n.Exodus="Exodus",n.Frame="Frame",n.Frontier="Frontier",n.HuobiWallet="Huobi Wallet",n.HyperPay="HyperPay",n.ImToken="imToken",n.InfinityWallet="Infinity Wallet",n.Liquality="Liquality",n.MeetOne="MeetOne",n.MetaMask="MetaMask",n.MyKey="MyKey",n.Opera="Opera Wallet",n.OwnBit="OwnBit",n.Status="Status Wallet",n.Trust="Trust Wallet",n.TokenPocket="TokenPocket",n.TP="TP Wallet",n.WalletIo="Wallet.io",n.XDEFI="XDEFI Wallet",n.OneInch="1inch Wallet",n.Tokenary="Tokenary Wallet",n.Tally="Taho",n.Rabby="Rabby Wallet",n.MathWallet="MathWallet",n.GameStop="GameStop Wallet",n.BitKeep="BitKeep",n.Sequence="Sequence",n.Core="Core",n.Enkrypt="Enkrypt",n.Zeal="Zeal",n.Phantom="Phantom",n.OKXWallet="OKX Wallet",n.Zerion="Zerion",n.Rainbow="Rainbow",n.SafePal="SafePal",n.DeFiWallet="DeFi Wallet",n.Safeheron="Safeheron",n.Talisman="Talisman",n.OneKey="OneKey",n.Fordefi="Fordefi",n.RoninWallet="Ronin Wallet",n.Coin98Wallet="Coin98 Wallet",n.SubWallet="SubWallet",n.Kayros="Kayros",Ua;var n})(),fa=(()=>{return(n=fa||(fa={})).Ethereum="ethereum",n.Binance="BinanceChain",n.Tally="tally",n.Web3="web3",n.Arbitrum="arbitrum",n.XFI="xfi",n.GameStop="gamestop",n.BitKeep="bitkeep",n.Avalanche="avalanche",n.Bitski="Bitski",n.Enkrypt="enkrypt",n.Zeal="zeal",n.Phantom="phantom",n.OKXWallet="okxwallet",n.Trust="trustwallet",n.Frontier="frontier",n.DeFiConnectProvider="deficonnectProvider",n.Safeheron="safeheron",n.Talisman="talismanEth",n.OneKey="$onekey",n.RoninWallet="ronin",n.Coin98Wallet="coin98",n.SubWallet="SubWallet",n.Kayros="kayros",fa;var n})();const fh=null;function G2(n,t){return(0,Br.Z)(function*(){return{provider:window.ethereum.providers&&Array.isArray(window.ethereum.providers)?pie(n,t):window.ethereum}})}function pie(n,t){return window.ethereum.providers.find(e=>t?!!e[n]&&!YU(n,e):!!e[n])}function YU(n,t){return Object.values(Xo).filter(r=>r!==n&&r!==Xo.Detected).some(r=>!!t[r])}const mie={label:Ua.MetaMask,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.MetaMask]&&!YU(Xo.MetaMask,n),getIcon:(n=(0,Br.Z)(function*(){return(yield Y.e(674).then(Y.bind(Y,10674))).default}),function(){return n.apply(this,arguments)}),getInterface:G2(Xo.MetaMask,!0),platforms:["all"],externalUrl:Y1.MetaMask},gie={label:Ua.InfinityWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.InfinityWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9814).then(Y.bind(Y,89814))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.InfinityWallet),platforms:["desktop"]},yie={label:Ua.Exodus,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Exodus],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5484).then(Y.bind(Y,35484))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Exodus),platforms:["all"]},bie={label:Ua.Frontier,injectedNamespace:fa.Frontier,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum&&!!n.ethereum[Xo.Frontier],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1129).then(Y.bind(Y,91129))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.frontier.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},vie={label:Ua.Brave,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.BraveWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5588).then(Y.bind(Y,25588))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.BraveWallet),platforms:["all"]},_ie={label:Ua.Binance,injectedNamespace:fa.Binance,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Binance],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(4807).then(Y.bind(Y,64807))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){let t={...window.BinanceChain};window.BinanceChain=t;const e=window.BinanceChain.on.bind(window.BinanceChain);window.BinanceChain.on=(s,p)=>{e(s,"chainChanged"===s?F=>{p(`0x${parseInt(F).toString(16)}`)}:p)};const r=(0,Wl.createEIP1193Provider)(window.BinanceChain,{eth_chainId:({baseRequest:s})=>s({method:"eth_chainId"}).then(p=>`0x${parseInt(p).toString(16)}`),eth_selectAccounts:fh,wallet_switchEthereumChain:fh});return r.removeListener=(s,p)=>{},{provider:r}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"],externalUrl:Y1.Binance},wie={label:Ua.Coinbase,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Coinbase]||!!n&&!!n[Xo.CoinbaseExtension],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5051).then(Y.bind(Y,95051))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const{provider:t}=yield G2(Xo.CoinbaseExtension)(),e=t.on.bind(t);return t.on=(r,s)=>{e(r,"chainChanged"===r?p=>{s(`0x${parseInt(p).toString(16)}`)}:s)},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Coinbase},xie={label:Ua.Detected,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Detected],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8031).then(Y.bind(Y,8031))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Eie={label:Ua.Trust,injectedNamespace:fa.Trust,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Trust],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7957).then(Y.bind(Y,27957))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){let e;return e=window.hasOwnProperty(fa.Ethereum)&&window[fa.Ethereum].isTrust?window[fa.Ethereum]:window[fa.Trust],{provider:e}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Trust},Tie={label:Ua.Opera,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Opera],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3510).then(Y.bind(Y,13510))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{eth_requestAccounts:(t=(0,Br.Z)(function*({baseRequest:e}){return e({method:"eth_accounts"})}),function(r){return t.apply(this,arguments)}),eth_selectAccounts:fh})};var t});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Aie={label:Ua.Status,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Status],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1577).then(Y.bind(Y,91577))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Iie={label:Ua.AlphaWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.AlphaWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(49).then(Y.bind(Y,90049))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Sie={label:Ua.ApexWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.ApexWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6004).then(Y.bind(Y,76004))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},kie={label:Ua.AToken,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.AToken],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5733).then(Y.bind(Y,55733))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Cie={label:Ua.BifrostWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.BifrostWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(4909).then(Y.bind(Y,94909))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.BifrostWallet),platforms:["all"]},Mie={label:Ua.Bitpie,injectedNamespace:fa.Ethereum,checkProviderIdentity:()=>!!window.Bitpie,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8563).then(Y.bind(Y,8563))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Oie={label:Ua.BlockWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.BlockWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1830).then(Y.bind(Y,81830))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.BlockWallet),platforms:["desktop"]},Die={label:Ua.Frame,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Frame],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6146).then(Y.bind(Y,6146))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=window.ethereum;if(!t||!t.connected)throw new Error("Frame App must be open with a hot wallet connected. If not installed first download the Frame App.");return{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Pie={label:Ua.HuobiWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.HuobiWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3601).then(Y.bind(Y,73601))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Rie={label:Ua.HyperPay,injectedNamespace:fa.Ethereum,checkProviderIdentity:()=>!!window.hiWallet,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(187).then(Y.bind(Y,187))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Nie={label:Ua.ImToken,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.ImToken],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5239).then(Y.bind(Y,95239))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Bie={label:Ua.Liquality,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Liquality],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(853).then(Y.bind(Y,10853))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh});return t.removeListener=(e,r)=>{},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Fie={label:Ua.MeetOne,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&"MEETONE"===n[Xo.MeetOne],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6176).then(Y.bind(Y,96176))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Lie={label:Ua.MyKey,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.MyKey],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(4539).then(Y.bind(Y,54539))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Uie={label:Ua.OwnBit,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.OwnBit],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(2419).then(Y.bind(Y,2419))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=(0,Wl.createEIP1193Provider)(window.ethereum,{eth_chainId:({baseRequest:e})=>e({method:"eth_chainId"}).then(r=>`0x${parseInt(r).toString(16)}`),wallet_switchEthereumChain:fh,eth_selectAccounts:fh});return t.removeListener=(e,r)=>{},t.on=(e,r)=>{},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},jie={label:Ua.TokenPocket,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.TokenPocket]&&!n[Xo.TP],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7765).then(Y.bind(Y,67765))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.TokenPocket),platforms:["all"]},Vie={label:Ua.TP,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.TP],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7903).then(Y.bind(Y,37903))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum,{wallet_switchEthereumChain:fh,eth_selectAccounts:fh})}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Hie={label:Ua.XDEFI,injectedNamespace:fa.XFI,checkProviderIdentity:({provider:n})=>n&&n.ethereum&&n.ethereum[Xo.XDEFI],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8944).then(Y.bind(Y,18944))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.xfi&&window.xfi.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},$ie={label:Ua.OneInch,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.OneInch],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7117).then(Y.bind(Y,27117))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["mobile"]},Wie={label:Ua.Tokenary,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Tokenary],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5895).then(Y.bind(Y,85895))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Gie={label:Ua.Tally,injectedNamespace:fa.Tally,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Tally],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6516).then(Y.bind(Y,56516))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.tally)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},zie={label:Ua.Zeal,injectedNamespace:fa.Zeal,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Zeal],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1032).then(Y.bind(Y,81032))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.zeal)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},qie={label:Ua.Rabby,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Rabby],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7167).then(Y.bind(Y,87167))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Kie={label:Ua.MathWallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.MathWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3897).then(Y.bind(Y,23897))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.MathWallet),platforms:["all"]},Zie={label:Ua.GameStop,injectedNamespace:fa.GameStop,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.GameStop],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7599).then(Y.bind(Y,77599))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=(0,Wl.createEIP1193Provider)(window.gamestop,{eth_chainId:({baseRequest:e})=>e({method:"eth_chainId"}).then(r=>`0x${parseInt(r).toString(16)}`),wallet_switchEthereumChain:fh});return t.removeListener=(e,r)=>{},t.on=(e,r)=>{},{provider:t}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},Yie={label:Ua.BitKeep,injectedNamespace:fa.BitKeep,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum[Xo.BitKeep],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9969).then(Y.bind(Y,59969))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.bitkeep&&window.bitkeep.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.BitKeep},Jie={label:Ua.Sequence,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Sequence],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(6030).then(Y.bind(Y,86030))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.ethereum}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},Xie={label:Ua.Core,injectedNamespace:fa.Avalanche,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Core],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7736).then(Y.bind(Y,57736))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Core),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},Qie={label:Ua.Bitski,injectedNamespace:fa.Bitski,checkProviderIdentity:({provider:n})=>!!n&&!!n.getProvider&&!!n.getProvider().isBitski,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9672).then(Y.bind(Y,49672))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:window.Bitski&&window.Bitski.getProvider&&window.Bitski.getProvider()}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},ese={label:Ua.Zerion,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Zerion],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1917).then(Y.bind(Y,1917))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},tse={label:Ua.Enkrypt,injectedNamespace:fa.Enkrypt,checkProviderIdentity:({provider:n})=>!!n&&!!n.providers&&!!n.providers.ethereum,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(827).then(Y.bind(Y,50827))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){const t=window.enkrypt.providers.ethereum.on.bind(window.enkrypt.providers.ethereum);window.enkrypt.providers.ethereum.on=(r,s)=>{t(r,"chainChanged"===r?p=>{s(`0x${parseInt(p).toString(16)}`)}:s)};const e=(0,Wl.createEIP1193Provider)(window.enkrypt.providers.ethereum,{eth_chainId:({baseRequest:r})=>r({method:"eth_chainId"}).then(s=>`0x${parseInt(s).toString(16)}`)});return e.removeListener=(r,s)=>{},{provider:e}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},nse={label:Ua.Phantom,injectedNamespace:fa.Phantom,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum&&!!n.ethereum[Xo.Phantom],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(290).then(Y.bind(Y,50290))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.phantom.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Phantom},rse={label:Ua.SafePal,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.SafePal],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1623).then(Y.bind(Y,11623))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},ise={label:Ua.Rainbow,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Rainbow],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1480).then(Y.bind(Y,1480))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Rainbow),platforms:["all"]},sse={label:Ua.OKXWallet,injectedNamespace:fa.OKXWallet,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.OKXWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(8972).then(Y.bind(Y,58972))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.okxwallet)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.OKXWallet},ose={label:Ua.DeFiWallet,injectedNamespace:fa.DeFiConnectProvider,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.DeFiWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9618).then(Y.bind(Y,29618))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.deficonnectProvider)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"]},ase={label:Ua.Safeheron,injectedNamespace:fa.Safeheron,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Safeheron],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(9223).then(Y.bind(Y,29223))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.safeheron)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},use={label:Ua.Talisman,injectedNamespace:fa.Talisman,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Talisman],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1386).then(Y.bind(Y,41386))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.talismanEth)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"],externalUrl:Y1.Talisman},cse={label:Ua.RoninWallet,injectedNamespace:fa.RoninWallet,checkProviderIdentity:({provider:n})=>!!n,getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1925).then(Y.bind(Y,41925))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.ronin.provider)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.RoninWallet},lse={label:Ua.OneKey,injectedNamespace:fa.OneKey,checkProviderIdentity:({provider:n})=>!!n&&!!n.ethereum&&!!n.ethereum[Xo.OneKey],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(7513).then(Y.bind(Y,87513))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.$onekey.ethereum)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.OneKey},dse={label:Ua.Fordefi,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Fordefi],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(46).then(Y.bind(Y,20046))).default});return function(){return n.apply(this,arguments)}}(),getInterface:G2(Xo.Fordefi,!0),platforms:["desktop"]},fse={label:Ua.Coin98Wallet,injectedNamespace:fa.Ethereum,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Coin98Wallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(5931).then(Y.bind(Y,35931))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){let e;return e=window.hasOwnProperty(fa.Ethereum)&&window[fa.Ethereum].isCoin98?window[fa.Ethereum]:window[fa.Coin98Wallet].provider,{provider:e}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.Coin98Wallet},hse={label:Ua.SubWallet,injectedNamespace:fa.SubWallet,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.SubWallet],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(1548).then(Y.bind(Y,61548))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.SubWallet)}});return function(){return n.apply(this,arguments)}}(),platforms:["all"],externalUrl:Y1.SubWallet},pse={label:Ua.Kayros,injectedNamespace:fa.Kayros,checkProviderIdentity:({provider:n})=>!!n&&!!n[Xo.Kayros],getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(747).then(Y.bind(Y,30747))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){return{provider:(0,Wl.createEIP1193Provider)(window.kayros)}});return function(){return n.apply(this,arguments)}}(),platforms:["desktop"]},mse=[zie,yie,bie,mie,Cie,_ie,wie,xie,Eie,Tie,Aie,Iie,Sie,kie,Mie,Oie,vie,Die,Pie,Rie,Nie,Bie,Fie,Lie,Uie,jie,Vie,Hie,$ie,Wie,Gie,qie,Kie,Zie,Yie,Jie,Xie,Qie,tse,nse,sse,ese,ise,rse,ose,gie,ase,use,lse,dse,cse,fse,hse,pse],gse=Zu.object({label:Zu.string().required(),getIcon:Zu.function().arity(0).required(),getInterface:Zu.function().maxArity(1).required(),injectedNamespace:Zu.string().required(),checkProviderIdentity:Zu.function().arity(1).required(),platforms:Zu.array().items(Zu.string()),externalUrl:Zu.string()}),yse=Zu.array().items(gse),bse=Zu.object().pattern(/\w+/,Zu.any().allow(Zu.boolean(),Zu.array().items(Zu.string()))),vse=Zu.object({custom:yse,filter:bse,displayUnavailable:[Zu.boolean(),Zu.array().items(Zu.string())],walletUnavailableMessage:Zu.function(),sort:Zu.function(),externalUrl:Zu.string()});var n;Error;const Tse=function(n){if("undefined"==typeof window)return()=>null;if(n){const t=(n=>(0,Wl.validate)(vse,n))(n);if(t&&t.error)throw t.error}return t=>{const{device:e}=t,{custom:r=[],filter:s={},displayUnavailable:p,sort:F,walletUnavailableMessage:z}=n||{},fe=hie([...r,...mse],({label:Re})=>Re).reduce((Re,$e)=>{const{label:rt,platforms:ft,injectedNamespace:Tt,checkProviderIdentity:Ft}=$e,Qt=s[rt],wn=!1===Qt,gr=((n,t,e)=>{var r;return!(!n||!t({provider:n,device:e})&&!(null===(r=n.providers)||void 0===r?void 0:r.some(s=>t({provider:s,device:e}))))})(window[Tt],Ft,e);let _r=!1;Array.isArray(Qt)&&(Qt.includes(e.type)||Qt.includes(e.os.name))&&(_r=!0),"unavailable"===Qt&&!gr&&(_r=!0);const pr=!ft.includes("all")&&!ft.includes(e.type)&&!ft.includes(e.os.name);return!wn&&!_r&&!pr&&(gr||!0===p||Array.isArray(p)&&p.length&&p.includes($e.label))&&Re.push((!0===p||Array.isArray(p)&&p.length&&p.includes($e.label))&&!gr?{...$e,getInterface:(qr=(0,Br.Z)(function*(){throw new Error(z?z($e):(({label:n,externalUrl:t})=>t?`Please install or enable ${n} to continue`:`Please install or enable ${n} to continue`)($e))}),function(){return qr.apply(this,arguments)})}:$e),Re;var qr},[]);if(fe.length){const Re=fe.length>1,$e=fe.filter(rt=>{const{label:ft}=rt;return!(ft===Ua.Detected&&Re)}).map(({label:rt,getIcon:ft,getInterface:Tt})=>({label:rt,getIcon:ft,getInterface:Tt})).sort((rt,ft)=>rt.labelft.label?1:0);return F?F($e):$e}return[]}},JU=["eth_sendTransaction","eth_signTransaction","personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4"],ev=n=>!("string"!=typeof n||!n.match(/^0x[0-9A-Fa-f]*$/)),Mse=function(n){return 1===((null==n?void 0:n.walletConnectVersion)||2)?function(n={walletConnectVersion:1}){return()=>{return{label:"Ledger",getIcon:(t=(0,Br.Z)(function*(){return(yield Y.e(8403).then(Y.bind(Y,28403))).default}),function(){return t.apply(this,arguments)}),getInterface:function(){var t=(0,Br.Z)(function*({chains:e,EventEmitter:r}){const{loadConnectKit:s,SupportedProviders:p,SupportedProviderImplementations:F}=yield Y.e(2306).then(Y.bind(Y,82306)),z=yield s();n.enableDebugLogs&&z.enableDebugLogs();const te=z.checkSupport({providerType:p.Ethereum,chainId:null==n?void 0:n.chainId,infuraId:null==n?void 0:n.infuraId,rpc:null==n?void 0:n.rpc}),fe=yield z.getProvider();if(te.providerImplementation===F.LedgerConnect)return{provider:fe};const{StaticJsonRpcProvider:Re}=yield Y.e(8197).then(Y.bind(Y,98197)),{ProviderRpcError:$e,ProviderRpcErrorCode:rt}=yield Promise.resolve().then(Y.bind(Y,79696)),{Subject:Tt,fromEvent:Ft}=(yield Promise.all([Y.e(8592),Y.e(4843)]).then(Y.bind(Y,14843)),yield Promise.all([Y.e(754),Y.e(1361)]).then(Y.bind(Y,61361))),{takeUntil:Qt,take:wn}=yield Promise.all([Y.e(754),Y.e(3337)]).then(Y.bind(Y,13337)),An=fe.connector,gr=new r;return{provider:new class{constructor({connector:ti,chains:qr}){var yi=this;let as;this.emit=gr.emit.bind(gr),this.on=gr.on.bind(gr),this.removeListener=gr.removeListener.bind(gr),this.connector=ti,this.chains=qr,this.disconnected$=new Tt,this.providers={},Ft(this.connector,"session_update",(Li,vs)=>{if(Li)throw Li;return vs}).pipe(Qt(this.disconnected$)).subscribe({next:({params:Li})=>{const[{accounts:vs,chainId:Yi}]=Li,no=vs.map(Ts=>Ts.toLowerCase());this.emit("accountsChanged",no);const Gs=ev(Yi)?Yi:`0x${Yi.toString(16)}`;(!as||as!==Gs)&&(this.emit("chainChanged",Gs),as=Gs)},error:console.warn}),Ft(this.connector,"disconnect",(Li,vs)=>{if(Li)throw Li;return vs}).pipe(Qt(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>this.connector.killSession(),this.request=function(){var Li=(0,Br.Z)(function*({method:vs,params:Yi}){if("eth_chainId"===vs)return ev(yi.connector.chainId)?yi.connector.chainId:`0x${yi.connector.chainId.toString(16)}`;if("eth_requestAccounts"===vs)return new Promise((Gs,Ts)=>{if(Ft(yi.connector,"connect",(us,ds)=>{if(us)throw us;return ds}).pipe(wn(1)).subscribe({next:({params:us})=>{const[{accounts:ds,chainId:kr}]=us,wr=ds.map(Ys=>Ys.toLowerCase());yi.emit("accountsChanged",wr);const mi=ev(kr)?kr:`0x${kr.toString(16)}`;as||(as=mi),yi.emit("chainChanged",mi),Gs(wr)},error:Ts}),yi.connector.connected){const{accounts:us,chainId:ds}=yi.connector.session,kr=ev(ds)?ds:`0x${ds.toString(16)}`;yi.emit("chainChanged",kr),as||(as=kr);const wr=us.map(mi=>mi.toLowerCase());return Gs(wr)}Gs(fe.request({method:vs,params:Yi}))});if("eth_selectAccounts"===vs)throw new $e({code:rt.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${vs}`});if("wallet_switchEthereumChain"==vs){if(!Yi)throw new $e({code:rt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Gs=Yi[0];if(!Gs.hasOwnProperty("chainId")||void 0===Gs.chainId)throw new $e({code:rt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return yi.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:Gs.chainId}]})}if("eth_sendTransaction"===vs)return yi.connector.sendTransaction(Yi[0]);if("eth_signTransaction"===vs)return yi.connector.signTransaction(Yi[0]);if("personal_sign"===vs)return yi.connector.signPersonalMessage(Yi);if("eth_sign"===vs)return yi.connector.signMessage(Yi);if(vs.includes("eth_signTypedData"))return yi.connector.signTypedData(Yi);if("eth_accounts"===vs)return yi.connector.sendCustomRequest({id:1337,jsonrpc:"2.0",method:vs,params:Yi});const no=yield yi.request({method:"eth_chainId"});if(!yi.providers[no]){const Gs=qr.find(({id:Ts})=>Ts===no);if(!Gs)throw new $e({code:rt.CHAIN_NOT_ADDED,message:`The Provider does not have a rpcUrl to make a request for the requested method: ${vs}`});yi.providers[no]=new Re(Gs.rpcUrl)}return yi.providers[no].send(vs,Yi)});return function(vs){return Li.apply(this,arguments)}}()}}({chains:e,connector:An})}});return function(r){return t.apply(this,arguments)}}()};var t}}(n):function(n){if(!(null==n?void 0:n.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");return()=>{return{label:"Ledger",getIcon:(t=(0,Br.Z)(function*(){return(yield Y.e(8403).then(Y.bind(Y,28403))).default}),function(){return t.apply(this,arguments)}),getInterface:function(){var t=(0,Br.Z)(function*({chains:e,EventEmitter:r}){var s;const{loadConnectKit:p,SupportedProviders:F,SupportedProviderImplementations:z}=yield Y.e(2306).then(Y.bind(Y,82306)),te=yield p();(null==n?void 0:n.enableDebugLogs)&&te.enableDebugLogs();const fe=null===(s=null==n?void 0:n.requiredChains)||void 0===s?void 0:s.map(qr=>"string"==typeof qr&&ev(qr)?parseInt(qr,16):qr),Re=n.optionalMethods&&Array.isArray(n.optionalMethods)?[...n.optionalMethods,...JU]:JU,$e=te.checkSupport({providerType:F.Ethereum,walletConnectVersion:2,projectId:null==n?void 0:n.projectId,chains:fe,optionalChains:e.map(({id:qr})=>parseInt(qr,16)),methods:null==n?void 0:n.requiredMethods,optionalMethods:Re,events:null==n?void 0:n.requiredEvents,optionalEvents:null==n?void 0:n.optionalEvents,rpcMap:e.map(({id:qr,rpcUrl:yi})=>({id:qr,rpcUrl:yi})).reduce((qr,{id:yi,rpcUrl:as})=>(qr[parseInt(yi,16)]=as||"",qr),{})}),rt=yield te.getProvider();if($e.providerImplementation===z.LedgerConnect)return{provider:rt};const{ProviderRpcError:ft,ProviderRpcErrorCode:Tt}=yield Promise.resolve().then(Y.bind(Y,79696)),{Subject:Qt,fromEvent:wn}=(yield Y.e(359).then(Y.bind(Y,50359)),yield Promise.all([Y.e(754),Y.e(1361)]).then(Y.bind(Y,61361))),{takeUntil:An,take:gr}=yield Promise.all([Y.e(754),Y.e(3337)]).then(Y.bind(Y,13337)),_r=rt,pr=new r;return{provider:new class{constructor({connector:yi,chains:as}){var Li=this;this.emit=pr.emit.bind(pr),this.on=pr.on.bind(pr),this.removeListener=pr.removeListener.bind(pr),this.connector=yi,this.chains=as,this.disconnected$=new Qt,wn(this.connector,"accountsChanged",Yi=>Yi).pipe(An(this.disconnected$)).subscribe({next:Yi=>{this.emit("accountsChanged",Yi)},error:console.warn}),wn(this.connector,"chainChanged",Yi=>Yi).pipe(An(this.disconnected$)).subscribe({next:Yi=>{const no=ev(Yi)?Yi:`0x${Yi.toString(16)}`;this.emit("chainChanged",no)},error:console.warn}),wn(this.connector,"session_delete",Yi=>Yi).pipe(An(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>{this.connector.session&&this.connector.disconnect()},(()=>{this.connector.session&&(this.emit("accountsChanged",this.connector.accounts),this.emit("chainChanged",this.connector.chainId))})(),this.request=function(){var Yi=(0,Br.Z)(function*({method:no,params:Gs}){if("eth_chainId"===no)return ev(Li.connector.chainId)?Li.connector.chainId:`0x${Li.connector.chainId.toString(16)}`;if("eth_requestAccounts"===no)return new Promise(function(){var Ts=(0,Br.Z)(function*(us,ds){if(wn(Li.connector,"connect",kr=>kr).pipe(gr(1)).subscribe({next:({chainId:kr})=>{Li.emit("accountsChanged",Li.connector.accounts);const wr=ev(kr)?kr:`0x${kr.toString(16)}`;Li.emit("chainChanged",wr),us(Li.connector.accounts)},error:ds}),Li.connector.session){const kr=Li.connector.accounts,mi=`0x${Li.connector.chainId.toString(16)}`;return Li.emit("chainChanged",mi),us(kr)}yield rt.request({method:no}).catch(kr=>{console.error("err creating new session: ",kr),ds(new ft({code:4001,message:"User rejected the request."}))})});return function(us,ds){return Ts.apply(this,arguments)}}());if("eth_selectAccounts"===no)throw new ft({code:Tt.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${no}`});if("wallet_switchEthereumChain"==no){if(!Gs)throw new ft({code:Tt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Ts=Gs[0];if(!Ts.hasOwnProperty("chainId")||void 0===Ts.chainId)throw new ft({code:Tt.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return Li.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:Ts.chainId}]})}return Li.connector.request({method:no,params:Gs})});return function(no){return Yi.apply(this,arguments)}}()}}({chains:e,connector:_r})}});return function(r){return t.apply(this,arguments)}}()};var t}}(n)},Rse=function(n){const{apiKey:t}=n;return()=>{return{label:"Portis",getIcon:(e=(0,Br.Z)(function*(){return(yield Y.e(8593).then(Y.bind(Y,38593))).default}),function(){return e.apply(this,arguments)}),getInterface:function(){var e=(0,Br.Z)(function*({chains:r}){const{default:s}=yield Y.e(8044).then(Y.t.bind(Y,38044,19)),{createEIP1193Provider:p}=yield Promise.resolve().then(Y.bind(Y,79696)),F=new s(t,{nodeUrl:r[0].rpcUrl||"",chainId:r[0].id}),z=F.provider,te=p(z,{eth_requestAccounts:z.enable,eth_selectAccounts:null,wallet_switchEthereumChain:(fe=(0,Br.Z)(function*({params:Re}){const $e=r.find(({id:rt})=>rt===Re[0].chainId);if(!$e)throw new Error("chain must be set before switching");return F.changeNetwork({nodeUrl:$e.rpcUrl||"",chainId:$e.id}),te.emit("chainChanged",$e.id),null}),function($e){return fe.apply(this,arguments)})});var fe;return{provider:te,instance:F}});return function(s){return e.apply(this,arguments)}}()};var e}},Bse=function(n){const{buttonPosition:t,modalZIndex:e,apiKey:r,buildEnv:s,enableLogging:p,loginConfig:F,showTorusButton:z,integrity:te,whiteLabel:fe,skipTKey:Re}=n||{};return()=>{return{label:"Torus",getIcon:($e=(0,Br.Z)(function*(){return(yield Y.e(6880).then(Y.bind(Y,6880))).default}),function(){return $e.apply(this,arguments)}),getInterface:function(){var $e=(0,Br.Z)(function*({chains:rt}){const{default:ft}=yield Promise.all([Y.e(1865),Y.e(7183)]).then(Y.bind(Y,37183)),{createEIP1193Provider:Tt,ProviderRpcErrorCode:Ft,ProviderRpcError:Qt}=yield Promise.resolve().then(Y.bind(Y,79696)),[wn]=rt;let An=new ft({buttonPosition:t,modalZIndex:e,apiKey:r});yield An.init({buildEnv:s,enableLogging:p,network:{host:wn.rpcUrl||"",chainId:parseInt(wn.id),networkName:wn.label},showTorusButton:z,loginConfig:F,integrity:te,whiteLabel:fe,skipTKey:Re});const _r=Tt(An.provider,{eth_requestAccounts:(pr=(0,Br.Z)(function*(){try{return yield An.login()}catch{throw new Qt({code:Ft.ACCOUNT_ACCESS_REJECTED,message:"Account access rejected"})}}),function(){return pr.apply(this,arguments)}),eth_selectAccounts:null,wallet_switchEthereumChain:function(){var pr=(0,Br.Z)(function*({params:ti}){const qr=rt.find(({id:yi})=>yi===ti[0].chainId);if(!qr)throw new Error("chain must be set before switching");return yield An.setProvider({host:qr.rpcUrl||"",chainId:parseInt(qr.id),networkName:qr.label}),null});return function(qr){return pr.apply(this,arguments)}}(),eth_chainId:function(){var pr=(0,Br.Z)(function*({baseRequest:ti}){const qr=yield ti({method:"eth_chainId"});return`0x${parseInt(qr).toString(16)}`});return function(qr){return pr.apply(this,arguments)}}()});var pr;return _r.disconnect=()=>An.cleanUp(),{provider:_r,instance:An}});return function(ft){return $e.apply(this,arguments)}}()};var $e}};var XU=Y(69337);const QU="m/44'/60'/0'/0",Fse=[{label:"ETH"}],Lse=[{label:"Ethereum Mainnet",value:QU}],Use=function(){var n=(0,Br.Z)(function*({publicKey:t,chainCode:e,path:r},s,p,F){const{default:z}=yield Promise.all([Y.e(3945),Y.e(2330)]).then(Y.t.bind(Y,92330,19)),te=yield Promise.all([Y.e(3945),Y.e(5510),Y.e(3345)]).then(Y.t.bind(Y,93345,19)),{publicToAddress:fe,toChecksumAddress:Re}=te.default||te,$e=new z;$e.publicKey=XU.Buffer.from(t,"hex"),$e.chainCode=XU.Buffer.from(e,"hex");const ft=Re(`0x${fe($e.deriveChild(p).publicKey,!0).toString("hex")}`);return{derivationPath:`${r}/${p}`,address:ft,balance:{asset:s.label,value:yield F.getBalance(ft)}}});return function(e,r,s,p){return n.apply(this,arguments)}}(),jse=function(){var n=(0,Br.Z)(function*(t,e,r,s){const p=[];let F=0,z=0;for(;z{const{email:r,appUrl:s,customNetwork:p,filter:F,containerElement:z,consecutiveEmptyAccountThreshold:te}=n||{};if(!r||!s)throw new Error("Email and AppUrl required in Trezor options for Trezor Wallet Connection");const fe=te||5;if(Array.isArray(F)&&(F.includes(e.type)||F.includes(e.os.name)))return null;let $e;return{label:"Trezor",getIcon:t,getInterface:(rt=(0,Br.Z)(function*({EventEmitter:ft,chains:Tt}){const{default:Ft}=yield Y.e(5782).then(Y.t.bind(Y,75782,19)),{Transaction:Qt,FeeMarketEIP1559Transaction:wn}=yield Promise.all([Y.e(3945),Y.e(5510),Y.e(470)]).then(Y.t.bind(Y,50470,19)),{createEIP1193Provider:An,ProviderRpcError:gr}=yield Promise.resolve().then(Y.bind(Y,79696)),{accountSelect:_r}=yield Y.e(2560).then(Y.bind(Y,92560)),{getCommon:pr,bigNumberFieldsToStrings:ti,getHardwareWalletProvider:qr}=yield Y.e(2560).then(Y.bind(Y,92560)),yi=yield Promise.all([Y.e(3945),Y.e(5510),Y.e(3345)]).then(Y.t.bind(Y,93345,19)),{compress:as}=(yield Promise.all([Y.e(3945),Y.e(5510),Y.e(470),Y.e(7470)]).then(Y.bind(Y,17470))).publicKey,{StaticJsonRpcProvider:Li}=yield Promise.resolve().then(Y.bind(Y,80831)),vs=Ft.default||Ft;vs.manifest({email:r,appUrl:s});const Yi=new ft;let Gs,Ts,no=Tt[0];const us=function(){var To=(0,Br.Z)(function*({derivationPath:Ra,chainId:Gl,asset:Om}){no=Tt.find(({id:ph})=>ph===Gl)||no,Ts=new Li(no.rpcUrl);const{publicKey:Yb,chainCode:Rl,path:hh}=yield function(To){return Ys.apply(this,arguments)}(Ra);if(Ra!==QU){const ph=yield function(To){return wr.apply(this,arguments)}(hh);return[{derivationPath:Ra,address:ph,balance:{asset:Om.label,value:yield Ts.getBalance(ph.toLowerCase())}}]}return jse({publicKey:as(Yb),chainCode:Rl||"",path:Ra},Om,Ts,fe)});return function(Gl){return To.apply(this,arguments)}}(),ds=function(){var To=(0,Br.Z)(function*(){return $e=yield _r({basePaths:Lse,assets:Fse,chains:Tt,scanAccounts:us,containerElement:z}),Array.isArray($e)&&$e.length&&$e[0].hasOwnProperty("address")&&Yi.emit("accountsChanged",[$e[0].address]),$e});return function(){return To.apply(this,arguments)}}();function wr(){return(wr=(0,Br.Z)(function*(To){const Ra=`Unable to derive address from path ${To}`;try{const Gl=yield vs.ethereumGetAddress({path:To,showOnTrezor:!0});if(!Gl.success)throw new Error(Ra);return Gl.payload.address}catch(Gl){throw console.error(Gl),new Error(Ra)}})).apply(this,arguments)}function Ys(){return(Ys=(0,Br.Z)(function*(To){if(!To)throw new Error("a derivation path is needed to get the public key");try{const Ra=yield vs.getPublicKey({path:To,coin:"ETH"});if(!Ra.success)throw new Error(Ra.payload.error);return Gs={publicKey:Ra.payload.publicKey,chainCode:Ra.payload.chainCode,path:Ra.payload.serializedPath},Gs}catch(Ra){throw new Error(`There was an error accessing your Trezor accounts - Error: ${Ra}`)}})).apply(this,arguments)}function Js(To){if(!To||!To.hasOwnProperty("gasLimit")&&!To.hasOwnProperty("gas"))throw new Error("There was no Transaction Object or both the gasLimit and gas property are missing");const Ra=To.gasLimit||To.gas;return To.maxFeePerGas||To.maxPriorityFeePerGas?{to:To.to,value:To.value||"",gasLimit:Ra,maxFeePerGas:To.maxFeePerGas,maxPriorityFeePerGas:To.maxPriorityFeePerGas,nonce:To.nonce,chainId:Number(no.id),data:To.hasOwnProperty("data")?To.data:""}:{to:To.to,value:To.value||"",gasPrice:To.gasPrice,gasLimit:Ra,nonce:To.nonce,chainId:Number(no.id),data:To.hasOwnProperty("data")?To.data:""}}function va(To,Ra){try{return vs.ethereumSignTransaction({path:To,transaction:Ra})}catch(Gl){throw new Error(`There was an error signing transaction - Error: ${Gl}`)}}function Do(){return(Do=(0,Br.Z)(function*(To){if(!Array.isArray($e)||!$e.length)throw new Error("No account selected. Must call eth_requestAccounts first.");let Ra;To.hasOwnProperty("from")&&(Ra=$e.find(ld=>ld.address===To.from)),Ra=Ra||$e[0];const{derivationPath:Gl,address:Om}=Ra;To.gasLimit=To.gas||To.gasLimit,delete To.gas;const Rl=yield Ts.getSigner(Om).populateTransaction(To);Rl.hasOwnProperty("nonce")&&"number"==typeof Rl.nonce&&(Rl.nonce=Rl.nonce.toString(16)),Rl.hasOwnProperty("nonce")&&"string"==typeof Rl.nonce&&(Rl.nonce=yi.addHexPrefix(Rl.nonce));const ph=Js(ti(Rl));ph.from=Om;const NI=no.hasOwnProperty("id")?Number(no.id):1,w9=yield pr({customNetwork:p,chainId:NI}),b8=yield va(Gl,ph);if(!b8.success)throw new Error("Unknown message"===b8.payload.error?"This type of transactions is not supported on this device":b8.payload.error);let e4;return e4=ph.maxFeePerGas||ph.maxPriorityFeePerGas?wn.fromTxData({...ph,...b8.payload},{common:w9}):Qt.fromTxData({...ph,...b8.payload},{common:w9}),e4?`0x${e4.serialize().toString("hex")}`:""})).apply(this,arguments)}function Pa(To,Ra){return Ou.apply(this,arguments)}function Ou(){return(Ou=(0,Br.Z)(function*(To,Ra){if(!Array.isArray($e)||!$e.length)throw new Error("No account selected. Must call eth_requestAccounts first.");const Gl=$e.find(Om=>Om.address===To)||$e[0];return new Promise((Om,Yb)=>{vs.ethereumSignMessage({path:Gl.derivationPath,message:yi.stripHexPrefix(Ra.data),hex:!0}).then(Rl=>{Rl.success?(Rl.payload.address!==yi.toChecksumAddress(To)&&Yb(new Error("signature doesnt match the right address")),Om(`0x${Rl.payload.signature}`)):Yb(new Error(Rl.payload&&Rl.payload.error||"There was an error signing a message"))})})})).apply(this,arguments)}const Td=An(qr(()=>no.rpcUrl||""),{eth_requestAccounts:(To=(0,Br.Z)(function*(){const Ra=yield ds();if(!Array.isArray(Ra))throw new Error("No account selected. Must call eth_requestAccounts first.");if(0===Ra.length)throw new gr({code:4001,message:"User rejected the request."});if(!Ra[0].hasOwnProperty("address"))throw new Error("No address property associated with the selected account");return[Ra[0].address]}),function(){return To.apply(this,arguments)}),eth_selectAccounts:function(){var To=(0,Br.Z)(function*(){return(yield ds()).map(({address:Gl})=>Gl)});return function(){return To.apply(this,arguments)}}(),eth_accounts:function(){var To=(0,Br.Z)(function*(){return Array.isArray($e)&&$e.length&&$e[0].hasOwnProperty("address")?[$e[0].address]:[]});return function(){return To.apply(this,arguments)}}(),eth_chainId:function(){var To=(0,Br.Z)(function*(){return no.hasOwnProperty("id")?no.id:""});return function(){return To.apply(this,arguments)}}(),eth_signTransaction:function(){var To=(0,Br.Z)(function*({params:[Ra]}){return function(To){return Do.apply(this,arguments)}(Ra)});return function(Gl){return To.apply(this,arguments)}}(),eth_sendTransaction:function(){var To=(0,Br.Z)(function*({baseRequest:Ra,params:Gl}){const Om=yield Td.request({method:"eth_signTransaction",params:Gl});return yield Ra({method:"eth_sendRawTransaction",params:[Om]})});return function(Gl){return To.apply(this,arguments)}}(),eth_sign:function(){var To=(0,Br.Z)(function*({params:[Ra,Gl]}){return Pa(Ra,{data:Gl})});return function(Gl){return To.apply(this,arguments)}}(),personal_sign:function(){var To=(0,Br.Z)(function*({params:[Ra,Gl]}){return Pa(Gl,{data:Ra})});return function(Gl){return To.apply(this,arguments)}}(),wallet_switchEthereumChain:function(){var To=(0,Br.Z)(function*({params:[{chainId:Ra}]}){if(no=Tt.find(({id:Gl})=>Gl===Ra)||no,!no)throw new Error("chain must be set before switching");return Yi.emit("chainChanged",no.id),null});return function(Gl){return To.apply(this,arguments)}}(),eth_signTypedData:null,wallet_addEthereumChain:null});var To;return Td.on=Yi.on.bind(Yi),{provider:Td}}),function(Tt){return rt.apply(this,arguments)})};var rt}};var ej=Y(98983);const tj=["eth_sendTransaction","eth_signTransaction","personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4"],qse=Zu.object({handleUri:Zu.func().optional(),version:Zu.number().valid(1,2).optional(),bridge:Zu.string().when("version",{is:1,then:Zu.required(),otherwise:Zu.forbidden()}).messages({"any.required":"A bridge URL is a required when version is 1 of WalletConnect as the WC team has removed support for their default bridge."}),connectFirstChainId:Zu.boolean().optional(),qrcodeModalOptions:Zu.object({mobileLinks:Zu.array().items(Zu.string()).optional()}).optional(),projectId:Zu.string().when("version",{is:2,then:Zu.required(),otherwise:Zu.optional()}).messages({"any.required":"WalletConnect version 2 requires a projectId. Please visit https://cloud.walletconnect.com to get one."}),dappUrl:Zu.string().optional(),requiredChains:Zu.array().items(Zu.number()).optional(),optionalChains:Zu.array().items(Zu.number()).optional(),qrModalOptions:Zu.object().optional(),additionalRequiredMethods:Zu.array().items(Zu.string()).optional(),additionalOptionalMethods:Zu.array().items(Zu.string()).optional()}),q3=n=>!("string"!=typeof n||!n.match(/^0x[0-9A-Fa-f]*$/)),Jse=function(n){if(!n)throw new Error("WalletConnect requires an initialization object to be passed - see the official docs for an example: https://onboard.blocknative.com/docs/wallets/walletconnect");if(n){const t=(n=>((n,t)=>{const e=n.validate(t);return e.error?e:null})(qse,n))(n);if(t)throw t}return n.version=n.version||2,2===n.version?function(n){if(2!==n.version||!n.projectId)throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");const{projectId:t,handleUri:e,requiredChains:r,optionalChains:s,qrModalOptions:p,additionalRequiredMethods:F,additionalOptionalMethods:z,dappUrl:te}=n;let fe;return()=>{return{label:"WalletConnect",getIcon:(Re=(0,Br.Z)(function*(){return(yield Y.e(1111).then(Y.bind(Y,31111))).default}),function(){return Re.apply(this,arguments)}),getInterface:function(){var Re=(0,Br.Z)(function*({chains:$e,EventEmitter:rt,appMetadata:ft}){const{ProviderRpcError:Tt,ProviderRpcErrorCode:Ft}=yield Promise.resolve().then(Y.bind(Y,79696)),{default:Qt}=yield Promise.resolve().then(Y.bind(Y,98983)),{Subject:wn,fromEvent:An}=yield Promise.all([Y.e(9639),Y.e(7657)]).then(Y.bind(Y,7657)),{takeUntil:gr,take:_r}=yield Promise.all([Y.e(9639),Y.e(5354)]).then(Y.bind(Y,45354)),ti=Array.isArray(r)&&r.length&&r.every(Gs=>!isNaN(Gs))?r.map(Gs=>parseInt(Gs)):[],qr=Array.isArray(s)&&s.length&&s.every(Gs=>!isNaN(Gs))?s.map(Gs=>parseInt(Gs)):$e.map(({id:Gs})=>parseInt(Gs,16)),yi=new Set(F&&Array.isArray(F)?[...F,...ej.REQUIRED_METHODS]:ej.REQUIRED_METHODS),as=Array.from(yi),Li=z&&Array.isArray(z)?[...z,...tj]:tj,vs=yield Qt.init({projectId:t,chains:ti,methods:as,optionalChains:qr,optionalMethods:Li,showQrModal:!0,rpcMap:$e.map(({id:Gs,rpcUrl:Ts})=>({id:Gs,rpcUrl:Ts})).reduce((Gs,{id:Ts,rpcUrl:us})=>(Gs[parseInt(Ts,16)]=us||"",Gs),{}),metadata:(()=>{if(!ft)return;const Gs=te||ft.explore||"";!Gs&&!Gs.length&&console.warn("It is strongly recommended to supply a dappUrl as it is required by some wallets (i.e. MetaMask) to allow connection.");const Ts={name:ft.name,description:ft.description||"",url:Gs,icons:[]};return void 0!==ft.icon&&ft.icon.length&&(Ts.icons=[ft.icon]),void 0!==ft.logo&&ft.logo.length&&(Ts.icons=Ts.icons.length?[...Ts.icons,ft.logo]:[ft.logo]),Ts})(),qrModalOptions:p}),Yi=new rt;return{provider:new class{constructor({connector:Ts,chains:us}){var ds=this;this.emit=Yi.emit.bind(Yi),this.on=Yi.on.bind(Yi),this.removeListener=Yi.removeListener.bind(Yi),this.connector=Ts,this.chains=us,this.disconnected$=new wn,An(this.connector,"accountsChanged",wr=>wr).pipe(gr(this.disconnected$)).subscribe({next:wr=>{const mi=Array.isArray(wr)?wr:[wr];this.emit("accountsChanged",mi)},error:console.warn}),An(this.connector,"chainChanged",wr=>wr).pipe(gr(this.disconnected$)).subscribe({next:wr=>{const mi=q3(wr)?wr:`0x${wr.toString(16)}`;this.emit("chainChanged",mi)},error:console.warn}),An(this.connector,"session_delete",wr=>wr).pipe(gr(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>{this.connector.session&&(this.connector.disconnect(),fe=null)},n&&e&&An(this.connector,"display_uri",wr=>wr).pipe(gr(this.disconnected$)).subscribe(function(){var wr=(0,Br.Z)(function*(mi){try{e&&(yield e(mi))}catch(Ys){throw`An error occurred when handling the URI. Error: ${Ys}`}});return function(mi){return wr.apply(this,arguments)}}()),(()=>{const wr=this.connector.session;fe=wr,wr&&(this.emit("accountsChanged",this.connector.accounts),this.emit("chainChanged",this.connector.chainId))})(),this.request=function(){var wr=(0,Br.Z)(function*({method:mi,params:Ys}){if("eth_chainId"===mi)return q3(ds.connector.chainId)?ds.connector.chainId:`0x${ds.connector.chainId.toString(16)}`;if("eth_requestAccounts"===mi)return new Promise(function(){var Js=(0,Br.Z)(function*(va,Qo){if(An(ds.connector,"connect",Do=>Do).pipe(_r(1)).subscribe({next:({chainId:Do})=>{ds.emit("accountsChanged",ds.connector.accounts);const Pa=q3(Do)?Do:`0x${Do.toString(16)}`;ds.emit("chainChanged",Pa),va(ds.connector.accounts)},error:Qo}),ds.connector.session){const Do=ds.connector.accounts;fe=ds.connector.session;const Ou=`0x${ds.connector.chainId.toString(16)}`;return ds.emit("chainChanged",Ou),va(Do)}yield ds.connector.connect().catch(Do=>{console.error("err creating new session: ",Do),Qo(new Tt({code:4001,message:"User rejected the request."}))})});return function(va,Qo){return Js.apply(this,arguments)}}());if("eth_selectAccounts"===mi)throw new Tt({code:Ft.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${mi}`});if("wallet_switchEthereumChain"==mi){if(!Ys)throw new Tt({code:Ft.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Js=Ys[0];if(!Js.hasOwnProperty("chainId")||void 0===Js.chainId)throw new Tt({code:Ft.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return ds.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:Js.chainId}]})}return ds.connector.request({method:mi,params:Ys})});return function(mi){return wr.apply(this,arguments)}}()}}({chains:$e,connector:vs}),instance:fe}});return function(rt){return Re.apply(this,arguments)}}()};var Re}}(n):function(n){if(1!==n.version)throw"WalletConnect version must be set to 1 to initialize - note version 1 has been deprecated by the WalletConnect team";const{bridge:t,qrcodeModalOptions:e,connectFirstChainId:r,handleUri:s}=n||{};if(console.warn("Wallet Connect version 1 support has been deprecated by the WalletConnect team. Please consider using version 2. See docs for more details."),!t)throw"WalletConnect version 1 requires a bridge to be passed in. The WalletConnect team has remove support for the bridge. Please upgrade to version 2 of WalletConnect or pass in a custom bridge URL.";return()=>{return{label:"WalletConnect",getIcon:(p=(0,Br.Z)(function*(){return(yield Y.e(1111).then(Y.bind(Y,31111))).default}),function(){return p.apply(this,arguments)}),getInterface:function(){var p=(0,Br.Z)(function*({chains:F,EventEmitter:z}){const{StaticJsonRpcProvider:te}=yield Y.e(832).then(Y.bind(Y,90832)),{ProviderRpcError:fe,ProviderRpcErrorCode:Re}=yield Promise.resolve().then(Y.bind(Y,79696)),{default:$e}=yield Promise.all([Y.e(8592),Y.e(4843)]).then(Y.bind(Y,14843));let rt=yield Promise.all([Y.e(8592),Y.e(5475)]).then(Y.t.bind(Y,25475,19));rt=rt.default||rt;const{Subject:ft,fromEvent:Tt}=yield Promise.all([Y.e(9639),Y.e(7657)]).then(Y.bind(Y,7657)),{takeUntil:Ft,take:Qt}=yield Promise.all([Y.e(9639),Y.e(5354)]).then(Y.bind(Y,45354)),wn=new $e({bridge:t});if(s)try{yield s(wn.uri||"")}catch(_r){throw`An error occurred when handling the URI. Error: ${_r}`}const An=new z;return{provider:new class{constructor({connector:pr,chains:ti}){var qr=this;let yi;this.emit=An.emit.bind(An),this.on=An.on.bind(An),this.removeListener=An.removeListener.bind(An),this.connector=pr,this.chains=ti,this.disconnected$=new ft,this.providers={},Tt(this.connector,"session_update",(as,Li)=>{if(as)throw as;return Li}).pipe(Ft(this.disconnected$)).subscribe({next:({params:as})=>{const[{accounts:Li,chainId:vs}]=as,Yi=Li.map(Gs=>Gs.toLowerCase());this.emit("accountsChanged",Yi);const no=q3(vs)?vs:`0x${vs.toString(16)}`;(!yi||yi!==no)&&(this.emit("chainChanged",no),yi=no)},error:console.warn}),Tt(this.connector,"disconnect",(as,Li)=>{if(as)throw as;return Li}).pipe(Ft(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>this.connector.killSession(),this.request=function(){var as=(0,Br.Z)(function*({method:Li,params:vs}){if("eth_chainId"===Li)return q3(qr.connector.chainId)?qr.connector.chainId:`0x${qr.connector.chainId.toString(16)}`;if("eth_requestAccounts"===Li)return new Promise((no,Gs)=>{if(Tt(qr.connector,"connect",(Ts,us)=>{if(Ts)throw Ts;return us}).pipe(Qt(1)).subscribe({next:({params:Ts})=>{const[{accounts:us,chainId:ds}]=Ts,kr=us.map(mi=>mi.toLowerCase());qr.emit("accountsChanged",kr);const wr=q3(ds)?ds:`0x${ds.toString(16)}`;yi||(yi=wr),qr.emit("chainChanged",wr),rt.close(),no(kr)},error:Gs}),qr.connector.connected){const{accounts:Ts,chainId:us}=qr.connector.session,ds=q3(us)?us:`0x${us.toString(16)}`;qr.emit("chainChanged",ds),yi||(yi=ds);const kr=Ts.map(wr=>wr.toLowerCase());return no(kr)}qr.connector.createSession(r?{chainId:parseInt(ti[0].id,16)}:void 0).then(()=>{rt.open(qr.connector.uri,()=>Gs(new fe({code:4001,message:"User rejected the request."})),e)})});if("eth_selectAccounts"===Li)throw new fe({code:Re.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${Li}`});if("wallet_switchEthereumChain"==Li){if(!vs)throw new fe({code:Re.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const no=vs[0];if(!no.hasOwnProperty("chainId")||void 0===no.chainId)throw new fe({code:Re.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return qr.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:no.chainId}]})}if("eth_sendTransaction"===Li)return qr.connector.sendTransaction(vs[0]);if("eth_signTransaction"===Li)return qr.connector.signTransaction(vs[0]);if("personal_sign"===Li)return qr.connector.signPersonalMessage(vs);if("eth_sign"===Li)return qr.connector.signMessage(vs);if(Li.includes("eth_signTypedData"))return qr.connector.signTypedData(vs);if("eth_accounts"===Li)return qr.connector.sendCustomRequest({id:1337,jsonrpc:"2.0",method:Li,params:vs});const Yi=yield qr.request({method:"eth_chainId"});if(!qr.providers[Yi]){const no=ti.find(({id:Gs})=>Gs===Yi);if(!no)throw new fe({code:Re.CHAIN_NOT_ADDED,message:`The Provider does not have a rpcUrl to make a request for the requested method: ${Li}`});qr.providers[Yi]=new te(no.rpcUrl)}return qr.providers[Yi].send(Li,vs)});return function(Li){return as.apply(this,arguments)}}()}}({chains:F,connector:wn})}});return function(z){return p.apply(this,arguments)}}()};var p}}(n)},nj=["toast-component",""];function Qse(n,t){if(1&n){const e=Di();Ae(0,"button",5),dr("click",function(){return Ur(e),an().remove()}),Ae(1,"span",6),kt(2,"\xd7"),Ie(),Ie()}}function eoe(n,t){if(1&n&&(Zr(0),kt(1),$r()),2&n){const e=an(2);ct(1),Pr("[",e.duplicatesCount+1,"]")}}function toe(n,t){if(1&n&&(Ae(0,"div"),kt(1),it(2,eoe,2,1,"ng-container",4),Ie()),2&n){const e=an();Ss(e.options.titleClass),Cu("aria-label",e.title),ct(1),Pr(" ",e.title," "),ct(1),Ct("ngIf",e.duplicatesCount)}}function noe(n,t){if(1&n&&Gn(0,"div",7),2&n){const e=an();Ss(e.options.messageClass),Ct("innerHTML",e.message,vr)}}function roe(n,t){if(1&n&&(Ae(0,"div",8),kt(1),Ie()),2&n){const e=an();Ss(e.options.messageClass),Cu("aria-label",e.message),ct(1),Pr(" ",e.message," ")}}function ioe(n,t){if(1&n&&(Ae(0,"div"),Gn(1,"div",9),Ie()),2&n){const e=an();ct(1),Hs("width",e.width+"%")}}function soe(n,t){if(1&n){const e=Di();Ae(0,"button",5),dr("click",function(){return Ur(e),an().remove()}),Ae(1,"span",6),kt(2,"\xd7"),Ie(),Ie()}}function ooe(n,t){if(1&n&&(Zr(0),kt(1),$r()),2&n){const e=an(2);ct(1),Pr("[",e.duplicatesCount+1,"]")}}function aoe(n,t){if(1&n&&(Ae(0,"div"),kt(1),it(2,ooe,2,1,"ng-container",4),Ie()),2&n){const e=an();Ss(e.options.titleClass),Cu("aria-label",e.title),ct(1),Pr(" ",e.title," "),ct(1),Ct("ngIf",e.duplicatesCount)}}function uoe(n,t){if(1&n&&Gn(0,"div",7),2&n){const e=an();Ss(e.options.messageClass),Ct("innerHTML",e.message,vr)}}function coe(n,t){if(1&n&&(Ae(0,"div",8),kt(1),Ie()),2&n){const e=an();Ss(e.options.messageClass),Cu("aria-label",e.message),ct(1),Pr(" ",e.message," ")}}function loe(n,t){if(1&n&&(Ae(0,"div"),Gn(1,"div",9),Ie()),2&n){const e=an();ct(1),Hs("width",e.width+"%")}}class doe{constructor(t,e){this.component=t,this.injector=e}attach(t,e){return this._attachedHost=t,t.attach(this,e)}detach(){const t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class qE{constructor(t,e,r,s,p,F){this.toastId=t,this.config=e,this.message=r,this.title=s,this.toastType=p,this.toastRef=F,this._onTap=new ie.xQ,this._onAction=new ie.xQ,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(t){this._onAction.next(t)}onAction(){return this._onAction.asObservable()}}const rj={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing",payload:null},ij=new fo("ToastConfig");class hoe{constructor(t){this._overlayRef=t,this.duplicatesCount=0,this._afterClosed=new ie.xQ,this._activate=new ie.xQ,this._manualClose=new ie.xQ,this._resetTimeout=new ie.xQ,this._countDuplicate=new ie.xQ}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(t,e){t&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}}class poe{constructor(t,e){this._toastPackage=t,this._parentInjector=e}get(t,e,r){return t===qE?this._toastPackage:this._parentInjector.get(t,e,r)}}class moe extends class{attach(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(t){this._disposeFn=t}}{constructor(t,e,r){super(),this._hostDomElement=t,this._componentFactoryResolver=e,this._appRef=r}attachComponentPortal(t,e){const r=this._componentFactoryResolver.resolveComponentFactory(t.component);let s;return s=r.create(t.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}class goe{constructor(t){this._portalHost=t}attach(t,e=!0){return this._portalHost.attach(t,e)}detach(){return this._portalHost.detach()}}let yoe=(()=>{class n{constructor(e){this._document=e}ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),boe=(()=>{class n{constructor(e,r,s,p){this._overlayContainer=e,this._componentFactoryResolver=r,this._appRef=s,this._document=p,this._paneElements=new Map}create(e,r){return this._createOverlayRef(this.getPaneElement(e,r))}getPaneElement(e="",r){return this._paneElements.get(r)||this._paneElements.set(r,{}),this._paneElements.get(r)[e]||(this._paneElements.get(r)[e]=this._createPaneElement(e,r)),this._paneElements.get(r)[e]}_createPaneElement(e,r){const s=this._document.createElement("div");return s.id="toast-container",s.classList.add(e),s.classList.add("toast-container"),r?r.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(e){return new moe(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new goe(this._createPortalHost(e))}}return n.\u0275fac=function(e){return new(e||n)(Yn(yoe),Yn(l1),Yn(e2),Yn(qa))},n.\u0275prov=we({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),RO=(()=>{class n{constructor(e,r,s,p,F){this.overlay=r,this._injector=s,this.sanitizer=p,this.ngZone=F,this.currentlyActive=0,this.toasts=[],this.index=0,this.toastrConfig=Object.assign(Object.assign({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=Object.assign(Object.assign({},e.default.iconClasses),e.config.iconClasses))}show(e,r,s={},p=""){return this._preBuildNotification(p,e,r,this.applyConfig(s))}success(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.success||"",e,r,this.applyConfig(s))}error(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.error||"",e,r,this.applyConfig(s))}info(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.info||"",e,r,this.applyConfig(s))}warning(e,r,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.warning||"",e,r,this.applyConfig(s))}clear(e){for(const r of this.toasts)if(void 0!==e){if(r.toastId===e)return void r.toastRef.manualClose()}else r.toastRef.manualClose()}remove(e){const r=this._findToast(e);if(!r||(r.activeToast.toastRef.close(),this.toasts.splice(r.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActivethis._buildNotification(e,r,s,p)):this._buildNotification(e,r,s,p)}_buildNotification(e,r,s,p){if(!p.toastComponent)throw new Error("toastComponent required");const F=this.findDuplicate(s,r,this.toastrConfig.resetTimeoutOnDuplicate&&p.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||r)&&this.toastrConfig.preventDuplicates&&null!==F)return F;this.previousToastMessage=r;let z=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(z=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));const te=this.overlay.create(p.positionClass,this.overlayContainer);this.index=this.index+1;let fe=r;r&&p.enableHtml&&(fe=this.sanitizer.sanitize(Ui.HTML,r));const Re=new hoe(te),$e=new qE(this.index,p,fe,s,e,Re),rt=new poe($e,this._injector),ft=new doe(p.toastComponent,rt),Tt=te.attach(ft,this.toastrConfig.newestOnTop);Re.componentInstance=Tt.instance;const Ft={toastId:this.index,title:s||"",message:r||"",toastRef:Re,onShown:Re.afterActivate(),onHidden:Re.afterClosed(),onTap:$e.onTap(),onAction:$e.onAction(),portal:Tt};return z||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{Ft.toastRef.activate()})),this.toasts.push(Ft),Ft}}return n.\u0275fac=function(e){return new(e||n)(Yn(ij),Yn(boe),Yn(sc),Yn(N7),Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),voe=(()=>{class n{constructor(e,r,s){this.toastrService=e,this.toastPackage=r,this.ngZone=s,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=r.message,this.title=r.title,this.options=r.config,this.originalTimeout=r.config.timeOut,this.toastClasses=`${r.toastType} ${r.config.toastClass}`,this.sub=r.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=r.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=r.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=r.toastRef.countDuplicate().subscribe(p=>{this.duplicatesCount=p})}get displayStyle(){if("inactive"===this.state.value)return"none"}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=Object.assign(Object.assign({},this.state),{value:"active"}),!0!==this.options.disableTimeOut&&"timeOut"!==this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(0===this.width||100===this.width||!this.options.timeOut)return;const e=(new Date).getTime();this.width=(this.hideTime-e)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Object.assign(Object.assign({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=Object.assign(Object.assign({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){!0===this.options.disableTimeOut||"extendedTimeOut"===this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state.value||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,r){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),r)):this.timeout=setTimeout(()=>e(),r)}outsideInterval(e,r){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),r)):this.intervalId=setInterval(()=>e(),r)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}}return n.\u0275fac=function(e){return new(e||n)(Xt(RO),Xt(qE),Xt(pa))},n.\u0275cmp=bn({type:n,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,r){1&e&&dr("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),2&e&&(F8("@flyInOut",r.state),Ss(r.toastClasses),Hs("display",r.displayStyle))},attrs:nj,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,r){1&e&&(it(0,Qse,3,0,"button",0),it(1,toe,3,5,"div",1),it(2,noe,1,3,"div",2),it(3,roe,2,4,"div",3),it(4,ioe,2,2,"div",4)),2&e&&(Ct("ngIf",r.options.closeButton),ct(1),Ct("ngIf",r.title),ct(1),Ct("ngIf",r.message&&r.options.enableHtml),ct(1),Ct("ngIf",r.message&&!r.options.enableHtml),ct(1),Ct("ngIf",r.options.progressBar))},directives:[La],encapsulation:2,data:{animation:[F3("flyInOut",[K1("inactive",vf({opacity:0})),K1("active",vf({opacity:1})),K1("removed",vf({opacity:0})),V2("inactive => active",Bg("{{ easeTime }}ms {{ easing }}")),V2("active => removed",Bg("{{ easeTime }}ms {{ easing }}"))])]}}),n})();const _oe=Object.assign(Object.assign({},rj),{toastComponent:voe});let woe=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[{provide:ij,useValue:{default:_oe,config:e}}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[h1]]}),n})(),xoe=(()=>{class n{constructor(e,r,s){this.toastrService=e,this.toastPackage=r,this.appRef=s,this.width=-1,this.toastClasses="",this.state="inactive",this.message=r.message,this.title=r.title,this.options=r.config,this.originalTimeout=r.config.timeOut,this.toastClasses=`${r.toastType} ${r.config.toastClass}`,this.sub=r.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=r.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=r.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=r.toastRef.countDuplicate().subscribe(p=>{this.duplicatesCount=p})}get displayStyle(){if("inactive"===this.state)return"none"}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(!0===this.options.disableTimeOut||"timeOut"===this.options.disableTimeOut)&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(0===this.width||100===this.width||!this.options.timeOut)return;const e=(new Date).getTime();this.width=(this.hideTime-e)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=(new Date).getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){"removed"!==this.state&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){"removed"!==this.state&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){!0===this.options.disableTimeOut||"extendedTimeOut"===this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}}return n.\u0275fac=function(e){return new(e||n)(Xt(RO),Xt(qE),Xt(e2))},n.\u0275cmp=bn({type:n,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,r){1&e&&dr("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),2&e&&(Ss(r.toastClasses),Hs("display",r.displayStyle))},attrs:nj,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,r){1&e&&(it(0,soe,3,0,"button",0),it(1,aoe,3,5,"div",1),it(2,uoe,1,3,"div",2),it(3,coe,2,4,"div",3),it(4,loe,2,2,"div",4)),2&e&&(Ct("ngIf",r.options.closeButton),ct(1),Ct("ngIf",r.title),ct(1),Ct("ngIf",r.message&&r.options.enableHtml),ct(1),Ct("ngIf",r.message&&!r.options.enableHtml),ct(1),Ct("ngIf",r.options.progressBar))},directives:[La],encapsulation:2}),n})();Object.assign(Object.assign({},rj),{toastComponent:xoe});const Xw=class extends class{constructor(t,e,r){yt(this,"web3"),yt(this,"chain"),yt(this,"toastrService"),yt(this,"connectedEvent"),yt(this,"disconnectedEvent"),yt(this,"accountChangedEvent"),yt(this,"chainChangedEvent"),yt(this,"onboard",null),yt(this,"provider"),yt(this,"providerName"),yt(this,"name",""),yt(this,"address",""),yt(this,"chainId",1),yt(this,"gasLimitMultiplier",1),yt(this,"safeTxBatch",[]),this.web3=t,this.chain=e,this.toastrService=r,this.initOnboard(),this.connectedEvent=new mo,this.disconnectedEvent=new mo,this.accountChangedEvent=new mo,this.chainChangedEvent=new mo}initOnboard(){this.onboard=(0,iie.aB)({wallets:[fie(),Tse(),Mse({walletConnectVersion:2,projectId:"bd887c824dd0d5799a0bd58191363e2f"}),Hse({email:"hello@timelessfi.com",appUrl:"https://bunni.pro"}),oie(),"undefined"==typeof window?()=>null:()=>({label:"Phantom",getIcon:function(){var n=(0,Br.Z)(function*(){return(yield Y.e(3818).then(Y.bind(Y,43818))).default});return function(){return n.apply(this,arguments)}}(),getInterface:function(){var n=(0,Br.Z)(function*(){if("phantom"in window){const t=window;if("phantom"in t&&"ethereum"in t.phantom&&t.phantom.ethereum.isPhantom)return{provider:(0,Wl.createEIP1193Provider)(t.phantom.ethereum)}}throw window.open("https://phantom.app/download","_blank"),new Error("Please install Phantom before proceeding")});return function(){return n.apply(this,arguments)}}(),platforms:["all"]}),Jse({projectId:"bd887c824dd0d5799a0bd58191363e2f"}),uie({apiKey:"pk_live_937F9430B2CB3407"}),Rse({apiKey:"61885cb4-8889-4e99-8186-27f853a1ff12"}),Bse(),"undefined"==typeof window?()=>null:()=>{return{label:"Frontier",getIcon:(n=(0,Br.Z)(function*(){return(yield Y.e(5890).then(Y.bind(Y,15890))).default}),function(){return n.apply(this,arguments)}),getInterface:function(){var n=(0,Br.Z)(function*(){const{createEIP1193Provider:t}=yield Promise.resolve().then(Y.bind(Y,79696));let r;if(window.hasOwnProperty("ethereum")&&window.ethereum.isFrontier)r=t(window.ethereum);else{if(!window.frontier)throw window.open("https://frontier.xyz/browser-extension","_blank"),new Error("Please Install Frontier to use this wallet");r=t(window.frontier.ethereum)}return{provider:r}});return function(){return n.apply(this,arguments)}}()};var n}],chains:Object.values(this.chain.id).map(t=>({id:this.chain.metadata[t].chainId,token:this.chain.metadata[t].nativeCurrency.symbol,label:this.chain.metadata[t].displayName,rpcUrl:this.chain.rpc[t],publicRpcUrl:this.chain.metadata[t].rpcUrls[0],blockExplorerUrl:this.chain.metadata[t].blockExplorerUrls[0]})),accountCenter:{desktop:{enabled:!1},mobile:{enabled:!1}},connect:{autoConnectLastWallet:!0,showSidebar:!1,disableUDResolution:!0},appMetadata:{name:"Bunni",icon:"assets/img/bunni-logo.png",description:"Liquidity engine for Uniswap."},theme:"dark"}),this.onboard.state.select("wallets").subscribe(t=>{if(t.length){this.web3=new(V_())(t[0].provider),this.provider=t[0].provider;const e=t[0].accounts[0].address,r=Number(t[0].chains[0].id);e!==this.address&&(this.address?(this.address=e,this.accountChangedEvent.emit()):(this.address=e,this.connectedEvent.emit())),r!==this.chainId&&(this.chainId=r,this.chainChangedEvent.emit(this.chainId))}else this.address&&(this.address="",this.chainId=1,this.provider=null,this.disconnectedEvent.emit())})}connect(){var t=this;return(0,Br.Z)(function*(){yield t.onboard.connectWallet()})()}connectToGnosisSafeIfPossible(){var t=this;return(0,Br.Z)(function*(){const e=window.location.ancestorOrigins;(e?.contains("https://gnosis-safe.io")||e?.contains("https://app.safe.global"))&&(yield t.onboard.connectWallet({autoSelect:{label:"Safe"}}))})()}disconnect(){var t=this;return(0,Br.Z)(function*(){const[e]=t.onboard.state.get().wallets;yield t.onboard.disconnectWallet({label:e.label})})()}changeChain(t){var e=this;return(0,Br.Z)(function*(){return e.web3.currentProvider?yield e.onboard.setChain({chainId:t}):(e.chainId=Number(t),e.chainChangedEvent.emit(Number(t)),!0)})()}httpsWeb3(t){return t?new(V_())(this.chain.rpc[t]):new(V_())(this.chain.rpc[this.chainId])}ethersProvider(t){return new PO.r(t?this.chain.rpc[t]:this.chain.rpc[this.chainId])}sendTx(t,e,r,s,p,F=0){var z=this;return(0,Br.Z)(function*(){if(z.provider.safe)z.safeTxBatch=[...z.safeTxBatch,{func:t,value:F}],z.sendSafeTx(z.safeTxBatch,e,r,s,p,F);else{let te=yield z.estimateGas(t,F,p);if(!isNaN(te)){let fe,Re,$e;return z.chain.metadata[z.chainId].useAccessList&&(fe=yield z.httpsWeb3().eth.createAccessList({from:z.address,to:t._parent._address,gas:te,data:t.encodeABI(),value:F}),Re=Number(fe.gasUsed)),te=Re&&Re>te?Math.ceil(Re*z.gasLimitMultiplier):Math.ceil(te*z.gasLimitMultiplier),t.send({from:z.address,gas:te,maxFeePerGas:null,maxPriorityFeePerGas:null,accessList:Re&&Re{e(rt),$e=z.openTxModal(rt,!1)}).on("receipt",rt=>{r(rt)}).once("confirmation",(rt,ft)=>{s(ft),$e.toastRef.componentInstance.hidden?$e=z.openTxModal(ft.transactionHash,!0):($e.toastRef.componentInstance.txConfirmed=!0,clearTimeout($e.toastRef.componentInstance.timeout),$e.toastRef.componentInstance.timeout=setTimeout(()=>{$e.toastRef.close()},3e4))}).on("error",rt=>{p(rt)})}}})()}sendSafeTx(t,e,r,s,p,F){var z=this;return(0,Br.Z)(function*(){let te=[];t.map($e=>{te=[...te,{to:$e.func._parent._address,value:$e.val?$e.val:0,data:$e.func.encodeABI()}]});yield z.provider.sdk.txs.send({txs:te,params:{safeTxGas:1e6}}).then(()=>{z.safeTxBatch=[]}).catch(()=>{z.safeTxBatch.pop()})})()}approveToken(t,e,r,s,p,F,z){var te=this;return(0,Br.Z)(function*(){const fe=new sn.Z(2).pow(256).minus(1).integerValue().toFixed();if(new sn.Z(yield t.methods.allowance(te.address,e).call()).gte(r))return void p();const $e=t.methods.approve(e,fe);if(!te.provider.safe)return te.sendTx($e,s,p,F,z);te.safeTxBatch=[...te.safeTxBatch,{func:$e,value:0}],F()})()}sign(t){var e=this;return(0,Br.Z)(function*(){const[r,s,p]=yield e.web3.currentProvider.send("eth_signTypedData_v4",[e.address,t]).then(F=>{const z=(0,Qre.splitSignature)(F.result?F.result:F);return[z.v,z.r,z.s]});return[r,s,p]})()}estimateGas(t,e,r){var s=this;return(0,Br.Z)(function*(){return Math.floor(1.1*(yield t.estimateGas({from:s.address,value:e}).catch(r)))})()}estimateSafeGas(t,e,r){var s=this;return(0,Br.Z)(function*(){const p={from:s.address,to:t._parent._address,data:t.encodeABI(),...e>0&&{value:e}};return Math.floor(yield s.provider.sdk.eth.getEstimateGas(p).catch(r))})()}openTxModal(t,e){const r=this.toastrService.show(null,null,{toastComponent:GE,positionClass:"toast-bottom-right"});return r.toastRef.componentInstance.hash=t,r.toastRef.componentInstance.hidden=!1,r.toastRef.componentInstance.chainId=this.chainId,r.toastRef.componentInstance.txConfirmed=e,r.toastRef.componentInstance.toastrInstance=r,r.toastRef.componentInstance.timeout=setTimeout(()=>{r.toastRef.close()},3e4),r.toastRef.afterClosed().subscribe(()=>{r.toastRef.componentInstance.hidden=!0}),r}openErrorModal(t){const e=this.toastrService.show(null,null,{toastComponent:zE,positionClass:"toast-bottom-right"});return e.toastRef.componentInstance.error=t,setTimeout(()=>{e.toastRef.close()},3e4),e}}{constructor(t,e,r){super(t,e,r),yt(this,"web3"),yt(this,"chain"),yt(this,"toastrService"),this.web3=t,this.chain=e,this.toastrService=r,this.connectedEvent.subscribe(()=>{this.reverseENSLookup(this.address).then(s=>this.name=s)}),this.disconnectedEvent.subscribe(()=>{this.name=""}),this.accountChangedEvent.subscribe(s=>{this.reverseENSLookup(this.address).then(p=>this.name=p)})}get ens(){return this.name}get user(){return this.address}get connected(){return!!this.address}get rewards(){return!!Cy[this.chainId]||!!My[this.chainId]}get usingGnosisSafe(){return this.provider.safe}get connectedToEthereum(){return this.chainId===qi.ETHEREUM}reverseENSLookup(t){return(0,Br.Z)(function*(){return null})()}};let Xa=Xw;yt(Xa,"\u0275fac",function(e){return new(e||Xw)(Yn(V_()),Yn(dc),Yn(RO))}),yt(Xa,"\u0275prov",we({token:Xw,factory:Xw.\u0275fac,providedIn:"root"}));const Qw=class{constructor(t){yt(this,"wallet"),this.wallet=t}getABI(t){return Y(77193)(`./${t}.json`)}getContract(t,e,r){const s=Y(77193)(`./${e}.json`);return new r.eth.Contract(s,t)}getERC20(t,e){return this.getContract(t,"ERC20",e)}getBunniHub(t){return this.getContract(x5,"BunniHub",t)}getBunniLens(t){return this.getContract(Pre,"BunniLens",t)}getBunniMigrator(t){return this.getContract(Rre,"BunniMigrator",t)}getUniswapFactory(t){return this.getContract(Nre,"UniswapV3Factory",t)}getNonfungiblePositionManager(t){return this.getContract(Bre,"NonfungiblePositionManager",t)}getBPT(t,e){return this.getContract(J6[e],"BPT",t)}getVotingEscrow(t,e){return this.getContract(Am[e],"VotingEscrow",t)}getGaugeController(t,e){return this.getContract(Cy[e],"GaugeController",t)}getMinter(t,e){return this.getContract(Fre[e],"Minter",t)}getLiquidityGauge(t,e){return this.getContract(t,"LiquidityGauge",e)}getChildGauge(t,e){return this.getContract(t,"ChildGauge",e)}getOptionsToken(t,e){return this.getContract(Z1[e],"OptionsToken",t)}getGaugeFactory(t,e){return this.getContract(qU[e],"TimelessLiquidityGaugeFactory",t)}getChildGaugeFactory(t,e){return this.getContract(My[e],"ChildGaugeFactory",t)}getRootGaugeFactory(t,e){return this.getContract(j_[e],"RootGaugeFactory",t)}getPoorOracle(t,e){return this.getContract(Lre[e],"UniswapPoorOracle",t)}getLpZapIn(t,e){return this.getContract(fp[e],"BunniLpZapIn",t)}getFeeDistributor(t,e){return this.getContract(OO[e],"FeeDistributor",t)}getVeBeacon(t,e){return this.getContract(KU[e],"VeBeacon",t)}getBridger(t,e){let r;switch(e){case 10:r=this.getContract(DO[e],"OptimismBridger",t);break;case 137:r=this.getContract(DO[e],"PolygonBridger",t);break;case 42161:r=this.getContract(DO[e],"ArbitrumBridger",t);break;default:r=null}return r}};let ud=Qw;yt(ud,"\u0275fac",function(e){return new(e||Qw)(Yn(Xa))}),yt(ud,"\u0275prov",we({token:Qw,factory:Qw.\u0275fac,providedIn:"root"}));class T5{constructor(){yt(this,"id",""),yt(this,"address",""),yt(this,"chainId",0),yt(this,"decimals",0),yt(this,"iconPath","assets/img/tokens/unknown.svg"),yt(this,"name",""),yt(this,"precision",0),yt(this,"price",new sn.Z(0)),yt(this,"symbol",""),yt(this,"totalSupply",new sn.Z(0)),yt(this,"userBalance",new sn.Z(0)),yt(this,"userBalanceUSD",new sn.Z(0)),yt(this,"userAllowances",Object.create({})),yt(this,"pools",[])}updateUSDValues(){this.userBalanceUSD=this.userBalance.times(this.price),this.pools.forEach(t=>{t.updateUSDValues(),t.bunniTokens.forEach(e=>{e.updateUSDValues(),e.gauge&&e.gauge.updateUSDValues()})})}resetUser(){this.userBalance=new sn.Z(0),this.userBalanceUSD=new sn.Z(0),this.userAllowances=Object.create({})}}class KE extends T5{constructor(){super(...arguments),yt(this,"decimals",18),yt(this,"iconPath","assets/img/tokens/bunni.png"),yt(this,"precision",Math.pow(10,18)),yt(this,"symbol","BUNNI-LP"),yt(this,"liquidity",new sn.Z(0)),yt(this,"tickLower",0),yt(this,"tickUpper",0),yt(this,"liquidityPerShare",new sn.Z(0)),yt(this,"amount0PerShare",new sn.Z(0)),yt(this,"amount1PerShare",new sn.Z(0)),yt(this,"reserve",new sn.Z(0)),yt(this,"reserve0",new sn.Z(0)),yt(this,"reserve1",new sn.Z(0)),yt(this,"volume",new sn.Z(0)),yt(this,"volume0",new sn.Z(0)),yt(this,"volume1",new sn.Z(0)),yt(this,"fees",new sn.Z(0)),yt(this,"fees0",new sn.Z(0)),yt(this,"fees1",new sn.Z(0)),yt(this,"minPrice",new sn.Z(0)),yt(this,"maxPrice",new sn.Z(0)),yt(this,"swapAPR",new sn.Z(0)),yt(this,"stakingAPR",new sn.Z(0)),yt(this,"rewardTokenAPR",new sn.Z(0)),yt(this,"thisPeriodMinRewardAPR",new sn.Z(0)),yt(this,"thisPeriodMaxRewardAPR",new sn.Z(0)),yt(this,"nextPeriodMinRewardAPR",new sn.Z(0)),yt(this,"nextPeriodMaxRewardAPR",new sn.Z(0)),yt(this,"userRewardAPR",new sn.Z(0)),yt(this,"userDeposit",new sn.Z(0)),yt(this,"userDepositUSD",new sn.Z(0)),yt(this,"userCostBasisPerShareUSD",new sn.Z(0)),yt(this,"userCompoundedPerShareUSD",new sn.Z(0)),yt(this,"userClaimedRewardPerShareUSD",new sn.Z(0)),yt(this,"token0CostBasisPerShare",new sn.Z(0)),yt(this,"token1CostBasisPerShare",new sn.Z(0)),yt(this,"token0CompoundedPerShare",new sn.Z(0)),yt(this,"token1CompoundedPerShare",new sn.Z(0)),yt(this,"claimedRewardsPerShare",new sn.Z(0)),yt(this,"pool",null),yt(this,"gauge",null)}updateUSDValues(){const t=this.pool?this.pool.token0.price:new sn.Z(0),e=this.pool?this.pool.token1.price:new sn.Z(0);this.price=this.amount0PerShare.times(t).plus(this.amount1PerShare.times(e)),this.reserve=this.reserve0.times(t).plus(this.reserve1.times(e)),this.volume=sn.Z.min(this.volume0.times(t),this.volume1.times(t)),this.fees=sn.Z.min(this.fees0.times(t),this.fees1.times(e)),this.userCostBasisPerShareUSD=this.token0CostBasisPerShare.times(t).plus(this.token1CostBasisPerShare.times(e)),this.userCompoundedPerShareUSD=this.token0CompoundedPerShare.times(t).plus(this.token1CompoundedPerShare.times(e)),this.gauge&&this.gauge.oLIT&&(this.userClaimedRewardPerShareUSD=this.claimedRewardsPerShare.times(this.gauge.oLIT.price)),this.userBalanceUSD=this.userBalance.times(this.price),this.userDepositUSD=this.userDeposit.times(this.price)}resetUser(){this.userBalance=new sn.Z(0),this.userBalanceUSD=new sn.Z(0),this.userDeposit=new sn.Z(0),this.userDepositUSD=new sn.Z(0),this.userCostBasisPerShareUSD=new sn.Z(0),this.userCompoundedPerShareUSD=new sn.Z(0),this.userClaimedRewardPerShareUSD=new sn.Z(0),this.token0CostBasisPerShare=new sn.Z(0),this.token1CostBasisPerShare=new sn.Z(0),this.token0CompoundedPerShare=new sn.Z(0),this.token1CompoundedPerShare=new sn.Z(0),this.claimedRewardsPerShare=new sn.Z(0)}}class Eoe{constructor(){yt(this,"BPT",null),yt(this,"veLIT",null),yt(this,"BAL",null),yt(this,"WETH",null),yt(this,"supply",new sn.Z(0)),yt(this,"totalSupply",new sn.Z(0)),yt(this,"supplyLastPeriod",new sn.Z(0)),yt(this,"balRewardLastPeriod",new sn.Z(0)),yt(this,"wethRewardLastPeriod",new sn.Z(0)),yt(this,"averagePrice",new sn.Z(0)),yt(this,"balAPR",new sn.Z(0)),yt(this,"wethAPR",new sn.Z(0)),yt(this,"end",0),yt(this,"balance",new sn.Z(0)),yt(this,"balClaimable",new sn.Z(0)),yt(this,"balClaimableUSD",new sn.Z(0)),yt(this,"wethClaimable",new sn.Z(0)),yt(this,"wethClaimableUSD",new sn.Z(0)),yt(this,"votePowerUsed",new sn.Z(0)),yt(this,"votePowerUnused",new sn.Z(0))}updateUSDValues(){this.balClaimableUSD=this.BAL?this.balClaimable.times(this.BAL.price):new sn.Z(0),this.wethClaimableUSD=this.WETH?this.wethClaimable.times(this.WETH.price):new sn.Z(0),this.averagePrice=this.BPT&&this.totalSupply.gt(0)?this.supply.div(this.totalSupply).times(this.BPT.price):new sn.Z(0)}resetUser(){this.end=0,this.balance=new sn.Z(0),this.balClaimable=new sn.Z(0),this.balClaimableUSD=new sn.Z(0),this.wethClaimable=new sn.Z(0),this.wethClaimableUSD=new sn.Z(0),this.votePowerUsed=new sn.Z(0),this.votePowerUnused=new sn.Z(0)}}class Toe{constructor(){yt(this,"token",null),yt(this,"amount",new sn.Z(0)),yt(this,"maxRewardPerVote",new sn.Z(0))}}class Aoe{constructor(){yt(this,"token",null),yt(this,"amount",new sn.Z(0)),yt(this,"maxTokensPerVote",new sn.Z(0))}}class Ioe{constructor(){yt(this,"token",null),yt(this,"amount",new sn.Z(0)),yt(this,"rewardPerVote",new sn.Z(0)),yt(this,"objectiveVotes",new sn.Z(0))}}class Soe extends T5{constructor(){super(...arguments),yt(this,"distributor",""),yt(this,"claimableReward",new sn.Z(0)),yt(this,"rewardRate",new sn.Z(0)),yt(this,"rewardAPR",new sn.Z(0))}}class sj extends T5{constructor(){super(...arguments),yt(this,"decimals",18),yt(this,"iconPath","assets/img/tokens/unknown.svg"),yt(this,"name","Timeless BUNNI-LP Gauge Deposit"),yt(this,"precision",Math.pow(10,18)),yt(this,"symbol","BUNNI-LP-gauge"),yt(this,"votesThisPeriod",new sn.Z(0)),yt(this,"votesNextPeriod",new sn.Z(0)),yt(this,"weightThisPeriod",new sn.Z(0)),yt(this,"weightNextPeriod",new sn.Z(0)),yt(this,"relativeWeightCap",new sn.Z(0)),yt(this,"relativeInflationRate",new sn.Z(0)),yt(this,"tokenlessProduction",new sn.Z(0)),yt(this,"workingSupply",new sn.Z(0)),yt(this,"oLIT",null),yt(this,"weeklyEmissionsThisPeriod",new sn.Z(0)),yt(this,"weeklyEmissionsNextPeriod",new sn.Z(0)),yt(this,"exists",!1),yt(this,"killed",!1),yt(this,"rootGaugeDeployed",!1),yt(this,"childGaugeDeployed",!1),yt(this,"userTime",0),yt(this,"userTimeCountdown",null),yt(this,"userWeight",new sn.Z(0)),yt(this,"workingBalance",new sn.Z(0)),yt(this,"claimableReward",new sn.Z(0)),yt(this,"bunniToken",null),yt(this,"bounties",[]),yt(this,"bribes",[]),yt(this,"quests",[]),yt(this,"votes",[]),yt(this,"rewardTokens",[])}updateUSDValues(){this.price=this.bunniToken?this.bunniToken.price:new sn.Z(0),this.userBalanceUSD=this.userBalance.times(this.price)}resetUser(){this.userBalance=new sn.Z(0),this.userBalanceUSD=new sn.Z(0),this.userAllowances=Object.create({}),this.userTime=0,this.userTimeCountdown=null,this.userWeight=new sn.Z(0),this.workingBalance=new sn.Z(0),this.claimableReward=new sn.Z(0)}}class koe{constructor(){yt(this,"id",""),yt(this,"address",""),yt(this,"chainId",0),yt(this,"fee",0),yt(this,"liquidity",new sn.Z(0)),yt(this,"sqrtPriceX96",new sn.Z(0)),yt(this,"tick",0),yt(this,"token0",null),yt(this,"token1",null),yt(this,"token0Price",new sn.Z(0)),yt(this,"token1Price",new sn.Z(0)),yt(this,"reserve",new sn.Z(0)),yt(this,"reserve0",new sn.Z(0)),yt(this,"reserve1",new sn.Z(0)),yt(this,"volume",new sn.Z(0)),yt(this,"volume0",new sn.Z(0)),yt(this,"volume1",new sn.Z(0)),yt(this,"totalVolume",new sn.Z(0)),yt(this,"totalVolume0",new sn.Z(0)),yt(this,"totalVolume1",new sn.Z(0)),yt(this,"fees",new sn.Z(0)),yt(this,"fees0",new sn.Z(0)),yt(this,"fees1",new sn.Z(0)),yt(this,"totalFees",new sn.Z(0)),yt(this,"totalFees0",new sn.Z(0)),yt(this,"totalFees1",new sn.Z(0)),yt(this,"bunniTokens",[]),yt(this,"protocol",null)}updateUSDValues(){this.protocol.reserve=this.protocol.reserve.minus(this.reserve),this.protocol.dailyVolume=this.protocol.dailyVolume.minus(this.volume),this.protocol.dailyFees=this.protocol.dailyFees.minus(this.fees),this.protocol.totalVolume=this.protocol.totalVolume.minus(this.totalVolume),this.protocol.totalFees=this.protocol.totalFees.minus(this.totalFees),this.reserve=this.reserve0.times(this.token0.price).plus(this.reserve1.times(this.token1.price)),this.volume=sn.Z.min(this.volume0.times(this.token0.price),this.volume1.times(this.token1.price)),this.fees=sn.Z.min(this.fees0.times(this.token0.price),this.fees1.times(this.token1.price)),this.totalVolume=sn.Z.min(this.totalVolume0.times(this.token0.price),this.totalVolume1.times(this.token1.price)),this.totalFees=sn.Z.min(this.totalFees0.times(this.token0.price),this.totalFees1.times(this.token1.price)),this.protocol.reserve=this.protocol.reserve.plus(this.reserve),this.protocol.dailyVolume=this.protocol.dailyVolume.plus(this.volume),this.protocol.dailyFees=this.protocol.dailyFees.plus(this.fees),this.protocol.totalVolume=this.protocol.totalVolume.plus(this.totalVolume),this.protocol.totalFees=this.protocol.totalFees.plus(this.totalFees)}resetUser(){}}class Coe{constructor(){yt(this,"chain",0),yt(this,"fee",new sn.Z(0)),yt(this,"inflationRate",new sn.Z(0)),yt(this,"optionsMultiplier",new sn.Z(0)),yt(this,"reserve",new sn.Z(0)),yt(this,"totalVolume",new sn.Z(0)),yt(this,"dailyVolume",new sn.Z(0)),yt(this,"totalFees",new sn.Z(0)),yt(this,"dailyFees",new sn.Z(0))}}class ZE{constructor(t,e){yt(this,"target"),yt(this,"countDirection"),yt(this,"days"),yt(this,"hours"),yt(this,"minutes"),yt(this,"seconds"),yt(this,"running"),yt(this,"timeIntervalRef"),this.target=t,this.countDirection=e,this.days="--",this.hours="--",this.minutes="--",this.seconds="--",this.running=!1}start(){this.running=!0,this.timeIntervalRef=setInterval(()=>{this.update()},1e3)}stop(){this.running=!1,clearInterval(this.timeIntervalRef)}update(){if("down"===this.countDirection&&Date.now()/1e3>this.target||"up"===this.countDirection&&Date.now()/1e3(function(n){n[n.MAINNET=1]="MAINNET",n[n.GOERLI=5]="GOERLI",n[n.SEPOLIA=11155111]="SEPOLIA",n[n.OPTIMISM=10]="OPTIMISM",n[n.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",n[n.ARBITRUM_ONE=42161]="ARBITRUM_ONE",n[n.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",n[n.POLYGON=137]="POLYGON",n[n.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",n[n.CELO=42220]="CELO",n[n.CELO_ALFAJORES=44787]="CELO_ALFAJORES",n[n.GNOSIS=100]="GNOSIS",n[n.MOONBEAM=1284]="MOONBEAM",n[n.BNB=56]="BNB",n[n.AVALANCHE=43114]="AVALANCHE",n[n.BASE_GOERLI=84531]="BASE_GOERLI",n[n.BASE=8453]="BASE"}(Gu||(Gu={})),Gu))(),$_={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},joe=z2({},$_,{v1MixedRouteQuoterAddress:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E"}),Voe=z2({},$_,{v1MixedRouteQuoterAddress:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),Hoe=$_,$oe=z2({},$_,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573"}),lj=$_,dj={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"},Fg=((zp={})[Gu.MAINNET]=joe,zp[Gu.OPTIMISM]=Hoe,zp[Gu.ARBITRUM_ONE]=$oe,zp[Gu.POLYGON]=lj,zp[Gu.POLYGON_MUMBAI]=lj,zp[Gu.GOERLI]=Voe,zp[Gu.CELO]=dj,zp[Gu.CELO_ALFAJORES]=dj,zp[Gu.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2"},zp[Gu.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},zp[Gu.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},zp[Gu.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad07"},zp[Gu.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE"},zp[Gu.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapRouter02Address:"0x2626664c2603336E57B271c5C0b26F421741e481"},zp[Gu.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},{}[Gu.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",{}[Gu.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",{}[Gu.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",{}[Gu.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",{}[Gu.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",(()=>(function(n){n[n.EXACT_INPUT=0]="EXACT_INPUT",n[n.EXACT_OUTPUT=1]="EXACT_OUTPUT"}(Fg||(Fg={})),Fg))()),r2=(()=>(function(n){n[n.ROUND_DOWN=0]="ROUND_DOWN",n[n.ROUND_HALF_UP=1]="ROUND_HALF_UP",n[n.ROUND_UP=2]="ROUND_UP"}(r2||(r2={})),r2))(),Z3=er().BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),z_=BO()(Boe()),HO=BO()(oj()),Joe=((W_={})[r2.ROUND_DOWN]=z_.ROUND_DOWN,W_[r2.ROUND_HALF_UP]=z_.ROUND_HALF_UP,W_[r2.ROUND_UP]=z_.ROUND_UP,W_),Xoe=((G_={})[r2.ROUND_DOWN]=0,G_[r2.ROUND_HALF_UP]=1,G_[r2.ROUND_UP]=3,G_),q_=function(){function n(e,r){void 0===r&&(r=er().BigInt(1)),this.numerator=er().BigInt(e),this.denominator=er().BigInt(r)}n.tryParseFraction=function(r){if(r instanceof er()||"number"==typeof r||"string"==typeof r)return new n(r);if("numerator"in r&&"denominator"in r)return r;throw new Error("Could not parse fraction")};var t=n.prototype;return t.invert=function(){return new n(this.denominator,this.numerator)},t.add=function(r){var s=n.tryParseFraction(r);return er().equal(this.denominator,s.denominator)?new n(er().add(this.numerator,s.numerator),this.denominator):new n(er().add(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator)),er().multiply(this.denominator,s.denominator))},t.subtract=function(r){var s=n.tryParseFraction(r);return er().equal(this.denominator,s.denominator)?new n(er().subtract(this.numerator,s.numerator),this.denominator):new n(er().subtract(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator)),er().multiply(this.denominator,s.denominator))},t.lessThan=function(r){var s=n.tryParseFraction(r);return er().lessThan(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator))},t.equalTo=function(r){var s=n.tryParseFraction(r);return er().equal(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator))},t.greaterThan=function(r){var s=n.tryParseFraction(r);return er().greaterThan(er().multiply(this.numerator,s.denominator),er().multiply(s.numerator,this.denominator))},t.multiply=function(r){var s=n.tryParseFraction(r);return new n(er().multiply(this.numerator,s.numerator),er().multiply(this.denominator,s.denominator))},t.divide=function(r){var s=n.tryParseFraction(r);return new n(er().multiply(this.numerator,s.denominator),er().multiply(this.denominator,s.numerator))},t.toSignificant=function(r,s,p){void 0===s&&(s={groupSeparator:""}),void 0===p&&(p=r2.ROUND_HALF_UP),Number.isInteger(r)||ma(!1),r>0||ma(!1),z_.set({precision:r+1,rounding:Joe[p]});var F=new z_(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(r);return F.toFormat(F.decimalPlaces(),s)},t.toFixed=function(r,s,p){return void 0===s&&(s={groupSeparator:""}),void 0===p&&(p=r2.ROUND_HALF_UP),Number.isInteger(r)||ma(!1),r>=0||ma(!1),HO.DP=r,HO.RM=Xoe[p],new HO(this.numerator.toString()).div(this.denominator.toString()).toFormat(r,s)},H_(n,[{key:"quotient",get:function(){return er().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new n(er().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new n(this.numerator,this.denominator)}}]),n}(),fj=BO()(oj()),s2=function(n){function t(r,s,p){var F;return F=n.call(this,s,p)||this,er().lessThanOrEqual(F.quotient,Z3)||ma(!1),F.currency=r,F.decimalScale=er().exponentiate(er().BigInt(10),er().BigInt(r.decimals)),F}A5(t,n),t.fromRawAmount=function(s,p){return new t(s,p)},t.fromFractionalAmount=function(s,p,F){return new t(s,p,F)};var e=t.prototype;return e.add=function(s){this.currency.equals(s.currency)||ma(!1);var p=n.prototype.add.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.subtract=function(s){this.currency.equals(s.currency)||ma(!1);var p=n.prototype.subtract.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.multiply=function(s){var p=n.prototype.multiply.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.divide=function(s){var p=n.prototype.divide.call(this,s);return t.fromFractionalAmount(this.currency,p.numerator,p.denominator)},e.toSignificant=function(s,p,F){return void 0===s&&(s=6),void 0===F&&(F=r2.ROUND_DOWN),n.prototype.divide.call(this,this.decimalScale).toSignificant(s,p,F)},e.toFixed=function(s,p,F){return void 0===s&&(s=this.currency.decimals),void 0===F&&(F=r2.ROUND_DOWN),s<=this.currency.decimals||ma(!1),n.prototype.divide.call(this,this.decimalScale).toFixed(s,p,F)},e.toExact=function(s){return void 0===s&&(s={groupSeparator:""}),fj.DP=this.currency.decimals,new fj(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(s)},H_(t,[{key:"wrapped",get:function(){return this.currency.isToken?this:t.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}]),t}(q_),hj=new q_(er().BigInt(100));function JE(n){return new Y3(n.numerator,n.denominator)}var Y3=function(n){function t(){var r;return(r=n.apply(this,arguments)||this).isPercent=!0,r}A5(t,n);var e=t.prototype;return e.add=function(s){return JE(n.prototype.add.call(this,s))},e.subtract=function(s){return JE(n.prototype.subtract.call(this,s))},e.multiply=function(s){return JE(n.prototype.multiply.call(this,s))},e.divide=function(s){return JE(n.prototype.divide.call(this,s))},e.toSignificant=function(s,p,F){return void 0===s&&(s=5),n.prototype.multiply.call(this,hj).toSignificant(s,p,F)},e.toFixed=function(s,p,F){return void 0===s&&(s=2),n.prototype.multiply.call(this,hj).toFixed(s,p,F)},t}(q_),I5=function(n){function t(){for(var r,s,p,F,z,te=arguments.length,fe=new Array(te),Re=0;Re=0&&e<255&&Number.isInteger(e)||ma(!1),this.chainId=t,this.decimals=e,this.symbol=r,this.name=s},Qoe=function(n){function t(){var e;return(e=n.apply(this,arguments)||this).isNative=!0,e.isToken=!1,e}return A5(t,n),t}(pj);function Im(n){try{return(0,aj.getAddress)(n)}catch{throw new Error(n+" is not a valid address.")}}var Lg,eae=/^0x[0-9a-fA-F]{40}$/,zd=function(n){function t(r,s,p,F,z,te,fe,Re){var $e;return($e=n.call(this,r,p,F,z)||this).isNative=!1,$e.isToken=!0,$e.address=te?function(n){if(eae.test(n))return n;throw new Error(n+" is not a valid address.")}(s):Im(s),fe&&(fe.gte(YE.O$.from(0))||ma(!1)),Re&&(Re.gte(YE.O$.from(0))||ma(!1)),$e.buyFeeBps=fe,$e.sellFeeBps=Re,$e}A5(t,n);var e=t.prototype;return e.equals=function(s){return s.isToken&&this.chainId===s.chainId&&this.address.toLowerCase()===s.address.toLowerCase()},e.sortsBefore=function(s){return this.chainId!==s.chainId&&ma(!1),this.address.toLowerCase()===s.address.toLowerCase()&&ma(!1),this.address.toLowerCase()n.length)&&(t=n.length);for(var e=0,r=new Array(t);e=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=n[Symbol.iterator]()).next.bind(e)}var S5,t,Sm=(function(n){var t=function(e){var p,r=Object.prototype,s=r.hasOwnProperty,F="function"==typeof Symbol?Symbol:{},z=F.iterator||"@@iterator",te=F.asyncIterator||"@@asyncIterator",fe=F.toStringTag||"@@toStringTag";function Re(kr,wr,mi){return Object.defineProperty(kr,wr,{value:mi,enumerable:!0,configurable:!0,writable:!0}),kr[wr]}try{Re({},"")}catch{Re=function(wr,mi,Ys){return wr[mi]=Ys}}function $e(kr,wr,mi,Ys){var va=Object.create((wr&&wr.prototype instanceof An?wr:An).prototype),Qo=new Ts(Ys||[]);return va._invoke=function(kr,wr,mi){var Ys=ft;return function(va,Qo){if(Ys===Ft)throw new Error("Generator is already running");if(Ys===Qt){if("throw"===va)throw Qo;return ds()}for(mi.method=va,mi.arg=Qo;;){var Do=mi.delegate;if(Do){var Pa=Yi(Do,mi);if(Pa){if(Pa===wn)continue;return Pa}}if("next"===mi.method)mi.sent=mi._sent=mi.arg;else if("throw"===mi.method){if(Ys===ft)throw Ys=Qt,mi.arg;mi.dispatchException(mi.arg)}else"return"===mi.method&&mi.abrupt("return",mi.arg);Ys=Ft;var Ou=rt(kr,wr,mi);if("normal"===Ou.type){if(Ys=mi.done?Qt:Tt,Ou.arg===wn)continue;return{value:Ou.arg,done:mi.done}}"throw"===Ou.type&&(Ys=Qt,mi.method="throw",mi.arg=Ou.arg)}}}(kr,mi,Qo),va}function rt(kr,wr,mi){try{return{type:"normal",arg:kr.call(wr,mi)}}catch(Ys){return{type:"throw",arg:Ys}}}e.wrap=$e;var ft="suspendedStart",Tt="suspendedYield",Ft="executing",Qt="completed",wn={};function An(){}function gr(){}function _r(){}var pr={};pr[z]=function(){return this};var ti=Object.getPrototypeOf,qr=ti&&ti(ti(us([])));qr&&qr!==r&&s.call(qr,z)&&(pr=qr);var yi=_r.prototype=An.prototype=Object.create(pr);function as(kr){["next","throw","return"].forEach(function(wr){Re(kr,wr,function(mi){return this._invoke(wr,mi)})})}function Li(kr,wr){function mi(va,Qo,Do,Pa){var Ou=rt(kr[va],kr,Qo);if("throw"!==Ou.type){var td=Ou.arg,Td=td.value;return Td&&"object"==typeof Td&&s.call(Td,"__await")?wr.resolve(Td.__await).then(function(To){mi("next",To,Do,Pa)},function(To){mi("throw",To,Do,Pa)}):wr.resolve(Td).then(function(To){td.value=To,Do(td)},function(To){return mi("throw",To,Do,Pa)})}Pa(Ou.arg)}var Ys;this._invoke=function(va,Qo){function Do(){return new wr(function(Pa,Ou){mi(va,Qo,Pa,Ou)})}return Ys=Ys?Ys.then(Do,Do):Do()}}function Yi(kr,wr){var mi=kr.iterator[wr.method];if(mi===p){if(wr.delegate=null,"throw"===wr.method){if(kr.iterator.return&&(wr.method="return",wr.arg=p,Yi(kr,wr),"throw"===wr.method))return wn;wr.method="throw",wr.arg=new TypeError("The iterator does not provide a 'throw' method")}return wn}var Ys=rt(mi,kr.iterator,wr.arg);if("throw"===Ys.type)return wr.method="throw",wr.arg=Ys.arg,wr.delegate=null,wn;var Js=Ys.arg;return Js?Js.done?(wr[kr.resultName]=Js.value,wr.next=kr.nextLoc,"return"!==wr.method&&(wr.method="next",wr.arg=p),wr.delegate=null,wn):Js:(wr.method="throw",wr.arg=new TypeError("iterator result is not an object"),wr.delegate=null,wn)}function no(kr){var wr={tryLoc:kr[0]};1 in kr&&(wr.catchLoc=kr[1]),2 in kr&&(wr.finallyLoc=kr[2],wr.afterLoc=kr[3]),this.tryEntries.push(wr)}function Gs(kr){var wr=kr.completion||{};wr.type="normal",delete wr.arg,kr.completion=wr}function Ts(kr){this.tryEntries=[{tryLoc:"root"}],kr.forEach(no,this),this.reset(!0)}function us(kr){if(kr){var wr=kr[z];if(wr)return wr.call(kr);if("function"==typeof kr.next)return kr;if(!isNaN(kr.length)){var mi=-1,Ys=function Js(){for(;++mi=0;--Ys){var Js=this.tryEntries[Ys],va=Js.completion;if("root"===Js.tryLoc)return mi("end");if(Js.tryLoc<=this.prev){var Qo=s.call(Js,"catchLoc"),Do=s.call(Js,"finallyLoc");if(Qo&&Do){if(this.prev=0;--mi){var Ys=this.tryEntries[mi];if(Ys.tryLoc<=this.prev&&s.call(Ys,"finallyLoc")&&this.prev=0;--wr){var mi=this.tryEntries[wr];if(mi.finallyLoc===kr)return this.complete(mi.completion,mi.afterLoc),Gs(mi),wn}},catch:function(kr){for(var wr=this.tryEntries.length-1;wr>=0;--wr){var mi=this.tryEntries[wr];if(mi.tryLoc===kr){var Ys=mi.completion;if("throw"===Ys.type){var Js=Ys.arg;Gs(mi)}return Js}}throw new Error("illegal catch attempt")},delegateYield:function(kr,wr,mi){return this.delegate={iterator:us(kr),resultName:wr,nextLoc:mi},"next"===this.method&&(this.arg=p),wn}},e}(n.exports);try{regeneratorRuntime=t}catch{Function("r","regeneratorRuntime = r")(t)}}(t={exports:{}}),t.exports),Z_="0x0000000000000000000000000000000000000000",X3=(()=>(function(n){n[n.LOWEST=100]="LOWEST",n[n.LOW=500]="LOW",n[n.MEDIUM=3e3]="MEDIUM",n[n.HIGH=1e4]="HIGH"}(X3||(X3={})),X3))(),Bb=((S5={})[X3.LOWEST]=1,S5[X3.LOW]=10,S5[X3.MEDIUM]=60,S5[X3.HIGH]=200,S5),nv=er().BigInt(-1),Qf=er().BigInt(0),rv=er().BigInt(1),iv=er().exponentiate(er().BigInt(2),er().BigInt(96)),XE=er().exponentiate(iv,er().BigInt(2)),xae=function(){function n(){}return n.addDelta=function(e,r){return er().lessThan(r,Qf)?er().subtract(e,er().multiply(r,nv)):er().add(e,r)},n}(),sv=function(){function n(){}return n.mulDivRoundingUp=function(e,r,s){var p=er().multiply(e,r),F=er().divide(p,s);return er().notEqual(er().remainder(p,s),Qf)&&(F=er().add(F,rv)),F},n}(),Eae=er().subtract(er().exponentiate(er().BigInt(2),er().BigInt(160)),rv);function _j(n,t){var e=er().multiply(n,t);return er().bitwiseAnd(e,Z3)}var pp=function(){function n(){}return n.getAmount0Delta=function(e,r,s,p){if(er().greaterThan(e,r)){var F=[r,e];e=F[0],r=F[1]}var z=er().leftShift(s,er().BigInt(96)),te=er().subtract(r,e);return p?sv.mulDivRoundingUp(sv.mulDivRoundingUp(z,te,r),rv,e):er().divide(er().divide(er().multiply(z,te),r),e)},n.getAmount1Delta=function(e,r,s,p){if(er().greaterThan(e,r)){var F=[r,e];e=F[0],r=F[1]}return p?sv.mulDivRoundingUp(s,er().subtract(r,e),iv):er().divide(er().multiply(s,er().subtract(r,e)),iv)},n.getNextSqrtPriceFromInput=function(e,r,s,p){return er().greaterThan(e,Qf)||ma(!1),er().greaterThan(r,Qf)||ma(!1),p?this.getNextSqrtPriceFromAmount0RoundingUp(e,r,s,!0):this.getNextSqrtPriceFromAmount1RoundingDown(e,r,s,!0)},n.getNextSqrtPriceFromOutput=function(e,r,s,p){return er().greaterThan(e,Qf)||ma(!1),er().greaterThan(r,Qf)||ma(!1),p?this.getNextSqrtPriceFromAmount1RoundingDown(e,r,s,!1):this.getNextSqrtPriceFromAmount0RoundingUp(e,r,s,!1)},n.getNextSqrtPriceFromAmount0RoundingUp=function(e,r,s,p){if(er().equal(s,Qf))return e;var F=er().leftShift(r,er().BigInt(96));if(p){var z=_j(s,e);if(er().equal(er().divide(z,s),e)){var te=function(n,t){var e=er().add(n,t);return er().bitwiseAnd(e,Z3)}(F,z);if(er().greaterThanOrEqual(te,F))return sv.mulDivRoundingUp(F,e,te)}return sv.mulDivRoundingUp(F,rv,er().add(er().divide(F,e),s))}var fe=_j(s,e);er().equal(er().divide(fe,s),e)||ma(!1),er().greaterThan(F,fe)||ma(!1);var Re=er().subtract(F,fe);return sv.mulDivRoundingUp(F,e,Re)},n.getNextSqrtPriceFromAmount1RoundingDown=function(e,r,s,p){if(p){var F=er().lessThanOrEqual(s,Eae)?er().divide(er().leftShift(s,er().BigInt(96)),r):er().divide(er().multiply(s,iv),r);return er().add(e,F)}var z=sv.mulDivRoundingUp(s,iv,r);return er().greaterThan(e,z)||ma(!1),er().subtract(e,z)},n}(),zO=er().exponentiate(er().BigInt(10),er().BigInt(6)),Aae=function(){function n(){}return n.computeSwapStep=function(e,r,s,p,F){var z={},te=er().greaterThanOrEqual(e,r),fe=er().greaterThanOrEqual(p,Qf);if(fe){var Re=er().divide(er().multiply(p,er().subtract(zO,er().BigInt(F))),zO);z.amountIn=te?pp.getAmount0Delta(r,e,s,!0):pp.getAmount1Delta(e,r,s,!0),z.sqrtRatioNextX96=er().greaterThanOrEqual(Re,z.amountIn)?r:pp.getNextSqrtPriceFromInput(e,s,Re,te)}else z.amountOut=te?pp.getAmount1Delta(r,e,s,!1):pp.getAmount0Delta(e,r,s,!1),z.sqrtRatioNextX96=er().greaterThanOrEqual(er().multiply(p,nv),z.amountOut)?r:pp.getNextSqrtPriceFromOutput(e,s,er().multiply(p,nv),te);var $e=er().equal(r,z.sqrtRatioNextX96);return te?(z.amountIn=$e&&fe?z.amountIn:pp.getAmount0Delta(z.sqrtRatioNextX96,e,s,!0),z.amountOut=$e&&!fe?z.amountOut:pp.getAmount1Delta(z.sqrtRatioNextX96,e,s,!1)):(z.amountIn=$e&&fe?z.amountIn:pp.getAmount1Delta(e,z.sqrtRatioNextX96,s,!0),z.amountOut=$e&&!fe?z.amountOut:pp.getAmount0Delta(e,z.sqrtRatioNextX96,s,!1)),!fe&&er().greaterThan(z.amountOut,er().multiply(p,nv))&&(z.amountOut=er().multiply(p,nv)),z.feeAmount=fe&&er().notEqual(z.sqrtRatioNextX96,r)?er().subtract(p,z.amountIn):sv.mulDivRoundingUp(z.amountIn,er().BigInt(F),er().subtract(zO,er().BigInt(F))),[z.sqrtRatioNextX96,z.amountIn,z.amountOut,z.feeAmount]},n}(),Iae=er().BigInt(2),Sae=[128,64,32,16,8,4,2,1].map(function(n){return[n,er().exponentiate(Iae,er().BigInt(n))]});function Nh(n,t){return er().signedRightShift(er().multiply(n,er().BigInt(t)),er().BigInt(128))}var qO=er().exponentiate(er().BigInt(2),er().BigInt(32)),ba=function(){function n(){}return n.getSqrtRatioAtTick=function(e){e>=n.MIN_TICK&&e<=n.MAX_TICK&&Number.isInteger(e)||ma(!1);var r=e<0?-1*e:e,s=0!=(1&r)?er().BigInt("0xfffcb933bd6fad37aa2d162d1a594001"):er().BigInt("0x100000000000000000000000000000000");return 0!=(2&r)&&(s=Nh(s,"0xfff97272373d413259a46990580e213a")),0!=(4&r)&&(s=Nh(s,"0xfff2e50f5f656932ef12357cf3c7fdcc")),0!=(8&r)&&(s=Nh(s,"0xffe5caca7e10e4e61c3624eaa0941cd0")),0!=(16&r)&&(s=Nh(s,"0xffcb9843d60f6159c9db58835c926644")),0!=(32&r)&&(s=Nh(s,"0xff973b41fa98c081472e6896dfb254c0")),0!=(64&r)&&(s=Nh(s,"0xff2ea16466c96a3843ec78b326b52861")),0!=(128&r)&&(s=Nh(s,"0xfe5dee046a99a2a811c461f1969c3053")),0!=(256&r)&&(s=Nh(s,"0xfcbe86c7900a88aedcffc83b479aa3a4")),0!=(512&r)&&(s=Nh(s,"0xf987a7253ac413176f2b074cf7815e54")),0!=(1024&r)&&(s=Nh(s,"0xf3392b0822b70005940c7a398e4b70f3")),0!=(2048&r)&&(s=Nh(s,"0xe7159475a2c29b7443b29c7fa6e889d9")),0!=(4096&r)&&(s=Nh(s,"0xd097f3bdfd2022b8845ad8f792aa5825")),0!=(8192&r)&&(s=Nh(s,"0xa9f746462d870fdf8a65dc1f90e061e5")),0!=(16384&r)&&(s=Nh(s,"0x70d869a156d2a1b890bb3df62baf32f7")),0!=(32768&r)&&(s=Nh(s,"0x31be135f97d08fd981231505542fcfa6")),0!=(65536&r)&&(s=Nh(s,"0x9aa508b5b7a84e1c677de54f3e99bc9")),0!=(131072&r)&&(s=Nh(s,"0x5d6af8dedb81196699c329225ee604")),0!=(262144&r)&&(s=Nh(s,"0x2216e584f5fa1ea926041bedfe98")),0!=(524288&r)&&(s=Nh(s,"0x48a170391f7dc42444e8fa2")),e>0&&(s=er().divide(Z3,s)),er().greaterThan(er().remainder(s,qO),Qf)?er().add(er().divide(s,qO),rv):er().divide(s,qO)},n.getTickAtSqrtRatio=function(e){er().greaterThanOrEqual(e,n.MIN_SQRT_RATIO)&&er().lessThan(e,n.MAX_SQRT_RATIO)||ma(!1);var p,r=er().leftShift(e,er().BigInt(32)),s=function(n){er().greaterThan(n,Qf)||ma(!1),er().lessThanOrEqual(n,Z3)||ma(!1);for(var r,t=0,e=GO(Sae);!(r=e()).done;){var s=r.value,p=s[0],F=s[1];er().greaterThanOrEqual(n,F)&&(n=er().signedRightShift(n,er().BigInt(p)),t+=p)}return t}(r);p=er().greaterThanOrEqual(er().BigInt(s),er().BigInt(128))?er().signedRightShift(r,er().BigInt(s-127)):er().leftShift(r,er().BigInt(127-s));for(var F=er().leftShift(er().subtract(er().BigInt(s),er().BigInt(128)),er().BigInt(64)),z=0;z<14;z++){p=er().signedRightShift(er().multiply(p,p),er().BigInt(127));var te=er().signedRightShift(p,er().BigInt(128));F=er().bitwiseOr(F,er().leftShift(te,er().BigInt(63-z))),p=er().signedRightShift(p,te)}var fe=er().multiply(F,er().BigInt("255738958999603826347141")),Re=er().toNumber(er().signedRightShift(er().subtract(fe,er().BigInt("3402992956809132418596140100660247210")),er().BigInt(128))),$e=er().toNumber(er().signedRightShift(er().add(fe,er().BigInt("291339464771989622907027621153398088495")),er().BigInt(128)));return Re===$e?Re:er().lessThanOrEqual(n.getSqrtRatioAtTick($e),e)?$e:Re},n}();ba.MIN_TICK=-887272,ba.MAX_TICK=-ba.MIN_TICK,ba.MIN_SQRT_RATIO=er().BigInt("4295128739"),ba.MAX_SQRT_RATIO=er().BigInt("1461446703485210103287273052203988822378723970342");var wj=function(){function n(){}var t=n.prototype;return t.getTick=function(){var e=J3(Sm.mark(function s(p){return Sm.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:throw new Error(n.ERROR_MESSAGE);case 1:case"end":return z.stop()}},s)}));return function(s){return e.apply(this,arguments)}}(),t.nextInitializedTickWithinOneWord=function(){var e=J3(Sm.mark(function s(p,F,z){return Sm.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:throw new Error(n.ERROR_MESSAGE);case 1:case"end":return fe.stop()}},s)}));return function(s,p,F){return e.apply(this,arguments)}}(),n}();function Mae(n,t){return n.index-t.index}wj.ERROR_MESSAGE="No tick data provider was given";var KO=function(){function n(){}return n.validateList=function(e,r){r>0||ma(!1),e.every(function(s){return s.index%r==0})||ma(!1),er().equal(e.reduce(function(s,p){var F=p.liquidityNet;return er().add(s,F)},Qf),Qf)||ma(!1),function(n,t){for(var e=0;e0)return!1;return!0}(e,Mae)||ma(!1)},n.isBelowSmallest=function(e,r){return e.length>0||ma(!1),r0||ma(!1),r>=e[e.length-1].index},n.getTick=function(e,r){var s=e[this.binarySearch(e,r)];return s.index!==r&&ma(!1),s},n.binarySearch=function(e,r){this.isBelowSmallest(e,r)&&ma(!1);for(var F,s=0,p=e.length-1;;){if(e[F=Math.floor((s+p)/2)].index<=r&&(F===e.length-1||e[F+1].index>r))return F;e[F].index>8<<8)*p;if(n.isBelowSmallest(e,r))return[te,!1];var fe=n.nextInitializedTick(e,r,s).index,Re=Math.max(te,fe);return[Re,Re===fe]}var rt=((1+(F+1>>8)<<8)-1)*p;if(this.isAtOrAboveLargest(e,r))return[rt,!1];var ft=this.nextInitializedTick(e,r,s).index,Tt=Math.min(rt,ft);return[Tt,Tt===ft]},n}();function su(n){var e=er().BigInt(n).toString(16);return e.length%2!=0&&(e="0"+e),"0x"+e}function xj(n,t){var r=n.pools.reduce(function(F,z,te){var fe=F.inputToken,Re=F.path,$e=F.types,rt=z.token0.equals(fe)?z.token1:z.token0;return 0===te?{inputToken:rt,types:["address","uint24","address"],path:[fe.address,z.fee,rt.address]}:{inputToken:rt,types:[].concat($e,["uint24","address"]),path:[].concat(Re,[z.fee,rt.address])}},{inputToken:n.input.wrapped,path:[],types:[]}),s=r.path,p=r.types;return t?(0,WO.pack)(p.reverse(),s.reverse()):(0,WO.pack)(p,s)}function QE(n,t){var e=er().leftShift(er().BigInt(n),er().BigInt(192)),r=er().BigInt(t);return function(n){if(er().greaterThanOrEqual(n,sae)||ma(!1),er().lessThan(n,iae))return er().BigInt(Math.floor(Math.sqrt(er().toNumber(n))));var t,e;for(t=n,e=er().add(er().divide(n,mj),oae);er().lessThan(e,t);)t=e,e=er().divide(er().add(er().divide(n,e),e),mj);return t}(er().divide(e,r))}function Oae(n,t,e){if(er().greaterThan(n,t)){var r=[t,n];n=r[0],t=r[1]}var s=er().divide(er().multiply(n,t),iv);return er().divide(er().multiply(er().BigInt(e),s),er().subtract(t,n))}function Dae(n,t,e){if(er().greaterThan(n,t)){var r=[t,n];n=r[0],t=r[1]}var s=er().multiply(er().multiply(er().BigInt(e),n),t),p=er().multiply(iv,er().subtract(t,n));return er().divide(s,p)}function Ej(n,t,e){if(er().greaterThan(n,t)){var r=[t,n];n=r[0],t=r[1]}return er().divide(er().multiply(er().BigInt(e),iv),er().subtract(t,n))}function ZO(n,t,e,r,s,p){if(er().greaterThan(t,e)){var F=[e,t];t=F[0],e=F[1]}var z=p?Dae:Oae;if(er().lessThanOrEqual(n,t))return z(t,e,r);if(er().lessThan(n,e)){var te=z(n,e,r),fe=Ej(t,n,s);return er().lessThan(te,fe)?te:fe}return Ej(t,e,s)}function k5(n,t){Number.isInteger(n)&&Number.isInteger(t)||ma(!1),t>0||ma(!1),n>=ba.MIN_TICK&&n<=ba.MAX_TICK||ma(!1);var e=Math.round(n/t)*t;return eba.MAX_TICK?e-t:e}function Q3(n,t,e){var r=ba.getSqrtRatioAtTick(e),s=er().multiply(r,r);return n.sortsBefore(t)?new I5(n,t,XE,s):new I5(n,t,s,XE)}function Tj(n){var t=n.baseCurrency.sortsBefore(n.quoteCurrency),e=t?QE(n.numerator,n.denominator):QE(n.denominator,n.numerator),r=ba.getTickAtSqrtRatio(e),s=Q3(n.baseCurrency,n.quoteCurrency,r+1);return t?n.lessThan(s)||r++:n.greaterThan(s)||r++,r}var Aj=function(t){var e=t.index,r=t.liquidityGross,s=t.liquidityNet;e>=ba.MIN_TICK&&e<=ba.MAX_TICK||ma(!1),this.index=e,this.liquidityGross=er().BigInt(r),this.liquidityNet=er().BigInt(s)},Rae=function(){function n(e,r){var s=e.map(function(p){return p instanceof Aj?p:new Aj(p)});KO.validateList(s,r),this.ticks=s}var t=n.prototype;return t.getTick=function(){var e=J3(Sm.mark(function s(p){return Sm.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.abrupt("return",KO.getTick(this.ticks,p));case 1:case"end":return z.stop()}},s,this)}));return function(s){return e.apply(this,arguments)}}(),t.nextInitializedTickWithinOneWord=function(){var e=J3(Sm.mark(function s(p,F,z){return Sm.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return fe.abrupt("return",KO.nextInitializedTickWithinOneWord(this.ticks,p,F,z));case 1:case"end":return fe.stop()}},s,this)}));return function(s,p,F){return e.apply(this,arguments)}}(),n}(),Nae=new wj,Ug=function(){function n(e,r,s,p,F,z,te){void 0===te&&(te=Nae),Number.isInteger(s)&&s<1e6||ma(!1);var fe=ba.getSqrtRatioAtTick(z),Re=ba.getSqrtRatioAtTick(z+1);er().greaterThanOrEqual(er().BigInt(p),fe)&&er().lessThanOrEqual(er().BigInt(p),Re)||ma(!1);var $e=e.sortsBefore(r)?[e,r]:[r,e];this.token0=$e[0],this.token1=$e[1],this.fee=s,this.sqrtRatioX96=er().BigInt(p),this.liquidity=er().BigInt(F),this.tickCurrent=z,this.tickDataProvider=Array.isArray(te)?new Rae(te,Bb[s]):te}n.getAddress=function(r,s,p,F,z){return function(n){var t=n.factoryAddress,e=n.tokenA,r=n.tokenB,s=n.fee,p=n.initCodeHashManualOverride,F=e.sortsBefore(r)?[e,r]:[r,e];return(0,aj.getCreate2Address)(t,(0,WO.keccak256)(["bytes"],[$O.$.encode(["address","address","uint24"],[F[0].address,F[1].address,s])]),p??"0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54")}({factoryAddress:z??"0x1F98431c8aD98523631AE4a59f267346ea31F984",fee:p,tokenA:r,tokenB:s,initCodeHashManualOverride:F})};var t=n.prototype;return t.involvesToken=function(r){return r.equals(this.token0)||r.equals(this.token1)},t.priceOf=function(r){return this.involvesToken(r)||ma(!1),r.equals(this.token0)?this.token0Price:this.token1Price},t.getOutputAmount=function(){var e=J3(Sm.mark(function s(p,F){var z,te,fe,Re,$e,rt;return Sm.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return this.involvesToken(p.currency)||ma(!1),z=p.currency.equals(this.token0),Ft.next=4,this.swap(z,p.quotient,F);case 4:return fe=(te=Ft.sent).amountCalculated,Re=te.sqrtRatioX96,$e=te.liquidity,rt=te.tickCurrent,Ft.abrupt("return",[s2.fromRawAmount(z?this.token1:this.token0,er().multiply(fe,nv)),new n(this.token0,this.token1,this.fee,Re,$e,rt,this.tickDataProvider)]);case 11:case"end":return Ft.stop()}},s,this)}));return function(s,p){return e.apply(this,arguments)}}(),t.getInputAmount=function(){var e=J3(Sm.mark(function s(p,F){var z,te,Re,$e,rt;return Sm.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return p.currency.isToken&&this.involvesToken(p.currency)||ma(!1),z=p.currency.equals(this.token1),Ft.next=4,this.swap(z,er().multiply(p.quotient,nv),F);case 4:return Re=(te=Ft.sent).sqrtRatioX96,$e=te.liquidity,rt=te.tickCurrent,Ft.abrupt("return",[s2.fromRawAmount(z?this.token0:this.token1,te.amountCalculated),new n(this.token0,this.token1,this.fee,Re,$e,rt,this.tickDataProvider)]);case 11:case"end":return Ft.stop()}},s,this)}));return function(s,p){return e.apply(this,arguments)}}(),t.swap=function(){var e=J3(Sm.mark(function s(p,F,z){var te,fe,Re,$e,rt,ft;return Sm.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:z||(z=p?er().add(ba.MIN_SQRT_RATIO,rv):er().subtract(ba.MAX_SQRT_RATIO,rv)),p?(er().greaterThan(z,ba.MIN_SQRT_RATIO)||ma(!1),er().lessThan(z,this.sqrtRatioX96)||ma(!1)):(er().lessThan(z,ba.MAX_SQRT_RATIO)||ma(!1),er().greaterThan(z,this.sqrtRatioX96)||ma(!1)),te=er().greaterThanOrEqual(F,Qf),fe={amountSpecifiedRemaining:F,amountCalculated:Qf,sqrtPriceX96:this.sqrtRatioX96,tick:this.tickCurrent,liquidity:this.liquidity};case 4:if(!er().notEqual(fe.amountSpecifiedRemaining,Qf)||fe.sqrtPriceX96==z){Ft.next=35;break}return(Re={}).sqrtPriceStartX96=fe.sqrtPriceX96,Ft.next=9,this.tickDataProvider.nextInitializedTickWithinOneWord(fe.tick,p,this.tickSpacing);case 9:if(Re.tickNext=($e=Ft.sent)[0],Re.initialized=$e[1],Re.tickNextba.MAX_TICK&&(Re.tickNext=ba.MAX_TICK),Re.sqrtPriceNextX96=ba.getSqrtRatioAtTick(Re.tickNext),rt=Aae.computeSwapStep(fe.sqrtPriceX96,(p?er().lessThan(Re.sqrtPriceNextX96,z):er().greaterThan(Re.sqrtPriceNextX96,z))?z:Re.sqrtPriceNextX96,fe.liquidity,fe.amountSpecifiedRemaining,this.fee),fe.sqrtPriceX96=rt[0],Re.amountIn=rt[1],Re.amountOut=rt[2],Re.feeAmount=rt[3],te?(fe.amountSpecifiedRemaining=er().subtract(fe.amountSpecifiedRemaining,er().add(Re.amountIn,Re.feeAmount)),fe.amountCalculated=er().subtract(fe.amountCalculated,Re.amountOut)):(fe.amountSpecifiedRemaining=er().add(fe.amountSpecifiedRemaining,Re.amountOut),fe.amountCalculated=er().add(fe.amountCalculated,er().add(Re.amountIn,Re.feeAmount))),!er().equal(fe.sqrtPriceX96,Re.sqrtPriceNextX96)){Ft.next=32;break}if(!Re.initialized){Ft.next=29;break}return Ft.t0=er(),Ft.next=25,this.tickDataProvider.getTick(Re.tickNext);case 25:Ft.t1=Ft.sent.liquidityNet,ft=Ft.t0.BigInt.call(Ft.t0,Ft.t1),p&&(ft=er().multiply(ft,nv)),fe.liquidity=xae.addDelta(fe.liquidity,ft);case 29:fe.tick=p?Re.tickNext-1:Re.tickNext,Ft.next=33;break;case 32:er().notEqual(fe.sqrtPriceX96,Re.sqrtPriceStartX96)&&(fe.tick=ba.getTickAtSqrtRatio(fe.sqrtPriceX96));case 33:Ft.next=4;break;case 35:return Ft.abrupt("return",{amountCalculated:fe.amountCalculated,sqrtRatioX96:fe.sqrtPriceX96,liquidity:fe.liquidity,tickCurrent:fe.tick});case 36:case"end":return Ft.stop()}},s,this)}));return function(s,p,F){return e.apply(this,arguments)}}(),bj(n,[{key:"token0Price",get:function(){var r;return null!=(r=this._token0Price)?r:this._token0Price=new I5(this.token0,this.token1,XE,er().multiply(this.sqrtRatioX96,this.sqrtRatioX96))}},{key:"token1Price",get:function(){var r;return null!=(r=this._token1Price)?r:this._token1Price=new I5(this.token1,this.token0,er().multiply(this.sqrtRatioX96,this.sqrtRatioX96),XE)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"tickSpacing",get:function(){return Bb[this.fee]}}]),n}(),eT=function(){function n(e){var r=e.pool,s=e.liquidity,p=e.tickLower,F=e.tickUpper;this._token0Amount=null,this._token1Amount=null,this._mintAmounts=null,p=ba.MIN_TICK&&p%r.tickSpacing==0||ma(!1),F<=ba.MAX_TICK&&F%r.tickSpacing==0||ma(!1),this.pool=r,this.tickLower=p,this.tickUpper=F,this.liquidity=er().BigInt(s)}var t=n.prototype;return t.ratiosAfterSlippage=function(r){var s=this.pool.token0Price.asFraction.multiply(new Y3(1).subtract(r)),p=this.pool.token0Price.asFraction.multiply(r.add(1)),F=QE(s.numerator,s.denominator);er().lessThanOrEqual(F,ba.MIN_SQRT_RATIO)&&(F=er().add(ba.MIN_SQRT_RATIO,er().BigInt(1)));var z=QE(p.numerator,p.denominator);return er().greaterThanOrEqual(z,ba.MAX_SQRT_RATIO)&&(z=er().subtract(ba.MAX_SQRT_RATIO,er().BigInt(1))),{sqrtRatioX96Lower:F,sqrtRatioX96Upper:z}},t.mintAmountsWithSlippage=function(r){var s=this.ratiosAfterSlippage(r),p=s.sqrtRatioX96Upper,F=s.sqrtRatioX96Lower,z=new Ug(this.pool.token0,this.pool.token1,this.pool.fee,F,0,ba.getTickAtSqrtRatio(F)),te=new Ug(this.pool.token0,this.pool.token1,this.pool.fee,p,0,ba.getTickAtSqrtRatio(p)),fe=n.fromAmounts(K_({pool:this.pool,tickLower:this.tickLower,tickUpper:this.tickUpper},this.mintAmounts,{useFullPrecision:!1}));return{amount0:new n({pool:te,liquidity:fe.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount0,amount1:new n({pool:z,liquidity:fe.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount1}},t.burnAmountsWithSlippage=function(r){var s=this.ratiosAfterSlippage(r),p=s.sqrtRatioX96Upper,F=s.sqrtRatioX96Lower,z=new Ug(this.pool.token0,this.pool.token1,this.pool.fee,F,0,ba.getTickAtSqrtRatio(F)),fe=new n({pool:new Ug(this.pool.token0,this.pool.token1,this.pool.fee,p,0,ba.getTickAtSqrtRatio(p)),liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount0,Re=new n({pool:z,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount1;return{amount0:fe.quotient,amount1:Re.quotient}},n.fromAmounts=function(r){var s=r.pool,p=r.tickLower,F=r.tickUpper,z=r.amount0,te=r.amount1,fe=r.useFullPrecision,Re=ba.getSqrtRatioAtTick(p),$e=ba.getSqrtRatioAtTick(F);return new n({pool:s,tickLower:p,tickUpper:F,liquidity:ZO(s.sqrtRatioX96,Re,$e,z,te,fe)})},n.fromAmount0=function(r){return n.fromAmounts({pool:r.pool,tickLower:r.tickLower,tickUpper:r.tickUpper,amount0:r.amount0,amount1:Z3,useFullPrecision:r.useFullPrecision})},n.fromAmount1=function(r){return n.fromAmounts({pool:r.pool,tickLower:r.tickLower,tickUpper:r.tickUpper,amount0:Z3,amount1:r.amount1,useFullPrecision:!0})},bj(n,[{key:"token0PriceLower",get:function(){return Q3(this.pool.token0,this.pool.token1,this.tickLower)}},{key:"token0PriceUpper",get:function(){return Q3(this.pool.token0,this.pool.token1,this.tickUpper)}},{key:"amount0",get:function(){return null===this._token0Amount&&(this._token0Amount=s2.fromRawAmount(this.pool.token0,this.pool.tickCurrent=0)&&(e[s]=n[s]);return e}($e,["expectedCurrencyOwed0","expectedCurrencyOwed1"]);return s.push.apply(s,n.encodeCollect(K_({tokenId:su(r.tokenId),expectedCurrencyOwed0:rt.add(s2.fromRawAmount(rt.currency,fe)),expectedCurrencyOwed1:ft.add(s2.fromRawAmount(ft.currency,Re))},Tt))),r.liquidityPercentage.equalTo(rv)?r.burnToken&&s.push(n.INTERFACE.encodeFunctionData("burn",[F])):!0===r.burnToken&&ma(!1),{calldata:e8.encodeMulticall(s),value:su(0)}},n.safeTransferFromParameters=function(e){var r=Im(e.recipient),s=Im(e.sender);return{calldata:e.data?n.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256,bytes)",[s,r,su(e.tokenId),e.data]):n.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256)",[s,r,su(e.tokenId)]),value:su(0)}},n}();Fae.INTERFACE=new Nb.vU(cae.Mt);var kj=function(){function n(){}return n.quoteCallParameters=function(e,r,s,p){void 0===p&&(p={});var te,F=1===e.pools.length,z=su(r.quotient),fe=p.useQuoterV2?this.V2INTERFACE:this.V1INTERFACE;if(F){var Re,$e,rt={tokenIn:e.tokenPath[0].address,tokenOut:e.tokenPath[1].address,fee:e.pools[0].fee,sqrtPriceLimitX96:su(null!=(Re=null==($e=p)?void 0:$e.sqrtPriceLimitX96)?Re:0)},ft=K_({},rt,s==Fg.EXACT_INPUT?{amountIn:z}:{amount:z});te=fe.encodeFunctionData(s===Fg.EXACT_INPUT?"quoteExactInputSingle":"quoteExactOutputSingle",p.useQuoterV2?[ft]:[rt.tokenIn,rt.tokenOut,rt.fee,z,rt.sqrtPriceLimitX96])}else{var Qt;void 0!==(null==(Qt=p)?void 0:Qt.sqrtPriceLimitX96)&&ma(!1);var wn=xj(e,s===Fg.EXACT_OUTPUT);te=fe.encodeFunctionData(s===Fg.EXACT_INPUT?"quoteExactInput":"quoteExactOutput",[wn,z])}return{calldata:te,value:su(0)}},n}();kj.V1INTERFACE=new Nb.vU(fae.Mt),kj.V2INTERFACE=new Nb.vU(hae.Mt);var Cj=function(){function n(){}return n.encodeClaim=function(e,r){var s,p=[];p.push(n.INTERFACE.encodeFunctionData("unstakeToken",[this._encodeIncentiveKey(e),su(r.tokenId)]));var F=Im(r.recipient),z=null!=(s=r.amount)?s:0;return p.push(n.INTERFACE.encodeFunctionData("claimReward",[e.rewardToken.address,F,su(z)])),p},n.collectRewards=function(e,r){e=Array.isArray(e)?e:[e];for(var s=[],p=0;p1){for(var s=[],p=0;ps?p[e].gt(F[e])?1:p[e].lt(F[e])?-1:0:p[e]>F[e]?1:p[e]s?F[e].gt(p[e])?1:F[e].lt(p[e])?-1:0:F[e]>p[e]?1:F[e]!sn.Z.isBigNumber(t[0][s]))?t:t.sort((s,p)=>{let[F,z]=[new sn.Z(0),new sn.Z(0)];return e.forEach(te=>{F=F.plus(s[te]),z=z.plus(p[te])}),r?F.gt(z)?1:F.lt(z)?-1:0:z.gt(F)?1:z.lt(F)?-1:0})}};let $c=e9;yt($c,"\u0275fac",function(e){return new(e||e9)(Yn(Xa))}),yt($c,"\u0275prov",we({token:e9,factory:e9.\u0275fac,providedIn:"root"}));const t9=class{constructor(t){yt(this,"util"),yt(this,"status",Object.create({})),yt(this,"userStatus",Object.create({})),yt(this,"bunniTokens",Object.create({})),yt(this,"escrow",Object.create({})),yt(this,"gauges",Object.create({})),yt(this,"pools",Object.create({})),yt(this,"protocol",Object.create({})),yt(this,"tokens",Object.create({})),yt(this,"vaults",Object.create({})),yt(this,"bunniTokens_observable",new xd.X([this.bunniTokens,void 0])),yt(this,"escrow_observable",new xd.X(this.escrow)),yt(this,"gauges_observable",new xd.X(this.gauges)),yt(this,"pools_observable",new xd.X(this.pools)),yt(this,"protocol_observable",new xd.X(this.protocol)),yt(this,"tokens_observable",new xd.X(this.tokens)),yt(this,"vaults_observable",new xd.X(this.vaults)),this.util=t}updateStatus(t,e){this.status[e]=t}updateUserStatus(t,e){this.userStatus[e]=t}updateBunniToken(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.bunniTokens[t]??this.initializeBunniToken(t);return e.forEach((F,z)=>F in p?p[F]=r[z]:console.error(`property '${F}' does not exist on class BunniToken`)),s&&p.updateUSDValues(),p}updateEscrow(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.escrow[t]??this.initializeEscrow(t);return e.forEach((F,z)=>F in p?p[F]=r[z]:console.error(`property '${F}' does not exist on class Escrow`)),s&&p.updateUSDValues(),p}updateGauge(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.gauges[t]??this.initializeGauge(t);return e.forEach((F,z)=>F in p?p[F]=r[z]:console.error(`property '${F}' does not exist on class Gauge`)),s&&p.updateUSDValues(),p}updatePool(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.pools[t]??this.initializePool(t);return e.forEach((F,z)=>F in p?p[F]=r[z]:console.error(`property '${F}' does not exist on class Pool`)),s&&p.updateUSDValues(),p}updateProtocol(t,e,r){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const s=this.protocol[t]??this.initializeProtocol(t);return e.forEach((p,F)=>p in s?s[p]=r[F]:console.error(`property '${p}' does not exist on class Protocol`)),s}updateToken(t,e,r,s=!1){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const p=this.tokens[t]??this.initializeToken(t);return e.forEach((F,z)=>F in p?p[F]=r[z]:console.error(`property '${F}' does not exist on class Token`)),s&&p.updateUSDValues(),p}updateVault(t,e,r){e.length!==r.length&&console.warn(`length mismatch for prop (${e.length}) and value (${r.length}) arrays`);const s=this.vaults[t]??this.initializeVault(t);return e.forEach((p,F)=>p in s?s[p]=r[F]:console.error(`property '${p}' does not exist on class Vault`)),s}initializeBunniToken(t){return this.bunniTokens[t]=new KE,this.bunniTokens[t]}initializeEscrow(t){return this.escrow[t]=new Eoe,this.escrow[t]}initializeGauge(t){return this.gauges[t]=new sj,this.gauges[t]}initializePool(t){return this.pools[t]=new koe,this.pools[t]}initializeProtocol(t){return this.protocol[t]=new Coe,this.protocol[t]}initializeToken(t){return this.tokens[t]=new T5,this.tokens[t]}initializeVault(t){return this.vaults[t]=new Moe,this.vaults[t]}getStatus(t){return this.status[t]}getUserStatus(t){return this.userStatus[t]}getBunniToken(t){return this.bunniTokens[t]}getBunniTokens(t){return Object.values(this.bunniTokens).filter(e=>t?e.chainId===t:e)}getEscrow(t){return this.escrow[t]}getEscrows(){return Object.values(this.escrow)}getGauge(t){return this.gauges[t]}getGauges(t){return Object.values(this.gauges).filter(e=>t?e.chainId===t:e)}getPool(t){return this.pools[t]}getPools(t){return Object.values(this.pools).filter(e=>t?e.chainId===t:e)}getProtocol(t){return this.protocol[t]}getProtocols(){return Object.values(this.protocol)}getToken(t){return this.tokens[t]}getTokens(t){return Object.values(this.tokens).filter(e=>t?e.chainId===t:e)}getVault(t){return this.vaults[t]}getVaults(t){return Object.values(this.vaults).filter(e=>t?e.chainId===t:e)}getNative(t){return this.getToken(this.util.id(WE.toLowerCase(),t))}getWrappedNative(t){return this.getToken(this.util.id(Q6[t].toLowerCase(),t))}observeBunniTokens(t){this.bunniTokens_observable.next([this.bunniTokens,t])}observeEscrow(){this.escrow_observable.next(this.escrow)}observeGauges(){this.gauges_observable.next(this.gauges)}observePools(){this.pools_observable.next(this.pools)}observeProtocol(){this.protocol_observable.next(this.protocol)}observeTokens(){this.tokens_observable.next(this.tokens)}};let el=t9;yt(el,"\u0275fac",function(e){return new(e||t9)(Yn($c))}),yt(el,"\u0275prov",we({token:t9,factory:t9.\u0275fac,providedIn:"root"}));const n9=class{constructor(t){yt(this,"store"),this.store=t}setStakingAPR(t){var e=this;return(0,Br.Z)(function*(){const[r,s,p,F]=yield Promise.all([e.isLst(t.token0),e.isLst(t.token1),e.getApr(t.token0),e.getApr(t.token1)]);t.bunniTokens.forEach(z=>{if(r&&s){const te=z.reserve0,fe=z.reserve1.times(t.token1Price),Re=te.plus(fe),$e=z.reserve1,rt=z.reserve0.times(t.token0Price),ft=$e.plus(rt);if(Re.eq(0)||ft.eq(0))return;const Tt=p.times(te).div(Re),Ft=F.times($e).div(ft);e.store.updateBunniToken(z.id,["stakingAPR"],[Tt.plus(Ft)])}else if(r){const te=z.reserve0,fe=z.reserve1.times(t.token1Price),Re=te.plus(fe);Re.gt(0)&&e.store.updateBunniToken(z.id,["stakingAPR"],[p.times(te).div(Re)])}else if(s){const te=z.reserve1,fe=z.reserve0.times(t.token0Price),Re=te.plus(fe);Re.gt(0)&&e.store.updateBunniToken(z.id,["stakingAPR"],[F.times(te).div(Re)])}})})()}getApr(t){var e=this;return(0,Br.Z)(function*(){switch(t.address){case hp[t.chainId].STETH:return yield e.stethApr();case hp[t.chainId].SWETH:return yield e.swethApr();case hp[t.chainId].WSTETH:return yield e.stethApr();default:return new sn.Z(0)}})()}swethApr(){return(0,Br.Z)(function*(){const t=yield fetch("https://v3.svc.swellnetwork.io/api/tokens/sweth/apr");if(t.ok){const e=yield t.json();return new sn.Z(e)}return console.error("Swell Network API"),new sn.Z(0)})()}stethApr(){return(0,Br.Z)(function*(){const t=yield fetch("https://eth-api.lido.fi/v1/protocol/steth/apr/sma");if(t.ok){const e=yield t.json();return new sn.Z(e.data.smaApr)}return console.error("Lido API"),new sn.Z(0)})()}isLst(t){switch(t.address){case hp[t.chainId].STETH:case hp[t.chainId].SWETH:case hp[t.chainId].WSTETH:return!0;default:return!1}}};let C5=n9;yt(C5,"\u0275fac",function(e){return new(e||n9)(Yn(el))}),yt(C5,"\u0275prov",we({token:n9,factory:n9.\u0275fac,providedIn:"root"}));var Mj=Y(36776),Uae=Y(80831),jae=Y(51528),Vae=Y(92673),Fb=(()=>(function(n){n.web3="web3",n.ethers="ethers",n.customHttp="custom"}(Fb||(Fb={})),Fb))(),$a=(()=>(function(n){n[n.mainnet=1]="mainnet",n[n.ropsten=3]="ropsten",n[n.rinkeby=4]="rinkeby",n[n.goerli=5]="goerli",n[n.optimism=10]="optimism",n[n.kovan=42]="kovan",n[n.matic=137]="matic",n[n.kovanOptimism=69]="kovanOptimism",n[n.xdai=100]="xdai",n[n.goerliOptimism=420]="goerliOptimism",n[n.arbitrum=42161]="arbitrum",n[n.rinkebyArbitrum=421611]="rinkebyArbitrum",n[n.goerliArbitrum=421613]="goerliArbitrum",n[n.mumbai=80001]="mumbai",n[n.sepolia=11155111]="sepolia",n[n.avalancheMainnet=43114]="avalancheMainnet",n[n.avalancheFuji=43113]="avalancheFuji",n[n.fantomTestnet=4002]="fantomTestnet",n[n.fantom=250]="fantom",n[n.bsc=56]="bsc",n[n.bsc_testnet=97]="bsc_testnet",n[n.moonbeam=1284]="moonbeam",n[n.moonriver=1285]="moonriver",n[n.moonbaseAlphaTestnet=1287]="moonbaseAlphaTestnet",n[n.harmony=16666e5]="harmony",n[n.cronos=25]="cronos",n[n.fuse=122]="fuse",n[n.songbirdCanaryNetwork=19]="songbirdCanaryNetwork",n[n.costonTestnet=16]="costonTestnet",n[n.boba=288]="boba",n[n.aurora=1313161554]="aurora",n[n.astar=592]="astar",n[n.okc=66]="okc",n[n.heco=128]="heco",n[n.metis=1088]="metis",n[n.rsk=30]="rsk",n[n.rskTestnet=31]="rskTestnet",n[n.evmos=9001]="evmos",n[n.evmosTestnet=9e3]="evmosTestnet",n[n.thundercore=108]="thundercore",n[n.thundercoreTestnet=18]="thundercoreTestnet",n[n.oasis=26863]="oasis",n[n.celo=42220]="celo",n[n.godwoken=71402]="godwoken",n[n.godwokentestnet=71401]="godwokentestnet",n[n.klatyn=8217]="klatyn",n[n.milkomeda=2001]="milkomeda",n[n.kcc=321]="kcc",n[n.etherlite=111]="etherlite",n[n.lineaTestnet=59140]="lineaTestnet",n[n.linea=59144]="linea",n[n.scroll=534352]="scroll",n[n.zkSyncEra=324]="zkSyncEra",n[n.zkSyncEraTestnet=280]="zkSyncEraTestnet"}($a||($a={})),$a))(),t8=function(){function n(){}return n.deepClone=function(t){return JSON.parse(JSON.stringify(t))},n}(),nT=function(){return nT=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0&&p[p.length-1])&&(6===fe[0]||2===fe[0])){e=0;continue}if(3===fe[0]&&(!p||fe[1]>p[0]&&fe[1]0)try{ft=Vae.defaultAbiCoder.decode(rt,this.getReturnDataFromResult(Re.result)),te.callsReturnContext.push(t8.deepClone({returnValues:this.formatReturnValues(ft),decoded:!0,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!0}))}catch(Ft){if(!this._options.tryAggregate)throw Ft;te.callsReturnContext.push(t8.deepClone({returnValues:[],decoded:!1,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!1}))}else te.callsReturnContext.push(t8.deepClone({returnValues:this.getReturnDataFromResult(Re.result),decoded:!1,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!0}));else te.callsReturnContext.push(t8.deepClone({returnValues:[],decoded:!1,reference:$e.reference,methodName:$e.methodName,methodParameters:$e.methodParameters,success:!1}));s.results[te.originalContractCallContext.reference]=te}return[2,s]}})})},n.prototype.getReturnDataFromResult=function(t){return this._options.tryAggregate?t.returnData:t},n.prototype.formatReturnValues=function(t){var e=t;return 1===t.length&&(e=t[0]),Array.isArray(e)?e:[e]},n.prototype.buildAggregateCallContext=function(t){for(var e=[],r=0;r({reference:`ALLOWANCE: ${s}`,contractAddress:s,abi:Y(97615),calls:e.map(p=>({reference:p,methodName:"allowance",methodParameters:[t,p]}))})):[]}};let M5=r9;yt(M5,"\u0275fac",function(e){return new(e||r9)}),yt(M5,"\u0275prov",we({token:r9,factory:r9.\u0275fac,providedIn:"root"}));const i9=class{constructor(){}context(t,e){return t?e.map(r=>({reference:`BALANCE: ${r}`,contractAddress:r,abi:Y(97615),calls:[{reference:r,methodName:"balanceOf",methodParameters:[t]}]})):[]}};let O5=i9;yt(O5,"\u0275fac",function(e){return new(e||i9)}),yt(O5,"\u0275prov",we({token:i9,factory:i9.\u0275fac,providedIn:"root"}));var Hae=Y(29813);const s9=class{constructor(t){yt(this,"wallet"),this.wallet=t}get poolURL(){const t=this.wallet.chainId===qi.GOERLI?qi.GOERLI:qi.ETHEREUM;return`https://app.balancer.fi/#/${$E[t].displayName.toLowerCase()}/pool/${MO[t]}`}getSpotPrice(t){return(0,Br.Z)(function*(){if(!E5[t])return new sn.Z(0);if(!MO[t])return new sn.Z(0);if(!hp[t].WETH)return new sn.Z(0);const r=yield new Hae.BalancerSDK({network:t,rpcUrl:ZU[t]}).pools.find(MO[t]);if(!r)return new sn.Z(0);const s=r.calcSpotPrice(hp[t].WETH,E5[t]);return new sn.Z(s)})()}};let D5=s9;yt(D5,"\u0275fac",function(e){return new(e||s9)(Yn(Xa))}),yt(D5,"\u0275prov",we({token:s9,factory:s9.\u0275fac,providedIn:"root"}));const o9=class{constructor(t,e,r){yt(this,"balancer"),yt(this,"contract"),yt(this,"wallet"),this.balancer=t,this.contract=e,this.wallet=r}getPrice(t){var e=this;return(0,Br.Z)(function*(){const[r,s]=yield Promise.all([e.balancer.getSpotPrice(t),e.getStrikePrice(t)]);return r.minus(s)})()}getStrikePrice(t){var e=this;return(0,Br.Z)(function*(){const r=e.wallet.httpsWeb3(t),p=yield e.contract.getOptionsToken(r,t).methods.oracle().call(),F=e.contract.getContract(p,"OptionsOracle",r),z=yield F.methods.getPrice().call().catch((0,Br.Z)(function*(){return yield F.methods.minPrice().call()}));return new sn.Z(z).div(1e18)})()}};let Y_=o9;yt(Y_,"\u0275fac",function(e){return new(e||o9)(Yn(D5),Yn(ud),Yn(Xa))}),yt(Y_,"\u0275prov",we({token:o9,factory:o9.\u0275fac,providedIn:"root"}));const a9=class{constructor(t){yt(this,"store"),this.store=t}get(t,e){const r=this.getNyt(t,e);if(r)return r;const s=this.getPyt(t,e);return s||(this.getXpyt(t,e)||null)}getNyt(t,e){return this.store.getVaults(e).find(r=>r.nyt.address.toLowerCase()===t.toLowerCase())}getPyt(t,e){return this.store.getVaults(e).find(r=>r.pyt.address.toLowerCase()===t.toLowerCase())}getXpyt(t,e){return this.store.getVaults(e).find(r=>r.xpyt.find(s=>s.address.toLowerCase()===t.toLowerCase()))}};let J_=a9;yt(J_,"\u0275fac",function(e){return new(e||a9)(Yn(el))}),yt(J_,"\u0275prov",we({token:a9,factory:a9.\u0275fac,providedIn:"root"}));const u9=class{constructor(t,e,r,s){yt(this,"option"),yt(this,"timeless"),yt(this,"store"),yt(this,"wallet"),this.option=t,this.timeless=e,this.store=r,this.wallet=s}fetch(t,e,r=!1){var s=this;return(0,Br.Z)(function*(){const p=s.getPlatformId(e);if(!p)return;let F=[];t.forEach(rt=>{const ft=s.timeless.get(rt,e);F.push(ft?ft.underlying.address:rt)}),F=[...new Set(F)];const z="https://coins.llama.fi/prices/current/";let fe={},Re=z,$e=[];for(let rt of F){const ft=`${p}:${rt},`;Re.concat(ft).length>2e3&&($e=$e.concat(Re),Re=z),Re=Re.concat(ft)}return $e=$e.concat(Re),yield Promise.all($e.map(rt=>s.httpsGet(rt).then(ft=>fe={...fe,...ft.coins}))),r&&s.store.getVaults(e).forEach(rt=>{const ft=fe[`${av[e]}:${rt.underlying.address.toLowerCase()}`]?new sn.Z(fe[`${av[e]}:${rt.underlying.address.toLowerCase()}`].price):new sn.Z(0);if(rt.xpyt.length){const Tt=rt.xpyt[0].conversionRate,Ft=rt.xpyt[0].spotPrice,Qt={price:Ft.div(Tt.plus(Ft)).times(ft)},wn={price:Tt.div(Tt.plus(Ft)).times(ft)};fe[`${av[e]}:${rt.nyt.address.toLowerCase()}`]=Qt,fe[`${av[e]}:${rt.pyt.address.toLowerCase()}`]=wn,rt.xpyt.forEach(An=>{const gr={price:new sn.Z(1).div(An.conversionRate.plus(An.spotPrice)).times(ft)};fe[`${av[e]}:${An.address.toLowerCase()}`]=gr})}else{const Tt={price:ft.times(.5)},Ft={price:ft.times(.5)};fe[`${av[e]}:${rt.nyt.address.toLowerCase()}`]=Tt,fe[`${av[e]}:${rt.pyt.address.toLowerCase()}`]=Ft}}),fe})()}httpsGet(t){return(0,Br.Z)(function*(){return yield(yield fetch(t)).json()})()}getPlatformId(t){return av[t]}};let X_=u9;yt(X_,"\u0275fac",function(e){return new(e||u9)(Yn(Y_),Yn(J_),Yn(el),Yn(Xa))}),yt(X_,"\u0275prov",we({token:u9,factory:u9.\u0275fac,providedIn:"root"}));const av={[qi.ETHEREUM]:"ethereum",[qi.GOERLI]:null,[qi.OPTIMISM]:"optimism",[qi.POLYGON]:"polygon",[qi.ARBITRUM]:"arbitrum"},c9=class{constructor(t,e,r,s,p,F,z){yt(this,"allowance"),yt(this,"balance"),yt(this,"chain"),yt(this,"price"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),this.allowance=t,this.balance=e,this.chain=r,this.price=s,this.store=p,this.util=F,this.wallet=z}isZero(t){return t.address.toLowerCase()===Oy.toLowerCase()}isNative(t){return t.address.toLowerCase()===WE.toLowerCase()}isWrappedNative(t,e){return t.address.toLowerCase()===Q6[e].toLowerCase()}list(t){return Y(91845)(`./${$E[t].displayName.toLowerCase()}.json`)}context(t){return t.map(e=>({reference:`ERC20: ${e}`,contractAddress:e,abi:Y(97615),calls:[{reference:`${e} Name`,methodName:"name",methodParameters:[]},{reference:`${e} Symbol`,methodName:"symbol",methodParameters:[]},{reference:`${e} Decimals`,methodName:"decimals",methodParameters:[]}]}))}fetchToken(t,e){var r=this;return(0,Br.Z)(function*(){const s=r.wallet.httpsWeb3(e),p=new sT({web3Instance:s,tryAggregate:!0}),F=r.chain.metadata[e].displayName.toLowerCase(),z=r.context([t.toLowerCase()]);let te=[],fe=[];r.wallet.connected&&(te=r.balance.context(r.wallet.user,[t.toLowerCase()]),fe=r.allowance.context(r.wallet.user,[x5,...fp[e]?[fp[e]]:[]],[t]));const[Re,$e]=yield Promise.all([p.call([...z,...te,...fe]),r.price.fetch([t.toLowerCase()],e)]);console.log($e);const rt=Re.results[`ERC20: ${t.toLowerCase()}`],ft=Re.results[`BALANCE: ${t.toLowerCase()}`],Tt=Re.results[`ALLOWANCE: ${t.toLowerCase()}`];let[Ft,Qt]=[[],[]];Ft.push("id")&&Qt.push(r.util.id(t.toLowerCase(),e)),Ft.push("address")&&Qt.push(t.toLowerCase()),Ft.push("chainId")&&Qt.push(e),Ft.push("name")&&Qt.push(rt.callsReturnContext[0].returnValues[0]),Ft.push("symbol")&&Qt.push(rt.callsReturnContext[1].returnValues[0]),Ft.push("decimals")&&Qt.push(rt.callsReturnContext[2].returnValues[0]),Ft.push("precision")&&Qt.push(Math.pow(10,rt.callsReturnContext[2].returnValues[0]));const wn=ft&&new sn.Z(ft.callsReturnContext[0].returnValues[0].hex);ft&&Ft.push("userBalance")&&Qt.push(wn.div(Math.pow(10,rt.callsReturnContext[2].returnValues[0])));const An=Object.create({});Tt&&Tt.callsReturnContext.map(pr=>{An[pr.reference]=pr.returnValues[0]?new sn.Z(pr.returnValues[0].hex).div(Math.pow(10,rt.callsReturnContext[2].returnValues[0])):new sn.Z(0)}),Tt&&Ft.push("userAllowances")&&Qt.push(An);const gr=r.list(e).find(pr=>pr.address.toLowerCase()===t.toLowerCase());if(gr&&gr.logoURI){const pr=gr.logoURI.includes("ipfs://")?`https://ipfs.io/ipfs/${gr.logoURI.substring(7)}`:gr.logoURI;pr&&Ft.push("iconPath")&&Qt.push(pr)}const _r=$e&&new sn.Z($e[`${F}:${t.toLowerCase()}`]?.price);return $e&&Ft.push("price")&&Qt.push(_r),r.store.updateToken(r.util.id(t.toLowerCase(),e),Ft,Qt,!0)})()}};let uv=c9;yt(uv,"\u0275fac",function(e){return new(e||c9)(Yn(M5),Yn(O5),Yn(dc),Yn(X_),Yn(el),Yn($c),Yn(Xa))}),yt(uv,"\u0275prov",we({token:c9,factory:c9.\u0275fac,providedIn:"root"}));const l9=class{constructor(t,e,r,s){yt(this,"store"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),this.store=t,this.token=e,this.util=r,this.wallet=s}uniswap(t,e){var r=this;return(0,Br.Z)(function*(){const s=r.wallet.httpsWeb3(e),p=new sT({web3Instance:s,tryAggregate:!0}),F={reference:t,contractAddress:t,abi:Y(92892),calls:[{reference:"slot0",methodName:"slot0",methodParameters:[]},{reference:"fee",methodName:"fee",methodParameters:[]},{reference:"liquidity",methodName:"liquidity",methodParameters:[]},{reference:"token0",methodName:"token0",methodParameters:[]},{reference:"token1",methodName:"token1",methodParameters:[]}]},te=(yield p.call(F)).results[t].callsReturnContext;if(te.find(Qt=>!Qt.success))return null;const fe=r.util.sqrtPriceX96ToTokenPrices(new sn.Z(te[0].returnValues[0].hex)),Re=te[3].returnValues[0].toLowerCase(),$e=r.store.getToken(r.util.id(Re,e))||(yield r.token.fetchToken(Re,e)),rt=te[4].returnValues[0].toLowerCase(),ft=r.store.getToken(r.util.id(rt,e))||(yield r.token.fetchToken(rt,e));let[Tt,Ft]=[[],[]];return Tt.push("id")&&Ft.push(r.util.id(t.toLowerCase(),e)),Tt.push("address")&&Ft.push(t.toLowerCase()),Tt.push("chainId")&&Ft.push(e),Tt.push("fee")&&Ft.push(te[1].returnValues[0]),Tt.push("tick")&&Ft.push(te[0].returnValues[1]),Tt.push("liquidity")&&Ft.push(new sn.Z(te[2].returnValues[0].hex)),Tt.push("sqrtPriceX96")&&Ft.push(new sn.Z(te[0].returnValues[0].hex)),Tt.push("token0")&&Ft.push($e),Tt.push("token1")&&Ft.push(ft),Tt.push("token0Price")&&Ft.push(fe[0].times(Math.pow(10,ft.decimals)).div(Math.pow(10,$e.decimals))),Tt.push("token1Price")&&Ft.push(fe[1].times(Math.pow(10,$e.decimals)).div(Math.pow(10,ft.decimals))),r.store.updatePool(r.util.id(t.toLowerCase(),e),Tt,Ft)})()}};let Q_=l9;function q2(n){return null!=n&&"false"!=`${n}`}function n8(n){return n instanceof wa?n.nativeElement:n}yt(Q_,"\u0275fac",function(e){return new(e||l9)(Yn(el),Yn(uv),Yn($c),Yn(Xa))}),yt(Q_,"\u0275prov",we({token:l9,factory:l9.\u0275fac,providedIn:"root"}));var YO=Y(95639);function oT(n){return n&&"function"==typeof n.connect}class Oj{applyChanges(t,e,r,s,p){t.forEachOperation((F,z,te)=>{let fe,Re;if(null==F.previousIndex){const $e=r(F,z,te);fe=e.createEmbeddedView($e.templateRef,$e.context,$e.index),Re=1}else null==te?(e.remove(z),Re=3):(fe=e.get(z),e.move(fe,te),Re=2);p&&p({context:null==fe?void 0:fe.context,operation:Re,record:F})})}detach(){}}const r8=new fo("_ViewRepeater"),Dj=new fo("cdk-dir-doc",{providedIn:"root",factory:function(){return Mo(qa)}});let XO,aT=(()=>{class n{constructor(e){if(this.value="ltr",this.change=new mo,e){const s=e.documentElement?e.documentElement.dir:null,p=(e.body?e.body.dir:null)||s;this.value="ltr"===p||"rtl"===p?p:"ltr"}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(Yn(Dj,8))},n.\u0275prov=we({factory:function(){return new n(Yn(Dj,8))},token:n,providedIn:"root"}),n})(),uT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();try{XO="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch{XO=!1}let tw,eD,J1=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function(n){return n===hN}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!XO)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(Yn(n5))},n.\u0275prov=we({factory:function(){return new n(Yn(n5))},token:n,providedIn:"root"}),n})(),cT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})();function QO(n){return function(){if(null==tw&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>tw=!0}))}finally{tw=tw||!1}return tw}()?n:!!n.capture}function rw(n){return n.composedPath?n.composedPath()[0]:n.target}Y(61927),Y(64581);var tD=Y(45697);Y(59328),Y(47349);let Fj=(()=>{class n{constructor(e,r,s){this._platform=e,this._change=new ie.xQ,this._changeListener=p=>{this._change.next(p)},this._document=s,r.runOutsideAngular(()=>{if(e.isBrowser){const p=this._getWindow();p.addEventListener("resize",this._changeListener),p.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:r,height:s}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+s,right:e.left+r,height:s,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,r=this._getWindow(),s=e.documentElement,p=s.getBoundingClientRect();return{top:-p.top||e.body.scrollTop||r.scrollY||s.scrollTop||0,left:-p.left||e.body.scrollLeft||r.scrollX||s.scrollLeft||0}}change(e=20){return e>0?this._change.pipe((0,tD.e)(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(Yn(J1),Yn(pa),Yn(qa,8))},n.\u0275prov=we({factory:function(){return new n(Yn(J1),Yn(pa),Yn(qa,8))},token:n,providedIn:"root"}),n})(),Uj=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({}),n})(),fue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[uT,cT,Uj],uT,Uj]}),n})();const hue=[[["caption"]],[["colgroup"],["col"]]],pue=["caption","colgroup, col"];function nD(n){return class extends n{constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=q2(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}}}const R5=new fo("CDK_TABLE");let N5=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","cdkCellDef",""]]}),n})(),B5=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","cdkHeaderCellDef",""]]}),n})(),dT=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["","cdkFooterCellDef",""]]}),n})();class bue{}const vue=nD(bue);let Lb=(()=>{class n extends vue{constructor(e){super(),this._table=e,this._stickyEnd=!1}get name(){return this._name}set name(e){this._setNameInput(e)}get stickyEnd(){return this._stickyEnd}set stickyEnd(e){const r=this._stickyEnd;this._stickyEnd=q2(e),this._hasStickyChanged=r!==this._stickyEnd}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return n.\u0275fac=function(e){return new(e||n)(Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,N5,5),wo(s,B5,5),wo(s,dT,5)),2&e){let p;gs(p=ho())&&(r.cell=p.first),gs(p=ho())&&(r.headerCell=p.first),gs(p=ho())&&(r.footerCell=p.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[Ya([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ya]}),n})();class rD{constructor(t,e){const r=e.nativeElement.classList;for(const s of t._columnCssClassName)r.add(s)}}let iD=(()=>{class n extends rD{constructor(e,r){super(e,r)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Lb),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[ya]}),n})(),jj=(()=>{class n extends rD{constructor(e,r){var s;if(super(e,r),1===(null===(s=e._table)||void 0===s?void 0:s._elementRef.nativeElement.nodeType)){const p=e._table._elementRef.nativeElement.getAttribute("role");r.nativeElement.setAttribute("role","grid"===p||"treegrid"===p?"gridcell":"cell")}}}return n.\u0275fac=function(e){return new(e||n)(Xt(Lb),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:[1,"cdk-footer-cell"],features:[ya]}),n})(),sD=(()=>{class n extends rD{constructor(e,r){var s;if(super(e,r),1===(null===(s=e._table)||void 0===s?void 0:s._elementRef.nativeElement.nodeType)){const p=e._table._elementRef.nativeElement.getAttribute("role");r.nativeElement.setAttribute("role","grid"===p||"treegrid"===p?"gridcell":"cell")}}}return n.\u0275fac=function(e){return new(e||n)(Xt(Lb),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[ya]}),n})();class Vj{constructor(){this.tasks=[],this.endTasks=[]}}const oD=new fo("_COALESCED_STYLE_SCHEDULER");let Hj=(()=>{class n{constructor(e){this._ngZone=e,this._currentSchedule=null,this._destroyed=new ie.xQ}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new Vj,this._getScheduleObservable().pipe((0,ed.R)(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const e=this._currentSchedule;this._currentSchedule=new Vj;for(const r of e.tasks)r();for(const r of e.endTasks)r()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?(0,Tm.D)(Promise.resolve(void 0)):this._ngZone.onStable.pipe((0,p1.q)(1))}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})(),aD=(()=>{class n{constructor(e,r){this.template=e,this._differs=r}ngOnChanges(e){if(!this._columnsDiffer){const r=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(r).create(),this._columnsDiffer.diff(r)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof iw?e.headerCell.template:this instanceof sw?e.footerCell.template:e.cell.template}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm))},n.\u0275dir=Tn({type:n,features:[rr]}),n})();class _ue extends aD{}const wue=nD(_ue);let iw=(()=>{class n extends wue{constructor(e,r,s){super(e,r),this._table=s}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm),Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[ya,rr]}),n})();class xue extends aD{}const Eue=nD(xue);let sw=(()=>{class n extends Eue{constructor(e,r,s){super(e,r),this._table=s}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm),Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[ya,rr]}),n})(),fT=(()=>{class n extends aD{constructor(e,r,s){super(e,r),this._table=s}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac),Xt(Zm),Xt(R5,8))},n.\u0275dir=Tn({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[ya]}),n})(),Ub=(()=>{class n{constructor(e){this._viewContainer=e,n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf))},n.\u0275dir=Tn({type:n,selectors:[["","cdkCellOutlet",""]]}),n.mostRecentCellOutlet=null,n})(),uD=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),lD=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=bn({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),hT=(()=>{class n{constructor(e){this.templateRef=e}}return n.\u0275fac=function(e){return new(e||n)(Xt(Ac))},n.\u0275dir=Tn({type:n,selectors:[["ng-template","cdkNoDataRow",""]]}),n})();const $j=["top","bottom","left","right"];class Tue{constructor(t,e,r,s,p=!0,F=!0,z){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=r,this._coalescedStyleScheduler=s,this._isBrowser=p,this._needsPositionStickyOnElement=F,this._positionListener=z,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(t,e){const r=[];for(const s of t)if(s.nodeType===s.ELEMENT_NODE){r.push(s);for(let p=0;p{for(const s of r)this._removeStickyStyle(s,e)})}updateStickyColumns(t,e,r,s=!0){if(!t.length||!this._isBrowser||!e.some(rt=>rt)&&!r.some(rt=>rt))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const p=t[0],F=p.children.length,z=this._getCellWidths(p,s),te=this._getStickyStartColumnPositions(z,e),fe=this._getStickyEndColumnPositions(z,r),Re=e.lastIndexOf(!0),$e=r.indexOf(!0);this._coalescedStyleScheduler.schedule(()=>{const rt="rtl"===this.direction,ft=rt?"right":"left",Tt=rt?"left":"right";for(const Ft of t)for(let Qt=0;Qte[Qt]?Ft:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===$e?[]:z.slice($e).map((Ft,Qt)=>r[Qt+$e]?Ft:null).reverse()}))})}stickRows(t,e,r){if(!this._isBrowser)return;const s="bottom"===r?t.slice().reverse():t,p="bottom"===r?e.slice().reverse():e,F=[],z=[],te=[];for(let Re=0,$e=0;Re{var Re,$e;for(let rt=0;rt{e.some(s=>!s)?this._removeStickyStyle(r,["bottom"]):this._addStickyStyle(r,"bottom",0,!1)})}_removeStickyStyle(t,e){for(const s of e)t.style[s]="",t.classList.remove(this._borderCellCss[s]);$j.some(s=>-1===e.indexOf(s)&&t.style[s])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,r,s){t.classList.add(this._stickCellCss),s&&t.classList.add(this._borderCellCss[e]),t.style[e]=`${r}px`,t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let r=0;for(const s of $j)t.style[s]&&(r+=e[s]);return r?`${r}`:""}_getCellWidths(t,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;const r=[],s=t.children;for(let p=0;p0;p--)e[p]&&(r[p]=s,s+=t[p]);return r}}const dD=new fo("CDK_SPL");let pT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","rowOutlet",""]]}),n})(),mT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","headerRowOutlet",""]]}),n})(),gT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","footerRowOutlet",""]]}),n})(),yT=(()=>{class n{constructor(e,r){this.viewContainer=e,this.elementRef=r}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zf),Xt(wa))},n.\u0275dir=Tn({type:n,selectors:[["","noDataRowOutlet",""]]}),n})(),bT=(()=>{class n{constructor(e,r,s,p,F,z,te,fe,Re,$e,rt){this._differs=e,this._changeDetectorRef=r,this._elementRef=s,this._dir=F,this._platform=te,this._viewRepeater=fe,this._coalescedStyleScheduler=Re,this._viewportRuler=$e,this._stickyPositioningListener=rt,this._onDestroy=new ie.xQ,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new mo,this.viewChange=new xd.X({start:0,end:Number.MAX_VALUE}),p||this._elementRef.nativeElement.setAttribute("role","table"),this._document=z,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=q2(e),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=q2(e),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((e,r)=>this.trackBy?this.trackBy(r.dataIndex,r.data):r),this._viewportRuler.change().pipe((0,ed.R)(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const r=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||r,this._forceRecalculateCellWidths=r,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),oT(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const e=this._dataDiffer.diff(this._renderRows);if(!e)return this._updateNoDataRow(),void this.contentChanged.next();const r=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,r,(s,p,F)=>this._getEmbeddedViewArgs(s.item,F),s=>s.item.data,s=>{1===s.operation&&s.context&&this._renderCellTemplateForItem(s.record.item.rowDef,s.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(s=>{r.get(s.currentIndex).context.$implicit=s.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){const e=this._getRenderedRows(this._headerRowOutlet),s=this._elementRef.nativeElement.querySelector("thead");s&&(s.style.display=e.length?"":"none");const p=this._headerRowDefs.map(F=>F.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,p,"top"),this._headerRowDefs.forEach(F=>F.resetStickyChanged())}updateStickyFooterRowStyles(){const e=this._getRenderedRows(this._footerRowOutlet),s=this._elementRef.nativeElement.querySelector("tfoot");s&&(s.style.display=e.length?"":"none");const p=this._footerRowDefs.map(F=>F.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,p,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,p),this._footerRowDefs.forEach(F=>F.resetStickyChanged())}updateStickyColumnStyles(){const e=this._getRenderedRows(this._headerRowOutlet),r=this._getRenderedRows(this._rowOutlet),s=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...r,...s],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((p,F)=>{this._addStickyColumnStyles([p],this._headerRowDefs[F])}),this._rowDefs.forEach(p=>{const F=[];for(let z=0;z{this._addStickyColumnStyles([p],this._footerRowDefs[F])}),Array.from(this._columnDefsByName.values()).forEach(p=>p.resetStickyChanged())}_getAllRenderRows(){const e=[],r=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let s=0;s{const z=s&&s.has(F)?s.get(F):[];if(z.length){const te=z.shift();return te.dataIndex=r,te}return{data:e,rowDef:F,dataIndex:r}})}_cacheColumnDefs(){this._columnDefsByName.clear(),vT(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(r=>{this._columnDefsByName.has(r.name),this._columnDefsByName.set(r.name,r)})}_cacheRowDefs(){this._headerRowDefs=vT(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=vT(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=vT(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const e=this._rowDefs.filter(r=>!r.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){const e=(F,z)=>F||!!z.getColumnsDiff(),r=this._rowDefs.reduce(e,!1);r&&this._forceRenderDataRows();const s=this._headerRowDefs.reduce(e,!1);s&&this._forceRenderHeaderRows();const p=this._footerRowDefs.reduce(e,!1);return p&&this._forceRenderFooterRows(),r||s||p}_switchDataSource(e){this._data=[],oT(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;oT(this.dataSource)?e=this.dataSource.connect(this):(0,YO.b)(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=(0,bu.of)(this.dataSource)),this._renderChangeSubscription=e.pipe((0,ed.R)(this._onDestroy)).subscribe(r=>{this._data=r||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,r)=>this._renderRow(this._headerRowOutlet,e,r)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,r)=>this._renderRow(this._footerRowOutlet,e,r)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,r){const s=Array.from(r.columns||[]).map(z=>this._columnDefsByName.get(z)),p=s.map(z=>z.sticky),F=s.map(z=>z.stickyEnd);this._stickyStyler.updateStickyColumns(e,p,F,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){const r=[];for(let s=0;s!p.when||p.when(r,e));else{let p=this._rowDefs.find(F=>F.when&&F.when(r,e))||this._defaultRowDef;p&&s.push(p)}return s}_getEmbeddedViewArgs(e,r){return{templateRef:e.rowDef.template,context:{$implicit:e.data},index:r}}_renderRow(e,r,s,p={}){const F=e.viewContainer.createEmbeddedView(r.template,p,s);return this._renderCellTemplateForItem(r,p),F}_renderCellTemplateForItem(e,r){for(let s of this._getCellTemplates(e))Ub.mostRecentCellOutlet&&Ub.mostRecentCellOutlet._viewContainer.createEmbeddedView(s,r);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const e=this._rowOutlet.viewContainer;for(let r=0,s=e.length;r{const s=this._columnDefsByName.get(r);return e.extractCellTemplate(s)}):[]}_applyNativeTableSections(){const e=this._document.createDocumentFragment(),r=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const s of r){const p=this._document.createElement(s.tag);p.setAttribute("role","rowgroup");for(const F of s.outlets)p.appendChild(F.elementRef.nativeElement);e.appendChild(p)}this._elementRef.nativeElement.appendChild(e)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const e=(r,s)=>r||s.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new Tue(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:(0,bu.of)()).pipe((0,ed.R)(this._onDestroy)).subscribe(r=>{this._stickyStyler.direction=r,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(r=>!r._table||r._table===this)}_updateNoDataRow(){const e=this._customNoDataRow||this._noDataRow;if(e){const r=0===this._rowOutlet.viewContainer.length;if(r!==this._isShowingNoDataRow){const s=this._noDataRowOutlet.viewContainer;r?s.createEmbeddedView(e.templateRef):s.clear(),this._isShowingNoDataRow=r}}}}return n.\u0275fac=function(e){return new(e||n)(Xt(Zm),Xt(yf),Xt(wa),Sd("role"),Xt(aT,8),Xt(qa),Xt(J1),Xt(r8),Xt(oD),Xt(Fj),Xt(dD,12))},n.\u0275cmp=bn({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(e,r,s){if(1&e&&(wo(s,hT,5),wo(s,Lb,5),wo(s,fT,5),wo(s,iw,5),wo(s,sw,5)),2&e){let p;gs(p=ho())&&(r._noDataRow=p.first),gs(p=ho())&&(r._contentColumnDefs=p),gs(p=ho())&&(r._contentRowDefs=p),gs(p=ho())&&(r._contentHeaderRowDefs=p),gs(p=ho())&&(r._contentFooterRowDefs=p)}},viewQuery:function(e,r){if(1&e&&(Ro(pT,7),Ro(mT,7),Ro(gT,7),Ro(yT,7)),2&e){let s;gs(s=ho())&&(r._rowOutlet=s.first),gs(s=ho())&&(r._headerRowOutlet=s.first),gs(s=ho())&&(r._footerRowOutlet=s.first),gs(s=ho())&&(r._noDataRowOutlet=s.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(e,r){2&e&&ks("cdk-table-fixed-layout",r.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Ya([{provide:R5,useExisting:n},{provide:r8,useClass:Oj},{provide:oD,useClass:Hj},{provide:dD,useValue:null}])],ngContentSelectors:pue,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,r){1&e&&(Pp(hue),ih(0),ih(1,1),R0(2,0),R0(3,1),R0(4,2),R0(5,3))},directives:[mT,pT,yT,gT],styles:[".cdk-table-fixed-layout{table-layout:fixed}\n"],encapsulation:2}),n})();function vT(n,t){return n.concat(Array.from(t))}let Iue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[fue]]}),n})();function _T(n,t){return(n.getAttribute(t)||"").match(/\S+/g)||[]}Y(54395);const Zj="cdk-describedby-message-container",Yj="cdk-describedby-message",wT="cdk-describedby-host";let Fue=0;const Dy=new Map;let qp=null,Lue=(()=>{class n{constructor(e){this._document=e}describe(e,r,s){if(!this._canBeDescribed(e,r))return;const p=hD(r,s);"string"!=typeof r?(Jj(r),Dy.set(p,{messageElement:r,referenceCount:0})):Dy.has(p)||this._createMessageElement(r,s),this._isElementDescribedByMessage(e,p)||this._addMessageReference(e,p)}removeDescription(e,r,s){if(!r||!this._isElementNode(e))return;const p=hD(r,s);if(this._isElementDescribedByMessage(e,p)&&this._removeMessageReference(e,p),"string"==typeof r){const F=Dy.get(p);F&&0===F.referenceCount&&this._deleteMessageElement(p)}qp&&0===qp.childNodes.length&&this._deleteMessagesContainer()}ngOnDestroy(){const e=this._document.querySelectorAll(`[${wT}]`);for(let r=0;r0!=s.indexOf(Yj));e.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(e,r){const s=Dy.get(r);(function(n,t,e){const r=_T(n,t);r.some(s=>s.trim()==e.trim())||(r.push(e.trim()),n.setAttribute(t,r.join(" ")))})(e,"aria-describedby",s.messageElement.id),e.setAttribute(wT,""),s.referenceCount++}_removeMessageReference(e,r){const s=Dy.get(r);s.referenceCount--,function(n,t,e){const s=_T(n,t).filter(p=>p!=e.trim());s.length?n.setAttribute(t,s.join(" ")):n.removeAttribute(t)}(e,"aria-describedby",s.messageElement.id),e.removeAttribute(wT)}_isElementDescribedByMessage(e,r){const s=_T(e,"aria-describedby"),p=Dy.get(r),F=p&&p.messageElement.id;return!!F&&-1!=s.indexOf(F)}_canBeDescribed(e,r){if(!this._isElementNode(e))return!1;if(r&&"object"==typeof r)return!0;const s=null==r?"":`${r}`.trim(),p=e.getAttribute("aria-label");return!(!s||p&&p.trim()===s)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(qa))},token:n,providedIn:"root"}),n})();function hD(n,t){return"string"==typeof n?`${t||""}/${n}`:n}function Jj(n){n.id||(n.id=`${Yj}-${Fue++}`)}"undefined"!=typeof Element&∈const rV=new fo("cdk-input-modality-detector-options"),tce={ignoreKeys:[18,17,224,91,16]},F5=QO({passive:!0,capture:!0});let sV=(()=>{class n{constructor(e,r,s,p){this._platform=e,this._mostRecentTarget=null,this._modality=new xd.X(null),this._lastTouchMs=0,this._onKeydown=F=>{var z,te;(null===(te=null===(z=this._options)||void 0===z?void 0:z.ignoreKeys)||void 0===te?void 0:te.some(fe=>fe===F.keyCode))||(this._modality.next("keyboard"),this._mostRecentTarget=rw(F))},this._onMousedown=F=>{Date.now()-this._lastTouchMs<650||(this._modality.next(function(n){return 0===n.offsetX&&0===n.offsetY}(F)?"keyboard":"mouse"),this._mostRecentTarget=rw(F))},this._onTouchstart=F=>{!function(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}(F)?(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=rw(F)):this._modality.next("keyboard")},this._options=Object.assign(Object.assign({},tce),p),this.modalityDetected=this._modality.pipe((0,PN.T)(1)),this.modalityChanged=this.modalityDetected.pipe((0,f_.x)()),e.isBrowser&&r.runOutsideAngular(()=>{s.addEventListener("keydown",this._onKeydown,F5),s.addEventListener("mousedown",this._onMousedown,F5),s.addEventListener("touchstart",this._onTouchstart,F5)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,F5),document.removeEventListener("mousedown",this._onMousedown,F5),document.removeEventListener("touchstart",this._onTouchstart,F5))}}return n.\u0275fac=function(e){return new(e||n)(Yn(J1),Yn(pa),Yn(qa),Yn(rV,8))},n.\u0275prov=we({factory:function(){return new n(Yn(J1),Yn(pa),Yn(qa),Yn(rV,8))},token:n,providedIn:"root"}),n})();const uV=new fo("cdk-focus-monitor-default-options"),xT=QO({passive:!0,capture:!0});let cV=(()=>{class n{constructor(e,r,s,p,F){this._ngZone=e,this._platform=r,this._inputModalityDetector=s,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new ie.xQ,this._rootNodeFocusAndBlurListener=z=>{const te=rw(z),fe="focus"===z.type?this._onFocus:this._onBlur;for(let Re=te;Re;Re=Re.parentElement)fe.call(this,z,Re)},this._document=p,this._detectionMode=(null==F?void 0:F.detectionMode)||0}monitor(e,r=!1){const s=n8(e);if(!this._platform.isBrowser||1!==s.nodeType)return(0,bu.of)(null);const p=function(n){if(function(){if(null==eD){const n="undefined"!=typeof document?document.head:null;eD=!(!n||!n.createShadowRoot&&!n.attachShadow)}return eD}()){const t=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(s)||this._getDocument(),F=this._elementInfo.get(s);if(F)return r&&(F.checkChildren=!0),F.subject;const z={checkChildren:r,subject:new ie.xQ,rootNode:p};return this._elementInfo.set(s,z),this._registerGlobalListeners(z),z.subject}stopMonitoring(e){const r=n8(e),s=this._elementInfo.get(r);s&&(s.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(s))}focusVia(e,r,s){const p=n8(e);p===this._getDocument().activeElement?this._getClosestElementsInfo(p).forEach(([z,te])=>this._originChanged(z,r,te)):(this._setOrigin(r),"function"==typeof p.focus&&p.focus(s))}ngOnDestroy(){this._elementInfo.forEach((e,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_toggleClass(e,r,s){s?e.classList.add(r):e.classList.remove(r)}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!!(null==e?void 0:e.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(e,r){this._toggleClass(e,"cdk-focused",!!r),this._toggleClass(e,"cdk-touch-focused","touch"===r),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===r),this._toggleClass(e,"cdk-mouse-focused","mouse"===r),this._toggleClass(e,"cdk-program-focused","program"===r)}_setOrigin(e,r=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&r,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,r){const s=this._elementInfo.get(r),p=rw(e);!s||!s.checkChildren&&r!==p||this._originChanged(r,this._getFocusOrigin(p),s)}_onBlur(e,r){const s=this._elementInfo.get(r);!s||s.checkChildren&&e.relatedTarget instanceof Node&&r.contains(e.relatedTarget)||(this._setClasses(r),this._emitOrigin(s.subject,null))}_emitOrigin(e,r){this._ngZone.run(()=>e.next(r))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const r=e.rootNode,s=this._rootNodeFocusListenerCount.get(r)||0;s||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,xT),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,xT)}),this._rootNodeFocusListenerCount.set(r,s+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,ed.R)(this._stopInputModalityDetector)).subscribe(p=>{this._setOrigin(p,!0)}))}_removeGlobalListeners(e){const r=e.rootNode;if(this._rootNodeFocusListenerCount.has(r)){const s=this._rootNodeFocusListenerCount.get(r);s>1?this._rootNodeFocusListenerCount.set(r,s-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,xT),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,xT),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,r,s){this._setClasses(e,r),this._emitOrigin(s.subject,r),this._lastFocusOrigin=r}_getClosestElementsInfo(e){const r=[];return this._elementInfo.forEach((s,p)=>{(p===e||s.checkChildren&&p.contains(e))&&r.push([p,s])}),r}}return n.\u0275fac=function(e){return new(e||n)(Yn(pa),Yn(J1),Yn(sV),Yn(qa,8),Yn(uV,8))},n.\u0275prov=we({factory:function(){return new n(Yn(pa),Yn(J1),Yn(sV),Yn(qa,8),Yn(uV,8))},token:n,providedIn:"root"}),n})();const lV="cdk-high-contrast-black-on-white",dV="cdk-high-contrast-white-on-black",pD="cdk-high-contrast-active";let fV=(()=>{class n{constructor(e,r){this._platform=e,this._document=r}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const r=this._document.defaultView||window,s=r&&r.getComputedStyle?r.getComputedStyle(e):null,p=(s&&s.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(e),p){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const e=this._document.body.classList;e.remove(pD),e.remove(lV),e.remove(dV),this._hasCheckedHighContrastMode=!0;const r=this.getHighContrastMode();1===r?(e.add(pD),e.add(lV)):2===r&&(e.add(pD),e.add(dV))}}}return n.\u0275fac=function(e){return new(e||n)(Yn(J1),Yn(qa))},n.\u0275prov=we({factory:function(){return new n(Yn(J1),Yn(qa))},token:n,providedIn:"root"}),n})();const hV=new Sg("12.2.13");let cce=(()=>{class n{}return n.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",n.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",n.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",n.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",n})(),lce=(()=>{class n{}return n.COMPLEX="375ms",n.ENTERING="225ms",n.EXITING="195ms",n})();const pV=new Sg("12.2.13"),fce=new fo("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});let s8,jb=(()=>{class n{constructor(e,r,s){this._hasDoneGlobalChecks=!1,this._document=s,e._applyBodyHighContrastModeCssClasses(),this._sanityChecks=r,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!(!rC()||"undefined"!=typeof __karma__&&__karma__||"undefined"!=typeof jasmine&&jasmine||"undefined"!=typeof jest&&jest||"undefined"!=typeof Mocha&&Mocha)&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}_checkDoctypeIsDefined(){this._checkIsEnabled("doctype")&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(!this._checkIsEnabled("theme")||!this._document.body||"function"!=typeof getComputedStyle)return;const e=this._document.createElement("div");e.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(e);const r=getComputedStyle(e);r&&"none"!==r.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(e)}_checkCdkVersionMatch(){this._checkIsEnabled("version")&&pV.full!==hV.full&&console.warn("The Angular Material version ("+pV.full+") does not match the Angular CDK version ("+hV.full+").\nPlease ensure the versions of these two packages exactly match.")}}return n.\u0275fac=function(e){return new(e||n)(Yn(fV),Yn(fce,8),Yn(qa))},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[uT],uT]}),n})();function mD(n){return class extends n{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=q2(t)}}}function hce(n){return class extends n{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new O.y(e=>{this._isInitialized?this._notifySubscriber(e):this._pendingSubscribers.push(e)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}try{s8="undefined"!=typeof Intl}catch{s8=!1}const jce=[[["caption"]],[["colgroup"],["col"]]],Vce=["caption","colgroup, col"];let cv=(()=>{class n extends bT{constructor(){super(...arguments),this.stickyCssClass="mat-table-sticky",this.needsPositionStickyOnElement=!1}}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275cmp=bn({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],hostVars:2,hostBindings:function(e,r){2&e&&ks("mat-table-fixed-layout",r.fixedLayout)},exportAs:["matTable"],features:[Ya([{provide:r8,useClass:Oj},{provide:bT,useExisting:n},{provide:R5,useExisting:n},{provide:oD,useClass:Hj},{provide:dD,useValue:null}]),ya],ngContentSelectors:Vce,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,r){1&e&&(Pp(jce),ih(0),ih(1,1),R0(2,0),R0(3,1),R0(4,2),R0(5,3))},directives:[mT,pT,yT,gT],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky !important;position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\n'],encapsulation:2}),n})(),Vb=(()=>{class n extends N5{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matCellDef",""]],features:[Ya([{provide:N5,useExisting:n}]),ya]}),n})(),lv=(()=>{class n extends B5{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matHeaderCellDef",""]],features:[Ya([{provide:B5,useExisting:n}]),ya]}),n})(),xV=(()=>{class n extends dT{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matFooterCellDef",""]],features:[Ya([{provide:dT,useExisting:n}]),ya]}),n})(),Hb=(()=>{class n extends Lb{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[Ya([{provide:Lb,useExisting:n},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ya]}),n})(),dv=(()=>{class n extends iD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[ya]}),n})(),EV=(()=>{class n extends jj{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["mat-footer-cell"],["td","mat-footer-cell",""]],hostAttrs:["role","gridcell",1,"mat-footer-cell"],features:[ya]}),n})(),fv=(()=>{class n extends sD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[ya]}),n})(),L5=(()=>{class n extends iw{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[Ya([{provide:iw,useExisting:n}]),ya]}),n})(),hv=(()=>{class n extends fT{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[Ya([{provide:fT,useExisting:n}]),ya]}),n})(),U5=(()=>{class n extends uD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275cmp=bn({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[Ya([{provide:uD,useExisting:n}]),ya],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),pv=(()=>{class n extends lD{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275cmp=bn({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[Ya([{provide:lD,useExisting:n}]),ya],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,r){1&e&&R0(0,0)},directives:[Ub],encapsulation:2}),n})(),aw=(()=>{class n extends hT{}return n.\u0275fac=function(){let t;return function(r){return(t||(t=Au(n)))(r||n)}}(),n.\u0275dir=Tn({type:n,selectors:[["ng-template","matNoDataRow",""]],features:[Ya([{provide:hT,useExisting:n}]),ya]}),n})(),Kce=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({imports:[[Iue,jb],jb]}),n})();function Yce(n,t){if(1&n&&(Zr(0),kt(1),$r()),2&n){const e=an(2);ct(1),cu(" ",e.wallet.user.slice(0,6)," ... ",e.wallet.user.slice(38,42)," ")}}function Jce(n,t){if(1&n&&(Zr(0),kt(1),$r()),2&n){const e=an(2);ct(1),Pr(" ",e.wallet.ens," ")}}function Xce(n,t){if(1&n){const e=Di();Ae(0,"div",1),Ae(1,"div",2),Ae(2,"div",3),Ae(3,"h3"),kt(4," Account "),Ie(),Ae(5,"h2",4),dr("click",function(){return Ur(e),an().activeModal.dismiss()}),Ie(),Ie(),Ae(6,"div",5),Ae(7,"div",6),Ae(8,"p",7),kt(9),Ie(),Ae(10,"button",8),dr("click",function(){return Ur(e),an().disconnectWallet()}),kt(11," Disconnect "),Ie(),Ie(),Ae(12,"div",9),Gn(13,"img",10),Ae(14,"h3",7),it(15,Yce,2,2,"ng-container",11),it(16,Jce,2,1,"ng-container",11),Ie(),Ie(),Ae(17,"small",12),Ae(18,"a",13),Gn(19,"i",14),kt(20," View on explorer "),Ie(),Ae(21,"p",15),kt(22,"Copy Address"),Ie(),Ie(),Ie(),Ie(),Ie()}if(2&n){const e=an();ct(9),Pr("Connected with ",e.wallet.providerName,""),ct(4),qu("src",e.chain.metadata[e.wallet.chainId].iconPath,Pi),ct(2),Ct("ngIf",!e.wallet.ens),ct(1),Ct("ngIf",e.wallet.ens),ct(2),qu("href",e.explorerURL,Pi),ct(3),Ct("cdkCopyToClipboard",e.wallet.user)}}const GA=class{constructor(t,e,r){yt(this,"activeModal"),yt(this,"chain"),yt(this,"wallet"),yt(this,"explorerURL"),this.activeModal=t,this.chain=e,this.wallet=r}ngOnInit(){this.resetData(),this.loadData()}resetData(){this.explorerURL=""}loadData(){var t=this;return(0,Br.Z)(function*(){!t.wallet.connected||t.setExplorerURL()})()}setExplorerURL(){this.explorerURL=this.chain.metadata[this.wallet.chainId].blockExplorerUrls[0]+"/address/"+this.wallet.user}disconnectWallet(){this.activeModal.dismiss(),this.wallet.disconnect()}};let mp=GA;yt(mp,"\u0275fac",function(e){return new(e||GA)(Xt(Ob),Xt(dc),Xt(Xa))}),yt(mp,"\u0275cmp",bn({type:GA,selectors:[["app-wallet-connect-modal"]],decls:1,vars:1,consts:[["class","wallet-connect ",4,"ngIf"],[1,"wallet-connect"],[1,"wallet-connect__content"],[1,"wallet-connect__header"],["aria-label","Close",1,"btn-close","modal-close",3,"click"],[1,"account-details"],[1,"account-details__header"],[1,"m-0"],["type","button","name","button-disconnect",1,"account-disconnect",3,"click"],[1,"d-flex","align-items-center","justify-content-left","gap-3"],["width","35","height","35","alt","User Icon",1,"",3,"src"],[4,"ngIf"],[1,"account-details__footer","gap-3"],["target","_blank",1,"text-decoration-none",3,"href"],[1,"fe","fe-external-link"],[3,"cdkCopyToClipboard"]],template:function(e,r){1&e&&it(0,Xce,23,6,"div",0),2&e&&Ct("ngIf",r.wallet.address)},directives:[La,CN],styles:[".account-details[_ngcontent-%COMP%]{margin-top:1rem;border:1px double #3a3a3a;border-radius:1rem;padding:1rem;color:gray}.account-details__header[_ngcontent-%COMP%]{margin-bottom:15px;display:flex;align-items:center;justify-content:space-between;color:gray}.account-details__footer[_ngcontent-%COMP%]{margin-top:1rem;display:flex;align-items:center;justify-content:left}.account-details__footer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;cursor:pointer}.account-disconnect[_ngcontent-%COMP%]{border:1px double #3a3a3a;border-radius:1rem;background-color:transparent;padding:2px 10px;color:gray}.account-disconnect[_ngcontent-%COMP%]:hover{border-color:#06e7cc}.wallet-connect[_ngcontent-%COMP%]{border-radius:1rem}.wallet-connect__content[_ngcontent-%COMP%]{padding:20px}.wallet-connect__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;color:gray}.wallet-connect__header[_ngcontent-%COMP%] .btn-close[_ngcontent-%COMP%]{color:gray;cursor:pointer}.wallet-connect__body[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;height:auto}.wallet-connect__provider[_ngcontent-%COMP%]{height:50px;width:calc(50% - 10px);border:1px double #3a3a3a;border-radius:1rem;margin:10px 0;display:flex;align-items:center;justify-content:space-between;padding:0 1rem;color:gray;background-color:transparent;cursor:pointer}.wallet-connect__provider[_ngcontent-%COMP%]:hover{border-color:#06e7cc}.wallet-connect__provider[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:35px;width:35px}.wallet-connect__footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-top:10px}.wallet-connect__footer[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}"]}));const TV={[qi.ETHEREUM]:{},[qi.GOERLI]:{},[qi.OPTIMISM]:{},[qi.POLYGON]:{},[qi.ARBITRUM]:{}},ile=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],sle=[{name:"name",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],ole=[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}],ale=[{name:"holder",type:"address"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"expiry",type:"uint256"},{name:"allowed",type:"bool"}],d9=class{constructor(t,e,r,s){yt(this,"chain"),yt(this,"contract"),yt(this,"util"),yt(this,"wallet"),yt(this,"signature"),this.chain=t,this.contract=e,this.util=r,this.wallet=s}permit(t,e,r,s){var p=this;return(0,Br.Z)(function*(){if(p.wallet.usingGnosisSafe)throw"permit.service: Signing with Gnosis Safe not supported.";if(!t.symbol.includes("\u221e")&&!TV[p.wallet.chainId][t.symbol])throw`permit.service: ${t.symbol} not supported.`;const F=p.wallet.web3,z=p.util.processWeb3Number(r.times(t.precision)),fe=yield p.contract.getERC20(t.address,F).methods.nonces(p.wallet.user).call(),Re=TV[p.wallet.chainId][t.symbol],$e=Re?Re.type:1,rt=Re?Re.version:"1",ft=p.getDomain(t,rt),Tt=p.getMessage(e,z,fe,s,$e),Ft=JSON.stringify({domain:ft,message:Tt,primaryType:"Permit",types:{EIP712Domain:rt?ile:sle,Permit:2==$e?ale:ole}}),[Qt,wn,An]=yield p.wallet.sign(Ft),gr={v:Qt,r:wn,s:An,owner:p.wallet.user,spender:e,tokenAddress:t.address,nonce:fe,deadline:s,...1==$e&&{amount:z},...2==$e&&{allowed:!0}};return p.signature=gr,gr})()}getDomain(t,e){return{name:t.name,...e&&{version:e},chainId:this.wallet.chainId.toString(),verifyingContract:t.address}}getMessage(t,e,r,s,p){return{...1==p&&{owner:this.wallet.user},...2==p&&{holder:this.wallet.user},spender:t,...1==p&&{value:e},nonce:r,...1==p&&{deadline:s},...2==p&&{expiry:s},...2==p&&{allowed:!0}}}isSignatureValid(t,e,r,s){const p=this.util.processWeb3Number(s.times(e.precision));return t&&t.owner===this.wallet.user&&t.spender===r&&t.tokenAddress===e.address&&t.deadline>=Math.floor(Date.now()/1e3)&&(t.allowed||t.amount===p)}};let o8=d9;yt(o8,"\u0275fac",function(e){return new(e||d9)(Yn(dc),Yn(ud),Yn($c),Yn(Xa))}),yt(o8,"\u0275prov",we({token:d9,factory:d9.\u0275fac,providedIn:"root"}));const f9=class{constructor(t){yt(this,"permit_service"),this.permit_service=t}canApprove(t,e){return t.gt(0)&&e.gte(t)}isTokenApproved(t,e){return t&&e&&e.gte(t)}isTokenPermitted(t,e,r,s){return this.permit_service.isSignatureValid(t,e,r,s)}};let jg=f9;yt(jg,"\u0275fac",function(e){return new(e||f9)(Yn(o8))}),yt(jg,"\u0275prov",we({token:f9,factory:f9.\u0275fac,providedIn:"root"}));const h9=class{constructor(t,e,r,s){yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"MULTIPLIER",new sn.Z(2)),yt(this,"gasTokenPrice",new sn.Z(0)),this.contract=t,this.store=e,this.util=r,this.wallet=s,this.store.tokens_observable.subscribe(p=>{const F=p[this.util.id(Q6[this.wallet.chainId],this.wallet.chainId)];this.gasTokenPrice=F?F.price:new sn.Z(0)})}shouldCompound(t,e,r){var s=this;return(0,Br.Z)(function*(){if(e.totalSupply.eq(0))return!1;const p=s.wallet.httpsWeb3(),F=s.contract.getBunniHub(p),z={pool:t.address,tickLower:e.tickLower,tickUpper:e.tickUpper},te=F.methods.compound(z),fe=yield s.wallet.estimateGas(te,0,()=>{}),Re=parseInt(yield p.eth.getGasPrice())/1e18,$e=s.gasTokenPrice.times(fe).times(Re),rt=yield F.methods.compound(z).call().catch(An=>null);if(!rt)return!1;const ft=new sn.Z(rt.addedLiquidity),Tt=new sn.Z(rt.amount0).div(t.token0.precision),Ft=new sn.Z(rt.amount1).div(t.token1.precision),Qt=Tt.times(t.token0.price).plus(Ft.times(t.token1.price)),wn=Qt.times(r).div(e.totalSupply);return!!(ft.gt(0)&&t.token0.price.eq(0)&&t.token1.price.eq(0)||r.eq(0)&&Qt.gt($e.times(s.MULTIPLIER)))||!(!r.gt(0)||!wn.gt($e.times(s.MULTIPLIER)))})()}};let j5=h9;yt(j5,"\u0275fac",function(e){return new(e||h9)(Yn(ud),Yn(el),Yn($c),Yn(Xa))}),yt(j5,"\u0275prov",we({token:h9,factory:h9.\u0275fac,providedIn:"root"}));const p9=class{constructor(t,e,r){yt(this,"chain"),yt(this,"util"),yt(this,"wallet"),this.chain=t,this.util=e,this.wallet=r}quote_0x(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){const z={sellToken:t.address,buyToken:e.address,sellAmount:F.util.processWeb3Number(r.times(t.precision)),slippagePercentage:s/1e4},te=Y(59009),fe=F.chain.isTestnet(p)?{}:{"0x-api-key":"eae5202f-33b0-4a88-98f3-4232035abbe1"},Re=yield fetch(`${Hre[p]}/swap/v1/quote?${te.stringify(z)}`,{headers:fe}),$e=yield Re.json();return Re.ok?{tokenAmountIn:r,tokenAmountOut:r.times($e.price),minAmountOut:r.times($e.guaranteedPrice),uniswapV3Route:!!$e.sources.find(rt=>"Uniswap_V3"===rt.name&&new sn.Z(rt.proportion).gt(0)),data:$e.data}:(F.wallet.openErrorModal(new Error(`0x API: ${$e.message}`)),null)})()}quote_1inch(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){const z={src:t.address,dst:e.address,amount:F.util.processWeb3Number(r.times(t.precision)),from:F.wallet.user,slippage:s/1e4,disableEstimate:!0,allowPartialFill:!1,includeProtocols:!0},te=Y(59009),Re=yield fetch(`/api/swap/v5.2/${p}/swap?${te.stringify(z)}`,{headers:{Authorization:"Bearer ",accept:"application/json"}}),$e=yield Re.json();return Re.ok?{tokenAmountIn:r,tokenAmountOut:new sn.Z($e.toAmount).div(e.precision),minAmountOut:new sn.Z($e.toAmount).div(e.precision),uniswapV3Route:!!$e.protocols.find(rt=>"UNISWAP_V3"===rt[0][0].name&&new sn.Z(rt[0][0].part).gt(0)),data:$e.tx.data}:(F.wallet.openErrorModal(new Error(`1inch API: ${$e.message}`)),null)})()}};let TT=p9;function ule(n,t){1&n&&(Ae(0,"p",19),kt(1," No results found "),Ie())}function cle(n,t){1&n&&Gn(0,"th",20)}yt(TT,"\u0275fac",function(e){return new(e||p9)(Yn(dc),Yn($c),Yn(Xa))}),yt(TT,"\u0275prov",we({token:p9,factory:p9.\u0275fac,providedIn:"root"}));const lle=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function dle(n,t){if(1&n&&(Ae(0,"td"),Ae(1,"div",21),Ae(2,"div",22),Gn(3,"img",23),Ie(),Ae(4,"div",24),Ae(5,"h4",25),kt(6),Ie(),Ae(7,"small",26),kt(8),Ae(9,"a",27),dr("click",function(r){return r.stopPropagation()}),Ie(),Ie(),Ie(),Ie(),Ie()),2&n){const e=t.$implicit,r=an();ct(3),qu("src",e.iconPath,Pi),_l("alt","",e.symbol," Icon"),Ct("ngClass",vc(9,lle,e.symbol.includes("PYT"),e.symbol.includes("NYT"))),ct(3),Pr(" ",e.symbol," "),ct(2),Lc(" ",e.name," (",e.address.slice(0,5),"...",e.address.slice(38,42),") "),ct(1),V1("href","",r.chain.metadata[r.wallet.chainId].blockExplorerUrls[0],"/address/",e.address,"",Pi)}}function fle(n,t){1&n&&Gn(0,"td",28)}function hle(n,t){if(1&n&&(Ae(0,"small",26),kt(1),Ie()),2&n){const e=an().$implicit;ct(1),Pr(" $",e.userBalance.times(e.price).toFormat(2)," ")}}function ple(n,t){if(1&n&&(Ae(0,"td",29),Ae(1,"div",30),Ae(2,"h4",25),kt(3),Ie(),it(4,hle,2,1,"small",31),Ie(),Ie()),2&n){const e=t.$implicit;ct(3),Pr(" ",e.userBalance.toFormat(4)," "),ct(1),Ct("ngIf",!0)}}function mle(n,t){1&n&&Gn(0,"td",28)}function gle(n,t){if(1&n){const e=Di();Ae(0,"tr",32),dr("click",function(){const p=Ur(e).$implicit,F=an();return F.canSelect(p)&&F.selectToken(p)}),Ie()}if(2&n){const e=t.$implicit;Ct("ngClass",an().canSelect(e)?"token-select":"token-select__selected")}}const yle=function(){return["token","balance"]},zA=class{constructor(t,e,r,s,p,F){yt(this,"activeModal"),yt(this,"chain"),yt(this,"store"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),yt(this,"tokenA"),yt(this,"tokenB"),yt(this,"allowedTokens"),yt(this,"hiddenTokens"),yt(this,"selectTokenEvent",new mo),yt(this,"tokens",[]),yt(this,"filteredTokens",[]),this.activeModal=t,this.chain=e,this.store=r,this.token=s,this.util=p,this.wallet=F}ngOnInit(){this.store.tokens_observable.subscribe(t=>{let e=Object.values(t).filter(r=>(!this.allowedTokens||this.allowedTokens.find(s=>s.address===r.address))&&(!this.hiddenTokens||!this.hiddenTokens.find(s=>s.address===r.address))&&r.address!==Am[this.wallet.chainId]&&r.address!==J6[this.wallet.chainId]&&r.chainId===this.wallet.chainId);e=this.util.sortByProp(e,"symbol",!0),e=this.util.sortByProp(e,"userBalance",!1),e=this.util.sortByProp(e,"userBalanceUSD",!1),this.tokens=e,this.filteredTokens=e})}selectToken(t){var e=this;return(0,Br.Z)(function*(){e.selectTokenEvent.emit(t),e.activeModal.dismiss()})()}canSelect(t){return!(this.tokenA&&t.address===this.tokenA.address||this.tokenB&&t.address===this.tokenB.address)}filterTokens(t){var e=this;return(0,Br.Z)(function*(){if(t){const r=t.toLowerCase().trim().split(" "),s=e.tokens.filter(p=>{for(let F of r)if(!p.name.toLowerCase().match(F)&&!p.symbol.toLowerCase().match(F)&&!p.address.toLowerCase().match(F))return!1;return!0});if(0===s.length&&1===r.length&&e.util.validateAddress(r[0],e.wallet.chainId)){const p=e.util.checksumAddress(r[0]),F=yield e.token.fetchToken(p.toLowerCase(),e.wallet.chainId);e.tokens.push(F),s.push(F)}e.filteredTokens=s}else e.filteredTokens=e.tokens})()}};let uw=zA;yt(uw,"\u0275fac",function(e){return new(e||zA)(Xt(Ob),Xt(dc),Xt(el),Xt(uv),Xt($c),Xt(Xa))}),yt(uw,"\u0275cmp",bn({type:zA,selectors:[["app-token-select-modal"]],inputs:{tokenA:"tokenA",tokenB:"tokenB",allowedTokens:"allowedTokens",hiddenTokens:"hiddenTokens"},outputs:{selectTokenEvent:"selectTokenEvent"},decls:23,vars:4,consts:[[1,"modal-card","card"],[1,"card-header","border-bottom","border-dark"],[1,"input-group","input-group-flush","input-group-merge","input-group-reverse"],["type","search","placeholder","Search by name, symbol or address",1,"form-control","list-search",3,"input"],[1,"input-group-text"],[1,"fe","fe-search"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"card-body","p-0"],["class","text-center py-4 fw-bold mb-0",4,"ngIf"],[1,"mb-0"],["mat-table","",1,"table","table-sm","table-hover","card-table",3,"dataSource"],["mat-header-cell","",4,"matHeaderCellDef"],[1,"list"],["matColumnDef","token"],[4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],["matColumnDef","balance"],["class","text-end",4,"matCellDef"],["mat-row","",3,"ngClass","click",4,"matRowDef","matRowDefColumns"],[1,"text-center","py-4","fw-bold","mb-0"],["mat-header-cell",""],[1,"d-flex","align-items-center"],[1,"avatar"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","me-3",3,"src","alt","ngClass"],[1,"ms-3"],[1,"fw-normal","mb-1"],[1,"text-muted"],["target","_blank",1,"fe","fe-external-link","text-muted",3,"href","click"],["mat-footer-cell",""],[1,"text-end"],[1,""],["class","text-muted",4,"ngIf"],["mat-row","",3,"ngClass","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"form"),Ae(3,"div",2),Ae(4,"input",3),dr("input",function(p){return r.filterTokens(p.target.value)}),Ie(),Ae(5,"div",4),Gn(6,"span",5),Ie(),Ie(),Ie(),Ae(7,"button",6),dr("click",function(){return r.activeModal.dismiss()}),Ie(),Ie(),Ae(8,"div",7),it(9,ule,2,0,"p",8),Ae(10,"div",9),Ae(11,"table",10),Ae(12,"thead"),Ae(13,"tr"),it(14,cle,1,0,"th",11),Ie(),Ie(),Ae(15,"tbody",12),Zr(16,13),it(17,dle,10,12,"td",14),it(18,fle,1,0,"td",15),$r(),Zr(19,16),it(20,ple,5,2,"td",17),it(21,mle,1,0,"td",15),$r(),it(22,gle,1,1,"tr",18),Ie(),Ie(),Ie(),Ie(),Ie()),2&e&&(ct(9),Ct("ngIf",0===r.filteredTokens.length),ct(2),Ct("dataSource",r.filteredTokens),ct(11),Ct("matRowDefColumns",sf(3,yle)))},directives:[La,cv,lv,Hb,Vb,xV,hv,dv,dh,EV,pv],styles:[""]}));const ble=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function vle(n,t){if(1&n&&(Zr(0),Ae(1,"div",17),Gn(2,"img",18),Ie(),Ae(3,"h2",19),kt(4),Ie(),$r()),2&n){const e=an(3);ct(2),qu("src",e.token.iconPath,Pi),_l("alt","",e.token.symbol," Icon"),Ct("ngClass",vc(4,ble,e.token.symbol.includes("PYT"),e.token.symbol.includes("NYT"))),ct(2),Pr(" ",e.token.symbol," ")}}function _le(n,t){1&n&&(Ae(0,"h2",19),kt(1,"Select Token"),Ie())}function wle(n,t){1&n&&Gn(0,"span",20)}function xle(n,t){1&n&&(Ae(0,"small",21),kt(1," \xa0 "),Ie())}function Ele(n,t){if(1&n&&(Ae(0,"small",22),kt(1),Ie()),2&n){const e=an(3);ct(1),Pr(" $",e.amount.times(e.token.price).toFormat(2)," ")}}function Tle(n,t){1&n&&(Zr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),$r())}function Ale(n,t){if(1&n){const e=Di();Ae(0,"small",25),dr("click",function(){Ur(e);const s=an(4);return s.setAmount(s.token.userBalance)}),kt(1," Max "),Ie()}}function Ile(n,t){if(1&n&&(Zr(0),Ae(1,"small",23),kt(2),Ie(),it(3,Ale,2,0,"small",24),$r()),2&n){const e=an(3);ct(2),Pr("Balance: ",e.token.userBalance.toFormat(4),""),ct(1),Ct("ngIf",e.token.userBalance.gt(0))}}function Sle(n,t){if(1&n&&(Ae(0,"div",26),Ae(1,"small",27),kt(2),Ie(),Ie()),2&n){const e=an(3);ct(2),bc(e.errorMessage())}}const kle=function(n){return{clickable:n}};function Cle(n,t){if(1&n){const e=Di();Zr(0),Ae(1,"div",5),Ae(2,"div",6),Ae(3,"input",7),dr("input",function(s){return Ur(e),an(2).setAmount(s.target.value)}),Ie(),Ie(),Ae(4,"div",8),dr("click",function(){return Ur(e),an(2).openTokenSelectModal()}),it(5,vle,5,7,"ng-container",4),it(6,_le,2,0,"h2",9),it(7,wle,1,0,"span",10),Ie(),Ie(),Ae(8,"div",11),Ae(9,"div",12),it(10,xle,2,0,"small",13),it(11,Ele,2,1,"small",14),Ie(),Ae(12,"div",15),it(13,Tle,3,0,"ng-container",4),it(14,Ile,4,2,"ng-container",4),Ie(),Ie(),it(15,Sle,3,1,"div",16),$r()}if(2&n){const e=an(2);ct(3),Ct("value",null==e.amount?null:e.amount.toFixed()),ct(1),Ct("ngClass",Ic(10,kle,!e.disableSelect)),ct(1),Ct("ngIf",e.token),ct(1),Ct("ngIf",!e.token),ct(1),Ct("ngIf",!e.disableSelect),ct(3),Ct("ngIf",!(e.amount&&e.token&&e.amount.gt(0)&&e.token.price.gt(0))),ct(1),Ct("ngIf",e.amount&&e.token&&e.amount.gt(0)&&e.token.price.gt(0)),ct(2),Ct("ngIf",!e.wallet.connected||!e.token),ct(1),Ct("ngIf",e.wallet.connected&&e.token),ct(1),Ct("ngIf",e.error())}}function Mle(n,t){1&n&&(Zr(0),Ae(1,"div",28),Gn(2,"h1",29),Ie(),Ae(3,"small",28),kt(4," The market price is outside the specified range. Single-asset deposit only. "),Ie(),$r())}const Ole=function(n){return{"border border-danger":n}};function Dle(n,t){if(1&n&&(Ae(0,"div",2),Ae(1,"div",3),it(2,Cle,16,12,"ng-container",4),it(3,Mle,5,0,"ng-container",4),Ie(),Ie()),2&n){const e=an();Ct("ngClass",Ic(3,Ole,e.error())),ct(2),Ct("ngIf",!e.rangeError),ct(1),Ct("ngIf",e.rangeError)}}function Ple(n,t){1&n&&(Ae(0,"div",12),Ae(1,"h1",30),Gn(2,"span",31),Ie(),Ie())}const qA=class{constructor(t,e){yt(this,"modalService"),yt(this,"wallet"),yt(this,"token"),yt(this,"amount",new sn.Z(0)),yt(this,"allowedTokens"),yt(this,"restrictedToken"),yt(this,"disableSelect"),yt(this,"rangeError"),yt(this,"tokenChange",new mo),yt(this,"amountChange",new mo),this.modalService=t,this.wallet=e}ngOnInit(){}error(){return this.token&&this.amount.gt(this.token.userBalance)}errorMessage(){return this.token&&this.amount.gt(this.token.userBalance)?"Amount exceeds wallet balance":null}setAmount(t){this.amount=new sn.Z(t),this.amount.isNaN()&&(this.amount=new sn.Z(0)),this.amountChange.emit(this.amount)}openTokenSelectModal(){if(!this.disableSelect){const t=this.modalService.open(uw,{windowClass:"windowed",centered:!0,size:"md"});t.componentInstance.tokenA=this.token,t.componentInstance.tokenB=this.restrictedToken,t.componentInstance.allowedTokens=this.allowedTokens,t.componentInstance.selectTokenEvent.subscribe(e=>{this.token=e,this.tokenChange.emit(this.token)})}}};let cw=qA;function Rle(n,t){1&n&&(Ae(0,"small",16),kt(1," \xa0 "),Ie())}function Nle(n,t){if(1&n&&(Ae(0,"small",17),kt(1),Ie()),2&n){const e=an(2);ct(1),Pr(" $",e.amount.times(e.token.price).toFormat(2)," ")}}function Ble(n,t){1&n&&(Zr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),$r())}function Fle(n,t){if(1&n&&(Zr(0),Ae(1,"small",18),kt(2),Ie(),$r()),2&n){const e=an(2);ct(2),Pr("Balance: ",e.token.userBalance.toFormat(4),"")}}yt(cw,"\u0275fac",function(e){return new(e||qA)(Xt(Nf),Xt(Xa))}),yt(cw,"\u0275cmp",bn({type:qA,selectors:[["app-token-select-input-panel"]],inputs:{token:"token",amount:"amount",allowedTokens:"allowedTokens",restrictedToken:"restrictedToken",disableSelect:"disableSelect",rangeError:"rangeError"},outputs:{tokenChange:"tokenChange",amountChange:"amountChange"},decls:2,vars:2,consts:[["class","card card-inner-shadow mb-0",3,"ngClass",4,"ngIf"],["class","",4,"ngIf"],[1,"card","card-inner-shadow","mb-0",3,"ngClass"],[1,"card-body","p-3"],[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"col","me-4"],["type","text","name","poolTokenAmount","id","poolTokenAmount","aria-describedby","helpId","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-lg","text-start","p-0","text-truncate","w-100",3,"value","input"],[1,"col-auto","d-flex","align-items-center","justify-content-between","bg-gray-200","rounded-1","p-2",3,"ngClass","click"],["class","mx-2 my-0 fw-normal",4,"ngIf"],["class","m-0 fw-bold fe fe-chevron-down",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between"],[1,""],["class","col-auto",4,"ngIf"],["class","col-auto text-white",4,"ngIf"],[1,"col","d-flex","align-items-center","justify-content-end"],["class","d-flex align-items-center justify-content-start",4,"ngIf"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","position-absolute",3,"src","alt","ngClass"],[1,"mx-2","my-0","fw-normal"],[1,"m-0","fw-bold","fe","fe-chevron-down"],[1,"col-auto"],[1,"col-auto","text-white"],[1,"text-white"],["class","bg-white rounded-pill ms-2 px-2 text-dark fw-bold clickable",3,"click",4,"ngIf"],[1,"bg-white","rounded-pill","ms-2","px-2","text-dark","fw-bold","clickable",3,"click"],[1,"d-flex","align-items-center","justify-content-start"],[1,"text-danger"],[1,"d-flex","align-items-center","justify-content-center"],[1,"fe","fe-lock","mb-2"],[1,"placeholder-wave","py-0","m-0",2,"height","90.5px"],[1,"placeholder","w-100","h-100","placeholder-lg","border","rounded-1","text-transparent","bg-gray-400","rounded-1"]],template:function(e,r){1&e&&(it(0,Dle,4,5,"div",0),it(1,Ple,3,0,"div",1)),2&e&&(Ct("ngIf",!r.disableSelect||r.token),ct(1),Ct("ngIf",r.disableSelect&&!r.token))},directives:[La,dh],styles:[""]}));const Lle=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function Ule(n,t){if(1&n&&(Ae(0,"div",2),Ae(1,"div",3),Ae(2,"div",4),Ae(3,"div",5),kt(4),Ie(),Ae(5,"div",6),Ae(6,"div",7),Gn(7,"img",8),Ie(),Ae(8,"h2",9),kt(9),Ie(),Ie(),Ie(),Ae(10,"div",10),Ae(11,"div",11),it(12,Rle,2,0,"small",12),it(13,Nle,2,1,"small",13),Ie(),Ae(14,"div",14),it(15,Ble,3,0,"ng-container",15),it(16,Fle,3,1,"ng-container",15),Ie(),Ie(),Ie(),Ie()),2&n){const e=an();ct(4),Pr(" ",e.amount?e.amount.dp(e.token.decimals).toPrecision():0," "),ct(3),qu("src",e.token.iconPath,Pi),_l("alt","",e.token.symbol," Icon"),Ct("ngClass",vc(9,Lle,e.token.symbol.includes("PYT"),e.token.symbol.includes("NYT"))),ct(2),Pr(" ",e.token.symbol," "),ct(3),Ct("ngIf",!e.amount||!e.amount.gt(0)||!e.token.price.gt(0)),ct(1),Ct("ngIf",e.amount&&e.amount.gt(0)&&e.token.price.gt(0)),ct(2),Ct("ngIf",!e.wallet.connected),ct(1),Ct("ngIf",e.wallet.connected)}}function jle(n,t){1&n&&(Ae(0,"div",11),Ae(1,"h1",19),Gn(2,"span",20),Ie(),Ie())}const KA=class{constructor(t){yt(this,"wallet"),yt(this,"token"),yt(this,"amount"),this.wallet=t}ngOnInit(){}};let o2=KA;function Vle(n,t){if(1&n){const e=Di();Ae(0,"button",2),dr("click",function(){return Ur(e),an().approve()}),kt(1),Ie()}if(2&n){const e=an();Ct("disabled",!e.canApprove()),ct(1),Pr(" Approve ",e.token.symbol," ")}}function Hle(n,t){if(1&n&&(Ae(0,"button",3),kt(1),Ie()),2&n){const e=an();Ct("disabled",!0),ct(1),Pr(" ",e.token.symbol," Approved ")}}yt(o2,"\u0275fac",function(e){return new(e||KA)(Xt(Xa))}),yt(o2,"\u0275cmp",bn({type:KA,selectors:[["app-token-output-panel"]],inputs:{token:"token",amount:"amount"},decls:2,vars:2,consts:[["class","card card-inner-shadow",4,"ngIf"],["class","",4,"ngIf"],[1,"card","card-inner-shadow"],[1,"card-body","p-3"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"col","me-4","form-control","form-control-flush","form-control-lg","p-0","text-truncate"],[1,"col-auto","d-flex","align-items-center","justify-content-between","bg-gray-200","rounded-1","p-2"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","position-absolute",3,"src","alt","ngClass"],[1,"mx-2","my-0","fw-normal"],[1,"d-flex","align-items-center","justify-content-between"],[1,""],["class","col-auto",4,"ngIf"],["class","col-auto text-white",4,"ngIf"],[1,"col","d-flex","align-items-center","justify-content-end","me-1"],[4,"ngIf"],[1,"col-auto"],[1,"col-auto","text-white"],[1,"text-white"],[1,"placeholder-wave","py-0","m-0",2,"height","90.5px"],[1,"placeholder","w-100","h-100","placeholder-lg","border","rounded-1","text-transparent","bg-gray-400","rounded-1"]],template:function(e,r){1&e&&(it(0,Ule,17,12,"div",0),it(1,jle,3,0,"div",1)),2&e&&(Ct("ngIf",r.token),ct(1),Ct("ngIf",!r.token))},directives:[La,dh],styles:[""]}));const ZA=class{constructor(t,e,r,s,p,F,z){yt(this,"allowance_service"),yt(this,"approval_service"),yt(this,"contract_service"),yt(this,"permit_service"),yt(this,"store_service"),yt(this,"util_service"),yt(this,"wallet_service"),yt(this,"token"),yt(this,"amount"),yt(this,"spender"),yt(this,"deadline"),yt(this,"signature"),yt(this,"spenderAllowance"),yt(this,"allowanceChange",new mo),yt(this,"signatureChange",new mo),this.allowance_service=t,this.approval_service=e,this.contract_service=r,this.permit_service=s,this.store_service=p,this.util_service=F,this.wallet_service=z}ngOnInit(){}approve(){const t=Math.floor(Date.now()/1e3)+this.deadline;this.permit_service.permit(this.token,this.spender,this.amount,t).then(e=>{this.signature=e,this.signatureChange.emit(this.signature)}).catch(e=>{if(4001===e.code)return void this.wallet_service.openErrorModal(e);const s=this.contract_service.getERC20(this.token.address,this.wallet_service.web3);this.wallet_service.approveToken(s,this.spender,this.amount.times(this.token.precision),()=>{},()=>{},p=>{if(this.wallet_service.usingGnosisSafe)this.token.userAllowances[this.spender]=this.amount,this.allowanceChange.emit(this.amount);else{const F=p.events.Approval,z=F&&new sn.Z(F.returnValues[2]).div(this.token.precision);z&&(this.token.userAllowances[this.spender]=z),z&&this.allowanceChange.emit(z)}},()=>{}).catch(p=>{console.error(p),this.wallet_service.openErrorModal(p)})})}approved(){return this.approval_service.isTokenApproved(this.amount,this.spenderAllowance)||this.approval_service.isTokenPermitted(this.signature,this.token,this.spender,this.amount)}canApprove(){return this.approval_service.canApprove(this.amount,this.token.userBalance)&&!this.approved()}};let Py=ZA;yt(Py,"\u0275fac",function(e){return new(e||ZA)(Xt(M5),Xt(jg),Xt(ud),Xt(o8),Xt(el),Xt($c),Xt(Xa))}),yt(Py,"\u0275cmp",bn({type:ZA,selectors:[["app-token-approval-button"]],inputs:{token:"token",amount:"amount",spender:"spender",deadline:"deadline",signature:"signature",spenderAllowance:"spenderAllowance"},outputs:{allowanceChange:"allowanceChange",signatureChange:"signatureChange"},decls:3,vars:2,consts:[["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-lg btn-success fw-bold text-truncate w-100",3,"disabled",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-success","fw-bold","text-truncate","w-100",3,"disabled"]],template:function(e,r){1&e&&(Zr(0),it(1,Vle,2,2,"button",0),it(2,Hle,2,2,"button",1),$r()),2&e&&(ct(1),Ct("ngIf",!r.approved()),ct(1),Ct("ngIf",r.approved()))},directives:[La],styles:[""]}));const $le=function(n,t,e,r,s){return[n,t,e,r,s]};function Wle(n,t){if(1&n){const e=Di();Zr(0),Ae(1,"div",6),Ae(2,"app-token-select-input-panel",7),dr("amountChange",function(s){const F=Ur(e).index;return an().setAmount(s,F)})("tokenChange",function(s){const F=Ur(e).index;return an().selectToken(s,F)}),Ie(),Ie(),$r()}if(2&n){const e=t.$implicit,r=an();ct(1),Ct("ngClass",r.tokens[0].amount.gt(0)&&r.approved()?"mb-2":"mb-3"),ct(1),Ct("token",e)("amount",e.amount)("allowedTokens",function(n,t,e,r,s,p,F,z){const te=oa()+n,fe=Ki(),Re=Ch(fe,te,e,r,s,p);return gf(fe,te+4,F)||Re?D0(fe,te+5,z?t.call(z,e,r,s,p,F):t(e,r,s,p,F)):mm(fe,te+5)}(4,$le,r.pool.token0,r.pool.token1,r.pool.token0===r.store.getWrappedNative(r.pool.chainId)&&r.store.getNative(r.pool.chainId),r.pool.token1===r.store.getWrappedNative(r.pool.chainId)&&r.store.getNative(r.pool.chainId),!!r.vault&&r.vault.underlying))}}function Gle(n,t){if(1&n&&(Zr(0),Ae(1,"div",8),Gn(2,"h3",9),Ie(),Ae(3,"div",10),Gn(4,"app-token-output-panel",11),Ie(),$r()),2&n){const e=an();ct(4),Ct("token",e.bunniToken)("amount",e.gaugeAmount)}}function zle(n,t){if(1&n&&(Ae(0,"div",12),Ae(1,"small",13),kt(2," Price impact warning "),Ie(),Ae(3,"small",14),kt(4),Ie(),Ie()),2&n){const e=an();ct(4),Pr(" ",e.getPriceImpact().toFixed(2),"% ")}}function qle(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",19),dr("allowanceChange",function(s){return Ur(e),an(2).setAllowanceOrSignature(s,null)})("signatureChange",function(s){return Ur(e),an(2).setAllowanceOrSignature(null,s)}),Ie()}if(2&n){const e=an(2);Ct("token",e.tokens[0])("amount",e.tokens[0].amount)("spender",e.spender)("deadline",e.deadline)("signature",e.tokens[0].signature)("spenderAllowance",e.tokens[0].userAllowances[e.spender])}}function Kle(n,t){1&n&&Gn(0,"div",22)}function Zle(n,t){if(1&n){const e=Di();Ae(0,"button",20),dr("click",function(){return Ur(e),an(2).zapIn(!1,!1,!1)}),it(1,Kle,1,0,"div",21),kt(2),Ie()}if(2&n){const e=an(2);Ct("disabled",!e.canZap()),ct(1),Ct("ngIf",e.loading),ct(1),Pr(" ",e.message()," ")}}function Yle(n,t){if(1&n){const e=Di();Ae(0,"button",23),dr("click",function(){return Ur(e),an(2).zapIn(!1,!1,!0)}),kt(1," Zap In & Stake "),Ie()}2&n&&Ct("disabled",!an(2).canZap())}function Jle(n,t){if(1&n&&(Zr(0),it(1,qle,1,6,"app-token-approval-button",15),Ae(2,"div",16),it(3,Zle,3,3,"button",17),it(4,Yle,2,1,"button",18),Ie(),$r()),2&n){const e=an();ct(1),Ct("ngIf",e.canApprove()&&!e.approved()),ct(2),Ct("ngIf",!e.canApprove()||e.approved()),ct(1),Ct("ngIf",e.canZap()&&e.bunniToken.gauge&&(!e.canApprove()||e.approved()))}}function Xle(n,t){if(1&n){const e=Di();Ae(0,"button",24),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}const YA=class{constructor(t,e,r,s,p,F,z,te,fe,Re,$e,rt){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"compound"),yt(this,"contract"),yt(this,"permit"),yt(this,"store"),yt(this,"swap"),yt(this,"timeless"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),yt(this,"pool"),yt(this,"token0"),yt(this,"token1"),yt(this,"slippage"),yt(this,"deadline"),yt(this,"bunniToken"),yt(this,"zap"),yt(this,"tokens",[]),yt(this,"vault"),yt(this,"spender"),yt(this,"position"),yt(this,"gaugeAmount"),yt(this,"timeout"),yt(this,"loading"),this.modalService=t,this.approval=e,this.chain=r,this.compound=s,this.contract=p,this.permit=F,this.store=z,this.swap=te,this.timeless=fe,this.token=Re,this.util=$e,this.wallet=rt}ngOnInit(){this.reset(!0,!0)}ngOnChanges(t){t.bunniToken&&!t.bunniToken.firstChange&&this.reset(!0,!0)}reset(t,e){t&&this.tokens&&this.tokens.forEach(r=>r.signature=null),e&&(this.setVault(this.token0,this.token1),this.spender=fp[this.wallet.chainId],this.gaugeAmount=new sn.Z(0),this.tokens[0]=this.vault?Object.assign(new yD,this.vault.underlying,{amount:new sn.Z(0),signature:null}):Object.assign(new yD,this.pool.token0))}selectToken(t,e){this.tokens[e]=Object.assign(new yD,t),this.gaugeAmount=new sn.Z(0)}isToken0(t){return t&&t.address===this.pool.token0.address}isToken1(t){return t&&t.address===this.pool.token1.address}isUnderlying(t){return t&&this.vault&&t.address===this.vault.underlying.address}isXpyt(t){return t&&this.vault&&!!this.vault.xpyt.find(e=>e.address===t.address)}setVault(t,e){const r=this.timeless.get(t.address,t.chainId),s=this.timeless.get(e.address,e.chainId);this.vault=r&&s&&r.nyt===s.nyt?r:null}setAmount(t,e){this.tokens[e].amount=t,this.loading=!0,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.gaugeAmount=new sn.Z(0),this.getOutputAmount().then(r=>this.gaugeAmount=r)},500)}setAllowanceOrSignature(t,e){t&&(this.tokens[0].userAllowances[this.spender]=t),e&&(this.tokens[0].signature=e),this.getOutputAmount().then(r=>this.gaugeAmount=r)}getPosition(t,e,r,s,p){const F=r||this.pool.tick,z=this.bunniToken.tickLower,te=this.bunniToken.tickUpper;let fe=null;const Re=ba.getSqrtRatioAtTick(z),$e=ba.getSqrtRatioAtTick(te),rt=er().BigInt(p?p.toNumber():this.pool.liquidity.toNumber()),ft=this.pool.fee,Tt=new zd(this.wallet.chainId,this.pool.token0.address,this.pool.token0.decimals),Ft=new zd(this.wallet.chainId,this.pool.token1.address,this.pool.token1.decimals);let Qt=null;try{fe=er().BigInt(s?s.toNumber():this.pool.sqrtPriceX96.toNumber()),Qt=new Ug(Tt,Ft,ft,fe,rt,F)}catch{fe=ba.getSqrtRatioAtTick(F),Qt=new Ug(Tt,Ft,ft,fe,rt,F)}const wn=Math.pow(2,256)-1,_r=ZO(fe,Re,$e,this.util.processWeb3Number(t?t.times(this.token0.precision):wn),this.util.processWeb3Number(e?e.times(this.token1.precision):wn),!0);return new eT({pool:Qt,liquidity:_r,tickLower:z,tickUpper:te})}binarySearch(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){let Re,te=0,$e=0;for(;te<10;){const ft=$e+1e3-Date.now();ft>0&&(yield new Promise(Ft=>setTimeout(Ft,ft)));const Tt=yield F.swap.quote_0x(F.isToken0(t)?F.pool.token0:F.pool.token1,F.isToken0(t)?F.pool.token1:F.pool.token0,e,F.slippage,F.wallet.chainId);if($e=Date.now(),!Tt.uniswapV3Route){Re=[Tt,F.pool.tick,F.pool.sqrtPriceX96,F.pool.liquidity];break}{F.zap={amount0:null,amount1:null,minAmount0:null,minAmount1:null,tokenIn:F.isToken0(t)?F.pool.token0:F.pool.token1,tokenOut:F.isToken0(t)?F.pool.token1:F.pool.token0,tokenAmountIn:Tt.tokenAmountIn,minAmountOut:Tt.minAmountOut,uniswapV3Route:Tt.uniswapV3Route,swapData:Tt.data};const Ft=yield F.zapIn(!0);if(e.eq(s)||e.eq(p)){Re=[Tt,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity];break}const Qt=F.getPosition(F.isToken0(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,F.isToken1(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity),wn=new sn.Z(F.isToken0(t)?Qt.mintAmounts.amount1.toString():Qt.mintAmounts.amount0.toString()).div(F.isToken0(t)?F.pool.token1.precision:F.pool.token0.precision);if(Ft.swapAmountOut.minus(wn).abs().lt(.001)){Re=[Tt,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity];break}Ft.swapAmountOut.lt(wn)?s=e:Ft.swapAmountOut.gt(wn)&&(p=e),e=s.plus(p).div(2).dp(F.tokens[0].decimals,sn.Z.ROUND_DOWN),Re=[Tt,Ft.tick,Ft.sqrtPriceX96,Ft.liquidity]}te++}return Re})()}sgdWithMomentum(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){let ft,$e=new sn.Z(0),rt=0,Tt=0;for(;rt<20;){const Qt=Tt+1e3-Date.now();Qt>0&&(yield new Promise(An=>setTimeout(An,Qt)));const wn=yield F.swap.quote_0x(F.isToken0(t)?F.pool.token0:F.pool.token1,F.isToken0(t)?F.pool.token1:F.pool.token0,e,F.slippage,F.wallet.chainId);if(Tt=Date.now(),!wn.uniswapV3Route){ft=[wn,F.pool.tick,F.pool.sqrtPriceX96,F.pool.liquidity];break}{F.zap={amount0:null,amount1:null,minAmount0:null,minAmount1:null,tokenIn:F.isToken0(t)?F.pool.token0:F.pool.token1,tokenOut:F.isToken0(t)?F.pool.token1:F.pool.token0,tokenAmountIn:wn.tokenAmountIn,minAmountOut:wn.minAmountOut,uniswapV3Route:wn.uniswapV3Route,swapData:wn.data};const An=yield F.zapIn(!0),gr=F.getPosition(F.isToken0(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,F.isToken1(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,An.tick,An.sqrtPriceX96,An.liquidity),_r=new sn.Z(F.isToken0(t)?gr.mintAmounts.amount1.toString():gr.mintAmounts.amount0.toString()).div(F.isToken0(t)?F.pool.token1.precision:F.pool.token0.precision),pr=An.swapAmountOut.minus(_r);if(pr.abs().div(_r.isZero()?1:_r).lt(.001)){ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity];break}$e=$e.times(.5).minus(pr.times(.03)),(e=e.plus($e)).lt(s)?e=s:e.gt(p)&&(e=p),ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity]}rt++}return ft})()}adagradOptimizer(t,e,r,s,p){var F=this;return(0,Br.Z)(function*(){let ft,$e=new sn.Z(0),rt=0,Tt=0;for(;rt<20;){const Qt=Tt+1e3-Date.now();Qt>0&&(yield new Promise(An=>setTimeout(An,Qt)));const wn=yield F.swap.quote_0x(F.isToken0(t)?F.pool.token0:F.pool.token1,F.isToken0(t)?F.pool.token1:F.pool.token0,e,F.slippage,F.wallet.chainId);if(Tt=Date.now(),!wn.uniswapV3Route){ft=[wn,F.pool.tick,F.pool.sqrtPriceX96,F.pool.liquidity];break}{F.zap={amount0:null,amount1:null,minAmount0:null,minAmount1:null,tokenIn:F.isToken0(t)?F.pool.token0:F.pool.token1,tokenOut:F.isToken0(t)?F.pool.token1:F.pool.token0,tokenAmountIn:wn.tokenAmountIn,minAmountOut:wn.minAmountOut,uniswapV3Route:wn.uniswapV3Route,swapData:wn.data};const An=yield F.zapIn(!0),gr=F.getPosition(F.isToken0(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,F.isToken1(t)?(r.gt(0)?r:F.tokens[0].amount).minus(e):null,An.tick,An.sqrtPriceX96,An.liquidity),_r=new sn.Z(F.isToken0(t)?gr.mintAmounts.amount1.toString():gr.mintAmounts.amount0.toString()).div(F.isToken0(t)?F.pool.token1.precision:F.pool.token0.precision),pr=An.swapAmountOut.minus(_r);if(pr.abs().div(_r.isZero()?1:_r).lt(.001)){ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity];break}$e=$e.plus(pr.pow(2));const ti=new sn.Z(.3).div($e.plus(1e-8).sqrt());(e=e.minus(pr.times(ti))).lt(s)?e=s:e.gt(p)&&(e=p),ft=[wn,An.tick,An.sqrtPriceX96,An.liquidity]}rt++}return ft})()}getOutputAmount(){var t=this;return(0,Br.Z)(function*(){if(t.zap=null,t.loading=!0,!t.approved()||!t.tokens.find($e=>$e.amount.gt(0)))return t.loading=!1,new sn.Z(0);let e=t.tokens[0];if(t.token.isNative(t.tokens[0])&&(e=t.store.getWrappedNative(t.pool.chainId)),t.isUnderlying(t.tokens[0])){const $e=t.getPosition(new sn.Z(1),new sn.Z(1)),rt=new sn.Z($e.mintAmounts.amount0.toString()).div(t.pool.token0.precision),ft=new sn.Z($e.mintAmounts.amount1.toString()).div(t.pool.token1.precision);e=rt.lt(ft)?t.pool.token0:t.pool.token1}const r=t.getPosition(t.isToken0(e)?new sn.Z(1):null,t.isToken1(e)?new sn.Z(1):null),s=t.util.sqrtPriceX96ToTokenPrices(t.pool.sqrtPriceX96),p=t.isToken0(e)?s[1].times(t.pool.token0.precision).div(t.pool.token1.precision).dp(t.pool.token1.decimals,sn.Z.ROUND_DOWN):s[0].times(t.pool.token1.precision).div(t.pool.token0.precision).dp(t.pool.token0.decimals,sn.Z.ROUND_DOWN),F=t.isToken0(e)?new sn.Z(r.mintAmounts.amount1.toString()).div(t.pool.token1.precision):new sn.Z(r.mintAmounts.amount0.toString()).div(t.pool.token0.precision);let z=new sn.Z(0),te=new sn.Z(0);if(t.isUnderlying(t.tokens[0])){const $e=t.vault.xpyt.find(rt=>rt.address===t.pool.token0.address||rt.address===t.pool.token1.address);z=t.isXpyt(t.isToken0(e)?t.pool.token0:t.pool.token1)?t.tokens[0].amount.times($e.conversionRate).dp(t.tokens[0].decimals,sn.Z.ROUND_DOWN):t.tokens[0].amount,te=t.isXpyt(t.isToken0(e)?t.pool.token1:t.pool.token0)?t.tokens[0].amount.times($e.conversionRate).dp(t.tokens[0].decimals,sn.Z.ROUND_DOWN):t.tokens[0].amount}const fe=F.times(z.gt(0)?z:t.tokens[0].amount).div(F.plus(p)).dp(e.decimals,sn.Z.ROUND_DOWN);if(fe.gt(0)){const[$e,rt,ft,Tt]=yield t.binarySearch(e,fe,z,fe.div(10),z.gt(0)?z:t.tokens[0].amount),Ft=t.getPosition(t.isToken0(e)?(z.gt(0)?z:t.tokens[0].amount).minus($e.tokenAmountIn):$e.minAmountOut.plus(te),t.isToken0(e)?$e.minAmountOut.plus(te):(z.gt(0)?z:t.tokens[0].amount).minus($e.tokenAmountIn),rt,ft,Tt),Qt=new Y3(t.slippage,1e4);t.zap={amount0:t.isToken0(e)?(z.gt(0)?z:t.tokens[0].amount).minus($e.tokenAmountIn):$e.tokenAmountOut.plus(te).dp(t.pool.token0.decimals,sn.Z.ROUND_DOWN),amount1:t.isToken0(e)?$e.tokenAmountOut.plus(te).dp(t.pool.token1.decimals,sn.Z.ROUND_DOWN):(z.gt(0)?z:t.tokens[0].amount).minus($e.tokenAmountIn),minAmount0:new sn.Z(Ft.mintAmountsWithSlippage(Qt).amount0.toString()).div(t.pool.token0.precision),minAmount1:new sn.Z(Ft.mintAmountsWithSlippage(Qt).amount1.toString()).div(t.pool.token1.precision),tokenIn:t.isToken0(e)?t.pool.token0:t.pool.token1,tokenOut:t.isToken0(e)?t.pool.token1:t.pool.token0,tokenAmountIn:$e.tokenAmountIn,minAmountOut:$e.minAmountOut,uniswapV3Route:$e.uniswapV3Route,swapData:$e.data}}else{const $e=t.getPosition(t.isToken0(e)?z.gt(0)?z:t.tokens[0].amount:null,t.isToken1(e)?z.gt(0)?z:t.tokens[0].amount:null),rt=new Y3(t.slippage,1e4),ft=new sn.Z($e.mintAmountsWithSlippage(rt).amount0.toString()).div(t.pool.token0.precision),Tt=new sn.Z($e.mintAmountsWithSlippage(rt).amount1.toString()).div(t.pool.token1.precision);t.zap={amount0:t.isToken0(e)?z.gt(0)?z:t.tokens[0].amount:new sn.Z(0),amount1:t.isToken1(e)?z.gt(0)?z:t.tokens[0].amount:new sn.Z(0),minAmount0:t.isToken0(e)?ft:new sn.Z(0),minAmount1:t.isToken1(e)?Tt:new sn.Z(0),tokenIn:null,tokenOut:null,tokenAmountIn:new sn.Z(0),minAmountOut:new sn.Z(0),uniswapV3Route:!1,swapData:null}}const Re=yield t.zapIn(!1,!0);return t.loading=!1,Re.outputAmount})()}message(){return this.tokens[0].amount.eq(0)?"Enter an Amount":this.tokens[0].amount.gt(this.tokens[0].userBalance)?`Insufficient ${this.tokens[0].symbol} Balance`:this.loading?"Optimizing Your Zap...":"Zap In"}approved(){const t=this.tokens[0],e=t.amount,r=t.userAllowances[this.spender],s=t.signature;return this.token.isNative(t)||this.approval.isTokenApproved(e,r)||this.approval.isTokenPermitted(s,t,this.spender,e)}canApprove(){return this.tokens[0].amount.gt(0)&&this.tokens[0].userBalance.gte(this.tokens[0].amount)}canZap(){return this.canApprove()&&this.approved()&&this.zap&&!this.loading&&this.gaugeAmount.gt(0)}zapIn(t=!1,e=!1,r=!1){var s=this;return(0,Br.Z)(function*(){let p=[];const F=s.wallet.web3,z=s.contract.getLpZapIn(F,s.wallet.chainId);if(s.permit.isSignatureValid(s.tokens[0].signature,s.tokens[0],fp[s.wallet.chainId],s.tokens[0].amount)){const te=z.methods.selfPermitIfNecessary(s.tokens[0].signature.tokenAddress,s.tokens[0].signature.amount,s.tokens[0].signature.deadline,s.tokens[0].signature.v,s.tokens[0].signature.r,s.tokens[0].signature.s);p=[...p,te.encodeABI()]}if(s.token.isNative(s.tokens[0])){const te=z.methods.wrapEthInput();p=[...p,te.encodeABI()]}if(s.isUnderlying(s.tokens[0])){const te=z.methods.enterWithUnderlying(s.vault.gate,fp[s.wallet.chainId],fp[s.wallet.chainId],s.vault.share.address,s.isXpyt(s.token0)?s.token0.address:s.isXpyt(s.token1)?s.token1.address:Oy,s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)),!1);p=[...p,te.encodeABI()]}if(s.zap.swapData){const te=z.methods.doZeroExSwap(s.zap.tokenIn.address,s.util.processWeb3Number(s.zap.tokenAmountIn.times(s.zap.tokenIn.precision)),s.zap.tokenOut.address,s.util.processWeb3Number(s.zap.minAmountOut.times(s.zap.tokenOut.precision)),fp[s.wallet.chainId],s.token.isNative(s.tokens[0])||s.isUnderlying(s.tokens[0])?fp[s.wallet.chainId]:s.wallet.user,!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])),Math.floor(Date.now()/1e3)+s.deadline,s.zap.swapData);p=[...p,te.encodeABI()]}if(t){const te=z.methods.uniswapV3PoolState(s.pool.address);p=[...p,te.encodeABI()];const fe=yield z.methods.multicall(p).call({from:s.wallet.user,value:s.token.isNative(s.tokens[0])?+s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)):0}),Re=F.eth.abi.decodeParameters(["uint256"],fe[p.length-2]),$e=F.eth.abi.decodeParameters(["uint160","int24","uint128"],fe[p.length-1]);return{swapAmountOut:new sn.Z(Re[0]).div(s.zap.tokenOut.precision),sqrtPriceX96:new sn.Z($e[0]),tick:parseInt($e[1]),liquidity:new sn.Z($e[2])}}{const fe={key:{pool:s.pool.address,tickLower:s.bunniToken.tickLower,tickUpper:s.bunniToken.tickUpper},amount0Desired:s.util.processWeb3Number(s.zap.amount0.times(s.pool.token0.precision)),amount1Desired:s.util.processWeb3Number(s.zap.amount1.times(s.pool.token1.precision)),amount0Min:s.util.processWeb3Number(s.zap.minAmount0.times(s.pool.token0.precision)),amount1Min:s.util.processWeb3Number(s.zap.minAmount1.times(s.pool.token1.precision)),deadline:Math.floor(Date.now()/1e3)+s.deadline,recipient:s.wallet.user},Re=r?z.methods.zapIn(fe,s.bunniToken.gauge.address,s.pool.token0.address,s.pool.token1.address,s.wallet.user,e?"0":s.util.processWeb3Number(s.gaugeAmount.times(1e18).times(.99)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken0(s.zap.tokenOut)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken1(s.zap.tokenOut)),yield s.compound.shouldCompound(s.pool,s.bunniToken,new sn.Z(0))):z.methods.zapInNoStake(fe,s.pool.token0.address,s.pool.token1.address,s.wallet.user,e?"0":s.util.processWeb3Number(s.gaugeAmount.times(1e18).times(.99)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken0(s.zap.tokenOut)),!(!s.token.isNative(s.tokens[0])&&!s.isUnderlying(s.tokens[0])&&!s.isToken1(s.zap.tokenOut)),yield s.compound.shouldCompound(s.pool,s.bunniToken,new sn.Z(0)));if(p=[...p,Re.encodeABI()],e){const rt=yield z.methods.multicall(p).call({from:s.wallet.user,value:s.token.isNative(s.tokens[0])?+s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)):0}).catch(ft=>{s.wallet.openErrorModal(ft),console.error(ft)});return{outputAmount:rt?new sn.Z(F.eth.abi.decodeParameters(["uint256","uint128","uint256","uint256"],rt[p.length-1])[0]).div(1e18):new sn.Z(0)}}const $e=z.methods.multicall(p);s.wallet.sendTx($e,()=>{},()=>{},rt=>{let[ft,Tt]=[[],[]];ft.push("userBalance")&&Tt.push(s.tokens[0].userBalance.minus(s.tokens[0].amount)),s.store.updateToken(s.tokens[0].id,ft,Tt,!0),s.zap=null,s.position=null,s.gaugeAmount=new sn.Z(0),s.tokens.forEach(Ft=>{Ft.amount=new sn.Z(0),Ft.signature=null});try{const Ft=F.eth.abi.encodeEventSignature(s.contract.getABI("BunniHub").find(Yi=>"Deposit"===Yi.name&&"event"===Yi.type)),Qt=Ft&&Object.values(rt.events).find(Yi=>Yi.raw.topics[0]===Ft),wn=Qt&&F.eth.abi.decodeParameters(["uint128","uint256","uint256","uint256"],Qt.raw.data),An=s.contract.getABI(s.chain.isL1(s.wallet.chainId)?"LiquidityGauge":"ChildGauge"),gr=F.eth.abi.encodeEventSignature(An.find(Yi=>"UpdateLiquidityLimit"===Yi.name&&"event"===Yi.type)),_r=Object.values(rt.events).find(Yi=>Yi.raw.topics[0]===gr),pr=_r&&F.eth.abi.decodeParameters(["uint256"],_r.raw.data),ti=new sn.Z(wn[0]),qr=new sn.Z(wn[1]).div(s.token0.precision),yi=new sn.Z(wn[2]).div(s.token1.precision),as=new sn.Z(wn[3]).div(s.bunniToken.precision),Li=new sn.Z(pr[3]).div(s.bunniToken.gauge.precision),vs=new sn.Z(pr[4]).div(s.bunniToken.gauge.precision);[ft,Tt]=[[],[]],ft.push("totalSupply")&&Tt.push(s.bunniToken.totalSupply.plus(as)),ft.push("userDeposit")&&Tt.push(s.bunniToken.userBalance.plus(as)),ft.push("liquidity")&&Tt.push(s.bunniToken.liquidity.plus(ti)),ft.push("reserve0")&&Tt.push(s.bunniToken.reserve0.plus(qr)),ft.push("reserve1")&&Tt.push(s.bunniToken.reserve1.plus(yi)),s.store.updateBunniToken(s.bunniToken.id,ft,Tt,!0),[ft,Tt]=[[],[]],ft.push("reserve0")&&Tt.push(s.pool.reserve0.plus(qr)),ft.push("reserve1")&&Tt.push(s.pool.reserve1.plus(yi)),s.store.updatePool(s.pool.id,ft,Tt,!0),[ft,Tt]=[[],[]],ft.push("totalSupply")&&Tt.push(s.bunniToken.gauge.totalSupply.plus(as)),ft.push("userBalance")&&Tt.push(s.bunniToken.gauge.userBalance.plus(as)),ft.push("workingBalance")&&Tt.push(Li),ft.push("workingSupply")&&Tt.push(vs),s.store.updateGauge(s.bunniToken.gauge.id,ft,Tt,!0)}catch(Ft){console.error(Ft)}},()=>{},s.token.isNative(s.tokens[0])?+s.util.processWeb3Number(s.tokens[0].amount.times(s.tokens[0].precision)):0).catch(rt=>{console.error(rt),s.wallet.openErrorModal(rt)})}})()}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}getPriceImpact(){const t=this.tokens[0].amount.times(this.tokens[0].price);return this.gaugeAmount.times(this.bunniToken.gauge.price).minus(t).div(t).times(100)}displayPriceImpactWarning(){const t=this.tokens[0].amount.times(this.tokens[0].price),e=this.gaugeAmount.times(this.bunniToken.gauge.price);return!(!this.zap||!e.lt(t.times(.9)))}};let lw=YA;yt(lw,"\u0275fac",function(e){return new(e||YA)(Xt(Nf),Xt(jg),Xt(dc),Xt(j5),Xt(ud),Xt(o8),Xt(el),Xt(TT),Xt(J_),Xt(uv),Xt($c),Xt(Xa))}),yt(lw,"\u0275cmp",bn({type:YA,selectors:[["app-zap-in"]],inputs:{pool:"pool",token0:"token0",token1:"token1",slippage:"slippage",deadline:"deadline",bunniToken:"bunniToken"},features:[rr],decls:7,vars:5,consts:[[1,"container","p-0"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","d-flex align-items-center justify-content-between border border-danger rounded-1 p-3 mb-3",4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],[1,"mb-2",3,"ngClass"],[3,"token","amount","allowedTokens","amountChange","tokenChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[1,"d-flex","align-items-center","justify-content-between","border","border-danger","rounded-1","p-3","mb-3"],[1,"p-0","m-0"],[1,"p-0","m-0","text-danger"],["class","d-grid mb-2",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange",4,"ngIf"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["type","button","class","btn btn-lg btn-white fw-bold w-100",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100",3,"disabled","click",4,"ngIf"],[1,"d-grid","mb-2",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange"],["type","button",1,"btn","btn-lg","btn-white","fw-bold","w-100",3,"disabled","click"],["class","spinner-border spinner-border-sm me-1","role","status",4,"ngIf"],["role","status",1,"spinner-border","spinner-border-sm","me-1"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),it(1,Wle,3,10,"ng-container",1),it(2,Gle,5,2,"ng-container",2),it(3,zle,5,1,"div",3),it(4,Jle,5,3,"ng-container",2),Ae(5,"div",4),it(6,Xle,2,0,"button",5),Ie(),Ie()),2&e&&(ct(1),Ct("ngForOf",r.tokens),ct(1),Ct("ngIf",r.tokens[0].amount.gt(0)&&r.tokens[0].userBalance.gt(0)&&r.approved()),ct(1),Ct("ngIf",!r.loading&&r.displayPriceImpactWarning()),ct(1),Ct("ngIf",r.wallet.connected),ct(2),Ct("ngIf",!r.wallet.connected))},directives:[L0,La,dh,cw,o2,Py],styles:[""]}));class yD extends T5{constructor(){super(...arguments),yt(this,"amount",new sn.Z(0)),yt(this,"signature",null)}}function Qle(n,t){1&n&&(Ae(0,"div",1),Ae(1,"div",11),Ae(2,"div",12),Gn(3,"i",13),Ae(4,"small",14),kt(5," Your position will not earn fees or be used in trades until the market price moves back into the specified range. "),Ae(6,"a",15),kt(7," Learn more. "),Ie(),Ie(),Ie(),Ie(),Ie())}function ede(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",9),Ae(2,"button",16),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.pool.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(2);ct(3),Pr(" Switch to ",e.chain.metadata[e.pool.chainId].displayName," ")}}function tde(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",23),dr("allowanceChange",function(s){Ur(e);const p=an(4);return p.token0.userAllowances[p.spender]=s})("signatureChange",function(s){return Ur(e),an(4).token0Signature=s}),Ie()}if(2&n){const e=an(4);Ct("token",e.token0)("amount",e.token0Amount)("spender",e.spender)("deadline",e.deadline)("signature",e.token0Signature)("spenderAllowance",e.token0.userAllowances[e.spender])}}function nde(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",23),dr("allowanceChange",function(s){Ur(e);const p=an(4);return p.token1.userAllowances[p.spender]=s})("signatureChange",function(s){return Ur(e),an(4).token1Signature=s}),Ie()}if(2&n){const e=an(4);Ct("token",e.token1)("amount",e.token1Amount)("spender",e.spender)("deadline",e.deadline)("signature",e.token1Signature)("spenderAllowance",e.token1.userAllowances[e.spender])}}function rde(n,t){if(1&n&&(Ae(0,"div",21),it(1,tde,1,6,"app-token-approval-button",22),it(2,nde,1,6,"app-token-approval-button",22),Ie()),2&n){const e=an(3);ct(1),Ct("ngIf",!e.approved(!0)),ct(1),Ct("ngIf",!e.approved(!1))}}function ide(n,t){if(1&n){const e=Di();Ae(0,"button",24),dr("click",function(){return Ur(e),an(3).deposit(!1)}),kt(1),Ie()}if(2&n){const e=an(3);Ct("disabled",!e.canDeposit()),ct(1),Pr(" ",e.message()," ")}}function sde(n,t){if(1&n){const e=Di();Ae(0,"button",25),dr("click",function(){return Ur(e),an(3).deposit(!0)}),kt(1," Deposit & Stake "),Ie()}}function ode(n,t){if(1&n&&(Ae(0,"div"),it(1,rde,3,2,"div",17),Ae(2,"div",18),it(3,ide,2,2,"button",19),it(4,sde,2,0,"button",20),Ie(),Ie()),2&n){const e=an(2);ct(1),Ct("ngIf",e.canApprove()),ct(2),Ct("ngIf",!e.canApprove()||e.approved(!0)&&e.approved(!1)),ct(1),Ct("ngIf",e.canDeposit()&&e.bunniToken.gauge)}}function ade(n,t){if(1&n&&(Zr(0),it(1,ede,4,1,"div",8),it(2,ode,5,3,"div",8),$r()),2&n){const e=an();ct(1),Ct("ngIf",e.pool.chainId!==e.wallet.chainId),ct(1),Ct("ngIf",e.pool.chainId===e.wallet.chainId)}}function ude(n,t){if(1&n){const e=Di();Ae(0,"button",16),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}const AV=function(n,t){return[n,t]},JA=class{constructor(t,e,r,s,p,F,z,te,fe,Re){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"compound"),yt(this,"contract"),yt(this,"permit"),yt(this,"store"),yt(this,"token"),yt(this,"util"),yt(this,"wallet"),yt(this,"pool"),yt(this,"token0"),yt(this,"token1"),yt(this,"slippage"),yt(this,"deadline"),yt(this,"bunniToken"),yt(this,"set0"),yt(this,"spender"),yt(this,"position"),yt(this,"token0Amount"),yt(this,"token0Signature"),yt(this,"token1Amount"),yt(this,"token1Signature"),yt(this,"bunniPool"),yt(this,"bunniAmount"),this.modalService=t,this.approval=e,this.chain=r,this.compound=s,this.contract=p,this.permit=F,this.store=z,this.token=te,this.util=fe,this.wallet=Re}ngOnInit(){this.resetData(!0,!0),this.spender=this.bunniToken.address!==Oy&&fp[this.wallet.chainId]?fp[this.wallet.chainId]:x5}ngOnChanges(t){t.bunniToken&&!t.bunniToken.firstChange&&(this.spender=this.bunniToken.address!==Oy&&fp[this.wallet.chainId]?fp[this.wallet.chainId]:x5,this.setAmount(this.set0?this.token0Amount:this.token1Amount,this.set0))}resetData(t,e){t&&(this.token0Signature=null,this.token1Signature=null),e&&(this.set0=!1,this.spender=null,this.token0Amount=new sn.Z(0),this.token1Amount=new sn.Z(0),this.bunniAmount=new sn.Z(0))}setToken(t,e){e?(this.token0=t,this.token0Signature=null):(this.token1=t,this.token1Signature=null)}setAmount(t,e){if(t.eq(0))return this.token0Amount=new sn.Z(0),this.token1Amount=new sn.Z(0),void(this.bunniAmount=new sn.Z(0));e?(this.token0Amount=t,this.token1Amount=this.getAmount(e),this.bunniAmount=this.getOutputAmount()):(this.token1Amount=t,this.token0Amount=this.getAmount(e),this.bunniAmount=this.getOutputAmount()),this.set0=e}getAmount(t){const e=this.pool.tick,r=this.bunniToken.tickLower,s=this.bunniToken.tickUpper;let p=null;const F=ba.getSqrtRatioAtTick(r),z=ba.getSqrtRatioAtTick(s),te=this.pool.liquidity,fe=this.pool.fee,Re=new zd(this.wallet.chainId,this.pool.token0.address,this.pool.token0.decimals),$e=new zd(this.wallet.chainId,this.pool.token1.address,this.pool.token1.decimals);let rt=null;try{p=er().BigInt(this.pool.sqrtPriceX96.toNumber()),rt=new Ug(Re,$e,fe,p,+te,e)}catch{p=ba.getSqrtRatioAtTick(e),rt=new Ug(Re,$e,fe,p,+te,e)}const ft=Math.pow(2,256)-1,Qt=ZO(p,F,z,this.util.processWeb3Number(t?this.token0Amount.times(this.pool.token0.precision):ft),this.util.processWeb3Number(t?ft:this.token1Amount.times(this.pool.token1.precision)),!0),wn=new eT({pool:rt,liquidity:Qt,tickLower:r,tickUpper:s}),An=new sn.Z(wn.mintAmounts.amount0.toString()).div(this.pool.token0.precision),gr=new sn.Z(wn.mintAmounts.amount1.toString()).div(this.pool.token1.precision);return this.position=wn,t?gr:An}getOutputAmount(){return this.bunniToken.totalSupply.eq(0)?new sn.Z(this.position.liquidity.toString()).div(1e18):this.bunniToken.totalSupply.times(this.position.liquidity.toString()).div(this.bunniToken.liquidity)}message(){return this.token0Amount.eq(0)&&this.token1Amount.eq(0)?"Enter an Amount":this.token0Amount.gt(this.token0.userBalance)?`Insufficient ${this.token0.symbol} Balance`:this.token1Amount.gt(this.token1.userBalance)?`Insufficient ${this.token1.symbol} Balance`:"Deposit"}approved(t){const e=t?this.token0:this.token1;if(this.token.isNative(e))return!0;const r=t?this.token0Amount:this.token1Amount,p=t?this.token0Signature:this.token1Signature;return this.approval.isTokenApproved(r,t?this.token0.userAllowances[this.spender]:this.token1.userAllowances[this.spender])||this.approval.isTokenPermitted(p,e,this.spender,r)}canApprove(){return(this.token0Amount.gt(0)||this.token1Amount.gt(0))&&this.token0.userBalance.gte(this.token0Amount)&&this.token1.userBalance.gte(this.token1Amount)}canDeposit(){return this.canApprove()&&this.approved(!0)&&this.approved(!1)}deposit(t){var e=this;return(0,Br.Z)(function*(){let r=[];const s=e.wallet.web3,p=e.bunniToken.address!==Oy&&fp[e.wallet.chainId]?e.contract.getLpZapIn(s,e.wallet.chainId):e.contract.getBunniHub(s),F={pool:e.bunniToken.pool.address,tickLower:e.bunniToken.tickLower,tickUpper:e.bunniToken.tickUpper};if(e.bunniToken.address===Oy){const ft=p.methods.deployBunniToken(F);r=[...r,ft.encodeABI()]}if(e.permit.isSignatureValid(e.token0Signature,e.token0,e.spender,e.token0Amount)){const ft=p.methods.selfPermitIfNecessary(e.token0Signature.tokenAddress,e.token0Signature.amount,e.token0Signature.deadline,e.token0Signature.v,e.token0Signature.r,e.token0Signature.s);r=[...r,ft.encodeABI()]}if(e.permit.isSignatureValid(e.token1Signature,e.token1,e.spender,e.token1Amount)){const ft=p.methods.selfPermitIfNecessary(e.token1Signature.tokenAddress,e.token1Signature.amount,e.token1Signature.deadline,e.token1Signature.v,e.token1Signature.r,e.token1Signature.s);r=[...r,ft.encodeABI()]}if(e.token.isNative(e.token0)||e.token.isNative(e.token1)){const ft=p.methods.wrapEthInput();r=[...r,ft.encodeABI()]}const z=new Y3(e.slippage,1e5),te=e.position.mintAmountsWithSlippage(z),fe=new sn.Z(te.amount0.toString()),Re=new sn.Z(te.amount1.toString()),$e={key:F,amount0Desired:e.util.processWeb3Number(e.token0Amount.times(e.token0.precision)),amount1Desired:e.util.processWeb3Number(e.token1Amount.times(e.token1.precision)),amount0Min:e.util.processWeb3Number(fe),amount1Min:e.util.processWeb3Number(Re),deadline:Math.floor(Date.now()/1e3)+e.deadline,recipient:e.wallet.user};if(e.bunniToken.address!==Oy&&fp[e.wallet.chainId]){const ft=yield e.compound.shouldCompound(e.pool,e.bunniToken,new sn.Z(0));if(t){const Tt=p.methods.zapIn($e,e.bunniToken.gauge.address,e.pool.token0.address,e.pool.token1.address,e.wallet.user,e.util.processWeb3Number(e.bunniAmount.times(1e18).times(.99)),e.token.isNative(e.token0),e.token.isNative(e.token1),ft);r=[...r,Tt.encodeABI()]}else{const Tt=p.methods.zapInNoStake($e,e.pool.token0.address,e.pool.token1.address,e.wallet.user,e.util.processWeb3Number(e.bunniAmount.times(1e18).times(.99)),e.token.isNative(e.token0),e.token.isNative(e.token1),ft);r=[...r,Tt.encodeABI()]}}else{const ft=p.methods.deposit($e);r=[...r,ft.encodeABI()]}let rt=0;e.token.isNative(e.token0)?rt=e.token0Amount.times(e.token0.precision).toNumber():e.token.isNative(e.token1)&&(rt=e.token1Amount.times(e.token1.precision).toNumber()),e.wallet.sendTx(p.methods.multicall(r),()=>{},()=>{},ft=>{e.position=null,e.token0Signature=null,e.token1Signature=null,e.token0Amount=new sn.Z(0),e.token1Amount=new sn.Z(0),e.bunniAmount=new sn.Z(0);try{const Tt=s.eth.abi.encodeEventSignature(e.contract.getABI("BunniHub").find(qr=>"Deposit"===qr.name&&"event"===qr.type)),Ft=Tt&&Object.values(ft.events).find(qr=>qr.raw.topics[0]===Tt),Qt=Ft&&s.eth.abi.decodeParameters(["uint128","uint256","uint256","uint256"],Ft.raw.data),wn=new sn.Z(Qt[0]),An=new sn.Z(Qt[1]).div(e.token0.precision),gr=new sn.Z(Qt[2]).div(e.token1.precision),_r=new sn.Z(Qt[3]).div(e.bunniToken.precision);let[pr,ti]=[[],[]];if(pr.push("userBalance")&&ti.push(e.token0.userBalance.minus(An)),e.store.updateToken(e.token0.id,pr,ti,!0),[pr,ti]=[[],[]],pr.push("userBalance")&&ti.push(e.token1.userBalance.minus(gr)),e.store.updateToken(e.token1.id,pr,ti,!0),[pr,ti]=[[],[]],pr.push("totalSupply")&&ti.push(e.bunniToken.totalSupply.plus(_r)),!t&&pr.push("userBalance")&&ti.push(e.bunniToken.userBalance.plus(_r)),pr.push("userDeposit")&&ti.push(e.bunniToken.userBalance.plus(_r)),pr.push("liquidity")&&ti.push(e.bunniToken.liquidity.plus(wn)),pr.push("reserve0")&&ti.push(e.bunniToken.reserve0.plus(An)),pr.push("reserve1")&&ti.push(e.bunniToken.reserve1.plus(gr)),e.store.updateBunniToken(e.bunniToken.id,pr,ti,!0),[pr,ti]=[[],[]],pr.push("reserve0")&&ti.push(e.pool.reserve0.plus(An)),pr.push("reserve1")&&ti.push(e.pool.reserve1.plus(gr)),e.store.updatePool(e.pool.id,pr,ti,!0),t){const qr=e.contract.getABI(e.chain.isL1(e.wallet.chainId)?"LiquidityGauge":"ChildGauge"),yi=s.eth.abi.encodeEventSignature(qr.find(Ts=>"UpdateLiquidityLimit"===Ts.name&&"event"===Ts.type)),as=Object.values(ft.events).find(Ts=>Ts.raw.topics[0]===yi),Li=as&&s.eth.abi.decodeParameters(["uint256"],as.raw.data),vs=new sn.Z(Li[3]).div(e.bunniToken.gauge.precision),Yi=new sn.Z(Li[4]).div(e.bunniToken.gauge.precision);let[no,Gs]=[[],[]];no.push("totalSupply")&&Gs.push(e.bunniToken.gauge.totalSupply.plus(_r)),no.push("userBalance")&&Gs.push(e.bunniToken.gauge.userBalance.plus(_r)),no.push("workingBalance")&&Gs.push(vs),no.push("workingSupply")&&Gs.push(Yi),e.store.updateGauge(e.bunniToken.gauge.id,no,Gs,!0)}}catch(Tt){console.error(Tt),e.wallet.openErrorModal(Tt)}},()=>{},rt).catch(ft=>{console.error(ft),e.wallet.openErrorModal(ft)})})()}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let V5=JA;function cde(n,t){1&n&&(Ae(0,"small",18),kt(1," \xa0 "),Ie())}function lde(n,t){if(1&n&&(Ae(0,"small",19),kt(1),Ie()),2&n){const e=an(3);ct(1),Pr(" $",e.amount.times(e.token.price).toFormat(2)," ")}}function dde(n,t){1&n&&(Zr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),$r())}function fde(n,t){if(1&n){const e=Di();Ae(0,"small",22),dr("click",function(){Ur(e);const s=an(4);return s.setAmount(s.token.userBalance)}),kt(1," Max "),Ie()}}function hde(n,t){if(1&n&&(Zr(0),Ae(1,"small",20),kt(2),Ie(),it(3,fde,2,0,"small",21),$r()),2&n){const e=an(3);ct(2),Pr("Balance: ",e.token.userBalance.toFormat(4),""),ct(1),Ct("ngIf",e.token.userBalance.gt(0))}}function pde(n,t){if(1&n&&(Ae(0,"div",23),Ae(1,"small",24),kt(2),Ie(),Ie()),2&n){const e=an(3);ct(2),bc(e.errorMessage())}}yt(V5,"\u0275fac",function(e){return new(e||JA)(Xt(Nf),Xt(jg),Xt(dc),Xt(j5),Xt(ud),Xt(o8),Xt(el),Xt(uv),Xt($c),Xt(Xa))}),yt(V5,"\u0275cmp",bn({type:JA,selectors:[["app-add-liquidity"]],inputs:{pool:"pool",token0:"token0",token1:"token1",slippage:"slippage",deadline:"deadline",bunniToken:"bunniToken"},features:[rr],decls:13,vars:21,consts:[[1,"container","p-0"],[1,"mb-3"],[3,"token","amount","allowedTokens","disableSelect","rangeError","tokenChange","amountChange"],[1,"mb-2"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[3,"token","amount"],["class","mb-3",4,"ngIf"],[4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],[1,"container","py-3","px-3","border","border-warning","rounded-1","text-warning"],[1,"d-flex","align-items-center","justify-content-center"],[1,"fe","fe-alert-triangle","me-3"],[1,""],["href","https://docs.uniswap.org/protocol/concepts/V3-overview/concentrated-liquidity","target","_blank"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["class","d-grid d-flex gap-3",4,"ngIf"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["type","button","class","btn btn-lg btn-white fw-bold w-100",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100",3,"click",4,"ngIf"],[1,"d-grid","d-flex","gap-3"],["class","col",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange",4,"ngIf"],[1,"col",3,"token","amount","spender","deadline","signature","spenderAllowance","allowanceChange","signatureChange"],["type","button",1,"btn","btn-lg","btn-white","fw-bold","w-100",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-select-input-panel",2),dr("tokenChange",function(p){return r.setToken(p,!0)})("amountChange",function(p){return r.setAmount(p,!0)}),Ie(),Ie(),Ae(3,"div",3),Ae(4,"app-token-select-input-panel",2),dr("tokenChange",function(p){return r.setToken(p,!1)})("amountChange",function(p){return r.setAmount(p,!1)}),Ie(),Ie(),Ae(5,"div",4),Gn(6,"h3",5),Ie(),Ae(7,"div",1),Gn(8,"app-token-output-panel",6),Ie(),it(9,Qle,8,0,"div",7),it(10,ade,3,2,"ng-container",8),Ae(11,"div",9),it(12,ude,2,0,"button",10),Ie(),Ie()),2&e&&(ct(2),Ct("token",r.token0)("amount",r.token0Amount)("allowedTokens",vc(15,AV,r.store.getNative(r.wallet.chainId),r.store.getWrappedNative(r.wallet.chainId)))("disableSelect",r.token.isZero(r.bunniToken)||!r.chain.zapSupported(r.wallet.chainId)||!r.token.isWrappedNative(r.token0,r.wallet.chainId)&&!r.token.isNative(r.token0))("rangeError",r.bunniToken.tickUpper{},()=>{},pr=>{t.token0Amount=new sn.Z(0),t.token1Amount=new sn.Z(0),t.bunniAmount=new sn.Z(0);try{const ti=pr.events.Withdraw,qr=ti&&new sn.Z(ti.returnValues[3]),yi=ti&&new sn.Z(ti.returnValues[4]).div(t.token0.precision),as=ti&&new sn.Z(ti.returnValues[5]).div(t.token1.precision),Li=ti&&new sn.Z(ti.returnValues[6]).div(t.bunniToken.precision);let[vs,Yi]=[[],[]];vs.push("userBalance")&&Yi.push(t.token0.userBalance.plus(yi)),t.store.updateToken(t.token0.id,vs,Yi,!0),[vs,Yi]=[[],[]],vs.push("userBalance")&&Yi.push(t.token1.userBalance.plus(as)),t.store.updateToken(t.token1.id,vs,Yi,!0),[vs,Yi]=[[],[]],vs.push("totalSupply")&&Yi.push(t.bunniToken.totalSupply.minus(Li)),vs.push("userBalance")&&Yi.push(t.bunniToken.userBalance.minus(Li)),vs.push("userDeposit")&&Yi.push(t.bunniToken.userBalance.minus(Li)),vs.push("liquidity")&&Yi.push(t.bunniToken.liquidity.minus(qr)),vs.push("reserve0")&&Yi.push(t.bunniToken.reserve0.minus(yi)),vs.push("reserve1")&&Yi.push(t.bunniToken.reserve1.minus(as)),t.store.updateBunniToken(t.bunniToken.id,vs,Yi,!0),[vs,Yi]=[[],[]],vs.push("reserve0")&&Yi.push(t.pool.reserve0.minus(yi)),vs.push("reserve1")&&Yi.push(t.pool.reserve1.minus(as)),t.store.updatePool(t.pool.id,vs,Yi,!0)}catch(ti){console.error(ti)}},()=>{}).catch(pr=>{console.error(pr),t.wallet.openErrorModal(pr)})})()}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let dw=QA;function Ade(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",8),Ae(2,"button",10),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.bunniToken.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(2);ct(3),Pr(" Switch to ",e.chain.metadata[e.bunniToken.chainId].displayName," ")}}function Ide(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",13),dr("allowanceChange",function(s){Ur(e);const p=an(3);return p.bunniToken.userAllowances[p.bunniToken.gauge.address]=s}),Ie()}if(2&n){const e=an(3);Ct("token",e.bunniToken)("amount",e.bunniAmount)("spender",e.bunniToken.gauge.address)("spenderAllowance",e.bunniToken.userAllowances[e.bunniToken.gauge.address])}}function Sde(n,t){if(1&n){const e=Di();Ae(0,"button",14),dr("click",function(){return Ur(e),an(3).stake(!1)}),kt(1),Ie()}if(2&n){const e=an(3);Ct("disabled",!e.canStake()),ct(1),Pr(" ",e.message()," ")}}function kde(n,t){if(1&n&&(Ae(0,"div"),it(1,Ide,1,4,"app-token-approval-button",11),Ae(2,"div",8),it(3,Sde,2,2,"button",12),Ie(),Ie()),2&n){const e=an(2);ct(1),Ct("ngIf",e.canApprove()&&!e.approved()),ct(2),Ct("ngIf",!e.canApprove()||e.approved())}}function Cde(n,t){if(1&n&&(Zr(0),it(1,Ade,4,1,"div",7),it(2,kde,4,2,"div",7),$r()),2&n){const e=an();ct(1),Ct("ngIf",e.bunniToken.chainId!==e.wallet.chainId),ct(1),Ct("ngIf",e.bunniToken.chainId===e.wallet.chainId)}}function Mde(n,t){if(1&n){const e=Di();Ae(0,"button",10),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(dw,"\u0275fac",function(e){return new(e||QA)(Xt(Nf),Xt(dc),Xt(j5),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(dw,"\u0275cmp",bn({type:QA,selectors:[["app-remove-liquidity"]],inputs:{pool:"pool",token0:"token0",token1:"token1",slippage:"slippage",deadline:"deadline",bunniToken:"bunniToken"},features:[rr],decls:12,vars:8,consts:[[1,"container","p-0"],[1,"mb-2"],[3,"token","amount","amountChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[1,"d-grid","gap-2"],[4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["class","d-grid",4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),Gn(4,"h3",4),Ie(),Ae(5,"div",5),Gn(6,"app-token-output-panel",6),Ie(),Ae(7,"div",5),Gn(8,"app-token-output-panel",6),Ie(),Ae(9,"div",7),it(10,Ede,3,2,"div",8),it(11,Tde,2,0,"button",9),Ie(),Ie()),2&e&&(ct(2),Ct("token",r.bunniToken)("amount",r.bunniAmount),ct(4),Ct("token",r.token0)("amount",r.token0Amount),ct(2),Ct("token",r.token1)("amount",r.token1Amount),ct(2),Ct("ngIf",r.wallet.connected),ct(1),Ct("ngIf",!r.wallet.connected))},directives:[Ry,o2,La],styles:[""]}));const eI=class{constructor(t,e,r,s,p,F,z){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniToken"),yt(this,"gaugeToken"),yt(this,"bunniAmount"),yt(this,"gaugeAmount"),this.modalService=t,this.approval=e,this.chain=r,this.contract=s,this.store=p,this.util=F,this.wallet=z}ngOnInit(){this.resetData()}resetData(){this.bunniAmount=new sn.Z(0),this.gaugeAmount=new sn.Z(0)}setAmount(t){this.bunniAmount=t,this.gaugeAmount=t}approved(){return this.approval.isTokenApproved(this.bunniAmount,this.bunniToken.userAllowances[this.bunniToken.gauge.address])}canApprove(){return this.approval.canApprove(this.bunniAmount,this.bunniToken.userBalance)}canStake(){return this.canApprove()&&this.approved()}message(){return this.bunniAmount.eq(0)?"Enter an Amount":this.bunniAmount.gt(this.bunniToken.userBalance)?`Insufficient ${this.bunniToken.symbol} Balance`:"Stake in Gauge"}stake(t){const e=this.wallet.web3,r=this.util.processWeb3Number(this.bunniAmount.times(this.bunniToken.precision)),p=(this.chain.isMainnet(this.wallet.chainId)||this.chain.isTestnet(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,e):this.contract.getChildGauge(this.bunniToken.gauge.address,e)).methods.deposit(r,this.wallet.user,t);this.wallet.sendTx(p,()=>{},()=>{},F=>{this.bunniAmount=new sn.Z(0),this.gaugeAmount=new sn.Z(0);try{const z=F.events.Deposit,te=F.events.UpdateLiquidityLimit,fe=z&&new sn.Z(z.returnValues[1]).div(this.bunniToken.precision),Re=te&&new sn.Z(te.returnValues[3]).div(1e18),$e=te&&new sn.Z(te.returnValues[4]).div(1e18);let[rt,ft]=[[],[]];rt.push("totalSupply")&&ft.push(this.bunniToken.totalSupply.minus(fe)),rt.push("userBalance")&&ft.push(this.bunniToken.userBalance.minus(fe)),this.store.updateBunniToken(this.bunniToken.id,rt,ft,!0),[rt,ft]=[[],[]],rt.push("totalSupply")&&ft.push(this.bunniToken.gauge.totalSupply.plus(fe)),rt.push("userBalance")&&ft.push(this.bunniToken.gauge.userBalance.plus(fe)),rt.push("workingBalance")&&ft.push(Re),rt.push("workingSupply")&&ft.push($e),this.store.updateGauge(this.bunniToken.gauge.id,rt,ft,!0)}catch(z){console.error(z)}},()=>{}).catch(F=>{console.error(F),this.wallet.openErrorModal(F)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let fw=eI;function Ode(n,t){if(1&n){const e=Di();Ae(0,"div",11),Ae(1,"button",12),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.bunniToken.chainId].chainId)}),kt(2),Ie(),Ie()}if(2&n){const e=an(2);ct(2),Pr(" Switch to ",e.chain.metadata[e.bunniToken.chainId].displayName," ")}}function Dde(n,t){if(1&n){const e=Di();Ae(0,"div",11),Ae(1,"button",13),dr("click",function(){return Ur(e),an(2).unstake(!1)}),kt(2),Ie(),Ie()}if(2&n){const e=an(2);ct(1),Ct("disabled",!e.canUnstake()),ct(1),Pr(" ",e.message()," ")}}function Pde(n,t){if(1&n&&(Ae(0,"div"),it(1,Ode,3,1,"div",10),it(2,Dde,3,2,"div",10),Ie()),2&n){const e=an();ct(1),Ct("ngIf",e.bunniToken.chainId!==e.wallet.chainId),ct(1),Ct("ngIf",e.bunniToken.chainId===e.wallet.chainId)}}function Rde(n,t){if(1&n){const e=Di();Ae(0,"button",12),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(fw,"\u0275fac",function(e){return new(e||eI)(Xt(Nf),Xt(jg),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(fw,"\u0275cmp",bn({type:eI,selectors:[["app-stake"]],inputs:{bunniToken:"bunniToken",gaugeToken:"gaugeToken"},decls:10,vars:6,consts:[[1,"container","p-0"],[1,"mb-2"],[3,"token","amount","amountChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["class","d-grid",3,"token","amount","spender","spenderAllowance","allowanceChange",4,"ngIf"],["type","button","class","btn btn-lg btn-shadow-rainbow position-relative fw-bold",3,"disabled","click",4,"ngIf"],[1,"d-grid",3,"token","amount","spender","spenderAllowance","allowanceChange"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),Gn(4,"h3",4),Ie(),Ae(5,"div",5),Gn(6,"app-token-output-panel",6),Ie(),it(7,Cde,3,2,"ng-container",7),Ae(8,"div",8),it(9,Mde,2,0,"button",9),Ie(),Ie()),2&e&&(ct(2),Ct("token",r.bunniToken)("amount",r.bunniAmount),ct(4),Ct("token",r.gaugeToken)("amount",r.gaugeAmount),ct(1),Ct("ngIf",r.wallet.connected),ct(2),Ct("ngIf",!r.wallet.connected))},directives:[Ry,o2,La,Py],styles:[""]}));const tI=class{constructor(t,e,r,s,p,F,z){yt(this,"modalService"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"zone"),yt(this,"bunniToken"),yt(this,"gaugeToken"),yt(this,"bunniAmount",new sn.Z(0)),yt(this,"gaugeAmount",new sn.Z(0)),this.modalService=t,this.chain=e,this.contract=r,this.store=s,this.util=p,this.wallet=F,this.zone=z}ngOnInit(){}setAmount(t){this.gaugeAmount=t,this.bunniAmount=t}canUnstake(){return this.gaugeAmount.gt(0)&&this.gaugeAmount.lte(this.gaugeToken.userBalance)}message(){return this.gaugeAmount.eq(0)?"Enter an Amount":this.gaugeAmount.gt(this.gaugeToken.userBalance)?`Insufficient ${this.gaugeToken.symbol} Balance`:"Unstake from Gauge"}unstake(t){const e=this.wallet.web3,r=this.util.processWeb3Number(this.gaugeAmount.times(this.gaugeToken.precision));let s;s=this.chain.isMainnet(this.wallet.chainId)||this.chain.isTestnet(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,e).methods.withdraw(r,t):this.contract.getChildGauge(this.bunniToken.gauge.address,e).methods.withdraw(r,this.wallet.user,t),this.wallet.sendTx(s,()=>{},()=>{},p=>{this.bunniAmount=new sn.Z(0),this.gaugeAmount=new sn.Z(0);try{const z=p.events.UpdateLiquidityLimit,te=new sn.Z(p.events.Withdraw.returnValues[1]).div(this.bunniToken.precision),fe=new sn.Z(z.returnValues[3]).div(1e18),Re=new sn.Z(z.returnValues[4]).div(1e18);let[$e,rt]=[[],[]];$e.push("totalSupply")&&rt.push(this.bunniToken.totalSupply.plus(te)),$e.push("userBalance")&&rt.push(this.bunniToken.userBalance.plus(te)),this.store.updateBunniToken(this.bunniToken.id,$e,rt,!0),[$e,rt]=[[],[]],$e.push("totalSupply")&&rt.push(this.bunniToken.gauge.totalSupply.minus(te)),$e.push("userBalance")&&rt.push(this.bunniToken.gauge.userBalance.minus(te)),$e.push("workingBalance")&&rt.push(fe),$e.push("workingSupply")&&rt.push(Re),this.store.updateGauge(this.bunniToken.gauge.id,$e,rt,!0)}catch(F){console.error(F)}},()=>{}).catch(p=>{console.error(p),this.wallet.openErrorModal(p)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let hw=tI;function Nde(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",10),dr("allowanceChange",function(s){Ur(e);const p=an(2);return p.rewardToken.userAllowances[p.bunniToken.gauge.address]=s}),Ie()}if(2&n){const e=an(2);Ct("token",e.rewardToken)("amount",e.rewardAmount)("spender",e.bunniToken.gauge.address)("spenderAllowance",e.rewardToken.userAllowances[e.bunniToken.gauge.address])}}function Bde(n,t){if(1&n){const e=Di();Ae(0,"button",11),dr("click",function(){return Ur(e),an(2).deposit_reward()}),kt(1),Ie()}if(2&n){const e=an(2);Ct("disabled",!e.canAddReward()),ct(1),Pr(" ",e.message()," ")}}function Fde(n,t){if(1&n&&(Zr(0),it(1,Nde,1,4,"app-token-approval-button",8),it(2,Bde,2,2,"button",9),$r()),2&n){const e=an();ct(1),Ct("ngIf",e.canApprove()&&!e.approved()),ct(1),Ct("ngIf",!e.canApprove()||e.approved())}}function Lde(n,t){if(1&n){const e=Di();Zr(0),Ae(1,"button",12),dr("click",function(){return Ur(e),an().wallet.connect()}),kt(2," Connect a Wallet "),Ie(),$r()}}yt(hw,"\u0275fac",function(e){return new(e||tI)(Xt(Nf),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa),Xt(pa))}),yt(hw,"\u0275cmp",bn({type:tI,selectors:[["app-unstake"]],inputs:{bunniToken:"bunniToken",gaugeToken:"gaugeToken"},decls:10,vars:6,consts:[[1,"container","p-0"],[1,"mb-2"],[3,"token","amount","amountChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[1,"d-grid","gap-2"],[4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["class","d-grid",4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),Gn(4,"h3",4),Ie(),Ae(5,"div",5),Gn(6,"app-token-output-panel",6),Ie(),Ae(7,"div",7),it(8,Pde,3,2,"div",8),it(9,Rde,2,0,"button",9),Ie(),Ie()),2&e&&(ct(2),Ct("token",r.gaugeToken)("amount",r.gaugeAmount),ct(4),Ct("token",r.bunniToken)("amount",r.bunniAmount),ct(2),Ct("ngIf",r.wallet.connected),ct(1),Ct("ngIf",!r.wallet.connected))},directives:[Ry,o2,La],styles:[""]}));const nI=class{constructor(t,e,r,s,p,F,z,te){yt(this,"activeModal"),yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniToken"),yt(this,"rewardToken"),yt(this,"rewardAmount",new sn.Z(0)),this.activeModal=t,this.modalService=e,this.approval=r,this.chain=s,this.contract=p,this.store=F,this.util=z,this.wallet=te}ngOnInit(){}setAmount(t){this.rewardAmount=t}approved(){return this.approval.isTokenApproved(this.rewardAmount,this.rewardToken.userAllowances[this.bunniToken.gauge.address])}canApprove(){return this.rewardAmount.gt(0)&&this.rewardToken.userBalance.gte(this.rewardAmount)}canAddReward(){return this.rewardAmount.gt(0)&&this.approved()&&this.rewardAmount.lte(this.rewardToken.userBalance)&&this.rewardToken.distributor===this.wallet.user.toLowerCase()}message(){return this.rewardAmount.eq(0)?"Enter an Amount":this.rewardAmount.gt(this.rewardToken.userBalance)?`Insufficient ${this.rewardToken.symbol} Balance`:this.rewardToken.distributor!==this.wallet.user.toLowerCase()?"Unauthorized Distributor":"Deposit Reward"}deposit_reward(){const t=this.wallet.web3,r=(this.chain.isL1(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,t):this.contract.getChildGauge(this.bunniToken.gauge.address,t)).methods.deposit_reward_token(this.rewardToken.address,this.util.processWeb3Number(this.rewardAmount.times(this.rewardToken.precision)));this.wallet.sendTx(r,()=>{},()=>{},()=>{this.deposit_reward_callback()},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}deposit_reward_callback(){this.rewardAmount=new sn.Z(0),this.rewardToken.userBalance=this.rewardToken.userBalance.minus(this.rewardAmount),this.rewardToken.userBalanceUSD=this.rewardToken.userBalance.times(this.rewardToken.price),this.store.updateToken(this.rewardToken.id,["userBalance"],[this.rewardToken.userBalance],!0)}};let AT=nI;function Ude(n,t){if(1&n){const e=Di();Ae(0,"button",8),dr("click",function(){Ur(e);const s=an().$implicit;return an().openAddRewardModal(s)}),kt(1," Add Reward "),Ie()}}function jde(n,t){if(1&n&&(Zr(0),Ae(1,"div",1),it(2,Ude,2,0,"button",7),Gn(3,"app-token-output-panel",2),Ie(),$r()),2&n){const e=t.$implicit,r=an();ct(2),Ct("ngIf",r.wallet.connected&&r.wallet.user.toLowerCase()===e.distributor),ct(1),Ct("token",e)("amount",e.claimableReward)}}function Vde(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",10),Ae(2,"button",11),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.bunniToken.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(2);ct(3),Pr(" Switch to ",e.chain.metadata[e.bunniToken.chainId].displayName," ")}}function Hde(n,t){if(1&n){const e=Di();Ae(0,"button",15),dr("click",function(){return Ur(e),an(3).claim()}),kt(1," Claim oLIT "),Ie()}}function $de(n,t){if(1&n){const e=Di();Ae(0,"button",15),dr("click",function(){return Ur(e),an(3).claim_rewards()}),kt(1," Claim Rewards "),Ie()}}function Wde(n,t){1&n&&(Ae(0,"button",16),kt(1," Nothing to Claim "),Ie())}function Gde(n,t){if(1&n&&(Ae(0,"div",12),it(1,Hde,2,0,"button",13),it(2,$de,2,0,"button",13),it(3,Wde,2,0,"button",14),Ie()),2&n){const e=an(2);ct(1),Ct("ngIf",e.canClaim(!0)),ct(1),Ct("ngIf",e.canClaim(!1)),ct(1),Ct("ngIf",!e.canClaim(!0)&&!e.canClaim(!1))}}function zde(n,t){if(1&n&&(Ae(0,"div"),it(1,Vde,4,1,"div",5),it(2,Gde,4,3,"div",9),Ie()),2&n){const e=an();ct(1),Ct("ngIf",e.bunniToken.chainId!==e.wallet.chainId),ct(1),Ct("ngIf",e.bunniToken.chainId===e.wallet.chainId)}}function qde(n,t){if(1&n){const e=Di();Ae(0,"button",11),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(AT,"\u0275fac",function(e){return new(e||nI)(Xt(Ob),Xt(Nf),Xt(jg),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(AT,"\u0275cmp",bn({type:nI,selectors:[["app-add-reward"]],inputs:{bunniToken:"bunniToken",rewardToken:"rewardToken"},decls:10,vars:5,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close","h2","m-0",3,"click"],[1,"modal-body"],[1,"mb-3"],[3,"token","amount","amountChange"],[1,"d-grid","mb-3"],[4,"ngIf"],["class","d-grid mb-2",3,"token","amount","spender","spenderAllowance","allowanceChange",4,"ngIf"],["type","button","class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold",3,"disabled","click",4,"ngIf"],[1,"d-grid","mb-2",3,"token","amount","spender","spenderAllowance","allowanceChange"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"h2",1),kt(2),Ie(),Ae(3,"button",2),dr("click",function(){return r.activeModal.dismiss()}),Ie(),Ie(),Ae(4,"div",3),Ae(5,"div",4),Ae(6,"app-token-input-panel",5),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(7,"div",6),it(8,Fde,3,2,"ng-container",7),it(9,Lde,3,0,"ng-container",7),Ie(),Ie()),2&e&&(ct(2),Pr("Add ",r.rewardToken.symbol," Reward"),ct(4),Ct("token",r.rewardToken)("amount",r.rewardAmount),ct(2),Ct("ngIf",r.wallet.connected),ct(1),Ct("ngIf",!r.wallet.connected))},directives:[Ry,La,Py],styles:[""]}));const rI=class{constructor(t,e,r,s,p,F,z){yt(this,"modalService"),yt(this,"balance"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniToken"),this.modalService=t,this.balance=e,this.chain=r,this.contract=s,this.store=p,this.util=F,this.wallet=z}ngOnInit(){}canClaim(t){return t?this.bunniToken.gauge.claimableReward.gt(0):!!this.bunniToken.gauge.rewardTokens.find(e=>e.claimableReward.gt(0))}claim(){const t=this.wallet.web3,r=(this.chain.isL1(this.wallet.chainId)?this.contract.getMinter(t,this.wallet.chainId):this.contract.getChildGaugeFactory(t,this.wallet.chainId)).methods.mint(this.bunniToken.gauge.address);this.wallet.sendTx(r,()=>{},()=>{},s=>{this.claim_callback(s)},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}claim_rewards(){const t=this.wallet.web3,r=(this.chain.isL1(this.wallet.chainId)?this.contract.getLiquidityGauge(this.bunniToken.gauge.address,t):this.contract.getChildGauge(this.bunniToken.gauge.address,t)).methods.claim_rewards(this.wallet.user);this.wallet.sendTx(r,()=>{},()=>{},()=>{this.claim_rewards_callback()},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}claim_callback(t){const e=this.wallet.httpsWeb3(this.wallet.chainId);try{const r=e.eth.abi.encodeEventSignature(this.contract.getABI("ERC20").find(Ft=>"Transfer"===Ft.name&&"event"===Ft.type)),s=r&&Object.values(t.events).find(Ft=>Ft.raw.topics[0]===r),p=s&&e.eth.abi.decodeParameters(["uint256"],s.raw.data),F=this.contract.getABI(this.chain.isL1(this.wallet.chainId)?"LiquidityGauge":"ChildGauge"),z=e.eth.abi.encodeEventSignature(F.find(Ft=>"UpdateLiquidityLimit"===Ft.name&&"event"===Ft.type)),te=Object.values(t.events).find(Ft=>Ft.raw.topics[0]===z),fe=te&&e.eth.abi.decodeParameters(["uint256"],te.raw.data),Re=new sn.Z(p[0]).div(this.bunniToken.gauge.oLIT.precision),$e=new sn.Z(fe[3]).div(this.bunniToken.gauge.precision),rt=new sn.Z(fe[4]).div(this.bunniToken.gauge.precision);let[ft,Tt]=[[],[]];ft.push("userBalance")&&Tt.push(this.bunniToken.gauge.oLIT.userBalance.plus(Re)),this.store.updateToken(this.bunniToken.gauge.oLIT.id,ft,Tt,!0),[ft,Tt]=[[],[]],ft.push("claimableReward")&&Tt.push(new sn.Z(0)),ft.push("workingBalance")&&Tt.push($e),ft.push("workingSupply")&&Tt.push(rt),this.store.updateGauge(this.bunniToken.gauge.id,ft,Tt)}catch(r){console.error(r)}}claim_rewards_callback(){const t=this.wallet.httpsWeb3(this.wallet.chainId),e=new sT({web3Instance:t,tryAggregate:!0}),r=this.balance.context(this.wallet.user,this.bunniToken.gauge.rewardTokens.map(s=>s.address));e.call(r).then(s=>{this.bunniToken.gauge.rewardTokens.forEach(p=>{const z=new sn.Z(s[`BALANCE: ${p.address}`].callsReturnContext[0].returnValues[0].hex).div(p.precision);p.claimableReward=new sn.Z(0),p.userBalance=z,p.userBalanceUSD=z.times(p.price),this.store.updateToken(p.id,["userBalance"],[z],!0)})})}openAddRewardModal(t){const e=this.modalService.open(AT,{windowClass:"windowed",centered:!0,size:"md"});e.componentInstance.bunniToken=this.bunniToken,e.componentInstance.rewardToken=t}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let pw=rI;yt(pw,"\u0275fac",function(e){return new(e||rI)(Xt(Nf),Xt(O5),Xt(dc),Xt(ud),Xt(el),Xt($c),Xt(Xa))}),yt(pw,"\u0275cmp",bn({type:rI,selectors:[["app-claim"]],inputs:{bunniToken:"bunniToken"},decls:7,vars:5,consts:[[1,"container","p-0"],[1,"mb-3"],[3,"token","amount"],[4,"ngFor","ngForOf"],[1,"d-grid","gap-2"],[4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-white fw-bold text-dark mb-2",3,"click",4,"ngIf"],["type","button",1,"btn","btn-sm","btn-white","fw-bold","text-dark","mb-2",3,"click"],["class","d-grid gap-3 d-md-flex mx-auto justify-content-md-center",4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100","type","button",3,"click",4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold w-100","type","button","disabled","",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100",3,"click"],["type","button","disabled","",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","w-100"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Gn(2,"app-token-output-panel",2),Ie(),it(3,jde,4,3,"ng-container",3),Ae(4,"div",4),it(5,zde,3,2,"div",5),it(6,qde,2,0,"button",6),Ie(),Ie()),2&e&&(ct(2),Ct("token",r.bunniToken.gauge.oLIT)("amount",r.bunniToken.gauge.claimableReward),ct(1),Ct("ngForOf",r.bunniToken.gauge.rewardTokens),ct(2),Ct("ngIf",r.wallet.connected),ct(1),Ct("ngIf",!r.wallet.connected))},directives:[o2,L0,La],styles:[""]}));var IT=Y(10431);const Xde=(n,t)=>`gauge {\n address\n chain\n tokenlessProduction\n totalSupply\n workingSupply\n ${Qde()}\n ${n?"exists":""}\n ${n?"relativeWeightCap":""}\n ${n?kV(t):""}\n ${n?CV(t):""}\n ${n?MV(t):""}\n ${n?SV(t):""}\n }`,SV=n=>`votes (\n where: {\n power_gt: 0,\n end_gt: ${n}\n }\n ) {\n power\n weight\n decay\n timestamp\n user {\n address\n }\n }`,kV=n=>`bribes (\n where: { \n deadline: ${n}\n }\n ) {\n token {\n address\n decimals\n name\n symbol\n }\n amount\n maxTokensPerVote\n }`,CV=n=>`quests (\n where: {\n startPeriod_lte: ${Math.floor(Date.now()/1e3)},\n deadline_gte: ${n}\n }\n ) {\n rewardToken {\n address\n decimals\n name\n symbol\n }\n objectiveVotes\n rewardPerVote\n duration\n }`,MV=n=>`bounties (\n where: {\n startPeriod_lte: ${Math.floor(Date.now()/1e3)},\n endPeriod_gte: ${n}\n }\n ) {\n rewardToken {\n address\n decimals\n name\n symbol\n }\n rewardPerPeriod\n maxRewardPerVote\n }`,Qde=()=>"rewardTokens {\n distributor\n token {\n address\n decimals\n name\n symbol\n }\n }",m9=class{constructor(){}query(t,e){return(0,Br.Z)(function*(){return yield(0,IT.request)(jre[e],t)})()}queryBlocks(t,e){return(0,Br.Z)(function*(){return yield(0,IT.request)(Vre[e],t)})()}};let mw=m9;yt(mw,"\u0275fac",function(e){return new(e||m9)}),yt(mw,"\u0275prov",we({token:m9,factory:m9.\u0275fac,providedIn:"root"}));const g9=class{constructor(t){yt(this,"subgraph"),this.subgraph=t}get now(){return Math.floor(Date.now()/1e3)}get day(){return 86400}get week(){return 604800}get month(){return 2592e3}get year(){return 31536e3}get thisPeriodTimestamp(){const t=1e3*this.week;return Math.floor(Date.now()/t)*t/1e3}get nextPeriodTimestamp(){const t=1e3*this.week;return Math.floor((Date.now()+t)/t)*t/1e3}getBlock(t,e){var r=this;return(0,Br.Z)(function*(){return(yield r.subgraph.queryBlocks((n=>IT.gql` { blocks( first: 1, @@ -499,4 +499,4 @@ ${ra` number } } - `)(t),e)).blocks[0].number})()}};let km=g9;yt(km,"\u0275fac",function(e){return new(e||g9)(Yn(mw))}),yt(km,"\u0275prov",we({token:g9,factory:g9.\u0275fac,providedIn:"root"}));const y9=class{constructor(t,e,r){yt(this,"chain"),yt(this,"time"),yt(this,"wallet"),this.chain=t,this.time=e,this.wallet=r}gaugeContext(t,e,r,s){return r.map(p=>({reference:`GAUGE: ${p.address}`,contractAddress:p.address,abi:Y(this.chain.isMainnet(s)||this.chain.isTestnet(s)?33649:76376),calls:[...t?[{reference:p.address,methodName:"is_killed",methodParameters:[]}]:[],...t?p.rewardTokens.map(F=>({reference:p.address,methodName:"reward_data",methodParameters:[F.address]})):[],...e?[{reference:p.address,methodName:"claimable_tokens",methodParameters:[this.wallet.user]}]:[],...e?p.rewardTokens.map(F=>({reference:p.address,methodName:"claimable_reward",methodParameters:[this.wallet.user,F.address]})):[],...this.chain.isL1(s)?[]:[{reference:p.address,methodName:"inflation_rate",methodParameters:[Math.floor(this.time.thisPeriodTimestamp/this.time.week)]}]]}))}controllerContext(t,e,r){if(!t||!e.length||!Cy[r])return[];const[s,p,F,q]=e.reduce(([te,fe,Re,$e],rt)=>{const Tt={reference:`${rt.address}`,methodName:"gauge_relative_weight_write",methodParameters:[rt.address,this.time.nextPeriodTimestamp]},Ft={reference:`${rt.address}`,methodName:"points_weight",methodParameters:[rt.address,this.time.thisPeriodTimestamp]},Qt={reference:`${rt.address}`,methodName:"points_weight",methodParameters:[rt.address,this.time.nextPeriodTimestamp]};return te.push({reference:`${rt.address}`,methodName:"gauge_relative_weight_write",methodParameters:[rt.address,this.time.thisPeriodTimestamp]}),fe.push(Tt),Re.push(Ft),$e.push(Qt),[te,fe,Re,$e]},[[],[],[],[]]);return[{reference:"CONTROLLER: THIS_PERIOD",contractAddress:Cy[r],abi:Y(58787),calls:s},{reference:"CONTROLLER: NEXT_PERIOD",contractAddress:Cy[r],abi:Y(58787),calls:p},{reference:"CONTROLLER: THIS_POINTS",contractAddress:Cy[r],abi:Y(58787),calls:F},{reference:"CONTROLLER: NEXT_POINTS",contractAddress:Cy[r],abi:Y(58787),calls:q}]}};let gw=y9;function tfe(n,t){1&n&&qn(0,"i",15)}function nfe(n,t){1&n&&qn(0,"i",15)}function rfe(n,t){1&n&&qn(0,"i",15)}function ife(n,t){1&n&&qn(0,"i",15)}function sfe(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",16),Ae(2,"button",17),dr("click",function(){Ur(e);const s=an(3);return s.wallet.changeChain(s.chain.metadata[s.pool.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(3);dt(3),Pr(" Switch to ",e.chain.metadata[e.pool.chainId].displayName," ")}}function ofe(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",16),Ae(2,"button",17),dr("click",function(){return Ur(e),an(3).deployGauge()}),kt(3," Deploy Gauge "),Ie(),Ie(),Ie()}}function afe(n,t){if(1&n&&(Ae(0,"div"),it(1,sfe,4,1,"div",13),it(2,ofe,4,0,"div",13),Ie()),2&n){const e=an(2);dt(1),Mt("ngIf",e.pool.chainId!==e.wallet.chainId),dt(1),Mt("ngIf",e.pool.chainId===e.wallet.chainId)}}function ufe(n,t){1&n&&(Ae(0,"div",22),kt(1,"(Switch to Mainnet)"),Ie())}function cfe(n,t){if(1&n){const e=Di();Ae(0,"button",20),dr("click",function(){Ur(e);const s=an(3);return s.chain.isMainnet(s.wallet.chainId)?s.deployRootGauge():s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),Ae(1,"div"),kt(2,"Deploy Root Gauge"),Ie(),it(3,ufe,2,0,"div",21),Ie()}if(2&n){const e=an(3);Mt("ngClass",e.chain.isMainnet(e.wallet.chainId)?"btn-shadow-rainbow position-relative":"btn-white"),dt(3),Mt("ngIf",!e.chain.isMainnet(e.wallet.chainId))}}function lfe(n,t){if(1&n&&(Ae(0,"div",22),kt(1),Ie()),2&n){const e=an(4);dt(1),Pr("(Switch to ",e.chain.metadata[e.pool.chainId].displayName,")")}}function dfe(n,t){if(1&n){const e=Di();Ae(0,"button",20),dr("click",function(){Ur(e);const s=an(3);return s.pool.chainId===s.wallet.chainId?s.deployChildGauge():s.wallet.changeChain(s.chain.metadata[s.pool.chainId].chainId)}),Ae(1,"div"),kt(2,"Deploy Child Gauge"),Ie(),it(3,lfe,2,1,"div",21),Ie()}if(2&n){const e=an(3);Mt("ngClass",e.pool.chainId===e.wallet.chainId?"btn-shadow-rainbow position-relative":"btn-white"),dt(3),Mt("ngIf",e.pool.chainId!==e.wallet.chainId)}}function ffe(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"div",18),it(2,cfe,4,2,"button",19),it(3,dfe,4,2,"button",19),Ie(),Ie()),2&n){const e=an(2);dt(2),Mt("ngIf",!e.bunniToken.gauge||!e.bunniToken.gauge.rootGaugeDeployed),dt(1),Mt("ngIf",!e.bunniToken.gauge||!e.bunniToken.gauge.childGaugeDeployed)}}function hfe(n,t){if(1&n&&(Qr(0),it(1,afe,3,2,"div",13),it(2,ffe,4,2,"div",13),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.chain.isMainnet(e.pool.chainId)||e.chain.isTestnet(e.pool.chainId)),dt(1),Mt("ngIf",!e.chain.isMainnet(e.pool.chainId)&&!e.chain.isTestnet(e.pool.chainId))}}function pfe(n,t){if(1&n){const e=Di();Ae(0,"div",16),Ae(1,"button",17),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(2," Connect a Wallet "),Ie(),Ie()}}yt(gw,"\u0275fac",function(e){return new(e||y9)(Yn(dc),Yn(km),Yn(Xa))}),yt(gw,"\u0275prov",we({token:y9,factory:y9.\u0275fac,providedIn:"root"}));const iI=class{constructor(t,e,r,s,p,F,q){yt(this,"modalService"),yt(this,"chain"),yt(this,"contract"),yt(this,"gauge"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"pool"),yt(this,"bunniToken"),yt(this,"weightCap"),this.modalService=t,this.chain=e,this.contract=r,this.gauge=s,this.store=p,this.util=F,this.wallet=q}ngOnInit(){this.reset()}reset(){this.weightCap=new sn.Z(1)}setWeightCap(t){this.weightCap=new sn.Z(t)}deployGauge(){const e=this.contract.getGaugeFactory(this.wallet.web3,this.wallet.chainId),r={pool:this.pool.address,tickLower:this.bunniToken.tickLower,tickUpper:this.bunniToken.tickUpper},s=this.util.processWeb3Number(this.weightCap.times(1e18)),p=e.methods.create(r,s);this.wallet.sendTx(p,()=>{},()=>{},F=>{const q=F.events.GaugeCreated;let[te,fe]=[[],[]];te.push("address")&&fe.push(q.returnValues.gauge.toLowerCase()),te.push("chainId")&&fe.push(this.pool.chainId),te.push("rootGaugeDeployed")&&fe.push(!0),te.push("childGaugeDeployed")&&fe.push(!0),te.push("bunniToken")&&fe.push(this.bunniToken);const Re=this.store.updateGauge(this.util.id(q.returnValues.gauge.toLowerCase(),this.pool.chainId),te,fe);[te,fe]=[[],[]],te.push("gauge")&&fe.push(Re),this.store.updateBunniToken(this.bunniToken.id,te,fe)},()=>{}).catch(F=>{console.error(F),this.wallet.openErrorModal(F)})}deployChildGauge(){const r=this.contract.getChildGaugeFactory(this.wallet.web3,this.wallet.chainId).methods.deploy_gauge([this.pool.address,this.bunniToken.tickLower,this.bunniToken.tickUpper]);this.wallet.sendTx(r,()=>{},()=>{},s=>{const p=s.events.DeployedGauge;let[F,q]=[[],[]];F.push("address")&&q.push(p.returnValues.gauge.toLowerCase()),F.push("chainId")&&q.push(this.pool.chainId),F.push("childGaugeDeployed")&&q.push(!0),F.push("bunniToken")&&q.push(this.bunniToken);const te=this.store.updateGauge(this.util.id(p.returnValues.gauge.toLowerCase(),this.pool.chainId),F,q);[F,q]=[[],[]],F.push("gauge")&&q.push(te),this.store.updateBunniToken(this.bunniToken.id,F,q)},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}deployRootGauge(){const e=this.contract.getRootGaugeFactory(this.wallet.web3,this.wallet.chainId),r=this.util.processWeb3Number(this.weightCap.times(1e18)),s=e.methods.deploy_gauge(this.pool.chainId,[this.pool.address,this.bunniToken.tickLower,this.bunniToken.tickUpper],r);this.wallet.sendTx(s,()=>{},()=>{},p=>{const F=p.events.DeployedGauge;let[q,te]=[[],[]];q.push("address")&&te.push(F.returnValues.gauge.toLowerCase()),q.push("chainId")&&te.push(this.pool.chainId),q.push("rootGaugeDeployed")&&te.push(!0),q.push("bunniToken")&&te.push(this.bunniToken);const fe=this.store.updateGauge(this.util.id(F.returnValues.gauge.toLowerCase(),this.pool.chainId),q,te);[q,te]=[[],[]],q.push("gauge")&&te.push(fe),this.store.updateBunniToken(this.bunniToken.id,q,te)},()=>{}).catch(p=>{console.error(p),this.wallet.openErrorModal(p)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let ST=iI;function mfe(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",7),Ae(2,"button",8),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.pool.chainId].chainId)}),kt(3),Ie(),Ie(),Ie()}if(2&n){const e=an(2);dt(3),Pr(" Switch to ",e.chain.metadata[e.pool.chainId].displayName," ")}}function gfe(n,t){if(1&n){const e=Di();Ae(0,"div"),Ae(1,"div",9),Ae(2,"button",10),dr("click",function(){return Ur(e),an(2).startRecording()}),kt(3," Start Recording "),Ie(),Ae(4,"button",10),dr("click",function(){return Ur(e),an(2).finishRecording()}),kt(5," Finish Recording "),Ie(),Ie(),Ie()}}function yfe(n,t){if(1&n&&(Qr(0),it(1,mfe,4,1,"div",5),it(2,gfe,6,0,"div",5),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.pool.chainId!==e.wallet.chainId),dt(1),Mt("ngIf",e.pool.chainId===e.wallet.chainId)}}function bfe(n,t){if(1&n){const e=Di();Ae(0,"div",7),Ae(1,"button",8),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(2," Connect a Wallet "),Ie(),Ie()}}yt(ST,"\u0275fac",function(e){return new(e||iI)(Xt(Nf),Xt(dc),Xt(ud),Xt(gw),Xt(el),Xt($c),Xt(Xa))}),yt(ST,"\u0275cmp",bn({type:iI,selectors:[["app-deploy"]],inputs:{pool:"pool",bunniToken:"bunniToken"},decls:49,vars:10,consts:[[1,"container","p-0"],[1,"mb-3"],[1,""],[1,"d-grid","d-flex","gap-2","mb-3"],[1,"w-100"],[1,"card","card-inner-shadow","clickable","mb-0",3,"ngClass","click"],[1,"card-body","p-3"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"m-0"],["class","fe fe-check-circle text-success","style","line-height: 0;",4,"ngIf"],[1,"text-secondary","text-wrap"],[1,"container","py-3","px-3","border","border-warning","rounded-1","text-warning"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf"],["class","d-grid",4,"ngIf"],[1,"fe","fe-check-circle","text-success",2,"line-height","0"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["type","button","class","btn btn-lg fw-bold w-100",3,"ngClass","click",4,"ngIf"],["type","button",1,"btn","btn-lg","fw-bold","w-100",3,"ngClass","click"],["class","small",4,"ngIf"],[1,"small"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"h2",2),kt(3,"Deploy Liquidity Gauge"),Ie(),Ae(4,"p"),kt(5,"Deploy a gauge for this Bunni pool so that governance can enable incentives for it."),Ie(),Ie(),Ae(6,"div",3),Ae(7,"div",4),Ae(8,"div",5),dr("click",function(){return r.setWeightCap(1)}),Ae(9,"div",6),Ae(10,"div",7),Ae(11,"h3",8),kt(12," No "),Ie(),it(13,tfe,1,0,"i",9),Ie(),Ae(14,"small",10),kt(15," Weight cap "),Ie(),Ie(),Ie(),Ie(),Ae(16,"div",4),Ae(17,"div",5),dr("click",function(){return r.setWeightCap(.02)}),Ae(18,"div",6),Ae(19,"div",7),Ae(20,"h3",8),kt(21," 2% "),Ie(),it(22,nfe,1,0,"i",9),Ie(),Ae(23,"small",10),kt(24," Weight cap "),Ie(),Ie(),Ie(),Ie(),Ae(25,"div",4),Ae(26,"div",5),dr("click",function(){return r.setWeightCap(.05)}),Ae(27,"div",6),Ae(28,"div",7),Ae(29,"h3",8),kt(30," 5% "),Ie(),it(31,rfe,1,0,"i",9),Ie(),Ae(32,"small",10),kt(33," Weight cap "),Ie(),Ie(),Ie(),Ie(),Ae(34,"div",4),Ae(35,"div",5),dr("click",function(){return r.setWeightCap(.1)}),Ae(36,"div",6),Ae(37,"div",7),Ae(38,"h3",8),kt(39," 10% "),Ie(),it(40,ife,1,0,"i",9),Ie(),Ae(41,"small",10),kt(42," Weight cap "),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(43,"div",1),Ae(44,"div",11),Ae(45,"div",12),kt(46," This action usually should not be taken by regular users. "),Ie(),Ie(),Ie(),it(47,hfe,3,2,"ng-container",13),it(48,pfe,3,0,"div",14),Ie()),2&e&&(dt(8),Mt("ngClass",r.weightCap.eq(1)?"border-success":""),dt(5),Mt("ngIf",r.weightCap.eq(1)),dt(4),Mt("ngClass",r.weightCap.eq(.02)?"border-success":""),dt(5),Mt("ngIf",r.weightCap.eq(.02)),dt(4),Mt("ngClass",r.weightCap.eq(.05)?"border-success":""),dt(5),Mt("ngIf",r.weightCap.eq(.05)),dt(4),Mt("ngClass",r.weightCap.eq(.1)?"border-success":""),dt(5),Mt("ngIf",r.weightCap.eq(.1)),dt(7),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[dh,La],styles:[""]}));const sI=class{constructor(t,e,r,s){yt(this,"modalService"),yt(this,"chain"),yt(this,"contract"),yt(this,"wallet"),yt(this,"pool"),yt(this,"bunniToken"),yt(this,"poorOracleResult"),this.modalService=t,this.chain=e,this.contract=r,this.wallet=s}ngOnInit(){this.reset();const t=this.wallet.httpsWeb3(this.pool.chainId);this.contract.getPoorOracle(t,this.pool.chainId).methods.getPositionState(this.pool.address,this.bunniToken.tickLower,this.bunniToken.tickUpper).call().then(r=>{this.poorOracleResult=parseInt(r)})}reset(){this.poorOracleResult=0}startRecording(){const r=this.contract.getPoorOracle(this.wallet.web3,this.wallet.chainId).methods.startRecording(this.pool.address,this.bunniToken.tickLower,this.bunniToken.tickUpper);this.wallet.sendTx(r,()=>{},()=>{},()=>{},s=>{console.error(s),this.wallet.openErrorModal(s)}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}finishRecording(){const r=this.contract.getPoorOracle(this.wallet.web3,this.wallet.chainId).methods.finishRecording(this.pool.address,this.bunniToken.tickLower,this.bunniToken.tickUpper);this.wallet.sendTx(r,()=>{},()=>{},()=>{},s=>{console.error(s),this.wallet.openErrorModal(s)}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}get poorOracleState(){switch(this.poorOracleResult){case 0:default:return"Unknown";case 1:return"In range";case 2:return"Out of range"}}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let kT=sI;function vfe(n,t){if(1&n&&(Ae(0,"div",53),kt(1),Ie()),2&n){const e=an();dt(1),Lc(" ",e.pool.token0.symbol,"/ ",e.pool.token1.symbol," ",e.pool.fee/1e4,"% ")}}function _fe(n,t){1&n&&qn(0,"span",54)}function wfe(n,t){if(1&n&&(Ae(0,"a",55),to(),Ae(1,"svg",56),Ae(2,"g",57),qn(3,"path",58),qn(4,"path",59),Ie(),Ie(),Ie()),2&n){const e=an();V1("href","",e.chain.metadata[e.pool.chainId].blockExplorerUrls[0],"/address/",e.pool.address,"",Pi)}}yt(kT,"\u0275fac",function(e){return new(e||sI)(Xt(Nf),Xt(dc),Xt(ud),Xt(Xa))}),yt(kT,"\u0275cmp",bn({type:sI,selectors:[["app-kill"]],inputs:{pool:"pool",bunniToken:"bunniToken"},decls:14,vars:3,consts:[[1,"container","p-0"],[1,"mb-3"],[1,""],[1,"container","py-3","px-3","border","border-warning","rounded-1","text-warning"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf"],["class","d-grid",4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],[1,"d-grid","gap-3","d-md-flex","mx-auto","justify-content-md-center"],["type","button",1,"btn","btn-lg","btn-white","fw-bold","w-100",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"h2",2),kt(3,"Kill Liquidity Gauge"),Ie(),Ae(4,"p"),kt(5,"If the Bunni pool is out-of-range, start a recording in order to mark it as out-of-range and stop the oLIT incentives for its gauge. You must finish the recording between 60-90 minutes after you start it."),Ie(),Ie(),Ae(6,"div",1),kt(7),Ie(),Ae(8,"div",1),Ae(9,"div",3),Ae(10,"div",4),kt(11," This action usually should not be taken by regular users. "),Ie(),Ie(),Ie(),it(12,yfe,3,2,"ng-container",5),it(13,bfe,3,0,"div",6),Ie()),2&e&&(dt(7),Pr(" Current state: ",r.poorOracleState," "),dt(5),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[La],styles:[""]}));const OV=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function xfe(n,t){if(1&n&&qn(0,"img",60),2&n){const e=an();qu("src",e.pool.token0.iconPath,Pi),_l("alt","",e.pool.token0.symbol," Icon"),Mt("ngClass",vc(3,OV,e.pool.token0.symbol.includes("PYT"),e.pool.token0.symbol.includes("NYT")))}}function Efe(n,t){1&n&&qn(0,"span",61)}function Tfe(n,t){if(1&n&&qn(0,"img",60),2&n){const e=an();qu("src",e.pool.token1.iconPath,Pi),_l("alt","",e.pool.token1.symbol," Icon"),Mt("ngClass",vc(3,OV,e.pool.token1.symbol.includes("PYT"),e.pool.token1.symbol.includes("NYT")))}}function Afe(n,t){1&n&&qn(0,"span",61)}function Ife(n,t){if(1&n&&(Ae(0,"div",62),Ae(1,"h1",63),kt(2),Ie(),Ie()),2&n){const e=an();dt(2),cu(" ",e.pool.token0.symbol,"/",e.pool.token1.symbol," ")}}function Sfe(n,t){1&n&&qn(0,"span",64)}function kfe(n,t){if(1&n&&(Ae(0,"span",65),Ae(1,"h3",66),kt(2),Ie(),Ie()),2&n){const e=an();dt(2),Pr(" ",e.pool.fee/1e4,"% ")}}const DV=function(n,t){return{"border-pyt-xxs":n,"border-nyt-xxs":t}};function Cfe(n,t){if(1&n&&(Ae(0,"span",67),Ae(1,"div",68),qn(2,"img",69),Ie(),Ae(3,"h4",70),kt(4),Ie(),Ie()),2&n){const e=an();dt(2),qu("src",e.pool.token0.iconPath,Pi),_l("alt","",e.pool.token0.symbol," Icon"),Mt("ngClass",vc(6,DV,e.pool.token0.symbol.includes("PYT"),e.pool.token0.symbol.includes("NYT"))),dt(2),Lc(" 1 ",e.pool.token0.symbol," = ",e.pool.token1Price.gt(1)?e.pool.token1Price.toFormat(4):e.pool.token1Price.toPrecision(4)," ",e.pool.token1.symbol," ")}}function Mfe(n,t){1&n&&qn(0,"span",71)}function Ofe(n,t){if(1&n&&(Ae(0,"span",67),Ae(1,"div",68),qn(2,"img",69),Ie(),Ae(3,"h4",70),kt(4),Ie(),Ie()),2&n){const e=an();dt(2),qu("src",e.pool.token1.iconPath,Pi),_l("alt","",e.pool.token1.symbol," Icon"),Mt("ngClass",vc(6,DV,e.pool.token1.symbol.includes("PYT"),e.pool.token1.symbol.includes("NYT"))),dt(2),Lc(" 1 ",e.pool.token1.symbol," = ",e.pool.token0Price.gt(1)?e.pool.token0Price.toFormat(4):e.pool.token0Price.toPrecision(4)," ",e.pool.token0.symbol," ")}}function Dfe(n,t){1&n&&qn(0,"span",71)}function Pfe(n,t){if(1&n&&(Ae(0,"a",72),kt(1," Info "),qn(2,"i",73),Ie()),2&n){const e=an();V1("href","https://info.uniswap.org/#/",e.chain.metadata[e.pool.chainId].displayName.toLowerCase(),"/pools/",e.pool.address.toLowerCase(),"",Pi)}}function Rfe(n,t){1&n&&(Ae(0,"mat-header-cell",74),kt(1,"#"),Ie())}function Nfe(n,t){if(1&n&&(Ae(0,"mat-cell",75),Ae(1,"h6",76),kt(2,"#"),Ie(),Ae(3,"div",53),kt(4),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),Pr(" ",r.bunniTokens.indexOf(e)+1," ")}}function Bfe(n,t){1&n&&(Ae(0,"mat-header-cell",77),kt(1,"Range"),Ie())}function Ffe(n,t){1&n&&(Qr(0),kt(1," Full Range "),Wr())}function Lfe(n,t){if(1&n&&(Qr(0),Ae(1,"span",80),Ae(2,"h4",81),kt(3),qn(4,"i",82),kt(5),Ie(),Ie(),Wr()),2&n){const e=an().$implicit,r=an();dt(3),Pr(" ",r.util.minTick(e.tickLower,r.pool.fee)?"0":e.minPrice.gt(1)?e.minPrice.toFormat(4):e.minPrice.toPrecision(4)," "),dt(2),Pr(" ",r.util.maxTick(e.tickUpper,r.pool.fee)?"\u221e":e.maxPrice.gt(1)?e.maxPrice.toFormat(4):e.maxPrice.toPrecision(4)," ")}}function Ufe(n,t){if(1&n&&(Ae(0,"mat-cell",78),Ae(1,"h6",76),kt(2,"Range"),Ie(),Ae(3,"div",79),it(4,Ffe,2,0,"ng-container",52),it(5,Lfe,6,2,"ng-container",52),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),Mt("ngIf",r.util.fullRange(e.tickLower,e.tickUpper,r.pool.fee)),dt(1),Mt("ngIf",!r.util.fullRange(e.tickLower,e.tickUpper,r.pool.fee))}}function jfe(n,t){1&n&&(Ae(0,"mat-header-cell",83),kt(1," TVL "),Ie())}function Vfe(n,t){if(1&n&&(Ae(0,"mat-cell",84),Ae(1,"h6",76),kt(2,"TVL"),Ie(),Ae(3,"div",79),kt(4),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),cu(" $",r.util.formatBN(e.reserve)[0].toFixed(2),"",r.util.formatBN(e.reserve)[1]," ")}}function Hfe(n,t){1&n&&(Ae(0,"mat-header-cell",85),kt(1," APR "),Ie())}function $fe(n,t){if(1&n&&(Qr(0),kt(1),qn(2,"i",88),kt(3),qn(4,"i",89),Wr()),2&n){const e=an().$implicit,r=nr(7);dt(1),Pr(" ",e.swapAPR.plus(e.stakingAPR).plus(e.rewardTokenAPR).plus(e.thisPeriodMinRewardAPR).toFixed(2),"% "),dt(2),Pr(" ",e.swapAPR.plus(e.stakingAPR).plus(e.rewardTokenAPR).plus(e.thisPeriodMaxRewardAPR).toFixed(2),"% "),dt(1),Mt("ngbTooltip",r)}}function Wfe(n,t){if(1&n&&(Qr(0),kt(1),qn(2,"i",90),Wr()),2&n){const e=an().$implicit,r=nr(7);dt(1),Pr(" ",e.swapAPR.plus(e.stakingAPR).toFixed(2),"% "),dt(1),Mt("ngbTooltip",r)}}function Gfe(n,t){if(1&n&&(Ae(0,"div",92),Ae(1,"span",93),kt(2),Ie(),Ae(3,"span"),kt(4),Ie(),Ie()),2&n){const e=an(2).$implicit,r=an();dt(2),Pr("",r.lst.isLst(r.pool.token0)?r.pool.token0.symbol:r.pool.token1.symbol," APR:"),dt(2),Pr("",e.stakingAPR.toFixed(2),"%")}}function zfe(n,t){if(1&n&&(Ae(0,"div",92),Ae(1,"span",93),kt(2),Ie(),Ae(3,"span"),kt(4),Ie(),Ie()),2&n){const e=an().$implicit;dt(2),Pr("",e.symbol," APR:"),dt(2),Pr("",e.rewardAPR.toFixed(2),"%")}}function qfe(n,t){if(1&n&&(Qr(0),it(1,zfe,5,2,"div",94),Wr()),2&n){const e=t.$implicit;dt(1),Mt("ngIf",e.rewardAPR.gt(0))}}function Kfe(n,t){if(1&n&&(Qr(0),it(1,qfe,2,1,"ng-container",95),Wr()),2&n){const e=an(2).$implicit;dt(1),Mt("ngForOf",e.gauge.rewardTokens)}}function Zfe(n,t){if(1&n&&(Qr(0),Ae(1,"div",92),Ae(2,"span",93),kt(3,"Reward APR:"),Ie(),Ie(),Ae(4,"div",92),Ae(5,"span",96),kt(6,"Min:"),Ie(),Ae(7,"span"),kt(8),Ie(),Ie(),Ae(9,"div",92),Ae(10,"span",96),kt(11,"Max:"),Ie(),Ae(12,"span"),kt(13),Ie(),Ie(),Wr()),2&n){const e=an(2).$implicit;dt(8),Pr("",e.thisPeriodMinRewardAPR.toFixed(2),"%"),dt(5),Pr("",e.thisPeriodMaxRewardAPR.toFixed(2),"%")}}function Yfe(n,t){if(1&n&&(Ae(0,"div",91),Ae(1,"div",92),Ae(2,"span",93),kt(3,"Swap APR:"),Ie(),Ae(4,"span"),kt(5),Ie(),Ie(),it(6,Gfe,5,2,"div",94),it(7,Kfe,2,1,"ng-container",52),it(8,Zfe,14,2,"ng-container",52),Ie()),2&n){const e=an().$implicit;dt(5),Pr("",e.swapAPR.toFixed(2),"%"),dt(1),Mt("ngIf",e.stakingAPR.gt(0)),dt(1),Mt("ngIf",e.gauge),dt(1),Mt("ngIf",e.gauge)}}function Jfe(n,t){if(1&n&&(Ae(0,"mat-cell",86),Ae(1,"h6",76),kt(2,"APR"),Ie(),Ae(3,"div",79),it(4,$fe,5,3,"ng-container",52),it(5,Wfe,3,2,"ng-container",52),it(6,Yfe,9,4,"ng-template",null,87,xu),Ie(),Ie()),2&n){const e=t.$implicit;dt(4),Mt("ngIf",e.gauge),dt(1),Mt("ngIf",!e.gauge)}}function Xfe(n,t){1&n&&qn(0,"mat-header-row",97)}const Qfe=function(n){return{"bg-gray-600":n}};function e0e(n,t){if(1&n){const e=Di();Ae(0,"mat-row",98),dr("click",function(){const p=Ur(e).$implicit;return an().selectBunniToken(p)}),Ie()}if(2&n){const e=t.$implicit,r=an();Mt("ngClass",Ic(1,Qfe,(null==r.selectedBunniToken?null:r.selectedBunniToken.address)===e.address))}}function t0e(n,t){if(1&n){const e=Di();Ae(0,"div",99),Ae(1,"button",100),dr("click",function(){return Ur(e),an().paginateBunniTokens(!1,!0)}),Ie(),Ae(2,"div",101),kt(3),Ie(),Ae(4,"button",102),dr("click",function(){return Ur(e),an().paginateBunniTokens(!0,!1)}),Ie(),Ie()}if(2&n){const e=an();dt(1),Mt("disabled",0===e.index),dt(2),cu(" Page ",e.index+1," of ",e.maxIndex," "),dt(1),Mt("disabled",e.index===e.maxIndex-1)}}function n0e(n,t){1&n&&(Qr(0),Ae(1,"div",103),Ae(2,"p",104),qn(3,"span",105),Ie(),Ae(4,"p",106),qn(5,"span",107),Ie(),Ae(6,"p",108),qn(7,"span",109),Ie(),Ae(8,"p",108),qn(9,"span",110),Ie(),Ie(),Wr())}const r0e=function(){return[]};function i0e(n,t){1&n&&(Ae(0,"div",53),Qr(1),it(2,n0e,10,0,"ng-container",95),Wr(),Ie()),2&n&&(dt(2),Mt("ngForOf",sf(1,r0e).constructor(5)))}function s0e(n,t){1&n&&(Ae(0,"div",111),Ae(1,"div",112),Ae(2,"div",53),qn(3,"h1",113),Ie(),Ae(4,"div",53),Ae(5,"h3"),kt(6,"Select a Price Range"),Ie(),Ie(),Ie(),Ie())}function o0e(n,t){if(1&n&&qn(0,"app-zap-in",122),2&n){const e=an(3);Mt("pool",e.pool)("token0",e.pool.token0)("token1",e.pool.token1)("slippage",50)("deadline",3600)("bunniToken",e.selectedBunniToken)}}function a0e(n,t){1&n&&(Ae(0,"li",118),Ae(1,"a",119),kt(2,"Zap"),Ie(),it(3,o0e,1,6,"ng-template",120),Ie()),2&n&&Mt("ngbNavItem",0)}function u0e(n,t){if(1&n&&qn(0,"app-add-liquidity",122),2&n){const e=an(2);Mt("pool",e.pool)("token0",e.pool.token0)("token1",e.pool.token1)("slippage",50)("deadline",3600)("bunniToken",e.selectedBunniToken)}}function c0e(n,t){if(1&n&&qn(0,"app-remove-liquidity",122),2&n){const e=an(2);Mt("pool",e.pool)("token0",e.pool.token0)("token1",e.pool.token1)("slippage",50)("deadline",3600)("bunniToken",e.selectedBunniToken)}}function l0e(n,t){if(1&n&&qn(0,"app-stake",123),2&n){const e=an(3);Mt("bunniToken",e.selectedBunniToken)("gaugeToken",e.selectedBunniToken.gauge)}}function d0e(n,t){1&n&&(Ae(0,"li",118),Ae(1,"a",119),kt(2,"Stake"),Ie(),it(3,l0e,1,2,"ng-template",120),Ie()),2&n&&Mt("ngbNavItem",3)}function f0e(n,t){if(1&n&&qn(0,"app-unstake",123),2&n){const e=an(3);Mt("bunniToken",e.selectedBunniToken)("gaugeToken",e.selectedBunniToken.gauge)}}function h0e(n,t){1&n&&(Ae(0,"li",118),Ae(1,"a",119),kt(2,"Unstake"),Ie(),it(3,f0e,1,2,"ng-template",120),Ie()),2&n&&Mt("ngbNavItem",4)}function p0e(n,t){1&n&&qn(0,"app-claim",124),2&n&&Mt("bunniToken",an(3).selectedBunniToken)}function m0e(n,t){1&n&&(Ae(0,"li",118),Ae(1,"a",119),kt(2,"Claim"),Ie(),it(3,p0e,1,1,"ng-template",120),Ie()),2&n&&Mt("ngbNavItem",5)}function g0e(n,t){if(1&n&&qn(0,"app-deploy",126),2&n){const e=an(4);Mt("pool",e.pool)("bunniToken",e.selectedBunniToken)}}function y0e(n,t){if(1&n&&qn(0,"app-kill",126),2&n){const e=an(4);Mt("pool",e.pool)("bunniToken",e.selectedBunniToken)}}function b0e(n,t){if(1&n&&(it(0,g0e,1,2,"app-deploy",125),it(1,y0e,1,2,"app-kill",125)),2&n){const e=an(3);Mt("ngIf",!e.selectedBunniToken.gauge||!e.selectedBunniToken.gauge.rootGaugeDeployed||!e.selectedBunniToken.gauge.childGaugeDeployed),dt(1),Mt("ngIf",e.selectedBunniToken.gauge&&e.selectedBunniToken.gauge.rootGaugeDeployed&&e.selectedBunniToken.gauge.childGaugeDeployed)}}function v0e(n,t){1&n&&(Ae(0,"li",118),Ae(1,"a",119),kt(2,"Advanced"),Ie(),it(3,b0e,2,2,"ng-template",120),Ie()),2&n&&Mt("ngbNavItem",6)}function _0e(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",114),Ae(2,"ul",115,116),dr("activeIdChange",function(s){return Ur(e),an().selectedTab=s}),it(4,a0e,4,1,"li",117),Ae(5,"li",118),Ae(6,"a",119),kt(7,"Add\xa0Liquidity"),Ie(),it(8,u0e,1,6,"ng-template",120),Ie(),Ae(9,"li",118),Ae(10,"a",119),kt(11,"Remove\xa0Liquidity"),Ie(),it(12,c0e,1,6,"ng-template",120),Ie(),it(13,d0e,4,1,"li",117),it(14,h0e,4,1,"li",117),it(15,m0e,4,1,"li",117),it(16,v0e,4,1,"li",117),Ie(),Ie(),Ae(17,"div",111),qn(18,"div",121),Ie(),Wr()}if(2&n){const e=nr(3),r=an();dt(2),Mt("activeId",r.selectedTab)("animation",!1),dt(2),Mt("ngIf",r.chain.zapSupported(r.pool.chainId)),dt(1),Mt("ngbNavItem",1),dt(4),Mt("ngbNavItem",2),dt(4),Mt("ngIf",r.selectedBunniToken.gauge),dt(1),Mt("ngIf",r.selectedBunniToken.gauge),dt(1),Mt("ngIf",r.selectedBunniToken.gauge),dt(1),Mt("ngIf",r.enableAdvanced),dt(2),Mt("ngbNavOutlet",e)}}const PV=function(){return["rank","range","tvl","apr"]},oI=class{constructor(t,e,r,s,p,F,q,te,fe){yt(this,"activatedRoute"),yt(this,"chain"),yt(this,"contract"),yt(this,"lst"),yt(this,"pool_service"),yt(this,"router"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"PAGE_SIZE",5),yt(this,"pool"),yt(this,"bunniTokens"),yt(this,"paginatedBunniTokens"),yt(this,"selectedBunniToken"),yt(this,"index"),yt(this,"maxIndex"),yt(this,"selectedTab"),yt(this,"enableAdvanced"),yt(this,"pools_subscription"),this.activatedRoute=t,this.chain=e,this.contract=r,this.lst=s,this.pool_service=p,this.router=F,this.store=q,this.util=te,this.wallet=fe}ngOnInit(){var t=this;this.resetData(),this.pools_subscription=this.store.pools_observable.subscribe(function(){var e=(0,Br.Z)(function*(r){const s=t.activatedRoute.snapshot.paramMap.get("chainSlug"),p=t.chain.slugToId(s),F=t.activatedRoute.snapshot.paramMap.get("poolId"),q=t.activatedRoute.snapshot.paramMap.get("bunniId"),te=r[t.util.id(F,p)];if(!t.store.getStatus(p).match("success"))return;if(!te)return void(t.pool=yield t.pool_service.uniswap(F,p));const fe=te.bunniTokens;if(fe.sort((Re,$e)=>Re.reserve.gt($e.reserve)?-1:1),t.pool=te,t.bunniTokens=fe,t.maxIndex=Math.ceil(t.bunniTokens.length/t.PAGE_SIZE),t.selectedTab=t.chain.zapSupported(t.pool.chainId)?0:1,t.paginateBunniTokens(),q&&!t.selectedBunniToken){const Re=fe.find($e=>$e.address===q);t.selectBunniToken(Re)}t.enableAdvanced=t.pool&&(t.chain.isMainnet(t.pool.chainId)||t.chain.isTestnet(t.pool.chainId))?!!qU[t.pool.chainId]:!!j_[t.chain.id.ETHEREUM]&&!!My[t.pool.chainId]});return function(r){return e.apply(this,arguments)}}())}ngOnDestroy(){this.pools_subscription.unsubscribe()}resetData(){this.pool=null,this.bunniTokens=[],this.paginatedBunniTokens=[],this.selectedBunniToken=null,this.index=0,this.maxIndex=0,this.selectedTab=0,this.enableAdvanced=!1}selectBunniToken(t){var e=this;return(0,Br.Z)(function*(){e.selectedBunniToken=t;const r=e.activatedRoute.snapshot.paramMap.get("chainSlug");e.router.navigate([`/pools/${r}/${e.pool.address}/${t.address}`],{replaceUrl:!0})})()}paginateBunniTokens(t,e){t&&(this.index=this.index+1),e&&(this.index=this.index-1),this.paginatedBunniTokens=this.bunniTokens.slice(this.index*this.PAGE_SIZE,(this.index+1)*this.PAGE_SIZE)}addRange(){const t=this.activatedRoute.snapshot.paramMap.get("chainSlug");this.router.navigate([`/add/${t}`],{queryParams:{tokenA:`${this.pool.token0.address}`,tokenB:`${this.pool.token1.address}`,fee:`${this.pool.fee}`}})}};let yw=oI;yt(yw,"\u0275fac",function(e){return new(e||oI)(Xt(ky),Xt(dc),Xt(ud),Xt(C5),Xt(Q_),Xt(_0),Xt(el),Xt($c),Xt(Xa))}),yt(yw,"\u0275cmp",bn({type:oI,selectors:[["app-pool"]],decls:66,vars:24,consts:[[1,"container","py-4"],[1,"row","justify-content-center"],[1,"col-12","col-lg-12"],[1,"row","mb-5"],[1,"col","d-flex"],["routerLink","/pools",1,"clickable","text-muted","navigation"],[1,"fe","fe-chevron-right","text-muted"],["class","",4,"ngIf"],["class","col-1 placeholder placeholder-wave border rounded-pill",4,"ngIf"],[1,"col-auto"],["target","_blank","rel","noopener noreferrer",3,"href",4,"ngIf"],[1,"row","align-items-center","justify-content-between"],[1,"col"],[1,"d-flex","align-items-center","justify-content-start"],[1,"avatar-group"],[1,"avatar","avatar-sm"],["class","avatar-img rounded-circle","onerror","this.src = 'assets/img/tokens/unknown.svg'",3,"src","alt","ngClass",4,"ngIf"],["class","avatar-img placeholder placeholder-wave placeholder-lg border rounded-circle",4,"ngIf"],["class","mx-2 col-auto",4,"ngIf"],["class","col-2 placeholder placeholder-wave placeholder-lg border rounded-pill mx-2",4,"ngIf"],["class","badge bg-dark rounded-1 border",4,"ngIf"],[1,"row","g-3","align-items-center","justify-content-between","my-3"],[1,"col-12","col-lg"],[1,"d-grid","gap-2","d-lg-flex","align-items-lg-center","justify-content-lg-start"],["class","d-flex badge badge-pill bg-gray-600 rounded-1 text-white py-2 px-3",4,"ngIf"],["class","col-12 col-lg-2 placeholder placeholder-wave placeholder-lg border rounded-pill me-2",4,"ngIf"],[1,"d-grid","gap-2","d-md-flex","align-items-md-center","justify-content-md-end"],["class","btn btn-sm btn-white fw-bold","target","_blank","rel","noopener noreferrer",3,"href",4,"ngIf"],["type","button",1,"btn","btn-sm","btn-shadow-rainbow","position-relative","fw-bold","text-dark","ms-md-3",3,"click"],[1,"align-items-center","justify-content-between"],[1,"d-lg-flex"],[1,"mb-3","mb-lg-0","pe-lg-2","col-12","col-lg-6"],[1,"card","card-inner-shadow","m-0"],[1,"card-body","p-0"],[1,"",3,"dataSource"],["matColumnDef","rank"],["class","col-auto px-0 pe-3 d-none d-lg-flex",4,"matHeaderCellDef"],["class","col-auto px-0 pe-3 text-muted d-block d-lg-flex mb-2 mb-lg-0",4,"matCellDef"],["matColumnDef","range"],["class","col px-0 d-none d-lg-flex",4,"matHeaderCellDef"],["class","col-lg px-0 d-block d-lg-flex mb-2 mb-lg-0",4,"matCellDef"],["matColumnDef","tvl"],["class","col-12 col-lg-2 px-0 d-flex align-items-center justify-content-end d-none d-lg-flex",4,"matHeaderCellDef"],["class","col-12 col-lg-2 px-0 d-block d-lg-flex align-items-center justify-content-lg-end",4,"matCellDef"],["matColumnDef","apr"],["class","col-12 col-lg px-0 d-flex align-items-center justify-content-end d-none d-lg-flex",4,"matHeaderCellDef"],["class","col-12 col-lg px-0 d-block d-lg-flex align-items-center justify-content-lg-end",4,"matCellDef"],["class","border border-0 border-bottom pt-0 px-4 text-muted d-none d-lg-flex",4,"matHeaderRowDef"],["class","row border-bottom clickable text-white mx-0 px-4 pt-4 pt-lg-2 pb-0 my-0",3,"ngClass","click",4,"matRowDef","matRowDefColumns"],["class","d-flex align-items-center justify-content-center border-top py-2",4,"ngIf"],[1,"ps-lg-2","col-12","col-lg-6"],["class","card-body",4,"ngIf"],[4,"ngIf"],[1,""],[1,"col-1","placeholder","placeholder-wave","border","rounded-pill"],["target","_blank","rel","noopener noreferrer",3,"href"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 293.775 293.667"],["id","etherscan-logo-light-circle","transform","translate(-219.378 -213.333)"],["id","Path_1","data-name","Path 1","d","M280.433,353.152A12.45,12.45,0,0,1,292.941,340.7l20.737.068a12.467,12.467,0,0,1,12.467,12.467v78.414c2.336-.692,5.332-1.43,8.614-2.2a10.389,10.389,0,0,0,8.009-10.11V322.073a12.469,12.469,0,0,1,12.467-12.47h20.779a12.47,12.47,0,0,1,12.467,12.47v90.276s5.2-2.106,10.269-4.245a10.408,10.408,0,0,0,6.353-9.577V290.9a12.466,12.466,0,0,1,12.465-12.467h20.779A12.468,12.468,0,0,1,450.815,290.9v88.625c18.014-13.055,36.271-28.758,50.759-47.639a20.926,20.926,0,0,0,3.185-19.537,146.6,146.6,0,0,0-136.644-99.006c-81.439-1.094-148.744,65.385-148.736,146.834a146.371,146.371,0,0,0,19.5,73.45,18.56,18.56,0,0,0,17.707,9.173c3.931-.346,8.825-.835,14.643-1.518a10.383,10.383,0,0,0,9.209-10.306V353.152","transform","translate(0 0)","fill","#fff"],["id","Path_2","data-name","Path 2","d","M244.417,398.641A146.808,146.808,0,0,0,477.589,279.9c0-3.381-.157-6.724-.383-10.049-53.642,80-152.686,117.405-232.79,128.793","transform","translate(35.564 80.269)","fill","#bfcfda"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle",3,"src","alt","ngClass"],[1,"avatar-img","placeholder","placeholder-wave","placeholder-lg","border","rounded-circle"],[1,"mx-2","col-auto"],[1,"mb-0","col-auto"],[1,"col-2","placeholder","placeholder-wave","placeholder-lg","border","rounded-pill","mx-2"],[1,"badge","bg-dark","rounded-1","border"],[1,"mb-0"],[1,"d-flex","badge","badge-pill","bg-gray-600","rounded-1","text-white","py-2","px-3"],[1,"avatar","avatar-xxs","me-2"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","p-0","rounded-circle",3,"src","alt","ngClass"],[1,"d-flex","align-items-center","fw-normal","mb-0"],[1,"col-12","col-lg-2","placeholder","placeholder-wave","placeholder-lg","border","rounded-pill","me-2"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-sm","btn-white","fw-bold",3,"href"],[1,"fe","fe-external-link"],[1,"col-auto","px-0","pe-3","d-none","d-lg-flex"],[1,"col-auto","px-0","pe-3","text-muted","d-block","d-lg-flex","mb-2","mb-lg-0"],[1,"text-muted","text-uppercase","d-block","d-lg-none","mb-2"],[1,"col","px-0","d-none","d-lg-flex"],[1,"col-lg","px-0","d-block","d-lg-flex","mb-2","mb-lg-0"],[1,"d-flex","align-items-center"],[1,"d-flex","badge","badge-pill","bg-gray-400","rounded-1","text-white","py-2","px-3","me-2"],[1,"d-flex","align-items-center","fw-normal","mb-0","me-1"],[1,"fe","fe-code","mx-2"],[1,"col-12","col-lg-2","px-0","d-flex","align-items-center","justify-content-end","d-none","d-lg-flex"],[1,"col-12","col-lg-2","px-0","d-block","d-lg-flex","align-items-center","justify-content-lg-end"],[1,"col-12","col-lg","px-0","d-flex","align-items-center","justify-content-end","d-none","d-lg-flex"],[1,"col-12","col-lg","px-0","d-block","d-lg-flex","align-items-center","justify-content-lg-end"],["aprBreakdown",""],[1,"fe","fe-arrow-right","mx-1"],[1,"fe","fe-zap","ms-1","text-bg-gradient",3,"ngbTooltip"],["tooltipClass","custom-tooltip",1,"fe","fe-info","ms-1",3,"ngbTooltip"],[1,"d-flex","flex-column"],[1,"d-flex","justify-content-between"],[1,"me-5"],["class","d-flex justify-content-between",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"text-start","mx-3"],[1,"border","border-0","border-bottom","pt-0","px-4","text-muted","d-none","d-lg-flex"],[1,"row","border-bottom","clickable","text-white","mx-0","px-4","pt-4","pt-lg-2","pb-0","my-0",3,"ngClass","click"],[1,"d-flex","align-items-center","justify-content-center","border-top","py-2"],[1,"btn","m-0","fe","fe-arrow-left","text-white","clickable","border-0",3,"disabled","click"],[1,"text-muted"],[1,"btn","m-0","fe","fe-arrow-right","text-white","clickable","border-0",3,"disabled","click"],[1,"d-flex","px-4","p-2"],[1,"col-1","placeholder-wave","py-3","m-0","pe-0"],[1,"placeholder","placeholder-lg","col-4","border","rounded-pill","text-transparent"],[1,"col","placeholder-wave","py-3","m-0"],[1,"placeholder","placeholder-lg","col-8","border","rounded-pill","text-transparent"],[1,"col-2","text-end","placeholder-wave","py-3","m-0"],[1,"placeholder","placeholder-lg","col-12","border","rounded-pill","text-transparent"],[1,"placeholder","placeholder-lg","avatar-xxs","border","rounded-circle","text-transparent"],[1,"card-body"],[1,"d-flex","flex-column","align-items-center","justify-content-center"],[1,"fe","fe-lock","m-0","display-2"],[1,"card-header","border-0"],["ngbNav","",1,"nav","nav-tabs","nav-overflow","border-0",3,"activeId","animation","activeIdChange"],["nav","ngbNav"],["class","nav-item me-2",3,"ngbNavItem",4,"ngIf"],[1,"nav-item","me-2",3,"ngbNavItem"],["ngbNavLink","",1,"nav-link"],["ngbNavContent",""],[3,"ngbNavOutlet"],[3,"pool","token0","token1","slippage","deadline","bunniToken"],[3,"bunniToken","gaugeToken"],[3,"bunniToken"],[3,"pool","bunniToken",4,"ngIf"],[3,"pool","bunniToken"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",4),Ae(5,"div",5),kt(6," Pools "),Ie(),Qr(7),qn(8,"i",6),it(9,vfe,2,3,"div",7),it(10,_fe,1,0,"span",8),Wr(),Ie(),Ae(11,"div",9),it(12,wfe,5,2,"a",10),Ie(),Ie(),Ae(13,"div",11),Ae(14,"div",12),Ae(15,"div",13),Ae(16,"div",14),Ae(17,"div",15),it(18,xfe,1,6,"img",16),it(19,Efe,1,0,"span",17),Ie(),Ae(20,"div",15),it(21,Tfe,1,6,"img",16),it(22,Afe,1,0,"span",17),Ie(),Ie(),Qr(23),it(24,Ife,3,2,"div",18),it(25,Sfe,1,0,"span",19),Wr(),it(26,kfe,3,1,"span",20),Ie(),Ie(),Ie(),Ae(27,"div",21),Ae(28,"div",22),Ae(29,"div",23),it(30,Cfe,5,9,"span",24),it(31,Mfe,1,0,"span",25),it(32,Ofe,5,9,"span",24),it(33,Dfe,1,0,"span",25),Ie(),Ie(),Ae(34,"div",22),Ae(35,"div",26),it(36,Pfe,3,2,"a",27),Ae(37,"button",28),dr("click",function(){return r.addRange()}),kt(38,"Add\xa0Range"),Ie(),Ie(),Ie(),Ie(),Ae(39,"div",29),Ae(40,"div",12),Ae(41,"div",30),Ae(42,"div",31),Ae(43,"div",32),Ae(44,"div",33),Ae(45,"mat-table",34),Qr(46,35),it(47,Rfe,2,0,"mat-header-cell",36),it(48,Nfe,5,1,"mat-cell",37),Wr(),Qr(49,38),it(50,Bfe,2,0,"mat-header-cell",39),it(51,Ufe,6,2,"mat-cell",40),Wr(),Qr(52,41),it(53,jfe,2,0,"mat-header-cell",42),it(54,Vfe,5,2,"mat-cell",43),Wr(),Qr(55,44),it(56,Hfe,2,0,"mat-header-cell",45),it(57,Jfe,8,2,"mat-cell",46),Wr(),it(58,Xfe,1,0,"mat-header-row",47),it(59,e0e,1,3,"mat-row",48),Ie(),it(60,t0e,5,4,"div",49),it(61,i0e,3,2,"div",7),Ie(),Ie(),Ie(),Ae(62,"div",50),Ae(63,"div",32),it(64,s0e,7,0,"div",51),it(65,_0e,19,10,"ng-container",52),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(9),Mt("ngIf",r.pool),dt(1),Mt("ngIf",!r.pool),dt(2),Mt("ngIf",r.pool),dt(6),Mt("ngIf",r.pool),dt(1),Mt("ngIf",!r.pool),dt(2),Mt("ngIf",r.pool),dt(1),Mt("ngIf",!r.pool),dt(2),Mt("ngIf",r.pool),dt(1),Mt("ngIf",!r.pool),dt(1),Mt("ngIf",r.pool),dt(4),Mt("ngIf",r.pool),dt(1),Mt("ngIf",!r.pool),dt(1),Mt("ngIf",r.pool),dt(1),Mt("ngIf",!r.pool),dt(3),Mt("ngIf",r.pool),dt(9),Mt("dataSource",r.paginatedBunniTokens),dt(13),Mt("matHeaderRowDef",sf(22,PV)),dt(1),Mt("matRowDefColumns",sf(23,PV)),dt(1),Mt("ngIf",r.bunniTokens.length>0),dt(1),Mt("ngIf",!r.pool),dt(3),Mt("ngIf",!r.selectedBunniToken),dt(1),Mt("ngIf",r.selectedBunniToken))},directives:[HE,La,cv,Hb,lv,Vb,L5,hv,dh,dv,fv,OM,L0,U5,pv,I_,A_,sE,iE,MM,lw,V5,dw,fw,hw,pw,ST,kT],styles:[""]}));const w0e=["mat-sort-header",""];function x0e(n,t){if(1&n){const e=Di();Ae(0,"div",3),dr("@arrowPosition.start",function(){return Ur(e),an()._disableViewStateAnimation=!0})("@arrowPosition.done",function(){return Ur(e),an()._disableViewStateAnimation=!1}),qn(1,"div",4),Ae(2,"div",5),qn(3,"div",6),qn(4,"div",7),qn(5,"div",8),Ie(),Ie()}if(2&n){const e=an();Mt("@arrowOpacity",e._getArrowViewState())("@arrowPosition",e._getArrowViewState())("@allowChildren",e._getArrowDirectionState()),dt(2),Mt("@indicator",e._getArrowDirectionState()),dt(1),Mt("@leftPointer",e._getArrowDirectionState()),dt(1),Mt("@rightPointer",e._getArrowDirectionState())}}const E0e=["*"],T0e=new fo("MAT_SORT_DEFAULT_OPTIONS"),A0e=hce(mD(class{}));let bw=(()=>{class n extends A0e{constructor(e){super(),this._defaultOptions=e,this.sortables=new Map,this._stateChanges=new ie.xQ,this.start="asc",this._direction="",this.sortChange=new mo}get direction(){return this._direction}set direction(e){this._direction=e}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=q2(e)}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){var r,s,p;if(!e)return"";const F=null!==(s=null!==(r=null==e?void 0:e.disableClear)&&void 0!==r?r:this.disableClear)&&void 0!==s?s:!!(null===(p=this._defaultOptions)||void 0===p?void 0:p.disableClear);let q=function(n,t){let e=["asc","desc"];return"desc"==n&&e.reverse(),t||e.push(""),e}(e.start||this.start,F),te=q.indexOf(this.direction)+1;return te>=q.length&&(te=0),q[te]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return n.\u0275fac=function(e){return new(e||n)(Xt(T0e,8))},n.\u0275dir=Tn({type:n,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[ya,rr]}),n})();const mv=lce.ENTERING+" "+cce.STANDARD_CURVE,H5={indicator:F3("indicator",[K1("active-asc, asc",vf({transform:"translateY(0px)"})),K1("active-desc, desc",vf({transform:"translateY(10px)"})),V2("active-asc <=> active-desc",Bg(mv))]),leftPointer:F3("leftPointer",[K1("active-asc, asc",vf({transform:"rotate(-45deg)"})),K1("active-desc, desc",vf({transform:"rotate(45deg)"})),V2("active-asc <=> active-desc",Bg(mv))]),rightPointer:F3("rightPointer",[K1("active-asc, asc",vf({transform:"rotate(45deg)"})),K1("active-desc, desc",vf({transform:"rotate(-45deg)"})),V2("active-asc <=> active-desc",Bg(mv))]),arrowOpacity:F3("arrowOpacity",[K1("desc-to-active, asc-to-active, active",vf({opacity:1})),K1("desc-to-hint, asc-to-hint, hint",vf({opacity:.54})),K1("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",vf({opacity:0})),V2("* => asc, * => desc, * => active, * => hint, * => void",Bg("0ms")),V2("* <=> *",Bg(mv))]),arrowPosition:F3("arrowPosition",[V2("* => desc-to-hint, * => desc-to-active",Bg(mv,oE([vf({transform:"translateY(-25%)"}),vf({transform:"translateY(0)"})]))),V2("* => hint-to-desc, * => active-to-desc",Bg(mv,oE([vf({transform:"translateY(0)"}),vf({transform:"translateY(25%)"})]))),V2("* => asc-to-hint, * => asc-to-active",Bg(mv,oE([vf({transform:"translateY(25%)"}),vf({transform:"translateY(0)"})]))),V2("* => hint-to-asc, * => active-to-asc",Bg(mv,oE([vf({transform:"translateY(0)"}),vf({transform:"translateY(-25%)"})]))),K1("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",vf({transform:"translateY(0)"})),K1("hint-to-desc, active-to-desc, desc",vf({transform:"translateY(-25%)"})),K1("hint-to-asc, active-to-asc, asc",vf({transform:"translateY(25%)"}))]),allowChildren:F3("allowChildren",[V2("* <=> *",[QQ("@*",XQ(),{optional:!0})])])};let CT=(()=>{class n{constructor(){this.changes=new ie.xQ}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=we({factory:function(){return new n},token:n,providedIn:"root"}),n})();const k0e={provide:CT,deps:[[new Bl,new qc,CT]],useFactory:function(n){return n||new CT}},C0e=mD(class{});let MT=(()=>{class n extends C0e{constructor(e,r,s,p,F,q,te){super(),this._intl=e,this._changeDetectorRef=r,this._sort=s,this._columnDef=p,this._focusMonitor=F,this._elementRef=q,this._ariaDescriber=te,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",this._handleStateChanges()}get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=q2(e)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector('[role="button"]'),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{const r=!!e;r!==this._showIndicatorHint&&(this._setIndicatorHintVisible(r),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(e){this._isDisabled()&&e||(this._showIndicatorHint=e,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(e){this._viewState=e||{},this._disableViewStateAnimation&&(this._viewState={toState:e.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(e){!this._isDisabled()&&(32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const e=this._viewState.fromState;return(e?`${e}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){var r,s;this._sortButton&&(null===(r=this._ariaDescriber)||void 0===r||r.removeDescription(this._sortButton,this._sortActionDescription),null===(s=this._ariaDescriber)||void 0===s||s.describe(this._sortButton,e)),this._sortActionDescription=e}_handleStateChanges(){this._rerenderSubscription=(0,E.T)(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return n.\u0275fac=function(e){return new(e||n)(Xt(CT),Xt(yf),Xt(bw,8),Xt("MAT_SORT_HEADER_COLUMN_DEF",8),Xt(cV),Xt(wa),Xt(Lue,8))},n.\u0275cmp=bn({type:n,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(e,r){1&e&&dr("click",function(){return r._handleClick()})("keydown",function(p){return r._handleKeydown(p)})("mouseenter",function(){return r._setIndicatorHintVisible(!0)})("mouseleave",function(){return r._setIndicatorHintVisible(!1)}),2&e&&(Cu("aria-sort",r._getAriaSortAttribute()),ks("mat-sort-header-disabled",r._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",sortActionDescription:"sortActionDescription",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[ya],attrs:w0e,ngContentSelectors:E0e,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(e,r){1&e&&(Pp(),Ae(0,"div",0),Ae(1,"div",1),ih(2),Ie(),it(3,x0e,6,6,"div",2),Ie()),2&e&&(ks("mat-sort-header-sorted",r._isSorted())("mat-sort-header-position-before","before"==r.arrowPosition),Cu("tabindex",r._isDisabled()?null:0),dt(3),Mt("ngIf",r._renderArrow()))},directives:[La],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[H5.indicator,H5.leftPointer,H5.rightPointer,H5.arrowOpacity,H5.arrowPosition,H5.allowChildren]},changeDetection:0}),n})(),M0e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Un({type:n}),n.\u0275inj=Te({providers:[k0e],imports:[[h1,jb]]}),n})();function O0e(n,t){1&n&&(Ae(0,"mat-header-cell",29),kt(1," # "),Ie())}function D0e(n,t){if(1&n&&(Ae(0,"mat-cell",30),kt(1),Ie()),2&n){const e=t.$implicit,r=an();dt(1),Pr(" ",r.filteredPools.indexOf(e)+1," ")}}function P0e(n,t){1&n&&(Ae(0,"mat-header-cell",31),kt(1,"Pool"),Ie())}const RV=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function R0e(n,t){if(1&n&&(Ae(0,"mat-cell",32),Ae(1,"div",33),Ae(2,"div",34),Ae(3,"div",35),qn(4,"img",36),Ie(),Ae(5,"div",35),qn(6,"img",36),Ie(),Ie(),Ae(7,"div",37),kt(8),Ie(),Ae(9,"span",38),kt(10),Ie(),qn(11,"span",39),Ie(),Ie()),2&n){const e=t.$implicit;dt(4),qu("src",e.token0.iconPath,Pi),_l("alt","",e.token0.symbol," Icon"),Mt("ngClass",vc(9,RV,e.token0.symbol.includes("PYT"),e.token0.symbol.includes("NYT"))),dt(2),qu("src",e.token1.iconPath,Pi),_l("alt","",e.token1.symbol," Icon"),Mt("ngClass",vc(12,RV,e.token1.symbol.includes("PYT"),e.token1.symbol.includes("NYT"))),dt(2),cu(" ",e.token0.symbol,"/",e.token1.symbol," "),dt(2),Pr(" ",e.fee/1e4,"% ")}}function N0e(n,t){1&n&&(Ae(0,"mat-header-cell",40),kt(1," TVL "),Ie())}function B0e(n,t){if(1&n&&(Ae(0,"mat-cell",41),Ae(1,"h6",42),kt(2,"TVL"),Ie(),Ae(3,"div",43),kt(4),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),cu("$",r.util.formatBN(e.reserve)[0].toFixed(2),"",r.util.formatBN(e.reserve)[1],"")}}function F0e(n,t){1&n&&(Ae(0,"mat-header-cell",40),kt(1," Vol 24h "),Ie())}function L0e(n,t){if(1&n&&(Ae(0,"mat-cell",41),Ae(1,"h6",42),kt(2,"Vol 24h"),Ie(),Ae(3,"div",43),kt(4),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),cu("$",r.util.formatBN(e.volume)[0].toFixed(2),"",r.util.formatBN(e.volume)[1],"")}}function U0e(n,t){1&n&&(Ae(0,"mat-header-cell",40),kt(1," Fees 24h "),Ie())}function j0e(n,t){if(1&n&&(Ae(0,"mat-cell",41),Ae(1,"h6",42),kt(2,"Fees 24h"),Ie(),Ae(3,"div",43),kt(4),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),cu("$",r.util.formatBN(e.fees)[0].toFixed(2),"",r.util.formatBN(e.fees)[1],"")}}function V0e(n,t){1&n&&qn(0,"mat-header-row",44)}function H0e(n,t){if(1&n){const e=Di();Ae(0,"mat-row",45),dr("click",function(){const p=Ur(e).$implicit;return an().focusPool(p)}),Ie()}}function $0e(n,t){1&n&&(Qr(0),Ae(1,"h3",48),kt(2," No pools found "),Ie(),Wr())}function W0e(n,t){1&n&&(Qr(0),Ae(1,"div",50),Ae(2,"p",51),qn(3,"span",52),Ie(),Ae(4,"p",53),qn(5,"span",54),Ie(),Ae(6,"p",55),qn(7,"span",54),Ie(),Ae(8,"p",55),qn(9,"span",54),Ie(),Ae(10,"p",55),qn(11,"span",54),Ie(),Ie(),Wr())}const G0e=function(){return[]};function z0e(n,t){1&n&&(Qr(0),it(1,W0e,12,0,"ng-container",49),Wr()),2&n&&(dt(1),Mt("ngForOf",sf(1,G0e).constructor(10)))}function q0e(n,t){if(1&n&&(Ae(0,"div",46),it(1,$0e,3,0,"ng-container",47),it(2,z0e,2,2,"ng-container",47),Ie()),2&n){const e=an();dt(1),Mt("ngIf",e.pools.length>0),dt(1),Mt("ngIf",0===e.pools.length)}}function K0e(n,t){if(1&n){const e=Di();Ae(0,"div",56),Ae(1,"button",57),dr("click",function(){return Ur(e),an().paginatePools(!1,!0)}),Ie(),Ae(2,"div",58),kt(3),Ie(),Ae(4,"button",59),dr("click",function(){return Ur(e),an().paginatePools(!0,!1)}),Ie(),Ie()}if(2&n){const e=an();dt(1),Mt("disabled",0===e.index),dt(2),cu(" Page ",e.index+1," of ",e.maxIndex," "),dt(1),Mt("disabled",e.index===e.maxIndex-1)}}const NV=function(){return["rank","assets","reserve","volume","fees"]},aI=class{constructor(t,e,r,s,p,F){yt(this,"route"),yt(this,"router"),yt(this,"chain"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"PAGE_SIZE",10),yt(this,"index"),yt(this,"maxIndex"),yt(this,"pools_subscription"),yt(this,"pools"),yt(this,"filteredPools"),yt(this,"paginatedPools"),this.route=t,this.router=e,this.chain=r,this.store=s,this.util=p,this.wallet=F}ngOnInit(){this.reset(),this.pools_subscription=this.store.pools_observable.subscribe(t=>{if(!this.store.getStatus(this.wallet.chainId).match("success"))return;const e=Object.values(t).filter(r=>r.chainId===this.wallet.chainId);e.sort((r,s)=>r.reserve.gt(s.reserve)?-1:1),this.pools=e,this.filterPools(),this.paginatePools()})}ngOnDestroy(){this.pools_subscription.unsubscribe()}reset(){this.index=0,this.maxIndex=0,this.pools=[],this.filteredPools=[],this.paginatedPools=[]}filterPools(t){if(t){const e=t.toLowerCase().trim().split(" "),r=this.pools.filter(s=>{for(let p of e)if(!(s.address.toLowerCase().match(p)||s.token0.name.toLowerCase().match(p)||s.token0.symbol.toLowerCase().match(p)||s.token0.address.toLowerCase().match(p)||s.token1.name.toLowerCase().match(p)||s.token1.symbol.toLowerCase().match(p)||s.token1.address.toLowerCase().match(p)))return!1;return!0});this.filteredPools=r}else this.filteredPools=this.pools;this.index=0,this.maxIndex=Math.ceil(this.filteredPools.length/this.PAGE_SIZE),this.paginatePools()}paginatePools(t,e){t&&(this.index=this.index+1),e&&(this.index=this.index-1),this.paginatedPools=this.filteredPools.slice(this.index*this.PAGE_SIZE,(this.index+1)*this.PAGE_SIZE)}sortPools(t){this.pools=[...this.util.sortByProp(this.pools,t.active,"asc"===t.direction)],this.filteredPools=[...this.util.sortByProp(this.filteredPools,t.active,"asc"===t.direction)],this.paginatePools()}focusPool(t){const e=this.route.snapshot.paramMap.get("chainSlug");this.router.navigate([`/pools/${e||this.chain.idToSlug(this.wallet.chainId)}/${t.address.toLowerCase()}`])}addPool(){const t=this.route.snapshot.paramMap.get("chainSlug");this.router.navigate([`/add/${t||this.chain.idToSlug(this.wallet.chainId)}`])}};let vw=aI;function Z0e(n,t){1&n&&(Ae(0,"p",42),qn(1,"span",43),Ie())}function Y0e(n,t){if(1&n&&(Ae(0,"h2",44),kt(1),Ie()),2&n){const e=an();dt(1),cu(" $",e.util.formatBN(e.reserve)[0].toFormat(2),"",e.util.formatBN(e.reserve)[1]," ")}}function J0e(n,t){if(1&n&&(Ae(0,"h2",44),kt(1),Ie()),2&n){const e=an();dt(1),cu(" $",e.util.formatBN(e.volume)[0].toFormat(2),"",e.util.formatBN(e.volume)[1]," ")}}function X0e(n,t){if(1&n&&(Ae(0,"h2",44),kt(1),Ie()),2&n){const e=an();dt(1),cu(" $",e.util.formatBN(e.fees)[0].toFormat(2),"",e.util.formatBN(e.fees)[1]," ")}}yt(vw,"\u0275fac",function(e){return new(e||aI)(Xt(ky),Xt(_0),Xt(dc),Xt(el),Xt($c),Xt(Xa))}),yt(vw,"\u0275cmp",bn({type:aI,selectors:[["app-pools"]],decls:39,vars:6,consts:[[1,"container","py-5"],[1,"row","justify-content-center"],[1,"col"],[1,"row","align-items-center","justify-content-between","mb-3"],[1,"lead","text-muted","mb-4"],[1,"col-auto"],["type","button",1,"btn","btn-sm","btn-shadow-rainbow","position-relative","fw-bold","text-dark",3,"click"],[1,"card","card-inner-shadow"],[1,"card-header","border-bottom"],[1,"input-group","input-group-flush","input-group-merge","input-group-reverse"],["type","search","placeholder","Filter by name, symbol or address",1,"form-control","list-search",3,"input"],[1,"input-group-text"],[1,"fe","fe-search"],["mat-table","","matSort","","matSortActive","reserves","matSortDirection","desc","matSortDisableClear","",1,"card-body","p-0",3,"dataSource","matSortChange"],["matColumnDef","rank"],["class","col-auto px-0 pe-4",4,"matHeaderCellDef"],["class","col-auto px-0 pe-4 text-muted d-none",4,"matCellDef"],["matColumnDef","assets"],["class","col px-0",4,"matHeaderCellDef"],["class","col-12 col-lg px-0",4,"matCellDef"],["matColumnDef","reserve"],["mat-sort-header","","arrowPosition","before","class","col-12 col-lg-2 px-0 justify-content-lg-end",4,"matHeaderCellDef"],["class","col-12 col-lg-2 d-block d-lg-flex justify-content-lg-end px-0 py-3 border-mobile-bottom mb-lg-0",4,"matCellDef"],["matColumnDef","volume"],["matColumnDef","fees"],["class","d-none d-lg-flex border border-0 border-bottom pt-0 px-4 text-muted",4,"matHeaderRowDef"],["class","row border-bottom clickable text-white mx-0 px-4 pt-4 pt-lg-2 pb-0 my-0",3,"click",4,"matRowDef","matRowDefColumns"],["class","row no-data-row d-flex justify-content-center",4,"matNoDataRow"],["class","d-flex align-items-center justify-content-center border-top py-2",4,"ngIf"],[1,"col-auto","px-0","pe-4"],[1,"col-auto","px-0","pe-4","text-muted","d-none"],[1,"col","px-0"],[1,"col-12","col-lg","px-0"],[1,"d-flex","align-items-center","justify-content-center"],[1,"avatar-group"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle",3,"src","alt","ngClass"],[1,"mx-2","col-auto"],[1,"badge","bg-dark","rounded-1"],[1,"fe","fe-chevron-right","d-block","d-lg-none","ms-2"],["mat-sort-header","","arrowPosition","before",1,"col-12","col-lg-2","px-0","justify-content-lg-end"],[1,"col-12","col-lg-2","d-block","d-lg-flex","justify-content-lg-end","px-0","py-3","border-mobile-bottom","mb-lg-0"],[1,"text-muted","text-uppercase","d-block","d-lg-none","mb-1"],[1,"d-block"],[1,"d-none","d-lg-flex","border","border-0","border-bottom","pt-0","px-4","text-muted"],[1,"row","border-bottom","clickable","text-white","mx-0","px-4","pt-4","pt-lg-2","pb-0","my-0",3,"click"],[1,"row","no-data-row","d-flex","justify-content-center"],[4,"ngIf"],[1,"text-center","text-muted","py-3","my-3"],[4,"ngFor","ngForOf"],[1,"row","d-flex","px-4","p-2"],[1,"col-auto","placeholder-wave","py-3","m-0","pe-4"],[1,"placeholder","placeholder-lg","avatar-xxs","border","rounded-circle","text-transparent"],[1,"col","placeholder-wave","py-3","m-0"],[1,"placeholder","placeholder-lg","w-75","border","rounded-pill","text-transparent"],[1,"col-2","text-end","placeholder-wave","py-3","m-0"],[1,"d-flex","align-items-center","justify-content-center","border-top","py-2"],[1,"btn","m-0","fe","fe-arrow-left","text-white","clickable","border-0",3,"disabled","click"],[1,"text-muted"],[1,"btn","m-0","fe","fe-arrow-right","text-white","clickable","border-0",3,"disabled","click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",2),Ae(5,"h1"),kt(6,"Explore pools on Bunni"),Ie(),Ae(7,"p",4),kt(8,"Add liquidity to existing pools or create new ones."),Ie(),Ie(),Ae(9,"div",5),Ae(10,"button",6),dr("click",function(){return r.addPool()}),kt(11,"Create Pool"),Ie(),Ie(),Ie(),Ae(12,"div",7),Ae(13,"div",8),Ae(14,"form"),Ae(15,"div",9),Ae(16,"input",10),dr("input",function(p){return r.filterPools(p.target.value)}),Ie(),Ae(17,"div",11),qn(18,"span",12),Ie(),Ie(),Ie(),Ie(),Ae(19,"table",13),dr("matSortChange",function(p){return r.sortPools(p)}),Qr(20,14),it(21,O0e,2,0,"mat-header-cell",15),it(22,D0e,2,1,"mat-cell",16),Wr(),Qr(23,17),it(24,P0e,2,0,"mat-header-cell",18),it(25,R0e,12,15,"mat-cell",19),Wr(),Qr(26,20),it(27,N0e,2,0,"mat-header-cell",21),it(28,B0e,5,2,"mat-cell",22),Wr(),Qr(29,23),it(30,F0e,2,0,"mat-header-cell",21),it(31,L0e,5,2,"mat-cell",22),Wr(),Qr(32,24),it(33,U0e,2,0,"mat-header-cell",21),it(34,j0e,5,2,"mat-cell",22),Wr(),it(35,V0e,1,0,"mat-header-row",25),it(36,H0e,1,0,"mat-row",26),it(37,q0e,3,2,"div",27),Ie(),it(38,K0e,5,4,"div",28),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(19),Mt("dataSource",r.paginatedPools),dt(16),Mt("matHeaderRowDef",sf(4,NV)),dt(1),Mt("matRowDefColumns",sf(5,NV)),dt(2),Mt("ngIf",r.pools.length>0))},directives:[cv,bw,Hb,lv,Vb,L5,hv,aw,La,dv,fv,dh,MT,U5,pv,L0],styles:[""]}));const uI=class{constructor(t,e,r,s,p){yt(this,"renderer"),yt(this,"chain"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"reserve"),yt(this,"volume"),yt(this,"fees"),yt(this,"subscription"),this.renderer=t,this.chain=e,this.store=r,this.util=s,this.wallet=p}ngOnInit(){this.reset(),this.renderer.removeClass(document.body,"bg-circle-gradient-dark"),this.subscription=this.store.protocol_observable.subscribe(t=>{if(Object.values(t).find(p=>this.store.getStatus(p.chain).match("loading")))return;let e=new sn.Z(0),r=new sn.Z(0),s=new sn.Z(0);for(const p of Object.values(t))this.chain.isTestnet(p.chain)||(e=e.plus(p.reserve),r=r.plus(p.totalVolume),s=s.plus(p.totalFees));this.reserve=e,this.volume=r,this.fees=s})}ngOnDestroy(){this.subscription.unsubscribe()}reset(){this.reserve=new sn.Z(0),this.volume=new sn.Z(0),this.fees=new sn.Z(0)}loading(){let t=!1;return Object.values(this.chain.id).forEach(e=>{this.store.getStatus(e).match("loading")&&(t=!0)}),t}};let OT=uI;function Q0e(n,t){1&n&&(Qr(0,7),Ae(1,"div",8),Ae(2,"h3",9),kt(3,"Select a token"),Ie(),Ie(),Wr())}yt(OT,"\u0275fac",function(e){return new(e||uI)(Xt(sh),Xt(dc),Xt(el),Xt($c),Xt(Xa))}),yt(OT,"\u0275cmp",bn({type:uI,selectors:[["app-landing"]],decls:106,vars:8,consts:[[1,"container","py-5"],[1,"row","align-items-center","bg-shadow-rainbow","bg-shadow-rainbow-vheight"],[1,"col-12","text-center","position-relative","z-20"],[1,"display-2","d-block","d-md-none"],[1,"text-dark-soft"],[1,"text-white"],[1,"display-1","d-none","d-md-block"],[1,"h1","mb-5","text-dark-soft"],[1,"d-inline-flex","align-items-center","btn-white","btn","btn-lg","fw-bold","mb-5","mb-lg-6",3,"routerLink"],[1,"fe","fe-chevron-right"],[1,"row","row-cols-1","row-cols-md","g-4","g-lg-7","mb-6","d-flex","justify-content-center"],[1,"col-auto","col-lg-3"],["loadingDataLP",""],["class","m-0 text-dark fs-1",4,"ngIf","ngIfElse"],[1,"row","mb-7","mt-n5","mt-lg-n7"],[1,"col-12","col-lg-6","d-flex","align-items-center"],[1,"display-2","py-5","pt-lg-7"],[1,"col-12","col-lg-6"],[1,"row","row-cols-1","g-4"],[1,"col"],[1,"card","card-inner-shadow","h-100"],[1,"card-body"],[1,"h1"],[1,"fe","fe-cloud-drizzle","text-bg-gradient","me-2"],[1,"card-text","text-secondary","lead"],[1,"fe","fe-trending-down","text-bg-gradient","me-2"],[1,"row"],[1,"col-12"],[1,"row","text-center","position-relative","z-20","d-flex","flex-column-reverse","flex-lg-column","align-items-center","mb-5"],[1,"col-12","col-lg-8"],[1,"display-2"],[1,"row","row-cols-1","row-cols-md-2","gy-7","gy-lg-0","g-md-4","z-20","mb-6"],[1,"avatar","avatar-lg","card-avatar","card-avatar-top"],[1,"card","card-inner-shadow","avatar-title","bg-dark"],[1,"mb-0"],[1,"fe","fe-arrow-up-circle","text-bg-gradient"],[1,"h1","text-center","mb-2"],["href","https://blog.timelessfi.com"],[1,"fe","fe-zap","text-bg-gradient"],[1,"text-center","justify-content-center"],[1,"text-uppercase","text-white","mb-4"],[1,"d-inline-flex","align-items-center","btn-shadow-rainbow","border","border-white","position-relative","btn","btn-lg","fw-bold","text-dark",3,"routerLink"],[1,"placeholder-wave","py-3","m-0"],[1,"placeholder","placeholder-lg","w-50","rounded-pill","text-transparent","bg-gray-400"],[1,"m-0","text-dark","fs-1"]],template:function(e,r){if(1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"h1",3),Ae(4,"span",4),kt(5,"Liquidity engine for "),Ie(),Ae(6,"span",5),kt(7,"Uniswap"),Ie(),Ie(),Ae(8,"h1",6),Ae(9,"span",4),kt(10,"Liquidity engine for "),Ie(),Ae(11,"span",5),kt(12,"Uniswap"),Ie(),Ie(),Ae(13,"p",7),kt(14," Provide Uniswap liquidity, earn LIT rewards "),Ie(),Ae(15,"a",8),kt(16,"Launch app "),qn(17,"i",9),Ie(),Ae(18,"div",10),Ae(19,"div",11),Ae(20,"h5",4),kt(21,"TVL"),Ie(),it(22,Z0e,2,0,"ng-template",null,12,xu),it(24,Y0e,2,2,"h2",13),Ie(),Ae(25,"div",11),Ae(26,"h5",4),kt(27,"Total Volume"),Ie(),it(28,J0e,2,2,"h2",13),Ie(),Ae(29,"div",11),Ae(30,"h5",4),kt(31,"Total LP Fees"),Ie(),it(32,X0e,2,2,"h2",13),Ie(),Ie(),Ie(),Ie(),Ae(33,"div",14),Ae(34,"div",15),Ae(35,"div"),Ae(36,"h2",16),kt(37,"DEX liquidity has a problem."),Ie(),Ie(),Ie(),Ae(38,"div",17),Ae(39,"div",18),Ae(40,"div",19),Ae(41,"div",20),Ae(42,"div",21),Ae(43,"h3",22),qn(44,"i",23),kt(45," Unincentivized liquidity is hard "),Ie(),Ae(46,"p",24),kt(47," Most liquidity providers lose money. "),Ie(),Ae(48,"p",24),kt(49," Swap fees are usually not enough to offset the Impermanent Loss, especially for concentrated & passive liquidity. "),Ie(),Ae(50,"p",24),kt(51," This makes it hard to bootstrap liquidity for an asset without token incentives. "),Ie(),Ie(),Ie(),Ie(),Ae(52,"div",19),Ae(53,"div",20),Ae(54,"div",21),Ae(55,"h3",22),qn(56,"i",25),kt(57," Incentivized liquidity is unsustainable "),Ie(),Ae(58,"p",24),kt(59," Many projects utilize token incentives to rent liquidity for protocol assets, but naive incentive schemes are unsustainable. "),Ie(),Ae(60,"p",24),kt(61," The liquidity attracted is mercenary, meaning it will evaporate as soon as the incentives run out. "),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(62,"div",26),Ae(63,"div",27),Ae(64,"div",28),Ae(65,"div",29),Ae(66,"h2",30),kt(67," Deep, efficient, long-term liquidity. Powered by LIT tokenomics. "),Ie(),Ie(),Ie(),Ae(68,"div",31),Ae(69,"div",19),Ae(70,"div",20),Ae(71,"div",21),Ae(72,"div",32),Ae(73,"div",33),Ae(74,"h1",34),qn(75,"i",35),Ie(),Ie(),Ie(),Ae(76,"h3",36),kt(77,"Vetokenomics 2.0"),Ie(),Ae(78,"p",24),kt(79," Bunni incentivizes liquidity using the Liquidity Incentive Token (LIT) via an improved vetokenomics system. "),Ie(),Ae(80,"p",24),kt(81," The improvements disincentivize farming-and-dumping and encourage long-term liquidity provision by aligning the interests between LPs and LIT holders. "),Ie(),Ae(82,"p",24),kt(83," Learn more about it "),Ae(84,"a",37),kt(85,"here"),Ie(),kt(86,". "),Ie(),Ie(),Ie(),Ie(),Ae(87,"div",19),Ae(88,"div",20),Ae(89,"div",21),Ae(90,"div",32),Ae(91,"div",33),Ae(92,"h1",34),qn(93,"i",38),Ie(),Ie(),Ie(),Ae(94,"h3",36),kt(95," Efficiency, efficiency, efficiency "),Ie(),Ae(96,"p",24),kt(97," By incentivizing concentrated liquidity, Bunni can attract liquidity with much higher capital efficiency versus other platforms. "),Ie(),Ae(98,"p",24),kt(99," Moreover, projects can get further efficiency boosts from the vetokenomics. Hold veLIT in your project's treasury to direct LIT incentives instead of paying rent to farmers. Or give incentives to veLIT holders to convince them to vote your way. "),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(100,"div",39),Ae(101,"h5",40),kt(102,"Try it now"),Ie(),Ae(103,"a",41),kt(104,"Launch app "),qn(105,"i",9),Ie(),Ie(),Ie(),Ie(),Ie()),2&e){const s=nr(23);dt(15),qu("routerLink",r.wallet.rewards?"/stake":"/pools"),dt(9),Mt("ngIf",!r.loading())("ngIfElse",s),dt(4),Mt("ngIf",!r.loading())("ngIfElse",s),dt(4),Mt("ngIf",!r.loading())("ngIfElse",s),dt(71),qu("routerLink",r.wallet.rewards?"/stake":"/pools")}},directives:[Y6,La],styles:[""]}));const ehe=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function the(n,t){if(1&n&&(Qr(0),Ae(1,"div",10),qn(2,"img",11),Ie(),Ae(3,"h3",12),kt(4),Ie(),Wr()),2&n){const e=an();dt(2),qu("src",e.selectedToken.iconPath,Pi),_l("alt","",e.selectedToken.symbol," Icon"),Mt("ngClass",vc(4,ehe,e.selectedToken.symbol.includes("PYT"),e.selectedToken.symbol.includes("NYT"))),dt(2),Pr(" ",e.selectedToken.symbol," ")}}const cI=class{constructor(t,e,r){yt(this,"modalService"),yt(this,"store"),yt(this,"wallet"),yt(this,"selectedToken"),yt(this,"restrictedToken"),yt(this,"hiddenTokens"),yt(this,"selectedTokenChange",new mo),this.modalService=t,this.store=e,this.wallet=r}ngOnInit(){}openTokenSelectModal(){const t=this.modalService.open(uw,{windowClass:"windowed",centered:!0,size:"md"});t.componentInstance.tokenA=this.selectedToken,t.componentInstance.tokenB=this.restrictedToken,t.componentInstance.hiddenTokens=this.hiddenTokens,t.componentInstance.selectTokenEvent.subscribe(e=>{this.selectedToken=e,this.selectedTokenChange.emit(this.selectedToken)})}};let DT=cI;function nhe(n,t){if(1&n&&(Qr(0),kt(1),Wr()),2&n){const e=an();dt(1),Pr(" ",e.fee/1e4,"% fee tier ")}}function rhe(n,t){1&n&&(Qr(0),kt(1," Fee tier "),Wr())}function ihe(n,t){1&n&&(Qr(0),kt(1," Hide "),Wr())}function she(n,t){1&n&&(Qr(0),kt(1," Edit "),Wr())}function ohe(n,t){1&n&&qn(0,"i",19)}function ahe(n,t){if(1&n){const e=Di();Ae(0,"div",12),Ae(1,"div",18),dr("click",function(){return Ur(e),an(2).setFee(100)}),Ae(2,"div",1),Ae(3,"div",14),Ae(4,"h3",4),kt(5," 0.01% "),Ie(),it(6,ohe,1,0,"i",15),Ie(),Ae(7,"small",16),kt(8," Best for very stable pairs. "),Ie(),Ie(),Ie(),Ie()}if(2&n){const e=an(2);dt(1),Mt("ngClass",100===e.fee?"border-success":""),dt(5),Mt("ngIf",100===e.fee)}}function uhe(n,t){1&n&&qn(0,"i",19)}function che(n,t){1&n&&qn(0,"i",19)}function lhe(n,t){1&n&&qn(0,"i",19)}function dhe(n,t){if(1&n){const e=Di();Ae(0,"div",10),it(1,ahe,9,2,"div",11),Ae(2,"div",12),Ae(3,"div",13),dr("click",function(){return Ur(e),an().setFee(500)}),Ae(4,"div",1),Ae(5,"div",14),Ae(6,"h3",4),kt(7," 0.05% "),Ie(),it(8,uhe,1,0,"i",15),Ie(),Ae(9,"small",16),kt(10," Best for stable pairs. "),Ie(),Ie(),Ie(),Ie(),Ae(11,"div",12),Ae(12,"div",13),dr("click",function(){return Ur(e),an().setFee(3e3)}),Ae(13,"div",1),Ae(14,"div",14),Ae(15,"h3",4),kt(16," 0.3% "),Ie(),it(17,che,1,0,"i",15),Ie(),Ae(18,"small",16),kt(19," Best for most pairs. "),Ie(),Ie(),Ie(),Ie(),Ae(20,"div",17),Ae(21,"div",13),dr("click",function(){return Ur(e),an().setFee(1e4)}),Ae(22,"div",1),Ae(23,"div",14),Ae(24,"h3",4),kt(25," 1% "),Ie(),it(26,lhe,1,0,"i",15),Ie(),Ae(27,"small",16),kt(28," Best for exotic pairs. "),Ie(),Ie(),Ie(),Ie(),Ie()}if(2&n){const e=an();dt(1),Mt("ngIf",e.chain.metadata[e.wallet.chainId].uniswapFeeTier100),dt(2),Mt("ngClass",500===e.fee?"border-success":""),dt(5),Mt("ngIf",500===e.fee),dt(4),Mt("ngClass",3e3===e.fee?"border-success":""),dt(5),Mt("ngIf",3e3===e.fee),dt(4),Mt("ngClass",1e4===e.fee?"border-success":""),dt(5),Mt("ngIf",1e4===e.fee)}}yt(DT,"\u0275fac",function(e){return new(e||cI)(Xt(Nf),Xt(el),Xt(Xa))}),yt(DT,"\u0275cmp",bn({type:cI,selectors:[["app-token-selector-badge"]],inputs:{selectedToken:"selectedToken",restrictedToken:"restrictedToken",hiddenTokens:"hiddenTokens"},outputs:{selectedTokenChange:"selectedTokenChange"},decls:7,vars:3,consts:[[1,"card","card-inner-shadow","mb-3","clickable",3,"ngClass","click"],[1,"card-body","p-3"],[1,"d-flex","align-items-center","justify-content-between"],[1,"col-10","d-flex","align-items-center"],["class","d-inline align-middle",4,"ngIf"],[4,"ngIf"],[1,"col","fe","fe-chevron-down","text-end"],[1,"d-inline","align-middle"],[1,"d-flex","align-items-center",2,"height","25px"],[1,"m-0","fw-normal"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","position-absolute",3,"src","alt","ngClass"],[1,"col","mx-2","my-0","fw-normal","text-truncate"]],template:function(e,r){1&e&&(Ae(0,"div",0),dr("click",function(){return r.store.getStatus(r.wallet.chainId).match("success")&&r.openTokenSelectModal()}),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),it(4,Q0e,4,0,"ng-container",4),it(5,the,5,7,"ng-container",5),Ie(),qn(6,"i",6),Ie(),Ie(),Ie()),2&e&&(Mt("ngClass",r.selectedToken?"bg-light":"bg-dark"),dt(4),Mt("ngIf",!r.selectedToken),dt(1),Mt("ngIf",r.selectedToken))},directives:[dh,La],styles:[""]}));const lI=class{constructor(t,e){yt(this,"chain"),yt(this,"wallet"),yt(this,"fee"),yt(this,"feeChange",new mo),yt(this,"edit"),this.chain=t,this.wallet=e}ngOnInit(){this.edit=!this.fee}setFee(t){t!==this.fee&&(this.fee=t,this.feeChange.emit(this.fee))}};let PT=lI;function fhe(n,t){1&n&&(Qr(0),kt(1," Max Price "),Wr())}function hhe(n,t){1&n&&(Qr(0),kt(1," Min Price "),Wr())}function phe(n,t){if(1&n&&(Ae(0,"small",3),kt(1),Ie()),2&n){const e=an();dt(1),cu(" ",e.token1.symbol," per ",e.token0.symbol," ")}}yt(PT,"\u0275fac",function(e){return new(e||lI)(Xt(dc),Xt(Xa))}),yt(PT,"\u0275cmp",bn({type:lI,selectors:[["app-fee-selector"]],inputs:{fee:"fee"},outputs:{feeChange:"feeChange"},decls:15,vars:5,consts:[[1,"card","card-inner-shadow","mb-3"],[1,"card-body","p-3"],[1,"d-flex","align-items-center","justify-content-between"],[1,""],[1,"m-0"],[4,"ngIf"],[1,"text-muted"],["href","https://docs.uniswap.org/concepts/protocol/fees","target","_blank"],["type","button",1,"btn","btn-sm","btn-dark",3,"click"],["class","d-flex",4,"ngIf"],[1,"d-flex"],["class","col pe-3",4,"ngIf"],[1,"col","pe-3"],[1,"card","card-inner-shadow","clickable","mb-0",3,"ngClass","click"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],["class","fe fe-check-circle text-success","style","line-height: 0;",4,"ngIf"],[1,"text-secondary","text-wrap"],[1,"col"],[1,"card","card-inner-shadow","clickable",3,"ngClass","click"],[1,"fe","fe-check-circle","text-success",2,"line-height","0"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"h3",4),it(5,nhe,2,1,"ng-container",5),it(6,rhe,2,0,"ng-container",5),Ie(),Ae(7,"small",6),kt(8," The % you will earn in fees. "),Ae(9,"a",7),kt(10," Learn more. "),Ie(),Ie(),Ie(),Ae(11,"button",8),dr("click",function(){return r.edit=!r.edit}),it(12,ihe,2,0,"ng-container",5),it(13,she,2,0,"ng-container",5),Ie(),Ie(),Ie(),Ie(),it(14,dhe,29,7,"div",9)),2&e&&(dt(5),Mt("ngIf",r.fee),dt(1),Mt("ngIf",!r.fee),dt(6),Mt("ngIf",r.edit),dt(1),Mt("ngIf",!r.edit),dt(1),Mt("ngIf",r.edit))},directives:[La,dh],styles:[""]}));const dI=class{constructor(t,e){yt(this,"util"),yt(this,"wallet"),yt(this,"max"),yt(this,"invert"),yt(this,"fee"),yt(this,"tick"),yt(this,"token0"),yt(this,"token1"),yt(this,"tickChange",new mo),yt(this,"price"),yt(this,"timeout"),this.util=t,this.wallet=e}ngOnInit(){}ngOnChanges(t){null!=this.tick&&this.token0&&this.token1&&(this.price=this.getPriceAtTick(this.tick))}setTick(t){const e=Bb[this.fee];this.tick=t?this.invert?this.tick-e:this.tick+e:this.invert?this.tick+e:this.tick-e,this.price=this.getPriceAtTick(this.tick),this.tickChange.emit(this.tick)}setPrice(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tick=this.getTickAtPrice(+t),this.price=this.getPriceAtTick(this.tick),this.tickChange.emit(this.tick)},500)}getPriceAtTick(t){if(this.invert?this.util.maxTick(t,this.fee):this.util.minTick(t,this.fee))return new sn.Z(0);if(this.invert?this.util.minTick(t,this.fee):this.util.maxTick(t,this.fee))return"\u221e";const e=new zd(this.wallet.chainId,this.token0.address,this.token0.decimals),r=new zd(this.wallet.chainId,this.token1.address,this.token1.decimals);return new sn.Z(Q3(e,r,t).toSignificant())}getTickAtPrice(t){if(t<=0||isNaN(t))return k5(this.invert?ba.MAX_TICK:ba.MIN_TICK,Bb[this.fee]);const e=new zd(this.wallet.chainId,this.token0.address,this.token0.decimals),r=new zd(this.wallet.chainId,this.token1.address,this.token1.decimals),s=Math.pow(10,this.token0.decimals+18),p=t*Math.pow(10,this.token1.decimals+18);return k5(Tj(new I5(e,r,s,p)),Bb[this.fee])}};let RT=dI;function mhe(n,t){if(1&n){const e=Di();Ae(0,"small",6),kt(1),Ae(2,"i",14),dr("click",function(){Ur(e);const s=an();return s.inverted=!s.inverted}),Ie(),Ie()}if(2&n){const e=an();dt(1),cu(" ",e.inverted?e.tokenA.symbol:e.tokenB.symbol," per ",e.inverted?e.tokenB.symbol:e.tokenA.symbol," ")}}function ghe(n,t){if(1&n){const e=Di();Ae(0,"button",15),dr("click",function(){return Ur(e),an().deployUniswapPool()}),kt(1),Ie()}if(2&n){const e=an();Mt("disabled",e.initialPrice.eq(0)),dt(1),Pr(" ",e.initialPrice.gt(0)?"Deploy Uniswap Pool":"Enter an Initial Price"," ")}}function yhe(n,t){if(1&n){const e=Di();Ae(0,"button",16),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(RT,"\u0275fac",function(e){return new(e||dI)(Xt($c),Xt(Xa))}),yt(RT,"\u0275cmp",bn({type:dI,selectors:[["app-range-selector"]],inputs:{max:"max",invert:"invert",fee:"fee",tick:"tick",token0:"token0",token1:"token1"},outputs:{tickChange:"tickChange"},features:[rr],decls:14,vars:6,consts:[[1,"card","card-inner-shadow"],[1,"card-body","p-3"],[1,"d-flex","flex-column","align-items-center","justify-content-between"],[1,"text-muted"],[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between","my-1"],["type","button",1,"btn","btn-sm","btn-dark","rounded","me-2",3,"disabled","click"],[1,""],["type","text","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-md","input-sm","text-center",3,"value","input"],["type","button",1,"btn","btn-sm","btn-dark","rounded","ms-2",3,"disabled","click"],["class","text-muted",4,"ngIf"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"small",3),it(4,fhe,2,0,"ng-container",4),it(5,hhe,2,0,"ng-container",4),Ie(),Ae(6,"div",5),Ae(7,"button",6),dr("click",function(){return r.setTick(!1)}),kt(8," - "),Ie(),Ae(9,"span",7),Ae(10,"input",8),dr("input",function(p){return r.setPrice(p.target.value)}),Ie(),Ie(),Ae(11,"button",9),dr("click",function(){return r.setTick(!0)}),kt(12," + "),Ie(),Ie(),it(13,phe,2,2,"small",10),Ie(),Ie(),Ie()),2&e&&(dt(4),Mt("ngIf",r.max),dt(1),Mt("ngIf",!r.max),dt(2),Mt("disabled",r.invert?r.util.maxTick(r.tick,r.fee):r.util.minTick(r.tick,r.fee)),dt(3),Mt("value",r.price?r.price:null),dt(1),Mt("disabled",r.invert?r.util.minTick(r.tick,r.fee):r.util.maxTick(r.tick,r.fee)),dt(2),Mt("ngIf",r.token0&&r.token1))},directives:[La],styles:[""]}));const fI=class{constructor(t,e,r){yt(this,"modalService"),yt(this,"contract"),yt(this,"wallet"),yt(this,"fee"),yt(this,"tokenA"),yt(this,"tokenB"),yt(this,"poolDeployed",new mo),yt(this,"inverted"),yt(this,"initialPrice"),this.modalService=t,this.contract=e,this.wallet=r}ngOnInit(){this.resetData()}resetData(){this.inverted=!1,this.initialPrice=new sn.Z(0)}setInitialPrice(t){this.initialPrice=new sn.Z(t),this.initialPrice.isNaN()&&(this.initialPrice=new sn.Z(0))}deployUniswapPool(){var t=this;return(0,Br.Z)(function*(){const r=t.contract.getNonfungiblePositionManager(t.wallet.web3),s=new zd(t.wallet.chainId,t.tokenA.address,t.tokenA.decimals),p=new zd(t.wallet.chainId,t.tokenB.address,t.tokenB.decimals),F=t.inverted?t.initialPrice.times(t.tokenA.precision).toNumber():t.tokenA.precision,q=t.inverted?t.tokenB.precision:t.initialPrice.times(t.tokenB.precision).toNumber(),fe=Tj(new I5(s,p,F,q)),Re=ba.getSqrtRatioAtTick(fe),$e=p.address.toLowerCase()>s.address.toLowerCase(),rt=r.methods.createAndInitializePoolIfNecessary($e?s.address:p.address,$e?p.address:s.address,t.fee.toString(),Re.toString());yield t.wallet.sendTx(rt,()=>{},()=>{},()=>{t.poolDeployed.emit(!0)},()=>{}).catch(ft=>{console.error(ft),t.wallet.openErrorModal(ft)})})()}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let NT=fI;function bhe(n,t){if(1&n){const e=Di();Ae(0,"small",28),kt(1),Ae(2,"i",29),dr("click",function(){Ur(e);const s=an(2);return s.inverted=!s.inverted}),Ie(),Ie()}if(2&n){const e=an(2);dt(1),Lc(" Current price: ",e.inverted?e.pool.token0Price.toFixed(6):e.pool.token1Price.toFixed(6)," ",e.inverted?e.pool.token0.symbol:e.pool.token1.symbol," per ",e.inverted?e.pool.token1.symbol:e.pool.token0.symbol," ")}}yt(NT,"\u0275fac",function(e){return new(e||fI)(Xt(Nf),Xt(ud),Xt(Xa))}),yt(NT,"\u0275cmp",bn({type:fI,selectors:[["app-deploy-pool"]],inputs:{fee:"fee",tokenA:"tokenA",tokenB:"tokenB"},outputs:{poolDeployed:"poolDeployed"},decls:17,vars:4,consts:[[1,"container","p-0"],[1,"text-center"],[1,"text-muted","text-center"],[1,"card","card-inner-shadow"],[1,"card-body","p-3"],[1,"d-flex","flex-column","align-items-center","justify-content-between"],[1,"text-muted"],[1,"d-flex","align-items-center","justify-content-between","my-1"],[1,"my-2"],["type","text","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-md","input-sm","text-center",3,"value","input"],["class","text-muted",4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"disabled","click",4,"ngIf"],["class","btn btn-lg btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],[1,"fe","fe-repeat","clickable",3,"click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"h2",1),kt(2," Uniswap pool does not exist "),Ie(),Ae(3,"h5",2),kt(4," The Uniswap pool must be deployed before you can add liquidity. "),Ie(),Ae(5,"div",3),Ae(6,"div",4),Ae(7,"div",5),Ae(8,"small",6),kt(9," Initial Price "),Ie(),Ae(10,"div",7),Ae(11,"span",8),Ae(12,"input",9),dr("input",function(p){return r.setInitialPrice(p.target.value)}),Ie(),Ie(),Ie(),it(13,mhe,3,2,"small",10),Ie(),Ie(),Ie(),Ae(14,"div",11),it(15,ghe,2,2,"button",12),it(16,yhe,2,0,"button",13),Ie(),Ie()),2&e&&(dt(12),Mt("value",r.initialPrice.toFixed()),dt(1),Mt("ngIf",r.tokenA&&r.tokenB),dt(2),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[La],styles:[""]}));const vD=function(n){return{disabled:n}};function vhe(n,t){if(1&n){const e=Di();Ae(0,"div",20),Ae(1,"div",21),Ae(2,"div",4),Ae(3,"h3",22),kt(4,"Set Price Range"),Ie(),it(5,bhe,3,3,"small",23),Ie(),Ae(6,"div",24),Ae(7,"div",25),Ae(8,"button",26),dr("click",function(){return Ur(e),an().setFullRange()}),kt(9," Full Range "),Ie(),Ie(),Ie(),Ie(),Ae(10,"div",7),Ae(11,"div",13),Ae(12,"app-range-selector",27),dr("tickChange",function(s){Ur(e);const p=an();return p.inverted?p.setTickUpper(s):p.setTickLower(s)}),Ie(),Ie(),Ae(13,"div",15),Ae(14,"app-range-selector",27),dr("tickChange",function(s){Ur(e);const p=an();return p.inverted?p.setTickLower(s):p.setTickUpper(s)}),Ie(),Ie(),Ie(),Ie()}if(2&n){const e=an();dt(5),Mt("ngIf",e.pool),dt(3),Mt("ngClass",Ic(16,vD,!e.pool)),dt(4),Mt("max",!1)("invert",e.inverted)("fee",e.fee)("tick",e.inverted?e.tickUpper:e.tickLower)("token0",e.inverted?null==e.pool?null:e.pool.token1:null==e.pool?null:e.pool.token0)("token1",e.inverted?null==e.pool?null:e.pool.token0:null==e.pool?null:e.pool.token1)("ngClass",Ic(18,vD,!e.pool)),dt(2),Mt("max",!0)("invert",e.inverted)("fee",e.fee)("tick",e.inverted?e.tickLower:e.tickUpper)("token0",e.inverted?null==e.pool?null:e.pool.token1:null==e.pool?null:e.pool.token0)("token1",e.inverted?null==e.pool?null:e.pool.token0:null==e.pool?null:e.pool.token1)("ngClass",Ic(20,vD,!e.pool))}}function _he(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"app-deploy-pool",30),dr("poolDeployed",function(){return Ur(e),an().getPool()}),Ie(),Wr()}if(2&n){const e=an();dt(1),Mt("fee",e.fee)("tokenA",e.tokenA)("tokenB",e.tokenB)}}function whe(n,t){1&n&&(Qr(0),Ae(1,"div",31),qn(2,"h1",32),Ae(3,"h2",28),kt(4,"Your position will appear here."),Ie(),Ie(),Wr())}function xhe(n,t){if(1&n&&(Qr(0),Ae(1,"div",12),Ae(2,"h3",22),kt(3,"Deposit Amounts"),Ie(),Ie(),qn(4,"app-add-liquidity",33),Wr()),2&n){const e=an();dt(4),Mt("pool",e.pool)("token0",e.pool.token0)("token1",e.pool.token1)("slippage",50)("deadline",3600)("bunniToken",e.bunniToken)}}const BV=function(n){return[n]},hI=class{constructor(t,e,r,s,p,F,q,te){yt(this,"activatedRoute"),yt(this,"chain"),yt(this,"contract"),yt(this,"pool_service"),yt(this,"store"),yt(this,"router"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniToken"),yt(this,"tokenA"),yt(this,"tokenB"),yt(this,"pool"),yt(this,"fee"),yt(this,"tickLower"),yt(this,"tickUpper"),yt(this,"inverted"),yt(this,"tokens_subscription"),this.activatedRoute=t,this.chain=e,this.contract=r,this.pool_service=s,this.store=p,this.router=F,this.util=q,this.wallet=te}ngOnInit(){this.resetData(),this.tokens_subscription=this.store.tokens_observable.subscribe(t=>{const e=this.activatedRoute.snapshot.paramMap.get("chainSlug"),r=this.chain.slugToId(e),s=this.activatedRoute.queryParams.value.tokenA?.toLowerCase(),p=this.activatedRoute.queryParams.value.tokenB?.toLowerCase(),F=this.activatedRoute.queryParams.value.fee;s&&(this.tokenA=t[this.util.id(s,r)],this.getPool()),p&&(this.tokenB=t[this.util.id(p,r)],this.getPool()),F&&(this.fee=parseInt(F),this.getPool())})}ngOnDestroy(){this.tokens_subscription.unsubscribe()}resetData(){this.inverted=!1,this.tokenA=null,this.tokenB=null,this.fee=null}setTokenA(t){this.tokenA=t,this.router.navigate([],{queryParams:{tokenA:this.tokenA?.address,tokenB:this.tokenB?.address,fee:this.fee},replaceUrl:!0}),this.getPool()}setTokenB(t){this.tokenB=t,this.router.navigate([],{queryParams:{tokenA:this.tokenA?.address,tokenB:this.tokenB?.address,fee:this.fee},replaceUrl:!0}),this.getPool()}setFee(t){this.fee=t,this.router.navigate([],{queryParams:{tokenA:this.tokenA?.address,tokenB:this.tokenB?.address,fee:this.fee},replaceUrl:!0}),this.getPool()}setTickLower(t){this.tickLower=t,this.bunniToken=this.getBunniToken()}setTickUpper(t){this.tickUpper=t,this.bunniToken=this.getBunniToken()}getPool(){var t=this;return(0,Br.Z)(function*(){if(!t.tokenA||!t.tokenB||!t.fee)return;const e=t.activatedRoute.snapshot.paramMap.get("chainSlug"),r=t.chain.slugToId(e),s=t.wallet.httpsWeb3(r),F=yield t.contract.getUniswapFactory(s).methods.getPool(t.tokenA.address,t.tokenB.address,t.fee).call();F===Oy?(t.pool=null,t.setFullRange()):(t.pool=t.store.getPool(t.util.id(F,r))||(yield t.pool_service.uniswap(F,r)),t.setFullRange())})()}getBunniToken(){if(null===this.tickLower||null===this.tickUpper||!this.pool)return null;const t=this.activatedRoute.snapshot.paramMap.get("chainSlug"),e=this.chain.slugToId(t);let s=this.store.getBunniTokens(e).find(p=>{});return s||(s=Object.assign(new KE,{name:`Bunni ${this.pool.token0.symbol}/${this.pool.token1.symbol} LP`,address:Oy,chainId:e,tickLower:this.tickLower,tickUpper:this.tickUpper,pool:this.pool})),s}setFullRange(){this.setTickLower(k5(ba.MIN_TICK,Bb[this.fee])),this.setTickUpper(k5(ba.MAX_TICK,Bb[this.fee]))}};let BT=hI;function Ehe(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"h2",42),kt(2),Ie(),Ie()),2&n){const e=an();dt(2),Pr(" $",e.totalCurrentValue.toFormat(2)," ")}}yt(BT,"\u0275fac",function(e){return new(e||hI)(Xt(ky),Xt(dc),Xt(ud),Xt(Q_),Xt(el),Xt(_0),Xt($c),Xt(Xa))}),yt(BT,"\u0275cmp",bn({type:hI,selectors:[["app-add"]],decls:29,vars:15,consts:[[1,"container","py-5"],[1,"row","justify-content-center"],[1,"col-12","col-lg-12"],[1,"row","align-items-center","justify-content-between","mb-3"],[1,"col"],[1,"mb-0"],[1,"row","align-items-center","justify-content-between"],[1,"d-flex"],[1,"pe-2","col-6"],[1,"card","card-inner-shadow","m-0"],[1,"card-body","p-4"],[1,"mb-4"],[1,"mb-3"],[1,"col-6","pe-2"],[3,"selectedToken","restrictedToken","hiddenTokens","selectedTokenChange"],[1,"col-6","ps-2"],[3,"fee","feeChange"],["class","",4,"ngIf"],[1,"ps-2","col-6"],[4,"ngIf"],[1,""],[1,"row","mb-3"],[1,"m-0"],["class","text-muted",4,"ngIf"],[1,"col-auto"],[1,"d-grid"],["type","button",1,"btn","btn-sm","btn-dark",3,"ngClass","click"],[3,"max","invert","fee","tick","token0","token1","ngClass","tickChange"],[1,"text-muted"],[1,"fe","fe-repeat","ms-1","clickable",3,"click"],[3,"fee","tokenA","tokenB","poolDeployed"],[1,"d-flex","flex-column","align-items-center","justify-content-center"],[1,"display-1","fe","fe-inbox","text-muted"],[3,"pool","token0","token1","slippage","deadline","bunniToken"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",4),Ae(5,"h1",5),kt(6,"Add pool"),Ie(),Ie(),Ie(),Ae(7,"div",6),Ae(8,"div",4),Ae(9,"div",7),Ae(10,"div",8),Ae(11,"div",9),Ae(12,"div",10),Ae(13,"div",11),Ae(14,"h3",12),kt(15,"Select Pair"),Ie(),Ae(16,"div",7),Ae(17,"div",13),Ae(18,"app-token-selector-badge",14),dr("selectedTokenChange",function(p){return r.setTokenA(p)}),Ie(),Ie(),Ae(19,"div",15),Ae(20,"app-token-selector-badge",14),dr("selectedTokenChange",function(p){return r.setTokenB(p)}),Ie(),Ie(),Ie(),Ae(21,"app-fee-selector",16),dr("feeChange",function(p){return r.setFee(p)}),Ie(),Ie(),it(22,vhe,15,22,"div",17),Ie(),Ie(),Ie(),Ae(23,"div",18),Ae(24,"div",9),Ae(25,"div",10),it(26,_he,2,3,"ng-container",19),it(27,whe,5,0,"ng-container",19),it(28,xhe,5,6,"ng-container",19),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(18),Mt("selectedToken",r.tokenA)("restrictedToken",r.tokenB)("hiddenTokens",Ic(11,BV,r.store.getNative(r.wallet.chainId))),dt(2),Mt("selectedToken",r.tokenB)("restrictedToken",r.tokenA)("hiddenTokens",Ic(13,BV,r.store.getNative(r.wallet.chainId))),dt(1),Mt("fee",r.fee),dt(1),Mt("ngIf",r.pool),dt(4),Mt("ngIf",!r.pool),dt(1),Mt("ngIf",r.pool&&!r.bunniToken),dt(1),Mt("ngIf",r.pool&&r.bunniToken))},directives:[DT,PT,La,dh,RT,NT,V5],styles:[""]}));const Vg=function(n,t){return{"text-success":n,"text-danger":t}};function The(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"div",43),Ae(2,"h2",44),kt(3),Ie(),Ae(4,"small",45),kt(5),Ie(),Ie(),Ie()),2&n){const e=an();dt(3),Pr(" $",e.totalCurrentROI.toFormat(2)," "),dt(1),Mt("ngClass",vc(3,Vg,e.totalCurrentROI.gt(0),e.totalCurrentROI.lt(0))),dt(1),Pr("",e.totalCurrentROI.div(e.totalStartingValue).times(100).toFormat(2),"%")}}function Ahe(n,t){1&n&&(Ae(0,"div",46),kt(1," The current Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's positions balance (inclusive of compounded fees, impermanent loss, claimed and claimable rewards). "),Ie())}function Ihe(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"div",43),Ae(2,"h2",44),kt(3),Ie(),Ae(4,"small",45),kt(5),Ie(),Ie(),Ie()),2&n){const e=an();dt(3),Pr(" $",e.totalCurrentValue.minus(e.totalStartingValue).toFormat(2)," "),dt(1),Mt("ngClass",vc(3,Vg,e.totalCurrentValue.minus(e.totalStartingValue).gt(0),e.totalCurrentValue.minus(e.totalStartingValue).lt(0))),dt(1),Pr("",e.totalCurrentValue.minus(e.totalStartingValue).div(e.totalStartingValue).times(100).toFormat(2),"%")}}function She(n,t){1&n&&(Ae(0,"div",46),kt(1," The net PnL of the LP position (inclusive of compounded fees and impermanent loss) and the Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's positions balance. "),Ie())}function khe(n,t){1&n&&(Ae(0,"p",47),qn(1,"span",48),Ie())}function Che(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"div",43),Ae(2,"h2",42),kt(3),Ie(),Ae(4,"small",45),kt(5),Ie(),Ie(),Ie()),2&n){const e=an();dt(3),Pr(" $",e.totalClaimedReward.toFormat(2)," "),dt(1),Mt("ngClass",vc(3,Vg,e.totalClaimedReward.div(e.totalStartingValue).times(100).gt(0),e.totalClaimedReward.div(e.totalStartingValue).times(100).lt(0))),dt(1),Pr("",e.totalClaimedReward.div(e.totalStartingValue).times(100).toFormat(2),"%")}}function Mhe(n,t){1&n&&(Ae(0,"div",46),kt(1," USD value of oLIT that has been claimed and the Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's positions balance. "),Ie())}function Ohe(n,t){1&n&&(Ae(0,"p",47),qn(1,"span",48),Ie())}function Dhe(n,t){if(1&n){const e=Di();Ae(0,"button",52),dr("click",function(){return Ur(e),an(2).claimReward()}),kt(1),Ie()}if(2&n){const e=an(2);dt(1),Pr("Claim ",e.claimableReward.toFixed(2)," oLIT ")}}function Phe(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"div",49),Ae(2,"h2",50),kt(3),Ie(),it(4,Dhe,2,1,"button",51),Ie(),Ie()),2&n){const e=an();dt(3),Pr(" $",e.claimableRewardUSD.toFixed(2)," "),dt(1),Mt("ngIf",e.claimableReward.gt(0))}}function Rhe(n,t){1&n&&(Ae(0,"mat-header-cell",53),kt(1," # "),Ie())}function Nhe(n,t){if(1&n&&(Ae(0,"mat-cell",54),kt(1),Ie()),2&n){const e=t.$implicit,r=an();dt(1),Pr(" ",r.filteredPositions.indexOf(e)+1," ")}}function Bhe(n,t){1&n&&(Ae(0,"mat-header-cell",55),kt(1,"Pool & Range"),Ie())}const FV=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function Fhe(n,t){if(1&n&&(Ae(0,"mat-cell",55),Ae(1,"div",49),Ae(2,"div",56),Ae(3,"div",57),qn(4,"img",58),Ie(),Ae(5,"div",57),qn(6,"img",58),Ie(),Ie(),Ae(7,"span",59),kt(8),Ie(),Ae(9,"span",60),kt(10),Ie(),Ie(),Ie()),2&n){const e=t.$implicit;dt(4),qu("src",e.pool.token0.iconPath,Pi),_l("alt","",e.pool.token0.symbol," Icon"),Mt("ngClass",vc(9,FV,e.pool.token0.symbol.includes("PYT"),e.pool.token0.symbol.includes("NYT"))),dt(2),qu("src",e.pool.token1.iconPath,Pi),_l("alt","",e.pool.token1.symbol," Icon"),Mt("ngClass",vc(12,FV,e.pool.token1.symbol.includes("PYT"),e.pool.token1.symbol.includes("NYT"))),dt(2),cu(" ",e.pool.token0.symbol,"/",e.pool.token1.symbol," "),dt(2),Pr(" ",e.pool.fee/1e4,"% ")}}function Lhe(n,t){1&n&&(Ae(0,"mat-header-cell",61),kt(1," Current Value "),Ie())}function Uhe(n,t){if(1&n&&(Ae(0,"mat-cell",62),Ae(1,"h6",63),kt(2,"Current Value"),Ie(),Ae(3,"div",64),kt(4),Ie(),Ie()),2&n){const e=t.$implicit;dt(4),Pr("$",e.userDepositUSD.toFormat(2),"")}}function jhe(n,t){1&n&&(Ae(0,"mat-header-cell",61),kt(1," Current ROI "),Ie())}function Vhe(n,t){if(1&n&&(Ae(0,"mat-cell",62),Ae(1,"h6",63),kt(2,"Current ROI"),Ie(),Ae(3,"div",65),Ae(4,"div",49),kt(5),Ie(),Ae(6,"div",66),Ae(7,"span",67),kt(8),Ie(),Ie(),Ie(),Ie()),2&n){const e=t.$implicit;dt(5),Pr(" $",e.userDepositROI.toFormat(2)," "),dt(2),Mt("ngClass",vc(3,Vg,e.userDepositROI.gt(0),e.userDepositROI.lt(0))),dt(1),Pr(" ",e.userDepositROI.div(e.startingValue).times(100).toFormat(2),"% ")}}function Hhe(n,t){1&n&&(Ae(0,"mat-header-cell",61),kt(1," Earnings / ROI % "),Ie())}function $he(n,t){if(1&n&&(Ae(0,"mat-cell",62),Ae(1,"h6",63),kt(2,"Earnings"),Ie(),Ae(3,"div",65),Ae(4,"div",49),kt(5),Ie(),Ae(6,"div",66),Ae(7,"span",67),kt(8),Ie(),Ie(),Ie(),Ie()),2&n){const e=t.$implicit;dt(5),Pr(" $",e.earnings.toFormat(2)," "),dt(2),Mt("ngClass",vc(3,Vg,e.earnings.gt(0),e.earnings.lt(0))),dt(1),Pr(" ",e.earnings.div(e.startingValue).times(100).toFormat(2),"% ")}}function Whe(n,t){1&n&&(Ae(0,"mat-header-cell",61),kt(1," Claimed Reward / ROI % "),Ie())}function Ghe(n,t){if(1&n&&(Ae(0,"mat-cell",62),Ae(1,"h6",63),kt(2,"Claimed Reward"),Ie(),Ae(3,"div",65),kt(4),Ae(5,"div",66),Ae(6,"span",67),kt(7),Ie(),Ie(),Ie(),Ie()),2&n){const e=t.$implicit;dt(4),Pr(" $",e.claimedReward.toFormat(2)," "),dt(2),Mt("ngClass",vc(3,Vg,e.claimedReward.div(e.startingValue).times(100).gt(0),e.claimedReward.div(e.startingValue).times(100).lt(0))),dt(1),Pr(" ",e.claimedReward.div(e.startingValue).times(100).toFormat(2),"% ")}}function zhe(n,t){1&n&&qn(0,"mat-header-cell",68)}function qhe(n,t){1&n&&(Ae(0,"span",73),kt(1,"More details"),Ie())}function Khe(n,t){1&n&&qn(0,"i",74)}function Zhe(n,t){1&n&&(Ae(0,"span",73),kt(1,"Close"),Ie())}function Yhe(n,t){1&n&&qn(0,"i",75)}function Jhe(n,t){if(1&n&&(Ae(0,"mat-cell",69),it(1,qhe,2,0,"span",70),it(2,Khe,1,0,"i",71),it(3,Zhe,2,0,"span",70),it(4,Yhe,1,0,"i",72),Ie()),2&n){const e=t.$implicit;dt(1),Mt("ngIf",!e.expanded),dt(1),Mt("ngIf",!e.expanded),dt(1),Mt("ngIf",e.expanded),dt(1),Mt("ngIf",e.expanded)}}function Xhe(n,t){1&n&&(Ae(0,"div",46),kt(1," The starting value of the position in USD. "),Ie())}function Qhe(n,t){1&n&&(Ae(0,"div",46),kt(1," The current Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's positions balance (inclusive of compounded fees, impermanent loss, claimed and claimable rewards). "),Ie())}function epe(n,t){1&n&&(Ae(0,"div",46),kt(1," The net PnL of the LP position (inclusive of compounded fees and impermanent loss) and the Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's position balance. "),Ie())}function tpe(n,t){1&n&&(Ae(0,"div",46),kt(1," The usd value of the fees compounded back into the position and the Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's position balance. "),Ie())}function npe(n,t){1&n&&(Ae(0,"div",46),kt(1," USD value of oLIT that has been claimed and the Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's position balance. "),Ie())}function rpe(n,t){1&n&&(Ae(0,"div",46),kt(1," USD value of oLIT that can be claimed and the Return on Investment (ROI)% that represents the gains or losses made, expressed as a percentage of the starting value of the user's position balance. "),Ie())}function ipe(n,t){1&n&&(Ae(0,"div",46),kt(1," The value decline in the original LP position, excluding compounded fees "),Ie())}function spe(n,t){if(1&n){const e=Di();Ae(0,"mat-cell",76),Ae(1,"div",77),Ae(2,"div",78),Ae(3,"div",79),Ae(4,"div",80),kt(5,"LP position details"),Ie(),Ae(6,"div",81),Ae(7,"div",82),Ae(8,"div",83),Ae(9,"p",84),kt(10,"Starting Value "),qn(11,"span",7),Ie(),Ie(),Ae(12,"div",85),Ae(13,"p",86),kt(14),Ie(),Ie(),it(15,Xhe,2,0,"ng-template",null,87,xu),Ie(),Ae(17,"div",88),Ae(18,"div",83),Ae(19,"p",84),qn(20,"i",89),kt(21),Ie(),Ie(),Ae(22,"div",85),Ae(23,"p",86),kt(24),Ie(),Ae(25,"small",5),kt(26),Ie(),Ie(),Ie(),Ae(27,"div",88),Ae(28,"div",83),Ae(29,"p",84),qn(30,"i",89),kt(31),Ie(),Ie(),Ae(32,"div",85),Ae(33,"p",86),kt(34),Ie(),Ae(35,"small",5),kt(36),Ie(),Ie(),Ie(),Ae(37,"div",82),Ae(38,"div",83),Ae(39,"p",84),kt(40,"Current Value"),Ie(),Ie(),Ae(41,"div",85),Ae(42,"p",86),kt(43),Ie(),Ie(),Ie(),Ae(44,"div",88),Ae(45,"div",83),Ae(46,"p",84),qn(47,"i",89),kt(48),Ie(),Ie(),Ae(49,"div",85),Ae(50,"p",86),kt(51),Ie(),Ae(52,"small",5),kt(53),Ie(),Ie(),Ie(),Ae(54,"div",88),Ae(55,"div",83),Ae(56,"p",84),qn(57,"i",89),kt(58),Ie(),Ie(),Ae(59,"div",85),Ae(60,"p",86),kt(61),Ie(),Ae(62,"small",5),kt(63),Ie(),Ie(),Ie(),Ae(64,"div",82),Ae(65,"div",83),Ae(66,"p",84),kt(67,"Min price"),Ie(),Ie(),Ae(68,"div",85),Ae(69,"p",86),kt(70),Ie(),Ie(),Ie(),Ae(71,"div",82),Ae(72,"div",83),Ae(73,"p",84),kt(74,"Max price"),Ie(),Ie(),Ae(75,"div",85),Ae(76,"p",86),kt(77),Ie(),Ie(),Ie(),Ie(),Ae(78,"div",90),Ae(79,"button",91),dr("click",function(){const p=Ur(e).$implicit;return an().managePosition(p)}),kt(80," Manage Position "),Ie(),Ie(),Ie(),Ie(),Ae(81,"div",78),Ae(82,"div",79),Ae(83,"div",80),kt(84,"LP position performances"),Ie(),Ae(85,"div",81),Ae(86,"div",82),Ae(87,"div",83),Ae(88,"p",84),kt(89,"Current ROI% "),qn(90,"span",7),Ie(),Ie(),Ae(91,"div",85),Ae(92,"p",86),kt(93),Ie(),Ae(94,"small",67),kt(95),Ie(),Ie(),it(96,Qhe,2,0,"ng-template",null,92,xu),Ie(),Ae(98,"div",82),Ae(99,"div",83),Ae(100,"p",84),kt(101,"Earnings / ROI% "),qn(102,"span",7),Ie(),Ie(),Ae(103,"div",85),Ae(104,"p",86),kt(105),Ie(),Ae(106,"small",67),kt(107),Ie(),Ie(),it(108,epe,2,0,"ng-template",null,93,xu),Ie(),Ae(110,"div",82),Ae(111,"div",83),Ae(112,"p",84),kt(113,"Compounded Fees / ROI% "),qn(114,"span",7),Ie(),Ie(),Ae(115,"div",85),Ae(116,"p",86),kt(117),Ie(),Ae(118,"small",5),kt(119),Ie(),Ie(),it(120,tpe,2,0,"ng-template",null,94,xu),Ie(),Ae(122,"div",88),Ae(123,"div",83),Ae(124,"p",84),qn(125,"i",89),kt(126),Ie(),Ie(),Ae(127,"div",85),Ae(128,"p",86),kt(129),Ie(),Ae(130,"small",5),kt(131),Ie(),Ie(),Ie(),Ae(132,"div",88),Ae(133,"div",83),Ae(134,"p",84),qn(135,"i",89),kt(136),Ie(),Ie(),Ae(137,"div",85),Ae(138,"p",86),kt(139),Ie(),Ae(140,"small",5),kt(141),Ie(),Ie(),Ie(),Ae(142,"div",82),Ae(143,"div",83),Ae(144,"p",84),kt(145,"Claimed Rewards / ROI% "),qn(146,"span",7),Ie(),Ie(),Ae(147,"div",85),Ae(148,"p",86),kt(149),Ie(),Ae(150,"small",67),kt(151),Ie(),Ie(),it(152,npe,2,0,"ng-template",null,95,xu),Ie(),Ae(154,"div",82),Ae(155,"div",83),Ae(156,"p",84),kt(157,"Claimable Rewards / ROI% "),qn(158,"span",7),Ie(),Ie(),Ae(159,"div",85),Ae(160,"p",86),kt(161),Ie(),Ae(162,"small",67),kt(163),Ie(),Ie(),it(164,rpe,2,0,"ng-template",null,96,xu),Ie(),Ae(166,"div",82),Ae(167,"div",83),Ae(168,"p",84),kt(169,"Impermanent Loss "),qn(170,"span",7),Ie(),Ie(),Ae(171,"div",85),Ae(172,"p",86),kt(173),Ie(),Ae(174,"small",67),kt(175),Ie(),Ie(),it(176,ipe,2,0,"ng-template",null,97,xu),Ie(),Ie(),Ie(),Ie(),Ie(),Ie()}if(2&n){const e=t.$implicit,r=nr(16),s=nr(97),p=nr(109),F=nr(121),q=nr(153),te=nr(165),fe=nr(177);dt(11),Mt("ngbTooltip",r),dt(3),Pr(" $",e.startingValue.toFormat(2)," "),dt(7),Pr("",e.pool.token0.symbol," Cost Basis"),dt(3),Pr(" ",e.token0CostBasisPerShare.times(e.userDeposit).toFormat(4)," "),dt(2),Pr(" $",e.token0CostBasisPerShare.times(e.userDeposit).times(e.pool.token0.price).toFormat(2)," "),dt(5),Pr("",e.pool.token1.symbol," Cost Basis"),dt(3),Pr(" ",e.token1CostBasisPerShare.times(e.userDeposit).toFormat(4)," "),dt(2),Pr(" $",e.token1CostBasisPerShare.times(e.userDeposit).times(e.pool.token1.price).toFormat(2)," "),dt(7),Pr(" $",e.userDepositUSD.toFormat(2)," "),dt(5),Pr("",e.pool.token0.symbol," Current Value"),dt(3),Pr(" ",e.amount0PerShare.times(e.userDeposit).toFormat(4)," "),dt(2),Pr(" $",e.amount0PerShare.times(e.userDeposit).times(e.pool.token0.price).toFormat(2)," "),dt(5),Pr("",e.pool.token1.symbol," Current Value"),dt(3),Pr(" ",e.amount1PerShare.times(e.userDeposit).toFormat(4)," "),dt(2),Pr(" $",e.amount1PerShare.times(e.userDeposit).times(e.pool.token1.price).toFormat(2)," "),dt(7),Lc("",e.minPrice.gt(1)?e.minPrice.toFixed(4):e.minPrice.toPrecision(4)," ",e.pool.token1.symbol," per ",e.pool.token0.symbol," "),dt(7),Lc(" ",e.maxPrice.eq("Infinity")?"\u221e":e.maxPrice.gt(1)?e.maxPrice.toFixed(4):e.maxPrice.toPrecision(4)," ",e.pool.token1.symbol," per ",e.pool.token0.symbol," "),dt(13),Mt("ngbTooltip",s),dt(3),Pr(" $",e.userDepositROI.toFormat(2)," "),dt(1),Mt("ngClass",vc(50,Vg,e.userDepositROI.gt(0),e.userDepositROI.lt(0))),dt(1),Pr(" ",e.userDepositROI.div(e.startingValue).times(100).toFormat(2),"% "),dt(7),Mt("ngbTooltip",p),dt(3),Pr(" $",e.earnings.toFormat(2)," "),dt(1),Mt("ngClass",vc(53,Vg,e.earnings.gt(0),e.earnings.lt(0))),dt(1),Pr(" ",e.earnings.div(e.startingValue).times(100).toFormat(2),"% "),dt(7),Mt("ngbTooltip",F),dt(3),Pr(" $",e.compoundedFees.toFormat(4)," "),dt(2),Pr(" ",e.compoundedFees.div(e.startingValue).times(100).toFormat(2),"% "),dt(7),Pr("",e.pool.token0.symbol," Fees Compounded"),dt(3),Pr(" ",e.token0CompoundedPerShare.times(e.userDeposit).toFormat(4)," "),dt(2),Pr(" $",e.token0CompoundedPerShare.times(e.userDeposit).times(e.pool.token0.price).toFormat(2)," "),dt(5),Pr("",e.pool.token1.symbol," Fees Compounded"),dt(3),Pr(" ",e.token1CompoundedPerShare.times(e.userDeposit).toFormat(4)," "),dt(2),Pr(" $",e.token1CompoundedPerShare.times(e.userDeposit).times(e.pool.token1.price).toFormat(2)," "),dt(5),Mt("ngbTooltip",q),dt(3),Pr(" $",e.claimedReward.toFormat(2)," "),dt(1),Mt("ngClass",vc(56,Vg,e.claimedReward.div(e.startingValue).times(100).gt(0),e.claimedReward.div(e.startingValue).times(100).lt(0))),dt(1),Pr(" ",e.claimedReward.div(e.startingValue).times(100).toFormat(2),"% "),dt(7),Mt("ngbTooltip",te),dt(3),Pr(" $",e.claimableReward.toFormat(2)," "),dt(1),Mt("ngClass",vc(59,Vg,e.claimableReward.div(e.startingValue).times(100).gt(0),e.claimableReward.div(e.startingValue).times(100).lt(0))),dt(1),Pr(" ",e.claimableReward.div(e.startingValue).times(100).toFormat(2),"% "),dt(7),Mt("ngbTooltip",fe),dt(3),Pr(" $",e.impermanentLoss.toFormat(4)," "),dt(1),Mt("ngClass",vc(62,Vg,e.impermanentLoss.gt(0),e.impermanentLoss.lt(0))),dt(1),Pr(" ",e.impermanentLoss.div(e.startingValue).times(100).toFormat(2),"% ")}}function ope(n,t){1&n&&qn(0,"mat-header-row",98)}function ape(n,t){if(1&n){const e=Di();Ae(0,"mat-row",99),dr("click",function(){const p=Ur(e).$implicit;return p.expanded=!p.expanded}),Ie()}}function upe(n,t){1&n&&qn(0,"mat-row",100),2&n&&Mt("hidden",!t.$implicit.expanded)}function cpe(n,t){1&n&&(Qr(0),Ae(1,"h3",103),kt(2," No positions found "),Ie(),Wr())}function lpe(n,t){1&n&&(Qr(0),Ae(1,"div",105),Ae(2,"p",106),qn(3,"span",107),Ie(),Ae(4,"p",108),qn(5,"span",109),Ie(),Ae(6,"p",110),qn(7,"span",111),Ie(),Ae(8,"p",110),qn(9,"span",111),Ie(),Ae(10,"p",110),qn(11,"span",111),Ie(),Ae(12,"p",110),qn(13,"span",111),Ie(),Ae(14,"p",112),qn(15,"span",107),Ie(),Ie(),Wr())}const dpe=function(){return[]};function fpe(n,t){1&n&&(Qr(0),it(1,lpe,16,0,"ng-container",104),Wr()),2&n&&(dt(1),Mt("ngForOf",sf(1,dpe).constructor(10)))}function hpe(n,t){if(1&n&&(Ae(0,"div",101),it(1,cpe,3,0,"ng-container",102),it(2,fpe,2,2,"ng-container",102),Ie()),2&n){const e=an();dt(1),Mt("ngIf",0===e.positions.length&&e.store.getStatus(e.wallet.chainId).match("success")&&e.store.getUserStatus(e.wallet.chainId).match("pending|success")),dt(1),Mt("ngIf",!(0!==e.positions.length||e.store.getStatus(e.wallet.chainId).match("success")&&e.store.getUserStatus(e.wallet.chainId).match("pending|success")))}}function ppe(n,t){if(1&n){const e=Di();Ae(0,"div",113),Ae(1,"button",114),dr("click",function(){return Ur(e),an().paginatePositions(!1,!0)}),Ie(),Ae(2,"div",5),kt(3),Ie(),Ae(4,"button",115),dr("click",function(){return Ur(e),an().paginatePositions(!0,!1)}),Ie(),Ie()}if(2&n){const e=an();dt(1),Mt("disabled",0===e.index),dt(2),cu(" Page ",e.index+1," of ",e.maxIndex," "),dt(1),Mt("disabled",e.index===e.maxIndex-1)}}const LV=function(){return["rank","assets","userDepositUSD","userDepositROI","earnings","claimedReward","actions"]},mpe=function(){return["expandedDetails"]},pI=class{constructor(t,e,r,s,p,F){yt(this,"chain"),yt(this,"contract"),yt(this,"router"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"PAGE_SIZE",20),yt(this,"index"),yt(this,"maxIndex"),yt(this,"gauges_subscription"),yt(this,"bunniTokens_subscription"),yt(this,"positions"),yt(this,"filteredPositions"),yt(this,"paginatedPositions"),yt(this,"gauges"),yt(this,"claimableReward"),yt(this,"claimableRewardUSD"),yt(this,"totalStartingValue"),yt(this,"totalCurrentValue"),yt(this,"totalClaimedReward"),yt(this,"totalClaimableReward"),yt(this,"totalCurrentROI"),this.chain=t,this.contract=e,this.router=r,this.store=s,this.util=p,this.wallet=F}ngOnInit(){this.resetData(),this.bunniTokens_subscription=this.store.bunniTokens_observable.subscribe(t=>{if(this.positions&&t[1]&&t[1]!==this.wallet.chainId)return;let e=new sn.Z(0),r=new sn.Z(0),s=new sn.Z(0),p=new sn.Z(0),F=new sn.Z(0),q=Object.values(t[0]).reduce((te,fe)=>{if(fe.chainId===this.wallet.chainId&&fe.userDeposit.gt(0)){const Re=fe.userCostBasisPerShareUSD.times(fe.userDeposit),$e=fe.gauge?fe.userClaimedRewardPerShareUSD.times(fe.userDeposit):new sn.Z(0),rt=fe.gauge?fe.gauge.claimableReward.times(fe.gauge.oLIT.price):new sn.Z(0),ft=Object.assign(new gpe,fe,{earnings:fe.userDepositUSD.minus(Re),claimedReward:$e,claimableReward:rt,compoundedFees:fe.userCompoundedPerShareUSD.times(fe.userDeposit),impermanentLoss:fe.userDepositUSD.minus(fe.userCompoundedPerShareUSD.times(fe.userDeposit)).minus(Re),startingValue:Re,userDepositROI:fe.userDepositUSD.plus($e).plus(rt).minus(Re)});te.push(ft),e=e.plus(Re),r=r.plus(ft.userDepositUSD),s=s.plus($e),p=p.plus(rt),F=F.plus(ft.userDepositROI)}return te},[]);q.length&&(q=this.util.sortByProp(q,"userDepositUSD",!1)),this.totalStartingValue=e,this.totalCurrentValue=r,this.totalClaimedReward=s,this.totalClaimableReward=p,this.totalCurrentROI=F,this.positions=q,this.filterPositions(),this.paginatePositions()}),this.gauges_subscription=this.store.gauges_observable.subscribe(t=>{this.gauges=[],this.claimableReward=new sn.Z(0),this.claimableRewardUSD=new sn.Z(0);const e=this.store.getToken(this.util.id(Z1[this.wallet.chainId].toLowerCase(),this.wallet.chainId));Object.values(t).filter(s=>s.chainId===this.wallet.chainId&&s.claimableReward.gt(0)).forEach(s=>{this.gauges=this.gauges.concat(s.address),this.claimableReward=this.claimableReward.plus(s.claimableReward),this.claimableRewardUSD=this.claimableRewardUSD.plus(s.claimableReward.times(e.price))})})}ngOnDestroy(){this.gauges_subscription.unsubscribe(),this.bunniTokens_subscription.unsubscribe()}resetData(){this.index=0,this.maxIndex=0,this.gauges=[],this.claimableReward=new sn.Z(0),this.claimableRewardUSD=new sn.Z(0),this.totalStartingValue=new sn.Z(0),this.totalCurrentValue=new sn.Z(0),this.totalClaimedReward=new sn.Z(0),this.totalClaimableReward=new sn.Z(0),this.totalCurrentROI=new sn.Z(0)}managePosition(t){const e=this.chain.idToSlug(t.chainId);this.router.navigate([`/pools/${e}/${t.pool.address.toLowerCase()}/${t.address.toLowerCase()}`])}filterPositions(t){if(t){const e=t.toLowerCase().trim().split(" "),r=this.positions.filter(s=>{for(let p of e)if(!(s.address.toLowerCase().match(p)||s.gauge.address.toLowerCase().match(p)||s.pool.address.toLowerCase().match(p)||s.pool.token0.name.toLowerCase().match(p)||s.pool.token0.symbol.toLowerCase().match(p)||s.pool.token0.address.toLowerCase().match(p)||s.pool.token1.name.toLowerCase().match(p)||s.pool.token1.symbol.toLowerCase().match(p)||s.pool.token1.address.toLowerCase().match(p)))return!1;return!0});this.filteredPositions=r}else this.filteredPositions=this.positions;this.index=0,this.maxIndex=Math.ceil(this.filteredPositions.length/this.PAGE_SIZE),this.paginatePositions()}paginatePositions(t,e){t&&(this.index=this.index+1),e&&(this.index=this.index-1),this.paginatedPositions=this.filteredPositions.slice(this.index*this.PAGE_SIZE,(this.index+1)*this.PAGE_SIZE)}sortPositions(t){this.positions=[...this.util.sortByProp(this.positions,t.active,"asc"===t.direction)],this.filteredPositions=[...this.util.sortByProp(this.filteredPositions,t.active,"asc"===t.direction)],this.paginatePositions()}claimReward(){const t=this.wallet.web3;let e=null,r=null;if(this.chain.isTestnet(this.wallet.chainId)||this.chain.isMainnet(this.wallet.chainId))e=this.contract.getMinter(t,this.wallet.chainId),r=e.methods.mintMany(this.gauges);else{if(e=this.contract.getChildGaugeFactory(t,this.wallet.chainId),this.gauges.length>64){const s=new Error("cannot claim from more than 64 gauges at a time");throw this.wallet.openErrorModal(s),s}r=e.methods.mint_many(this.gauges)}this.wallet.sendTx(r,()=>{},()=>{},s=>{this.claimableReward=new sn.Z(0),this.claimableRewardUSD=new sn.Z(0);const p=s.events.Minted;if(p.length)p.forEach(q=>{let[te,fe]=[[],[]];te.push("claimableReward")&&fe.push(new sn.Z(0)),this.store.updateGauge(this.util.id(q.returnValues.gauge.toLowerCase(),this.wallet.chainId),te,fe)});else{let[q,te]=[[],[]];q.push("claimableReward")&&te.push(new sn.Z(0)),this.store.updateGauge(this.util.id(p.returnValues.gauge.toLowerCase(),this.wallet.chainId),q,te)}const F=this.store.getToken(this.util.id(Z1[this.wallet.chainId].toLowerCase(),this.wallet.chainId));this.contract.getERC20(F.address,t).methods.balanceOf(this.wallet.user).call().then(q=>{console.log(q),this.store.updateToken(F.id,["userBalance"],[new sn.Z(q).div(F.precision)],!0)})},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}};let FT=pI;yt(FT,"\u0275fac",function(e){return new(e||pI)(Xt(dc),Xt(ud),Xt(_0),Xt(el),Xt($c),Xt(Xa))}),yt(FT,"\u0275cmp",bn({type:pI,selectors:[["app-portfolio"]],decls:73,vars:21,consts:[[1,"container","py-5"],[1,"row","justify-content-center"],[1,"col"],[1,"row","row-cols-1","row-cols-md","g-4","mb-4","d-flex","justify-content-between"],[1,"col-6","col-lg-auto"],[1,"text-muted"],[4,"ngIf","ngIfElse"],[1,"fe","fe-info","ms-1",3,"ngbTooltip"],["TotalCurrentROIInfo",""],["TotalEarningsInfo",""],["loadingData",""],["TotalClaimedRewardsInfo",""],[1,"col-12","col-lg-auto"],[1,"card","card-inner-shadow"],[1,"card-header","border-bottom"],[1,"input-group","input-group-flush","input-group-merge","input-group-reverse"],["type","search","placeholder","Filter by name, symbol or address",1,"form-control","list-search",3,"input"],[1,"input-group-text"],[1,"fe","fe-search"],["mat-table","","matSort","","matSortActive","userDepositUSD","matSortDirection","desc","matSortDisableClear","","multiTemplateDataRows","",1,"card-body","p-0",3,"dataSource","matSortChange"],["matColumnDef","rank"],["class","col-1 col-lg-auto px-0 pe-4",4,"matHeaderCellDef"],["class","col-1 col-lg-auto px-0 pe-4 text-muted",4,"matCellDef"],["matColumnDef","assets"],["class","col-11 col-lg px-0",4,"matHeaderCellDef"],["class","col-11 col-lg px-0",4,"matCellDef"],["matColumnDef","userDepositUSD"],["mat-sort-header","","arrowPosition","before","class","col-6 col-lg-2 px-0 justify-content-lg-end",4,"matHeaderCellDef"],["class","col-6 col-lg-2 d-block d-lg-flex justify-content-lg-end px-0 py-3 mb-lg-0",4,"matCellDef"],["matColumnDef","userDepositROI"],["matColumnDef","earnings"],["matColumnDef","claimedReward"],["matColumnDef","actions"],["class","col-12 col-lg-1 px-0 justify-content-lg-end",4,"matHeaderCellDef"],["class","col-6 col-lg-1 d-flex justify-content-lg-end px-0 py-3 mb-lg-0",4,"matCellDef"],["matColumnDef","expandedDetails"],["class","col-12 col-lg d-block p-4 border-mobile-bottom",4,"matCellDef"],["class","d-none d-lg-flex border border-0 border-bottom pt-0 px-4 text-muted",4,"matHeaderRowDef"],["class","row border-bottom clickable text-white mx-0 px-4 pt-4 pt-lg-2 pb-0 my-0",3,"click",4,"matRowDef","matRowDefColumns"],["class","expandedDetails border border-top bg-dark mt-0 mb-0",3,"hidden",4,"matRowDef","matRowDefColumns"],["class","no-data-row",4,"matNoDataRow"],["class","d-flex align-items-center justify-content-center border-top py-2",4,"ngIf"],[1,"m-0","text-white","display-4"],[1,"d-flex","align-items-baseline"],[1,"m-0","display-4"],[1,"ms-2",3,"ngClass"],[1,"d-flex","flex-column"],[1,"placeholder-wave","py-3","m-0","pe-4"],[1,"placeholder","placeholder-lg","w-100","border","rounded-pill","text-transparent"],[1,"d-flex","align-items-center"],[1,"m-0","me-3","text-white","display-4"],["type","button","class","btn btn-sm btn-shadow-rainbow position-relative fw-bold text-dark",3,"click",4,"ngIf"],["type","button",1,"btn","btn-sm","btn-shadow-rainbow","position-relative","fw-bold","text-dark",3,"click"],[1,"col-1","col-lg-auto","px-0","pe-4"],[1,"col-1","col-lg-auto","px-0","pe-4","text-muted"],[1,"col-11","col-lg","px-0"],[1,"avatar-group"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle",3,"src","alt","ngClass"],[1,"mx-2","col-auto"],[1,"badge","bg-dark","rounded-1"],["mat-sort-header","","arrowPosition","before",1,"col-6","col-lg-2","px-0","justify-content-lg-end"],[1,"col-6","col-lg-2","d-block","d-lg-flex","justify-content-lg-end","px-0","py-3","mb-lg-0"],[1,"text-muted","text-uppercase","d-block","d-lg-none","mb-2"],[1,"d-block"],[1,"d-flex","flex-column","align-items-lg-end","justify-content-center"],[1,"d-flex","justify-content-lg-end"],[3,"ngClass"],[1,"col-12","col-lg-1","px-0","justify-content-lg-end"],[1,"col-6","col-lg-1","d-flex","justify-content-lg-end","px-0","py-3","mb-lg-0"],["class","d-inline-block d-lg-none",4,"ngIf"],["class","fe fe-chevron-down",4,"ngIf"],["class","fe fe-chevron-up",4,"ngIf"],[1,"d-inline-block","d-lg-none"],[1,"fe","fe-chevron-down"],[1,"fe","fe-chevron-up"],[1,"col-12","col-lg","d-block","p-4","border-mobile-bottom"],[1,"row","g-4"],[1,"col-12","col-lg-6"],[1,"card","card-inner-shadow","mb-0","h-100"],[1,"card-header"],[1,"card-body","pb-0"],[1,"row","d-flex","align-items-center","mb-4"],[1,"col-12","col-lg-8"],[1,"text-muted","mb-0"],[1,"col","col-lg-4","text-lg-end"],[1,"m-0"],["StartingValueInfo",""],[1,"row","ms-2","d-flex","align-items-center","mb-4"],[1,"fe","fe-corner-down-right","me-2"],[1,"card-footer","d-flex","border-top","border-gray-700"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold","text-dark","mx-0","mb-0","w-100",3,"click"],["CurrentROIInfo",""],["EarningsInfo",""],["CompoundedFeesInfo",""],["ClaimedRewardsInfo",""],["ClaimableRewardsInfo",""],["ImpermanentLossInfo",""],[1,"d-none","d-lg-flex","border","border-0","border-bottom","pt-0","px-4","text-muted"],[1,"row","border-bottom","clickable","text-white","mx-0","px-4","pt-4","pt-lg-2","pb-0","my-0",3,"click"],[1,"expandedDetails","border","border-top","bg-dark","mt-0","mb-0",3,"hidden"],[1,"no-data-row"],[4,"ngIf"],[1,"text-center","text-muted","py-3","my-3"],[4,"ngFor","ngForOf"],[1,"d-flex","px-4","p-2"],[1,"col-auto","placeholder-wave","py-3","m-0","pe-4"],[1,"placeholder","placeholder-lg","avatar-xxs","border","rounded-circle","text-transparent"],[1,"col","placeholder-wave","py-3","m-0"],[1,"placeholder","placeholder-lg","col-10","border","rounded-pill","text-transparent"],[1,"col-2","text-end","placeholder-wave","py-3","m-0"],[1,"placeholder","placeholder-lg","col-4","border","rounded-pill","text-transparent"],[1,"col-1","text-end","placeholder-wave","py-3","m-0"],[1,"d-flex","align-items-center","justify-content-center","border-top","py-2"],[1,"btn","m-0","fe","fe-arrow-left","text-white","clickable","border-0",3,"disabled","click"],[1,"btn","m-0","fe","fe-arrow-right","text-white","clickable","border-0",3,"disabled","click"]],template:function(e,r){if(1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",4),Ae(5,"h5",5),kt(6,"Balance"),Ie(),it(7,Ehe,3,1,"div",6),Ie(),Ae(8,"div",4),Ae(9,"h5",5),kt(10,"Current ROI "),qn(11,"span",7),Ie(),it(12,The,6,6,"div",6),it(13,Ahe,2,0,"ng-template",null,8,xu),Ie(),Ae(15,"div",4),Ae(16,"h5",5),kt(17,"Earnings / ROI% "),qn(18,"span",7),Ie(),it(19,Ihe,6,6,"div",6),it(20,She,2,0,"ng-template",null,9,xu),Ie(),Ae(22,"div",4),Ae(23,"h5",5),kt(24,"Claimed Rewards / ROI% "),qn(25,"span",7),Ie(),it(26,khe,2,0,"ng-template",null,10,xu),it(28,Che,6,6,"div",6),it(29,Mhe,2,0,"ng-template",null,11,xu),Ie(),Ae(31,"div",12),Ae(32,"h5",5),kt(33,"Claimable Rewards"),Ie(),it(34,Ohe,2,0,"ng-template",null,10,xu),it(36,Phe,5,2,"div",6),Ie(),Ie(),Ae(37,"div",13),Ae(38,"div",14),Ae(39,"form"),Ae(40,"div",15),Ae(41,"input",16),dr("input",function(p){return r.filterPositions(p.target.value)}),Ie(),Ae(42,"div",17),qn(43,"span",18),Ie(),Ie(),Ie(),Ie(),Ae(44,"table",19),dr("matSortChange",function(p){return r.sortPositions(p)}),Qr(45,20),it(46,Rhe,2,0,"mat-header-cell",21),it(47,Nhe,2,1,"mat-cell",22),Wr(),Qr(48,23),it(49,Bhe,2,0,"mat-header-cell",24),it(50,Fhe,11,15,"mat-cell",25),Wr(),Qr(51,26),it(52,Lhe,2,0,"mat-header-cell",27),it(53,Uhe,5,1,"mat-cell",28),Wr(),Qr(54,29),it(55,jhe,2,0,"mat-header-cell",27),it(56,Vhe,9,6,"mat-cell",28),Wr(),Qr(57,30),it(58,Hhe,2,0,"mat-header-cell",27),it(59,$he,9,6,"mat-cell",28),Wr(),Qr(60,31),it(61,Whe,2,0,"mat-header-cell",27),it(62,Ghe,8,6,"mat-cell",28),Wr(),Qr(63,32),it(64,zhe,1,0,"mat-header-cell",33),it(65,Jhe,5,4,"mat-cell",34),Wr(),Qr(66,35),it(67,spe,178,65,"mat-cell",36),Wr(),it(68,ope,1,0,"mat-header-row",37),it(69,ape,1,0,"mat-row",38),it(70,upe,1,1,"mat-row",39),it(71,hpe,3,2,"div",40),Ie(),it(72,ppe,5,4,"div",41),Ie(),Ie(),Ie(),Ie()),2&e){const s=nr(14),p=nr(21),F=nr(27),q=nr(30);dt(7),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",F),dt(4),Mt("ngbTooltip",s),dt(1),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",F),dt(6),Mt("ngbTooltip",p),dt(1),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",F),dt(6),Mt("ngbTooltip",q),dt(3),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",F),dt(8),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",F),dt(8),Mt("dataSource",r.paginatedPositions),dt(24),Mt("matHeaderRowDef",sf(18,LV)),dt(1),Mt("matRowDefColumns",sf(19,LV)),dt(1),Mt("matRowDefColumns",sf(20,mpe)),dt(2),Mt("ngIf",r.positions.length>0)}},directives:[La,OM,cv,bw,Hb,lv,Vb,L5,hv,aw,dh,dv,fv,MT,U5,pv,L0],styles:[""]}));class gpe extends KE{constructor(){super(...arguments),yt(this,"expanded",!1),yt(this,"earnings",new sn.Z(0)),yt(this,"claimedReward",new sn.Z(0)),yt(this,"claimableReward",new sn.Z(0)),yt(this,"impermanentLoss",new sn.Z(0)),yt(this,"compoundedFees",new sn.Z(0)),yt(this,"startingValue",new sn.Z(0)),yt(this,"userDepositROI",new sn.Z(0))}}function ype(n,t){1&n&&(Ae(0,"small",7),qn(1,"i",8),kt(2," Invalid lock duration "),Ie())}const bpe=function(n){return{"border border-danger":n}},mI=class{constructor(t){yt(this,"time"),yt(this,"error"),yt(this,"timestamp"),yt(this,"timestampChange",new mo),this.time=t}ngOnInit(){}setDate(t){!t||(this.timestamp=new Date(t).getTime()/1e3,this.timestampChange.emit(this.timestamp))}setDuration(t){const e=Date.now(),r=1e3*this.time.week,p=Math.floor((e+1e3*t)/r)*r;this.timestamp=p/1e3,this.timestampChange.emit(this.timestamp)}formatDate(t){const e=new Date(1e3*t);return`${e.toLocaleString("default",{year:"numeric",timeZone:"UTC"})}-${e.toLocaleString("default",{month:"2-digit",timeZone:"UTC"})}-${e.toLocaleString("default",{day:"2-digit",timeZone:"UTC"})}`}};let _w=mI;function vpe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"app-token-approval-button",10),dr("allowanceChange",function(s){Ur(e);const p=an(3);return p.bptToken.userAllowances[p.veToken.address]=s}),Ie(),Wr()}if(2&n){const e=an(3);dt(1),Mt("token",e.bptToken)("amount",e.bptAmount)("spender",e.veToken.address)("spenderAllowance",e.bptToken.userAllowances[e.veToken.address])}}function _pe(n,t){if(1&n){const e=Di();Ae(0,"div",11),Ae(1,"button",12),dr("click",function(){return Ur(e),an(3).createLock()}),kt(2),Ie(),Ie()}if(2&n){const e=an(3);dt(1),Mt("disabled",!e.canLock()),dt(1),Pr(" ",e.message()," ")}}function wpe(n,t){if(1&n&&(Qr(0),it(1,vpe,2,4,"ng-container",8),it(2,_pe,3,2,"div",9),Wr()),2&n){const e=an(2);dt(1),Mt("ngIf",e.canApprove()&&!e.approved()),dt(1),Mt("ngIf",!e.canApprove()||e.approved())}}function xpe(n,t){if(1&n){const e=Di();Ae(0,"div",11),Ae(1,"button",13),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),kt(2," Switch to Mainnet "),Ie(),Ie()}}function Epe(n,t){if(1&n&&(Qr(0),it(1,wpe,3,2,"ng-container",8),it(2,xpe,3,0,"div",9),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.wallet.chainId===e.chain.id.ETHEREUM||e.wallet.chainId===e.chain.id.GOERLI),dt(1),Mt("ngIf",e.wallet.chainId!==e.chain.id.ETHEREUM&&e.wallet.chainId!==e.chain.id.GOERLI)}}function Tpe(n,t){if(1&n){const e=Di();Ae(0,"div",11),Ae(1,"button",13),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(2," Connect a Wallet "),Ie(),Ie()}}yt(_w,"\u0275fac",function(e){return new(e||mI)(Xt(km))}),yt(_w,"\u0275cmp",bn({type:mI,selectors:[["app-date-selector"]],inputs:{error:"error",timestamp:"timestamp"},outputs:{timestampChange:"timestampChange"},decls:18,vars:5,consts:[[1,"container","p-0","mb-2"],[1,"card","card-inner-shadow","mb-3",3,"ngClass"],[1,"card-body"],["type","date","name","lockDuration","id","lockDuration","autocomplete","off","max","9999-12-31",1,"form-control","form-control-flush","form-control-lg","text-start","p-0","text-truncate","w-100",3,"value","input"],["class","d-flex align-items-center justify-content-end text-danger mt-1",4,"ngIf"],["role","group","aria-label","",1,"btn-group","w-100"],["type","button",1,"btn","btn-sm","btn-dark",3,"click"],[1,"d-flex","align-items-center","justify-content-end","text-danger","mt-1"],[1,"fe","fe-alert-triangle","me-2"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"input",3),dr("input",function(p){return r.setDate(p.target.value)}),Ie(),it(4,ype,3,0,"small",4),Ie(),Ie(),Ae(5,"div",5),Ae(6,"button",6),dr("click",function(){return r.setDuration(r.time.month)}),kt(7," 1 month "),Ie(),Ae(8,"button",6),dr("click",function(){return r.setDuration(3*r.time.month)}),kt(9," 3 months "),Ie(),Ae(10,"button",6),dr("click",function(){return r.setDuration(6*r.time.month)}),kt(11," 6 months "),Ie(),Ae(12,"button",6),dr("click",function(){return r.setDuration(r.time.year)}),kt(13," 1 year "),Ie(),Ae(14,"button",6),dr("click",function(){return r.setDuration(2*r.time.year)}),kt(15," 2 years "),Ie(),Ae(16,"button",6),dr("click",function(){return r.setDuration(4*r.time.year)}),kt(17," 4 years "),Ie(),Ie(),Ie()),2&e&&(dt(1),Mt("ngClass",Ic(3,bpe,r.error)),dt(2),Mt("value",r.formatDate(r.timestamp)),dt(1),Mt("ngIf",r.error))},directives:[dh,La],styles:[""]}));const gI=class{constructor(t,e,r,s,p,F,q,te){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"time"),yt(this,"util"),yt(this,"wallet"),yt(this,"veToken"),yt(this,"bptToken"),yt(this,"veAmount"),yt(this,"bptAmount"),yt(this,"locktime"),this.modalService=t,this.approval=e,this.chain=r,this.contract=s,this.store=p,this.time=F,this.util=q,this.wallet=te}ngOnInit(){this.bptAmount=new sn.Z(0),this.veAmount=new sn.Z(0);const t=Date.now(),e=1e3*this.time.week;this.locktime=Math.floor((t+1e3*this.time.year)/e)*e/1e3}setAmount(t){this.bptAmount=t,this.veAmount=this.getOutputAmount()}setDuration(t){this.locktime=t,this.veAmount=this.getOutputAmount()}getOutputAmount(){const t=Date.now(),e=1e3*this.time.week,r=1e3*this.time.year,s=Math.floor(1e3*this.locktime/e)*e,p=this.bptAmount.times((s-t)/(4*r));return p.lt(0)?new sn.Z(0):p.gt(this.bptAmount)?this.bptAmount:p}approved(){return this.approval.isTokenApproved(this.bptAmount,this.bptToken.userAllowances[this.veToken.address])}canApprove(){return this.bptAmount.gt(0)&&this.bptToken.userBalance.gte(this.bptAmount)}canLock(){return this.canApprove()&&this.approved()&&this.validLockDuration()}validLockDuration(){const t=1e3*this.time.week,e=1e3*this.time.year,r=Math.floor(1e3*this.locktime/t)*t;return Date.now(){},()=>{},F=>{this.bptAmount=new sn.Z(0),this.veAmount=new sn.Z(0);try{const q=F.events.Deposit,te=F.events.Supply,fe=q&&new sn.Z(q.returnValues.value).div(this.bptToken.precision),Re=q&&parseInt(q.returnValues.locktime),$e=te&&new sn.Z(te.supply).div(this.bptToken.precision);let[rt,ft]=[[],[]];Re&&rt.push("end")&&ft.push(Re),fe&&rt.push("balance")&&ft.push(fe),$e&&rt.push("supply")&&ft.push($e);const Tt=this.store.updateEscrow(this.wallet.chainId,rt,ft);[rt,ft]=[[],[]],rt.push("userBalance")&&ft.push(Tt.BPT.userBalance.minus(fe)),this.store.updateToken(Tt.BPT.id,rt,ft,!0),[rt,ft]=[[],[]],this.store.updateToken(Tt.veLIT.id,rt,ft)}catch(q){console.error(q)}},()=>{}).catch(F=>{console.error(F),this.wallet.openErrorModal(F)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let LT=gI;function Ape(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",3),Ae(2,"button",4),dr("click",function(){return Ur(e),an(2).withdraw()}),kt(3," Withdraw Lock "),Ie(),Ie(),Wr()}}function Ipe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",3),Ae(2,"button",4),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),kt(3," Switch to Mainnet "),Ie(),Ie(),Wr()}}function Spe(n,t){if(1&n&&(Qr(0),it(1,Ape,4,0,"ng-container",2),it(2,Ipe,4,0,"ng-container",2),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.wallet.chainId===e.chain.id.ETHEREUM||e.wallet.chainId===e.chain.id.GOERLI),dt(1),Mt("ngIf",e.wallet.chainId!==e.chain.id.ETHEREUM&&e.wallet.chainId!==e.chain.id.GOERLI)}}function kpe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",3),Ae(2,"button",4),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(3," Connect a Wallet "),Ie(),Ie(),Wr()}}yt(LT,"\u0275fac",function(e){return new(e||gI)(Xt(Nf),Xt(jg),Xt(dc),Xt(ud),Xt(el),Xt(km),Xt($c),Xt(Xa))}),yt(LT,"\u0275cmp",bn({type:gI,selectors:[["app-create-lock"]],inputs:{veToken:"veToken",bptToken:"bptToken"},decls:11,vars:8,consts:[[1,"container","p-0"],[1,"mb-3"],[3,"token","amount","amountChange"],[1,"mb-2"],[3,"error","timestamp","timestampChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[3,"token","amount"],[4,"ngIf"],["class","d-grid",4,"ngIf"],[1,"d-grid",3,"token","amount","spender","spenderAllowance","allowanceChange"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),Ae(4,"app-date-selector",4),dr("timestampChange",function(p){return r.setDuration(p)}),Ie(),Ie(),Ae(5,"div",5),qn(6,"h3",6),Ie(),Ae(7,"div",1),qn(8,"app-token-output-panel",7),Ie(),it(9,Epe,3,2,"ng-container",8),it(10,Tpe,3,0,"div",9),Ie()),2&e&&(dt(2),Mt("token",r.bptToken)("amount",r.bptAmount),dt(2),Mt("error",!r.validLockDuration())("timestamp",r.locktime),dt(4),Mt("token",r.veToken)("amount",r.veAmount),dt(1),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[Ry,_w,o2,La,Py],styles:[""]}));const yI=class{constructor(t,e,r,s,p){yt(this,"modalService"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"wallet"),this.modalService=t,this.chain=e,this.contract=r,this.store=s,this.wallet=p}ngOnInit(){}withdraw(){const r=this.contract.getVotingEscrow(this.wallet.web3,this.wallet.chainId).methods.withdraw();this.wallet.sendTx(r,()=>{},()=>{},s=>{const p=this.store.getEscrow(this.wallet.chainId);try{const F=s.events.Withdraw,q=s.events.Supply,te=F&&new sn.Z(F.returnValues.value).div(p.BPT.precision),fe=q&&new sn.Z(q.supply).div(p.BPT.precision);let[Re,$e]=[[],[]];Re.push("userBalance")&&$e.push(p.BPT.userBalance.plus(te)),this.store.updateToken(p.BPT.id,Re,$e,!0),[Re,$e]=[[],[]],fe&&Re.push("supply")&&$e.push(fe),this.store.updateEscrow(this.wallet.chainId,Re,$e)}catch(F){console.error(F)}},()=>{}).catch(s=>{console.error(s),this.wallet.openErrorModal(s)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let UT=yI;function Cpe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"app-token-approval-button",9),dr("allowanceChange",function(s){Ur(e);const p=an(3);return p.bptToken.userAllowances[p.veToken.address]=s}),Ie(),Wr()}if(2&n){const e=an(3);dt(1),Mt("token",e.bptToken)("amount",e.bptAmount)("spender",e.veToken.address)("spenderAllowance",e.bptToken.userAllowances[e.veToken.address])}}function Mpe(n,t){if(1&n){const e=Di();Ae(0,"div",10),Ae(1,"button",11),dr("click",function(){return Ur(e),an(3).increaseLockAmount()}),kt(2," Increase Lock Amount "),Ie(),Ie()}if(2&n){const e=an(3);dt(1),Mt("disabled",!e.canLock())}}function Ope(n,t){if(1&n&&(Qr(0),it(1,Cpe,2,4,"ng-container",7),it(2,Mpe,3,1,"div",8),Wr()),2&n){const e=an(2);dt(1),Mt("ngIf",e.canApprove()&&!e.approved()),dt(1),Mt("ngIf",!e.canApprove()||e.approved())}}function Dpe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",10),Ae(2,"button",12),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),kt(3," Switch to Mainnet "),Ie(),Ie(),Wr()}}function Ppe(n,t){if(1&n&&(Qr(0),it(1,Ope,3,2,"ng-container",7),it(2,Dpe,4,0,"ng-container",7),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.wallet.chainId===e.chain.id.ETHEREUM||e.wallet.chainId===e.chain.id.GOERLI),dt(1),Mt("ngIf",e.wallet.chainId!==e.chain.id.ETHEREUM&&e.wallet.chainId!==e.chain.id.GOERLI)}}function Rpe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",10),Ae(2,"button",12),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(3," Connect a Wallet "),Ie(),Ie(),Wr()}}yt(UT,"\u0275fac",function(e){return new(e||yI)(Xt(Nf),Xt(dc),Xt(ud),Xt(el),Xt(Xa))}),yt(UT,"\u0275cmp",bn({type:yI,selectors:[["app-withdraw-lock"]],decls:4,vars:2,consts:[[1,"container","p-0"],[1,"row"],[4,"ngIf"],[1,"col-12"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),it(2,Spe,3,2,"ng-container",2),it(3,kpe,4,0,"ng-container",2),Ie(),Ie()),2&e&&(dt(2),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[La],styles:[""]}));const bI=class{constructor(t,e,r,s,p,F,q,te){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"time"),yt(this,"util"),yt(this,"wallet"),yt(this,"lock"),yt(this,"veToken"),yt(this,"bptToken"),yt(this,"veAmount"),yt(this,"bptAmount"),this.modalService=t,this.approval=e,this.chain=r,this.contract=s,this.store=p,this.time=F,this.util=q,this.wallet=te}ngOnInit(){this.veAmount=new sn.Z(0),this.bptAmount=new sn.Z(0)}setAmount(t){this.bptAmount=t,this.veAmount=this.getOutputAmount()}getOutputAmount(){const t=Date.now();return this.bptAmount.times((1e3*this.lock.end-t)/(1e3*this.time.year*4))}approved(){return this.approval.isTokenApproved(this.bptAmount,this.bptToken.userAllowances[this.veToken.address])}canApprove(){return this.bptAmount.gt(0)&&this.bptToken.userBalance.gte(this.bptAmount)}canLock(){return this.canApprove()&&this.approved()}increaseLockAmount(){const e=this.contract.getVotingEscrow(this.wallet.web3,this.wallet.chainId),r=this.util.processWeb3Number(this.bptAmount.times(this.bptToken.precision)),s=e.methods.increase_amount(r);this.wallet.sendTx(s,()=>{},()=>{},p=>{this.veAmount=new sn.Z(0),this.bptAmount=new sn.Z(0);try{const F=p.events.Deposit,q=p.events.Supply,te=F&&new sn.Z(F.returnValues.value).div(this.bptToken.precision),fe=q&&new sn.Z(q.returnValues.supply).div(this.bptToken.precision);let[Re,$e]=[[],[]];Re.push("userBalance")&&$e.push(this.bptToken.userBalance.minus(te)),this.store.updateToken(this.bptToken.id,Re,$e,!0),[Re,$e]=[[],[]],this.store.updateToken(this.veToken.id,Re,$e),[Re,$e]=[[],[]],te&&Re.push("balance")&&$e.push(this.lock.balance.plus(te)),te&&Re.push("supply")&&$e.push(fe),this.store.updateEscrow(this.wallet.chainId,Re,$e)}catch(F){console.error(F)}},()=>{}).catch(p=>{console.error(p),this.wallet.openErrorModal(p)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let jT=bI;function Npe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",8),Ae(2,"button",9),dr("click",function(){return Ur(e),an(2).increaseLockDuration()}),kt(3," Increase Lock Duration "),Ie(),Ie(),Wr()}if(2&n){const e=an(2);dt(2),Mt("disabled",!e.validLockDuration())}}function Bpe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",8),Ae(2,"button",10),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),kt(3," Switch to Mainnet "),Ie(),Ie(),Wr()}}function Fpe(n,t){if(1&n&&(Qr(0),it(1,Npe,4,1,"ng-container",7),it(2,Bpe,4,0,"ng-container",7),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.wallet.chainId===e.chain.id.ETHEREUM||e.wallet.chainId===e.chain.id.GOERLI),dt(1),Mt("ngIf",e.wallet.chainId!==e.chain.id.ETHEREUM&&e.wallet.chainId!==e.chain.id.GOERLI)}}function Lpe(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"div",8),Ae(2,"button",10),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(3," Connect a Wallet "),Ie(),Ie(),Wr()}}yt(jT,"\u0275fac",function(e){return new(e||bI)(Xt(Nf),Xt(jg),Xt(dc),Xt(ud),Xt(el),Xt(km),Xt($c),Xt(Xa))}),yt(jT,"\u0275cmp",bn({type:bI,selectors:[["app-increase-lock-amount"]],inputs:{lock:"lock",veToken:"veToken",bptToken:"bptToken"},decls:9,vars:6,consts:[[1,"container","p-0"],[1,"mb-2"],[3,"token","amount","amountChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[4,"ngIf"],["class","d-grid",4,"ngIf"],[3,"token","amount","spender","spenderAllowance","allowanceChange"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-token-input-panel",2),dr("amountChange",function(p){return r.setAmount(p)}),Ie(),Ie(),Ae(3,"div",3),qn(4,"h3",4),Ie(),Ae(5,"div",5),qn(6,"app-token-output-panel",6),Ie(),it(7,Ppe,3,2,"ng-container",7),it(8,Rpe,4,0,"ng-container",7),Ie()),2&e&&(dt(2),Mt("token",r.bptToken)("amount",r.bptAmount),dt(4),Mt("token",r.veToken)("amount",r.veAmount),dt(1),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[Ry,o2,La,Py],styles:[""]}));const Upe=function(n){return{disabled:n}},vI=class{constructor(t,e,r,s,p,F,q){yt(this,"modalService"),yt(this,"chain"),yt(this,"contract"),yt(this,"store"),yt(this,"time"),yt(this,"util"),yt(this,"wallet"),yt(this,"lock"),yt(this,"veToken"),yt(this,"locktime"),yt(this,"veAmount"),this.modalService=t,this.chain=e,this.contract=r,this.store=s,this.time=p,this.util=F,this.wallet=q}ngOnInit(){const t=Date.now(),e=1e3*this.time.week;this.setLocktime(Math.floor((t+1e3*this.time.year)/e)*e/1e3)}setLocktime(t){this.locktime=t,this.veAmount=this.getOutputAmount()}getOutputAmount(){const t=Date.now(),e=1e3*this.time.week,r=1e3*this.time.year,s=Math.floor(1e3*this.locktime/e)*e,p=this.lock.balance.times((s-t)/(4*r));return p.gt(this.lock.balance)?this.lock.balance:p}validLockDuration(){const t=Date.now(),e=1e3*this.time.week,r=1e3*this.time.year,s=1e3*this.lock.end,p=Math.floor(1e3*this.locktime/e)*e;return s{},()=>{},p=>{try{const F=p.events.Deposit,q=p.events.Supply,te=F&&parseInt(F.returnValues.locktime),fe=q&&new sn.Z(q.supply).div(this.veToken.precision);let[Re,$e]=[[],[]];this.store.updateToken(this.veToken.id,Re,$e),[Re,$e]=[[],[]],te&&Re.push("end")&&$e.push(te),fe&&Re.push("supply")&&$e.push(fe),this.store.updateEscrow(this.wallet.chainId,Re,$e)}catch(F){console.error(F)}},()=>{}).catch(p=>{console.error(p),this.wallet.openErrorModal(p)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let VT=vI;function jpe(n,t){if(1&n&&qn(0,"app-create-lock",34),2&n){const e=an(2);Mt("veToken",e.veToken)("bptToken",e.bptToken)}}function Vpe(n,t){1&n&&(Qr(0),kt(1," Lock active. Increase your lock amount or duration. "),Wr())}function Hpe(n,t){1&n&&(Qr(0),kt(1," Lock expired. Withdraw your existing lock before creating a new lock. "),Wr())}function $pe(n,t){if(1&n&&(Ae(0,"div",35),qn(1,"h1",36),Ae(2,"h3",37),it(3,Vpe,2,0,"ng-container",38),it(4,Hpe,2,0,"ng-container",38),Ie(),Ie()),2&n){const e=an(2);dt(3),Mt("ngIf",e.time.now=e.escrow.end)}}function Wpe(n,t){if(1&n&&(it(0,jpe,1,2,"app-create-lock",32),it(1,$pe,5,2,"div",33)),2&n){const e=an();Mt("ngIf",e.escrow&&0==e.escrow.end),dt(1),Mt("ngIf",e.escrow&&e.escrow.end>0)}}function Gpe(n,t){1&n&&qn(0,"app-withdraw-lock")}function zpe(n,t){1&n&&(Qr(0),kt(1," Lock active. Increase your lock amount or duration. "),Wr())}function qpe(n,t){1&n&&(Qr(0),kt(1," Lock not found. Create a new lock. "),Wr())}function Kpe(n,t){if(1&n&&(Ae(0,"div",35),qn(1,"h1",36),Ae(2,"h3",37),it(3,zpe,2,0,"ng-container",38),it(4,qpe,2,0,"ng-container",38),Ie(),Ie()),2&n){const e=an(2);dt(3),Mt("ngIf",e.time.nowe.time.now))}}function Ype(n,t){if(1&n&&qn(0,"app-increase-lock-amount",40),2&n){const e=an(2);Mt("lock",e.escrow)("veToken",e.veToken)("bptToken",e.bptToken)}}function Jpe(n,t){1&n&&(Qr(0),kt(1," Lock expired. Withdraw your existing lock before creating a new lock. "),Wr())}function Xpe(n,t){1&n&&(Qr(0),kt(1," Lock not found. Create a new lock. "),Wr())}function Qpe(n,t){if(1&n&&(Ae(0,"div",35),qn(1,"h1",36),Ae(2,"h3",41),it(3,Jpe,2,0,"ng-container",38),it(4,Xpe,2,0,"ng-container",38),Ie(),Ie()),2&n){const e=an(2);dt(3),Mt("ngIf",e.escrow.end>0),dt(1),Mt("ngIf",0==e.escrow.end)}}function e1e(n,t){if(1&n&&(it(0,Ype,1,3,"app-increase-lock-amount",39),it(1,Qpe,5,2,"div",33)),2&n){const e=an();Mt("ngIf",e.escrow&&e.escrow.end>e.time.now),dt(1),Mt("ngIf",e.escrow&&e.escrow.end<=e.time.now)}}function t1e(n,t){if(1&n&&qn(0,"app-increase-lock-duration",43),2&n){const e=an(2);Mt("lock",e.escrow)("veToken",e.veToken)}}function n1e(n,t){1&n&&(Qr(0),kt(1," Lock expired. Withdraw your existing lock before creating a new lock. "),Wr())}function r1e(n,t){1&n&&(Qr(0),kt(1," Lock not found. Create a new lock. "),Wr())}function i1e(n,t){if(1&n&&(Ae(0,"div",35),qn(1,"h1",36),Ae(2,"h3",41),it(3,n1e,2,0,"ng-container",38),it(4,r1e,2,0,"ng-container",38),Ie(),Ie()),2&n){const e=an(2);dt(3),Mt("ngIf",e.escrow.end>0),dt(1),Mt("ngIf",0==e.escrow.end)}}function s1e(n,t){if(1&n&&(it(0,t1e,1,2,"app-increase-lock-duration",42),it(1,i1e,5,2,"div",33)),2&n){const e=an();Mt("ngIf",e.escrow&&e.escrow.end>e.time.now),dt(1),Mt("ngIf",e.escrow&&e.escrow.end<=e.time.now)}}yt(VT,"\u0275fac",function(e){return new(e||vI)(Xt(Nf),Xt(dc),Xt(ud),Xt(el),Xt(km),Xt($c),Xt(Xa))}),yt(VT,"\u0275cmp",bn({type:vI,selectors:[["app-increase-lock-duration"]],inputs:{lock:"lock",veToken:"veToken"},decls:9,vars:9,consts:[[1,"container","p-0"],[1,"mb-2",3,"ngClass"],[3,"error","timestamp","timestampChange"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"mb-3"],[3,"token","amount"],[4,"ngIf"],[1,"d-grid"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"app-date-selector",2),dr("timestampChange",function(p){return r.setLocktime(p)}),Ie(),Ie(),Ae(3,"div",3),qn(4,"h3",4),Ie(),Ae(5,"div",5),qn(6,"app-token-output-panel",6),Ie(),it(7,Fpe,3,2,"ng-container",7),it(8,Lpe,4,0,"ng-container",7),Ie()),2&e&&(dt(1),Mt("ngClass",Ic(7,Upe,!r.wallet.connected)),dt(1),Mt("error",!r.validLockDuration())("timestamp",r.locktime),dt(4),Mt("token",r.veToken)("amount",r.veAmount),dt(1),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[dh,_w,o2,La],styles:[""]}));const _I=class{constructor(t,e,r,s,p,F,q,te){yt(this,"activatedRoute"),yt(this,"balancer"),yt(this,"chain"),yt(this,"router"),yt(this,"store"),yt(this,"time"),yt(this,"util"),yt(this,"wallet"),yt(this,"veToken"),yt(this,"bptToken"),yt(this,"escrow"),yt(this,"selectedTab"),yt(this,"tokens_subscription"),yt(this,"escrow_subscription"),this.activatedRoute=t,this.balancer=e,this.chain=r,this.router=s,this.store=p,this.time=F,this.util=q,this.wallet=te}ngOnInit(){this.resetData(),this.tokens_subscription=this.store.tokens_observable.subscribe(t=>{const e=this.chain.isTestnet(this.wallet.chainId)?this.wallet.chainId:this.chain.id.ETHEREUM;this.bptToken=t[this.util.id(J6[e].toLowerCase(),e)],this.veToken=t[this.util.id(Am[e].toLowerCase(),e)]}),this.escrow_subscription=this.store.escrow_observable.subscribe(t=>{const e=this.chain.isTestnet(this.wallet.chainId)?this.wallet.chainId:this.chain.id.ETHEREUM;this.escrow=t[e]})}ngOnDestroy(){this.tokens_subscription.unsubscribe(),this.escrow_subscription.unsubscribe()}resetData(){const t=this.activatedRoute.queryParams.value.tab;this.selectedTab=t?parseInt(t):1}selectTab(t){t&&(this.selectedTab=t),this.router.navigate([],{queryParams:{tab:this.selectedTab},replaceUrl:!0})}};let HT=_I;function o1e(n,t){if(1&n&&(Ae(0,"div",15),kt(1),Ie()),2&n){const e=an();dt(1),Lc(" Strike price: $",e.baseToken.price.minus(null==e.optionToken?null:e.optionToken.price).toPrecision(4)," LIT price: $",e.baseToken.price.toPrecision(4)," Discount: ",null==e.optionToken?null:e.optionToken.price.div(e.baseToken.price).times(100).toFixed(2),"% ")}}function a1e(n,t){if(1&n){const e=Di();Ae(0,"app-token-approval-button",25),dr("allowanceChange",function(s){Ur(e);const p=an(3);return p.paymentToken.userAllowances[p.optionToken.address]=s}),Ie()}if(2&n){const e=an(3);Mt("token",e.paymentToken)("amount",e.paymentAmount)("spender",e.optionToken.address)("spenderAllowance",e.paymentToken.userAllowances[e.optionToken.address])}}function u1e(n,t){if(1&n){const e=Di();Ae(0,"button",26),dr("click",function(){return Ur(e),an(3).exercise()}),kt(1),Ie()}if(2&n){const e=an(3);Mt("disabled",!e.canExercise()),dt(1),Pr(" ",e.message()," ")}}function c1e(n,t){if(1&n&&(Qr(0),it(1,a1e,1,4,"app-token-approval-button",23),Ae(2,"div",20),it(3,u1e,2,2,"button",24),Ie(),Wr()),2&n){const e=an(2);dt(1),Mt("ngIf",e.canApprove()&&!e.approved()),dt(2),Mt("ngIf",!e.canApprove()||e.approved())}}function l1e(n,t){if(1&n){const e=Di();Ae(0,"div",20),Ae(1,"button",27),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),kt(2," Switch to Mainnet "),Ie(),Ie()}}function d1e(n,t){if(1&n&&(Qr(0),it(1,c1e,4,2,"ng-container",19),it(2,l1e,3,0,"div",22),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.wallet.chainId===e.chain.id.ETHEREUM||e.wallet.chainId===e.chain.id.GOERLI),dt(1),Mt("ngIf",e.wallet.chainId!==e.chain.id.ETHEREUM&&e.wallet.chainId!==e.chain.id.GOERLI)}}function f1e(n,t){if(1&n){const e=Di();Ae(0,"button",27),dr("click",function(){return Ur(e),an().openWalletConnectModal()}),kt(1," Connect a Wallet "),Ie()}}yt(HT,"\u0275fac",function(e){return new(e||_I)(Xt(ky),Xt(D5),Xt(dc),Xt(_0),Xt(el),Xt(km),Xt($c),Xt(Xa))}),yt(HT,"\u0275cmp",bn({type:_I,selectors:[["app-escrow"]],decls:67,vars:8,consts:[[1,"container","py-5"],[1,"row","justify-content-center"],[1,"col-12","col-lg-12"],[1,"row","align-items-top","justify-content-between"],[1,"col-12","col-lg-3","pe-lg-2","mb-3"],[1,"card","card-inner-shadow"],[1,"card-header"],[1,"card-title","mb-0"],[1,"card-body"],[1,"text-warning"],["routerLink","/portfolio"],["routerLink","/stake"],[1,"card-header","border-0"],["data-bs-toggle","collapse","href","#howToLock","role","button","aria-expanded","false","aria-controls","howToLock",1,"d-flex","align-items-center","justify-content-between"],[1,"h3","m-0","fe","fe-chevron-down"],["id","howToLock",1,"card-body","collapse"],[1,"list-group","list-group-numbered"],[1,"list-group-item","d-flex","align-items-start","justify-content-start","p-0","pb-3","pe-1","text-muted"],[1,"ms-2"],["target","_blank","rel","noopener noreferrer",3,"href"],[1,"list-group-item","d-flex","align-items-start","justify-content-start","p-0","pe-1","text-muted"],[1,"col-12","col-lg-6","pe-lg-2","mb-3"],[1,"card","card-inner-shadow","m-0"],["ngbNav","",1,"nav","nav-tabs","border-0",3,"activeId","animation","activeIdChange"],["nav","ngbNav"],[1,"nav-item","me-2",3,"ngbNavItem","click"],["ngbNavLink","",1,"nav-link"],["ngbNavContent",""],[1,"nav-item","me-2",3,"ngbNavItem"],["ngbNavLink","",1,"nav-link",3,"click"],[3,"ngbNavOutlet"],[1,"col-12","col-lg-3","pe-lg-2"],[3,"veToken","bptToken",4,"ngIf"],["class","text-center",4,"ngIf"],[3,"veToken","bptToken"],[1,"text-center"],[1,"display-1","fe","fe-lock","m-0"],[1,"m-0","px-5"],[4,"ngIf"],[3,"lock","veToken","bptToken",4,"ngIf"],[3,"lock","veToken","bptToken"],[1,"m-0"],[3,"lock","veToken",4,"ngIf"],[3,"lock","veToken"]],template:function(e,r){if(1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",4),Ae(5,"div",5),Ae(6,"div",6),Ae(7,"h3",7),kt(8,"Important Note"),Ie(),Ie(),Ae(9,"div",8),Ae(10,"p",9),kt(11,"If you increase your lock while you have staked liquidity, you need to claim your existing rewards in order to get your new boost."),Ie(),Ae(12,"p"),kt(13,"You can do so by clicking the claim button on the top right of the "),Ae(14,"a",10),kt(15," Portfolio page "),Ie(),kt(16," or on the "),Ae(17,"a",11),kt(18," Stake page "),Ie(),kt(19," > Pool row > Claim tab."),Ie(),Ie(),Ie(),Ae(20,"div",5),Ae(21,"div",12),Ae(22,"div",13),Ae(23,"h3",7),kt(24,"How to lock"),Ie(),qn(25,"i",14),Ie(),Ie(),Ae(26,"div",15),Ae(27,"ol",16),Ae(28,"li",17),Ae(29,"small",18),kt(30," Add liquidity to the "),Ae(31,"a",19),kt(32," 20WETH-80LIT "),Ie(),kt(33," Balancer pool. "),Ie(),Ie(),Ae(34,"li",17),Ae(35,"small",18),kt(36," Lock the resulting LP token (20WETH-80LIT). The longer you lock (4 year max), the more veLIT you get. "),Ie(),Ie(),Ae(37,"li",17),Ae(38,"small",18),kt(39," veLIT holders get boosted liquidity mining rewards and increased voting power. "),Ie(),Ie(),Ae(40,"li",20),Ae(41,"small",18),kt(42," Use this voting power to choose which pool gauges get allocated liquidity mining incentives. Vote on the pools where you have added liquidity to earn more yield. "),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(43,"div",21),Ae(44,"div",22),Ae(45,"div",6),Ae(46,"ul",23,24),dr("activeIdChange",function(p){return r.selectedTab=p}),Ae(48,"li",25),dr("click",function(){return r.selectTab()}),Ae(49,"a",26),kt(50,"Lock"),Ie(),it(51,Wpe,2,2,"ng-template",27),Ie(),Ae(52,"li",28),Ae(53,"a",29),dr("click",function(){return r.selectTab()}),kt(54,"Unlock"),Ie(),it(55,Zpe,2,2,"ng-template",27),Ie(),Ae(56,"li",28),Ae(57,"a",29),dr("click",function(){return r.selectTab()}),kt(58,"Lock Amount"),Ie(),it(59,e1e,2,2,"ng-template",27),Ie(),Ae(60,"li",28),Ae(61,"a",29),dr("click",function(){return r.selectTab()}),kt(62,"Lock Duration"),Ie(),it(63,s1e,2,2,"ng-template",27),Ie(),Ie(),Ie(),Ae(64,"div",8),qn(65,"div",30),Ie(),Ie(),Ie(),qn(66,"div",31),Ie(),Ie(),Ie(),Ie()),2&e){const s=nr(47);dt(31),qu("href",r.balancer.poolURL,Pi),dt(15),Mt("activeId",r.selectedTab)("animation",!1),dt(2),Mt("ngbNavItem",1),dt(4),Mt("ngbNavItem",2),dt(4),Mt("ngbNavItem",3),dt(4),Mt("ngbNavItem",4),dt(5),Mt("ngbNavOutlet",s)}},directives:[Y6,I_,A_,sE,iE,MM,La,LT,UT,jT,VT],styles:[""]}));const wI=class{constructor(t,e,r,s,p,F,q,te){yt(this,"modalService"),yt(this,"approval"),yt(this,"chain"),yt(this,"contract"),yt(this,"option"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"baseToken"),yt(this,"baseAmount"),yt(this,"optionToken"),yt(this,"optionAmount"),yt(this,"paymentToken"),yt(this,"paymentAmount"),yt(this,"strikePrice"),yt(this,"chain_change_subscription"),yt(this,"tokens_subscription"),this.modalService=t,this.approval=e,this.chain=r,this.contract=s,this.option=p,this.store=F,this.util=q,this.wallet=te}ngOnInit(){this.resetData(),this.getStrikePrice(this.wallet.chainId),this.tokens_subscription=this.store.tokens_observable.subscribe(t=>{this.baseToken=t[this.util.id(E5[this.wallet.chainId].toLowerCase(),this.wallet.chainId)],this.optionToken=t[this.util.id(Z1[this.wallet.chainId].toLowerCase(),this.wallet.chainId)],this.paymentToken=t[this.util.id(Q6[this.wallet.chainId].toLowerCase(),this.wallet.chainId)]}),this.chain_change_subscription=this.wallet.chainChangedEvent.subscribe(t=>{this.getStrikePrice(t)})}ngOnDestroy(){this.chain_change_subscription.unsubscribe(),this.tokens_subscription.unsubscribe()}resetData(){this.baseAmount=new sn.Z(0),this.optionAmount=new sn.Z(0),this.paymentAmount=new sn.Z(0)}getStrikePrice(t){this.option.getStrikePrice(t).then(e=>{this.strikePrice=e})}setOptionAmount(t){this.optionAmount=t,this.paymentAmount=t.times(this.strikePrice).dp(18),this.baseAmount=this.optionAmount}setPaymentAmount(t){this.paymentAmount=t,this.optionAmount=t.div(this.strikePrice).dp(18),this.baseAmount=this.optionAmount}approved(){return this.approval.isTokenApproved(this.paymentAmount,this.paymentToken.userAllowances[Z1[this.wallet.chainId].toLowerCase()])}canApprove(){return this.paymentAmount.gt(0)&&this.paymentToken.userBalance.gte(this.paymentAmount)}canExercise(){return this.canApprove()&&this.approved()&&this.optionAmount.gt(0)&&this.optionAmount.lte(this.optionToken.userBalance)}message(){return this.optionAmount.eq(0)||this.paymentAmount.eq(0)?"Enter an Amount":this.optionAmount.gt(this.optionToken.userBalance)?`Insufficient ${this.optionToken.symbol} Balance`:this.paymentAmount.gt(this.paymentToken.userBalance)?`Insufficient ${this.paymentToken.symbol} Balance`:"Exercise Options"}exercise(){const t=this.wallet.web3,e=this.util.processWeb3Number(this.optionAmount.times(1e18)),r=this.util.processWeb3Number(this.paymentAmount.times(1.005).times(1e18)),p=this.contract.getOptionsToken(t,this.wallet.chainId).methods.exercise(e,r,this.wallet.user);this.wallet.sendTx(p,()=>{},()=>{},F=>{this.baseAmount=new sn.Z(0),this.optionAmount=new sn.Z(0),this.paymentAmount=new sn.Z(0);const q=F.events.Exercise,te=q&&new sn.Z(q.returnValues[2]).div(this.optionToken.precision),fe=q&&new sn.Z(q.returnValues[3]).div(this.paymentToken.precision);this.store.updateToken(this.optionToken.id,["userBalance"],[this.optionToken.userBalance.minus(te)],!0),this.store.updateToken(this.paymentToken.id,["userBalance"],[this.paymentToken.userBalance.minus(fe)],!0),this.store.updateToken(this.baseToken.id,["userBalance"],[this.baseToken.userBalance.plus(te)],!0)},F=>{console.error(F),this.wallet.openErrorModal(F)})}openWalletConnectModal(){this.modalService.open(mp,{windowClass:"windowed",centered:!0,size:"md"})}};let $T=wI;function h1e(n,t){if(1&n&&(Qr(0),Ae(1,"div",14),Ae(2,"p",18),kt(3),Ie(),Ae(4,"p",18),kt(5),Ie(),Ie(),qn(6,"hr"),Wr()),2&n){const e=an();dt(3),Pr("",e.lst.isLst(e.pool.token0)?e.pool.token0.symbol:e.pool.token1.symbol," APR"),dt(2),Pr(" ",e.bunniToken.stakingAPR.toFixed(2),"% ")}}function p1e(n,t){if(1&n&&(Qr(0),Ae(1,"div",14),Ae(2,"p",18),kt(3),Ie(),Ae(4,"p",18),kt(5),Ie(),Ie(),qn(6,"hr"),Wr()),2&n){const e=an().$implicit;dt(3),Pr("",e.symbol," Rewards"),dt(2),Pr(" ",e.rewardAPR.toFixed(2),"% ")}}function m1e(n,t){if(1&n&&(Qr(0),it(1,p1e,7,2,"ng-container",19),Wr()),2&n){const e=t.$implicit;dt(1),Mt("ngIf",e.rewardAPR.gt(0))}}function g1e(n,t){if(1&n&&(Qr(0),Ae(1,"div",14),Ae(2,"p",18),kt(3),Ie(),Ae(4,"p",18),kt(5),Ie(),Ie(),qn(6,"hr"),Wr()),2&n){const e=an().$implicit;dt(3),Pr("",e.symbol," Rewards"),dt(2),Pr(" ",e.rewardAPR.toFixed(2),"% ")}}function y1e(n,t){if(1&n&&(Qr(0),it(1,g1e,7,2,"ng-container",19),Wr()),2&n){const e=t.$implicit;dt(1),Mt("ngIf",e.rewardAPR.gt(0))}}function b1e(n,t){if(1&n&&(Qr(0),Ae(1,"div",14),Ae(2,"p",18),kt(3),Ie(),Ae(4,"p",18),kt(5),Ie(),Ie(),qn(6,"hr"),Wr()),2&n){const e=an();dt(3),Pr("",e.lst.isLst(e.pool.token0)?e.pool.token0.symbol:e.pool.token1.symbol," APR"),dt(2),Pr(" ",e.bunniToken.stakingAPR.toFixed(2),"% ")}}yt($T,"\u0275fac",function(e){return new(e||wI)(Xt(Nf),Xt(jg),Xt(dc),Xt(ud),Xt(Y_),Xt(el),Xt($c),Xt(Xa))}),yt($T,"\u0275cmp",bn({type:wI,selectors:[["app-option"]],decls:28,vars:9,consts:[[1,"container","py-5"],[1,"row","justify-content-center"],[1,"col-12","col-lg-12"],[1,"row","justify-content-center","mb-4"],[1,"col","col-lg-8","text-center"],[1,"text-muted","lead"],["href","https://blog.timelessfi.com/posts/foo/#call-option-as-reward-token","target","_blank"],[1,"fe","fe-external-link","ms-1"],[1,"row","align-items-top","justify-content-center"],[1,"col-12","col-lg-6","pe-lg-2","mb-3"],[1,"card","m-0"],[1,"card-body"],["class","mb-2",4,"ngIf"],[1,"mb-3"],[3,"token","amount","amountChange"],[1,"mb-2"],[1,"align-items-center","justify-content-center","mb-2"],[1,"fe","fe-arrow-down","m-0","text-center"],[3,"token","amount"],[4,"ngIf"],[1,"d-grid"],["class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold","type","button",3,"click",4,"ngIf"],["class","d-grid",4,"ngIf"],["class","d-grid mb-2",3,"token","amount","spender","spenderAllowance","allowanceChange",4,"ngIf"],["type","button","class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold",3,"disabled","click",4,"ngIf"],[1,"d-grid","mb-2",3,"token","amount","spender","spenderAllowance","allowanceChange"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",4),Ae(5,"h1"),kt(6,"Convert oLIT to LIT"),Ie(),Ae(7,"p",5),kt(8," oLIT gives its holder the right to purchase LIT at a discounted price. Pay WETH to convert your oLIT to LIT. "),Ae(9,"a",6),kt(10," Learn more "),qn(11,"i",7),Ie(),Ie(),Ie(),Ie(),Ae(12,"div",8),Ae(13,"div",9),Ae(14,"div",10),Ae(15,"div",11),it(16,o1e,2,3,"div",12),Ae(17,"div",13),Ae(18,"app-token-input-panel",14),dr("amountChange",function(p){return r.setOptionAmount(p)}),Ie(),Ie(),Ae(19,"div",15),Ae(20,"app-token-input-panel",14),dr("amountChange",function(p){return r.setPaymentAmount(p)}),Ie(),Ie(),Ae(21,"div",16),qn(22,"h3",17),Ie(),Ae(23,"div",13),qn(24,"app-token-output-panel",18),Ie(),it(25,d1e,3,2,"ng-container",19),Ae(26,"div",20),it(27,f1e,2,0,"button",21),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(16),Mt("ngIf",r.baseToken&&!r.baseToken.price.isZero()),dt(2),Mt("token",r.optionToken)("amount",r.optionAmount),dt(2),Mt("token",r.paymentToken)("amount",r.paymentAmount),dt(4),Mt("token",r.baseToken)("amount",r.baseAmount),dt(1),Mt("ngIf",r.wallet.connected),dt(2),Mt("ngIf",!r.wallet.connected))},directives:[La,Ry,o2,Py],styles:[""]}));const UV=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}},xI=class{constructor(t,e,r){yt(this,"activeModal"),yt(this,"lst"),yt(this,"util"),yt(this,"pool"),yt(this,"bunniToken"),this.activeModal=t,this.lst=e,this.util=r}ngOnInit(){}};let WT=xI;function v1e(n,t){1&n&&(Ae(0,"small",24),kt(1," \xa0 "),Ie())}function _1e(n,t){if(1&n&&(Ae(0,"small",25),kt(1),Ie()),2&n){const e=an();dt(1),Pr(" $",e.user_liquidity.times(e.gauge.price).toFormat(2)," ")}}function w1e(n,t){1&n&&(Qr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),Wr())}function x1e(n,t){if(1&n){const e=Di();Ae(0,"small",26),dr("click",function(){Ur(e);const s=an(2);return s.set_user_liquidity(s.gauge.userBalance)}),kt(1," Max "),Ie()}}function E1e(n,t){if(1&n&&(Qr(0),Ae(1,"small",15),kt(2),Ie(),it(3,x1e,2,0,"small",16),Wr()),2&n){const e=an();dt(2),Pr("Balance: ",e.gauge.userBalance.toFormat(4),""),dt(1),Mt("ngIf",e.gauge.userBalance.gt(0))}}function T1e(n,t){1&n&&(Ae(0,"small",24),kt(1," \xa0 "),Ie())}function A1e(n,t){if(1&n&&(Ae(0,"small",25),kt(1),Ie()),2&n){const e=an();dt(1),Pr(" $",e.total_liquidity.times(e.gauge.price).toFormat(2)," ")}}function I1e(n,t){if(1&n){const e=Di();Ae(0,"small",26),dr("click",function(){Ur(e);const s=an();return s.set_total_liquidity(s.gauge.totalSupply)}),kt(1," Max "),Ie()}}function S1e(n,t){1&n&&(Ae(0,"small",24),kt(1," \xa0 "),Ie())}function k1e(n,t){if(1&n&&(Ae(0,"small",25),kt(1),Ie()),2&n){const e=an();dt(1),Pr(" $",e.user_veLIT.times(e.veToken.price).toFormat(2)," ")}}function C1e(n,t){1&n&&(Qr(0),Ae(1,"small"),kt(2," \xa0 "),Ie(),Wr())}function M1e(n,t){if(1&n){const e=Di();Ae(0,"small",26),dr("click",function(){Ur(e);const s=an(2);return s.set_user_veLIT(s.veToken.userBalance)}),kt(1," Max "),Ie()}}function O1e(n,t){if(1&n&&(Qr(0),Ae(1,"small",15),kt(2),Ie(),it(3,M1e,2,0,"small",16),Wr()),2&n){const e=an();dt(2),Pr("Balance: ",e.veToken.userBalance.toFormat(4),""),dt(1),Mt("ngIf",e.veToken.userBalance.gt(0))}}function D1e(n,t){1&n&&(Ae(0,"small",24),kt(1," \xa0 "),Ie())}function P1e(n,t){if(1&n&&(Ae(0,"small",25),kt(1),Ie()),2&n){const e=an();dt(1),Pr(" $",e.total_veLIT.times(e.veToken.price).toFormat(2)," ")}}function R1e(n,t){if(1&n){const e=Di();Ae(0,"small",26),dr("click",function(){Ur(e);const s=an();return s.set_total_veLIT(s.veToken.totalSupply)}),kt(1," Max "),Ie()}}function N1e(n,t){1&n&&(Ae(0,"h3",29),kt(1," Please enter a user liquidity amount "),Ie())}function B1e(n,t){if(1&n&&(Ae(0,"h3",30),kt(1),Ie()),2&n){const e=an(2);dt(1),Pr(" ",e.calculateBoost().toFixed(2),"x ")}}function F1e(n,t){if(1&n&&(Qr(0),it(1,N1e,2,0,"h3",27),it(2,B1e,2,1,"h3",28),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.user_liquidity.eq(0)),dt(1),Mt("ngIf",e.user_liquidity.gt(0))}}function L1e(n,t){1&n&&(Qr(0),Ae(1,"h3",29),kt(2," Please select a gauge "),Ie(),Wr())}function U1e(n,t){1&n&&(Ae(0,"h3",29),kt(1," Please enter a user liquidity amount "),Ie())}function j1e(n,t){if(1&n&&(Ae(0,"h3",30),kt(1),Ie()),2&n){const e=an(2);dt(1),Pr(" ",e.calculateApr().toFixed(2),"% ")}}function V1e(n,t){if(1&n&&(Qr(0),it(1,U1e,2,0,"h3",27),it(2,j1e,2,1,"h3",28),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.user_liquidity.eq(0)),dt(1),Mt("ngIf",e.user_liquidity.gt(0))}}function H1e(n,t){1&n&&(Qr(0),Ae(1,"h3",29),kt(2," Please select a gauge "),Ie(),Wr())}function $1e(n,t){1&n&&(Ae(0,"h3",29),kt(1," Please enter a user liquidity amount "),Ie())}function W1e(n,t){if(1&n&&(Ae(0,"h3",30),kt(1),Ie()),2&n){const e=an(2);dt(1),Pr(" ",e.calculateMin().toFixed(2)," veLIT ")}}function G1e(n,t){if(1&n&&(Qr(0),it(1,$1e,2,0,"h3",27),it(2,W1e,2,1,"h3",28),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.user_liquidity.eq(0)),dt(1),Mt("ngIf",e.user_liquidity.gt(0))}}function z1e(n,t){1&n&&(Qr(0),Ae(1,"h3",29),kt(2," Please select a gauge "),Ie(),Wr())}yt(WT,"\u0275fac",function(e){return new(e||xI)(Xt(Ob),Xt(C5),Xt($c))}),yt(WT,"\u0275cmp",bn({type:xI,selectors:[["app-apr-modal"]],inputs:{pool:"pool",bunniToken:"bunniToken"},decls:72,vars:34,consts:[[1,"modal-header"],[1,"col","d-flex","flex-column","align-items-start","justify-content-center","px-0","pe-4"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"avatar-group"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle",3,"src","alt","ngClass"],[1,"h2","my-0","mx-2","col-auto"],[1,"d-flex","align-items-center","justify-content-start"],[1,"align-baseline","text-muted"],[1,""],[1,"h2","mb-2","mx-2","text-muted"],[1,"text-muted"],[1,"modal-body"],[1,"rounded","bg-gray-400","mb-4","p-3"],[1,"d-flex","align-items-center","justify-content-between"],[1,"h3","mb-0"],[1,"h3","mb-0","d-flex","align-items-center"],[1,"fe","fe-arrow-right","mx-2"],[1,"h4","mb-0"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"h4","mb-0","d-flex","align-items-center"],[1,"rounded","bg-gray-400","mb-0","p-3"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",4),qn(5,"img",5),Ie(),Ae(6,"div",4),qn(7,"img",5),Ie(),Ie(),Ae(8,"div",6),kt(9),Ie(),Ie(),Ae(10,"div",7),Ae(11,"small"),Ae(12,"span",8),kt(13,"Min:"),Ie(),Ae(14,"span",9),kt(15),Ie(),Ie(),Ae(16,"span",10),kt(17,"\u27f7"),Ie(),Ae(18,"small"),Ae(19,"span",11),kt(20,"Max:"),Ie(),Ae(21,"span",9),kt(22),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(23,"div",12),Ae(24,"div",13),Ae(25,"div",14),Ae(26,"a",15),kt(27,"Current vAPR"),Ie(),Ae(28,"a",16),kt(29),qn(30,"span",17),kt(31),Ie(),Ie(),qn(32,"hr"),Ae(33,"div",14),Ae(34,"p",18),kt(35,"Swap Fees"),Ie(),Ae(36,"p",18),kt(37),Ie(),Ie(),qn(38,"hr"),it(39,h1e,7,2,"ng-container",19),it(40,m1e,2,1,"ng-container",20),Ae(41,"div",14),Ae(42,"p",18),kt(43,"oLIT Rewards"),Ie(),Ae(44,"p",21),kt(45),qn(46,"span",17),kt(47),Ie(),Ie(),Ie(),Ae(48,"div",22),Ae(49,"div",14),Ae(50,"a",15),kt(51,"Projected vAPR"),Ie(),Ae(52,"a",16),kt(53),qn(54,"span",17),kt(55),Ie(),Ie(),qn(56,"hr"),Ae(57,"div",14),Ae(58,"p",18),kt(59,"Swap Fees"),Ie(),Ae(60,"p",18),kt(61),Ie(),Ie(),qn(62,"hr"),it(63,y1e,2,1,"ng-container",20),it(64,b1e,7,2,"ng-container",19),Ae(65,"div",14),Ae(66,"p",18),kt(67,"oLIT Rewards"),Ie(),Ae(68,"p",21),kt(69),qn(70,"span",17),kt(71),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(5),qu("src",r.pool.token0.iconPath,Pi),_l("alt","",r.pool.token0.symbol," Icon"),Mt("ngClass",vc(28,UV,r.pool.token0.symbol.includes("PYT"),r.pool.token0.symbol.includes("NYT"))),dt(2),qu("src",r.pool.token1.iconPath,Pi),_l("alt","",r.pool.token1.symbol," Icon"),Mt("ngClass",vc(31,UV,r.pool.token1.symbol.includes("PYT"),r.pool.token1.symbol.includes("NYT"))),dt(2),cu(" ",r.pool.token0.symbol,"/",r.pool.token1.symbol," Bunni-LP Rewards "),dt(6),Lc(" ",r.util.minTick(r.bunniToken.tickLower,r.pool.fee)?"0":r.bunniToken.minPrice.toFixed(4)," ",r.pool.token1.symbol," per ",r.pool.token0.symbol," "),dt(7),Lc(" ",r.util.maxTick(r.bunniToken.tickUpper,r.pool.fee)?"\u221e":r.bunniToken.maxPrice.toFixed(4)," ",r.pool.token1.symbol," per ",r.pool.token0.symbol," "),dt(7),Pr(" ",r.bunniToken.swapAPR.plus(r.bunniToken.stakingAPR).plus(r.bunniToken.rewardTokenAPR).plus(r.bunniToken.thisPeriodMinRewardAPR).toFixed(2),"% "),dt(2),Pr(" ",r.bunniToken.swapAPR.plus(r.bunniToken.stakingAPR).plus(r.bunniToken.rewardTokenAPR).plus(r.bunniToken.thisPeriodMaxRewardAPR).toFixed(2),"% "),dt(6),Pr(" ",r.bunniToken.swapAPR.toFixed(2),"% "),dt(2),Mt("ngIf",r.bunniToken.stakingAPR.gt(0)),dt(1),Mt("ngForOf",r.bunniToken.gauge.rewardTokens),dt(5),Pr(" ",r.bunniToken.thisPeriodMinRewardAPR.toFixed(2),"% "),dt(2),Pr(" ",r.bunniToken.thisPeriodMaxRewardAPR.toFixed(2),"% "),dt(6),Pr(" ",r.bunniToken.swapAPR.plus(r.bunniToken.stakingAPR).plus(r.bunniToken.rewardTokenAPR).plus(r.bunniToken.nextPeriodMinRewardAPR).toFixed(2),"% "),dt(2),Pr(" ",r.bunniToken.swapAPR.plus(r.bunniToken.stakingAPR).plus(r.bunniToken.rewardTokenAPR).plus(r.bunniToken.nextPeriodMaxRewardAPR).toFixed(2),"% "),dt(6),Pr(" ",r.bunniToken.swapAPR.toFixed(2),"% "),dt(2),Mt("ngForOf",r.bunniToken.gauge.rewardTokens),dt(1),Mt("ngIf",r.bunniToken.stakingAPR.gt(0)),dt(5),Pr(" ",r.bunniToken.nextPeriodMinRewardAPR.toFixed(2),"% "),dt(2),Pr(" ",r.bunniToken.nextPeriodMaxRewardAPR.toFixed(2),"% "))},directives:[dh,La,L0],styles:[""]}));const EI=class{constructor(t,e,r,s,p){yt(this,"chain"),yt(this,"store"),yt(this,"time"),yt(this,"util"),yt(this,"wallet"),yt(this,"pool"),yt(this,"bunni"),yt(this,"gauge"),yt(this,"veToken"),yt(this,"user_liquidity"),yt(this,"total_liquidity"),yt(this,"user_veLIT"),yt(this,"total_veLIT"),yt(this,"tokens_subscription"),this.chain=t,this.store=e,this.time=r,this.util=s,this.wallet=p}ngOnInit(){this.reset(),this.total_liquidity=this.gauge.totalSupply,this.tokens_subscription=this.store.tokens_observable.subscribe(t=>{const e=this.store.getToken(this.util.id(this.chain.isTestnet(this.wallet.chainId)?Am[this.wallet.chainId]:Am[this.chain.id.ETHEREUM],this.chain.isTestnet(this.wallet.chainId)?this.wallet.chainId:this.chain.id.ETHEREUM));e&&(this.veToken=e,this.total_veLIT=e.totalSupply)})}ngOnDestroy(){this.tokens_subscription.unsubscribe()}reset(){this.user_liquidity=new sn.Z(0),this.total_liquidity=new sn.Z(0),this.user_veLIT=new sn.Z(0),this.total_veLIT=new sn.Z(0)}calculateBoost(){const t=this.user_liquidity.minus(this.gauge.userBalance),e=this.user_veLIT.minus(this.veToken.userBalance),r=this.gauge.tokenlessProduction.div(100),s=new sn.Z(1).minus(r),p=this.user_liquidity,F=this.total_liquidity.plus(t).times(this.user_veLIT).div(this.total_veLIT.plus(e));return sn.Z.min(r.times(p).plus(s.times(F)),p).div(p).times(new sn.Z(1).div(r))}calculateApr(){if(!this.gauge)return new sn.Z(0);this.gauge.killed&&new sn.Z(0);const t=this.store.getProtocol(this.wallet.chainId).inflationRate,e=sn.Z.min(this.gauge.weightThisPeriod,this.gauge.relativeWeightCap),r=this.chain.isL1(this.gauge.chainId)?t.times(e):this.gauge.relativeInflationRate;if(r.eq(0))return new sn.Z(0);if(this.user_liquidity.eq(0))return new sn.Z(0);const s=this.user_liquidity.minus(this.gauge.userBalance),p=this.user_veLIT.minus(this.veToken.userBalance),F=this.gauge.tokenlessProduction.div(100),q=new sn.Z(1).minus(F),te=this.user_liquidity,fe=this.total_liquidity.plus(s).times(this.user_veLIT).div(this.total_veLIT.plus(p)),Re=sn.Z.min(F.times(te).plus(q.times(fe)),te),$e=this.gauge.workingSupply.div(this.gauge.totalSupply),rt=this.total_liquidity.minus(this.gauge.totalSupply),ft=$e.times(rt),Tt=this.gauge.workingSupply.plus(ft).minus(this.gauge.workingBalance).plus(Re);if(Tt.eq(0))return new sn.Z(0);const Ft=this.user_liquidity.times(this.bunni.price);return r.times(this.time.year).times(this.gauge.oLIT.price).div(Tt).times(Re).div(Ft).times(100)}calculateMin(){const t=this.user_liquidity.minus(this.gauge.userBalance),e=this.total_veLIT.minus(this.veToken.userBalance);return this.user_liquidity.times(e).div(this.total_liquidity.plus(t).minus(this.user_liquidity))}set_user_liquidity(t){this.user_liquidity=new sn.Z(t),this.user_liquidity.isNaN()&&(this.user_liquidity=new sn.Z(0))}set_total_liquidity(t){this.total_liquidity=new sn.Z(t),this.total_liquidity.isNaN()&&(this.total_liquidity=new sn.Z(0))}set_user_veLIT(t){this.user_veLIT=new sn.Z(t),this.user_veLIT.isNaN()&&(this.user_veLIT=new sn.Z(0))}set_total_veLIT(t){this.total_veLIT=new sn.Z(t),this.total_veLIT.isNaN()&&(this.total_veLIT=new sn.Z(0))}};let GT=EI;function q1e(n,t){1&n&&(Ae(0,"p",40),qn(1,"span",41),Ie())}function K1e(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"h2",42),kt(2),Ie(),Ie()),2&n){const e=an();dt(2),cu(" $",e.util.formatBN(e.reserves)[0].toFormat(2),"",e.util.formatBN(e.reserves)[1]," ")}}function Z1e(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"h2",42),kt(2),Ie(),Ie()),2&n){const e=an();dt(2),cu(" $",e.util.formatBN(e.dailyVolume)[0].toFormat(2),"",e.util.formatBN(e.dailyVolume)[1]," ")}}function Y1e(n,t){if(1&n&&(Ae(0,"div"),Ae(1,"h2",42),kt(2),Ie(),Ie()),2&n){const e=an();dt(2),cu(" $",e.util.formatBN(e.dailyFees)[0].toFormat(2),"",e.util.formatBN(e.dailyFees)[1]," ")}}function J1e(n,t){1&n&&(Ae(0,"mat-header-cell",43),kt(1," Pool & Range "),Ie())}yt(GT,"\u0275fac",function(e){return new(e||EI)(Xt(dc),Xt(el),Xt(km),Xt($c),Xt(Xa))}),yt(GT,"\u0275cmp",bn({type:EI,selectors:[["app-calculator"]],inputs:{pool:"pool",bunni:"bunni",gauge:"gauge"},decls:93,vars:26,consts:[[1,"row","row-cols-lg-2","g-3","mb-3"],[1,""],[1,"card","card-inner-shadow","mb-0"],[1,"card-body","p-3"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"col","me-4"],["type","text","name","user_liquidity","id","user_liquidity","aria-describedby","","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-lg","text-start","p-0","text-truncate","w-100",3,"value","input"],[1,"col-auto","d-flex","align-items-center","justify-content-between","bg-gray-200","rounded-1","p-2"],[1,"mx-2","my-0","fw-normal"],[1,"d-flex","align-items-center","justify-content-between"],["class","col-auto",4,"ngIf"],["class","col-auto text-white",4,"ngIf"],[1,"col","d-flex","align-items-center","justify-content-end"],[4,"ngIf"],["type","text","name","total_liquidity","id","total_liquidity","aria-describedby","","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-lg","text-start","p-0","text-truncate","w-100",3,"value","input"],[1,"text-white"],["class","bg-white rounded-pill ms-2 px-2 text-dark fw-bold clickable",3,"click",4,"ngIf"],["type","text","name","user_veLIT","id","user_veLIT","aria-describedby","","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-lg","text-start","p-0","text-truncate","w-100",3,"value","input"],["type","text","name","total_veLIT","id","total_veLIT","aria-describedby","","placeholder","0","autocomplete","off",1,"form-control","form-control-flush","form-control-lg","text-start","p-0","text-truncate","w-100",3,"value","input"],[1,"align-items-center","justify-content-center","mb-3"],[1,"fe","fe-arrow-down","m-0","text-center"],[1,"row","row-cols-lg-3","g-3"],[1,"card-body"],[1,"text-muted"],[1,"col-auto"],[1,"col-auto","text-white"],[1,"bg-white","rounded-pill","ms-2","px-2","text-dark","fw-bold","clickable",3,"click"],["class","text-warning mb-0",4,"ngIf"],["class","mb-0",4,"ngIf"],[1,"text-warning","mb-0"],[1,"mb-0"]],template:function(e,r){1&e&&(Ae(0,"h2"),kt(1,"Gauge Boost Calculator"),Ie(),Ae(2,"div",0),Ae(3,"div",1),Ae(4,"div",2),Ae(5,"div",3),Ae(6,"div",4),Ae(7,"div",5),Ae(8,"input",6),dr("input",function(p){return r.set_user_liquidity(p.target.value)}),Ie(),Ie(),Ae(9,"div",7),Ae(10,"h2",8),kt(11," User Liquidity "),Ie(),Ie(),Ie(),Ae(12,"div",9),Ae(13,"div",1),it(14,v1e,2,0,"small",10),it(15,_1e,2,1,"small",11),Ie(),Ae(16,"div",12),it(17,w1e,3,0,"ng-container",13),it(18,E1e,4,2,"ng-container",13),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(19,"div",1),Ae(20,"div",2),Ae(21,"div",3),Ae(22,"div",4),Ae(23,"div",5),Ae(24,"input",14),dr("input",function(p){return r.set_total_liquidity(p.target.value)}),Ie(),Ie(),Ae(25,"div",7),Ae(26,"h2",8),kt(27," Total Liquidity "),Ie(),Ie(),Ie(),Ae(28,"div",9),Ae(29,"div",1),it(30,T1e,2,0,"small",10),it(31,A1e,2,1,"small",11),Ie(),Ae(32,"div",12),Ae(33,"small",15),kt(34),Ie(),it(35,I1e,2,0,"small",16),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(36,"div",1),Ae(37,"div",2),Ae(38,"div",3),Ae(39,"div",4),Ae(40,"div",5),Ae(41,"input",17),dr("input",function(p){return r.set_user_veLIT(p.target.value)}),Ie(),Ie(),Ae(42,"div",7),Ae(43,"h2",8),kt(44," User veLIT "),Ie(),Ie(),Ie(),Ae(45,"div",9),Ae(46,"div",1),it(47,S1e,2,0,"small",10),it(48,k1e,2,1,"small",11),Ie(),Ae(49,"div",12),it(50,C1e,3,0,"ng-container",13),it(51,O1e,4,2,"ng-container",13),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(52,"div",1),Ae(53,"div",2),Ae(54,"div",3),Ae(55,"div",4),Ae(56,"div",5),Ae(57,"input",18),dr("input",function(p){return r.set_total_veLIT(p.target.value)}),Ie(),Ie(),Ae(58,"div",7),Ae(59,"h2",8),kt(60," Total veLIT "),Ie(),Ie(),Ie(),Ae(61,"div",9),Ae(62,"div",1),it(63,D1e,2,0,"small",10),it(64,P1e,2,1,"small",11),Ie(),Ae(65,"div",12),Ae(66,"small",15),kt(67),Ie(),it(68,R1e,2,0,"small",16),Ie(),Ie(),Ie(),Ie(),Ie(),Ie(),Ae(69,"div",19),qn(70,"h3",20),Ie(),Ae(71,"div",21),Ae(72,"div",1),Ae(73,"div",2),Ae(74,"div",22),Ae(75,"h5",23),kt(76,"User Boost"),Ie(),it(77,F1e,3,2,"ng-container",13),it(78,L1e,3,0,"ng-container",13),Ie(),Ie(),Ie(),Ae(79,"div",1),Ae(80,"div",2),Ae(81,"div",22),Ae(82,"h5",23),kt(83,"User Reward vAPR "),Ie(),it(84,V1e,3,2,"ng-container",13),it(85,H1e,3,0,"ng-container",13),Ie(),Ie(),Ie(),Ae(86,"div",1),Ae(87,"div",2),Ae(88,"div",22),Ae(89,"h5",23),kt(90,"Minimum veLIT for Max Boost"),Ie(),it(91,G1e,3,2,"ng-container",13),it(92,z1e,3,0,"ng-container",13),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(8),Mt("value",r.user_liquidity.toFixed()),dt(6),Mt("ngIf",!r.user_liquidity||!r.user_liquidity.gt(0)||!r.gauge.price.gt(0)),dt(1),Mt("ngIf",r.user_liquidity&&r.user_liquidity.gt(0)&&r.gauge.price.gt(0)),dt(2),Mt("ngIf",!r.wallet.connected),dt(1),Mt("ngIf",r.wallet.connected),dt(6),Mt("value",r.total_liquidity.toFixed()),dt(6),Mt("ngIf",!r.total_liquidity||!r.total_liquidity.gt(0)||!r.gauge.price.gt(0)),dt(1),Mt("ngIf",r.total_liquidity&&r.total_liquidity.gt(0)&&r.gauge.price.gt(0)),dt(3),Pr("Supply: ",r.gauge.totalSupply.toFormat(4),""),dt(1),Mt("ngIf",r.gauge.totalSupply.gt(0)),dt(6),Mt("value",r.user_veLIT.toFixed()),dt(6),Mt("ngIf",!r.user_veLIT||!r.user_veLIT.gt(0)||!r.veToken.price.gt(0)),dt(1),Mt("ngIf",r.user_veLIT&&r.user_veLIT.gt(0)&&r.veToken.price.gt(0)),dt(2),Mt("ngIf",!r.wallet.connected),dt(1),Mt("ngIf",r.wallet.connected),dt(6),Mt("value",r.total_veLIT.toFixed()),dt(6),Mt("ngIf",!r.total_veLIT||!r.total_veLIT.gt(0)||!r.veToken.price.gt(0)),dt(1),Mt("ngIf",r.total_veLIT&&r.total_veLIT.gt(0)&&r.veToken.price.gt(0)),dt(3),Pr("Supply: ",r.veToken.totalSupply.toFormat(4),""),dt(1),Mt("ngIf",r.veToken.totalSupply.gt(0)),dt(9),Mt("ngIf",r.gauge),dt(1),Mt("ngIf",!r.gauge),dt(6),Mt("ngIf",r.gauge),dt(1),Mt("ngIf",!r.gauge),dt(6),Mt("ngIf",r.gauge),dt(1),Mt("ngIf",!r.gauge))},directives:[La],styles:[""]}));const jV=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function X1e(n,t){if(1&n&&(Ae(0,"mat-cell",44),Ae(1,"div",45),Ae(2,"div",46),Ae(3,"div",47),qn(4,"img",48),Ie(),Ae(5,"div",47),qn(6,"img",48),Ie(),Ie(),Ae(7,"div",49),Ae(8,"h5",50),kt(9),Ie(),Ie(),Ae(10,"div",51),Ae(11,"div",52),kt(12),Ie(),Ie(),Ie(),Ae(13,"div",53),Ae(14,"h6",54),kt(15,"Lower and Upper tick"),Ie(),Ae(16,"div",55),Ae(17,"div",10),kt(18,"Min.\xa0"),Ie(),Ae(19,"div",56),kt(20),Ie(),Ie(),Ae(21,"div",55),Ae(22,"div",10),kt(23,"Max.\xa0"),Ie(),Ae(24,"div",56),kt(25),Ie(),Ie(),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),qu("src",e.pool.token0.iconPath,Pi),_l("alt","",e.pool.token0.symbol," Icon"),Mt("ngClass",vc(21,jV,e.pool.token0.symbol.includes("PYT"),e.pool.token0.symbol.includes("NYT"))),dt(2),qu("src",e.pool.token1.iconPath,Pi),_l("alt","",e.pool.token1.symbol," Icon"),Mt("ngClass",vc(24,jV,e.pool.token1.symbol.includes("PYT"),e.pool.token1.symbol.includes("NYT"))),dt(3),Pr(" ",e.pool.fee/1e4,"% "),dt(1),V1("title","",e.pool.token0.symbol,"/",e.pool.token1.symbol,""),dt(2),cu("",e.pool.token0.symbol,"/",e.pool.token1.symbol,""),dt(7),V1("title","",e.pool.token1.symbol," per ",e.pool.token0.symbol,""),dt(1),Lc(" ",r.util.minTick(e.tickLower,e.pool.fee)?"0":r.util.getPriceLower(e,e.pool).gt(1)?r.util.getPriceLower(e,e.pool).toFormat(4):r.util.getPriceLower(e,e.pool).toPrecision(4)," ",e.pool.token1.symbol," per ",e.pool.token0.symbol," "),dt(4),V1("title","",e.pool.token1.symbol," per ",e.pool.token0.symbol,""),dt(1),Lc(" ",r.util.maxTick(e.tickUpper,e.pool.fee)?"\u221e":r.util.getPriceUpper(e,e.pool).gt(1)?r.util.getPriceUpper(e,e.pool).toFormat(4):r.util.getPriceUpper(e,e.pool).toPrecision(4)," ",e.pool.token1.symbol," per ",e.pool.token0.symbol," ")}}function Q1e(n,t){1&n&&(Ae(0,"mat-header-cell",57),kt(1," swapAPR "),qn(2,"i",58),Ie())}function eme(n,t){if(1&n&&(Ae(0,"mat-cell",59),Ae(1,"h6",54),kt(2,"Swap APR"),Ie(),Ae(3,"div",60),kt(4),Ie(),Ie()),2&n){const e=t.$implicit;dt(4),Pr("",e.swapAPR.toFixed(2),"%")}}function tme(n,t){1&n&&(Ae(0,"mat-header-cell",61),kt(1," vAPR "),qn(2,"i",58),Ie())}function nme(n,t){if(1&n){const e=Di();Ae(0,"mat-cell",62),Ae(1,"h6",54),kt(2,"Variable APR"),Ie(),Ae(3,"span",10),kt(4,"Curr."),Ie(),kt(5),qn(6,"i",63),kt(7),qn(8,"br"),Ae(9,"span",10),kt(10,"Proj."),Ie(),kt(11),qn(12,"i",63),kt(13),Ae(14,"i",64),dr("click",function(){const p=Ur(e).$implicit;return an().openAprModal(p)}),Ie(),Ie()}if(2&n){const e=t.$implicit;dt(5),Pr(" ",e.swapAPR.plus(e.stakingAPR).plus(e.rewardTokenAPR).plus(e.thisPeriodMinRewardAPR).toFixed(2),"% "),dt(2),Pr(" ",e.swapAPR.plus(e.stakingAPR).plus(e.rewardTokenAPR).plus(e.thisPeriodMaxRewardAPR).toFixed(2),"% "),dt(4),Pr(" ",e.swapAPR.plus(e.stakingAPR).plus(e.rewardTokenAPR).plus(e.nextPeriodMinRewardAPR).toFixed(2),"% "),dt(2),Pr(" ",e.swapAPR.plus(e.stakingAPR).plus(e.rewardTokenAPR).plus(e.nextPeriodMaxRewardAPR).toFixed(2),"% ")}}function rme(n,t){1&n&&(Ae(0,"mat-header-cell",65),kt(1," My Deposits "),Ie())}function ime(n,t){1&n&&(Qr(0),Ae(1,"h6",54),kt(2,"My Deposits"),Ie(),kt(3," - "),Wr())}function sme(n,t){if(1&n&&(Ae(0,"div",69),Ae(1,"div",70),Ae(2,"h6",54),kt(3,"My Deposits"),Ie(),kt(4),Ie(),Ae(5,"div",70),Ae(6,"h6",54),kt(7,"My vAPR"),Ie(),Ae(8,"span",71),kt(9,"My vAPR"),Ie(),kt(10),Ie(),Ie()),2&n){const e=an().$implicit,r=an();dt(4),cu(" $",r.util.formatBN(e.userDepositUSD)[0].toFixed(2),"",r.util.formatBN(e.userDepositUSD)[1]," "),dt(6),Pr(" ",e.swapAPR.plus(e.stakingAPR).plus(e.rewardTokenAPR).plus(e.userRewardAPR).toFixed(2),"% ")}}function ome(n,t){if(1&n&&(Ae(0,"mat-cell",66),it(1,ime,4,0,"ng-container",67),it(2,sme,11,3,"div",68),Ie()),2&n){const e=t.$implicit;dt(1),Mt("ngIf",e.userDepositUSD.eq(0)),dt(1),Mt("ngIf",e.userDepositUSD.gt(0))}}function ame(n,t){1&n&&(Ae(0,"mat-header-cell",72),kt(1," TVL "),Ie())}function ume(n,t){if(1&n&&(Ae(0,"mat-cell",73),Ae(1,"h6",54),kt(2,"TVL"),Ie(),kt(3),Ie()),2&n){const e=t.$implicit,r=an();dt(3),cu(" $",r.util.formatBN(e.reserve)[0].toFixed(2),"",r.util.formatBN(e.reserve)[1]," ")}}function cme(n,t){1&n&&(Ae(0,"mat-header-cell",74),qn(1,"i",75),Ie())}function lme(n,t){1&n&&(Ae(0,"h6",80),kt(1,"Manage"),Ie())}function dme(n,t){1&n&&(Ae(0,"h6",80),kt(1,"Close"),Ie())}function fme(n,t){1&n&&qn(0,"i",81)}function hme(n,t){1&n&&qn(0,"i",82)}function pme(n,t){if(1&n&&(Ae(0,"mat-cell",76),it(1,lme,2,0,"h6",77),it(2,dme,2,0,"h6",77),it(3,fme,1,0,"i",78),it(4,hme,1,0,"i",79),Ie()),2&n){const e=t.$implicit;dt(1),Mt("ngIf",!e.expanded),dt(1),Mt("ngIf",e.expanded),dt(1),Mt("ngIf",!e.expanded),dt(1),Mt("ngIf",e.expanded)}}function mme(n,t){1&n&&qn(0,"mat-header-cell")}const Cm=function(n){return{active:n}};function gme(n,t){if(1&n){const e=Di();Ae(0,"li",85),dr("click",function(){Ur(e);const s=an().$implicit;return an().switchTab(s,6)}),Ae(1,"button",86),kt(2," Calc "),Ie(),Ie()}if(2&n){const e=an().$implicit;dt(1),Mt("ngClass",Ic(1,Cm,6===e.expandedTab))}}function yme(n,t){if(1&n){const e=Di();Ae(0,"li",92),dr("click",function(){Ur(e);const s=an().$implicit;return an().switchTab(s,6)}),Ae(1,"button",93),kt(2," Calc "),Ie(),Ie()}if(2&n){const e=an().$implicit;dt(1),Mt("ngClass",Ic(1,Cm,6===e.expandedTab))}}const a8=function(n){return{"show active":n}};function bme(n,t){if(1&n&&(Ae(0,"div",104),qn(1,"app-zap-in",105),Ie()),2&n){const e=an().$implicit;Mt("ngClass",Ic(7,a8,0===e.expandedTab)),dt(1),Mt("pool",e.pool)("token0",e.pool.token0)("token1",e.pool.token1)("slippage",50)("deadline",3600)("bunniToken",e)}}function vme(n,t){if(1&n&&(Ae(0,"div",106),qn(1,"app-add-liquidity",105),Ie()),2&n){const e=an().$implicit;Mt("ngClass",Ic(7,a8,1===e.expandedTab)),dt(1),Mt("pool",e.pool)("token0",e.pool.token0)("token1",e.pool.token1)("slippage",50)("deadline",3600)("bunniToken",e)}}function _me(n,t){if(1&n&&(Ae(0,"div",107),qn(1,"app-remove-liquidity",105),Ie()),2&n){const e=an().$implicit;Mt("ngClass",Ic(7,a8,2===e.expandedTab)),dt(1),Mt("pool",e.pool)("token0",e.pool.token0)("token1",e.pool.token1)("slippage",50)("deadline",3600)("bunniToken",e)}}function wme(n,t){if(1&n&&(Ae(0,"div",108),qn(1,"app-stake",109),Ie()),2&n){const e=an().$implicit;Mt("ngClass",Ic(3,a8,3===e.expandedTab)),dt(1),Mt("bunniToken",e)("gaugeToken",e.gauge)}}function xme(n,t){if(1&n&&(Ae(0,"div",110),qn(1,"app-unstake",109),Ie()),2&n){const e=an().$implicit;Mt("ngClass",Ic(3,a8,4===e.expandedTab)),dt(1),Mt("bunniToken",e)("gaugeToken",e.gauge)}}function Eme(n,t){if(1&n&&(Ae(0,"div",111),qn(1,"app-claim",112),Ie()),2&n){const e=an().$implicit;Mt("ngClass",Ic(2,a8,5===e.expandedTab)),dt(1),Mt("bunniToken",e)}}function Tme(n,t){if(1&n&&(Ae(0,"div",113),qn(1,"app-calculator",114),Ie()),2&n){const e=an().$implicit;Mt("ngClass",Ic(4,a8,6===e.expandedTab)),dt(1),Mt("pool",e.pool)("bunni",e)("gauge",e.gauge)}}function Ame(n,t){if(1&n){const e=Di();Ae(0,"mat-cell",83),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"ul",84),Ae(4,"li",85),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,0)}),Ae(5,"button",86),kt(6," Zap "),Ie(),Ie(),Ae(7,"li",85),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,1)}),Ae(8,"button",86),kt(9," Add Liquidity "),Ie(),Ie(),Ae(10,"li",85),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,2)}),Ae(11,"button",86),kt(12," Remove Liquidity "),Ie(),Ie(),Ae(13,"li",85),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,3)}),Ae(14,"button",86),kt(15," Stake "),Ie(),Ie(),Ae(16,"li",85),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,4)}),Ae(17,"button",86),kt(18," Unstake "),Ie(),Ie(),Ae(19,"li",85),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,5)}),Ae(20,"button",86),kt(21," Claim "),Ie(),Ie(),it(22,gme,3,3,"li",87),Ie(),Ae(23,"div",88),Ae(24,"div",89),Ae(25,"button",90),kt(26," Navigate "),Ie(),Ae(27,"ul",91),Ae(28,"li",92),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,0)}),Ae(29,"button",93),kt(30," Zap "),Ie(),Ie(),Ae(31,"li",92),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,1)}),Ae(32,"button",93),kt(33," Add Liquidity "),Ie(),Ie(),Ae(34,"li",92),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,2)}),Ae(35,"button",93),kt(36," Remove Liquidity "),Ie(),Ie(),Ae(37,"li",92),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,3)}),Ae(38,"button",93),kt(39," Stake "),Ie(),Ie(),Ae(40,"li",92),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,4)}),Ae(41,"button",93),kt(42," Unstake "),Ie(),Ie(),Ae(43,"li",92),dr("click",function(){const p=Ur(e).$implicit;return an().switchTab(p,5)}),Ae(44,"button",93),kt(45," Claim "),Ie(),Ie(),it(46,yme,3,3,"li",94),Ie(),Ie(),Ie(),Ie(),Ae(47,"div",95),Ae(48,"div",96),it(49,bme,2,9,"div",97),it(50,vme,2,9,"div",98),it(51,_me,2,9,"div",99),it(52,wme,2,5,"div",100),it(53,xme,2,5,"div",101),it(54,Eme,2,4,"div",102),it(55,Tme,2,6,"div",103),Ie(),Ie(),Ie(),Ie()}if(2&n){const e=t.$implicit;dt(5),Mt("ngClass",Ic(21,Cm,0===e.expandedTab)),dt(3),Mt("ngClass",Ic(23,Cm,1===e.expandedTab)),dt(3),Mt("ngClass",Ic(25,Cm,2===e.expandedTab)),dt(3),Mt("ngClass",Ic(27,Cm,3===e.expandedTab)),dt(3),Mt("ngClass",Ic(29,Cm,4===e.expandedTab)),dt(3),Mt("ngClass",Ic(31,Cm,5===e.expandedTab)),dt(2),Mt("ngIf",e.gauge&&e.gauge.exists),dt(7),Mt("ngClass",Ic(33,Cm,0===e.expandedTab)),dt(3),Mt("ngClass",Ic(35,Cm,1===e.expandedTab)),dt(3),Mt("ngClass",Ic(37,Cm,2===e.expandedTab)),dt(3),Mt("ngClass",Ic(39,Cm,3===e.expandedTab)),dt(3),Mt("ngClass",Ic(41,Cm,4===e.expandedTab)),dt(3),Mt("ngClass",Ic(43,Cm,5===e.expandedTab)),dt(2),Mt("ngIf",e.gauge&&e.gauge.exists),dt(3),Mt("ngIf",0===e.expandedTab),dt(1),Mt("ngIf",1===e.expandedTab),dt(1),Mt("ngIf",2===e.expandedTab),dt(1),Mt("ngIf",3===e.expandedTab),dt(1),Mt("ngIf",4===e.expandedTab),dt(1),Mt("ngIf",5===e.expandedTab),dt(1),Mt("ngIf",6===e.expandedTab)}}const Ime=function(n){return{"d-lg-none":n}};function Sme(n,t){if(1&n&&qn(0,"mat-header-row",115),2&n){const e=an();Mt("ngClass",Ic(1,Ime,e.store.getStatus(e.wallet.chainId).match("success")&&0===e.bunniTokens.length))}}function kme(n,t){if(1&n){const e=Di();Ae(0,"mat-row",116),dr("click",function(){const p=Ur(e).$implicit;return p.expanded=!p.expanded}),Ie()}2&n&&Mt("ngClass",t.$implicit.expanded?"rounded-top":"rounded-0")}function Cme(n,t){1&n&&qn(0,"mat-row",117),2&n&&Mt("hidden",!t.$implicit.expanded)}function Mme(n,t){1&n&&(Qr(0),Ae(1,"div",120),qn(2,"span",121),Ie(),Wr())}const Ome=function(){return[]};function Dme(n,t){1&n&&(Qr(0),it(1,Mme,3,0,"ng-container",119),Wr()),2&n&&(dt(1),Mt("ngForOf",sf(1,Ome).constructor(10)))}function Pme(n,t){1&n&&(Qr(0),Ae(1,"h3",122),kt(2," No staking opportunities found "),Ie(),Wr())}function Rme(n,t){if(1&n&&(Ae(0,"div",118),it(1,Dme,2,2,"ng-container",67),it(2,Pme,3,0,"ng-container",67),Ie()),2&n){const e=an();dt(1),Mt("ngIf",!e.store.getStatus(e.wallet.chainId).match("success")),dt(1),Mt("ngIf",e.store.getStatus(e.wallet.chainId).match("success"))}}const VV=function(){return["assets","swapAPR","apr","userDepositUSD","reserve","actions"]},Nme=function(){return["expandedDetails"]},TI=class{constructor(t,e,r,s,p){yt(this,"modalService"),yt(this,"chain"),yt(this,"store"),yt(this,"util"),yt(this,"wallet"),yt(this,"bunniTokens"),yt(this,"reserves"),yt(this,"dailyVolume"),yt(this,"dailyFees"),yt(this,"bunniTokens_subscription"),yt(this,"protocol_subscription"),this.modalService=t,this.chain=e,this.store=r,this.util=s,this.wallet=p}ngOnInit(){this.reset(),this.bunniTokens_subscription=this.store.bunniTokens_observable.subscribe(t=>{if(this.bunniTokens&&t[1]&&t[1]!==this.wallet.chainId)return;const e=Object.values(t[0]).reduce((r,s)=>{if(s.chainId===this.wallet.chainId&&s.gauge&&(s.gauge.exists&&!s.gauge.killed||!s.gauge.exists&&s.rewardTokenAPR.gt(0))){const p=this.bunniTokens&&this.bunniTokens.find(q=>q.address===s.address),F=Object.assign(new Bme,s,{...p&&{expanded:p.expanded},...p&&{expandedTab:p.expandedTab}});r.push(F)}return r},[]);e.length&&(this.util.sortByPropSumBN(e,["swapAPR","stakingAPR","thisPeriodMaxRewardAPR"],!1),this.wallet.connected&&this.util.sortByProp(e,"userDepositUSD",!1)),this.bunniTokens=e}),this.protocol_subscription=this.store.protocol_observable.subscribe(t=>{!t[this.wallet.chainId]||(this.reserves=t[this.wallet.chainId].reserve,this.dailyVolume=t[this.wallet.chainId].dailyVolume,this.dailyFees=t[this.wallet.chainId].dailyFees)})}ngOnDestroy(){this.bunniTokens_subscription.unsubscribe(),this.protocol_subscription.unsubscribe()}switchTab(t,e){t.expandedTab=e}sortFarms(t){this.bunniTokens="apr"===t.active?[...this.util.sortByPropSumBN(this.bunniTokens,["swapAPR","stakingAPR","rewardTokenAPR","thisPeriodMaxRewardAPR"],"asc"===t.direction)]:[...this.util.sortByProp(this.bunniTokens,t.active,"asc"===t.direction)]}openAprModal(t){const e=this.modalService.open(WT,{windowClass:"windowed",centered:!0,size:"md"});e.componentInstance.pool=t.pool,e.componentInstance.bunniToken=t}reset(){this.reserves=new sn.Z(0),this.dailyVolume=new sn.Z(0),this.dailyFees=new sn.Z(0)}};let zT=TI;yt(zT,"\u0275fac",function(e){return new(e||TI)(Xt(Nf),Xt(dc),Xt(el),Xt($c),Xt(Xa))}),yt(zT,"\u0275cmp",bn({type:TI,selectors:[["app-farm"]],decls:55,vars:13,consts:[[1,"container","py-5"],[1,"row","justify-content-center"],[1,"col-12"],[1,"row","align-items-center","justify-content-between","mb-4"],[1,"col-12","col-lg-6","mb-4","mb-lg-0"],[1,"lead","text-muted","mb-0"],["routerLink","/velit"],[1,"col-12","col-lg-6"],[1,"row","row-cols-1","row-cols-md","mb-4","mb-lg-0","d-flex","justify-content-between"],[1,"col-6","col-lg-4"],[1,"text-muted"],["loadingData",""],[4,"ngIf","ngIfElse"],[1,"card","card-inner-shadow"],["mat-table","","multiTemplateDataRows","","matSort","","matSortActive","userDepositUSD","matSortDirection","desc","matSortDisableClear","",1,"card-body","p-0",3,"dataSource","matSortChange"],["matColumnDef","assets"],["class","col-12 col-lg px-0 pe-lg-4",4,"matHeaderCellDef"],["class","col-12 col-lg d-block d-lg-flex px-0 pe-lg-4 border-mobile-bottom",4,"matCellDef"],["matColumnDef","swapAPR"],["mat-sort-header","","arrowPosition","before","class","col-12 col-lg-1 justify-content-lg-end px-0",4,"matHeaderCellDef"],["class","col-12 col-lg-1 d-block d-lg-flex justify-content-lg-end px-0 py-3 border-mobile-bottom mb-lg-0",4,"matCellDef"],["matColumnDef","apr"],["mat-sort-header","","arrowPosition","before","class","col-12 col-lg-3 justify-content-lg-end",4,"matHeaderCellDef"],["class","col-12 col-lg-3 d-block text-lg-end px-0 py-3 border-mobile-bottom mb-lg-0",4,"matCellDef"],["matColumnDef","userDepositUSD"],["mat-sort-header","","arrowPosition","before","class","col-12 col-lg-2 justify-content-lg-end",4,"matHeaderCellDef"],["class","col-12 col-lg-2 d-block text-lg-end px-0 py-3 border-mobile-bottom mb-lg-0",4,"matCellDef"],["matColumnDef","reserve"],["mat-sort-header","","arrowPosition","before","class","col-1 pe-lg-2 justify-content-end",4,"matHeaderCellDef"],["class","col-12 col-lg-1 d-block text-lg-end px-0 pe-lg-2 py-3 border-mobile-bottom mb-lg-0",4,"matCellDef"],["matColumnDef","actions"],["class","col-12 col-lg-auto px-0 align-items-center justify-content-start justify-content-lg-end",4,"matHeaderCellDef"],["class","col-12 col-lg-auto px-0 py-2 align-items-center justify-content-end",4,"matCellDef"],["matColumnDef","expandedDetails"],[4,"matHeaderCellDef"],["class","d-block p-0",4,"matCellDef"],["class","d-none d-lg-flex border border-0 border-bottom bg-black rounded-top pt-0 px-4 text-muted",3,"ngClass",4,"matHeaderRowDef"],["class","row border-bottom clickable text-white mx-0 px-4 pt-4 pt-lg-2 pb-0 my-0",3,"ngClass","click",4,"matRowDef","matRowDefColumns"],["class","border border-top bg-dark mt-0 mb-0",3,"hidden",4,"matRowDef","matRowDefColumns"],["class","row no-data-row d-flex justify-content-center",4,"matNoDataRow"],[1,"placeholder-wave","py-3","m-0","pe-4"],[1,"placeholder","placeholder-lg","w-100","border","rounded-pill","text-transparent"],[1,"m-0","text-white","display-4"],[1,"col-12","col-lg","px-0","pe-lg-4"],[1,"col-12","col-lg","d-block","d-lg-flex","px-0","pe-lg-4","border-mobile-bottom"],[1,"row","g-2","g-lg-3","mb-4","mb-lg-2","d-flex","align-items-center"],[1,"col-auto","avatar-group","mb-2"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle",3,"src","alt","ngClass"],[1,"col-auto","badge","bg-dark","rounded-1","mb-2"],[1,"my-0"],[1,"col","col-lg-12","h3","my-0","d-flex","align-items-center",3,"title"],[1,"text-truncate",2,"width","150px"],[1,"row","mb-3","mb-lg-0"],[1,"text-muted","text-uppercase","d-block","d-lg-none","mb-1"],[1,"col-12","d-flex","justify-content-lg-end","align-items-center"],[1,"text-truncate","text-lg-end",2,"max-width","200px",3,"title"],["mat-sort-header","","arrowPosition","before",1,"col-12","col-lg-1","justify-content-lg-end","px-0"],[1,"fe","fe-info","ms-2","d-none"],[1,"col-12","col-lg-1","d-block","d-lg-flex","justify-content-lg-end","px-0","py-3","border-mobile-bottom","mb-lg-0"],[1,"d-block"],["mat-sort-header","","arrowPosition","before",1,"col-12","col-lg-3","justify-content-lg-end"],[1,"col-12","col-lg-3","d-block","text-lg-end","px-0","py-3","border-mobile-bottom","mb-lg-0"],[1,"fe","fe-arrow-right","mx-1"],["onclick","event.stopPropagation()",1,"fe","fe-info","ms-2",3,"click"],["mat-sort-header","","arrowPosition","before",1,"col-12","col-lg-2","justify-content-lg-end"],[1,"col-12","col-lg-2","d-block","text-lg-end","px-0","py-3","border-mobile-bottom","mb-lg-0"],[4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","col-lg-12"],[1,"text-muted","me-1","d-none","d-lg-inline-block"],["mat-sort-header","","arrowPosition","before",1,"col-1","pe-lg-2","justify-content-end"],[1,"col-12","col-lg-1","d-block","text-lg-end","px-0","pe-lg-2","py-3","border-mobile-bottom","mb-lg-0"],[1,"col-12","col-lg-auto","px-0","align-items-center","justify-content-start","justify-content-lg-end"],[1,"fe","fe-chevron-down","invisible"],[1,"col-12","col-lg-auto","px-0","py-2","align-items-center","justify-content-end"],["class","text-white text-uppercase d-block d-lg-none mb-0",4,"ngIf"],["class","fe fe-chevron-down",4,"ngIf"],["class","fe fe-chevron-up",4,"ngIf"],[1,"text-white","text-uppercase","d-block","d-lg-none","mb-0"],[1,"fe","fe-chevron-down"],[1,"fe","fe-chevron-up"],[1,"d-block","p-0"],["id","myTab","role","tablist",1,"nav","nav-tabs","px-4","border-0","d-none","d-lg-flex","justify-content-center"],["role","presentation",1,"nav-item",3,"click"],[1,"nav-link",3,"ngClass"],["class","nav-item","role","presentation",3,"click",4,"ngIf"],[1,"dropdown","d-lg-none"],[1,"d-grid","g-2","mx-4","my-3"],["type","button","id","dropdownMenu2","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-sm","btn-dark","dropdown-toggle"],["aria-labelledby","dropdownMenu2",1,"dropdown-menu","w-100",2,"z-index","10"],["role","presentation",3,"click"],[1,"dropdown-item",3,"ngClass"],["role","presentation",3,"click",4,"ngIf"],[1,"col-12","col-lg-7","mx-lg-auto"],["id","myTabContent",1,"tab-content","pt-4","pb-6","px-4","p-lg-4"],["class","tab-pane fade","role","tabpanel","tabindex","0",3,"ngClass",4,"ngIf"],["class","tab-pane fade","role","tabpanel","tabindex","1",3,"ngClass",4,"ngIf"],["class","tab-pane fade","role","tabpanel","tabindex","2",3,"ngClass",4,"ngIf"],["class","tab-pane fade","role","tabpanel","tabindex","3",3,"ngClass",4,"ngIf"],["class","tab-pane fade","role","tabpanel","tabindex","4",3,"ngClass",4,"ngIf"],["class","tab-pane fade","role","tabpanel","tabindex","5",3,"ngClass",4,"ngIf"],["class","tab-pane fade","role","tabpanel","tabindex","6",3,"ngClass",4,"ngIf"],["role","tabpanel","tabindex","0",1,"tab-pane","fade",3,"ngClass"],[3,"pool","token0","token1","slippage","deadline","bunniToken"],["role","tabpanel","tabindex","1",1,"tab-pane","fade",3,"ngClass"],["role","tabpanel","tabindex","2",1,"tab-pane","fade",3,"ngClass"],["role","tabpanel","tabindex","3",1,"tab-pane","fade",3,"ngClass"],[3,"bunniToken","gaugeToken"],["role","tabpanel","tabindex","4",1,"tab-pane","fade",3,"ngClass"],["role","tabpanel","tabindex","5",1,"tab-pane","fade",3,"ngClass"],[3,"bunniToken"],["role","tabpanel","tabindex","6",1,"tab-pane","fade",3,"ngClass"],[3,"pool","bunni","gauge"],[1,"d-none","d-lg-flex","border","border-0","border-bottom","bg-black","rounded-top","pt-0","px-4","text-muted",3,"ngClass"],[1,"row","border-bottom","clickable","text-white","mx-0","px-4","pt-4","pt-lg-2","pb-0","my-0",3,"ngClass","click"],[1,"border","border-top","bg-dark","mt-0","mb-0",3,"hidden"],[1,"row","no-data-row","d-flex","justify-content-center"],[4,"ngFor","ngForOf"],[1,"col-11","placeholder-wave","rounded","p-0","m-0","mt-3",2,"height","88px"],[1,"placeholder","placeholder-lg","w-100","border","text-transparent",2,"height","88px"],[1,"text-center","text-muted","py-3","my-3"]],template:function(e,r){if(1&e&&(Ae(0,"div",0),Ae(1,"div",1),Ae(2,"div",2),Ae(3,"div",3),Ae(4,"div",4),Ae(5,"h1"),kt(6,"Stake Bunni LP Tokens"),Ie(),Ae(7,"p",5),kt(8,"Bunni pool ranges incentivized by "),Ae(9,"a",6),kt(10,"veLIT"),Ie(),kt(11," voters."),Ie(),Ie(),Ae(12,"div",7),Ae(13,"div",8),Ae(14,"div",9),Ae(15,"h5",10),kt(16,"TVL"),Ie(),it(17,q1e,2,0,"ng-template",null,11,xu),it(19,K1e,3,2,"div",12),Ie(),Ae(20,"div",9),Ae(21,"h5",10),kt(22,"24h Volume"),Ie(),it(23,Z1e,3,2,"div",12),Ie(),Ae(24,"div",9),Ae(25,"h5",10),kt(26,"24h Fees"),Ie(),it(27,Y1e,3,2,"div",12),Ie(),Ie(),Ie(),Ie(),Ae(28,"div",13),Ae(29,"table",14),dr("matSortChange",function(p){return r.sortFarms(p)}),Qr(30,15),it(31,J1e,2,0,"mat-header-cell",16),it(32,X1e,26,27,"mat-cell",17),Wr(),Qr(33,18),it(34,Q1e,3,0,"mat-header-cell",19),it(35,eme,5,1,"mat-cell",20),Wr(),Qr(36,21),it(37,tme,3,0,"mat-header-cell",22),it(38,nme,15,4,"mat-cell",23),Wr(),Qr(39,24),it(40,rme,2,0,"mat-header-cell",25),it(41,ome,3,2,"mat-cell",26),Wr(),Qr(42,27),it(43,ame,2,0,"mat-header-cell",28),it(44,ume,4,2,"mat-cell",29),Wr(),Qr(45,30),it(46,cme,2,0,"mat-header-cell",31),it(47,pme,5,4,"mat-cell",32),Wr(),Qr(48,33),it(49,mme,1,0,"mat-header-cell",34),it(50,Ame,56,45,"mat-cell",35),Wr(),it(51,Sme,1,3,"mat-header-row",36),it(52,kme,1,1,"mat-row",37),it(53,Cme,1,1,"mat-row",38),it(54,Rme,3,2,"div",39),Ie(),Ie(),Ie(),Ie(),Ie()),2&e){const s=nr(18);dt(19),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",s),dt(4),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",s),dt(4),Mt("ngIf",r.store.getStatus(r.wallet.chainId).match("success"))("ngIfElse",s),dt(2),Mt("dataSource",r.bunniTokens),dt(22),Mt("matHeaderRowDef",sf(10,VV)),dt(1),Mt("matRowDefColumns",sf(11,VV)),dt(1),Mt("matRowDefColumns",sf(12,Nme))}},directives:[Y6,La,cv,bw,Hb,lv,Vb,L5,hv,aw,dv,fv,dh,MT,lw,V5,dw,fw,hw,pw,GT,U5,pv,L0],styles:[""]}));class Bme extends KE{constructor(){super(...arguments),yt(this,"expanded",!1),yt(this,"expandedTab",0)}}var Fme=Y(67475),Lme=Y(12539);function Ume(n,t){if(1&n){const e=Di();Ae(0,"button",19),dr("click",function(){Ur(e);const s=an(2);return s.broadcast(s.getAllIds())}),kt(1," Broadcast "),Ie()}}function jme(n,t){if(1&n){const e=Di();Ae(0,"button",19),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),kt(1," Switch to Mainnet "),Ie()}}function Vme(n,t){if(1&n&&(Qr(0),it(1,Ume,2,0,"button",18),it(2,jme,2,0,"button",18),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.wallet.chainId===e.chain.id.ETHEREUM),dt(1),Mt("ngIf",e.wallet.chainId!==e.chain.id.ETHEREUM)}}function Hme(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"button",19),dr("click",function(){return Ur(e),an().wallet.connect()}),kt(2," Connect a Wallet "),Ie(),Wr()}}const AI=class{constructor(t,e,r,s,p,F){yt(this,"activeModal"),yt(this,"chain"),yt(this,"contract"),yt(this,"modalService"),yt(this,"util"),yt(this,"wallet"),this.activeModal=t,this.chain=e,this.contract=r,this.modalService=s,this.util=p,this.wallet=F}ngOnInit(){}getAllIds(){return Object.values(this.chain.id).reduce((t,e)=>(My[e]&&t.push(e),t),[])}broadcast(t){var e=this;return(0,Br.Z)(function*(){if(!t.length)throw new Error("ChildGaugeFactory(s) not yet deployed");if(!KU[e.wallet.chainId])throw new Error("VeBeacon not yet deployed");const s=e.contract.getVeBeacon(e.wallet.web3,e.wallet.chainId),p=e.util.processWeb3Number(5e5),F=e.util.processWeb3Number(1e8),q=1===t.length?s.methods.broadcastVeBalance(e.wallet.user,t[0],p,F):s.methods.broadcastVeBalanceMultiple(e.wallet.user,t,p,F);let te=0;t.includes(e.chain.id.ARBITRUM)&&(te=parseInt(yield s.methods.getRequiredMessageValue(e.chain.id.ARBITRUM,p,F).call())),e.wallet.sendTx(q,()=>{},()=>{},()=>{},fe=>{console.error(fe),e.wallet.openErrorModal(fe)},te)})()}};let qT=AI;function $me(n,t){if(1&n){const e=Di();Ae(0,"button",10),dr("click",function(){Ur(e);const s=an(2);return s.transmit(s.pruneGauges())}),kt(1," Transmit "),Ie()}}function Wme(n,t){if(1&n){const e=Di();Ae(0,"button",10),dr("click",function(){Ur(e);const s=an(2);return s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),kt(1," Switch to Mainnet "),Ie()}}function Gme(n,t){if(1&n&&(Qr(0),it(1,$me,2,0,"button",9),it(2,Wme,2,0,"button",9),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.wallet.chainId===e.chain.id.ETHEREUM),dt(1),Mt("ngIf",e.wallet.chainId!==e.chain.id.ETHEREUM)}}function zme(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"button",10),dr("click",function(){return Ur(e),an().wallet.connect()}),kt(2," Connect a Wallet "),Ie(),Wr()}}yt(qT,"\u0275fac",function(e){return new(e||AI)(Xt(Ob),Xt(dc),Xt(ud),Xt(Nf),Xt($c),Xt(Xa))}),yt(qT,"\u0275cmp",bn({type:AI,selectors:[["app-beacon"]],decls:30,vars:2,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close","h2","m-0","px-0",3,"click"],[1,"modal-body"],[1,"accordion","mb-3"],[1,"accordion-item","accordion-item","mb-0","bg-transparent","border-0"],["id","headingOne",1,"accordion-header","bg-transparent"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseOne","aria-expanded","false","aria-controls","collapseOne",1,"accordion-button","collapsed","bg-transparent","px-0"],["id","collapseOne","aria-labelledby","headingOne","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","mb-0"],[1,"accordion-body","px-0"],["id","headingTwo",1,"accordion-header","bg-transparent"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseTwo","aria-expanded","false","aria-controls","collapseTwo",1,"accordion-button","collapsed","bg-transparent","px-0"],["id","collapseTwo","aria-labelledby","headingTwo","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","mb-0"],["id","headingThree",1,"accordion-header","bg-transparent"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseThree","aria-expanded","false","aria-controls","collapseTwo",1,"accordion-button","collapsed","bg-transparent","px-0"],["id","collapseThree","aria-labelledby","headingThree","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","mb-0"],[1,"d-grid","mb-3"],[4,"ngIf"],["type","button","class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold",3,"click",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"h2",1),kt(2,"Broadcast veLIT"),Ie(),Ae(3,"button",2),dr("click",function(){return r.activeModal.dismiss()}),Ie(),Ie(),Ae(4,"div",3),Ae(5,"div",4),Ae(6,"div",5),Ae(7,"h1",6),Ae(8,"button",7),kt(9," Why should I broadcast? "),Ie(),Ie(),Ae(10,"div",8),Ae(11,"div",9),kt(12," Broadcasting your veLIT balance on Ethereum mainnet to other chains (e.g. Arbitrum) enables you to boost your oLIT rewards on those chains. "),Ie(),Ie(),Ie(),Ae(13,"div",5),Ae(14,"h1",10),Ae(15,"button",11),kt(16," When should I broadcast? "),Ie(),Ie(),Ae(17,"div",12),Ae(18,"div",9),kt(19," Whenever you create a new lock or increase your veLIT balance by increasing your lock amount or extending your lock duration, you should broadcast your increased veLIT balance to L2. "),Ie(),Ie(),Ie(),Ae(20,"div",5),Ae(21,"h1",13),Ae(22,"button",14),kt(23," What if I don't provide liquidity on L2? "),Ie(),Ie(),Ae(24,"div",15),Ae(25,"div",9),kt(26," If you aren't planning to, or don't already, provide liquidity on L2 then there is no need to broadcast your veLIT balance. However, if you do decide to provide liquidity on L2 and would like to boost your oLIT rewards, you will need to broadcast your veLIT balance. "),Ie(),Ie(),Ie(),Ie(),Ae(27,"div",16),it(28,Vme,3,2,"ng-container",17),it(29,Hme,3,0,"ng-container",17),Ie(),Ie()),2&e&&(dt(28),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[La],styles:[""]}));const II=class{constructor(t,e,r,s,p){yt(this,"activeModal"),yt(this,"chain"),yt(this,"contract"),yt(this,"modalService"),yt(this,"wallet"),yt(this,"gauges"),this.activeModal=t,this.chain=e,this.contract=r,this.modalService=s,this.wallet=p}ngOnInit(){}pruneGauges(){return this.gauges.filter(t=>!this.chain.isMainnet(t.chainId)&&!this.chain.isTestnet(t.chainId))}transmit(t){var e=this;return(0,Br.Z)(function*(){if(0==t.length)throw new Error("No gauges were specified");if(t.length>64)throw new Error("Too many gauges were specified");if(!j_[e.wallet.chainId])throw new Error("RootGaugeFactory not yet deployed");const r=e.wallet.web3,s=e.contract.getRootGaugeFactory(r,e.wallet.chainId),p=e.contract.getBridger(r,e.chain.id.ARBITRUM),F=parseInt(yield p.methods.cost().call()),q=t.reduce((fe,Re)=>(Re.chainId===e.chain.id.ARBITRUM&&(fe+=F),fe),0),te=1===t.length?s.methods.transmit_emissions(t[0].address):s.methods.transmit_emissions_multiple(t.map(fe=>fe.address));e.wallet.sendTx(te,()=>{},()=>{},()=>{},fe=>{console.error(fe),e.wallet.openErrorModal(fe)},Math.round(1.1*q))})()}};let KT=II;function qme(n,t){if(1&n&&(Ae(0,"mat-cell",31),Ae(1,"h6",32),kt(2,"Network"),Ie(),Ae(3,"div",33),qn(4,"img",34),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),qu("src",r.chain.metadata[e.pool.chainId].iconPath,Pi),_l("alt","",r.chain.metadata[e.pool.chainId].displayName," Icon")}}yt(KT,"\u0275fac",function(e){return new(e||II)(Xt(Ob),Xt(dc),Xt(ud),Xt(Nf),Xt(Xa))}),yt(KT,"\u0275cmp",bn({type:II,selectors:[["app-transmit"]],inputs:{gauges:"gauges"},decls:12,vars:2,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close","h2","m-0","px-0",3,"click"],[1,"modal-body"],[1,"mb-3"],[1,"container","py-3","px-3","border","border-warning","rounded-1","text-warning"],[1,"d-flex","align-items-center","justify-content-center"],[1,"d-grid","mb-3"],[4,"ngIf"],["type","button","class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold",3,"click",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"click"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"h2",1),kt(2,"Transmit oLIT"),Ie(),Ae(3,"button",2),dr("click",function(){return r.activeModal.dismiss()}),Ie(),Ie(),Ae(4,"div",3),Ae(5,"div",4),Ae(6,"div",5),Ae(7,"div",6),kt(8," Calling this function transmits oLIT emissions from L1 to the L2 gauges, which must be done periodically to allow liqudity providers on L2 to claim their oLIT rewards. If you don't know what you're doing, do NOT call this function! "),Ie(),Ie(),Ie(),Ae(9,"div",7),it(10,Gme,3,2,"ng-container",8),it(11,zme,3,0,"ng-container",8),Ie(),Ie()),2&e&&(dt(10),Mt("ngIf",r.wallet.connected),dt(1),Mt("ngIf",!r.wallet.connected))},directives:[La],styles:[""]}));const HV=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function Kme(n,t){if(1&n&&(Ae(0,"mat-cell",35),Ae(1,"h6",32),kt(2,"Pool"),Ie(),Ae(3,"div",36),Ae(4,"div",37),Ae(5,"div",38),Ae(6,"div",33),qn(7,"img",39),Ie(),Ae(8,"div",33),qn(9,"img",39),Ie(),Ie(),Ae(10,"div",40),kt(11),Ie(),Ae(12,"span",41),kt(13),Ie(),Ie(),Ie(),Ie()),2&n){const e=t.$implicit;dt(7),qu("src",e.pool.token0.iconPath,Pi),_l("alt","",e.pool.token0.symbol," Icon"),Mt("ngClass",vc(9,HV,e.pool.token0.symbol.includes("PYT"),e.pool.token0.symbol.includes("NYT"))),dt(2),qu("src",e.pool.token1.iconPath,Pi),_l("alt","",e.pool.token1.symbol," Icon"),Mt("ngClass",vc(12,HV,e.pool.token1.symbol.includes("PYT"),e.pool.token1.symbol.includes("NYT"))),dt(2),cu(" ",e.pool.token0.symbol,"/",e.pool.token1.symbol," "),dt(2),Pr(" ",e.pool.fee/1e4,"% ")}}function Zme(n,t){if(1&n&&(Ae(0,"mat-cell",42),Ae(1,"h6",32),kt(2,"My votes"),Ie(),Ae(3,"div",43),Ae(4,"div"),kt(5),Ie(),Ae(6,"div",44),kt(7),Ie(),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(5),Pr(" ",e.userVotes.div(1e4).times(r.veBalance).toFormat(2)," "),dt(2),Pr(" ",e.userVotes.div(1e4).times(100).toFormat(2),"% ")}}function Yme(n,t){if(1&n){const e=Di();Ae(0,"mat-cell",45),Ae(1,"h6",32),kt(2,"My vote %"),Ie(),Ae(3,"input",46),dr("input",function(s){const F=Ur(e).$implicit;return an().changeUserVote(F,s.target.value)}),Ie(),Ie()}if(2&n){const e=t.$implicit,r=an();dt(3),Mt("value",e.userVotes.div(1e4).times(100))("disabled",r.time.now{e.selected&&(t=t.plus(e.userVotes)),!e.selected&&e.userWeight.gt(0)&&(t=t.plus(e.userWeight))}),this.votePowerUsed=t}changeUserVote(t,e){t.userVotes=new sn.Z(e).times(1e4).div(100),this.updateVotePowerUsed(),t.userVotes.eq(t.userWeight)||(t.selected=!0)}changeSelection(t){t.selected=!t.selected,this.updateVotePowerUsed()}errorMessage(){const e=1e3*this.time.week,r=Math.floor((1e3*this.time.now+e)/e)*e/1e3,s=this.gauges.filter(p=>p.selected);return 0===this.gauges.length?"No gauges":0===s.length?"You must vote for at least 1 gauge":s.length>8?"You may vote for up to 8 gauges in a single transaction":this.votePowerUsed.gt(1e4)?`You have used too much vote power (${this.votePowerUsed.div(1e4).times(100)}%)`:0===this.escrow.end?"You need some veLIT to vote on gauges":this.escrow.end<=r?"Your lock expires too soon. Extend your lock to vote on gauges":"Unknown error. Please reach on to the Support channel on Discord."}canVote(){const e=1e3*this.time.week,r=Math.floor((1e3*this.time.now+e)/e)*e/1e3,s=this.gauges.filter(p=>p.selected);return this.gauges.length>0&&s.length>0&&s.length<=8&&this.votePowerUsed.lte(1e4)&&this.escrow.end>0&&this.escrow.end>r}castVote(){const e=this.contract.getGaugeController(this.wallet.web3,this.wallet.chainId);this.gauges.sort((F,q)=>F.userVotes.minus(F.userWeight).gt(q.userVotes.minus(q.userWeight))?1:-1);let p,[r,s]=this.gauges.reduce(([F,q],te)=>(te.selected&&(F.push(te.address),q.push(this.util.processWeb3Number(te.userVotes))),[F,q]),[[],[]]);if(1===r.length)p=e.methods.vote_for_gauge_weights(r[0],s[0]);else{for(;r.length<8;)r.push(Oy),s.push("0");p=e.methods.vote_for_many_gauge_weights(r,s)}this.wallet.sendTx(p,()=>{},()=>{},F=>{try{const q=F.events.VoteForGauge;if(q.length)q.forEach(te=>{const fe=this.store.getGauge(this.util.id(te.returnValues.gauge_addr.toLowerCase(),this.wallet.chainId)),Re=new sn.Z(te.returnValues.weight).minus(fe.userWeight),$e=new ZE(parseInt(te.returnValues.time)+10*this.time.day,"down");$e.start();let[rt,ft]=[[],[]];rt.push("votePowerUsed")&&ft.push(this.escrow.votePowerUsed.plus(Re)),rt.push("votePowerUnused")&&ft.push(this.escrow.votePowerUnused.minus(Re)),this.store.updateEscrow(this.wallet.chainId,rt,ft),[rt,ft]=[[],[]],rt.push("userTime")&&ft.push(parseInt(te.returnValues.time)),rt.push("userTimeCountdown")&&ft.push($e),rt.push("userWeight")&&ft.push(new sn.Z(te.returnValues.weight)),this.store.updateGauge(fe.id,rt,ft)});else{const te=this.store.getGauge(this.util.id(q.returnValues.gauge_addr.toLowerCase(),this.wallet.chainId)),fe=new sn.Z(q.returnValues.weight).minus(te.userWeight),Re=new ZE(parseInt(q.returnValues.time)+10*this.time.day,"down");Re.start();let[$e,rt]=[[],[]];$e.push("votePowerUsed")&&rt.push(this.escrow.votePowerUsed.plus(fe)),$e.push("votePowerUnused")&&rt.push(this.escrow.votePowerUnused.minus(fe)),this.store.updateEscrow(this.wallet.chainId,$e,rt),[$e,rt]=[[],[]],$e.push("userTime")&&rt.push(parseInt(q.returnValues.time)),$e.push("userTimeCountdown")&&rt.push(Re),$e.push("userWeight")&&rt.push(new sn.Z(q.returnValues.weight)),this.store.updateGauge(te.id,$e,rt)}}catch(q){console.error(q)}},F=>{console.error(F),this.wallet.openErrorModal(F)})}};let ZT=SI;yt(ZT,"\u0275fac",function(e){return new(e||SI)(Xt(Ob),Xt(dc),Xt(ud),Xt(Nf),Xt(el),Xt(km),Xt($c),Xt(Xa))}),yt(ZT,"\u0275cmp",bn({type:SI,selectors:[["app-vote"]],inputs:{gauges:"gauges",escrow:"escrow",veBalance:"veBalance"},decls:46,vars:7,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close","h2","m-0",3,"click"],[1,"modal-body"],["mat-table","",1,"card-body","mb-3","w-100",3,"dataSource"],["matColumnDef","chain"],["class","col-6 col-lg-auto px-0 d-block d-lg-flex",4,"matCellDef"],["matColumnDef","assets"],["class","col-6 col-lg d-block d-lg-flex",4,"matCellDef"],["matColumnDef","userVotes"],["class","col-12 col-lg-2 px-0 d-block d-lg-flex mt-3 mt-lg-0",4,"matCellDef"],["matColumnDef","userVotePercent"],["class","col-10 col-lg-3 d-block d-lg-flex align-items-center justify-content-lg-end px-0 pe-lg-2 py-3 mb-lg-0",4,"matCellDef"],["matColumnDef","selection"],["class","col-2 col-lg-auto d-flex justify-content-end px-0 py-3 mb-lg-0",4,"matCellDef"],["class","row border-bottom text-white p-2 mb-0",4,"matRowDef","matRowDefColumns"],[1,"d-grid","mb-3"],[4,"ngIf"],[1,"accordion","mt-5"],[1,"accordion-item","accordion-item","mb-0","bg-transparent","border-0"],["id","headingOne",1,"accordion-header","bg-transparent"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseOne","aria-expanded","false","aria-controls","collapseOne",1,"accordion-button","collapsed","bg-transparent"],[1,"fe","fe-info","me-2"],["id","collapseOne","aria-labelledby","headingOne","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","card","card-inner-shadow","mb-0"],[1,"accordion-body"],["id","headingTwo",1,"accordion-header","bg-transparent"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseTwo","aria-expanded","false","aria-controls","collapseTwo",1,"accordion-button","collapsed","bg-transparent"],["id","collapseTwo","aria-labelledby","headingTwo","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","card","card-inner-shadow","mb-0"],["id","headingThree",1,"accordion-header","bg-transparent"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseThree","aria-expanded","false","aria-controls","collapseTwo",1,"accordion-button","collapsed","bg-transparent"],["id","collapseThree","aria-labelledby","headingThree","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","card","card-inner-shadow","mb-0"],[1,"col-6","col-lg-auto","px-0","d-block","d-lg-flex"],[1,"text-muted","text-uppercase","d-block","d-lg-none","mb-2"],[1,"avatar","avatar-xs"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","position-absolute",3,"src","alt"],[1,"col-6","col-lg","d-block","d-lg-flex"],[1,"d-block","d-lg-flex","align-items-center","justify-content-start"],[1,"d-flex","align-items-center"],[1,"avatar-group"],["onerror","this.src = 'assets/img/tokens/unknown.svg'",1,"avatar-img","rounded-circle","position-absolute",3,"src","alt","ngClass"],[1,"mx-2","col-auto"],[1,"badge","bg-dark","rounded-1"],[1,"col-12","col-lg-2","px-0","d-block","d-lg-flex","mt-3","mt-lg-0"],[1,"d-flex","d-lg-block","text-lg-start"],[1,"text-muted","ms-2","ms-lg-0"],[1,"col-10","col-lg-3","d-block","d-lg-flex","align-items-center","justify-content-lg-end","px-0","pe-lg-2","py-3","mb-lg-0"],["type","range","min","0","max","100","step","1",1,"form-range","custom-range-input",3,"value","disabled","input"],[1,"col-2","col-lg-auto","d-flex","justify-content-end","px-0","py-3","mb-lg-0"],["type","checkbox",1,"form-check-input",3,"checked","disabled","change"],[1,"row","border-bottom","text-white","p-2","mb-0"],["type","button","class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-lg btn-white btn-shadow-rainbow position-relative fw-bold",3,"click",4,"ngIf"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-white","btn-shadow-rainbow","position-relative","fw-bold",3,"click"],[1,"container","py-3","px-3","border","border-danger","rounded-1","text-danger"],[1,"d-flex","align-items-center","justify-content-center"],[1,"fe","fe-alert-triangle","me-3"]],template:function(e,r){1&e&&(Ae(0,"div",0),Ae(1,"h2",1),kt(2,"Gauge Vote Preview"),Ie(),Ae(3,"button",2),dr("click",function(){return r.activeModal.dismiss()}),Ie(),Ie(),Ae(4,"div",3),Ae(5,"table",4),Qr(6,5),it(7,qme,5,2,"mat-cell",6),Wr(),Qr(8,7),it(9,Kme,14,15,"mat-cell",8),Wr(),Qr(10,9),it(11,Zme,8,2,"mat-cell",10),Wr(),Qr(12,11),it(13,Yme,4,2,"mat-cell",12),Wr(),Qr(14,13),it(15,Jme,2,2,"mat-cell",14),Wr(),it(16,Xme,1,0,"mat-row",15),Ie(),Ae(17,"div",16),it(18,t2e,3,2,"ng-container",17),it(19,n2e,5,1,"ng-container",17),it(20,r2e,3,0,"ng-container",17),Ie(),Ae(21,"div",18),Ae(22,"div",19),Ae(23,"h1",20),Ae(24,"button",21),qn(25,"span",22),kt(26," When does my vote take effect? "),Ie(),Ie(),Ae(27,"div",23),Ae(28,"div",24),kt(29," Your vote directs future liquidity mining emissions starting from the next emissions period on Thursday at 00:00:00 UTC. Your vote will automatically be applied to each emissions period until you change your vote. "),Ie(),Ie(),Ie(),Ae(30,"div",19),Ae(31,"h1",25),Ae(32,"button",26),qn(33,"span",22),kt(34," When can I vote again? "),Ie(),Ie(),Ae(35,"div",27),Ae(36,"div",24),kt(37),Ie(),Ie(),Ie(),Ae(38,"div",19),Ae(39,"h1",28),Ae(40,"button",29),qn(41,"span",22),kt(42," How do I increase my voting power? "),Ie(),Ie(),Ae(43,"div",30),Ae(44,"div",24),kt(45," Voting power is set at the time of the vote. If you get more veLIT later, you will need to resubmit your vote on each gauge to use your increased voting power. "),Ie(),Ie(),Ie(),Ie(),Ie()),2&e&&(dt(5),Mt("dataSource",r.gauges),dt(11),Mt("matRowDefColumns",sf(6,i2e)),dt(2),Mt("ngIf",r.wallet.connected&&r.canVote()),dt(1),Mt("ngIf",r.wallet.connected&&!r.canVote()),dt(1),Mt("ngIf",!r.wallet.connected),dt(17),Pr(" Votes are timelocked for 10 days. If you vote now, you may not change your vote for any of the same gauges until ",r.util.timestampToDateString(r.time.now+10*r.time.day),". "))},directives:[cv,Hb,Vb,hv,La,fv,dh,pv],styles:[""]}));const kI=class{transform(t,e=50,r="..."){return t?t.length>e?t.substring(0,6)+r+t.substring(t.length-6):t:""}};let YT=kI;function s2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),kt(2),Ie(),Wr()),2&n){const e=an();dt(2),Pr(" ",e.escrow.BPT.userBalance.toFormat(6)," ")}}function o2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function a2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),kt(2),Ie(),Wr()),2&n){const e=an();dt(2),Pr(" ",e.escrow.balance.toFormat(6)," ")}}function u2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function c2e(n,t){if(1&n&&(Qr(0),kt(1),Wr()),2&n){const e=an(2);dt(1),Pr(" ",e.util.timestampToDateString(e.escrow.end)," ")}}function l2e(n,t){1&n&&qn(0,"span",78)}function d2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),it(2,c2e,2,1,"ng-container",19),it(3,l2e,1,0,"span",77),Ie(),Wr()),2&n){const e=an();dt(2),Mt("ngIf",e.escrow.end>0),dt(1),Mt("ngIf",0==e.escrow.end)}}function f2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function h2e(n,t){if(1&n&&(Qr(0),Ae(1,"span",79),kt(2),Ie(),Wr()),2&n){const e=an();dt(2),Pr("(",e.escrow.votePowerUnused.div(1e4).times(100).toFixed(2),"% unallocated)")}}function p2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),kt(2),Ie(),Wr()),2&n){const e=an();dt(2),Pr(" ",e.escrow.veLIT.userBalance.toFormat(4)," ")}}function m2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function g2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),kt(2),Ie(),Wr()),2&n){const e=an();dt(2),$l(" ",e.votingEndCountdown.days,"d : ",e.votingEndCountdown.hours,"h : ",e.votingEndCountdown.minutes,"m : ",e.votingEndCountdown.seconds,"s ")}}function y2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function b2e(n,t){if(1&n){const e=Di();Ae(0,"button",87),dr("click",function(){Ur(e);const s=an(2);return s.locker(0==s.escrow.end?1:3)}),kt(1," Lock BPT "),Ie()}}function v2e(n,t){if(1&n){const e=Di();Ae(0,"button",87),dr("click",function(){return Ur(e),an(2).locker(2)}),kt(1," Unlock BPT "),Ie()}}function _2e(n,t){if(1&n){const e=Di();Ae(0,"button",87),dr("click",function(){return Ur(e),an(2).locker(4)}),kt(1," Increase Lock Duration "),Ie()}}function w2e(n,t){if(1&n){const e=Di();Qr(0),Ae(1,"a",80),kt(2," Get BPT "),Ie(),it(3,b2e,2,0,"button",81),it(4,v2e,2,0,"button",81),it(5,_2e,2,0,"button",81),Ae(6,"div",82),Ae(7,"button",83),kt(8," L2 Actions "),Ie(),Ae(9,"ul",84),Ae(10,"li"),Ae(11,"a",85),dr("click",function(){return Ur(e),an().broadcast()}),kt(12,"Sync veLIT Balance to Arbitrum"),Ie(),Ie(),Ae(13,"li"),Ae(14,"a",86),dr("click",function(){return Ur(e),an().transmit()}),kt(15),Ie(),Ie(),Ie(),Ie(),Wr()}if(2&n){const e=an();dt(1),qu("href",e.balancer.poolURL,Pi),dt(2),Mt("ngIf",!e.escrow||e.time.now0&&e.time.now>=e.escrow.end),dt(1),Mt("ngIf",e.escrow.end>0),dt(10),Pr(" Bridge Weekly Rewards to Arbitrum (last transmission: ",e.util.timestampToDateString(e.lastTransmission),") ")}}function x2e(n,t){1&n&&(Ae(0,"div",88),qn(1,"span",89),Ie())}function E2e(n,t){1&n&&(Ae(0,"div",88),qn(1,"span",89),Ie())}function T2e(n,t){1&n&&(Ae(0,"div",88),qn(1,"span",89),Ie())}function A2e(n,t){1&n&&(Ae(0,"div",90),qn(1,"span",89),Ie())}function I2e(n,t){1&n&&(Ae(0,"div",91),kt(1," The APR displayed is based on this week's reward amounts and the average price/locktime for veLIT tokens. It estimates the annualized return you could earn by holding veLIT and participating in the Timeless ecosystem. Please note that APR may vary over time. It's for informational purposes and does not guarantee future returns. "),Ie())}function S2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",92),kt(2),Ie(),Wr()),2&n){const e=an();dt(2),Pr(" ",e.escrow.wethAPR.times(100).plus(e.escrow.balAPR.times(100)).toFormat(2),"% APR ")}}function k2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function C2e(n,t){1&n&&(Ae(0,"div",91),kt(1,' These WETH rewards are sourced from the oLIT redemption proceeds and Bunni fees on swap transactions, as outlined in Timeless Request for Comments (TRC) 33 and 35. Please be aware that the distribution of WETH rewards to veLIT holders takes place on a weekly basis." '),Ie())}function M2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),kt(2),Ie(),Ae(3,"small",93),kt(4),Ie(),Wr()),2&n){const e=an();dt(2),Pr(" ",e.escrow.wethClaimable.toFormat(4)," "),dt(2),Pr("($",e.escrow.wethClaimableUSD.toFormat(2),")")}}function O2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function D2e(n,t){1&n&&(Ae(0,"div",91),kt(1," These BAL rewards are sourced from the Balancer veLIT gauge incentives program, as outlined in Balancer Improvement Proposal (BIP) 200. Please note that the distribution of BAL rewards to veLIT holders occurs on a weekly basis. "),Ie())}function P2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),kt(2),Ie(),Ae(3,"small",93),kt(4),Ie(),Wr()),2&n){const e=an();dt(2),Pr(" ",e.escrow.balClaimable.toFormat(4)," "),dt(2),Pr("($",e.escrow.balClaimableUSD.toFormat(2),")")}}function R2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function N2e(n,t){if(1&n&&(Qr(0,73),Ae(1,"p",74),kt(2),Ie(),Wr()),2&n){const e=an();dt(2),Pr(" $",e.escrow.balClaimableUSD.plus(e.escrow.wethClaimableUSD).toFormat(2)," ")}}function B2e(n,t){1&n&&(Ae(0,"p",75),qn(1,"span",76),Ie())}function F2e(n,t){1&n&&(Qr(0,97),kt(1," Switch to Mainnet to Claim "),Wr())}function L2e(n,t){1&n&&kt(0," Claim All ")}function U2e(n,t){if(1&n){const e=Di();Ae(0,"button",87),dr("click",function(){Ur(e);const s=an(2);return s.chain.isMainnet(s.wallet.chainId)?s.claim(!0,!0):s.wallet.changeChain(s.chain.metadata[s.chain.id.ETHEREUM].chainId)}),it(1,F2e,2,0,"ng-container",95),it(2,L2e,1,0,"ng-template",null,96,xu),Ie()}if(2&n){const e=nr(3),r=an(2);dt(1),Mt("ngIf",!r.chain.isMainnet(r.wallet.chainId))("ngIfElse",e)}}function j2e(n,t){if(1&n){const e=Di();Ae(0,"button",87),dr("click",function(){return Ur(e),an(2).claim(!0,!1)}),kt(1," Claim WETH "),Ie()}}function V2e(n,t){if(1&n){const e=Di();Ae(0,"button",98),dr("click",function(){return Ur(e),an(2).claim(!1,!0)}),kt(1," Claim BAL "),Ie()}}function H2e(n,t){if(1&n&&(Qr(0),it(1,U2e,4,2,"button",81),it(2,j2e,2,0,"button",81),it(3,V2e,2,0,"button",94),Wr()),2&n){const e=an();dt(1),Mt("ngIf",e.escrow.balClaimable.gt(0)||e.escrow.wethClaimable.gt(0)),dt(1),Mt("ngIf",e.escrow.wethClaimable.gt(0)&&e.chain.isMainnet(e.wallet.chainId)),dt(1),Mt("ngIf",e.escrow.balClaimable.gt(0)&&e.chain.isMainnet(e.wallet.chainId))}}function $2e(n,t){1&n&&(Ae(0,"div",88),qn(1,"span",89),Ie())}function W2e(n,t){1&n&&(Ae(0,"div",88),qn(1,"span",89),Ie())}function G2e(n,t){1&n&&(Ae(0,"div",90),qn(1,"span",89),Ie())}function z2e(n,t){1&n&&(Ae(0,"mat-header-cell",99),Ae(1,"div",100),qn(2,"i",101),Ie(),Ie())}function q2e(n,t){if(1&n&&(Ae(0,"mat-cell",102),Ae(1,"h6",103),kt(2,"Network"),Ie(),Ae(3,"div",104),qn(4,"img",105),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(4),qu("src",r.chain.metadata[e.pool.chainId].iconPath,Pi),_l("alt","",r.chain.metadata[e.pool.chainId].displayName," Icon")}}function K2e(n,t){1&n&&(Ae(0,"mat-header-cell",106),kt(1," Pool "),Ie())}yt(YT,"\u0275fac",function(e){return new(e||kI)}),yt(YT,"\u0275pipe",Qn({name:"truncate",type:kI,pure:!0}));const $V=function(n,t){return{"border-pyt-xs":n,"border-nyt-xs":t}};function Z2e(n,t){if(1&n&&(Ae(0,"mat-cell",107),Ae(1,"h6",103),kt(2,"Pool"),Ie(),Ae(3,"div",108),Ae(4,"div",109),Ae(5,"div",104),qn(6,"img",110),Ie(),Ae(7,"div",104),qn(8,"img",110),Ie(),Ie(),Ae(9,"div",111),kt(10),Ie(),Ae(11,"span",112),kt(12),Ie(),Ie(),Ie()),2&n){const e=t.$implicit;dt(6),qu("src",e.pool.token0.iconPath,Pi),_l("alt","",e.pool.token0.symbol," Icon"),Mt("ngClass",vc(9,$V,e.pool.token0.symbol.includes("PYT"),e.pool.token0.symbol.includes("NYT"))),dt(2),qu("src",e.pool.token1.iconPath,Pi),_l("alt","",e.pool.token1.symbol," Icon"),Mt("ngClass",vc(12,$V,e.pool.token1.symbol.includes("PYT"),e.pool.token1.symbol.includes("NYT"))),dt(2),cu(" ",e.pool.token0.symbol,"/",e.pool.token1.symbol," "),dt(2),Pr(" ",e.pool.fee/1e4,"% ")}}function Y2e(n,t){1&n&&(Ae(0,"mat-header-cell",113),kt(1," Total Votes "),Ie())}function J2e(n,t){1&n&&qn(0,"i",120)}function X2e(n,t){1&n&&qn(0,"i",121)}function Q2e(n,t){if(1&n&&(Ae(0,"mat-cell",114),Ae(1,"h6",103),kt(2,"Total Votes"),Ie(),Ae(3,"div",115),kt(4),Ae(5,"div",116),Ae(6,"span",117),kt(7),Ie(),it(8,J2e,1,0,"i",118),it(9,X2e,1,0,"i",119),Ie(),Ie(),Ie()),2&n){const e=t.$implicit;dt(4),Pr(" ",e.totalVotes.toFormat(2)," "),dt(3),Pr(" ",e.totalVotePercent.times(100).toFixed(2),"% "),dt(1),Mt("ngIf",e.totalVotePercent.gt(e.weightThisPeriod)),dt(1),Mt("ngIf",e.totalVotePercent.lt(e.weightThisPeriod))}}function ege(n,t){1&n&&(Ae(0,"mat-header-cell",122),kt(1," Total Bribes "),Ie())}function tge(n,t){if(1&n&&(Ae(0,"mat-cell",123),Ae(1,"h6",103),kt(2,"Total Bribes"),Ie(),kt(3),Ie()),2&n){const e=t.$implicit;dt(3),Pr(" $",e.totalReward.toFormat(2)," ")}}function nge(n,t){1&n&&(Ae(0,"mat-header-cell",122),kt(1," Bribes/veLIT "),Ie())}function rge(n,t){1&n&&qn(0,"i",125)}function ige(n,t){if(1&n&&(Ae(0,"mat-cell",123),Ae(1,"h6",103),kt(2,"Bribes/veLIT"),Ie(),kt(3),it(4,rge,1,0,"i",124),Ie()),2&n){const e=t.$implicit,r=an();dt(3),Pr(" $",e.averageReward.toFormat(4)," "),dt(1),Mt("ngIf",r.displayVoteCapWarning(e))}}function sge(n,t){1&n&&(Ae(0,"mat-header-cell",126),kt(1," My Votes / $ Bribes "),Ie())}function oge(n,t){if(1&n&&(Ae(0,"mat-cell",127),Ae(1,"h6",103),kt(2,"My Votes"),Ie(),Ae(3,"div",128),Ae(4,"div"),kt(5),Ie(),Ae(6,"span",117),kt(7),Ie(),Ie(),Ie()),2&n){const e=t.$implicit,r=an();dt(5),bc(e.userVotes.div(1e4).times(r.escrow.veLIT.userBalance).toFormat(2)),dt(2),cu(" ",e.userVotes.div(1e4).times(100).toFormat(2),"% ($",r.calculateProduct(e).toFormat(2),") ")}}function age(n,t){1&n&&(Ae(0,"mat-header-cell",129),kt(1," My Vote % "),Ie())}function uge(n,t){if(1&n){const e=Di();Ae(0,"mat-cell",130),Ae(1,"h6",103),kt(2,"My vote %"),Ie(),Ae(3,"input",131),dr("input",function(s){const F=Ur(e).$implicit;return an().changeUservote(F,s.target.value)})("click",function(s){return s.stopPropagation()}),Ie(),Ie()}if(2&n){const e=t.$implicit,r=an();dt(3),Mt("value",e.userVotes.div(1e4).times(100))("disabled",r.time.now